@cupra/ui-kit 1.0.0-canary.8 → 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,203 @@
|
|
|
1
|
+
import { UiKitElement as u } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as p } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as v } from "../../utils/booleanConverter.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { nothing as m, html as g } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { state as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
9
|
+
import { query as S } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
10
|
+
import { classMap as b } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
11
|
+
import { commonStyles as y, navigationStyles as T, tabsStyles as x, panelsStyles as L } from "./styles/common.styles.js";
|
|
12
|
+
import { themeConfig as E } from "./theme-config.js";
|
|
13
|
+
var w = Object.defineProperty, A = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
|
|
14
|
+
for (var a = i > 1 ? void 0 : i ? A(e, s) : e, o = t.length - 1, h; o >= 0; o--)
|
|
15
|
+
(h = t[o]) && (a = (i ? h(e, s, a) : h(a)) || a);
|
|
16
|
+
return i && a && w(e, s, a), a;
|
|
17
|
+
};
|
|
18
|
+
let r = class extends u {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.selectedTab = 0, this.mode = "light", this.variant = "primary", this.size = "large", this.disabled = !1, this.focusedTabIndex = -1, this.handleKeyDown = (t) => {
|
|
21
|
+
var e, s, i, a;
|
|
22
|
+
if (!(this.focusedTabIndex < 0))
|
|
23
|
+
switch (t.key) {
|
|
24
|
+
case "ArrowRight":
|
|
25
|
+
case "Right":
|
|
26
|
+
t.preventDefault(), this.focusedTabIndex + 1 < ((e = this.tabs) == null ? void 0 : e.length) && (this.focusedTabIndex += 1, (s = this.tabs[this.focusedTabIndex]) == null || s.focus());
|
|
27
|
+
break;
|
|
28
|
+
case "ArrowLeft":
|
|
29
|
+
case "Left":
|
|
30
|
+
t.preventDefault(), this.focusedTabIndex - 1 >= 0 && (this.focusedTabIndex -= 1, (i = this.tabs[this.focusedTabIndex]) == null || i.focus());
|
|
31
|
+
break;
|
|
32
|
+
case "Enter":
|
|
33
|
+
case " ":
|
|
34
|
+
t.preventDefault(), this.focusedTabIndex >= 0 && this.focusedTabIndex < ((a = this.tabs) == null ? void 0 : a.length) && this.handleChangeSelectedTab(this.focusedTabIndex);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
|
|
38
|
+
this.handleScrollNav();
|
|
39
|
+
}), this.handleScrollNav = () => {
|
|
40
|
+
var e, s, i, a;
|
|
41
|
+
const t = ((e = this.nav) == null ? void 0 : e.scrollLeft) + ((s = this.nav) == null ? void 0 : s.clientWidth);
|
|
42
|
+
this.hasScrollLeft = ((i = this.nav) == null ? void 0 : i.scrollLeft) > 0, this.hasScrollRight = t < ((a = this.nav) == null ? void 0 : a.scrollWidth);
|
|
43
|
+
}, this.handleScrollLeft = () => {
|
|
44
|
+
this.nav.scrollBy({ left: -150, behavior: "smooth" });
|
|
45
|
+
}, this.handleScrollRight = () => {
|
|
46
|
+
this.nav.scrollBy({ left: 150, behavior: "smooth" });
|
|
47
|
+
}, this.handleFocus = (t) => {
|
|
48
|
+
var i;
|
|
49
|
+
const e = t.target, s = ((i = this.tabs) == null ? void 0 : i.findIndex((a) => a === e)) ?? -1;
|
|
50
|
+
if (s < 0 || this.disabled) {
|
|
51
|
+
t.preventDefault();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.focusedTabIndex = s;
|
|
55
|
+
}, this.handleBlur = () => {
|
|
56
|
+
this.focusedTabIndex = -1;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
super.connectedCallback(), this.tabs = Array.from(this.querySelectorAll("[slot=tab]")), this.panels = Array.from(this.querySelectorAll("[slot=panel]"));
|
|
61
|
+
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
super.disconnectedCallback(), this.resizeObserver.disconnect(), window.removeEventListener("resize", this.handleScrollNav);
|
|
64
|
+
}
|
|
65
|
+
getScrollButtonTemplate(t, e) {
|
|
66
|
+
var a;
|
|
67
|
+
if (!this.theme || t === "left" && !this.hasScrollLeft || t === "right" && !this.hasScrollRight)
|
|
68
|
+
return m;
|
|
69
|
+
const s = `arrow-${t}`, i = (a = E[this.theme]) == null ? void 0 : a["icon-button-variant"];
|
|
70
|
+
return this.componentFactory.createIconButton({
|
|
71
|
+
class: `nav-arrow ${t}`,
|
|
72
|
+
"data-aria-label": `nav-arrow-${t}`,
|
|
73
|
+
"@click": e,
|
|
74
|
+
size: ["xxsmall", "xsmall", "small"].includes(this.size) ? "medium" : "large",
|
|
75
|
+
"icon-name": s,
|
|
76
|
+
mode: this.mode,
|
|
77
|
+
variant: i
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
firstUpdated() {
|
|
81
|
+
this.handleScrollNav(), this.resizeObserver.observe(this.nav), this.tabs.forEach((t) => this.resizeObserver.observe(t)), window.addEventListener("resize", this.handleScrollNav), this.nav.addEventListener("scroll", this.handleScrollNav), this.setTabsFocusable();
|
|
82
|
+
}
|
|
83
|
+
updated(t) {
|
|
84
|
+
if (super.updated(t), t.has("selectedTab") && this.selectTab(this.selectedTab), t.has("variant")) {
|
|
85
|
+
const e = this.variant === "secondary" || this.variant === "primary" ? this.variant : "primary";
|
|
86
|
+
this.variant !== e && (this.variant = e);
|
|
87
|
+
}
|
|
88
|
+
this.setupTabAccessibility();
|
|
89
|
+
}
|
|
90
|
+
handleTabsSlotchange(t) {
|
|
91
|
+
this.tabs = t.target.assignedNodes({ flatten: !0 }), this.setTabsFocusable();
|
|
92
|
+
}
|
|
93
|
+
handlePanelSlotchange(t) {
|
|
94
|
+
this.panels = t.target.assignedNodes({ flatten: !0 }), this.setTabsFocusable();
|
|
95
|
+
}
|
|
96
|
+
setTabsFocusable() {
|
|
97
|
+
var t;
|
|
98
|
+
(t = this.tabs) == null || t.forEach((e) => {
|
|
99
|
+
e.setAttribute("tabindex", "0");
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
selectTab(t) {
|
|
103
|
+
var s, i, a, o, h;
|
|
104
|
+
(s = this.tabs) == null || s.forEach((d, f) => {
|
|
105
|
+
d.removeAttribute("selected"), d.setAttribute("aria-selected", f === t ? "true" : "false");
|
|
106
|
+
}), (i = this.tabs[t]) == null || i.setAttribute("selected", ""), this.panels.forEach((d) => d.removeAttribute("selected")), (a = this.panels[t]) == null || a.setAttribute("selected", "");
|
|
107
|
+
const e = (o = this.tabs) == null ? void 0 : o[this.selectedTab];
|
|
108
|
+
this.nav.scrollLeft = (e == null ? void 0 : e.offsetLeft) - ((h = this.nav) == null ? void 0 : h.offsetWidth) / 2;
|
|
109
|
+
}
|
|
110
|
+
setupTabAccessibility() {
|
|
111
|
+
var t;
|
|
112
|
+
(t = this.tabs) == null || t.forEach((e, s) => {
|
|
113
|
+
e.setAttribute("role", "tab"), e.setAttribute("tabindex", s === this.selectedTab && !this.disabled ? "0" : "-1"), e.addEventListener("focus", this.handleFocus), e.addEventListener("blur", this.handleBlur);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
handleChangeSelectedTab(t) {
|
|
117
|
+
this.dispatchEvent(
|
|
118
|
+
new CustomEvent("change", {
|
|
119
|
+
bubbles: !0,
|
|
120
|
+
composed: !0,
|
|
121
|
+
detail: {
|
|
122
|
+
selectedTab: t
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
), this.selectedTab = t;
|
|
126
|
+
}
|
|
127
|
+
handleSelect(t) {
|
|
128
|
+
let e;
|
|
129
|
+
this.tabs.forEach((s, i) => {
|
|
130
|
+
(s === t.target || s.contains(t.target)) && (e = i);
|
|
131
|
+
}), !(typeof e != "number" || e === this.selectedTab) && this.handleChangeSelectedTab(e);
|
|
132
|
+
}
|
|
133
|
+
get classes() {
|
|
134
|
+
return {
|
|
135
|
+
container: !0,
|
|
136
|
+
[this.size]: !0,
|
|
137
|
+
[this.mode]: !0,
|
|
138
|
+
[this.variant]: !0,
|
|
139
|
+
disabled: this.disabled
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
get navContainerClasses() {
|
|
143
|
+
return {
|
|
144
|
+
"nav-container": !0,
|
|
145
|
+
"scroll-left": this.hasScrollLeft,
|
|
146
|
+
"scroll-right": this.hasScrollRight
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
render() {
|
|
150
|
+
return g`
|
|
151
|
+
<div part="container" class=${b(this.classes)}>
|
|
152
|
+
<div class=${b(this.navContainerClasses)}>
|
|
153
|
+
${this.getScrollButtonTemplate("left", this.handleScrollLeft)}
|
|
154
|
+
<nav tabindex="-1" role="tablist" @scroll=${this.handleScrollNav} @keydown=${this.handleKeyDown}>
|
|
155
|
+
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
156
|
+
</nav>
|
|
157
|
+
${this.getScrollButtonTemplate("right", this.handleScrollRight)}
|
|
158
|
+
</div>
|
|
159
|
+
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
160
|
+
</div>
|
|
161
|
+
`;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
r.styles = [y, T, x, L];
|
|
165
|
+
l([
|
|
166
|
+
n({ type: Number, attribute: "selected-tab", reflect: !0 })
|
|
167
|
+
], r.prototype, "selectedTab", 2);
|
|
168
|
+
l([
|
|
169
|
+
n({ type: String, reflect: !0 })
|
|
170
|
+
], r.prototype, "mode", 2);
|
|
171
|
+
l([
|
|
172
|
+
n({ type: String, reflect: !0 })
|
|
173
|
+
], r.prototype, "variant", 2);
|
|
174
|
+
l([
|
|
175
|
+
n({ type: String })
|
|
176
|
+
], r.prototype, "size", 2);
|
|
177
|
+
l([
|
|
178
|
+
n({ type: Boolean, converter: v })
|
|
179
|
+
], r.prototype, "disabled", 2);
|
|
180
|
+
l([
|
|
181
|
+
c()
|
|
182
|
+
], r.prototype, "focusedTabIndex", 2);
|
|
183
|
+
l([
|
|
184
|
+
S("nav")
|
|
185
|
+
], r.prototype, "nav", 2);
|
|
186
|
+
l([
|
|
187
|
+
c()
|
|
188
|
+
], r.prototype, "tabs", 2);
|
|
189
|
+
l([
|
|
190
|
+
c()
|
|
191
|
+
], r.prototype, "panels", 2);
|
|
192
|
+
l([
|
|
193
|
+
c()
|
|
194
|
+
], r.prototype, "hasScrollLeft", 2);
|
|
195
|
+
l([
|
|
196
|
+
c()
|
|
197
|
+
], r.prototype, "hasScrollRight", 2);
|
|
198
|
+
r = l([
|
|
199
|
+
p("ds-tabs")
|
|
200
|
+
], r);
|
|
201
|
+
export {
|
|
202
|
+
r as DsTabs
|
|
203
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
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 t } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const n = t`
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
`, i = t`
|
|
11
|
+
nav {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
overflow-x: auto;
|
|
15
|
+
scroll-behavior: smooth;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
nav::-webkit-scrollbar {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nav-container {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.nav-container.scroll-left nav {
|
|
28
|
+
mask-image: linear-gradient(
|
|
29
|
+
to left,
|
|
30
|
+
rgba(0, 0, 0, 1) 0%,
|
|
31
|
+
rgba(0, 0, 0, 1) 90%,
|
|
32
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
33
|
+
rgba(0, 0, 0, 0) 100%
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.nav-container.scroll-right nav {
|
|
38
|
+
mask-image: linear-gradient(
|
|
39
|
+
to right,
|
|
40
|
+
rgba(0, 0, 0, 1) 0%,
|
|
41
|
+
rgba(0, 0, 0, 1) 90%,
|
|
42
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
43
|
+
rgba(0, 0, 0, 0) 100%
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.nav-container.scroll-left.scroll-right nav {
|
|
48
|
+
mask-image: linear-gradient(
|
|
49
|
+
to right,
|
|
50
|
+
rgba(0, 0, 0, 0) 0%,
|
|
51
|
+
rgba(0, 0, 0, 0.5) 5%,
|
|
52
|
+
rgba(0, 0, 0, 1) 10%,
|
|
53
|
+
rgba(0, 0, 0, 1) 90%,
|
|
54
|
+
rgba(0, 0, 0, 0.5) 95%,
|
|
55
|
+
rgba(0, 0, 0, 0) 100%
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.nav-arrow {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.nav-container:hover .nav-arrow {
|
|
64
|
+
visibility: visible;
|
|
65
|
+
}
|
|
66
|
+
`, l = t`
|
|
67
|
+
::slotted([slot='tab']) {
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-ms-user-select: none;
|
|
71
|
+
user-select: none;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
flex: 0 1 auto;
|
|
74
|
+
text-align: center;
|
|
75
|
+
position: relative;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
::slotted([slot='tab'][selected]) {
|
|
82
|
+
cursor: auto;
|
|
83
|
+
}
|
|
84
|
+
`, s = t`
|
|
85
|
+
::slotted([slot='panel']) {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
::slotted([slot='panel'][selected]) {
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
export {
|
|
93
|
+
n as commonStyles,
|
|
94
|
+
i as navigationStyles,
|
|
95
|
+
s as panelsStyles,
|
|
96
|
+
l as tabsStyles
|
|
97
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { UiKitElement as b } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as y } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as f } from "../../utils/booleanConverter.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { nothing as m, html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as i } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { state as v } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
9
|
+
import { classMap as h } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { when as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js";
|
|
11
|
+
import { commonStyles as g, iconStyles as d } from "./styles/common.styles.js";
|
|
12
|
+
var C = Object.defineProperty, P = Object.getOwnPropertyDescriptor, e = (r, s, c, n) => {
|
|
13
|
+
for (var o = n > 1 ? void 0 : n ? P(s, c) : s, l = r.length - 1, a; l >= 0; l--)
|
|
14
|
+
(a = r[l]) && (o = (n ? a(s, c, o) : a(o)) || o);
|
|
15
|
+
return n && o && C(s, c, o), o;
|
|
16
|
+
};
|
|
17
|
+
let t = class extends b {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments), this.show = !0, this.clickableIcon = !1, this.iconPosition = "left", this.color = "black";
|
|
20
|
+
}
|
|
21
|
+
get classes() {
|
|
22
|
+
return {
|
|
23
|
+
container: !0,
|
|
24
|
+
[this.color]: !0
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
get iconClasses() {
|
|
28
|
+
return {
|
|
29
|
+
icon: !0,
|
|
30
|
+
clicable: !!this.clickableIcon
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
handleClickIcon() {
|
|
34
|
+
if (!this.clickableIcon) return;
|
|
35
|
+
const r = new CustomEvent("clickicon", {
|
|
36
|
+
bubbles: !0,
|
|
37
|
+
composed: !0
|
|
38
|
+
});
|
|
39
|
+
this.dispatchEvent(r);
|
|
40
|
+
}
|
|
41
|
+
get iconTemplate() {
|
|
42
|
+
return this.iconName ? this.componentFactory.createIcon({
|
|
43
|
+
class: h(this.iconClasses),
|
|
44
|
+
"icon-name": this.iconName,
|
|
45
|
+
size: 16,
|
|
46
|
+
"@click": this.handleClickIcon
|
|
47
|
+
}) : m;
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
return this.show ? p`
|
|
51
|
+
<div class=${h(this.classes)}>
|
|
52
|
+
${u(this.iconPosition === "left", () => p`${this.iconTemplate}`)}
|
|
53
|
+
<slot></slot>
|
|
54
|
+
${u(this.iconPosition === "right", () => p`${this.iconTemplate}`)}
|
|
55
|
+
</div>
|
|
56
|
+
` : m;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
t.styles = [g, d];
|
|
60
|
+
e([
|
|
61
|
+
i({ type: Boolean, converter: f })
|
|
62
|
+
], t.prototype, "show", 2);
|
|
63
|
+
e([
|
|
64
|
+
i({
|
|
65
|
+
type: Boolean,
|
|
66
|
+
converter: f,
|
|
67
|
+
attribute: "clickable-icon"
|
|
68
|
+
})
|
|
69
|
+
], t.prototype, "clickableIcon", 2);
|
|
70
|
+
e([
|
|
71
|
+
i({ type: String, attribute: "icon-name" })
|
|
72
|
+
], t.prototype, "iconName", 2);
|
|
73
|
+
e([
|
|
74
|
+
i({ type: String, attribute: "icon-position" })
|
|
75
|
+
], t.prototype, "iconPosition", 2);
|
|
76
|
+
e([
|
|
77
|
+
i({ type: String, attribute: "color" })
|
|
78
|
+
], t.prototype, "color", 2);
|
|
79
|
+
e([
|
|
80
|
+
v()
|
|
81
|
+
], t.prototype, "onClickHandler", 2);
|
|
82
|
+
t = e([
|
|
83
|
+
y("ds-tag")
|
|
84
|
+
], t);
|
|
85
|
+
export {
|
|
86
|
+
t as DsTag
|
|
87
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cssWithTokens as n } from "../../../utils/cssWithTokens.js";
|
|
2
|
+
const i = n`
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
`, o = n`
|
|
13
|
+
.icon.clicable {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export {
|
|
18
|
+
i as commonStyles,
|
|
19
|
+
o as iconStyles
|
|
20
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { UiKitElement as h } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as c } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as u } from "../../utils/booleanConverter.js";
|
|
4
|
+
import { htmlWithTokens as g } from "../../utils/htmlWithTokens.js";
|
|
5
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
6
|
+
import { nothing as y, html as n } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
7
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
8
|
+
import { property as r } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { unsafeHTML as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
11
|
+
import { commonStyles as d } from "./styles/common.styles.js";
|
|
12
|
+
var $ = Object.defineProperty, T = Object.getOwnPropertyDescriptor, e = (l, s, a, i) => {
|
|
13
|
+
for (var o = i > 1 ? void 0 : i ? T(s, a) : s, p = l.length - 1, m; p >= 0; p--)
|
|
14
|
+
(m = l[p]) && (o = (i ? m(s, a, o) : m(o)) || o);
|
|
15
|
+
return i && o && $(s, a, o), o;
|
|
16
|
+
};
|
|
17
|
+
let t = class extends h {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments), this.size = "medium", this.weight = "regular", this.variant = "body", this.mode = "light";
|
|
20
|
+
}
|
|
21
|
+
get classes() {
|
|
22
|
+
return {
|
|
23
|
+
container: !0,
|
|
24
|
+
[`size-${this.size}`]: !!this.size,
|
|
25
|
+
[`mode-${this.mode}`]: !!this.mode,
|
|
26
|
+
[`weight-${this.weight}`]: !!this.weight,
|
|
27
|
+
[`variant-${this.variant}`]: !!this.variant,
|
|
28
|
+
uppercase: this.uppercase
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
get customElementTemplate() {
|
|
32
|
+
return !this.htmlTagName || !this.value ? y : n`${v(`<${this.htmlTagName} class="text">${this.value}</${this.htmlTagName}>`)}`;
|
|
33
|
+
}
|
|
34
|
+
get styles() {
|
|
35
|
+
return g`
|
|
36
|
+
<style>
|
|
37
|
+
.container {
|
|
38
|
+
color: ${this.color || "var(--ds-text-color)"}
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return n`
|
|
45
|
+
${this.styles}
|
|
46
|
+
<div data-testid="ds-text-container" class=${f(this.classes)}>
|
|
47
|
+
${this.customElementTemplate}
|
|
48
|
+
<slot></slot>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
t.styles = [d];
|
|
54
|
+
e([
|
|
55
|
+
r({ type: String })
|
|
56
|
+
], t.prototype, "size", 2);
|
|
57
|
+
e([
|
|
58
|
+
r({ type: String })
|
|
59
|
+
], t.prototype, "weight", 2);
|
|
60
|
+
e([
|
|
61
|
+
r({ type: String })
|
|
62
|
+
], t.prototype, "variant", 2);
|
|
63
|
+
e([
|
|
64
|
+
r({ type: String, attribute: "html-tag-name" })
|
|
65
|
+
], t.prototype, "htmlTagName", 2);
|
|
66
|
+
e([
|
|
67
|
+
r({ type: String })
|
|
68
|
+
], t.prototype, "value", 2);
|
|
69
|
+
e([
|
|
70
|
+
r({ type: String, reflect: !0 })
|
|
71
|
+
], t.prototype, "mode", 2);
|
|
72
|
+
e([
|
|
73
|
+
r({ type: String, reflect: !0 })
|
|
74
|
+
], t.prototype, "color", 2);
|
|
75
|
+
e([
|
|
76
|
+
r({ type: Boolean, converter: u, reflect: !0 })
|
|
77
|
+
], t.prototype, "uppercase", 2);
|
|
78
|
+
t = e([
|
|
79
|
+
c("ds-text")
|
|
80
|
+
], t);
|
|
81
|
+
export {
|
|
82
|
+
t as DsText
|
|
83
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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 t } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const n = t`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::slotted(*),
|
|
11
|
+
.text {
|
|
12
|
+
color: inherit;
|
|
13
|
+
font-size: inherit;
|
|
14
|
+
font-weight: inherit;
|
|
15
|
+
line-height: inherit;
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.text + ::slotted(*) {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.uppercase {
|
|
24
|
+
text-transform: uppercase;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
export {
|
|
28
|
+
n as commonStyles
|
|
29
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { UiKitElement as c } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { inputStatesMixin as m } from "../../mixins/inputStatesMixin.js";
|
|
4
|
+
import { validateMaxLength as v } from "../../utils/validateMaxLength.js";
|
|
5
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
6
|
+
import { html as n, nothing as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
7
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
8
|
+
import { property as l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { commonStyles as b } from "./styles/common.styles.js";
|
|
11
|
+
var g = Object.defineProperty, E = Object.getOwnPropertyDescriptor, o = (t, e, r, s) => {
|
|
12
|
+
for (var a = s > 1 ? void 0 : s ? E(e, r) : e, u = t.length - 1, h; u >= 0; u--)
|
|
13
|
+
(h = t[u]) && (a = (s ? h(e, r, a) : h(a)) || a);
|
|
14
|
+
return s && a && g(e, r, a), a;
|
|
15
|
+
};
|
|
16
|
+
let i = class extends m(c) {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.keyboardMode = !1, this.size = "medium", this.helperText = "", this.forcedError = "", this.invalidError = "", this.dataAriaLabelRemoveButton = "", this.handleClickIcon = () => {
|
|
19
|
+
this.nativeInput.value = "", this.nativeInput.focus(), ["input", "change"].forEach(
|
|
20
|
+
(t) => this.nativeInput.dispatchEvent(new Event(t, { bubbles: !0, composed: !0 }))
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
get classes() {
|
|
25
|
+
return {
|
|
26
|
+
container: !0,
|
|
27
|
+
error: !!this.forcedError,
|
|
28
|
+
[this.size]: !!this.size,
|
|
29
|
+
disabled: this.inputStates.disabled,
|
|
30
|
+
filled: this.inputStates.filled,
|
|
31
|
+
invalid: this.inputStates.invalid,
|
|
32
|
+
focus: this.inputStates.focus,
|
|
33
|
+
"focus-visible": this.inputStates.focusVisible
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return n`
|
|
38
|
+
<div class=${f(this.classes)}>
|
|
39
|
+
<div class="input-container">
|
|
40
|
+
<div><slot></slot></div>
|
|
41
|
+
${this.iconTemplate}
|
|
42
|
+
</div>
|
|
43
|
+
<div class="footer">
|
|
44
|
+
${this.helperTextTemplate}
|
|
45
|
+
${this.forcedErrorTemplate}
|
|
46
|
+
${this.invalidErrorTemplate}
|
|
47
|
+
${this.lengthTemplate}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
get iconTemplate() {
|
|
53
|
+
var t, e, r;
|
|
54
|
+
return (e = (t = this.nativeInput) == null ? void 0 : t.value) != null && e.length ? this.componentFactory.createIconButton({
|
|
55
|
+
class: "icon-button",
|
|
56
|
+
"icon-name": "cross",
|
|
57
|
+
size: this.size,
|
|
58
|
+
disabled: !!((r = this.nativeInput) != null && r.disabled),
|
|
59
|
+
variant: "standard",
|
|
60
|
+
"@click": this.handleClickIcon,
|
|
61
|
+
"data-aria-label": this.dataAriaLabelRemoveButton || "remove button"
|
|
62
|
+
}) : p;
|
|
63
|
+
}
|
|
64
|
+
get lengthTemplate() {
|
|
65
|
+
var e, r, s;
|
|
66
|
+
const t = (r = (e = this.nativeInput) == null ? void 0 : e.maxLength) == null ? void 0 : r.toString();
|
|
67
|
+
return v(t) ? n`<span class="char-counter">${((s = this.inputStates.currentValue) == null ? void 0 : s.length) || 0}/${t}</span>` : p;
|
|
68
|
+
}
|
|
69
|
+
get helperTextTemplate() {
|
|
70
|
+
return this.forcedError || this.inputStates.invalid && this.invalidError ? p : n`<span class="support-text helper-text">${this.helperText}</span>`;
|
|
71
|
+
}
|
|
72
|
+
get forcedErrorTemplate() {
|
|
73
|
+
return this.forcedError ? n`<span class="support-text error-text forced-error">${this.forcedError}</span>` : p;
|
|
74
|
+
}
|
|
75
|
+
get invalidErrorTemplate() {
|
|
76
|
+
return this.forcedError || !this.inputStates.invalid || !this.invalidError ? p : n`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
i.styles = [b];
|
|
80
|
+
o([
|
|
81
|
+
l({ type: String })
|
|
82
|
+
], i.prototype, "size", 2);
|
|
83
|
+
o([
|
|
84
|
+
l({ type: String, attribute: "helper-text" })
|
|
85
|
+
], i.prototype, "helperText", 2);
|
|
86
|
+
o([
|
|
87
|
+
l({ type: String, attribute: "forced-error" })
|
|
88
|
+
], i.prototype, "forcedError", 2);
|
|
89
|
+
o([
|
|
90
|
+
l({ type: String, attribute: "invalid-error" })
|
|
91
|
+
], i.prototype, "invalidError", 2);
|
|
92
|
+
o([
|
|
93
|
+
l({ type: String, attribute: "data-aria-label-remove-button" })
|
|
94
|
+
], i.prototype, "dataAriaLabelRemoveButton", 2);
|
|
95
|
+
i = o([
|
|
96
|
+
d("ds-text-input")
|
|
97
|
+
], i);
|
|
98
|
+
export {
|
|
99
|
+
i as DsTextInput
|
|
100
|
+
};
|
|
@@ -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
|
+
};
|