@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
package/dist/Table.js
CHANGED
|
@@ -1,428 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import './_tslib-CNEFicEt.js';
|
|
9
|
-
import 'lit/decorators.js';
|
|
10
|
-
import 'lit/directives/live.js';
|
|
11
|
-
import './Button.js';
|
|
12
|
-
import 'lit/directives/if-defined.js';
|
|
13
|
-
import './hasSlotController-Bm2tipvG.js';
|
|
14
|
-
import './VisuallyHidden.js';
|
|
15
|
-
|
|
16
|
-
/* eslint-disable prefer-template,no-param-reassign,no-restricted-syntax,guard-for-in */
|
|
17
|
-
/**
|
|
18
|
-
* The original lit styleMap directive is not compatible with a strict style-src content security policy.
|
|
19
|
-
* There is an an open issue about this in the lit repository:
|
|
20
|
-
* https://github.com/lit/lit/issues/4719
|
|
21
|
-
*
|
|
22
|
-
* This file contains a custom implementation of the styleMap directive that bypasses
|
|
23
|
-
* the render method and directly updates the styles using the .style.setProperty and
|
|
24
|
-
* .style.removeProperty methods.
|
|
25
|
-
*
|
|
26
|
-
* In the original implementation, the render method returns a string that is set as the
|
|
27
|
-
* value of the style attribute. This approach is blocked by strict CSPs that disallow
|
|
28
|
-
* inline styles.
|
|
29
|
-
*
|
|
30
|
-
* As we don't support SSR in this library, we can safely skip the render method.
|
|
31
|
-
*/
|
|
32
|
-
const important = "important";
|
|
33
|
-
// The leading space is important
|
|
34
|
-
const importantFlag = " !" + important;
|
|
35
|
-
// How many characters to remove from a value, as a negative number
|
|
36
|
-
const flagTrim = 0 - importantFlag.length;
|
|
37
|
-
class StyleMapDirective extends Directive {
|
|
38
|
-
constructor(partInfo) {
|
|
39
|
-
super(partInfo);
|
|
40
|
-
if (partInfo.type !== PartType.ATTRIBUTE ||
|
|
41
|
-
partInfo.name !== "style" ||
|
|
42
|
-
partInfo.strings?.length > 2) {
|
|
43
|
-
throw new Error("The `styleMap` directive must be used in the `style` attribute " +
|
|
44
|
-
"and must be the only part in the attribute.");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
render(_styleInfo) {
|
|
48
|
-
return nothing;
|
|
49
|
-
}
|
|
50
|
-
update(part, [styleInfo]) {
|
|
51
|
-
const { style } = part.element;
|
|
52
|
-
if (this._previousStyleProperties === undefined) {
|
|
53
|
-
this._previousStyleProperties = new Set(Object.keys(styleInfo));
|
|
54
|
-
}
|
|
55
|
-
// Remove old properties that no longer exist in styleInfo
|
|
56
|
-
for (const name of this._previousStyleProperties) {
|
|
57
|
-
// If the name isn't in styleInfo or it's null/undefined
|
|
58
|
-
if (styleInfo[name] == null) {
|
|
59
|
-
this._previousStyleProperties.delete(name);
|
|
60
|
-
if (name.includes("-")) {
|
|
61
|
-
style.removeProperty(name);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
style[name] = null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Add or update properties
|
|
69
|
-
for (const name in styleInfo) {
|
|
70
|
-
const value = styleInfo[name];
|
|
71
|
-
if (value != null) {
|
|
72
|
-
this._previousStyleProperties.add(name);
|
|
73
|
-
const isImportant = typeof value === "string" && value.endsWith(importantFlag);
|
|
74
|
-
if (name.includes("-") || isImportant) {
|
|
75
|
-
style.setProperty(name, isImportant
|
|
76
|
-
? value.slice(0, flagTrim)
|
|
77
|
-
: value, isImportant ? important : "");
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
style[name] = value;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return noChange;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* !A custom implementation of lit's `styleMap` directive!
|
|
89
|
-
* A directive that applies CSS properties to an element.
|
|
90
|
-
*
|
|
91
|
-
* `styleMap` can only be used in the `style` attribute and must be the only
|
|
92
|
-
* expression in the attribute. It takes the property names in the
|
|
93
|
-
* {@link StyleInfo styleInfo} object and adds the properties to the inline
|
|
94
|
-
* style of the element.
|
|
95
|
-
*
|
|
96
|
-
* Property names with dashes (`-`) are assumed to be valid CSS
|
|
97
|
-
* property names and set on the element's style object using `setProperty()`.
|
|
98
|
-
* Names without dashes are assumed to be camelCased JavaScript property names
|
|
99
|
-
* and set on the element's style object using property assignment, allowing the
|
|
100
|
-
* style object to translate JavaScript-style names to CSS property names.
|
|
101
|
-
*
|
|
102
|
-
* For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':
|
|
103
|
-
* '0'})` sets the `background-color`, `border-top` and `--size` properties.
|
|
104
|
-
*
|
|
105
|
-
* @param styleInfo
|
|
106
|
-
* @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}
|
|
107
|
-
*/
|
|
108
|
-
const styleMap = directive(StyleMapDirective);
|
|
109
|
-
|
|
110
|
-
var css_248z = css`:host {
|
|
111
|
-
position: relative;
|
|
112
|
-
display: block;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
div.scroll {
|
|
116
|
-
display: inline-block;
|
|
117
|
-
width: 100%;
|
|
118
|
-
overflow: auto;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
div.shadow {
|
|
122
|
-
position: absolute;
|
|
123
|
-
left: 0;
|
|
124
|
-
top: 0;
|
|
125
|
-
width: 100%;
|
|
126
|
-
height: 100%;
|
|
127
|
-
pointer-events: none;
|
|
128
|
-
z-index: 1;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
div.pagination {
|
|
132
|
-
height: calc(100% - 66px);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
table {
|
|
136
|
-
width: 100%;
|
|
137
|
-
border-spacing: 0;
|
|
138
|
-
color: rgba(0, 0, 0, 0.6);
|
|
139
|
-
font-size: 16px;
|
|
140
|
-
font-family: var(--leu-font-family-regular);
|
|
141
|
-
line-height: 1.5;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
td {
|
|
145
|
-
padding: 12px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
th {
|
|
149
|
-
padding: 16px 16px 8px;
|
|
150
|
-
text-align: left;
|
|
151
|
-
font-size: 12px;
|
|
152
|
-
font-weight: normal;
|
|
153
|
-
font-family: var(--leu-font-family-black);
|
|
154
|
-
background: var(--table-even-row-bg);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
td:first-child,
|
|
158
|
-
th:first-child {
|
|
159
|
-
left: 0;
|
|
160
|
-
background: inherit;
|
|
161
|
-
z-index: 1;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
tr {
|
|
165
|
-
background: #fff;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
tbody tr:nth-child(odd) {
|
|
169
|
-
background: var(--leu-color-black-5);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
button {
|
|
173
|
-
background: none;
|
|
174
|
-
cursor: pointer;
|
|
175
|
-
line-height: 1.5;
|
|
176
|
-
padding: 0;
|
|
177
|
-
border: 0;
|
|
178
|
-
font-size: inherit;
|
|
179
|
-
font-family: inherit;
|
|
180
|
-
color: inherit;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
button span {
|
|
184
|
-
vertical-align: bottom;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
button leu-icon {
|
|
188
|
-
--leu-icon-size: 1.25rem;
|
|
189
|
-
display: inline-block;
|
|
190
|
-
padding: 0;
|
|
191
|
-
opacity: 0;
|
|
192
|
-
vertical-align: bottom;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
button:hover leu-icon {
|
|
196
|
-
opacity: 1;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
button.active leu-icon {
|
|
200
|
-
color: var(--leu-color-accent-blue);
|
|
201
|
-
opacity: 1;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
table.sticky td:first-child,
|
|
205
|
-
table.sticky th:first-child {
|
|
206
|
-
position: sticky;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
div.shadow-left table.sticky td:first-child,
|
|
210
|
-
div.shadow-left table.sticky th:first-child {
|
|
211
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
|
|
212
|
-
clip-path: inset(0 -15px 0 0);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
div.shadow-left {
|
|
216
|
-
box-shadow: inset 5px 0 5px -5px rgba(0, 0, 0, 0.5);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
div.shadow-right {
|
|
220
|
-
box-shadow: inset -5px 0 5px -5px rgba(0, 0, 0, 0.5);
|
|
221
|
-
}
|
|
222
|
-
`;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* @tagname leu-table
|
|
226
|
-
*/
|
|
227
|
-
class LeuTable extends LeuElement {
|
|
228
|
-
constructor() {
|
|
229
|
-
super();
|
|
230
|
-
/** @type {array} */
|
|
231
|
-
this.columns = [];
|
|
232
|
-
/** @type {array} */
|
|
233
|
-
this.data = [];
|
|
234
|
-
/** @type {boolean} */
|
|
235
|
-
this.firstColumnSticky = false;
|
|
236
|
-
/** @type {number} */
|
|
237
|
-
this.itemsPerPage = null;
|
|
238
|
-
/** @type {number} */
|
|
239
|
-
this.sortIndex = null;
|
|
240
|
-
/** @type {boolean} */
|
|
241
|
-
this.sortOrderAsc = false;
|
|
242
|
-
/** @type {number} */
|
|
243
|
-
this.width = null;
|
|
244
|
-
/** @internal */
|
|
245
|
-
this._shadowLeft = false;
|
|
246
|
-
/** @internal */
|
|
247
|
-
this._shadowRight = false;
|
|
248
|
-
/** @internal */
|
|
249
|
-
this._scrollRef = createRef();
|
|
250
|
-
/** @internal */
|
|
251
|
-
this._page = 1;
|
|
252
|
-
this._resizeObserver = new ResizeObserver(() => {
|
|
253
|
-
this.shadowToggle(this._scrollRef.value);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
disconnectedCallback() {
|
|
257
|
-
this._resizeObserver.disconnect();
|
|
258
|
-
}
|
|
259
|
-
attributeChangedCallback(name, oldVal, newVal) {
|
|
260
|
-
super.attributeChangedCallback(name, oldVal, newVal);
|
|
261
|
-
if (name === "itemsperpage" || name === "data") {
|
|
262
|
-
this._page = 1;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
firstUpdated() {
|
|
266
|
-
this.shadowToggle(this._scrollRef.value);
|
|
267
|
-
this._resizeObserver.observe(this._scrollRef.value);
|
|
268
|
-
}
|
|
269
|
-
shadowToggle(target) {
|
|
270
|
-
this._shadowLeft = target.scrollLeftMax > 0 && target.scrollLeft > 0;
|
|
271
|
-
this._shadowRight =
|
|
272
|
-
target.scrollLeftMax > 0 && target.scrollLeft < target.scrollLeftMax;
|
|
273
|
-
}
|
|
274
|
-
scrollEvent(event) {
|
|
275
|
-
this.shadowToggle(event.target);
|
|
276
|
-
}
|
|
277
|
-
isOnePropNotValid() {
|
|
278
|
-
if (!this._columns) {
|
|
279
|
-
return "Der Parameter 'columns' ist erforderlich !";
|
|
280
|
-
}
|
|
281
|
-
if (!this._sortedData) {
|
|
282
|
-
return "Der Parameter 'data' ist erforderlich !";
|
|
283
|
-
}
|
|
284
|
-
return null;
|
|
285
|
-
}
|
|
286
|
-
isSorted(col) {
|
|
287
|
-
return this.sortIndex === this._columns.indexOf(col);
|
|
288
|
-
}
|
|
289
|
-
sortClick(col) {
|
|
290
|
-
const index = this._columns.indexOf(col);
|
|
291
|
-
if (this.sortIndex === index) {
|
|
292
|
-
this.sortOrderAsc = !this.sortOrderAsc;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
this.sortIndex = index;
|
|
296
|
-
this.sortOrderAsc = false;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
sortArrowIcon() {
|
|
300
|
-
return html `<leu-icon
|
|
301
|
-
name=${this.sortOrderAsc ? "arrowDown" : "arrowUp"}
|
|
302
|
-
></leu-icon>`;
|
|
303
|
-
}
|
|
304
|
-
get _columns() {
|
|
305
|
-
return this.columns;
|
|
306
|
-
}
|
|
307
|
-
get _sortedData() {
|
|
308
|
-
if (this.sortIndex === null || this.sortIndex === undefined) {
|
|
309
|
-
return this.data;
|
|
310
|
-
}
|
|
311
|
-
const col = this._columns[this.sortIndex];
|
|
312
|
-
return this.data.sort(this.sortOrderAsc ? col.sort.asc : col.sort.desc);
|
|
313
|
-
}
|
|
314
|
-
get _data() {
|
|
315
|
-
return this.itemsPerPage && this.itemsPerPage > 0
|
|
316
|
-
? this._sortedData.slice((this._page - 1) * this.itemsPerPage, this._page * this.itemsPerPage)
|
|
317
|
-
: this._sortedData;
|
|
318
|
-
}
|
|
319
|
-
render() {
|
|
320
|
-
const scrollClasses = {
|
|
321
|
-
scroll: true,
|
|
322
|
-
"shadow-left": this.firstColumnSticky && this._shadowLeft,
|
|
323
|
-
};
|
|
324
|
-
const shadowClassesLeft = {
|
|
325
|
-
shadow: true,
|
|
326
|
-
"shadow-left": !this.firstColumnSticky && this._shadowLeft,
|
|
327
|
-
pagination: this.itemsPerPage > 0,
|
|
328
|
-
};
|
|
329
|
-
const shadowClassesRight = {
|
|
330
|
-
shadow: true,
|
|
331
|
-
"shadow-right": this._shadowRight,
|
|
332
|
-
pagination: this.itemsPerPage > 0,
|
|
333
|
-
};
|
|
334
|
-
const stickyClass = {
|
|
335
|
-
sticky: this.firstColumnSticky,
|
|
336
|
-
};
|
|
337
|
-
function headerStyle(col) {
|
|
338
|
-
if (col.headerStyle) {
|
|
339
|
-
return styleMap({
|
|
340
|
-
...col.headerStyle(),
|
|
341
|
-
textAlign: col.align === "right" ? "right" : undefined,
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing;
|
|
345
|
-
}
|
|
346
|
-
function bodyStyle(col, row) {
|
|
347
|
-
if (col.style) {
|
|
348
|
-
return styleMap({
|
|
349
|
-
...col.style(row),
|
|
350
|
-
textAlign: col.align === "right" ? "right" : undefined,
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing;
|
|
354
|
-
}
|
|
355
|
-
return html `
|
|
356
|
-
<div
|
|
357
|
-
class=${classMap(scrollClasses)}
|
|
358
|
-
@scroll="${this.scrollEvent}"
|
|
359
|
-
ref=${ref(this._scrollRef)}
|
|
360
|
-
>
|
|
361
|
-
<table class=${classMap(stickyClass)}>
|
|
362
|
-
<thead>
|
|
363
|
-
<tr>
|
|
364
|
-
${this._columns.map((col) => html `<th style=${headerStyle(col)}>
|
|
365
|
-
${col.sort
|
|
366
|
-
? html `<button
|
|
367
|
-
@click=${(_) => this.sortClick(col)}
|
|
368
|
-
class=${this.isSorted(col) ? "active" : nothing}
|
|
369
|
-
>
|
|
370
|
-
${col.align === "right"
|
|
371
|
-
? this.sortArrowIcon()
|
|
372
|
-
: nothing}
|
|
373
|
-
<span>${col.name}</span>
|
|
374
|
-
${col.align !== "right"
|
|
375
|
-
? this.sortArrowIcon()
|
|
376
|
-
: nothing}
|
|
377
|
-
</button>`
|
|
378
|
-
: col.name}
|
|
379
|
-
</th>`)}
|
|
380
|
-
</tr>
|
|
381
|
-
</thead>
|
|
382
|
-
<tbody>
|
|
383
|
-
${this._data.map((row) => html `<tr>
|
|
384
|
-
${this._columns.map((col) => html `<td style=${bodyStyle(col, row)}>
|
|
385
|
-
${col.value(row)}
|
|
386
|
-
</td>`)}
|
|
387
|
-
</tr>`)}
|
|
388
|
-
</tbody>
|
|
389
|
-
</table>
|
|
390
|
-
<div class=${classMap(shadowClassesLeft)}></div>
|
|
391
|
-
<div class=${classMap(shadowClassesRight)}></div>
|
|
392
|
-
</div>
|
|
393
|
-
|
|
394
|
-
${this.itemsPerPage > 0
|
|
395
|
-
? html `
|
|
396
|
-
<leu-pagination
|
|
397
|
-
.numOfItems=${this._sortedData.length}
|
|
398
|
-
.itemsPerPage=${this.itemsPerPage}
|
|
399
|
-
page=${this._page}
|
|
400
|
-
@leu:pagechange=${(e) => {
|
|
401
|
-
this._page = e.detail.page;
|
|
402
|
-
}}
|
|
403
|
-
>
|
|
404
|
-
</leu-pagination>
|
|
405
|
-
`
|
|
406
|
-
: nothing}
|
|
407
|
-
`;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
LeuTable.dependencies = {
|
|
411
|
-
"leu-icon": LeuIcon,
|
|
412
|
-
"leu-pagination": LeuPagination,
|
|
413
|
-
};
|
|
414
|
-
LeuTable.styles = [LeuElement.styles, css_248z];
|
|
415
|
-
LeuTable.properties = {
|
|
416
|
-
columns: { type: Array },
|
|
417
|
-
data: { type: Array },
|
|
418
|
-
firstColumnSticky: { type: Boolean, reflect: true },
|
|
419
|
-
itemsPerPage: { type: Number, reflect: true },
|
|
420
|
-
sortIndex: { type: Number, reflect: true },
|
|
421
|
-
sortOrderAsc: { type: Boolean, reflect: true },
|
|
422
|
-
width: { type: Number, reflect: true },
|
|
423
|
-
_shadowLeft: { state: true },
|
|
424
|
-
_shadowRight: { state: true },
|
|
425
|
-
_page: { state: true },
|
|
426
|
-
};
|
|
427
|
-
|
|
1
|
+
import "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import "./Icon-DhAvH0XM.js";
|
|
3
|
+
import "./Button-EdS9xr2J.js";
|
|
4
|
+
import "./FormAssociatedMixin-BbFlza53.js";
|
|
5
|
+
import "./VisuallyHidden-BkllVjlz.js";
|
|
6
|
+
import "./Pagination-CWqgusWZ.js";
|
|
7
|
+
import { t as LeuTable } from "./Table-DZz1ic3j.js";
|
|
428
8
|
export { LeuTable };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
+
import { css, html } from "lit";
|
|
4
|
+
import { property } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/tag/tag.css?inline
|
|
6
|
+
var tag_default = css`:host {
|
|
7
|
+
/* --tag-font-regular: var(--leu-font-family-regular);
|
|
8
|
+
--tag-font-black: var(--leu-font-family-black);
|
|
9
|
+
|
|
10
|
+
font-family: var(--tag-font-regular); */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tag {
|
|
14
|
+
--_accent-color: var(--leu-tag-accent-color, var(--leu-color-black-60));
|
|
15
|
+
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
padding: 0.25rem 0.5rem;
|
|
19
|
+
gap: 0.25rem;
|
|
20
|
+
border-radius: 0.25rem;
|
|
21
|
+
|
|
22
|
+
background-color: var(--_accent-color);
|
|
23
|
+
border: 2px solid var(--_accent-color);
|
|
24
|
+
color: var(--leu-color-black-0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tag--outline {
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
border-color: var(--_accent-color);
|
|
30
|
+
color: var(--_accent-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tag--ghost {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
border-color: transparent;
|
|
36
|
+
color: var(--_accent-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tag__icon {
|
|
40
|
+
--leu-icon-size: 1rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tag__label {
|
|
44
|
+
display: block;
|
|
45
|
+
font: var(--leu-t-tiny-regular-font);
|
|
46
|
+
line-height: 1rem;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/tag/Tag.ts
|
|
51
|
+
/**
|
|
52
|
+
* @tagname leu-tag
|
|
53
|
+
* @cssprop --leu-tag-accent-color - The color of the tag
|
|
54
|
+
* @slot default - The label of the tag
|
|
55
|
+
* @slot icon - An icon to display in the tag
|
|
56
|
+
*/
|
|
57
|
+
var LeuTag = class extends LeuElement {
|
|
58
|
+
constructor(..._args) {
|
|
59
|
+
super(..._args);
|
|
60
|
+
this.variant = "solid";
|
|
61
|
+
}
|
|
62
|
+
static {
|
|
63
|
+
this.styles = [LeuElement.styles, tag_default];
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return html`
|
|
67
|
+
<div class="tag tag--${this.variant}">
|
|
68
|
+
<slot class="tag__icon" name="icon"></slot>
|
|
69
|
+
<slot class="tag__label"></slot>
|
|
70
|
+
</div>
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
__decorate([property({ type: String })], LeuTag.prototype, "variant", void 0);
|
|
75
|
+
//#endregion
|
|
76
|
+
export { LeuTag as t };
|
package/dist/Tag.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/tag/Tag.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* @tagname leu-tag
|
|
7
7
|
* @cssprop --leu-tag-accent-color - The color of the tag
|
|
@@ -9,9 +9,9 @@ import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
|
9
9
|
* @slot icon - An icon to display in the tag
|
|
10
10
|
*/
|
|
11
11
|
declare class LeuTag extends LeuElement {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
static styles: any[];
|
|
13
|
+
variant: "solid" | "outline" | "ghost";
|
|
14
|
+
render(): lit_html0.TemplateResult<1>;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
export { LeuTag };
|
|
16
|
+
//#endregion
|
|
17
|
+
export { LeuTag };
|
package/dist/Tag.js
CHANGED
|
@@ -1,75 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-jrR2M5pZ.js';
|
|
5
|
-
|
|
6
|
-
var css_248z = css`:host {
|
|
7
|
-
/* --tag-font-regular: var(--leu-font-family-regular);
|
|
8
|
-
--tag-font-black: var(--leu-font-family-black);
|
|
9
|
-
|
|
10
|
-
font-family: var(--tag-font-regular); */
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.tag {
|
|
14
|
-
--_accent-color: var(--leu-tag-accent-color, var(--leu-color-black-60));
|
|
15
|
-
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
padding: 0.25rem 0.5rem;
|
|
19
|
-
gap: 0.25rem;
|
|
20
|
-
border-radius: 0.25rem;
|
|
21
|
-
|
|
22
|
-
background-color: var(--_accent-color);
|
|
23
|
-
border: 2px solid var(--_accent-color);
|
|
24
|
-
color: var(--leu-color-black-0);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.tag--outline {
|
|
28
|
-
background-color: transparent;
|
|
29
|
-
border-color: var(--_accent-color);
|
|
30
|
-
color: var(--_accent-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.tag--ghost {
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
border-color: transparent;
|
|
36
|
-
color: var(--_accent-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tag__icon {
|
|
40
|
-
--leu-icon-size: 1rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.tag__label {
|
|
44
|
-
display: block;
|
|
45
|
-
font: var(--leu-t-tiny-regular-font);
|
|
46
|
-
line-height: 1rem;
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @tagname leu-tag
|
|
52
|
-
* @cssprop --leu-tag-accent-color - The color of the tag
|
|
53
|
-
* @slot default - The label of the tag
|
|
54
|
-
* @slot icon - An icon to display in the tag
|
|
55
|
-
*/
|
|
56
|
-
class LeuTag extends LeuElement {
|
|
57
|
-
constructor() {
|
|
58
|
-
super(...arguments);
|
|
59
|
-
this.variant = "solid";
|
|
60
|
-
}
|
|
61
|
-
render() {
|
|
62
|
-
return html `
|
|
63
|
-
<div class="tag tag--${this.variant}">
|
|
64
|
-
<slot class="tag__icon" name="icon"></slot>
|
|
65
|
-
<slot class="tag__label"></slot>
|
|
66
|
-
</div>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
LeuTag.styles = [LeuElement.styles, css_248z];
|
|
71
|
-
__decorate([
|
|
72
|
-
property({ type: String })
|
|
73
|
-
], LeuTag.prototype, "variant", void 0);
|
|
74
|
-
|
|
1
|
+
import "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import { t as LeuTag } from "./Tag-DsZS_8pl.js";
|
|
75
3
|
export { LeuTag };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import { css, html } from "lit";
|
|
3
|
+
//#region src/components/visually-hidden/visually-hidden.css?inline
|
|
4
|
+
var visually_hidden_default = css`:host {
|
|
5
|
+
clip: rect(0 0 0 0);
|
|
6
|
+
border: 0;
|
|
7
|
+
height: 1px;
|
|
8
|
+
margin: -1px !important;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
padding: 0 !important;
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/visually-hidden/VisuallyHidden.ts
|
|
17
|
+
/**
|
|
18
|
+
* @tagname leu-visually-hidden
|
|
19
|
+
*/
|
|
20
|
+
var LeuVisuallyHidden = class extends LeuElement {
|
|
21
|
+
static {
|
|
22
|
+
this.styles = [LeuElement.styles, visually_hidden_default];
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return html`<slot></slot>`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { LeuVisuallyHidden as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
|
+
import * as lit_html0 from "lit-html";
|
|
3
|
+
|
|
4
|
+
//#region src/components/visually-hidden/VisuallyHidden.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @tagname leu-visually-hidden
|
|
7
|
+
*/
|
|
8
|
+
declare class LeuVisuallyHidden extends LeuElement {
|
|
9
|
+
static styles: any[];
|
|
10
|
+
render(): lit_html0.TemplateResult<1>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { LeuVisuallyHidden as t };
|
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @tagname leu-visually-hidden
|
|
7
|
-
*/
|
|
8
|
-
declare class LeuVisuallyHidden extends LeuElement {
|
|
9
|
-
static styles: lit.CSSResultGroup[];
|
|
10
|
-
render(): lit_html.TemplateResult<1>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { LeuVisuallyHidden };
|
|
1
|
+
import { t as LeuVisuallyHidden } from "./VisuallyHidden-OeQvhxYn.js";
|
|
2
|
+
export { LeuVisuallyHidden };
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var css_248z = css`:host {
|
|
5
|
-
clip: rect(0 0 0 0);
|
|
6
|
-
border: 0;
|
|
7
|
-
height: 1px;
|
|
8
|
-
margin: -1px !important;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
padding: 0 !important;
|
|
11
|
-
position: absolute;
|
|
12
|
-
width: 1px;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @tagname leu-visually-hidden
|
|
18
|
-
*/
|
|
19
|
-
class LeuVisuallyHidden extends LeuElement {
|
|
20
|
-
render() {
|
|
21
|
-
return html `<slot></slot>`;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
LeuVisuallyHidden.styles = [LeuElement.styles, css_248z];
|
|
25
|
-
|
|
1
|
+
import "./LeuElement-B7NJzWwP.js";
|
|
2
|
+
import { t as LeuVisuallyHidden } from "./VisuallyHidden-BkllVjlz.js";
|
|
26
3
|
export { LeuVisuallyHidden };
|