@limetech/lime-elements 40.12.3 → 40.13.1
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/CHANGELOG.md +18 -0
- package/dist/cjs/drag-to-reorder-BP5YkPuu.js +3092 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +1 -1
- package/dist/cjs/limel-action-bar_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +2 -2
- package/dist/cjs/limel-badge.cjs.entry.js +2 -2
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +6 -6
- package/dist/cjs/limel-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-callout.cjs.entry.js +2 -2
- package/dist/cjs/limel-card.cjs.entry.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
- package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-circular-progress.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-diff.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-editor.cjs.entry.js +2 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-dock.cjs.entry.js +3 -3
- package/dist/cjs/{limel-scroller.cjs.entry.js → limel-drag-handle_2.cjs.entry.js} +40 -2
- package/dist/cjs/limel-email-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-viewer.cjs.entry.js +65 -56
- package/dist/cjs/limel-file.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +539 -3171
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-help-content.cjs.entry.js +1 -1
- package/dist/cjs/limel-help.cjs.entry.js +2 -2
- package/dist/cjs/limel-helper-line_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-hotkey_4.cjs.entry.js +5 -5
- package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
- package/dist/cjs/limel-list-item.cjs.entry.js +3 -3
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-masonry-layout.cjs.entry.js +1 -1
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +1 -1
- package/dist/cjs/limel-pagination-jump.cjs.entry.js +1 -1
- package/dist/cjs/limel-pagination.cjs.entry.js +2 -2
- package/dist/cjs/limel-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-resize-handle.cjs.entry.js +43 -2
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-side-panel.cjs.entry.js +16 -6
- package/dist/cjs/limel-slider.cjs.entry.js +4 -4
- package/dist/cjs/limel-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +120 -16
- package/dist/cjs/limel-tab-panel.cjs.entry.js +7 -1
- package/dist/cjs/limel-table.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +4 -4
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translations-DDyw5Zzz.js → translations-CLSqfR3x.js} +56 -0
- package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +2 -2
- package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/button-group/button-group.js +1 -1
- package/dist/collection/components/callout/callout.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip-set/chip-set.js +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +1 -1
- package/dist/collection/components/code-diff/code-diff.js +1 -1
- package/dist/collection/components/code-editor/code-editor.js +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
- package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
- package/dist/collection/components/dialog/dialog.js +2 -2
- package/dist/collection/components/dock/dock.js +2 -2
- package/dist/collection/components/drag-handle/drag-handle.js +1 -1
- package/dist/collection/components/email-viewer/email-viewer.js +1 -1
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
- package/dist/collection/components/file-input/file-input.js +1 -1
- package/dist/collection/components/flex-container/flex-container.js +1 -1
- package/dist/collection/components/form/form.css +59 -0
- package/dist/collection/components/form/form.js +49 -2
- package/dist/collection/components/form/show-field.js +116 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +1 -0
- package/dist/collection/components/form/templates/array-field-item.js +5 -0
- package/dist/collection/components/form/templates/array-field.js +20 -158
- package/dist/collection/components/form/templates/field.js +17 -0
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/help/help-content.js +1 -1
- package/dist/collection/components/help/help.js +2 -2
- package/dist/collection/components/helper-line/helper-line.js +2 -2
- package/dist/collection/components/hotkey/hotkey.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
- package/dist/collection/components/markdown/markdown.js +1 -1
- package/dist/collection/components/masonry-layout/masonry-layout.js +1 -1
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +1 -1
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/portal.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button.js +2 -2
- package/dist/collection/components/resize-handle/resize-handle.css +35 -33
- package/dist/collection/components/resize-handle/resize-handle.js +86 -4
- package/dist/collection/components/scroller/scroller.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shortcut/shortcut.js +1 -1
- package/dist/collection/components/side-panel/side-panel.js +44 -27
- package/dist/collection/components/slider/slider.js +3 -3
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.css +68 -22
- package/dist/collection/components/tab-bar/tab-bar.js +131 -4
- package/dist/collection/components/tab-bar/tabs.js +23 -0
- package/dist/collection/components/tab-panel/tab-panel.js +54 -1
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/translations/da.js +7 -0
- package/dist/collection/translations/de.js +7 -0
- package/dist/collection/translations/en.js +7 -0
- package/dist/collection/translations/fi.js +7 -0
- package/dist/collection/translations/fr.js +7 -0
- package/dist/collection/translations/nl.js +7 -0
- package/dist/collection/translations/no.js +7 -0
- package/dist/collection/translations/sv.js +7 -0
- package/dist/collection/util/drag-to-reorder.js +116 -0
- package/dist/esm/{_baseForOwn-D5j7fHlv.js → _baseForOwn-vKFWmmaS.js} +1 -1
- package/dist/esm/{_baseIsEqual-CyF4P8uM.js → _baseIsEqual-B_JRErB0.js} +1 -1
- package/dist/esm/{_baseIteratee-CpbczHY1.js → _baseIteratee-CVz7aes3.js} +1 -1
- package/dist/esm/{_baseSet-Cw2IE6ZF.js → _baseSet-BUAq8NGm.js} +1 -1
- package/dist/esm/{cloneDeep-DAbOtbs8.js → cloneDeep-Bcll-3f8.js} +1 -1
- package/dist/esm/drag-to-reorder-BXmXIwCa.js +3086 -0
- package/dist/esm/{isEqual-CE83yS8T.js → isEqual-C-pK6AAU.js} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-3d-hover-effect-glow.entry.js +1 -1
- package/dist/esm/limel-action-bar_3.entry.js +4 -4
- package/dist/esm/limel-ai-avatar.entry.js +2 -2
- package/dist/esm/limel-badge.entry.js +2 -2
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_6.entry.js +6 -6
- package/dist/esm/limel-button-group.entry.js +1 -1
- package/dist/esm/limel-button.entry.js +2 -2
- package/dist/esm/limel-callout.entry.js +2 -2
- package/dist/esm/limel-card.entry.js +1 -1
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-chip-set.entry.js +4 -4
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-circular-progress.entry.js +1 -1
- package/dist/esm/limel-code-diff.entry.js +2 -2
- package/dist/esm/limel-code-editor.entry.js +2 -2
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-color-picker-palette.entry.js +2 -2
- package/dist/esm/limel-color-picker.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +4 -4
- package/dist/esm/limel-dock.entry.js +3 -3
- package/dist/esm/{limel-scroller.entry.js → limel-drag-handle_2.entry.js} +40 -3
- package/dist/esm/limel-email-viewer.entry.js +2 -2
- package/dist/esm/limel-file-dropzone_2.entry.js +5 -5
- package/dist/esm/limel-file-viewer.entry.js +65 -56
- package/dist/esm/limel-file.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
- package/dist/esm/limel-flex-container.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +536 -3168
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-help-content.entry.js +1 -1
- package/dist/esm/limel-help.entry.js +2 -2
- package/dist/esm/limel-helper-line_3.entry.js +4 -4
- package/dist/esm/limel-hotkey_4.entry.js +5 -5
- package/dist/esm/limel-icon-button.entry.js +1 -1
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js +2 -2
- package/dist/esm/limel-list-item.entry.js +3 -3
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-masonry-layout.entry.js +1 -1
- package/dist/esm/limel-menu-item-meta.entry.js +1 -1
- package/dist/esm/limel-pagination-jump.entry.js +1 -1
- package/dist/esm/limel-pagination.entry.js +2 -2
- package/dist/esm/limel-picker.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +2 -2
- package/dist/esm/limel-profile-picture.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +5 -5
- package/dist/esm/limel-radio-button-group.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +2 -2
- package/dist/esm/limel-resize-handle.entry.js +43 -2
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-side-panel.entry.js +16 -6
- package/dist/esm/limel-slider.entry.js +4 -4
- package/dist/esm/limel-snackbar.entry.js +3 -3
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +117 -13
- package/dist/esm/limel-tab-panel.entry.js +7 -1
- package/dist/esm/limel-table.entry.js +7 -7
- package/dist/esm/limel-text-editor-link-menu.entry.js +4 -4
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translations-UrIr-5_D.js → translations-Drl5LNAD.js} +56 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-35bc5ed2.entry.js → p-01de145c.entry.js} +1 -1
- package/dist/lime-elements/{p-3ee121fa.entry.js → p-026eed2d.entry.js} +1 -1
- package/dist/lime-elements/{p-9ff6a455.entry.js → p-068b141b.entry.js} +1 -1
- package/dist/lime-elements/{p-9168793f.entry.js → p-09f8f883.entry.js} +1 -1
- package/dist/lime-elements/p-1066a057.entry.js +1 -0
- package/dist/lime-elements/{p-95322502.entry.js → p-1663fa9d.entry.js} +1 -1
- package/dist/lime-elements/{p-def7b38f.entry.js → p-17aa9235.entry.js} +1 -1
- package/dist/lime-elements/{p-910807cb.entry.js → p-19426c76.entry.js} +1 -1
- package/dist/lime-elements/{p-622660dd.entry.js → p-1d6014ed.entry.js} +1 -1
- package/dist/lime-elements/p-2370ff51.entry.js +1 -0
- package/dist/lime-elements/{p-0f18981d.entry.js → p-242f1032.entry.js} +1 -1
- package/dist/lime-elements/{p-828558cf.entry.js → p-27d375f3.entry.js} +1 -1
- package/dist/lime-elements/{p-2ba9d62f.entry.js → p-300f80e7.entry.js} +1 -1
- package/dist/lime-elements/{p-9ca18ba5.entry.js → p-3b4f6329.entry.js} +1 -1
- package/dist/lime-elements/{p-2528f75e.entry.js → p-3de45ea6.entry.js} +2 -2
- package/dist/lime-elements/{p-675a7469.entry.js → p-3f447d22.entry.js} +1 -1
- package/dist/lime-elements/{p-780dae0b.entry.js → p-3fa66fb1.entry.js} +1 -1
- package/dist/lime-elements/{p-09390c6a.entry.js → p-41172b62.entry.js} +1 -1
- package/dist/lime-elements/{p-d5144955.entry.js → p-41fb6e88.entry.js} +1 -1
- package/dist/lime-elements/{p-f4c9940e.entry.js → p-44ec1f22.entry.js} +1 -1
- package/dist/lime-elements/{p-268b4da1.entry.js → p-4a272ac2.entry.js} +1 -1
- package/dist/lime-elements/{p-e25bfb2c.entry.js → p-4a381bc6.entry.js} +1 -1
- package/dist/lime-elements/p-56fe13ef.entry.js +1 -0
- package/dist/lime-elements/p-5d623004.entry.js +1 -0
- package/dist/lime-elements/{p-8a59698f.entry.js → p-5ea07cbe.entry.js} +1 -1
- package/dist/lime-elements/p-600466a9.entry.js +1 -0
- package/dist/lime-elements/{p-657bfa36.entry.js → p-62b6e235.entry.js} +1 -1
- package/dist/lime-elements/p-64540beb.entry.js +1 -0
- package/dist/lime-elements/{p-1020ca20.entry.js → p-674680f9.entry.js} +1 -1
- package/dist/lime-elements/{p-d79d777e.entry.js → p-67536ac3.entry.js} +1 -1
- package/dist/lime-elements/{p-dd075353.entry.js → p-6770cf06.entry.js} +1 -1
- package/dist/lime-elements/{p-887eea11.entry.js → p-7375fac2.entry.js} +1 -1
- package/dist/lime-elements/{p-fb15f608.entry.js → p-7829198d.entry.js} +1 -1
- package/dist/lime-elements/{p-abed5afd.entry.js → p-82672504.entry.js} +1 -1
- package/dist/lime-elements/{p-24e5d420.entry.js → p-8339d921.entry.js} +1 -1
- package/dist/lime-elements/{p-33ed0c68.entry.js → p-87c9f4de.entry.js} +1 -1
- package/dist/lime-elements/{p-7a290372.entry.js → p-89316964.entry.js} +1 -1
- package/dist/lime-elements/{p-527e9c95.entry.js → p-8a9361a2.entry.js} +1 -1
- package/dist/lime-elements/{p-46bf8b22.entry.js → p-8e78fd4f.entry.js} +1 -1
- package/dist/lime-elements/{p-db1f9eba.entry.js → p-8f133cd6.entry.js} +1 -1
- package/dist/lime-elements/{p-ff4a8b89.entry.js → p-90198515.entry.js} +1 -1
- package/dist/lime-elements/{p-236743f1.entry.js → p-95ca7426.entry.js} +1 -1
- package/dist/lime-elements/{p-55b56742.entry.js → p-9aa921a2.entry.js} +1 -1
- package/dist/lime-elements/{p-540b2b24.entry.js → p-9bbf2612.entry.js} +1 -1
- package/dist/lime-elements/{p-a449ca04.entry.js → p-9d354eca.entry.js} +1 -1
- package/dist/lime-elements/{p-68542e00.entry.js → p-9e9187ce.entry.js} +1 -1
- package/dist/lime-elements/p-B26k4gw8.js +1 -0
- package/dist/lime-elements/p-BAqAt5It.js +1 -0
- package/dist/lime-elements/p-Cu9Ji1iJ.js +1 -0
- package/dist/lime-elements/{p-BY5NjPj8.js → p-D9Ezd43A.js} +1 -1
- package/dist/lime-elements/{p-nVemxylR.js → p-DFu1q54T.js} +1 -1
- package/dist/lime-elements/p-DdnBHYb-.js +7 -0
- package/dist/lime-elements/{p-B6-3WXAv.js → p-DeIIlp6m.js} +1 -1
- package/dist/lime-elements/p-Dq0uNStc.js +1 -0
- package/dist/lime-elements/{p-4a7df81a.entry.js → p-aac603af.entry.js} +1 -1
- package/dist/lime-elements/{p-5473eb74.entry.js → p-aee75ad1.entry.js} +1 -1
- package/dist/lime-elements/{p-4882acaa.entry.js → p-afbe54e6.entry.js} +1 -1
- package/dist/lime-elements/{p-a78aaf37.entry.js → p-b5ebcbfc.entry.js} +1 -1
- package/dist/lime-elements/{p-07916acc.entry.js → p-be8950a6.entry.js} +2 -2
- package/dist/lime-elements/p-c8cb4912.entry.js +16 -0
- package/dist/lime-elements/{p-de4d261a.entry.js → p-dd065596.entry.js} +1 -1
- package/dist/lime-elements/{p-0c2ce99b.entry.js → p-ddabfac0.entry.js} +1 -1
- package/dist/lime-elements/{p-d3475514.entry.js → p-de3cf7d8.entry.js} +1 -1
- package/dist/lime-elements/{p-458c131f.entry.js → p-e13e0001.entry.js} +2 -2
- package/dist/lime-elements/p-e2971111.entry.js +1 -0
- package/dist/lime-elements/{p-ecded772.entry.js → p-e332bb9b.entry.js} +1 -1
- package/dist/lime-elements/{p-54631dbf.entry.js → p-e50acec1.entry.js} +1 -1
- package/dist/lime-elements/{p-074275f4.entry.js → p-e9b1e0bd.entry.js} +1 -1
- package/dist/lime-elements/p-ec531ecb.entry.js +1 -0
- package/dist/lime-elements/{p-90286e5c.entry.js → p-f0bf3fd1.entry.js} +1 -1
- package/dist/lime-elements/p-f1ac7608.entry.js +1 -0
- package/dist/lime-elements/{p-c12fbc91.entry.js → p-f455150b.entry.js} +1 -1
- package/dist/types/components/form/form.d.ts +15 -0
- package/dist/types/components/form/show-field.d.ts +9 -0
- package/dist/types/components/form/templates/array-context.d.ts +4 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +5 -0
- package/dist/types/components/form/templates/array-field.d.ts +3 -13
- package/dist/types/components/form/templates/field.d.ts +1 -0
- package/dist/types/components/form/templates/object-field.d.ts +2 -2
- package/dist/types/components/resize-handle/resize-handle.d.ts +31 -2
- package/dist/types/components/side-panel/side-panel.d.ts +11 -4
- package/dist/types/components/tab-bar/tab-bar.d.ts +25 -0
- package/dist/types/components/tab-bar/tab.types.d.ts +18 -0
- package/dist/types/components/tab-bar/tabs.d.ts +12 -1
- package/dist/types/components/tab-panel/tab-panel.d.ts +18 -1
- package/dist/types/components.d.ts +143 -18
- package/dist/types/translations/da.d.ts +7 -0
- package/dist/types/translations/de.d.ts +7 -0
- package/dist/types/translations/en.d.ts +7 -0
- package/dist/types/translations/fi.d.ts +7 -0
- package/dist/types/translations/fr.d.ts +7 -0
- package/dist/types/translations/nl.d.ts +7 -0
- package/dist/types/translations/no.d.ts +7 -0
- package/dist/types/translations/sv.d.ts +7 -0
- package/dist/types/util/drag-to-reorder.d.ts +65 -0
- package/package.json +4 -4
- package/dist/cjs/isArrayLikeObject-U2Ddbw4n.js +0 -326
- package/dist/cjs/limel-drag-handle.cjs.entry.js +0 -42
- package/dist/esm/isArrayLikeObject-CJB8HbtH.js +0 -321
- package/dist/esm/limel-drag-handle.entry.js +0 -40
- package/dist/lime-elements/p-26813b2c.entry.js +0 -1
- package/dist/lime-elements/p-49eb2f64.entry.js +0 -13
- package/dist/lime-elements/p-4f58c6b3.entry.js +0 -1
- package/dist/lime-elements/p-646731b6.entry.js +0 -1
- package/dist/lime-elements/p-8d567e42.entry.js +0 -1
- package/dist/lime-elements/p-9b384d62.entry.js +0 -1
- package/dist/lime-elements/p-BQeIv4aA.js +0 -1
- package/dist/lime-elements/p-COdirXg1.js +0 -1
- package/dist/lime-elements/p-ORUNaKm-.js +0 -1
- package/dist/lime-elements/p-a317f2fa.entry.js +0 -1
- package/dist/lime-elements/p-a5246373.entry.js +0 -1
- package/dist/lime-elements/p-b609552e.entry.js +0 -1
- package/dist/lime-elements/p-bf849dc9.entry.js +0 -1
- package/dist/lime-elements/p-d7e5a4a7.entry.js +0 -1
- package/dist/lime-elements/p-pk5KIdKH.js +0 -1
- package/dist/lime-elements/p-w3yKYfBQ.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import translate from "../../global/translations";
|
|
2
3
|
import { getDeepActiveElement } from "../../util/get-deep-active-element";
|
|
3
4
|
import { ESCAPE } from "../../util/keycodes";
|
|
4
5
|
import { createRandomString } from "../../util/random-string";
|
|
@@ -44,12 +45,17 @@ function stopEvent(event) {
|
|
|
44
45
|
* @exampleComponent limel-example-side-panel-header-actions
|
|
45
46
|
* @exampleComponent limel-example-side-panel-stacking
|
|
46
47
|
* @exampleComponent limel-example-side-panel-full-screen
|
|
48
|
+
* @exampleComponent limel-example-side-panel-accessibility
|
|
47
49
|
* @slot - Content of the panel
|
|
48
50
|
* @slot header-actions - Small controls at the right end of the header. Content that is larger than half the header width or the height of the headings is cut off.
|
|
49
51
|
* @private
|
|
50
52
|
*/
|
|
51
53
|
export class SidePanel {
|
|
52
54
|
constructor() {
|
|
55
|
+
/**
|
|
56
|
+
* Defines the language for translations.
|
|
57
|
+
*/
|
|
58
|
+
this.language = 'en';
|
|
53
59
|
/**
|
|
54
60
|
* Label of the close button. Shown as a tooltip and used as the accessible
|
|
55
61
|
* name.
|
|
@@ -65,10 +71,6 @@ export class SidePanel {
|
|
|
65
71
|
* Buttons in the toolbar, to the right of the close button.
|
|
66
72
|
*/
|
|
67
73
|
this.actions = [];
|
|
68
|
-
/**
|
|
69
|
-
* Label of the resize handle. Used as the accessible name.
|
|
70
|
-
*/
|
|
71
|
-
this.resizeLabel = 'Resize';
|
|
72
74
|
/**
|
|
73
75
|
* Whether pressing Escape emits `close`. Set to `false` to let only the
|
|
74
76
|
* close button emit `close`. The panel then does not prevent the Escape
|
|
@@ -231,7 +233,7 @@ export class SidePanel {
|
|
|
231
233
|
.querySelector('button.close')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
232
234
|
}
|
|
233
235
|
render() {
|
|
234
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: 'f4ddb3df52344cfb6106ab2982c7d0c077e075fb' }, h("section", { key: '2dcf62861e49014f9fc080a945a9c1e0c5bd3920', ref: this.setPanel, role: "dialog", "aria-label": this.label, tabindex: "-1" }, this.renderHandle(), h("div", { key: '169006b7eed55cf37b7db4ce393d29b5d1184d42', class: "content" }, h("div", { key: '9fa270803bf650e258358e7c9031d10f58c35189', class: "toolbar" }, this.renderCloseButton(), this.renderActions()), this.renderHeader(), this.renderBody())), this.renderStack(), h("span", { key: 'c8e01b49683bdaa2d549830930e4247f3a49895b', "data-limit": "min", ref: this.setMinLimit }), h("span", { key: '9baec9cc89a6e1f375f97d4f9069f8951f90bf6a', "data-limit": "max", ref: this.setMaxLimit })));
|
|
235
237
|
}
|
|
236
238
|
// A native button and not `limel-icon-button`, because the hover animation
|
|
237
239
|
// styles the icon, which is inside the shadow root of `limel-icon-button`.
|
|
@@ -271,7 +273,15 @@ export class SidePanel {
|
|
|
271
273
|
if (this.fullScreen) {
|
|
272
274
|
return;
|
|
273
275
|
}
|
|
274
|
-
return (h("limel-resize-handle", { class: "handle",
|
|
276
|
+
return (h("limel-resize-handle", { class: "handle", resizableRegionLabel: this.getRegionLabel(), language: this.language, value: (_a = this.widthRange) === null || _a === void 0 ? void 0 : _a.now, min: (_b = this.widthRange) === null || _b === void 0 ? void 0 : _b.min, max: (_c = this.widthRange) === null || _c === void 0 ? void 0 : _c.max, onChangeSize: this.handleChangeSize, onEndResize: this.handleEndResize }));
|
|
277
|
+
}
|
|
278
|
+
getRegionLabel() {
|
|
279
|
+
if (!this.label) {
|
|
280
|
+
return translate.get('side-panel.resize-region', this.language);
|
|
281
|
+
}
|
|
282
|
+
return translate.get('side-panel.resize-region.named', this.language, {
|
|
283
|
+
label: this.label,
|
|
284
|
+
});
|
|
275
285
|
}
|
|
276
286
|
renderBody() {
|
|
277
287
|
return (h("div", { class: "body", ref: this.stopContentEvents }, h("slot", null)));
|
|
@@ -409,13 +419,40 @@ export class SidePanel {
|
|
|
409
419
|
"optional": true,
|
|
410
420
|
"docs": {
|
|
411
421
|
"tags": [],
|
|
412
|
-
"text": "Accessible name of the panel. Screen readers announce it. Set it to\nsomething that tells the user what the panel is for."
|
|
422
|
+
"text": "Accessible name of the panel. Screen readers announce it. Set it to\nsomething that tells the user what the panel is for.\n\nThe resize handle is named after it, for example \"Resize Customer\ndetails panel\". When no label is set, the handle is named \"Resize side\npanel\"."
|
|
413
423
|
},
|
|
414
424
|
"getter": false,
|
|
415
425
|
"setter": false,
|
|
416
426
|
"reflect": false,
|
|
417
427
|
"attribute": "label"
|
|
418
428
|
},
|
|
429
|
+
"language": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"mutable": false,
|
|
432
|
+
"complexType": {
|
|
433
|
+
"original": "Languages",
|
|
434
|
+
"resolved": "\"da\" | \"de\" | \"en\" | \"fi\" | \"fr\" | \"nb\" | \"nl\" | \"no\" | \"sv\"",
|
|
435
|
+
"references": {
|
|
436
|
+
"Languages": {
|
|
437
|
+
"location": "import",
|
|
438
|
+
"path": "../date-picker/date.types",
|
|
439
|
+
"id": "src/components/date-picker/date.types.ts::Languages",
|
|
440
|
+
"referenceLocation": "Languages"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"required": false,
|
|
445
|
+
"optional": false,
|
|
446
|
+
"docs": {
|
|
447
|
+
"tags": [],
|
|
448
|
+
"text": "Defines the language for translations."
|
|
449
|
+
},
|
|
450
|
+
"getter": false,
|
|
451
|
+
"setter": false,
|
|
452
|
+
"reflect": true,
|
|
453
|
+
"attribute": "language",
|
|
454
|
+
"defaultValue": "'en'"
|
|
455
|
+
},
|
|
419
456
|
"closeLabel": {
|
|
420
457
|
"type": "string",
|
|
421
458
|
"mutable": false,
|
|
@@ -486,26 +523,6 @@ export class SidePanel {
|
|
|
486
523
|
"setter": false,
|
|
487
524
|
"defaultValue": "[]"
|
|
488
525
|
},
|
|
489
|
-
"resizeLabel": {
|
|
490
|
-
"type": "string",
|
|
491
|
-
"mutable": false,
|
|
492
|
-
"complexType": {
|
|
493
|
-
"original": "string",
|
|
494
|
-
"resolved": "string",
|
|
495
|
-
"references": {}
|
|
496
|
-
},
|
|
497
|
-
"required": false,
|
|
498
|
-
"optional": false,
|
|
499
|
-
"docs": {
|
|
500
|
-
"tags": [],
|
|
501
|
-
"text": "Label of the resize handle. Used as the accessible name."
|
|
502
|
-
},
|
|
503
|
-
"getter": false,
|
|
504
|
-
"setter": false,
|
|
505
|
-
"reflect": false,
|
|
506
|
-
"attribute": "resize-label",
|
|
507
|
-
"defaultValue": "'Resize'"
|
|
508
|
-
},
|
|
509
526
|
"closeOnEscape": {
|
|
510
527
|
"type": "boolean",
|
|
511
528
|
"mutable": false,
|
|
@@ -270,15 +270,15 @@ export class Slider {
|
|
|
270
270
|
if (this.disabled || this.readonly) {
|
|
271
271
|
inputProps.disabled = true;
|
|
272
272
|
}
|
|
273
|
-
return (h(Host, { key: '
|
|
273
|
+
return (h(Host, { key: '3a782f6aa420997f4a088e922438245c7c34143b', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '997046fb961c325d2a4a1e5cc51b08d84bcc2274', labelId: this.inputId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !this.isUnset, hasFloatingLabel: true }, h("div", { key: '985fceba0aa4385936c06b1e8cd083ead77823b2', slot: "content" }, h("div", { key: '47238548b281254d3fe7e9fe7350890ffb5f573e', class: "slider", style: { '--slider-fraction': `${fraction}` } }, h("input", Object.assign({ key: 'f3fc215a6b2c331342487f206c549e04d109a061', id: this.inputId, type: "range", min: min, max: max, value: this.displayValue, "aria-describedby": this.helperText
|
|
274
274
|
? this.helperTextId
|
|
275
275
|
: undefined, "aria-invalid": this.invalid ? 'true' : undefined, "aria-valuetext": this.isUnset
|
|
276
276
|
? translate.get('value-not-set', this.language)
|
|
277
277
|
: undefined, ref: (el) => {
|
|
278
278
|
this.inputElement = el;
|
|
279
|
-
}, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }, inputProps)), h("div", { key: '
|
|
279
|
+
}, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }, inputProps)), h("div", { key: '407448db5cd86d489adb909e4c5ecc0e0d050c53', class: "track" }, h("div", { key: '7f8c47aa449ee1a5ffe9c8fbc35e7b8ec9c818ad', class: "active" }), this.renderStepDots(min, max)), h("div", { key: '866541538223dddbd750c57836426941ef4e6139', class: "thumb" }, h("div", { key: 'b663cbb67b3656bec79b81a3d0b47fb08f234bfb', class: "knob" }), h("div", { key: '58bc88bc2c9ff6e1a2c4635708d2dd1c5744e7ac', class: "indicator", "aria-hidden": "true" }, this.isUnset
|
|
280
280
|
? '\u{2194}\u{FE0E}'
|
|
281
|
-
: this.displayValue))), h("div", { key: '
|
|
281
|
+
: this.displayValue))), h("div", { key: '4bc12eebc0006e5e54ff2d6c44d04303e0370de0', class: "range-labels" }, h("span", { key: 'faa2e129c54b50f7503277fdfb8430270a154524', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: 'ade8069607794cddfddec0d6b5d574b54fb7da0e', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderClearButton(), this.renderHelperLine()));
|
|
282
282
|
}
|
|
283
283
|
watchValue() {
|
|
284
284
|
this.syncStateFromValue();
|
|
@@ -122,14 +122,14 @@ export class Snackbar {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
render() {
|
|
125
|
-
return (h("aside", { key: '
|
|
125
|
+
return (h("aside", { key: '8783a6f2dfbc27d97e2923e4b1733a605c96426a', popover: "manual", style: {
|
|
126
126
|
'--snackbar-timeout': `${Math.max(this.timeout || 0, 0)}ms`,
|
|
127
127
|
'--snackbar-distance-to-top-edge': `${this.offset}px`,
|
|
128
128
|
}, class: {
|
|
129
129
|
open: this.open,
|
|
130
130
|
'is-closing': this.closing,
|
|
131
131
|
'limel-portal--parent': true,
|
|
132
|
-
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: '
|
|
132
|
+
}, id: this.snackbarId, role: this.setAriaRoles(), "aria-atomic": this.open ? 'true' : undefined, "aria-relevant": this.open ? 'additions' : undefined }, h("div", { key: '96335eef9b7ea7c5c32a7fe3dc197a5a51f91606', class: "surface" }, h("limel-markdown", { key: 'a28c251f5c22723a816e0c662a479ecd98c59ad0', class: "label", value: this.message }), this.renderActions(this.actionText), this.renderDismissButton(this.dismissible))));
|
|
133
133
|
}
|
|
134
134
|
setAriaRoles() {
|
|
135
135
|
if (!this.open) {
|
|
@@ -16,7 +16,7 @@ export class Spinner {
|
|
|
16
16
|
this.limeBranded = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '9883b127040b5ff110bdd1d8b6d38007fb02df6f' }, h("svg", { key: '019b40d28fc363dd0a6e6b740408df2de717bf65', viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, this.renderSpinner())));
|
|
20
20
|
}
|
|
21
21
|
renderSpinner() {
|
|
22
22
|
if (!this.limeBranded) {
|
|
@@ -55,9 +55,9 @@ export class SplitButton {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '7d99f6e787578f89d011b03d7f74555514e26644', class: {
|
|
59
59
|
'has-menu': this.items.length > 0,
|
|
60
|
-
}, onClick: this.filterClickWhenDisabled }, h("limel-button", { key: '
|
|
60
|
+
}, onClick: this.filterClickWhenDisabled }, h("limel-button", { key: 'b846b51c307b36831bebe2bb6c3c4efc1c9019a9', label: this.label, primary: this.primary, icon: this.icon, disabled: this.disabled, loading: this.loading, loadingFailed: this.loadingFailed }), this.renderMenu()));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "limel-split-button"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -78,7 +78,7 @@ export class Switch {
|
|
|
78
78
|
removeEnterClickable(this.host);
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'b6c37d2c9a9dc66e7e02271fe7877d24f190aaa9' }, this.readonly
|
|
82
82
|
? this.renderReadonly()
|
|
83
83
|
: this.renderInteractive(), this.renderHelperLine()));
|
|
84
84
|
}
|
|
@@ -128,12 +128,57 @@ limel-scroller {
|
|
|
128
128
|
background-color: rgb(var(--limel-tab-background-color));
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
:host(.has-tabs-with-equal-width:not([orientation=vertical])) button
|
|
131
|
+
:host(.has-tabs-with-equal-width:not([orientation=vertical])) button[role=tab],
|
|
132
|
+
:host(.has-tabs-with-equal-width:not([orientation=vertical])) limel-scroller > div {
|
|
132
133
|
flex: 1 0 auto;
|
|
133
134
|
max-width: var(--tab-bar-horizontal-tab-max-width, none);
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
limel-scroller > div:has(limel-drag-handle:hover), limel-scroller > div:has(limel-drag-handle:focus-within), limel-scroller > div.is-elevated, limel-scroller > div.sortable-chosen {
|
|
138
|
+
will-change: transform, box-shadow, border-radius, background-color;
|
|
139
|
+
}
|
|
140
|
+
limel-scroller > div.sortable-ghost {
|
|
141
|
+
border-radius: 0.5rem;
|
|
142
|
+
box-shadow: var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3);
|
|
143
|
+
}
|
|
144
|
+
limel-scroller > div.sortable-chosen {
|
|
145
|
+
border-radius: 0.5rem;
|
|
146
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
147
|
+
}
|
|
148
|
+
limel-scroller > div.is-elevated[draggable=false] {
|
|
149
|
+
animation: sit-here 0.8s forwards;
|
|
150
|
+
}
|
|
151
|
+
@keyframes sit-here {
|
|
152
|
+
0% {
|
|
153
|
+
border-radius: 0.5rem;
|
|
154
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
155
|
+
box-shadow: var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3);
|
|
156
|
+
}
|
|
157
|
+
100% {
|
|
158
|
+
box-shadow: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
limel-scroller > div {
|
|
162
|
+
position: relative;
|
|
163
|
+
display: flex;
|
|
164
|
+
flex: 0 0 auto;
|
|
165
|
+
}
|
|
166
|
+
limel-scroller > div button[role=tab] {
|
|
167
|
+
flex: 1 1 auto;
|
|
168
|
+
min-width: 0;
|
|
169
|
+
}
|
|
170
|
+
limel-scroller > div span.content {
|
|
171
|
+
padding-right: 2rem;
|
|
172
|
+
}
|
|
173
|
+
limel-scroller > div limel-drag-handle {
|
|
174
|
+
position: absolute;
|
|
175
|
+
z-index: 3;
|
|
176
|
+
top: 0;
|
|
177
|
+
bottom: 0;
|
|
178
|
+
right: 0.25rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
button[role=tab] {
|
|
137
182
|
appearance: none;
|
|
138
183
|
background: none;
|
|
139
184
|
border: none;
|
|
@@ -156,34 +201,34 @@ button {
|
|
|
156
201
|
white-space: nowrap;
|
|
157
202
|
font-size: var(--limel-theme-default-font-size);
|
|
158
203
|
}
|
|
159
|
-
button limel-icon {
|
|
204
|
+
button[role=tab] limel-icon {
|
|
160
205
|
transition: color 0.2s ease;
|
|
161
206
|
color: rgb(var(--contrast-800));
|
|
162
207
|
margin-left: -0.25rem;
|
|
163
208
|
flex-shrink: 0;
|
|
164
209
|
}
|
|
165
|
-
button span.text {
|
|
210
|
+
button[role=tab] span.text {
|
|
166
211
|
transition: color 0.2s ease;
|
|
167
212
|
line-height: 1.25;
|
|
168
213
|
overflow: hidden;
|
|
169
214
|
text-overflow: ellipsis;
|
|
170
215
|
color: var(--limel-theme-on-surface-color);
|
|
171
216
|
}
|
|
172
|
-
button:hover span.text {
|
|
217
|
+
button[role=tab]:hover span.text {
|
|
173
218
|
color: var(--limel-theme-text-primary-on-background-color);
|
|
174
219
|
}
|
|
175
|
-
button limel-badge {
|
|
220
|
+
button[role=tab] limel-badge {
|
|
176
221
|
margin-right: -0.25rem;
|
|
177
222
|
box-shadow: 0 0 0 1px rgb(var(--contrast-600));
|
|
178
223
|
pointer-events: none;
|
|
179
224
|
flex-shrink: 0;
|
|
180
225
|
}
|
|
181
226
|
|
|
182
|
-
button[aria-selected=true] {
|
|
227
|
+
button[role=tab][aria-selected=true] {
|
|
183
228
|
background-color: var(--limel-active-tab-background-color);
|
|
184
229
|
z-index: 2;
|
|
185
230
|
}
|
|
186
|
-
button[aria-selected=true]:before, button[aria-selected=true]:after {
|
|
231
|
+
button[role=tab][aria-selected=true]:before, button[role=tab][aria-selected=true]:after {
|
|
187
232
|
content: "";
|
|
188
233
|
display: block;
|
|
189
234
|
width: var(--limel-tab-active-outer-edge-curve-size);
|
|
@@ -193,10 +238,10 @@ button[aria-selected=true]:before, button[aria-selected=true]:after {
|
|
|
193
238
|
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E");
|
|
194
239
|
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E");
|
|
195
240
|
}
|
|
196
|
-
button[aria-selected=true] limel-icon {
|
|
241
|
+
button[role=tab][aria-selected=true] limel-icon {
|
|
197
242
|
color: var(--limel-active-tab-color);
|
|
198
243
|
}
|
|
199
|
-
button[aria-selected=true] span.text {
|
|
244
|
+
button[role=tab][aria-selected=true] span.text {
|
|
200
245
|
color: var(--limel-active-tab-color);
|
|
201
246
|
}
|
|
202
247
|
|
|
@@ -211,15 +256,15 @@ span.content {
|
|
|
211
256
|
padding: 0 0.75rem;
|
|
212
257
|
border-radius: calc(var(--limel-tab-border-radius) - var(--limel-tab-content-inset));
|
|
213
258
|
}
|
|
214
|
-
button:focus-visible span.content {
|
|
259
|
+
button[role=tab]:focus-visible span.content {
|
|
215
260
|
transition-duration: 0.3s;
|
|
216
261
|
box-shadow: var(--shadow-depth-8-focused);
|
|
217
262
|
}
|
|
218
263
|
|
|
219
|
-
:host(limel-tab-bar:not([orientation=vertical])) button {
|
|
264
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab] {
|
|
220
265
|
max-width: var(--tab-bar-horizontal-tab-max-width, 16rem);
|
|
221
266
|
}
|
|
222
|
-
:host(limel-tab-bar:not([orientation=vertical])) button:not([aria-selected=true]):after {
|
|
267
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab]:not([aria-selected=true]):after {
|
|
223
268
|
content: "";
|
|
224
269
|
display: block;
|
|
225
270
|
background-color: var(--limel-tab-separator-background-color);
|
|
@@ -232,20 +277,21 @@ button:focus-visible span.content {
|
|
|
232
277
|
border-radius: 1rem;
|
|
233
278
|
right: calc(-1 * var(--limel-tab-separator-width));
|
|
234
279
|
}
|
|
235
|
-
:host(limel-tab-bar:not([orientation=vertical]))
|
|
280
|
+
:host(limel-tab-bar:not([orientation=vertical])) limel-scroller > :last-child:not([aria-selected=true]):after,
|
|
281
|
+
:host(limel-tab-bar:not([orientation=vertical])) limel-scroller > :last-child > button[role=tab]:not([aria-selected=true]):after {
|
|
236
282
|
display: none;
|
|
237
283
|
}
|
|
238
|
-
:host(limel-tab-bar:not([orientation=vertical])) button[aria-selected=true] {
|
|
284
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true] {
|
|
239
285
|
border-radius: var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0;
|
|
240
286
|
}
|
|
241
|
-
:host(limel-tab-bar:not([orientation=vertical])) button[aria-selected=true]:before, :host(limel-tab-bar:not([orientation=vertical])) button[aria-selected=true]:after {
|
|
287
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before, :host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after {
|
|
242
288
|
bottom: 0;
|
|
243
289
|
}
|
|
244
|
-
:host(limel-tab-bar:not([orientation=vertical])) button[aria-selected=true]:before {
|
|
290
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:before {
|
|
245
291
|
left: calc(-1 * var(--limel-tab-active-outer-edge-curve-size));
|
|
246
292
|
transform: rotateY(180deg);
|
|
247
293
|
}
|
|
248
|
-
:host(limel-tab-bar:not([orientation=vertical])) button[aria-selected=true]:after {
|
|
294
|
+
:host(limel-tab-bar:not([orientation=vertical])) button[role=tab][aria-selected=true]:after {
|
|
249
295
|
right: calc(-1 * var(--limel-tab-active-outer-edge-curve-size));
|
|
250
296
|
}
|
|
251
297
|
|
|
@@ -262,17 +308,17 @@ button:focus-visible span.content {
|
|
|
262
308
|
0 var(--limel-tab-active-outer-edge-curve-size) 0.25rem;
|
|
263
309
|
height: 100%;
|
|
264
310
|
}
|
|
265
|
-
:host(limel-tab-bar[orientation=vertical]) button[aria-selected=true] {
|
|
311
|
+
:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true] {
|
|
266
312
|
border-radius: var(--limel-tab-border-radius) 0 0 var(--limel-tab-border-radius);
|
|
267
313
|
}
|
|
268
|
-
:host(limel-tab-bar[orientation=vertical]) button[aria-selected=true]:before, :host(limel-tab-bar[orientation=vertical]) button[aria-selected=true]:after {
|
|
314
|
+
:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before, :host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after {
|
|
269
315
|
right: 0;
|
|
270
316
|
}
|
|
271
|
-
:host(limel-tab-bar[orientation=vertical]) button[aria-selected=true]:before {
|
|
317
|
+
:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:before {
|
|
272
318
|
bottom: 100%;
|
|
273
319
|
transform: rotateY(180deg);
|
|
274
320
|
}
|
|
275
|
-
:host(limel-tab-bar[orientation=vertical]) button[aria-selected=true]:after {
|
|
321
|
+
:host(limel-tab-bar[orientation=vertical]) button[role=tab][aria-selected=true]:after {
|
|
276
322
|
top: 100%;
|
|
277
323
|
transform: rotate(180deg);
|
|
278
324
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
2
|
import { isEqual, difference } from "lodash-es";
|
|
3
|
-
import { setActiveTab } from "./tabs";
|
|
3
|
+
import { getTabReorder, setActiveTab } from "./tabs";
|
|
4
4
|
import { getIconColor, getIconName } from "../icon/get-icon-props";
|
|
5
5
|
import { findNavigationTarget, findTabStop, isNavigationKey, NO_NAVIGATION_TARGET, } from "../../util/keyboard-navigation";
|
|
6
|
+
import { DragToReorder } from "../../util/drag-to-reorder";
|
|
6
7
|
/**
|
|
7
8
|
* Tabs are great to organize information hierarchically in the interface and divide it into distinct categories. Using tabs, you can create groups of content that are related and at the same level in the hierarchy.
|
|
8
9
|
* :::warning
|
|
@@ -13,6 +14,7 @@ import { findNavigationTarget, findTabStop, isNavigationKey, NO_NAVIGATION_TARGE
|
|
|
13
14
|
* A tab bar can contain an unlimited number of tabs. However, depending on the device width and width of the tabs, the number of tabs that are visible at the same time will vary. When there is limited horizontal space, the component shows a left-arrow and/or right-arrow button, which scrolls and reveals the additional tabs. The tab bar can also be swiped left and right on a touch-device. A vertical tab bar does the same, upwards and downwards.
|
|
14
15
|
* The arrows are only a shortcut for people who use a mouse or a touch screen. Screen readers do not announce them, and the Tab key skips them. People who use a keyboard or a screen reader move between the tabs, and the tab bar keeps the selected tab in view.
|
|
15
16
|
* The left and right arrow keys move to the previous and the next tab, and select it. In a vertical tab bar, the up and down arrow keys do that instead. Home and End move to the first and the last tab. Moving past the last tab continues at the first one, and the other way around. The Tab key moves on to what comes after the tab bar, and moving back with Shift and Tab lands on the selected tab, or on the first tab when none is selected.
|
|
17
|
+
* Set `allowTabReorder` to let the user drag the tabs into the order they want. Every tab then gets a drag handle, and the tab bar emits `reorderTab` when the user drops a tab in a new place. The tab bar does not change `tabs` itself, so the component that uses it decides the new order, and can save it for the user. A tab that the component does not move, stays where it was. The tabs can be reordered with a mouse and a touch screen, but not yet with the keyboard.
|
|
16
18
|
* :::tip Other things to consider
|
|
17
19
|
* Never divide the content of a tab using a nested tab bar.
|
|
18
20
|
* Never place two tab bars within the same screen.
|
|
@@ -26,6 +28,8 @@ import { findNavigationTarget, findTabStop, isNavigationKey, NO_NAVIGATION_TARGE
|
|
|
26
28
|
* @exampleComponent limel-example-tab-bar-with-equal-tab-width
|
|
27
29
|
* @exampleComponent limel-example-tab-bar-vertical
|
|
28
30
|
* @exampleComponent limel-example-tab-bar-tab-width
|
|
31
|
+
* @exampleComponent limel-example-tab-bar-reorder
|
|
32
|
+
* @exampleComponent limel-example-tab-bar-reorder-vertical
|
|
29
33
|
*/
|
|
30
34
|
export class TabBar {
|
|
31
35
|
constructor() {
|
|
@@ -38,8 +42,24 @@ export class TabBar {
|
|
|
38
42
|
* to, or in a column, next to it.
|
|
39
43
|
*/
|
|
40
44
|
this.orientation = 'horizontal';
|
|
45
|
+
/**
|
|
46
|
+
* Set to `true` to let the user reorder the tabs by dragging them. Listen
|
|
47
|
+
* for `reorderTab` and give the tab bar the tabs in their new order.
|
|
48
|
+
*/
|
|
49
|
+
this.allowTabReorder = false;
|
|
41
50
|
this.hasLoaded = false;
|
|
42
51
|
this.isLaidOutAgain = false;
|
|
52
|
+
this.renderedTabs = [];
|
|
53
|
+
this.handleReorder = (event) => {
|
|
54
|
+
const reorder = getTabReorder(this.tabs, event);
|
|
55
|
+
if (!reorder) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const ids = this.tabs.map(({ id }) => id);
|
|
59
|
+
ids.splice(reorder.toIndex, 0, ...ids.splice(reorder.fromIndex, 1));
|
|
60
|
+
this.tabIdsAfterReorder = ids;
|
|
61
|
+
this.reorderTab.emit(reorder);
|
|
62
|
+
};
|
|
43
63
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
44
64
|
}
|
|
45
65
|
async connectedCallback() {
|
|
@@ -49,20 +69,39 @@ export class TabBar {
|
|
|
49
69
|
return;
|
|
50
70
|
}
|
|
51
71
|
this.revealedTabId = undefined;
|
|
72
|
+
this.setUpReordering();
|
|
52
73
|
await this.revealActiveTab('auto');
|
|
53
74
|
}
|
|
75
|
+
disconnectedCallback() {
|
|
76
|
+
var _a;
|
|
77
|
+
(_a = this.dragToReorder) === null || _a === void 0 ? void 0 : _a.teardown();
|
|
78
|
+
}
|
|
54
79
|
componentDidLoad() {
|
|
55
80
|
this.hasLoaded = true;
|
|
56
81
|
this.triggerIconColorWarning();
|
|
57
82
|
}
|
|
83
|
+
componentWillRender() {
|
|
84
|
+
var _a;
|
|
85
|
+
const index = this.getTabElements().indexOf(this.host.shadowRoot.activeElement);
|
|
86
|
+
this.tabWithFocus =
|
|
87
|
+
index === -1
|
|
88
|
+
? undefined
|
|
89
|
+
: {
|
|
90
|
+
id: (_a = this.renderedTabs[index]) === null || _a === void 0 ? void 0 : _a.id,
|
|
91
|
+
button: this.getTabElements()[index],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
58
94
|
async componentDidRender() {
|
|
95
|
+
this.restoreFocus();
|
|
96
|
+
this.renderedTabs = this.tabs;
|
|
97
|
+
this.setUpReordering();
|
|
59
98
|
const isLaidOutAgain = this.isLaidOutAgain;
|
|
60
99
|
this.isLaidOutAgain = false;
|
|
61
100
|
await this.revealActiveTab(!this.hasLoaded || isLaidOutAgain ? 'auto' : undefined, isLaidOutAgain);
|
|
62
101
|
}
|
|
63
102
|
render() {
|
|
64
103
|
const tabStop = findTabStop(this.tabs, this.tabs.findIndex((tab) => tab.active), this.getNavigationOptions());
|
|
65
|
-
return (h("div", { key: '
|
|
104
|
+
return (h("div", { key: 'dc7667c302c9f0e6646fde68910a7db307df4981', role: "tablist", "aria-orientation": this.getOrientation(), onKeyDown: this.handleKeyDown }, h("limel-scroller", { key: 'bedbb5b569822a394582a7f1c3e108206d230912', orientation: this.getOrientation() }, this.tabs.map((tab, index) => this.renderTabOrMovableTab(tab, index, index === tabStop)))));
|
|
66
105
|
}
|
|
67
106
|
tabsChanged(newTabs = [], oldTabs = []) {
|
|
68
107
|
const newIds = newTabs.map((tab) => tab.id);
|
|
@@ -70,6 +109,11 @@ export class TabBar {
|
|
|
70
109
|
if (isEqual(newIds, oldIds)) {
|
|
71
110
|
return;
|
|
72
111
|
}
|
|
112
|
+
const idsAfterReorder = this.tabIdsAfterReorder;
|
|
113
|
+
this.tabIdsAfterReorder = undefined;
|
|
114
|
+
if (isEqual(newIds, idsAfterReorder)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
73
117
|
this.revealedTabId = undefined;
|
|
74
118
|
}
|
|
75
119
|
orientationChanged() {
|
|
@@ -82,11 +126,41 @@ export class TabBar {
|
|
|
82
126
|
getNavigationOptions() {
|
|
83
127
|
return { orientation: this.getOrientation(), wrap: true };
|
|
84
128
|
}
|
|
129
|
+
restoreFocus() {
|
|
130
|
+
var _a;
|
|
131
|
+
const tabWithFocus = this.tabWithFocus;
|
|
132
|
+
this.tabWithFocus = undefined;
|
|
133
|
+
if (!tabWithFocus || tabWithFocus.button.isConnected) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const index = this.tabs.findIndex((tab) => tab.id === tabWithFocus.id);
|
|
137
|
+
(_a = this.getTabElements()[index]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
138
|
+
}
|
|
85
139
|
getTabElements() {
|
|
86
140
|
return [
|
|
87
141
|
...this.host.shadowRoot.querySelectorAll('button[role="tab"]'),
|
|
88
142
|
];
|
|
89
143
|
}
|
|
144
|
+
canReorderTabs() {
|
|
145
|
+
return this.allowTabReorder && this.tabs.length > 1;
|
|
146
|
+
}
|
|
147
|
+
setUpReordering() {
|
|
148
|
+
var _a, _b;
|
|
149
|
+
if (!this.canReorderTabs()) {
|
|
150
|
+
(_a = this.dragToReorder) === null || _a === void 0 ? void 0 : _a.teardown();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const scroller = this.host.shadowRoot.querySelector('limel-scroller');
|
|
154
|
+
if (!scroller) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
(_b = this.dragToReorder) !== null && _b !== void 0 ? _b : (this.dragToReorder = new DragToReorder({
|
|
158
|
+
draggable: '[data-reorder-id]',
|
|
159
|
+
revertDrop: true,
|
|
160
|
+
onReorder: this.handleReorder,
|
|
161
|
+
}));
|
|
162
|
+
this.dragToReorder.setup(scroller, this.getOrientation());
|
|
163
|
+
}
|
|
90
164
|
/**
|
|
91
165
|
* A tab that is activated by the user receives focus, and the scroller
|
|
92
166
|
* reveals what receives focus. This is for a tab that becomes active
|
|
@@ -122,8 +196,11 @@ export class TabBar {
|
|
|
122
196
|
if (!isNavigationKey(event, options)) {
|
|
123
197
|
return;
|
|
124
198
|
}
|
|
125
|
-
event.preventDefault();
|
|
126
199
|
const current = this.getTabElements().indexOf(event.target);
|
|
200
|
+
if (current === -1) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
event.preventDefault();
|
|
127
204
|
this.activateTab(findNavigationTarget(this.tabs, event.key, current, options));
|
|
128
205
|
}
|
|
129
206
|
activateTab(index) {
|
|
@@ -158,8 +235,16 @@ export class TabBar {
|
|
|
158
235
|
}
|
|
159
236
|
return (h("limel-icon", { name: name, style: style, size: "small", "aria-hidden": "true" }));
|
|
160
237
|
}
|
|
238
|
+
renderTabOrMovableTab(tab, index, isTabStop) {
|
|
239
|
+
if (!this.canReorderTabs()) {
|
|
240
|
+
return this.renderTab(tab, index, isTabStop);
|
|
241
|
+
}
|
|
242
|
+
return (h("div", { key: tab.id, role: "presentation", "data-reorder-id": tab.id }, this.renderTab(tab, index, isTabStop), h("limel-drag-handle", { "aria-hidden": "true", dragDirection: this.getOrientation(), tooltipOpenDirection: this.getOrientation() === 'vertical'
|
|
243
|
+
? 'right'
|
|
244
|
+
: 'bottom' })));
|
|
245
|
+
}
|
|
161
246
|
renderTab(tab, index, isTabStop) {
|
|
162
|
-
return (h("button", { role: "tab", "aria-selected": tab.active ? 'true' : 'false', tabindex: isTabStop ? 0 : -1, onClick: () => this.activateTab(index) }, h("span", { class: "content" }, this.renderIcon(tab), h("span", { class: "text" }, tab.text), tab.badge ? h("limel-badge", { label: tab.badge }) : '')));
|
|
247
|
+
return (h("button", { key: tab.id, role: "tab", "aria-selected": tab.active ? 'true' : 'false', tabindex: isTabStop ? 0 : -1, onClick: () => this.activateTab(index) }, h("span", { class: "content" }, this.renderIcon(tab), h("span", { class: "text" }, tab.text), tab.badge ? h("limel-badge", { label: tab.badge }) : '')));
|
|
163
248
|
}
|
|
164
249
|
triggerIconColorWarning() {
|
|
165
250
|
if (this.tabs.some((tab) => tab.iconColor)) {
|
|
@@ -224,6 +309,26 @@ export class TabBar {
|
|
|
224
309
|
"reflect": true,
|
|
225
310
|
"attribute": "orientation",
|
|
226
311
|
"defaultValue": "'horizontal'"
|
|
312
|
+
},
|
|
313
|
+
"allowTabReorder": {
|
|
314
|
+
"type": "boolean",
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "boolean",
|
|
318
|
+
"resolved": "boolean",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": "Set to `true` to let the user reorder the tabs by dragging them. Listen\nfor `reorderTab` and give the tab bar the tabs in their new order."
|
|
326
|
+
},
|
|
327
|
+
"getter": false,
|
|
328
|
+
"setter": false,
|
|
329
|
+
"reflect": true,
|
|
330
|
+
"attribute": "allow-tab-reorder",
|
|
331
|
+
"defaultValue": "false"
|
|
227
332
|
}
|
|
228
333
|
};
|
|
229
334
|
}
|
|
@@ -250,6 +355,28 @@ export class TabBar {
|
|
|
250
355
|
}
|
|
251
356
|
}
|
|
252
357
|
}
|
|
358
|
+
}, {
|
|
359
|
+
"method": "reorderTab",
|
|
360
|
+
"name": "reorderTab",
|
|
361
|
+
"bubbles": true,
|
|
362
|
+
"cancelable": true,
|
|
363
|
+
"composed": true,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "Emitted when the user has dragged a tab to a new place. The tab bar does\nnot change `tabs` itself. The tab stays where it was until `tabs` is set\nto the tabs in their new order."
|
|
367
|
+
},
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "TabReorderEvent",
|
|
370
|
+
"resolved": "TabReorderEvent",
|
|
371
|
+
"references": {
|
|
372
|
+
"TabReorderEvent": {
|
|
373
|
+
"location": "import",
|
|
374
|
+
"path": "./tab.types",
|
|
375
|
+
"id": "src/components/tab-bar/tab.types.ts::TabReorderEvent",
|
|
376
|
+
"referenceLocation": "TabReorderEvent"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
253
380
|
}];
|
|
254
381
|
}
|
|
255
382
|
static get elementRef() { return "host"; }
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isEqual } from "lodash-es";
|
|
1
2
|
/**
|
|
2
3
|
* Set a tabs `active` state to true in a list of tabs. The previous tab with
|
|
3
4
|
* `active` set to true will have it set to `false` instead.
|
|
@@ -15,3 +16,25 @@ export function setActiveTab(tabs, index) {
|
|
|
15
16
|
result[index] = Object.assign(Object.assign({}, tabs[index]), { active: true });
|
|
16
17
|
return result;
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Describe a move that the user has made, in the tabs that the user made it in.
|
|
21
|
+
*
|
|
22
|
+
* @param tabs - the tabs of the tab bar now
|
|
23
|
+
* @param reorder - the move, as the list of tabs that the user dragged reported
|
|
24
|
+
* it
|
|
25
|
+
* @returns the move, or `undefined` when `tabs` are not the tabs that the user
|
|
26
|
+
* began to drag, since the move would point to another tab then
|
|
27
|
+
*/
|
|
28
|
+
export function getTabReorder(tabs, reorder) {
|
|
29
|
+
const { order, fromIndex, toIndex } = reorder;
|
|
30
|
+
const isATab = (index) => index >= 0 && index < tabs.length;
|
|
31
|
+
if (!isATab(fromIndex) || !isATab(toIndex)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const orderBeforeTheMove = [...order];
|
|
35
|
+
orderBeforeTheMove.splice(fromIndex, 0, ...orderBeforeTheMove.splice(toIndex, 1));
|
|
36
|
+
if (!isEqual(orderBeforeTheMove, tabs.map(({ id }) => String(id)))) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return { tab: tabs[fromIndex], fromIndex, toIndex };
|
|
40
|
+
}
|