@statistikzh/leu 0.24.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/.storybook/main.ts +18 -53
- package/.storybook/manager.ts +1 -4
- package/.storybook/preview.ts +23 -16
- package/.storybook/theme.ts +1 -1
- package/CHANGELOG.md +21 -0
- package/CONTRIBUTING.md +19 -8
- package/dist/Accordion-B04QkmHz.js +241 -0
- package/dist/Accordion.d.ts +44 -44
- package/dist/Accordion.js +2 -249
- package/dist/Button-BgNUxmo_.d.ts +99 -0
- package/dist/Button-BkhqVjug.js +564 -0
- package/dist/Button.d.ts +2 -85
- package/dist/Button.js +5 -504
- package/dist/ButtonGroup-B8U9fDvM.js +88 -0
- package/dist/ButtonGroup.d.ts +19 -19
- package/dist/ButtonGroup.js +6 -101
- package/dist/ChartWrapper-CSMFwz9e.js +158 -0
- package/dist/ChartWrapper.d.ts +26 -26
- package/dist/ChartWrapper.js +3 -163
- package/dist/Checkbox-Dd1QLpfn.js +198 -0
- package/dist/Checkbox.d.ts +35 -27
- package/dist/Checkbox.js +4 -157
- package/dist/CheckboxGroup-Bz2eWEFL.js +81 -0
- package/dist/CheckboxGroup.d.ts +18 -18
- package/dist/CheckboxGroup.js +5 -82
- package/dist/Chip-DLKM9P7v.d.ts +18 -0
- package/dist/Chip-XAQIIsXq.js +171 -0
- package/dist/Chip.d.ts +2 -18
- package/dist/Chip.js +2 -166
- package/dist/ChipGroup-DLqfK2kn.js +125 -0
- package/dist/ChipGroup-Ta8Ht4jc.d.ts +42 -0
- package/dist/ChipGroup.d.ts +2 -43
- package/dist/ChipGroup.js +3 -132
- package/dist/ChipLink-BAxyQO2M.d.ts +17 -0
- package/dist/ChipLink.d.ts +2 -18
- package/dist/ChipLink.js +28 -28
- package/dist/ChipRemovable-DBjwt0CH.d.ts +25 -0
- package/dist/ChipRemovable.d.ts +2 -26
- package/dist/ChipRemovable.js +42 -43
- package/dist/ChipSelectable-CMJNcE4U.d.ts +32 -0
- package/dist/ChipSelectable.d.ts +2 -33
- package/dist/ChipSelectable.js +63 -72
- package/dist/Dialog-DHuXR_oo.js +241 -0
- package/dist/Dialog.d.ts +28 -28
- package/dist/Dialog.js +3 -240
- package/dist/Dropdown-DtFTePbc.js +155 -0
- package/dist/Dropdown.d.ts +39 -41
- package/dist/Dropdown.js +9 -157
- package/dist/FileInput-b8sbLDPI.js +344 -0
- package/dist/FileInput.d.ts +56 -57
- package/dist/FileInput.js +7 -383
- package/dist/FormAssociatedMixin-Cc74LjbC.d.ts +22 -0
- package/dist/FormAssociatedMixin-DLPvFtbT.js +58 -0
- package/dist/Icon-C_yYuynf.js +186 -0
- package/dist/Icon-Op80LrrO.d.ts +151 -0
- package/dist/Icon.d.ts +2 -4
- package/dist/Icon.js +2 -188
- package/dist/Input-D2THgo7c.d.ts +169 -0
- package/dist/Input-DEOVocTa.js +610 -0
- package/dist/Input.d.ts +2 -166
- package/dist/Input.js +4 -626
- package/dist/LeuElement-BeFrgKes.js +46 -0
- package/dist/LeuElement-pJFU18Xm.d.ts +11 -0
- package/dist/Menu-BeqqtCw6.js +136 -0
- package/dist/Menu-CQdx1ef3.d.ts +43 -0
- package/dist/Menu.d.ts +2 -44
- package/dist/Menu.js +4 -157
- package/dist/MenuItem-DVg8-1Bq.js +219 -0
- package/dist/MenuItem-QcgnRk_7.d.ts +63 -0
- package/dist/MenuItem.d.ts +2 -64
- package/dist/MenuItem.js +3 -227
- package/dist/Message-BhknWvAF.js +252 -0
- package/dist/Message.d.ts +53 -53
- package/dist/Message.js +3 -267
- package/dist/Pagination-CqkHh-Vd.d.ts +76 -0
- package/dist/Pagination-DJI5MIi_.js +226 -0
- package/dist/Pagination.d.ts +2 -76
- package/dist/Pagination.js +7 -240
- package/dist/Placeholder-BJybFwSg.js +95 -0
- package/dist/Placeholder.d.ts +15 -15
- package/dist/Placeholder.js +2 -89
- package/dist/Popup-Btgm2a3D.d.ts +61 -0
- package/dist/Popup-DNlm_9AA.js +195 -0
- package/dist/Popup.d.ts +2 -62
- package/dist/Popup.js +2 -233
- package/dist/ProgressBar-B0wYj1KF.js +167 -0
- package/dist/ProgressBar.d.ts +21 -21
- package/dist/ProgressBar.js +2 -165
- package/dist/Radio-DMCL8c4D.js +160 -0
- package/dist/Radio.d.ts +22 -22
- package/dist/Radio.js +2 -151
- package/dist/RadioGroup-CM6IyBlq.js +171 -0
- package/dist/RadioGroup.d.ts +35 -35
- package/dist/RadioGroup.js +3 -182
- package/dist/Range-B72rtfln.js +496 -0
- package/dist/Range.d.ts +112 -112
- package/dist/Range.js +2 -586
- package/dist/ScrollTop-BFAqBVDR.js +130 -0
- package/dist/ScrollTop.d.ts +21 -21
- package/dist/ScrollTop.js +6 -134
- package/dist/Select-vxl3BvD4.js +618 -0
- package/dist/Select.d.ts +130 -132
- package/dist/Select.js +10 -675
- package/dist/Spinner-CrM1enM0.d.ts +14 -0
- package/dist/Spinner-DDTqijTO.js +56 -0
- package/dist/Spinner.d.ts +2 -14
- package/dist/Spinner.js +2 -52
- package/dist/Table-BgCxfBcm.js +392 -0
- package/dist/Table.d.ts +61 -63
- package/dist/Table.js +8 -427
- package/dist/Tag-DK2KkPIQ.js +76 -0
- package/dist/Tag.d.ts +8 -8
- package/dist/Tag.js +2 -74
- package/dist/VisuallyHidden-OeQvhxYn.d.ts +13 -0
- package/dist/VisuallyHidden-pll3amXE.js +29 -0
- package/dist/VisuallyHidden.d.ts +2 -13
- package/dist/VisuallyHidden.js +2 -25
- package/dist/decorate-DwpAc4D0.js +9 -0
- package/dist/hasSlotController-DSBCVzPD.js +38 -0
- package/dist/hasSlotController-DWPyZ52b.d.ts +19 -0
- package/dist/index.d.ts +33 -30
- package/dist/index.js +35 -45
- package/dist/leu-accordion.d.ts +7 -10
- package/dist/leu-accordion.js +4 -8
- package/dist/leu-button-group.d.ts +7 -10
- package/dist/leu-button-group.js +8 -12
- package/dist/leu-button.d.ts +7 -11
- package/dist/leu-button.js +7 -11
- package/dist/leu-chart-wrapper.d.ts +7 -12
- package/dist/leu-chart-wrapper.js +5 -9
- package/dist/leu-checkbox-group.d.ts +7 -10
- package/dist/leu-checkbox-group.js +7 -10
- package/dist/leu-checkbox.d.ts +7 -11
- package/dist/leu-checkbox.js +6 -8
- package/dist/leu-chip-group.d.ts +7 -12
- package/dist/leu-chip-group.js +5 -10
- package/dist/leu-chip-link.d.ts +7 -11
- package/dist/leu-chip-link.js +5 -8
- package/dist/leu-chip-removable.d.ts +7 -12
- package/dist/leu-chip-removable.js +6 -9
- package/dist/leu-chip-selectable.d.ts +7 -11
- package/dist/leu-chip-selectable.js +5 -8
- package/dist/leu-dialog.d.ts +7 -13
- package/dist/leu-dialog.js +5 -11
- package/dist/leu-dropdown.d.ts +7 -18
- package/dist/leu-dropdown.js +11 -17
- package/dist/leu-file-input.d.ts +7 -13
- package/dist/leu-file-input.js +9 -13
- package/dist/leu-icon.d.ts +7 -10
- package/dist/leu-icon.js +4 -7
- package/dist/leu-input.d.ts +7 -12
- package/dist/leu-input.js +6 -12
- package/dist/leu-menu-item.d.ts +7 -11
- package/dist/leu-menu-item.js +5 -9
- package/dist/leu-menu.d.ts +7 -12
- package/dist/leu-menu.js +6 -10
- package/dist/leu-message.d.ts +7 -11
- package/dist/leu-message.js +5 -10
- package/dist/leu-pagination.d.ts +7 -13
- package/dist/leu-pagination.js +9 -14
- package/dist/leu-placeholder.d.ts +7 -10
- package/dist/leu-placeholder.js +4 -5
- package/dist/leu-popup.d.ts +7 -11
- package/dist/leu-popup.js +4 -8
- package/dist/leu-progress-bar.d.ts +7 -10
- package/dist/leu-progress-bar.js +4 -8
- package/dist/leu-radio-group.d.ts +7 -10
- package/dist/leu-radio-group.js +5 -9
- package/dist/leu-radio.d.ts +7 -10
- package/dist/leu-radio.js +4 -7
- package/dist/leu-range.d.ts +7 -10
- package/dist/leu-range.js +4 -9
- package/dist/leu-scroll-top.d.ts +7 -12
- package/dist/leu-scroll-top.js +8 -13
- package/dist/leu-select.d.ts +7 -19
- package/dist/leu-select.js +12 -19
- package/dist/leu-spinner.d.ts +7 -10
- package/dist/leu-spinner.js +4 -5
- package/dist/leu-table.d.ts +7 -14
- package/dist/leu-table.js +10 -17
- package/dist/leu-tag.d.ts +7 -10
- package/dist/leu-tag.js +4 -7
- package/dist/leu-visually-hidden.d.ts +7 -10
- package/dist/leu-visually-hidden.js +4 -5
- package/dist/utils-hfk5Nwy8.js +28 -0
- package/dist/vscode.html-custom-data.json +7 -8
- package/dist/vue/index.d.ts +5 -9
- package/dist/web-types.json +18 -24
- package/eslint.config.mjs +79 -0
- package/package.json +44 -60
- package/scripts/generate-component/templates/stories/[name].stories.ts +1 -1
- package/src/components/accordion/Accordion.ts +1 -1
- package/src/components/button/Button.ts +76 -5
- package/src/components/button/button.css +37 -9
- package/src/components/button/stories/button.stories.ts +23 -0
- package/src/components/button/test/button.test.ts +214 -9
- package/src/components/button-group/ButtonGroup.ts +1 -6
- package/src/components/button-group/stories/button-group.stories.ts +1 -1
- package/src/components/chart-wrapper/ChartWrapper.ts +1 -1
- package/src/components/chart-wrapper/stories/chart-wrapper.stories.ts +1 -1
- package/src/components/checkbox/Checkbox.ts +76 -12
- package/src/components/checkbox/CheckboxGroup.ts +1 -1
- package/src/components/checkbox/checkbox.css +4 -0
- package/src/components/checkbox/stories/checkbox.stories.ts +26 -3
- package/src/components/checkbox/test/checkbox.test.ts +147 -3
- package/src/components/chip/Chip.ts +1 -1
- package/src/components/chip/ChipGroup.ts +2 -2
- package/src/components/chip/stories/chip-removable.stories.ts +1 -1
- package/src/components/chip/test/chip-removable.test.ts +2 -2
- package/src/components/dialog/Dialog.ts +1 -1
- package/src/components/dialog/stories/dialog.stories.ts +0 -2
- package/src/components/dropdown/Dropdown.ts +1 -1
- package/src/components/dropdown/stories/dropdown.stories.ts +1 -1
- package/src/components/file-input/FileInput.ts +18 -20
- package/src/components/file-input/stories/file-input.stories.ts +2 -2
- package/src/components/file-input/test/file-input.test.ts +14 -1
- package/src/components/icon/Icon.ts +1 -1
- package/src/components/input/Input.ts +18 -7
- package/src/components/input/stories/input.stories.ts +24 -21
- package/src/components/menu/Menu.ts +4 -4
- package/src/components/menu/MenuItem.ts +1 -1
- package/src/components/menu/stories/menu-item.stories.ts +0 -2
- package/src/components/message/Message.ts +1 -1
- package/src/components/message/stories/message.stories.ts +2 -2
- package/src/components/pagination/Pagination.ts +1 -1
- package/src/components/pagination/stories/pagination.stories.ts +3 -3
- package/src/components/pagination/test/pagination.test.ts +1 -1
- package/src/components/placeholder/Placeholder.ts +1 -1
- package/src/components/placeholder/stories/placeholder.stories.ts +1 -1
- package/src/components/popup/Popup.ts +1 -1
- package/src/components/progress-bar/ProgressBar.ts +1 -1
- package/src/components/progress-bar/stories/progress-bar.stories.ts +1 -1
- package/src/components/radio/Radio.ts +1 -1
- package/src/components/radio/RadioGroup.ts +5 -5
- package/src/components/range/Range.ts +1 -1
- package/src/components/range/stories/range.stories.ts +2 -2
- package/src/components/scroll-top/ScrollTop.ts +1 -1
- package/src/components/select/Select.ts +2 -5
- package/src/components/spinner/Spinner.ts +1 -1
- package/src/components/table/Table.ts +1 -1
- package/src/components/tag/Tag.ts +1 -1
- package/src/components/tag/stories/tag.stories.ts +1 -1
- package/src/components/visually-hidden/VisuallyHidden.ts +1 -1
- package/src/docs/contributing.mdx +1 -1
- package/src/docs/installation.mdx +1 -1
- package/src/docs/theme.mdx +1 -1
- package/src/docs/usage.mdx +1 -1
- package/src/global.d.ts +1 -1
- package/src/lib/LeuElement.ts +1 -1
- package/src/lib/mixins/FormAssociatedMixin.ts +115 -0
- package/src/lib/styleMap.ts +1 -1
- package/tsdown.config.ts +35 -0
- package/web-test-runner.config.mjs +20 -2
- package/.eslintrc.json +0 -57
- package/dist/Icon.d-itcQ94ym.d.ts +0 -151
- package/dist/LeuElement-BfXSO7MN.js +0 -42
- package/dist/LeuElement.d-BevHqLUu.d.ts +0 -10
- package/dist/_tslib-CNEFicEt.js +0 -30
- package/dist/components/accordion/Accordion.d.ts +0 -49
- package/dist/components/accordion/Accordion.d.ts.map +0 -1
- package/dist/components/accordion/leu-accordion.d.ts +0 -8
- package/dist/components/accordion/leu-accordion.d.ts.map +0 -1
- package/dist/components/accordion/stories/accordion.stories.d.ts +0 -26
- package/dist/components/accordion/stories/accordion.stories.d.ts.map +0 -1
- package/dist/components/accordion/test/accordion.test.d.ts +0 -2
- package/dist/components/accordion/test/accordion.test.d.ts.map +0 -1
- package/dist/components/button/Button.d.ts +0 -81
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button/leu-button.d.ts +0 -8
- package/dist/components/button/leu-button.d.ts.map +0 -1
- package/dist/components/button/stories/button.stories.d.ts +0 -19
- package/dist/components/button/stories/button.stories.d.ts.map +0 -1
- package/dist/components/button/test/button.test.d.ts +0 -3
- package/dist/components/button/test/button.test.d.ts.map +0 -1
- package/dist/components/button-group/ButtonGroup.d.ts +0 -25
- package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
- package/dist/components/button-group/leu-button-group.d.ts +0 -8
- package/dist/components/button-group/leu-button-group.d.ts.map +0 -1
- package/dist/components/button-group/stories/button-group.stories.d.ts +0 -15
- package/dist/components/button-group/stories/button-group.stories.d.ts.map +0 -1
- package/dist/components/button-group/test/button-group.test.d.ts +0 -3
- package/dist/components/button-group/test/button-group.test.d.ts.map +0 -1
- package/dist/components/chart-wrapper/ChartWrapper.d.ts +0 -34
- package/dist/components/chart-wrapper/ChartWrapper.d.ts.map +0 -1
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +0 -8
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +0 -1
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts +0 -47
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts.map +0 -1
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts +0 -2
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.d.ts +0 -28
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts +0 -22
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +0 -1
- package/dist/components/checkbox/leu-checkbox-group.d.ts +0 -8
- package/dist/components/checkbox/leu-checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox/leu-checkbox.d.ts +0 -8
- package/dist/components/checkbox/leu-checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/stories/checkbox-group.stories.d.ts +0 -29
- package/dist/components/checkbox/stories/checkbox-group.stories.d.ts.map +0 -1
- package/dist/components/checkbox/stories/checkbox.stories.d.ts +0 -22
- package/dist/components/checkbox/stories/checkbox.stories.d.ts.map +0 -1
- package/dist/components/checkbox/test/checkbox-group.test.d.ts +0 -3
- package/dist/components/checkbox/test/checkbox-group.test.d.ts.map +0 -1
- package/dist/components/checkbox/test/checkbox.test.d.ts +0 -2
- package/dist/components/checkbox/test/checkbox.test.d.ts.map +0 -1
- package/dist/components/chip/Chip.d.ts +0 -15
- package/dist/components/chip/Chip.d.ts.map +0 -1
- package/dist/components/chip/ChipGroup.d.ts +0 -38
- package/dist/components/chip/ChipGroup.d.ts.map +0 -1
- package/dist/components/chip/ChipLink.d.ts +0 -13
- package/dist/components/chip/ChipLink.d.ts.map +0 -1
- package/dist/components/chip/ChipRemovable.d.ts +0 -21
- package/dist/components/chip/ChipRemovable.d.ts.map +0 -1
- package/dist/components/chip/ChipSelectable.d.ts +0 -28
- package/dist/components/chip/ChipSelectable.d.ts.map +0 -1
- package/dist/components/chip/exports.d.ts +0 -5
- package/dist/components/chip/exports.d.ts.map +0 -1
- package/dist/components/chip/leu-chip-group.d.ts +0 -8
- package/dist/components/chip/leu-chip-group.d.ts.map +0 -1
- package/dist/components/chip/leu-chip-link.d.ts +0 -8
- package/dist/components/chip/leu-chip-link.d.ts.map +0 -1
- package/dist/components/chip/leu-chip-removable.d.ts +0 -8
- package/dist/components/chip/leu-chip-removable.d.ts.map +0 -1
- package/dist/components/chip/leu-chip-selectable.d.ts +0 -8
- package/dist/components/chip/leu-chip-selectable.d.ts.map +0 -1
- package/dist/components/chip/stories/chip-group.stories.d.ts +0 -40
- package/dist/components/chip/stories/chip-group.stories.d.ts.map +0 -1
- package/dist/components/chip/stories/chip-link.stories.d.ts +0 -27
- package/dist/components/chip/stories/chip-link.stories.d.ts.map +0 -1
- package/dist/components/chip/stories/chip-removable.stories.d.ts +0 -21
- package/dist/components/chip/stories/chip-removable.stories.d.ts.map +0 -1
- package/dist/components/chip/stories/chip-selectable.stories.d.ts +0 -35
- package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +0 -1
- package/dist/components/chip/test/chip-group.test.d.ts +0 -4
- package/dist/components/chip/test/chip-group.test.d.ts.map +0 -1
- package/dist/components/chip/test/chip-link.test.d.ts +0 -2
- package/dist/components/chip/test/chip-link.test.d.ts.map +0 -1
- package/dist/components/chip/test/chip-removable.test.d.ts +0 -2
- package/dist/components/chip/test/chip-removable.test.d.ts.map +0 -1
- package/dist/components/chip/test/chip-selectable.test.d.ts +0 -2
- package/dist/components/chip/test/chip-selectable.test.d.ts.map +0 -1
- package/dist/components/chip/test/chip.test.d.ts +0 -2
- package/dist/components/chip/test/chip.test.d.ts.map +0 -1
- package/dist/components/dialog/Dialog.d.ts +0 -29
- package/dist/components/dialog/Dialog.d.ts.map +0 -1
- package/dist/components/dialog/leu-dialog.d.ts +0 -8
- package/dist/components/dialog/leu-dialog.d.ts.map +0 -1
- package/dist/components/dialog/stories/dialog.stories.d.ts +0 -19
- package/dist/components/dialog/stories/dialog.stories.d.ts.map +0 -1
- package/dist/components/dialog/test/dialog.test.d.ts +0 -2
- package/dist/components/dialog/test/dialog.test.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.d.ts +0 -40
- package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/leu-dropdown.d.ts +0 -8
- package/dist/components/dropdown/leu-dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/stories/dropdown.stories.d.ts +0 -25
- package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +0 -1
- package/dist/components/dropdown/test/dropdown.test.d.ts +0 -2
- package/dist/components/dropdown/test/dropdown.test.d.ts.map +0 -1
- package/dist/components/file-input/FileInput.d.ts +0 -62
- package/dist/components/file-input/FileInput.d.ts.map +0 -1
- package/dist/components/file-input/leu-file-input.d.ts +0 -8
- package/dist/components/file-input/leu-file-input.d.ts.map +0 -1
- package/dist/components/file-input/stories/file-input.stories.d.ts +0 -34
- package/dist/components/file-input/stories/file-input.stories.d.ts.map +0 -1
- package/dist/components/file-input/test/file-input.test.d.ts +0 -2
- package/dist/components/file-input/test/file-input.test.d.ts.map +0 -1
- package/dist/components/icon/Icon.d.ts +0 -20
- package/dist/components/icon/Icon.d.ts.map +0 -1
- package/dist/components/icon/leu-icon.d.ts +0 -8
- package/dist/components/icon/leu-icon.d.ts.map +0 -1
- package/dist/components/icon/paths.d.ts +0 -127
- package/dist/components/icon/paths.d.ts.map +0 -1
- package/dist/components/icon/stories/icon.stories.d.ts +0 -32
- package/dist/components/icon/stories/icon.stories.d.ts.map +0 -1
- package/dist/components/icon/test/icon.test.d.ts +0 -2
- package/dist/components/icon/test/icon.test.d.ts.map +0 -1
- package/dist/components/input/Input.d.ts +0 -163
- package/dist/components/input/Input.d.ts.map +0 -1
- package/dist/components/input/leu-input.d.ts +0 -8
- package/dist/components/input/leu-input.d.ts.map +0 -1
- package/dist/components/input/stories/input.stories.d.ts +0 -35
- package/dist/components/input/stories/input.stories.d.ts.map +0 -1
- package/dist/components/input/test/input.test.d.ts +0 -2
- package/dist/components/input/test/input.test.d.ts.map +0 -1
- package/dist/components/menu/Menu.d.ts +0 -39
- package/dist/components/menu/Menu.d.ts.map +0 -1
- package/dist/components/menu/MenuItem.d.ts +0 -61
- package/dist/components/menu/MenuItem.d.ts.map +0 -1
- package/dist/components/menu/leu-menu-item.d.ts +0 -8
- package/dist/components/menu/leu-menu-item.d.ts.map +0 -1
- package/dist/components/menu/leu-menu.d.ts +0 -8
- package/dist/components/menu/leu-menu.d.ts.map +0 -1
- package/dist/components/menu/stories/menu-item.stories.d.ts +0 -24
- package/dist/components/menu/stories/menu-item.stories.d.ts.map +0 -1
- package/dist/components/menu/stories/menu.stories.d.ts +0 -26
- package/dist/components/menu/stories/menu.stories.d.ts.map +0 -1
- package/dist/components/menu/test/menu-item.test.d.ts +0 -3
- package/dist/components/menu/test/menu-item.test.d.ts.map +0 -1
- package/dist/components/menu/test/menu.test.d.ts +0 -4
- package/dist/components/menu/test/menu.test.d.ts.map +0 -1
- package/dist/components/message/Message.d.ts +0 -59
- package/dist/components/message/Message.d.ts.map +0 -1
- package/dist/components/message/leu-message.d.ts +0 -8
- package/dist/components/message/leu-message.d.ts.map +0 -1
- package/dist/components/message/stories/message.stories.d.ts +0 -179
- package/dist/components/message/stories/message.stories.d.ts.map +0 -1
- package/dist/components/message/test/message.test.d.ts +0 -2
- package/dist/components/message/test/message.test.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.d.ts +0 -72
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/pagination/leu-pagination.d.ts +0 -8
- package/dist/components/pagination/leu-pagination.d.ts.map +0 -1
- package/dist/components/pagination/stories/pagination.stories.d.ts +0 -25
- package/dist/components/pagination/stories/pagination.stories.d.ts.map +0 -1
- package/dist/components/pagination/test/pagination.test.d.ts +0 -2
- package/dist/components/pagination/test/pagination.test.d.ts.map +0 -1
- package/dist/components/placeholder/Placeholder.d.ts +0 -23
- package/dist/components/placeholder/Placeholder.d.ts.map +0 -1
- package/dist/components/placeholder/leu-placeholder.d.ts +0 -8
- package/dist/components/placeholder/leu-placeholder.d.ts.map +0 -1
- package/dist/components/placeholder/stories/placeholder.stories.d.ts +0 -27
- package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +0 -1
- package/dist/components/placeholder/test/placeholder.test.d.ts +0 -2
- package/dist/components/placeholder/test/placeholder.test.d.ts.map +0 -1
- package/dist/components/popup/Popup.d.ts +0 -57
- package/dist/components/popup/Popup.d.ts.map +0 -1
- package/dist/components/popup/leu-popup.d.ts +0 -8
- package/dist/components/popup/leu-popup.d.ts.map +0 -1
- package/dist/components/popup/stories/popup.stories.d.ts +0 -28
- package/dist/components/popup/stories/popup.stories.d.ts.map +0 -1
- package/dist/components/popup/test/popup.test.d.ts +0 -2
- package/dist/components/popup/test/popup.test.d.ts.map +0 -1
- package/dist/components/progress-bar/ProgressBar.d.ts +0 -25
- package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
- package/dist/components/progress-bar/leu-progress-bar.d.ts +0 -8
- package/dist/components/progress-bar/leu-progress-bar.d.ts.map +0 -1
- package/dist/components/progress-bar/stories/progress-bar.stories.d.ts +0 -48
- package/dist/components/progress-bar/stories/progress-bar.stories.d.ts.map +0 -1
- package/dist/components/progress-bar/test/progress-bar.test.d.ts +0 -2
- package/dist/components/progress-bar/test/progress-bar.test.d.ts.map +0 -1
- package/dist/components/radio/Radio.d.ts +0 -24
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/radio/RadioGroup.d.ts +0 -39
- package/dist/components/radio/RadioGroup.d.ts.map +0 -1
- package/dist/components/radio/leu-radio-group.d.ts +0 -8
- package/dist/components/radio/leu-radio-group.d.ts.map +0 -1
- package/dist/components/radio/leu-radio.d.ts +0 -8
- package/dist/components/radio/leu-radio.d.ts.map +0 -1
- package/dist/components/radio/stories/radio-group.stories.d.ts +0 -29
- package/dist/components/radio/stories/radio-group.stories.d.ts.map +0 -1
- package/dist/components/radio/stories/radio.stories.d.ts +0 -22
- package/dist/components/radio/stories/radio.stories.d.ts.map +0 -1
- package/dist/components/radio/test/radio-group.test.d.ts +0 -3
- package/dist/components/radio/test/radio-group.test.d.ts.map +0 -1
- package/dist/components/radio/test/radio.test.d.ts +0 -2
- package/dist/components/radio/test/radio.test.d.ts.map +0 -1
- package/dist/components/range/Range.d.ts +0 -116
- package/dist/components/range/Range.d.ts.map +0 -1
- package/dist/components/range/leu-range.d.ts +0 -8
- package/dist/components/range/leu-range.d.ts.map +0 -1
- package/dist/components/range/stories/range.stories.d.ts +0 -231
- package/dist/components/range/stories/range.stories.d.ts.map +0 -1
- package/dist/components/range/test/range.test.d.ts +0 -2
- package/dist/components/range/test/range.test.d.ts.map +0 -1
- package/dist/components/scroll-top/ScrollTop.d.ts +0 -23
- package/dist/components/scroll-top/ScrollTop.d.ts.map +0 -1
- package/dist/components/scroll-top/leu-scroll-top.d.ts +0 -8
- package/dist/components/scroll-top/leu-scroll-top.d.ts.map +0 -1
- package/dist/components/scroll-top/stories/scroll-top.stories.d.ts +0 -8
- package/dist/components/scroll-top/stories/scroll-top.stories.d.ts.map +0 -1
- package/dist/components/scroll-top/test/scroll-top.test.d.ts +0 -2
- package/dist/components/scroll-top/test/scroll-top.test.d.ts.map +0 -1
- package/dist/components/select/Select.d.ts +0 -145
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/leu-select.d.ts +0 -8
- package/dist/components/select/leu-select.d.ts.map +0 -1
- package/dist/components/select/stories/select.stories.d.ts +0 -23
- package/dist/components/select/stories/select.stories.d.ts.map +0 -1
- package/dist/components/select/test/fixtures.d.ts +0 -2
- package/dist/components/select/test/fixtures.d.ts.map +0 -1
- package/dist/components/select/test/select.test.d.ts +0 -3
- package/dist/components/select/test/select.test.d.ts.map +0 -1
- package/dist/components/spinner/Spinner.d.ts +0 -10
- package/dist/components/spinner/Spinner.d.ts.map +0 -1
- package/dist/components/spinner/leu-spinner.d.ts +0 -8
- package/dist/components/spinner/leu-spinner.d.ts.map +0 -1
- package/dist/components/spinner/stories/spinner.stories.d.ts +0 -16
- package/dist/components/spinner/stories/spinner.stories.d.ts.map +0 -1
- package/dist/components/spinner/test/spinner.test.d.ts +0 -2
- package/dist/components/spinner/test/spinner.test.d.ts.map +0 -1
- package/dist/components/table/Table.d.ts +0 -65
- package/dist/components/table/Table.d.ts.map +0 -1
- package/dist/components/table/leu-table.d.ts +0 -8
- package/dist/components/table/leu-table.d.ts.map +0 -1
- package/dist/components/table/stories/table.stories.d.ts +0 -15
- package/dist/components/table/stories/table.stories.d.ts.map +0 -1
- package/dist/components/table/test/table.test.d.ts +0 -2
- package/dist/components/table/test/table.test.d.ts.map +0 -1
- package/dist/components/tag/Tag.d.ts +0 -13
- package/dist/components/tag/Tag.d.ts.map +0 -1
- package/dist/components/tag/leu-tag.d.ts +0 -8
- package/dist/components/tag/leu-tag.d.ts.map +0 -1
- package/dist/components/tag/stories/tag.stories.d.ts +0 -136
- package/dist/components/tag/stories/tag.stories.d.ts.map +0 -1
- package/dist/components/tag/test/tag.test.d.ts +0 -2
- package/dist/components/tag/test/tag.test.d.ts.map +0 -1
- package/dist/components/visually-hidden/VisuallyHidden.d.ts +0 -9
- package/dist/components/visually-hidden/VisuallyHidden.d.ts.map +0 -1
- package/dist/components/visually-hidden/leu-visually-hidden.d.ts +0 -8
- package/dist/components/visually-hidden/leu-visually-hidden.d.ts.map +0 -1
- package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts +0 -13
- package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts.map +0 -1
- package/dist/components/visually-hidden/test/visually-hidden.test.d.ts +0 -2
- package/dist/components/visually-hidden/test/visually-hidden.test.d.ts.map +0 -1
- package/dist/hasSlotController-Bm2tipvG.js +0 -53
- package/dist/hasSlotController.d-emXwVXWF.d.ts +0 -23
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/LeuElement.d.ts +0 -8
- package/dist/lib/LeuElement.d.ts.map +0 -1
- package/dist/lib/a11y.d.ts +0 -11
- package/dist/lib/a11y.d.ts.map +0 -1
- package/dist/lib/hasSlotController.d.ts +0 -20
- package/dist/lib/hasSlotController.d.ts.map +0 -1
- package/dist/lib/styleMap.d.ts +0 -61
- package/dist/lib/styleMap.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -23
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/styles/style.stories.d.ts +0 -6
- package/dist/styles/style.stories.d.ts.map +0 -1
- package/dist/utils-DBGsNSJW.js +0 -33
- package/rollup.config.js +0 -94
- package/web-dev-server.config.mjs +0 -30
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,102 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import 'lit/decorators.js';
|
|
8
|
-
import './Icon.js';
|
|
9
|
-
import './hasSlotController-Bm2tipvG.js';
|
|
10
|
-
|
|
11
|
-
var css_248z = css`.group {
|
|
12
|
-
display: flex;
|
|
13
|
-
gap: 0.5rem;
|
|
14
|
-
flex-wrap: wrap;
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* A radio input-like button group component.
|
|
20
|
-
* It allows only one button to be active at a time.
|
|
21
|
-
* @tagname leu-button-group
|
|
22
|
-
* @slot - Slot for the buttons
|
|
23
|
-
* @fires input - When the value of the group changes by clicking a button
|
|
24
|
-
*/
|
|
25
|
-
class LeuButtonGroup extends LeuElement {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this._items = [];
|
|
29
|
-
this._handleButtonClick = (event) => {
|
|
30
|
-
const button = event.currentTarget;
|
|
31
|
-
if (!button.active) {
|
|
32
|
-
this.value = LeuButtonGroup.getButtonValue(button);
|
|
33
|
-
this.dispatchEvent(new CustomEvent("input", {
|
|
34
|
-
bubbles: true,
|
|
35
|
-
composed: true,
|
|
36
|
-
detail: { value: LeuButtonGroup.getButtonValue(button) },
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Retrieves the value or the text content of a given LeuButton element.
|
|
43
|
-
*/
|
|
44
|
-
static getButtonValue(button) {
|
|
45
|
-
return button.getAttribute("value") ?? button.textContent.trim();
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The value of the currently selected (active) button
|
|
49
|
-
*/
|
|
50
|
-
get value() {
|
|
51
|
-
const activeButton = this._items.find((item) => item.active);
|
|
52
|
-
return activeButton ? LeuButtonGroup.getButtonValue(activeButton) : null;
|
|
53
|
-
}
|
|
54
|
-
set value(newValue) {
|
|
55
|
-
this._items.forEach((item) => {
|
|
56
|
-
/* eslint-disable no-param-reassign */
|
|
57
|
-
item.active = LeuButtonGroup.getButtonValue(item) === newValue;
|
|
58
|
-
/* eslint-enable no-param-reassign */
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
_handleSlotChange() {
|
|
62
|
-
/**
|
|
63
|
-
* Remove all event listeners that were added before.
|
|
64
|
-
* Just because a slotchange event was fired, it doesn't mean that all of the
|
|
65
|
-
* children of the slot have changed.
|
|
66
|
-
*/
|
|
67
|
-
this._items.forEach((item) => {
|
|
68
|
-
item.removeEventListener("click", this._handleButtonClick);
|
|
69
|
-
});
|
|
70
|
-
const slot = this.shadowRoot.querySelector("slot");
|
|
71
|
-
this._items = slot
|
|
72
|
-
.assignedElements({ flatten: true })
|
|
73
|
-
.filter((el) => el instanceof LeuButton);
|
|
74
|
-
let foundActiveButtonBefore = false;
|
|
75
|
-
this._items.forEach((item) => {
|
|
76
|
-
/* eslint-disable no-param-reassign */
|
|
77
|
-
item.addEventListener("click", this._handleButtonClick);
|
|
78
|
-
item.componentRole = "menuitemradio";
|
|
79
|
-
/**
|
|
80
|
-
* In case there are multiple active buttons
|
|
81
|
-
* only the first one will be kept active.
|
|
82
|
-
*/
|
|
83
|
-
if (item.active && foundActiveButtonBefore) {
|
|
84
|
-
item.active = false;
|
|
85
|
-
}
|
|
86
|
-
else if (item.active) {
|
|
87
|
-
foundActiveButtonBefore = true;
|
|
88
|
-
}
|
|
89
|
-
/* eslint-enable no-param-reassign */
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
render() {
|
|
93
|
-
return html `
|
|
94
|
-
<div role="menubar" class="group">
|
|
95
|
-
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
96
|
-
</div>
|
|
97
|
-
`;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
LeuButtonGroup.styles = [LeuElement.styles, css_248z];
|
|
101
|
-
|
|
1
|
+
import "./LeuElement-BeFrgKes.js";
|
|
2
|
+
import "./Icon-C_yYuynf.js";
|
|
3
|
+
import "./Spinner-DDTqijTO.js";
|
|
4
|
+
import "./Button-BkhqVjug.js";
|
|
5
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
+
import { t as LeuButtonGroup } from "./ButtonGroup-B8U9fDvM.js";
|
|
102
7
|
export { LeuButtonGroup };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
+
import { t as LeuSpinner } from "./Spinner-DDTqijTO.js";
|
|
4
|
+
import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
|
|
5
|
+
import { css, html, nothing } from "lit";
|
|
6
|
+
import { property } from "lit/decorators.js";
|
|
7
|
+
//#region src/components/chart-wrapper/chart-wrapper.css?inline
|
|
8
|
+
var chart_wrapper_default = css`.chart-wrapper {
|
|
9
|
+
display: block;
|
|
10
|
+
width: 100%;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
.chart-wrapper__title::slotted(h2) {
|
|
14
|
+
color: var(--leu-color-black-100);
|
|
15
|
+
font: var(--leu-t-curve-large-black-font);
|
|
16
|
+
margin: 0 0 0.75rem;
|
|
17
|
+
}
|
|
18
|
+
@media (min-width: 840px) {
|
|
19
|
+
.chart-wrapper__title::slotted(h2) {
|
|
20
|
+
margin: 0 0 1.25rem;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
@media (min-width: 1280px) {
|
|
24
|
+
.chart-wrapper__title::slotted(h2) {
|
|
25
|
+
margin: 0 0 1.5rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.chart-wrapper__title::slotted(h3) {
|
|
29
|
+
color: var(--leu-color-black-100);
|
|
30
|
+
font: var(--leu-t-curve-medium-black-font);
|
|
31
|
+
margin: 0 0 0.5rem;
|
|
32
|
+
}
|
|
33
|
+
.chart-wrapper__title::slotted(h4) {
|
|
34
|
+
color: var(--leu-color-black-100);
|
|
35
|
+
font: var(--leu-t-curve-regular-black-font);
|
|
36
|
+
margin: 0 0 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
.chart-wrapper__description,
|
|
39
|
+
.chart-wrapper__chart {
|
|
40
|
+
display: block;
|
|
41
|
+
margin-bottom: 0.75rem;
|
|
42
|
+
}
|
|
43
|
+
@media (min-width: 840px) {
|
|
44
|
+
.chart-wrapper__description,
|
|
45
|
+
.chart-wrapper__chart {
|
|
46
|
+
margin-bottom: 1.25rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
@media (min-width: 1280px) {
|
|
50
|
+
.chart-wrapper__description,
|
|
51
|
+
.chart-wrapper__chart {
|
|
52
|
+
margin-bottom: 1.5rem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.chart-wrapper__description {
|
|
56
|
+
font: var(--leu-t-curve-small-regular-font);
|
|
57
|
+
color: var(--leu-color-black-60);
|
|
58
|
+
}
|
|
59
|
+
.chart-wrapper__caption {
|
|
60
|
+
font: var(--leu-t-curve-tiny-regular-font);
|
|
61
|
+
color: var(--leu-color-black-60);
|
|
62
|
+
}
|
|
63
|
+
.chart-wrapper__ruler {
|
|
64
|
+
display: block;
|
|
65
|
+
border: none;
|
|
66
|
+
border-top: 1px solid var(--leu-color-black-transp-20);
|
|
67
|
+
margin: 0.75rem 0;
|
|
68
|
+
}
|
|
69
|
+
@media (min-width: 1280px) {
|
|
70
|
+
.chart-wrapper__ruler {
|
|
71
|
+
margin-top: 1rem;
|
|
72
|
+
margin-bottom: 1rem;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.chart-wrapper__download {
|
|
76
|
+
display: block;
|
|
77
|
+
margin-left: -0.5rem;
|
|
78
|
+
}
|
|
79
|
+
.chart-wrapper__container {
|
|
80
|
+
position: relative;
|
|
81
|
+
}
|
|
82
|
+
.chart-wrapper__spinner-container {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
display: grid;
|
|
89
|
+
align-content: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
place-content: center;
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/chart-wrapper/ChartWrapper.ts
|
|
96
|
+
/**
|
|
97
|
+
* A wrapper element for charts.
|
|
98
|
+
* @tagname leu-chart-wrapper
|
|
99
|
+
* @slot title - The title of the chart. Use a heading tag (h2-4) depending on your context.
|
|
100
|
+
* @slot description - A description of the chart. Content is wrapped in a `<p>` tag by the component.
|
|
101
|
+
* @slot chart - The actual chart
|
|
102
|
+
* @slot caption - A caption for the chart, e.g. a source or explanation of the data.
|
|
103
|
+
* @slot download - A download button or dropdown to export the chart in different formats.
|
|
104
|
+
*/
|
|
105
|
+
var LeuChartWrapper = class extends LeuElement {
|
|
106
|
+
constructor(..._args) {
|
|
107
|
+
super(..._args);
|
|
108
|
+
this.pending = false;
|
|
109
|
+
this.hasSlotController = new HasSlotController(this, [
|
|
110
|
+
"description",
|
|
111
|
+
"caption",
|
|
112
|
+
"download"
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
static {
|
|
116
|
+
this.styles = [LeuElement.styles, chart_wrapper_default];
|
|
117
|
+
}
|
|
118
|
+
static {
|
|
119
|
+
this.shadowRootOptions = {
|
|
120
|
+
...LeuElement.shadowRootOptions,
|
|
121
|
+
delegatesFocus: true
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static {
|
|
125
|
+
this.dependencies = { "leu-spinner": LeuSpinner };
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
const hasDescription = this.hasSlotController.test("description");
|
|
129
|
+
const hasCaption = this.hasSlotController.test("caption");
|
|
130
|
+
const hasDownload = this.hasSlotController.test("download");
|
|
131
|
+
return html`
|
|
132
|
+
<figure class="chart-wrapper">
|
|
133
|
+
<slot name="title" class="chart-wrapper__title"></slot>
|
|
134
|
+
${hasDescription ? html`<slot
|
|
135
|
+
name="description"
|
|
136
|
+
class="chart-wrapper__description"
|
|
137
|
+
></slot>` : nothing}
|
|
138
|
+
<div class="chart-wrapper__container">
|
|
139
|
+
<slot name="chart" class="chart-wrapper__chart"></slot>
|
|
140
|
+
${this.pending ? html`<div class="chart-wrapper__spinner-container">
|
|
141
|
+
<leu-spinner class="chart-wrapper__spinner"></leu-spinner>
|
|
142
|
+
</div>` : nothing}
|
|
143
|
+
</div>
|
|
144
|
+
${hasCaption ? html`<figcaption>
|
|
145
|
+
<slot name="caption" class="chart-wrapper__caption"></slot>
|
|
146
|
+
</figcaption>` : nothing}
|
|
147
|
+
<hr class="chart-wrapper__ruler" />
|
|
148
|
+
${hasDownload ? html`<slot name="download" class="chart-wrapper__download"></slot>` : nothing}
|
|
149
|
+
</figure>
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
__decorate([property({
|
|
154
|
+
type: Boolean,
|
|
155
|
+
reflect: true
|
|
156
|
+
})], LeuChartWrapper.prototype, "pending", void 0);
|
|
157
|
+
//#endregion
|
|
158
|
+
export { LeuChartWrapper as t };
|
package/dist/ChartWrapper.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { LeuSpinner } from './Spinner.js';
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
|
+
import { t as LeuSpinner } from "./Spinner-CrM1enM0.js";
|
|
3
|
+
import { t as HasSlotController } from "./hasSlotController-DWPyZ52b.js";
|
|
4
|
+
import * as lit_html0 from "lit-html";
|
|
6
5
|
|
|
6
|
+
//#region src/components/chart-wrapper/ChartWrapper.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* A wrapper element for charts.
|
|
9
9
|
* @tagname leu-chart-wrapper
|
|
@@ -14,25 +14,25 @@ import { LeuSpinner } from './Spinner.js';
|
|
|
14
14
|
* @slot download - A download button or dropdown to export the chart in different formats.
|
|
15
15
|
*/
|
|
16
16
|
declare class LeuChartWrapper extends LeuElement {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
static styles: any[];
|
|
18
|
+
static shadowRootOptions: {
|
|
19
|
+
delegatesFocus: boolean;
|
|
20
|
+
clonable?: boolean;
|
|
21
|
+
customElementRegistry?: CustomElementRegistry;
|
|
22
|
+
mode: ShadowRootMode;
|
|
23
|
+
serializable?: boolean;
|
|
24
|
+
slotAssignment?: SlotAssignmentMode;
|
|
25
|
+
};
|
|
26
|
+
static dependencies: {
|
|
27
|
+
"leu-spinner": typeof LeuSpinner;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Whether the chart is currently loading or not.
|
|
31
|
+
* When set to `true`, a spinner will be shown in the chart container.
|
|
32
|
+
*/
|
|
33
|
+
pending: boolean;
|
|
34
|
+
hasSlotController: HasSlotController;
|
|
35
|
+
render(): lit_html0.TemplateResult<1>;
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
export { LeuChartWrapper };
|
|
37
|
+
//#endregion
|
|
38
|
+
export { LeuChartWrapper };
|
package/dist/ChartWrapper.js
CHANGED
|
@@ -1,164 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { L as LeuElement } from './LeuElement-BfXSO7MN.js';
|
|
5
|
-
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
6
|
-
import { LeuSpinner } from './Spinner.js';
|
|
7
|
-
|
|
8
|
-
var css_248z = css`.chart-wrapper {
|
|
9
|
-
display: block;
|
|
10
|
-
width: 100%;
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
.chart-wrapper__title::slotted(h2) {
|
|
14
|
-
color: var(--leu-color-black-100);
|
|
15
|
-
font: var(--leu-t-curve-large-black-font);
|
|
16
|
-
margin: 0 0 0.75rem;
|
|
17
|
-
}
|
|
18
|
-
@media (min-width: 840px) {
|
|
19
|
-
.chart-wrapper__title::slotted(h2) {
|
|
20
|
-
margin: 0 0 1.25rem;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
@media (min-width: 1280px) {
|
|
24
|
-
.chart-wrapper__title::slotted(h2) {
|
|
25
|
-
margin: 0 0 1.5rem;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.chart-wrapper__title::slotted(h3) {
|
|
29
|
-
color: var(--leu-color-black-100);
|
|
30
|
-
font: var(--leu-t-curve-medium-black-font);
|
|
31
|
-
margin: 0 0 0.5rem;
|
|
32
|
-
}
|
|
33
|
-
.chart-wrapper__title::slotted(h4) {
|
|
34
|
-
color: var(--leu-color-black-100);
|
|
35
|
-
font: var(--leu-t-curve-regular-black-font);
|
|
36
|
-
margin: 0 0 0.5rem;
|
|
37
|
-
}
|
|
38
|
-
.chart-wrapper__description,
|
|
39
|
-
.chart-wrapper__chart {
|
|
40
|
-
display: block;
|
|
41
|
-
margin-bottom: 0.75rem;
|
|
42
|
-
}
|
|
43
|
-
@media (min-width: 840px) {
|
|
44
|
-
.chart-wrapper__description,
|
|
45
|
-
.chart-wrapper__chart {
|
|
46
|
-
margin-bottom: 1.25rem;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
@media (min-width: 1280px) {
|
|
50
|
-
.chart-wrapper__description,
|
|
51
|
-
.chart-wrapper__chart {
|
|
52
|
-
margin-bottom: 1.5rem;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
.chart-wrapper__description {
|
|
56
|
-
font: var(--leu-t-curve-small-regular-font);
|
|
57
|
-
color: var(--leu-color-black-60);
|
|
58
|
-
}
|
|
59
|
-
.chart-wrapper__caption {
|
|
60
|
-
font: var(--leu-t-curve-tiny-regular-font);
|
|
61
|
-
color: var(--leu-color-black-60);
|
|
62
|
-
}
|
|
63
|
-
.chart-wrapper__ruler {
|
|
64
|
-
display: block;
|
|
65
|
-
border: none;
|
|
66
|
-
border-top: 1px solid var(--leu-color-black-transp-20);
|
|
67
|
-
margin: 0.75rem 0;
|
|
68
|
-
}
|
|
69
|
-
@media (min-width: 1280px) {
|
|
70
|
-
.chart-wrapper__ruler {
|
|
71
|
-
margin-top: 1rem;
|
|
72
|
-
margin-bottom: 1rem;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.chart-wrapper__download {
|
|
76
|
-
display: block;
|
|
77
|
-
margin-left: -0.5rem;
|
|
78
|
-
}
|
|
79
|
-
.chart-wrapper__container {
|
|
80
|
-
position: relative;
|
|
81
|
-
}
|
|
82
|
-
.chart-wrapper__spinner-container {
|
|
83
|
-
position: absolute;
|
|
84
|
-
top: 0;
|
|
85
|
-
left: 0;
|
|
86
|
-
width: 100%;
|
|
87
|
-
height: 100%;
|
|
88
|
-
display: grid;
|
|
89
|
-
align-content: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
place-content: center;
|
|
92
|
-
}
|
|
93
|
-
`;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* A wrapper element for charts.
|
|
97
|
-
* @tagname leu-chart-wrapper
|
|
98
|
-
* @slot title - The title of the chart. Use a heading tag (h2-4) depending on your context.
|
|
99
|
-
* @slot description - A description of the chart. Content is wrapped in a `<p>` tag by the component.
|
|
100
|
-
* @slot chart - The actual chart
|
|
101
|
-
* @slot caption - A caption for the chart, e.g. a source or explanation of the data.
|
|
102
|
-
* @slot download - A download button or dropdown to export the chart in different formats.
|
|
103
|
-
*/
|
|
104
|
-
class LeuChartWrapper extends LeuElement {
|
|
105
|
-
constructor() {
|
|
106
|
-
super(...arguments);
|
|
107
|
-
/**
|
|
108
|
-
* Whether the chart is currently loading or not.
|
|
109
|
-
* When set to `true`, a spinner will be shown in the chart container.
|
|
110
|
-
*/
|
|
111
|
-
this.pending = false;
|
|
112
|
-
this.hasSlotController = new HasSlotController(this, [
|
|
113
|
-
"description",
|
|
114
|
-
"caption",
|
|
115
|
-
"download",
|
|
116
|
-
]);
|
|
117
|
-
}
|
|
118
|
-
render() {
|
|
119
|
-
const hasDescription = this.hasSlotController.test("description");
|
|
120
|
-
const hasCaption = this.hasSlotController.test("caption");
|
|
121
|
-
const hasDownload = this.hasSlotController.test("download");
|
|
122
|
-
return html `
|
|
123
|
-
<figure class="chart-wrapper">
|
|
124
|
-
<slot name="title" class="chart-wrapper__title"></slot>
|
|
125
|
-
${hasDescription
|
|
126
|
-
? html `<slot
|
|
127
|
-
name="description"
|
|
128
|
-
class="chart-wrapper__description"
|
|
129
|
-
></slot>`
|
|
130
|
-
: nothing}
|
|
131
|
-
<div class="chart-wrapper__container">
|
|
132
|
-
<slot name="chart" class="chart-wrapper__chart"></slot>
|
|
133
|
-
${this.pending
|
|
134
|
-
? html `<div class="chart-wrapper__spinner-container">
|
|
135
|
-
<leu-spinner class="chart-wrapper__spinner"></leu-spinner>
|
|
136
|
-
</div>`
|
|
137
|
-
: nothing}
|
|
138
|
-
</div>
|
|
139
|
-
${hasCaption
|
|
140
|
-
? html `<figcaption>
|
|
141
|
-
<slot name="caption" class="chart-wrapper__caption"></slot>
|
|
142
|
-
</figcaption>`
|
|
143
|
-
: nothing}
|
|
144
|
-
<hr class="chart-wrapper__ruler" />
|
|
145
|
-
${hasDownload
|
|
146
|
-
? html `<slot name="download" class="chart-wrapper__download"></slot>`
|
|
147
|
-
: nothing}
|
|
148
|
-
</figure>
|
|
149
|
-
`;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
LeuChartWrapper.styles = [LeuElement.styles, css_248z];
|
|
153
|
-
LeuChartWrapper.shadowRootOptions = {
|
|
154
|
-
...LeuElement.shadowRootOptions,
|
|
155
|
-
delegatesFocus: true,
|
|
156
|
-
};
|
|
157
|
-
LeuChartWrapper.dependencies = {
|
|
158
|
-
"leu-spinner": LeuSpinner,
|
|
159
|
-
};
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ type: Boolean, reflect: true })
|
|
162
|
-
], LeuChartWrapper.prototype, "pending", void 0);
|
|
163
|
-
|
|
1
|
+
import "./LeuElement-BeFrgKes.js";
|
|
2
|
+
import "./Spinner-DDTqijTO.js";
|
|
3
|
+
import { t as LeuChartWrapper } from "./ChartWrapper-CSMFwz9e.js";
|
|
164
4
|
export { LeuChartWrapper };
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
+
import { t as LeuIcon } from "./Icon-C_yYuynf.js";
|
|
4
|
+
import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
|
|
5
|
+
import { css, html } from "lit";
|
|
6
|
+
import { property } from "lit/decorators.js";
|
|
7
|
+
//#region src/components/checkbox/checkbox.css?inline
|
|
8
|
+
var checkbox_default = css`:host {
|
|
9
|
+
--checkbox-color: var(--leu-color-black-40);
|
|
10
|
+
--checkbox-color-disabled: var(--leu-color-black-20);
|
|
11
|
+
--checkbox-color-focus: var(--leu-color-func-cyan);
|
|
12
|
+
|
|
13
|
+
--checkbox-label-color: var(--leu-color-black-100);
|
|
14
|
+
--checkbox-label-color-disabled: var(--checkbox-color-disabled);
|
|
15
|
+
|
|
16
|
+
--checkbox-tick-color: var(--leu-color-black-0);
|
|
17
|
+
|
|
18
|
+
--checkbox-font-regular: var(--leu-font-family-regular);
|
|
19
|
+
|
|
20
|
+
position: relative;
|
|
21
|
+
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
gap: 0.5rem;
|
|
25
|
+
|
|
26
|
+
font-family: var(--checkbox-font-regular);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.checkbox {
|
|
30
|
+
--_length: 1.5rem;
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
-moz-appearance: none;
|
|
33
|
+
appearance: none;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
|
|
36
|
+
width: 1.5rem;
|
|
37
|
+
|
|
38
|
+
width: var(--_length);
|
|
39
|
+
height: 1.5rem;
|
|
40
|
+
height: var(--_length);
|
|
41
|
+
margin: 0;
|
|
42
|
+
|
|
43
|
+
border: 2px solid var(--checkbox-color);
|
|
44
|
+
border-radius: 2px;
|
|
45
|
+
|
|
46
|
+
flex: 1 0 1.5rem;
|
|
47
|
+
|
|
48
|
+
flex: 1 0 var(--_length);
|
|
49
|
+
|
|
50
|
+
display: grid;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-items: center;
|
|
53
|
+
place-items: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.checkbox:checked {
|
|
57
|
+
background-color: var(--checkbox-color);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.checkbox:checked {
|
|
61
|
+
--checkbox-color: var(--checkbox-color-focus);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.checkbox:hover, .checkbox:focus {
|
|
65
|
+
--checkbox-color: var(--checkbox-color-focus);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.checkbox:focus-visible {
|
|
69
|
+
outline: 2px solid var(--checkbox-color-focus);
|
|
70
|
+
outline-offset: 2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.checkbox:disabled {
|
|
74
|
+
--checkbox-color: var(--checkbox-color-disabled);
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.label {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
color: var(--checkbox-label-color);
|
|
81
|
+
font-size: 1rem;
|
|
82
|
+
line-height: 1.5;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.checkbox:disabled + .label {
|
|
86
|
+
--checkbox-label-color: var(--checkbox-label-color-disabled);
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.checkbox:required + .label::after {
|
|
91
|
+
content: "*";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.icon {
|
|
95
|
+
position: absolute;
|
|
96
|
+
display: block;
|
|
97
|
+
top: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
color: var(--checkbox-tick-color);
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/checkbox/Checkbox.ts
|
|
105
|
+
/**
|
|
106
|
+
* @tagname leu-checkbox
|
|
107
|
+
*/
|
|
108
|
+
var LeuCheckbox = class extends FormAssociatedMixin(LeuElement) {
|
|
109
|
+
constructor(..._args) {
|
|
110
|
+
super(..._args);
|
|
111
|
+
this.required = false;
|
|
112
|
+
this.defaultChecked = false;
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.dependencies = { "leu-icon": LeuIcon };
|
|
116
|
+
}
|
|
117
|
+
static {
|
|
118
|
+
this.styles = [LeuElement.styles, checkbox_default];
|
|
119
|
+
}
|
|
120
|
+
static {
|
|
121
|
+
this.shadowRootOptions = {
|
|
122
|
+
...LeuElement.shadowRootOptions,
|
|
123
|
+
delegatesFocus: true
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
set checked(isChecked) {
|
|
127
|
+
this._checked = isChecked;
|
|
128
|
+
}
|
|
129
|
+
get checked() {
|
|
130
|
+
if (typeof this._checked === "boolean") return this._checked;
|
|
131
|
+
return this.defaultChecked;
|
|
132
|
+
}
|
|
133
|
+
willUpdate(changedProperties) {
|
|
134
|
+
super.willUpdate(changedProperties);
|
|
135
|
+
let checkedChanged = false;
|
|
136
|
+
if (changedProperties.has("defaultChecked") && !changedProperties.has("checked") && !this.hasInteracted) {
|
|
137
|
+
this.checked = this.defaultChecked;
|
|
138
|
+
checkedChanged = true;
|
|
139
|
+
}
|
|
140
|
+
if (checkedChanged || changedProperties.has("checked") || changedProperties.has("value") || changedProperties.has("name") || changedProperties.has("disabled")) this.setFormValue();
|
|
141
|
+
}
|
|
142
|
+
handleChange(event) {
|
|
143
|
+
this.hasInteracted = true;
|
|
144
|
+
this.checked = event.target.checked;
|
|
145
|
+
const customEvent = new CustomEvent(event.type, event);
|
|
146
|
+
this.dispatchEvent(customEvent);
|
|
147
|
+
}
|
|
148
|
+
handleInput(event) {
|
|
149
|
+
this.hasInteracted = true;
|
|
150
|
+
this.checked = event.target.checked;
|
|
151
|
+
}
|
|
152
|
+
formResetCallback() {
|
|
153
|
+
this.checked = this.defaultChecked;
|
|
154
|
+
super.formResetCallback();
|
|
155
|
+
}
|
|
156
|
+
setFormValue() {
|
|
157
|
+
this.internals.setFormValue(this.checked && !this.disabled ? this.value ?? "on" : null);
|
|
158
|
+
if (this.required && !this.checked) this.internals.setValidity({ valueMissing: true }, "Bitte klicken Sie dieses Kästchen an, um fortfahren zu können.");
|
|
159
|
+
else this.internals.setValidity({});
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
return html`
|
|
163
|
+
<input
|
|
164
|
+
id="checkbox"
|
|
165
|
+
class="checkbox"
|
|
166
|
+
type="checkbox"
|
|
167
|
+
name="${this.name}"
|
|
168
|
+
@change=${this.handleChange}
|
|
169
|
+
@input=${this.handleInput}
|
|
170
|
+
.checked=${this.checked}
|
|
171
|
+
?disabled=${this.disabled}
|
|
172
|
+
.value=${this.value}
|
|
173
|
+
?required=${this.required}
|
|
174
|
+
/>
|
|
175
|
+
<label for="checkbox" class="label"><slot></slot></label>
|
|
176
|
+
<leu-icon class="icon" name="check"></leu-icon>
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
__decorate([property({
|
|
181
|
+
type: Boolean,
|
|
182
|
+
reflect: true
|
|
183
|
+
})], LeuCheckbox.prototype, "required", void 0);
|
|
184
|
+
__decorate([property({
|
|
185
|
+
type: Boolean,
|
|
186
|
+
reflect: true,
|
|
187
|
+
attribute: "checked"
|
|
188
|
+
})], LeuCheckbox.prototype, "defaultChecked", void 0);
|
|
189
|
+
__decorate([property({
|
|
190
|
+
type: Boolean,
|
|
191
|
+
attribute: false
|
|
192
|
+
})], LeuCheckbox.prototype, "checked", null);
|
|
193
|
+
__decorate([property({
|
|
194
|
+
type: String,
|
|
195
|
+
reflect: true
|
|
196
|
+
})], LeuCheckbox.prototype, "value", void 0);
|
|
197
|
+
//#endregion
|
|
198
|
+
export { LeuCheckbox as t };
|