@cupra/ui-kit 1.0.0-canary.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/components/base/DsUiElement.js +47 -0
- package/dist/components/base/UiKitElement.js +82 -0
- package/dist/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist/components/ds-accordion/ds-accordion.js +124 -0
- package/dist/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist/components/ds-accordion/theme-config.js +26 -0
- package/dist/components/ds-avatar/ds-avatar.js +102 -0
- package/dist/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist/components/ds-badge/ds-badge.js +53 -0
- package/dist/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/common.styles.js +9 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist/components/ds-bullets/ds-bullets.js +79 -0
- package/dist/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist/components/ds-button/ds-button.js +196 -0
- package/dist/components/ds-button/styles/common.styles.js +116 -0
- package/dist/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist/components/ds-chip/ds-chip.js +131 -0
- package/dist/components/ds-chip/styles/common.styles.js +25 -0
- package/dist/components/ds-chips/ds-chips.js +143 -0
- package/dist/components/ds-chips/styles/common.styles.js +94 -0
- package/dist/components/ds-currency/ds-currency.js +139 -0
- package/dist/components/ds-currency/styles/common.styles.js +17 -0
- package/dist/components/ds-dialog/ds-dialog.js +107 -0
- package/dist/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist/components/ds-divider/ds-divider.js +58 -0
- package/dist/components/ds-divider/styles/common.styles.js +13 -0
- package/dist/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist/components/ds-icon/ds-icon.js +105 -0
- package/dist/components/ds-icon/iconNames.d.ts +1 -1
- package/dist/components/ds-icon/iconNames.js +394 -0
- package/dist/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist/components/ds-input/ds-input.js +138 -0
- package/dist/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist/components/ds-link-button/ds-link-button.js +120 -0
- package/dist/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist/components/ds-logo/ds-logo.js +69 -0
- package/dist/components/ds-logo/styles/common.styles.js +18 -0
- package/dist/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist/components/ds-main-title/ds-main-title.js +35 -0
- package/dist/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist/components/ds-modal/ds-modal.js +215 -0
- package/dist/components/ds-modal/styles/common.styles.js +289 -0
- package/dist/components/ds-password-input/ds-password-input.js +43 -0
- package/dist/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist/components/ds-portal/ds-portal.js +41 -0
- package/dist/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist/components/ds-radio/ds-radio.js +111 -0
- package/dist/components/ds-radio/styles/common.styles.js +44 -0
- package/dist/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist/components/ds-rating/ds-rating.js +73 -0
- package/dist/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-rating/styles/common.styles.js +14 -0
- package/dist/components/ds-search/ds-search.js +210 -0
- package/dist/components/ds-search/styles/common.styles.js +61 -0
- package/dist/components/ds-search-input/ds-search-input.js +158 -0
- package/dist/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist/components/ds-select/ds-select.js +274 -0
- package/dist/components/ds-select/styles/common.styles.js +29 -0
- package/dist/components/ds-selection/ds-selection.js +57 -0
- package/dist/components/ds-selection/styles/common.styles.js +17 -0
- package/dist/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist/components/ds-slider/ds-slider.js +409 -0
- package/dist/components/ds-slider/styles/common.styles.js +61 -0
- package/dist/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist/components/ds-static-box/ds-static-box.js +77 -0
- package/dist/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist/components/ds-stepper/ds-stepper.js +57 -0
- package/dist/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist/components/ds-tabs/ds-tabs.js +203 -0
- package/dist/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist/components/ds-tabs/theme-config.js +14 -0
- package/dist/components/ds-tag/ds-tag.js +87 -0
- package/dist/components/ds-tag/styles/common.styles.js +20 -0
- package/dist/components/ds-text/ds-text.js +83 -0
- package/dist/components/ds-text/styles/common.styles.js +29 -0
- package/dist/components/ds-text-input/ds-text-input.js +100 -0
- package/dist/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist/components/ds-textarea/ds-textarea.js +87 -0
- package/dist/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist/components/ds-theme-provider/themeContext.js +5 -0
- package/dist/components/ds-toast/ds-toast.js +95 -0
- package/dist/components/ds-toast/styles/common.styles.js +112 -0
- package/dist/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/core/theme.constants.d.ts +1 -0
- package/dist/core/theme.constants.js +4 -0
- package/dist/decorators/customUiKitElement.js +23 -0
- package/dist/index.js +61 -9699
- package/dist/mixins/FormAssociatedMixin.js +14 -0
- package/dist/mixins/ViewportMixin.js +32 -0
- package/dist/mixins/inputStatesMixin.js +46 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist/styles/fonts-config.js +28 -0
- package/dist/utils/IconsManager.d.ts +1 -4
- package/dist/utils/IconsManager.js +39 -0
- package/dist/utils/PubSub.d.ts +0 -2
- package/dist/utils/PubSub.js +33 -0
- package/dist/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist/utils/arrayConverter.js +19 -0
- package/dist/utils/booleanConverter.js +4 -0
- package/dist/utils/componentFactory.js +167 -0
- package/dist/utils/cssQueries.js +16 -0
- package/dist/utils/cssWithTokens.js +11 -0
- package/dist/utils/formatNumber/formatNumber.js +54 -0
- package/dist/utils/htmlWithTokens.js +11 -0
- package/dist/utils/objectConverter.js +11 -0
- package/dist/utils/validateMaxLength.js +6 -0
- package/dist-react/components/base/DsUiElement.js +47 -0
- package/dist-react/components/base/UiKitElement.js +82 -0
- package/dist-react/components/base/ds-base-input/ds-base-input.js +112 -0
- package/dist-react/components/base/ds-base-input/styles/common.styles.js +63 -0
- package/dist-react/components/base/ds-base-input/styles/cupra.styles.js +124 -0
- package/dist-react/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
- package/dist-react/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
- package/dist-react/components/ds-accordion/ds-accordion.js +124 -0
- package/dist-react/components/ds-accordion/styles/common.styles.js +64 -0
- package/dist-react/components/ds-accordion/theme-config.js +26 -0
- package/dist-react/components/ds-avatar/ds-avatar.js +102 -0
- package/dist-react/components/ds-avatar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist-react/components/ds-badge/ds-badge.js +53 -0
- package/dist-react/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist-react/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist-react/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/common.styles.js +9 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist-react/components/ds-bullets/ds-bullets.js +79 -0
- package/dist-react/components/ds-bullets/styles/common.styles.js +26 -0
- package/dist-react/components/ds-button/ds-button.js +196 -0
- package/dist-react/components/ds-button/styles/common.styles.js +116 -0
- package/dist-react/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
- package/dist-react/components/ds-carousel-indicator/styles/common.styles.js +19 -0
- package/dist-react/components/ds-checkbox/ds-checkbox.js +142 -0
- package/dist-react/components/ds-checkbox/styles/common.styles.js +60 -0
- package/dist-react/components/ds-chip/ds-chip.js +131 -0
- package/dist-react/components/ds-chip/styles/common.styles.js +25 -0
- package/dist-react/components/ds-chips/ds-chips.js +143 -0
- package/dist-react/components/ds-chips/styles/common.styles.js +94 -0
- package/dist-react/components/ds-currency/ds-currency.js +139 -0
- package/dist-react/components/ds-currency/styles/common.styles.js +17 -0
- package/dist-react/components/ds-dialog/ds-dialog.js +107 -0
- package/dist-react/components/ds-dialog/styles/common.styles.js +82 -0
- package/dist-react/components/ds-dialog-body/ds-dialog-body.js +46 -0
- package/dist-react/components/ds-dialog-body/styles/common.styles.js +12 -0
- package/dist-react/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
- package/dist-react/components/ds-dialog-footer/styles/common.styles.js +16 -0
- package/dist-react/components/ds-dialog-header/ds-dialog-header.js +68 -0
- package/dist-react/components/ds-dialog-header/styles/common.styles.js +12 -0
- package/dist-react/components/ds-divider/ds-divider.js +58 -0
- package/dist-react/components/ds-divider/styles/common.styles.js +13 -0
- package/dist-react/components/ds-hyperlink/ds-hyperlink.js +93 -0
- package/dist-react/components/ds-hyperlink/styles/common.styles.js +22 -0
- package/dist-react/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist-react/components/ds-icon/ds-icon.js +105 -0
- package/dist-react/components/ds-icon/iconNames.d.ts +1 -1
- package/dist-react/components/ds-icon/iconNames.js +394 -0
- package/dist-react/components/ds-icon-button/ds-icon-button.js +138 -0
- package/dist-react/components/ds-icon-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-input/ds-input.js +138 -0
- package/dist-react/components/ds-interactive-card/ds-interactive-card.js +90 -0
- package/dist-react/components/ds-interactive-card/styles/common.styles.js +12 -0
- package/dist-react/components/ds-link-button/ds-link-button.js +120 -0
- package/dist-react/components/ds-link-button/styles/common.styles.js +24 -0
- package/dist-react/components/ds-loader-bar/ds-loader-bar.js +23 -0
- package/dist-react/components/ds-loader-bar/styles/common.styles.js +23 -0
- package/dist-react/components/ds-loader-dots/ds-loader-dots.js +62 -0
- package/dist-react/components/ds-loader-dots/styles/common.styles.js +35 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.js +65 -0
- package/dist-react/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
- package/dist-react/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
- package/dist-react/components/ds-loader-spinner/styles/common.styles.js +56 -0
- package/dist-react/components/ds-logo/ds-logo.js +69 -0
- package/dist-react/components/ds-logo/styles/common.styles.js +18 -0
- package/dist-react/components/ds-main-title/ds-main-title.d.ts +10 -0
- package/dist-react/components/ds-main-title/ds-main-title.js +35 -0
- package/dist-react/components/ds-main-title/ds-main-title.test.d.ts +7 -0
- package/dist-react/components/ds-main-title/ds-main-title.types.d.ts +2 -0
- package/dist-react/components/ds-main-title/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-main-title/styles/common.styles.js +19 -0
- package/dist-react/components/ds-map-pin/ds-map-pin.js +116 -0
- package/dist-react/components/ds-map-pin/styles/common.styles.js +43 -0
- package/dist-react/components/ds-modal/ds-modal.js +215 -0
- package/dist-react/components/ds-modal/styles/common.styles.js +289 -0
- package/dist-react/components/ds-password-input/ds-password-input.js +43 -0
- package/dist-react/components/ds-picker-item/ds-picker-item.js +89 -0
- package/dist-react/components/ds-picker-item/styles/common.styles.js +12 -0
- package/dist-react/components/ds-portal/ds-portal.js +41 -0
- package/dist-react/components/ds-progress-bar/ds-progress-bar.js +34 -0
- package/dist-react/components/ds-progress-bar/styles/common.styles.js +12 -0
- package/dist-react/components/ds-radio/ds-radio.js +111 -0
- package/dist-react/components/ds-radio/styles/common.styles.js +44 -0
- package/dist-react/components/ds-radio-button/ds-radio-button.js +185 -0
- package/dist-react/components/ds-radio-button/styles/common.styles.js +52 -0
- package/dist-react/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
- package/dist-react/components/ds-radio-button-group/styles/common.styles.js +25 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.js +79 -0
- package/dist-react/components/ds-radio-group/ds-radio-group.styles.js +21 -0
- package/dist-react/components/ds-rating/ds-rating.d.ts +14 -0
- package/dist-react/components/ds-rating/ds-rating.js +73 -0
- package/dist-react/components/ds-rating/ds-rating.test.d.ts +8 -0
- package/dist-react/components/ds-rating/ds-rating.types.d.ts +6 -0
- package/dist-react/components/ds-rating/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-rating/styles/common.styles.js +14 -0
- package/dist-react/components/ds-search/ds-search.js +210 -0
- package/dist-react/components/ds-search/styles/common.styles.js +61 -0
- package/dist-react/components/ds-search-input/ds-search-input.js +158 -0
- package/dist-react/components/ds-search-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
- package/dist-react/components/ds-secondary-navigation/styles/common.styles.js +12 -0
- package/dist-react/components/ds-segmented-control/ds-segmented-control.js +71 -0
- package/dist-react/components/ds-segmented-control/styles/common.styles.js +56 -0
- package/dist-react/components/ds-select/controllers/SelectKeyboardController.js +33 -0
- package/dist-react/components/ds-select/ds-select.js +274 -0
- package/dist-react/components/ds-select/styles/common.styles.js +29 -0
- package/dist-react/components/ds-selection/ds-selection.js +57 -0
- package/dist-react/components/ds-selection/styles/common.styles.js +17 -0
- package/dist-react/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
- package/dist-react/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
- package/dist-react/components/ds-slider/ds-slider.js +409 -0
- package/dist-react/components/ds-slider/styles/common.styles.js +61 -0
- package/dist-react/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
- package/dist-react/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
- package/dist-react/components/ds-static-box/ds-static-box.js +77 -0
- package/dist-react/components/ds-static-box/styles/common.styles.js +12 -0
- package/dist-react/components/ds-stepper/ds-stepper.js +57 -0
- package/dist-react/components/ds-stepper/styles/common.styles.js +12 -0
- package/dist-react/components/ds-tabs/ds-tabs.js +203 -0
- package/dist-react/components/ds-tabs/styles/common.styles.js +97 -0
- package/dist-react/components/ds-tabs/theme-config.js +14 -0
- package/dist-react/components/ds-tag/ds-tag.js +87 -0
- package/dist-react/components/ds-tag/styles/common.styles.js +20 -0
- package/dist-react/components/ds-text/ds-text.js +83 -0
- package/dist-react/components/ds-text/styles/common.styles.js +29 -0
- package/dist-react/components/ds-text-input/ds-text-input.js +100 -0
- package/dist-react/components/ds-text-input/styles/common.styles.js +12 -0
- package/dist-react/components/ds-textarea/ds-textarea.js +87 -0
- package/dist-react/components/ds-textarea/styles/common.styles.js +12 -0
- package/dist-react/components/ds-theme-provider/ds-theme-provider.js +90 -0
- package/dist-react/components/ds-theme-provider/themeContext.js +5 -0
- package/dist-react/components/ds-toast/ds-toast.js +95 -0
- package/dist-react/components/ds-toast/styles/common.styles.js +112 -0
- package/dist-react/components/ds-toast/utils/ToastManager.js +48 -0
- package/dist-react/components/ds-toast-message/ds-toast-message.js +103 -0
- package/dist-react/components/ds-toast-message/styles/common.styles.js +12 -0
- package/dist-react/components/ds-toggle-button/ds-toggle-button.js +73 -0
- package/dist-react/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
- package/dist-react/components/ds-toggle-switch/styles/common.styles.js +47 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.d.ts +38 -23
- package/dist-react/components/ds-tooltip/ds-tooltip.js +234 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.test.d.ts +8 -0
- package/dist-react/components/ds-tooltip/ds-tooltip.types.d.ts +5 -10
- package/dist-react/components/ds-tooltip/styles/common.styles.d.ts +0 -2
- package/dist-react/components/ds-tooltip/styles/common.styles.js +130 -0
- package/dist-react/components/index.d.ts +4 -1
- package/dist-react/core/theme.constants.d.ts +1 -0
- package/dist-react/core/theme.constants.js +4 -0
- package/dist-react/decorators/customUiKitElement.js +23 -0
- package/dist-react/index.js +61 -9623
- package/dist-react/mixins/FormAssociatedMixin.js +14 -0
- package/dist-react/mixins/ViewportMixin.js +32 -0
- package/dist-react/mixins/inputStatesMixin.js +46 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +430 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist-react/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
- package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
- package/dist-react/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
- package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
- package/dist-react/styles/fonts-config.js +28 -0
- package/dist-react/utils/IconsManager.d.ts +1 -4
- package/dist-react/utils/IconsManager.js +39 -0
- package/dist-react/utils/PubSub.d.ts +0 -2
- package/dist-react/utils/PubSub.js +33 -0
- package/dist-react/utils/StylesRegistry/StylesRegistry.js +32 -0
- package/dist-react/utils/arrayConverter.js +19 -0
- package/dist-react/utils/booleanConverter.js +4 -0
- package/dist-react/utils/componentFactory.js +90 -0
- package/dist-react/utils/cssQueries.js +16 -0
- package/dist-react/utils/cssWithTokens.js +11 -0
- package/dist-react/utils/formatNumber/formatNumber.js +54 -0
- package/dist-react/utils/htmlWithTokens.js +11 -0
- package/dist-react/utils/objectConverter.js +11 -0
- package/dist-react/utils/validateMaxLength.js +6 -0
- package/package.json +12 -6
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const i = (e) => {
|
|
2
|
+
const n = class n extends e {
|
|
3
|
+
constructor(...s) {
|
|
4
|
+
var r;
|
|
5
|
+
super(s), this._internals = (r = this.attachInternals) == null ? void 0 : r.call(this);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
n.formAssociated = !0;
|
|
9
|
+
let t = n;
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
i as FormAssociatedMixin
|
|
14
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { breakpoints as n } from "../utils/breakpoints.js";
|
|
2
|
+
import { debounce as o } from "../utils/debounce.js";
|
|
3
|
+
const c = (i) => class extends i {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this.handleResize = () => {
|
|
6
|
+
this.updateViewportWithDebounce();
|
|
7
|
+
}, this.updateViewport = () => {
|
|
8
|
+
let e = "xs";
|
|
9
|
+
const r = ["xxl", "xl", "l", "m", "s"];
|
|
10
|
+
for (const t of r)
|
|
11
|
+
if ((window == null ? void 0 : window.innerWidth) >= n[t]) {
|
|
12
|
+
e = t;
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
e !== this.currentViewport && (this.currentViewport = e, this.requestUpdate("viewport", null));
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback(), this.updateViewportWithDebounce = o({
|
|
20
|
+
func: this.updateViewport
|
|
21
|
+
}), this.updateViewport(), window == null || window.addEventListener("resize", this.handleResize);
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
super.disconnectedCallback(), window == null || window.removeEventListener("resize", this.handleResize);
|
|
25
|
+
}
|
|
26
|
+
get viewport() {
|
|
27
|
+
return this.currentViewport;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
c as ViewportMixin
|
|
32
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const o = (u) => class extends u {
|
|
2
|
+
constructor() {
|
|
3
|
+
super(...arguments), this.inputStates = {
|
|
4
|
+
currentValue: "",
|
|
5
|
+
focus: !1,
|
|
6
|
+
focusVisible: !1,
|
|
7
|
+
invalid: !1,
|
|
8
|
+
filled: !1,
|
|
9
|
+
disabled: !1
|
|
10
|
+
}, this.keyboardMode = !1, this._updateStates = () => {
|
|
11
|
+
var t, e, s, i, n;
|
|
12
|
+
this.inputStates.currentValue = (t = this.nativeInput) == null ? void 0 : t.value, this.inputStates.invalid = !((e = this.nativeInput) != null && e.validity.valid), this.inputStates.focus = document.activeElement === this.nativeInput, this.inputStates.disabled = (s = this.nativeInput) == null ? void 0 : s.disabled, this.inputStates.filled = ((n = (i = this.nativeInput) == null ? void 0 : i.value) == null ? void 0 : n.length) > 0, this.requestUpdate();
|
|
13
|
+
}, this._handleKeydown = () => {
|
|
14
|
+
this.keyboardMode = !0;
|
|
15
|
+
}, this._handleMousedown = () => {
|
|
16
|
+
this.keyboardMode = !1;
|
|
17
|
+
}, this._handlePointerdown = () => {
|
|
18
|
+
this.keyboardMode = !1;
|
|
19
|
+
}, this._handleFocusIn = (t) => {
|
|
20
|
+
t.target === this.nativeInput && (this.inputStates.focus = !0, this.inputStates.focusVisible = !!this.keyboardMode, this.requestUpdate());
|
|
21
|
+
}, this._handleFocusOut = () => {
|
|
22
|
+
this.inputStates.focus = !1, this.inputStates.focusVisible = !1, this.requestUpdate();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
onInputReady(t) {
|
|
26
|
+
}
|
|
27
|
+
firstUpdated(t) {
|
|
28
|
+
super.firstUpdated(t), window == null || window.addEventListener("keydown", this._handleKeydown), window == null || window.addEventListener("mousedown", this._handleMousedown), window == null || window.addEventListener("pointerdown", this._handlePointerdown);
|
|
29
|
+
const e = () => {
|
|
30
|
+
var i, n, a;
|
|
31
|
+
const s = this.querySelector("input") || this.querySelector("textarea") || ((i = this.shadowRoot) == null ? void 0 : i.querySelector("input")) || ((n = this.shadowRoot) == null ? void 0 : n.querySelector("textarea"));
|
|
32
|
+
s && (this.nativeInput = s, this._setupInputObservers(), this.onInputReady(s), (a = this.hostMutationObserver) == null || a.disconnect());
|
|
33
|
+
};
|
|
34
|
+
e(), this.hostMutationObserver = new MutationObserver(e), this.hostMutationObserver.observe(this, { childList: !0, subtree: !0, attributes: !0 });
|
|
35
|
+
}
|
|
36
|
+
_setupInputObservers() {
|
|
37
|
+
this.nativeInput.addEventListener("input", this._updateStates), this.nativeInput.addEventListener("focusin", this._handleFocusIn), this.nativeInput.addEventListener("focusout", this._handleFocusOut), this.inputMutationObserver = new MutationObserver(this._updateStates), this.inputMutationObserver.observe(this.nativeInput, { attributes: !0 }), this._updateStates();
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
var t, e;
|
|
41
|
+
super.disconnectedCallback(), window == null || window.removeEventListener("keydown", this._handleKeydown), window == null || window.removeEventListener("mousedown", this._handleMousedown), window == null || window.removeEventListener("pointerdown", this._handlePointerdown), (t = this.hostMutationObserver) == null || t.disconnect(), (e = this.inputMutationObserver) == null || e.disconnect(), this.nativeInput && (this.nativeInput.removeEventListener("input", this._updateStates), this.nativeInput.removeEventListener("focusin", this._handleFocusIn), this.nativeInput.removeEventListener("focusout", this._handleFocusOut));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
o as inputStatesMixin
|
|
46
|
+
};
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { evaluate as H, getSide as B, getSideAxis as $, getOppositePlacement as N, getExpandedPlacements as Q, getOppositeAxisPlacements as U, getAlignmentSides as Z, clamp as _, getPaddingObject as q, getAlignmentAxis as G, getAlignment as Y, min as W, max as j, rectToClientRect as X, getOppositeAxis as tt, getAxisLength as J } from "../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
2
|
+
function I(a, e, d) {
|
|
3
|
+
let {
|
|
4
|
+
reference: o,
|
|
5
|
+
floating: f
|
|
6
|
+
} = a;
|
|
7
|
+
const n = $(e), c = G(e), r = J(c), g = B(e), x = n === "y", i = o.x + o.width / 2 - f.width / 2, s = o.y + o.height / 2 - f.height / 2, m = o[r] / 2 - f[r] / 2;
|
|
8
|
+
let t;
|
|
9
|
+
switch (g) {
|
|
10
|
+
case "top":
|
|
11
|
+
t = {
|
|
12
|
+
x: i,
|
|
13
|
+
y: o.y - f.height
|
|
14
|
+
};
|
|
15
|
+
break;
|
|
16
|
+
case "bottom":
|
|
17
|
+
t = {
|
|
18
|
+
x: i,
|
|
19
|
+
y: o.y + o.height
|
|
20
|
+
};
|
|
21
|
+
break;
|
|
22
|
+
case "right":
|
|
23
|
+
t = {
|
|
24
|
+
x: o.x + o.width,
|
|
25
|
+
y: s
|
|
26
|
+
};
|
|
27
|
+
break;
|
|
28
|
+
case "left":
|
|
29
|
+
t = {
|
|
30
|
+
x: o.x - f.width,
|
|
31
|
+
y: s
|
|
32
|
+
};
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
t = {
|
|
36
|
+
x: o.x,
|
|
37
|
+
y: o.y
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
switch (Y(e)) {
|
|
41
|
+
case "start":
|
|
42
|
+
t[c] -= m * (d && x ? -1 : 1);
|
|
43
|
+
break;
|
|
44
|
+
case "end":
|
|
45
|
+
t[c] += m * (d && x ? -1 : 1);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
}
|
|
50
|
+
const ot = async (a, e, d) => {
|
|
51
|
+
const {
|
|
52
|
+
placement: o = "bottom",
|
|
53
|
+
strategy: f = "absolute",
|
|
54
|
+
middleware: n = [],
|
|
55
|
+
platform: c
|
|
56
|
+
} = d, r = n.filter(Boolean), g = await (c.isRTL == null ? void 0 : c.isRTL(e));
|
|
57
|
+
let x = await c.getElementRects({
|
|
58
|
+
reference: a,
|
|
59
|
+
floating: e,
|
|
60
|
+
strategy: f
|
|
61
|
+
}), {
|
|
62
|
+
x: i,
|
|
63
|
+
y: s
|
|
64
|
+
} = I(x, o, g), m = o, t = {}, l = 0;
|
|
65
|
+
for (let u = 0; u < r.length; u++) {
|
|
66
|
+
const {
|
|
67
|
+
name: w,
|
|
68
|
+
fn: p
|
|
69
|
+
} = r[u], {
|
|
70
|
+
x: h,
|
|
71
|
+
y,
|
|
72
|
+
data: b,
|
|
73
|
+
reset: v
|
|
74
|
+
} = await p({
|
|
75
|
+
x: i,
|
|
76
|
+
y: s,
|
|
77
|
+
initialPlacement: o,
|
|
78
|
+
placement: m,
|
|
79
|
+
strategy: f,
|
|
80
|
+
middlewareData: t,
|
|
81
|
+
rects: x,
|
|
82
|
+
platform: c,
|
|
83
|
+
elements: {
|
|
84
|
+
reference: a,
|
|
85
|
+
floating: e
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
i = h ?? i, s = y ?? s, t = {
|
|
89
|
+
...t,
|
|
90
|
+
[w]: {
|
|
91
|
+
...t[w],
|
|
92
|
+
...b
|
|
93
|
+
}
|
|
94
|
+
}, v && l <= 50 && (l++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (x = v.rects === !0 ? await c.getElementRects({
|
|
95
|
+
reference: a,
|
|
96
|
+
floating: e,
|
|
97
|
+
strategy: f
|
|
98
|
+
}) : v.rects), {
|
|
99
|
+
x: i,
|
|
100
|
+
y: s
|
|
101
|
+
} = I(x, m, g)), u = -1);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
x: i,
|
|
105
|
+
y: s,
|
|
106
|
+
placement: m,
|
|
107
|
+
strategy: f,
|
|
108
|
+
middlewareData: t
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
async function z(a, e) {
|
|
112
|
+
var d;
|
|
113
|
+
e === void 0 && (e = {});
|
|
114
|
+
const {
|
|
115
|
+
x: o,
|
|
116
|
+
y: f,
|
|
117
|
+
platform: n,
|
|
118
|
+
rects: c,
|
|
119
|
+
elements: r,
|
|
120
|
+
strategy: g
|
|
121
|
+
} = a, {
|
|
122
|
+
boundary: x = "clippingAncestors",
|
|
123
|
+
rootBoundary: i = "viewport",
|
|
124
|
+
elementContext: s = "floating",
|
|
125
|
+
altBoundary: m = !1,
|
|
126
|
+
padding: t = 0
|
|
127
|
+
} = H(e, a), l = q(t), w = r[m ? s === "floating" ? "reference" : "floating" : s], p = X(await n.getClippingRect({
|
|
128
|
+
element: (d = await (n.isElement == null ? void 0 : n.isElement(w))) == null || d ? w : w.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(r.floating)),
|
|
129
|
+
boundary: x,
|
|
130
|
+
rootBoundary: i,
|
|
131
|
+
strategy: g
|
|
132
|
+
})), h = s === "floating" ? {
|
|
133
|
+
x: o,
|
|
134
|
+
y: f,
|
|
135
|
+
width: c.floating.width,
|
|
136
|
+
height: c.floating.height
|
|
137
|
+
} : c.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(r.floating)), b = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
|
|
138
|
+
x: 1,
|
|
139
|
+
y: 1
|
|
140
|
+
} : {
|
|
141
|
+
x: 1,
|
|
142
|
+
y: 1
|
|
143
|
+
}, v = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
144
|
+
elements: r,
|
|
145
|
+
rect: h,
|
|
146
|
+
offsetParent: y,
|
|
147
|
+
strategy: g
|
|
148
|
+
}) : h);
|
|
149
|
+
return {
|
|
150
|
+
top: (p.top - v.top + l.top) / b.y,
|
|
151
|
+
bottom: (v.bottom - p.bottom + l.bottom) / b.y,
|
|
152
|
+
left: (p.left - v.left + l.left) / b.x,
|
|
153
|
+
right: (v.right - p.right + l.right) / b.x
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const st = (a) => ({
|
|
157
|
+
name: "arrow",
|
|
158
|
+
options: a,
|
|
159
|
+
async fn(e) {
|
|
160
|
+
const {
|
|
161
|
+
x: d,
|
|
162
|
+
y: o,
|
|
163
|
+
placement: f,
|
|
164
|
+
rects: n,
|
|
165
|
+
platform: c,
|
|
166
|
+
elements: r,
|
|
167
|
+
middlewareData: g
|
|
168
|
+
} = e, {
|
|
169
|
+
element: x,
|
|
170
|
+
padding: i = 0
|
|
171
|
+
} = H(a, e) || {};
|
|
172
|
+
if (x == null)
|
|
173
|
+
return {};
|
|
174
|
+
const s = q(i), m = {
|
|
175
|
+
x: d,
|
|
176
|
+
y: o
|
|
177
|
+
}, t = G(f), l = J(t), u = await c.getDimensions(x), w = t === "y", p = w ? "top" : "left", h = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = n.reference[l] + n.reference[t] - m[t] - n.floating[l], v = m[t] - n.reference[t], T = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(x));
|
|
178
|
+
let O = T ? T[y] : 0;
|
|
179
|
+
(!O || !await (c.isElement == null ? void 0 : c.isElement(T))) && (O = r.floating[y] || n.floating[l]);
|
|
180
|
+
const k = b / 2 - v / 2, S = O / 2 - u[l] / 2 - 1, P = W(s[p], S), L = W(s[h], S), C = P, M = O - u[l] - L, A = O / 2 - u[l] / 2 + k, F = _(C, A, M), E = !g.arrow && Y(f) != null && A !== F && n.reference[l] / 2 - (A < C ? P : L) - u[l] / 2 < 0, R = E ? A < C ? A - C : A - M : 0;
|
|
181
|
+
return {
|
|
182
|
+
[t]: m[t] + R,
|
|
183
|
+
data: {
|
|
184
|
+
[t]: F,
|
|
185
|
+
centerOffset: A - F - R,
|
|
186
|
+
...E && {
|
|
187
|
+
alignmentOffset: R
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
reset: E
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}), at = function(a) {
|
|
194
|
+
return a === void 0 && (a = {}), {
|
|
195
|
+
name: "flip",
|
|
196
|
+
options: a,
|
|
197
|
+
async fn(e) {
|
|
198
|
+
var d, o;
|
|
199
|
+
const {
|
|
200
|
+
placement: f,
|
|
201
|
+
middlewareData: n,
|
|
202
|
+
rects: c,
|
|
203
|
+
initialPlacement: r,
|
|
204
|
+
platform: g,
|
|
205
|
+
elements: x
|
|
206
|
+
} = e, {
|
|
207
|
+
mainAxis: i = !0,
|
|
208
|
+
crossAxis: s = !0,
|
|
209
|
+
fallbackPlacements: m,
|
|
210
|
+
fallbackStrategy: t = "bestFit",
|
|
211
|
+
fallbackAxisSideDirection: l = "none",
|
|
212
|
+
flipAlignment: u = !0,
|
|
213
|
+
...w
|
|
214
|
+
} = H(a, e);
|
|
215
|
+
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
|
+
return {};
|
|
217
|
+
const p = B(f), h = $(r), y = B(r) === r, b = await (g.isRTL == null ? void 0 : g.isRTL(x.floating)), v = m || (y || !u ? [N(r)] : Q(r)), T = l !== "none";
|
|
218
|
+
!m && T && v.push(...U(r, u, l, b));
|
|
219
|
+
const O = [r, ...v], k = await z(e, w), S = [];
|
|
220
|
+
let P = ((o = n.flip) == null ? void 0 : o.overflows) || [];
|
|
221
|
+
if (i && S.push(k[p]), s) {
|
|
222
|
+
const A = Z(f, c, b);
|
|
223
|
+
S.push(k[A[0]], k[A[1]]);
|
|
224
|
+
}
|
|
225
|
+
if (P = [...P, {
|
|
226
|
+
placement: f,
|
|
227
|
+
overflows: S
|
|
228
|
+
}], !S.every((A) => A <= 0)) {
|
|
229
|
+
var L, C;
|
|
230
|
+
const A = (((L = n.flip) == null ? void 0 : L.index) || 0) + 1, F = O[A];
|
|
231
|
+
if (F && (!(s === "alignment" ? h !== $(F) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
|
+
// overflows the main axis.
|
|
233
|
+
P.every((D) => $(D.placement) === h ? D.overflows[0] > 0 : !0)))
|
|
234
|
+
return {
|
|
235
|
+
data: {
|
|
236
|
+
index: A,
|
|
237
|
+
overflows: P
|
|
238
|
+
},
|
|
239
|
+
reset: {
|
|
240
|
+
placement: F
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
let E = (C = P.filter((R) => R.overflows[0] <= 0).sort((R, D) => R.overflows[1] - D.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
244
|
+
if (!E)
|
|
245
|
+
switch (t) {
|
|
246
|
+
case "bestFit": {
|
|
247
|
+
var M;
|
|
248
|
+
const R = (M = P.filter((D) => {
|
|
249
|
+
if (T) {
|
|
250
|
+
const V = $(D.placement);
|
|
251
|
+
return V === h || // Create a bias to the `y` side axis due to horizontal
|
|
252
|
+
// reading directions favoring greater width.
|
|
253
|
+
V === "y";
|
|
254
|
+
}
|
|
255
|
+
return !0;
|
|
256
|
+
}).map((D) => [D.placement, D.overflows.filter((V) => V > 0).reduce((V, K) => V + K, 0)]).sort((D, V) => D[1] - V[1])[0]) == null ? void 0 : M[0];
|
|
257
|
+
R && (E = R);
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case "initialPlacement":
|
|
261
|
+
E = r;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
if (f !== E)
|
|
265
|
+
return {
|
|
266
|
+
reset: {
|
|
267
|
+
placement: E
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
return {};
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}, et = /* @__PURE__ */ new Set(["left", "top"]);
|
|
275
|
+
async function nt(a, e) {
|
|
276
|
+
const {
|
|
277
|
+
placement: d,
|
|
278
|
+
platform: o,
|
|
279
|
+
elements: f
|
|
280
|
+
} = a, n = await (o.isRTL == null ? void 0 : o.isRTL(f.floating)), c = B(d), r = Y(d), g = $(d) === "y", x = et.has(c) ? -1 : 1, i = n && g ? -1 : 1, s = H(e, a);
|
|
281
|
+
let {
|
|
282
|
+
mainAxis: m,
|
|
283
|
+
crossAxis: t,
|
|
284
|
+
alignmentAxis: l
|
|
285
|
+
} = typeof s == "number" ? {
|
|
286
|
+
mainAxis: s,
|
|
287
|
+
crossAxis: 0,
|
|
288
|
+
alignmentAxis: null
|
|
289
|
+
} : {
|
|
290
|
+
mainAxis: s.mainAxis || 0,
|
|
291
|
+
crossAxis: s.crossAxis || 0,
|
|
292
|
+
alignmentAxis: s.alignmentAxis
|
|
293
|
+
};
|
|
294
|
+
return r && typeof l == "number" && (t = r === "end" ? l * -1 : l), g ? {
|
|
295
|
+
x: t * i,
|
|
296
|
+
y: m * x
|
|
297
|
+
} : {
|
|
298
|
+
x: m * x,
|
|
299
|
+
y: t * i
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
const lt = function(a) {
|
|
303
|
+
return a === void 0 && (a = 0), {
|
|
304
|
+
name: "offset",
|
|
305
|
+
options: a,
|
|
306
|
+
async fn(e) {
|
|
307
|
+
var d, o;
|
|
308
|
+
const {
|
|
309
|
+
x: f,
|
|
310
|
+
y: n,
|
|
311
|
+
placement: c,
|
|
312
|
+
middlewareData: r
|
|
313
|
+
} = e, g = await nt(e, a);
|
|
314
|
+
return c === ((d = r.offset) == null ? void 0 : d.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
|
|
315
|
+
x: f + g.x,
|
|
316
|
+
y: n + g.y,
|
|
317
|
+
data: {
|
|
318
|
+
...g,
|
|
319
|
+
placement: c
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
}, ct = function(a) {
|
|
325
|
+
return a === void 0 && (a = {}), {
|
|
326
|
+
name: "shift",
|
|
327
|
+
options: a,
|
|
328
|
+
async fn(e) {
|
|
329
|
+
const {
|
|
330
|
+
x: d,
|
|
331
|
+
y: o,
|
|
332
|
+
placement: f
|
|
333
|
+
} = e, {
|
|
334
|
+
mainAxis: n = !0,
|
|
335
|
+
crossAxis: c = !1,
|
|
336
|
+
limiter: r = {
|
|
337
|
+
fn: (w) => {
|
|
338
|
+
let {
|
|
339
|
+
x: p,
|
|
340
|
+
y: h
|
|
341
|
+
} = w;
|
|
342
|
+
return {
|
|
343
|
+
x: p,
|
|
344
|
+
y: h
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
...g
|
|
349
|
+
} = H(a, e), x = {
|
|
350
|
+
x: d,
|
|
351
|
+
y: o
|
|
352
|
+
}, i = await z(e, g), s = $(B(f)), m = tt(s);
|
|
353
|
+
let t = x[m], l = x[s];
|
|
354
|
+
if (n) {
|
|
355
|
+
const w = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", h = t + i[w], y = t - i[p];
|
|
356
|
+
t = _(h, t, y);
|
|
357
|
+
}
|
|
358
|
+
if (c) {
|
|
359
|
+
const w = s === "y" ? "top" : "left", p = s === "y" ? "bottom" : "right", h = l + i[w], y = l - i[p];
|
|
360
|
+
l = _(h, l, y);
|
|
361
|
+
}
|
|
362
|
+
const u = r.fn({
|
|
363
|
+
...e,
|
|
364
|
+
[m]: t,
|
|
365
|
+
[s]: l
|
|
366
|
+
});
|
|
367
|
+
return {
|
|
368
|
+
...u,
|
|
369
|
+
data: {
|
|
370
|
+
x: u.x - d,
|
|
371
|
+
y: u.y - o,
|
|
372
|
+
enabled: {
|
|
373
|
+
[m]: n,
|
|
374
|
+
[s]: c
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
}, rt = function(a) {
|
|
381
|
+
return a === void 0 && (a = {}), {
|
|
382
|
+
name: "size",
|
|
383
|
+
options: a,
|
|
384
|
+
async fn(e) {
|
|
385
|
+
var d, o;
|
|
386
|
+
const {
|
|
387
|
+
placement: f,
|
|
388
|
+
rects: n,
|
|
389
|
+
platform: c,
|
|
390
|
+
elements: r
|
|
391
|
+
} = e, {
|
|
392
|
+
apply: g = () => {
|
|
393
|
+
},
|
|
394
|
+
...x
|
|
395
|
+
} = H(a, e), i = await z(e, x), s = B(f), m = Y(f), t = $(f) === "y", {
|
|
396
|
+
width: l,
|
|
397
|
+
height: u
|
|
398
|
+
} = n.floating;
|
|
399
|
+
let w, p;
|
|
400
|
+
s === "top" || s === "bottom" ? (w = s, p = m === (await (c.isRTL == null ? void 0 : c.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (p = s, w = m === "end" ? "top" : "bottom");
|
|
401
|
+
const h = u - i.top - i.bottom, y = l - i.left - i.right, b = W(u - i[w], h), v = W(l - i[p], y), T = !e.middlewareData.shift;
|
|
402
|
+
let O = b, k = v;
|
|
403
|
+
if ((d = e.middlewareData.shift) != null && d.enabled.x && (k = y), (o = e.middlewareData.shift) != null && o.enabled.y && (O = h), T && !m) {
|
|
404
|
+
const P = j(i.left, 0), L = j(i.right, 0), C = j(i.top, 0), M = j(i.bottom, 0);
|
|
405
|
+
t ? k = l - 2 * (P !== 0 || L !== 0 ? P + L : j(i.left, i.right)) : O = u - 2 * (C !== 0 || M !== 0 ? C + M : j(i.top, i.bottom));
|
|
406
|
+
}
|
|
407
|
+
await g({
|
|
408
|
+
...e,
|
|
409
|
+
availableWidth: k,
|
|
410
|
+
availableHeight: O
|
|
411
|
+
});
|
|
412
|
+
const S = await c.getDimensions(r.floating);
|
|
413
|
+
return l !== S.width || u !== S.height ? {
|
|
414
|
+
reset: {
|
|
415
|
+
rects: !0
|
|
416
|
+
}
|
|
417
|
+
} : {};
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
export {
|
|
422
|
+
st as arrow,
|
|
423
|
+
ot as computePosition,
|
|
424
|
+
z as detectOverflow,
|
|
425
|
+
at as flip,
|
|
426
|
+
lt as offset,
|
|
427
|
+
X as rectToClientRect,
|
|
428
|
+
ct as shift,
|
|
429
|
+
rt as size
|
|
430
|
+
};
|