@odx/foundation 1.0.0-alpha.4 → 1.0.0-alpha.41
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,87 +0,0 @@
|
|
|
1
|
-
import { isServer } from 'lit';
|
|
2
|
-
import { queryAssignedElements } from 'lit/decorators.js';
|
|
3
|
-
import { CheckboxFormControl } from './checkbox-form-control.js';
|
|
4
|
-
import { RovingTabindexController } from '../external/roving-tabindex.js';
|
|
5
|
-
import { FormControl } from '../mixins/form-control.js';
|
|
6
|
-
import { CustomElement } from '../models/custom-element.js';
|
|
7
|
-
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
-
var result = void 0 ;
|
|
11
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
-
if (decorator = decorators[i])
|
|
13
|
-
result = (decorator(target, key, result) ) || result;
|
|
14
|
-
if (result) __defProp(target, key, result);
|
|
15
|
-
return result;
|
|
16
|
-
};
|
|
17
|
-
class RadioGroupFormControl extends FormControl(CustomElement) {
|
|
18
|
-
static {
|
|
19
|
-
this.shadowRootOptions = {
|
|
20
|
-
...CustomElement.shadowRootOptions,
|
|
21
|
-
delegatesFocus: true
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
if (!isServer) {
|
|
27
|
-
this.addEventListener("change", this.#handleChange, { capture: true });
|
|
28
|
-
new RovingTabindexController(this, {
|
|
29
|
-
direction: "both",
|
|
30
|
-
elements: () => this.getControls(),
|
|
31
|
-
elementEnterAction: (element) => element.click(),
|
|
32
|
-
focusInIndex: (elements) => elements.findIndex((element) => element.checked)
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
getControls() {
|
|
37
|
-
return this.elements.filter((element) => this.isControl(element));
|
|
38
|
-
}
|
|
39
|
-
connectedCallback() {
|
|
40
|
-
super.connectedCallback?.();
|
|
41
|
-
this.role ||= "radiogroup";
|
|
42
|
-
}
|
|
43
|
-
isControl(element) {
|
|
44
|
-
return element instanceof CheckboxFormControl;
|
|
45
|
-
}
|
|
46
|
-
update(changes) {
|
|
47
|
-
super.update?.(changes);
|
|
48
|
-
if (changes.has("value")) {
|
|
49
|
-
this.updateCheckboxControls((control) => {
|
|
50
|
-
control.checked = this.value.includes(control.value);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (changes.has("name")) {
|
|
54
|
-
this.updateCheckboxControls((control) => {
|
|
55
|
-
control.name = this.name;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (changes.has("disabled")) {
|
|
59
|
-
this.updateCheckboxControls((control) => {
|
|
60
|
-
control.disabled = this.disabled;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
if (changes.has("readonly")) {
|
|
64
|
-
this.updateCheckboxControls((control) => {
|
|
65
|
-
control.readonly = this.readonly;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
if (changes.has("required") || changes.has("value")) {
|
|
69
|
-
const [firstControl] = this.getControls();
|
|
70
|
-
if (!firstControl) return;
|
|
71
|
-
this.setValidity({ valueMissing: this.required && this.value.length === 0 }, firstControl);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async updateCheckboxControls(updateFn) {
|
|
75
|
-
await 0;
|
|
76
|
-
this.getControls().forEach(updateFn);
|
|
77
|
-
}
|
|
78
|
-
#handleChange = ({ target }) => {
|
|
79
|
-
if (!this.isControl(target) || this.value === target.value) return;
|
|
80
|
-
this.value = target.value;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
__decorateClass([
|
|
84
|
-
queryAssignedElements({ flatten: true })
|
|
85
|
-
], RadioGroupFormControl.prototype, "elements");
|
|
86
|
-
|
|
87
|
-
export { RadioGroupFormControl };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { isServer } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { OptionControl } from './option-control.js';
|
|
4
|
-
import { getElementFromEvent } from '../utils/dom.js';
|
|
5
|
-
import { FormControl } from '../mixins/form-control.js';
|
|
6
|
-
import { CustomElement } from '../models/custom-element.js';
|
|
7
|
-
import { getKeyboardEventInfo } from '../utils/keyboard-events.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
class SelectFormControl extends FormControl(
|
|
19
|
-
CustomElement
|
|
20
|
-
) {
|
|
21
|
-
constructor() {
|
|
22
|
-
super();
|
|
23
|
-
this.#selectedOptions = /* @__PURE__ */ new Map();
|
|
24
|
-
this.multiple = false;
|
|
25
|
-
this.value = "";
|
|
26
|
-
this.handleKeyboardEvent = (event) => {
|
|
27
|
-
const { actions } = getKeyboardEventInfo(event);
|
|
28
|
-
const option = getElementFromEvent(event, (node) => node instanceof OptionControl);
|
|
29
|
-
if (!option || !actions.enter && !actions.space) return;
|
|
30
|
-
event.preventDefault();
|
|
31
|
-
if (event.type === "keydown") return;
|
|
32
|
-
this.toggle(option, void 0, true);
|
|
33
|
-
};
|
|
34
|
-
this.#handleClick = (event) => {
|
|
35
|
-
const option = getElementFromEvent(event, (node) => node instanceof OptionControl);
|
|
36
|
-
if (!option) return;
|
|
37
|
-
this.toggle(option, void 0, true);
|
|
38
|
-
};
|
|
39
|
-
if (!isServer) {
|
|
40
|
-
this.addEventListener("click", this.#handleClick);
|
|
41
|
-
this.addEventListener("keydown", this.handleKeyboardEvent);
|
|
42
|
-
this.addEventListener("keyup", this.handleKeyboardEvent);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
#selectedOptions;
|
|
46
|
-
get selectedOptions() {
|
|
47
|
-
return this.#selectedOptions.values();
|
|
48
|
-
}
|
|
49
|
-
toggle(option, state, emitEvent = false) {
|
|
50
|
-
const currentState = option.selected;
|
|
51
|
-
const newState = state ?? !option.selected;
|
|
52
|
-
if (this.disabled || newState === option.selected) return;
|
|
53
|
-
option.selected = newState;
|
|
54
|
-
this.updateValue(option);
|
|
55
|
-
if (!emitEvent || !this.emit("change")) return;
|
|
56
|
-
option.selected = currentState;
|
|
57
|
-
this.updateValue(option);
|
|
58
|
-
}
|
|
59
|
-
updateValue(option) {
|
|
60
|
-
if (this.multiple) {
|
|
61
|
-
const value = typeof this.value === "string" ? [this.value].filter(Boolean) : this.value;
|
|
62
|
-
this.value = option.selected ? [...value, option.value] : value.filter((value2) => value2 !== option.value);
|
|
63
|
-
} else {
|
|
64
|
-
this.value = option.value;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
willUpdate(changes) {
|
|
68
|
-
super.willUpdate?.(changes);
|
|
69
|
-
if (changes.has("multiple")) {
|
|
70
|
-
const [selectedOption] = Array.from(this.#selectedOptions.entries());
|
|
71
|
-
if (selectedOption) {
|
|
72
|
-
this.updateValue(selectedOption[1]);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (changes.has("value")) {
|
|
76
|
-
this.updateSelection();
|
|
77
|
-
}
|
|
78
|
-
if (changes.has("required") || changes.has("value")) {
|
|
79
|
-
const [selectedOption] = this.#selectedOptions.values();
|
|
80
|
-
if (!selectedOption?.selected) return;
|
|
81
|
-
this.setValidity({ valueMissing: this.required && this.value.length === 0 }, selectedOption);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async updateSelection() {
|
|
85
|
-
if (this.disabled) return;
|
|
86
|
-
await 0;
|
|
87
|
-
for (const option of this.options ?? []) {
|
|
88
|
-
if (option.disabled) continue;
|
|
89
|
-
option.selected = this.multiple ? this.value.includes(option.value) : this.value === option.value;
|
|
90
|
-
option.setInactive();
|
|
91
|
-
if (option.selected) {
|
|
92
|
-
this.#selectedOptions.set(option.value, option);
|
|
93
|
-
} else {
|
|
94
|
-
this.#selectedOptions.delete(option.value);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
this.requestUpdate();
|
|
98
|
-
}
|
|
99
|
-
#handleClick;
|
|
100
|
-
}
|
|
101
|
-
__decorateClass([
|
|
102
|
-
property({ type: Boolean, reflect: true })
|
|
103
|
-
], SelectFormControl.prototype, "multiple");
|
|
104
|
-
__decorateClass([
|
|
105
|
-
property()
|
|
106
|
-
], SelectFormControl.prototype, "value");
|
|
107
|
-
|
|
108
|
-
export { SelectFormControl };
|
package/dist/lib/main.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export { FocusTrapController } from './controllers/focus-trap.controller.js';
|
|
2
|
-
export { fromAriaBooleanAttribute, toAriaBooleanAttribute } from './directives/aria-boolean-attr.js';
|
|
3
|
-
export { optionalAttr } from './directives/optional-attr.js';
|
|
4
|
-
export { optionalSlot } from './directives/optional-slot.js';
|
|
5
|
-
export { emptySlotFallbackFix } from './directives/slot-fallback.js';
|
|
6
|
-
export { FocusGroupController, RovingTabindexController } from './external/roving-tabindex.js';
|
|
7
|
-
export { CheckboxFormControl } from './facade/checkbox-form-control.js';
|
|
8
|
-
export { CheckboxGroupFormControl } from './facade/checkbox-group-form-control.js';
|
|
9
|
-
export { OptionControl } from './facade/option-control.js';
|
|
10
|
-
export { RadioGroupFormControl } from './facade/radio-group-form-control.js';
|
|
11
|
-
export { SelectFormControl } from './facade/select-form-control.js';
|
|
12
|
-
export { CanBeDisabled } from './mixins/can-be-disabled.js';
|
|
13
|
-
export { CanBeReadonly } from './mixins/can-be-readonly.js';
|
|
14
|
-
export { CanBeRequired } from './mixins/can-be-required.js';
|
|
15
|
-
export { CanBeValidated } from './mixins/can-be-validated.js';
|
|
16
|
-
export { dedupeMixin } from './mixins/dedupe-mixin.js';
|
|
17
|
-
export { FormControl } from './mixins/form-control.js';
|
|
18
|
-
export { IsLocalized } from './mixins/is-localized.js';
|
|
19
|
-
export { IsTranslatable } from './mixins/is-translatable.js';
|
|
20
|
-
export { NumberControl } from './mixins/number-control.js';
|
|
21
|
-
export { WithAriaControls } from './mixins/with-aria-controls.js';
|
|
22
|
-
export { WithLoadingState } from './mixins/with-loading-state.js';
|
|
23
|
-
export { CustomElement, customElement } from './models/custom-element.js';
|
|
24
|
-
export { createMutationObserver } from './utils/create-mutation-observer.js';
|
|
25
|
-
export { createOptions } from './utils/create-options.js';
|
|
26
|
-
export { findClosestDocument, getAssignedElements, getElementFromEvent, toPx, toggleAttribute } from './utils/dom.js';
|
|
27
|
-
export { formatDate, formatList, formatNumber, formatRelativeTime, iso8601DateTimeFormat } from './utils/format.js';
|
|
28
|
-
export { clearUniqueIdCache, getUniqueId } from './utils/get-unique-id.js';
|
|
29
|
-
export { KeyboardKey, getKeyboardEventInfo } from './utils/keyboard-events.js';
|
|
30
|
-
export { getLocale, getLocalizationOptions, setLocale, setLocalizationOptions, watchLocaleChanges } from './utils/localization.js';
|
|
31
|
-
export { parseDate } from './utils/parse-date.js';
|
|
32
|
-
export { requestUpdateOnAriaChange } from './utils/request-update-on-aria-change.js';
|
|
33
|
-
export { SharedIntersectionObserver } from './utils/shared-intersection-observer.js';
|
|
34
|
-
export { SharedResizeObserver } from './utils/shared-resize-observer.js';
|
|
35
|
-
export { waitForAnimations } from './utils/wait-for-animations.js';
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { toAriaBooleanAttribute } from '../directives/aria-boolean-attr.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
-
var result = void 0 ;
|
|
8
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
-
if (decorator = decorators[i])
|
|
10
|
-
result = (decorator(target, key, result) ) || result;
|
|
11
|
-
if (result) __defProp(target, key, result);
|
|
12
|
-
return result;
|
|
13
|
-
};
|
|
14
|
-
const CanBeDisabled = dedupeMixin((superClass) => {
|
|
15
|
-
class CanBeDisabledElement extends superClass {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.#initialTabIndex = null;
|
|
19
|
-
this._contextDisabled = false;
|
|
20
|
-
this.disabled = false;
|
|
21
|
-
}
|
|
22
|
-
#initialTabIndex;
|
|
23
|
-
connectedCallback() {
|
|
24
|
-
super.connectedCallback?.();
|
|
25
|
-
this.#initialTabIndex = this.hasAttribute("tabindex") ? this.tabIndex : null;
|
|
26
|
-
}
|
|
27
|
-
willUpdate(props) {
|
|
28
|
-
super.willUpdate?.(props);
|
|
29
|
-
if (props.has("_contextDisabled") || props.has("disabled")) {
|
|
30
|
-
this.#handleDisableChange();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
updated(props) {
|
|
34
|
-
super.updated?.(props);
|
|
35
|
-
if (props.has("_contextDisabled") || props.has("disabled")) {
|
|
36
|
-
this.onDisabledChanged?.(this._contextDisabled || this.disabled);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
#handleDisableChange() {
|
|
40
|
-
const disabled = this._contextDisabled || this.disabled;
|
|
41
|
-
this.ariaDisabled = toAriaBooleanAttribute(disabled);
|
|
42
|
-
if (disabled) {
|
|
43
|
-
this.tabIndex = -1;
|
|
44
|
-
} else if (this.#initialTabIndex !== null) {
|
|
45
|
-
this.tabIndex = this.#initialTabIndex;
|
|
46
|
-
} else {
|
|
47
|
-
this.removeAttribute("tabindex");
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
__decorateClass([
|
|
52
|
-
property({ type: Boolean })
|
|
53
|
-
], CanBeDisabledElement.prototype, "_contextDisabled");
|
|
54
|
-
__decorateClass([
|
|
55
|
-
property({ type: Boolean })
|
|
56
|
-
], CanBeDisabledElement.prototype, "disabled");
|
|
57
|
-
return CanBeDisabledElement;
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
export { CanBeDisabled };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { toAriaBooleanAttribute } from '../directives/aria-boolean-attr.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
-
var result = void 0 ;
|
|
8
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
-
if (decorator = decorators[i])
|
|
10
|
-
result = (decorator(target, key, result) ) || result;
|
|
11
|
-
if (result) __defProp(target, key, result);
|
|
12
|
-
return result;
|
|
13
|
-
};
|
|
14
|
-
const CanBeReadonly = dedupeMixin((superClass) => {
|
|
15
|
-
class CanBeReadonlyElement extends superClass {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.readonly = false;
|
|
19
|
-
}
|
|
20
|
-
willUpdate(props) {
|
|
21
|
-
super.willUpdate?.(props);
|
|
22
|
-
if (props.has("readonly")) {
|
|
23
|
-
this.ariaReadOnly = toAriaBooleanAttribute(this.readonly);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
__decorateClass([
|
|
28
|
-
property({ type: Boolean, reflect: true })
|
|
29
|
-
], CanBeReadonlyElement.prototype, "readonly");
|
|
30
|
-
return CanBeReadonlyElement;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export { CanBeReadonly };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { toAriaBooleanAttribute } from '../directives/aria-boolean-attr.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
-
var result = void 0 ;
|
|
8
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
-
if (decorator = decorators[i])
|
|
10
|
-
result = (decorator(target, key, result) ) || result;
|
|
11
|
-
if (result) __defProp(target, key, result);
|
|
12
|
-
return result;
|
|
13
|
-
};
|
|
14
|
-
const CanBeRequired = dedupeMixin((superClass) => {
|
|
15
|
-
class CanBeRequiredElement extends superClass {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.required = false;
|
|
19
|
-
}
|
|
20
|
-
willUpdate(props) {
|
|
21
|
-
super.willUpdate?.(props);
|
|
22
|
-
if (props.has("required")) {
|
|
23
|
-
this.ariaRequired = toAriaBooleanAttribute(this.required);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
__decorateClass([
|
|
28
|
-
property({ type: Boolean, reflect: true })
|
|
29
|
-
], CanBeRequiredElement.prototype, "required");
|
|
30
|
-
return CanBeRequiredElement;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export { CanBeRequired };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
2
|
-
|
|
3
|
-
const CanBeValidated = dedupeMixin((superClass) => {
|
|
4
|
-
class CanBeValidatedElement extends superClass {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.focusable = true;
|
|
8
|
-
}
|
|
9
|
-
get validity() {
|
|
10
|
-
return this.internals.validity;
|
|
11
|
-
}
|
|
12
|
-
get validationMessage() {
|
|
13
|
-
return this.internals.validationMessage;
|
|
14
|
-
}
|
|
15
|
-
get willValidate() {
|
|
16
|
-
return this.internals.willValidate;
|
|
17
|
-
}
|
|
18
|
-
checkValidity() {
|
|
19
|
-
return this.internals.checkValidity();
|
|
20
|
-
}
|
|
21
|
-
reportValidity() {
|
|
22
|
-
this.internals.reportValidity();
|
|
23
|
-
}
|
|
24
|
-
setValidity(flags, target = this) {
|
|
25
|
-
const errorKey = Object.keys(flags ?? {}).find((key) => flags?.[key] === true);
|
|
26
|
-
this.internals.setValidity(flags, errorKey ?? "unknown error", target);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return CanBeValidatedElement;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export { CanBeValidated };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const appliedClassMixins = /* @__PURE__ */ new WeakMap();
|
|
2
|
-
function wasMixinPreviouslyApplied(mixin, superClass) {
|
|
3
|
-
let klass = superClass;
|
|
4
|
-
while (klass) {
|
|
5
|
-
if (appliedClassMixins.get(klass) === mixin) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
klass = Object.getPrototypeOf(klass);
|
|
9
|
-
}
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
function dedupeMixin(mixin) {
|
|
13
|
-
return (superClass) => {
|
|
14
|
-
if (wasMixinPreviouslyApplied(mixin, superClass)) {
|
|
15
|
-
return superClass;
|
|
16
|
-
}
|
|
17
|
-
const mixedClass = mixin(superClass);
|
|
18
|
-
appliedClassMixins.set(mixedClass, mixin);
|
|
19
|
-
return mixedClass;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { dedupeMixin };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { CanBeDisabled } from './can-be-disabled.js';
|
|
3
|
-
import { CanBeReadonly } from './can-be-readonly.js';
|
|
4
|
-
import { CanBeRequired } from './can-be-required.js';
|
|
5
|
-
import { CanBeValidated } from './can-be-validated.js';
|
|
6
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
7
|
-
import { CustomElement } from '../models/custom-element.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
const FormControl = dedupeMixin((superClass) => {
|
|
19
|
-
class FormControlElement extends CanBeValidated(CanBeRequired(CanBeReadonly(CanBeDisabled(superClass)))) {
|
|
20
|
-
constructor(...args) {
|
|
21
|
-
super(...args);
|
|
22
|
-
this.name = "";
|
|
23
|
-
this.value = "";
|
|
24
|
-
this.internals = this.attachInternals();
|
|
25
|
-
}
|
|
26
|
-
static {
|
|
27
|
-
this.formAssociated = true;
|
|
28
|
-
}
|
|
29
|
-
static {
|
|
30
|
-
this.shadowRootOptions = {
|
|
31
|
-
...CustomElement.shadowRootOptions,
|
|
32
|
-
delegatesFocus: true
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
get form() {
|
|
36
|
-
return this.internals.form;
|
|
37
|
-
}
|
|
38
|
-
toFormValue() {
|
|
39
|
-
return this.value;
|
|
40
|
-
}
|
|
41
|
-
willUpdate(props) {
|
|
42
|
-
super.willUpdate?.(props);
|
|
43
|
-
this.updateAriaAttributes?.();
|
|
44
|
-
}
|
|
45
|
-
updated(props) {
|
|
46
|
-
super.updated(props);
|
|
47
|
-
if (props.has("value")) {
|
|
48
|
-
this.internals.setFormValue(this.toFormValue());
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
__decorateClass([
|
|
53
|
-
property()
|
|
54
|
-
], FormControlElement.prototype, "name");
|
|
55
|
-
__decorateClass([
|
|
56
|
-
property()
|
|
57
|
-
], FormControlElement.prototype, "value");
|
|
58
|
-
return FormControlElement;
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export { FormControl };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './can-be-disabled';
|
|
2
|
-
export * from './can-be-readonly';
|
|
3
|
-
export * from './can-be-required';
|
|
4
|
-
export * from './can-be-validated';
|
|
5
|
-
export * from './dedupe-mixin';
|
|
6
|
-
export * from './form-control';
|
|
7
|
-
export * from './is-localized';
|
|
8
|
-
export * from './is-translatable';
|
|
9
|
-
export * from './number-control';
|
|
10
|
-
export * from './with-aria-controls';
|
|
11
|
-
export * from './with-loading-state';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@lit-labs/signals';
|
|
2
|
-
import { CustomElement } from '../models';
|
|
3
|
-
import { formatDate, formatList, formatNumber, formatRelativeTime, getLocale } from '../utils';
|
|
4
|
-
import { Constructor } from './dedupe-mixin';
|
|
5
|
-
export interface IsLocalized {
|
|
6
|
-
readonly locale: Signal.Computed<ReturnType<typeof getLocale>>;
|
|
7
|
-
formatDate: typeof formatDate;
|
|
8
|
-
formatNumber: typeof formatNumber;
|
|
9
|
-
formatList: typeof formatList;
|
|
10
|
-
formatRelativeTime: typeof formatRelativeTime;
|
|
11
|
-
}
|
|
12
|
-
export declare const IsLocalized: <T extends Constructor<CustomElement>>(superClass: T) => Constructor<IsLocalized> & T;
|
|
13
|
-
//# sourceMappingURL=is-localized.d.ts.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { SignalWatcher, computed } from '@lit-labs/signals';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
4
|
-
import { getLocale } from '../utils/localization.js';
|
|
5
|
-
import { formatDate, formatNumber, formatList, formatRelativeTime } from '../utils/format.js';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
-
var result = void 0 ;
|
|
10
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
-
if (decorator = decorators[i])
|
|
12
|
-
result = (decorator(target, key, result) ) || result;
|
|
13
|
-
if (result) __defProp(target, key, result);
|
|
14
|
-
return result;
|
|
15
|
-
};
|
|
16
|
-
const IsLocalized = dedupeMixin((superClass) => {
|
|
17
|
-
class IsLocalizedElement extends SignalWatcher(superClass) {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...arguments);
|
|
20
|
-
this.locale = computed(() => getLocale(this.lang));
|
|
21
|
-
}
|
|
22
|
-
formatDate(input, options) {
|
|
23
|
-
return formatDate(input, { ...options, locale: options?.locale ?? this.locale.get() });
|
|
24
|
-
}
|
|
25
|
-
formatNumber(input, options) {
|
|
26
|
-
return formatNumber(input, { ...options, locale: options?.locale ?? this.locale.get() });
|
|
27
|
-
}
|
|
28
|
-
formatList(input, options) {
|
|
29
|
-
return formatList(input, { ...options, locale: options?.locale ?? this.locale.get() });
|
|
30
|
-
}
|
|
31
|
-
formatRelativeTime(input, options) {
|
|
32
|
-
return formatRelativeTime(input, { ...options, locale: options?.locale ?? this.locale.get() });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
__decorateClass([
|
|
36
|
-
property()
|
|
37
|
-
], IsLocalizedElement.prototype, "lang");
|
|
38
|
-
return IsLocalizedElement;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export { IsLocalized };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@lit-labs/signals';
|
|
2
|
-
import { CustomElement } from '../models';
|
|
3
|
-
import { Constructor } from './dedupe-mixin';
|
|
4
|
-
import { IsLocalized } from './is-localized';
|
|
5
|
-
export interface IsTranslatable extends IsLocalized {
|
|
6
|
-
readonly language: Signal.Computed<string>;
|
|
7
|
-
_getTranslations?(): Record<string, Translation>;
|
|
8
|
-
_translate(key: string): string;
|
|
9
|
-
}
|
|
10
|
-
type Translation = Record<string, string>;
|
|
11
|
-
export declare const IsTranslatable: <T extends Constructor<CustomElement>>(superClass: T) => Constructor<IsTranslatable> & T;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=is-translatable.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { computed } from '@lit-labs/signals';
|
|
2
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
3
|
-
import { IsLocalized } from './is-localized.js';
|
|
4
|
-
|
|
5
|
-
const IsTranslatable = dedupeMixin((superClass) => {
|
|
6
|
-
class IsTranslatableElement extends IsLocalized(superClass) {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.language = computed(() => this.locale.get().language);
|
|
10
|
-
}
|
|
11
|
-
_translate(key) {
|
|
12
|
-
const translations = this._getTranslations?.() ?? {};
|
|
13
|
-
const translation = translations[this.language.get()] ?? translations["en"];
|
|
14
|
-
return translation?.[key] ?? "";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return IsTranslatableElement;
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export { IsTranslatable };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { property } from 'lit/decorators.js';
|
|
2
|
-
import { dedupeMixin } from './dedupe-mixin.js';
|
|
3
|
-
import { FormControl } from './form-control.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
-
var result = void 0 ;
|
|
8
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
-
if (decorator = decorators[i])
|
|
10
|
-
result = (decorator(target, key, result) ) || result;
|
|
11
|
-
if (result) __defProp(target, key, result);
|
|
12
|
-
return result;
|
|
13
|
-
};
|
|
14
|
-
const MIN_STEP_VALUE = 1 / 2 ^ 16;
|
|
15
|
-
const NumberControl = dedupeMixin((superClass) => {
|
|
16
|
-
class NumberControlElement extends FormControl(superClass) {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.min = 0;
|
|
20
|
-
this.max = 100;
|
|
21
|
-
this.step = 1;
|
|
22
|
-
this.value = 0;
|
|
23
|
-
}
|
|
24
|
-
getValueText() {
|
|
25
|
-
return this.ariaValueText?.trim() ?? "";
|
|
26
|
-
}
|
|
27
|
-
update(props) {
|
|
28
|
-
if (props.has("value")) {
|
|
29
|
-
this.internals.ariaValueNow = String(this.value);
|
|
30
|
-
this.internals.ariaValueText = this.getValueText();
|
|
31
|
-
}
|
|
32
|
-
if (props.has("min")) {
|
|
33
|
-
this.internals.ariaValueMin = String(this.min);
|
|
34
|
-
}
|
|
35
|
-
if (props.has("max")) {
|
|
36
|
-
this.internals.ariaValueMax = String(this.max);
|
|
37
|
-
}
|
|
38
|
-
if (props.has("step")) {
|
|
39
|
-
this.step = Math.max(MIN_STEP_VALUE, this.step);
|
|
40
|
-
}
|
|
41
|
-
this.value = Math.max(this.min, Math.min(this.value, this.max));
|
|
42
|
-
super.update?.(props);
|
|
43
|
-
}
|
|
44
|
-
toFormValue() {
|
|
45
|
-
return String(this.value);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
__decorateClass([
|
|
49
|
-
property({ type: Number })
|
|
50
|
-
], NumberControlElement.prototype, "min");
|
|
51
|
-
__decorateClass([
|
|
52
|
-
property({ type: Number })
|
|
53
|
-
], NumberControlElement.prototype, "max");
|
|
54
|
-
__decorateClass([
|
|
55
|
-
property({ type: Number })
|
|
56
|
-
], NumberControlElement.prototype, "step");
|
|
57
|
-
__decorateClass([
|
|
58
|
-
property({ type: Number, reflect: true })
|
|
59
|
-
], NumberControlElement.prototype, "value");
|
|
60
|
-
return NumberControlElement;
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { NumberControl };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CustomElement } from '../models';
|
|
2
|
-
import { CanBeDisabled } from './can-be-disabled';
|
|
3
|
-
import { Constructor } from './dedupe-mixin';
|
|
4
|
-
export interface WithAriaControls extends CanBeDisabled {
|
|
5
|
-
id: string;
|
|
6
|
-
readonly region: HTMLElement | null;
|
|
7
|
-
updateA11yAttributes(): void;
|
|
8
|
-
}
|
|
9
|
-
export type WithAriaControlsElement = WithAriaControls & CanBeDisabled & HTMLElement;
|
|
10
|
-
export declare const WithAriaControls: <T extends Constructor<CustomElement>>(superClass: T) => Constructor<WithAriaControls> & T;
|
|
11
|
-
//# sourceMappingURL=with-aria-controls.d.ts.map
|