wabtec-internal-volt-basic-components 1.2.0 → 1.4.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/dist/assets/scripts/figma-props-vds.json +191 -0
- package/dist/assets/scripts/figma-tokens-to-css.js +278 -0
- package/dist/cjs/attribute-sync-BjXJ3Bpx.js +118 -0
- package/dist/cjs/{base-group-header-BBa6o7j-.js → base-group-header-T64Yqp-w.js} +2 -5
- package/dist/cjs/{base-item-z-efWd2M.js → base-item-DbRYZi9C.js} +34 -7
- package/dist/cjs/clone-attributes-DOqpVwDK.js +21 -0
- package/dist/cjs/{combine-classes-Cs05zl1M.js → combine-classes-BWEYe4UE.js} +6 -3
- package/dist/{esm/floating-engine-utils-ClEAm9Wn.js → cjs/floating-engine-utils-BYIoxOr2.js} +344 -300
- package/dist/cjs/form-Yf-Cfxkl.js +59 -0
- package/dist/cjs/icon-attr.utils-B0fSRoC6.js +0 -3
- package/dist/cjs/icon-utils-3UYxf58h.js +163 -0
- package/dist/cjs/{index-CwXszEUj.js → index-BVTk936l.js} +289 -232
- package/dist/cjs/index.cjs.js +142 -5
- package/dist/cjs/{vds-basic-dropdown.utils-B8SPgJv4.js → keyboard-navigation-DffeaRPP.js} +187 -19
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/{node-utils-BZh70EVv.js → node-utils-C8-XBEJe.js} +12 -4
- package/dist/cjs/number-utils-CR47_3vx.js +12 -0
- package/dist/cjs/slider.utils-FbBdFloW.js +218 -0
- package/dist/cjs/utils-DhCTTpab.js +92 -0
- package/dist/cjs/vds-autocomplete-item.cjs.entry.js +98 -17
- package/dist/cjs/vds-avatar_2.cjs.entry.js +113 -14
- package/dist/cjs/vds-badge-pill.cjs.entry.js +52 -18
- package/dist/cjs/vds-badge-pill.utils-DDjHf_ZH.js +0 -3
- package/dist/cjs/vds-basic-accordion.cjs.entry.js +71 -33
- package/dist/cjs/vds-basic-autocomplete.cjs.entry.js +560 -87
- package/dist/cjs/vds-basic-combo-box.cjs.entry.js +90 -36
- package/dist/cjs/{vds-basic-dropdown_23.cjs.entry.js → vds-basic-dropdown_24.cjs.entry.js} +2399 -597
- package/dist/cjs/vds-basic-input.utils-Ui8YYkvJ.js +140 -0
- package/dist/cjs/vds-basic-slider-range-continuous.cjs.entry.js +193 -137
- package/dist/cjs/vds-breadcrumbs-item.cjs.entry.js +18 -7
- package/dist/cjs/vds-chip.cjs.entry.js +71 -47
- package/dist/cjs/vds-dialog-action-footer.cjs.entry.js +16 -10
- package/dist/cjs/vds-dialog-body.cjs.entry.js +7 -4
- package/dist/cjs/vds-dialog-header.cjs.entry.js +12 -5
- package/dist/cjs/vds-dialog-modal.cjs.entry.js +7 -4
- package/dist/cjs/vds-dialog.cjs.entry.js +73 -32
- package/dist/cjs/vds-display.cjs.entry.js +208 -0
- package/dist/cjs/vds-footer.cjs.entry.js +85 -11
- package/dist/cjs/vds-header.cjs.entry.js +79 -24
- package/dist/cjs/vds-icon-button.utils-BhiIMLsS.js +0 -3
- package/dist/cjs/vds-key-value-pair.cjs.entry.js +22 -7
- package/dist/cjs/vds-notification.cjs.entry.js +69 -10
- package/dist/cjs/vds-popover.cjs.entry.js +92 -20
- package/dist/cjs/vds-progress-linear.cjs.entry.js +44 -27
- package/dist/cjs/vds-radio-button.cjs.entry.js +71 -36
- package/dist/cjs/vds-segmented-button.cjs.entry.js +53 -11
- package/dist/cjs/vds-sheet.cjs.entry.js +89 -14
- package/dist/cjs/vds-sidenav-item-app.cjs.entry.js +18 -6
- package/dist/cjs/vds-sidenav-item-button.cjs.entry.js +42 -8
- package/dist/cjs/vds-sidenav-item-category.cjs.entry.js +53 -9
- package/dist/cjs/vds-sidenav-item-input.cjs.entry.js +85 -40
- package/dist/cjs/vds-skeleton-loading.cjs.entry.js +28 -8
- package/dist/cjs/vds-stepper-item-header.cjs.entry.js +16 -5
- package/dist/cjs/vds-stepper-item.cjs.entry.js +81 -20
- package/dist/cjs/vds-switch.cjs.entry.js +60 -25
- package/dist/cjs/vds-tab.cjs.entry.js +99 -18
- package/dist/cjs/vds-tabs-group.cjs.entry.js +133 -24
- package/dist/cjs/vds-tooltip.cjs.entry.js +186 -23
- package/dist/cjs/vds-topbar.cjs.entry.js +27 -0
- package/dist/cjs/vds-upload-drag.cjs.entry.js +56 -7
- package/dist/cjs/volt-basic-components.cjs.js +3 -6
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/accordion/vds-basic-accordion.css +20 -18
- package/dist/collection/components/accordion/vds-basic-accordion.js +170 -51
- package/dist/collection/components/accordion/vds-basic-accordion.stories.js +0 -1
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.css +39 -16
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.js +1138 -151
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.stories.js +71 -5
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.utils.js +0 -1
- package/dist/collection/components/autocomplete-item/vds-autocomplete-item.css +25 -15
- package/dist/collection/components/autocomplete-item/vds-autocomplete-item.js +393 -43
- package/dist/collection/components/autocomplete-item/vds-autocomplete-item.stories.js +2 -1
- package/dist/collection/components/avatar/vds-avatar.css +16 -15
- package/dist/collection/components/avatar/vds-avatar.js +118 -10
- package/dist/collection/components/avatar/vds-avatar.stories.js +0 -1
- package/dist/collection/components/badge-dot/vds-badge-dot.css +16 -11
- package/dist/collection/components/badge-dot/vds-badge-dot.js +91 -19
- package/dist/collection/components/badge-dot/vds-badge-dot.stories.js +0 -1
- package/dist/collection/components/badge-pill/vds-badge-pill.css +31 -18
- package/dist/collection/components/badge-pill/vds-badge-pill.js +140 -36
- package/dist/collection/components/badge-pill/vds-badge-pill.stories.js +39 -15
- package/dist/collection/components/badge-pill/vds-badge-pill.utils.js +0 -1
- package/dist/collection/components/base-group-header/base-group-header.js +0 -1
- package/dist/collection/components/base-item/base-item.js +66 -3
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.css +23 -19
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.js +661 -124
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.stories.js +261 -6
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.utils.js +32 -17
- package/dist/collection/components/breadcrumb-item/vds-breadcrumbs-item.css +16 -11
- package/dist/collection/components/breadcrumb-item/vds-breadcrumbs-item.js +36 -8
- package/dist/collection/components/breadcrumb-item/vds-breadcrumbs-item.stories.js +0 -1
- package/dist/collection/components/button/vds-button.css +167 -87
- package/dist/collection/components/button/vds-button.js +260 -16
- package/dist/collection/components/button/vds-button.stories.js +338 -60
- package/dist/collection/components/card/vds-card.css +19 -11
- package/dist/collection/components/card/vds-card.js +418 -45
- package/dist/collection/components/card/vds-card.stories.js +0 -1
- package/dist/collection/components/checkbox/vds-checkbox.css +16 -11
- package/dist/collection/components/checkbox/vds-checkbox.js +158 -53
- package/dist/collection/components/checkbox/vds-checkbox.stories.js +0 -1
- package/dist/collection/components/checkbox/vds-checkbox.utils.js +0 -1
- package/dist/collection/components/chip/vds-chip.css +52 -25
- package/dist/collection/components/chip/vds-chip.js +403 -69
- package/dist/collection/components/chip/vds-chip.stories.js +62 -1
- package/dist/collection/components/dialog/vds-dialog.css +24 -14
- package/dist/collection/components/dialog/vds-dialog.js +159 -45
- package/dist/collection/components/dialog/vds-dialog.stories.js +4 -3
- package/dist/collection/components/dialog-action-footer/vds-dialog-action-footer.css +16 -11
- package/dist/collection/components/dialog-action-footer/vds-dialog-action-footer.js +27 -10
- package/dist/collection/components/dialog-action-footer/vds-dialog-action-footer.stories.js +0 -1
- package/dist/collection/components/dialog-body/vds-dialog-body.css +16 -12
- package/dist/collection/components/dialog-body/vds-dialog-body.js +10 -2
- package/dist/collection/components/dialog-body/vds-dialog-body.stories.js +0 -1
- package/dist/collection/components/dialog-header/vds-dialog-header.css +16 -11
- package/dist/collection/components/dialog-header/vds-dialog-header.js +30 -6
- package/dist/collection/components/dialog-header/vds-dialog-header.stories.js +0 -1
- package/dist/collection/components/dialog-modal/vds-dialog-modal.css +16 -11
- package/dist/collection/components/dialog-modal/vds-dialog-modal.js +13 -2
- package/dist/collection/components/dialog-modal/vds-dialog-modal.stories.js +0 -1
- package/dist/collection/components/display/vds-display.css +1027 -0
- package/dist/collection/components/display/vds-display.js +304 -0
- package/dist/collection/components/display/vds-display.stories.js +192 -0
- package/dist/collection/components/divider/vds-divider.css +16 -11
- package/dist/collection/components/divider/vds-divider.js +75 -17
- package/dist/collection/components/divider/vds-divider.stories.js +0 -1
- package/dist/collection/components/drawer/vds-drawer.css +24 -18
- package/dist/collection/components/drawer/vds-drawer.js +627 -37
- package/dist/collection/components/drawer/vds-drawer.stories.js +0 -1
- package/dist/collection/components/dropdown-group-header/vds-dropdown-group-header.css +16 -15
- package/dist/collection/components/dropdown-group-header/vds-dropdown-group-header.js +24 -5
- package/dist/collection/components/dropdown-group-header/vds-dropdown-group-header.stories.js +0 -1
- package/dist/collection/components/dropdown-item/vds-basic-dropdown-item.stories.js +40 -1
- package/dist/collection/components/dropdown-item/vds-dropdown-item-clicked-event.js +0 -1
- package/dist/collection/components/dropdown-item/vds-dropdown-item.css +25 -15
- package/dist/collection/components/dropdown-item/vds-dropdown-item.js +280 -42
- package/dist/collection/components/dropdown-multiselect/vds-basic-dropdown-multiselect.css +23 -15
- package/dist/collection/components/dropdown-multiselect/vds-basic-dropdown-multiselect.js +532 -110
- package/dist/collection/components/dropdown-multiselect/vds-basic-dropdown-multiselect.stories.js +16 -5
- package/dist/collection/components/field/vds-field.css +18 -15
- package/dist/collection/components/field/vds-field.js +177 -19
- package/dist/collection/components/field/vds-field.stories.js +68 -1
- package/dist/collection/components/footer/vds-footer.css +16 -15
- package/dist/collection/components/footer/vds-footer.js +174 -17
- package/dist/collection/components/footer/vds-footer.stories.js +0 -1
- package/dist/collection/components/header/utils/utils.js +0 -1
- package/dist/collection/components/header/vds-header.css +42 -29
- package/dist/collection/components/header/vds-header.js +169 -41
- package/dist/collection/components/header/vds-header.stories.js +71 -4
- package/dist/collection/components/icon/utils/icons-list.js +1 -2
- package/dist/collection/components/icon/vds-icon.css +16 -15
- package/dist/collection/components/icon/vds-icon.js +246 -16
- package/dist/collection/components/icon/vds-icon.stories.js +0 -1
- package/dist/collection/components/icon-button/vds-icon-button.css +19 -14
- package/dist/collection/components/icon-button/vds-icon-button.js +93 -15
- package/dist/collection/components/icon-button/vds-icon-button.stories.js +0 -1
- package/dist/collection/components/icon-button/vds-icon-button.utils.js +0 -1
- package/dist/collection/components/input/vds-basic-input.css +27 -18
- package/dist/collection/components/input/vds-basic-input.js +309 -80
- package/dist/collection/components/input/vds-basic-input.stories.js +0 -1
- package/dist/collection/components/input/vds-basic-input.utils.js +15 -5
- package/dist/collection/components/key-value-pair/vds-key-value-pair.css +16 -11
- package/dist/collection/components/key-value-pair/vds-key-value-pair.js +113 -17
- package/dist/collection/components/key-value-pair/vds-key-value-pair.stories.js +0 -1
- package/dist/collection/components/label/vds-label.css +22 -16
- package/dist/collection/components/label/vds-label.js +108 -15
- package/dist/collection/components/label/vds-label.stories.js +0 -1
- package/dist/collection/components/link/vds-link.css +16 -15
- package/dist/collection/components/link/vds-link.js +188 -32
- package/dist/collection/components/link/vds-link.stories.js +0 -1
- package/dist/collection/components/menu/vds-menu.css +30 -12
- package/dist/collection/components/menu/vds-menu.js +374 -52
- package/dist/collection/components/menu/vds-menu.stories.js +1 -2
- package/dist/collection/components/menu-group-header/vds-menu-group-header.css +16 -15
- package/dist/collection/components/menu-group-header/vds-menu-group-header.js +54 -6
- package/dist/collection/components/menu-group-header/vds-menu-group-header.stories.js +0 -1
- package/dist/collection/components/menu-item/vds-menu-item.css +25 -15
- package/dist/collection/components/menu-item/vds-menu-item.js +307 -33
- package/dist/collection/components/menu-item/vds-menu-item.stories.js +0 -1
- package/dist/collection/components/menu-list/vds-menu-list.css +16 -11
- package/dist/collection/components/menu-list/vds-menu-list.js +61 -2
- package/dist/collection/components/notification/vds-notification-utils.js +0 -1
- package/dist/collection/components/notification/vds-notification.css +16 -11
- package/dist/collection/components/notification/vds-notification.js +213 -20
- package/dist/collection/components/notification/vds-notification.stories.js +0 -1
- package/dist/collection/components/popover/utils/utils.js +0 -1
- package/dist/collection/components/popover/vds-popover.css +16 -12
- package/dist/collection/components/popover/vds-popover.js +269 -36
- package/dist/collection/components/popover/vds-popover.stories.js +1 -2
- package/dist/collection/components/progress-circular/vds-progress-circular.css +16 -11
- package/dist/collection/components/progress-circular/vds-progress-circular.js +299 -35
- package/dist/collection/components/progress-circular/vds-progress-circular.stories.js +0 -1
- package/dist/collection/components/progress-linear/vds-progress-linear.css +16 -11
- package/dist/collection/components/progress-linear/vds-progress-linear.js +126 -32
- package/dist/collection/components/progress-linear/vds-progress-linear.stories.js +0 -1
- package/dist/collection/components/radio-button/vds-radio-button.css +16 -11
- package/dist/collection/components/radio-button/vds-radio-button.js +210 -47
- package/dist/collection/components/radio-button/vds-radio-button.stories.js +0 -1
- package/dist/collection/components/radio-button/vds-radio-button.utils.js +0 -1
- package/dist/collection/components/segmented-button/vds-segmented-button.css +39 -17
- package/dist/collection/components/segmented-button/vds-segmented-button.js +214 -16
- package/dist/collection/components/segmented-button/vds-segmented-button.stories.js +18 -9
- package/dist/collection/components/sheet/vds-sheet.css +24 -16
- package/dist/collection/components/sheet/vds-sheet.js +229 -17
- package/dist/collection/components/sheet/vds-sheet.stories.js +0 -1
- package/dist/collection/components/sidenav-item/vds-sidenav-item.css +78 -25
- package/dist/collection/components/sidenav-item/vds-sidenav-item.js +290 -32
- package/dist/collection/components/sidenav-item/vds-sidenav-item.stories.js +25 -3
- package/dist/collection/components/sidenav-item-app/vds-sidenav-item-app.css +16 -15
- package/dist/collection/components/sidenav-item-app/vds-sidenav-item-app.js +146 -11
- package/dist/collection/components/sidenav-item-app/vds-sidenav-item-app.stories.js +0 -1
- package/dist/collection/components/sidenav-item-button/vds-sidenav-item-button.css +16 -15
- package/dist/collection/components/sidenav-item-button/vds-sidenav-item-button.js +168 -14
- package/dist/collection/components/sidenav-item-button/vds-sidenav-item-button.stories.js +0 -1
- package/dist/collection/components/sidenav-item-category/vds-sidenav-item-category.css +16 -15
- package/dist/collection/components/sidenav-item-category/vds-sidenav-item-category.js +174 -10
- package/dist/collection/components/sidenav-item-category/vds-sidenav-item-category.stories.js +0 -1
- package/dist/collection/components/sidenav-item-input/vds-sidenav-item-input.css +16 -11
- package/dist/collection/components/sidenav-item-input/vds-sidenav-item-input.js +263 -55
- package/dist/collection/components/sidenav-item-input/vds-sidenav-item-input.stories.js +0 -1
- package/dist/collection/components/skeleton-loading/vds-skeleton-loading.css +16 -11
- package/dist/collection/components/skeleton-loading/vds-skeleton-loading.js +140 -8
- package/dist/collection/components/skeleton-loading/vds-skeleton-loading.stories.js +0 -1
- package/dist/collection/components/slider-continuous/vds-basic-slider-continuous.css +95 -24
- package/dist/collection/components/slider-continuous/vds-basic-slider-continuous.js +449 -112
- package/dist/collection/components/slider-continuous/vds-basic-slider-continuous.stories.js +47 -1
- package/dist/collection/components/slider-range-continuous/vds-basic-slider-range-continuous.css +138 -66
- package/dist/collection/components/slider-range-continuous/vds-basic-slider-range-continuous.js +498 -161
- package/dist/collection/components/slider-range-continuous/vds-basic-slider-range-continuous.stories.js +49 -1
- package/dist/collection/components/stepper-item/vds-stepper-item.css +16 -11
- package/dist/collection/components/stepper-item/vds-stepper-item.js +276 -28
- package/dist/collection/components/stepper-item/vds-stepper-item.stories.js +0 -1
- package/dist/collection/components/stepper-item-header/vds-stepper-item-header.css +16 -11
- package/dist/collection/components/stepper-item-header/vds-stepper-item-header.js +167 -7
- package/dist/collection/components/stepper-item-header/vds-stepper-item-header.stories.js +0 -1
- package/dist/collection/components/switch/vds-switch.css +16 -11
- package/dist/collection/components/switch/vds-switch.js +218 -31
- package/dist/collection/components/switch/vds-switch.stories.js +0 -1
- package/dist/collection/components/tab/vds-tab.css +22 -16
- package/dist/collection/components/tab/vds-tab.js +294 -30
- package/dist/collection/components/tab/vds-tab.stories.js +0 -1
- package/dist/collection/components/tabs-group/vds-tabs-group.css +19 -11
- package/dist/collection/components/tabs-group/vds-tabs-group.js +366 -37
- package/dist/collection/components/tabs-group/vds-tabs-group.stories.js +79 -13
- package/dist/collection/components/textarea/vds-basic-textarea.css +16 -15
- package/dist/collection/components/textarea/vds-basic-textarea.js +409 -94
- package/dist/collection/components/textarea/vds-basic-textarea.stories.js +0 -1
- package/dist/collection/components/tooltip/vds-tooltip.css +16 -16
- package/dist/collection/components/tooltip/vds-tooltip.js +602 -42
- package/dist/collection/components/tooltip/vds-tooltip.stories.js +1 -2
- package/dist/collection/components/topbar/vds-topbar.css +961 -0
- package/dist/collection/components/topbar/vds-topbar.js +251 -0
- package/dist/collection/components/topbar/vds-topbar.stories.js +375 -0
- package/dist/collection/components/upload-drag/vds-upload-drag.css +16 -11
- package/dist/collection/components/upload-drag/vds-upload-drag.js +330 -17
- package/dist/collection/components/upload-drag/vds-upload-drag.stories.js +0 -1
- package/dist/collection/components/upload-item/vds-upload-item.css +25 -15
- package/dist/collection/components/upload-item/vds-upload-item.js +366 -23
- package/dist/collection/components/vds-basic-combo-box/vds-basic-combo-box.css +16 -15
- package/dist/collection/components/vds-basic-combo-box/vds-basic-combo-box.js +425 -63
- package/dist/collection/components/vds-basic-combo-box/vds-basic-combo-box.stories.js +0 -1
- package/dist/collection/components.js +1 -0
- package/dist/collection/constants/color-vars.js +1 -2
- package/dist/collection/constants/icon-sprite.js +1 -2
- package/dist/collection/constants/shadow-vars.js +0 -1
- package/dist/collection/constants/spacing-vars.js +1 -1
- package/dist/collection/constants/thickness-vars.js +0 -1
- package/dist/collection/constants/typography-vars.js +0 -1
- package/dist/collection/definitions/colors.js +0 -1
- package/dist/collection/definitions/shadows.js +0 -1
- package/dist/collection/definitions/spacing.js +0 -1
- package/dist/collection/definitions/thickness.js +0 -1
- package/dist/collection/definitions/typography.js +0 -1
- package/dist/collection/index.js +24 -2
- package/dist/collection/scripts/sass-export.js +469 -0
- package/dist/collection/scripts/sass-to-json-script.js +2 -2
- package/dist/collection/scripts/svg-adaptation.js +40 -13
- package/dist/collection/utils/array-utils.js +0 -1
- package/dist/collection/utils/attribute-sync.js +114 -0
- package/dist/collection/utils/clone-attributes.js +8 -1
- package/dist/collection/utils/combine-classes.js +6 -1
- package/dist/collection/utils/device-detection.js +36 -0
- package/dist/collection/utils/floating-engine-utils.js +89 -92
- package/dist/collection/utils/floating-engine.js +2 -3
- package/dist/collection/utils/form.js +27 -6
- package/dist/collection/utils/get-deep-active-element.js +7 -0
- package/dist/collection/utils/get-random-id.js +3 -0
- package/dist/collection/utils/icon-attr.utils.js +0 -1
- package/dist/collection/utils/icon-generation.utils.js +0 -1
- package/dist/collection/utils/icon-utils.js +0 -1
- package/dist/collection/utils/is-key-event.js +3 -0
- package/dist/collection/utils/is-of-type.js +1 -0
- package/dist/collection/utils/keyboard-navigation.js +143 -0
- package/dist/collection/utils/node-utils.js +10 -1
- package/dist/collection/utils/number-utils.js +0 -1
- package/dist/collection/utils/parentHasClass.js +6 -0
- package/dist/collection/utils/rems-to-px.js +4 -0
- package/dist/collection/utils/slider.utils.js +172 -27
- package/dist/collection/utils/spacing-utils.js +0 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/components/array-utils.js +1 -0
- package/dist/components/attribute-sync.js +1 -0
- package/dist/components/base-group-header.js +1 -19
- package/dist/components/base-item.js +1 -111
- package/dist/components/clone-attributes.js +1 -13
- package/dist/components/combine-classes.js +1 -6
- package/dist/components/floating-engine-utils.js +1 -1828
- package/dist/components/form.js +1 -35
- package/dist/components/icon-attr.utils.js +1 -87
- package/dist/components/icon-generation.utils.js +1 -0
- package/dist/components/icon-sprite.js +1 -6
- package/dist/components/icon-utils.js +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -9
- package/dist/components/keyboard-navigation.js +1 -0
- package/dist/components/node-utils.js +1 -22
- package/dist/components/number-utils.js +1 -0
- package/dist/components/slider.utils.js +1 -64
- package/dist/components/utils.js +1 -25
- package/dist/components/vds-autocomplete-item.js +1 -9
- package/dist/components/vds-autocomplete-item2.js +1 -126
- package/dist/components/vds-avatar.js +1 -9
- package/dist/components/vds-avatar2.js +1 -138
- package/dist/components/vds-badge-dot.js +1 -9
- package/dist/components/vds-badge-dot2.js +1 -64
- package/dist/components/vds-badge-pill.js +1 -88
- package/dist/components/vds-badge-pill.utils.js +1 -8
- package/dist/components/vds-basic-accordion.js +1 -157
- package/dist/components/vds-basic-autocomplete.js +1 -601
- package/dist/components/vds-basic-combo-box.js +1 -207
- package/dist/components/vds-basic-dropdown-multiselect.js +1 -330
- package/dist/components/vds-basic-dropdown.js +1 -375
- package/dist/components/vds-basic-dropdown.utils.js +1 -239
- package/dist/components/vds-basic-input.js +1 -9
- package/dist/components/vds-basic-input.utils.js +1 -137
- package/dist/components/vds-basic-input2.js +1 -201
- package/dist/components/vds-basic-slider-continuous.js +1 -295
- package/dist/components/vds-basic-slider-range-continuous.js +1 -423
- package/dist/components/vds-basic-textarea.js +1 -231
- package/dist/components/vds-breadcrumbs-item.js +1 -46
- package/dist/components/vds-button.js +1 -76
- package/dist/components/vds-card.js +1 -9
- package/dist/components/vds-card2.js +1 -128
- package/dist/components/vds-checkbox.js +1 -205
- package/dist/components/vds-chip.js +1 -9
- package/dist/components/vds-chip2.js +1 -186
- package/dist/components/vds-dialog-action-footer.js +1 -57
- package/dist/components/vds-dialog-body.js +1 -38
- package/dist/components/vds-dialog-header.js +1 -55
- package/dist/components/vds-dialog-modal.js +1 -38
- package/dist/components/vds-dialog.js +1 -174
- package/dist/components/vds-display.d.ts +11 -0
- package/dist/components/vds-display.js +1 -0
- package/dist/components/vds-divider.js +1 -9
- package/dist/components/vds-divider2.js +1 -56
- package/dist/components/vds-drawer.js +1 -122
- package/dist/components/vds-dropdown-group-header.js +1 -43
- package/dist/components/vds-dropdown-item.js +1 -141
- package/dist/components/vds-field.js +1 -75
- package/dist/components/vds-footer.js +1 -126
- package/dist/components/vds-header.js +1 -116
- package/dist/components/vds-icon-button.js +1 -9
- package/dist/components/vds-icon-button.utils.js +1 -11
- package/dist/components/vds-icon-button2.js +1 -66
- package/dist/components/vds-icon.js +1 -9
- package/dist/components/vds-icon2.js +1 -133
- package/dist/components/vds-key-value-pair.js +1 -50
- package/dist/components/vds-label.js +1 -9
- package/dist/components/vds-label2.js +1 -61
- package/dist/components/vds-link.js +1 -96
- package/dist/components/vds-menu-group-header.js +1 -43
- package/dist/components/vds-menu-item.js +1 -147
- package/dist/components/vds-menu-list.js +1 -38
- package/dist/components/vds-menu.js +1 -194
- package/dist/components/vds-notification.js +1 -138
- package/dist/components/vds-popover.js +1 -170
- package/dist/components/vds-progress-circular.js +1 -9
- package/dist/components/vds-progress-circular2.js +1 -137
- package/dist/components/vds-progress-linear.js +1 -116
- package/dist/components/vds-radio-button.js +1 -179
- package/dist/components/vds-segmented-button.js +1 -87
- package/dist/components/vds-sheet.js +1 -179
- package/dist/components/vds-sidenav-item-app.js +1 -58
- package/dist/components/vds-sidenav-item-button.js +1 -89
- package/dist/components/vds-sidenav-item-category.js +1 -85
- package/dist/components/vds-sidenav-item-input.js +1 -194
- package/dist/components/vds-sidenav-item.js +1 -9
- package/dist/components/vds-sidenav-item2.js +1 -110
- package/dist/components/vds-skeleton-loading.js +1 -59
- package/dist/components/vds-stepper-item-header.js +1 -54
- package/dist/components/vds-stepper-item.js +1 -142
- package/dist/components/vds-switch.js +1 -159
- package/dist/components/vds-tab.js +1 -180
- package/dist/components/vds-tabs-group.js +1 -209
- package/dist/components/vds-tooltip.js +1 -169
- package/dist/components/vds-topbar.d.ts +11 -0
- package/dist/components/vds-topbar.js +1 -0
- package/dist/components/vds-upload-drag.js +1 -94
- package/dist/components/vds-upload-item.js +1 -97
- package/dist/esm/attribute-sync-C0soA0Iu.js +116 -0
- package/dist/esm/{base-group-header-Dv2b0x2u.js → base-group-header-DHyRadI2.js} +2 -5
- package/dist/esm/{base-item-BJCnJ_64.js → base-item-LifVg8NG.js} +34 -7
- package/dist/esm/clone-attributes-XcEz9ONw.js +18 -0
- package/dist/esm/combine-classes-B9-Fmd9T.js +9 -0
- package/dist/{cjs/floating-engine-utils-DDIydT_O.js → esm/floating-engine-utils-BWyJL18G.js} +329 -302
- package/dist/esm/form-D4qxRmcx.js +54 -0
- package/dist/esm/{icon-attr.utils-DB1QD50d.js → icon-attr.utils-D8QL-1vr.js} +1 -4
- package/dist/esm/icon-utils-DbtAUzUv.js +146 -0
- package/dist/esm/{index-YrP3OJ_T.js → index-Db7Bd9sr.js} +289 -232
- package/dist/esm/index.js +74 -5
- package/dist/esm/{vds-basic-dropdown.utils-BMJUPaKN.js → keyboard-navigation-DhK6Gkic.js} +184 -19
- package/dist/esm/loader.js +3 -6
- package/dist/esm/{node-utils-Ds4TZ2g7.js → node-utils-DZjA6IyG.js} +12 -5
- package/dist/esm/number-utils-BlDCXeBH.js +9 -0
- package/dist/esm/slider.utils-Dz7FcsEt.js +207 -0
- package/dist/esm/utils-pnHDnu6c.js +86 -0
- package/dist/esm/vds-autocomplete-item.entry.js +98 -17
- package/dist/esm/vds-avatar_2.entry.js +113 -14
- package/dist/esm/vds-badge-pill.entry.js +53 -19
- package/dist/esm/vds-badge-pill.utils-0Hrrk76k.js +0 -3
- package/dist/esm/vds-basic-accordion.entry.js +72 -34
- package/dist/esm/vds-basic-autocomplete.entry.js +558 -85
- package/dist/esm/vds-basic-combo-box.entry.js +90 -36
- package/dist/esm/{vds-basic-dropdown_23.entry.js → vds-basic-dropdown_24.entry.js} +2373 -572
- package/dist/esm/vds-basic-input.utils-C0J5GoBo.js +132 -0
- package/dist/esm/vds-basic-slider-range-continuous.entry.js +192 -136
- package/dist/esm/vds-breadcrumbs-item.entry.js +18 -7
- package/dist/esm/vds-chip.entry.js +71 -47
- package/dist/esm/vds-dialog-action-footer.entry.js +16 -10
- package/dist/esm/vds-dialog-body.entry.js +7 -4
- package/dist/esm/vds-dialog-header.entry.js +12 -5
- package/dist/esm/vds-dialog-modal.entry.js +7 -4
- package/dist/esm/vds-dialog.entry.js +73 -32
- package/dist/esm/vds-display.entry.js +206 -0
- package/dist/esm/vds-footer.entry.js +85 -11
- package/dist/esm/vds-header.entry.js +79 -24
- package/dist/esm/vds-icon-button.utils-B9dRf1-F.js +0 -3
- package/dist/esm/vds-key-value-pair.entry.js +22 -7
- package/dist/esm/vds-notification.entry.js +69 -10
- package/dist/esm/vds-popover.entry.js +92 -20
- package/dist/esm/vds-progress-linear.entry.js +44 -27
- package/dist/esm/vds-radio-button.entry.js +72 -37
- package/dist/esm/vds-segmented-button.entry.js +53 -11
- package/dist/esm/vds-sheet.entry.js +89 -14
- package/dist/esm/vds-sidenav-item-app.entry.js +18 -6
- package/dist/esm/vds-sidenav-item-button.entry.js +42 -8
- package/dist/esm/vds-sidenav-item-category.entry.js +53 -9
- package/dist/esm/vds-sidenav-item-input.entry.js +85 -40
- package/dist/esm/vds-skeleton-loading.entry.js +28 -8
- package/dist/esm/vds-stepper-item-header.entry.js +16 -5
- package/dist/esm/vds-stepper-item.entry.js +81 -20
- package/dist/esm/vds-switch.entry.js +61 -26
- package/dist/esm/vds-tab.entry.js +99 -18
- package/dist/esm/vds-tabs-group.entry.js +133 -24
- package/dist/esm/vds-tooltip.entry.js +186 -23
- package/dist/esm/vds-topbar.entry.js +25 -0
- package/dist/esm/vds-upload-drag.entry.js +56 -7
- package/dist/esm/volt-basic-components.js +4 -7
- package/dist/types/components/accordion/vds-basic-accordion.d.ts +105 -35
- package/dist/types/components/autocomplete/vds-basic-autocomplete.d.ts +610 -54
- package/dist/types/components/autocomplete/vds-basic-autocomplete.stories.d.ts +13 -0
- package/dist/types/components/autocomplete-item/vds-autocomplete-item.d.ts +314 -17
- package/dist/types/components/avatar/vds-avatar.d.ts +89 -7
- package/dist/types/components/badge-dot/vds-badge-dot.d.ts +52 -6
- package/dist/types/components/badge-pill/vds-badge-pill.d.ts +90 -13
- package/dist/types/components/badge-pill/vds-badge-pill.stories.d.ts +1 -12
- package/dist/types/components/base-item/base-item.d.ts +21 -1
- package/dist/types/components/basic-dropdown/vds-basic-dropdown.d.ts +431 -31
- package/dist/types/components/basic-dropdown/vds-basic-dropdown.stories.d.ts +8 -0
- package/dist/types/components/basic-dropdown/vds-basic-dropdown.utils.d.ts +8 -1
- package/dist/types/components/breadcrumb-item/vds-breadcrumbs-item.d.ts +19 -2
- package/dist/types/components/button/vds-button.d.ts +220 -7
- package/dist/types/components/button/vds-button.stories.d.ts +2 -0
- package/dist/types/components/card/vds-card.d.ts +343 -19
- package/dist/types/components/checkbox/vds-checkbox.d.ts +102 -38
- package/dist/types/components/chip/vds-chip.d.ts +362 -34
- package/dist/types/components/chip/vds-chip.stories.d.ts +1 -0
- package/dist/types/components/dialog/vds-dialog.d.ts +91 -26
- package/dist/types/components/dialog-action-footer/vds-dialog-action-footer.d.ts +27 -7
- package/dist/types/components/dialog-body/vds-dialog-body.d.ts +9 -0
- package/dist/types/components/dialog-header/vds-dialog-header.d.ts +19 -2
- package/dist/types/components/dialog-modal/vds-dialog-modal.d.ts +12 -0
- package/dist/types/components/display/vds-display.d.ts +135 -0
- package/dist/types/components/display/vds-display.stories.d.ts +15 -0
- package/dist/types/components/divider/vds-divider.d.ts +34 -4
- package/dist/types/components/drawer/vds-drawer.d.ts +488 -11
- package/dist/types/components/dropdown-group-header/vds-dropdown-group-header.d.ts +14 -1
- package/dist/types/components/dropdown-item/vds-basic-dropdown-item.stories.d.ts +1 -0
- package/dist/types/components/dropdown-item/vds-dropdown-item.d.ts +155 -18
- package/dist/types/components/dropdown-multiselect/vds-basic-dropdown-multiselect.d.ts +368 -40
- package/dist/types/components/dropdown-multiselect/vds-basic-dropdown-multiselect.stories.d.ts +6 -0
- package/dist/types/components/field/vds-field.d.ts +147 -7
- package/dist/types/components/field/vds-field.stories.d.ts +1 -0
- package/dist/types/components/footer/vds-footer.d.ts +155 -7
- package/dist/types/components/header/vds-header.d.ts +139 -19
- package/dist/types/components/header/vds-header.stories.d.ts +1 -0
- package/dist/types/components/icon/vds-icon.d.ts +255 -4
- package/dist/types/components/icon-button/vds-icon-button.d.ts +70 -5
- package/dist/types/components/input/vds-basic-input.d.ts +241 -47
- package/dist/types/components/input/vds-basic-input.utils.d.ts +3 -2
- package/dist/types/components/key-value-pair/vds-key-value-pair.d.ts +82 -5
- package/dist/types/components/label/vds-label.d.ts +81 -5
- package/dist/types/components/link/vds-link.d.ts +128 -13
- package/dist/types/components/menu/vds-menu.d.ts +263 -12
- package/dist/types/components/menu-group-header/vds-menu-group-header.d.ts +43 -1
- package/dist/types/components/menu-item/vds-menu-item.d.ts +215 -18
- package/dist/types/components/menu-list/vds-menu-list.d.ts +60 -0
- package/dist/types/components/notification/vds-notification.d.ts +172 -9
- package/dist/types/components/popover/vds-popover.d.ts +194 -11
- package/dist/types/components/progress-circular/vds-progress-circular.d.ts +303 -27
- package/dist/types/components/progress-linear/vds-progress-linear.d.ts +109 -26
- package/dist/types/components/radio-button/vds-radio-button.d.ts +157 -34
- package/dist/types/components/segmented-button/vds-segmented-button.d.ts +151 -9
- package/dist/types/components/segmented-button/vds-segmented-button.stories.d.ts +6 -0
- package/dist/types/components/sheet/vds-sheet.d.ts +183 -10
- package/dist/types/components/sidenav-item/vds-sidenav-item.d.ts +179 -11
- package/dist/types/components/sidenav-item/vds-sidenav-item.stories.d.ts +9 -0
- package/dist/types/components/sidenav-item-app/vds-sidenav-item-app.d.ts +132 -6
- package/dist/types/components/sidenav-item-button/vds-sidenav-item-button.d.ts +137 -8
- package/dist/types/components/sidenav-item-category/vds-sidenav-item-category.d.ts +147 -3
- package/dist/types/components/sidenav-item-input/vds-sidenav-item-input.d.ts +205 -38
- package/dist/types/components/skeleton-loading/vds-skeleton-loading.d.ts +118 -3
- package/dist/types/components/slider-continuous/vds-basic-slider-continuous.d.ts +293 -64
- package/dist/types/components/slider-continuous/vds-basic-slider-continuous.stories.d.ts +1 -0
- package/dist/types/components/slider-range-continuous/vds-basic-slider-range-continuous.d.ts +346 -88
- package/dist/types/components/slider-range-continuous/vds-basic-slider-range-continuous.stories.d.ts +1 -0
- package/dist/types/components/stepper-item/vds-stepper-item.d.ts +209 -10
- package/dist/types/components/stepper-item-header/vds-stepper-item-header.d.ts +153 -4
- package/dist/types/components/switch/vds-switch.d.ts +173 -23
- package/dist/types/components/tab/vds-tab.d.ts +257 -16
- package/dist/types/components/tabs-group/vds-tabs-group.d.ts +279 -13
- package/dist/types/components/tabs-group/vds-tabs-group.stories.d.ts +1 -0
- package/dist/types/components/textarea/vds-basic-textarea.d.ts +282 -57
- package/dist/types/components/tooltip/vds-tooltip.d.ts +479 -14
- package/dist/types/components/topbar/vds-topbar.d.ts +204 -0
- package/dist/types/components/topbar/vds-topbar.stories.d.ts +15 -0
- package/dist/types/components/upload-drag/vds-upload-drag.d.ts +301 -6
- package/dist/types/components/upload-item/vds-upload-item.d.ts +314 -8
- package/dist/types/components/vds-basic-combo-box/vds-basic-combo-box.d.ts +347 -33
- package/dist/types/components.d.ts +22340 -866
- package/dist/types/constants/icon-sprite.d.ts +82 -74
- package/dist/types/constants/spacing-vars.d.ts +1 -0
- package/dist/types/index.d.ts +25 -1
- package/dist/types/stencil-public-runtime.d.ts +66 -5
- package/dist/types/utils/attribute-sync.d.ts +10 -0
- package/dist/types/utils/clone-attributes.d.ts +1 -0
- package/dist/types/utils/combine-classes.d.ts +6 -0
- package/dist/types/utils/device-detection.d.ts +21 -0
- package/dist/types/utils/floating-engine-utils.d.ts +16 -2
- package/dist/types/utils/floating-engine.d.ts +2 -2
- package/dist/types/utils/form.d.ts +12 -3
- package/dist/types/utils/get-deep-active-element.d.ts +1 -0
- package/dist/types/utils/get-random-id.d.ts +1 -0
- package/dist/types/utils/is-key-event.d.ts +1 -0
- package/dist/types/utils/is-of-type.d.ts +1 -0
- package/dist/types/utils/keyboard-navigation.d.ts +66 -0
- package/dist/types/utils/node-utils.d.ts +1 -0
- package/dist/types/utils/parentHasClass.d.ts +1 -0
- package/dist/types/utils/rems-to-px.d.ts +1 -0
- package/dist/types/utils/slider.utils.d.ts +61 -8
- package/dist/volt-basic-components/index.esm.js +1 -2
- package/dist/volt-basic-components/p-05a2a882.entry.js +1 -0
- package/dist/volt-basic-components/p-09402cea.entry.js +1 -0
- package/dist/volt-basic-components/p-0Hrrk76k.js +1 -2
- package/dist/volt-basic-components/p-101fbeb8.entry.js +1 -0
- package/dist/volt-basic-components/p-10fdf96c.entry.js +1 -0
- package/dist/volt-basic-components/p-11008108.entry.js +1 -0
- package/dist/volt-basic-components/p-1f389638.entry.js +1 -0
- package/dist/volt-basic-components/p-25e9a74e.entry.js +1 -0
- package/dist/volt-basic-components/p-3600d02d.entry.js +1 -0
- package/dist/volt-basic-components/p-4719880a.entry.js +1 -0
- package/dist/volt-basic-components/p-58a76c39.entry.js +1 -0
- package/dist/volt-basic-components/p-5a44e11e.entry.js +1 -0
- package/dist/volt-basic-components/p-63057c0e.entry.js +1 -0
- package/dist/volt-basic-components/p-6636ddcf.entry.js +1 -0
- package/dist/volt-basic-components/p-6715c0b0.entry.js +1 -0
- package/dist/volt-basic-components/p-67da205b.entry.js +1 -0
- package/dist/volt-basic-components/p-69d470d6.entry.js +1 -0
- package/dist/volt-basic-components/p-6ba78ef6.entry.js +1 -0
- package/dist/volt-basic-components/p-6c64718c.entry.js +1 -0
- package/dist/volt-basic-components/{p-6b5d3b93.entry.js → p-6ecc8e28.entry.js} +1 -2
- package/dist/volt-basic-components/{p-8eaa41f7.entry.js → p-7924ce85.entry.js} +1 -2
- package/dist/volt-basic-components/p-93b0963e.entry.js +1 -0
- package/dist/volt-basic-components/p-9849a2d1.entry.js +1 -0
- package/dist/volt-basic-components/p-9b4e42c4.entry.js +1 -0
- package/dist/volt-basic-components/p-B9-Fmd9T.js +1 -0
- package/dist/volt-basic-components/p-B9dRf1-F.js +1 -2
- package/dist/volt-basic-components/p-BWyJL18G.js +1 -0
- package/dist/volt-basic-components/p-BlDCXeBH.js +1 -0
- package/dist/volt-basic-components/p-Bm0XJ41F.js +1 -0
- package/dist/volt-basic-components/p-C0soA0Iu.js +1 -0
- package/dist/volt-basic-components/p-C_bdkm1d.js +1 -0
- package/dist/volt-basic-components/p-D4qxRmcx.js +1 -0
- package/dist/volt-basic-components/p-D8QL-1vr.js +1 -0
- package/dist/volt-basic-components/p-DOhxGOTz.js +1 -0
- package/dist/volt-basic-components/p-Db7Bd9sr.js +2 -0
- package/dist/volt-basic-components/p-DbtAUzUv.js +1 -0
- package/dist/volt-basic-components/p-DdZ3OHy_.js +1 -0
- package/dist/volt-basic-components/p-DhK6Gkic.js +1 -0
- package/dist/volt-basic-components/p-Dz7FcsEt.js +1 -0
- package/dist/volt-basic-components/p-XcEz9ONw.js +1 -0
- package/dist/volt-basic-components/p-a17d6698.entry.js +1 -0
- package/dist/volt-basic-components/p-b1fbcee4.entry.js +1 -0
- package/dist/volt-basic-components/p-b331bdb6.entry.js +1 -0
- package/dist/volt-basic-components/{p-47763451.entry.js → p-ba4c5a8a.entry.js} +1 -2
- package/dist/volt-basic-components/p-c298ffc1.entry.js +1 -0
- package/dist/volt-basic-components/p-d026ac02.entry.js +1 -0
- package/dist/volt-basic-components/p-d5276c76.entry.js +1 -0
- package/dist/volt-basic-components/p-d5c6bd2e.entry.js +1 -0
- package/dist/volt-basic-components/p-e103054e.entry.js +1 -0
- package/dist/volt-basic-components/p-e1b2a05e.entry.js +1 -0
- package/dist/volt-basic-components/p-e5a20a2d.entry.js +1 -0
- package/dist/volt-basic-components/{p-2d5a6a63.entry.js → p-e9f60758.entry.js} +1 -2
- package/dist/volt-basic-components/p-f9f262f0.entry.js +1 -0
- package/dist/volt-basic-components/p-fc33c39b.entry.js +1 -0
- package/dist/volt-basic-components/{p-661f67dd.entry.js → p-ff329d79.entry.js} +1 -2
- package/dist/volt-basic-components/p-pnHDnu6c.js +1 -0
- package/dist/volt-basic-components/volt-basic-components.css +1 -1
- package/dist/volt-basic-components/volt-basic-components.esm.js +1 -2
- package/package.json +12 -9
- package/dist/cjs/base-group-header-BBa6o7j-.js.map +0 -1
- package/dist/cjs/base-item-z-efWd2M.js.map +0 -1
- package/dist/cjs/clone-attributes-CR_poqM1.js +0 -15
- package/dist/cjs/clone-attributes-CR_poqM1.js.map +0 -1
- package/dist/cjs/combine-classes-Cs05zl1M.js.map +0 -1
- package/dist/cjs/floating-engine-utils-DDIydT_O.js.map +0 -1
- package/dist/cjs/form-Bk65VSLB.js +0 -38
- package/dist/cjs/form-Bk65VSLB.js.map +0 -1
- package/dist/cjs/icon-attr.utils-B0fSRoC6.js.map +0 -1
- package/dist/cjs/index-CwXszEUj.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/node-utils-BZh70EVv.js.map +0 -1
- package/dist/cjs/slider.utils-BVinQXJn.js +0 -68
- package/dist/cjs/slider.utils-BVinQXJn.js.map +0 -1
- package/dist/cjs/vds-badge-pill.utils-DDjHf_ZH.js.map +0 -1
- package/dist/cjs/vds-basic-dropdown.utils-B8SPgJv4.js.map +0 -1
- package/dist/cjs/vds-basic-input.utils-B5_cIWpL.js +0 -146
- package/dist/cjs/vds-basic-input.utils-B5_cIWpL.js.map +0 -1
- package/dist/cjs/vds-basic-slider-continuous.cjs.entry.js +0 -257
- package/dist/cjs/vds-icon-button.utils-BhiIMLsS.js.map +0 -1
- package/dist/cjs/volt-basic-components.cjs.js.map +0 -1
- package/dist/collection/components/accordion/vds-basic-accordion.js.map +0 -1
- package/dist/collection/components/accordion/vds-basic-accordion.stories.js.map +0 -1
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.js.map +0 -1
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.stories.js.map +0 -1
- package/dist/collection/components/autocomplete/vds-basic-autocomplete.utils.js.map +0 -1
- package/dist/collection/components/autocomplete-item/vds-autocomplete-item.js.map +0 -1
- package/dist/collection/components/autocomplete-item/vds-autocomplete-item.stories.js.map +0 -1
- package/dist/collection/components/avatar/vds-avatar.js.map +0 -1
- package/dist/collection/components/avatar/vds-avatar.stories.js.map +0 -1
- package/dist/collection/components/badge-dot/vds-badge-dot.js.map +0 -1
- package/dist/collection/components/badge-dot/vds-badge-dot.stories.js.map +0 -1
- package/dist/collection/components/badge-pill/vds-badge-pill.js.map +0 -1
- package/dist/collection/components/badge-pill/vds-badge-pill.stories.js.map +0 -1
- package/dist/collection/components/badge-pill/vds-badge-pill.utils.js.map +0 -1
- package/dist/collection/components/base-group-header/base-group-header.js.map +0 -1
- package/dist/collection/components/base-item/base-item.js.map +0 -1
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.js.map +0 -1
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.stories.js.map +0 -1
- package/dist/collection/components/basic-dropdown/vds-basic-dropdown.utils.js.map +0 -1
- package/dist/collection/components/breadcrumb-item/vds-breadcrumbs-item.js.map +0 -1
- package/dist/collection/components/breadcrumb-item/vds-breadcrumbs-item.stories.js.map +0 -1
- package/dist/collection/components/button/vds-button.js.map +0 -1
- package/dist/collection/components/button/vds-button.stories.js.map +0 -1
- package/dist/collection/components/card/vds-card.js.map +0 -1
- package/dist/collection/components/card/vds-card.stories.js.map +0 -1
- package/dist/collection/components/checkbox/vds-checkbox.js.map +0 -1
- package/dist/collection/components/checkbox/vds-checkbox.stories.js.map +0 -1
- package/dist/collection/components/checkbox/vds-checkbox.utils.js.map +0 -1
- package/dist/collection/components/chip/vds-chip.js.map +0 -1
- package/dist/collection/components/chip/vds-chip.stories.js.map +0 -1
- package/dist/collection/components/dialog/vds-dialog.js.map +0 -1
- package/dist/collection/components/dialog/vds-dialog.stories.js.map +0 -1
- package/dist/collection/components/dialog-action-footer/vds-dialog-action-footer.js.map +0 -1
- package/dist/collection/components/dialog-action-footer/vds-dialog-action-footer.stories.js.map +0 -1
- package/dist/collection/components/dialog-body/vds-dialog-body.js.map +0 -1
- package/dist/collection/components/dialog-body/vds-dialog-body.stories.js.map +0 -1
- package/dist/collection/components/dialog-header/vds-dialog-header.js.map +0 -1
- package/dist/collection/components/dialog-header/vds-dialog-header.stories.js.map +0 -1
- package/dist/collection/components/dialog-modal/vds-dialog-modal.js.map +0 -1
- package/dist/collection/components/dialog-modal/vds-dialog-modal.stories.js.map +0 -1
- package/dist/collection/components/divider/vds-divider.js.map +0 -1
- package/dist/collection/components/divider/vds-divider.stories.js.map +0 -1
- package/dist/collection/components/drawer/vds-drawer.js.map +0 -1
- package/dist/collection/components/drawer/vds-drawer.stories.js.map +0 -1
- package/dist/collection/components/dropdown-group-header/vds-dropdown-group-header.js.map +0 -1
- package/dist/collection/components/dropdown-group-header/vds-dropdown-group-header.stories.js.map +0 -1
- package/dist/collection/components/dropdown-item/vds-basic-dropdown-item.stories.js.map +0 -1
- package/dist/collection/components/dropdown-item/vds-dropdown-item-clicked-event.js.map +0 -1
- package/dist/collection/components/dropdown-item/vds-dropdown-item.js.map +0 -1
- package/dist/collection/components/dropdown-multiselect/vds-basic-dropdown-multiselect.js.map +0 -1
- package/dist/collection/components/dropdown-multiselect/vds-basic-dropdown-multiselect.stories.js.map +0 -1
- package/dist/collection/components/field/vds-field.js.map +0 -1
- package/dist/collection/components/field/vds-field.stories.js.map +0 -1
- package/dist/collection/components/footer/vds-footer.js.map +0 -1
- package/dist/collection/components/footer/vds-footer.stories.js.map +0 -1
- package/dist/collection/components/header/utils/utils.js.map +0 -1
- package/dist/collection/components/header/vds-header.js.map +0 -1
- package/dist/collection/components/header/vds-header.stories.js.map +0 -1
- package/dist/collection/components/icon/utils/icons-list.js.map +0 -1
- package/dist/collection/components/icon/vds-icon.js.map +0 -1
- package/dist/collection/components/icon/vds-icon.stories.js.map +0 -1
- package/dist/collection/components/icon-button/vds-icon-button.js.map +0 -1
- package/dist/collection/components/icon-button/vds-icon-button.stories.js.map +0 -1
- package/dist/collection/components/icon-button/vds-icon-button.utils.js.map +0 -1
- package/dist/collection/components/input/vds-basic-input.js.map +0 -1
- package/dist/collection/components/input/vds-basic-input.stories.js.map +0 -1
- package/dist/collection/components/input/vds-basic-input.utils.js.map +0 -1
- package/dist/collection/components/key-value-pair/vds-key-value-pair.js.map +0 -1
- package/dist/collection/components/key-value-pair/vds-key-value-pair.stories.js.map +0 -1
- package/dist/collection/components/label/vds-label.js.map +0 -1
- package/dist/collection/components/label/vds-label.stories.js.map +0 -1
- package/dist/collection/components/link/vds-link.js.map +0 -1
- package/dist/collection/components/link/vds-link.stories.js.map +0 -1
- package/dist/collection/components/menu/vds-menu.js.map +0 -1
- package/dist/collection/components/menu/vds-menu.stories.js.map +0 -1
- package/dist/collection/components/menu-group-header/vds-menu-group-header.js.map +0 -1
- package/dist/collection/components/menu-group-header/vds-menu-group-header.stories.js.map +0 -1
- package/dist/collection/components/menu-item/vds-menu-item.js.map +0 -1
- package/dist/collection/components/menu-item/vds-menu-item.stories.js.map +0 -1
- package/dist/collection/components/menu-list/vds-menu-list.js.map +0 -1
- package/dist/collection/components/notification/vds-notification-utils.js.map +0 -1
- package/dist/collection/components/notification/vds-notification.js.map +0 -1
- package/dist/collection/components/notification/vds-notification.stories.js.map +0 -1
- package/dist/collection/components/popover/utils/utils.js.map +0 -1
- package/dist/collection/components/popover/vds-popover.js.map +0 -1
- package/dist/collection/components/popover/vds-popover.stories.js.map +0 -1
- package/dist/collection/components/progress-circular/vds-progress-circular.js.map +0 -1
- package/dist/collection/components/progress-circular/vds-progress-circular.stories.js.map +0 -1
- package/dist/collection/components/progress-linear/vds-progress-linear.js.map +0 -1
- package/dist/collection/components/progress-linear/vds-progress-linear.stories.js.map +0 -1
- package/dist/collection/components/radio-button/vds-radio-button.js.map +0 -1
- package/dist/collection/components/radio-button/vds-radio-button.stories.js.map +0 -1
- package/dist/collection/components/radio-button/vds-radio-button.utils.js.map +0 -1
- package/dist/collection/components/segmented-button/vds-segmented-button.js.map +0 -1
- package/dist/collection/components/segmented-button/vds-segmented-button.stories.js.map +0 -1
- package/dist/collection/components/sheet/vds-sheet.js.map +0 -1
- package/dist/collection/components/sheet/vds-sheet.stories.js.map +0 -1
- package/dist/collection/components/sidenav-item/vds-sidenav-item.js.map +0 -1
- package/dist/collection/components/sidenav-item/vds-sidenav-item.stories.js.map +0 -1
- package/dist/collection/components/sidenav-item-app/vds-sidenav-item-app.js.map +0 -1
- package/dist/collection/components/sidenav-item-app/vds-sidenav-item-app.stories.js.map +0 -1
- package/dist/collection/components/sidenav-item-button/vds-sidenav-item-button.js.map +0 -1
- package/dist/collection/components/sidenav-item-button/vds-sidenav-item-button.stories.js.map +0 -1
- package/dist/collection/components/sidenav-item-category/vds-sidenav-item-category.js.map +0 -1
- package/dist/collection/components/sidenav-item-category/vds-sidenav-item-category.stories.js.map +0 -1
- package/dist/collection/components/sidenav-item-input/vds-sidenav-item-input.js.map +0 -1
- package/dist/collection/components/sidenav-item-input/vds-sidenav-item-input.stories.js.map +0 -1
- package/dist/collection/components/skeleton-loading/vds-skeleton-loading.js.map +0 -1
- package/dist/collection/components/skeleton-loading/vds-skeleton-loading.stories.js.map +0 -1
- package/dist/collection/components/slider-continuous/vds-basic-slider-continuous.js.map +0 -1
- package/dist/collection/components/slider-continuous/vds-basic-slider-continuous.stories.js.map +0 -1
- package/dist/collection/components/slider-range-continuous/vds-basic-slider-range-continuous.js.map +0 -1
- package/dist/collection/components/slider-range-continuous/vds-basic-slider-range-continuous.stories.js.map +0 -1
- package/dist/collection/components/stepper-item/vds-stepper-item.js.map +0 -1
- package/dist/collection/components/stepper-item/vds-stepper-item.stories.js.map +0 -1
- package/dist/collection/components/stepper-item-header/vds-stepper-item-header.js.map +0 -1
- package/dist/collection/components/stepper-item-header/vds-stepper-item-header.stories.js.map +0 -1
- package/dist/collection/components/switch/vds-switch.js.map +0 -1
- package/dist/collection/components/switch/vds-switch.stories.js.map +0 -1
- package/dist/collection/components/tab/vds-tab.js.map +0 -1
- package/dist/collection/components/tab/vds-tab.stories.js.map +0 -1
- package/dist/collection/components/tabs-group/vds-tabs-group.js.map +0 -1
- package/dist/collection/components/tabs-group/vds-tabs-group.stories.js.map +0 -1
- package/dist/collection/components/textarea/vds-basic-textarea.js.map +0 -1
- package/dist/collection/components/textarea/vds-basic-textarea.stories.js.map +0 -1
- package/dist/collection/components/tooltip/vds-tooltip.js.map +0 -1
- package/dist/collection/components/tooltip/vds-tooltip.stories.js.map +0 -1
- package/dist/collection/components/upload-drag/vds-upload-drag.js.map +0 -1
- package/dist/collection/components/upload-drag/vds-upload-drag.stories.js.map +0 -1
- package/dist/collection/components/upload-item/vds-upload-item.js.map +0 -1
- package/dist/collection/components/vds-basic-combo-box/vds-basic-combo-box.js.map +0 -1
- package/dist/collection/components/vds-basic-combo-box/vds-basic-combo-box.stories.js.map +0 -1
- package/dist/collection/constants/color-vars.js.map +0 -1
- package/dist/collection/constants/icon-sprite.js.map +0 -1
- package/dist/collection/constants/shadow-vars.js.map +0 -1
- package/dist/collection/constants/spacing-vars.js.map +0 -1
- package/dist/collection/constants/thickness-vars.js.map +0 -1
- package/dist/collection/constants/typography-vars.js.map +0 -1
- package/dist/collection/definitions/colors.js.map +0 -1
- package/dist/collection/definitions/shadows.js.map +0 -1
- package/dist/collection/definitions/spacing.js.map +0 -1
- package/dist/collection/definitions/thickness.js.map +0 -1
- package/dist/collection/definitions/typography.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/array-utils.js.map +0 -1
- package/dist/collection/utils/clone-attributes.js.map +0 -1
- package/dist/collection/utils/combine-classes.js.map +0 -1
- package/dist/collection/utils/floating-engine-utils.js.map +0 -1
- package/dist/collection/utils/floating-engine.js.map +0 -1
- package/dist/collection/utils/form.js.map +0 -1
- package/dist/collection/utils/icon-attr.utils.js.map +0 -1
- package/dist/collection/utils/icon-generation.utils.js.map +0 -1
- package/dist/collection/utils/icon-utils.js.map +0 -1
- package/dist/collection/utils/node-utils.js.map +0 -1
- package/dist/collection/utils/number-utils.js.map +0 -1
- package/dist/collection/utils/slider.utils.js.map +0 -1
- package/dist/collection/utils/spacing-utils.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/base-group-header.js.map +0 -1
- package/dist/components/base-item.js.map +0 -1
- package/dist/components/clone-attributes.js.map +0 -1
- package/dist/components/combine-classes.js.map +0 -1
- package/dist/components/floating-engine-utils.js.map +0 -1
- package/dist/components/form.js.map +0 -1
- package/dist/components/icon-attr.utils.js.map +0 -1
- package/dist/components/icon-sprite.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/node-utils.js.map +0 -1
- package/dist/components/slider.utils.js.map +0 -1
- package/dist/components/utils.js.map +0 -1
- package/dist/components/vds-autocomplete-item.js.map +0 -1
- package/dist/components/vds-autocomplete-item2.js.map +0 -1
- package/dist/components/vds-avatar.js.map +0 -1
- package/dist/components/vds-avatar2.js.map +0 -1
- package/dist/components/vds-badge-dot.js.map +0 -1
- package/dist/components/vds-badge-dot2.js.map +0 -1
- package/dist/components/vds-badge-pill.js.map +0 -1
- package/dist/components/vds-badge-pill.utils.js.map +0 -1
- package/dist/components/vds-basic-accordion.js.map +0 -1
- package/dist/components/vds-basic-autocomplete.js.map +0 -1
- package/dist/components/vds-basic-combo-box.js.map +0 -1
- package/dist/components/vds-basic-dropdown-multiselect.js.map +0 -1
- package/dist/components/vds-basic-dropdown.js.map +0 -1
- package/dist/components/vds-basic-dropdown.utils.js.map +0 -1
- package/dist/components/vds-basic-input.js.map +0 -1
- package/dist/components/vds-basic-input.utils.js.map +0 -1
- package/dist/components/vds-basic-input2.js.map +0 -1
- package/dist/components/vds-basic-slider-continuous.js.map +0 -1
- package/dist/components/vds-basic-slider-range-continuous.js.map +0 -1
- package/dist/components/vds-basic-textarea.js.map +0 -1
- package/dist/components/vds-breadcrumbs-item.js.map +0 -1
- package/dist/components/vds-button.js.map +0 -1
- package/dist/components/vds-card.js.map +0 -1
- package/dist/components/vds-card2.js.map +0 -1
- package/dist/components/vds-checkbox.js.map +0 -1
- package/dist/components/vds-chip.js.map +0 -1
- package/dist/components/vds-chip2.js.map +0 -1
- package/dist/components/vds-dialog-action-footer.js.map +0 -1
- package/dist/components/vds-dialog-body.js.map +0 -1
- package/dist/components/vds-dialog-header.js.map +0 -1
- package/dist/components/vds-dialog-modal.js.map +0 -1
- package/dist/components/vds-dialog.js.map +0 -1
- package/dist/components/vds-divider.js.map +0 -1
- package/dist/components/vds-divider2.js.map +0 -1
- package/dist/components/vds-drawer.js.map +0 -1
- package/dist/components/vds-dropdown-group-header.js.map +0 -1
- package/dist/components/vds-dropdown-item.js.map +0 -1
- package/dist/components/vds-field.js.map +0 -1
- package/dist/components/vds-footer.js.map +0 -1
- package/dist/components/vds-header.js.map +0 -1
- package/dist/components/vds-icon-button.js.map +0 -1
- package/dist/components/vds-icon-button.utils.js.map +0 -1
- package/dist/components/vds-icon-button2.js.map +0 -1
- package/dist/components/vds-icon.js.map +0 -1
- package/dist/components/vds-icon2.js.map +0 -1
- package/dist/components/vds-key-value-pair.js.map +0 -1
- package/dist/components/vds-label.js.map +0 -1
- package/dist/components/vds-label2.js.map +0 -1
- package/dist/components/vds-link.js.map +0 -1
- package/dist/components/vds-menu-group-header.js.map +0 -1
- package/dist/components/vds-menu-item.js.map +0 -1
- package/dist/components/vds-menu-list.js.map +0 -1
- package/dist/components/vds-menu.js.map +0 -1
- package/dist/components/vds-notification.js.map +0 -1
- package/dist/components/vds-popover.js.map +0 -1
- package/dist/components/vds-progress-circular.js.map +0 -1
- package/dist/components/vds-progress-circular2.js.map +0 -1
- package/dist/components/vds-progress-linear.js.map +0 -1
- package/dist/components/vds-radio-button.js.map +0 -1
- package/dist/components/vds-segmented-button.js.map +0 -1
- package/dist/components/vds-sheet.js.map +0 -1
- package/dist/components/vds-sidenav-item-app.js.map +0 -1
- package/dist/components/vds-sidenav-item-button.js.map +0 -1
- package/dist/components/vds-sidenav-item-category.js.map +0 -1
- package/dist/components/vds-sidenav-item-input.js.map +0 -1
- package/dist/components/vds-sidenav-item.js.map +0 -1
- package/dist/components/vds-sidenav-item2.js.map +0 -1
- package/dist/components/vds-skeleton-loading.js.map +0 -1
- package/dist/components/vds-stepper-item-header.js.map +0 -1
- package/dist/components/vds-stepper-item.js.map +0 -1
- package/dist/components/vds-switch.js.map +0 -1
- package/dist/components/vds-tab.js.map +0 -1
- package/dist/components/vds-tabs-group.js.map +0 -1
- package/dist/components/vds-tooltip.js.map +0 -1
- package/dist/components/vds-upload-drag.js.map +0 -1
- package/dist/components/vds-upload-item.js.map +0 -1
- package/dist/esm/base-group-header-Dv2b0x2u.js.map +0 -1
- package/dist/esm/base-item-BJCnJ_64.js.map +0 -1
- package/dist/esm/clone-attributes-CqHfuEQc.js +0 -13
- package/dist/esm/clone-attributes-CqHfuEQc.js.map +0 -1
- package/dist/esm/combine-classes-B23UkaEC.js +0 -6
- package/dist/esm/combine-classes-B23UkaEC.js.map +0 -1
- package/dist/esm/floating-engine-utils-ClEAm9Wn.js.map +0 -1
- package/dist/esm/form-BVF1zxcZ.js +0 -35
- package/dist/esm/form-BVF1zxcZ.js.map +0 -1
- package/dist/esm/icon-attr.utils-DB1QD50d.js.map +0 -1
- package/dist/esm/index-YrP3OJ_T.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/node-utils-Ds4TZ2g7.js.map +0 -1
- package/dist/esm/slider.utils-B7ukJ3F4.js +0 -64
- package/dist/esm/slider.utils-B7ukJ3F4.js.map +0 -1
- package/dist/esm/vds-autocomplete-item.entry.js.map +0 -1
- package/dist/esm/vds-badge-pill.entry.js.map +0 -1
- package/dist/esm/vds-badge-pill.utils-0Hrrk76k.js.map +0 -1
- package/dist/esm/vds-basic-accordion.entry.js.map +0 -1
- package/dist/esm/vds-basic-autocomplete.entry.js.map +0 -1
- package/dist/esm/vds-basic-combo-box.entry.js.map +0 -1
- package/dist/esm/vds-basic-dropdown.utils-BMJUPaKN.js.map +0 -1
- package/dist/esm/vds-basic-input.utils-DswuOEPv.js +0 -137
- package/dist/esm/vds-basic-input.utils-DswuOEPv.js.map +0 -1
- package/dist/esm/vds-basic-slider-continuous.entry.js +0 -255
- package/dist/esm/vds-basic-slider-continuous.entry.js.map +0 -1
- package/dist/esm/vds-basic-slider-range-continuous.entry.js.map +0 -1
- package/dist/esm/vds-breadcrumbs-item.entry.js.map +0 -1
- package/dist/esm/vds-chip.entry.js.map +0 -1
- package/dist/esm/vds-dialog-action-footer.entry.js.map +0 -1
- package/dist/esm/vds-dialog-body.entry.js.map +0 -1
- package/dist/esm/vds-dialog-header.entry.js.map +0 -1
- package/dist/esm/vds-dialog-modal.entry.js.map +0 -1
- package/dist/esm/vds-dialog.entry.js.map +0 -1
- package/dist/esm/vds-footer.entry.js.map +0 -1
- package/dist/esm/vds-header.entry.js.map +0 -1
- package/dist/esm/vds-icon-button.utils-B9dRf1-F.js.map +0 -1
- package/dist/esm/vds-key-value-pair.entry.js.map +0 -1
- package/dist/esm/vds-notification.entry.js.map +0 -1
- package/dist/esm/vds-popover.entry.js.map +0 -1
- package/dist/esm/vds-progress-linear.entry.js.map +0 -1
- package/dist/esm/vds-radio-button.entry.js.map +0 -1
- package/dist/esm/vds-segmented-button.entry.js.map +0 -1
- package/dist/esm/vds-sheet.entry.js.map +0 -1
- package/dist/esm/vds-sidenav-item-app.entry.js.map +0 -1
- package/dist/esm/vds-sidenav-item-button.entry.js.map +0 -1
- package/dist/esm/vds-sidenav-item-category.entry.js.map +0 -1
- package/dist/esm/vds-sidenav-item-input.entry.js.map +0 -1
- package/dist/esm/vds-skeleton-loading.entry.js.map +0 -1
- package/dist/esm/vds-stepper-item-header.entry.js.map +0 -1
- package/dist/esm/vds-stepper-item.entry.js.map +0 -1
- package/dist/esm/vds-switch.entry.js.map +0 -1
- package/dist/esm/vds-tab.entry.js.map +0 -1
- package/dist/esm/vds-tabs-group.entry.js.map +0 -1
- package/dist/esm/vds-tooltip.entry.js.map +0 -1
- package/dist/esm/vds-upload-drag.entry.js.map +0 -1
- package/dist/esm/volt-basic-components.js.map +0 -1
- package/dist/volt-basic-components/index.esm.js.map +0 -1
- package/dist/volt-basic-components/loader.esm.js.map +0 -1
- package/dist/volt-basic-components/p-0Hrrk76k.js.map +0 -1
- package/dist/volt-basic-components/p-20d5fd8b.entry.js +0 -2
- package/dist/volt-basic-components/p-20d5fd8b.entry.js.map +0 -1
- package/dist/volt-basic-components/p-2a61923a.entry.js +0 -2
- package/dist/volt-basic-components/p-2a61923a.entry.js.map +0 -1
- package/dist/volt-basic-components/p-2d5a6a63.entry.js.map +0 -1
- package/dist/volt-basic-components/p-32b69f9b.entry.js +0 -2
- package/dist/volt-basic-components/p-32b69f9b.entry.js.map +0 -1
- package/dist/volt-basic-components/p-34ea0d8c.entry.js +0 -2
- package/dist/volt-basic-components/p-34ea0d8c.entry.js.map +0 -1
- package/dist/volt-basic-components/p-364cb260.entry.js +0 -2
- package/dist/volt-basic-components/p-364cb260.entry.js.map +0 -1
- package/dist/volt-basic-components/p-47763451.entry.js.map +0 -1
- package/dist/volt-basic-components/p-485bde4b.entry.js +0 -2
- package/dist/volt-basic-components/p-485bde4b.entry.js.map +0 -1
- package/dist/volt-basic-components/p-4d5baf21.entry.js +0 -2
- package/dist/volt-basic-components/p-4d5baf21.entry.js.map +0 -1
- package/dist/volt-basic-components/p-551ca7c2.entry.js +0 -2
- package/dist/volt-basic-components/p-551ca7c2.entry.js.map +0 -1
- package/dist/volt-basic-components/p-564d6645.entry.js +0 -2
- package/dist/volt-basic-components/p-564d6645.entry.js.map +0 -1
- package/dist/volt-basic-components/p-59590dea.entry.js +0 -2
- package/dist/volt-basic-components/p-59590dea.entry.js.map +0 -1
- package/dist/volt-basic-components/p-5b84a64e.entry.js +0 -2
- package/dist/volt-basic-components/p-5b84a64e.entry.js.map +0 -1
- package/dist/volt-basic-components/p-647240b0.entry.js +0 -2
- package/dist/volt-basic-components/p-647240b0.entry.js.map +0 -1
- package/dist/volt-basic-components/p-661f67dd.entry.js.map +0 -1
- package/dist/volt-basic-components/p-6b5d3b93.entry.js.map +0 -1
- package/dist/volt-basic-components/p-70f9e8a4.entry.js +0 -2
- package/dist/volt-basic-components/p-70f9e8a4.entry.js.map +0 -1
- package/dist/volt-basic-components/p-72402820.entry.js +0 -2
- package/dist/volt-basic-components/p-72402820.entry.js.map +0 -1
- package/dist/volt-basic-components/p-8532d9d2.entry.js +0 -2
- package/dist/volt-basic-components/p-8532d9d2.entry.js.map +0 -1
- package/dist/volt-basic-components/p-8eaa41f7.entry.js.map +0 -1
- package/dist/volt-basic-components/p-8ee1bb32.entry.js +0 -2
- package/dist/volt-basic-components/p-8ee1bb32.entry.js.map +0 -1
- package/dist/volt-basic-components/p-8f92ee2b.entry.js +0 -2
- package/dist/volt-basic-components/p-8f92ee2b.entry.js.map +0 -1
- package/dist/volt-basic-components/p-934fc893.entry.js +0 -2
- package/dist/volt-basic-components/p-934fc893.entry.js.map +0 -1
- package/dist/volt-basic-components/p-B23UkaEC.js +0 -2
- package/dist/volt-basic-components/p-B23UkaEC.js.map +0 -1
- package/dist/volt-basic-components/p-B7ukJ3F4.js +0 -2
- package/dist/volt-basic-components/p-B7ukJ3F4.js.map +0 -1
- package/dist/volt-basic-components/p-B9dRf1-F.js.map +0 -1
- package/dist/volt-basic-components/p-BMJUPaKN.js +0 -2
- package/dist/volt-basic-components/p-BMJUPaKN.js.map +0 -1
- package/dist/volt-basic-components/p-BVF1zxcZ.js +0 -2
- package/dist/volt-basic-components/p-BVF1zxcZ.js.map +0 -1
- package/dist/volt-basic-components/p-CTN5pQJJ.js +0 -2
- package/dist/volt-basic-components/p-CTN5pQJJ.js.map +0 -1
- package/dist/volt-basic-components/p-ClEAm9Wn.js +0 -2
- package/dist/volt-basic-components/p-ClEAm9Wn.js.map +0 -1
- package/dist/volt-basic-components/p-CqHfuEQc.js +0 -2
- package/dist/volt-basic-components/p-CqHfuEQc.js.map +0 -1
- package/dist/volt-basic-components/p-DB1QD50d.js +0 -2
- package/dist/volt-basic-components/p-DB1QD50d.js.map +0 -1
- package/dist/volt-basic-components/p-DTEGZIhO.js +0 -2
- package/dist/volt-basic-components/p-DTEGZIhO.js.map +0 -1
- package/dist/volt-basic-components/p-DswuOEPv.js +0 -2
- package/dist/volt-basic-components/p-DswuOEPv.js.map +0 -1
- package/dist/volt-basic-components/p-YrP3OJ_T.js +0 -3
- package/dist/volt-basic-components/p-YrP3OJ_T.js.map +0 -1
- package/dist/volt-basic-components/p-a1cc6c0d.entry.js +0 -2
- package/dist/volt-basic-components/p-a1cc6c0d.entry.js.map +0 -1
- package/dist/volt-basic-components/p-a41826c5.entry.js +0 -2
- package/dist/volt-basic-components/p-a41826c5.entry.js.map +0 -1
- package/dist/volt-basic-components/p-a4c1543b.entry.js +0 -2
- package/dist/volt-basic-components/p-a4c1543b.entry.js.map +0 -1
- package/dist/volt-basic-components/p-aca9ba37.entry.js +0 -2
- package/dist/volt-basic-components/p-aca9ba37.entry.js.map +0 -1
- package/dist/volt-basic-components/p-b0829f2e.entry.js +0 -2
- package/dist/volt-basic-components/p-b0829f2e.entry.js.map +0 -1
- package/dist/volt-basic-components/p-c05abda7.entry.js +0 -2
- package/dist/volt-basic-components/p-c05abda7.entry.js.map +0 -1
- package/dist/volt-basic-components/p-c0849c4c.entry.js +0 -2
- package/dist/volt-basic-components/p-c0849c4c.entry.js.map +0 -1
- package/dist/volt-basic-components/p-c50a4dc1.entry.js +0 -2
- package/dist/volt-basic-components/p-c50a4dc1.entry.js.map +0 -1
- package/dist/volt-basic-components/p-d15595fe.entry.js +0 -2
- package/dist/volt-basic-components/p-d15595fe.entry.js.map +0 -1
- package/dist/volt-basic-components/p-e611857c.entry.js +0 -2
- package/dist/volt-basic-components/p-e611857c.entry.js.map +0 -1
- package/dist/volt-basic-components/p-eb8e671a.entry.js +0 -2
- package/dist/volt-basic-components/p-eb8e671a.entry.js.map +0 -1
- package/dist/volt-basic-components/p-ed992336.entry.js +0 -2
- package/dist/volt-basic-components/p-ed992336.entry.js.map +0 -1
- package/dist/volt-basic-components/p-f261ff52.entry.js +0 -2
- package/dist/volt-basic-components/p-f261ff52.entry.js.map +0 -1
- package/dist/volt-basic-components/p-f9a6e970.entry.js +0 -2
- package/dist/volt-basic-components/p-f9a6e970.entry.js.map +0 -1
- package/dist/volt-basic-components/p-jn6JrwWv.js +0 -2
- package/dist/volt-basic-components/p-jn6JrwWv.js.map +0 -1
- package/dist/volt-basic-components/volt-basic-components.esm.js.map +0 -1
|
@@ -1,1828 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom positioning reference element.
|
|
3
|
-
* @see https://floating-ui.com/docs/virtual-elements
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const min = Math.min;
|
|
7
|
-
const max = Math.max;
|
|
8
|
-
const round = Math.round;
|
|
9
|
-
const floor = Math.floor;
|
|
10
|
-
const createCoords = v => ({
|
|
11
|
-
x: v,
|
|
12
|
-
y: v
|
|
13
|
-
});
|
|
14
|
-
const oppositeSideMap = {
|
|
15
|
-
left: 'right',
|
|
16
|
-
right: 'left',
|
|
17
|
-
bottom: 'top',
|
|
18
|
-
top: 'bottom'
|
|
19
|
-
};
|
|
20
|
-
const oppositeAlignmentMap = {
|
|
21
|
-
start: 'end',
|
|
22
|
-
end: 'start'
|
|
23
|
-
};
|
|
24
|
-
function clamp(start, value, end) {
|
|
25
|
-
return max(start, min(value, end));
|
|
26
|
-
}
|
|
27
|
-
function evaluate(value, param) {
|
|
28
|
-
return typeof value === 'function' ? value(param) : value;
|
|
29
|
-
}
|
|
30
|
-
function getSide(placement) {
|
|
31
|
-
return placement.split('-')[0];
|
|
32
|
-
}
|
|
33
|
-
function getAlignment(placement) {
|
|
34
|
-
return placement.split('-')[1];
|
|
35
|
-
}
|
|
36
|
-
function getOppositeAxis(axis) {
|
|
37
|
-
return axis === 'x' ? 'y' : 'x';
|
|
38
|
-
}
|
|
39
|
-
function getAxisLength(axis) {
|
|
40
|
-
return axis === 'y' ? 'height' : 'width';
|
|
41
|
-
}
|
|
42
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
43
|
-
function getSideAxis(placement) {
|
|
44
|
-
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
45
|
-
}
|
|
46
|
-
function getAlignmentAxis(placement) {
|
|
47
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
48
|
-
}
|
|
49
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
50
|
-
if (rtl === void 0) {
|
|
51
|
-
rtl = false;
|
|
52
|
-
}
|
|
53
|
-
const alignment = getAlignment(placement);
|
|
54
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
55
|
-
const length = getAxisLength(alignmentAxis);
|
|
56
|
-
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
57
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
58
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
59
|
-
}
|
|
60
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
61
|
-
}
|
|
62
|
-
function getExpandedPlacements(placement) {
|
|
63
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
64
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
65
|
-
}
|
|
66
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
67
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
68
|
-
}
|
|
69
|
-
const lrPlacement = ['left', 'right'];
|
|
70
|
-
const rlPlacement = ['right', 'left'];
|
|
71
|
-
const tbPlacement = ['top', 'bottom'];
|
|
72
|
-
const btPlacement = ['bottom', 'top'];
|
|
73
|
-
function getSideList(side, isStart, rtl) {
|
|
74
|
-
switch (side) {
|
|
75
|
-
case 'top':
|
|
76
|
-
case 'bottom':
|
|
77
|
-
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
78
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
79
|
-
case 'left':
|
|
80
|
-
case 'right':
|
|
81
|
-
return isStart ? tbPlacement : btPlacement;
|
|
82
|
-
default:
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
87
|
-
const alignment = getAlignment(placement);
|
|
88
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
89
|
-
if (alignment) {
|
|
90
|
-
list = list.map(side => side + "-" + alignment);
|
|
91
|
-
if (flipAlignment) {
|
|
92
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return list;
|
|
96
|
-
}
|
|
97
|
-
function getOppositePlacement(placement) {
|
|
98
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
99
|
-
}
|
|
100
|
-
function expandPaddingObject(padding) {
|
|
101
|
-
return {
|
|
102
|
-
top: 0,
|
|
103
|
-
right: 0,
|
|
104
|
-
bottom: 0,
|
|
105
|
-
left: 0,
|
|
106
|
-
...padding
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function getPaddingObject(padding) {
|
|
110
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
111
|
-
top: padding,
|
|
112
|
-
right: padding,
|
|
113
|
-
bottom: padding,
|
|
114
|
-
left: padding
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
function rectToClientRect(rect) {
|
|
118
|
-
const {
|
|
119
|
-
x,
|
|
120
|
-
y,
|
|
121
|
-
width,
|
|
122
|
-
height
|
|
123
|
-
} = rect;
|
|
124
|
-
return {
|
|
125
|
-
width,
|
|
126
|
-
height,
|
|
127
|
-
top: y,
|
|
128
|
-
left: x,
|
|
129
|
-
right: x + width,
|
|
130
|
-
bottom: y + height,
|
|
131
|
-
x,
|
|
132
|
-
y
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
137
|
-
let {
|
|
138
|
-
reference,
|
|
139
|
-
floating
|
|
140
|
-
} = _ref;
|
|
141
|
-
const sideAxis = getSideAxis(placement);
|
|
142
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
143
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
144
|
-
const side = getSide(placement);
|
|
145
|
-
const isVertical = sideAxis === 'y';
|
|
146
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
147
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
148
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
149
|
-
let coords;
|
|
150
|
-
switch (side) {
|
|
151
|
-
case 'top':
|
|
152
|
-
coords = {
|
|
153
|
-
x: commonX,
|
|
154
|
-
y: reference.y - floating.height
|
|
155
|
-
};
|
|
156
|
-
break;
|
|
157
|
-
case 'bottom':
|
|
158
|
-
coords = {
|
|
159
|
-
x: commonX,
|
|
160
|
-
y: reference.y + reference.height
|
|
161
|
-
};
|
|
162
|
-
break;
|
|
163
|
-
case 'right':
|
|
164
|
-
coords = {
|
|
165
|
-
x: reference.x + reference.width,
|
|
166
|
-
y: commonY
|
|
167
|
-
};
|
|
168
|
-
break;
|
|
169
|
-
case 'left':
|
|
170
|
-
coords = {
|
|
171
|
-
x: reference.x - floating.width,
|
|
172
|
-
y: commonY
|
|
173
|
-
};
|
|
174
|
-
break;
|
|
175
|
-
default:
|
|
176
|
-
coords = {
|
|
177
|
-
x: reference.x,
|
|
178
|
-
y: reference.y
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
switch (getAlignment(placement)) {
|
|
182
|
-
case 'start':
|
|
183
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
184
|
-
break;
|
|
185
|
-
case 'end':
|
|
186
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
return coords;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
194
|
-
* next to a given reference element.
|
|
195
|
-
*
|
|
196
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
197
|
-
* write one for the platform you are using Floating UI with.
|
|
198
|
-
*/
|
|
199
|
-
const computePosition$1 = async (reference, floating, config) => {
|
|
200
|
-
const {
|
|
201
|
-
placement = 'bottom',
|
|
202
|
-
strategy = 'absolute',
|
|
203
|
-
middleware = [],
|
|
204
|
-
platform
|
|
205
|
-
} = config;
|
|
206
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
207
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
208
|
-
let rects = await platform.getElementRects({
|
|
209
|
-
reference,
|
|
210
|
-
floating,
|
|
211
|
-
strategy
|
|
212
|
-
});
|
|
213
|
-
let {
|
|
214
|
-
x,
|
|
215
|
-
y
|
|
216
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
217
|
-
let statefulPlacement = placement;
|
|
218
|
-
let middlewareData = {};
|
|
219
|
-
let resetCount = 0;
|
|
220
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
221
|
-
const {
|
|
222
|
-
name,
|
|
223
|
-
fn
|
|
224
|
-
} = validMiddleware[i];
|
|
225
|
-
const {
|
|
226
|
-
x: nextX,
|
|
227
|
-
y: nextY,
|
|
228
|
-
data,
|
|
229
|
-
reset
|
|
230
|
-
} = await fn({
|
|
231
|
-
x,
|
|
232
|
-
y,
|
|
233
|
-
initialPlacement: placement,
|
|
234
|
-
placement: statefulPlacement,
|
|
235
|
-
strategy,
|
|
236
|
-
middlewareData,
|
|
237
|
-
rects,
|
|
238
|
-
platform,
|
|
239
|
-
elements: {
|
|
240
|
-
reference,
|
|
241
|
-
floating
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
x = nextX != null ? nextX : x;
|
|
245
|
-
y = nextY != null ? nextY : y;
|
|
246
|
-
middlewareData = {
|
|
247
|
-
...middlewareData,
|
|
248
|
-
[name]: {
|
|
249
|
-
...middlewareData[name],
|
|
250
|
-
...data
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
if (reset && resetCount <= 50) {
|
|
254
|
-
resetCount++;
|
|
255
|
-
if (typeof reset === 'object') {
|
|
256
|
-
if (reset.placement) {
|
|
257
|
-
statefulPlacement = reset.placement;
|
|
258
|
-
}
|
|
259
|
-
if (reset.rects) {
|
|
260
|
-
rects = reset.rects === true ? await platform.getElementRects({
|
|
261
|
-
reference,
|
|
262
|
-
floating,
|
|
263
|
-
strategy
|
|
264
|
-
}) : reset.rects;
|
|
265
|
-
}
|
|
266
|
-
({
|
|
267
|
-
x,
|
|
268
|
-
y
|
|
269
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
270
|
-
}
|
|
271
|
-
i = -1;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
return {
|
|
275
|
-
x,
|
|
276
|
-
y,
|
|
277
|
-
placement: statefulPlacement,
|
|
278
|
-
strategy,
|
|
279
|
-
middlewareData
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
285
|
-
* element is overflowing a given clipping boundary on each side.
|
|
286
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
287
|
-
* - negative = how many pixels left before it will overflow
|
|
288
|
-
* - 0 = lies flush with the boundary
|
|
289
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
290
|
-
*/
|
|
291
|
-
async function detectOverflow(state, options) {
|
|
292
|
-
var _await$platform$isEle;
|
|
293
|
-
if (options === void 0) {
|
|
294
|
-
options = {};
|
|
295
|
-
}
|
|
296
|
-
const {
|
|
297
|
-
x,
|
|
298
|
-
y,
|
|
299
|
-
platform,
|
|
300
|
-
rects,
|
|
301
|
-
elements,
|
|
302
|
-
strategy
|
|
303
|
-
} = state;
|
|
304
|
-
const {
|
|
305
|
-
boundary = 'clippingAncestors',
|
|
306
|
-
rootBoundary = 'viewport',
|
|
307
|
-
elementContext = 'floating',
|
|
308
|
-
altBoundary = false,
|
|
309
|
-
padding = 0
|
|
310
|
-
} = evaluate(options, state);
|
|
311
|
-
const paddingObject = getPaddingObject(padding);
|
|
312
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
313
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
314
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
315
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
316
|
-
boundary,
|
|
317
|
-
rootBoundary,
|
|
318
|
-
strategy
|
|
319
|
-
}));
|
|
320
|
-
const rect = elementContext === 'floating' ? {
|
|
321
|
-
x,
|
|
322
|
-
y,
|
|
323
|
-
width: rects.floating.width,
|
|
324
|
-
height: rects.floating.height
|
|
325
|
-
} : rects.reference;
|
|
326
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
327
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
328
|
-
x: 1,
|
|
329
|
-
y: 1
|
|
330
|
-
} : {
|
|
331
|
-
x: 1,
|
|
332
|
-
y: 1
|
|
333
|
-
};
|
|
334
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
335
|
-
elements,
|
|
336
|
-
rect,
|
|
337
|
-
offsetParent,
|
|
338
|
-
strategy
|
|
339
|
-
}) : rect);
|
|
340
|
-
return {
|
|
341
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
342
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
343
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
344
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Provides data to position an inner element of the floating element so that it
|
|
350
|
-
* appears centered to the reference element.
|
|
351
|
-
* @see https://floating-ui.com/docs/arrow
|
|
352
|
-
*/
|
|
353
|
-
const arrow$1 = options => ({
|
|
354
|
-
name: 'arrow',
|
|
355
|
-
options,
|
|
356
|
-
async fn(state) {
|
|
357
|
-
const {
|
|
358
|
-
x,
|
|
359
|
-
y,
|
|
360
|
-
placement,
|
|
361
|
-
rects,
|
|
362
|
-
platform,
|
|
363
|
-
elements,
|
|
364
|
-
middlewareData
|
|
365
|
-
} = state;
|
|
366
|
-
// Since `element` is required, we don't Partial<> the type.
|
|
367
|
-
const {
|
|
368
|
-
element,
|
|
369
|
-
padding = 0
|
|
370
|
-
} = evaluate(options, state) || {};
|
|
371
|
-
if (element == null) {
|
|
372
|
-
return {};
|
|
373
|
-
}
|
|
374
|
-
const paddingObject = getPaddingObject(padding);
|
|
375
|
-
const coords = {
|
|
376
|
-
x,
|
|
377
|
-
y
|
|
378
|
-
};
|
|
379
|
-
const axis = getAlignmentAxis(placement);
|
|
380
|
-
const length = getAxisLength(axis);
|
|
381
|
-
const arrowDimensions = await platform.getDimensions(element);
|
|
382
|
-
const isYAxis = axis === 'y';
|
|
383
|
-
const minProp = isYAxis ? 'top' : 'left';
|
|
384
|
-
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
385
|
-
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
386
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
387
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
388
|
-
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
389
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
390
|
-
|
|
391
|
-
// DOM platform can return `window` as the `offsetParent`.
|
|
392
|
-
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
393
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
394
|
-
}
|
|
395
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
396
|
-
|
|
397
|
-
// If the padding is large enough that it causes the arrow to no longer be
|
|
398
|
-
// centered, modify the padding so that it is centered.
|
|
399
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
400
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
401
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
402
|
-
|
|
403
|
-
// Make sure the arrow doesn't overflow the floating element if the center
|
|
404
|
-
// point is outside the floating element's bounds.
|
|
405
|
-
const min$1 = minPadding;
|
|
406
|
-
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
407
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
408
|
-
const offset = clamp(min$1, center, max);
|
|
409
|
-
|
|
410
|
-
// If the reference is small enough that the arrow's padding causes it to
|
|
411
|
-
// to point to nothing for an aligned placement, adjust the offset of the
|
|
412
|
-
// floating element itself. To ensure `shift()` continues to take action,
|
|
413
|
-
// a single reset is performed when this is true.
|
|
414
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
415
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
416
|
-
return {
|
|
417
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
418
|
-
data: {
|
|
419
|
-
[axis]: offset,
|
|
420
|
-
centerOffset: center - offset - alignmentOffset,
|
|
421
|
-
...(shouldAddOffset && {
|
|
422
|
-
alignmentOffset
|
|
423
|
-
})
|
|
424
|
-
},
|
|
425
|
-
reset: shouldAddOffset
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
432
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
433
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
434
|
-
* @see https://floating-ui.com/docs/flip
|
|
435
|
-
*/
|
|
436
|
-
const flip$1 = function (options) {
|
|
437
|
-
if (options === void 0) {
|
|
438
|
-
options = {};
|
|
439
|
-
}
|
|
440
|
-
return {
|
|
441
|
-
name: 'flip',
|
|
442
|
-
options,
|
|
443
|
-
async fn(state) {
|
|
444
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
445
|
-
const {
|
|
446
|
-
placement,
|
|
447
|
-
middlewareData,
|
|
448
|
-
rects,
|
|
449
|
-
initialPlacement,
|
|
450
|
-
platform,
|
|
451
|
-
elements
|
|
452
|
-
} = state;
|
|
453
|
-
const {
|
|
454
|
-
mainAxis: checkMainAxis = true,
|
|
455
|
-
crossAxis: checkCrossAxis = true,
|
|
456
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
457
|
-
fallbackStrategy = 'bestFit',
|
|
458
|
-
fallbackAxisSideDirection = 'none',
|
|
459
|
-
flipAlignment = true,
|
|
460
|
-
...detectOverflowOptions
|
|
461
|
-
} = evaluate(options, state);
|
|
462
|
-
|
|
463
|
-
// If a reset by the arrow was caused due to an alignment offset being
|
|
464
|
-
// added, we should skip any logic now since `flip()` has already done its
|
|
465
|
-
// work.
|
|
466
|
-
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
467
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
468
|
-
return {};
|
|
469
|
-
}
|
|
470
|
-
const side = getSide(placement);
|
|
471
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
472
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
473
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
474
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
475
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
476
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
477
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
478
|
-
}
|
|
479
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
480
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
481
|
-
const overflows = [];
|
|
482
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
483
|
-
if (checkMainAxis) {
|
|
484
|
-
overflows.push(overflow[side]);
|
|
485
|
-
}
|
|
486
|
-
if (checkCrossAxis) {
|
|
487
|
-
const sides = getAlignmentSides(placement, rects, rtl);
|
|
488
|
-
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
489
|
-
}
|
|
490
|
-
overflowsData = [...overflowsData, {
|
|
491
|
-
placement,
|
|
492
|
-
overflows
|
|
493
|
-
}];
|
|
494
|
-
|
|
495
|
-
// One or more sides is overflowing.
|
|
496
|
-
if (!overflows.every(side => side <= 0)) {
|
|
497
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
498
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
499
|
-
const nextPlacement = placements[nextIndex];
|
|
500
|
-
if (nextPlacement) {
|
|
501
|
-
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
502
|
-
if (!ignoreCrossAxisOverflow ||
|
|
503
|
-
// We leave the current main axis only if every placement on that axis
|
|
504
|
-
// overflows the main axis.
|
|
505
|
-
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
506
|
-
// Try next placement and re-run the lifecycle.
|
|
507
|
-
return {
|
|
508
|
-
data: {
|
|
509
|
-
index: nextIndex,
|
|
510
|
-
overflows: overflowsData
|
|
511
|
-
},
|
|
512
|
-
reset: {
|
|
513
|
-
placement: nextPlacement
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
520
|
-
// then find the placement that fits the best on the main crossAxis side.
|
|
521
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
522
|
-
|
|
523
|
-
// Otherwise fallback.
|
|
524
|
-
if (!resetPlacement) {
|
|
525
|
-
switch (fallbackStrategy) {
|
|
526
|
-
case 'bestFit':
|
|
527
|
-
{
|
|
528
|
-
var _overflowsData$filter2;
|
|
529
|
-
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
530
|
-
if (hasFallbackAxisSideDirection) {
|
|
531
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
532
|
-
return currentSideAxis === initialSideAxis ||
|
|
533
|
-
// Create a bias to the `y` side axis due to horizontal
|
|
534
|
-
// reading directions favoring greater width.
|
|
535
|
-
currentSideAxis === 'y';
|
|
536
|
-
}
|
|
537
|
-
return true;
|
|
538
|
-
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
539
|
-
if (placement) {
|
|
540
|
-
resetPlacement = placement;
|
|
541
|
-
}
|
|
542
|
-
break;
|
|
543
|
-
}
|
|
544
|
-
case 'initialPlacement':
|
|
545
|
-
resetPlacement = initialPlacement;
|
|
546
|
-
break;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
if (placement !== resetPlacement) {
|
|
550
|
-
return {
|
|
551
|
-
reset: {
|
|
552
|
-
placement: resetPlacement
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
return {};
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
563
|
-
|
|
564
|
-
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
565
|
-
// Derivable.
|
|
566
|
-
|
|
567
|
-
async function convertValueToCoords(state, options) {
|
|
568
|
-
const {
|
|
569
|
-
placement,
|
|
570
|
-
platform,
|
|
571
|
-
elements
|
|
572
|
-
} = state;
|
|
573
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
574
|
-
const side = getSide(placement);
|
|
575
|
-
const alignment = getAlignment(placement);
|
|
576
|
-
const isVertical = getSideAxis(placement) === 'y';
|
|
577
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
578
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
579
|
-
const rawValue = evaluate(options, state);
|
|
580
|
-
|
|
581
|
-
// eslint-disable-next-line prefer-const
|
|
582
|
-
let {
|
|
583
|
-
mainAxis,
|
|
584
|
-
crossAxis,
|
|
585
|
-
alignmentAxis
|
|
586
|
-
} = typeof rawValue === 'number' ? {
|
|
587
|
-
mainAxis: rawValue,
|
|
588
|
-
crossAxis: 0,
|
|
589
|
-
alignmentAxis: null
|
|
590
|
-
} : {
|
|
591
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
592
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
593
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
594
|
-
};
|
|
595
|
-
if (alignment && typeof alignmentAxis === 'number') {
|
|
596
|
-
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
597
|
-
}
|
|
598
|
-
return isVertical ? {
|
|
599
|
-
x: crossAxis * crossAxisMulti,
|
|
600
|
-
y: mainAxis * mainAxisMulti
|
|
601
|
-
} : {
|
|
602
|
-
x: mainAxis * mainAxisMulti,
|
|
603
|
-
y: crossAxis * crossAxisMulti
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Modifies the placement by translating the floating element along the
|
|
609
|
-
* specified axes.
|
|
610
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
611
|
-
* object may be passed.
|
|
612
|
-
* @see https://floating-ui.com/docs/offset
|
|
613
|
-
*/
|
|
614
|
-
const offset$1 = function (options) {
|
|
615
|
-
if (options === void 0) {
|
|
616
|
-
options = 0;
|
|
617
|
-
}
|
|
618
|
-
return {
|
|
619
|
-
name: 'offset',
|
|
620
|
-
options,
|
|
621
|
-
async fn(state) {
|
|
622
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
623
|
-
const {
|
|
624
|
-
x,
|
|
625
|
-
y,
|
|
626
|
-
placement,
|
|
627
|
-
middlewareData
|
|
628
|
-
} = state;
|
|
629
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
630
|
-
|
|
631
|
-
// If the placement is the same and the arrow caused an alignment offset
|
|
632
|
-
// then we don't need to change the positioning coordinates.
|
|
633
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
634
|
-
return {};
|
|
635
|
-
}
|
|
636
|
-
return {
|
|
637
|
-
x: x + diffCoords.x,
|
|
638
|
-
y: y + diffCoords.y,
|
|
639
|
-
data: {
|
|
640
|
-
...diffCoords,
|
|
641
|
-
placement
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
650
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
651
|
-
* @see https://floating-ui.com/docs/shift
|
|
652
|
-
*/
|
|
653
|
-
const shift$1 = function (options) {
|
|
654
|
-
if (options === void 0) {
|
|
655
|
-
options = {};
|
|
656
|
-
}
|
|
657
|
-
return {
|
|
658
|
-
name: 'shift',
|
|
659
|
-
options,
|
|
660
|
-
async fn(state) {
|
|
661
|
-
const {
|
|
662
|
-
x,
|
|
663
|
-
y,
|
|
664
|
-
placement
|
|
665
|
-
} = state;
|
|
666
|
-
const {
|
|
667
|
-
mainAxis: checkMainAxis = true,
|
|
668
|
-
crossAxis: checkCrossAxis = false,
|
|
669
|
-
limiter = {
|
|
670
|
-
fn: _ref => {
|
|
671
|
-
let {
|
|
672
|
-
x,
|
|
673
|
-
y
|
|
674
|
-
} = _ref;
|
|
675
|
-
return {
|
|
676
|
-
x,
|
|
677
|
-
y
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
...detectOverflowOptions
|
|
682
|
-
} = evaluate(options, state);
|
|
683
|
-
const coords = {
|
|
684
|
-
x,
|
|
685
|
-
y
|
|
686
|
-
};
|
|
687
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
688
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
689
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
690
|
-
let mainAxisCoord = coords[mainAxis];
|
|
691
|
-
let crossAxisCoord = coords[crossAxis];
|
|
692
|
-
if (checkMainAxis) {
|
|
693
|
-
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
694
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
695
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
696
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
697
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
698
|
-
}
|
|
699
|
-
if (checkCrossAxis) {
|
|
700
|
-
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
701
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
702
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
703
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
704
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
705
|
-
}
|
|
706
|
-
const limitedCoords = limiter.fn({
|
|
707
|
-
...state,
|
|
708
|
-
[mainAxis]: mainAxisCoord,
|
|
709
|
-
[crossAxis]: crossAxisCoord
|
|
710
|
-
});
|
|
711
|
-
return {
|
|
712
|
-
...limitedCoords,
|
|
713
|
-
data: {
|
|
714
|
-
x: limitedCoords.x - x,
|
|
715
|
-
y: limitedCoords.y - y,
|
|
716
|
-
enabled: {
|
|
717
|
-
[mainAxis]: checkMainAxis,
|
|
718
|
-
[crossAxis]: checkCrossAxis
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Provides data that allows you to change the size of the floating element —
|
|
728
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
729
|
-
* width of the reference element.
|
|
730
|
-
* @see https://floating-ui.com/docs/size
|
|
731
|
-
*/
|
|
732
|
-
const size$1 = function (options) {
|
|
733
|
-
if (options === void 0) {
|
|
734
|
-
options = {};
|
|
735
|
-
}
|
|
736
|
-
return {
|
|
737
|
-
name: 'size',
|
|
738
|
-
options,
|
|
739
|
-
async fn(state) {
|
|
740
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
741
|
-
const {
|
|
742
|
-
placement,
|
|
743
|
-
rects,
|
|
744
|
-
platform,
|
|
745
|
-
elements
|
|
746
|
-
} = state;
|
|
747
|
-
const {
|
|
748
|
-
apply = () => {},
|
|
749
|
-
...detectOverflowOptions
|
|
750
|
-
} = evaluate(options, state);
|
|
751
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
752
|
-
const side = getSide(placement);
|
|
753
|
-
const alignment = getAlignment(placement);
|
|
754
|
-
const isYAxis = getSideAxis(placement) === 'y';
|
|
755
|
-
const {
|
|
756
|
-
width,
|
|
757
|
-
height
|
|
758
|
-
} = rects.floating;
|
|
759
|
-
let heightSide;
|
|
760
|
-
let widthSide;
|
|
761
|
-
if (side === 'top' || side === 'bottom') {
|
|
762
|
-
heightSide = side;
|
|
763
|
-
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
764
|
-
} else {
|
|
765
|
-
widthSide = side;
|
|
766
|
-
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
767
|
-
}
|
|
768
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
769
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
770
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
771
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
772
|
-
const noShift = !state.middlewareData.shift;
|
|
773
|
-
let availableHeight = overflowAvailableHeight;
|
|
774
|
-
let availableWidth = overflowAvailableWidth;
|
|
775
|
-
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
776
|
-
availableWidth = maximumClippingWidth;
|
|
777
|
-
}
|
|
778
|
-
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
779
|
-
availableHeight = maximumClippingHeight;
|
|
780
|
-
}
|
|
781
|
-
if (noShift && !alignment) {
|
|
782
|
-
const xMin = max(overflow.left, 0);
|
|
783
|
-
const xMax = max(overflow.right, 0);
|
|
784
|
-
const yMin = max(overflow.top, 0);
|
|
785
|
-
const yMax = max(overflow.bottom, 0);
|
|
786
|
-
if (isYAxis) {
|
|
787
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
788
|
-
} else {
|
|
789
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
await apply({
|
|
793
|
-
...state,
|
|
794
|
-
availableWidth,
|
|
795
|
-
availableHeight
|
|
796
|
-
});
|
|
797
|
-
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
798
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
799
|
-
return {
|
|
800
|
-
reset: {
|
|
801
|
-
rects: true
|
|
802
|
-
}
|
|
803
|
-
};
|
|
804
|
-
}
|
|
805
|
-
return {};
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
};
|
|
809
|
-
|
|
810
|
-
function hasWindow() {
|
|
811
|
-
return typeof window !== 'undefined';
|
|
812
|
-
}
|
|
813
|
-
function getNodeName(node) {
|
|
814
|
-
if (isNode(node)) {
|
|
815
|
-
return (node.nodeName || '').toLowerCase();
|
|
816
|
-
}
|
|
817
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
818
|
-
// returning `#document` an infinite loop won't occur.
|
|
819
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
820
|
-
return '#document';
|
|
821
|
-
}
|
|
822
|
-
function getWindow(node) {
|
|
823
|
-
var _node$ownerDocument;
|
|
824
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
825
|
-
}
|
|
826
|
-
function getDocumentElement(node) {
|
|
827
|
-
var _ref;
|
|
828
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
829
|
-
}
|
|
830
|
-
function isNode(value) {
|
|
831
|
-
if (!hasWindow()) {
|
|
832
|
-
return false;
|
|
833
|
-
}
|
|
834
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
835
|
-
}
|
|
836
|
-
function isElement(value) {
|
|
837
|
-
if (!hasWindow()) {
|
|
838
|
-
return false;
|
|
839
|
-
}
|
|
840
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
841
|
-
}
|
|
842
|
-
function isHTMLElement(value) {
|
|
843
|
-
if (!hasWindow()) {
|
|
844
|
-
return false;
|
|
845
|
-
}
|
|
846
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
847
|
-
}
|
|
848
|
-
function isShadowRoot(value) {
|
|
849
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
850
|
-
return false;
|
|
851
|
-
}
|
|
852
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
853
|
-
}
|
|
854
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
855
|
-
function isOverflowElement(element) {
|
|
856
|
-
const {
|
|
857
|
-
overflow,
|
|
858
|
-
overflowX,
|
|
859
|
-
overflowY,
|
|
860
|
-
display
|
|
861
|
-
} = getComputedStyle$1(element);
|
|
862
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
863
|
-
}
|
|
864
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
865
|
-
function isTableElement(element) {
|
|
866
|
-
return tableElements.has(getNodeName(element));
|
|
867
|
-
}
|
|
868
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
869
|
-
function isTopLayer(element) {
|
|
870
|
-
return topLayerSelectors.some(selector => {
|
|
871
|
-
try {
|
|
872
|
-
return element.matches(selector);
|
|
873
|
-
} catch (_e) {
|
|
874
|
-
return false;
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
879
|
-
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
880
|
-
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
881
|
-
function isContainingBlock(elementOrCss) {
|
|
882
|
-
const webkit = isWebKit();
|
|
883
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
884
|
-
|
|
885
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
886
|
-
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
887
|
-
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
|
|
888
|
-
}
|
|
889
|
-
function getContainingBlock(element) {
|
|
890
|
-
let currentNode = getParentNode(element);
|
|
891
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
892
|
-
if (isContainingBlock(currentNode)) {
|
|
893
|
-
return currentNode;
|
|
894
|
-
} else if (isTopLayer(currentNode)) {
|
|
895
|
-
return null;
|
|
896
|
-
}
|
|
897
|
-
currentNode = getParentNode(currentNode);
|
|
898
|
-
}
|
|
899
|
-
return null;
|
|
900
|
-
}
|
|
901
|
-
function isWebKit() {
|
|
902
|
-
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
903
|
-
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
904
|
-
}
|
|
905
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
906
|
-
function isLastTraversableNode(node) {
|
|
907
|
-
return lastTraversableNodeNames.has(getNodeName(node));
|
|
908
|
-
}
|
|
909
|
-
function getComputedStyle$1(element) {
|
|
910
|
-
return getWindow(element).getComputedStyle(element);
|
|
911
|
-
}
|
|
912
|
-
function getNodeScroll(element) {
|
|
913
|
-
if (isElement(element)) {
|
|
914
|
-
return {
|
|
915
|
-
scrollLeft: element.scrollLeft,
|
|
916
|
-
scrollTop: element.scrollTop
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
return {
|
|
920
|
-
scrollLeft: element.scrollX,
|
|
921
|
-
scrollTop: element.scrollY
|
|
922
|
-
};
|
|
923
|
-
}
|
|
924
|
-
function getParentNode(node) {
|
|
925
|
-
if (getNodeName(node) === 'html') {
|
|
926
|
-
return node;
|
|
927
|
-
}
|
|
928
|
-
const result =
|
|
929
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
930
|
-
node.assignedSlot ||
|
|
931
|
-
// DOM Element detected.
|
|
932
|
-
node.parentNode ||
|
|
933
|
-
// ShadowRoot detected.
|
|
934
|
-
isShadowRoot(node) && node.host ||
|
|
935
|
-
// Fallback.
|
|
936
|
-
getDocumentElement(node);
|
|
937
|
-
return isShadowRoot(result) ? result.host : result;
|
|
938
|
-
}
|
|
939
|
-
function getNearestOverflowAncestor(node) {
|
|
940
|
-
const parentNode = getParentNode(node);
|
|
941
|
-
if (isLastTraversableNode(parentNode)) {
|
|
942
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
943
|
-
}
|
|
944
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
945
|
-
return parentNode;
|
|
946
|
-
}
|
|
947
|
-
return getNearestOverflowAncestor(parentNode);
|
|
948
|
-
}
|
|
949
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
950
|
-
var _node$ownerDocument2;
|
|
951
|
-
if (list === void 0) {
|
|
952
|
-
list = [];
|
|
953
|
-
}
|
|
954
|
-
if (traverseIframes === void 0) {
|
|
955
|
-
traverseIframes = true;
|
|
956
|
-
}
|
|
957
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
958
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
959
|
-
const win = getWindow(scrollableAncestor);
|
|
960
|
-
if (isBody) {
|
|
961
|
-
const frameElement = getFrameElement(win);
|
|
962
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
963
|
-
}
|
|
964
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
965
|
-
}
|
|
966
|
-
function getFrameElement(win) {
|
|
967
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
function getCssDimensions(element) {
|
|
971
|
-
const css = getComputedStyle$1(element);
|
|
972
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
973
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
974
|
-
let width = parseFloat(css.width) || 0;
|
|
975
|
-
let height = parseFloat(css.height) || 0;
|
|
976
|
-
const hasOffset = isHTMLElement(element);
|
|
977
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
978
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
979
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
980
|
-
if (shouldFallback) {
|
|
981
|
-
width = offsetWidth;
|
|
982
|
-
height = offsetHeight;
|
|
983
|
-
}
|
|
984
|
-
return {
|
|
985
|
-
width,
|
|
986
|
-
height,
|
|
987
|
-
$: shouldFallback
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
function unwrapElement(element) {
|
|
992
|
-
return !isElement(element) ? element.contextElement : element;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
function getScale(element) {
|
|
996
|
-
const domElement = unwrapElement(element);
|
|
997
|
-
if (!isHTMLElement(domElement)) {
|
|
998
|
-
return createCoords(1);
|
|
999
|
-
}
|
|
1000
|
-
const rect = domElement.getBoundingClientRect();
|
|
1001
|
-
const {
|
|
1002
|
-
width,
|
|
1003
|
-
height,
|
|
1004
|
-
$
|
|
1005
|
-
} = getCssDimensions(domElement);
|
|
1006
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1007
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1008
|
-
|
|
1009
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
1010
|
-
|
|
1011
|
-
if (!x || !Number.isFinite(x)) {
|
|
1012
|
-
x = 1;
|
|
1013
|
-
}
|
|
1014
|
-
if (!y || !Number.isFinite(y)) {
|
|
1015
|
-
y = 1;
|
|
1016
|
-
}
|
|
1017
|
-
return {
|
|
1018
|
-
x,
|
|
1019
|
-
y
|
|
1020
|
-
};
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1024
|
-
function getVisualOffsets(element) {
|
|
1025
|
-
const win = getWindow(element);
|
|
1026
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
1027
|
-
return noOffsets;
|
|
1028
|
-
}
|
|
1029
|
-
return {
|
|
1030
|
-
x: win.visualViewport.offsetLeft,
|
|
1031
|
-
y: win.visualViewport.offsetTop
|
|
1032
|
-
};
|
|
1033
|
-
}
|
|
1034
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1035
|
-
if (isFixed === void 0) {
|
|
1036
|
-
isFixed = false;
|
|
1037
|
-
}
|
|
1038
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1039
|
-
return false;
|
|
1040
|
-
}
|
|
1041
|
-
return isFixed;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1045
|
-
if (includeScale === void 0) {
|
|
1046
|
-
includeScale = false;
|
|
1047
|
-
}
|
|
1048
|
-
if (isFixedStrategy === void 0) {
|
|
1049
|
-
isFixedStrategy = false;
|
|
1050
|
-
}
|
|
1051
|
-
const clientRect = element.getBoundingClientRect();
|
|
1052
|
-
const domElement = unwrapElement(element);
|
|
1053
|
-
let scale = createCoords(1);
|
|
1054
|
-
if (includeScale) {
|
|
1055
|
-
if (offsetParent) {
|
|
1056
|
-
if (isElement(offsetParent)) {
|
|
1057
|
-
scale = getScale(offsetParent);
|
|
1058
|
-
}
|
|
1059
|
-
} else {
|
|
1060
|
-
scale = getScale(element);
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1064
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1065
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1066
|
-
let width = clientRect.width / scale.x;
|
|
1067
|
-
let height = clientRect.height / scale.y;
|
|
1068
|
-
if (domElement) {
|
|
1069
|
-
const win = getWindow(domElement);
|
|
1070
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1071
|
-
let currentWin = win;
|
|
1072
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
1073
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1074
|
-
const iframeScale = getScale(currentIFrame);
|
|
1075
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1076
|
-
const css = getComputedStyle$1(currentIFrame);
|
|
1077
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1078
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1079
|
-
x *= iframeScale.x;
|
|
1080
|
-
y *= iframeScale.y;
|
|
1081
|
-
width *= iframeScale.x;
|
|
1082
|
-
height *= iframeScale.y;
|
|
1083
|
-
x += left;
|
|
1084
|
-
y += top;
|
|
1085
|
-
currentWin = getWindow(currentIFrame);
|
|
1086
|
-
currentIFrame = getFrameElement(currentWin);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
return rectToClientRect({
|
|
1090
|
-
width,
|
|
1091
|
-
height,
|
|
1092
|
-
x,
|
|
1093
|
-
y
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1098
|
-
// incorrect for RTL.
|
|
1099
|
-
function getWindowScrollBarX(element, rect) {
|
|
1100
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1101
|
-
if (!rect) {
|
|
1102
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1103
|
-
}
|
|
1104
|
-
return rect.left + leftScroll;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
1108
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
1109
|
-
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1110
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
1111
|
-
return {
|
|
1112
|
-
x,
|
|
1113
|
-
y
|
|
1114
|
-
};
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1118
|
-
let {
|
|
1119
|
-
elements,
|
|
1120
|
-
rect,
|
|
1121
|
-
offsetParent,
|
|
1122
|
-
strategy
|
|
1123
|
-
} = _ref;
|
|
1124
|
-
const isFixed = strategy === 'fixed';
|
|
1125
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1126
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1127
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1128
|
-
return rect;
|
|
1129
|
-
}
|
|
1130
|
-
let scroll = {
|
|
1131
|
-
scrollLeft: 0,
|
|
1132
|
-
scrollTop: 0
|
|
1133
|
-
};
|
|
1134
|
-
let scale = createCoords(1);
|
|
1135
|
-
const offsets = createCoords(0);
|
|
1136
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1137
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1138
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1139
|
-
scroll = getNodeScroll(offsetParent);
|
|
1140
|
-
}
|
|
1141
|
-
if (isHTMLElement(offsetParent)) {
|
|
1142
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1143
|
-
scale = getScale(offsetParent);
|
|
1144
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1145
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1149
|
-
return {
|
|
1150
|
-
width: rect.width * scale.x,
|
|
1151
|
-
height: rect.height * scale.y,
|
|
1152
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1153
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1154
|
-
};
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
function getClientRects(element) {
|
|
1158
|
-
return Array.from(element.getClientRects());
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
1162
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1163
|
-
function getDocumentRect(element) {
|
|
1164
|
-
const html = getDocumentElement(element);
|
|
1165
|
-
const scroll = getNodeScroll(element);
|
|
1166
|
-
const body = element.ownerDocument.body;
|
|
1167
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1168
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1169
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1170
|
-
const y = -scroll.scrollTop;
|
|
1171
|
-
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1172
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1173
|
-
}
|
|
1174
|
-
return {
|
|
1175
|
-
width,
|
|
1176
|
-
height,
|
|
1177
|
-
x,
|
|
1178
|
-
y
|
|
1179
|
-
};
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
1183
|
-
// calculation is affected by unusual styles.
|
|
1184
|
-
// Most scrollbars leave 15-18px of space.
|
|
1185
|
-
const SCROLLBAR_MAX = 25;
|
|
1186
|
-
function getViewportRect(element, strategy) {
|
|
1187
|
-
const win = getWindow(element);
|
|
1188
|
-
const html = getDocumentElement(element);
|
|
1189
|
-
const visualViewport = win.visualViewport;
|
|
1190
|
-
let width = html.clientWidth;
|
|
1191
|
-
let height = html.clientHeight;
|
|
1192
|
-
let x = 0;
|
|
1193
|
-
let y = 0;
|
|
1194
|
-
if (visualViewport) {
|
|
1195
|
-
width = visualViewport.width;
|
|
1196
|
-
height = visualViewport.height;
|
|
1197
|
-
const visualViewportBased = isWebKit();
|
|
1198
|
-
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1199
|
-
x = visualViewport.offsetLeft;
|
|
1200
|
-
y = visualViewport.offsetTop;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1204
|
-
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
1205
|
-
// visual width of the <html> but this is not considered in the size
|
|
1206
|
-
// of `html.clientWidth`.
|
|
1207
|
-
if (windowScrollbarX <= 0) {
|
|
1208
|
-
const doc = html.ownerDocument;
|
|
1209
|
-
const body = doc.body;
|
|
1210
|
-
const bodyStyles = getComputedStyle(body);
|
|
1211
|
-
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1212
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1213
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
1214
|
-
width -= clippingStableScrollbarWidth;
|
|
1215
|
-
}
|
|
1216
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1217
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
1218
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
1219
|
-
width += windowScrollbarX;
|
|
1220
|
-
}
|
|
1221
|
-
return {
|
|
1222
|
-
width,
|
|
1223
|
-
height,
|
|
1224
|
-
x,
|
|
1225
|
-
y
|
|
1226
|
-
};
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
1230
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1231
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
1232
|
-
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1233
|
-
const top = clientRect.top + element.clientTop;
|
|
1234
|
-
const left = clientRect.left + element.clientLeft;
|
|
1235
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1236
|
-
const width = element.clientWidth * scale.x;
|
|
1237
|
-
const height = element.clientHeight * scale.y;
|
|
1238
|
-
const x = left * scale.x;
|
|
1239
|
-
const y = top * scale.y;
|
|
1240
|
-
return {
|
|
1241
|
-
width,
|
|
1242
|
-
height,
|
|
1243
|
-
x,
|
|
1244
|
-
y
|
|
1245
|
-
};
|
|
1246
|
-
}
|
|
1247
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1248
|
-
let rect;
|
|
1249
|
-
if (clippingAncestor === 'viewport') {
|
|
1250
|
-
rect = getViewportRect(element, strategy);
|
|
1251
|
-
} else if (clippingAncestor === 'document') {
|
|
1252
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
1253
|
-
} else if (isElement(clippingAncestor)) {
|
|
1254
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1255
|
-
} else {
|
|
1256
|
-
const visualOffsets = getVisualOffsets(element);
|
|
1257
|
-
rect = {
|
|
1258
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1259
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
1260
|
-
width: clippingAncestor.width,
|
|
1261
|
-
height: clippingAncestor.height
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
return rectToClientRect(rect);
|
|
1265
|
-
}
|
|
1266
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1267
|
-
const parentNode = getParentNode(element);
|
|
1268
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1269
|
-
return false;
|
|
1270
|
-
}
|
|
1271
|
-
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1275
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1276
|
-
// of the given element up the tree.
|
|
1277
|
-
function getClippingElementAncestors(element, cache) {
|
|
1278
|
-
const cachedResult = cache.get(element);
|
|
1279
|
-
if (cachedResult) {
|
|
1280
|
-
return cachedResult;
|
|
1281
|
-
}
|
|
1282
|
-
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1283
|
-
let currentContainingBlockComputedStyle = null;
|
|
1284
|
-
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1285
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1286
|
-
|
|
1287
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1288
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1289
|
-
const computedStyle = getComputedStyle$1(currentNode);
|
|
1290
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1291
|
-
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1292
|
-
currentContainingBlockComputedStyle = null;
|
|
1293
|
-
}
|
|
1294
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1295
|
-
if (shouldDropCurrentNode) {
|
|
1296
|
-
// Drop non-containing blocks.
|
|
1297
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1298
|
-
} else {
|
|
1299
|
-
// Record last containing block for next iteration.
|
|
1300
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1301
|
-
}
|
|
1302
|
-
currentNode = getParentNode(currentNode);
|
|
1303
|
-
}
|
|
1304
|
-
cache.set(element, result);
|
|
1305
|
-
return result;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1309
|
-
// clipping ancestors.
|
|
1310
|
-
function getClippingRect(_ref) {
|
|
1311
|
-
let {
|
|
1312
|
-
element,
|
|
1313
|
-
boundary,
|
|
1314
|
-
rootBoundary,
|
|
1315
|
-
strategy
|
|
1316
|
-
} = _ref;
|
|
1317
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1318
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1319
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
1320
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1321
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1322
|
-
accRect.top = max(rect.top, accRect.top);
|
|
1323
|
-
accRect.right = min(rect.right, accRect.right);
|
|
1324
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1325
|
-
accRect.left = max(rect.left, accRect.left);
|
|
1326
|
-
return accRect;
|
|
1327
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1328
|
-
return {
|
|
1329
|
-
width: clippingRect.right - clippingRect.left,
|
|
1330
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
1331
|
-
x: clippingRect.left,
|
|
1332
|
-
y: clippingRect.top
|
|
1333
|
-
};
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
function getDimensions(element) {
|
|
1337
|
-
const {
|
|
1338
|
-
width,
|
|
1339
|
-
height
|
|
1340
|
-
} = getCssDimensions(element);
|
|
1341
|
-
return {
|
|
1342
|
-
width,
|
|
1343
|
-
height
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1348
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1349
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1350
|
-
const isFixed = strategy === 'fixed';
|
|
1351
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1352
|
-
let scroll = {
|
|
1353
|
-
scrollLeft: 0,
|
|
1354
|
-
scrollTop: 0
|
|
1355
|
-
};
|
|
1356
|
-
const offsets = createCoords(0);
|
|
1357
|
-
|
|
1358
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1359
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1360
|
-
function setLeftRTLScrollbarOffset() {
|
|
1361
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1362
|
-
}
|
|
1363
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1364
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1365
|
-
scroll = getNodeScroll(offsetParent);
|
|
1366
|
-
}
|
|
1367
|
-
if (isOffsetParentAnElement) {
|
|
1368
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1369
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1370
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1371
|
-
} else if (documentElement) {
|
|
1372
|
-
setLeftRTLScrollbarOffset();
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1376
|
-
setLeftRTLScrollbarOffset();
|
|
1377
|
-
}
|
|
1378
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1379
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1380
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1381
|
-
return {
|
|
1382
|
-
x,
|
|
1383
|
-
y,
|
|
1384
|
-
width: rect.width,
|
|
1385
|
-
height: rect.height
|
|
1386
|
-
};
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
function isStaticPositioned(element) {
|
|
1390
|
-
return getComputedStyle$1(element).position === 'static';
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
1394
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1395
|
-
return null;
|
|
1396
|
-
}
|
|
1397
|
-
if (polyfill) {
|
|
1398
|
-
return polyfill(element);
|
|
1399
|
-
}
|
|
1400
|
-
let rawOffsetParent = element.offsetParent;
|
|
1401
|
-
|
|
1402
|
-
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1403
|
-
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1404
|
-
// be used to perform the correct calculations even if the <html> element is
|
|
1405
|
-
// non-static.
|
|
1406
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1407
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1408
|
-
}
|
|
1409
|
-
return rawOffsetParent;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1413
|
-
// such as table ancestors and cross browser bugs.
|
|
1414
|
-
function getOffsetParent(element, polyfill) {
|
|
1415
|
-
const win = getWindow(element);
|
|
1416
|
-
if (isTopLayer(element)) {
|
|
1417
|
-
return win;
|
|
1418
|
-
}
|
|
1419
|
-
if (!isHTMLElement(element)) {
|
|
1420
|
-
let svgOffsetParent = getParentNode(element);
|
|
1421
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1422
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1423
|
-
return svgOffsetParent;
|
|
1424
|
-
}
|
|
1425
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1426
|
-
}
|
|
1427
|
-
return win;
|
|
1428
|
-
}
|
|
1429
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1430
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1431
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1432
|
-
}
|
|
1433
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1434
|
-
return win;
|
|
1435
|
-
}
|
|
1436
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
const getElementRects = async function (data) {
|
|
1440
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1441
|
-
const getDimensionsFn = this.getDimensions;
|
|
1442
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1443
|
-
return {
|
|
1444
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1445
|
-
floating: {
|
|
1446
|
-
x: 0,
|
|
1447
|
-
y: 0,
|
|
1448
|
-
width: floatingDimensions.width,
|
|
1449
|
-
height: floatingDimensions.height
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
function isRTL(element) {
|
|
1455
|
-
return getComputedStyle$1(element).direction === 'rtl';
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
const platform = {
|
|
1459
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1460
|
-
getDocumentElement,
|
|
1461
|
-
getClippingRect,
|
|
1462
|
-
getOffsetParent,
|
|
1463
|
-
getElementRects,
|
|
1464
|
-
getClientRects,
|
|
1465
|
-
getDimensions,
|
|
1466
|
-
getScale,
|
|
1467
|
-
isElement,
|
|
1468
|
-
isRTL
|
|
1469
|
-
};
|
|
1470
|
-
|
|
1471
|
-
function rectsAreEqual(a, b) {
|
|
1472
|
-
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
// https://samthor.au/2021/observing-dom/
|
|
1476
|
-
function observeMove(element, onMove) {
|
|
1477
|
-
let io = null;
|
|
1478
|
-
let timeoutId;
|
|
1479
|
-
const root = getDocumentElement(element);
|
|
1480
|
-
function cleanup() {
|
|
1481
|
-
var _io;
|
|
1482
|
-
clearTimeout(timeoutId);
|
|
1483
|
-
(_io = io) == null || _io.disconnect();
|
|
1484
|
-
io = null;
|
|
1485
|
-
}
|
|
1486
|
-
function refresh(skip, threshold) {
|
|
1487
|
-
if (skip === void 0) {
|
|
1488
|
-
skip = false;
|
|
1489
|
-
}
|
|
1490
|
-
if (threshold === void 0) {
|
|
1491
|
-
threshold = 1;
|
|
1492
|
-
}
|
|
1493
|
-
cleanup();
|
|
1494
|
-
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1495
|
-
const {
|
|
1496
|
-
left,
|
|
1497
|
-
top,
|
|
1498
|
-
width,
|
|
1499
|
-
height
|
|
1500
|
-
} = elementRectForRootMargin;
|
|
1501
|
-
if (!skip) {
|
|
1502
|
-
onMove();
|
|
1503
|
-
}
|
|
1504
|
-
if (!width || !height) {
|
|
1505
|
-
return;
|
|
1506
|
-
}
|
|
1507
|
-
const insetTop = floor(top);
|
|
1508
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
1509
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1510
|
-
const insetLeft = floor(left);
|
|
1511
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1512
|
-
const options = {
|
|
1513
|
-
rootMargin,
|
|
1514
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1515
|
-
};
|
|
1516
|
-
let isFirstUpdate = true;
|
|
1517
|
-
function handleObserve(entries) {
|
|
1518
|
-
const ratio = entries[0].intersectionRatio;
|
|
1519
|
-
if (ratio !== threshold) {
|
|
1520
|
-
if (!isFirstUpdate) {
|
|
1521
|
-
return refresh();
|
|
1522
|
-
}
|
|
1523
|
-
if (!ratio) {
|
|
1524
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1525
|
-
// to prevent an infinite loop of updates.
|
|
1526
|
-
timeoutId = setTimeout(() => {
|
|
1527
|
-
refresh(false, 1e-7);
|
|
1528
|
-
}, 1000);
|
|
1529
|
-
} else {
|
|
1530
|
-
refresh(false, ratio);
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1534
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
1535
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
1536
|
-
// area anymore. This can happen under performance constraints. This may
|
|
1537
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1538
|
-
// work around this, we compare the element's bounding rect now with
|
|
1539
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
1540
|
-
// are not equal then the element moved, so we refresh.
|
|
1541
|
-
refresh();
|
|
1542
|
-
}
|
|
1543
|
-
isFirstUpdate = false;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
1547
|
-
// error.
|
|
1548
|
-
try {
|
|
1549
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1550
|
-
...options,
|
|
1551
|
-
// Handle <iframe>s
|
|
1552
|
-
root: root.ownerDocument
|
|
1553
|
-
});
|
|
1554
|
-
} catch (_e) {
|
|
1555
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1556
|
-
}
|
|
1557
|
-
io.observe(element);
|
|
1558
|
-
}
|
|
1559
|
-
refresh(true);
|
|
1560
|
-
return cleanup;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
/**
|
|
1564
|
-
* Automatically updates the position of the floating element when necessary.
|
|
1565
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
1566
|
-
* visible on the screen.
|
|
1567
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
1568
|
-
* removed from the DOM or hidden from the screen.
|
|
1569
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
1570
|
-
*/
|
|
1571
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1572
|
-
if (options === void 0) {
|
|
1573
|
-
options = {};
|
|
1574
|
-
}
|
|
1575
|
-
const {
|
|
1576
|
-
ancestorScroll = true,
|
|
1577
|
-
ancestorResize = true,
|
|
1578
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
1579
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
1580
|
-
animationFrame = false
|
|
1581
|
-
} = options;
|
|
1582
|
-
const referenceEl = unwrapElement(reference);
|
|
1583
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1584
|
-
ancestors.forEach(ancestor => {
|
|
1585
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1586
|
-
passive: true
|
|
1587
|
-
});
|
|
1588
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1589
|
-
});
|
|
1590
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1591
|
-
let reobserveFrame = -1;
|
|
1592
|
-
let resizeObserver = null;
|
|
1593
|
-
if (elementResize) {
|
|
1594
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
1595
|
-
let [firstEntry] = _ref;
|
|
1596
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1597
|
-
// Prevent update loops when using the `size` middleware.
|
|
1598
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1599
|
-
resizeObserver.unobserve(floating);
|
|
1600
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1601
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1602
|
-
var _resizeObserver;
|
|
1603
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
update();
|
|
1607
|
-
});
|
|
1608
|
-
if (referenceEl && !animationFrame) {
|
|
1609
|
-
resizeObserver.observe(referenceEl);
|
|
1610
|
-
}
|
|
1611
|
-
resizeObserver.observe(floating);
|
|
1612
|
-
}
|
|
1613
|
-
let frameId;
|
|
1614
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1615
|
-
if (animationFrame) {
|
|
1616
|
-
frameLoop();
|
|
1617
|
-
}
|
|
1618
|
-
function frameLoop() {
|
|
1619
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1620
|
-
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1621
|
-
update();
|
|
1622
|
-
}
|
|
1623
|
-
prevRefRect = nextRefRect;
|
|
1624
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1625
|
-
}
|
|
1626
|
-
update();
|
|
1627
|
-
return () => {
|
|
1628
|
-
var _resizeObserver2;
|
|
1629
|
-
ancestors.forEach(ancestor => {
|
|
1630
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
1631
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
1632
|
-
});
|
|
1633
|
-
cleanupIo == null || cleanupIo();
|
|
1634
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1635
|
-
resizeObserver = null;
|
|
1636
|
-
if (animationFrame) {
|
|
1637
|
-
cancelAnimationFrame(frameId);
|
|
1638
|
-
}
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* Modifies the placement by translating the floating element along the
|
|
1644
|
-
* specified axes.
|
|
1645
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1646
|
-
* object may be passed.
|
|
1647
|
-
* @see https://floating-ui.com/docs/offset
|
|
1648
|
-
*/
|
|
1649
|
-
const offset = offset$1;
|
|
1650
|
-
|
|
1651
|
-
/**
|
|
1652
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1653
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
1654
|
-
* @see https://floating-ui.com/docs/shift
|
|
1655
|
-
*/
|
|
1656
|
-
const shift = shift$1;
|
|
1657
|
-
|
|
1658
|
-
/**
|
|
1659
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1660
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1661
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
1662
|
-
* @see https://floating-ui.com/docs/flip
|
|
1663
|
-
*/
|
|
1664
|
-
const flip = flip$1;
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* Provides data that allows you to change the size of the floating element —
|
|
1668
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1669
|
-
* width of the reference element.
|
|
1670
|
-
* @see https://floating-ui.com/docs/size
|
|
1671
|
-
*/
|
|
1672
|
-
const size = size$1;
|
|
1673
|
-
|
|
1674
|
-
/**
|
|
1675
|
-
* Provides data to position an inner element of the floating element so that it
|
|
1676
|
-
* appears centered to the reference element.
|
|
1677
|
-
* @see https://floating-ui.com/docs/arrow
|
|
1678
|
-
*/
|
|
1679
|
-
const arrow = arrow$1;
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1683
|
-
* next to a given reference element.
|
|
1684
|
-
*/
|
|
1685
|
-
const computePosition = (reference, floating, options) => {
|
|
1686
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1687
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1688
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
1689
|
-
const cache = new Map();
|
|
1690
|
-
const mergedOptions = {
|
|
1691
|
-
platform,
|
|
1692
|
-
...options
|
|
1693
|
-
};
|
|
1694
|
-
const platformWithCache = {
|
|
1695
|
-
...mergedOptions.platform,
|
|
1696
|
-
_c: cache
|
|
1697
|
-
};
|
|
1698
|
-
return computePosition$1(reference, floating, {
|
|
1699
|
-
...mergedOptions,
|
|
1700
|
-
platform: platformWithCache
|
|
1701
|
-
});
|
|
1702
|
-
};
|
|
1703
|
-
|
|
1704
|
-
const handleArrowRotation = (side) => {
|
|
1705
|
-
switch (side) {
|
|
1706
|
-
case "top":
|
|
1707
|
-
return "rotate(0deg)";
|
|
1708
|
-
case "right":
|
|
1709
|
-
return "rotate(90deg)";
|
|
1710
|
-
case "bottom":
|
|
1711
|
-
return "rotate(180deg)";
|
|
1712
|
-
case "left":
|
|
1713
|
-
return "rotate(270deg)";
|
|
1714
|
-
}
|
|
1715
|
-
};
|
|
1716
|
-
const calcPosition = (xAxis, yAxis, side, hasOverflow) => {
|
|
1717
|
-
const x = setNumberInsteadOfNaN(xAxis);
|
|
1718
|
-
const y = setNumberInsteadOfNaN(yAxis);
|
|
1719
|
-
const overflow = hasOverflow ? 7 : 0;
|
|
1720
|
-
switch (side) {
|
|
1721
|
-
case "top":
|
|
1722
|
-
return { top: `${y - 4 + overflow}px`, left: `${x}px` };
|
|
1723
|
-
case "right":
|
|
1724
|
-
return { top: `${y}px`, left: `${x + 4 - overflow}px` };
|
|
1725
|
-
case "bottom":
|
|
1726
|
-
return { top: `${y + 4 - overflow}px`, left: `${x}px` };
|
|
1727
|
-
case "left":
|
|
1728
|
-
return { top: `${y}px`, left: `${x - 4 + overflow}px` };
|
|
1729
|
-
}
|
|
1730
|
-
};
|
|
1731
|
-
const calcArrowMargin = (side) => {
|
|
1732
|
-
const marginHorizontal = "3px";
|
|
1733
|
-
const marginVertical = "5px";
|
|
1734
|
-
switch (side) {
|
|
1735
|
-
case "top":
|
|
1736
|
-
return `0px 0px ${marginVertical} 0px`;
|
|
1737
|
-
case "right":
|
|
1738
|
-
return `0px 0px 0px ${marginHorizontal}`;
|
|
1739
|
-
case "bottom":
|
|
1740
|
-
return `${marginVertical} 0px 0px 0px`;
|
|
1741
|
-
case "left":
|
|
1742
|
-
return `0px ${marginHorizontal} 0px 0px`;
|
|
1743
|
-
}
|
|
1744
|
-
};
|
|
1745
|
-
const getCurrentPlacement = (data, position) => {
|
|
1746
|
-
if (data && data.offset && data.offset.placement) {
|
|
1747
|
-
return data.offset.placement === position ? position : data.offset.placement;
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1750
|
-
return position;
|
|
1751
|
-
}
|
|
1752
|
-
};
|
|
1753
|
-
const overflowDetected = (data) => {
|
|
1754
|
-
if (data && data.flip && data.flip.overflows && data.flip.overflows.length > 0) {
|
|
1755
|
-
const overflow = data.flip.overflows[0];
|
|
1756
|
-
if (overflow && overflow.placement) {
|
|
1757
|
-
return true;
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
return false;
|
|
1761
|
-
};
|
|
1762
|
-
const updateFloatingBoxPosition = async (referenceElement, floatingBoxElement, floatingArrow, position, autoPosition) => {
|
|
1763
|
-
if (!floatingBoxElement || !referenceElement) {
|
|
1764
|
-
console.warn("[updateFloatingBoxPosition] - Reference element (trigger) and floating element is required");
|
|
1765
|
-
return;
|
|
1766
|
-
}
|
|
1767
|
-
// Autoupdate options
|
|
1768
|
-
const options = {
|
|
1769
|
-
elementResize: true,
|
|
1770
|
-
ancestorScroll: true,
|
|
1771
|
-
ancestorResize: true,
|
|
1772
|
-
layoutShift: true
|
|
1773
|
-
};
|
|
1774
|
-
const updatePositionCallback = () => {
|
|
1775
|
-
try {
|
|
1776
|
-
computePosition(referenceElement, floatingBoxElement, {
|
|
1777
|
-
placement: position,
|
|
1778
|
-
middleware: [
|
|
1779
|
-
shift({ boundary: [] }),
|
|
1780
|
-
offset(),
|
|
1781
|
-
autoPosition ? flip() : null,
|
|
1782
|
-
size({
|
|
1783
|
-
apply({ availableWidth, availableHeight, elements }) {
|
|
1784
|
-
Object.assign(elements.floating.style, {
|
|
1785
|
-
maxWidth: `${setNumberInsteadOfNaN(availableWidth)}px`,
|
|
1786
|
-
maxHeight: `${setNumberInsteadOfNaN(availableHeight)}px`,
|
|
1787
|
-
});
|
|
1788
|
-
},
|
|
1789
|
-
}),
|
|
1790
|
-
floatingArrow ? arrow({ element: floatingArrow, padding: 5 }) : null,
|
|
1791
|
-
],
|
|
1792
|
-
}).then(({ x, y, middlewareData }) => {
|
|
1793
|
-
Object.assign(floatingBoxElement.style, Object.assign({ position: "absolute" }, calcPosition(x, y, position, overflowDetected(middlewareData))));
|
|
1794
|
-
if (middlewareData.arrow && floatingArrow !== null) {
|
|
1795
|
-
const { x, y } = middlewareData.arrow;
|
|
1796
|
-
const side = getCurrentPlacement(middlewareData, position);
|
|
1797
|
-
const staticSide = {
|
|
1798
|
-
top: "bottom",
|
|
1799
|
-
right: "left",
|
|
1800
|
-
bottom: "top",
|
|
1801
|
-
left: "right"
|
|
1802
|
-
}[side];
|
|
1803
|
-
Object.assign(floatingArrow.style, {
|
|
1804
|
-
left: x != null ? `${setNumberInsteadOfNaN(x)}px` : "",
|
|
1805
|
-
top: y != null ? `${setNumberInsteadOfNaN(y)}px` : "",
|
|
1806
|
-
margin: calcArrowMargin(side),
|
|
1807
|
-
[staticSide]: `${-setNumberInsteadOfNaN(floatingArrow.offsetWidth)}px`,
|
|
1808
|
-
transform: handleArrowRotation(side)
|
|
1809
|
-
});
|
|
1810
|
-
}
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1813
|
-
catch (error) {
|
|
1814
|
-
console.warn("[updatePositionCallback] ", error);
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
const cleanup = autoUpdate(referenceElement, floatingBoxElement, updatePositionCallback, options);
|
|
1818
|
-
if (!autoPosition) {
|
|
1819
|
-
cleanup();
|
|
1820
|
-
}
|
|
1821
|
-
return cleanup;
|
|
1822
|
-
};
|
|
1823
|
-
const setNumberInsteadOfNaN = (input) => input > 0 ? input : 0;
|
|
1824
|
-
|
|
1825
|
-
export { updateFloatingBoxPosition as u };
|
|
1826
|
-
//# sourceMappingURL=floating-engine-utils.js.map
|
|
1827
|
-
|
|
1828
|
-
//# sourceMappingURL=floating-engine-utils.js.map
|
|
1
|
+
const t=["top","right","bottom","left"],e=["start","end"],n=t.reduce(((t,n)=>t.concat(n,n+"-"+e[0],n+"-"+e[1])),[]),o=Math.min,r=Math.max,i=Math.round,a=Math.floor,l=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"},s={start:"end",end:"start"};function u(t,e,n){return r(t,o(e,n))}function f(t,e){return"function"==typeof t?t(e):t}function d(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function p(t){return"x"===t?"y":"x"}function h(t){return"y"===t?"height":"width"}const y=new Set(["top","bottom"]);function g(t){return y.has(d(t))?"y":"x"}function x(t){return p(g(t))}function w(t){return t.replace(/left|right|bottom|top/g,(t=>c[t]))}function v(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function b(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function S(t,e,n){let{reference:o,floating:r}=t;const i=g(e),a=x(e),l=h(a),c=d(e),s="y"===i,u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let y;switch(c){case"top":y={x:u,y:o.y-r.height};break;case"bottom":y={x:u,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:f};break;case"left":y={x:o.x-r.width,y:f};break;default:y={x:o.x,y:o.y}}switch(m(e)){case"start":y[a]-=p*(n&&s?-1:1);break;case"end":y[a]+=p*(n&&s?-1:1)}return y}async function A(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:c}=t,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=f(e,t),h=v(p),y=l[m?"floating"===d?"reference":"floating":d],g=b(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),x="floating"===d?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),S=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},A=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(g.top-A.top+h.top)/S.y,bottom:(A.bottom-g.bottom+h.bottom)/S.y,left:(g.left-A.left+h.left)/S.x,right:(A.right-g.right+h.right)/S.x}}function O(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function R(e){return t.some((t=>e[t]>=0))}const F=new Set(["left","top"]);function M(){return"undefined"!=typeof window}function C(t){return z(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function k(t){var e;return null==(e=(z(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function z(t){return!!M()&&(t instanceof Node||t instanceof P(t).Node)}function H(t){return!!M()&&(t instanceof Element||t instanceof P(t).Element)}function T(t){return!!M()&&(t instanceof HTMLElement||t instanceof P(t).HTMLElement)}function $(t){return!(!M()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof P(t).ShadowRoot)}const B=new Set(["inline","contents"]);function D(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!B.has(r)}const j=new Set(["table","td","th"]);function E(t){return j.has(C(t))}const L=[":popover-open",":modal"];function W(t){return L.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const q=["transform","translate","scale","rotate","perspective"],I=["transform","translate","scale","rotate","perspective","filter"],N=["paint","layout","strict","content"];function V(t){const e=X(),n=H(t)?G(t):t;return q.some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||I.some((t=>(n.willChange||"").includes(t)))||N.some((t=>(n.contain||"").includes(t)))}function X(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Y=new Set(["html","body","#document"]);function _(t){return Y.has(C(t))}function G(t){return P(t).getComputedStyle(t)}function J(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if("html"===C(t))return t;const e=t.assignedSlot||t.parentNode||$(t)&&t.host||k(t);return $(e)?e.host:e}function Q(t){const e=K(t);return _(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&D(e)?e:Q(e)}function U(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=Q(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),a=P(r);if(i){const t=Z(a);return e.concat(a,a.visualViewport||[],D(r)?r:[],t&&n?U(t):[])}return e.concat(r,U(r,[],n))}function Z(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tt(t){const e=G(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=T(t),a=r?t.offsetWidth:n,l=r?t.offsetHeight:o,c=i(n)!==a||i(o)!==l;return c&&(n=a,o=l),{width:n,height:o,$:c}}function et(t){return H(t)?t:t.contextElement}function nt(t){const e=et(t);if(!T(e))return l(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:a}=tt(e);let c=(a?i(n.width):n.width)/o,s=(a?i(n.height):n.height)/r;return c&&Number.isFinite(c)||(c=1),s&&Number.isFinite(s)||(s=1),{x:c,y:s}}const ot=l(0);function rt(t){const e=P(t);return X()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ot}function it(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=et(t);let a=l(1);e&&(o?H(o)&&(a=nt(o)):a=nt(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==P(t))&&e}(i,n,o)?rt(i):l(0);let s=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,f=r.width/a.x,d=r.height/a.y;if(i){const t=P(i),e=o&&H(o)?P(o):o;let n=t,r=Z(n);for(;r&&o&&e!==n;){const t=nt(r),e=r.getBoundingClientRect(),o=G(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,a=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=a,n=P(r),r=Z(n)}}return b({width:f,height:d,x:s,y:u})}function at(t,e){const n=J(t).scrollLeft;return e?e.left+n:it(k(t)).left+n}function lt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-at(t,n),y:n.top+e.scrollTop}}const ct=new Set(["absolute","fixed"]);function st(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=P(t),o=k(t),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(r){i=r.width,a=r.height;const t=X();(!t||t&&"fixed"===e)&&(l=r.offsetLeft,c=r.offsetTop)}const s=at(o);if(s<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(o.clientWidth-e.clientWidth-r);a<=25&&(i-=a)}else s<=25&&(i+=s);return{width:i,height:a,x:l,y:c}}(t,n);else if("document"===e)o=function(t){const e=k(t),n=J(t),o=t.ownerDocument.body,i=r(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=r(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+at(t);const c=-n.scrollTop;return"rtl"===G(o).direction&&(l+=r(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:l,y:c}}(k(t));else if(H(e))o=function(t,e){const n=it(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=T(t)?nt(t):l(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=rt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return b(o)}function ut(t,e){const n=K(t);return!(n===e||!H(n)||_(n))&&("fixed"===G(n).position||ut(n,e))}function ft(t,e,n){const o=T(e),r=k(e),i="fixed"===n,a=it(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const s=l(0);function u(){s.x=at(r)}if(o||!o&&!i)if(("body"!==C(e)||D(r))&&(c=J(e)),o){const t=it(e,!0,i,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else r&&u();i&&!o&&r&&u();const f=!r||o||i?l(0):lt(r,c);return{x:a.left+c.scrollLeft-s.x-f.x,y:a.top+c.scrollTop-s.y-f.y,width:a.width,height:a.height}}function dt(t){return"static"===G(t).position}function mt(t,e){if(!T(t)||"fixed"===G(t).position)return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function pt(t,e){const n=P(t);if(W(t))return n;if(!T(t)){let e=K(t);for(;e&&!_(e);){if(H(e)&&!dt(e))return e;e=K(e)}return n}let o=mt(t,e);for(;o&&E(o)&&dt(o);)o=mt(o,e);return o&&_(o)&&dt(o)&&!V(o)?n:o||function(t){let e=K(t);for(;T(e)&&!_(e);){if(V(e))return e;if(W(e))return null;e=K(e)}return null}(t)||n}const ht={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=k(o),c=!!e&&W(e.floating);if(o===a||c&&i)return n;let s={scrollLeft:0,scrollTop:0},u=l(1);const f=l(0),d=T(o);if((d||!d&&!i)&&(("body"!==C(o)||D(a))&&(s=J(o)),T(o))){const t=it(o);u=nt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!a||d||i?l(0):lt(a,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:k,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:a}=t;const l=[..."clippingAncestors"===n?W(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=U(t,[],!1).filter((t=>H(t)&&"body"!==C(t))),r=null;const i="fixed"===G(t).position;let a=i?K(t):t;for(;H(a)&&!_(a);){const e=G(a),n=V(a);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&ct.has(r.position)||D(a)&&!n&&ut(t,a))?o=o.filter((t=>t!==a)):r=e,a=K(a)}return e.set(t,o),o}(e,this._c):[].concat(n),i],c=l.reduce(((t,n)=>{const i=st(e,n,a);return t.top=r(i.top,t.top),t.right=o(i.right,t.right),t.bottom=o(i.bottom,t.bottom),t.left=r(i.left,t.left),t}),st(e,l[0],a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:pt,getElementRects:async function(t){const e=this.getOffsetParent||pt,n=this.getDimensions,o=await n(t.floating);return{reference:ft(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=tt(t);return{width:e,height:n}},getScale:nt,isElement:H,isRTL:function(t){return"rtl"===G(t).direction}};function yt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function gt(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=i,d=et(t),m=l||c?[...d?U(d):[],...U(e)]:[];m.forEach((t=>{l&&t.addEventListener("scroll",n,{passive:!0}),c&&t.addEventListener("resize",n)}));const p=d&&u?function(t,e){let n,i=null;const l=k(t);function c(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),c();const d=t.getBoundingClientRect(),{left:m,top:p,width:h,height:y}=d;if(u||e(),!h||!y)return;const g={rootMargin:-a(p)+"px "+-a(l.clientWidth-(m+h))+"px "+-a(l.clientHeight-(p+y))+"px "+-a(m)+"px",threshold:r(0,o(1,f))||1};let x=!0;function w(e){const o=e[0].intersectionRatio;if(o!==f){if(!x)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||yt(d,t.getBoundingClientRect())||s(),x=!1}try{i=new IntersectionObserver(w,{...g,root:l.ownerDocument})}catch(t){i=new IntersectionObserver(w,g)}i.observe(t)}(!0),c}(d,n):null;let h,y=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&g&&(g.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),d&&!f&&g.observe(d),g.observe(e));let x=f?it(t):null;return f&&function e(){const o=it(t);x&&!yt(x,o)&&n(),x=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;m.forEach((t=>{l&&t.removeEventListener("scroll",n),c&&t.removeEventListener("resize",n)})),null==p||p(),null==(t=g)||t.disconnect(),g=null,f&&cancelAnimationFrame(h)}}const xt=A,wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:a,middlewareData:l}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=d(n),l=m(n),c="y"===g(n),s=F.has(a)?-1:1,u=i&&c?-1:1,p=f(e,t);let{mainAxis:h,crossAxis:y,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof x&&(y="end"===l?-1*x:x),c?{x:y*u,y:h*s}:{x:h*s,y:y*u}}(e,t);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}},vt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,r,i;const{rects:a,middlewareData:l,placement:c,platform:u,elements:p}=e,{crossAxis:y=!1,alignment:g,allowedPlacements:v=n,autoAlignment:b=!0,...S}=f(t,e),A=void 0!==g||v===n?function(t,e,n){return(t?[...n.filter((e=>m(e)===t)),...n.filter((e=>m(e)!==t))]:n.filter((t=>d(t)===t))).filter((n=>!t||m(n)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>s[t]))}(n)!==n))}(g||null,b,v):v,O=await u.detectOverflow(e,S),R=(null==(o=l.autoPlacement)?void 0:o.index)||0,F=A[R];if(null==F)return{};const M=function(t,e,n){void 0===n&&(n=!1);const o=m(t),r=x(t),i=h(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=w(a)),[a,w(a)]}(F,a,await(null==u.isRTL?void 0:u.isRTL(p.floating)));if(c!==F)return{reset:{placement:A[0]}};const C=[O[d(F)],O[M[0]],O[M[1]]],P=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:F,overflows:C}],k=A[R+1];if(k)return{data:{index:R+1,overflows:P},reset:{placement:k}};const z=P.map((t=>{const e=m(t.placement);return[t.placement,e&&y?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),H=(null==(i=z.filter((t=>t[2].slice(0,m(t[0])?2:3).every((t=>t<=0))))[0])?void 0:i[0])||z[0][0];return H!==c?{data:{index:R+1,overflows:P},reset:{placement:H}}:{}}}},bt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...s}=f(t,e),m={x:n,y:o},h=await i.detectOverflow(e,s),y=g(d(r)),x=p(y);let w=m[x],v=m[y];a&&(w=u(w+h["y"===x?"top":"left"],w,w-h["y"===x?"bottom":"right"])),l&&(v=u(v+h["y"===y?"top":"left"],v,v-h["y"===y?"bottom":"right"]));const b=c.fn({...e,[x]:w,[y]:v});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[x]:a,[y]:l}}}}}},St=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:a,rects:l,platform:c,elements:s}=e,{apply:u=()=>{},...p}=f(t,e),h=await c.detectOverflow(e,p),y=d(a),x=m(a),w="y"===g(a),{width:v,height:b}=l.floating;let S,A;"top"===y||"bottom"===y?(S=y,A=x===(await(null==c.isRTL?void 0:c.isRTL(s.floating))?"start":"end")?"left":"right"):(A=y,S="end"===x?"top":"bottom");const O=b-h.top-h.bottom,R=v-h.left-h.right;let F=o(b-h[S],O),M=o(v-h[A],R);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(M=R),null!=(i=e.middlewareData.shift)&&i.enabled.y&&(F=O),!e.middlewareData.shift&&!x){const t=r(h.left,0),e=r(h.right,0),n=r(h.top,0),o=r(h.bottom,0);w?M=v-2*(0!==t||0!==e?t+e:r(h.left,h.right)):F=b-2*(0!==n||0!==o?n+o:r(h.top,h.bottom))}await u({...e,availableWidth:M,availableHeight:F});const C=await c.getDimensions(s.floating);return v!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}},At=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=f(t,e);switch(r){case"referenceHidden":{const t=O(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:R(t)}}}case"escaped":{const t=O(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:R(t)}}}default:return{}}}}},Ot=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:a,platform:l,elements:c,middlewareData:s}=e,{element:d,padding:p=0}=f(t,e)||{};if(null==d)return{};const y=v(p),g={x:n,y:r},w=x(i),b=h(w),S=await l.getDimensions(d),A="y"===w,O=A?"top":"left",R=A?"bottom":"right",F=A?"clientHeight":"clientWidth",M=a.reference[b]+a.reference[w]-g[w]-a.floating[b],C=g[w]-a.reference[w],P=await(null==l.getOffsetParent?void 0:l.getOffsetParent(d));let k=P?P[F]:0;k&&await(null==l.isElement?void 0:l.isElement(P))||(k=c.floating[F]||a.floating[b]);const z=M/2-C/2,H=k/2-S[b]/2-1,T=o(y[O],H),$=o(y[R],H),B=T,D=k-S[b]-$,j=k/2-S[b]/2+z,E=u(B,j,D),L=!s.arrow&&null!=m(i)&&j!==E&&a.reference[b]/2-(j<B?T:$)-S[b]/2<0,W=L?j<B?j-B:j-D:0;return{[w]:g[w]+W,data:{[w]:E,centerOffset:j-E-W,...L&&{alignmentOffset:W}},reset:L}}}),Rt=(t,e,n)=>{const o=new Map,r={platform:ht,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(e));let s=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=S(s,o,c),d=o,m={},p=0;for(let n=0;n<l.length;n++){var h;const{name:i,fn:y}=l[n],{x:g,y:x,data:w,reset:v}=await y({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:s,platform:{...a,detectOverflow:null!=(h=a.detectOverflow)?h:A},elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=x?x:f,m={...m,[i]:{...m[i],...w}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(s=!0===v.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:u,y:f}=S(s,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:m}})(t,e,{...r,platform:i})},Ft=(t,e)=>t.shadowRoot.querySelector(e),Mt=(t,e)=>t.shadowRoot.querySelector(e),Ct=(t,e)=>t.shadowRoot.querySelector(e),Pt={top:"rotate(0deg)",right:"rotate(90deg)",bottom:"rotate(180deg)",left:"rotate(270deg)"},kt={top:"0 0 5px 0",right:"0 0 0 3px",bottom:"5px 0 0 0",left:"0 3px 0 0"},zt={top:"bottom",right:"left",bottom:"top",left:"right"},Ht={elementResize:!0,ancestorScroll:!0,ancestorResize:!0,layoutShift:!0},Tt=async(t,e,n,o,r,i=null,a=!1)=>{if(!e||!t)return console.warn("[updateFloatingBoxPosition] - Reference element (trigger) and floating element is required"),()=>{};const l=()=>{try{Rt(t,e,{placement:o,middleware:[wt(4),r?bt({padding:4}):null,r?vt(i?{allowedPlacements:i}:{}):null,r?At():null,St({apply({availableWidth:t,availableHeight:e,elements:n}){Object.assign(n.floating.style,{maxWidth:`${Math.max(0,t||0)}px`,maxHeight:`${Math.max(0,e||0)}px`})}}),n?Ot({element:n,padding:5}):null].filter(Boolean)}).then((({x:t,y:o,placement:r,middlewareData:i})=>{if(i.hide){const t=i.hide.referenceHidden;if(Object.assign(e.style,{visibility:t?"hidden":"visible",pointerEvents:t?"none":"auto"}),t)return}if(Object.assign(e.style,{position:"absolute",top:`${o||0}px`,left:a&&r.endsWith("-end")?"":`${t||0}px`,right:a&&r.endsWith("-end")?"0px":""}),i.arrow&&null!==n){const{x:t,y:e}=i.arrow,o=r.split("-")[0];Object.assign(n.style,{top:null!=e?`${Math.max(0,e||0)}px`:"",left:null!=t?`${Math.max(0,t||0)}px`:"",margin:kt[o],[zt[o]]:`-${n.offsetWidth||0}px`,transform:Pt[o]})}}))}catch(t){console.warn("[updatePositionCallback] ",t)}};return r?gt(t,e,l,Ht):(l(),()=>{})},$t=(t,e)=>{t&&(t.style.display=e?"block":"none")};export{gt as a,Ot as b,Rt as c,St as d,xt as e,vt as f,Mt as g,At as h,Ct as i,Ft as j,wt as o,bt as s,$t as t,Tt as u}
|