@statistikzh/leu 0.14.2 → 0.14.4
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 +23 -4
- package/.github/workflows/ci.yml +3 -0
- package/.github/workflows/release-please.yml +0 -1
- package/.prettierignore +1 -1
- package/.release-please-manifest.json +3 -0
- package/.storybook/{main.js → main.ts} +18 -2
- package/.storybook/{theme.js → theme.ts} +1 -0
- package/CHANGELOG.md +16 -0
- package/custom-elements-manifest.config.js +2 -2
- package/dist/Accordion.d.ts +32 -11
- package/dist/Accordion.js +96 -68
- package/dist/Button.d.ts +84 -33
- package/dist/Button.js +116 -136
- package/dist/ButtonGroup.d.ts +15 -10
- package/dist/ButtonGroup.js +65 -72
- package/dist/Checkbox.d.ts +41 -8
- package/dist/Checkbox.js +33 -45
- package/dist/CheckboxGroup.d.ts +21 -8
- package/dist/CheckboxGroup.js +31 -35
- package/dist/Chip.d.ts +23 -4
- package/dist/Chip.js +13 -17
- package/dist/ChipGroup.d.ts +43 -17
- package/dist/ChipGroup.js +87 -113
- package/dist/ChipLink.d.ts +28 -10
- package/dist/ChipLink.js +17 -24
- package/dist/ChipRemovable.d.ts +25 -6
- package/dist/ChipRemovable.js +32 -36
- package/dist/ChipSelectable.d.ts +41 -23
- package/dist/ChipSelectable.js +55 -69
- package/dist/Dialog.d.ts +39 -11
- package/dist/Dialog.js +48 -55
- package/dist/Dropdown.d.ts +44 -9
- package/dist/Dropdown.js +89 -96
- package/dist/Icon.d.ts +16 -9
- package/dist/Icon.js +117 -122
- package/dist/Input.d.ts +122 -34
- package/dist/Input.js +262 -342
- package/dist/LeuElement-x8UlIDDl.js +42 -0
- package/dist/LeuElement.d-BevHqLUu.d.ts +10 -0
- package/dist/Menu.d.ts +29 -10
- package/dist/Menu.js +111 -110
- package/dist/MenuItem.d.ts +69 -19
- package/dist/MenuItem.js +93 -109
- package/dist/Pagination.d.ts +46 -16
- package/dist/Pagination.js +101 -116
- package/dist/Popup.d.ts +55 -21
- package/dist/Popup.js +149 -178
- package/dist/Radio.d.ts +37 -8
- package/dist/Radio.js +30 -42
- package/dist/RadioGroup.d.ts +25 -7
- package/dist/RadioGroup.js +123 -128
- package/dist/Range.d.ts +62 -23
- package/dist/Range.js +154 -180
- package/dist/ScrollTop.d.ts +25 -14
- package/dist/ScrollTop.js +71 -75
- package/dist/Select.d.ts +55 -38
- package/dist/Select.js +310 -322
- package/dist/Spinner.d.ts +9 -4
- package/dist/Spinner.js +5 -5
- package/dist/Table.d.ts +61 -31
- package/dist/Table.js +160 -179
- package/dist/VisuallyHidden.d.ts +9 -4
- package/dist/VisuallyHidden.js +5 -5
- package/dist/components/accordion/Accordion.d.ts +49 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/leu-accordion.d.ts +8 -0
- package/dist/components/accordion/leu-accordion.d.ts.map +1 -0
- package/dist/components/accordion/stories/accordion.stories.d.ts +26 -0
- package/dist/components/accordion/stories/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion/test/accordion.test.d.ts +2 -0
- package/dist/components/accordion/test/accordion.test.d.ts.map +1 -0
- package/dist/components/button/Button.d.ts +93 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/leu-button.d.ts +8 -0
- package/dist/components/button/leu-button.d.ts.map +1 -0
- package/dist/components/button/stories/button.stories.d.ts +19 -0
- package/dist/components/button/stories/button.stories.d.ts.map +1 -0
- package/dist/components/button/test/button.test.d.ts +3 -0
- package/dist/components/button/test/button.test.d.ts.map +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +25 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/components/button-group/leu-button-group.d.ts +8 -0
- package/dist/components/button-group/leu-button-group.d.ts.map +1 -0
- package/dist/components/button-group/stories/button-group.stories.d.ts +15 -0
- package/dist/components/button-group/stories/button-group.stories.d.ts.map +1 -0
- package/dist/components/button-group/test/button-group.test.d.ts +3 -0
- package/dist/components/button-group/test/button-group.test.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +43 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/CheckboxGroup.d.ts +23 -0
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/checkbox/leu-checkbox-group.d.ts +8 -0
- package/dist/components/checkbox/leu-checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox/leu-checkbox.d.ts +8 -0
- package/dist/components/checkbox/leu-checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/stories/checkbox-group.stories.d.ts +29 -0
- package/dist/components/checkbox/stories/checkbox-group.stories.d.ts.map +1 -0
- package/dist/components/checkbox/stories/checkbox.stories.d.ts +22 -0
- package/dist/components/checkbox/stories/checkbox.stories.d.ts.map +1 -0
- package/dist/components/checkbox/test/checkbox-group.test.d.ts +3 -0
- package/dist/components/checkbox/test/checkbox-group.test.d.ts.map +1 -0
- package/dist/components/checkbox/test/checkbox.test.d.ts +2 -0
- package/dist/components/checkbox/test/checkbox.test.d.ts.map +1 -0
- package/dist/components/chip/Chip.d.ts +21 -0
- package/dist/components/chip/Chip.d.ts.map +1 -0
- package/dist/components/chip/ChipGroup.d.ts +58 -0
- package/dist/components/chip/ChipGroup.d.ts.map +1 -0
- package/dist/components/chip/ChipLink.d.ts +29 -0
- package/dist/components/chip/ChipLink.d.ts.map +1 -0
- package/dist/components/chip/ChipRemovable.d.ts +32 -0
- package/dist/components/chip/ChipRemovable.d.ts.map +1 -0
- package/dist/components/chip/ChipSelectable.d.ts +51 -0
- package/dist/components/chip/ChipSelectable.d.ts.map +1 -0
- package/dist/components/chip/exports.d.ts +5 -0
- package/dist/components/chip/exports.d.ts.map +1 -0
- package/dist/components/chip/leu-chip-group.d.ts +8 -0
- package/dist/components/chip/leu-chip-group.d.ts.map +1 -0
- package/dist/components/chip/leu-chip-link.d.ts +8 -0
- package/dist/components/chip/leu-chip-link.d.ts.map +1 -0
- package/dist/components/chip/leu-chip-removable.d.ts +8 -0
- package/dist/components/chip/leu-chip-removable.d.ts.map +1 -0
- package/dist/components/chip/leu-chip-selectable.d.ts +8 -0
- package/dist/components/chip/leu-chip-selectable.d.ts.map +1 -0
- package/dist/components/chip/stories/chip-group.stories.d.ts +40 -0
- package/dist/components/chip/stories/chip-group.stories.d.ts.map +1 -0
- package/dist/components/chip/stories/chip-link.stories.d.ts +27 -0
- package/dist/components/chip/stories/chip-link.stories.d.ts.map +1 -0
- package/dist/components/chip/stories/chip-removable.stories.d.ts +21 -0
- package/dist/components/chip/stories/chip-removable.stories.d.ts.map +1 -0
- package/dist/components/chip/stories/chip-selectable.stories.d.ts +35 -0
- package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +1 -0
- package/dist/components/chip/test/chip-group.test.d.ts +4 -0
- package/dist/components/chip/test/chip-group.test.d.ts.map +1 -0
- package/dist/components/chip/test/chip-link.test.d.ts +2 -0
- package/dist/components/chip/test/chip-link.test.d.ts.map +1 -0
- package/dist/components/chip/test/chip-removable.test.d.ts +2 -0
- package/dist/components/chip/test/chip-removable.test.d.ts.map +1 -0
- package/dist/components/chip/test/chip-selectable.test.d.ts +2 -0
- package/dist/components/chip/test/chip-selectable.test.d.ts.map +1 -0
- package/dist/components/chip/test/chip.test.d.ts +2 -0
- package/dist/components/chip/test/chip.test.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +41 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/dialog/leu-dialog.d.ts +8 -0
- package/dist/components/dialog/leu-dialog.d.ts.map +1 -0
- package/dist/components/dialog/stories/dialog.stories.d.ts +19 -0
- package/dist/components/dialog/stories/dialog.stories.d.ts.map +1 -0
- package/dist/components/dialog/test/dialog.test.d.ts +2 -0
- package/dist/components/dialog/test/dialog.test.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +49 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/leu-dropdown.d.ts +8 -0
- package/dist/components/dropdown/leu-dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/stories/dropdown.stories.d.ts +25 -0
- package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +1 -0
- package/dist/components/dropdown/test/dropdown.test.d.ts +2 -0
- package/dist/components/dropdown/test/dropdown.test.d.ts.map +1 -0
- package/dist/components/icon/Icon.d.ts +23 -0
- package/dist/components/icon/Icon.d.ts.map +1 -0
- package/dist/components/icon/leu-icon.d.ts +8 -0
- package/dist/components/icon/leu-icon.d.ts.map +1 -0
- package/dist/components/icon/paths.d.ts +101 -0
- package/dist/components/icon/paths.d.ts.map +1 -0
- package/dist/components/icon/stories/icon.stories.d.ts +22 -0
- package/dist/components/icon/stories/icon.stories.d.ts.map +1 -0
- package/dist/components/icon/test/icon.test.d.ts +2 -0
- package/dist/components/icon/test/icon.test.d.ts.map +1 -0
- package/dist/components/input/Input.d.ts +239 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/leu-input.d.ts +8 -0
- package/dist/components/input/leu-input.d.ts.map +1 -0
- package/dist/components/input/stories/input.stories.d.ts +35 -0
- package/dist/components/input/stories/input.stories.d.ts.map +1 -0
- package/dist/components/input/test/input.test.d.ts +2 -0
- package/dist/components/input/test/input.test.d.ts.map +1 -0
- package/dist/components/menu/Menu.d.ts +44 -0
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/MenuItem.d.ts +88 -0
- package/dist/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/components/menu/leu-menu-item.d.ts +8 -0
- package/dist/components/menu/leu-menu-item.d.ts.map +1 -0
- package/dist/components/menu/leu-menu.d.ts +8 -0
- package/dist/components/menu/leu-menu.d.ts.map +1 -0
- package/dist/components/menu/stories/menu-item.stories.d.ts +24 -0
- package/dist/components/menu/stories/menu-item.stories.d.ts.map +1 -0
- package/dist/components/menu/stories/menu.stories.d.ts +26 -0
- package/dist/components/menu/stories/menu.stories.d.ts.map +1 -0
- package/dist/components/menu/test/menu-item.test.d.ts +3 -0
- package/dist/components/menu/test/menu-item.test.d.ts.map +1 -0
- package/dist/components/menu/test/menu.test.d.ts +4 -0
- package/dist/components/menu/test/menu.test.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.d.ts +59 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/leu-pagination.d.ts +8 -0
- package/dist/components/pagination/leu-pagination.d.ts.map +1 -0
- package/dist/components/pagination/stories/pagination.stories.d.ts +17 -0
- package/dist/components/pagination/stories/pagination.stories.d.ts.map +1 -0
- package/dist/components/pagination/test/pagination.test.d.ts +2 -0
- package/dist/components/pagination/test/pagination.test.d.ts.map +1 -0
- package/dist/components/popup/Popup.d.ts +66 -0
- package/dist/components/popup/Popup.d.ts.map +1 -0
- package/dist/components/popup/leu-popup.d.ts +8 -0
- package/dist/components/popup/leu-popup.d.ts.map +1 -0
- package/dist/components/popup/stories/popup.stories.d.ts +17 -0
- package/dist/components/popup/stories/popup.stories.d.ts.map +1 -0
- package/dist/components/popup/test/popup.test.d.ts +2 -0
- package/dist/components/popup/test/popup.test.d.ts.map +1 -0
- package/dist/components/radio/Radio.d.ts +39 -0
- package/dist/components/radio/Radio.d.ts.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +34 -0
- package/dist/components/radio/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio/leu-radio-group.d.ts +8 -0
- package/dist/components/radio/leu-radio-group.d.ts.map +1 -0
- package/dist/components/radio/leu-radio.d.ts +8 -0
- package/dist/components/radio/leu-radio.d.ts.map +1 -0
- package/dist/components/radio/stories/radio-group.stories.d.ts +29 -0
- package/dist/components/radio/stories/radio-group.stories.d.ts.map +1 -0
- package/dist/components/radio/stories/radio.stories.d.ts +22 -0
- package/dist/components/radio/stories/radio.stories.d.ts.map +1 -0
- package/dist/components/radio/test/radio-group.test.d.ts +3 -0
- package/dist/components/radio/test/radio-group.test.d.ts.map +1 -0
- package/dist/components/radio/test/radio.test.d.ts +2 -0
- package/dist/components/radio/test/radio.test.d.ts.map +1 -0
- package/dist/components/range/Range.d.ts +95 -0
- package/dist/components/range/Range.d.ts.map +1 -0
- package/dist/components/range/leu-range.d.ts +8 -0
- package/dist/components/range/leu-range.d.ts.map +1 -0
- package/dist/components/range/stories/range-slider.stories.d.ts +26 -0
- package/dist/components/range/stories/range-slider.stories.d.ts.map +1 -0
- package/dist/components/range/test/range.test.d.ts +2 -0
- package/dist/components/range/test/range.test.d.ts.map +1 -0
- package/dist/components/scroll-top/ScrollTop.d.ts +25 -0
- package/dist/components/scroll-top/ScrollTop.d.ts.map +1 -0
- package/dist/components/scroll-top/leu-scroll-top.d.ts +8 -0
- package/dist/components/scroll-top/leu-scroll-top.d.ts.map +1 -0
- package/dist/components/scroll-top/stories/scroll-top.stories.d.ts +8 -0
- package/dist/components/scroll-top/stories/scroll-top.stories.d.ts.map +1 -0
- package/dist/components/scroll-top/test/scroll-top.test.d.ts +2 -0
- package/dist/components/scroll-top/test/scroll-top.test.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +145 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/leu-select.d.ts +8 -0
- package/dist/components/select/leu-select.d.ts.map +1 -0
- package/dist/components/select/stories/select.stories.d.ts +23 -0
- package/dist/components/select/stories/select.stories.d.ts.map +1 -0
- package/dist/components/select/test/fixtures.d.ts +2 -0
- package/dist/components/select/test/fixtures.d.ts.map +1 -0
- package/dist/components/select/test/select.test.d.ts +3 -0
- package/dist/components/select/test/select.test.d.ts.map +1 -0
- package/dist/components/spinner/Spinner.d.ts +10 -0
- package/dist/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/components/spinner/leu-spinner.d.ts +8 -0
- package/dist/components/spinner/leu-spinner.d.ts.map +1 -0
- package/dist/components/spinner/stories/spinner.stories.d.ts +16 -0
- package/dist/components/spinner/stories/spinner.stories.d.ts.map +1 -0
- package/dist/components/spinner/test/spinner.test.d.ts +2 -0
- package/dist/components/spinner/test/spinner.test.d.ts.map +1 -0
- package/dist/components/table/Table.d.ts +65 -0
- package/dist/components/table/Table.d.ts.map +1 -0
- package/dist/components/table/leu-table.d.ts +8 -0
- package/dist/components/table/leu-table.d.ts.map +1 -0
- package/dist/components/table/stories/table.stories.d.ts +15 -0
- package/dist/components/table/stories/table.stories.d.ts.map +1 -0
- package/dist/components/table/test/table.test.d.ts +2 -0
- package/dist/components/table/test/table.test.d.ts.map +1 -0
- package/dist/components/visually-hidden/VisuallyHidden.d.ts +9 -0
- package/dist/components/visually-hidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/visually-hidden/leu-visually-hidden.d.ts +8 -0
- package/dist/components/visually-hidden/leu-visually-hidden.d.ts.map +1 -0
- package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts +13 -0
- package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts.map +1 -0
- package/dist/components/visually-hidden/test/visually-hidden.test.d.ts +2 -0
- package/dist/components/visually-hidden/test/visually-hidden.test.d.ts.map +1 -0
- package/dist/hasSlotController-Bm2tipvG.js +53 -0
- package/dist/hasSlotController.d-emXwVXWF.d.ts +23 -0
- package/dist/index.d.ts +17 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/leu-accordion.d.ts +12 -2
- package/dist/leu-accordion.js +2 -1
- package/dist/leu-button-group.d.ts +12 -2
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.d.ts +14 -2
- package/dist/leu-button.js +2 -2
- package/dist/leu-checkbox-group.d.ts +12 -2
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.d.ts +13 -2
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.d.ts +12 -2
- package/dist/leu-chip-group.js +2 -2
- package/dist/leu-chip-link.d.ts +13 -2
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.d.ts +14 -2
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.d.ts +13 -2
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.d.ts +14 -2
- package/dist/leu-dialog.js +2 -2
- package/dist/leu-dropdown.d.ts +18 -2
- package/dist/leu-dropdown.js +2 -2
- package/dist/leu-icon.d.ts +12 -2
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.d.ts +13 -2
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.d.ts +13 -2
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.d.ts +14 -2
- package/dist/leu-menu.js +1 -1
- package/dist/leu-pagination.d.ts +16 -2
- package/dist/leu-pagination.js +2 -2
- package/dist/leu-popup.d.ts +12 -2
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.d.ts +12 -2
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.d.ts +12 -2
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.d.ts +12 -2
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.d.ts +15 -2
- package/dist/leu-scroll-top.js +2 -2
- package/dist/leu-select.d.ts +19 -2
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.d.ts +12 -2
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.d.ts +17 -2
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.d.ts +12 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/LeuElement.d.ts +8 -0
- package/dist/lib/LeuElement.d.ts.map +1 -0
- package/dist/lib/a11y.d.ts +11 -0
- package/dist/lib/a11y.d.ts.map +1 -0
- package/dist/lib/hasSlotController.d.ts +20 -0
- package/dist/lib/hasSlotController.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/styles/style.stories.d.ts +6 -0
- package/dist/styles/style.stories.d.ts.map +1 -0
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/vue/index.d.ts +1 -3
- package/dist/web-types.json +4 -5
- package/package.json +20 -13
- package/release-please-config.json +10 -0
- package/rollup.config.js +55 -25
- package/scripts/generate-component/generate.js +1 -1
- package/scripts/generate-component/templates/{[Name].js → [Name].ts} +3 -3
- package/src/components/accordion/{Accordion.js → Accordion.ts} +26 -21
- package/src/components/accordion/{leu-accordion.js → leu-accordion.ts} +6 -0
- package/src/components/accordion/stories/{accordion.stories.js → accordion.stories.ts} +10 -8
- package/src/components/button/{Button.js → Button.ts} +0 -1
- package/src/components/button/{leu-button.js → leu-button.ts} +6 -0
- package/src/components/button-group/{ButtonGroup.js → ButtonGroup.ts} +4 -8
- package/src/components/button-group/{leu-button-group.js → leu-button-group.ts} +6 -0
- package/src/components/checkbox/{Checkbox.js → Checkbox.ts} +0 -1
- package/src/components/checkbox/{CheckboxGroup.js → CheckboxGroup.ts} +0 -1
- package/src/components/checkbox/{leu-checkbox-group.js → leu-checkbox-group.ts} +6 -0
- package/src/components/checkbox/{leu-checkbox.js → leu-checkbox.ts} +6 -0
- package/src/components/chip/{Chip.js → Chip.ts} +0 -1
- package/src/components/chip/{ChipGroup.js → ChipGroup.ts} +0 -1
- package/src/components/chip/{leu-chip-group.js → leu-chip-group.ts} +6 -0
- package/src/components/chip/{leu-chip-link.js → leu-chip-link.ts} +6 -0
- package/src/components/chip/{leu-chip-removable.js → leu-chip-removable.ts} +6 -0
- package/src/components/chip/{leu-chip-selectable.js → leu-chip-selectable.ts} +6 -0
- package/src/components/dialog/{Dialog.js → Dialog.ts} +0 -1
- package/src/components/dialog/{leu-dialog.js → leu-dialog.ts} +6 -0
- package/src/components/dropdown/{Dropdown.js → Dropdown.ts} +0 -1
- package/src/components/dropdown/{leu-dropdown.js → leu-dropdown.ts} +6 -0
- package/src/components/icon/{Icon.js → Icon.ts} +0 -1
- package/src/components/icon/{leu-icon.js → leu-icon.ts} +6 -0
- package/src/components/input/{Input.js → Input.ts} +0 -1
- package/src/components/input/{leu-input.js → leu-input.ts} +6 -0
- package/src/components/menu/{Menu.js → Menu.ts} +2 -2
- package/src/components/menu/{MenuItem.js → MenuItem.ts} +0 -1
- package/src/components/menu/{leu-menu-item.js → leu-menu-item.ts} +6 -0
- package/src/components/menu/{leu-menu.js → leu-menu.ts} +6 -0
- package/src/components/pagination/{Pagination.js → Pagination.ts} +0 -1
- package/src/components/pagination/{leu-pagination.js → leu-pagination.ts} +6 -0
- package/src/components/popup/{Popup.js → Popup.ts} +0 -1
- package/src/components/popup/{leu-popup.js → leu-popup.ts} +6 -0
- package/src/components/radio/{Radio.js → Radio.ts} +0 -1
- package/src/components/radio/{RadioGroup.js → RadioGroup.ts} +0 -1
- package/src/components/radio/{leu-radio-group.js → leu-radio-group.ts} +6 -0
- package/src/components/radio/{leu-radio.js → leu-radio.ts} +6 -0
- package/src/components/range/{leu-range.js → leu-range.ts} +6 -0
- package/src/components/scroll-top/{ScrollTop.js → ScrollTop.ts} +0 -1
- package/src/components/scroll-top/{leu-scroll-top.js → leu-scroll-top.ts} +6 -0
- package/src/components/select/{Select.js → Select.ts} +18 -4
- package/src/components/select/{leu-select.js → leu-select.ts} +6 -0
- package/src/components/select/test/{fixtures.js → fixtures.ts} +1 -1
- package/src/components/select/test/{select.test.js → select.test.ts} +92 -0
- package/src/components/spinner/{leu-spinner.js → leu-spinner.ts} +6 -0
- package/src/components/table/{Table.js → Table.ts} +0 -1
- package/src/components/table/{leu-table.js → leu-table.ts} +6 -0
- package/src/components/visually-hidden/{VisuallyHidden.js → VisuallyHidden.ts} +0 -1
- package/src/components/visually-hidden/{leu-visually-hidden.js → leu-visually-hidden.ts} +6 -0
- package/src/docs/theme.mdx +14 -10
- package/src/global.d.ts +11 -0
- package/src/index.ts +17 -0
- package/src/lib/{LeuElement.js → LeuElement.ts} +15 -6
- package/src/lib/{a11y.js → a11y.ts} +2 -2
- package/src/lib/{hasSlotController.js → hasSlotController.ts} +12 -25
- package/stylelint.config.mjs +1 -1
- package/tsconfig.build.json +6 -4
- package/tsconfig.json +7 -10
- package/web-dev-server.config.mjs +11 -1
- package/web-test-runner.config.mjs +11 -2
- package/babel.config.json +0 -3
- package/dist/Accordion.d.ts.map +0 -1
- package/dist/Button.d.ts.map +0 -1
- package/dist/ButtonGroup.d.ts.map +0 -1
- package/dist/Checkbox.d.ts.map +0 -1
- package/dist/CheckboxGroup.d.ts.map +0 -1
- package/dist/Chip.d.ts.map +0 -1
- package/dist/ChipGroup.d.ts.map +0 -1
- package/dist/ChipLink.d.ts.map +0 -1
- package/dist/ChipRemovable.d.ts.map +0 -1
- package/dist/ChipSelectable.d.ts.map +0 -1
- package/dist/Dialog.d.ts.map +0 -1
- package/dist/Dropdown.d.ts.map +0 -1
- package/dist/Icon.d.ts.map +0 -1
- package/dist/Input.d.ts.map +0 -1
- package/dist/LeuElement-BI1CxItv.d.ts +0 -7
- package/dist/LeuElement-BI1CxItv.d.ts.map +0 -1
- package/dist/LeuElement-BI1CxItv.js +0 -70
- package/dist/Menu.d.ts.map +0 -1
- package/dist/MenuItem.d.ts.map +0 -1
- package/dist/Pagination.d.ts.map +0 -1
- package/dist/Popup.d.ts.map +0 -1
- package/dist/Radio.d.ts.map +0 -1
- package/dist/RadioGroup.d.ts.map +0 -1
- package/dist/Range.d.ts.map +0 -1
- package/dist/ScrollTop.d.ts.map +0 -1
- package/dist/Select.d.ts.map +0 -1
- package/dist/Spinner.d.ts.map +0 -1
- package/dist/Table.d.ts.map +0 -1
- package/dist/VisuallyHidden.d.ts.map +0 -1
- package/dist/hasSlotController-CCPfIEw1.d.ts +0 -38
- package/dist/hasSlotController-CCPfIEw1.d.ts.map +0 -1
- package/dist/hasSlotController-CCPfIEw1.js +0 -75
- package/dist/leu-accordion.d.ts.map +0 -1
- package/dist/leu-button-group.d.ts.map +0 -1
- package/dist/leu-button.d.ts.map +0 -1
- package/dist/leu-checkbox-group.d.ts.map +0 -1
- package/dist/leu-checkbox.d.ts.map +0 -1
- package/dist/leu-chip-group.d.ts.map +0 -1
- package/dist/leu-chip-link.d.ts.map +0 -1
- package/dist/leu-chip-removable.d.ts.map +0 -1
- package/dist/leu-chip-selectable.d.ts.map +0 -1
- package/dist/leu-dialog.d.ts.map +0 -1
- package/dist/leu-dropdown.d.ts.map +0 -1
- package/dist/leu-icon.d.ts.map +0 -1
- package/dist/leu-input.d.ts.map +0 -1
- package/dist/leu-menu-item.d.ts.map +0 -1
- package/dist/leu-menu.d.ts.map +0 -1
- package/dist/leu-pagination.d.ts.map +0 -1
- package/dist/leu-popup.d.ts.map +0 -1
- package/dist/leu-radio-group.d.ts.map +0 -1
- package/dist/leu-radio.d.ts.map +0 -1
- package/dist/leu-range.d.ts.map +0 -1
- package/dist/leu-scroll-top.d.ts.map +0 -1
- package/dist/leu-select.d.ts.map +0 -1
- package/dist/leu-spinner.d.ts.map +0 -1
- package/dist/leu-table.d.ts.map +0 -1
- package/dist/leu-visually-hidden.d.ts.map +0 -1
- package/index.js +0 -17
- /package/.storybook/{manager.js → manager.ts} +0 -0
- /package/.storybook/{preview.js → preview.ts} +0 -0
- /package/scripts/generate-component/templates/{[namespace]-[name].js → [namespace]-[name].ts} +0 -0
- /package/scripts/generate-component/templates/stories/{[name].stories.js → [name].stories.ts} +0 -0
- /package/scripts/generate-component/templates/test/{[name].test.js → [name].test.ts} +0 -0
- /package/src/components/accordion/test/{accordion.test.js → accordion.test.ts} +0 -0
- /package/src/components/button/stories/{button.stories.js → button.stories.ts} +0 -0
- /package/src/components/button/test/{button.test.js → button.test.ts} +0 -0
- /package/src/components/button-group/stories/{button-group.stories.js → button-group.stories.ts} +0 -0
- /package/src/components/button-group/test/{button-group.test.js → button-group.test.ts} +0 -0
- /package/src/components/checkbox/stories/{checkbox-group.stories.js → checkbox-group.stories.ts} +0 -0
- /package/src/components/checkbox/stories/{checkbox.stories.js → checkbox.stories.ts} +0 -0
- /package/src/components/checkbox/test/{checkbox-group.test.js → checkbox-group.test.ts} +0 -0
- /package/src/components/checkbox/test/{checkbox.test.js → checkbox.test.ts} +0 -0
- /package/src/components/chip/{ChipLink.js → ChipLink.ts} +0 -0
- /package/src/components/chip/{ChipRemovable.js → ChipRemovable.ts} +0 -0
- /package/src/components/chip/{ChipSelectable.js → ChipSelectable.ts} +0 -0
- /package/src/components/chip/{exports.js → exports.ts} +0 -0
- /package/src/components/chip/stories/{chip-group.stories.js → chip-group.stories.ts} +0 -0
- /package/src/components/chip/stories/{chip-link.stories.js → chip-link.stories.ts} +0 -0
- /package/src/components/chip/stories/{chip-removable.stories.js → chip-removable.stories.ts} +0 -0
- /package/src/components/chip/stories/{chip-selectable.stories.js → chip-selectable.stories.ts} +0 -0
- /package/src/components/chip/test/{chip-group.test.js → chip-group.test.ts} +0 -0
- /package/src/components/chip/test/{chip-link.test.js → chip-link.test.ts} +0 -0
- /package/src/components/chip/test/{chip-removable.test.js → chip-removable.test.ts} +0 -0
- /package/src/components/chip/test/{chip-selectable.test.js → chip-selectable.test.ts} +0 -0
- /package/src/components/chip/test/{chip.test.js → chip.test.ts} +0 -0
- /package/src/components/dialog/stories/{dialog.stories.js → dialog.stories.ts} +0 -0
- /package/src/components/dialog/test/{dialog.test.js → dialog.test.ts} +0 -0
- /package/src/components/dropdown/stories/{dropdown.stories.js → dropdown.stories.ts} +0 -0
- /package/src/components/dropdown/test/{dropdown.test.js → dropdown.test.ts} +0 -0
- /package/src/components/icon/{paths.js → paths.ts} +0 -0
- /package/src/components/icon/stories/{icon.stories.js → icon.stories.ts} +0 -0
- /package/src/components/icon/test/{icon.test.js → icon.test.ts} +0 -0
- /package/src/components/input/stories/{input.stories.js → input.stories.ts} +0 -0
- /package/src/components/input/test/{input.test.js → input.test.ts} +0 -0
- /package/src/components/menu/stories/{menu-item.stories.js → menu-item.stories.ts} +0 -0
- /package/src/components/menu/stories/{menu.stories.js → menu.stories.ts} +0 -0
- /package/src/components/menu/test/{menu-item.test.js → menu-item.test.ts} +0 -0
- /package/src/components/menu/test/{menu.test.js → menu.test.ts} +0 -0
- /package/src/components/pagination/stories/{pagination.stories.js → pagination.stories.ts} +0 -0
- /package/src/components/pagination/test/{pagination.test.js → pagination.test.ts} +0 -0
- /package/src/components/popup/stories/{popup.stories.js → popup.stories.ts} +0 -0
- /package/src/components/popup/test/{popup.test.js → popup.test.ts} +0 -0
- /package/src/components/radio/stories/{radio-group.stories.js → radio-group.stories.ts} +0 -0
- /package/src/components/radio/stories/{radio.stories.js → radio.stories.ts} +0 -0
- /package/src/components/radio/test/{radio-group.test.js → radio-group.test.ts} +0 -0
- /package/src/components/radio/test/{radio.test.js → radio.test.ts} +0 -0
- /package/src/components/range/{Range.js → Range.ts} +0 -0
- /package/src/components/range/stories/{range-slider.stories.js → range-slider.stories.ts} +0 -0
- /package/src/components/range/test/{range-test.js → range.test.ts} +0 -0
- /package/src/components/scroll-top/stories/{scroll-top.stories.js → scroll-top.stories.ts} +0 -0
- /package/src/components/scroll-top/test/{scroll-top.test.js → scroll-top.test.ts} +0 -0
- /package/src/components/select/stories/{select.stories.js → select.stories.ts} +0 -0
- /package/src/components/spinner/{Spinner.js → Spinner.ts} +0 -0
- /package/src/components/spinner/stories/{spinner.stories.js → spinner.stories.ts} +0 -0
- /package/src/components/spinner/test/{spinner.test.js → spinner.test.ts} +0 -0
- /package/src/components/table/stories/{table.stories.js → table.stories.ts} +0 -0
- /package/src/components/table/test/{table.test.js → table.test.ts} +0 -0
- /package/src/components/visually-hidden/stories/{visually-hidden.stories.js → visually-hidden.stories.ts} +0 -0
- /package/src/components/visually-hidden/test/{visually-hidden.test.js → visually-hidden.test.ts} +0 -0
- /package/src/lib/{utils.js → utils.ts} +0 -0
- /package/src/styles/{style.stories.js → style.stories.ts} +0 -0
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
export { LeuVisuallyHidden };
|
|
2
1
|
import { LeuVisuallyHidden } from './VisuallyHidden.js';
|
|
3
|
-
|
|
2
|
+
import 'lit-html';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import './LeuElement.d-BevHqLUu.js';
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
interface HTMLElementTagNameMap {
|
|
8
|
+
"leu-visually-hidden": LeuVisuallyHidden;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=leu-visually-hidden.d.ts.map
|
|
12
|
+
|
|
13
|
+
export { LeuVisuallyHidden };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement } from "lit";
|
|
2
|
+
export declare class LeuElement extends LitElement {
|
|
3
|
+
static version: string;
|
|
4
|
+
static dependencies: Record<string, typeof LeuElement>;
|
|
5
|
+
static styles: CSSResultGroup;
|
|
6
|
+
static define(name: string, constructor?: typeof LeuElement, options?: ElementDefinitionOptions): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=LeuElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeuElement.d.ts","sourceRoot":"","sources":["../../src/lib/LeuElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAGhD,qBAAa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,OAAO,SAAkB;IAEhC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,UAAU,CAAC,CAAK;IAE3D,MAAM,CAAC,MAAM,EAAE,cAAc,CAAe;IAE5C,MAAM,CAAC,MAAM,CACX,IAAI,EAAE,MAAM,EACZ,WAAW,oBAAO,EAClB,OAAO,GAAE,wBAA6B;CA6BzC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All roles that are associated with a aria-checked attribute
|
|
3
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked
|
|
4
|
+
*/
|
|
5
|
+
export declare const ARIA_CHECKED_ROLES: readonly ["checkbox", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch"];
|
|
6
|
+
/**
|
|
7
|
+
* All roles that are associated with a aria-selected attribute
|
|
8
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected
|
|
9
|
+
*/
|
|
10
|
+
export declare const ARIA_SELECTED_ROLES: readonly ["gridcell", "option", "row", "tab", "columnheader", "rowheader", "treeitem"];
|
|
11
|
+
//# sourceMappingURL=a11y.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/lib/a11y.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,yFAOrB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wFAQtB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thanks Shoelace!
|
|
3
|
+
* Source: https://github.com/shoelace-style/shoelace/blob/next/src/internal/slot.ts
|
|
4
|
+
*/
|
|
5
|
+
import { ReactiveController, ReactiveControllerHost } from "lit";
|
|
6
|
+
/**
|
|
7
|
+
* A reactive controller that determines when slots exist.
|
|
8
|
+
*/
|
|
9
|
+
export declare class HasSlotController implements ReactiveController {
|
|
10
|
+
host: ReactiveControllerHost & Element;
|
|
11
|
+
slotNames: string[];
|
|
12
|
+
constructor(host: ReactiveControllerHost & Element, slotNames: string[]);
|
|
13
|
+
private hasDefaultSlot;
|
|
14
|
+
private hasNamedSlot;
|
|
15
|
+
test(slotName: string): boolean;
|
|
16
|
+
hostConnected(): void;
|
|
17
|
+
hostDisconnected(): void;
|
|
18
|
+
private handleSlotChange;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=hasSlotController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasSlotController.d.ts","sourceRoot":"","sources":["../../src/lib/hasSlotController.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAA;AAEhE;;GAEG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAA;IAEtC,SAAS,EAAE,MAAM,EAAE,CAAA;gBAEP,IAAI,EAAE,sBAAsB,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE;IAOvE,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,YAAY;IAIpB,IAAI,CAAC,QAAQ,EAAE,MAAM;IAMrB,aAAa;IAIb,gBAAgB;IAOhB,OAAO,CAAC,gBAAgB,CAUvB;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Return a throttled function that only invokes func at most once per every wait milliseconds.
|
|
10
|
+
* @param {Function} func - Your function
|
|
11
|
+
* @param {Number} timeout - Default is 500 ms
|
|
12
|
+
* @returns {Function} - Your function wrapped in a timeout function
|
|
13
|
+
*/
|
|
14
|
+
declare const throttle: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
15
|
+
export { debounce, throttle };
|
|
16
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,2DAQb,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,2DAUb,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.stories.d.ts","sourceRoot":"","sources":["../../src/styles/style.stories.ts"],"names":[],"mappings":";;;AAEA,wBAEC;AA0DD,eAAO,MAAM,OAAO,KAAoB,CAAA"}
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ type LeuAccordionProps = {
|
|
|
33
33
|
"label-prefix"?: LeuAccordion["labelPrefix"];
|
|
34
34
|
/** The expanded state of the accordion. */
|
|
35
35
|
open?: LeuAccordion["open"];
|
|
36
|
-
/** The label (title) of the accordion
|
|
36
|
+
/** The label (title) of the accordion */
|
|
37
37
|
label?: LeuAccordion["label"];
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -65,8 +65,6 @@ type LeuButtonProps = {
|
|
|
65
65
|
type LeuButtonGroupProps = {
|
|
66
66
|
/** The value of the currenty selected (active) button */
|
|
67
67
|
value?: LeuButtonGroup["value"];
|
|
68
|
-
/** */
|
|
69
|
-
_items?: LeuButtonGroup["_items"];
|
|
70
68
|
/** When the value of the group changes by clicking a button */
|
|
71
69
|
oninput?: (e: CustomEvent<CustomEvent>) => void;
|
|
72
70
|
};
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@statistikzh/leu",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "label",
|
|
31
|
-
"description": "The label (title) of the accordion
|
|
31
|
+
"description": "The label (title) of the accordion",
|
|
32
32
|
"value": { "type": "string", "default": "\"\"" }
|
|
33
33
|
}
|
|
34
34
|
],
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "label",
|
|
56
|
-
"description": "The label (title) of the accordion
|
|
56
|
+
"description": "The label (title) of the accordion",
|
|
57
57
|
"type": "string"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -192,8 +192,7 @@
|
|
|
192
192
|
"name": "value",
|
|
193
193
|
"description": "The value of the currenty selected (active) button",
|
|
194
194
|
"type": "string"
|
|
195
|
-
}
|
|
196
|
-
{ "name": "_items", "type": "array" }
|
|
195
|
+
}
|
|
197
196
|
],
|
|
198
197
|
"events": [
|
|
199
198
|
{
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "UI component library of the canton of zurich",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "statistikzh",
|
|
6
|
-
"version": "0.14.
|
|
6
|
+
"version": "0.14.4",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"homepage": "https://github.com/statistikzh/leu/",
|
|
25
25
|
"scripts": {
|
|
26
26
|
"analyze": "cem analyze --config custom-elements-manifest.config.js",
|
|
27
|
-
"build": "rimraf dist && npm run build:
|
|
27
|
+
"build": "rimraf dist && npm run build:types && npm run build:js && npm run build:css && npm run analyze",
|
|
28
28
|
"build:js": "rollup -c rollup.config.js",
|
|
29
29
|
"build:types": "tsc -p tsconfig.build.json",
|
|
30
30
|
"build:css": "postcss src/styles/theme.css -o dist/theme.css && cp dist/theme.css .storybook/static/",
|
|
31
31
|
"watch:css": "nodemon --watch 'src/styles/*' -e css --exec npm run build:css",
|
|
32
32
|
"lint": "npm run lint:eslint && npm run lint:prettier",
|
|
33
|
-
"lint:eslint": "eslint --ext .js,.mjs,.html . --ignore-path .gitignore ",
|
|
34
|
-
"lint:prettier": "prettier \"**/*.{js,mjs,md,mdx,html,json}\" --check",
|
|
35
|
-
"lint:stylelint": "stylelint \"**/*.{js,css}\" --ignore-path .gitignore",
|
|
33
|
+
"lint:eslint": "eslint --ext .ts,.js,.mjs,.html . --ignore-path .gitignore ",
|
|
34
|
+
"lint:prettier": "prettier \"**/*.{.ts,js,mjs,md,mdx,html,json}\" --check",
|
|
35
|
+
"lint:stylelint": "stylelint \"**/*.{ts,js,css}\" --ignore-path .gitignore",
|
|
36
36
|
"lint:types": "tsc",
|
|
37
37
|
"format": "npm run format:eslint && npm run format:prettier",
|
|
38
|
-
"format:eslint": "eslint --ext .js,.mjs,.html . --fix --ignore-path .gitignore",
|
|
39
|
-
"format:prettier": "prettier \"**/*.{js,mjs,md,mdx,html,json}\" --write",
|
|
38
|
+
"format:eslint": "eslint --ext .ts,.js,.mjs,.html . --fix --ignore-path .gitignore",
|
|
39
|
+
"format:prettier": "prettier \"**/*.{ts,js,mjs,md,mdx,html,json}\" --write",
|
|
40
40
|
"test": "web-test-runner --coverage",
|
|
41
41
|
"test:watch": "web-test-runner --watch",
|
|
42
42
|
"prepare": "husky",
|
|
@@ -46,17 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@floating-ui/dom": "^1.6.13",
|
|
49
|
-
"lit": "^3.1.4"
|
|
50
|
-
"stylelint-config-recommended": "^15.0.0"
|
|
49
|
+
"lit": "^3.1.4"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"@babel/preset-env": "^7.26.9",
|
|
54
52
|
"@commitlint/cli": "^19.7.1",
|
|
55
53
|
"@commitlint/config-conventional": "^19.7.1",
|
|
56
54
|
"@custom-elements-manifest/analyzer": "^0.10.4",
|
|
57
55
|
"@open-wc/eslint-config": "^12.0.3",
|
|
58
56
|
"@open-wc/testing": "^4.0.0",
|
|
59
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
60
57
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
61
58
|
"@rollup/plugin-json": "^6.1.0",
|
|
62
59
|
"@rollup/plugin-replace": "^6.0.2",
|
|
@@ -69,7 +66,11 @@
|
|
|
69
66
|
"@storybook/manager-api": "^8.5.8",
|
|
70
67
|
"@storybook/theming": "^8.5.8",
|
|
71
68
|
"@storybook/web-components": "^8.5.8",
|
|
69
|
+
"@types/mocha": "^10.0.10",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
71
|
+
"@typescript-eslint/parser": "^8.34.0",
|
|
72
72
|
"@web/dev-server": "^0.4.6",
|
|
73
|
+
"@web/dev-server-esbuild": "^1.0.4",
|
|
73
74
|
"@web/dev-server-rollup": "^0.6.4",
|
|
74
75
|
"@web/storybook-builder": "^0.2.1",
|
|
75
76
|
"@web/storybook-framework-web-components": "^0.2.0",
|
|
@@ -97,11 +98,14 @@
|
|
|
97
98
|
"react-syntax-highlighter": "^15.6.1",
|
|
98
99
|
"rimraf": "^6.0.1",
|
|
99
100
|
"rollup": "^4.34.8",
|
|
101
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
100
102
|
"rollup-plugin-postcss": "^4.0.2",
|
|
101
103
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
|
104
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
102
105
|
"sinon": "^19.0.2",
|
|
103
106
|
"storybook": "^8.5.8",
|
|
104
107
|
"stylelint": "^16.14.1",
|
|
108
|
+
"stylelint-config-recommended": "^15.0.0",
|
|
105
109
|
"stylelint-config-standard": "^37.0.0",
|
|
106
110
|
"typescript": "^5.7.3"
|
|
107
111
|
},
|
|
@@ -109,10 +113,10 @@
|
|
|
109
113
|
"semi": false
|
|
110
114
|
},
|
|
111
115
|
"lint-staged": {
|
|
112
|
-
"*.{js,css}": [
|
|
116
|
+
"*.{ts,js,css}": [
|
|
113
117
|
"stylelint --fix"
|
|
114
118
|
],
|
|
115
|
-
"*.{js,mjs,html}": [
|
|
119
|
+
"*.{ts,js,mjs,html}": [
|
|
116
120
|
"eslint --fix",
|
|
117
121
|
"prettier --write"
|
|
118
122
|
],
|
|
@@ -120,5 +124,8 @@
|
|
|
120
124
|
},
|
|
121
125
|
"overrides": {
|
|
122
126
|
"estree-walker": "2.0.2"
|
|
127
|
+
},
|
|
128
|
+
"esm.sh": {
|
|
129
|
+
"bundle": false
|
|
123
130
|
}
|
|
124
131
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"release-type": "node",
|
|
4
|
+
"bump-minor-pre-major": true,
|
|
5
|
+
"bump-patch-for-minor-pre-major": true,
|
|
6
|
+
"last-release-sha": "c00695d82782cfa6e3fa0046e3a7deb31c14eb26",
|
|
7
|
+
"packages": {
|
|
8
|
+
".": {}
|
|
9
|
+
}
|
|
10
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -3,8 +3,9 @@ import path from "path"
|
|
|
3
3
|
import { fileURLToPath } from "url"
|
|
4
4
|
import postcss from "rollup-plugin-postcss"
|
|
5
5
|
import postcssLit from "rollup-plugin-postcss-lit"
|
|
6
|
-
import { babel } from "@rollup/plugin-babel"
|
|
7
6
|
import replace from "@rollup/plugin-replace"
|
|
7
|
+
import typescript from "rollup-plugin-typescript2"
|
|
8
|
+
import { dts } from "rollup-plugin-dts"
|
|
8
9
|
|
|
9
10
|
export const plugins = [
|
|
10
11
|
{
|
|
@@ -35,30 +36,59 @@ export const plugins = [
|
|
|
35
36
|
/**
|
|
36
37
|
* @type {import("rollup").RollupOptions}
|
|
37
38
|
*/
|
|
38
|
-
export default
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
export default [
|
|
40
|
+
{
|
|
41
|
+
// Select all files in a direct subdirectory of src/components
|
|
42
|
+
// that have a name starting with
|
|
43
|
+
// - a capital letter
|
|
44
|
+
// - or "leu-"
|
|
45
|
+
input: {
|
|
46
|
+
index: "src/index.ts",
|
|
47
|
+
...Object.fromEntries(
|
|
48
|
+
globSync("src/components/*/{[A-Z],leu-}*.ts", { nocase: false }).map(
|
|
49
|
+
(file) => [
|
|
50
|
+
path.basename(file, path.extname(file)),
|
|
51
|
+
fileURLToPath(new URL(file, import.meta.url)),
|
|
52
|
+
],
|
|
53
|
+
),
|
|
51
54
|
),
|
|
52
|
-
|
|
55
|
+
},
|
|
56
|
+
output: {
|
|
57
|
+
dir: "./dist/",
|
|
58
|
+
format: "esm",
|
|
59
|
+
entryFileNames: "[name].js",
|
|
60
|
+
},
|
|
61
|
+
plugins: [
|
|
62
|
+
typescript({
|
|
63
|
+
tsconfig: fileURLToPath(
|
|
64
|
+
new URL("./tsconfig.build.json", import.meta.url),
|
|
65
|
+
),
|
|
66
|
+
tsconfigOverride: {
|
|
67
|
+
compilerOptions: {
|
|
68
|
+
declarationMap: false,
|
|
69
|
+
emitDeclarationOnly: false,
|
|
70
|
+
declaration: false,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
...plugins.map((p) => p.plugin(...p.args)),
|
|
75
|
+
],
|
|
76
|
+
external: [/^lit(\/.*\.js)?$/, "@floating-ui/dom"],
|
|
53
77
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
{
|
|
79
|
+
input: {
|
|
80
|
+
...Object.fromEntries(
|
|
81
|
+
globSync("dist/components/*/{[A-Z],leu-}*.d.ts", { nocase: false }).map(
|
|
82
|
+
(file) => [
|
|
83
|
+
path.basename(file, ".d.ts"),
|
|
84
|
+
fileURLToPath(new URL(file, import.meta.url)),
|
|
85
|
+
],
|
|
86
|
+
),
|
|
87
|
+
),
|
|
88
|
+
},
|
|
89
|
+
output: {
|
|
90
|
+
dir: "./dist/",
|
|
91
|
+
},
|
|
92
|
+
plugins: [dts()],
|
|
58
93
|
},
|
|
59
|
-
|
|
60
|
-
babel({ babelHelpers: "bundled" }),
|
|
61
|
-
...plugins.map((p) => p.plugin(...p.args)),
|
|
62
|
-
],
|
|
63
|
-
external: [/^lit(\/.*\.js)?$/, "@floating-ui/dom"],
|
|
64
|
-
}
|
|
94
|
+
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html } from "lit"
|
|
2
|
+
import { property } from "lit/decorators.js"
|
|
2
3
|
|
|
3
4
|
import { LeuElement } from "../../lib/LeuElement.js"
|
|
4
5
|
|
|
@@ -15,9 +16,8 @@ export class Leu[Name] extends LeuElement {
|
|
|
15
16
|
delegatesFocus: true,
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
@property({ type: String })
|
|
20
|
+
value: string = ""
|
|
21
21
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super()
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { nothing } from "lit"
|
|
2
2
|
import { html, unsafeStatic } from "lit/static-html.js"
|
|
3
|
+
import { property } from "lit/decorators.js"
|
|
4
|
+
|
|
3
5
|
import { LeuElement } from "../../lib/LeuElement.js"
|
|
4
6
|
|
|
5
|
-
// @ts-ignore
|
|
6
7
|
import styles from "./accordion.css"
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @tagname leu-accordion
|
|
10
11
|
* @slot content - The content of the accordion. No styles will be applied to the content.
|
|
11
|
-
* @prop {number} headingLevel - The heading level of the accordion title. Must be between 1 and 6.
|
|
12
|
-
* @prop {boolean} open - The expanded state of the accordion.
|
|
13
|
-
* @prop {string} label - The label (title) of the accordion.
|
|
14
|
-
* @prop {string} labelPrefix - The prefix of the accordion label. e.g. "01"
|
|
15
12
|
* @attr {number} heading-level - The heading level of the accordion title. Must be between 1 and 6.
|
|
16
13
|
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
17
14
|
*/
|
|
@@ -24,29 +21,37 @@ export class LeuAccordion extends LeuElement {
|
|
|
24
21
|
delegatesFocus: true,
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
24
|
+
/**
|
|
25
|
+
* The heading level of the accordion title. Must be between 1 and 6.
|
|
26
|
+
*/
|
|
27
|
+
@property({ type: Number, attribute: "heading-level", reflect: true })
|
|
28
|
+
headingLevel = 2
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The expanded state of the accordion.
|
|
32
|
+
*/
|
|
33
|
+
@property({ type: Boolean, reflect: true })
|
|
34
|
+
open = false
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The label (title) of the accordion
|
|
38
|
+
*/
|
|
39
|
+
@property({ type: String, reflect: true })
|
|
40
|
+
label = ""
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The prefix of the accordion label. e.g. "01"
|
|
44
|
+
*/
|
|
45
|
+
@property({ type: String, attribute: "label-prefix", reflect: true })
|
|
46
|
+
labelPrefix = ""
|
|
41
47
|
|
|
42
48
|
/**
|
|
43
49
|
* Determines the heading tag of the accordion toggle.
|
|
44
50
|
* The headingLevel shouldn't be used directly to render the heading tag
|
|
45
51
|
* in order to avoid XSS issues.
|
|
46
|
-
* @returns {string} The heading tag of the accordion toggle.
|
|
47
52
|
* @internal
|
|
48
53
|
*/
|
|
49
|
-
_getHeadingTag() {
|
|
54
|
+
private _getHeadingTag(): string {
|
|
50
55
|
let level = 2
|
|
51
56
|
if (this.headingLevel > 0 && this.headingLevel < 7) {
|
|
52
57
|
level = Math.floor(this.headingLevel)
|
|
@@ -59,7 +64,7 @@ export class LeuAccordion extends LeuElement {
|
|
|
59
64
|
* Toggles the accordion open state.
|
|
60
65
|
* @internal
|
|
61
66
|
*/
|
|
62
|
-
_handleToggleClick() {
|
|
67
|
+
private _handleToggleClick() {
|
|
63
68
|
this.open = !this.open
|
|
64
69
|
}
|
|
65
70
|
|
|
@@ -26,14 +26,16 @@ export default {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function Template(args) {
|
|
29
|
-
return html`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
return html`
|
|
30
|
+
<leu-accordion
|
|
31
|
+
heading-level=${ifDefined(args["heading-level"])}
|
|
32
|
+
label=${ifDefined(args.label)}
|
|
33
|
+
label-prefix=${ifDefined(args["label-prefix"])}
|
|
34
|
+
?open=${args.open}
|
|
35
|
+
>
|
|
36
|
+
<div slot="content">${args.content}</div>
|
|
37
|
+
</leu-accordion>
|
|
38
|
+
`
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export const Regular = Template.bind({})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { html } from "lit"
|
|
2
2
|
import { LeuElement } from "../../lib/LeuElement.js"
|
|
3
3
|
|
|
4
|
-
// @ts-ignore
|
|
5
4
|
import styles from "./button-group.css"
|
|
5
|
+
import { LeuButton } from "../button/Button.js"
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @tagname leu-button-group
|
|
@@ -13,14 +13,10 @@ import styles from "./button-group.css"
|
|
|
13
13
|
export class LeuButtonGroup extends LeuElement {
|
|
14
14
|
static styles = [LeuElement.styles, styles]
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
super()
|
|
18
|
-
|
|
19
|
-
this._items = []
|
|
20
|
-
}
|
|
16
|
+
private _items: LeuButton[] = []
|
|
21
17
|
|
|
22
18
|
/**
|
|
23
|
-
* @param {import("../button/Button").LeuButton} button
|
|
19
|
+
* @param {import("../button/Button.js").LeuButton} button
|
|
24
20
|
* @returns {string}
|
|
25
21
|
*/
|
|
26
22
|
static getButtonValue(button) {
|
|
@@ -75,7 +71,7 @@ export class LeuButtonGroup extends LeuElement {
|
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
/**
|
|
78
|
-
* @param {import("../button/Button").LeuButton} button
|
|
74
|
+
* @param {import("../button/Button.js").LeuButton} button
|
|
79
75
|
*/
|
|
80
76
|
_handleButtonClick(button) {
|
|
81
77
|
if (!button.active) {
|