@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,61 @@
|
|
|
1
|
+
import { noChange as k } from "../lit-html.js";
|
|
2
|
+
import { directive as w, Directive as V, PartType as A } from "../directive.js";
|
|
3
|
+
import { getCommittedValue as D, setChildPartValue as h, insertPart as m, removePart as g, setCommittedValue as M } from "../directive-helpers.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2017 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const P = (r, f, c) => {
|
|
10
|
+
const p = /* @__PURE__ */ new Map();
|
|
11
|
+
for (let e = f; e <= c; e++) p.set(r[e], e);
|
|
12
|
+
return p;
|
|
13
|
+
}, E = w(class extends V {
|
|
14
|
+
constructor(r) {
|
|
15
|
+
if (super(r), r.type !== A.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
16
|
+
}
|
|
17
|
+
dt(r, f, c) {
|
|
18
|
+
let p;
|
|
19
|
+
c === void 0 ? c = f : f !== void 0 && (p = f);
|
|
20
|
+
const e = [], n = [];
|
|
21
|
+
let l = 0;
|
|
22
|
+
for (const a of r) e[l] = p ? p(a, l) : l, n[l] = c(a, l), l++;
|
|
23
|
+
return { values: n, keys: e };
|
|
24
|
+
}
|
|
25
|
+
render(r, f, c) {
|
|
26
|
+
return this.dt(r, f, c).values;
|
|
27
|
+
}
|
|
28
|
+
update(r, [f, c, p]) {
|
|
29
|
+
const e = D(r), { values: n, keys: l } = this.dt(f, c, p);
|
|
30
|
+
if (!Array.isArray(e)) return this.ut = l, n;
|
|
31
|
+
const a = this.ut ?? (this.ut = []), u = [];
|
|
32
|
+
let v, x, t = 0, o = e.length - 1, s = 0, i = n.length - 1;
|
|
33
|
+
for (; t <= o && s <= i; ) if (e[t] === null) t++;
|
|
34
|
+
else if (e[o] === null) o--;
|
|
35
|
+
else if (a[t] === l[s]) u[s] = h(e[t], n[s]), t++, s++;
|
|
36
|
+
else if (a[o] === l[i]) u[i] = h(e[o], n[i]), o--, i--;
|
|
37
|
+
else if (a[t] === l[i]) u[i] = h(e[t], n[i]), m(r, u[i + 1], e[t]), t++, i--;
|
|
38
|
+
else if (a[o] === l[s]) u[s] = h(e[o], n[s]), m(r, e[t], e[o]), o--, s++;
|
|
39
|
+
else if (v === void 0 && (v = P(l, s, i), x = P(a, t, o)), v.has(a[t])) if (v.has(a[o])) {
|
|
40
|
+
const d = x.get(l[s]), y = d !== void 0 ? e[d] : null;
|
|
41
|
+
if (y === null) {
|
|
42
|
+
const C = m(r, e[t]);
|
|
43
|
+
h(C, n[s]), u[s] = C;
|
|
44
|
+
} else u[s] = h(y, n[s]), m(r, e[t], y), e[d] = null;
|
|
45
|
+
s++;
|
|
46
|
+
} else g(e[o]), o--;
|
|
47
|
+
else g(e[t]), t++;
|
|
48
|
+
for (; s <= i; ) {
|
|
49
|
+
const d = m(r, u[i + 1]);
|
|
50
|
+
h(d, n[s]), u[s++] = d;
|
|
51
|
+
}
|
|
52
|
+
for (; t <= o; ) {
|
|
53
|
+
const d = e[t++];
|
|
54
|
+
d !== null && g(d);
|
|
55
|
+
}
|
|
56
|
+
return this.ut = l, M(r, u), k;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
E as repeat
|
|
61
|
+
};
|
package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { nothing as s, noChange as r } from "../lit-html.js";
|
|
2
|
+
import { directive as n, Directive as o, PartType as a } from "../directive.js";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2017 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
class i extends o {
|
|
9
|
+
constructor(t) {
|
|
10
|
+
if (super(t), this.it = s, t.type !== a.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
11
|
+
}
|
|
12
|
+
render(t) {
|
|
13
|
+
if (t === s || t == null) return this._t = void 0, this.it = t;
|
|
14
|
+
if (t === r) return t;
|
|
15
|
+
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
16
|
+
if (t === this.it) return this._t;
|
|
17
|
+
this.it = t;
|
|
18
|
+
const e = [t];
|
|
19
|
+
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
i.directiveName = "unsafeHTML", i.resultType = 1;
|
|
23
|
+
const l = n(i);
|
|
24
|
+
export {
|
|
25
|
+
i as UnsafeHTMLDirective,
|
|
26
|
+
l as unsafeHTML
|
|
27
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const x = globalThis, M = x.trustedTypes, B = M ? M.createPolicy("lit-html", { createHTML: (h) => h }) : void 0, W = "$lit$", p = `lit$${Math.random().toFixed(9).slice(2)}$`, k = "?" + p, D = `<${k}>`, f = document, H = () => f.createComment(""), N = (h) => h === null || typeof h != "object" && typeof h != "function", E = Array.isArray, z = (h) => E(h) || typeof (h == null ? void 0 : h[Symbol.iterator]) == "function", w = `[
|
|
7
|
+
\f\r]`, y = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, P = /-->/g, U = />/g, u = RegExp(`>|${w}(?:([^\\s"'>=/]+)(${w}*=${w}*(?:[^
|
|
8
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), L = /'/g, O = /"/g, V = /^(?:script|style|textarea|title)$/i, Z = (h) => (t, ...e) => ({ _$litType$: h, strings: t, values: e }), X = Z(1), T = Symbol.for("lit-noChange"), a = Symbol.for("lit-nothing"), R = /* @__PURE__ */ new WeakMap(), g = f.createTreeWalker(f, 129);
|
|
9
|
+
function j(h, t) {
|
|
10
|
+
if (!E(h) || !h.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
11
|
+
return B !== void 0 ? B.createHTML(t) : t;
|
|
12
|
+
}
|
|
13
|
+
const F = (h, t) => {
|
|
14
|
+
const e = h.length - 1, i = [];
|
|
15
|
+
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = y;
|
|
16
|
+
for (let A = 0; A < e; A++) {
|
|
17
|
+
const r = h[A];
|
|
18
|
+
let $, _, l = -1, c = 0;
|
|
19
|
+
for (; c < r.length && (n.lastIndex = c, _ = n.exec(r), _ !== null); ) c = n.lastIndex, n === y ? _[1] === "!--" ? n = P : _[1] !== void 0 ? n = U : _[2] !== void 0 ? (V.test(_[2]) && (s = RegExp("</" + _[2], "g")), n = u) : _[3] !== void 0 && (n = u) : n === u ? _[0] === ">" ? (n = s ?? y, l = -1) : _[1] === void 0 ? l = -2 : (l = n.lastIndex - _[2].length, $ = _[1], n = _[3] === void 0 ? u : _[3] === '"' ? O : L) : n === O || n === L ? n = u : n === P || n === U ? n = y : (n = u, s = void 0);
|
|
20
|
+
const d = n === u && h[A + 1].startsWith("/>") ? " " : "";
|
|
21
|
+
o += n === y ? r + D : l >= 0 ? (i.push($), r.slice(0, l) + W + r.slice(l) + p + d) : r + p + (l === -2 ? A : d);
|
|
22
|
+
}
|
|
23
|
+
return [j(h, o + (h[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
24
|
+
};
|
|
25
|
+
class b {
|
|
26
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
|
27
|
+
let s;
|
|
28
|
+
this.parts = [];
|
|
29
|
+
let o = 0, n = 0;
|
|
30
|
+
const A = t.length - 1, r = this.parts, [$, _] = F(t, e);
|
|
31
|
+
if (this.el = b.createElement($, i), g.currentNode = this.el.content, e === 2 || e === 3) {
|
|
32
|
+
const l = this.el.content.firstChild;
|
|
33
|
+
l.replaceWith(...l.childNodes);
|
|
34
|
+
}
|
|
35
|
+
for (; (s = g.nextNode()) !== null && r.length < A; ) {
|
|
36
|
+
if (s.nodeType === 1) {
|
|
37
|
+
if (s.hasAttributes()) for (const l of s.getAttributeNames()) if (l.endsWith(W)) {
|
|
38
|
+
const c = _[n++], d = s.getAttribute(l).split(p), C = /([.?@])?(.*)/.exec(c);
|
|
39
|
+
r.push({ type: 1, index: o, name: C[2], strings: d, ctor: C[1] === "." ? G : C[1] === "?" ? J : C[1] === "@" ? K : S }), s.removeAttribute(l);
|
|
40
|
+
} else l.startsWith(p) && (r.push({ type: 6, index: o }), s.removeAttribute(l));
|
|
41
|
+
if (V.test(s.tagName)) {
|
|
42
|
+
const l = s.textContent.split(p), c = l.length - 1;
|
|
43
|
+
if (c > 0) {
|
|
44
|
+
s.textContent = M ? M.emptyScript : "";
|
|
45
|
+
for (let d = 0; d < c; d++) s.append(l[d], H()), g.nextNode(), r.push({ type: 2, index: ++o });
|
|
46
|
+
s.append(l[c], H());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else if (s.nodeType === 8) if (s.data === k) r.push({ type: 2, index: o });
|
|
50
|
+
else {
|
|
51
|
+
let l = -1;
|
|
52
|
+
for (; (l = s.data.indexOf(p, l + 1)) !== -1; ) r.push({ type: 7, index: o }), l += p.length - 1;
|
|
53
|
+
}
|
|
54
|
+
o++;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static createElement(t, e) {
|
|
58
|
+
const i = f.createElement("template");
|
|
59
|
+
return i.innerHTML = t, i;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function v(h, t, e = h, i) {
|
|
63
|
+
var n, A;
|
|
64
|
+
if (t === T) return t;
|
|
65
|
+
let s = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
|
|
66
|
+
const o = N(t) ? void 0 : t._$litDirective$;
|
|
67
|
+
return (s == null ? void 0 : s.constructor) !== o && ((A = s == null ? void 0 : s._$AO) == null || A.call(s, !1), o === void 0 ? s = void 0 : (s = new o(h), s._$AT(h, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = v(h, s._$AS(h, t.values), s, i)), t;
|
|
68
|
+
}
|
|
69
|
+
class q {
|
|
70
|
+
constructor(t, e) {
|
|
71
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
72
|
+
}
|
|
73
|
+
get parentNode() {
|
|
74
|
+
return this._$AM.parentNode;
|
|
75
|
+
}
|
|
76
|
+
get _$AU() {
|
|
77
|
+
return this._$AM._$AU;
|
|
78
|
+
}
|
|
79
|
+
u(t) {
|
|
80
|
+
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? f).importNode(e, !0);
|
|
81
|
+
g.currentNode = s;
|
|
82
|
+
let o = g.nextNode(), n = 0, A = 0, r = i[0];
|
|
83
|
+
for (; r !== void 0; ) {
|
|
84
|
+
if (n === r.index) {
|
|
85
|
+
let $;
|
|
86
|
+
r.type === 2 ? $ = new m(o, o.nextSibling, this, t) : r.type === 1 ? $ = new r.ctor(o, r.name, r.strings, this, t) : r.type === 6 && ($ = new Q(o, this, t)), this._$AV.push($), r = i[++A];
|
|
87
|
+
}
|
|
88
|
+
n !== (r == null ? void 0 : r.index) && (o = g.nextNode(), n++);
|
|
89
|
+
}
|
|
90
|
+
return g.currentNode = f, s;
|
|
91
|
+
}
|
|
92
|
+
p(t) {
|
|
93
|
+
let e = 0;
|
|
94
|
+
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class m {
|
|
98
|
+
get _$AU() {
|
|
99
|
+
var t;
|
|
100
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
101
|
+
}
|
|
102
|
+
constructor(t, e, i, s) {
|
|
103
|
+
this.type = 2, this._$AH = a, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
104
|
+
}
|
|
105
|
+
get parentNode() {
|
|
106
|
+
let t = this._$AA.parentNode;
|
|
107
|
+
const e = this._$AM;
|
|
108
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
109
|
+
}
|
|
110
|
+
get startNode() {
|
|
111
|
+
return this._$AA;
|
|
112
|
+
}
|
|
113
|
+
get endNode() {
|
|
114
|
+
return this._$AB;
|
|
115
|
+
}
|
|
116
|
+
_$AI(t, e = this) {
|
|
117
|
+
t = v(this, t, e), N(t) ? t === a || t == null || t === "" ? (this._$AH !== a && this._$AR(), this._$AH = a) : t !== this._$AH && t !== T && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : z(t) ? this.k(t) : this._(t);
|
|
118
|
+
}
|
|
119
|
+
O(t) {
|
|
120
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
121
|
+
}
|
|
122
|
+
T(t) {
|
|
123
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
124
|
+
}
|
|
125
|
+
_(t) {
|
|
126
|
+
this._$AH !== a && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(f.createTextNode(t)), this._$AH = t;
|
|
127
|
+
}
|
|
128
|
+
$(t) {
|
|
129
|
+
var o;
|
|
130
|
+
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = b.createElement(j(i.h, i.h[0]), this.options)), i);
|
|
131
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(e);
|
|
132
|
+
else {
|
|
133
|
+
const n = new q(s, this), A = n.u(this.options);
|
|
134
|
+
n.p(e), this.T(A), this._$AH = n;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
_$AC(t) {
|
|
138
|
+
let e = R.get(t.strings);
|
|
139
|
+
return e === void 0 && R.set(t.strings, e = new b(t)), e;
|
|
140
|
+
}
|
|
141
|
+
k(t) {
|
|
142
|
+
E(this._$AH) || (this._$AH = [], this._$AR());
|
|
143
|
+
const e = this._$AH;
|
|
144
|
+
let i, s = 0;
|
|
145
|
+
for (const o of t) s === e.length ? e.push(i = new m(this.O(H()), this.O(H()), this, this.options)) : i = e[s], i._$AI(o), s++;
|
|
146
|
+
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
|
147
|
+
}
|
|
148
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
149
|
+
var i;
|
|
150
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
151
|
+
const s = t.nextSibling;
|
|
152
|
+
t.remove(), t = s;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
setConnected(t) {
|
|
156
|
+
var e;
|
|
157
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
class S {
|
|
161
|
+
get tagName() {
|
|
162
|
+
return this.element.tagName;
|
|
163
|
+
}
|
|
164
|
+
get _$AU() {
|
|
165
|
+
return this._$AM._$AU;
|
|
166
|
+
}
|
|
167
|
+
constructor(t, e, i, s, o) {
|
|
168
|
+
this.type = 1, this._$AH = a, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = a;
|
|
169
|
+
}
|
|
170
|
+
_$AI(t, e = this, i, s) {
|
|
171
|
+
const o = this.strings;
|
|
172
|
+
let n = !1;
|
|
173
|
+
if (o === void 0) t = v(this, t, e, 0), n = !N(t) || t !== this._$AH && t !== T, n && (this._$AH = t);
|
|
174
|
+
else {
|
|
175
|
+
const A = t;
|
|
176
|
+
let r, $;
|
|
177
|
+
for (t = o[0], r = 0; r < o.length - 1; r++) $ = v(this, A[i + r], e, r), $ === T && ($ = this._$AH[r]), n || (n = !N($) || $ !== this._$AH[r]), $ === a ? t = a : t !== a && (t += ($ ?? "") + o[r + 1]), this._$AH[r] = $;
|
|
178
|
+
}
|
|
179
|
+
n && !s && this.j(t);
|
|
180
|
+
}
|
|
181
|
+
j(t) {
|
|
182
|
+
t === a ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
class G extends S {
|
|
186
|
+
constructor() {
|
|
187
|
+
super(...arguments), this.type = 3;
|
|
188
|
+
}
|
|
189
|
+
j(t) {
|
|
190
|
+
this.element[this.name] = t === a ? void 0 : t;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
class J extends S {
|
|
194
|
+
constructor() {
|
|
195
|
+
super(...arguments), this.type = 4;
|
|
196
|
+
}
|
|
197
|
+
j(t) {
|
|
198
|
+
this.element.toggleAttribute(this.name, !!t && t !== a);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
class K extends S {
|
|
202
|
+
constructor(t, e, i, s, o) {
|
|
203
|
+
super(t, e, i, s, o), this.type = 5;
|
|
204
|
+
}
|
|
205
|
+
_$AI(t, e = this) {
|
|
206
|
+
if ((t = v(this, t, e, 0) ?? a) === T) return;
|
|
207
|
+
const i = this._$AH, s = t === a && i !== a || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== a && (i === a || s);
|
|
208
|
+
s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
209
|
+
}
|
|
210
|
+
handleEvent(t) {
|
|
211
|
+
var e;
|
|
212
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
class Q {
|
|
216
|
+
constructor(t, e, i) {
|
|
217
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
218
|
+
}
|
|
219
|
+
get _$AU() {
|
|
220
|
+
return this._$AM._$AU;
|
|
221
|
+
}
|
|
222
|
+
_$AI(t) {
|
|
223
|
+
v(this, t);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const Y = { I: m }, I = x.litHtmlPolyfillSupport;
|
|
227
|
+
I == null || I(b, m), (x.litHtmlVersions ?? (x.litHtmlVersions = [])).push("3.3.1");
|
|
228
|
+
const tt = (h, t, e) => {
|
|
229
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
230
|
+
let s = i._$litPart$;
|
|
231
|
+
if (s === void 0) {
|
|
232
|
+
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
233
|
+
i._$litPart$ = s = new m(t.insertBefore(H(), o), o, void 0, e ?? {});
|
|
234
|
+
}
|
|
235
|
+
return s._$AI(h), s;
|
|
236
|
+
};
|
|
237
|
+
export {
|
|
238
|
+
Y as _$LH,
|
|
239
|
+
X as html,
|
|
240
|
+
T as noChange,
|
|
241
|
+
a as nothing,
|
|
242
|
+
tt as render
|
|
243
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
cupra: {
|
|
3
|
+
fonts: [
|
|
4
|
+
{ name: "cupra-screen", weight: "300", file: "CupraScreen-Light" },
|
|
5
|
+
{ name: "cupra-screen", weight: "350", file: "CupraScreen-Book" },
|
|
6
|
+
{ name: "cupra-screen", weight: "400", file: "CupraScreen-Regular" },
|
|
7
|
+
{ name: "cupra-screen", weight: "500", file: "CupraScreen-Medium" }
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"cupra-diagonal": {
|
|
11
|
+
fonts: [
|
|
12
|
+
{ name: "cupra-screen", weight: "300", file: "CupraScreen-Light" },
|
|
13
|
+
{ name: "cupra-screen", weight: "350", file: "CupraScreen-Book" },
|
|
14
|
+
{ name: "cupra-screen", weight: "400", file: "CupraScreen-Regular" },
|
|
15
|
+
{ name: "cupra-screen", weight: "500", file: "CupraScreen-Medium" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
seat: {
|
|
19
|
+
fonts: [
|
|
20
|
+
{ name: "seat", weight: "400", file: "SeatBcn-Regular" },
|
|
21
|
+
{ name: "seat", weight: "500", file: "SeatBcn-Medium" },
|
|
22
|
+
{ name: "seat", weight: "700", file: "SeatBcn-Bold" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
e as fontsConfig
|
|
28
|
+
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Icons } from '../components/ds-icon/Icons.type.ts';
|
|
2
2
|
declare class IconsManager {
|
|
3
|
-
private static instance;
|
|
4
3
|
private icons;
|
|
5
4
|
private theme;
|
|
6
|
-
|
|
5
|
+
constructor();
|
|
7
6
|
handleChangeTheme: (theme: string) => void;
|
|
8
|
-
static getInstance(): IconsManager;
|
|
9
|
-
private getCachedIcon;
|
|
10
7
|
fetchIcon: (iconName: Icons, requestInit?: RequestInit) => Promise<string>;
|
|
11
8
|
private loadIcon;
|
|
12
9
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { THEME_STORAGE_KEY as r } from "../core/theme.constants.js";
|
|
2
|
+
import { pubSub as l } from "./PubSub.js";
|
|
3
|
+
class f {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.icons = {}, this.handleChangeTheme = (e) => {
|
|
6
|
+
if (this.theme === e) return;
|
|
7
|
+
this.theme = e;
|
|
8
|
+
const i = Object.keys(this.icons);
|
|
9
|
+
this.icons = {}, i.forEach((s) => this.fetchIcon(s));
|
|
10
|
+
}, this.fetchIcon = async (e, i = {}) => {
|
|
11
|
+
const s = typeof sessionStorage < "u" ? sessionStorage == null ? void 0 : sessionStorage.getItem(r) : null;
|
|
12
|
+
!this.theme && s && (this.theme = s);
|
|
13
|
+
const t = this.icons[e];
|
|
14
|
+
if (t) return await t;
|
|
15
|
+
const n = this.loadIcon(e, i).catch((a) => {
|
|
16
|
+
throw delete this.icons[e], a;
|
|
17
|
+
});
|
|
18
|
+
return this.icons[e] = n, n;
|
|
19
|
+
}, this.loadIcon = (e, { cache: i = "force-cache", ...s }) => this.theme ? fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`, {
|
|
20
|
+
cache: i,
|
|
21
|
+
...s
|
|
22
|
+
}).then((t) => t.text()).catch((t) => {
|
|
23
|
+
if ((t == null ? void 0 : t.name) === "AbortError") throw t;
|
|
24
|
+
return console.error(`Failed to fetch icon "${e}":`, t), "";
|
|
25
|
+
}) : Promise.resolve('<svg class="ds-icon"></svg>'), l.subscribe("theme", this.handleChangeTheme);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/1.0.0"), h = globalThis;
|
|
29
|
+
let o = h[c];
|
|
30
|
+
o || (o = new f(), Object.defineProperty(h, c, {
|
|
31
|
+
value: o,
|
|
32
|
+
writable: !1,
|
|
33
|
+
configurable: !1,
|
|
34
|
+
enumerable: !1
|
|
35
|
+
}));
|
|
36
|
+
const b = o;
|
|
37
|
+
export {
|
|
38
|
+
b as iconsManager
|
|
39
|
+
};
|
package/dist/utils/PubSub.d.ts
CHANGED
|
@@ -5,11 +5,9 @@ type LastPublishedData = {
|
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
};
|
|
7
7
|
export declare class PubSub {
|
|
8
|
-
private static instance;
|
|
9
8
|
subscribers: Subscribers;
|
|
10
9
|
lastPublishedData: LastPublishedData;
|
|
11
10
|
constructor();
|
|
12
|
-
static getInstance(): PubSub;
|
|
13
11
|
subscribe(event: string, callback: Function): any;
|
|
14
12
|
unsubscribe(event: string, callback: Function): void;
|
|
15
13
|
publish(event: string, data: unknown): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
class c {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.subscribers = {}, this.lastPublishedData = {};
|
|
4
|
+
}
|
|
5
|
+
subscribe(s, r) {
|
|
6
|
+
return this.subscribers[s] || (this.subscribers[s] = []), this.subscribers[s].push(r), this.lastPublishedData[s];
|
|
7
|
+
}
|
|
8
|
+
unsubscribe(s, r) {
|
|
9
|
+
this.subscribers[s] && (this.subscribers[s] = this.subscribers[s].filter((i) => i !== r));
|
|
10
|
+
}
|
|
11
|
+
publish(s, r) {
|
|
12
|
+
this.lastPublishedData[s] = r, this.subscribers[s] && this.subscribers[s].forEach((i) => {
|
|
13
|
+
try {
|
|
14
|
+
i(r);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.error(`Error in subscriber for event "${s}":`, e);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/1.0.0"), t = globalThis;
|
|
22
|
+
let b = t[u];
|
|
23
|
+
b || (b = new c(), Object.defineProperty(t, u, {
|
|
24
|
+
value: b,
|
|
25
|
+
writable: !1,
|
|
26
|
+
configurable: !1,
|
|
27
|
+
enumerable: !1
|
|
28
|
+
}));
|
|
29
|
+
const a = b;
|
|
30
|
+
export {
|
|
31
|
+
c as PubSub,
|
|
32
|
+
a as pubSub
|
|
33
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
class s {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.stylePromises = /* @__PURE__ */ new Map(), this.getStyles = async ({
|
|
4
|
+
componentName: e,
|
|
5
|
+
theme: t
|
|
6
|
+
}) => {
|
|
7
|
+
if (!t || !e) return;
|
|
8
|
+
const c = `https://ds-assets.cupra.com/1.0.0/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
9
|
+
if (r) return r;
|
|
10
|
+
const i = this.fetchStyle({ url: c }).then((n) => (n || this.stylePromises.delete(c), n));
|
|
11
|
+
return this.stylePromises.set(c, i), this.stylePromises.get(c);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
async fetchStyle({ url: e }) {
|
|
15
|
+
try {
|
|
16
|
+
const t = await fetch(e, { cache: "force-cache" });
|
|
17
|
+
if (t.ok) return t.text();
|
|
18
|
+
} catch (t) {
|
|
19
|
+
console.error(`Failed to fetch Style Sheet "${e}":`, t);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
getCachedStyleSheetPromise({ url: e }) {
|
|
23
|
+
return this.stylePromises.get(e);
|
|
24
|
+
}
|
|
25
|
+
static getInstance() {
|
|
26
|
+
return s.instance || (s.instance = new s()), s.instance;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const h = s.getInstance();
|
|
30
|
+
export {
|
|
31
|
+
h as stylesRegistry
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
fromAttribute(r) {
|
|
3
|
+
if (!r) return [];
|
|
4
|
+
try {
|
|
5
|
+
const t = JSON.parse(r);
|
|
6
|
+
if (Array.isArray(t))
|
|
7
|
+
return t;
|
|
8
|
+
throw new Error();
|
|
9
|
+
} catch {
|
|
10
|
+
return r.split(",");
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
toAttribute(r) {
|
|
14
|
+
return JSON.stringify(r);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as arrayConverter
|
|
19
|
+
};
|