@statistikzh/leu 0.13.1 → 0.14.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/.eslintrc.json +8 -0
- package/.github/workflows/ci.yml +78 -0
- package/.github/workflows/deploy-github-pages.yaml +2 -1
- package/.github/workflows/release-please.yml +2 -1
- package/.nvmrc +1 -0
- package/.prettierignore +1 -0
- package/.storybook/main.js +19 -3
- package/CHANGELOG.md +16 -0
- package/custom-elements-manifest.config.js +2 -2
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +2 -4
- package/dist/Button.d.ts +2 -2
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +2 -3
- package/dist/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +1 -3
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +1 -3
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.d.ts.map +1 -1
- package/dist/ChipGroup.js +2 -2
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +3 -5
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.js +3 -3
- package/dist/Icon.d.ts +2 -98
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.d.ts +7 -2
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +15 -8
- package/dist/{LeuElement-b670d77c.d.ts → LeuElement-BjGpKQpe.d.ts} +1 -1
- package/dist/LeuElement-BjGpKQpe.d.ts.map +1 -0
- package/dist/{LeuElement-b670d77c.js → LeuElement-BjGpKQpe.js} +2 -2
- package/dist/Menu.d.ts +2 -2
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.d.ts +3 -3
- package/dist/MenuItem.js +1 -1
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Popup.d.ts +2 -2
- package/dist/Popup.d.ts.map +1 -1
- package/dist/Popup.js +1 -3
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.d.ts.map +1 -1
- package/dist/Radio.js +1 -3
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +1 -3
- package/dist/Range.d.ts +1 -1
- package/dist/Range.d.ts.map +1 -1
- package/dist/Range.js +17 -19
- package/dist/ScrollTop.d.ts +1 -1
- package/dist/ScrollTop.d.ts.map +1 -1
- package/dist/ScrollTop.js +27 -3
- package/dist/Select.d.ts +3 -3
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +6 -4
- package/dist/Spinner.d.ts +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.d.ts +1 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +3 -4
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +3 -5
- package/dist/{hasSlotController-c09741c5.d.ts → hasSlotController-DvFw2NdC.d.ts} +1 -1
- package/dist/hasSlotController-DvFw2NdC.d.ts.map +1 -0
- package/dist/{hasSlotController-c09741c5.js → hasSlotController-DvFw2NdC.js} +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +5 -7
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +2 -2
- 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 +2 -2
- package/dist/leu-dropdown.js +2 -2
- 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-pagination.js +2 -2
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.js +2 -3
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/theme.css +143 -107
- package/dist/vscode.html-custom-data.json +3 -32
- package/dist/vue/index.d.ts +11 -77
- package/dist/web-types.json +246 -242
- package/index.js +0 -1
- package/package.json +55 -51
- package/rollup.config.js +3 -3
- package/scripts/generate-component/generate.js +5 -5
- package/src/components/accordion/test/accordion.test.js +24 -20
- package/src/components/button/Button.js +1 -1
- package/src/components/button/stories/button.stories.js +43 -45
- package/src/components/button/test/button.test.js +10 -10
- package/src/components/button-group/ButtonGroup.js +1 -1
- package/src/components/button-group/stories/button-group.stories.js +2 -2
- package/src/components/checkbox/checkbox.css +1 -0
- package/src/components/chip/ChipSelectable.js +1 -1
- package/src/components/chip/stories/chip-group.stories.js +4 -4
- package/src/components/chip/test/chip-group.test.js +25 -33
- package/src/components/chip/test/chip-link.test.js +5 -5
- package/src/components/chip/test/chip-removable.test.js +6 -8
- package/src/components/chip/test/chip-selectable.test.js +9 -11
- package/src/components/dialog/test/dialog.test.js +1 -1
- package/src/components/dropdown/test/dropdown.test.js +12 -13
- package/src/components/input/Input.js +25 -17
- package/src/components/input/stories/input.stories.js +0 -2
- package/src/components/input/test/input.test.js +26 -0
- package/src/components/menu/stories/menu-item.stories.js +2 -0
- package/src/components/menu/test/menu-item.test.js +3 -2
- package/src/components/menu/test/menu.test.js +24 -22
- package/src/components/pagination/Pagination.js +1 -1
- package/src/components/pagination/pagination.css +1 -1
- package/src/components/pagination/stories/pagination.stories.js +2 -1
- package/src/components/pagination/test/pagination.test.js +8 -6
- package/src/components/popup/Popup.js +4 -4
- package/src/components/popup/test/popup.test.js +6 -8
- package/src/components/radio/RadioGroup.js +2 -2
- package/src/components/range/Range.js +20 -21
- package/src/components/select/Select.js +6 -1
- package/src/components/select/stories/select.stories.js +1 -1
- package/src/components/select/test/select.test.js +18 -16
- package/src/components/table/Table.js +4 -4
- package/src/components/table/test/table.test.js +3 -2
- package/src/components/visually-hidden/test/visually-hidden.test.js +6 -8
- package/src/lib/LeuElement.js +2 -2
- package/src/lib/hasSlotController.js +1 -1
- package/src/styles/style.stories.js +3 -1
- package/tsconfig.build.json +4 -3
- package/web-dev-server.config.mjs +1 -0
- package/web-test-runner.config.mjs +1 -1
- package/.github/workflows/test.yml +0 -38
- package/.storybook/preview-head.html +0 -2
- package/dist/Breadcrumb.d.ts +0 -69
- package/dist/Breadcrumb.d.ts.map +0 -1
- package/dist/Breadcrumb.js +0 -391
- package/dist/LeuElement-b670d77c.d.ts.map +0 -1
- package/dist/hasSlotController-c09741c5.d.ts.map +0 -1
- package/dist/leu-breadcrumb.d.ts +0 -3
- package/dist/leu-breadcrumb.d.ts.map +0 -1
- package/dist/leu-breadcrumb.js +0 -17
- package/dist/utils-65469421.d.ts +0 -16
- package/dist/utils-65469421.d.ts.map +0 -1
- package/dist/utils-65469421.js +0 -35
- package/src/components/breadcrumb/Breadcrumb.js +0 -324
- package/src/components/breadcrumb/breadcrumb.css +0 -98
- package/src/components/breadcrumb/leu-breadcrumb.js +0 -5
- package/src/components/breadcrumb/stories/breadcrumb.stories.js +0 -73
- package/src/components/breadcrumb/test/breadcrumb.test.js +0 -141
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DefineComponent } from "vue";
|
|
2
2
|
|
|
3
3
|
import type { LeuAccordion } from "../Accordion.js";
|
|
4
|
-
import type { LeuBreadcrumb } from "../Breadcrumb.js";
|
|
5
4
|
import type { LeuButton } from "../Button.js";
|
|
6
5
|
import type { LeuButtonGroup, CustomEvent } from "../ButtonGroup.js";
|
|
7
6
|
import type { LeuCheckbox } from "../Checkbox.js";
|
|
@@ -38,27 +37,6 @@ type LeuAccordionProps = {
|
|
|
38
37
|
label?: LeuAccordion["label"];
|
|
39
38
|
};
|
|
40
39
|
|
|
41
|
-
type LeuBreadcrumbProps = {
|
|
42
|
-
/** Object array with { label, href } */
|
|
43
|
-
items?: LeuBreadcrumb["items"];
|
|
44
|
-
/** invert color on dark background */
|
|
45
|
-
inverted?: LeuBreadcrumb["inverted"];
|
|
46
|
-
/** */
|
|
47
|
-
_hiddenItems?: LeuBreadcrumb["_hiddenItems"];
|
|
48
|
-
/** */
|
|
49
|
-
_showBackOnly?: LeuBreadcrumb["_showBackOnly"];
|
|
50
|
-
/** */
|
|
51
|
-
_isRecalculating?: LeuBreadcrumb["_isRecalculating"];
|
|
52
|
-
/** */
|
|
53
|
-
_isDropdownOpen?: LeuBreadcrumb["_isDropdownOpen"];
|
|
54
|
-
/** */
|
|
55
|
-
_handleResize?: LeuBreadcrumb["_handleResize"];
|
|
56
|
-
/** */
|
|
57
|
-
_closeDropdown?: LeuBreadcrumb["_closeDropdown"];
|
|
58
|
-
/** */
|
|
59
|
-
resizeObserver?: LeuBreadcrumb["resizeObserver"];
|
|
60
|
-
};
|
|
61
|
-
|
|
62
40
|
type LeuButtonProps = {
|
|
63
41
|
/** */
|
|
64
42
|
label?: LeuButton["label"];
|
|
@@ -90,7 +68,7 @@ type LeuButtonGroupProps = {
|
|
|
90
68
|
/** */
|
|
91
69
|
_items?: LeuButtonGroup["_items"];
|
|
92
70
|
/** When the value of the group changes by clicking a button */
|
|
93
|
-
|
|
71
|
+
oninput?: (e: CustomEvent<CustomEvent>) => void;
|
|
94
72
|
};
|
|
95
73
|
|
|
96
74
|
type LeuCheckboxProps = {
|
|
@@ -130,34 +108,25 @@ If the selectionMode is single, only the first item with the given value is chec
|
|
|
130
108
|
};
|
|
131
109
|
|
|
132
110
|
type LeuChipLinkProps = {
|
|
133
|
-
/** */
|
|
134
|
-
""?: LeuChipLink[""];
|
|
135
111
|
/** The size of the chip */
|
|
136
112
|
size?: LeuChipLink["size"];
|
|
137
113
|
/** */
|
|
138
114
|
href?: LeuChipLink["href"];
|
|
139
115
|
/** */
|
|
140
116
|
inverted?: LeuChipLink["inverted"];
|
|
141
|
-
/** */
|
|
142
|
-
""?: LeuChipLink[""];
|
|
143
117
|
};
|
|
144
118
|
|
|
145
119
|
type LeuChipRemovableProps = {
|
|
146
|
-
/** */
|
|
147
|
-
""?: LeuChipRemovable[""];
|
|
148
120
|
/** The value of the chip. */
|
|
149
121
|
value?: LeuChipRemovable["value"];
|
|
150
122
|
/** */
|
|
151
123
|
inverted?: LeuChipRemovable["inverted"];
|
|
152
|
-
|
|
153
|
-
""?: LeuChipRemovable[""];
|
|
124
|
+
|
|
154
125
|
/** Dispatched when the user clicks on the chip */
|
|
155
|
-
|
|
126
|
+
onremove?: (e: CustomEvent<never>) => void;
|
|
156
127
|
};
|
|
157
128
|
|
|
158
129
|
type LeuChipSelectableProps = {
|
|
159
|
-
/** */
|
|
160
|
-
""?: LeuChipSelectable[""];
|
|
161
130
|
/** The size of the chip. Not supported for radio variant. */
|
|
162
131
|
size?: LeuChipSelectable["size"];
|
|
163
132
|
/** `toggle` or `radio`. Determines if only one or multiple chips can be selected. */
|
|
@@ -168,10 +137,9 @@ type LeuChipSelectableProps = {
|
|
|
168
137
|
value?: LeuChipSelectable["value"];
|
|
169
138
|
/** */
|
|
170
139
|
inverted?: LeuChipSelectable["inverted"];
|
|
140
|
+
|
|
171
141
|
/** */
|
|
172
|
-
|
|
173
|
-
/** */
|
|
174
|
-
onInput?: (e: CustomEvent<CustomEvent>) => void;
|
|
142
|
+
oninput?: (e: CustomEvent<CustomEvent>) => void;
|
|
175
143
|
};
|
|
176
144
|
|
|
177
145
|
type LeuDialogProps = {
|
|
@@ -254,9 +222,9 @@ type LeuInputProps = {
|
|
|
254
222
|
/** */
|
|
255
223
|
valueAsNumber?: LeuInput["valueAsNumber"];
|
|
256
224
|
/** Dispatched when the value of the input element changes. */
|
|
257
|
-
|
|
225
|
+
oninput?: (e: CustomEvent<CustomEvent>) => void;
|
|
258
226
|
/** Dispatched when the value of the input element changes and the input element loses focus. */
|
|
259
|
-
|
|
227
|
+
onchange?: (e: CustomEvent<CustomEvent>) => void;
|
|
260
228
|
};
|
|
261
229
|
|
|
262
230
|
type LeuMenuProps = {
|
|
@@ -301,7 +269,7 @@ type LeuPaginationProps = {
|
|
|
301
269
|
/** */
|
|
302
270
|
_maxPage?: LeuPagination["_maxPage"];
|
|
303
271
|
/** */
|
|
304
|
-
|
|
272
|
+
"onleu:pagechange"?: (e: CustomEvent<CustomEvent>) => void;
|
|
305
273
|
};
|
|
306
274
|
|
|
307
275
|
type LeuPopupProps = {
|
|
@@ -474,41 +442,6 @@ export type CustomElements = {
|
|
|
474
442
|
*/
|
|
475
443
|
"leu-accordion": DefineComponent<LeuAccordionProps>;
|
|
476
444
|
|
|
477
|
-
/**
|
|
478
|
-
* A Breadcrumb Navigation.
|
|
479
|
-
*
|
|
480
|
-
* The breadcrumbs can be displayed in two different layouts.
|
|
481
|
-
* Only the back link (the last item / parent of the current page)
|
|
482
|
-
* is displayed when…
|
|
483
|
-
* - … the width of the container is smaller
|
|
484
|
-
* than the BACK_ONLY_BREAKPOINT.
|
|
485
|
-
* - … less then two breadcrumb items could be displayed
|
|
486
|
-
* without overflowing the container.
|
|
487
|
-
*
|
|
488
|
-
* Otherwise as many items as possible are displayed in an inline list
|
|
489
|
-
* without overflowing the container. The remaining items are displayed
|
|
490
|
-
* in a dropdown menu.
|
|
491
|
-
*
|
|
492
|
-
* In order to determine the exact numbers of items that have to be
|
|
493
|
-
* hidden inside the dropdown, all of them have to be rendered first.
|
|
494
|
-
* 1. Render all items
|
|
495
|
-
* 2. Calculate (measure) the number of items that can be displayed
|
|
496
|
-
* without overflowing the container.
|
|
497
|
-
* 3. Updating the state (_hiddeItems) which will trigger a rerender
|
|
498
|
-
* 4. Render the items again with the new state.
|
|
499
|
-
*
|
|
500
|
-
* This results in multiple updates scheduled one after another. Lit
|
|
501
|
-
* will also print a waring in the console beacause of that.
|
|
502
|
-
* It's no a nice behaviour but the only one that works without
|
|
503
|
-
* having duplicate and hidden markup to derive the sizes from that.
|
|
504
|
-
* ---
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
* ### **Methods:**
|
|
508
|
-
* - **renderDropdown(): __** - Render the dropdown menu
|
|
509
|
-
*/
|
|
510
|
-
"leu-breadcrumb": DefineComponent<LeuBreadcrumbProps>;
|
|
511
|
-
|
|
512
445
|
/**
|
|
513
446
|
*
|
|
514
447
|
* ---
|
|
@@ -593,7 +526,7 @@ export type CustomElements = {
|
|
|
593
526
|
*
|
|
594
527
|
*
|
|
595
528
|
* ### **Events:**
|
|
596
|
-
* - **input**
|
|
529
|
+
* - **input**
|
|
597
530
|
*
|
|
598
531
|
* ### **Methods:**
|
|
599
532
|
* - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content
|
|
@@ -647,6 +580,7 @@ export type CustomElements = {
|
|
|
647
580
|
* e.g.
|
|
648
581
|
* `tooLong(this.maxlength)`
|
|
649
582
|
* This way the framework user can create reasonable validation messages
|
|
583
|
+
* - **checkValidity(): _boolean_** - Check input validation
|
|
650
584
|
* - **renderErrorMessages(): _TemplateResult | nothing_** - Creates an error list with an item for the given validity state.
|
|
651
585
|
*/
|
|
652
586
|
"leu-input": DefineComponent<LeuInputProps>;
|
|
@@ -677,7 +611,7 @@ export type CustomElements = {
|
|
|
677
611
|
*
|
|
678
612
|
*
|
|
679
613
|
* ### **Events:**
|
|
680
|
-
* - **leu:pagechange**
|
|
614
|
+
* - **leu:pagechange**
|
|
681
615
|
*/
|
|
682
616
|
"leu-pagination": DefineComponent<LeuPaginationProps>;
|
|
683
617
|
|