@kws3/ui 4.5.1 → 4.5.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.mdx +8 -0
- package/controls/ToggleButtons.svelte +3 -2
- package/forms/AutoComplete.svelte +13 -10
- package/forms/colorpicker/Colorpicker.svelte +1 -1
- package/forms/select/MultiSelect.svelte +13 -10
- package/forms/select/SearchableSelect.svelte +2 -2
- package/package.json +14 -4
- package/styles/CheckRadio.scss +1 -1
- package/styles/Colorpicker.scss +1 -1
- package/styles/RangeSlider.scss +4 -4
package/CHANGELOG.mdx
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## Unreleased
|
|
2
|
+
- Fix hardcoded color in `Radio` component
|
|
3
|
+
- Remove legacy additional `is-active` class from active buttons in `ToggleButtons` component
|
|
4
|
+
- Fix value type in `SearchableSelect`
|
|
5
|
+
- Make `AutoComplete`, `SearchableSelect` and `MultiSelect` components work in SSR mode
|
|
6
|
+
- Fix default colors and output radius for `RangeSlider`
|
|
7
|
+
- Fix default thumb and output radius for `RangeSlider`
|
|
8
|
+
|
|
1
9
|
## 4.5.1
|
|
2
10
|
- Fix ActionReturn type for `popover` action
|
|
3
11
|
- Update popover arrow default colour to be border color
|
|
@@ -39,8 +39,9 @@ This property can be bound to, to fetch the current value, Default: `null`
|
|
|
39
39
|
}}
|
|
40
40
|
class="button is-{size} {fullwidth ? 'is-fullwidth' : ''} {value ===
|
|
41
41
|
option.value
|
|
42
|
-
?
|
|
43
|
-
|
|
42
|
+
? option.active_class
|
|
43
|
+
? option.active_class
|
|
44
|
+
: active_class
|
|
44
45
|
: option.inactive_class
|
|
45
46
|
? option.inactive_class
|
|
46
47
|
: inactive_class}">
|
|
@@ -67,7 +67,7 @@ Default value: `<span>{option.label}</span>`
|
|
|
67
67
|
style="border: none;"
|
|
68
68
|
class="button delete paddingless is-small is-loading" />
|
|
69
69
|
{/if}
|
|
70
|
-
{#if
|
|
70
|
+
{#if typeof window !== "undefined"}
|
|
71
71
|
<div
|
|
72
72
|
class="kws-autocomplete is-{color || 'primary'}"
|
|
73
73
|
use:portal={dropdown_portal}>
|
|
@@ -237,18 +237,11 @@ Default value: `<span>{option.label}</span>`
|
|
|
237
237
|
let klass = "";
|
|
238
238
|
export { klass as class };
|
|
239
239
|
|
|
240
|
+
let rootContainer;
|
|
241
|
+
|
|
240
242
|
if (!search && (!options || !options.length))
|
|
241
243
|
console.error(`Missing options`);
|
|
242
244
|
|
|
243
|
-
//ensure we have a root container for all our hoisitng related stuff
|
|
244
|
-
|
|
245
|
-
let rootContainer = document.getElementById(rootContainerId);
|
|
246
|
-
if (!rootContainer) {
|
|
247
|
-
rootContainer = document.createElement("div");
|
|
248
|
-
rootContainer.id = rootContainerId;
|
|
249
|
-
document.body.appendChild(rootContainer);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
245
|
const fire = createEventDispatcher();
|
|
253
246
|
|
|
254
247
|
let el, //whole wrapping element
|
|
@@ -337,6 +330,16 @@ Default value: `<span>{option.label}</span>`
|
|
|
337
330
|
const debouncedTriggerSearch = debounce(triggerExternalSearch, 150, false);
|
|
338
331
|
|
|
339
332
|
onMount(() => {
|
|
333
|
+
//ensure we have a root container for all our hoisitng related stuff
|
|
334
|
+
if (typeof window !== "undefined") {
|
|
335
|
+
rootContainer = document.getElementById(rootContainerId);
|
|
336
|
+
if (!rootContainer) {
|
|
337
|
+
rootContainer = document.createElement("div");
|
|
338
|
+
rootContainer.id = rootContainerId;
|
|
339
|
+
document.body.appendChild(rootContainer);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
340
343
|
POPPER = createPopper(el, dropdown, {
|
|
341
344
|
strategy: popper_strategy,
|
|
342
345
|
placement: "bottom-start",
|
|
@@ -96,7 +96,7 @@ This property can be bound to, to fetch the current colour, Default: `"000000"`
|
|
|
96
96
|
_colorpicker;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* @type {import("svelte/action").Action}
|
|
99
|
+
* @type {import("svelte/action").Action<HTMLElement, string>}
|
|
100
100
|
*/
|
|
101
101
|
function colorpicker(node) {
|
|
102
102
|
_colorpicker = new ColorPicker(node);
|
|
@@ -120,7 +120,7 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
120
120
|
on:click|stopPropagation={removeAll}
|
|
121
121
|
style={shouldShowClearAll ? "" : "display: none;"} />
|
|
122
122
|
{/if}
|
|
123
|
-
{#if
|
|
123
|
+
{#if typeof window !== "undefined"}
|
|
124
124
|
<div
|
|
125
125
|
class="kws-searchableselect is-{color || 'primary'}"
|
|
126
126
|
use:portal={dropdown_portal}>
|
|
@@ -335,6 +335,8 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
335
335
|
let klass = "";
|
|
336
336
|
export { klass as class };
|
|
337
337
|
|
|
338
|
+
let rootContainer;
|
|
339
|
+
|
|
338
340
|
if (!search && (!options || !options.length))
|
|
339
341
|
console.error(`Missing options`);
|
|
340
342
|
|
|
@@ -342,15 +344,6 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
342
344
|
throw new TypeError(`max must be null or positive integer, got ${max}`);
|
|
343
345
|
}
|
|
344
346
|
|
|
345
|
-
//ensure we have a root container for all our hoisitng related stuff
|
|
346
|
-
|
|
347
|
-
let rootContainer = document.getElementById(rootContainerId);
|
|
348
|
-
if (!rootContainer) {
|
|
349
|
-
rootContainer = document.createElement("div");
|
|
350
|
-
rootContainer.id = rootContainerId;
|
|
351
|
-
document.body.appendChild(rootContainer);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
347
|
const fire = createEventDispatcher();
|
|
355
348
|
|
|
356
349
|
let el, //whole wrapping element
|
|
@@ -532,6 +525,16 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
532
525
|
const debouncedTriggerSearch = debounce(triggerSearch, 150, false);
|
|
533
526
|
|
|
534
527
|
onMount(() => {
|
|
528
|
+
//ensure we have a root container for all our hoisitng related stuff
|
|
529
|
+
if (typeof window !== "undefined") {
|
|
530
|
+
rootContainer = document.getElementById(rootContainerId);
|
|
531
|
+
if (!rootContainer) {
|
|
532
|
+
rootContainer = document.createElement("div");
|
|
533
|
+
rootContainer.id = rootContainerId;
|
|
534
|
+
document.body.appendChild(rootContainer);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
535
538
|
POPPER = createPopper(el, dropdown, {
|
|
536
539
|
strategy: popper_strategy,
|
|
537
540
|
placement: "bottom-start",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@component
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
@param {
|
|
5
|
+
@param {any} [value=null] - Value of the Input
|
|
6
6
|
|
|
7
7
|
This property can be bound to, to fetch the current value, Default: `null`
|
|
8
8
|
@param {string} [placeholder="Please select..."] - Placeholder text for the input, Default: `"Please select..."`
|
|
@@ -96,7 +96,7 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
96
96
|
* Value of the Input
|
|
97
97
|
*
|
|
98
98
|
* This property can be bound to, to fetch the current value
|
|
99
|
-
* @type {
|
|
99
|
+
* @type {any}
|
|
100
100
|
*/
|
|
101
101
|
export let value = null;
|
|
102
102
|
/**
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2-alpha.0",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"svelte": "index.js",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
8
|
},
|
|
@@ -24,13 +23,24 @@
|
|
|
24
23
|
"publishConfig": {
|
|
25
24
|
"access": "public"
|
|
26
25
|
},
|
|
26
|
+
"svelte": "index.js",
|
|
27
27
|
"types": "./index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
"./utils": {
|
|
30
|
+
"types": "./utils/index.d.ts",
|
|
31
|
+
"default": "./utils/index.js"
|
|
32
|
+
},
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"svelte": "./index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
28
38
|
"peerDependencies": {
|
|
29
39
|
"bulma": "^1.0.0",
|
|
30
40
|
"svelte": "^4.2.10"
|
|
31
41
|
},
|
|
32
42
|
"dependencies": {
|
|
33
|
-
"@kws3/text-mask-core": "^5.1.
|
|
43
|
+
"@kws3/text-mask-core": "^5.1.4",
|
|
34
44
|
"apexcharts": "3.33.2",
|
|
35
45
|
"flatpickr": "^4.5.2",
|
|
36
46
|
"svelte-portal": "^2.2.1",
|
|
@@ -39,5 +49,5 @@
|
|
|
39
49
|
"devDependencies": {
|
|
40
50
|
"typescript": "^5.2.2"
|
|
41
51
|
},
|
|
42
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "b6b31eef1ad27066780cef8cfa230bb958cec969"
|
|
43
53
|
}
|
package/styles/CheckRadio.scss
CHANGED
package/styles/Colorpicker.scss
CHANGED
package/styles/RangeSlider.scss
CHANGED
|
@@ -8,14 +8,14 @@ $track-radius: cv.getVar("radius") !default;
|
|
|
8
8
|
$track-border: 0px solid cv.getVar("border") !default;
|
|
9
9
|
$track-shadow: cv.getVar("input-shadow") !default;
|
|
10
10
|
$thumb-background: cv.getVar("text-invert") !default;
|
|
11
|
-
$thumb-radius: cv.getVar("radius
|
|
11
|
+
$thumb-radius: cv.getVar("radius") !default;
|
|
12
12
|
$thumb-border: 1px solid cv.getVar("border") !default;
|
|
13
13
|
$thumb-shadow: none !default;
|
|
14
14
|
$thumb-to-track-ratio: 2 !default;
|
|
15
15
|
$output-width: 3rem !default;
|
|
16
|
-
$output-background: cv.getVar("
|
|
17
|
-
$output-color: cv.getVar("text
|
|
18
|
-
$output-radius: cv.getVar("radius
|
|
16
|
+
$output-background: cv.getVar("border-weak") !default;
|
|
17
|
+
$output-color: cv.getVar("text") !default;
|
|
18
|
+
$output-radius: cv.getVar("radius") !default;
|
|
19
19
|
|
|
20
20
|
@use "sass:math";
|
|
21
21
|
|