@kws3/ui 2.0.4 → 2.0.5
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
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
## 2.0.5
|
|
2
|
+
- `RangeSlider` - Expose native `input` event
|
|
3
|
+
- `RangeSlider` - Supports thumb color class `is-thumb-{color}`
|
|
4
|
+
- `AutoComplete`, `SearchInput`, `SearchableSelect` and `MultiSelect` - deprecated `scoreThreshold`, changed to `score_threshold`
|
|
5
|
+
|
|
1
6
|
## 2.0.4
|
|
2
|
-
- `ToggleButtons` - set the value if not disabled and not the same value is set
|
|
7
|
+
- `ToggleButtons` - set the value if not disabled and not the same value is set
|
|
3
8
|
|
|
4
9
|
## 2.0.3
|
|
5
10
|
- Sveltkit compatibility fix ('window' not defined)
|
|
@@ -23,6 +23,7 @@ This will be overridden if `min` is higher, or `max` is lower, Default: `0`
|
|
|
23
23
|
|
|
24
24
|
### Events
|
|
25
25
|
- `change` - Native input change event
|
|
26
|
+
- `input` - Native input event
|
|
26
27
|
|
|
27
28
|
-->
|
|
28
29
|
<div class="kws-range-control">
|
|
@@ -35,6 +36,7 @@ This will be overridden if `min` is higher, or `max` is lower, Default: `0`
|
|
|
35
36
|
type="range"
|
|
36
37
|
bind:value
|
|
37
38
|
on:change
|
|
39
|
+
on:input
|
|
38
40
|
{min}
|
|
39
41
|
{max}
|
|
40
42
|
{step}
|
|
@@ -15,7 +15,8 @@ Only send this prop if you want to fetch `options` asynchronously.
|
|
|
15
15
|
@param {string|'fuzzy'|'strict'} [search_strategy="fuzzy"] - Filtered options to be displayed strictly based on search text or perform a fuzzy match.
|
|
16
16
|
Fuzzy match will not work if `search` function is set, as the backend service is meant to do the matching., Default: `"fuzzy"`
|
|
17
17
|
@param {boolean} [highlighted_results=true] - Whether to show the highlighted or plain results in the dropdown., Default: `true`
|
|
18
|
-
@param {number} [
|
|
18
|
+
@param {number} [score_threshold=5] - Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `5`
|
|
19
|
+
@param {number} [scoreThreshold=5] - (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `5`
|
|
19
20
|
@param {string|''|'small'|'medium'|'large'} [size=""] - Size of the input, Default: `""`
|
|
20
21
|
@param {string|''|'primary'|'success'|'warning'|'info'|'danger'|'dark'|'light'} [color=""] - Color of the input, Default: `""`
|
|
21
22
|
@param {string} [style=""] - Inline CSS for input container, Default: `""`
|
|
@@ -183,7 +184,12 @@ Default value: `<span>{option.label}</span>`
|
|
|
183
184
|
* Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
184
185
|
* @type {number}
|
|
185
186
|
*/
|
|
186
|
-
export let
|
|
187
|
+
export let score_threshold = 5;
|
|
188
|
+
/**
|
|
189
|
+
* (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
190
|
+
* @type {number}
|
|
191
|
+
*/
|
|
192
|
+
export let scoreThreshold = score_threshold;
|
|
187
193
|
/**
|
|
188
194
|
* Size of the input
|
|
189
195
|
* @type {import('@kws3/ui/types').SizeOptions}
|
package/forms/SearchInput.svelte
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
@param {array} [options=[]] - Array of objects., Default: `[]`
|
|
11
11
|
@param {array} [searchableKeys=[]] - array of object properties to search in., Default: `[]`
|
|
12
12
|
@param {boolean} [highlighted_results=true] - Whether to show the highlighted or plain results in the dropdown., Default: `true`
|
|
13
|
-
@param {number} [
|
|
13
|
+
@param {number} [score_threshold=2] - Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `2`
|
|
14
|
+
@param {number} [scoreThreshold=2] - (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `2`
|
|
14
15
|
@param {boolean} [word_match=false] - Whether to match against each word seperatly or whole sentence in flow., Default: `false`
|
|
15
16
|
@param {string} [style=""] - Inline CSS for the input, Default: `""`
|
|
16
17
|
@param {string} [class=""] - CSS classes for the input, Default: `""`
|
|
@@ -87,9 +88,14 @@
|
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
90
|
* Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
90
|
-
*
|
|
91
|
+
* @type {number}
|
|
91
92
|
*/
|
|
92
|
-
export let
|
|
93
|
+
export let score_threshold = 2;
|
|
94
|
+
/**
|
|
95
|
+
* (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
96
|
+
* @type {number}
|
|
97
|
+
*/
|
|
98
|
+
export let scoreThreshold = score_threshold;
|
|
93
99
|
/**
|
|
94
100
|
* Whether to match against each word seperatly or whole sentence in flow.
|
|
95
101
|
*/
|
|
@@ -22,7 +22,8 @@ Only send this prop if you want to fetch `options` asynchronously.
|
|
|
22
22
|
`options` prop will be ignored if this prop is set., Default: `null`
|
|
23
23
|
@param {string|'fuzzy'|'strict'} [search_strategy="fuzzy"] - Filtered options to be displayed strictly based on search text or perform a fuzzy match.
|
|
24
24
|
Fuzzy match will not work if `search` function is set, as the backend service is meant to do the matching., Default: `"fuzzy"`
|
|
25
|
-
|
|
25
|
+
@param {number} [score_threshold=3] - Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `3`
|
|
26
|
+
@param {number} [scoreThreshold=3] - (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches., Default: `3`
|
|
26
27
|
@param {string|''|'small'|'medium'|'large'} [size=""] - Size of the input, Default: `""`
|
|
27
28
|
@param {string|''|'primary'|'success'|'warning'|'info'|'danger'|'dark'|'light'} [color=""] - Color of the input, Default: `""`
|
|
28
29
|
@param {string} [style=""] - Inline CSS for input container, Default: `""`
|
|
@@ -260,7 +261,12 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
260
261
|
* Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
261
262
|
* @type {number}
|
|
262
263
|
*/
|
|
263
|
-
export let
|
|
264
|
+
export let score_threshold = 3;
|
|
265
|
+
/**
|
|
266
|
+
* (deprecated) Score threshold for fuzzy search strategy, setting high score gives more fuzzy matches.
|
|
267
|
+
* @type {number}
|
|
268
|
+
*/
|
|
269
|
+
export let scoreThreshold = score_threshold;
|
|
264
270
|
/**
|
|
265
271
|
* Size of the input
|
|
266
272
|
* @type {import('@kws3/ui/types').SizeOptions}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"svelte": "index.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"text-mask-core": "^5.1.2",
|
|
33
33
|
"tippy.js": "^6.3.1"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "c9c69fd1abb9f287bb6e4301f5bad02c2b5292e4"
|
|
36
36
|
}
|
package/styles/RangeSlider.scss
CHANGED
|
@@ -253,6 +253,18 @@ $kws-slider-output-radius: $radius !default;
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
+
|
|
257
|
+
&.is-thumb-#{$name} {
|
|
258
|
+
&::-webkit-slider-thumb {
|
|
259
|
+
background: $color !important;
|
|
260
|
+
}
|
|
261
|
+
&::-moz-range-thumb {
|
|
262
|
+
background: $color !important;
|
|
263
|
+
}
|
|
264
|
+
&::-ms-thumb {
|
|
265
|
+
background: $color !important;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
256
268
|
}
|
|
257
269
|
}
|
|
258
270
|
}
|