@cupra/ui-kit 0.2.0-canary.0 → 1.0.0-canary.10
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 +97 -778
- package/THIRD_PARTY_LICENSES.MD +79 -0
- package/dist/components/base/DsUiElement.js +47 -0
- package/dist/components/base/UiKitElement.js +80 -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-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/ds-button.types.d.ts +1 -3
- 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 +130 -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 +78 -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/ds-icon.js +100 -0
- package/dist/components/ds-icon/iconNames.js +393 -0
- package/dist/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist/components/ds-icon-button/ds-icon-button.types.d.ts +1 -3
- 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-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/ds-picker-item.types.d.ts +1 -4
- 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-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/ds-slider.types.d.ts +1 -3
- 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/ds-static-box.types.d.ts +1 -1
- 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 +89 -0
- package/dist/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -1
- 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.js +198 -0
- package/dist/components/ds-tooltip/styles/common.styles.js +163 -0
- package/dist/decorators/customUiKitElement.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +59 -9285
- 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/@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.js +30 -0
- package/dist/utils/PubSub.js +28 -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 +80 -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-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/ds-button.types.d.ts +1 -3
- 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 +130 -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 +78 -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/ds-icon.js +100 -0
- package/dist-react/components/ds-icon/iconNames.js +393 -0
- package/dist-react/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist-react/components/ds-icon-button/ds-icon-button.types.d.ts +1 -3
- 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-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/ds-picker-item.types.d.ts +1 -4
- 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-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/ds-slider.types.d.ts +1 -3
- 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/ds-static-box.types.d.ts +1 -1
- 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 +89 -0
- package/dist-react/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -1
- 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.js +198 -0
- package/dist-react/components/ds-tooltip/styles/common.styles.js +163 -0
- package/dist-react/decorators/customUiKitElement.js +23 -0
- package/dist-react/index.d.ts +1 -0
- package/dist-react/index.js +59 -9210
- 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/@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.js +30 -0
- package/dist-react/utils/PubSub.js +28 -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 +27 -13
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { UiKitElement as m } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as f } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { ViewportMixin as y } from "../../mixins/ViewportMixin.js";
|
|
4
|
+
import { booleanConverter as b } from "../../utils/booleanConverter.js";
|
|
5
|
+
import { debounce as v } from "../../utils/debounce.js";
|
|
6
|
+
import { htmlWithTokens as x } from "../../utils/htmlWithTokens.js";
|
|
7
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
8
|
+
import { nothing as a, html as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
9
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
10
|
+
import { property as h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
11
|
+
import { query as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
12
|
+
import { classMap as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
13
|
+
import { commonStyles as g, tooltipStyles as w, arrowStyles as T } from "./styles/common.styles.js";
|
|
14
|
+
var C = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, s = (t, n, r, i) => {
|
|
15
|
+
for (var o = i > 1 ? void 0 : i ? $(n, r) : n, l = t.length - 1, d; l >= 0; l--)
|
|
16
|
+
(d = t[l]) && (o = (i ? d(n, r, o) : d(o)) || o);
|
|
17
|
+
return i && o && C(n, r, o), o;
|
|
18
|
+
};
|
|
19
|
+
let e = class extends y(m) {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments), this.mode = "light", this.titleText = "", this.bodyText = "", this.position = "bottom", this.align = "center", this.show = !1, this.zIndex = 2e3, this.bodyWidth = "unset", this.handleResize = v({ func: () => this.requestUpdate() }), this.handleClickOutside = (t) => {
|
|
22
|
+
var r;
|
|
23
|
+
const n = t.target;
|
|
24
|
+
n !== this && !this.contains(n) && !((r = this.shadowRoot) != null && r.contains(n)) && (this.show = !1);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
super.connectedCallback(), window.addEventListener("resize", this.handleResize);
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
super.disconnectedCallback(), window.removeEventListener("resize", this.handleResize);
|
|
32
|
+
}
|
|
33
|
+
willUpdate(t) {
|
|
34
|
+
t.has("show") && (this.show ? document.addEventListener("click", this.handleClickOutside) : document.removeEventListener("click", this.handleClickOutside));
|
|
35
|
+
}
|
|
36
|
+
get arrowClasses() {
|
|
37
|
+
var t;
|
|
38
|
+
return {
|
|
39
|
+
arrow: !0,
|
|
40
|
+
[this.position]: !0,
|
|
41
|
+
[this.align]: !0,
|
|
42
|
+
[this.mode]: !0,
|
|
43
|
+
"not-positionable": (this == null ? void 0 : this.offsetWidth) > ((t = this.tooltip) == null ? void 0 : t.offsetWidth)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
get tooltipClasses() {
|
|
47
|
+
return {
|
|
48
|
+
tooltip: !0,
|
|
49
|
+
[this.position]: !0,
|
|
50
|
+
[this.align]: !0,
|
|
51
|
+
[this.mode]: !0,
|
|
52
|
+
complex: this.cancelButtonText || this.confirmButtonText
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
get buttonsTemplate() {
|
|
56
|
+
if (!this.cancelButtonText && !this.confirmButtonText) return a;
|
|
57
|
+
const t = this.mode === "light" ? "dark" : "light";
|
|
58
|
+
return c`
|
|
59
|
+
<div class="buttons-container">
|
|
60
|
+
${this.cancelButtonText ? this.componentFactory.createButton({
|
|
61
|
+
class: "cancel-button",
|
|
62
|
+
"@click": this.handleClickCancelButton,
|
|
63
|
+
size: "small",
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
mode: t,
|
|
66
|
+
children: this.cancelButtonText
|
|
67
|
+
}) : a}
|
|
68
|
+
${this.confirmButtonText ? this.componentFactory.createButton({
|
|
69
|
+
class: "confirm-button",
|
|
70
|
+
"@click": this.handleClickConfirmButton,
|
|
71
|
+
size: "small",
|
|
72
|
+
variant: "primary",
|
|
73
|
+
mode: t,
|
|
74
|
+
children: this.confirmButtonText
|
|
75
|
+
}) : a}
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
get tooltipTemplate() {
|
|
80
|
+
return this.show ? c`
|
|
81
|
+
<div class=${u(this.arrowClasses)} @mouseout="${this.handleMouseOut}"></div>
|
|
82
|
+
<div class=${u(this.tooltipClasses)} @mouseout=${this.handleMouseOut}>
|
|
83
|
+
${this.titleText ? c`<div class="title">${this.titleText}</div>` : a}
|
|
84
|
+
${this.bodyText ? c`<div class="body">${this.bodyText}</div>` : a}
|
|
85
|
+
${this.buttonsTemplate}
|
|
86
|
+
</div>
|
|
87
|
+
` : a;
|
|
88
|
+
}
|
|
89
|
+
getTooltipWidth() {
|
|
90
|
+
const i = this.offsetLeft + this.scrollLeft + this.clientLeft, o = document.body.clientWidth - i - this.clientWidth;
|
|
91
|
+
let l;
|
|
92
|
+
return this.position === "left" ? l = i - 13 : this.position === "right" ? l = o - 13 : this.align === "center" ? l = (i < o ? i : o) * 2 + this.clientWidth : this.align === "start" ? l = document.body.clientWidth - i : this.align === "end" && (l = i + this.clientWidth), `${l - 16 - 32}px`;
|
|
93
|
+
}
|
|
94
|
+
get styleTokens() {
|
|
95
|
+
return x`
|
|
96
|
+
<style>
|
|
97
|
+
:host {
|
|
98
|
+
color-scheme: ${this.mode};
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
return c`
|
|
105
|
+
<style>
|
|
106
|
+
.tooltip {
|
|
107
|
+
max-width: ${this.getTooltipWidth()};
|
|
108
|
+
}
|
|
109
|
+
.tooltip,
|
|
110
|
+
.arrow {
|
|
111
|
+
z-index: ${this.zIndex};
|
|
112
|
+
}
|
|
113
|
+
.body {
|
|
114
|
+
max-width: ${this.bodyWidth};
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
117
|
+
${this.styleTokens}
|
|
118
|
+
<slot
|
|
119
|
+
@mouseover="${this.handleMouseOver}"
|
|
120
|
+
@mouseout="${this.handleMouseOut}"
|
|
121
|
+
@click=${this.handleClickSlot}
|
|
122
|
+
></slot>
|
|
123
|
+
|
|
124
|
+
${this.tooltipTemplate}
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
127
|
+
handleClickSlot() {
|
|
128
|
+
["xs", "s", "m"].includes(this.viewport) && (this.show = !this.show);
|
|
129
|
+
}
|
|
130
|
+
handleMouseOver() {
|
|
131
|
+
["xs", "s", "m"].includes(this.viewport) || (this.show = !0);
|
|
132
|
+
}
|
|
133
|
+
handleMouseOut() {
|
|
134
|
+
["xs", "s", "m"].includes(this.viewport) || setTimeout(() => {
|
|
135
|
+
var t, n, r, i, o;
|
|
136
|
+
!((n = (t = this.tooltip) == null ? void 0 : t.matches) != null && n.call(t, ":hover")) && !((i = (r = this.arrow) == null ? void 0 : r.matches) != null && i.call(r, ":hover")) && !((o = this == null ? void 0 : this.matches) != null && o.call(this, ":hover")) && (this.show = !1);
|
|
137
|
+
}, 150);
|
|
138
|
+
}
|
|
139
|
+
handleClickCancelButton() {
|
|
140
|
+
this.dispatchEvent(
|
|
141
|
+
new CustomEvent("click-cancel-button", {
|
|
142
|
+
bubbles: !0,
|
|
143
|
+
composed: !0
|
|
144
|
+
})
|
|
145
|
+
), this.show = !1;
|
|
146
|
+
}
|
|
147
|
+
handleClickConfirmButton() {
|
|
148
|
+
this.dispatchEvent(
|
|
149
|
+
new CustomEvent("click-confirm-button", {
|
|
150
|
+
bubbles: !0,
|
|
151
|
+
composed: !0
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
e.styles = [g, w, T];
|
|
157
|
+
s([
|
|
158
|
+
h({ type: String, reflect: !0 })
|
|
159
|
+
], e.prototype, "mode", 2);
|
|
160
|
+
s([
|
|
161
|
+
h({ type: String, attribute: "title-text" })
|
|
162
|
+
], e.prototype, "titleText", 2);
|
|
163
|
+
s([
|
|
164
|
+
h({ type: String, attribute: "body-text" })
|
|
165
|
+
], e.prototype, "bodyText", 2);
|
|
166
|
+
s([
|
|
167
|
+
h({ type: String })
|
|
168
|
+
], e.prototype, "position", 2);
|
|
169
|
+
s([
|
|
170
|
+
h({ type: String })
|
|
171
|
+
], e.prototype, "align", 2);
|
|
172
|
+
s([
|
|
173
|
+
h({ type: String, attribute: "cancel-button-text" })
|
|
174
|
+
], e.prototype, "cancelButtonText", 2);
|
|
175
|
+
s([
|
|
176
|
+
h({ type: String, attribute: "confirm-button-text" })
|
|
177
|
+
], e.prototype, "confirmButtonText", 2);
|
|
178
|
+
s([
|
|
179
|
+
h({ type: Boolean, reflect: !0, converter: b })
|
|
180
|
+
], e.prototype, "show", 2);
|
|
181
|
+
s([
|
|
182
|
+
h({ type: Number, attribute: "z-index" })
|
|
183
|
+
], e.prototype, "zIndex", 2);
|
|
184
|
+
s([
|
|
185
|
+
h({ type: String, attribute: "body-width" })
|
|
186
|
+
], e.prototype, "bodyWidth", 2);
|
|
187
|
+
s([
|
|
188
|
+
p(".tooltip")
|
|
189
|
+
], e.prototype, "tooltip", 2);
|
|
190
|
+
s([
|
|
191
|
+
p(".arrow")
|
|
192
|
+
], e.prototype, "arrow", 2);
|
|
193
|
+
e = s([
|
|
194
|
+
f("ds-tooltip")
|
|
195
|
+
], e);
|
|
196
|
+
export {
|
|
197
|
+
e as DsTooltip
|
|
198
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
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 e = t`
|
|
6
|
+
:host {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title {
|
|
12
|
+
text-align: left;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.body {
|
|
16
|
+
text-align: left;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.buttons-container {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: 1fr 1fr;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
}
|
|
24
|
+
`, p = t`
|
|
25
|
+
.tooltip {
|
|
26
|
+
width: max-content;
|
|
27
|
+
white-space: normal;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
position: absolute;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tooltip.complex {
|
|
33
|
+
padding: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tooltip.top {
|
|
37
|
+
bottom: 100%;
|
|
38
|
+
margin-bottom: 13px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tooltip.bottom {
|
|
42
|
+
top: 100%;
|
|
43
|
+
margin-top: 13px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tooltip.left {
|
|
47
|
+
right: 100%;
|
|
48
|
+
margin-right: 13px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tooltip.right {
|
|
52
|
+
left: 100%;
|
|
53
|
+
margin-left: 13px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tooltip.top.center,
|
|
57
|
+
.tooltip.bottom.center {
|
|
58
|
+
left: 50%;
|
|
59
|
+
transform: translateX(-50%);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.tooltip.left.center,
|
|
63
|
+
.tooltip.right.center {
|
|
64
|
+
top: 50%;
|
|
65
|
+
transform: translateY(-50%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tooltip.top.start,
|
|
69
|
+
.tooltip.bottom.start {
|
|
70
|
+
left: 0;
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tooltip.left.start,
|
|
75
|
+
.tooltip.right.start {
|
|
76
|
+
top: 0;
|
|
77
|
+
transform: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.tooltip.top.end,
|
|
81
|
+
.tooltip.bottom.end {
|
|
82
|
+
left: auto;
|
|
83
|
+
right: 0;
|
|
84
|
+
transform: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tooltip.left.end,
|
|
88
|
+
.tooltip.right.end {
|
|
89
|
+
top: auto;
|
|
90
|
+
bottom: 0;
|
|
91
|
+
transform: none;
|
|
92
|
+
}
|
|
93
|
+
`, a = t`
|
|
94
|
+
.arrow {
|
|
95
|
+
width: 0;
|
|
96
|
+
height: 0;
|
|
97
|
+
border-style: solid;
|
|
98
|
+
position: absolute;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.arrow.top {
|
|
102
|
+
border-width: 5px 6px 0 6px;
|
|
103
|
+
bottom: calc(100% + 9px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.arrow.bottom {
|
|
107
|
+
border-width: 0 6px 5px 6px;
|
|
108
|
+
top: calc(100% + 9px);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.arrow.left {
|
|
112
|
+
border-width: 6px 0 6px 5px;
|
|
113
|
+
right: calc(100% + 9px);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.arrow.right {
|
|
117
|
+
border-width: 6px 5px 6px 0;
|
|
118
|
+
left: calc(100% + 9px);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.arrow.top,
|
|
122
|
+
.arrow.bottom {
|
|
123
|
+
left: 50%;
|
|
124
|
+
transform: translateX(-50%);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.arrow.left,
|
|
128
|
+
.arrow.right {
|
|
129
|
+
top: 50%;
|
|
130
|
+
transform: translateY(-50%);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.arrow.top.start.not-positionable,
|
|
134
|
+
.arrow.bottom.start.not-positionable {
|
|
135
|
+
left: 6px;
|
|
136
|
+
transform: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.arrow.top.end.not-positionable,
|
|
140
|
+
.arrow.bottom.end.not-positionable {
|
|
141
|
+
left: auto;
|
|
142
|
+
right: 6px;
|
|
143
|
+
transform: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.arrow.left.start.not-positionable,
|
|
147
|
+
.arrow.right.start.not-positionable {
|
|
148
|
+
top: 6px;
|
|
149
|
+
transform: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.arrow.left.end.not-positionable,
|
|
153
|
+
.arrow.right.end.not-positionable {
|
|
154
|
+
top: auto;
|
|
155
|
+
bottom: 6px;
|
|
156
|
+
transform: none;
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
export {
|
|
160
|
+
a as arrowStyles,
|
|
161
|
+
e as commonStyles,
|
|
162
|
+
p as tooltipStyles
|
|
163
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { reactFactory as T, standardFactory as i } from "../utils/componentFactory.js";
|
|
2
|
+
function d(r, e) {
|
|
3
|
+
return function(a) {
|
|
4
|
+
var l, n, t, u;
|
|
5
|
+
if (!(a != null && a.prototype))
|
|
6
|
+
throw new TypeError("@customUiKitElement requires a class that extends HTMLElement.");
|
|
7
|
+
const c = typeof __UIKIT_TARGET__ < "u" && __UIKIT_TARGET__ === "react", s = c ? `${r}-react` : r;
|
|
8
|
+
if ((l = globalThis == null ? void 0 : globalThis.customElements) != null && l.get(s)) return;
|
|
9
|
+
let m = e != null && e.skipTagAsComponentName ? [] : [r];
|
|
10
|
+
Array.isArray(e == null ? void 0 : e.extendComponentNames) && (m = [...e.extendComponentNames, ...m]), (u = (n = globalThis == null ? void 0 : globalThis.customElements) == null ? void 0 : n.define) == null || u.call(
|
|
11
|
+
n,
|
|
12
|
+
s,
|
|
13
|
+
(t = class extends a {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.componentFactory = c ? T : i;
|
|
16
|
+
}
|
|
17
|
+
}, t.componentName = m, t)
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as customUiKitElement
|
|
23
|
+
};
|
package/dist/index.d.ts
CHANGED