@statistikzh/leu 0.24.1 → 0.25.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/.github/workflows/publish.yml +1 -8
- 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/dist/Accordion-CDNyrB8d.js +241 -0
- package/dist/Accordion.d.ts +44 -44
- package/dist/Accordion.js +2 -249
- package/dist/Button-DSGPIcjm.d.ts +93 -0
- package/dist/Button-EdS9xr2J.js +524 -0
- package/dist/Button.d.ts +2 -85
- package/dist/Button.js +4 -504
- package/dist/ButtonGroup-BQqf8o_d.js +88 -0
- package/dist/ButtonGroup.d.ts +19 -19
- package/dist/ButtonGroup.js +5 -101
- package/dist/ChartWrapper-LiNHTNRw.js +158 -0
- package/dist/ChartWrapper.d.ts +26 -26
- package/dist/ChartWrapper.js +3 -163
- package/dist/Checkbox-BtDWmPab.js +198 -0
- package/dist/Checkbox.d.ts +35 -27
- package/dist/Checkbox.js +4 -157
- package/dist/CheckboxGroup-C8MbwW9u.js +81 -0
- package/dist/CheckboxGroup.d.ts +18 -18
- package/dist/CheckboxGroup.js +5 -82
- package/dist/Chip-Ch09jjYi.js +171 -0
- package/dist/Chip-DLKM9P7v.d.ts +18 -0
- package/dist/Chip.d.ts +2 -18
- package/dist/Chip.js +2 -166
- package/dist/ChipGroup-PvqVW-tm.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-CV1JTkCn.js +241 -0
- package/dist/Dialog.d.ts +28 -28
- package/dist/Dialog.js +3 -240
- package/dist/Dropdown-DpFdFbA1.js +155 -0
- package/dist/Dropdown.d.ts +39 -41
- package/dist/Dropdown.js +8 -157
- package/dist/FileInput-5apX17JT.js +344 -0
- package/dist/FileInput.d.ts +56 -57
- package/dist/FileInput.js +6 -383
- package/dist/FormAssociatedMixin-BbFlza53.js +58 -0
- package/dist/FormAssociatedMixin-Cc74LjbC.d.ts +22 -0
- package/dist/Icon-DhAvH0XM.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-CnEz-2dK.js +610 -0
- package/dist/Input-D2THgo7c.d.ts +169 -0
- package/dist/Input.d.ts +2 -166
- package/dist/Input.js +4 -626
- package/dist/LeuElement-B7NJzWwP.js +46 -0
- package/dist/LeuElement-pJFU18Xm.d.ts +11 -0
- package/dist/Menu-CQdx1ef3.d.ts +43 -0
- package/dist/Menu-DpiheIPk.js +136 -0
- package/dist/Menu.d.ts +2 -44
- package/dist/Menu.js +4 -157
- package/dist/MenuItem-CZTqGg5R.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-J4Kj7yHE.js +252 -0
- package/dist/Message.d.ts +53 -53
- package/dist/Message.js +3 -267
- package/dist/Pagination-Be8TcBoC.d.ts +76 -0
- package/dist/Pagination-CWqgusWZ.js +226 -0
- package/dist/Pagination.d.ts +2 -76
- package/dist/Pagination.js +6 -240
- package/dist/Placeholder-DMN6sMbp.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-JQjuj26v.js +195 -0
- package/dist/Popup.d.ts +2 -62
- package/dist/Popup.js +2 -233
- package/dist/ProgressBar-CzN3fqiH.js +167 -0
- package/dist/ProgressBar.d.ts +21 -21
- package/dist/ProgressBar.js +2 -165
- package/dist/Radio-CX8aCsff.js +160 -0
- package/dist/Radio.d.ts +22 -22
- package/dist/Radio.js +2 -151
- package/dist/RadioGroup-CgEWQnC4.js +171 -0
- package/dist/RadioGroup.d.ts +35 -35
- package/dist/RadioGroup.js +3 -182
- package/dist/Range-DoW_ZdKm.js +496 -0
- package/dist/Range.d.ts +112 -112
- package/dist/Range.js +2 -586
- package/dist/ScrollTop-DxChetWq.js +130 -0
- package/dist/ScrollTop.d.ts +21 -21
- package/dist/ScrollTop.js +5 -118
- package/dist/Select-BCx79gOH.js +618 -0
- package/dist/Select.d.ts +130 -132
- package/dist/Select.js +9 -675
- package/dist/Spinner-CMo_o6Fy.d.ts +14 -0
- package/dist/Spinner-DJR4gv3Y.js +56 -0
- package/dist/Spinner.d.ts +2 -14
- package/dist/Spinner.js +2 -52
- package/dist/Table-DZz1ic3j.js +392 -0
- package/dist/Table.d.ts +61 -63
- package/dist/Table.js +7 -427
- package/dist/Tag-DsZS_8pl.js +76 -0
- package/dist/Tag.d.ts +8 -8
- package/dist/Tag.js +2 -74
- package/dist/VisuallyHidden-BkllVjlz.js +29 -0
- package/dist/VisuallyHidden-OeQvhxYn.d.ts +13 -0
- package/dist/VisuallyHidden.d.ts +2 -13
- package/dist/VisuallyHidden.js +2 -25
- package/dist/decorate-DwpAc4D0.js +9 -0
- package/dist/hasSlotController-BLtZurRh.d.ts +19 -0
- package/dist/hasSlotController-DjdfnOQp.js +38 -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 +7 -12
- package/dist/leu-button.d.ts +7 -11
- package/dist/leu-button.js +6 -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 +10 -17
- package/dist/leu-file-input.d.ts +7 -13
- package/dist/leu-file-input.js +8 -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 +8 -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 +7 -13
- package/dist/leu-select.d.ts +7 -19
- package/dist/leu-select.js +11 -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 +9 -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/theme.css +1 -0
- package/dist/utils-hfk5Nwy8.js +28 -0
- package/dist/vscode.html-custom-data.json +43 -49
- package/dist/vue/index.d.ts +54 -60
- package/dist/web-types.json +89 -105
- package/eslint.config.mjs +79 -0
- package/package.json +45 -62
- 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 +62 -3
- package/src/components/button/test/button.test.ts +185 -7
- 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/scroll-top/scroll-top.css +20 -4
- 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/src/styles/theme.css +1 -0
- 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-jrR2M5pZ.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
|
@@ -7,7 +7,6 @@ on:
|
|
|
7
7
|
- "leu-v*"
|
|
8
8
|
|
|
9
9
|
permissions:
|
|
10
|
-
id-token: write # Required for OIDC
|
|
11
10
|
contents: read
|
|
12
11
|
|
|
13
12
|
jobs:
|
|
@@ -22,16 +21,10 @@ jobs:
|
|
|
22
21
|
cache: "npm"
|
|
23
22
|
registry-url: "https://registry.npmjs.org"
|
|
24
23
|
|
|
25
|
-
- name: Clear auth token for OIDC
|
|
26
|
-
run: echo "NODE_AUTH_TOKEN=" >> $GITHUB_ENV
|
|
27
|
-
|
|
28
|
-
- name: Upgrade npm for OIDC
|
|
29
|
-
run: npm install -g npm@latest
|
|
30
|
-
|
|
31
24
|
- run: npm --version
|
|
32
25
|
- run: npm ci
|
|
33
26
|
- run: npm run build
|
|
34
27
|
- name: Publish to npm
|
|
35
28
|
env:
|
|
36
|
-
|
|
29
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
30
|
run: npm publish
|
package/.storybook/main.ts
CHANGED
|
@@ -1,69 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import rollupTypescript from "rollup-plugin-typescript2"
|
|
4
|
-
import { StorybookConfig } from "@web/storybook-framework-web-components"
|
|
1
|
+
import { defineMain } from "@storybook/web-components-vite/node"
|
|
2
|
+
import { commonConfig } from "../tsdown.config.ts"
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { plugins as rollupPlugins } from "../rollup.config.js"
|
|
9
|
-
|
|
10
|
-
const config: StorybookConfig = {
|
|
4
|
+
export default defineMain({
|
|
11
5
|
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
12
6
|
addons: [
|
|
13
|
-
"@storybook/addon-essentials",
|
|
14
7
|
"@storybook/addon-designs",
|
|
15
8
|
"@whitespace/storybook-addon-html",
|
|
16
9
|
"@storybook/addon-a11y",
|
|
10
|
+
"@storybook/addon-docs",
|
|
17
11
|
],
|
|
18
12
|
staticDirs: ["static"],
|
|
19
|
-
framework:
|
|
20
|
-
name: "@web/storybook-framework-web-components",
|
|
21
|
-
},
|
|
13
|
+
framework: "@storybook/web-components-vite",
|
|
22
14
|
docs: {},
|
|
23
15
|
core: {
|
|
24
|
-
disableTelemetry: true,
|
|
16
|
+
disableTelemetry: true,
|
|
25
17
|
},
|
|
26
18
|
previewHead: (head) => {
|
|
27
|
-
/**
|
|
28
|
-
* Workaround to get the build process working
|
|
29
|
-
* @web/storybook-builder sets `extractAssets: true`
|
|
30
|
-
* for the rollup html plugin. But the same path doesn't
|
|
31
|
-
* work in th development environment.
|
|
32
|
-
* */
|
|
33
|
-
const basePath =
|
|
34
|
-
process.env.NODE_ENV === "production" ? ".storybook/static/" : ""
|
|
35
19
|
return `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
async wdsFinal(config) {
|
|
42
|
-
config.open = false
|
|
43
|
-
return config
|
|
20
|
+
${head}
|
|
21
|
+
<link rel="stylesheet" href="fonts.css" />
|
|
22
|
+
<link rel="stylesheet" href="theme.css" />
|
|
23
|
+
`
|
|
44
24
|
},
|
|
45
|
-
async
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
tsconfig: fileURLToPath(
|
|
49
|
-
new URL("../tsconfig.build.json", import.meta.url),
|
|
50
|
-
),
|
|
51
|
-
tsconfigOverride: {
|
|
52
|
-
compilerOptions: {
|
|
53
|
-
declarationMap: false,
|
|
54
|
-
emitDeclarationOnly: false,
|
|
55
|
-
declaration: false,
|
|
56
|
-
noEmit: false,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
}),
|
|
60
|
-
...config.plugins,
|
|
61
|
-
...rollupPlugins.map((p) => p.plugin(...p.args)),
|
|
62
|
-
rollupCommonjs(),
|
|
63
|
-
rollupJson(),
|
|
64
|
-
]
|
|
25
|
+
async viteFinal(config) {
|
|
26
|
+
/* eslint-disable-next-line import-x/no-extraneous-dependencies */
|
|
27
|
+
const { mergeConfig } = await import("vite")
|
|
65
28
|
|
|
66
|
-
return config
|
|
29
|
+
return mergeConfig(config, {
|
|
30
|
+
plugins: [...commonConfig.plugins],
|
|
31
|
+
define: commonConfig.define,
|
|
32
|
+
})
|
|
67
33
|
},
|
|
68
|
-
}
|
|
69
|
-
export default config
|
|
34
|
+
})
|
package/.storybook/manager.ts
CHANGED
package/.storybook/preview.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/** @type { import('@storybook/web-components').Preview } */
|
|
2
2
|
|
|
3
|
-
import { setCustomElementsManifest } from "@storybook/web-components"
|
|
3
|
+
import { setCustomElementsManifest } from "@storybook/web-components-vite"
|
|
4
4
|
import customElemenents from "../dist/custom-elements.json"
|
|
5
5
|
|
|
6
6
|
setCustomElementsManifest(customElemenents)
|
|
7
7
|
|
|
8
8
|
const preview = {
|
|
9
9
|
tags: ["autodocs"],
|
|
10
|
+
|
|
10
11
|
parameters: {
|
|
11
12
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
12
13
|
controls: {
|
|
@@ -25,7 +26,7 @@ const preview = {
|
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
28
|
viewport: {
|
|
28
|
-
|
|
29
|
+
options: [
|
|
29
30
|
{
|
|
30
31
|
name: "Micro",
|
|
31
32
|
styles: { width: "320px", height: "568px" },
|
|
@@ -59,29 +60,35 @@ const preview = {
|
|
|
59
60
|
],
|
|
60
61
|
},
|
|
61
62
|
backgrounds: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{ name: "light", value: "#
|
|
65
|
-
{ name: "
|
|
66
|
-
{ name: "
|
|
67
|
-
{ name: "
|
|
68
|
-
{ name: "
|
|
69
|
-
{ name: "
|
|
70
|
-
{ name: "
|
|
71
|
-
{ name: "
|
|
72
|
-
{ name: "
|
|
73
|
-
|
|
74
|
-
],
|
|
63
|
+
options: {
|
|
64
|
+
light: { name: "light", value: "#fffffe" },
|
|
65
|
+
light_grey: { name: "light grey", value: "#f7f7f7" },
|
|
66
|
+
blue: { name: "blue", value: "#0076bd" },
|
|
67
|
+
darkblue: { name: "darkblue", value: "#00407c" },
|
|
68
|
+
turquoise: { name: "turquoise", value: "#00797b" },
|
|
69
|
+
green: { name: "green", value: "#1a7f1f" },
|
|
70
|
+
bordeaux: { name: "bordeaux", value: "#b01657" },
|
|
71
|
+
magenta: { name: "magenta", value: "#d40053" },
|
|
72
|
+
violet: { name: "violet", value: "#7f3da7" },
|
|
73
|
+
gray: { name: "gray", value: "#666666" },
|
|
74
|
+
},
|
|
75
75
|
},
|
|
76
76
|
html: {
|
|
77
77
|
root: "#root-inner",
|
|
78
|
+
removeComments: /\?lit\$[0-9]+\$/,
|
|
79
|
+
removeEmptyComments: true,
|
|
78
80
|
prettier: {
|
|
79
81
|
tabWidth: 2,
|
|
80
82
|
useTabs: false,
|
|
81
|
-
removeComments: true,
|
|
82
83
|
},
|
|
83
84
|
},
|
|
84
85
|
},
|
|
86
|
+
|
|
87
|
+
initialGlobals: {
|
|
88
|
+
backgrounds: {
|
|
89
|
+
value: "light",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
export default preview
|
package/.storybook/theme.ts
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.25.0](https://github.com/statistikZH/leu/compare/leu-v0.24.2...leu-v0.25.0) (2026-03-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **button:** define as form-associated custom element ([4c4f782](https://github.com/statistikZH/leu/commit/4c4f782be1dbfa10aed1b1ada7e40afdcf5af5db))
|
|
9
|
+
* **checkbox:** define as form-associated custom element ([4c4f782](https://github.com/statistikZH/leu/commit/4c4f782be1dbfa10aed1b1ada7e40afdcf5af5db))
|
|
10
|
+
* **radio:** define as form-associated custom element ([4c4f782](https://github.com/statistikZH/leu/commit/4c4f782be1dbfa10aed1b1ada7e40afdcf5af5db))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* update dependencies ([004db11](https://github.com/statistikZH/leu/commit/004db111c3f2b0a5aba7faccfb2d71eca653d188))
|
|
16
|
+
|
|
17
|
+
## [0.24.2](https://github.com/statistikZH/leu/compare/leu-v0.24.1...leu-v0.24.2) (2026-03-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **scroll-top:** use same gap for vertical and horizontal alignment ([f5e6d6f](https://github.com/statistikZH/leu/commit/f5e6d6f76c61d234efbe880c0cf5810a9b6b20dd))
|
|
23
|
+
|
|
3
24
|
## [0.24.1](https://github.com/statistikZH/leu/compare/leu-v0.24.0...leu-v0.24.1) (2026-02-12)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
+
import { css, nothing } from "lit";
|
|
4
|
+
import { html as html$1, unsafeStatic } from "lit/static-html.js";
|
|
5
|
+
import { property } from "lit/decorators.js";
|
|
6
|
+
//#region src/components/accordion/accordion.css?inline
|
|
7
|
+
var accordion_default = css`:host {
|
|
8
|
+
--accordion-font-regular: var(--leu-font-family-regular);
|
|
9
|
+
--accordion-font-black: var(--leu-font-family-black);
|
|
10
|
+
|
|
11
|
+
--accordion-toggle-font: var(--accordion-font-black);
|
|
12
|
+
|
|
13
|
+
--label-color: var(--leu-color-black-60);
|
|
14
|
+
--label-color-active: var(--leu-color-black-100);
|
|
15
|
+
|
|
16
|
+
--divider-color: var(--leu-color-black-20);
|
|
17
|
+
--divider-color-active: var(--leu-color-black-100);
|
|
18
|
+
|
|
19
|
+
--transition: 0.1s ease;
|
|
20
|
+
|
|
21
|
+
font-family: var(--accordion-font-regular);
|
|
22
|
+
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.heading {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
.button {
|
|
29
|
+
width: 100%;
|
|
30
|
+
background: none;
|
|
31
|
+
padding: 1rem 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
|
|
35
|
+
border: none;
|
|
36
|
+
|
|
37
|
+
color: var(--label-color);
|
|
38
|
+
font-family: var(--accordion-toggle-font);
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
line-height: 1.5rem;
|
|
41
|
+
text-align: left;
|
|
42
|
+
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 0.25rem;
|
|
45
|
+
|
|
46
|
+
transition: color var(--transition);
|
|
47
|
+
}
|
|
48
|
+
@media (min-width: 600px) {
|
|
49
|
+
.button {
|
|
50
|
+
font-size: 1.125rem;
|
|
51
|
+
gap: 0.8rem;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
@media (min-width: 1280px) {
|
|
55
|
+
.button {
|
|
56
|
+
font-size: 1.25rem;
|
|
57
|
+
line-height: 1.625rem;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
.button:focus-visible {
|
|
61
|
+
outline: 2px solid var(--leu-color-func-cyan);
|
|
62
|
+
outline-offset: 4px;
|
|
63
|
+
}
|
|
64
|
+
.button:hover,
|
|
65
|
+
.button:focus-visible,
|
|
66
|
+
:host([open]) .button {
|
|
67
|
+
color: var(--label-color-active);
|
|
68
|
+
}
|
|
69
|
+
.plus {
|
|
70
|
+
position: relative;
|
|
71
|
+
flex: 0 0 1rem;
|
|
72
|
+
aspect-ratio: 1;
|
|
73
|
+
align-self: center;
|
|
74
|
+
margin-left: 0.5rem;
|
|
75
|
+
margin-right: 0.5rem;
|
|
76
|
+
}
|
|
77
|
+
.plus::before,
|
|
78
|
+
.plus::after {
|
|
79
|
+
content: "";
|
|
80
|
+
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: calc(50% - 0.0625rem);
|
|
83
|
+
left: 0;
|
|
84
|
+
|
|
85
|
+
display: block;
|
|
86
|
+
width: 1rem;
|
|
87
|
+
height: 0.125rem;
|
|
88
|
+
aspect-ratio: 1 / 0.125;
|
|
89
|
+
background-color: currentcolor;
|
|
90
|
+
transition: transform var(--transition);
|
|
91
|
+
}
|
|
92
|
+
.plus::before {
|
|
93
|
+
transform: rotate(90deg);
|
|
94
|
+
}
|
|
95
|
+
:host([open]) .plus::before {
|
|
96
|
+
transform: rotate(180deg);
|
|
97
|
+
}
|
|
98
|
+
.label {
|
|
99
|
+
display: block;
|
|
100
|
+
flex-grow: 1;
|
|
101
|
+
}
|
|
102
|
+
.contentwrapper {
|
|
103
|
+
display: grid;
|
|
104
|
+
grid-template-rows: 1fr;
|
|
105
|
+
transition: grid-template-rows var(--transition);
|
|
106
|
+
}
|
|
107
|
+
.content {
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
}
|
|
110
|
+
.contentwrapper[hidden] {
|
|
111
|
+
grid-template-rows: 0fr;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
visibility: hidden;
|
|
114
|
+
}
|
|
115
|
+
slot[name="content"] {
|
|
116
|
+
display: block;
|
|
117
|
+
padding: 0.5rem 0 1.5rem;
|
|
118
|
+
}
|
|
119
|
+
@media (min-width: 840px) {
|
|
120
|
+
slot[name="content"] {
|
|
121
|
+
padding: 0.75rem 0 1.5rem;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
@media (min-width: 1280px) {
|
|
125
|
+
slot[name="content"] {
|
|
126
|
+
padding: 1rem 0 2.5rem;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
.divider {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 1px;
|
|
132
|
+
margin: 0;
|
|
133
|
+
|
|
134
|
+
border: none;
|
|
135
|
+
background-color: var(--divider-color);
|
|
136
|
+
|
|
137
|
+
transition:
|
|
138
|
+
transform var(--transition), background-color var(--transition);
|
|
139
|
+
}
|
|
140
|
+
:host(:not([open])) .heading:hover ~ .divider {
|
|
141
|
+
background-color: var(--divider-color-active);
|
|
142
|
+
transform: scaleY(3);
|
|
143
|
+
}
|
|
144
|
+
:host(:not([open])) .heading:focus-visible ~ .divider {
|
|
145
|
+
background-color: var(--divider-color-active);
|
|
146
|
+
transform: scaleY(3);
|
|
147
|
+
}
|
|
148
|
+
`;
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/components/accordion/Accordion.ts
|
|
151
|
+
/**
|
|
152
|
+
* @tagname leu-accordion
|
|
153
|
+
* @slot content - The content of the accordion. No styles will be applied to the content.
|
|
154
|
+
* @attr {number} heading-level - The heading level of the accordion title. Must be between 1 and 6.
|
|
155
|
+
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
156
|
+
*/
|
|
157
|
+
var LeuAccordion = class extends LeuElement {
|
|
158
|
+
constructor(..._args) {
|
|
159
|
+
super(..._args);
|
|
160
|
+
this.headingLevel = 2;
|
|
161
|
+
this.open = false;
|
|
162
|
+
this.label = "";
|
|
163
|
+
this.labelPrefix = "";
|
|
164
|
+
}
|
|
165
|
+
static {
|
|
166
|
+
this.styles = [LeuElement.styles, accordion_default];
|
|
167
|
+
}
|
|
168
|
+
static {
|
|
169
|
+
this.shadowRootOptions = {
|
|
170
|
+
...LeuElement.shadowRootOptions,
|
|
171
|
+
delegatesFocus: true
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Determines the heading tag of the accordion toggle.
|
|
176
|
+
* The headingLevel shouldn't be used directly to render the heading tag
|
|
177
|
+
* in order to avoid XSS issues.
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
180
|
+
_getHeadingTag() {
|
|
181
|
+
let level = 2;
|
|
182
|
+
if (this.headingLevel > 0 && this.headingLevel < 7) level = Math.floor(this.headingLevel);
|
|
183
|
+
return `h${level}`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Toggles the accordion open state.
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
_handleToggleClick() {
|
|
190
|
+
this.open = !this.open;
|
|
191
|
+
}
|
|
192
|
+
render() {
|
|
193
|
+
const hTag = this._getHeadingTag();
|
|
194
|
+
return html$1`<${unsafeStatic(hTag)} class="heading"><button
|
|
195
|
+
id="toggle"
|
|
196
|
+
type="button"
|
|
197
|
+
class="button"
|
|
198
|
+
aria-controls="contentwrapper"
|
|
199
|
+
aria-expanded="${this.open}"
|
|
200
|
+
@click=${this._handleToggleClick}
|
|
201
|
+
>
|
|
202
|
+
${this.labelPrefix ? html$1`<span class="label-prefix">${this.labelPrefix}</span>` : nothing}
|
|
203
|
+
<span class="label">${this.label}</span>
|
|
204
|
+
<div class="plus"></div>
|
|
205
|
+
</button></${unsafeStatic(hTag)}>
|
|
206
|
+
<div
|
|
207
|
+
id="contentwrapper"
|
|
208
|
+
class="contentwrapper"
|
|
209
|
+
?hidden=${!this.open}
|
|
210
|
+
aria-labelledby="toggle"
|
|
211
|
+
role="region"
|
|
212
|
+
>
|
|
213
|
+
<div
|
|
214
|
+
class="content"
|
|
215
|
+
>
|
|
216
|
+
<slot name="content"></slot>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
<hr class="divider" />`;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
__decorate([property({
|
|
223
|
+
type: Number,
|
|
224
|
+
attribute: "heading-level",
|
|
225
|
+
reflect: true
|
|
226
|
+
})], LeuAccordion.prototype, "headingLevel", void 0);
|
|
227
|
+
__decorate([property({
|
|
228
|
+
type: Boolean,
|
|
229
|
+
reflect: true
|
|
230
|
+
})], LeuAccordion.prototype, "open", void 0);
|
|
231
|
+
__decorate([property({
|
|
232
|
+
type: String,
|
|
233
|
+
reflect: true
|
|
234
|
+
})], LeuAccordion.prototype, "label", void 0);
|
|
235
|
+
__decorate([property({
|
|
236
|
+
type: String,
|
|
237
|
+
attribute: "label-prefix",
|
|
238
|
+
reflect: true
|
|
239
|
+
})], LeuAccordion.prototype, "labelPrefix", void 0);
|
|
240
|
+
//#endregion
|
|
241
|
+
export { LeuAccordion as t };
|
package/dist/Accordion.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
|
+
import * as lit_html0 from "lit-html";
|
|
4
3
|
|
|
4
|
+
//#region src/components/accordion/Accordion.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* @tagname leu-accordion
|
|
7
7
|
* @slot content - The content of the accordion. No styles will be applied to the content.
|
|
@@ -9,45 +9,45 @@ import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
|
9
9
|
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
10
10
|
*/
|
|
11
11
|
declare class LeuAccordion extends LeuElement {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
12
|
+
static styles: any[];
|
|
13
|
+
/** @internal */
|
|
14
|
+
static shadowRootOptions: {
|
|
15
|
+
delegatesFocus: boolean;
|
|
16
|
+
clonable?: boolean;
|
|
17
|
+
customElementRegistry?: CustomElementRegistry;
|
|
18
|
+
mode: ShadowRootMode;
|
|
19
|
+
serializable?: boolean;
|
|
20
|
+
slotAssignment?: SlotAssignmentMode;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The heading level of the accordion title. Must be between 1 and 6.
|
|
24
|
+
*/
|
|
25
|
+
headingLevel: number;
|
|
26
|
+
/**
|
|
27
|
+
* The expanded state of the accordion.
|
|
28
|
+
*/
|
|
29
|
+
open: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The label (title) of the accordion
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* The prefix of the accordion label. e.g. "01"
|
|
36
|
+
*/
|
|
37
|
+
labelPrefix: string;
|
|
38
|
+
/**
|
|
39
|
+
* Determines the heading tag of the accordion toggle.
|
|
40
|
+
* The headingLevel shouldn't be used directly to render the heading tag
|
|
41
|
+
* in order to avoid XSS issues.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
private _getHeadingTag;
|
|
45
|
+
/**
|
|
46
|
+
* Toggles the accordion open state.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
private _handleToggleClick;
|
|
50
|
+
render(): lit_html0.TemplateResult;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
export { LeuAccordion };
|
|
52
|
+
//#endregion
|
|
53
|
+
export { LeuAccordion };
|