@cupra/ui-kit 1.0.0-canary.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/components/base/DsUiElement.js +47 -0
- package/dist/components/base/UiKitElement.js +82 -0
- package/dist/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist/components/ds-accordion/ds-accordion.js +124 -0
- package/dist/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist/components/ds-accordion/theme-config.js +26 -0
- package/dist/components/ds-avatar/ds-avatar.js +102 -0
- package/dist/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist/components/ds-badge/ds-badge.js +53 -0
- package/dist/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/common.styles.js +9 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist/components/ds-bullets/ds-bullets.js +79 -0
- package/dist/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist/components/ds-button/ds-button.js +196 -0
- package/dist/components/ds-button/styles/common.styles.js +116 -0
- package/dist/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist/components/ds-chip/ds-chip.js +131 -0
- package/dist/components/ds-chip/styles/common.styles.js +25 -0
- package/dist/components/ds-chips/ds-chips.js +143 -0
- package/dist/components/ds-chips/styles/common.styles.js +94 -0
- package/dist/components/ds-currency/ds-currency.js +139 -0
- package/dist/components/ds-currency/styles/common.styles.js +17 -0
- package/dist/components/ds-dialog/ds-dialog.js +107 -0
- package/dist/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist/components/ds-divider/ds-divider.js +58 -0
- package/dist/components/ds-divider/styles/common.styles.js +13 -0
- package/dist/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist/components/ds-icon/ds-icon.js +105 -0
- package/dist/components/ds-icon/iconNames.d.ts +1 -1
- package/dist/components/ds-icon/iconNames.js +394 -0
- package/dist/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist/components/ds-input/ds-input.js +138 -0
- package/dist/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist/components/ds-link-button/ds-link-button.js +120 -0
- package/dist/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist/components/ds-logo/ds-logo.js +69 -0
- package/dist/components/ds-logo/styles/common.styles.js +18 -0
- package/dist/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist/components/ds-main-title/ds-main-title.js +35 -0
- package/dist/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist/components/ds-modal/ds-modal.js +215 -0
- package/dist/components/ds-modal/styles/common.styles.js +289 -0
- package/dist/components/ds-password-input/ds-password-input.js +43 -0
- package/dist/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist/components/ds-portal/ds-portal.js +41 -0
- package/dist/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist/components/ds-radio/ds-radio.js +111 -0
- package/dist/components/ds-radio/styles/common.styles.js +44 -0
- package/dist/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist/components/ds-rating/ds-rating.js +73 -0
- package/dist/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-rating/styles/common.styles.js +14 -0
- package/dist/components/ds-search/ds-search.js +210 -0
- package/dist/components/ds-search/styles/common.styles.js +61 -0
- package/dist/components/ds-search-input/ds-search-input.js +158 -0
- package/dist/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist/components/ds-select/ds-select.js +274 -0
- package/dist/components/ds-select/styles/common.styles.js +29 -0
- package/dist/components/ds-selection/ds-selection.js +57 -0
- package/dist/components/ds-selection/styles/common.styles.js +17 -0
- package/dist/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist/components/ds-slider/ds-slider.js +409 -0
- package/dist/components/ds-slider/styles/common.styles.js +61 -0
- package/dist/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist/components/ds-static-box/ds-static-box.js +77 -0
- package/dist/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist/components/ds-stepper/ds-stepper.js +57 -0
- package/dist/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist/components/ds-tabs/ds-tabs.js +203 -0
- package/dist/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist/components/ds-tabs/theme-config.js +14 -0
- package/dist/components/ds-tag/ds-tag.js +87 -0
- package/dist/components/ds-tag/styles/common.styles.js +20 -0
- package/dist/components/ds-text/ds-text.js +83 -0
- package/dist/components/ds-text/styles/common.styles.js +29 -0
- package/dist/components/ds-text-input/ds-text-input.js +100 -0
- package/dist/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist/components/ds-textarea/ds-textarea.js +87 -0
- package/dist/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist/components/ds-theme-provider/themeContext.js +5 -0
- package/dist/components/ds-toast/ds-toast.js +95 -0
- package/dist/components/ds-toast/styles/common.styles.js +112 -0
- package/dist/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/core/theme.constants.d.ts +1 -0
- package/dist/core/theme.constants.js +4 -0
- package/dist/decorators/customUiKitElement.js +23 -0
- package/dist/index.js +61 -9699
- package/dist/mixins/FormAssociatedMixin.js +14 -0
- package/dist/mixins/ViewportMixin.js +32 -0
- package/dist/mixins/inputStatesMixin.js +46 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist/styles/fonts-config.js +28 -0
- package/dist/utils/IconsManager.d.ts +1 -4
- package/dist/utils/IconsManager.js +39 -0
- package/dist/utils/PubSub.d.ts +0 -2
- package/dist/utils/PubSub.js +33 -0
- package/dist/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist/utils/arrayConverter.js +19 -0
- package/dist/utils/booleanConverter.js +4 -0
- package/dist/utils/componentFactory.js +167 -0
- package/dist/utils/cssQueries.js +16 -0
- package/dist/utils/cssWithTokens.js +11 -0
- package/dist/utils/formatNumber/formatNumber.js +54 -0
- package/dist/utils/htmlWithTokens.js +11 -0
- package/dist/utils/objectConverter.js +11 -0
- package/dist/utils/validateMaxLength.js +6 -0
- package/dist-react/components/base/DsUiElement.js +47 -0
- package/dist-react/components/base/UiKitElement.js +82 -0
- package/dist-react/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist-react/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist-react/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist-react/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist-react/components/ds-accordion/ds-accordion.js +124 -0
- package/dist-react/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist-react/components/ds-accordion/theme-config.js +26 -0
- package/dist-react/components/ds-avatar/ds-avatar.js +102 -0
- package/dist-react/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist-react/components/ds-badge/ds-badge.js +53 -0
- package/dist-react/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist-react/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist-react/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/common.styles.js +9 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist-react/components/ds-bullets/ds-bullets.js +79 -0
- package/dist-react/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist-react/components/ds-button/ds-button.js +196 -0
- package/dist-react/components/ds-button/styles/common.styles.js +116 -0
- package/dist-react/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist-react/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist-react/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist-react/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist-react/components/ds-chip/ds-chip.js +131 -0
- package/dist-react/components/ds-chip/styles/common.styles.js +25 -0
- package/dist-react/components/ds-chips/ds-chips.js +143 -0
- package/dist-react/components/ds-chips/styles/common.styles.js +94 -0
- package/dist-react/components/ds-currency/ds-currency.js +139 -0
- package/dist-react/components/ds-currency/styles/common.styles.js +17 -0
- package/dist-react/components/ds-dialog/ds-dialog.js +107 -0
- package/dist-react/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist-react/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist-react/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist-react/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist-react/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist-react/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist-react/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist-react/components/ds-divider/ds-divider.js +58 -0
- package/dist-react/components/ds-divider/styles/common.styles.js +13 -0
- package/dist-react/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist-react/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist-react/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist-react/components/ds-icon/ds-icon.js +105 -0
- package/dist-react/components/ds-icon/iconNames.d.ts +1 -1
- package/dist-react/components/ds-icon/iconNames.js +394 -0
- package/dist-react/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist-react/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-input/ds-input.js +138 -0
- package/dist-react/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist-react/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist-react/components/ds-link-button/ds-link-button.js +120 -0
- package/dist-react/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist-react/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist-react/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist-react/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist-react/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist-react/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist-react/components/ds-logo/ds-logo.js +69 -0
- package/dist-react/components/ds-logo/styles/common.styles.js +18 -0
- package/dist-react/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist-react/components/ds-main-title/ds-main-title.js +35 -0
- package/dist-react/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist-react/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist-react/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist-react/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist-react/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist-react/components/ds-modal/ds-modal.js +215 -0
- package/dist-react/components/ds-modal/styles/common.styles.js +289 -0
- package/dist-react/components/ds-password-input/ds-password-input.js +43 -0
- package/dist-react/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist-react/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist-react/components/ds-portal/ds-portal.js +41 -0
- package/dist-react/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist-react/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-radio/ds-radio.js +111 -0
- package/dist-react/components/ds-radio/styles/common.styles.js +44 -0
- package/dist-react/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist-react/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist-react/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist-react/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist-react/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist-react/components/ds-rating/ds-rating.js +73 -0
- package/dist-react/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist-react/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist-react/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-rating/styles/common.styles.js +14 -0
- package/dist-react/components/ds-search/ds-search.js +210 -0
- package/dist-react/components/ds-search/styles/common.styles.js +61 -0
- package/dist-react/components/ds-search-input/ds-search-input.js +158 -0
- package/dist-react/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist-react/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist-react/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist-react/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist-react/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist-react/components/ds-select/ds-select.js +274 -0
- package/dist-react/components/ds-select/styles/common.styles.js +29 -0
- package/dist-react/components/ds-selection/ds-selection.js +57 -0
- package/dist-react/components/ds-selection/styles/common.styles.js +17 -0
- package/dist-react/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist-react/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist-react/components/ds-slider/ds-slider.js +409 -0
- package/dist-react/components/ds-slider/styles/common.styles.js +61 -0
- package/dist-react/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist-react/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist-react/components/ds-static-box/ds-static-box.js +77 -0
- package/dist-react/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist-react/components/ds-stepper/ds-stepper.js +57 -0
- package/dist-react/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist-react/components/ds-tabs/ds-tabs.js +203 -0
- package/dist-react/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist-react/components/ds-tabs/theme-config.js +14 -0
- package/dist-react/components/ds-tag/ds-tag.js +87 -0
- package/dist-react/components/ds-tag/styles/common.styles.js +20 -0
- package/dist-react/components/ds-text/ds-text.js +83 -0
- package/dist-react/components/ds-text/styles/common.styles.js +29 -0
- package/dist-react/components/ds-text-input/ds-text-input.js +100 -0
- package/dist-react/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-textarea/ds-textarea.js +87 -0
- package/dist-react/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist-react/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist-react/components/ds-theme-provider/themeContext.js +5 -0
- package/dist-react/components/ds-toast/ds-toast.js +95 -0
- package/dist-react/components/ds-toast/styles/common.styles.js +112 -0
- package/dist-react/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist-react/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist-react/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist-react/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist-react/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist-react/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist-react/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist-react/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist-react/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist-react/components/index.d.ts +4 -1
- package/dist-react/core/theme.constants.d.ts +1 -0
- package/dist-react/core/theme.constants.js +4 -0
- package/dist-react/decorators/customUiKitElement.js +23 -0
- package/dist-react/index.js +61 -9623
- package/dist-react/mixins/FormAssociatedMixin.js +14 -0
- package/dist-react/mixins/ViewportMixin.js +32 -0
- package/dist-react/mixins/inputStatesMixin.js +46 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist-react/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist-react/styles/fonts-config.js +28 -0
- package/dist-react/utils/IconsManager.d.ts +1 -4
- package/dist-react/utils/IconsManager.js +39 -0
- package/dist-react/utils/PubSub.d.ts +0 -2
- package/dist-react/utils/PubSub.js +33 -0
- package/dist-react/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist-react/utils/arrayConverter.js +19 -0
- package/dist-react/utils/booleanConverter.js +4 -0
- package/dist-react/utils/componentFactory.js +90 -0
- package/dist-react/utils/cssQueries.js +16 -0
- package/dist-react/utils/cssWithTokens.js +11 -0
- package/dist-react/utils/formatNumber/formatNumber.js +54 -0
- package/dist-react/utils/htmlWithTokens.js +11 -0
- package/dist-react/utils/objectConverter.js +11 -0
- package/dist-react/utils/validateMaxLength.js +6 -0
- package/package.json +12 -6
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { UiKitElement as $ } from "../base/UiKitElement.js";
|
|
2
|
+
import { getStepValue as d } from "./utils/getStepValue/getStepValue.js";
|
|
3
|
+
import { roundToDecimals as S } from "./utils/roundToDecimals/roundToDecimals.js";
|
|
4
|
+
import { customUiKitElement as V } from "../../decorators/customUiKitElement.js";
|
|
5
|
+
import { ViewportMixin as T } from "../../mixins/ViewportMixin.js";
|
|
6
|
+
import { booleanConverter as L } from "../../utils/booleanConverter.js";
|
|
7
|
+
import { formatNumber as P } from "../../utils/formatNumber/formatNumber.js";
|
|
8
|
+
import { htmlWithTokens as D } from "../../utils/htmlWithTokens.js";
|
|
9
|
+
import { objectConverter as k } from "../../utils/objectConverter.js";
|
|
10
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
11
|
+
import { nothing as h, html as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
12
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
13
|
+
import { property as r } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
14
|
+
import { state as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
15
|
+
import { query as E } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
16
|
+
import { classMap as F } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
17
|
+
import { commonStyles as N, trackStyles as I, thumbStyles as C, currentValueStyles as A, rangeValueStyles as O } from "./styles/common.styles.js";
|
|
18
|
+
var R = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (t, e, i, o) => {
|
|
19
|
+
for (var n = o > 1 ? void 0 : o ? _(e, i) : e, u = t.length - 1, m; u >= 0; u--)
|
|
20
|
+
(m = t[u]) && (n = (o ? m(e, i, n) : m(n)) || n);
|
|
21
|
+
return o && n && R(e, i, n), n;
|
|
22
|
+
};
|
|
23
|
+
let s = class extends T($) {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments), this.min = 0, this.max = 100, this.minLabel = "", this.maxLabel = "", this.step = 1, this.initialValueMin = 0, this.mode = "light", this.locale = void 0, this.localeMatcher = "lookup", this.useGrouping = !0, this.minimumIntegerDigits = 1, this.minimumFractionDigits = 0, this.maximumFractionDigits = 3, this.size = "medium", this.disabled = !1, this.keyboardMode = !1, this.getNewValue = (t) => {
|
|
26
|
+
const { width: e, left: i } = this.track.getBoundingClientRect(), o = t.type.indexOf("mouse") !== -1 ? t.clientX : t.touches[0].clientX, u = Math.min(Math.max(0, o - i), e) * 100 / e;
|
|
27
|
+
return this.min + u * (this.max - this.min) / 100;
|
|
28
|
+
}, this.setActiveThumb = (t) => {
|
|
29
|
+
const e = this.getNewValue(t);
|
|
30
|
+
typeof this.valueMax != "number" || e <= this.valueMin ? this.activeThumb = "min" : e >= this.valueMax ? this.activeThumb = "max" : e - this.valueMin < this.valueMax - e ? this.activeThumb = "min" : this.activeThumb = "max";
|
|
31
|
+
}, this.handleMouseMove = (t) => {
|
|
32
|
+
this.animationFrameRequest && cancelAnimationFrame(this.animationFrameRequest), this.animationFrameRequest = requestAnimationFrame(() => {
|
|
33
|
+
const e = this.getNewValue(t), i = this.activeThumb ?? "min", { stepValue: o } = d({
|
|
34
|
+
step: this.step,
|
|
35
|
+
min: this.min,
|
|
36
|
+
max: this.max,
|
|
37
|
+
proposedValue: e,
|
|
38
|
+
role: i,
|
|
39
|
+
currentValues: {
|
|
40
|
+
1: this.valueMin,
|
|
41
|
+
...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
this.handleChange({ value: o, role: i });
|
|
45
|
+
});
|
|
46
|
+
}, this.handleMouseDown = (t) => {
|
|
47
|
+
var e;
|
|
48
|
+
this.disabled || ((e = t == null ? void 0 : t.preventDefault) == null || e.call(t), this.setActiveThumb(t), this.handleMouseMove(t), window == null || window.addEventListener("mousemove", this.handleMouseMove), window == null || window.addEventListener("touchmove", this.handleMouseMove), window == null || window.addEventListener("pointerup", this.handlePointerUp));
|
|
49
|
+
}, this.handlePointerUp = () => {
|
|
50
|
+
window == null || window.removeEventListener("mousemove", this.handleMouseMove), window == null || window.removeEventListener("touchmove", this.handleMouseMove), window == null || window.removeEventListener("pointerup", this.handlePointerUp);
|
|
51
|
+
}, this.handleKeydown = () => {
|
|
52
|
+
this.keyboardMode = !0;
|
|
53
|
+
}, this.handlePointerOrMouseDown = () => {
|
|
54
|
+
this.keyboardMode = !1;
|
|
55
|
+
}, this.onInputFocus = (t, e) => {
|
|
56
|
+
const i = t.currentTarget, o = e === 1 ? "min" : "max";
|
|
57
|
+
this.editingField = o, i.type = "number", i.step = String(this.step ?? 1);
|
|
58
|
+
const n = o === "min" ? this.valueMin : this.valueMax;
|
|
59
|
+
i.value = String(n ?? ""), this.keyboardMode && i.classList.add("focus-visible");
|
|
60
|
+
}, this.commitInputValue = (t, e) => {
|
|
61
|
+
const i = t.currentTarget, o = e === 1 ? "min" : "max", { stepValue: n } = d({
|
|
62
|
+
step: this.step,
|
|
63
|
+
min: this.min,
|
|
64
|
+
max: this.max,
|
|
65
|
+
proposedValue: Number(i.value),
|
|
66
|
+
role: o,
|
|
67
|
+
currentValues: {
|
|
68
|
+
1: this.valueMin,
|
|
69
|
+
...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
this.handleChange({ value: n, role: o }), i.value = String(n);
|
|
73
|
+
}, this.onInputBlur = (t) => {
|
|
74
|
+
var i;
|
|
75
|
+
this.editingField = void 0;
|
|
76
|
+
const e = t.currentTarget;
|
|
77
|
+
(i = e == null ? void 0 : e.classList) == null || i.remove("focus-visible");
|
|
78
|
+
}, this.onInputKeyDown = (t, e) => {
|
|
79
|
+
t.key === "Enter" && (t.preventDefault(), this.commitInputValue(t, e));
|
|
80
|
+
}, this.onThumbKeyDown = (t, e) => {
|
|
81
|
+
if (!this.disabled && (t.key === "ArrowLeft" || t.key === "ArrowRight")) {
|
|
82
|
+
t.preventDefault();
|
|
83
|
+
const i = this.step ?? 1, o = t.key === "ArrowLeft" ? -i : i, n = e === 1 ? "min" : "max", m = (n === "min" ? this.valueMin : this.valueMax) + o, { stepValue: b } = d({
|
|
84
|
+
step: this.step,
|
|
85
|
+
min: this.min,
|
|
86
|
+
max: this.max,
|
|
87
|
+
proposedValue: m,
|
|
88
|
+
role: n,
|
|
89
|
+
currentValues: {
|
|
90
|
+
1: this.valueMin,
|
|
91
|
+
...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
this.handleChange({ value: b, role: n });
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
disconnectedCallback() {
|
|
99
|
+
super.disconnectedCallback(), window == null || window.removeEventListener("mousemove", this.handleMouseMove), window == null || window.removeEventListener("touchmove", this.handleMouseMove), window == null || window.removeEventListener("pointerup", this.handlePointerUp), window == null || window.removeEventListener("keydown", this.handleKeydown), window == null || window.removeEventListener("mousedown", this.handlePointerOrMouseDown), window == null || window.removeEventListener("pointerdown", this.handlePointerOrMouseDown);
|
|
100
|
+
}
|
|
101
|
+
firstUpdated(t) {
|
|
102
|
+
super.firstUpdated(t), window == null || window.addEventListener("keydown", this.handleKeydown), window == null || window.addEventListener("mousedown", this.handlePointerOrMouseDown), window == null || window.addEventListener("pointerdown", this.handlePointerOrMouseDown), ["min", "max"].forEach((i) => {
|
|
103
|
+
const n = this[i === "min" ? "initialValueMin" : "initialValueMax"];
|
|
104
|
+
if (typeof n != "number") return;
|
|
105
|
+
const { stepValue: u } = d({
|
|
106
|
+
step: this.step,
|
|
107
|
+
min: this.min,
|
|
108
|
+
max: this.max,
|
|
109
|
+
proposedValue: n,
|
|
110
|
+
role: i,
|
|
111
|
+
currentValues: {
|
|
112
|
+
1: this.valueMin,
|
|
113
|
+
...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
this[i === "min" ? "valueMin" : "valueMax"] !== u && this.handleChange({ value: u, role: i });
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
getTrackPct(t) {
|
|
120
|
+
const e = this.max - this.min;
|
|
121
|
+
return e === 0 ? 0 : (t - this.min) / e * 100;
|
|
122
|
+
}
|
|
123
|
+
handleChange({ value: t, role: e }) {
|
|
124
|
+
const i = S({ value: t, fractionDigits: this.maximumFractionDigits }), o = e === "min" ? "valueMin" : "valueMax";
|
|
125
|
+
this[o] !== i && (this[o] = i, this.dispatchEvent(
|
|
126
|
+
new CustomEvent("change", {
|
|
127
|
+
bubbles: !0,
|
|
128
|
+
composed: !0,
|
|
129
|
+
detail: {
|
|
130
|
+
role: e,
|
|
131
|
+
value: i
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
));
|
|
135
|
+
}
|
|
136
|
+
formatNumber(t) {
|
|
137
|
+
const e = {
|
|
138
|
+
value: t,
|
|
139
|
+
locale: this.locale,
|
|
140
|
+
...this.unitStyle && { style: this.unitStyle },
|
|
141
|
+
...this.currency && { currency: this.currency },
|
|
142
|
+
...this.unit && { unit: this.unit },
|
|
143
|
+
localeMatcher: this.localeMatcher,
|
|
144
|
+
minimumIntegerDigits: this.minimumIntegerDigits,
|
|
145
|
+
minimumFractionDigits: this.minimumFractionDigits,
|
|
146
|
+
maximumFractionDigits: this.maximumFractionDigits,
|
|
147
|
+
thousandSeparator: this.thousandSeparator,
|
|
148
|
+
fractionSeparator: this.fractionSeparator,
|
|
149
|
+
useGrouping: this.useGrouping
|
|
150
|
+
};
|
|
151
|
+
return P(e);
|
|
152
|
+
}
|
|
153
|
+
get rangeValuesTemplates() {
|
|
154
|
+
const {
|
|
155
|
+
formattedValue: t,
|
|
156
|
+
unitSymbol: e,
|
|
157
|
+
unitSymbolPosition: i
|
|
158
|
+
} = this.formatNumber(this.min), o = this.unitSymbol ?? e, n = this.unitSymbolPosition ?? i, { formattedValue: u } = this.formatNumber(this.max);
|
|
159
|
+
return l`
|
|
160
|
+
<div class="range-value-text">
|
|
161
|
+
${this.minLabel ? l`<span class="range-value-label">${this.minLabel}</span>` : h}
|
|
162
|
+
${n === "left" ? l`<span>${o}</span>` : h}
|
|
163
|
+
<span>${t}</span>
|
|
164
|
+
${n === "right" ? l`<span>${o}</span>` : h}
|
|
165
|
+
</div>
|
|
166
|
+
<div class="range-value-text">
|
|
167
|
+
${this.maxLabel ? l` <span class="range-value-label">${this.maxLabel}</span>` : h}
|
|
168
|
+
${n === "left" ? l`<span>${o}</span>` : h}
|
|
169
|
+
<span>${u}</span>
|
|
170
|
+
${n === "right" ? l`<span>${o}</span>` : h}
|
|
171
|
+
</div>
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
getThumbTemplate(t) {
|
|
175
|
+
const e = t === 1 ? "min" : "max", i = e === "min" ? this.valueMin : this.valueMax, { minLimit: o, maxLimit: n } = d({
|
|
176
|
+
step: this.step,
|
|
177
|
+
min: this.min,
|
|
178
|
+
max: this.max,
|
|
179
|
+
proposedValue: i,
|
|
180
|
+
role: e,
|
|
181
|
+
currentValues: {
|
|
182
|
+
1: this.valueMin,
|
|
183
|
+
...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
|
|
184
|
+
}
|
|
185
|
+
}), u = this.getTrackPct(i);
|
|
186
|
+
return l`
|
|
187
|
+
<style>
|
|
188
|
+
.thumb${t} {
|
|
189
|
+
left: ${u}%;
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
192
|
+
<div
|
|
193
|
+
class="thumb${t} thumb"
|
|
194
|
+
@focus=${() => {
|
|
195
|
+
this.activeThumb = t === 1 ? "min" : "max";
|
|
196
|
+
}}
|
|
197
|
+
@keydown=${(m) => this.onThumbKeyDown(m, t)}
|
|
198
|
+
role="slider"
|
|
199
|
+
tabindex=${this.disabled ? -1 : 0}
|
|
200
|
+
aria-disabled=${String(!!this.disabled)}
|
|
201
|
+
aria-label=${t === 1 ? "Minumum value" : "Maximum Value"}
|
|
202
|
+
aria-valuemin=${o}
|
|
203
|
+
aria-valuemax=${n}
|
|
204
|
+
aria-valuenow=${i}
|
|
205
|
+
>
|
|
206
|
+
<svg
|
|
207
|
+
class="thumb-svg"
|
|
208
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
209
|
+
viewBox="0 0 34 34"
|
|
210
|
+
fill="none"
|
|
211
|
+
>
|
|
212
|
+
<circle cx="17" cy="17" r="16" class="thumb-circle" />
|
|
213
|
+
</svg>
|
|
214
|
+
</div>
|
|
215
|
+
`;
|
|
216
|
+
}
|
|
217
|
+
get thumbTemplates() {
|
|
218
|
+
return l`
|
|
219
|
+
${this.getThumbTemplate(1)}
|
|
220
|
+
${typeof this.initialValueMax == "number" ? this.getThumbTemplate(2) : h}
|
|
221
|
+
`;
|
|
222
|
+
}
|
|
223
|
+
get trackRangeTemplate() {
|
|
224
|
+
let t, e;
|
|
225
|
+
return typeof this.initialValueMax != "number" ? (t = 0, e = this.getTrackPct(this.valueMin)) : (t = this.getTrackPct(this.valueMin), e = this.getTrackPct(this.valueMax) - t), l`
|
|
226
|
+
<style>
|
|
227
|
+
.track-range {
|
|
228
|
+
left: ${t}%;
|
|
229
|
+
width: ${e}%;
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
232
|
+
<div class="track-range" role="presentation"></div>
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
getInputTemplate(t) {
|
|
236
|
+
const e = t === 1 ? "min" : "max", i = this.editingField === e, o = e === "min" ? this.valueMin : this.valueMax, {
|
|
237
|
+
formattedValue: n,
|
|
238
|
+
unitSymbol: u,
|
|
239
|
+
unitSymbolPosition: m
|
|
240
|
+
} = this.formatNumber(o), b = this.unitSymbolPosition ?? m, y = this.unitSymbol ?? u, g = y ? b === "left" ? `${y} ${n}` : `${n} ${y}` : `${n}`, f = i ? "number" : "text", v = i ? String(o ?? "") : g, M = t === 1 ? this.inputMinAriaLabel : this.inputMaxAriaLabel, x = typeof this.initialValueMax == "number" ? t === 1 ? "Start value" : "End value" : "Value", w = M ?? x;
|
|
241
|
+
return l`
|
|
242
|
+
<div class="input-wrapper">
|
|
243
|
+
<input
|
|
244
|
+
class="input-value input-value-${t}"
|
|
245
|
+
type=${f}
|
|
246
|
+
.value=${v}
|
|
247
|
+
step=${String(this.step ?? 1)}
|
|
248
|
+
?disabled=${this.disabled}
|
|
249
|
+
tabindex=${this.disabled ? -1 : 0}
|
|
250
|
+
aria-disabled=${String(!!this.disabled)}
|
|
251
|
+
aria-label=${w}
|
|
252
|
+
?readonly=${this.disabled}
|
|
253
|
+
@focus=${(c) => this.onInputFocus(c, t)}
|
|
254
|
+
@blur=${this.onInputBlur}
|
|
255
|
+
@change=${(c) => this.commitInputValue(c, t)}
|
|
256
|
+
@keydown=${(c) => this.onInputKeyDown(c, t)}
|
|
257
|
+
title=${v}
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
`;
|
|
261
|
+
}
|
|
262
|
+
get inputsTemplate() {
|
|
263
|
+
return l`
|
|
264
|
+
<div class="inputs-container">
|
|
265
|
+
${this.getInputTemplate(1)}
|
|
266
|
+
${typeof this.initialValueMax == "number" ? this.getInputTemplate(2) : h}
|
|
267
|
+
</div>
|
|
268
|
+
`;
|
|
269
|
+
}
|
|
270
|
+
get containerClasses() {
|
|
271
|
+
var e;
|
|
272
|
+
const t = typeof this.size == "string" ? this.size : (e = this.size) == null ? void 0 : e[this.viewport];
|
|
273
|
+
return {
|
|
274
|
+
container: !0,
|
|
275
|
+
[this.mode]: !!this.mode,
|
|
276
|
+
[t]: !!t,
|
|
277
|
+
disabled: !!this.disabled
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
get styleTokens() {
|
|
281
|
+
return D`
|
|
282
|
+
<style>
|
|
283
|
+
:host{
|
|
284
|
+
color-scheme: ${this.mode};
|
|
285
|
+
}
|
|
286
|
+
</style>
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
289
|
+
render() {
|
|
290
|
+
return l`
|
|
291
|
+
${this.styleTokens}
|
|
292
|
+
<div class=${F(this.containerClasses)}>
|
|
293
|
+
<div @touchstart=${this.handleMouseDown} @mousedown=${this.handleMouseDown} class="track" role="presentation">
|
|
294
|
+
${this.thumbTemplates}
|
|
295
|
+
${this.trackRangeTemplate}
|
|
296
|
+
</div>
|
|
297
|
+
<div class="range-value-container">${this.rangeValuesTemplates}</div>
|
|
298
|
+
${this.inputsTemplate}
|
|
299
|
+
</div>
|
|
300
|
+
`;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
s.styles = [N, I, C, A, O];
|
|
304
|
+
a([
|
|
305
|
+
r({ type: Number })
|
|
306
|
+
], s.prototype, "min", 2);
|
|
307
|
+
a([
|
|
308
|
+
r({ type: Number })
|
|
309
|
+
], s.prototype, "max", 2);
|
|
310
|
+
a([
|
|
311
|
+
r({ type: String, attribute: "min-label" })
|
|
312
|
+
], s.prototype, "minLabel", 2);
|
|
313
|
+
a([
|
|
314
|
+
r({ type: String, attribute: "max-label" })
|
|
315
|
+
], s.prototype, "maxLabel", 2);
|
|
316
|
+
a([
|
|
317
|
+
r({ type: Number })
|
|
318
|
+
], s.prototype, "step", 2);
|
|
319
|
+
a([
|
|
320
|
+
r({ type: Number, attribute: "initial-value-min" })
|
|
321
|
+
], s.prototype, "initialValueMin", 2);
|
|
322
|
+
a([
|
|
323
|
+
r({ type: Number, attribute: "initial-value-max" })
|
|
324
|
+
], s.prototype, "initialValueMax", 2);
|
|
325
|
+
a([
|
|
326
|
+
r({ type: String, reflect: !0 })
|
|
327
|
+
], s.prototype, "mode", 2);
|
|
328
|
+
a([
|
|
329
|
+
r({ type: String, attribute: "locale" })
|
|
330
|
+
], s.prototype, "locale", 2);
|
|
331
|
+
a([
|
|
332
|
+
r({ type: String, attribute: "locale-matcher" })
|
|
333
|
+
], s.prototype, "localeMatcher", 2);
|
|
334
|
+
a([
|
|
335
|
+
r({ type: String, attribute: "unit-symbol" })
|
|
336
|
+
], s.prototype, "unitSymbol", 2);
|
|
337
|
+
a([
|
|
338
|
+
r({ type: String, attribute: "unit-symbol-position" })
|
|
339
|
+
], s.prototype, "unitSymbolPosition", 2);
|
|
340
|
+
a([
|
|
341
|
+
r({ type: String, attribute: "unit-style" })
|
|
342
|
+
], s.prototype, "unitStyle", 2);
|
|
343
|
+
a([
|
|
344
|
+
r({ type: String, attribute: "currency" })
|
|
345
|
+
], s.prototype, "currency", 2);
|
|
346
|
+
a([
|
|
347
|
+
r({ type: String, attribute: "unit" })
|
|
348
|
+
], s.prototype, "unit", 2);
|
|
349
|
+
a([
|
|
350
|
+
r({
|
|
351
|
+
type: String,
|
|
352
|
+
attribute: "use-grouping",
|
|
353
|
+
converter: (t) => t === "auto" ? "auto" : typeof t == "boolean" ? t : t === "true" || t === "" ? !0 : t !== "false"
|
|
354
|
+
})
|
|
355
|
+
], s.prototype, "useGrouping", 2);
|
|
356
|
+
a([
|
|
357
|
+
r({ type: Number, attribute: "minimum-integer-digits" })
|
|
358
|
+
], s.prototype, "minimumIntegerDigits", 2);
|
|
359
|
+
a([
|
|
360
|
+
r({ type: Number, attribute: "minimum-fraction-digits" })
|
|
361
|
+
], s.prototype, "minimumFractionDigits", 2);
|
|
362
|
+
a([
|
|
363
|
+
r({ type: Number, attribute: "maximum-fraction-digits" })
|
|
364
|
+
], s.prototype, "maximumFractionDigits", 2);
|
|
365
|
+
a([
|
|
366
|
+
r({ type: String, attribute: "thousand-separator" })
|
|
367
|
+
], s.prototype, "thousandSeparator", 2);
|
|
368
|
+
a([
|
|
369
|
+
r({ type: String, attribute: "fraction-separator" })
|
|
370
|
+
], s.prototype, "fractionSeparator", 2);
|
|
371
|
+
a([
|
|
372
|
+
r({ type: String, converter: k })
|
|
373
|
+
], s.prototype, "size", 2);
|
|
374
|
+
a([
|
|
375
|
+
r({ type: Boolean, converter: L })
|
|
376
|
+
], s.prototype, "disabled", 2);
|
|
377
|
+
a([
|
|
378
|
+
r({ type: String, attribute: "input-min-aria-label" })
|
|
379
|
+
], s.prototype, "inputMinAriaLabel", 2);
|
|
380
|
+
a([
|
|
381
|
+
r({ type: String, attribute: "input-max-aria-label" })
|
|
382
|
+
], s.prototype, "inputMaxAriaLabel", 2);
|
|
383
|
+
a([
|
|
384
|
+
E(".track")
|
|
385
|
+
], s.prototype, "track", 2);
|
|
386
|
+
a([
|
|
387
|
+
p()
|
|
388
|
+
], s.prototype, "valueMin", 2);
|
|
389
|
+
a([
|
|
390
|
+
p()
|
|
391
|
+
], s.prototype, "valueMax", 2);
|
|
392
|
+
a([
|
|
393
|
+
p()
|
|
394
|
+
], s.prototype, "activeThumb", 2);
|
|
395
|
+
a([
|
|
396
|
+
p()
|
|
397
|
+
], s.prototype, "animationFrameRequest", 2);
|
|
398
|
+
a([
|
|
399
|
+
p()
|
|
400
|
+
], s.prototype, "editingField", 2);
|
|
401
|
+
a([
|
|
402
|
+
p()
|
|
403
|
+
], s.prototype, "keyboardMode", 2);
|
|
404
|
+
s = a([
|
|
405
|
+
V("ds-slider")
|
|
406
|
+
], s);
|
|
407
|
+
export {
|
|
408
|
+
s as DsSlider
|
|
409
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { cssWithTokens as t } from "../../../utils/cssWithTokens.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
4
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
5
|
+
import { css as e } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
6
|
+
const s = e`
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
`, l = t`
|
|
11
|
+
.current-value-container {
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.current-value-text {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
position: absolute;
|
|
18
|
+
}
|
|
19
|
+
`, c = t`
|
|
20
|
+
.range-value-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.range-value-text {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.range-value-label:after {
|
|
30
|
+
content: ':';
|
|
31
|
+
}
|
|
32
|
+
`, p = t`
|
|
33
|
+
.track {
|
|
34
|
+
position: relative;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
top: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.track-range {
|
|
40
|
+
z-index: 1;
|
|
41
|
+
top: 50%;
|
|
42
|
+
transform: translateY(-50%);
|
|
43
|
+
position: absolute;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.track, .track-range {
|
|
47
|
+
background-clip: content-box;
|
|
48
|
+
}
|
|
49
|
+
`, u = t`
|
|
50
|
+
.thumb {
|
|
51
|
+
z-index: 2;
|
|
52
|
+
position: absolute;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export {
|
|
56
|
+
s as commonStyles,
|
|
57
|
+
l as currentValueStyles,
|
|
58
|
+
c as rangeValueStyles,
|
|
59
|
+
u as thumbStyles,
|
|
60
|
+
p as trackStyles
|
|
61
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function M({ value: a, min: n, max: l }) {
|
|
2
|
+
return Math.min(Math.max(a, n), l);
|
|
3
|
+
}
|
|
4
|
+
const d = (a, n, l = 10) => {
|
|
5
|
+
const f = Math.pow(10, l), m = Math.round(a * f), o = Math.round(n * f);
|
|
6
|
+
return (m + o) / f;
|
|
7
|
+
}, S = ({ step: a = 1, min: n = 0, max: l = 100, proposedValue: f, role: m, currentValues: o }) => {
|
|
8
|
+
const c = m === "min" ? 1 : 2, u = f;
|
|
9
|
+
let i, t = n, e = l;
|
|
10
|
+
return Number.isFinite(u) ? (Object.keys(o).forEach((h) => {
|
|
11
|
+
if (Number(h) < c && o[h] >= t) {
|
|
12
|
+
if (t = o[h], a === 0) return;
|
|
13
|
+
let r = n;
|
|
14
|
+
for (; r <= t; ) r = d(r, a);
|
|
15
|
+
t = r;
|
|
16
|
+
}
|
|
17
|
+
if (Number(h) > c && o[h] <= e) {
|
|
18
|
+
if (e = o[h], a === 0) return;
|
|
19
|
+
let r = n;
|
|
20
|
+
for (; r + a < e; ) r = d(r, a);
|
|
21
|
+
e = r;
|
|
22
|
+
}
|
|
23
|
+
t = M({ value: t, min: n, max: l }), e = M({ value: e, min: n, max: l });
|
|
24
|
+
}), u <= t || u >= e ? (i = Math.max(t, Math.min(e, u)), { stepValue: i, minLimit: t, maxLimit: e }) : a === 0 ? { stepValue: u, minLimit: t, maxLimit: e } : (i = Math.round((u - t) / a) * a + t, i = u - i > e - u ? e : i, i = M({ value: i, min: t, max: e }), { stepValue: i, minLimit: t, maxLimit: e })) : { stepValue: o[String(c)], minLimit: t, maxLimit: e };
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
S as getStepValue
|
|
28
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { UiKitElement as p } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { ViewportMixin as c } from "../../mixins/ViewportMixin.js";
|
|
4
|
+
import { htmlWithTokens as f } from "../../utils/htmlWithTokens.js";
|
|
5
|
+
import { objectConverter as h } from "../../utils/objectConverter.js";
|
|
6
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
|
+
import { html as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
8
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
9
|
+
import { property as y } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
|
+
import { queryAssignedNodes as m } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js";
|
|
11
|
+
import { classMap as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
+
import { commonStyles as b } from "./styles/common.styles.js";
|
|
13
|
+
var g = Object.defineProperty, x = Object.getOwnPropertyDescriptor, i = (t, e, a, o) => {
|
|
14
|
+
for (var s = o > 1 ? void 0 : o ? x(e, a) : e, n = t.length - 1, l; n >= 0; n--)
|
|
15
|
+
(l = t[n]) && (s = (o ? l(e, a, s) : l(s)) || s);
|
|
16
|
+
return o && s && g(e, a, s), s;
|
|
17
|
+
};
|
|
18
|
+
let r = class extends c(p) {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.size = "medium";
|
|
21
|
+
}
|
|
22
|
+
get classes() {
|
|
23
|
+
const t = typeof this.size == "string" ? this.size : this.size[this.viewport];
|
|
24
|
+
return {
|
|
25
|
+
container: !0,
|
|
26
|
+
[t]: !!t
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
get styleTokens() {
|
|
30
|
+
var t, e;
|
|
31
|
+
return f`
|
|
32
|
+
<style>
|
|
33
|
+
.header {
|
|
34
|
+
display: ${((t = this.headerItems) == null ? void 0 : t.length) > 0 ? "block" : "none"};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.footer {
|
|
38
|
+
display: ${((e = this.footerItems) == null ? void 0 : e.length) > 0 ? "block" : "none"};
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return v`
|
|
45
|
+
${this.styleTokens}
|
|
46
|
+
<div part="container" data-testid="ds-static-box-container" class=${u(this.classes)}>
|
|
47
|
+
<div class="body">
|
|
48
|
+
<div part="header" class="header">
|
|
49
|
+
<slot name="header"></slot>
|
|
50
|
+
</div>
|
|
51
|
+
<div part="main" class="main ds-scroll">
|
|
52
|
+
<slot name="main"></slot>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div part="footer" class="footer">
|
|
56
|
+
<slot name="footer"></slot>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
r.styles = [b];
|
|
63
|
+
i([
|
|
64
|
+
y({ type: String, converter: h })
|
|
65
|
+
], r.prototype, "size", 2);
|
|
66
|
+
i([
|
|
67
|
+
m({ slot: "header", flatten: !0 })
|
|
68
|
+
], r.prototype, "headerItems", 2);
|
|
69
|
+
i([
|
|
70
|
+
m({ slot: "footer", flatten: !0 })
|
|
71
|
+
], r.prototype, "footerItems", 2);
|
|
72
|
+
r = i([
|
|
73
|
+
d("ds-static-box")
|
|
74
|
+
], r);
|
|
75
|
+
export {
|
|
76
|
+
r as DsStaticBox
|
|
77
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const p = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export {
|
|
11
|
+
p as commonStyles
|
|
12
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UiKitElement as u } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as f } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
+
import { nothing as h, html as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
+
import { property as m } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
8
|
+
import { commonStyles as v } from "./styles/common.styles.js";
|
|
9
|
+
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (r, p, e, s) => {
|
|
10
|
+
for (var t = s > 1 ? void 0 : s ? b(p, e) : p, a = r.length - 1, o; a >= 0; a--)
|
|
11
|
+
(o = r[a]) && (t = (s ? o(p, e, t) : o(t)) || t);
|
|
12
|
+
return s && t && y(p, e, t), t;
|
|
13
|
+
};
|
|
14
|
+
let i = class extends u {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.steps = 0, this.currentStep = -1;
|
|
17
|
+
}
|
|
18
|
+
get classes() {
|
|
19
|
+
return {
|
|
20
|
+
container: !0
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
if (!this.steps) return h;
|
|
25
|
+
const r = Math.max(-1, Math.min(this.currentStep, this.steps));
|
|
26
|
+
return c`
|
|
27
|
+
<div
|
|
28
|
+
data-testid="ds-stepper-container"
|
|
29
|
+
class=${l(this.classes)}
|
|
30
|
+
role="list"
|
|
31
|
+
aria-label="Steps"
|
|
32
|
+
>
|
|
33
|
+
${Array.from({ length: this.steps }, (p, e) => {
|
|
34
|
+
const s = e <= r, t = e === r;
|
|
35
|
+
return c`<span class=${l({
|
|
36
|
+
step: !0,
|
|
37
|
+
active: s,
|
|
38
|
+
current: t
|
|
39
|
+
})} role="listitem" aria-posinset=${e + 1} aria-setsize=${this.steps} aria-current=${t ? "step" : "false"}></span>`;
|
|
40
|
+
})}
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
i.styles = [v];
|
|
46
|
+
n([
|
|
47
|
+
m({ type: Number, attribute: "steps", reflect: !0 })
|
|
48
|
+
], i.prototype, "steps", 2);
|
|
49
|
+
n([
|
|
50
|
+
m({ type: Number, attribute: "current-step", reflect: !0 })
|
|
51
|
+
], i.prototype, "currentStep", 2);
|
|
52
|
+
i = n([
|
|
53
|
+
f("ds-stepper")
|
|
54
|
+
], i);
|
|
55
|
+
export {
|
|
56
|
+
i as DsStepper
|
|
57
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const p = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export {
|
|
11
|
+
p as commonStyles
|
|
12
|
+
};
|