@cupra/ui-kit 1.0.0-canary.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/components/base/DsUiElement.js +47 -0
- package/dist/components/base/UiKitElement.js +82 -0
- package/dist/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist/components/ds-accordion/ds-accordion.js +124 -0
- package/dist/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist/components/ds-accordion/theme-config.js +26 -0
- package/dist/components/ds-avatar/ds-avatar.js +102 -0
- package/dist/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist/components/ds-badge/ds-badge.js +53 -0
- package/dist/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/common.styles.js +9 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist/components/ds-bullets/ds-bullets.js +79 -0
- package/dist/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist/components/ds-button/ds-button.js +196 -0
- package/dist/components/ds-button/styles/common.styles.js +116 -0
- package/dist/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist/components/ds-chip/ds-chip.js +131 -0
- package/dist/components/ds-chip/styles/common.styles.js +25 -0
- package/dist/components/ds-chips/ds-chips.js +143 -0
- package/dist/components/ds-chips/styles/common.styles.js +94 -0
- package/dist/components/ds-currency/ds-currency.js +139 -0
- package/dist/components/ds-currency/styles/common.styles.js +17 -0
- package/dist/components/ds-dialog/ds-dialog.js +107 -0
- package/dist/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist/components/ds-divider/ds-divider.js +58 -0
- package/dist/components/ds-divider/styles/common.styles.js +13 -0
- package/dist/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist/components/ds-icon/ds-icon.js +105 -0
- package/dist/components/ds-icon/iconNames.d.ts +1 -1
- package/dist/components/ds-icon/iconNames.js +394 -0
- package/dist/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist/components/ds-input/ds-input.js +138 -0
- package/dist/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist/components/ds-link-button/ds-link-button.js +120 -0
- package/dist/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist/components/ds-logo/ds-logo.js +69 -0
- package/dist/components/ds-logo/styles/common.styles.js +18 -0
- package/dist/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist/components/ds-main-title/ds-main-title.js +35 -0
- package/dist/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist/components/ds-modal/ds-modal.js +215 -0
- package/dist/components/ds-modal/styles/common.styles.js +289 -0
- package/dist/components/ds-password-input/ds-password-input.js +43 -0
- package/dist/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist/components/ds-portal/ds-portal.js +41 -0
- package/dist/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist/components/ds-radio/ds-radio.js +111 -0
- package/dist/components/ds-radio/styles/common.styles.js +44 -0
- package/dist/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist/components/ds-rating/ds-rating.js +73 -0
- package/dist/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-rating/styles/common.styles.js +14 -0
- package/dist/components/ds-search/ds-search.js +210 -0
- package/dist/components/ds-search/styles/common.styles.js +61 -0
- package/dist/components/ds-search-input/ds-search-input.js +158 -0
- package/dist/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist/components/ds-select/ds-select.js +274 -0
- package/dist/components/ds-select/styles/common.styles.js +29 -0
- package/dist/components/ds-selection/ds-selection.js +57 -0
- package/dist/components/ds-selection/styles/common.styles.js +17 -0
- package/dist/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist/components/ds-slider/ds-slider.js +409 -0
- package/dist/components/ds-slider/styles/common.styles.js +61 -0
- package/dist/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist/components/ds-static-box/ds-static-box.js +77 -0
- package/dist/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist/components/ds-stepper/ds-stepper.js +57 -0
- package/dist/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist/components/ds-tabs/ds-tabs.js +203 -0
- package/dist/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist/components/ds-tabs/theme-config.js +14 -0
- package/dist/components/ds-tag/ds-tag.js +87 -0
- package/dist/components/ds-tag/styles/common.styles.js +20 -0
- package/dist/components/ds-text/ds-text.js +83 -0
- package/dist/components/ds-text/styles/common.styles.js +29 -0
- package/dist/components/ds-text-input/ds-text-input.js +100 -0
- package/dist/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist/components/ds-textarea/ds-textarea.js +87 -0
- package/dist/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist/components/ds-theme-provider/themeContext.js +5 -0
- package/dist/components/ds-toast/ds-toast.js +95 -0
- package/dist/components/ds-toast/styles/common.styles.js +112 -0
- package/dist/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/core/theme.constants.d.ts +1 -0
- package/dist/core/theme.constants.js +4 -0
- package/dist/decorators/customUiKitElement.js +23 -0
- package/dist/index.js +61 -9699
- package/dist/mixins/FormAssociatedMixin.js +14 -0
- package/dist/mixins/ViewportMixin.js +32 -0
- package/dist/mixins/inputStatesMixin.js +46 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist/styles/fonts-config.js +28 -0
- package/dist/utils/IconsManager.d.ts +1 -4
- package/dist/utils/IconsManager.js +39 -0
- package/dist/utils/PubSub.d.ts +0 -2
- package/dist/utils/PubSub.js +33 -0
- package/dist/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist/utils/arrayConverter.js +19 -0
- package/dist/utils/booleanConverter.js +4 -0
- package/dist/utils/componentFactory.js +167 -0
- package/dist/utils/cssQueries.js +16 -0
- package/dist/utils/cssWithTokens.js +11 -0
- package/dist/utils/formatNumber/formatNumber.js +54 -0
- package/dist/utils/htmlWithTokens.js +11 -0
- package/dist/utils/objectConverter.js +11 -0
- package/dist/utils/validateMaxLength.js +6 -0
- package/dist-react/components/base/DsUiElement.js +47 -0
- package/dist-react/components/base/UiKitElement.js +82 -0
- package/dist-react/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist-react/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist-react/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist-react/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist-react/components/ds-accordion/ds-accordion.js +124 -0
- package/dist-react/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist-react/components/ds-accordion/theme-config.js +26 -0
- package/dist-react/components/ds-avatar/ds-avatar.js +102 -0
- package/dist-react/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist-react/components/ds-badge/ds-badge.js +53 -0
- package/dist-react/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist-react/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist-react/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/common.styles.js +9 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist-react/components/ds-bullets/ds-bullets.js +79 -0
- package/dist-react/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist-react/components/ds-button/ds-button.js +196 -0
- package/dist-react/components/ds-button/styles/common.styles.js +116 -0
- package/dist-react/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist-react/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist-react/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist-react/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist-react/components/ds-chip/ds-chip.js +131 -0
- package/dist-react/components/ds-chip/styles/common.styles.js +25 -0
- package/dist-react/components/ds-chips/ds-chips.js +143 -0
- package/dist-react/components/ds-chips/styles/common.styles.js +94 -0
- package/dist-react/components/ds-currency/ds-currency.js +139 -0
- package/dist-react/components/ds-currency/styles/common.styles.js +17 -0
- package/dist-react/components/ds-dialog/ds-dialog.js +107 -0
- package/dist-react/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist-react/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist-react/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist-react/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist-react/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist-react/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist-react/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist-react/components/ds-divider/ds-divider.js +58 -0
- package/dist-react/components/ds-divider/styles/common.styles.js +13 -0
- package/dist-react/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist-react/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist-react/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist-react/components/ds-icon/ds-icon.js +105 -0
- package/dist-react/components/ds-icon/iconNames.d.ts +1 -1
- package/dist-react/components/ds-icon/iconNames.js +394 -0
- package/dist-react/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist-react/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-input/ds-input.js +138 -0
- package/dist-react/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist-react/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist-react/components/ds-link-button/ds-link-button.js +120 -0
- package/dist-react/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist-react/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist-react/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist-react/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist-react/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist-react/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist-react/components/ds-logo/ds-logo.js +69 -0
- package/dist-react/components/ds-logo/styles/common.styles.js +18 -0
- package/dist-react/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist-react/components/ds-main-title/ds-main-title.js +35 -0
- package/dist-react/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist-react/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist-react/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist-react/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist-react/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist-react/components/ds-modal/ds-modal.js +215 -0
- package/dist-react/components/ds-modal/styles/common.styles.js +289 -0
- package/dist-react/components/ds-password-input/ds-password-input.js +43 -0
- package/dist-react/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist-react/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist-react/components/ds-portal/ds-portal.js +41 -0
- package/dist-react/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist-react/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-radio/ds-radio.js +111 -0
- package/dist-react/components/ds-radio/styles/common.styles.js +44 -0
- package/dist-react/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist-react/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist-react/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist-react/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist-react/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist-react/components/ds-rating/ds-rating.js +73 -0
- package/dist-react/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist-react/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist-react/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-rating/styles/common.styles.js +14 -0
- package/dist-react/components/ds-search/ds-search.js +210 -0
- package/dist-react/components/ds-search/styles/common.styles.js +61 -0
- package/dist-react/components/ds-search-input/ds-search-input.js +158 -0
- package/dist-react/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist-react/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist-react/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist-react/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist-react/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist-react/components/ds-select/ds-select.js +274 -0
- package/dist-react/components/ds-select/styles/common.styles.js +29 -0
- package/dist-react/components/ds-selection/ds-selection.js +57 -0
- package/dist-react/components/ds-selection/styles/common.styles.js +17 -0
- package/dist-react/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist-react/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist-react/components/ds-slider/ds-slider.js +409 -0
- package/dist-react/components/ds-slider/styles/common.styles.js +61 -0
- package/dist-react/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist-react/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist-react/components/ds-static-box/ds-static-box.js +77 -0
- package/dist-react/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist-react/components/ds-stepper/ds-stepper.js +57 -0
- package/dist-react/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist-react/components/ds-tabs/ds-tabs.js +203 -0
- package/dist-react/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist-react/components/ds-tabs/theme-config.js +14 -0
- package/dist-react/components/ds-tag/ds-tag.js +87 -0
- package/dist-react/components/ds-tag/styles/common.styles.js +20 -0
- package/dist-react/components/ds-text/ds-text.js +83 -0
- package/dist-react/components/ds-text/styles/common.styles.js +29 -0
- package/dist-react/components/ds-text-input/ds-text-input.js +100 -0
- package/dist-react/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-textarea/ds-textarea.js +87 -0
- package/dist-react/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist-react/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist-react/components/ds-theme-provider/themeContext.js +5 -0
- package/dist-react/components/ds-toast/ds-toast.js +95 -0
- package/dist-react/components/ds-toast/styles/common.styles.js +112 -0
- package/dist-react/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist-react/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist-react/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist-react/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist-react/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist-react/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist-react/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist-react/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist-react/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist-react/components/index.d.ts +4 -1
- package/dist-react/core/theme.constants.d.ts +1 -0
- package/dist-react/core/theme.constants.js +4 -0
- package/dist-react/decorators/customUiKitElement.js +23 -0
- package/dist-react/index.js +61 -9623
- package/dist-react/mixins/FormAssociatedMixin.js +14 -0
- package/dist-react/mixins/ViewportMixin.js +32 -0
- package/dist-react/mixins/inputStatesMixin.js +46 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist-react/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist-react/styles/fonts-config.js +28 -0
- package/dist-react/utils/IconsManager.d.ts +1 -4
- package/dist-react/utils/IconsManager.js +39 -0
- package/dist-react/utils/PubSub.d.ts +0 -2
- package/dist-react/utils/PubSub.js +33 -0
- package/dist-react/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist-react/utils/arrayConverter.js +19 -0
- package/dist-react/utils/booleanConverter.js +4 -0
- package/dist-react/utils/componentFactory.js +90 -0
- package/dist-react/utils/cssQueries.js +16 -0
- package/dist-react/utils/cssWithTokens.js +11 -0
- package/dist-react/utils/formatNumber/formatNumber.js +54 -0
- package/dist-react/utils/htmlWithTokens.js +11 -0
- package/dist-react/utils/objectConverter.js +11 -0
- package/dist-react/utils/validateMaxLength.js +6 -0
- package/package.json +12 -6
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { UiKitElement as d } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as p } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as n } from "../../utils/booleanConverter.js";
|
|
4
|
+
import { htmlWithTokens as m } 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 { html as f } 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 i } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { classMap as u } 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 k = Object.defineProperty, y = Object.getOwnPropertyDescriptor, s = (h, l, o, r) => {
|
|
12
|
+
for (var t = r > 1 ? void 0 : r ? y(l, o) : l, a = h.length - 1, c; a >= 0; a--)
|
|
13
|
+
(c = h[a]) && (t = (r ? c(l, o, t) : c(t)) || t);
|
|
14
|
+
return r && t && k(l, o, t), t;
|
|
15
|
+
};
|
|
16
|
+
let e = class extends d {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.size = "medium", this.checked = !1, this.disabled = !1, this.mode = "light";
|
|
19
|
+
}
|
|
20
|
+
handleClick() {
|
|
21
|
+
this.checked = !this.checked, this.dispatchEvent(
|
|
22
|
+
new CustomEvent("change", {
|
|
23
|
+
bubbles: !0,
|
|
24
|
+
composed: !0,
|
|
25
|
+
detail: {
|
|
26
|
+
checked: this.checked
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
handleClickOff() {
|
|
32
|
+
this.checked && this.handleClick();
|
|
33
|
+
}
|
|
34
|
+
handleClickOn() {
|
|
35
|
+
this.checked || this.handleClick();
|
|
36
|
+
}
|
|
37
|
+
get styleTokens() {
|
|
38
|
+
return m`
|
|
39
|
+
<style>
|
|
40
|
+
:host {
|
|
41
|
+
color-scheme: ${this.mode};
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
get labelClasses() {
|
|
47
|
+
return {
|
|
48
|
+
container: !0,
|
|
49
|
+
[this.size]: !!this.size,
|
|
50
|
+
checked: this.checked,
|
|
51
|
+
disabled: this.disabled,
|
|
52
|
+
[this.mode]: !!this.mode
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return f`
|
|
57
|
+
${this.styleTokens}
|
|
58
|
+
<div class=${u(this.labelClasses)} @click=${this.handleClick}>
|
|
59
|
+
<slot name="off" @click=${this.handleClickOff}></slot>
|
|
60
|
+
<slot name="label"></slot>
|
|
61
|
+
<button
|
|
62
|
+
class="track-container"
|
|
63
|
+
type="button"
|
|
64
|
+
role="switch"
|
|
65
|
+
aria-checked=${this.checked}
|
|
66
|
+
aria-label=${this.dataAriaLabel}
|
|
67
|
+
data-action="aria-switch"
|
|
68
|
+
?disabled=${this.disabled}
|
|
69
|
+
>
|
|
70
|
+
<span class="track"></span>
|
|
71
|
+
<span class="fill"></span>
|
|
72
|
+
<span class="dot"></span>
|
|
73
|
+
</button>
|
|
74
|
+
<slot name="on" @click=${this.handleClickOn}></slot>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
e.styles = [b];
|
|
80
|
+
s([
|
|
81
|
+
i({ type: String })
|
|
82
|
+
], e.prototype, "size", 2);
|
|
83
|
+
s([
|
|
84
|
+
i({ type: Boolean, converter: n, reflect: !0 })
|
|
85
|
+
], e.prototype, "checked", 2);
|
|
86
|
+
s([
|
|
87
|
+
i({ type: Boolean, converter: n, reflect: !0 })
|
|
88
|
+
], e.prototype, "disabled", 2);
|
|
89
|
+
s([
|
|
90
|
+
i({ type: String, reflect: !0 })
|
|
91
|
+
], e.prototype, "mode", 2);
|
|
92
|
+
s([
|
|
93
|
+
i({ type: String, attribute: "data-aria-label" })
|
|
94
|
+
], e.prototype, "dataAriaLabel", 2);
|
|
95
|
+
e = s([
|
|
96
|
+
p("ds-toggle-switch")
|
|
97
|
+
], e);
|
|
98
|
+
export {
|
|
99
|
+
e as DsToggleSwitch
|
|
100
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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 s = t`
|
|
6
|
+
.container {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
::slotted([slot='on']),
|
|
13
|
+
::slotted([slot='off']) {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: color 200ms ease-in-out;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.track-container {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
align-items: center;
|
|
22
|
+
position: relative;
|
|
23
|
+
background: transparent;
|
|
24
|
+
border: none;
|
|
25
|
+
outline: none;
|
|
26
|
+
padding: 0;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fill {
|
|
31
|
+
transition: width 200ms ease-in-out;
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 0;
|
|
34
|
+
top: 50%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dot {
|
|
38
|
+
border-radius: 100%;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
transition: left 200ms ease-in-out;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
export {
|
|
46
|
+
s as commonStyles
|
|
47
|
+
};
|
|
@@ -1,45 +1,60 @@
|
|
|
1
1
|
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { type Placement } from '@floating-ui/dom';
|
|
2
3
|
import { nothing } from 'lit';
|
|
3
4
|
import type { DsTooltipAttrs } from './ds-tooltip.types';
|
|
4
5
|
declare const DsTooltip_base: (new (...args: any[]) => import("../../mixins/ViewportMixin").ViewportInterface) & typeof UiKitElement;
|
|
5
6
|
export declare class DsTooltip extends DsTooltip_base {
|
|
6
7
|
static styles: import("lit").CSSResult[];
|
|
7
8
|
mode: DsTooltipAttrs['mode'];
|
|
8
|
-
titleText: DsTooltipAttrs['title-text'];
|
|
9
|
-
bodyText: DsTooltipAttrs['body-text'];
|
|
10
|
-
position: DsTooltipAttrs['position'];
|
|
11
|
-
align: DsTooltipAttrs['align'];
|
|
12
|
-
cancelButtonText: DsTooltipAttrs['cancel-button-text'];
|
|
13
|
-
confirmButtonText: DsTooltipAttrs['confirm-button-text'];
|
|
14
9
|
show: DsTooltipAttrs['show'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
disableHoverListener: DsTooltipAttrs['disable-hover-listener'];
|
|
11
|
+
disableFocusListener: DsTooltipAttrs['disable-focus-listener'];
|
|
12
|
+
disablePressListener: DsTooltipAttrs['disable-press-listener'];
|
|
13
|
+
protected tooltopPlacement: Placement;
|
|
14
|
+
private tooltipId;
|
|
15
|
+
protected container: HTMLInputElement;
|
|
16
|
+
protected anchorContainer: HTMLInputElement;
|
|
18
17
|
protected arrow: HTMLInputElement;
|
|
19
|
-
|
|
18
|
+
private anchorElements;
|
|
19
|
+
private headerElements;
|
|
20
|
+
private closeButtonElements;
|
|
21
|
+
private contentElements;
|
|
22
|
+
protected usingKeyboard: boolean;
|
|
20
23
|
disconnectedCallback(): void;
|
|
21
|
-
protected
|
|
24
|
+
protected updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
25
|
+
protected updatePosition(): void;
|
|
26
|
+
protected handleKeyDown: () => void;
|
|
27
|
+
protected handlePointerDown: () => void;
|
|
22
28
|
protected handleResize: (params?: any) => void | Function;
|
|
23
29
|
protected get arrowClasses(): {
|
|
24
30
|
[x: string]: boolean;
|
|
25
31
|
arrow: boolean;
|
|
26
32
|
'not-positionable': boolean;
|
|
27
33
|
};
|
|
28
|
-
protected get
|
|
29
|
-
[x: string]:
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
protected get containerClasses(): {
|
|
35
|
+
[x: string]: boolean;
|
|
36
|
+
container: boolean;
|
|
37
|
+
};
|
|
38
|
+
protected get headerClasses(): {
|
|
39
|
+
'header-container': boolean;
|
|
40
|
+
hidden: boolean;
|
|
41
|
+
};
|
|
42
|
+
protected get contentClasses(): {
|
|
43
|
+
'content-container': boolean;
|
|
44
|
+
'ds-scroll': boolean;
|
|
45
|
+
'ds-scroll--size-s': boolean;
|
|
46
|
+
hidden: boolean;
|
|
32
47
|
};
|
|
33
|
-
protected
|
|
48
|
+
protected handleClose: () => void;
|
|
49
|
+
protected get arrowTemplate(): import("lit").TemplateResult<1>;
|
|
34
50
|
protected get tooltipTemplate(): typeof nothing | import("lit").TemplateResult<1>;
|
|
35
|
-
private getTooltipWidth;
|
|
36
51
|
protected get styleTokens(): import("lit").HTMLTemplateResult;
|
|
52
|
+
protected handleAnchorPointerDown: (event: PointerEvent) => void;
|
|
53
|
+
protected handleAnchorMouseOver: () => void;
|
|
54
|
+
protected handleAnchorMouseOut: () => void;
|
|
55
|
+
protected handleAnchorFocusIn: () => void;
|
|
56
|
+
protected handleAnchorFocusOut: () => void;
|
|
57
|
+
protected handlePressOutside: (event: MouseEvent) => void;
|
|
37
58
|
render(): import("lit").TemplateResult<1>;
|
|
38
|
-
protected handleClickSlot(): void;
|
|
39
|
-
protected handleMouseOver(): void;
|
|
40
|
-
protected handleMouseOut(): void;
|
|
41
|
-
protected handleClickCancelButton(): void;
|
|
42
|
-
protected handleClickConfirmButton(): void;
|
|
43
|
-
protected handleClickOutside: (event: MouseEvent | TouchEvent) => void;
|
|
44
59
|
}
|
|
45
60
|
export {};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { UiKitElement as y } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as v } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { computePosition as g, flip as $, shift as P, offset as L, arrow as E, size as C } from "../../node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
|
|
4
|
+
import { ViewportMixin as x } from "../../mixins/ViewportMixin.js";
|
|
5
|
+
import { booleanConverter as u } from "../../utils/booleanConverter.js";
|
|
6
|
+
import { debounce as O } from "../../utils/debounce.js";
|
|
7
|
+
import { htmlWithTokens as A } from "../../utils/htmlWithTokens.js";
|
|
8
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
9
|
+
import { html as m, nothing as d } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
10
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
11
|
+
import { property as l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
12
|
+
import { state as b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
13
|
+
import { query as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
14
|
+
import { queryAssignedElements as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
15
|
+
import { classMap as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
16
|
+
import { commonStyles as M } from "./styles/common.styles.js";
|
|
17
|
+
var D = Object.defineProperty, F = Object.getOwnPropertyDescriptor, r = (e, t, o, n) => {
|
|
18
|
+
for (var i = n > 1 ? void 0 : n ? F(t, o) : t, h = e.length - 1, a; h >= 0; h--)
|
|
19
|
+
(a = e[h]) && (i = (n ? a(t, o, i) : a(i)) || i);
|
|
20
|
+
return n && i && D(t, o, i), i;
|
|
21
|
+
};
|
|
22
|
+
let s = class extends x(y) {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments), this.mode = "light", this.show = !1, this.disableHoverListener = !1, this.disableFocusListener = !1, this.disablePressListener = !1, this.tooltipId = `ds-tooltip-${Date.now()}-${Math.floor(Math.random() * 1e6)}`, this.usingKeyboard = !1, this.handleKeyDown = () => {
|
|
25
|
+
this.usingKeyboard = !0;
|
|
26
|
+
}, this.handlePointerDown = () => {
|
|
27
|
+
this.usingKeyboard = !1;
|
|
28
|
+
}, this.handleResize = O({ func: () => this.requestUpdate() }), this.handleClose = () => {
|
|
29
|
+
this.show = !1;
|
|
30
|
+
}, this.handleAnchorPointerDown = (e) => {
|
|
31
|
+
this.disablePressListener || e.button === 0 && (this.show = !this.show);
|
|
32
|
+
}, this.handleAnchorMouseOver = () => {
|
|
33
|
+
this.disableHoverListener || (this.show = !0);
|
|
34
|
+
}, this.handleAnchorMouseOut = () => {
|
|
35
|
+
this.disableHoverListener || setTimeout(() => {
|
|
36
|
+
var e, t, o, n, i;
|
|
37
|
+
!((t = (e = this.container) == null ? void 0 : e.matches) != null && t.call(e, ":hover")) && !((n = (o = this.arrow) == null ? void 0 : o.matches) != null && n.call(o, ":hover")) && !((i = this == null ? void 0 : this.matches) != null && i.call(this, ":hover")) && (this.show = !1);
|
|
38
|
+
}, 150);
|
|
39
|
+
}, this.handleAnchorFocusIn = () => {
|
|
40
|
+
this.usingKeyboard && (this.disableFocusListener || (this.show = !0));
|
|
41
|
+
}, this.handleAnchorFocusOut = () => {
|
|
42
|
+
this.usingKeyboard && (this.disableFocusListener || (this.show = !1));
|
|
43
|
+
}, this.handlePressOutside = (e) => {
|
|
44
|
+
var o;
|
|
45
|
+
if (this.disablePressListener || e.button !== 0) return;
|
|
46
|
+
const t = e.target;
|
|
47
|
+
t === this || this.contains(t) || (o = this.shadowRoot) != null && o.contains(t) || this.anchorElements[0] === t || this.anchorElements[0].contains(t) || (this.show = !1);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
super.disconnectedCallback(), window.removeEventListener("resize", this.handleResize), document.removeEventListener("pointerdown", this.handlePressOutside), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("pointerdown", this.handlePointerDown);
|
|
52
|
+
}
|
|
53
|
+
updated(e) {
|
|
54
|
+
document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("pointerdown", this.handlePointerDown), this.updatePosition(), e.has("show") && (this.show ? (window.addEventListener("resize", this.handleResize), document.addEventListener("pointerdown", this.handlePressOutside)) : (window.removeEventListener("resize", this.handleResize), document.removeEventListener("pointerdown", this.handlePressOutside)));
|
|
55
|
+
}
|
|
56
|
+
updatePosition() {
|
|
57
|
+
requestAnimationFrame(() => {
|
|
58
|
+
var e;
|
|
59
|
+
!this.anchorContainer || !this.container || !this.show || !((e = this.anchorElements) != null && e[0]) || !(this.anchorContainer instanceof Element) || !(this.container instanceof Element) || !(this.arrow instanceof Element) || (g(this.anchorContainer, this.container, {
|
|
60
|
+
placement: "bottom-start",
|
|
61
|
+
middleware: [
|
|
62
|
+
$(),
|
|
63
|
+
P(),
|
|
64
|
+
L(8),
|
|
65
|
+
E({ element: this.arrow }),
|
|
66
|
+
C({
|
|
67
|
+
apply({ availableWidth: t, availableHeight: o, elements: n }) {
|
|
68
|
+
Object.assign(n.floating.style, {
|
|
69
|
+
maxWidth: `${Math.min(240, t - 8)}px`,
|
|
70
|
+
maxHeight: `${Math.max(0, o - 8)}px`
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
}).then((t) => {
|
|
76
|
+
const { x: o, y: n, middlewareData: i, placement: h } = t;
|
|
77
|
+
if (this.tooltopPlacement = h, Object.assign(this.container.style, {
|
|
78
|
+
left: `${o ?? 0}px`,
|
|
79
|
+
top: `${n ?? 0}px`
|
|
80
|
+
}), i.arrow) {
|
|
81
|
+
const { x: a, y: w } = i.arrow;
|
|
82
|
+
Object.assign(this.arrow.style, {
|
|
83
|
+
left: a != null ? `${a}px` : "",
|
|
84
|
+
top: w != null ? `${w}px` : ""
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}), this.requestUpdate());
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
get arrowClasses() {
|
|
91
|
+
var e;
|
|
92
|
+
return {
|
|
93
|
+
arrow: !0,
|
|
94
|
+
[this.mode]: !0,
|
|
95
|
+
"not-positionable": (this == null ? void 0 : this.offsetWidth) > ((e = this.container) == null ? void 0 : e.offsetWidth)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
get containerClasses() {
|
|
99
|
+
return {
|
|
100
|
+
container: !0,
|
|
101
|
+
[this.tooltopPlacement]: !!this.tooltopPlacement,
|
|
102
|
+
[this.mode]: !0
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
get headerClasses() {
|
|
106
|
+
var e, t;
|
|
107
|
+
return {
|
|
108
|
+
"header-container": !0,
|
|
109
|
+
hidden: ((e = this.headerElements) == null ? void 0 : e.length) === 0 && ((t = this.closeButtonElements) == null ? void 0 : t.length) === 0
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
get contentClasses() {
|
|
113
|
+
var e;
|
|
114
|
+
return {
|
|
115
|
+
"content-container": !0,
|
|
116
|
+
"ds-scroll": !0,
|
|
117
|
+
"ds-scroll--size-s": !0,
|
|
118
|
+
hidden: ((e = this.contentElements) == null ? void 0 : e.length) === 0
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
get arrowTemplate() {
|
|
122
|
+
return m`
|
|
123
|
+
<svg id="arrow" xmlns="http://www.w3.org/2000/svg" width="17" height="9" viewBox="0 0 17 9" fill="none" class=${c(this.arrowClasses)} @mouseout="${this.handleAnchorMouseOut}" aria-hidden="true" focusable="false">
|
|
124
|
+
<path d="M5.77946 4.38048L0.5 9L16 9L11.1427 4.46656C9.88663 3.29419 9.25858 2.708 8.48883 2.69565C7.71909 2.68329 7.07255 3.24902 5.77946 4.38048Z" fill="#26262C" class="ds-tooltip-arrow-background"/>
|
|
125
|
+
<path d="M0.5 8.5L5.89467 4.11683C7.1398 3.10516 7.76236 2.59933 8.49029 2.6109C9.21822 2.62246 9.8244 3.14782 11.0368 4.19853L16 8.5" stroke="#FAFAFA" stroke-opacity="0.3" stroke-linecap="round" class="ds-tooltip-arrow-border"/>
|
|
126
|
+
</svg>`;
|
|
127
|
+
}
|
|
128
|
+
get tooltipTemplate() {
|
|
129
|
+
return this.show && this.anchorElements.length > 0 ? m`
|
|
130
|
+
<div
|
|
131
|
+
id=${this.tooltipId}
|
|
132
|
+
part="container"
|
|
133
|
+
class=${c(this.containerClasses)}
|
|
134
|
+
@mouseout=${this.handleAnchorMouseOut}
|
|
135
|
+
role="tooltip"
|
|
136
|
+
>
|
|
137
|
+
<header part="header" class=${c(this.headerClasses)}>
|
|
138
|
+
<slot @slotchange=${this.updatePosition} name="header"></slot>
|
|
139
|
+
<slot @slotchange=${this.updatePosition} name="close-button" @click=${this.handleClose}></slot>
|
|
140
|
+
</header>
|
|
141
|
+
<div part="content" class=${c(this.contentClasses)}>
|
|
142
|
+
<slot @slotchange=${this.updatePosition} name="content"></slot>
|
|
143
|
+
</div>
|
|
144
|
+
<slot part="image" @slotchange=${this.updatePosition} name="image"></slot>
|
|
145
|
+
${this.arrowTemplate}
|
|
146
|
+
</div>` : d;
|
|
147
|
+
}
|
|
148
|
+
get styleTokens() {
|
|
149
|
+
return A`
|
|
150
|
+
<style>
|
|
151
|
+
:host {
|
|
152
|
+
color-scheme: ${this.mode};
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
155
|
+
`;
|
|
156
|
+
}
|
|
157
|
+
render() {
|
|
158
|
+
return m`
|
|
159
|
+
<style>
|
|
160
|
+
.anchor {
|
|
161
|
+
cursor: ${this.disablePressListener ? "default" : "pointer"};
|
|
162
|
+
}
|
|
163
|
+
</style>
|
|
164
|
+
${this.styleTokens}
|
|
165
|
+
<div
|
|
166
|
+
id="button"
|
|
167
|
+
class="anchor"
|
|
168
|
+
tabindex="0"
|
|
169
|
+
role=${this.disablePressListener ? d : "button"}
|
|
170
|
+
aria-controls=${this.tooltipId}
|
|
171
|
+
aria-expanded=${this.disablePressListener ? d : String(this.show)}
|
|
172
|
+
aria-describedby=${this.show ? this.tooltipId : d}
|
|
173
|
+
aria-label="open tooltip"
|
|
174
|
+
@mouseover="${this.handleAnchorMouseOver}"
|
|
175
|
+
@mouseout="${this.handleAnchorMouseOut}"
|
|
176
|
+
@pointerdown="${this.handleAnchorPointerDown}"
|
|
177
|
+
@focusin=${this.handleAnchorFocusIn}
|
|
178
|
+
@focusout=${this.handleAnchorFocusOut}
|
|
179
|
+
>
|
|
180
|
+
<slot></slot>
|
|
181
|
+
</div>
|
|
182
|
+
${this.tooltipTemplate}
|
|
183
|
+
`;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
s.styles = [M];
|
|
187
|
+
r([
|
|
188
|
+
l({ type: String, reflect: !0 })
|
|
189
|
+
], s.prototype, "mode", 2);
|
|
190
|
+
r([
|
|
191
|
+
l({ type: Boolean, reflect: !0, converter: u })
|
|
192
|
+
], s.prototype, "show", 2);
|
|
193
|
+
r([
|
|
194
|
+
l({ type: Boolean, reflect: !0, converter: u, attribute: "disable-hover-listener" })
|
|
195
|
+
], s.prototype, "disableHoverListener", 2);
|
|
196
|
+
r([
|
|
197
|
+
l({ type: Boolean, reflect: !0, converter: u, attribute: "disable-focus-listener" })
|
|
198
|
+
], s.prototype, "disableFocusListener", 2);
|
|
199
|
+
r([
|
|
200
|
+
l({ type: Boolean, reflect: !0, converter: u, attribute: "disable-press-listener" })
|
|
201
|
+
], s.prototype, "disablePressListener", 2);
|
|
202
|
+
r([
|
|
203
|
+
b()
|
|
204
|
+
], s.prototype, "tooltopPlacement", 2);
|
|
205
|
+
r([
|
|
206
|
+
b()
|
|
207
|
+
], s.prototype, "tooltipId", 2);
|
|
208
|
+
r([
|
|
209
|
+
f(".container")
|
|
210
|
+
], s.prototype, "container", 2);
|
|
211
|
+
r([
|
|
212
|
+
f("#button")
|
|
213
|
+
], s.prototype, "anchorContainer", 2);
|
|
214
|
+
r([
|
|
215
|
+
f("#arrow")
|
|
216
|
+
], s.prototype, "arrow", 2);
|
|
217
|
+
r([
|
|
218
|
+
p({ slot: "" })
|
|
219
|
+
], s.prototype, "anchorElements", 2);
|
|
220
|
+
r([
|
|
221
|
+
p({ slot: "header" })
|
|
222
|
+
], s.prototype, "headerElements", 2);
|
|
223
|
+
r([
|
|
224
|
+
p({ slot: "close-button" })
|
|
225
|
+
], s.prototype, "closeButtonElements", 2);
|
|
226
|
+
r([
|
|
227
|
+
p({ slot: "content" })
|
|
228
|
+
], s.prototype, "contentElements", 2);
|
|
229
|
+
s = r([
|
|
230
|
+
v("ds-tooltip")
|
|
231
|
+
], s);
|
|
232
|
+
export {
|
|
233
|
+
s as DsTooltip
|
|
234
|
+
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { CommonAttrs } from '../../types/types';
|
|
2
|
-
export
|
|
2
|
+
export type DsTooltipAttrs = CommonAttrs & {
|
|
3
3
|
mode?: 'dark' | 'light';
|
|
4
|
-
'title-text'?: string;
|
|
5
|
-
'body-text'?: string;
|
|
6
|
-
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
-
align?: 'start' | 'center' | 'end';
|
|
8
4
|
show?: boolean;
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
'disable-hover-listener'?: boolean;
|
|
6
|
+
'disable-focus-listener'?: boolean;
|
|
7
|
+
'disable-press-listener'?: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
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 i = t`
|
|
6
|
+
:host {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: fit-content;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.title {
|
|
13
|
+
text-align: left;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.body {
|
|
17
|
+
text-align: left;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.buttons-container {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: 1fr 1fr;
|
|
23
|
+
justify-content: flex-end;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
::slotted([slot='content']) {
|
|
27
|
+
text-align: left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.container {
|
|
31
|
+
white-space: normal;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
gap: var(--ds-spacing-s-5, 8px);
|
|
38
|
+
align-self: stretch;
|
|
39
|
+
|
|
40
|
+
z-index: var(--ds-z-index-tooltip, 1300);
|
|
41
|
+
|
|
42
|
+
position: absolute;
|
|
43
|
+
width: max-content;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
::slotted([slot='image']) {
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: auto;
|
|
49
|
+
object-fit: contain;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.header-container {
|
|
53
|
+
display: flex;
|
|
54
|
+
width: 100%;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.header-container.hidden,
|
|
60
|
+
.content-container.hidden {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.content-container {
|
|
65
|
+
overflow: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
::slotted([slot='header']) {
|
|
69
|
+
flex: 1 1 auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
::slotted([slot='close-button']) {
|
|
73
|
+
flex: 0 0 auto;
|
|
74
|
+
margin-left: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.arrow {
|
|
78
|
+
position: absolute;
|
|
79
|
+
z-index: var(--ds-z-index-tooltip, 1300);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ds-tooltip-arrow-background {
|
|
83
|
+
fill: var(--ds-tooltip-arrow-background-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ds-tooltip-arrow-border {
|
|
87
|
+
stroke: var(--ds-tooltip-arrow-border-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.anchor {
|
|
91
|
+
line-height: 0;
|
|
92
|
+
outline: none;
|
|
93
|
+
width: fit-content;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.top .arrow,
|
|
97
|
+
.top-start .arrow,
|
|
98
|
+
.top-end .arrow {
|
|
99
|
+
bottom: 0;
|
|
100
|
+
margin-bottom: -9px;
|
|
101
|
+
transform: rotate(180deg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bottom .arrow,
|
|
105
|
+
.bottom-start .arrow,
|
|
106
|
+
.bottom-end .arrow {
|
|
107
|
+
top: 0;
|
|
108
|
+
margin-top: -9px;
|
|
109
|
+
transform: rotate(0deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.left .arrow,
|
|
113
|
+
.left-start .arrow,
|
|
114
|
+
.left-end .arrow {
|
|
115
|
+
right: 0;
|
|
116
|
+
margin-right: -9px;
|
|
117
|
+
transform: rotate(90deg);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.right .arrow,
|
|
121
|
+
.right-start .arrow,
|
|
122
|
+
.right-end .arrow {
|
|
123
|
+
left: 0;
|
|
124
|
+
margin-left: -9px;
|
|
125
|
+
transform: rotate(270deg);
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
export {
|
|
129
|
+
i as commonStyles
|
|
130
|
+
};
|
|
@@ -21,15 +21,17 @@ import './ds-loader-dots/ds-loader-dots.ts';
|
|
|
21
21
|
import './ds-loader-logo/ds-loader-logo.ts';
|
|
22
22
|
import './ds-loader-spinner/ds-loader-spinner.ts';
|
|
23
23
|
import './ds-logo/ds-logo.ts';
|
|
24
|
+
import './ds-main-title/ds-main-title.ts';
|
|
24
25
|
import './ds-map-pin/ds-map-pin.ts';
|
|
25
26
|
import './ds-modal/ds-modal.ts';
|
|
26
27
|
import './ds-password-input/ds-password-input.ts';
|
|
27
28
|
import './ds-picker-item/ds-picker-item.ts';
|
|
28
29
|
import './ds-portal/ds-portal.ts';
|
|
29
30
|
import './ds-progress-bar/ds-progress-bar.ts';
|
|
31
|
+
import './ds-radio/ds-radio.ts';
|
|
30
32
|
import './ds-radio-button/ds-radio-button.ts';
|
|
31
33
|
import './ds-radio-group/ds-radio-group.ts';
|
|
32
|
-
import './ds-
|
|
34
|
+
import './ds-rating/ds-rating.ts';
|
|
33
35
|
import './ds-search-input/ds-search-input.ts';
|
|
34
36
|
import './ds-search/ds-search.ts';
|
|
35
37
|
import './ds-secondary-navigation/ds-secondary-navigation.ts';
|
|
@@ -54,3 +56,4 @@ import './ds-static-box/ds-static-box.ts';
|
|
|
54
56
|
import './ds-interactive-card/ds-interactive-card.ts';
|
|
55
57
|
import './ds-radio-button-group/ds-radio-button-group.ts';
|
|
56
58
|
import './ds-sidebar-navigation/ds-sidebar-navigation.ts';
|
|
59
|
+
import './ds-badge/ds-badge.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const THEME_STORAGE_KEY: "@cupra/ui-kit/theme";
|