Skip to content

Commit 224477a

Browse files
authored
chore: upgrade bulma to v1 (#3420)
1 parent 6300532 commit 224477a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+874
-959
lines changed

.changeset/large-books-remember.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@undp-data/svelte-geohub-static-image-controls": major
3+
"@undp-data/svelte-undp-components": major
4+
"@undp-data/svelte-undp-design": major
5+
"@undp-data/svelte-copy-to-clipboard": major
6+
"@undp-data/svelte-sidebar": major
7+
"@undp-data/undp-bulma": major
8+
"geohub": patch
9+
---
10+
11+
chore: migrated bulma to v1.0.0. Included fontawesome css and google font icon css in customised bulma css.

documentation/docs/visualization/visualize_vector_polygon.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ You can assign a color for polygon outline. As default, black color will be assi
7070

7171
## Next step
7272

73-
In the next section, we are going to learn different type of visualization - 3D polygon for polygon dataset
73+
In the next section, we are going to learn different type of visualization - 3D polygon for polygon dataset

packages/copy-to-clipboard/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@testing-library/user-event": "^14.5.1",
4949
"@typescript-eslint/eslint-plugin": "^7.0.0",
5050
"@typescript-eslint/parser": "^7.0.0",
51+
"@undp-data/undp-bulma": "workspace:^",
5152
"@vitest/coverage-istanbul": "^1.1.0",
5253
"eslint": "^8.56.0",
5354
"eslint-config-prettier": "^9.1.0",

packages/copy-to-clipboard/src/routes/+page.svelte

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { CopyToClipboard } from '$lib';
3+
import '@undp-data/undp-bulma/dist/style.css';
34
45
let value1 = 'copy single line text';
56
let value2 = `copy multile text\ncopy multile text`;
@@ -12,17 +13,6 @@
1213
let timeout = 5000;
1314
</script>
1415

15-
<svelte:head>
16-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" />
17-
<link
18-
rel="stylesheet"
19-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
20-
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
21-
crossorigin="anonymous"
22-
referrerpolicy="no-referrer"
23-
/>
24-
</svelte:head>
25-
2616
<div class="p-4">
2717
<h1 class="is-title is-size-1">Welcome to copy-to-clipboard</h1>
2818

packages/svelte-sidebar/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@sveltejs/vite-plugin-svelte": "^3.0.0",
3737
"@typescript-eslint/eslint-plugin": "^7.0.0",
3838
"@typescript-eslint/parser": "^7.0.0",
39+
"@undp-data/undp-bulma": "workspace:^",
3940
"@vitest/coverage-istanbul": "^1.1.0",
4041
"eslint": "^8.56.0",
4142
"eslint-config-prettier": "^9.1.0",

packages/svelte-sidebar/src/lib/Sidebar.svelte

+10
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@
191191
border-radius: 0px 100px 100px 0px;
192192
background: #fff;
193193
box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
194+
195+
@media (prefers-color-scheme: dark) {
196+
background: #000;
197+
box-shadow: 3px 0px 6px 0px rgba(255, 255, 255, 0.1);
198+
}
194199
}
195200
}
196201
@@ -205,6 +210,11 @@
205210
border-radius: 100px 0px 0px 100px;
206211
background: #fff;
207212
box-shadow: -3px 0px 6px 0px rgba(0, 0, 0, 0.1);
213+
214+
@media (prefers-color-scheme: dark) {
215+
background: #000;
216+
box-shadow: 3px 0px 6px 0px rgba(255, 255, 255, 0.1);
217+
}
208218
}
209219
}
210220

packages/svelte-sidebar/src/routes/+page.svelte

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
<script lang="ts">
22
import { Sidebar, type SidebarPosition } from '$lib';
3+
import '@undp-data/undp-bulma/dist/style.css';
34
45
let sidebarPosition: SidebarPosition = 'left';
56
let sidebarBorderStyle = '1px solid #1c1c1c';
67
</script>
78

8-
<svelte:head>
9-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" />
10-
<link
11-
rel="stylesheet"
12-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
13-
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
14-
crossorigin="anonymous"
15-
referrerpolicy="no-referrer"
16-
/>
17-
</svelte:head>
18-
199
<Sidebar show={true} bind:position={sidebarPosition} bind:border={sidebarBorderStyle}>
2010
<div slot="content" class="p-4">
2111
Sidebar content

packages/svelte-static-image-controls/src/lib/MaplibreStaticImageControl.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838

3939
<script lang="ts">
4040
import { draggable, type DragOptions } from '@neodrag/svelte';
41-
import type { ControlOptions } from './interface/index.js';
4241
import StaticImageControl from './StaticImageControl.svelte';
42+
import type { ControlOptions } from './interface/index.js';
4343
4444
const dispatch = createEventDispatcher();
4545

packages/svelte-static-image-controls/src/routes/+page.svelte

+1-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
let map: Map;
1414
15-
let styleUrl = 'https://unpkg.com/@undp-data/style@latest/dist/style.json';
15+
let styleUrl = 'https://dev.undpgeohub.org/api/mapstyle/style.json';
1616
1717
let loadedUrl = styleUrl;
1818
let apiUrl = '';
@@ -68,16 +68,6 @@
6868
};
6969
</script>
7070

71-
<svelte:head>
72-
<link
73-
rel="stylesheet"
74-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
75-
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
76-
crossorigin="anonymous"
77-
referrerpolicy="no-referrer"
78-
/>
79-
</svelte:head>
80-
8171
<div class="field m-1">
8272
<!-- svelte-ignore a11y-label-has-associated-control -->
8373
<label class="label">Style URL</label>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
<link
2-
rel="stylesheet"
3-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
4-
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
5-
crossorigin="anonymous"
6-
referrerpolicy="no-referrer"
7-
/>
8-
<link rel="stylesheet" href="https://unpkg.com/@undp-data/undp-bulma@0.0.15/dist/style.css" />
1+
<link rel="stylesheet" href="node_modules/@undp-data/undp-bulma/dist/style.css" />
92
<script>
103
window.global = window;
114
</script>

packages/svelte-undp-components/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"@types/eslint": "^8.56.0",
6262
"@typescript-eslint/eslint-plugin": "^7.0.0",
6363
"@typescript-eslint/parser": "^7.0.0",
64+
"@undp-data/undp-bulma": "workspace:^",
6465
"bulma-switch": "^2.0.4",
6566
"eslint": "^8.56.0",
6667
"eslint-config-prettier": "^9.1.0",

packages/svelte-undp-components/src/lib/components/ColorMapPicker.svelte

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@
201201
.card {
202202
cursor: pointer;
203203
padding: 1px;
204+
margin-bottom: 0;
205+
border-radius: 0;
204206
205207
&:hover {
206208
padding: 0;

packages/svelte-undp-components/src/lib/components/DatePicker.svelte

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
{disabled}
118118
/>
119119

120-
<button class="panel-button button is-{size} {size === 'small' ? 'py-1 px-4' : ''}" {disabled}>
120+
<button class="panel-button button is-{size} {size === 'small' ? 'px-4' : ''}" {disabled}>
121121
<span class="icon is-small">
122122
<i class={icon} />
123123
</span>
@@ -143,6 +143,7 @@
143143
cursor: pointer;
144144
width: fit-content;
145145
max-width: 200px;
146+
border-radius: 0;
146147
&:disabled {
147148
border: 1px solid black;
148149
cursor: no-drop;

packages/svelte-undp-components/src/lib/components/FloatingPanel.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
.button {
9696
border: none;
9797
background: transparent;
98+
box-shadow: none;
9899
}
99100
}
100101
}

packages/svelte-undp-components/src/lib/components/NumberInput.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
{#if !readonly}
131131
<p class="control">
132132
<button
133-
class="button is-{size} {size === 'small' ? 'py-0 px-4' : ''}"
133+
class="button is-{size} {size === 'small' ? 'px-4' : ''}"
134134
on:click={handleDecrement}
135135
disabled={value <= minValue}
136136
title="Decrease number"
@@ -154,7 +154,7 @@
154154
{#if !readonly}
155155
<p class="control">
156156
<button
157-
class="button is-{size} {size === 'small' ? 'py-0 px-4' : ''}"
157+
class="button is-{size} {size === 'small' ? 'px-4' : ''}"
158158
on:click={handleIncrement}
159159
disabled={value >= maxValue}
160160
title="Increase number"
@@ -172,7 +172,7 @@
172172
.input {
173173
max-width: 4rem;
174174
min-width: 45px;
175-
border-color: hsl(0, 0%, 86%);
175+
border-color: hsl(0, 0%, 86%) !important;
176176
}
177177
}
178178
</style>

packages/svelte-undp-components/src/lib/components/PanelButton.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
border: none;
5656
outline: none;
5757
appearance: none;
58+
box-shadow: none;
5859
}
5960
}
6061
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
<link
2-
rel="stylesheet"
3-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
4-
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
5-
crossorigin="anonymous"
6-
referrerpolicy="no-referrer"
7-
/>
8-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" />
1+
<link rel="stylesheet" href="node_modules/@undp-data/undp-bulma/dist/style.css" />
92
<script>
103
window.global = window;
114
</script>

packages/svelte-undp-design/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@testing-library/user-event": "^14.5.1",
4343
"@typescript-eslint/eslint-plugin": "7.7.1",
4444
"@typescript-eslint/parser": "^7.0.0",
45+
"@undp-data/undp-bulma": "workspace:^",
4546
"@vitest/coverage-istanbul": "^1.1.0",
4647
"eslint": "^8.56.0",
4748
"eslint-config-prettier": "^9.1.0",

packages/svelte-undp-design/src/lib/DefaultLink/DefaultLink.svelte

+4
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@
1111

1212
<style lang="scss">
1313
@use '../css/base-minimal.min.css';
14+
15+
a {
16+
color: inherit !important;
17+
}
1418
</style>

0 commit comments

Comments
 (0)