@statistikzh/leu 0.24.0 → 0.24.1
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/.github/workflows/publish.yml +7 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/Accordion.js +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/ChartWrapper.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.js +1 -1
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/FileInput.js +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-BfbOWTGZ.js → LeuElement-jrR2M5pZ.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Message.js +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Placeholder.js +1 -1
- package/dist/Popup.js +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Range.d.ts +32 -20
- package/dist/Range.js +137 -72
- package/dist/ScrollTop.js +2 -25
- package/dist/Select.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/range/Range.d.ts +33 -20
- package/dist/components/range/Range.d.ts.map +1 -1
- package/dist/components/range/stories/range.stories.d.ts +1 -0
- package/dist/components/range/stories/range.stories.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +1 -1
- package/dist/leu-chart-wrapper.js +1 -1
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.js +1 -1
- package/dist/leu-dropdown.js +1 -1
- package/dist/leu-file-input.js +1 -1
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-message.js +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.js +1 -1
- package/dist/leu-progress-bar.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +3 -1
- package/dist/leu-scroll-top.js +2 -1
- package/dist/leu-select.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +1 -1
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/utils.d.ts +10 -3
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/utils-DBGsNSJW.js +33 -0
- package/dist/vscode.html-custom-data.json +66 -62
- package/dist/vue/index.d.ts +80 -73
- package/dist/web-types.json +143 -137
- package/package.json +1 -1
- package/src/components/range/Range.ts +160 -87
- package/src/components/range/stories/range.stories.ts +3 -0
- package/src/components/range/test/range.test.ts +59 -0
- package/src/lib/utils.ts +13 -3
package/dist/leu-file-input.js
CHANGED
|
@@ -4,7 +4,7 @@ import 'lit';
|
|
|
4
4
|
import 'lit/decorators.js';
|
|
5
5
|
import 'lit/directives/if-defined.js';
|
|
6
6
|
import 'lit/directives/class-map.js';
|
|
7
|
-
import './LeuElement-
|
|
7
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
8
8
|
import './Button.js';
|
|
9
9
|
import './Icon.js';
|
|
10
10
|
import './hasSlotController-Bm2tipvG.js';
|
package/dist/leu-icon.js
CHANGED
package/dist/leu-input.js
CHANGED
|
@@ -6,7 +6,7 @@ import 'lit/directives/if-defined.js';
|
|
|
6
6
|
import 'lit/directives/live.js';
|
|
7
7
|
import 'lit/directives/ref.js';
|
|
8
8
|
import 'lit/decorators.js';
|
|
9
|
-
import './LeuElement-
|
|
9
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
10
10
|
import './Icon.js';
|
|
11
11
|
|
|
12
12
|
LeuInput.define("leu-input");
|
package/dist/leu-menu-item.js
CHANGED
package/dist/leu-menu.js
CHANGED
|
@@ -2,7 +2,7 @@ import { LeuMenu } from './Menu.js';
|
|
|
2
2
|
import './_tslib-CNEFicEt.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/decorators.js';
|
|
5
|
-
import './LeuElement-
|
|
5
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
6
6
|
import './MenuItem.js';
|
|
7
7
|
import 'lit/directives/if-defined.js';
|
|
8
8
|
import './Icon.js';
|
package/dist/leu-message.js
CHANGED
package/dist/leu-pagination.js
CHANGED
|
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
|
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/live.js';
|
|
5
5
|
import 'lit/decorators.js';
|
|
6
|
-
import './LeuElement-
|
|
6
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
7
7
|
import './Button.js';
|
|
8
8
|
import 'lit/directives/class-map.js';
|
|
9
9
|
import 'lit/directives/if-defined.js';
|
package/dist/leu-placeholder.js
CHANGED
package/dist/leu-popup.js
CHANGED
package/dist/leu-progress-bar.js
CHANGED
package/dist/leu-radio-group.js
CHANGED
package/dist/leu-radio.js
CHANGED
package/dist/leu-range.js
CHANGED
|
@@ -2,7 +2,9 @@ import { LeuRange } from './Range.js';
|
|
|
2
2
|
import './_tslib-CNEFicEt.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/decorators.js';
|
|
5
|
-
import '
|
|
5
|
+
import 'lit/directives/if-defined.js';
|
|
6
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
7
|
+
import './utils-DBGsNSJW.js';
|
|
6
8
|
|
|
7
9
|
LeuRange.define("leu-range");
|
|
8
10
|
|
package/dist/leu-scroll-top.js
CHANGED
|
@@ -3,11 +3,12 @@ import './_tslib-CNEFicEt.js';
|
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/decorators.js';
|
|
6
|
-
import './LeuElement-
|
|
6
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
7
7
|
import './Button.js';
|
|
8
8
|
import 'lit/directives/if-defined.js';
|
|
9
9
|
import './Icon.js';
|
|
10
10
|
import './hasSlotController-Bm2tipvG.js';
|
|
11
|
+
import './utils-DBGsNSJW.js';
|
|
11
12
|
|
|
12
13
|
LeuScrollTop.define("leu-scroll-top");
|
|
13
14
|
|
package/dist/leu-select.js
CHANGED
|
@@ -3,7 +3,7 @@ import 'lit';
|
|
|
3
3
|
import 'lit/directives/class-map.js';
|
|
4
4
|
import 'lit/directives/ref.js';
|
|
5
5
|
import 'lit/directives/if-defined.js';
|
|
6
|
-
import './LeuElement-
|
|
6
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
7
7
|
import './hasSlotController-Bm2tipvG.js';
|
|
8
8
|
import './Button.js';
|
|
9
9
|
import './_tslib-CNEFicEt.js';
|
package/dist/leu-spinner.js
CHANGED
package/dist/leu-table.js
CHANGED
|
@@ -2,7 +2,7 @@ import { LeuTable } from './Table.js';
|
|
|
2
2
|
import 'lit';
|
|
3
3
|
import 'lit/directives/class-map.js';
|
|
4
4
|
import 'lit/directives/ref.js';
|
|
5
|
-
import './LeuElement-
|
|
5
|
+
import './LeuElement-jrR2M5pZ.js';
|
|
6
6
|
import 'lit/directive.js';
|
|
7
7
|
import './Icon.js';
|
|
8
8
|
import './_tslib-CNEFicEt.js';
|
package/dist/leu-tag.js
CHANGED
package/dist/lib/utils.d.ts
CHANGED
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
* @param {Number} timeout - Default is 500 ms
|
|
5
5
|
* @returns {Function} - Your function wrapped in a timeout function
|
|
6
6
|
*/
|
|
7
|
-
declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
7
|
+
export declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
8
8
|
/**
|
|
9
9
|
* Return a throttled function that only invokes func at most once per every wait milliseconds.
|
|
10
10
|
* @param {Function} func - Your function
|
|
11
11
|
* @param {Number} timeout - Default is 500 ms
|
|
12
12
|
* @returns {Function} - Your function wrapped in a timeout function
|
|
13
13
|
*/
|
|
14
|
-
declare const throttle: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
15
|
-
|
|
14
|
+
export declare const throttle: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Clamp a number between a minimum and maximum value.
|
|
17
|
+
*/
|
|
18
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a value is a finite number.
|
|
21
|
+
*/
|
|
22
|
+
export declare const isNumber: (value: unknown) => value is number;
|
|
16
23
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,2DAQpB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,2DAUpB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACxB,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,QAAQ,UAAW,OAAO,KAAG,KAAK,IAAI,MACE,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.
|
|
3
|
+
* @param {Function} func - Your function
|
|
4
|
+
* @param {Number} timeout - Default is 500 ms
|
|
5
|
+
* @returns {Function} - Your function wrapped in a timeout function
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Return a throttled function that only invokes func at most once per every wait milliseconds.
|
|
9
|
+
* @param {Function} func - Your function
|
|
10
|
+
* @param {Number} timeout - Default is 500 ms
|
|
11
|
+
* @returns {Function} - Your function wrapped in a timeout function
|
|
12
|
+
*/
|
|
13
|
+
const throttle = function throttle(func, timeout = 500) {
|
|
14
|
+
let timer = null;
|
|
15
|
+
return (...args) => {
|
|
16
|
+
if (timer === null) {
|
|
17
|
+
func(...args);
|
|
18
|
+
timer = setTimeout(() => {
|
|
19
|
+
timer = null;
|
|
20
|
+
}, timeout);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Clamp a number between a minimum and maximum value.
|
|
26
|
+
*/
|
|
27
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
28
|
+
/**
|
|
29
|
+
* Check if a value is a finite number.
|
|
30
|
+
*/
|
|
31
|
+
const isNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
32
|
+
|
|
33
|
+
export { clamp as c, isNumber as i, throttle as t };
|
|
@@ -34,6 +34,17 @@
|
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
"name": "leu-button-group",
|
|
39
|
+
"description": "A radio input-like button group component.\nIt allows only one button to be active at a time.\n---\n\n\n### **Events:**\n - **input** - When the value of the group changes by clicking a button\n\n### **Slots:**\n - _default_ - Slot for the buttons",
|
|
40
|
+
"attributes": [],
|
|
41
|
+
"references": [
|
|
42
|
+
{
|
|
43
|
+
"name": "Documentation",
|
|
44
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/button-group"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
37
48
|
{
|
|
38
49
|
"name": "leu-button",
|
|
39
50
|
"description": "\n---\n\n\n### **Slots:**\n - **before** - The icon to display before the label\n- **after** - The icon to display after the label\n- _default_ - The label of the button or the icon if no label is set",
|
|
@@ -110,68 +121,34 @@
|
|
|
110
121
|
]
|
|
111
122
|
},
|
|
112
123
|
{
|
|
113
|
-
"name": "leu-
|
|
114
|
-
"description": "A
|
|
115
|
-
"attributes": [],
|
|
116
|
-
"references": [
|
|
117
|
-
{
|
|
118
|
-
"name": "Documentation",
|
|
119
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/button-group"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "leu-checkbox",
|
|
125
|
-
"description": "\n---\n",
|
|
126
|
-
"attributes": [
|
|
127
|
-
{ "name": "checked", "values": [] },
|
|
128
|
-
{ "name": "disabled", "values": [] },
|
|
129
|
-
{ "name": "value", "values": [] },
|
|
130
|
-
{ "name": "name", "values": [] }
|
|
131
|
-
],
|
|
132
|
-
"references": [
|
|
133
|
-
{
|
|
134
|
-
"name": "Documentation",
|
|
135
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/checkbox"
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"name": "leu-checkbox-group",
|
|
141
|
-
"description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
|
|
124
|
+
"name": "leu-chart-wrapper",
|
|
125
|
+
"description": "A wrapper element for charts.\n---\n\n\n### **Slots:**\n - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.\n- **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.\n- **chart** - The actual chart\n- **caption** - A caption for the chart, e.g. a source or explanation of the data.\n- **download** - A download button or dropdown to export the chart in different formats.",
|
|
142
126
|
"attributes": [
|
|
143
127
|
{
|
|
144
|
-
"name": "
|
|
145
|
-
"description": "
|
|
146
|
-
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "label",
|
|
150
|
-
"description": "The label of the checkbox group",
|
|
128
|
+
"name": "pending",
|
|
129
|
+
"description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
|
|
151
130
|
"values": []
|
|
152
131
|
}
|
|
153
132
|
],
|
|
154
133
|
"references": [
|
|
155
134
|
{
|
|
156
135
|
"name": "Documentation",
|
|
157
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/
|
|
136
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/chart-wrapper"
|
|
158
137
|
}
|
|
159
138
|
]
|
|
160
139
|
},
|
|
161
140
|
{
|
|
162
|
-
"name": "leu-
|
|
163
|
-
"description": "
|
|
141
|
+
"name": "leu-dialog",
|
|
142
|
+
"description": "\n---\n",
|
|
164
143
|
"attributes": [
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"values": []
|
|
169
|
-
}
|
|
144
|
+
{ "name": "label", "values": [] },
|
|
145
|
+
{ "name": "sublabel", "values": [] },
|
|
146
|
+
{ "name": "open", "values": [] }
|
|
170
147
|
],
|
|
171
148
|
"references": [
|
|
172
149
|
{
|
|
173
150
|
"name": "Documentation",
|
|
174
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/
|
|
151
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/dialog"
|
|
175
152
|
}
|
|
176
153
|
]
|
|
177
154
|
},
|
|
@@ -272,6 +249,44 @@
|
|
|
272
249
|
}
|
|
273
250
|
]
|
|
274
251
|
},
|
|
252
|
+
{
|
|
253
|
+
"name": "leu-checkbox",
|
|
254
|
+
"description": "\n---\n",
|
|
255
|
+
"attributes": [
|
|
256
|
+
{ "name": "checked", "values": [] },
|
|
257
|
+
{ "name": "disabled", "values": [] },
|
|
258
|
+
{ "name": "value", "values": [] },
|
|
259
|
+
{ "name": "name", "values": [] }
|
|
260
|
+
],
|
|
261
|
+
"references": [
|
|
262
|
+
{
|
|
263
|
+
"name": "Documentation",
|
|
264
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/checkbox"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "leu-checkbox-group",
|
|
270
|
+
"description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
|
|
271
|
+
"attributes": [
|
|
272
|
+
{
|
|
273
|
+
"name": "orientation",
|
|
274
|
+
"description": "Defines how the checkboxes should be aligned.",
|
|
275
|
+
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "label",
|
|
279
|
+
"description": "The label of the checkbox group",
|
|
280
|
+
"values": []
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"references": [
|
|
284
|
+
{
|
|
285
|
+
"name": "Documentation",
|
|
286
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/checkbox-group"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
275
290
|
{
|
|
276
291
|
"name": "leu-dropdown",
|
|
277
292
|
"description": "\n---\n",
|
|
@@ -454,21 +469,6 @@
|
|
|
454
469
|
}
|
|
455
470
|
]
|
|
456
471
|
},
|
|
457
|
-
{
|
|
458
|
-
"name": "leu-dialog",
|
|
459
|
-
"description": "\n---\n",
|
|
460
|
-
"attributes": [
|
|
461
|
-
{ "name": "label", "values": [] },
|
|
462
|
-
{ "name": "sublabel", "values": [] },
|
|
463
|
-
{ "name": "open", "values": [] }
|
|
464
|
-
],
|
|
465
|
-
"references": [
|
|
466
|
-
{
|
|
467
|
-
"name": "Documentation",
|
|
468
|
-
"url": "https://statistikzh.github.io/leu/?path=/story/dialog"
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
|
-
},
|
|
472
472
|
{
|
|
473
473
|
"name": "leu-menu",
|
|
474
474
|
"description": "\n---\n",
|
|
@@ -725,9 +725,13 @@
|
|
|
725
725
|
},
|
|
726
726
|
{
|
|
727
727
|
"name": "leu-range",
|
|
728
|
-
"description": "\n---\n\n\n### **Methods:**\n ",
|
|
728
|
+
"description": "\n---\n\n\n### **Events:**\n - **input**\n\n### **Methods:**\n ",
|
|
729
729
|
"attributes": [
|
|
730
|
-
{
|
|
730
|
+
{
|
|
731
|
+
"name": "value",
|
|
732
|
+
"description": "The default value of the range slider.\nString input is parsed as a comma-separated list of numbers.",
|
|
733
|
+
"values": [{ "name": "array" }]
|
|
734
|
+
},
|
|
731
735
|
{
|
|
732
736
|
"name": "min",
|
|
733
737
|
"description": "The minimum value of the range slider.",
|