@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,44 @@
|
|
|
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 e } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const o = e`
|
|
6
|
+
:host {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
label {
|
|
11
|
+
width: 100%;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
label ::slotted(input) {
|
|
19
|
+
cursor: inherit;
|
|
20
|
+
appearance: none;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
margin: 0;
|
|
23
|
+
font: inherit;
|
|
24
|
+
border-radius: 100%;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
border-style: solid;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
label ::slotted(input)::before {
|
|
32
|
+
content: '';
|
|
33
|
+
border-radius: 100%;
|
|
34
|
+
transform: scale(0);
|
|
35
|
+
transition: 200ms transform ease-in-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
label ::slotted(input:checked)::before {
|
|
39
|
+
transform: scale(1);
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
export {
|
|
43
|
+
o as commonStyles
|
|
44
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { UiKitElement as d } from "../base/UiKitElement.js";
|
|
2
|
+
import { radioGroupErrorContext as b, radioGroupErrorTextContext as m, radioGroupDisabledContext as x, radioGroupHelperTextContext as v, radioGroupSizeContext as f } from "../ds-radio-button-group/ds-radio-button-group.js";
|
|
3
|
+
import { customUiKitElement as y } from "../../decorators/customUiKitElement.js";
|
|
4
|
+
import { ContextConsumer as C } from "../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js";
|
|
5
|
+
import { booleanConverter as G } from "../../utils/booleanConverter.js";
|
|
6
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
|
+
import { nothing as c, html as h } 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 n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
|
+
import { state as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
11
|
+
import { queryAssignedElements as T } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
12
|
+
import { classMap as _ } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
13
|
+
import { commonStyles as g } from "./styles/common.styles.js";
|
|
14
|
+
var k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, i = (t, e, s, o) => {
|
|
15
|
+
for (var a = o > 1 ? void 0 : o ? A(e, s) : e, u = t.length - 1, l; u >= 0; u--)
|
|
16
|
+
(l = t[u]) && (a = (o ? l(e, s, a) : l(a)) || a);
|
|
17
|
+
return o && a && k(e, s, a), a;
|
|
18
|
+
};
|
|
19
|
+
let r = class extends d {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments), this.inputPlacement = "left", this._size = "medium", this.errorText = "", this.helperText = "", this._disabled = !1, this.handleChange = (t) => {
|
|
22
|
+
this.checkInputState(t.target);
|
|
23
|
+
}, this.handleClick = () => {
|
|
24
|
+
var t;
|
|
25
|
+
(t = this.input[0]) == null || t.click();
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback(), queueMicrotask(() => {
|
|
30
|
+
this.createContextConsumers([
|
|
31
|
+
{
|
|
32
|
+
context: b,
|
|
33
|
+
callback: (t) => {
|
|
34
|
+
this.errorGroup = t;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
context: m,
|
|
39
|
+
callback: (t) => {
|
|
40
|
+
this.errorTextGroup = t;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
context: x,
|
|
45
|
+
callback: (t) => {
|
|
46
|
+
this.disabledGroup = t;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
context: v,
|
|
51
|
+
callback: (t) => {
|
|
52
|
+
this.helperTextGroup = t;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
context: f,
|
|
57
|
+
callback: (t) => {
|
|
58
|
+
this.sizeGroup = t;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
firstUpdated(t) {
|
|
65
|
+
var s;
|
|
66
|
+
super.firstUpdated(t);
|
|
67
|
+
const e = (s = this.input) == null ? void 0 : s[0];
|
|
68
|
+
e && (e.addEventListener("change", this.handleChange), this.observeInputAttributes(), this.checkInputState(e), this.applyAriaAttributes());
|
|
69
|
+
}
|
|
70
|
+
createContextConsumers(t) {
|
|
71
|
+
t.forEach(({ context: e, callback: s }) => {
|
|
72
|
+
new C(this, {
|
|
73
|
+
context: e,
|
|
74
|
+
callback: s,
|
|
75
|
+
subscribe: !0
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
disconnectedCallback() {
|
|
80
|
+
var e;
|
|
81
|
+
super.disconnectedCallback();
|
|
82
|
+
const t = (e = this.input) == null ? void 0 : e[0];
|
|
83
|
+
t && (t.removeEventListener("change", this.handleChange), this.inputMutationObserver.disconnect());
|
|
84
|
+
}
|
|
85
|
+
checkInputState(t) {
|
|
86
|
+
this._disabled = this.disabledGroup ?? (t == null ? void 0 : t.disabled);
|
|
87
|
+
}
|
|
88
|
+
observeInputAttributes() {
|
|
89
|
+
const t = new MutationObserver(() => {
|
|
90
|
+
this.checkInputState(this.input[0]);
|
|
91
|
+
});
|
|
92
|
+
t.observe(this.input[0], {
|
|
93
|
+
attributes: !0,
|
|
94
|
+
attributeFilter: ["required", "disabled"]
|
|
95
|
+
}), this.inputMutationObserver = t;
|
|
96
|
+
}
|
|
97
|
+
updated(t) {
|
|
98
|
+
super.updated(t), (t.has("error") || t.has("errorText") || t.has("helperText")) && this.applyAriaAttributes();
|
|
99
|
+
}
|
|
100
|
+
applyAriaAttributes() {
|
|
101
|
+
var o;
|
|
102
|
+
const t = (o = this.input) == null ? void 0 : o[0];
|
|
103
|
+
if (!t) return;
|
|
104
|
+
const e = !!this.error, s = e ? this.errorText || this.errorTextGroup : this.helperText || this.helperTextGroup || null;
|
|
105
|
+
t.setAttribute("aria-disabled", this.disabled ? "true" : "false"), t.setAttribute("aria-invalid", e ? "true" : "false"), s ? t.setAttribute("aria-description", s) : t.removeAttribute("aria-description");
|
|
106
|
+
}
|
|
107
|
+
get containerClasses() {
|
|
108
|
+
return {
|
|
109
|
+
container: !0,
|
|
110
|
+
error: this.error,
|
|
111
|
+
disabled: this.disabled,
|
|
112
|
+
[this.size]: !0,
|
|
113
|
+
[this.inputPlacement]: !0
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
get error() {
|
|
117
|
+
return this._error ?? this.errorGroup;
|
|
118
|
+
}
|
|
119
|
+
get disabled() {
|
|
120
|
+
return this.disabledGroup ?? this._disabled;
|
|
121
|
+
}
|
|
122
|
+
get size() {
|
|
123
|
+
return this.sizeGroup || this._size;
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
return h`
|
|
127
|
+
<div @click=${this.handleClick} class=${_(this.containerClasses)}>
|
|
128
|
+
<span class="input-container">
|
|
129
|
+
<slot name="input"></slot>
|
|
130
|
+
</span>
|
|
131
|
+
<div class="text-container">
|
|
132
|
+
<slot name="label"></slot>
|
|
133
|
+
${!(this.error && this.errorText) && this.helperText ? h`<div class="helper-text" > ${this.helperText}</div>` : c}
|
|
134
|
+
${this.error && this.errorText ? h`<div class="error-text">${this.errorText}</div>` : c}
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
`;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
r.styles = [g];
|
|
141
|
+
i([
|
|
142
|
+
n({ type: String, attribute: "input-placement" })
|
|
143
|
+
], r.prototype, "inputPlacement", 2);
|
|
144
|
+
i([
|
|
145
|
+
n({ type: String, attribute: "size" })
|
|
146
|
+
], r.prototype, "_size", 2);
|
|
147
|
+
i([
|
|
148
|
+
n({ type: Boolean, attribute: "error", converter: G })
|
|
149
|
+
], r.prototype, "_error", 2);
|
|
150
|
+
i([
|
|
151
|
+
n({ type: String, attribute: "error-text" })
|
|
152
|
+
], r.prototype, "errorText", 2);
|
|
153
|
+
i([
|
|
154
|
+
n({ type: String, attribute: "helper-text" })
|
|
155
|
+
], r.prototype, "helperText", 2);
|
|
156
|
+
i([
|
|
157
|
+
p()
|
|
158
|
+
], r.prototype, "errorGroup", 2);
|
|
159
|
+
i([
|
|
160
|
+
p()
|
|
161
|
+
], r.prototype, "errorTextGroup", 2);
|
|
162
|
+
i([
|
|
163
|
+
p()
|
|
164
|
+
], r.prototype, "disabledGroup", 2);
|
|
165
|
+
i([
|
|
166
|
+
p()
|
|
167
|
+
], r.prototype, "helperTextGroup", 2);
|
|
168
|
+
i([
|
|
169
|
+
p()
|
|
170
|
+
], r.prototype, "sizeGroup", 2);
|
|
171
|
+
i([
|
|
172
|
+
p()
|
|
173
|
+
], r.prototype, "_disabled", 2);
|
|
174
|
+
i([
|
|
175
|
+
p()
|
|
176
|
+
], r.prototype, "inputMutationObserver", 2);
|
|
177
|
+
i([
|
|
178
|
+
T({ slot: "input", selector: "input" })
|
|
179
|
+
], r.prototype, "input", 2);
|
|
180
|
+
r = i([
|
|
181
|
+
y("ds-radio-button")
|
|
182
|
+
], r);
|
|
183
|
+
export {
|
|
184
|
+
r as DsRadioButton
|
|
185
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as t } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const n = t`
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
flex: 0 0 auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host:has(.disabled) {
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.container {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: flex-start;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
::slotted([slot='input']) {
|
|
23
|
+
cursor: inherit;
|
|
24
|
+
appearance: none;
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
margin: 0;
|
|
27
|
+
font: inherit;
|
|
28
|
+
border-radius: 100%;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
border-style: solid;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::slotted([slot='input'])::after {
|
|
36
|
+
content: '';
|
|
37
|
+
border-radius: 100%;
|
|
38
|
+
transform: scale(0);
|
|
39
|
+
transition: 200ms transform ease-in-out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
::slotted([slot='input']:checked)::after {
|
|
43
|
+
transform: scale(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
::slotted([slot='label']) {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
export {
|
|
51
|
+
n as commonStyles
|
|
52
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { UiKitElement as h } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as b } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { createContext as i } from "../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js";
|
|
4
|
+
import { provide as s } from "../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js";
|
|
5
|
+
import { booleanConverter as x } from "../../utils/booleanConverter.js";
|
|
6
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
|
+
import { nothing as c, html as u } 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 o } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
|
+
import { classMap as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
11
|
+
import { commonStyles as y } from "./styles/common.styles.js";
|
|
12
|
+
var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (m, n, a, p) => {
|
|
13
|
+
for (var r = p > 1 ? void 0 : p ? g(n, a) : n, l = m.length - 1, d; l >= 0; l--)
|
|
14
|
+
(d = m[l]) && (r = (p ? d(n, a, r) : d(r)) || r);
|
|
15
|
+
return p && r && f(n, a, r), r;
|
|
16
|
+
};
|
|
17
|
+
const S = i(Symbol("ds-radio-button-group:disabled")), T = i(Symbol("ds-radio-button-group:error")), C = i(Symbol("ds-radio-button-group:error-text")), $ = i(Symbol("ds-radio-button-group:helper-text")), G = i(Symbol("ds-radio-button-group:size"));
|
|
18
|
+
let t = class extends h {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.error = !1, this.errorText = "", this.helperText = "", this.disabled = !1, this.size = "medium", this.orientation = "vertical";
|
|
21
|
+
}
|
|
22
|
+
get classes() {
|
|
23
|
+
return {
|
|
24
|
+
container: !0,
|
|
25
|
+
error: this.error,
|
|
26
|
+
disabled: !!this.disabled,
|
|
27
|
+
[this.size]: !0,
|
|
28
|
+
[this.orientation]: !0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return u`
|
|
33
|
+
<div
|
|
34
|
+
data-testid="ds-radio-button-group-container"
|
|
35
|
+
class=${v(this.classes)}
|
|
36
|
+
.aria-invalid=${this.error}
|
|
37
|
+
>
|
|
38
|
+
<slot name="title"></slot>
|
|
39
|
+
<slot name="description"></slot>
|
|
40
|
+
<div class="radio-buttons-container">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
</div>
|
|
43
|
+
${!this.error && this.helperText ? u`<div class = 'helper-text' > ${this.helperText}</div>` : c}
|
|
44
|
+
${this.error && this.errorText ? u`<div class="error-text">${this.errorText}</div>` : c}
|
|
45
|
+
</div>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
t.styles = [y];
|
|
50
|
+
e([
|
|
51
|
+
s({ context: T }),
|
|
52
|
+
o({ type: Boolean, converter: x })
|
|
53
|
+
], t.prototype, "error", 2);
|
|
54
|
+
e([
|
|
55
|
+
s({ context: C }),
|
|
56
|
+
o({ type: String, attribute: "error-text" })
|
|
57
|
+
], t.prototype, "errorText", 2);
|
|
58
|
+
e([
|
|
59
|
+
s({ context: $ }),
|
|
60
|
+
o({ type: String, attribute: "helper-text" })
|
|
61
|
+
], t.prototype, "helperText", 2);
|
|
62
|
+
e([
|
|
63
|
+
s({ context: S }),
|
|
64
|
+
o({ type: Boolean, converter: x })
|
|
65
|
+
], t.prototype, "disabled", 2);
|
|
66
|
+
e([
|
|
67
|
+
s({ context: G }),
|
|
68
|
+
o({ type: String })
|
|
69
|
+
], t.prototype, "size", 2);
|
|
70
|
+
e([
|
|
71
|
+
o({ type: String, reflect: !0 })
|
|
72
|
+
], t.prototype, "orientation", 2);
|
|
73
|
+
t = e([
|
|
74
|
+
b("ds-radio-button-group")
|
|
75
|
+
], t);
|
|
76
|
+
export {
|
|
77
|
+
t as DsRadioButtonGroup,
|
|
78
|
+
S as radioGroupDisabledContext,
|
|
79
|
+
T as radioGroupErrorContext,
|
|
80
|
+
C as radioGroupErrorTextContext,
|
|
81
|
+
$ as radioGroupHelperTextContext,
|
|
82
|
+
G as radioGroupSizeContext
|
|
83
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container.vertical ::slotted(ds-radio-button) {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container.horizontal ::slotted(ds-radio-button) {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
vertical-align: top;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export {
|
|
24
|
+
s as commonStyles
|
|
25
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { customUiKitElement as n } from "../../decorators/customUiKitElement.js";
|
|
2
|
+
import { FormAssociatedMixin as l } from "../../mixins/FormAssociatedMixin.js";
|
|
3
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
+
import { html as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
|
+
import { LitElement as h } from "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
+
import { property as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { queryAssignedElements as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.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 { commonStyles as y } from "./ds-radio-group.styles.js";
|
|
10
|
+
var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, a = (e, t, s, i) => {
|
|
11
|
+
for (var o = i > 1 ? void 0 : i ? v(t, s) : t, m = e.length - 1, d; m >= 0; m--)
|
|
12
|
+
(d = e[m]) && (o = (i ? d(t, s, o) : d(o)) || o);
|
|
13
|
+
return i && o && g(t, s, o), o;
|
|
14
|
+
};
|
|
15
|
+
let r = class extends l(h) {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.mode = "light", this.size = "large";
|
|
18
|
+
}
|
|
19
|
+
updateRadioChecked() {
|
|
20
|
+
requestAnimationFrame(() => {
|
|
21
|
+
this.radioElements.forEach((e) => {
|
|
22
|
+
e.checked = e.value === this.value;
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
setRadioProps(e) {
|
|
27
|
+
requestAnimationFrame(() => {
|
|
28
|
+
["name", "size", "mode"].forEach((s) => {
|
|
29
|
+
e.has(s) && this.radioElements.forEach((i) => {
|
|
30
|
+
i[s] = this[s];
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
updated(e) {
|
|
36
|
+
super.updated(e), this.setRadioProps(e);
|
|
37
|
+
}
|
|
38
|
+
firstUpdated(e) {
|
|
39
|
+
super.firstUpdated(e), this.updateRadioChecked(), this.setRadioProps(e);
|
|
40
|
+
}
|
|
41
|
+
handleChangeRadio(e) {
|
|
42
|
+
var t;
|
|
43
|
+
this.value = (t = e.detail) == null ? void 0 : t.value;
|
|
44
|
+
}
|
|
45
|
+
get classes() {
|
|
46
|
+
return {
|
|
47
|
+
container: !0
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return u`
|
|
52
|
+
<fieldset class=${f(this.classes)} @change=${this.handleChangeRadio}>
|
|
53
|
+
<slot></slot>
|
|
54
|
+
</fieldset>
|
|
55
|
+
`;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
r.styles = [y];
|
|
59
|
+
a([
|
|
60
|
+
p({ type: String })
|
|
61
|
+
], r.prototype, "name", 2);
|
|
62
|
+
a([
|
|
63
|
+
p({ type: String, reflect: !0 })
|
|
64
|
+
], r.prototype, "value", 2);
|
|
65
|
+
a([
|
|
66
|
+
p({ type: String, reflect: !0 })
|
|
67
|
+
], r.prototype, "mode", 2);
|
|
68
|
+
a([
|
|
69
|
+
p({ type: String })
|
|
70
|
+
], r.prototype, "size", 2);
|
|
71
|
+
a([
|
|
72
|
+
c({ selector: "ds-radio" })
|
|
73
|
+
], r.prototype, "radioElements", 2);
|
|
74
|
+
r = a([
|
|
75
|
+
n("ds-radio-group", { skipTagAsComponentName: !0 })
|
|
76
|
+
], r);
|
|
77
|
+
export {
|
|
78
|
+
r as DsRadioGroup
|
|
79
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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 r = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.container {
|
|
14
|
+
padding: 0;
|
|
15
|
+
border: none;
|
|
16
|
+
display: contents;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
export {
|
|
20
|
+
r as commonStyles
|
|
21
|
+
};
|