@statistikzh/leu 0.14.3 → 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/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 +7 -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 +48 -38
- package/dist/Select.js +309 -336
- 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 +18 -11
- 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} +0 -1
- 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} +0 -1
- 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/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-Dd6zm9XF.d.ts +0 -7
- package/dist/LeuElement-Dd6zm9XF.d.ts.map +0 -1
- package/dist/LeuElement-Dd6zm9XF.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-dQsSUUpb.d.ts +0 -38
- package/dist/hasSlotController-dQsSUUpb.d.ts.map +0 -1
- package/dist/hasSlotController-dQsSUUpb.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/select/test/{select.test.js → select.test.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
package/dist/Spinner.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* @tagname leu-spinner
|
|
3
7
|
* @cssprop --leu-spinner-size - The size of the spinner.
|
|
4
8
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
declare class LeuSpinner extends LeuElement {
|
|
10
|
+
static styles: lit.CSSResultGroup[];
|
|
11
|
+
render(): lit_html.TemplateResult<1>;
|
|
7
12
|
}
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
|
|
14
|
+
export { LeuSpinner };
|
package/dist/Spinner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-Dd6zm9XF.js';
|
|
2
1
|
import { css, html } from 'lit';
|
|
2
|
+
import { L as LeuElement } from './LeuElement-x8UlIDDl.js';
|
|
3
3
|
|
|
4
4
|
var css_248z = css`@keyframes leu-spinner-rotate {
|
|
5
5
|
from {
|
|
@@ -30,8 +30,8 @@ var css_248z = css`@keyframes leu-spinner-rotate {
|
|
|
30
30
|
* @cssprop --leu-spinner-size - The size of the spinner.
|
|
31
31
|
*/
|
|
32
32
|
class LeuSpinner extends LeuElement {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
render() {
|
|
34
|
+
return html `
|
|
35
35
|
<svg
|
|
36
36
|
class="spinner"
|
|
37
37
|
fill="none"
|
|
@@ -46,8 +46,8 @@ class LeuSpinner extends LeuElement {
|
|
|
46
46
|
/>
|
|
47
47
|
</svg>
|
|
48
48
|
`;
|
|
49
|
-
|
|
49
|
+
}
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
LeuSpinner.styles = [LeuElement.styles, css_248z];
|
|
52
52
|
|
|
53
53
|
export { LeuSpinner };
|
package/dist/Table.d.ts
CHANGED
|
@@ -1,30 +1,60 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
|
+
import { LeuIcon } from './Icon.js';
|
|
5
|
+
import { LeuPagination } from './Pagination.js';
|
|
6
|
+
import './Button.js';
|
|
7
|
+
import './hasSlotController.d-emXwVXWF.js';
|
|
8
|
+
import './VisuallyHidden.js';
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* @tagname leu-table
|
|
3
12
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
declare class LeuTable extends LeuElement {
|
|
14
|
+
static dependencies: {
|
|
15
|
+
"leu-icon": typeof LeuIcon;
|
|
16
|
+
"leu-pagination": typeof LeuPagination;
|
|
17
|
+
};
|
|
18
|
+
static styles: lit.CSSResultGroup[];
|
|
19
|
+
static properties: {
|
|
20
|
+
columns: {
|
|
21
|
+
type: ArrayConstructor;
|
|
22
|
+
};
|
|
23
|
+
data: {
|
|
24
|
+
type: ArrayConstructor;
|
|
25
|
+
};
|
|
26
|
+
firstColumnSticky: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
reflect: boolean;
|
|
29
|
+
};
|
|
30
|
+
itemsPerPage: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
reflect: boolean;
|
|
33
|
+
};
|
|
34
|
+
sortIndex: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
reflect: boolean;
|
|
37
|
+
};
|
|
38
|
+
sortOrderAsc: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
reflect: boolean;
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
reflect: boolean;
|
|
45
|
+
};
|
|
46
|
+
_shadowLeft: {
|
|
47
|
+
state: boolean;
|
|
48
|
+
};
|
|
49
|
+
_shadowRight: {
|
|
50
|
+
state: boolean;
|
|
51
|
+
};
|
|
52
|
+
_page: {
|
|
53
|
+
state: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
constructor();
|
|
57
|
+
disconnectedCallback(): void;
|
|
28
58
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
29
59
|
firstUpdated(): void;
|
|
30
60
|
shadowToggle(target: any): void;
|
|
@@ -32,11 +62,11 @@ export class LeuTable extends LeuElement {
|
|
|
32
62
|
isOnePropNotValid(): "Der Parameter 'columns' ist erforderlich !" | "Der Parameter 'data' ist erforderlich !";
|
|
33
63
|
isSorted(col: any): boolean;
|
|
34
64
|
sortClick(col: any): void;
|
|
35
|
-
sortArrowIcon():
|
|
36
|
-
get _columns(): any
|
|
37
|
-
get _sortedData(): any
|
|
38
|
-
get _data(): any
|
|
39
|
-
render():
|
|
65
|
+
sortArrowIcon(): lit_html.TemplateResult<1>;
|
|
66
|
+
get _columns(): any;
|
|
67
|
+
get _sortedData(): any;
|
|
68
|
+
get _data(): any;
|
|
69
|
+
render(): lit_html.TemplateResult<1>;
|
|
40
70
|
}
|
|
41
|
-
|
|
42
|
-
|
|
71
|
+
|
|
72
|
+
export { LeuTable };
|
package/dist/Table.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-Dd6zm9XF.js';
|
|
2
1
|
import { css, html, nothing } from 'lit';
|
|
3
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
3
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
4
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
|
+
import { L as LeuElement } from './LeuElement-x8UlIDDl.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
|
8
8
|
import 'lit/directives/live.js';
|
|
9
9
|
import './Button.js';
|
|
10
10
|
import 'lit/directives/if-defined.js';
|
|
11
|
-
import './hasSlotController-
|
|
11
|
+
import './hasSlotController-Bm2tipvG.js';
|
|
12
12
|
import './VisuallyHidden.js';
|
|
13
13
|
|
|
14
14
|
var css_248z = css`:host {
|
|
@@ -129,136 +129,134 @@ div.shadow-right {
|
|
|
129
129
|
* @tagname leu-table
|
|
130
130
|
*/
|
|
131
131
|
class LeuTable extends LeuElement {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
132
|
+
constructor() {
|
|
133
|
+
super();
|
|
134
|
+
/** @type {array} */
|
|
135
|
+
this.columns = [];
|
|
136
|
+
/** @type {array} */
|
|
137
|
+
this.data = [];
|
|
138
|
+
/** @type {boolean} */
|
|
139
|
+
this.firstColumnSticky = false;
|
|
140
|
+
/** @type {number} */
|
|
141
|
+
this.itemsPerPage = null;
|
|
142
|
+
/** @type {number} */
|
|
143
|
+
this.sortIndex = null;
|
|
144
|
+
/** @type {boolean} */
|
|
145
|
+
this.sortOrderAsc = false;
|
|
146
|
+
/** @type {number} */
|
|
147
|
+
this.width = null;
|
|
148
|
+
/** @internal */
|
|
149
|
+
this._shadowLeft = false;
|
|
150
|
+
/** @internal */
|
|
151
|
+
this._shadowRight = false;
|
|
152
|
+
/** @internal */
|
|
153
|
+
this._scrollRef = createRef();
|
|
154
|
+
/** @internal */
|
|
155
|
+
this._page = 1;
|
|
156
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
157
|
+
this.shadowToggle(this._scrollRef.value);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
disconnectedCallback() {
|
|
161
|
+
this._resizeObserver.disconnect();
|
|
162
|
+
}
|
|
163
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
164
|
+
super.attributeChangedCallback(name, oldVal, newVal);
|
|
165
|
+
if (name === "itemsperpage" || name === "data") {
|
|
166
|
+
this._page = 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
firstUpdated() {
|
|
170
|
+
this.shadowToggle(this._scrollRef.value);
|
|
171
|
+
this._resizeObserver.observe(this._scrollRef.value);
|
|
169
172
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
shadowToggle(target) {
|
|
176
|
-
this._shadowLeft = target.scrollLeftMax > 0 && target.scrollLeft > 0;
|
|
177
|
-
this._shadowRight = target.scrollLeftMax > 0 && target.scrollLeft < target.scrollLeftMax;
|
|
178
|
-
}
|
|
179
|
-
scrollEvent(event) {
|
|
180
|
-
this.shadowToggle(event.target);
|
|
181
|
-
}
|
|
182
|
-
isOnePropNotValid() {
|
|
183
|
-
if (!this._columns) {
|
|
184
|
-
return "Der Parameter 'columns' ist erforderlich !";
|
|
173
|
+
shadowToggle(target) {
|
|
174
|
+
this._shadowLeft = target.scrollLeftMax > 0 && target.scrollLeft > 0;
|
|
175
|
+
this._shadowRight =
|
|
176
|
+
target.scrollLeftMax > 0 && target.scrollLeft < target.scrollLeftMax;
|
|
185
177
|
}
|
|
186
|
-
|
|
187
|
-
|
|
178
|
+
scrollEvent(event) {
|
|
179
|
+
this.shadowToggle(event.target);
|
|
188
180
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.sortOrderAsc = !this.sortOrderAsc;
|
|
198
|
-
} else {
|
|
199
|
-
this.sortIndex = index;
|
|
200
|
-
this.sortOrderAsc = false;
|
|
181
|
+
isOnePropNotValid() {
|
|
182
|
+
if (!this._columns) {
|
|
183
|
+
return "Der Parameter 'columns' ist erforderlich !";
|
|
184
|
+
}
|
|
185
|
+
if (!this._sortedData) {
|
|
186
|
+
return "Der Parameter 'data' ist erforderlich !";
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
201
189
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
190
|
+
isSorted(col) {
|
|
191
|
+
return this.sortIndex === this._columns.indexOf(col);
|
|
192
|
+
}
|
|
193
|
+
sortClick(col) {
|
|
194
|
+
const index = this._columns.indexOf(col);
|
|
195
|
+
if (this.sortIndex === index) {
|
|
196
|
+
this.sortOrderAsc = !this.sortOrderAsc;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.sortIndex = index;
|
|
200
|
+
this.sortOrderAsc = false;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
sortArrowIcon() {
|
|
204
|
+
return html `<leu-icon
|
|
205
205
|
name=${this.sortOrderAsc ? "arrowDown" : "arrowUp"}
|
|
206
206
|
></leu-icon>`;
|
|
207
|
-
}
|
|
208
|
-
get _columns() {
|
|
209
|
-
return this.columns;
|
|
210
|
-
}
|
|
211
|
-
get _sortedData() {
|
|
212
|
-
if (this.sortIndex === null || this.sortIndex === undefined) {
|
|
213
|
-
return this.data;
|
|
214
207
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
get _data() {
|
|
219
|
-
return this.itemsPerPage && this.itemsPerPage > 0 ? this._sortedData.slice((this._page - 1) * this.itemsPerPage, this._page * this.itemsPerPage) : this._sortedData;
|
|
220
|
-
}
|
|
221
|
-
render() {
|
|
222
|
-
const scrollClasses = {
|
|
223
|
-
scroll: true,
|
|
224
|
-
"shadow-left": this.firstColumnSticky && this._shadowLeft
|
|
225
|
-
};
|
|
226
|
-
const shadowClassesLeft = {
|
|
227
|
-
shadow: true,
|
|
228
|
-
"shadow-left": !this.firstColumnSticky && this._shadowLeft,
|
|
229
|
-
pagination: this.itemsPerPage > 0
|
|
230
|
-
};
|
|
231
|
-
const shadowClassesRight = {
|
|
232
|
-
shadow: true,
|
|
233
|
-
"shadow-right": this._shadowRight,
|
|
234
|
-
pagination: this.itemsPerPage > 0
|
|
235
|
-
};
|
|
236
|
-
const stickyClass = {
|
|
237
|
-
sticky: this.firstColumnSticky
|
|
238
|
-
};
|
|
239
|
-
function headerStyle(col) {
|
|
240
|
-
if (col.headerStyle) {
|
|
241
|
-
return styleMap({
|
|
242
|
-
...col.headerStyle(),
|
|
243
|
-
textAlign: col.align === "right" ? "right" : undefined
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
return col.align === "right" ? styleMap({
|
|
247
|
-
textAlign: "right"
|
|
248
|
-
}) : nothing;
|
|
208
|
+
get _columns() {
|
|
209
|
+
return this.columns;
|
|
249
210
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
211
|
+
get _sortedData() {
|
|
212
|
+
if (this.sortIndex === null || this.sortIndex === undefined) {
|
|
213
|
+
return this.data;
|
|
214
|
+
}
|
|
215
|
+
const col = this._columns[this.sortIndex];
|
|
216
|
+
return this.data.sort(this.sortOrderAsc ? col.sort.asc : col.sort.desc);
|
|
217
|
+
}
|
|
218
|
+
get _data() {
|
|
219
|
+
return this.itemsPerPage && this.itemsPerPage > 0
|
|
220
|
+
? this._sortedData.slice((this._page - 1) * this.itemsPerPage, this._page * this.itemsPerPage)
|
|
221
|
+
: this._sortedData;
|
|
260
222
|
}
|
|
261
|
-
|
|
223
|
+
render() {
|
|
224
|
+
const scrollClasses = {
|
|
225
|
+
scroll: true,
|
|
226
|
+
"shadow-left": this.firstColumnSticky && this._shadowLeft,
|
|
227
|
+
};
|
|
228
|
+
const shadowClassesLeft = {
|
|
229
|
+
shadow: true,
|
|
230
|
+
"shadow-left": !this.firstColumnSticky && this._shadowLeft,
|
|
231
|
+
pagination: this.itemsPerPage > 0,
|
|
232
|
+
};
|
|
233
|
+
const shadowClassesRight = {
|
|
234
|
+
shadow: true,
|
|
235
|
+
"shadow-right": this._shadowRight,
|
|
236
|
+
pagination: this.itemsPerPage > 0,
|
|
237
|
+
};
|
|
238
|
+
const stickyClass = {
|
|
239
|
+
sticky: this.firstColumnSticky,
|
|
240
|
+
};
|
|
241
|
+
function headerStyle(col) {
|
|
242
|
+
if (col.headerStyle) {
|
|
243
|
+
return styleMap({
|
|
244
|
+
...col.headerStyle(),
|
|
245
|
+
textAlign: col.align === "right" ? "right" : undefined,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing;
|
|
249
|
+
}
|
|
250
|
+
function bodyStyle(col, row) {
|
|
251
|
+
if (col.style) {
|
|
252
|
+
return styleMap({
|
|
253
|
+
...col.style(row),
|
|
254
|
+
textAlign: col.align === "right" ? "right" : undefined,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing;
|
|
258
|
+
}
|
|
259
|
+
return html `
|
|
262
260
|
<div
|
|
263
261
|
class=${classMap(scrollClasses)}
|
|
264
262
|
@scroll="${this.scrollEvent}"
|
|
@@ -267,21 +265,27 @@ class LeuTable extends LeuElement {
|
|
|
267
265
|
<table class=${classMap(stickyClass)}>
|
|
268
266
|
<thead>
|
|
269
267
|
<tr>
|
|
270
|
-
${this._columns.map(col => html`<th style=${headerStyle(col)}>
|
|
271
|
-
${col.sort
|
|
272
|
-
|
|
268
|
+
${this._columns.map((col) => html `<th style=${headerStyle(col)}>
|
|
269
|
+
${col.sort
|
|
270
|
+
? html `<button
|
|
271
|
+
@click=${(_) => this.sortClick(col)}
|
|
273
272
|
class=${this.isSorted(col) ? "active" : nothing}
|
|
274
273
|
>
|
|
275
|
-
${col.align === "right"
|
|
274
|
+
${col.align === "right"
|
|
275
|
+
? this.sortArrowIcon()
|
|
276
|
+
: nothing}
|
|
276
277
|
<span>${col.name}</span>
|
|
277
|
-
${col.align !== "right"
|
|
278
|
-
|
|
278
|
+
${col.align !== "right"
|
|
279
|
+
? this.sortArrowIcon()
|
|
280
|
+
: nothing}
|
|
281
|
+
</button>`
|
|
282
|
+
: col.name}
|
|
279
283
|
</th>`)}
|
|
280
284
|
</tr>
|
|
281
285
|
</thead>
|
|
282
286
|
<tbody>
|
|
283
|
-
${this._data.map(row => html`<tr>
|
|
284
|
-
${this._columns.map(col => html`<td style=${bodyStyle(col, row)}>
|
|
287
|
+
${this._data.map((row) => html `<tr>
|
|
288
|
+
${this._columns.map((col) => html `<td style=${bodyStyle(col, row)}>
|
|
285
289
|
${col.value(row)}
|
|
286
290
|
</td>`)}
|
|
287
291
|
</tr>`)}
|
|
@@ -291,61 +295,38 @@ class LeuTable extends LeuElement {
|
|
|
291
295
|
<div class=${classMap(shadowClassesRight)}></div>
|
|
292
296
|
</div>
|
|
293
297
|
|
|
294
|
-
${this.itemsPerPage > 0
|
|
298
|
+
${this.itemsPerPage > 0
|
|
299
|
+
? html `
|
|
295
300
|
<leu-pagination
|
|
296
301
|
.numOfItems=${this._sortedData.length}
|
|
297
302
|
.itemsPerPage=${this.itemsPerPage}
|
|
298
303
|
page=${this._page}
|
|
299
|
-
@leu:pagechange=${e => {
|
|
300
|
-
|
|
301
|
-
|
|
304
|
+
@leu:pagechange=${(e) => {
|
|
305
|
+
this._page = e.detail.page;
|
|
306
|
+
}}
|
|
302
307
|
>
|
|
303
308
|
</leu-pagination>
|
|
304
|
-
`
|
|
309
|
+
`
|
|
310
|
+
: nothing}
|
|
305
311
|
`;
|
|
306
|
-
|
|
312
|
+
}
|
|
307
313
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
type: Array
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
type:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
type: Number,
|
|
326
|
-
reflect: true
|
|
327
|
-
},
|
|
328
|
-
sortIndex: {
|
|
329
|
-
type: Number,
|
|
330
|
-
reflect: true
|
|
331
|
-
},
|
|
332
|
-
sortOrderAsc: {
|
|
333
|
-
type: Boolean,
|
|
334
|
-
reflect: true
|
|
335
|
-
},
|
|
336
|
-
width: {
|
|
337
|
-
type: Number,
|
|
338
|
-
reflect: true
|
|
339
|
-
},
|
|
340
|
-
_shadowLeft: {
|
|
341
|
-
state: true
|
|
342
|
-
},
|
|
343
|
-
_shadowRight: {
|
|
344
|
-
state: true
|
|
345
|
-
},
|
|
346
|
-
_page: {
|
|
347
|
-
state: true
|
|
348
|
-
}
|
|
349
|
-
});
|
|
314
|
+
LeuTable.dependencies = {
|
|
315
|
+
"leu-icon": LeuIcon,
|
|
316
|
+
"leu-pagination": LeuPagination,
|
|
317
|
+
};
|
|
318
|
+
LeuTable.styles = [LeuElement.styles, css_248z];
|
|
319
|
+
LeuTable.properties = {
|
|
320
|
+
columns: { type: Array },
|
|
321
|
+
data: { type: Array },
|
|
322
|
+
firstColumnSticky: { type: Boolean, reflect: true },
|
|
323
|
+
itemsPerPage: { type: Number, reflect: true },
|
|
324
|
+
sortIndex: { type: Number, reflect: true },
|
|
325
|
+
sortOrderAsc: { type: Boolean, reflect: true },
|
|
326
|
+
width: { type: Number, reflect: true },
|
|
327
|
+
_shadowLeft: { state: true },
|
|
328
|
+
_shadowRight: { state: true },
|
|
329
|
+
_page: { state: true },
|
|
330
|
+
};
|
|
350
331
|
|
|
351
332
|
export { LeuTable };
|
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* @tagname leu-visually-hidden
|
|
3
7
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
declare class LeuVisuallyHidden extends LeuElement {
|
|
9
|
+
static styles: lit.CSSResultGroup[];
|
|
10
|
+
render(): lit_html.TemplateResult<1>;
|
|
6
11
|
}
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
|
|
13
|
+
export { LeuVisuallyHidden };
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-Dd6zm9XF.js';
|
|
2
1
|
import { css, html } from 'lit';
|
|
2
|
+
import { L as LeuElement } from './LeuElement-x8UlIDDl.js';
|
|
3
3
|
|
|
4
4
|
var css_248z = css`:host {
|
|
5
5
|
clip: rect(0 0 0 0);
|
|
@@ -17,10 +17,10 @@ var css_248z = css`:host {
|
|
|
17
17
|
* @tagname leu-visually-hidden
|
|
18
18
|
*/
|
|
19
19
|
class LeuVisuallyHidden extends LeuElement {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
render() {
|
|
21
|
+
return html `<slot></slot>`;
|
|
22
|
+
}
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
LeuVisuallyHidden.styles = [LeuElement.styles, css_248z];
|
|
25
25
|
|
|
26
26
|
export { LeuVisuallyHidden };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LeuElement } from "../../lib/LeuElement.js";
|
|
2
|
+
/**
|
|
3
|
+
* @tagname leu-accordion
|
|
4
|
+
* @slot content - The content of the accordion. No styles will be applied to the content.
|
|
5
|
+
* @attr {number} heading-level - The heading level of the accordion title. Must be between 1 and 6.
|
|
6
|
+
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
7
|
+
*/
|
|
8
|
+
export declare class LeuAccordion extends LeuElement {
|
|
9
|
+
static styles: import("lit").CSSResultGroup[];
|
|
10
|
+
/** @internal */
|
|
11
|
+
static shadowRootOptions: {
|
|
12
|
+
delegatesFocus: boolean;
|
|
13
|
+
mode: ShadowRootMode;
|
|
14
|
+
serializable?: boolean;
|
|
15
|
+
slotAssignment?: SlotAssignmentMode;
|
|
16
|
+
customElements?: CustomElementRegistry;
|
|
17
|
+
registry?: CustomElementRegistry;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The heading level of the accordion title. Must be between 1 and 6.
|
|
21
|
+
*/
|
|
22
|
+
headingLevel: number;
|
|
23
|
+
/**
|
|
24
|
+
* The expanded state of the accordion.
|
|
25
|
+
*/
|
|
26
|
+
open: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The label (title) of the accordion
|
|
29
|
+
*/
|
|
30
|
+
label: string;
|
|
31
|
+
/**
|
|
32
|
+
* The prefix of the accordion label. e.g. "01"
|
|
33
|
+
*/
|
|
34
|
+
labelPrefix: string;
|
|
35
|
+
/**
|
|
36
|
+
* Determines the heading tag of the accordion toggle.
|
|
37
|
+
* The headingLevel shouldn't be used directly to render the heading tag
|
|
38
|
+
* in order to avoid XSS issues.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
private _getHeadingTag;
|
|
42
|
+
/**
|
|
43
|
+
* Toggles the accordion open state.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
private _handleToggleClick;
|
|
47
|
+
render(): import("lit-html").TemplateResult;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIpD;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,iCAA8B;IAE3C,gBAAgB;IAChB,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED;;OAEG;IAEH,YAAY,SAAI;IAEhB;;OAEG;IAEH,IAAI,UAAQ;IAEZ;;OAEG;IAEH,KAAK,SAAK;IAEV;;OAEG;IAEH,WAAW,SAAK;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAStB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAI1B,MAAM;CAqCP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leu-accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/leu-accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,CAAA;AAIvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAA;KAC9B;CACF"}
|