@limetech/lime-elements 40.5.4 → 40.6.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/{adapt-color-contrast-Beo1IEl_.js → adapt-color-contrast-h6iwOfZd.js} +1 -1
- package/dist/cjs/{checkbox.template-BPk8WkQF.js → checkbox.template-CoNVC4Nf.js} +2 -2
- package/dist/cjs/{files-DI4jItxi.js → files-DpGigQ8k.js} +1 -1
- package/dist/cjs/{format-bytes-CpUKKU86.js → format-bytes-WTHVI718.js} +1 -4
- package/dist/cjs/{hotkeys-BtR8uxvl.js → hotkeys-D761KWnZ.js} +1 -0
- package/dist/cjs/{image-resize-CG2fitJT.js → image-resize-JlRLB97I.js} +1 -0
- package/dist/cjs/{image.template-DY7qwbuy.js → image.template-DlF-f23b.js} +1 -1
- package/dist/cjs/{index--B6-r0uo.js → index-BlsqxTB1.js} +1 -7
- package/dist/cjs/{index-ETPz91V5.js → index-zZvs6xK-.js} +9382 -9504
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{isArrayLikeObject-U2Ddbw4n.js → isArrayLikeObject-BhSkOTkw.js} +17 -0
- package/dist/cjs/{language-CaqPKPyW.js → language-v-MMS6ym.js} +1 -1
- package/dist/cjs/lime-elements.cjs.js +2 -2
- package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +2 -2
- package/dist/cjs/limel-action-bar_3.cjs.entry.js +20 -18
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +5 -5
- package/dist/cjs/limel-badge.cjs.entry.js +3 -3
- package/dist/cjs/limel-banner.cjs.entry.js +2 -2
- package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +80 -80
- package/dist/cjs/limel-button-group.cjs.entry.js +3 -3
- package/dist/cjs/limel-button.cjs.entry.js +4 -4
- package/dist/cjs/limel-callout.cjs.entry.js +6 -6
- package/dist/cjs/limel-card.cjs.entry.js +8 -7
- package/dist/cjs/limel-chart.cjs.entry.js +5 -5
- package/dist/cjs/limel-checkbox.cjs.entry.js +12 -10
- package/dist/cjs/limel-chip-set.cjs.entry.js +30 -39
- package/dist/cjs/limel-chip_2.cjs.entry.js +9 -9
- package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-diff.cjs.entry.js +25 -28
- package/dist/cjs/limel-code-editor.cjs.entry.js +17 -12
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +8 -8
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +3 -3
- package/dist/cjs/limel-color-picker.cjs.entry.js +6 -5
- package/dist/cjs/limel-config.cjs.entry.js +3 -3
- package/dist/cjs/limel-date-picker.cjs.entry.js +8 -11
- package/dist/cjs/limel-dialog.cjs.entry.js +6 -9
- package/dist/cjs/limel-dock-button.cjs.entry.js +6 -11
- package/dist/cjs/limel-dock.cjs.entry.js +3 -3
- package/dist/cjs/limel-drag-handle.cjs.entry.js +6 -6
- package/dist/cjs/limel-dynamic-label.cjs.entry.js +1 -1
- package/dist/cjs/limel-email-viewer.cjs.entry.js +11 -17
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +11 -12
- package/dist/cjs/limel-file-viewer.cjs.entry.js +1099 -1147
- package/dist/cjs/limel-file.cjs.entry.js +17 -16
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +100 -94
- package/dist/cjs/limel-flex-container.cjs.entry.js +2 -2
- package/dist/cjs/limel-form.cjs.entry.js +67 -68
- package/dist/cjs/limel-grid.cjs.entry.js +2 -2
- package/dist/cjs/limel-header.cjs.entry.js +2 -2
- package/dist/cjs/limel-help-content.cjs.entry.js +2 -2
- package/dist/cjs/limel-help.cjs.entry.js +3 -3
- package/dist/cjs/limel-helper-line_3.cjs.entry.js +12 -14
- package/dist/cjs/limel-hotkey_4.cjs.entry.js +23 -23
- package/dist/cjs/limel-icon-button.cjs.entry.js +4 -4
- package/dist/cjs/limel-icon.cjs.entry.js +15 -13
- package/dist/cjs/limel-info-tile.cjs.entry.js +10 -10
- package/dist/cjs/limel-list-item.cjs.entry.js +10 -10
- package/dist/cjs/limel-markdown.cjs.entry.js +50 -23
- package/dist/cjs/limel-masonry-layout.cjs.entry.js +6 -5
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +3 -3
- package/dist/cjs/limel-pagination-jump.cjs.entry.js +17 -15
- package/dist/cjs/limel-pagination.cjs.entry.js +10 -9
- package/dist/cjs/limel-picker.cjs.entry.js +31 -29
- package/dist/cjs/limel-popover_2.cjs.entry.js +25 -21
- package/dist/cjs/limel-profile-picture.cjs.entry.js +12 -11
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js +11 -10
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +476 -408
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +2 -2
- package/dist/cjs/limel-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/limel-scroller.cjs.entry.js +180 -0
- package/dist/cjs/limel-select.cjs.entry.js +17 -17
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +18 -27
- package/dist/cjs/limel-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/limel-split-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js +3 -3
- package/dist/cjs/limel-tab-bar.cjs.entry.js +66 -97
- package/dist/cjs/limel-tab-panel.cjs.entry.js +12 -9
- package/dist/cjs/limel-table.cjs.entry.js +527 -106
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +15 -14
- package/dist/cjs/limel-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{make-enter-clickable-NuTMC9MU.js → make-enter-clickable-BZHEWIJD.js} +19 -12
- package/dist/cjs/markdown-exporter-C-UW43FF.js +6210 -0
- package/dist/cjs/{markdown-parser-YH5HSSgF.js → markdown-parser-ssDij8_l.js} +603 -870
- package/dist/cjs/{moment-CqRdiK10.js → moment-Cfsz2WF1.js} +1062 -833
- package/dist/cjs/{random-string-BTzDB2ee.js → random-string-CFCtFh5l.js} +1 -0
- package/dist/cjs/{render-list-component-5ZKWpCnM.js → render-list-component-BtAliHQp.js} +3 -5
- package/dist/cjs/{sv-BSR4W58y.js → sv-Co78RX70.js} +31 -3
- package/dist/cjs/{translations-DFFpR6AZ.js → translations-CNTWud2a.js} +5 -8
- package/dist/collection/collection-manifest.json +1 -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-item.js +8 -7
- 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 +6 -5
- 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 +2 -2
- 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 +6 -5
- package/dist/collection/components/checkbox/checkbox.js +9 -7
- package/dist/collection/components/checkbox/checkbox.template.js +1 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip-set/chip-set-input-helpers.js +18 -21
- package/dist/collection/components/chip-set/chip-set.js +7 -13
- package/dist/collection/components/circular-progress/circular-progress.js +1 -1
- package/dist/collection/components/code-diff/code-diff.js +19 -22
- package/dist/collection/components/code-diff/diff-engine.js +2 -2
- package/dist/collection/components/code-editor/code-editor.js +8 -3
- 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 +5 -4
- package/dist/collection/components/config/config.js +2 -2
- package/dist/collection/components/date-picker/date-picker.js +3 -6
- package/dist/collection/components/date-picker/flatpickr-adapter/deferred-destroy.js +4 -3
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
- package/dist/collection/components/date-picker/pickers/month-picker.js +40 -36
- package/dist/collection/components/date-picker/pickers/quarter-picker.js +35 -30
- package/dist/collection/components/date-picker/pickers/year-picker.js +16 -20
- package/dist/collection/components/dialog/dialog.js +4 -7
- package/dist/collection/components/dock/dock-button/dock-button.js +4 -9
- 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-loader.js +14 -10
- package/dist/collection/components/email-viewer/email-viewer.js +1 -1
- package/dist/collection/components/email-viewer/sanitize-email-html.js +1 -4
- package/dist/collection/components/email-viewer/split-email-address-list.js +4 -10
- package/dist/collection/components/file/file.js +11 -10
- package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
- package/dist/collection/components/file-input/file-input.js +7 -8
- package/dist/collection/components/file-viewer/file-viewer.js +12 -9
- package/dist/collection/components/flex-container/flex-container.js +1 -1
- package/dist/collection/components/form/fields/schema-field.js +1 -1
- package/dist/collection/components/form/form.js +2 -5
- package/dist/collection/components/form/form.test-schemas.js +8 -10
- package/dist/collection/components/form/templates/array-field.js +7 -9
- package/dist/collection/components/form/templates/common.js +19 -19
- package/dist/collection/components/form/templates/object-field.js +1 -1
- package/dist/collection/components/form/validation-display.js +2 -2
- package/dist/collection/components/form/validators/format.js +1 -0
- package/dist/collection/components/form/widgets/code-editor.js +6 -9
- package/dist/collection/components/form/widgets/date-picker.js +1 -3
- 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 +3 -3
- package/dist/collection/components/hotkey/hotkey.js +1 -1
- package/dist/collection/components/icon/icon.js +11 -9
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +9 -9
- package/dist/collection/components/input-field/input-field.js +11 -11
- package/dist/collection/components/list/list-renderer.js +5 -7
- package/dist/collection/components/list/list.js +2 -2
- 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/hydrate-custom-elements.js +6 -5
- package/dist/collection/components/markdown/image-intersection-observer.js +9 -8
- package/dist/collection/components/markdown/image-markdown-plugin.js +9 -7
- package/dist/collection/components/markdown/link-markdown-plugin.js +11 -10
- package/dist/collection/components/markdown/markdown-exporter.js +186 -0
- package/dist/collection/components/markdown/markdown-parser.js +2 -3
- package/dist/collection/components/markdown/markdown.js +59 -6
- package/dist/collection/components/markdown/remove-empty-paragraphs-plugin.js +4 -5
- package/dist/collection/components/masonry-layout/masonry-layout.js +5 -4
- package/dist/collection/components/menu/menu.js +48 -46
- package/dist/collection/components/menu-list/menu-list-renderer.js +8 -8
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +6 -8
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/pagination/jump/pagination-jump.js +13 -11
- package/dist/collection/components/pagination/pagination.js +5 -4
- package/dist/collection/components/picker/picker.js +25 -23
- package/dist/collection/components/popover/popover.js +13 -10
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/contains.js +9 -8
- package/dist/collection/components/portal/portal.js +16 -16
- package/dist/collection/components/profile-picture/profile-picture.js +4 -3
- package/dist/collection/components/progress-flow/progress-flow.js +10 -9
- 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/scroller/scroller.css +317 -0
- package/dist/collection/components/scroller/scroller.js +284 -0
- package/dist/collection/components/select/select.js +13 -11
- package/dist/collection/components/select/select.template.js +1 -3
- package/dist/collection/components/slider/get-percentage-class.js +9 -18
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.css +7 -289
- package/dist/collection/components/tab-bar/tab-bar.js +59 -104
- package/dist/collection/components/tab-panel/tab-panel.js +11 -8
- package/dist/collection/components/table/columns.js +1 -3
- package/dist/collection/components/table/element-pool.js +1 -1
- package/dist/collection/components/table/table-selection.js +6 -5
- package/dist/collection/components/table/table.css +15 -17
- package/dist/collection/components/table/table.js +44 -39
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +11 -10
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/list-utils.js +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +6 -10
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/inserter.js +37 -40
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js +2 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link/link-plugin.js +21 -20
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/menu-state-tracking-plugin.js +6 -5
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory-helpers/detect-trigger-removal.js +15 -14
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +40 -34
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/text-editor/utils/metadata-utils.js +1 -1
- package/dist/collection/components/text-editor/utils/plugin-factory.js +3 -3
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/global/icon-cache/factory.js +2 -3
- package/dist/collection/global/icon-cache/in-memory-icon-cache.js +2 -0
- package/dist/collection/global/translations.js +1 -3
- package/dist/collection/translations/fr.js +3 -3
- package/dist/collection/util/adapt-color-contrast.js +1 -1
- package/dist/collection/util/files.js +1 -1
- package/dist/collection/util/format-bytes.js +1 -4
- package/dist/collection/util/hotkeys.js +1 -0
- package/dist/collection/util/image-resize.js +1 -0
- package/dist/collection/util/language.js +1 -1
- package/dist/collection/util/make-enter-clickable.js +19 -12
- package/dist/collection/util/random-string.js +1 -0
- package/dist/collection/util/render-list-component.js +2 -4
- package/dist/esm/{adapt-color-contrast-Dgcw_h7C.js → adapt-color-contrast-BQoih_t0.js} +1 -1
- package/dist/esm/{checkbox.template-Cx_3u92S.js → checkbox.template-IDyv2bgn.js} +2 -2
- package/dist/esm/{files-DnkFEKoB.js → files-CKnLqPDj.js} +1 -1
- package/dist/esm/{format-bytes-u_sd2HMb.js → format-bytes-24yUSW40.js} +1 -4
- package/dist/esm/{hotkeys-BxrRWYts.js → hotkeys-DjmlD0Mw.js} +1 -0
- package/dist/esm/{image-resize-BTSG--2-.js → image-resize-Dv2HOgWN.js} +1 -0
- package/dist/esm/{image.template-wqMwmOF-.js → image.template-BGjw97m_.js} +1 -1
- package/dist/esm/{index-CbciMfiU.js → index-BN64nlbO.js} +9369 -9505
- package/dist/esm/{index-Bnc9lzk2.js → index-BU9IJqli.js} +1 -7
- package/dist/esm/index.js +1 -1
- package/dist/esm/{isArrayLikeObject-CJB8HbtH.js → isArrayLikeObject-tmUOLOWr.js} +17 -1
- package/dist/esm/{language-C3hECvXE.js → language-ChagAaNf.js} +1 -1
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-3d-hover-effect-glow.entry.js +2 -2
- package/dist/esm/limel-action-bar_3.entry.js +20 -18
- package/dist/esm/limel-ai-avatar.entry.js +5 -5
- package/dist/esm/limel-badge.entry.js +3 -3
- package/dist/esm/limel-banner.entry.js +2 -2
- package/dist/esm/limel-breadcrumbs_6.entry.js +80 -80
- package/dist/esm/limel-button-group.entry.js +3 -3
- package/dist/esm/limel-button.entry.js +4 -4
- package/dist/esm/limel-callout.entry.js +6 -6
- package/dist/esm/limel-card.entry.js +8 -7
- package/dist/esm/limel-chart.entry.js +5 -5
- package/dist/esm/limel-checkbox.entry.js +12 -10
- package/dist/esm/limel-chip-set.entry.js +30 -39
- package/dist/esm/limel-chip_2.entry.js +9 -9
- package/dist/esm/limel-circular-progress.entry.js +2 -2
- package/dist/esm/limel-code-diff.entry.js +25 -28
- package/dist/esm/limel-code-editor.entry.js +17 -12
- package/dist/esm/limel-collapsible-section.entry.js +8 -8
- package/dist/esm/limel-color-picker-palette.entry.js +3 -3
- package/dist/esm/limel-color-picker.entry.js +6 -5
- package/dist/esm/limel-config.entry.js +3 -3
- package/dist/esm/limel-date-picker.entry.js +8 -11
- package/dist/esm/limel-dialog.entry.js +6 -9
- package/dist/esm/limel-dock-button.entry.js +6 -11
- package/dist/esm/limel-dock.entry.js +3 -3
- package/dist/esm/limel-drag-handle.entry.js +6 -6
- package/dist/esm/limel-dynamic-label.entry.js +1 -1
- package/dist/esm/limel-email-viewer.entry.js +11 -17
- package/dist/esm/limel-file-dropzone_2.entry.js +11 -12
- package/dist/esm/limel-file-viewer.entry.js +1099 -1147
- package/dist/esm/limel-file.entry.js +17 -16
- package/dist/esm/limel-flatpickr-adapter.entry.js +100 -94
- package/dist/esm/limel-flex-container.entry.js +2 -2
- package/dist/esm/limel-form.entry.js +66 -67
- package/dist/esm/limel-grid.entry.js +2 -2
- package/dist/esm/limel-header.entry.js +2 -2
- package/dist/esm/limel-help-content.entry.js +2 -2
- package/dist/esm/limel-help.entry.js +3 -3
- package/dist/esm/limel-helper-line_3.entry.js +12 -14
- package/dist/esm/limel-hotkey_4.entry.js +23 -23
- package/dist/esm/limel-icon-button.entry.js +4 -4
- package/dist/esm/limel-icon.entry.js +15 -13
- package/dist/esm/limel-info-tile.entry.js +10 -10
- package/dist/esm/limel-list-item.entry.js +10 -10
- package/dist/esm/limel-markdown.entry.js +50 -23
- package/dist/esm/limel-masonry-layout.entry.js +6 -5
- package/dist/esm/limel-menu-item-meta.entry.js +3 -3
- package/dist/esm/limel-pagination-jump.entry.js +17 -15
- package/dist/esm/limel-pagination.entry.js +10 -9
- package/dist/esm/limel-picker.entry.js +31 -29
- package/dist/esm/limel-popover_2.entry.js +25 -21
- package/dist/esm/limel-profile-picture.entry.js +12 -11
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +11 -10
- package/dist/esm/limel-prosemirror-adapter.entry.js +476 -408
- package/dist/esm/limel-radio-button-group.entry.js +2 -2
- package/dist/esm/limel-radio-button.entry.js +3 -3
- package/dist/esm/limel-scroller.entry.js +178 -0
- package/dist/esm/limel-select.entry.js +17 -17
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +18 -27
- package/dist/esm/limel-snackbar.entry.js +5 -5
- package/dist/esm/limel-split-button.entry.js +1 -1
- package/dist/esm/limel-switch.entry.js +3 -3
- package/dist/esm/limel-tab-bar.entry.js +66 -97
- package/dist/esm/limel-tab-panel.entry.js +12 -9
- package/dist/esm/limel-table.entry.js +527 -106
- package/dist/esm/limel-text-editor-link-menu.entry.js +15 -14
- package/dist/esm/limel-text-editor.entry.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{make-enter-clickable-BgTwPGeH.js → make-enter-clickable-CIf8aGSd.js} +19 -12
- package/dist/esm/markdown-exporter-DblYRMhY.js +6208 -0
- package/dist/esm/{markdown-parser-DrxxGLF5.js → markdown-parser-CAPDx7i8.js} +530 -813
- package/dist/esm/{moment-DQRNe8qq.js → moment-_DadZLWp.js} +1062 -833
- package/dist/esm/{random-string-JbKhhoXs.js → random-string-BrjD-ITe.js} +1 -0
- package/dist/esm/{render-list-component-cicbMp0l.js → render-list-component-J1IzNpbv.js} +3 -5
- package/dist/esm/{sv-CY-6-yEp.js → sv-DpsDSi7k.js} +31 -3
- package/dist/esm/{translations-DMtX4tTX.js → translations-Y4i8PVc9.js} +5 -8
- package/dist/lime-elements/index.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-3916b316.entry.js → p-03cb609e.entry.js} +1 -1
- package/dist/lime-elements/p-05038bbb.entry.js +1 -0
- package/dist/lime-elements/{p-835149c4.entry.js → p-0d6925f4.entry.js} +1 -1
- package/dist/lime-elements/p-0e13ec91.entry.js +1 -0
- package/dist/lime-elements/p-159603cf.entry.js +159 -0
- package/dist/lime-elements/p-22fd1c87.entry.js +1 -0
- package/dist/lime-elements/p-24yUSW40.js +1 -0
- package/dist/lime-elements/{p-f717cd7a.entry.js → p-271662d4.entry.js} +1 -1
- package/dist/lime-elements/{p-c2a60508.entry.js → p-29c73bdf.entry.js} +1 -1
- package/dist/lime-elements/{p-deceda00.entry.js → p-2a902e77.entry.js} +1 -1
- package/dist/lime-elements/{p-d0cec424.entry.js → p-2b033dfa.entry.js} +1 -1
- package/dist/lime-elements/{p-acba5700.entry.js → p-2b2253d4.entry.js} +1 -1
- package/dist/lime-elements/p-2e33d2a4.entry.js +1 -0
- package/dist/lime-elements/p-31226737.entry.js +13 -0
- package/dist/lime-elements/{p-36ce4fbc.entry.js → p-31f314e6.entry.js} +1 -1
- package/dist/lime-elements/p-32a050a3.entry.js +1 -0
- package/dist/lime-elements/{p-3735111e.entry.js → p-3cfe0eaf.entry.js} +1 -1
- package/dist/lime-elements/{p-fbcd99a3.entry.js → p-3d3bdf45.entry.js} +1 -1
- package/dist/lime-elements/p-440a0b43.entry.js +1 -0
- package/dist/lime-elements/p-45c39fb4.entry.js +1 -0
- package/dist/lime-elements/p-45fde7a1.entry.js +1 -0
- package/dist/lime-elements/p-48afa6b7.entry.js +1 -0
- package/dist/lime-elements/{p-f04f7c8e.entry.js → p-4a88d365.entry.js} +1 -1
- package/dist/lime-elements/p-4b75e653.entry.js +1 -0
- package/dist/lime-elements/p-4dfd1962.entry.js +67 -0
- package/dist/lime-elements/{p-5698e493.entry.js → p-4ecbc9f4.entry.js} +1 -1
- package/dist/lime-elements/p-5386c629.entry.js +1 -0
- package/dist/lime-elements/{p-2e568c56.entry.js → p-54a9f48f.entry.js} +1 -1
- package/dist/lime-elements/{p-0fba64eb.entry.js → p-5df21b25.entry.js} +2 -2
- package/dist/lime-elements/{p-408c4dcb.entry.js → p-5f5c6e7d.entry.js} +1 -1
- package/dist/lime-elements/{p-052c3bc6.entry.js → p-681cb6de.entry.js} +1 -1
- package/dist/lime-elements/p-6adc7c88.entry.js +1 -0
- package/dist/lime-elements/{p-90df3e1b.entry.js → p-6d9961f7.entry.js} +1 -1
- package/dist/lime-elements/{p-74bd0c1a.entry.js → p-7b4351f6.entry.js} +1 -1
- package/dist/lime-elements/{p-3fd7e8aa.entry.js → p-7eab1341.entry.js} +1 -1
- package/dist/lime-elements/p-80153f45.entry.js +1 -0
- package/dist/lime-elements/{p-35fa1063.entry.js → p-85318636.entry.js} +1 -1
- package/dist/lime-elements/p-8988b7e1.entry.js +1 -0
- package/dist/lime-elements/{p-4ffbfc79.entry.js → p-8ac79ef5.entry.js} +1 -1
- package/dist/lime-elements/{p-4902fb3f.entry.js → p-9218fa6a.entry.js} +1 -1
- package/dist/lime-elements/p-92669910.entry.js +1 -0
- package/dist/lime-elements/{p-38b09f87.entry.js → p-9415411e.entry.js} +1 -1
- package/dist/lime-elements/p-95ccd9e7.entry.js +1 -0
- package/dist/lime-elements/{p-cb407bef.entry.js → p-9afa4721.entry.js} +1 -1
- package/dist/lime-elements/{p-54dcf46f.entry.js → p-9c8c2fb7.entry.js} +1 -1
- package/dist/lime-elements/{p-B8hoCfhT.js → p-B3YP9GOq.js} +1 -1
- package/dist/lime-elements/{p-Dgcw_h7C.js → p-BQoih_t0.js} +1 -1
- package/dist/lime-elements/{p-Bnc9lzk2.js → p-BU9IJqli.js} +1 -1
- package/dist/lime-elements/{p-CGVVDGcv.js → p-Bkvc4sus.js} +1 -1
- package/dist/lime-elements/p-Bvyt2bmV.js +1 -0
- package/dist/lime-elements/{p-BgTwPGeH.js → p-CIf8aGSd.js} +1 -1
- package/dist/lime-elements/{p-C3hECvXE.js → p-ChagAaNf.js} +1 -1
- package/dist/lime-elements/p-DTcfed02.js +3 -0
- package/dist/lime-elements/p-DWMfAkOE.js +1 -0
- package/dist/lime-elements/{p-BY85K-4J.js → p-DqQOawxc.js} +1 -1
- package/dist/lime-elements/p-I0PrvthC.js +7 -0
- package/dist/lime-elements/p-N9vxZMhe.js +1 -0
- package/dist/lime-elements/{p-DsDkl4Sy.js → p-ZDFVISfu.js} +3 -3
- package/dist/lime-elements/p-_UXAljNc.js +1 -0
- package/dist/lime-elements/p-a1c69e0c.entry.js +1 -0
- package/dist/lime-elements/{p-2daf0482.entry.js → p-a1d1470c.entry.js} +1 -1
- package/dist/lime-elements/{p-cef66e53.entry.js → p-a2e6f16e.entry.js} +1 -1
- package/dist/lime-elements/p-a550ba18.entry.js +1 -0
- package/dist/lime-elements/{p-d146feda.entry.js → p-a65eb58e.entry.js} +1 -1
- package/dist/lime-elements/p-ab8021b9.entry.js +1 -0
- package/dist/lime-elements/{p-03fb2603.entry.js → p-b22b52a1.entry.js} +1 -1
- package/dist/lime-elements/p-b6c0dc91.entry.js +23 -0
- package/dist/lime-elements/{p-c2a3ca7c.entry.js → p-b6d39581.entry.js} +1 -1
- package/dist/lime-elements/{p-8475a3b8.entry.js → p-c439b68b.entry.js} +1 -1
- package/dist/lime-elements/p-d19c7a3a.entry.js +1 -0
- package/dist/lime-elements/{p-7cbf50fc.entry.js → p-d1e5dd12.entry.js} +1 -1
- package/dist/lime-elements/p-de4719a6.entry.js +1 -0
- package/dist/lime-elements/{p-b81a2728.entry.js → p-e02e2c5f.entry.js} +1 -1
- package/dist/lime-elements/{p-d351b9ae.entry.js → p-e6a34047.entry.js} +1 -1
- package/dist/lime-elements/p-eF09GxA_.js +1 -0
- package/dist/lime-elements/{p-8fa9c9ea.entry.js → p-ee719744.entry.js} +1 -1
- package/dist/lime-elements/{p-d3bd4b80.entry.js → p-f04e2897.entry.js} +3 -3
- package/dist/lime-elements/p-f3cae1e7.entry.js +1 -0
- package/dist/lime-elements/{p-8115da75.entry.js → p-f4a0b1bc.entry.js} +1 -1
- package/dist/lime-elements/{p-4855dc9b.entry.js → p-f82f72e7.entry.js} +1 -1
- package/dist/lime-elements/{p-2d84ea04.entry.js → p-f97ec7a5.entry.js} +1 -1
- package/dist/lime-elements/{p-21109d9b.entry.js → p-fdd674fc.entry.js} +1 -1
- package/dist/lime-elements/{p-459eea13.entry.js → p-fdec09e9.entry.js} +1 -1
- package/dist/lime-elements/{p-2f57c3fa.entry.js → p-fe492ff3.entry.js} +1 -1
- package/dist/lime-elements/{p-65cded0e.entry.js → p-ff1a8b2e.entry.js} +1 -1
- package/dist/types/components/chip-set/chip-set-input-helpers.d.ts +1 -1
- package/dist/types/components/markdown/markdown-exporter.d.ts +15 -0
- package/dist/types/components/markdown/markdown.d.ts +19 -0
- package/dist/types/components/pagination/jump/pagination-jump.d.ts +1 -1
- package/dist/types/components/scroller/scroller.d.ts +67 -0
- package/dist/types/components/tab-bar/tab-bar.d.ts +13 -16
- package/dist/types/components.d.ts +138 -0
- package/dist/types/global/icon-cache/factory.d.ts +2 -2
- package/dist/types/global/shared-types/custom-element.types.d.ts +25 -0
- package/dist/types/global/translations.d.ts +2 -2
- package/package.json +18 -12
- package/dist/lime-elements/p-05afb316.entry.js +0 -1
- package/dist/lime-elements/p-10594468.entry.js +0 -1
- package/dist/lime-elements/p-19344984.entry.js +0 -13
- package/dist/lime-elements/p-1e93473a.entry.js +0 -1
- package/dist/lime-elements/p-26c5c6b9.entry.js +0 -1
- package/dist/lime-elements/p-452b9b01.entry.js +0 -1
- package/dist/lime-elements/p-4aae63bd.entry.js +0 -1
- package/dist/lime-elements/p-507cc8a1.entry.js +0 -159
- package/dist/lime-elements/p-531b6a64.entry.js +0 -1
- package/dist/lime-elements/p-54793c06.entry.js +0 -1
- package/dist/lime-elements/p-5d974afa.entry.js +0 -1
- package/dist/lime-elements/p-66b125f2.entry.js +0 -1
- package/dist/lime-elements/p-6d5b23ad.entry.js +0 -1
- package/dist/lime-elements/p-7e212fa7.entry.js +0 -1
- package/dist/lime-elements/p-82696d24.entry.js +0 -1
- package/dist/lime-elements/p-9ac39039.entry.js +0 -1
- package/dist/lime-elements/p-9b631363.entry.js +0 -1
- package/dist/lime-elements/p-C9xHOCE_.js +0 -7
- package/dist/lime-elements/p-DMNtoJ8I.js +0 -1
- package/dist/lime-elements/p-DQJU9gzh.js +0 -1
- package/dist/lime-elements/p-DpJgXIWf.js +0 -1
- package/dist/lime-elements/p-a1de9bbe.entry.js +0 -1
- package/dist/lime-elements/p-a71f6e87.entry.js +0 -67
- package/dist/lime-elements/p-bd7b3f8e.entry.js +0 -1
- package/dist/lime-elements/p-be8610ff.entry.js +0 -1
- package/dist/lime-elements/p-c72e5007.entry.js +0 -1
- package/dist/lime-elements/p-cafec335.entry.js +0 -1
- package/dist/lime-elements/p-d6dadc61.entry.js +0 -1
- package/dist/lime-elements/p-d93b7b9f.entry.js +0 -23
- package/dist/lime-elements/p-pk5KIdKH.js +0 -1
- package/dist/lime-elements/p-u_sd2HMb.js +0 -1
- package/dist/lime-elements/p-zo6O9LC9.js +0 -3
- /package/dist/lime-elements/{p-JbKhhoXs.js → p-BrjD-ITe.js} +0 -0
- /package/dist/lime-elements/{p-BxrRWYts.js → p-DjmlD0Mw.js} +0 -0
- /package/dist/lime-elements/{p-BTSG--2-.js → p-Dv2HOgWN.js} +0 -0
|
@@ -37,7 +37,7 @@ export class RadioButtonGroup {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h("limel-list", { key: '
|
|
40
|
+
return (h("limel-list", { key: '1c3fef764fd84f4e84d38a4dbd04f2272fb73775', items: this.createItems(), type: "radio", badgeIcons: this.badgeIcons, maxLinesSecondaryText: this.maxLinesSecondaryText, onChange: this.handleChange }));
|
|
41
41
|
}
|
|
42
42
|
createItems() {
|
|
43
43
|
return this.items.map((option) => {
|
|
@@ -31,12 +31,12 @@ import { Host, h } from "@stencil/core";
|
|
|
31
31
|
*/
|
|
32
32
|
export class RadioButtonComponent {
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '93e5adb101fd866a1c56e0233b32eddef6617a08', class: {
|
|
35
35
|
'boolean-input': true,
|
|
36
36
|
'radio-button': true,
|
|
37
37
|
checked: this.checked,
|
|
38
38
|
disabled: this.disabled,
|
|
39
|
-
} }, h("input", { key: '
|
|
39
|
+
} }, h("input", { key: '816bc49ab2f8bd6fcbaa8d10c7b5250fd64aa044', type: "radio", id: this.id, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("div", { key: 'e4656777d40210f46c5f28deace470a90f41cfdf', class: "box" }), h("label", { key: 'c27a557fea46c0951a0aed27df40a61b30809550', class: "boolean-input-label", htmlFor: this.id }, this.label)));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "limel-radio-button"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/**
|
|
3
|
+
* Note! This file is forwarded via `src/style/exports.scss`
|
|
4
|
+
* and exposed to consumers through the root `index.scss`.
|
|
5
|
+
*
|
|
6
|
+
* Consumers import it using:
|
|
7
|
+
* `@use '@limetech/lime-elements' as lime-elements;`
|
|
8
|
+
*
|
|
9
|
+
* Legacy import paths (`dist/scss/mixins`) are maintained
|
|
10
|
+
* for backward compatibility via copy rules in the Stencil config.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Neutralizes the user-agent styles that browsers apply to `<button>` elements
|
|
14
|
+
* (their default background, border, padding, font, etc.), without stripping
|
|
15
|
+
* the useful defaults that `all: unset;` would also remove
|
|
16
|
+
* (such as `display`, `cursor`, and focus behavior).
|
|
17
|
+
*
|
|
18
|
+
* Prefer this mixin over `all: unset;` on `<button>` elements, then layer
|
|
19
|
+
* the styling you want on top — often one of the `is-*-clickable` mixins.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* This mixin will mask out the content that is close to
|
|
26
|
+
* the edges of a scrollable area.
|
|
27
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
28
|
+
* as an argument for `$direction`.
|
|
29
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
30
|
+
* as an argument for `$direction`.
|
|
31
|
+
*
|
|
32
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
33
|
+
* the size of the fade-out edge effect is the same as the
|
|
34
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
35
|
+
* scrollable area that does not have a padding will fade out before
|
|
36
|
+
* any scrolling has been done.
|
|
37
|
+
* This is why this mixin already adds paddings, which automatically
|
|
38
|
+
* default to the size of the fade-out effect.
|
|
39
|
+
* This size defaults to `1rem`, but to override the size use
|
|
40
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
41
|
+
* when `vertically` argument is set, and use
|
|
42
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
43
|
+
* when `horizontally` argument is set.
|
|
44
|
+
* Of course you can also programmatically increase and decrease the
|
|
45
|
+
* size of these variables for each edge, based on the amount of
|
|
46
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
47
|
+
* to add a custom padding where the mixin is used, to override
|
|
48
|
+
* the paddings that are automatically added by the mixin in the
|
|
49
|
+
* compiled CSS code.
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
53
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
54
|
+
* before using this mixin.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* This mixin creates a cross-browser font stack.
|
|
58
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
59
|
+
* - `monospace` can be used for code.
|
|
60
|
+
*
|
|
61
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
62
|
+
* 1. the consumer documentation in `README.md`, and
|
|
63
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
64
|
+
* in the `<style>` tag of `index.html`.
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* This mixin is a hack, using old CSS syntax
|
|
68
|
+
* to enable you to truncate a piece of text,
|
|
69
|
+
* after a certain number of lines.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* This mixin will add a chessboard background pattern,
|
|
73
|
+
* typically used to visualize transparency.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Make a container resizable by the user.
|
|
77
|
+
* This is used in the documentations and examples
|
|
78
|
+
* of some components, to demonstrate how the component
|
|
79
|
+
* behaves in a resizable container.
|
|
80
|
+
*/
|
|
81
|
+
/**
|
|
82
|
+
* Drag to reorder mixins
|
|
83
|
+
*/
|
|
84
|
+
/**
|
|
85
|
+
* The breakpoints below are used to create responsive designs
|
|
86
|
+
* in Lime's products. Therefore, they are here to get distributed
|
|
87
|
+
* to all components in other private repos, which rely on this `mixins`
|
|
88
|
+
* file, to create consistent styles.
|
|
89
|
+
*
|
|
90
|
+
* :::important
|
|
91
|
+
* In very rare cases you should used media queries!
|
|
92
|
+
* Nowadays, there are many better ways of achieving responsive design
|
|
93
|
+
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
94
|
+
* :::
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Media query mixins for responsive design based on screen width.
|
|
98
|
+
* Note that these mixins do not detect the device type!
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* @prop --limel-scroller-fade-color: The color, as an RGB triplet, that the edges fade into. It should match the background that the scroller is placed on. Defaults to `--contrast-100`.
|
|
102
|
+
* @prop --limel-scroller-content-padding: Padding around the content. It scrolls together with the content. Defaults to `0`.
|
|
103
|
+
*/
|
|
104
|
+
:host(limel-scroller) {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
div.scroller {
|
|
109
|
+
position: relative;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
height: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
div.scroll-area {
|
|
115
|
+
display: flex;
|
|
116
|
+
height: 100%;
|
|
117
|
+
scrollbar-width: none;
|
|
118
|
+
}
|
|
119
|
+
div.scroll-area::-webkit-scrollbar {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
div.scroll-content {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex: 1 0 auto;
|
|
126
|
+
position: relative;
|
|
127
|
+
isolation: isolate;
|
|
128
|
+
padding: var(--limel-scroller-content-padding, 0);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
::slotted(*) {
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
div.scroll-fade,
|
|
136
|
+
div.scroll-button {
|
|
137
|
+
position: absolute;
|
|
138
|
+
transition: transform 0.3s ease-out;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
div.scroll-fade {
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
div.scroll-button {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
}
|
|
150
|
+
div.scroll-button div.arrow-button {
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
border-radius: 0.25rem;
|
|
155
|
+
color: var(--limel-theme-on-surface-color);
|
|
156
|
+
}
|
|
157
|
+
div.scroll-button svg.arrow {
|
|
158
|
+
width: 1rem;
|
|
159
|
+
height: 1rem;
|
|
160
|
+
fill: none;
|
|
161
|
+
stroke: currentColor;
|
|
162
|
+
stroke-width: 3;
|
|
163
|
+
stroke-linecap: round;
|
|
164
|
+
stroke-linejoin: round;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
div.scroller.horizontal div.scroll-area {
|
|
168
|
+
overflow-x: auto;
|
|
169
|
+
overflow-y: hidden;
|
|
170
|
+
}
|
|
171
|
+
div.scroller.horizontal ::slotted(*) {
|
|
172
|
+
scroll-margin-inline: 2.25rem;
|
|
173
|
+
}
|
|
174
|
+
div.scroller.horizontal div.scroll-fade {
|
|
175
|
+
top: 0;
|
|
176
|
+
width: 4rem;
|
|
177
|
+
height: 100%;
|
|
178
|
+
}
|
|
179
|
+
div.scroller.horizontal div.scroll-fade.start {
|
|
180
|
+
left: 0;
|
|
181
|
+
transform: translate3d(-4rem, 0, 0);
|
|
182
|
+
background: linear-gradient(270deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%);
|
|
183
|
+
}
|
|
184
|
+
div.scroller.horizontal div.scroll-fade.end {
|
|
185
|
+
right: 0;
|
|
186
|
+
transform: translate3d(4rem, 0, 0);
|
|
187
|
+
background: linear-gradient(90deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%);
|
|
188
|
+
}
|
|
189
|
+
div.scroller.horizontal div.scroll-button {
|
|
190
|
+
top: 0;
|
|
191
|
+
bottom: 0;
|
|
192
|
+
}
|
|
193
|
+
div.scroller.horizontal div.scroll-button.start {
|
|
194
|
+
left: 0.25rem;
|
|
195
|
+
transform: translate3d(-4rem, 0, 0);
|
|
196
|
+
}
|
|
197
|
+
div.scroller.horizontal div.scroll-button.start svg.arrow {
|
|
198
|
+
transform: rotate(180deg);
|
|
199
|
+
}
|
|
200
|
+
div.scroller.horizontal div.scroll-button.end {
|
|
201
|
+
right: 0.25rem;
|
|
202
|
+
transform: translate3d(4rem, 0, 0);
|
|
203
|
+
}
|
|
204
|
+
div.scroller.horizontal div.scroll-button div.arrow-button {
|
|
205
|
+
width: 1.25rem;
|
|
206
|
+
height: calc(100% - 0.5rem);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
div.scroller.vertical div.scroll-area {
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
overflow-x: hidden;
|
|
212
|
+
overflow-y: auto;
|
|
213
|
+
}
|
|
214
|
+
div.scroller.vertical div.scroll-content {
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
}
|
|
217
|
+
div.scroller.vertical ::slotted(*) {
|
|
218
|
+
scroll-margin-block: 2.25rem;
|
|
219
|
+
}
|
|
220
|
+
div.scroller.vertical div.scroll-fade {
|
|
221
|
+
left: 0;
|
|
222
|
+
width: 100%;
|
|
223
|
+
height: 4rem;
|
|
224
|
+
}
|
|
225
|
+
div.scroller.vertical div.scroll-fade.start {
|
|
226
|
+
top: 0;
|
|
227
|
+
transform: translate3d(0, -4rem, 0);
|
|
228
|
+
background: linear-gradient(0deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%);
|
|
229
|
+
}
|
|
230
|
+
div.scroller.vertical div.scroll-fade.end {
|
|
231
|
+
bottom: 0;
|
|
232
|
+
transform: translate3d(0, 4rem, 0);
|
|
233
|
+
background: linear-gradient(180deg, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0) 0%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 40%, rgba(var(--limel-scroller-fade-color, var(--contrast-100)), 0.8) 100%);
|
|
234
|
+
}
|
|
235
|
+
div.scroller.vertical div.scroll-button {
|
|
236
|
+
left: 0;
|
|
237
|
+
right: 0;
|
|
238
|
+
}
|
|
239
|
+
div.scroller.vertical div.scroll-button.start {
|
|
240
|
+
top: 0.25rem;
|
|
241
|
+
transform: translate3d(0, -4rem, 0);
|
|
242
|
+
}
|
|
243
|
+
div.scroller.vertical div.scroll-button.start svg.arrow {
|
|
244
|
+
transform: rotate(-90deg);
|
|
245
|
+
}
|
|
246
|
+
div.scroller.vertical div.scroll-button.end {
|
|
247
|
+
bottom: 0.25rem;
|
|
248
|
+
transform: translate3d(0, 4rem, 0);
|
|
249
|
+
}
|
|
250
|
+
div.scroller.vertical div.scroll-button.end svg.arrow {
|
|
251
|
+
transform: rotate(90deg);
|
|
252
|
+
}
|
|
253
|
+
div.scroller.vertical div.scroll-button div.arrow-button {
|
|
254
|
+
height: 1.25rem;
|
|
255
|
+
width: calc(100% - 0.5rem);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
div.scroller.can-scroll-to-start div.scroll-fade.start,
|
|
259
|
+
div.scroller.can-scroll-to-start div.scroll-button.start {
|
|
260
|
+
transform: translate3d(0, 0, 0);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
div.scroller.can-scroll-to-end div.scroll-fade.end,
|
|
264
|
+
div.scroller.can-scroll-to-end div.scroll-button.end {
|
|
265
|
+
transform: translate3d(0, 0, 0);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
div.scroller.can-scroll-to-start:not(.can-scroll-to-end) div.scroll-button.end,
|
|
269
|
+
div.scroller.can-scroll-to-end:not(.can-scroll-to-start) div.scroll-button.start {
|
|
270
|
+
opacity: 0.5;
|
|
271
|
+
transition-delay: 0.5s;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button,
|
|
275
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button {
|
|
276
|
+
transition: color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
color: var(--limel-theme-on-surface-color);
|
|
279
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
280
|
+
box-shadow: var(--button-shadow-normal);
|
|
281
|
+
}
|
|
282
|
+
div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover, div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus, div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,
|
|
283
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,
|
|
284
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus,
|
|
285
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible {
|
|
286
|
+
will-change: color, background-color, box-shadow, transform;
|
|
287
|
+
}
|
|
288
|
+
div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover, div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:focus-visible,
|
|
289
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,
|
|
290
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:focus-visible {
|
|
291
|
+
transform: translate3d(0, -0.04rem, 0);
|
|
292
|
+
color: var(--limel-theme-on-surface-color);
|
|
293
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
294
|
+
box-shadow: var(--button-shadow-hovered);
|
|
295
|
+
}
|
|
296
|
+
div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,
|
|
297
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active {
|
|
298
|
+
--limel-clickable-transform-timing-function: cubic-bezier(
|
|
299
|
+
0.83,
|
|
300
|
+
-0.15,
|
|
301
|
+
0.49,
|
|
302
|
+
1.16
|
|
303
|
+
);
|
|
304
|
+
transform: translate3d(0, 0.05rem, 0);
|
|
305
|
+
box-shadow: var(--button-shadow-pressed);
|
|
306
|
+
}
|
|
307
|
+
div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:hover, div.scroller.can-scroll-to-start div.scroll-button.start div.arrow-button:active,
|
|
308
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:hover,
|
|
309
|
+
div.scroller.can-scroll-to-end div.scroll-button.end div.arrow-button:active {
|
|
310
|
+
--limel-clickable-transition-speed: 0.2s;
|
|
311
|
+
--limel-clickable-transform-speed: 0.16s;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
div.scroller div.scroll-button.start:hover,
|
|
315
|
+
div.scroller div.scroll-button.end:hover {
|
|
316
|
+
transform: translate3d(0, 0, 0);
|
|
317
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
const MIN_PAGE_SHARE = 0.5;
|
|
3
|
+
const HIDE_BUTTON_WHEN_CLOSER_TO_EDGE_THAN_PX = 40;
|
|
4
|
+
const PAGE_OVERLAP = 0.2;
|
|
5
|
+
// A click on an arrow is no reason to take the focus from the item that has it.
|
|
6
|
+
const keepFocusWhereItIs = (event) => event.preventDefault();
|
|
7
|
+
// Points towards the end of the horizontal axis. The styles turn it around.
|
|
8
|
+
const Arrow = () => (h("svg", { class: "arrow", viewBox: "0 0 48 48", "aria-hidden": "true", focusable: "false" }, h("path", { d: "M18 4l20 20-20 20" })));
|
|
9
|
+
/**
|
|
10
|
+
* Makes content that is larger than its container scrollable, along one axis.
|
|
11
|
+
*
|
|
12
|
+
* The native scrollbar is hidden. Instead, an edge that has more to reveal
|
|
13
|
+
* fades out, and an arrow appears on it. Clicking the arrow scrolls almost a
|
|
14
|
+
* page, and leaves the last part of the previous page in view, as a reference
|
|
15
|
+
* for how far the user has scrolled. For people who have asked their system to
|
|
16
|
+
* reduce motion, the scroller jumps instead of gliding.
|
|
17
|
+
*
|
|
18
|
+
* When something inside the scroller receives focus, the scroller reveals the
|
|
19
|
+
* item that holds it, together with a glimpse of whatever is next to it. An
|
|
20
|
+
* item can control how much of its neighbors gets revealed, by setting its
|
|
21
|
+
* `scroll-margin`. An item that becomes selected without receiving focus is up
|
|
22
|
+
* to the consumer to reveal, using the `reveal()` method.
|
|
23
|
+
*
|
|
24
|
+
* :::note Accessibility
|
|
25
|
+
* The arrows are only a shortcut for people who use a mouse or a touch screen.
|
|
26
|
+
* They are not real buttons. Screen readers do not announce them, and the Tab
|
|
27
|
+
* key skips them. Therefore, the content must contain something that can
|
|
28
|
+
* receive focus, such as a button, a link or a tab. Without it, there is no way
|
|
29
|
+
* to scroll with a keyboard. The examples explain the reasoning.
|
|
30
|
+
* :::
|
|
31
|
+
*
|
|
32
|
+
* @slot - The content to scroll. Each child is treated as an item.
|
|
33
|
+
* @exampleComponent limel-example-scroller-horizontal
|
|
34
|
+
* @exampleComponent limel-example-scroller-vertical
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
export class Scroller {
|
|
38
|
+
constructor() {
|
|
39
|
+
/**
|
|
40
|
+
* The axis along which the content scrolls.
|
|
41
|
+
*/
|
|
42
|
+
this.orientation = 'horizontal';
|
|
43
|
+
this.canScrollToStart = false;
|
|
44
|
+
this.canScrollToEnd = false;
|
|
45
|
+
this.fades = {};
|
|
46
|
+
this.handleResize = () => {
|
|
47
|
+
const pending = this.pendingReveal;
|
|
48
|
+
if (pending) {
|
|
49
|
+
this.revealItem(pending.item, pending.behavior);
|
|
50
|
+
}
|
|
51
|
+
this.updateScrollability();
|
|
52
|
+
};
|
|
53
|
+
this.updateScrollability = () => {
|
|
54
|
+
const area = this.scrollArea;
|
|
55
|
+
if (!area) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const vertical = this.orientation === 'vertical';
|
|
59
|
+
const scrolled = vertical ? area.scrollTop : area.scrollLeft;
|
|
60
|
+
const overflow = vertical
|
|
61
|
+
? area.scrollHeight - area.clientHeight
|
|
62
|
+
: area.scrollWidth - area.clientWidth;
|
|
63
|
+
this.canScrollToStart =
|
|
64
|
+
scrolled > HIDE_BUTTON_WHEN_CLOSER_TO_EDGE_THAN_PX;
|
|
65
|
+
this.canScrollToEnd =
|
|
66
|
+
Math.floor(overflow - scrolled) >
|
|
67
|
+
HIDE_BUTTON_WHEN_CLOSER_TO_EDGE_THAN_PX;
|
|
68
|
+
};
|
|
69
|
+
this.revealFocusedItem = (event) => {
|
|
70
|
+
const item = this.findItem(event.target);
|
|
71
|
+
if (!item) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// The browser scrolls a focused element into view too. Wait for it
|
|
75
|
+
// to be done, so that the position it leaves is what we adjust.
|
|
76
|
+
requestAnimationFrame(() => this.revealItem(item));
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
connectedCallback() {
|
|
80
|
+
this.observeSize();
|
|
81
|
+
}
|
|
82
|
+
componentDidLoad() {
|
|
83
|
+
this.observeSize();
|
|
84
|
+
}
|
|
85
|
+
disconnectedCallback() {
|
|
86
|
+
var _a;
|
|
87
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return (h(Host, { key: 'e84ebfb819a65ec4b655155c88fae8d3163f81e5' }, h("div", { key: '5de2d4b4ea1f5f423d69195fb66e2a9e83bd5b3f', class: {
|
|
91
|
+
scroller: true,
|
|
92
|
+
[this.orientation]: true,
|
|
93
|
+
'can-scroll-to-start': this.canScrollToStart,
|
|
94
|
+
'can-scroll-to-end': this.canScrollToEnd,
|
|
95
|
+
} }, h("div", { key: 'e6b6d2832c6d8eecd18f5b653ee39d1f107d212a', class: "scroll-area", ref: (element) => (this.scrollArea = element), onScroll: this.updateScrollability, onFocusin: this.revealFocusedItem }, h("div", { key: '696a605e2478ea31b256631df195cb3e0e64d07a', class: "scroll-content", ref: (element) => (this.scrollContent = element) }, h("slot", { key: 'c32bfe0c61b93c794e2837563ea081ffccf33440', ref: (element) => (this.slotElement = element) }))), this.renderEdge('start'), this.renderEdge('end'))));
|
|
96
|
+
}
|
|
97
|
+
renderEdge(edge) {
|
|
98
|
+
return [
|
|
99
|
+
h("div", { key: `fade-${edge}`, class: `scroll-fade ${edge}`, ref: (element) => (this.fades[edge] = element) }),
|
|
100
|
+
h("div", { key: `button-${edge}`, class: `scroll-button ${edge}`, "aria-hidden": "true" }, h("div", { class: "arrow-button", onMouseDown: keepFocusWhereItIs, onClick: () => this.scrollOnePage(edge) }, h(Arrow, null))),
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
observeSize() {
|
|
104
|
+
var _a;
|
|
105
|
+
if (!this.scrollArea || typeof ResizeObserver === 'undefined') {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
(_a = this.resizeObserver) !== null && _a !== void 0 ? _a : (this.resizeObserver = new ResizeObserver(this.handleResize));
|
|
109
|
+
this.resizeObserver.observe(this.scrollArea);
|
|
110
|
+
this.resizeObserver.observe(this.scrollContent);
|
|
111
|
+
}
|
|
112
|
+
scrollOnePage(edge) {
|
|
113
|
+
const area = this.scrollArea;
|
|
114
|
+
const fade = this.fades[edge];
|
|
115
|
+
const vertical = this.orientation === 'vertical';
|
|
116
|
+
const [size, fadeSize] = vertical
|
|
117
|
+
? [area.clientHeight, fade.offsetHeight]
|
|
118
|
+
: [area.clientWidth, fade.offsetWidth];
|
|
119
|
+
// What is under the arrow, and faded, on one edge must land clear of
|
|
120
|
+
// the fade and the arrow on the other edge.
|
|
121
|
+
const overlap = Math.max(size * PAGE_OVERLAP, fadeSize);
|
|
122
|
+
const distance = Math.max(size - overlap, size * MIN_PAGE_SHARE);
|
|
123
|
+
const delta = edge === 'start' ? -distance : distance;
|
|
124
|
+
const behavior = getScrollBehavior();
|
|
125
|
+
area.scrollBy(vertical ? { top: delta, behavior } : { left: delta, behavior });
|
|
126
|
+
}
|
|
127
|
+
// What has focus, or is asked to be revealed, can be deeper inside an item.
|
|
128
|
+
// The item is what gets revealed, since it is what carries the
|
|
129
|
+
// `scroll-margin`.
|
|
130
|
+
findItem(element) {
|
|
131
|
+
let node = element;
|
|
132
|
+
while (node && node.assignedSlot !== this.slotElement) {
|
|
133
|
+
node = node.parentElement;
|
|
134
|
+
}
|
|
135
|
+
return node;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Scrolls an item into view, together with a glimpse of its neighbors.
|
|
139
|
+
* Whatever receives focus is revealed without being asked to. This is for
|
|
140
|
+
* an item that becomes selected without receiving focus. If the scroller
|
|
141
|
+
* is hidden, in a dialog that is closed for instance, the item is revealed
|
|
142
|
+
* when the scroller is shown.
|
|
143
|
+
*
|
|
144
|
+
* @param item - one of the items of the scroller, or something inside one
|
|
145
|
+
* @param behavior - `auto` jumps to the item, and `smooth` glides there.
|
|
146
|
+
* Defaults to `smooth`, unless the user has asked to reduce motion.
|
|
147
|
+
*/
|
|
148
|
+
async reveal(item, behavior = getScrollBehavior()) {
|
|
149
|
+
var _a;
|
|
150
|
+
this.revealItem((_a = this.findItem(item)) !== null && _a !== void 0 ? _a : item, behavior);
|
|
151
|
+
}
|
|
152
|
+
revealItem(item, behavior = getScrollBehavior()) {
|
|
153
|
+
const area = this.scrollArea;
|
|
154
|
+
this.pendingReveal = undefined;
|
|
155
|
+
if (!area || !item.isConnected) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
// There is nothing to measure while the scroller is hidden.
|
|
159
|
+
if (area.getClientRects().length === 0) {
|
|
160
|
+
this.pendingReveal = { item, behavior };
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const vertical = this.orientation === 'vertical';
|
|
164
|
+
const [before, after] = vertical
|
|
165
|
+
? ['top', 'bottom']
|
|
166
|
+
: ['left', 'right'];
|
|
167
|
+
const size = vertical ? 'height' : 'width';
|
|
168
|
+
const areaBox = area.getBoundingClientRect();
|
|
169
|
+
const itemBox = item.getBoundingClientRect();
|
|
170
|
+
const style = getComputedStyle(item);
|
|
171
|
+
// The boxes are measured on the screen, where a scroller that is
|
|
172
|
+
// scaled, as it is in a dialog that is opening, is larger or smaller
|
|
173
|
+
// than the distance it takes to scroll.
|
|
174
|
+
const scale = areaBox[size] / Number.parseFloat(getComputedStyle(area)[size]) ||
|
|
175
|
+
1;
|
|
176
|
+
const margin = (side) => Number.parseFloat(style.getPropertyValue(`scroll-margin-${side}`)) *
|
|
177
|
+
scale;
|
|
178
|
+
const hiddenBefore = areaBox[before] - (itemBox[before] - margin(before));
|
|
179
|
+
const hiddenAfter = itemBox[after] + margin(after) - areaBox[after];
|
|
180
|
+
let distance = 0;
|
|
181
|
+
if (hiddenBefore > 0) {
|
|
182
|
+
distance = -hiddenBefore;
|
|
183
|
+
}
|
|
184
|
+
else if (hiddenAfter > 0) {
|
|
185
|
+
distance = hiddenAfter;
|
|
186
|
+
}
|
|
187
|
+
if (distance === 0) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
area.scrollBy(vertical
|
|
191
|
+
? { top: distance / scale, behavior }
|
|
192
|
+
: { left: distance / scale, behavior });
|
|
193
|
+
}
|
|
194
|
+
static get is() { return "limel-scroller"; }
|
|
195
|
+
static get encapsulation() { return "shadow"; }
|
|
196
|
+
static get originalStyleUrls() {
|
|
197
|
+
return {
|
|
198
|
+
"$": ["scroller.scss"]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
static get styleUrls() {
|
|
202
|
+
return {
|
|
203
|
+
"$": ["scroller.css"]
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
static get properties() {
|
|
207
|
+
return {
|
|
208
|
+
"orientation": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "'horizontal' | 'vertical'",
|
|
213
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
214
|
+
"references": {}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": "The axis along which the content scrolls."
|
|
221
|
+
},
|
|
222
|
+
"getter": false,
|
|
223
|
+
"setter": false,
|
|
224
|
+
"reflect": true,
|
|
225
|
+
"attribute": "orientation",
|
|
226
|
+
"defaultValue": "'horizontal'"
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
static get states() {
|
|
231
|
+
return {
|
|
232
|
+
"canScrollToStart": {},
|
|
233
|
+
"canScrollToEnd": {}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
static get methods() {
|
|
237
|
+
return {
|
|
238
|
+
"reveal": {
|
|
239
|
+
"complexType": {
|
|
240
|
+
"signature": "(item: HTMLElement, behavior?: ScrollBehavior) => Promise<void>",
|
|
241
|
+
"parameters": [{
|
|
242
|
+
"name": "item",
|
|
243
|
+
"type": "HTMLElement",
|
|
244
|
+
"docs": "- one of the items of the scroller, or something inside one"
|
|
245
|
+
}, {
|
|
246
|
+
"name": "behavior",
|
|
247
|
+
"type": "\"auto\" | \"instant\" | \"smooth\"",
|
|
248
|
+
"docs": "- `auto` jumps to the item, and `smooth` glides there.\nDefaults to `smooth`, unless the user has asked to reduce motion."
|
|
249
|
+
}],
|
|
250
|
+
"references": {
|
|
251
|
+
"Promise": {
|
|
252
|
+
"location": "global",
|
|
253
|
+
"id": "global::Promise"
|
|
254
|
+
},
|
|
255
|
+
"HTMLElement": {
|
|
256
|
+
"location": "global",
|
|
257
|
+
"id": "global::HTMLElement"
|
|
258
|
+
},
|
|
259
|
+
"ScrollBehavior": {
|
|
260
|
+
"location": "global",
|
|
261
|
+
"id": "global::ScrollBehavior"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"return": "Promise<void>"
|
|
265
|
+
},
|
|
266
|
+
"docs": {
|
|
267
|
+
"text": "Scrolls an item into view, together with a glimpse of its neighbors.\nWhatever receives focus is revealed without being asked to. This is for\nan item that becomes selected without receiving focus. If the scroller\nis hidden, in a dialog that is closed for instance, the item is revealed\nwhen the scroller is shown.",
|
|
268
|
+
"tags": [{
|
|
269
|
+
"name": "param",
|
|
270
|
+
"text": "item - one of the items of the scroller, or something inside one"
|
|
271
|
+
}, {
|
|
272
|
+
"name": "param",
|
|
273
|
+
"text": "behavior - `auto` jumps to the item, and `smooth` glides there.\nDefaults to `smooth`, unless the user has asked to reduce motion."
|
|
274
|
+
}]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function getScrollBehavior() {
|
|
281
|
+
return matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
282
|
+
? 'auto'
|
|
283
|
+
: 'smooth';
|
|
284
|
+
}
|
|
@@ -89,14 +89,15 @@ export class Select {
|
|
|
89
89
|
}
|
|
90
90
|
const isEnter = event.key === ENTER;
|
|
91
91
|
const isSpace = event.key === SPACEBAR;
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
event.preventDefault();
|
|
95
|
-
// `preventDefault` cancels the activation click that the trigger
|
|
96
|
-
// `button` would otherwise synthesize, so the menu has to be
|
|
97
|
-
// opened here rather than through the click handler.
|
|
98
|
-
this.openMenu();
|
|
92
|
+
if (this.menuOpen || !(isSpace || isEnter)) {
|
|
93
|
+
return;
|
|
99
94
|
}
|
|
95
|
+
event.stopPropagation();
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
// `preventDefault` cancels the activation click that the trigger
|
|
98
|
+
// `button` would otherwise synthesize, so the menu has to be
|
|
99
|
+
// opened here rather than through the click handler.
|
|
100
|
+
this.openMenu();
|
|
100
101
|
};
|
|
101
102
|
this.setListElement = (element) => {
|
|
102
103
|
var _a, _b;
|
|
@@ -236,10 +237,11 @@ export class Select {
|
|
|
236
237
|
clearTimeout(this.focusTimeoutId);
|
|
237
238
|
this.focusTimeoutId = undefined;
|
|
238
239
|
}
|
|
239
|
-
if (this.focusObserver) {
|
|
240
|
-
|
|
241
|
-
this.focusObserver = undefined;
|
|
240
|
+
if (!this.focusObserver) {
|
|
241
|
+
return;
|
|
242
242
|
}
|
|
243
|
+
this.focusObserver.disconnect();
|
|
244
|
+
this.focusObserver = undefined;
|
|
243
245
|
}
|
|
244
246
|
focusFirstMenuItem(list) {
|
|
245
247
|
var _a;
|
|
@@ -308,7 +310,7 @@ export class Select {
|
|
|
308
310
|
requestAnimationFrame(() => {
|
|
309
311
|
setTimeout(() => {
|
|
310
312
|
menuSurface.scrollTop = scrollPosition;
|
|
311
|
-
});
|
|
313
|
+
}, 0);
|
|
312
314
|
});
|
|
313
315
|
return;
|
|
314
316
|
}
|