@odx/foundation 1.0.0-alpha.4 → 1.0.0-alpha.40
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/README.md +24 -19
- package/dist/cdk/drag-drop/drag.controller.d.ts +1 -1
- package/dist/cdk/drag-drop/is-draggable.d.ts +2 -2
- package/dist/cdk/main.d.ts +6 -6
- package/dist/cdk/popover/{popover-host.mixin.d.ts → popover-host.d.ts} +4 -3
- package/dist/cdk/popover/popover.d.ts +12 -0
- package/dist/cdk/popover/popover.utils.d.ts +1 -1
- package/dist/cdk.js +356 -0
- package/dist/components/accordion/accordion-header.d.ts +18 -0
- package/dist/components/accordion/accordion-panel.d.ts +12 -0
- package/dist/components/accordion/accordion.d.ts +17 -0
- package/dist/components/accordion/index.d.ts +3 -3
- package/dist/components/action-group/action-group.d.ts +24 -0
- package/dist/components/action-group/index.d.ts +2 -0
- package/dist/components/anchor-navigation/anchor-navigation.d.ts +21 -0
- package/dist/components/anchor-navigation/anchor-observer.d.ts +11 -0
- package/dist/components/anchor-navigation/index.d.ts +3 -0
- package/dist/components/area-header/{area-header.component.d.ts → area-header.d.ts} +5 -5
- package/dist/components/area-header/index.d.ts +2 -2
- package/dist/components/avatar/avatar.d.ts +14 -0
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar-group/avatar-group.d.ts +14 -0
- package/dist/components/avatar-group/index.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.models.d.ts +4 -0
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/breadcrumbs/breadcrumbs-item.d.ts +17 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +23 -0
- package/dist/components/breadcrumbs/index.d.ts +3 -0
- package/dist/components/button/base-button.d.ts +10 -6
- package/dist/components/button/{button.component.d.ts → button.d.ts} +9 -6
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/button-group/button-group.d.ts +21 -0
- package/dist/components/button-group/index.d.ts +1 -1
- package/dist/components/card/card.d.ts +13 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/checkbox/{checkbox.component.d.ts → checkbox.d.ts} +4 -4
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +14 -0
- package/dist/components/checkbox-group/index.d.ts +2 -2
- package/dist/components/chip/{chip.component.d.ts → chip.d.ts} +6 -6
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/circular-progress-bar/{circular-progress-bar.component.d.ts → circular-progress-bar.d.ts} +5 -5
- package/dist/components/circular-progress-bar/index.d.ts +2 -2
- package/dist/components/content-box/content-box.d.ts +11 -0
- package/dist/components/content-box/content-box.models.d.ts +1 -0
- package/dist/components/content-box/index.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts +24 -0
- package/dist/components/dropdown/index.d.ts +2 -2
- package/dist/{elements/form-field/form-field.element.d.ts → components/form-field/form-field.d.ts} +4 -4
- package/dist/components/form-field/index.d.ts +2 -0
- package/dist/components/format/base-format.d.ts +13 -0
- package/dist/components/format/format-bytes.d.ts +13 -0
- package/dist/components/format/format-date.d.ts +14 -0
- package/dist/components/format/{format-number.component.d.ts → format-number.d.ts} +5 -5
- package/dist/components/format/index.d.ts +5 -4
- package/dist/components/format/{relative-time.component.d.ts → relative-time.d.ts} +5 -5
- package/dist/components/header/header-actions.d.ts +10 -0
- package/dist/components/header/{header.component.d.ts → header.d.ts} +4 -4
- package/dist/components/header/index.d.ts +2 -2
- package/dist/components/headline/headline.d.ts +13 -0
- package/dist/components/headline/index.d.ts +2 -2
- package/dist/components/highlight/highlight.d.ts +14 -0
- package/dist/components/highlight/index.d.ts +2 -0
- package/dist/components/icon-button/{icon-button.component.d.ts → icon-button.d.ts} +4 -4
- package/dist/components/icon-button/index.d.ts +1 -1
- package/dist/components/inline-message/index.d.ts +2 -2
- package/dist/components/inline-message/inline-message.d.ts +14 -0
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/input.d.ts +21 -0
- package/dist/components/line-clamp/index.d.ts +1 -1
- package/dist/components/line-clamp/line-clamp.d.ts +12 -0
- package/dist/components/link/base-link.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/link/link.d.ts +11 -0
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/list-item.d.ts +23 -0
- package/dist/components/list/list.d.ts +11 -0
- package/dist/components/loading-overlay/index.d.ts +1 -1
- package/dist/components/loading-overlay/{loading-overlay.component.d.ts → loading-overlay.d.ts} +5 -5
- package/dist/components/loading-spinner/index.d.ts +1 -1
- package/dist/components/loading-spinner/loading-spinner.d.ts +13 -0
- package/dist/components/logo/index.d.ts +2 -2
- package/dist/components/logo/logo.d.ts +13 -0
- package/dist/components/main-menu/index.d.ts +5 -5
- package/dist/components/main-menu/main-menu-button.d.ts +12 -0
- package/dist/components/main-menu/main-menu-link.d.ts +9 -0
- package/dist/components/main-menu/main-menu-subtitle.d.ts +12 -0
- package/dist/components/main-menu/main-menu-title.d.ts +12 -0
- package/dist/components/main-menu/{main-menu.component.d.ts → main-menu.d.ts} +4 -4
- package/dist/components/main.d.ts +62 -51
- package/dist/components/menu/index.d.ts +2 -3
- package/dist/components/menu/menu-label.d.ts +9 -0
- package/dist/components/menu/menu.d.ts +24 -0
- package/dist/components/menu-item/index.d.ts +2 -0
- package/dist/components/menu-item/menu-item.d.ts +14 -0
- package/dist/components/modal/index.d.ts +3 -0
- package/dist/components/modal/modal.d.ts +35 -0
- package/dist/components/modal/modal.models.d.ts +5 -0
- package/dist/components/navigation-item/index.d.ts +2 -2
- package/dist/components/navigation-item/navigation-item.d.ts +14 -0
- package/dist/components/option/index.d.ts +1 -1
- package/dist/components/option/option.d.ts +12 -0
- package/dist/components/page/index.d.ts +2 -2
- package/dist/components/page/{page.component.d.ts → page.d.ts} +5 -5
- package/dist/components/page-layout/index.d.ts +1 -1
- package/dist/components/page-layout/page-layout.d.ts +11 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +32 -0
- package/dist/components/progress-bar/index.d.ts +2 -2
- package/dist/components/progress-bar/{progress-bar.component.d.ts → progress-bar.d.ts} +5 -5
- package/dist/components/radio-button/index.d.ts +1 -1
- package/dist/components/radio-button/radio-button.d.ts +13 -0
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/radio-group/radio-group.d.ts +11 -0
- package/dist/components/rail-navigation/index.d.ts +1 -1
- package/dist/components/rail-navigation/rail-navigation.d.ts +19 -0
- package/dist/components/search-bar/index.d.ts +3 -3
- package/dist/components/search-bar/{search-bar.component.d.ts → search-bar.d.ts} +6 -5
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/select.d.ts +18 -0
- package/dist/components/separator/index.d.ts +2 -1
- package/dist/components/separator/separator.d.ts +16 -0
- package/dist/components/skeleton/index.d.ts +2 -1
- package/dist/components/skeleton/skeleton.d.ts +16 -0
- package/dist/components/skeleton/skeleton.models.d.ts +13 -0
- package/dist/components/slider/index.d.ts +4 -4
- package/dist/components/slider/{slider-handle.component.d.ts → slider-handle.d.ts} +7 -7
- package/dist/components/slider/{slider-marks.component.d.ts → slider-marks.d.ts} +5 -5
- package/dist/components/slider/slider.d.ts +27 -0
- package/dist/components/spacer/index.d.ts +1 -1
- package/dist/components/spacer/spacer.d.ts +13 -0
- package/dist/components/spinbox/index.d.ts +1 -1
- package/dist/components/spinbox/{spinbox.component.d.ts → spinbox.d.ts} +5 -5
- package/dist/components/stack/index.d.ts +2 -2
- package/dist/components/stack/{stack.component.d.ts → stack.d.ts} +5 -5
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +12 -0
- package/dist/components/table/index.d.ts +9 -0
- package/dist/components/table/table-body.d.ts +12 -0
- package/dist/components/table/table-cell.d.ts +12 -0
- package/dist/{elements/table/elements/table-checkbox-cell/table-checkbox-cell.element.d.ts → components/table/table-checkbox-cell.d.ts} +4 -4
- package/dist/components/table/table-header-cell.d.ts +13 -0
- package/dist/components/table/table-header.d.ts +14 -0
- package/dist/{elements/table/elements/table-row/table-row.element.d.ts → components/table/table-row.d.ts} +4 -4
- package/dist/components/table/table.d.ts +20 -0
- package/dist/{elements/table/table.context.d.ts → components/table/table.models.d.ts} +1 -1
- package/dist/components/text/index.d.ts +2 -2
- package/dist/components/text/text.d.ts +13 -0
- package/dist/components/text/text.models.d.ts +1 -0
- package/dist/components/title/index.d.ts +2 -2
- package/dist/components/title/title.d.ts +13 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/toast.d.ts +13 -0
- package/dist/{elements/toast/models/toast-variant.d.ts → components/toast/toast.models.d.ts} +1 -1
- package/dist/components/toggle-button/index.d.ts +1 -1
- package/dist/components/toggle-button/{toggle-button.component.d.ts → toggle-button.d.ts} +4 -4
- package/dist/components/toggle-content/index.d.ts +2 -0
- package/dist/components/toggle-content/toggle-content.d.ts +13 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/{elements/tooltip/tooltip.element.d.ts → components/tooltip/tooltip.d.ts} +6 -7
- package/dist/{elements/tooltip/models/tooltip-placement.d.ts → components/tooltip/tooltip.models.d.ts} +1 -1
- package/dist/components/translate/index.d.ts +2 -0
- package/dist/components/translate/translate.d.ts +16 -0
- package/dist/components/visually-hidden/index.d.ts +1 -1
- package/dist/components/visually-hidden/visually-hidden.d.ts +11 -0
- package/dist/components.js +5042 -0
- package/dist/i18n/lib/config.d.ts +29 -0
- package/dist/i18n/lib/format.d.ts +6 -0
- package/dist/i18n/lib/is-localized.mixin.d.ts +15 -0
- package/dist/i18n/lib/localization.d.ts +5 -0
- package/dist/{lib/models/single-unit-identifier.d.ts → i18n/lib/models.d.ts} +2 -1
- package/dist/i18n/lib/translate.d.ts +11 -0
- package/dist/i18n/main.d.ts +7 -0
- package/dist/i18n.js +145 -0
- package/dist/lib/custom-element.d.ts +10 -0
- package/dist/lib/decorators/request-update-on-aria-change.d.ts +4 -0
- package/dist/lib/facade/checkbox-form-control.d.ts +2 -2
- package/dist/lib/facade/checkbox-group-form-control.d.ts +3 -3
- package/dist/lib/facade/option-control.d.ts +3 -3
- package/dist/lib/facade/radio-group-form-control.d.ts +3 -3
- package/dist/lib/facade/select-form-control.d.ts +3 -3
- package/dist/lib/main.d.ts +31 -7
- package/dist/lib/mixins/can-be-disabled.d.ts +3 -3
- package/dist/lib/mixins/can-be-expanded.d.ts +12 -0
- package/dist/lib/mixins/can-be-readonly.d.ts +2 -2
- package/dist/lib/mixins/can-be-required.d.ts +2 -2
- package/dist/lib/mixins/can-be-selected.d.ts +9 -0
- package/dist/lib/mixins/can-be-validated.d.ts +2 -2
- package/dist/lib/mixins/form-control.d.ts +6 -6
- package/dist/lib/mixins/number-control.d.ts +3 -3
- package/dist/lib/mixins/with-loading-state.d.ts +2 -2
- package/dist/lib/{models/aria-mixin-strict.d.ts → utils/a11y.d.ts} +3 -1
- package/dist/lib/utils/{parse-date.d.ts → date.d.ts} +1 -1
- package/dist/lib/utils/dom.d.ts +9 -0
- package/dist/lib/utils/{create-options.d.ts → object.d.ts} +1 -1
- package/dist/lib/utils/search-text-content.d.ts +7 -0
- package/dist/lib/utils/shared-intersection-observer.d.ts +7 -0
- package/dist/lib/utils/shared-resize-observer.d.ts +7 -0
- package/dist/loader/main.d.ts +2 -0
- package/dist/loader.js +13 -0
- package/dist/main.js +1124 -0
- package/dist/styles.css +1 -0
- package/dist/vendor-C_WVAD3D.js +3680 -0
- package/dist/vite.config.d.ts +3 -0
- package/package.json +28 -27
- package/dist/assets/draeger-pangea-text-medium.woff2 +0 -0
- package/dist/assets/draeger-pangea-text-regular.woff2 +0 -0
- package/dist/assets/draeger-pangea-text-semibold.woff2 +0 -0
- package/dist/assets/fonts.css +0 -20
- package/dist/cdk/drag-drop/drag.controller.js +0 -90
- package/dist/cdk/drag-drop/is-draggable.js +0 -42
- package/dist/cdk/main.js +0 -5
- package/dist/cdk/popover/popover-host.mixin.css.js +0 -3
- package/dist/cdk/popover/popover-host.mixin.js +0 -115
- package/dist/cdk/popover/popover.component.css.js +0 -3
- package/dist/cdk/popover/popover.component.d.ts +0 -12
- package/dist/cdk/popover/popover.component.js +0 -38
- package/dist/cdk/popover/popover.models.js +0 -32
- package/dist/cdk/popover/popover.utils.js +0 -48
- package/dist/components/accordion/accordion-header.component.css.js +0 -3
- package/dist/components/accordion/accordion-header.component.d.ts +0 -18
- package/dist/components/accordion/accordion-header.component.js +0 -69
- package/dist/components/accordion/accordion-panel.component.css.js +0 -3
- package/dist/components/accordion/accordion-panel.component.d.ts +0 -11
- package/dist/components/accordion/accordion-panel.component.js +0 -29
- package/dist/components/accordion/accordion.component.css.js +0 -3
- package/dist/components/accordion/accordion.component.d.ts +0 -18
- package/dist/components/accordion/accordion.component.js +0 -83
- package/dist/components/area-header/area-header.component.css.js +0 -3
- package/dist/components/area-header/area-header.component.js +0 -37
- package/dist/components/area-header/area-header.models.js +0 -11
- package/dist/components/avatar/avatar.component.css.js +0 -3
- package/dist/components/avatar/avatar.component.d.ts +0 -14
- package/dist/components/avatar/avatar.component.js +0 -31
- package/dist/components/avatar/avatar.models.js +0 -12
- package/dist/components/avatar-group/avatar-group.component.css.js +0 -3
- package/dist/components/avatar-group/avatar-group.component.d.ts +0 -14
- package/dist/components/avatar-group/avatar-group.component.js +0 -31
- package/dist/components/badge/badge.component.css.js +0 -3
- package/dist/components/badge/badge.component.d.ts +0 -13
- package/dist/components/badge/badge.component.js +0 -32
- package/dist/components/badge/badge.models.js +0 -10
- package/dist/components/breadcrumb/breadcrumb-item.component.css.js +0 -3
- package/dist/components/breadcrumb/breadcrumb-item.component.d.ts +0 -16
- package/dist/components/breadcrumb/breadcrumb-item.component.js +0 -56
- package/dist/components/breadcrumb/breadcrumb.component.css.js +0 -3
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +0 -17
- package/dist/components/breadcrumb/breadcrumb.component.js +0 -72
- package/dist/components/breadcrumb/index.d.ts +0 -3
- package/dist/components/button/base-button.css.js +0 -3
- package/dist/components/button/base-button.js +0 -78
- package/dist/components/button/button.component.css.js +0 -3
- package/dist/components/button/button.component.js +0 -66
- package/dist/components/button/button.models.js +0 -16
- package/dist/components/button-group/button-group.component.css.js +0 -3
- package/dist/components/button-group/button-group.component.d.ts +0 -18
- package/dist/components/button-group/button-group.component.js +0 -47
- package/dist/components/card/card.component.css.js +0 -3
- package/dist/components/card/card.component.d.ts +0 -13
- package/dist/components/card/card.component.js +0 -30
- package/dist/components/checkbox/checkbox.component.css.js +0 -3
- package/dist/components/checkbox/checkbox.component.js +0 -57
- package/dist/components/checkbox-group/checkbox-group.component.css.js +0 -3
- package/dist/components/checkbox-group/checkbox-group.component.d.ts +0 -14
- package/dist/components/checkbox-group/checkbox-group.component.js +0 -54
- package/dist/components/checkbox-group/checkbox-group.models.js +0 -5
- package/dist/components/chip/chip.component.css.js +0 -3
- package/dist/components/chip/chip.component.js +0 -94
- package/dist/components/chip/chip.models.js +0 -10
- package/dist/components/circular-progress-bar/circular-progress-bar.component.css.js +0 -3
- package/dist/components/circular-progress-bar/circular-progress-bar.component.js +0 -123
- package/dist/components/circular-progress-bar/circular-progress-bar.models.js +0 -7
- package/dist/components/content-box/content-box.component.css.js +0 -3
- package/dist/components/content-box/content-box.component.d.ts +0 -11
- package/dist/components/content-box/content-box.component.js +0 -26
- package/dist/components/dropdown/dropdown.component.css.js +0 -3
- package/dist/components/dropdown/dropdown.component.d.ts +0 -23
- package/dist/components/dropdown/dropdown.component.js +0 -121
- package/dist/components/dropdown/dropdown.models.js +0 -8
- package/dist/components/format/format-bytes.component.d.ts +0 -13
- package/dist/components/format/format-bytes.component.js +0 -46
- package/dist/components/format/format-date.component.d.ts +0 -14
- package/dist/components/format/format-date.component.js +0 -36
- package/dist/components/format/format-number.component.js +0 -59
- package/dist/components/format/format.component.d.ts +0 -12
- package/dist/components/format/format.component.js +0 -33
- package/dist/components/format/relative-time.component.js +0 -80
- package/dist/components/header/header-actions.component.css.js +0 -3
- package/dist/components/header/header-actions.component.d.ts +0 -10
- package/dist/components/header/header-actions.component.js +0 -22
- package/dist/components/header/header.component.css.js +0 -3
- package/dist/components/header/header.component.js +0 -58
- package/dist/components/headline/headline.component.css.js +0 -3
- package/dist/components/headline/headline.component.d.ts +0 -13
- package/dist/components/headline/headline.component.js +0 -31
- package/dist/components/headline/headline.models.js +0 -8
- package/dist/components/icon-button/icon-button.component.js +0 -33
- package/dist/components/inline-message/inline-message.component.css.js +0 -3
- package/dist/components/inline-message/inline-message.component.d.ts +0 -14
- package/dist/components/inline-message/inline-message.component.js +0 -39
- package/dist/components/inline-message/inline-message.models.js +0 -9
- package/dist/components/input/input.component.css.js +0 -3
- package/dist/components/input/input.component.d.ts +0 -20
- package/dist/components/input/input.component.js +0 -72
- package/dist/components/input/input.models.js +0 -7
- package/dist/components/line-clamp/line-clamp.component.css.js +0 -3
- package/dist/components/line-clamp/line-clamp.component.d.ts +0 -12
- package/dist/components/line-clamp/line-clamp.component.js +0 -37
- package/dist/components/link/base-link.js +0 -70
- package/dist/components/link/link.component.css.js +0 -3
- package/dist/components/link/link.component.d.ts +0 -11
- package/dist/components/link/link.component.js +0 -33
- package/dist/components/list/list-item.component.css.js +0 -3
- package/dist/components/list/list-item.component.d.ts +0 -11
- package/dist/components/list/list-item.component.js +0 -32
- package/dist/components/list/list.component.css.js +0 -3
- package/dist/components/list/list.component.d.ts +0 -11
- package/dist/components/list/list.component.js +0 -24
- package/dist/components/loading-overlay/loading-overlay.component.css.js +0 -3
- package/dist/components/loading-overlay/loading-overlay.component.js +0 -78
- package/dist/components/loading-spinner/loading-spinner.component.css.js +0 -3
- package/dist/components/loading-spinner/loading-spinner.component.d.ts +0 -13
- package/dist/components/loading-spinner/loading-spinner.component.js +0 -58
- package/dist/components/logo/logo.component.css.js +0 -3
- package/dist/components/logo/logo.component.d.ts +0 -13
- package/dist/components/logo/logo.component.js +0 -38
- package/dist/components/logo/logo.models.js +0 -9
- package/dist/components/main-menu/main-menu-button.component.d.ts +0 -12
- package/dist/components/main-menu/main-menu-button.component.js +0 -38
- package/dist/components/main-menu/main-menu-link.component.css.js +0 -3
- package/dist/components/main-menu/main-menu-link.component.d.ts +0 -9
- package/dist/components/main-menu/main-menu-link.component.js +0 -19
- package/dist/components/main-menu/main-menu-subtitle.component.d.ts +0 -12
- package/dist/components/main-menu/main-menu-subtitle.component.js +0 -29
- package/dist/components/main-menu/main-menu-title.component.d.ts +0 -12
- package/dist/components/main-menu/main-menu-title.component.js +0 -29
- package/dist/components/main-menu/main-menu.component.css.js +0 -3
- package/dist/components/main-menu/main-menu.component.js +0 -82
- package/dist/components/main.js +0 -102
- package/dist/components/menu/menu-item.component.css.js +0 -3
- package/dist/components/menu/menu-item.component.d.ts +0 -13
- package/dist/components/menu/menu-item.component.js +0 -37
- package/dist/components/menu/menu-label.component.css.js +0 -3
- package/dist/components/menu/menu-label.component.d.ts +0 -11
- package/dist/components/menu/menu-label.component.js +0 -26
- package/dist/components/menu/menu.component.css.js +0 -3
- package/dist/components/menu/menu.component.d.ts +0 -24
- package/dist/components/menu/menu.component.js +0 -110
- package/dist/components/navigation-item/navigation-item.component.css.js +0 -3
- package/dist/components/navigation-item/navigation-item.component.d.ts +0 -16
- package/dist/components/navigation-item/navigation-item.component.js +0 -42
- package/dist/components/navigation-item/navigation-item.models.js +0 -6
- package/dist/components/option/option.component.css.js +0 -3
- package/dist/components/option/option.component.d.ts +0 -12
- package/dist/components/option/option.component.js +0 -37
- package/dist/components/page/page.component.css.js +0 -3
- package/dist/components/page/page.component.js +0 -53
- package/dist/components/page/page.models.js +0 -9
- package/dist/components/page-layout/page-layout.component.css.js +0 -3
- package/dist/components/page-layout/page-layout.component.d.ts +0 -11
- package/dist/components/page-layout/page-layout.component.js +0 -28
- package/dist/components/progress-bar/progress-bar.component.css.js +0 -3
- package/dist/components/progress-bar/progress-bar.component.js +0 -89
- package/dist/components/progress-bar/progress-bar.models.js +0 -7
- package/dist/components/radio-button/radio-button.component.css.js +0 -3
- package/dist/components/radio-button/radio-button.component.d.ts +0 -13
- package/dist/components/radio-button/radio-button.component.js +0 -39
- package/dist/components/radio-group/radio-group.component.css.js +0 -3
- package/dist/components/radio-group/radio-group.component.d.ts +0 -11
- package/dist/components/radio-group/radio-group.component.js +0 -24
- package/dist/components/radio-group/radio-group.models.js +0 -5
- package/dist/components/rail-navigation/rail-navigation.component.css.js +0 -3
- package/dist/components/rail-navigation/rail-navigation.component.d.ts +0 -24
- package/dist/components/rail-navigation/rail-navigation.component.js +0 -71
- package/dist/components/search-bar/search-bar.component.css.js +0 -3
- package/dist/components/search-bar/search-bar.component.js +0 -100
- package/dist/components/search-bar/search-bar.events.js +0 -7
- package/dist/components/search-bar/search-bar.models.js +0 -6
- package/dist/components/select/select.component.css.js +0 -3
- package/dist/components/select/select.component.d.ts +0 -18
- package/dist/components/select/select.component.js +0 -100
- package/dist/components/separator/separator.component.css.js +0 -3
- package/dist/components/separator/separator.component.d.ts +0 -16
- package/dist/components/separator/separator.component.js +0 -49
- package/dist/components/skeleton/skeleton.component.css.js +0 -3
- package/dist/components/skeleton/skeleton.component.d.ts +0 -12
- package/dist/components/skeleton/skeleton.component.js +0 -32
- package/dist/components/slider/slider-handle.component.css.js +0 -3
- package/dist/components/slider/slider-handle.component.js +0 -168
- package/dist/components/slider/slider-marks.component.css.js +0 -3
- package/dist/components/slider/slider-marks.component.js +0 -61
- package/dist/components/slider/slider.component.css.js +0 -3
- package/dist/components/slider/slider.component.d.ts +0 -27
- package/dist/components/slider/slider.component.js +0 -119
- package/dist/components/slider/slider.models.js +0 -17
- package/dist/components/spacer/spacer.component.css.js +0 -3
- package/dist/components/spacer/spacer.component.d.ts +0 -13
- package/dist/components/spacer/spacer.component.js +0 -39
- package/dist/components/spinbox/spinbox.component.css.js +0 -3
- package/dist/components/spinbox/spinbox.component.js +0 -94
- package/dist/components/stack/stack.component.css.js +0 -3
- package/dist/components/stack/stack.component.js +0 -45
- package/dist/components/stack/stack.models.js +0 -23
- package/dist/components/switch/switch.component.css.js +0 -3
- package/dist/components/switch/switch.component.d.ts +0 -12
- package/dist/components/switch/switch.component.js +0 -36
- package/dist/components/text/text.component.css.js +0 -3
- package/dist/components/text/text.component.d.ts +0 -13
- package/dist/components/text/text.component.js +0 -34
- package/dist/components/text/text.models.js +0 -12
- package/dist/components/title/title.component.css.js +0 -3
- package/dist/components/title/title.component.d.ts +0 -13
- package/dist/components/title/title.component.js +0 -31
- package/dist/components/title/title.models.js +0 -10
- package/dist/components/toggle-button/toggle-button.component.css.js +0 -3
- package/dist/components/toggle-button/toggle-button.component.js +0 -52
- package/dist/components/visually-hidden/visually-hidden.component.css.js +0 -3
- package/dist/components/visually-hidden/visually-hidden.component.d.ts +0 -11
- package/dist/components/visually-hidden/visually-hidden.component.js +0 -22
- package/dist/elements/form-field/form-field.element.css.js +0 -3
- package/dist/elements/form-field/form-field.element.js +0 -62
- package/dist/elements/form-field/index.d.ts +0 -2
- package/dist/elements/main.d.ts +0 -5
- package/dist/elements/table/elements/table-body/index.d.ts +0 -2
- package/dist/elements/table/elements/table-body/table-body.element.css.js +0 -3
- package/dist/elements/table/elements/table-body/table-body.element.d.ts +0 -12
- package/dist/elements/table/elements/table-body/table-body.element.js +0 -26
- package/dist/elements/table/elements/table-cell/index.d.ts +0 -2
- package/dist/elements/table/elements/table-cell/table-cell.element.css.js +0 -3
- package/dist/elements/table/elements/table-cell/table-cell.element.d.ts +0 -12
- package/dist/elements/table/elements/table-cell/table-cell.element.js +0 -26
- package/dist/elements/table/elements/table-checkbox-cell/index.d.ts +0 -2
- package/dist/elements/table/elements/table-checkbox-cell/table-checkbox-cell.element.css.js +0 -3
- package/dist/elements/table/elements/table-checkbox-cell/table-checkbox-cell.element.js +0 -66
- package/dist/elements/table/elements/table-header/index.d.ts +0 -2
- package/dist/elements/table/elements/table-header/table-header.element.css.js +0 -3
- package/dist/elements/table/elements/table-header/table-header.element.d.ts +0 -14
- package/dist/elements/table/elements/table-header/table-header.element.js +0 -52
- package/dist/elements/table/elements/table-header-cell/index.d.ts +0 -2
- package/dist/elements/table/elements/table-header-cell/table-header-cell.element.css.js +0 -3
- package/dist/elements/table/elements/table-header-cell/table-header-cell.element.d.ts +0 -13
- package/dist/elements/table/elements/table-header-cell/table-header-cell.element.js +0 -40
- package/dist/elements/table/elements/table-row/index.d.ts +0 -2
- package/dist/elements/table/elements/table-row/table-row.element.css.js +0 -3
- package/dist/elements/table/elements/table-row/table-row.element.js +0 -111
- package/dist/elements/table/index.d.ts +0 -8
- package/dist/elements/table/table.element.css.js +0 -3
- package/dist/elements/table/table.element.d.ts +0 -20
- package/dist/elements/table/table.element.js +0 -97
- package/dist/elements/toast/index.d.ts +0 -3
- package/dist/elements/toast/models/index.d.ts +0 -2
- package/dist/elements/toast/models/toast-variant.js +0 -5
- package/dist/elements/toast/toast.element.css.js +0 -3
- package/dist/elements/toast/toast.element.d.ts +0 -13
- package/dist/elements/toast/toast.element.js +0 -31
- package/dist/elements/tooltip/index.d.ts +0 -3
- package/dist/elements/tooltip/models/index.d.ts +0 -2
- package/dist/elements/tooltip/models/tooltip-placement.js +0 -10
- package/dist/elements/tooltip/tooltip.element.css.js +0 -3
- package/dist/elements/tooltip/tooltip.element.js +0 -120
- package/dist/lib/controllers/focus-trap.controller.js +0 -55
- package/dist/lib/controllers/index.d.ts +0 -2
- package/dist/lib/directives/aria-boolean-attr.d.ts +0 -3
- package/dist/lib/directives/aria-boolean-attr.js +0 -9
- package/dist/lib/directives/index.d.ts +0 -5
- package/dist/lib/directives/optional-attr.js +0 -8
- package/dist/lib/directives/optional-slot.js +0 -14
- package/dist/lib/directives/slot-fallback.js +0 -16
- package/dist/lib/external/index.d.ts +0 -2
- package/dist/lib/external/roving-tabindex.d.ts +0 -87
- package/dist/lib/external/roving-tabindex.js +0 -386
- package/dist/lib/facade/checkbox-form-control.js +0 -78
- package/dist/lib/facade/checkbox-group-form-control.js +0 -109
- package/dist/lib/facade/index.d.ts +0 -6
- package/dist/lib/facade/option-control.js +0 -49
- package/dist/lib/facade/radio-group-form-control.js +0 -87
- package/dist/lib/facade/select-form-control.js +0 -108
- package/dist/lib/main.js +0 -35
- package/dist/lib/mixins/can-be-disabled.js +0 -60
- package/dist/lib/mixins/can-be-readonly.js +0 -33
- package/dist/lib/mixins/can-be-required.js +0 -33
- package/dist/lib/mixins/can-be-validated.js +0 -32
- package/dist/lib/mixins/dedupe-mixin.js +0 -23
- package/dist/lib/mixins/form-control.js +0 -61
- package/dist/lib/mixins/index.d.ts +0 -12
- package/dist/lib/mixins/is-localized.d.ts +0 -13
- package/dist/lib/mixins/is-localized.js +0 -41
- package/dist/lib/mixins/is-translatable.d.ts +0 -13
- package/dist/lib/mixins/is-translatable.js +0 -20
- package/dist/lib/mixins/number-control.js +0 -63
- package/dist/lib/mixins/with-aria-controls.d.ts +0 -11
- package/dist/lib/mixins/with-aria-controls.js +0 -43
- package/dist/lib/mixins/with-loading-state.js +0 -33
- package/dist/lib/models/custom-element.css.js +0 -3
- package/dist/lib/models/custom-element.d.ts +0 -10
- package/dist/lib/models/custom-element.js +0 -27
- package/dist/lib/models/index.d.ts +0 -5
- package/dist/lib/models/locale.d.ts +0 -2
- package/dist/lib/utils/create-intersection-observer.d.ts +0 -8
- package/dist/lib/utils/create-intersection-observer.js +0 -9
- package/dist/lib/utils/create-mutation-observer.d.ts +0 -8
- package/dist/lib/utils/create-mutation-observer.js +0 -9
- package/dist/lib/utils/create-options.js +0 -7
- package/dist/lib/utils/create-resize-observer.d.ts +0 -8
- package/dist/lib/utils/create-resize-observer.js +0 -9
- package/dist/lib/utils/dom.js +0 -35
- package/dist/lib/utils/element-loader.d.ts +0 -4
- package/dist/lib/utils/format.d.ts +0 -20
- package/dist/lib/utils/format.js +0 -56
- package/dist/lib/utils/get-unique-id.js +0 -15
- package/dist/lib/utils/index.d.ts +0 -13
- package/dist/lib/utils/keyboard-events.js +0 -42
- package/dist/lib/utils/localization.d.ts +0 -15
- package/dist/lib/utils/localization.js +0 -41
- package/dist/lib/utils/parse-date.js +0 -10
- package/dist/lib/utils/request-update-on-aria-change.d.ts +0 -34
- package/dist/lib/utils/request-update-on-aria-change.js +0 -15
- package/dist/lib/utils/shared-intersection-observer.js +0 -32
- package/dist/lib/utils/shared-resize-observer.js +0 -33
- package/dist/lib/utils/wait-for-animations.d.ts +0 -2
- package/dist/lib/utils/wait-for-animations.js +0 -8
- package/dist/styles/main.css +0 -1
- package/public/assets/draeger-pangea-text-medium.woff2 +0 -0
- package/public/assets/draeger-pangea-text-regular.woff2 +0 -0
- package/public/assets/draeger-pangea-text-semibold.woff2 +0 -0
- package/public/assets/fonts.css +0 -20
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { CanBeDisabled } from './can-be-disabled.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
import { getUniqueId } from '../utils/get-unique-id.js';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
-
var result = void 0 ;
|
|
9
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
-
if (decorator = decorators[i])
|
|
11
|
-
result = (decorator(target, key, result) ) || result;
|
|
12
|
-
if (result) __defProp(target, key, result);
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
const WithAriaControls = dedupeMixin((superClass) => {
|
|
16
|
-
class WithAriaControlsElement extends CanBeDisabled(superClass) {
|
|
17
|
-
get region() {
|
|
18
|
-
return this.nextElementSibling;
|
|
19
|
-
}
|
|
20
|
-
updateA11yAttributes() {
|
|
21
|
-
if (!this.region) return;
|
|
22
|
-
this.id ||= getUniqueId(this.localName);
|
|
23
|
-
this.role ||= "button";
|
|
24
|
-
this.region.role ||= "region";
|
|
25
|
-
this.region.id ||= `${this.id}-region`;
|
|
26
|
-
this.region.ariaHidden = this.disabled ? "true" : this.region.ariaHidden;
|
|
27
|
-
this.setAttribute("aria-controls", this.region.id);
|
|
28
|
-
this.region.setAttribute("aria-labelledby", this.id);
|
|
29
|
-
}
|
|
30
|
-
update(props) {
|
|
31
|
-
super.update(props);
|
|
32
|
-
if (props.has("disabled") || props.has("id")) {
|
|
33
|
-
this.updateA11yAttributes();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
__decorateClass([
|
|
38
|
-
property({ reflect: true })
|
|
39
|
-
], WithAriaControlsElement.prototype, "id");
|
|
40
|
-
return WithAriaControlsElement;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export { WithAriaControls };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { toAriaBooleanAttribute, fromAriaBooleanAttribute } from '../directives/aria-boolean-attr.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
-
var result = __getOwnPropDesc(target, key) ;
|
|
9
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
-
if (decorator = decorators[i])
|
|
11
|
-
result = (decorator(target, key, result) ) || result;
|
|
12
|
-
if (result) __defProp(target, key, result);
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
const WithLoadingState = dedupeMixin((superClass) => {
|
|
16
|
-
class WithLoadingStateElement extends superClass {
|
|
17
|
-
get loadingContainer() {
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
set loading(value) {
|
|
21
|
-
this.loadingContainer.ariaBusy = toAriaBooleanAttribute(value);
|
|
22
|
-
}
|
|
23
|
-
get loading() {
|
|
24
|
-
return fromAriaBooleanAttribute(this.loadingContainer.ariaBusy);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
__decorateClass([
|
|
28
|
-
property({ type: Boolean, reflect: true })
|
|
29
|
-
], WithLoadingStateElement.prototype, "loading");
|
|
30
|
-
return WithLoadingStateElement;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export { WithLoadingState };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const customElementStyles = "@layer reset,base,variant,state,theme,override;@layer reset{:where(*,*:before,*:after){box-sizing:border-box}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%;margin:0}input,button,textarea,select{font:inherit;margin:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;margin:0}p{text-wrap:pretty;margin:0}h1,h2,h3,h4,h5,h6{text-wrap:balance;margin:0}#root,#__next{isolation:isolate;margin:0}}@layer base{*{scrollbar-color:var(--odx-color-neutral-rest) var(--odx-palette-transparent)}:where(*:not(body)){scrollbar-width:thin}}@layer base{h1,h2,h3,h4,h5,h6{display:block;font-family:var(--odx-typography-font-family-brand);font-size:var(--_font-size);font-weight:var(--odx-typography-font-weight-semibold);line-height:var(--_line-height);color:inherit}h6{--_font-size: var(--odx-breakpoint-font-size-heading-6);--_line-height: var(--odx-breakpoint-line-height-heading-6)}h5{--_font-size: var(--odx-breakpoint-font-size-heading-5);--_line-height: var(--odx-breakpoint-line-height-heading-5)}h4{--_font-size: var(--odx-breakpoint-font-size-heading-4);--_line-height: var(--odx-breakpoint-line-height-heading-4)}h3{--_font-size: var(--odx-breakpoint-font-size-heading-3);--_line-height: var(--odx-breakpoint-line-height-heading-3)}h2{--_font-size: var(--odx-breakpoint-font-size-heading-2);--_line-height: var(--odx-breakpoint-line-height-heading-2)}h1{--_font-size: var(--odx-breakpoint-font-size-heading-1);--_line-height: var(--odx-breakpoint-line-height-heading-1)}[odxPreventTextOverflow]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}@layer reset{:where(:host){box-sizing:border-box;border:none;color:inherit;outline:none}}";
|
|
2
|
-
|
|
3
|
-
export { customElementStyles as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CSSResult, CSSResultGroup, HTMLTemplateResult, LitElement, TemplateResult } from 'lit';
|
|
2
|
-
type AllowedEvents = 'change' | 'select' | 'submit' | 'toggle' | 'remove' | 'add' | 'expand' | 'collapse';
|
|
3
|
-
export declare function customElement(selector?: keyof HTMLElementTagNameMap, styles?: Array<CSSResultGroup | CSSResult | string>): (target: typeof CustomElement) => void;
|
|
4
|
-
export declare class CustomElement extends LitElement {
|
|
5
|
-
static selector: string;
|
|
6
|
-
protected render(): HTMLTemplateResult | TemplateResult | string;
|
|
7
|
-
emit(event: AllowedEvents, eventInit?: CustomEventInit): boolean;
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=custom-element.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, unsafeCSS, CSSResult } from 'lit';
|
|
2
|
-
import customElementStyles from './custom-element.css.js';
|
|
3
|
-
|
|
4
|
-
function toCSSResult(value) {
|
|
5
|
-
return value instanceof CSSResult || value instanceof CSSStyleSheet ? value : unsafeCSS(value);
|
|
6
|
-
}
|
|
7
|
-
function customElement(selector, styles = []) {
|
|
8
|
-
if (selector && globalThis.customElements.get(selector)) return () => void 0;
|
|
9
|
-
const preparedStyles = [customElementStyles, styles].map(toCSSResult);
|
|
10
|
-
return (target) => {
|
|
11
|
-
target.styles = target.styles ? [target.styles, preparedStyles].flat() : preparedStyles;
|
|
12
|
-
if (selector) {
|
|
13
|
-
target.selector = selector;
|
|
14
|
-
customElements.define(target.selector, target);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
class CustomElement extends LitElement {
|
|
19
|
-
render() {
|
|
20
|
-
return html`<slot></slot>`;
|
|
21
|
-
}
|
|
22
|
-
emit(event, eventInit) {
|
|
23
|
-
return !this.dispatchEvent(new CustomEvent(event, { bubbles: true, composed: true, cancelable: true, ...eventInit }));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { CustomElement, customElement };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a IntersectionObserver instance safely, falling back to a dummy if the API is not supported.
|
|
3
|
-
*
|
|
4
|
-
* @param {IntersectionObserverCallback} callback - The callback to execute when an observed element's size changes.
|
|
5
|
-
* @returns {IntersectionObserver} A IntersectionObserver instance or a dummy object with no-op methods if unsupported.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createIntersectionObserver(callback: IntersectionObserverCallback): IntersectionObserver;
|
|
8
|
-
//# sourceMappingURL=create-intersection-observer.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
function createIntersectionObserver(callback) {
|
|
2
|
-
try {
|
|
3
|
-
return new IntersectionObserver(callback);
|
|
4
|
-
} catch {
|
|
5
|
-
return { root: null, rootMargin: "", thresholds: [], takeRecords: () => [], observe: () => void 0, disconnect: () => void 0, unobserve: () => void 0 };
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { createIntersectionObserver };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a new MutationObserver instance.
|
|
3
|
-
*
|
|
4
|
-
* @param {MutationCallback} callback - The callback to execute when a mutation occurs.
|
|
5
|
-
* @returns {MutationObserver} A MutationObserver instance or a dummy object with no-op methods if unsupported.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createMutationObserver(callback: MutationCallback): MutationObserver;
|
|
8
|
-
//# sourceMappingURL=create-mutation-observer.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a ResizeObserver instance safely, falling back to a dummy if the API is not supported.
|
|
3
|
-
*
|
|
4
|
-
* @param {ResizeObserverCallback} callback - The callback to execute when an observed element's size changes.
|
|
5
|
-
* @returns {ResizeObserver} A ResizeObserver instance or a dummy object with no-op methods if unsupported.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createResizeObserver(callback: ResizeObserverCallback): ResizeObserver;
|
|
8
|
-
//# sourceMappingURL=create-resize-observer.d.ts.map
|
package/dist/lib/utils/dom.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { round } from 'es-toolkit';
|
|
2
|
-
|
|
3
|
-
function toggleAttribute(element, name, value) {
|
|
4
|
-
if (!element) return;
|
|
5
|
-
if (typeof value === "boolean") {
|
|
6
|
-
element.toggleAttribute(name, value);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (value != null) {
|
|
10
|
-
element.setAttribute(name, value.toString());
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
element.removeAttribute(name);
|
|
14
|
-
}
|
|
15
|
-
function getElementFromEvent(event, filterFn) {
|
|
16
|
-
return event.composedPath().find((node) => node instanceof Element && filterFn(node));
|
|
17
|
-
}
|
|
18
|
-
function findClosestDocument(node) {
|
|
19
|
-
let parent = node.parentNode;
|
|
20
|
-
while (parent && parent.nodeType !== Node.DOCUMENT_FRAGMENT_NODE && parent.nodeType !== Node.DOCUMENT_NODE) {
|
|
21
|
-
parent = parent.parentNode;
|
|
22
|
-
}
|
|
23
|
-
return parent;
|
|
24
|
-
}
|
|
25
|
-
function toPx(value) {
|
|
26
|
-
const coercedValue = Number(value);
|
|
27
|
-
if (Number.isNaN(coercedValue)) return null;
|
|
28
|
-
return `${round(coercedValue, 2)}px`;
|
|
29
|
-
}
|
|
30
|
-
function getAssignedElements(host, ...slots) {
|
|
31
|
-
const selector = slots.map((slot) => `[slot=${slot}]`).join(", ") || "*";
|
|
32
|
-
return Array.from(host.querySelectorAll(`:is(${selector})`));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { findClosestDocument, getAssignedElements, getElementFromEvent, toPx, toggleAttribute };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Locale, SingleUnitIdentifier } from '../models';
|
|
2
|
-
export interface FormatOptions {
|
|
3
|
-
locale?: Locale;
|
|
4
|
-
}
|
|
5
|
-
export declare const iso8601DateTimeFormat: Intl.DateTimeFormat;
|
|
6
|
-
export interface DateTimeFormatOptions extends Omit<Intl.DateTimeFormatOptions, 'dateStyle'>, FormatOptions {
|
|
7
|
-
dateStyle?: 'iso8601' | Intl.DateTimeFormatOptions['dateStyle'];
|
|
8
|
-
}
|
|
9
|
-
export declare function formatDate(input: number | string | Date, options?: DateTimeFormatOptions): string;
|
|
10
|
-
export interface NumberFormatOptions extends Intl.NumberFormatOptions, FormatOptions {
|
|
11
|
-
unit?: SingleUnitIdentifier;
|
|
12
|
-
}
|
|
13
|
-
export declare function formatNumber(input: number | string, options?: NumberFormatOptions): string;
|
|
14
|
-
export type ListFormatOptions = Intl.ListFormatOptions & FormatOptions;
|
|
15
|
-
export declare function formatList(input: string[], options?: ListFormatOptions): string;
|
|
16
|
-
export interface RelativeTimeFormatOptions extends Intl.RelativeTimeFormatOptions, FormatOptions {
|
|
17
|
-
minUnit?: Intl.RelativeTimeFormatUnit;
|
|
18
|
-
}
|
|
19
|
-
export declare function formatRelativeTime(input: number | string | Date, options?: RelativeTimeFormatOptions): string;
|
|
20
|
-
//# sourceMappingURL=format.d.ts.map
|
package/dist/lib/utils/format.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { getLocalizationOptions } from './localization.js';
|
|
2
|
-
import { parseDate } from './parse-date.js';
|
|
3
|
-
|
|
4
|
-
const iso8601DateTimeFormat = new Intl.DateTimeFormat("sv-SE", { dateStyle: "short" });
|
|
5
|
-
function formatDate(input, options) {
|
|
6
|
-
const value = parseDate(input);
|
|
7
|
-
if (!value) return "";
|
|
8
|
-
const { dateTimeFormatOptions } = getLocalizationOptions({ dateTimeFormatOptions: options });
|
|
9
|
-
if (dateTimeFormatOptions?.dateStyle === "iso8601") {
|
|
10
|
-
return iso8601DateTimeFormat.format(value);
|
|
11
|
-
}
|
|
12
|
-
return new Intl.DateTimeFormat(options?.locale, dateTimeFormatOptions).format(value);
|
|
13
|
-
}
|
|
14
|
-
function formatNumber(input, options) {
|
|
15
|
-
const value = Number(input);
|
|
16
|
-
if (Number.isNaN(value)) return "";
|
|
17
|
-
const { numberFormatOptions } = getLocalizationOptions({ numberFormatOptions: options });
|
|
18
|
-
if (numberFormatOptions?.currency) {
|
|
19
|
-
numberFormatOptions.style = "currency";
|
|
20
|
-
}
|
|
21
|
-
return new Intl.NumberFormat(numberFormatOptions?.locale, numberFormatOptions).format(value);
|
|
22
|
-
}
|
|
23
|
-
function formatList(input, options) {
|
|
24
|
-
if (input.length === 0) return "";
|
|
25
|
-
const { listFormatOptions } = getLocalizationOptions({ listFormatOptions: options });
|
|
26
|
-
return new Intl.ListFormat(options?.locale, listFormatOptions).format(input);
|
|
27
|
-
}
|
|
28
|
-
const availableTimeUnits = [
|
|
29
|
-
{ max: 59e3, value: 1e3, unit: "second" },
|
|
30
|
-
// max 59 seconds
|
|
31
|
-
{ max: 276e4, value: 6e4, unit: "minute" },
|
|
32
|
-
// max 46 minutes
|
|
33
|
-
{ max: 72e6, value: 36e5, unit: "hour" },
|
|
34
|
-
// max 20 hours
|
|
35
|
-
{ max: 5184e5, value: 864e5, unit: "day" },
|
|
36
|
-
// max 6 days
|
|
37
|
-
{ max: 24192e5, value: 6048e5, unit: "week" },
|
|
38
|
-
// max 28 days
|
|
39
|
-
{ max: 28512e6, value: 2592e6, unit: "month" },
|
|
40
|
-
// max 11 months
|
|
41
|
-
{ max: Number.POSITIVE_INFINITY, value: 31536e6, unit: "year" }
|
|
42
|
-
];
|
|
43
|
-
function findTimeUnit(value, minUnit) {
|
|
44
|
-
const minTimeUnit = availableTimeUnits.find(({ unit }) => unit === minUnit) ?? availableTimeUnits[0];
|
|
45
|
-
return availableTimeUnits.find((config) => value < config.max && config.value >= minTimeUnit.value);
|
|
46
|
-
}
|
|
47
|
-
function formatRelativeTime(input, options) {
|
|
48
|
-
const value = parseDate(input);
|
|
49
|
-
if (!value) return "";
|
|
50
|
-
const { relativeTimeFormatOptions } = getLocalizationOptions({ relativeTimeFormatOptions: options });
|
|
51
|
-
const relativeTime = value.getTime() - (/* @__PURE__ */ new Date()).getTime();
|
|
52
|
-
const timeUnit = findTimeUnit(Math.abs(relativeTime), relativeTimeFormatOptions?.minUnit);
|
|
53
|
-
return new Intl.RelativeTimeFormat(options?.locale, relativeTimeFormatOptions).format(Math.round(relativeTime / timeUnit.value), timeUnit.unit);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { formatDate, formatList, formatNumber, formatRelativeTime, iso8601DateTimeFormat };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const uniqueIdCache = /* @__PURE__ */ new Map();
|
|
2
|
-
function getUniqueId(key) {
|
|
3
|
-
const nextIndex = (uniqueIdCache.get(key) ?? 0) + 1;
|
|
4
|
-
uniqueIdCache.set(key, nextIndex);
|
|
5
|
-
return `${key}-${nextIndex}`;
|
|
6
|
-
}
|
|
7
|
-
function clearUniqueIdCache(key) {
|
|
8
|
-
if (key) {
|
|
9
|
-
uniqueIdCache.delete(key);
|
|
10
|
-
} else {
|
|
11
|
-
uniqueIdCache.clear();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { clearUniqueIdCache, getUniqueId };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './create-mutation-observer';
|
|
2
|
-
export * from './create-options';
|
|
3
|
-
export * from './dom';
|
|
4
|
-
export * from './format';
|
|
5
|
-
export * from './get-unique-id';
|
|
6
|
-
export * from './keyboard-events';
|
|
7
|
-
export * from './localization';
|
|
8
|
-
export * from './parse-date';
|
|
9
|
-
export * from './request-update-on-aria-change';
|
|
10
|
-
export * from './shared-intersection-observer';
|
|
11
|
-
export * from './shared-resize-observer';
|
|
12
|
-
export * from './wait-for-animations';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const KeyboardKey = {
|
|
2
|
-
ARROW_UP: "ArrowUp",
|
|
3
|
-
ARROW_DOWN: "ArrowDown",
|
|
4
|
-
ARROW_LEFT: "ArrowLeft",
|
|
5
|
-
ARROW_RIGHT: "ArrowRight",
|
|
6
|
-
ENTER: "Enter",
|
|
7
|
-
ESCAPE: "Escape",
|
|
8
|
-
SPACE: " ",
|
|
9
|
-
TAB: "Tab",
|
|
10
|
-
BACKSPACE: "Backspace",
|
|
11
|
-
DELETE: "Delete",
|
|
12
|
-
END: "End",
|
|
13
|
-
HOME: "Home",
|
|
14
|
-
PAGE_UP: "PageUp",
|
|
15
|
-
PAGE_DOWN: "PageDown",
|
|
16
|
-
SHIFT: "Shift",
|
|
17
|
-
CONTROL: "Control",
|
|
18
|
-
ALT: "Alt",
|
|
19
|
-
META: "Meta"
|
|
20
|
-
};
|
|
21
|
-
function getKeyboardEventInfo(event) {
|
|
22
|
-
const { key } = event;
|
|
23
|
-
const up = key === KeyboardKey.ARROW_UP;
|
|
24
|
-
const right = key === KeyboardKey.ARROW_RIGHT;
|
|
25
|
-
const down = key === KeyboardKey.ARROW_DOWN;
|
|
26
|
-
const left = key === KeyboardKey.ARROW_LEFT;
|
|
27
|
-
return {
|
|
28
|
-
axis: { x: left || right, y: up || down },
|
|
29
|
-
direction: { up, right, down, left },
|
|
30
|
-
actions: {
|
|
31
|
-
enter: key === KeyboardKey.ENTER,
|
|
32
|
-
escape: key === KeyboardKey.ESCAPE,
|
|
33
|
-
space: key === KeyboardKey.SPACE,
|
|
34
|
-
tab: key === KeyboardKey.TAB && !event.shiftKey,
|
|
35
|
-
backTab: key === KeyboardKey.TAB && event.shiftKey,
|
|
36
|
-
start: key === KeyboardKey.HOME,
|
|
37
|
-
end: key === KeyboardKey.END
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { KeyboardKey, getKeyboardEventInfo };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Locale } from '../models';
|
|
2
|
-
import { DateTimeFormatOptions, ListFormatOptions, NumberFormatOptions, RelativeTimeFormatOptions } from './format';
|
|
3
|
-
export interface LocalizationOptions {
|
|
4
|
-
defaultLocale: () => Locale;
|
|
5
|
-
numberFormatOptions?: NumberFormatOptions;
|
|
6
|
-
dateTimeFormatOptions?: DateTimeFormatOptions;
|
|
7
|
-
listFormatOptions?: ListFormatOptions;
|
|
8
|
-
relativeTimeFormatOptions?: RelativeTimeFormatOptions;
|
|
9
|
-
}
|
|
10
|
-
export declare function setLocalizationOptions(options?: Partial<LocalizationOptions> | null): void;
|
|
11
|
-
export declare function getLocalizationOptions(options?: Partial<LocalizationOptions> | null): LocalizationOptions;
|
|
12
|
-
export declare function watchLocaleChanges(root?: HTMLElement): void;
|
|
13
|
-
export declare function setLocale(locale: Locale | null): void;
|
|
14
|
-
export declare function getLocale(locale?: Locale | null): Intl.Locale;
|
|
15
|
-
//# sourceMappingURL=localization.d.ts.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { signal } from '@lit-labs/signals';
|
|
2
|
-
import { createMutationObserver } from './create-mutation-observer.js';
|
|
3
|
-
import { createOptions } from './create-options.js';
|
|
4
|
-
|
|
5
|
-
const LocalizationOptions = createOptions({
|
|
6
|
-
defaultLocale: () => navigator.language,
|
|
7
|
-
relativeTimeFormatOptions: {
|
|
8
|
-
minUnit: "minute"
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const localizationOptions = signal(null);
|
|
12
|
-
const activeLocale = signal(null, { equals: (t, t2) => t?.toString() === t2?.toString() });
|
|
13
|
-
function setLocalizationOptions(options) {
|
|
14
|
-
localizationOptions.set(getLocalizationOptions(options));
|
|
15
|
-
}
|
|
16
|
-
function getLocalizationOptions(options) {
|
|
17
|
-
return LocalizationOptions(options ?? localizationOptions.get() ?? {});
|
|
18
|
-
}
|
|
19
|
-
function watchLocaleChanges(root = document.documentElement) {
|
|
20
|
-
const updateLocale = () => activeLocale.set(getLocale(root.lang));
|
|
21
|
-
const observer = createMutationObserver(updateLocale);
|
|
22
|
-
observer.observe(root, { attributes: true, attributeFilter: ["lang"] });
|
|
23
|
-
updateLocale();
|
|
24
|
-
}
|
|
25
|
-
function setLocale(locale) {
|
|
26
|
-
if (locale === null) {
|
|
27
|
-
document.documentElement.lang = getLocalizationOptions().defaultLocale().toString();
|
|
28
|
-
} else {
|
|
29
|
-
document.documentElement.lang = getLocale(locale).toString();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function getLocale(locale) {
|
|
33
|
-
const fallbackLocale = activeLocale.get() || getLocalizationOptions().defaultLocale();
|
|
34
|
-
try {
|
|
35
|
-
return new Intl.Locale(locale || fallbackLocale);
|
|
36
|
-
} catch {
|
|
37
|
-
return new Intl.Locale(fallbackLocale);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { getLocale, getLocalizationOptions, setLocale, setLocalizationOptions, watchLocaleChanges };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function parseDate(value) {
|
|
2
|
-
const date = new Date(value);
|
|
3
|
-
if (Number.isNaN(date.getTime()) && typeof value === "string") {
|
|
4
|
-
const timestamp = Number(value);
|
|
5
|
-
return Number.isNaN(timestamp) ? null : new Date(timestamp);
|
|
6
|
-
}
|
|
7
|
-
return Number.isNaN(date.getTime()) ? null : date;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { parseDate };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ReactiveElement } from 'lit';
|
|
2
|
-
import { ARIAProperty } from '../models';
|
|
3
|
-
/**
|
|
4
|
-
* Sets up a `ReactiveElement` constructor to enable updates when delegating
|
|
5
|
-
* aria attributes. Elements may bind `this.aria*` properties to `aria-*`
|
|
6
|
-
* attributes in their render functions.
|
|
7
|
-
*
|
|
8
|
-
* This function will:
|
|
9
|
-
* - Call `requestUpdate()` when an aria attribute changes.
|
|
10
|
-
* - Add `role="presentation"` to the host.
|
|
11
|
-
*
|
|
12
|
-
* NOTE: The following features are not currently supported:
|
|
13
|
-
* - Delegating IDREF attributes (ex: `aria-labelledby`, `aria-controls`)
|
|
14
|
-
* - Delegating the `role` attribute
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* class ButtonElement extends LitElement {
|
|
18
|
-
* static {
|
|
19
|
-
* requestUpdateOnAriaChange(XButton);
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* protected override render() {
|
|
23
|
-
* return html`
|
|
24
|
-
* <button aria-label=${this.ariaLabel || nothing}>
|
|
25
|
-
* <slot></slot>
|
|
26
|
-
* </button>
|
|
27
|
-
* `;
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
* @param ctor The `ReactiveElement` constructor to patch.
|
|
32
|
-
*/
|
|
33
|
-
export declare function requestUpdateOnAriaChange(ariaProperties: ARIAProperty[]): (ctor: typeof ReactiveElement) => void;
|
|
34
|
-
//# sourceMappingURL=request-update-on-aria-change.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function ariaPropertyToAttribute(property) {
|
|
2
|
-
return property.replace("aria", "aria-").replace(/Elements?/g, "").toLowerCase();
|
|
3
|
-
}
|
|
4
|
-
function requestUpdateOnAriaChange(ariaProperties) {
|
|
5
|
-
return (ctor) => {
|
|
6
|
-
for (const ariaProperty of ariaProperties) {
|
|
7
|
-
ctor.createProperty(ariaProperty, {
|
|
8
|
-
attribute: ariaPropertyToAttribute(ariaProperty),
|
|
9
|
-
reflect: true
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { requestUpdateOnAriaChange };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createIntersectionObserver } from './create-intersection-observer.js';
|
|
2
|
-
|
|
3
|
-
class SharedIntersectionObserverInstance {
|
|
4
|
-
#observer;
|
|
5
|
-
#handlers = /* @__PURE__ */ new WeakMap();
|
|
6
|
-
#updateLog = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
observe(target, handler, options = { fpsLimit: 60 }) {
|
|
8
|
-
this.#observer ??= createIntersectionObserver(this.#handleIntersection);
|
|
9
|
-
this.#handlers.set(target, [handler, options.fpsLimit]);
|
|
10
|
-
this.#observer.observe(target);
|
|
11
|
-
}
|
|
12
|
-
unobserve(target) {
|
|
13
|
-
this.#handlers.delete(target);
|
|
14
|
-
this.#observer?.unobserve(target);
|
|
15
|
-
}
|
|
16
|
-
#handleIntersection = (entries) => {
|
|
17
|
-
if (!this.#observer) return;
|
|
18
|
-
for (const entry of entries) {
|
|
19
|
-
const [handler, fpsLimit] = this.#handlers.get(entry.target) ?? [];
|
|
20
|
-
if (typeof handler !== "function" || !this.#shouldUpdate(entry.target, fpsLimit)) continue;
|
|
21
|
-
handler?.([entry], this.#observer);
|
|
22
|
-
this.#updateLog.set(entry.target, Date.now());
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
#shouldUpdate(target, fpsLimit) {
|
|
26
|
-
if (!target.isConnected || typeof fpsLimit !== "number" || fpsLimit < 1) return false;
|
|
27
|
-
return Date.now() - (this.#updateLog.get(target) ?? 0) >= 1e3 / fpsLimit;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const SharedIntersectionObserver = new SharedIntersectionObserverInstance();
|
|
31
|
-
|
|
32
|
-
export { SharedIntersectionObserver };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createResizeObserver } from './create-resize-observer.js';
|
|
2
|
-
|
|
3
|
-
class SharedResizeObserverInstance {
|
|
4
|
-
#observer;
|
|
5
|
-
#handlers = /* @__PURE__ */ new WeakMap();
|
|
6
|
-
#updateLog = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
observe(target, handler, options = { fpsLimit: 60 }) {
|
|
8
|
-
const { fpsLimit, ...observerOptions } = options;
|
|
9
|
-
this.#observer ??= createResizeObserver(this.#handleResize);
|
|
10
|
-
this.#handlers.set(target, [handler, fpsLimit]);
|
|
11
|
-
this.#observer.observe(target, observerOptions);
|
|
12
|
-
}
|
|
13
|
-
unobserve(target) {
|
|
14
|
-
this.#handlers.delete(target);
|
|
15
|
-
this.#observer?.unobserve(target);
|
|
16
|
-
}
|
|
17
|
-
#handleResize = (entries) => {
|
|
18
|
-
if (!this.#observer) return;
|
|
19
|
-
for (const entry of entries) {
|
|
20
|
-
const [handler, fpsLimit] = this.#handlers.get(entry.target) ?? [];
|
|
21
|
-
if (typeof handler !== "function" || !this.#shouldUpdate(entry.target, fpsLimit ?? 60)) continue;
|
|
22
|
-
handler?.([entry], this.#observer);
|
|
23
|
-
this.#updateLog.set(entry.target, Date.now());
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
#shouldUpdate(target, fpsLimit) {
|
|
27
|
-
if (!target.isConnected || fpsLimit < 1) return false;
|
|
28
|
-
return Date.now() - (this.#updateLog.get(target) ?? 0) >= 1e3 / fpsLimit;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const SharedResizeObserver = new SharedResizeObserverInstance();
|
|
32
|
-
|
|
33
|
-
export { SharedResizeObserver };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
async function waitForAnimations(element, subtree = false) {
|
|
2
|
-
if (!element || typeof element.getAnimations !== "function") {
|
|
3
|
-
return [];
|
|
4
|
-
}
|
|
5
|
-
return Promise.all(element.getAnimations({ subtree }).map((animation) => animation.finished)).catch(() => []);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { waitForAnimations };
|