@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,16 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const s = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
export {
|
|
15
|
+
s as commonStyles
|
|
16
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { UiKitElement as c } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as p } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { htmlWithTokens as h } from "../../utils/htmlWithTokens.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { nothing as d, html as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { classMap as y } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
9
|
+
import { commonStyles as f } from "./styles/common.styles.js";
|
|
10
|
+
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, s = (m, i, o, r) => {
|
|
11
|
+
for (var t = r > 1 ? void 0 : r ? g(i, o) : i, n = m.length - 1, a; n >= 0; n--)
|
|
12
|
+
(a = m[n]) && (t = (r ? a(i, o, t) : a(t)) || t);
|
|
13
|
+
return r && t && v(i, o, t), t;
|
|
14
|
+
};
|
|
15
|
+
let e = class extends c {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.title = "primary", this.iconSize = 32;
|
|
18
|
+
}
|
|
19
|
+
get classes() {
|
|
20
|
+
return {
|
|
21
|
+
container: !0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
get styleTokens() {
|
|
25
|
+
return h`
|
|
26
|
+
<style>
|
|
27
|
+
:host{
|
|
28
|
+
grid-area: header;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
get iconTemplate() {
|
|
34
|
+
return this.iconName ? this.componentFactory.createIcon({
|
|
35
|
+
class: "icon",
|
|
36
|
+
"icon-name": this.iconName,
|
|
37
|
+
size: this.iconSize
|
|
38
|
+
}) : d;
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return u`
|
|
42
|
+
${this.styleTokens}
|
|
43
|
+
<div data-testid="ds-dialog-header-container" class=${y(this.classes)}>
|
|
44
|
+
<div class="title-container">
|
|
45
|
+
${this.iconTemplate}
|
|
46
|
+
<div class="title">${this.title}</div>
|
|
47
|
+
</div>
|
|
48
|
+
<slot name="subtitle"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
e.styles = [f];
|
|
54
|
+
s([
|
|
55
|
+
l({ type: String })
|
|
56
|
+
], e.prototype, "title", 2);
|
|
57
|
+
s([
|
|
58
|
+
l({ type: String, attribute: "icon-name" })
|
|
59
|
+
], e.prototype, "iconName", 2);
|
|
60
|
+
s([
|
|
61
|
+
l({ type: Number, attribute: "icon-size" })
|
|
62
|
+
], e.prototype, "iconSize", 2);
|
|
63
|
+
e = s([
|
|
64
|
+
p("ds-dialog-header")
|
|
65
|
+
], e);
|
|
66
|
+
export {
|
|
67
|
+
e as DsDialogHeader
|
|
68
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const p = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export {
|
|
11
|
+
p as commonStyles
|
|
12
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UiKitElement as l } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as h } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { htmlWithTokens as y } from "../../utils/htmlWithTokens.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { html as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as m } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
9
|
+
import { orientationStyles as v } from "./styles/common.styles.js";
|
|
10
|
+
var d = Object.defineProperty, u = Object.getOwnPropertyDescriptor, o = (p, e, s, i) => {
|
|
11
|
+
for (var t = i > 1 ? void 0 : i ? u(e, s) : e, n = p.length - 1, a; n >= 0; n--)
|
|
12
|
+
(a = p[n]) && (t = (i ? a(e, s, t) : a(t)) || t);
|
|
13
|
+
return i && t && d(e, s, t), t;
|
|
14
|
+
};
|
|
15
|
+
let r = class extends l {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.orientation = "horizontal", this.variant = "primary", this.mode = "light";
|
|
18
|
+
}
|
|
19
|
+
get classes() {
|
|
20
|
+
return {
|
|
21
|
+
divider: !0,
|
|
22
|
+
[this.orientation]: !!this.orientation,
|
|
23
|
+
[this.variant]: !!this.variant,
|
|
24
|
+
[this.mode]: !!this.mode
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
get styleTokens() {
|
|
28
|
+
return y`
|
|
29
|
+
<style>
|
|
30
|
+
:host{
|
|
31
|
+
color-scheme: ${this.mode};
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return c`
|
|
38
|
+
${this.styleTokens}
|
|
39
|
+
<hr aria-orientation=${this.orientation} class=${f(this.classes)} />
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
r.styles = [v];
|
|
44
|
+
o([
|
|
45
|
+
m({ type: String })
|
|
46
|
+
], r.prototype, "orientation", 2);
|
|
47
|
+
o([
|
|
48
|
+
m({ type: String })
|
|
49
|
+
], r.prototype, "variant", 2);
|
|
50
|
+
o([
|
|
51
|
+
m({ type: String, reflect: !0 })
|
|
52
|
+
], r.prototype, "mode", 2);
|
|
53
|
+
r = o([
|
|
54
|
+
h("ds-divider")
|
|
55
|
+
], r);
|
|
56
|
+
export {
|
|
57
|
+
r as DsDivider
|
|
58
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const m = o`
|
|
6
|
+
.divider {
|
|
7
|
+
border: none;
|
|
8
|
+
margin: 0;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
export {
|
|
12
|
+
m as orientationStyles
|
|
13
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { UiKitElement as c } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as f } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { htmlWithTokens as y } from "../../utils/htmlWithTokens.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { html as a } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as s } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { choose as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js";
|
|
9
|
+
import { classMap as n } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { commonStyles as g } from "./styles/common.styles.js";
|
|
11
|
+
var $ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (o, i, p, l) => {
|
|
12
|
+
for (var e = l > 1 ? void 0 : l ? d(i, p) : i, m = o.length - 1, h; m >= 0; m--)
|
|
13
|
+
(h = o[m]) && (e = (l ? h(i, p, e) : h(e)) || e);
|
|
14
|
+
return l && e && $(i, p, e), e;
|
|
15
|
+
};
|
|
16
|
+
let t = class extends c {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.htmlTagName = "a", this.mode = "light", this.size = "large";
|
|
19
|
+
}
|
|
20
|
+
handleClick(o) {
|
|
21
|
+
this.href || o.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
get styleTokens() {
|
|
24
|
+
return y`
|
|
25
|
+
<style>
|
|
26
|
+
:host {
|
|
27
|
+
color-scheme: ${this.mode};
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
get classes() {
|
|
33
|
+
return {
|
|
34
|
+
hyperlink: !0,
|
|
35
|
+
[this.size]: !!this.size,
|
|
36
|
+
[this.mode]: !!this.mode
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return a`
|
|
41
|
+
${this.styleTokens}
|
|
42
|
+
${u(this.htmlTagName || "a", [
|
|
43
|
+
[
|
|
44
|
+
"button",
|
|
45
|
+
() => a`
|
|
46
|
+
<button class=${n(this.classes)}>
|
|
47
|
+
<slot></slot>
|
|
48
|
+
</button>
|
|
49
|
+
`
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
"a",
|
|
53
|
+
() => a`
|
|
54
|
+
<a
|
|
55
|
+
class=${n(this.classes)}
|
|
56
|
+
href=${this.href}
|
|
57
|
+
rel=${this.rel}
|
|
58
|
+
target=${this.target}
|
|
59
|
+
@click=${this.handleClick}
|
|
60
|
+
>
|
|
61
|
+
<slot></slot>
|
|
62
|
+
</a>
|
|
63
|
+
`
|
|
64
|
+
]
|
|
65
|
+
])}
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
t.styles = [g];
|
|
70
|
+
r([
|
|
71
|
+
s({ type: String, attribute: "html-tag-name" })
|
|
72
|
+
], t.prototype, "htmlTagName", 2);
|
|
73
|
+
r([
|
|
74
|
+
s({ type: String, reflect: !0 })
|
|
75
|
+
], t.prototype, "href", 2);
|
|
76
|
+
r([
|
|
77
|
+
s({ type: String, reflect: !0 })
|
|
78
|
+
], t.prototype, "rel", 2);
|
|
79
|
+
r([
|
|
80
|
+
s({ type: String, reflect: !0 })
|
|
81
|
+
], t.prototype, "target", 2);
|
|
82
|
+
r([
|
|
83
|
+
s({ type: String, reflect: !0 })
|
|
84
|
+
], t.prototype, "mode", 2);
|
|
85
|
+
r([
|
|
86
|
+
s({ type: String })
|
|
87
|
+
], t.prototype, "size", 2);
|
|
88
|
+
t = r([
|
|
89
|
+
f("ds-hyperlink")
|
|
90
|
+
], t);
|
|
91
|
+
export {
|
|
92
|
+
t as DsHyperlinkButton
|
|
93
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const e = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.hyperlink {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: inline-block;
|
|
13
|
+
text-align: center;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
padding: 0;
|
|
17
|
+
background: transparent;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
export {
|
|
21
|
+
e as commonStyles
|
|
22
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { UiKitElement as f } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as u } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { iconsManager as g } from "../../utils/IconsManager.js";
|
|
4
|
+
import { pubSub as y } from "../../utils/PubSub.js";
|
|
5
|
+
import { htmlWithTokens as _ } from "../../utils/htmlWithTokens.js";
|
|
6
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
|
+
import { html as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
8
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
9
|
+
import { property as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
|
+
import { state as w } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
11
|
+
import { unsafeHTML as b } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
12
|
+
import { css as $ } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
13
|
+
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, d = (t) => {
|
|
14
|
+
throw TypeError(t);
|
|
15
|
+
}, n = (t, i, e, r) => {
|
|
16
|
+
for (var s = r > 1 ? void 0 : r ? x(i, e) : i, h = t.length - 1, p; h >= 0; h--)
|
|
17
|
+
(p = t[h]) && (s = (r ? p(i, e, s) : p(s)) || s);
|
|
18
|
+
return r && s && k(i, e, s), s;
|
|
19
|
+
}, v = (t, i, e) => i.has(t) || d("Cannot " + e), m = (t, i, e) => (v(t, i, "read from private field"), i.get(t)), H = (t, i, e) => i.has(t) ? d("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), D = (t, i, e, r) => (v(t, i, "write to private field"), i.set(t, e), e), a;
|
|
20
|
+
let o = class extends f {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(), this.iconHtml = "", H(this, a), this.getIcon = async () => {
|
|
23
|
+
var i, e, r;
|
|
24
|
+
(i = m(this, a)) == null || i.abort(), D(this, a, new AbortController());
|
|
25
|
+
const t = m(this, a).signal;
|
|
26
|
+
this.iconHtml = await ((r = (e = g).fetchIcon) == null ? void 0 : r.call(e, this.iconName, { signal: t }));
|
|
27
|
+
}, y.subscribe("theme", this.getIcon);
|
|
28
|
+
}
|
|
29
|
+
async updated(t) {
|
|
30
|
+
super.updated(t), (t.has("iconName") || !this.iconHtml) && await this.getIcon();
|
|
31
|
+
}
|
|
32
|
+
getDimension(t, i, e) {
|
|
33
|
+
return t ? `${t}px` : i ? "auto" : this.size ? `${this.size}px` : e;
|
|
34
|
+
}
|
|
35
|
+
get styleTokens() {
|
|
36
|
+
const t = this.getDimension(
|
|
37
|
+
this.width,
|
|
38
|
+
this.height,
|
|
39
|
+
"var(--private-ds-icon-width, var(--ds-icon-width, 20px))"
|
|
40
|
+
), i = this.getDimension(
|
|
41
|
+
this.height,
|
|
42
|
+
this.width,
|
|
43
|
+
"var(--private-ds-icon-height, var(--ds-icon-height, 20px))"
|
|
44
|
+
);
|
|
45
|
+
return _`
|
|
46
|
+
<style>
|
|
47
|
+
.ds-icon {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
width: ${t};
|
|
50
|
+
height: ${i};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ds-icon-color {
|
|
54
|
+
fill: ${this.color ? this.color : "var(--private-ds-icon-color, var(--ds-icon-color, black))"};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ds-icon-color-stroke {
|
|
58
|
+
stroke: ${this.color ? this.color : "var(--private-ds-icon-color, var(--ds-icon-color, black))"};
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return l`
|
|
65
|
+
${this.styleTokens}
|
|
66
|
+
${this.iconHtml ? b(this.iconHtml) : l`<svg class="ds-icon"></svg>`}
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
a = /* @__PURE__ */ new WeakMap();
|
|
71
|
+
o.styles = $`
|
|
72
|
+
:host {
|
|
73
|
+
line-height: 0;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
n([
|
|
78
|
+
c({ type: String, attribute: "icon-name" })
|
|
79
|
+
], o.prototype, "iconName", 2);
|
|
80
|
+
n([
|
|
81
|
+
c({ type: String, attribute: "color" })
|
|
82
|
+
], o.prototype, "color", 2);
|
|
83
|
+
n([
|
|
84
|
+
c({ type: Number })
|
|
85
|
+
], o.prototype, "width", 2);
|
|
86
|
+
n([
|
|
87
|
+
c({ type: Number })
|
|
88
|
+
], o.prototype, "height", 2);
|
|
89
|
+
n([
|
|
90
|
+
c({ type: Number, attribute: "size" })
|
|
91
|
+
], o.prototype, "size", 2);
|
|
92
|
+
n([
|
|
93
|
+
w()
|
|
94
|
+
], o.prototype, "iconHtml", 2);
|
|
95
|
+
o = n([
|
|
96
|
+
u("ds-icon")
|
|
97
|
+
], o);
|
|
98
|
+
export {
|
|
99
|
+
o as DsIcon
|
|
100
|
+
};
|