@maggioli-design-system/magma 2.0.0-alpha.1 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/dist/cjs/{datetime-CVIe4VUc.js → datetime-DHnUzK2K.js} +1 -1
- package/dist/cjs/{index-BoL6yK0y.js → index-CNuKb6Lv.js} +482 -370
- package/dist/cjs/index.cjs.js +257 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/magma-components.cjs.js +3 -3
- package/dist/cjs/mds-accordion-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +7 -5
- package/dist/cjs/mds-accordion-timer.cjs.entry.js +9 -7
- package/dist/cjs/mds-accordion.cjs.entry.js +4 -4
- package/dist/cjs/mds-author.cjs.entry.js +4 -4
- package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-avatar-stack.cjs.entry.js +4 -4
- package/dist/cjs/mds-avatar.cjs.entry.js +41 -14
- package/dist/cjs/mds-badge.cjs.entry.js +8 -6
- package/dist/cjs/mds-banner_3.cjs.entry.js +33 -19
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +8 -6
- package/dist/cjs/mds-bibliography.cjs.entry.js +8 -8
- package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +7 -4
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/mds-button-group.cjs.entry.js +4 -4
- package/dist/cjs/mds-button_3.cjs.entry.js +44 -249
- package/dist/cjs/mds-calendar_2.cjs.entry.js +287 -144
- package/dist/cjs/mds-card-content.cjs.entry.js +4 -4
- package/dist/cjs/mds-card-footer.cjs.entry.js +4 -4
- package/dist/cjs/mds-card-header.cjs.entry.js +4 -4
- package/dist/cjs/mds-card-media.cjs.entry.js +4 -4
- package/dist/cjs/mds-card.cjs.entry.js +11 -13
- package/dist/cjs/mds-details.cjs.entry.js +7 -5
- package/dist/cjs/mds-dropdown.cjs.entry.js +42 -18
- package/dist/cjs/mds-emoji.cjs.entry.js +29 -20
- package/dist/cjs/mds-entity.cjs.entry.js +4 -4
- package/dist/cjs/mds-file-preview.cjs.entry.js +18 -6
- package/dist/cjs/mds-file.cjs.entry.js +10 -5
- package/dist/cjs/mds-filter-item.cjs.entry.js +7 -7
- package/dist/cjs/mds-filter.cjs.entry.js +5 -5
- package/dist/cjs/mds-header-bar.cjs.entry.js +8 -4
- package/dist/cjs/mds-header.cjs.entry.js +30 -16
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +18 -13
- package/dist/cjs/mds-hr.cjs.entry.js +4 -4
- package/dist/cjs/mds-img.cjs.entry.js +15 -8
- package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +4 -4
- package/dist/cjs/mds-input-date-range.cjs.entry.js +221 -71
- package/dist/cjs/mds-input-date.cjs.entry.js +40 -17
- package/dist/cjs/mds-input-field.cjs.entry.js +7 -7
- package/dist/cjs/mds-input-otp.cjs.entry.js +6 -6
- package/dist/cjs/mds-input-range.cjs.entry.js +19 -9
- package/dist/cjs/mds-input-select.cjs.entry.js +39 -19
- package/dist/cjs/mds-input-switch_2.cjs.entry.js +19 -10
- package/dist/cjs/mds-input-tip_2.cjs.entry.js +14 -9
- package/dist/cjs/mds-input-upload.cjs.entry.js +19 -12
- package/dist/cjs/mds-input.cjs.entry.js +39 -16
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +8 -5
- package/dist/cjs/mds-keyboard.cjs.entry.js +13 -8
- package/dist/cjs/mds-kpi-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-kpi.cjs.entry.js +4 -4
- package/dist/cjs/mds-label.cjs.entry.js +7 -4
- package/dist/cjs/mds-list-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-list.cjs.entry.js +4 -4
- package/dist/cjs/mds-mention.cjs.entry.js +4 -4
- package/dist/cjs/mds-modal.cjs.entry.js +22 -15
- package/dist/cjs/mds-note.cjs.entry.js +7 -4
- package/dist/cjs/mds-notification.cjs.entry.js +11 -9
- package/dist/cjs/mds-paginator-item.cjs.entry.js +7 -7
- package/dist/cjs/mds-paginator.cjs.entry.js +4 -4
- package/dist/cjs/mds-policy-ai.cjs.entry.js +7 -4
- package/dist/cjs/mds-pref-animation.cjs.entry.js +13 -8
- package/dist/cjs/mds-pref-consumption.cjs.entry.js +13 -8
- package/dist/cjs/mds-pref-contrast.cjs.entry.js +14 -9
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +7 -4
- package/dist/cjs/mds-pref-language.cjs.entry.js +8 -5
- package/dist/cjs/mds-pref-theme-variant-item.cjs.entry.js +8 -5
- package/dist/cjs/mds-pref-theme-variant.cjs.entry.js +9 -6
- package/dist/cjs/mds-pref-theme.cjs.entry.js +17 -12
- package/dist/cjs/mds-pref.cjs.entry.js +15 -8
- package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-features-row.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-features.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-header.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-list-item.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table-list.cjs.entry.js +4 -4
- package/dist/cjs/mds-price-table.cjs.entry.js +4 -4
- package/dist/cjs/mds-progress_2.cjs.entry.js +17 -11
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +12 -7
- package/dist/cjs/mds-push-notification.cjs.entry.js +22 -10
- package/dist/cjs/mds-quote.cjs.entry.js +4 -4
- package/dist/cjs/mds-radial-menu-item.cjs.entry.js +7 -4
- package/dist/cjs/mds-radial-menu.cjs.entry.js +30 -14
- package/dist/cjs/mds-separator.cjs.entry.js +4 -4
- package/dist/cjs/mds-status-bar.cjs.entry.js +10 -5
- package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +13 -6
- package/dist/cjs/mds-stepper-bar.cjs.entry.js +8 -6
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +14 -7
- package/dist/cjs/mds-tab-bar.cjs.entry.js +4 -4
- package/dist/cjs/mds-tab_2.cjs.entry.js +28 -16
- package/dist/cjs/mds-table-body.cjs.entry.js +4 -4
- package/dist/cjs/mds-table-footer.cjs.entry.js +4 -4
- package/dist/cjs/mds-table-header-cell.cjs.entry.js +27 -12
- package/dist/cjs/mds-table-header.cjs.entry.js +13 -5
- package/dist/cjs/mds-table-row.cjs.entry.js +12 -6
- package/dist/cjs/mds-table.cjs.entry.js +11 -7
- package/dist/cjs/mds-text.cjs.entry.js +9 -7
- package/dist/cjs/mds-toast.cjs.entry.js +12 -8
- package/dist/cjs/mds-tooltip.cjs.entry.js +35 -15
- package/dist/cjs/mds-tree-item.cjs.entry.js +16 -6
- package/dist/cjs/mds-tree.cjs.entry.js +14 -8
- package/dist/cjs/mds-url-view.cjs.entry.js +10 -7
- package/dist/cjs/mds-usage.cjs.entry.js +7 -4
- package/dist/cjs/mds-video-wall.cjs.entry.js +4 -4
- package/dist/cjs/mds-zero.cjs.entry.js +4 -4
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/mds-accordion/mds-accordion.js +4 -3
- package/dist/collection/components/mds-accordion-item/mds-accordion-item.js +10 -6
- package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.js +6 -5
- package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +12 -7
- package/dist/collection/components/mds-author/mds-author.js +2 -2
- package/dist/collection/components/mds-avatar/mds-avatar.js +30 -9
- package/dist/collection/components/mds-avatar-stack/mds-avatar-stack.js +6 -2
- package/dist/collection/components/mds-avatar-stack-item/mds-avatar-stack-item.js +5 -3
- package/dist/collection/components/mds-badge/mds-badge.js +9 -6
- package/dist/collection/components/mds-banner/mds-banner.js +11 -6
- package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +9 -6
- package/dist/collection/components/mds-bibliography/mds-bibliography.js +15 -10
- package/dist/collection/components/mds-breadcrumb/mds-breadcrumb.js +8 -4
- package/dist/collection/components/mds-breadcrumb-item/mds-breadcrumb-item.js +3 -2
- package/dist/collection/components/mds-button/mds-button.js +23 -13
- package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +16 -7
- package/dist/collection/components/mds-button-group/mds-button-group.js +4 -1
- package/dist/collection/components/mds-calendar/mds-calendar.css +63 -5
- package/dist/collection/components/mds-calendar/mds-calendar.js +450 -143
- package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.js +7 -4
- package/dist/collection/components/mds-card/mds-card.js +8 -10
- package/dist/collection/components/mds-card-content/mds-card-content.js +2 -2
- package/dist/collection/components/mds-card-footer/mds-card-footer.js +2 -2
- package/dist/collection/components/mds-card-header/mds-card-header.js +2 -2
- package/dist/collection/components/mds-card-media/mds-card-media.js +2 -2
- package/dist/collection/components/mds-chip/mds-chip.js +20 -12
- package/dist/collection/components/mds-details/mds-details.js +2 -2
- package/dist/collection/components/mds-dropdown/mds-dropdown.js +16 -10
- package/dist/collection/components/mds-emoji/mds-emoji.js +18 -7
- package/dist/collection/components/mds-entity/mds-entity.js +6 -4
- package/dist/collection/components/mds-file/mds-file.js +10 -5
- package/dist/collection/components/mds-file-preview/mds-file-preview.js +21 -8
- package/dist/collection/components/mds-filter/mds-filter.js +5 -4
- package/dist/collection/components/mds-filter-item/mds-filter-item.js +6 -5
- package/dist/collection/components/mds-header/mds-header.js +30 -17
- package/dist/collection/components/mds-header-bar/mds-header-bar.js +16 -7
- package/dist/collection/components/mds-help/mds-help.js +4 -3
- package/dist/collection/components/mds-horizontal-scroll/mds-horizontal-scroll.js +19 -13
- package/dist/collection/components/mds-hr/mds-hr.js +1 -1
- package/dist/collection/components/mds-icon/mds-icon.js +2 -2
- package/dist/collection/components/mds-icon/services/icons-set.service.js +33 -1
- package/dist/collection/components/mds-img/mds-img.js +17 -9
- package/dist/collection/components/mds-input/mds-input.js +65 -30
- package/dist/collection/components/mds-input-date/mds-input-date.js +52 -22
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +37 -1
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +245 -84
- package/dist/collection/components/mds-input-date-range/test/mds-input-date-range.stories.js +10 -0
- package/dist/collection/components/mds-input-date-range-preselection/mds-input-date-range-preselection.js +4 -1
- package/dist/collection/components/mds-input-field/mds-input-field.js +9 -5
- package/dist/collection/components/mds-input-otp/mds-input-otp.js +3 -3
- package/dist/collection/components/mds-input-range/mds-input-range.js +2 -1
- package/dist/collection/components/mds-input-select/mds-input-select.js +33 -16
- package/dist/collection/components/mds-input-switch/mds-input-switch.js +18 -9
- package/dist/collection/components/mds-input-tip/mds-input-tip.js +6 -2
- package/dist/collection/components/mds-input-tip-item/mds-input-tip-item.js +11 -4
- package/dist/collection/components/mds-input-upload/mds-input-upload.js +15 -10
- package/dist/collection/components/mds-keyboard/mds-keyboard.js +13 -6
- package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +9 -5
- package/dist/collection/components/mds-kpi/mds-kpi.js +2 -2
- package/dist/collection/components/mds-kpi-item/mds-kpi-item.js +1 -1
- package/dist/collection/components/mds-label/mds-label.js +11 -5
- package/dist/collection/components/mds-list/mds-list.js +2 -2
- package/dist/collection/components/mds-list-item/mds-list-item.js +8 -5
- package/dist/collection/components/mds-mention/mds-mention.js +3 -2
- package/dist/collection/components/mds-modal/mds-modal.js +25 -17
- package/dist/collection/components/mds-note/mds-note.js +8 -4
- package/dist/collection/components/mds-notification/mds-notification.js +7 -6
- package/dist/collection/components/mds-paginator/mds-paginator.js +3 -2
- package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +5 -5
- package/dist/collection/components/mds-policy-ai/mds-policy-ai.js +7 -3
- package/dist/collection/components/mds-pref/mds-pref.js +10 -6
- package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +14 -8
- package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +14 -8
- package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +15 -9
- package/dist/collection/components/mds-pref-language/mds-pref-language.js +13 -7
- package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +7 -3
- package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +20 -13
- package/dist/collection/components/mds-pref-theme-variant/mds-pref-theme-variant.js +16 -9
- package/dist/collection/components/mds-pref-theme-variant-item/mds-pref-theme-variant-item.js +10 -5
- package/dist/collection/components/mds-price-table/mds-price-table.js +4 -1
- package/dist/collection/components/mds-price-table-features/mds-price-table-features.js +2 -2
- package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.js +4 -3
- package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.js +2 -2
- package/dist/collection/components/mds-price-table-header/mds-price-table-header.js +4 -1
- package/dist/collection/components/mds-price-table-list/mds-price-table-list.js +2 -2
- package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.js +6 -2
- package/dist/collection/components/mds-progress/mds-progress.js +10 -6
- package/dist/collection/components/mds-push-notification/mds-push-notification.js +27 -15
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +17 -9
- package/dist/collection/components/mds-quote/mds-quote.js +6 -4
- package/dist/collection/components/mds-radial-menu/mds-radial-menu.js +16 -8
- package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.js +11 -5
- package/dist/collection/components/mds-radial-progress/mds-radial-progress.js +5 -3
- package/dist/collection/components/mds-separator/mds-separator.js +1 -1
- package/dist/collection/components/mds-spinner/mds-spinner.js +1 -1
- package/dist/collection/components/mds-status-bar/mds-status-bar.js +10 -5
- package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +7 -5
- package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +9 -4
- package/dist/collection/components/mds-tab/mds-tab.js +13 -9
- package/dist/collection/components/mds-tab-bar/mds-tab-bar.js +4 -3
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +9 -5
- package/dist/collection/components/mds-tab-item/mds-tab-item.js +11 -6
- package/dist/collection/components/mds-table/mds-table.js +9 -7
- package/dist/collection/components/mds-table-body/mds-table-body.js +4 -4
- package/dist/collection/components/mds-table-cell/mds-table-cell.js +2 -2
- package/dist/collection/components/mds-table-footer/mds-table-footer.js +2 -2
- package/dist/collection/components/mds-table-header/mds-table-header.js +23 -9
- package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +21 -9
- package/dist/collection/components/mds-table-row/mds-table-row.js +16 -10
- package/dist/collection/components/mds-text/mds-text.js +15 -10
- package/dist/collection/components/mds-toast/mds-toast.js +10 -7
- package/dist/collection/components/mds-tooltip/mds-tooltip.js +9 -6
- package/dist/collection/components/mds-tree/mds-tree.js +13 -8
- package/dist/collection/components/mds-tree-item/mds-tree-item.js +21 -10
- package/dist/collection/components/mds-url-view/mds-url-view.js +10 -6
- package/dist/collection/components/mds-usage/mds-usage.js +8 -4
- package/dist/collection/components/mds-video-wall/mds-video-wall.js +6 -4
- package/dist/collection/components/mds-zero/mds-zero.js +2 -2
- package/dist/collection/index.js +15 -0
- package/dist/components/_commonjsHelpers.js +1 -32
- package/dist/components/aria.js +1 -45
- package/dist/components/arrow-back.js +1 -3
- package/dist/components/arrow-forward.js +1 -3
- package/dist/components/broken-image.js +1 -3
- package/dist/components/browser.js +1 -8
- package/dist/components/calendar-today.js +1 -3
- package/dist/components/cancel.js +1 -3
- package/dist/components/check-circle.js +1 -3
- package/dist/components/circle.js +1 -3
- package/dist/components/close.js +1 -3
- package/dist/components/clsx.js +1 -3
- package/dist/components/date.js +1 -14
- package/dist/components/done.js +1 -3
- package/dist/components/floating-controller.js +1 -200
- package/dist/components/floating-ui.dom.js +1 -1695
- package/dist/components/horizontal-rule.js +1 -3
- package/dist/components/icons-set.service.js +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/keyboard-arrow-down.js +1 -3
- package/dist/components/keyboard-arrow-right.js +1 -3
- package/dist/components/keyboard-arrow-up.js +1 -3
- package/dist/components/keyboard-manager.js +1 -50
- package/dist/components/keys.js +1 -775
- package/dist/components/locale.it.js +1 -571
- package/dist/components/locale.js +1 -831
- package/dist/components/mds-accordion-item.js +1 -63
- package/dist/components/mds-accordion-timer-item.js +1 -120
- package/dist/components/mds-accordion-timer.js +1 -179
- package/dist/components/mds-accordion.js +1 -83
- package/dist/components/mds-author.js +1 -39
- package/dist/components/mds-avatar-stack-item.js +1 -6
- package/dist/components/mds-avatar-stack-item2.js +1 -78
- package/dist/components/mds-avatar-stack.js +1 -84
- package/dist/components/mds-avatar.js +1 -6
- package/dist/components/mds-avatar2.js +1 -246
- package/dist/components/mds-badge.js +1 -6
- package/dist/components/mds-badge2.js +1 -71
- package/dist/components/mds-banner.js +1 -6
- package/dist/components/mds-banner2.js +1 -177
- package/dist/components/mds-benchmark-bar.js +1 -99
- package/dist/components/mds-bibliography.js +1 -179
- package/dist/components/mds-breadcrumb-item.js +1 -70
- package/dist/components/mds-breadcrumb.js +1 -177
- package/dist/components/mds-button-dropdown.js +1 -104
- package/dist/components/mds-button-group.js +1 -35
- package/dist/components/mds-button.js +1 -6
- package/dist/components/mds-button2.js +1 -280
- package/dist/components/mds-calendar-cell.js +1 -6
- package/dist/components/mds-calendar-cell2.js +1 -86
- package/dist/components/mds-calendar.js +1 -6
- package/dist/components/mds-calendar2.js +1 -8602
- package/dist/components/mds-card-content.js +1 -35
- package/dist/components/mds-card-footer.js +1 -35
- package/dist/components/mds-card-header.js +1 -39
- package/dist/components/mds-card-media.js +1 -35
- package/dist/components/mds-card.js +1 -60
- package/dist/components/mds-chip.js +1 -6
- package/dist/components/mds-chip2.js +1 -195
- package/dist/components/mds-details.js +1 -81
- package/dist/components/mds-dropdown.js +1 -6
- package/dist/components/mds-dropdown2.js +1 -285
- package/dist/components/mds-emoji.js +3 -6971
- package/dist/components/mds-entity.js +1 -99
- package/dist/components/mds-file-preview.js +1 -6
- package/dist/components/mds-file-preview2.js +8 -359
- package/dist/components/mds-file.js +14 -7649
- package/dist/components/mds-filter-item.js +1 -6
- package/dist/components/mds-filter-item2.js +1 -67
- package/dist/components/mds-filter.js +1 -151
- package/dist/components/mds-header-bar.js +1 -88
- package/dist/components/mds-header.js +1 -256
- package/dist/components/mds-help.js +1 -6
- package/dist/components/mds-help2.js +1 -65
- package/dist/components/mds-horizontal-scroll.js +1 -267
- package/dist/components/mds-hr.js +1 -35
- package/dist/components/mds-icon.js +1 -6
- package/dist/components/mds-icon2.js +1 -313
- package/dist/components/mds-img.js +1 -6
- package/dist/components/mds-img2.js +1 -209
- package/dist/components/mds-input-date-range-preselection.js +1 -73
- package/dist/components/mds-input-date-range.js +1 -420
- package/dist/components/mds-input-date.js +1 -257
- package/dist/components/mds-input-field.js +1 -75
- package/dist/components/mds-input-otp.js +1 -156
- package/dist/components/mds-input-range.js +1 -153
- package/dist/components/mds-input-select.js +1 -236
- package/dist/components/mds-input-switch.js +1 -6
- package/dist/components/mds-input-switch2.js +1 -253
- package/dist/components/mds-input-tip-item.js +1 -6
- package/dist/components/mds-input-tip-item2.js +1 -112
- package/dist/components/mds-input-tip.js +1 -6
- package/dist/components/mds-input-tip2.js +1 -43
- package/dist/components/mds-input-upload.js +1 -753
- package/dist/components/mds-input.js +1 -6
- package/dist/components/mds-input2.js +1 -738
- package/dist/components/mds-keyboard-key.js +1 -334
- package/dist/components/mds-keyboard.js +1 -269
- package/dist/components/mds-kpi-item.js +1 -74
- package/dist/components/mds-kpi.js +1 -35
- package/dist/components/mds-label.js +1 -143
- package/dist/components/mds-list-item.js +1 -65
- package/dist/components/mds-list.js +1 -35
- package/dist/components/mds-mention.js +1 -76
- package/dist/components/mds-modal.js +1 -6
- package/dist/components/mds-modal2.js +1 -270
- package/dist/components/mds-note.js +1 -128
- package/dist/components/mds-notification.js +1 -120
- package/dist/components/mds-paginator-item.js +1 -6
- package/dist/components/mds-paginator-item2.js +1 -65
- package/dist/components/mds-paginator.js +1 -116
- package/dist/components/mds-policy-ai.js +1 -219
- package/dist/components/mds-pref-animation.js +1 -188
- package/dist/components/mds-pref-consumption.js +1 -202
- package/dist/components/mds-pref-contrast.js +1 -213
- package/dist/components/mds-pref-language-item.js +1 -306
- package/dist/components/mds-pref-language.js +1 -1025
- package/dist/components/mds-pref-theme-variant-item.js +1 -109
- package/dist/components/mds-pref-theme-variant.js +1 -213
- package/dist/components/mds-pref-theme.js +1 -333
- package/dist/components/mds-pref.js +1 -150
- package/dist/components/mds-price-table-features-cell.js +1 -49
- package/dist/components/mds-price-table-features-row.js +1 -45
- package/dist/components/mds-price-table-features.js +1 -43
- package/dist/components/mds-price-table-header.js +1 -35
- package/dist/components/mds-price-table-list-item.js +1 -54
- package/dist/components/mds-price-table-list.js +1 -48
- package/dist/components/mds-price-table.js +1 -35
- package/dist/components/mds-progress.js +1 -6
- package/dist/components/mds-progress2.js +1 -121
- package/dist/components/mds-push-notification-item.js +1 -326
- package/dist/components/mds-push-notification.js +1 -205
- package/dist/components/mds-quote.js +1 -52
- package/dist/components/mds-radial-menu-item.js +1 -80
- package/dist/components/mds-radial-menu.js +1 -248
- package/dist/components/mds-radial-progress.js +1 -6
- package/dist/components/mds-radial-progress2.js +1 -119
- package/dist/components/mds-separator.js +1 -6
- package/dist/components/mds-separator2.js +1 -32
- package/dist/components/mds-spinner.js +1 -6
- package/dist/components/mds-spinner2.js +1 -54
- package/dist/components/mds-status-bar.js +1 -98
- package/dist/components/mds-stepper-bar-item.js +1 -194
- package/dist/components/mds-stepper-bar.js +1 -136
- package/dist/components/mds-tab-bar-item.js +1 -89
- package/dist/components/mds-tab-bar.js +1 -51
- package/dist/components/mds-tab-item.js +1 -6
- package/dist/components/mds-tab-item2.js +1 -112
- package/dist/components/mds-tab.js +1 -6
- package/dist/components/mds-tab2.js +1 -261
- package/dist/components/mds-table-body.js +1 -38
- package/dist/components/mds-table-cell.js +1 -6
- package/dist/components/mds-table-cell2.js +1 -39
- package/dist/components/mds-table-footer.js +1 -35
- package/dist/components/mds-table-header-cell.js +1 -6
- package/dist/components/mds-table-header-cell2.js +1 -173
- package/dist/components/mds-table-header.js +1 -164
- package/dist/components/mds-table-row.js +1 -141
- package/dist/components/mds-table.js +1 -200
- package/dist/components/mds-text.js +1 -6
- package/dist/components/mds-text2.js +1 -324
- package/dist/components/mds-toast.js +1 -127
- package/dist/components/mds-tooltip.js +1 -6
- package/dist/components/mds-tooltip2.js +1 -177
- package/dist/components/mds-tree-item.js +1 -201
- package/dist/components/mds-tree.js +1 -121
- package/dist/components/mds-url-view.js +1 -146
- package/dist/components/mds-usage.js +1 -108
- package/dist/components/mds-video-wall.js +1 -68
- package/dist/components/mds-zero.js +1 -35
- package/dist/components/panorama.js +1 -3
- package/dist/components/remove.js +1 -3
- package/dist/components/settings.js +1 -3
- package/dist/components/slot.js +1 -48
- package/dist/components/unit.js +1 -41
- package/dist/documentation.d.ts +37 -0
- package/dist/documentation.json +1520 -707
- package/dist/esm/{datetime-C4yPBff1.js → datetime-BJtA1qmE.js} +1 -1
- package/dist/esm/{index-BfAC4pqU.js → index-CAd5312P.js} +482 -370
- package/dist/esm/index.js +256 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/magma-components.js +4 -4
- package/dist/esm/mds-accordion-item.entry.js +4 -4
- package/dist/esm/mds-accordion-timer-item.entry.js +7 -5
- package/dist/esm/mds-accordion-timer.entry.js +9 -7
- package/dist/esm/mds-accordion.entry.js +4 -4
- package/dist/esm/mds-author.entry.js +4 -4
- package/dist/esm/mds-avatar-stack-item.entry.js +4 -4
- package/dist/esm/mds-avatar-stack.entry.js +4 -4
- package/dist/esm/mds-avatar.entry.js +41 -14
- package/dist/esm/mds-badge.entry.js +8 -6
- package/dist/esm/mds-banner_3.entry.js +33 -19
- package/dist/esm/mds-benchmark-bar.entry.js +8 -6
- package/dist/esm/mds-bibliography.entry.js +8 -8
- package/dist/esm/mds-breadcrumb-item.entry.js +4 -4
- package/dist/esm/mds-breadcrumb.entry.js +7 -4
- package/dist/esm/mds-button-dropdown.entry.js +4 -4
- package/dist/esm/mds-button-group.entry.js +4 -4
- package/dist/esm/mds-button_3.entry.js +40 -245
- package/dist/esm/mds-calendar_2.entry.js +287 -144
- package/dist/esm/mds-card-content.entry.js +4 -4
- package/dist/esm/mds-card-footer.entry.js +4 -4
- package/dist/esm/mds-card-header.entry.js +4 -4
- package/dist/esm/mds-card-media.entry.js +4 -4
- package/dist/esm/mds-card.entry.js +11 -13
- package/dist/esm/mds-details.entry.js +7 -5
- package/dist/esm/mds-dropdown.entry.js +42 -18
- package/dist/esm/mds-emoji.entry.js +29 -20
- package/dist/esm/mds-entity.entry.js +4 -4
- package/dist/esm/mds-file-preview.entry.js +18 -6
- package/dist/esm/mds-file.entry.js +10 -5
- package/dist/esm/mds-filter-item.entry.js +7 -7
- package/dist/esm/mds-filter.entry.js +5 -5
- package/dist/esm/mds-header-bar.entry.js +8 -4
- package/dist/esm/mds-header.entry.js +30 -16
- package/dist/esm/mds-horizontal-scroll.entry.js +18 -13
- package/dist/esm/mds-hr.entry.js +4 -4
- package/dist/esm/mds-img.entry.js +15 -8
- package/dist/esm/mds-input-date-range-preselection.entry.js +4 -4
- package/dist/esm/mds-input-date-range.entry.js +221 -71
- package/dist/esm/mds-input-date.entry.js +40 -17
- package/dist/esm/mds-input-field.entry.js +7 -7
- package/dist/esm/mds-input-otp.entry.js +6 -6
- package/dist/esm/mds-input-range.entry.js +19 -9
- package/dist/esm/mds-input-select.entry.js +39 -19
- package/dist/esm/mds-input-switch_2.entry.js +19 -10
- package/dist/esm/mds-input-tip_2.entry.js +14 -9
- package/dist/esm/mds-input-upload.entry.js +19 -12
- package/dist/esm/mds-input.entry.js +39 -16
- package/dist/esm/mds-keyboard-key.entry.js +8 -5
- package/dist/esm/mds-keyboard.entry.js +13 -8
- package/dist/esm/mds-kpi-item.entry.js +4 -4
- package/dist/esm/mds-kpi.entry.js +4 -4
- package/dist/esm/mds-label.entry.js +7 -4
- package/dist/esm/mds-list-item.entry.js +4 -4
- package/dist/esm/mds-list.entry.js +4 -4
- package/dist/esm/mds-mention.entry.js +4 -4
- package/dist/esm/mds-modal.entry.js +22 -15
- package/dist/esm/mds-note.entry.js +7 -4
- package/dist/esm/mds-notification.entry.js +11 -9
- package/dist/esm/mds-paginator-item.entry.js +7 -7
- package/dist/esm/mds-paginator.entry.js +4 -4
- package/dist/esm/mds-policy-ai.entry.js +7 -4
- package/dist/esm/mds-pref-animation.entry.js +13 -8
- package/dist/esm/mds-pref-consumption.entry.js +13 -8
- package/dist/esm/mds-pref-contrast.entry.js +14 -9
- package/dist/esm/mds-pref-language-item.entry.js +7 -4
- package/dist/esm/mds-pref-language.entry.js +8 -5
- package/dist/esm/mds-pref-theme-variant-item.entry.js +8 -5
- package/dist/esm/mds-pref-theme-variant.entry.js +9 -6
- package/dist/esm/mds-pref-theme.entry.js +17 -12
- package/dist/esm/mds-pref.entry.js +15 -8
- package/dist/esm/mds-price-table-features-cell.entry.js +4 -4
- package/dist/esm/mds-price-table-features-row.entry.js +4 -4
- package/dist/esm/mds-price-table-features.entry.js +4 -4
- package/dist/esm/mds-price-table-header.entry.js +4 -4
- package/dist/esm/mds-price-table-list-item.entry.js +4 -4
- package/dist/esm/mds-price-table-list.entry.js +4 -4
- package/dist/esm/mds-price-table.entry.js +4 -4
- package/dist/esm/mds-progress_2.entry.js +17 -11
- package/dist/esm/mds-push-notification-item.entry.js +12 -7
- package/dist/esm/mds-push-notification.entry.js +22 -10
- package/dist/esm/mds-quote.entry.js +4 -4
- package/dist/esm/mds-radial-menu-item.entry.js +7 -4
- package/dist/esm/mds-radial-menu.entry.js +30 -14
- package/dist/esm/mds-separator.entry.js +4 -4
- package/dist/esm/mds-status-bar.entry.js +10 -5
- package/dist/esm/mds-stepper-bar-item.entry.js +13 -6
- package/dist/esm/mds-stepper-bar.entry.js +8 -6
- package/dist/esm/mds-tab-bar-item.entry.js +14 -7
- package/dist/esm/mds-tab-bar.entry.js +4 -4
- package/dist/esm/mds-tab_2.entry.js +28 -16
- package/dist/esm/mds-table-body.entry.js +4 -4
- package/dist/esm/mds-table-footer.entry.js +4 -4
- package/dist/esm/mds-table-header-cell.entry.js +27 -12
- package/dist/esm/mds-table-header.entry.js +13 -5
- package/dist/esm/mds-table-row.entry.js +12 -6
- package/dist/esm/mds-table.entry.js +11 -7
- package/dist/esm/mds-text.entry.js +9 -7
- package/dist/esm/mds-toast.entry.js +12 -8
- package/dist/esm/mds-tooltip.entry.js +35 -15
- package/dist/esm/mds-tree-item.entry.js +16 -6
- package/dist/esm/mds-tree.entry.js +14 -8
- package/dist/esm/mds-url-view.entry.js +10 -7
- package/dist/esm/mds-usage.entry.js +7 -4
- package/dist/esm/mds-video-wall.entry.js +4 -4
- package/dist/esm/mds-zero.entry.js +4 -4
- package/dist/esm-es5/{datetime-C4yPBff1.js → datetime-BJtA1qmE.js} +1 -1
- package/dist/esm-es5/index-CAd5312P.js +1 -0
- package/dist/esm-es5/index.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
- package/dist/esm-es5/mds-accordion.entry.js +1 -1
- package/dist/esm-es5/mds-author.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
- package/dist/esm-es5/mds-avatar.entry.js +1 -1
- package/dist/esm-es5/mds-badge.entry.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +1 -1
- package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm-es5/mds-bibliography.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
- package/dist/esm-es5/mds-button-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-button-group.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +1 -1
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-card-content.entry.js +1 -1
- package/dist/esm-es5/mds-card-footer.entry.js +1 -1
- package/dist/esm-es5/mds-card-header.entry.js +1 -1
- package/dist/esm-es5/mds-card-media.entry.js +1 -1
- package/dist/esm-es5/mds-card.entry.js +1 -1
- package/dist/esm-es5/mds-details.entry.js +1 -1
- package/dist/esm-es5/mds-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-emoji.entry.js +3 -3
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +2 -2
- package/dist/esm-es5/mds-file.entry.js +2 -2
- package/dist/esm-es5/mds-filter-item.entry.js +1 -1
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-header-bar.entry.js +1 -1
- package/dist/esm-es5/mds-header.entry.js +1 -1
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm-es5/mds-hr.entry.js +1 -1
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-date.entry.js +1 -1
- package/dist/esm-es5/mds-input-field.entry.js +1 -1
- package/dist/esm-es5/mds-input-otp.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-select.entry.js +1 -1
- package/dist/esm-es5/mds-input-switch_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-upload.entry.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +1 -1
- package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
- package/dist/esm-es5/mds-keyboard.entry.js +1 -1
- package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
- package/dist/esm-es5/mds-kpi.entry.js +1 -1
- package/dist/esm-es5/mds-label.entry.js +1 -1
- package/dist/esm-es5/mds-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-list.entry.js +1 -1
- package/dist/esm-es5/mds-mention.entry.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-note.entry.js +1 -1
- package/dist/esm-es5/mds-notification.entry.js +1 -1
- package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
- package/dist/esm-es5/mds-paginator.entry.js +1 -1
- package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
- package/dist/esm-es5/mds-pref-animation.entry.js +1 -1
- package/dist/esm-es5/mds-pref-consumption.entry.js +1 -1
- package/dist/esm-es5/mds-pref-contrast.entry.js +1 -1
- package/dist/esm-es5/mds-pref-language-item.entry.js +1 -1
- package/dist/esm-es5/mds-pref-language.entry.js +1 -1
- package/dist/esm-es5/mds-pref-theme-variant-item.entry.js +1 -1
- package/dist/esm-es5/mds-pref-theme-variant.entry.js +1 -1
- package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
- package/dist/esm-es5/mds-pref.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features-cell.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list.entry.js +1 -1
- package/dist/esm-es5/mds-price-table.entry.js +1 -1
- package/dist/esm-es5/mds-progress_2.entry.js +1 -1
- package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
- package/dist/esm-es5/mds-push-notification.entry.js +1 -1
- package/dist/esm-es5/mds-quote.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
- package/dist/esm-es5/mds-separator.entry.js +1 -1
- package/dist/esm-es5/mds-status-bar.entry.js +1 -1
- package/dist/esm-es5/mds-stepper-bar-item.entry.js +1 -1
- package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
- package/dist/esm-es5/mds-tab-bar-item.entry.js +1 -1
- package/dist/esm-es5/mds-tab-bar.entry.js +1 -1
- package/dist/esm-es5/mds-tab_2.entry.js +1 -1
- package/dist/esm-es5/mds-table-body.entry.js +1 -1
- package/dist/esm-es5/mds-table-footer.entry.js +1 -1
- package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
- package/dist/esm-es5/mds-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table.entry.js +1 -1
- package/dist/esm-es5/mds-text.entry.js +1 -1
- package/dist/esm-es5/mds-toast.entry.js +1 -1
- package/dist/esm-es5/mds-tooltip.entry.js +1 -1
- package/dist/esm-es5/mds-tree-item.entry.js +1 -1
- package/dist/esm-es5/mds-tree.entry.js +1 -1
- package/dist/esm-es5/mds-url-view.entry.js +1 -1
- package/dist/esm-es5/mds-usage.entry.js +1 -1
- package/dist/esm-es5/mds-video-wall.entry.js +1 -1
- package/dist/esm-es5/mds-zero.entry.js +1 -1
- package/dist/hydrate/index.d.ts +12 -0
- package/dist/hydrate/index.js +6687 -1804
- package/dist/hydrate/index.mjs +6686 -1805
- package/dist/magma-components/index.esm.js +1 -0
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/magma-components.js +1 -1
- package/dist/magma-components/{p-da1e08a8.system.entry.js → p-00313884.entry.js} +1 -1
- package/dist/magma-components/{p-8c757fad.entry.js → p-01dc43dd.entry.js} +1 -1
- package/dist/magma-components/p-01dca5e8.entry.js +1 -0
- package/dist/magma-components/p-030d45e3.entry.js +1 -0
- package/dist/magma-components/p-0328a23e.system.entry.js +1 -0
- package/dist/magma-components/{p-54a1e963.entry.js → p-08c6869a.entry.js} +1 -1
- package/dist/magma-components/p-09de9fc5.system.entry.js +1 -0
- package/dist/magma-components/{p-18412b69.entry.js → p-0acb46c8.entry.js} +1 -1
- package/dist/magma-components/p-0b10ef9f.system.entry.js +1 -0
- package/dist/magma-components/p-0b11f03b.entry.js +1 -0
- package/dist/magma-components/p-0be56202.system.entry.js +1 -0
- package/dist/magma-components/p-0de58147.entry.js +1 -0
- package/dist/magma-components/p-0e481e5c.system.entry.js +1 -0
- package/dist/magma-components/p-0f104850.system.entry.js +1 -0
- package/dist/magma-components/p-1073bf63.entry.js +1 -0
- package/dist/magma-components/p-11490a89.entry.js +1 -0
- package/dist/magma-components/p-137b0bbe.system.entry.js +1 -0
- package/dist/magma-components/{p-37c304a8.entry.js → p-14a98729.entry.js} +1 -1
- package/dist/magma-components/p-14d858f8.system.entry.js +1 -0
- package/dist/magma-components/p-14e918de.system.entry.js +1 -0
- package/dist/magma-components/p-154ef5b9.entry.js +1 -0
- package/dist/magma-components/p-158af6e3.entry.js +1 -0
- package/dist/magma-components/p-17427d8a.system.entry.js +1 -0
- package/dist/magma-components/p-1805592d.entry.js +1 -0
- package/dist/magma-components/p-18563022.entry.js +1 -0
- package/dist/magma-components/{p-7a88d5b1.entry.js → p-19f99447.entry.js} +1 -1
- package/dist/magma-components/p-1a56d383.system.entry.js +1 -0
- package/dist/magma-components/p-1bb7895a.system.entry.js +1 -0
- package/dist/magma-components/p-1ce791c1.system.entry.js +1 -0
- package/dist/magma-components/p-1da904c3.system.entry.js +1 -0
- package/dist/magma-components/p-20961bf1.entry.js +1 -0
- package/dist/magma-components/p-24a9ed63.system.entry.js +1 -0
- package/dist/magma-components/{p-2431bf5b.entry.js → p-26b131cf.entry.js} +1 -1
- package/dist/magma-components/p-28ebb626.entry.js +1 -0
- package/dist/magma-components/{p-25d96882.system.entry.js → p-292f4566.system.entry.js} +1 -1
- package/dist/magma-components/p-2a1d3680.system.entry.js +1 -0
- package/dist/magma-components/p-2ab75334.system.entry.js +1 -0
- package/dist/magma-components/p-2ccc796b.system.entry.js +1 -0
- package/dist/magma-components/p-2d9d0887.system.entry.js +1 -0
- package/dist/magma-components/p-2df01d02.system.entry.js +1 -0
- package/dist/magma-components/{p-2b47fe1f.entry.js → p-3145c7eb.entry.js} +1 -1
- package/dist/magma-components/p-34018dfe.entry.js +1 -0
- package/dist/magma-components/{p-86cdcab6.system.entry.js → p-35a9f1b4.system.entry.js} +3 -3
- package/dist/magma-components/p-35ec8bbd.entry.js +1 -0
- package/dist/magma-components/p-370f9463.system.entry.js +1 -0
- package/dist/magma-components/p-387948c4.system.entry.js +1 -0
- package/dist/magma-components/p-3aeecbba.system.entry.js +1 -0
- package/dist/magma-components/p-3af9132f.system.entry.js +1 -0
- package/dist/magma-components/p-3bfd085f.system.entry.js +1 -0
- package/dist/magma-components/{p-eca9aeea.entry.js → p-3c246a39.entry.js} +1 -1
- package/dist/magma-components/p-3c2bf79b.entry.js +1 -0
- package/dist/magma-components/p-3ce52f3c.entry.js +1 -0
- package/dist/magma-components/p-3e5993b4.entry.js +1 -0
- package/dist/magma-components/p-3ef80cd4.system.entry.js +1 -0
- package/dist/magma-components/{p-fb852b6f.entry.js → p-3fc3b8b4.entry.js} +1 -1
- package/dist/magma-components/p-423955d1.system.entry.js +1 -0
- package/dist/magma-components/p-42f336df.system.entry.js +1 -0
- package/dist/magma-components/p-45a85712.system.entry.js +1 -0
- package/dist/magma-components/p-460cd731.system.entry.js +1 -0
- package/dist/magma-components/p-473f6954.entry.js +1 -0
- package/dist/magma-components/p-47fa0ecf.entry.js +1 -0
- package/dist/magma-components/p-4b07fe37.entry.js +1 -0
- package/dist/magma-components/p-4b884441.entry.js +1 -0
- package/dist/magma-components/{p-1faa59ee.entry.js → p-4ba583c9.entry.js} +1 -1
- package/dist/magma-components/{p-e3090966.entry.js → p-4c08fe3e.entry.js} +1 -1
- package/dist/magma-components/p-4f490917.entry.js +1 -0
- package/dist/magma-components/p-4f98fdba.system.entry.js +1 -0
- package/dist/magma-components/p-50553954.system.entry.js +1 -0
- package/dist/magma-components/{p-74aeba83.entry.js → p-523d4716.entry.js} +1 -1
- package/dist/magma-components/p-52ccfafc.system.entry.js +1 -0
- package/dist/magma-components/p-52e2f903.entry.js +1 -0
- package/dist/magma-components/p-53195d95.system.entry.js +1 -0
- package/dist/magma-components/p-5488f51f.system.entry.js +1 -0
- package/dist/magma-components/p-553927f9.system.entry.js +1 -0
- package/dist/magma-components/p-55b4bbba.entry.js +1 -0
- package/dist/magma-components/{p-379a4998.entry.js → p-583f5ffa.entry.js} +1 -1
- package/dist/magma-components/{p-312e1512.entry.js → p-59d65cff.entry.js} +1 -1
- package/dist/magma-components/p-59f53701.system.entry.js +1 -0
- package/dist/magma-components/p-5b881091.entry.js +1 -0
- package/dist/magma-components/p-5c44d208.entry.js +1 -0
- package/dist/magma-components/p-5fdcd8e2.system.entry.js +1 -0
- package/dist/magma-components/p-5fe7b875.system.entry.js +1 -0
- package/dist/magma-components/p-614e7f83.system.entry.js +1 -0
- package/dist/magma-components/p-62cf9003.system.entry.js +1 -0
- package/dist/magma-components/{p-014d0127.entry.js → p-63898681.entry.js} +1 -1
- package/dist/magma-components/p-663a510e.entry.js +1 -0
- package/dist/magma-components/{p-a68b2bd1.entry.js → p-68f57bb1.entry.js} +1 -1
- package/dist/magma-components/p-6ae4df92.system.entry.js +1 -0
- package/dist/magma-components/p-6d268a59.entry.js +1 -0
- package/dist/magma-components/p-7306b02e.system.entry.js +17 -0
- package/dist/magma-components/p-75011fed.system.entry.js +9 -0
- package/dist/magma-components/{p-8cadef2a.entry.js → p-7595afcf.entry.js} +3 -3
- package/dist/magma-components/p-77e9bd68.entry.js +1 -0
- package/dist/magma-components/p-7d836722.entry.js +1 -0
- package/dist/magma-components/p-7e037cf3.entry.js +8 -0
- package/dist/magma-components/p-8106dbfd.system.entry.js +1 -0
- package/dist/magma-components/p-82deeaa0.system.entry.js +1 -0
- package/dist/magma-components/p-83589b83.entry.js +1 -0
- package/dist/magma-components/{p-1650e033.entry.js → p-83721814.entry.js} +2 -2
- package/dist/magma-components/p-83de0e53.system.entry.js +1 -0
- package/dist/magma-components/p-849760e7.system.entry.js +1 -0
- package/dist/magma-components/{p-76abcca3.system.entry.js → p-85ac6e54.system.entry.js} +1 -1
- package/dist/magma-components/p-87f8a213.entry.js +1 -0
- package/dist/magma-components/p-89bf698e.system.entry.js +1 -0
- package/dist/magma-components/p-89f96753.system.entry.js +1 -0
- package/dist/magma-components/p-8b3065b4.entry.js +1 -0
- package/dist/magma-components/p-8bec8ad6.system.entry.js +1 -0
- package/dist/magma-components/p-8d76853c.system.entry.js +1 -0
- package/dist/magma-components/p-8f1ce3f1.system.entry.js +1 -0
- package/dist/magma-components/p-9021fa60.entry.js +1 -0
- package/dist/magma-components/p-90b72c1c.system.entry.js +1 -0
- package/dist/magma-components/p-90d5b6df.system.entry.js +1 -0
- package/dist/magma-components/p-913372ff.entry.js +1 -0
- package/dist/magma-components/p-94093140.system.entry.js +1 -0
- package/dist/magma-components/p-944d9b27.system.entry.js +1 -0
- package/dist/magma-components/{p-2086a922.entry.js → p-94713401.entry.js} +1 -1
- package/dist/magma-components/{p-199d6fc7.entry.js → p-956b5ae6.entry.js} +1 -1
- package/dist/magma-components/p-95eae04e.entry.js +1 -0
- package/dist/magma-components/p-961a2531.entry.js +1 -0
- package/dist/magma-components/p-9658cb0c.entry.js +1 -0
- package/dist/magma-components/p-96d1a168.entry.js +1 -0
- package/dist/magma-components/p-96f6a646.entry.js +1 -0
- package/dist/magma-components/p-98435b90.system.entry.js +1 -0
- package/dist/magma-components/p-988b0c7c.entry.js +1 -0
- package/dist/magma-components/p-98a05642.system.entry.js +1 -0
- package/dist/magma-components/p-99f7a1b6.system.entry.js +1 -0
- package/dist/magma-components/p-9a1940c1.system.entry.js +1 -0
- package/dist/magma-components/p-9a89bc78.system.entry.js +1 -0
- package/dist/magma-components/p-9ad586a7.system.entry.js +1 -0
- package/dist/magma-components/p-9b52918e.system.entry.js +1 -0
- package/dist/magma-components/{p-B2gc1lkP.system.js → p-BJKToXNf.system.js} +1 -1
- package/dist/magma-components/{p-C4yPBff1.js → p-BJtA1qmE.js} +1 -1
- package/dist/magma-components/p-CAd5312P.js +2 -0
- package/dist/magma-components/p-DI5DWqw4.system.js +2 -0
- package/dist/magma-components/p-DTZViJWJ.system.js +1 -0
- package/dist/magma-components/p-a1af65e8.entry.js +1 -0
- package/dist/magma-components/p-a5473293.system.entry.js +1 -0
- package/dist/magma-components/p-a6caafcb.system.entry.js +1 -0
- package/dist/magma-components/p-a7bd4585.entry.js +1 -0
- package/dist/magma-components/p-a88fba47.system.entry.js +1 -0
- package/dist/magma-components/{p-408abcfd.entry.js → p-a959ade4.entry.js} +1 -1
- package/dist/magma-components/p-aa7d8972.entry.js +1 -0
- package/dist/magma-components/p-aa98652f.entry.js +1 -0
- package/dist/magma-components/p-aaeb0ee3.system.entry.js +1 -0
- package/dist/magma-components/p-ab89bf5b.system.entry.js +1 -0
- package/dist/magma-components/p-abc720e3.entry.js +1 -0
- package/dist/magma-components/p-abe87810.entry.js +1 -0
- package/dist/magma-components/{p-492e2cc1.entry.js → p-ac80aca8.entry.js} +1 -1
- package/dist/magma-components/p-acb07134.system.entry.js +1 -0
- package/dist/magma-components/p-acd4f96a.entry.js +1 -0
- package/dist/magma-components/{p-00649cfc.entry.js → p-af49bca2.entry.js} +1 -1
- package/dist/magma-components/{p-6ccffbff.entry.js → p-af670eaf.entry.js} +1 -1
- package/dist/magma-components/p-b14a94e0.system.entry.js +1 -0
- package/dist/magma-components/p-b2bc194a.entry.js +1 -0
- package/dist/magma-components/p-b2e76c18.system.entry.js +1 -0
- package/dist/magma-components/p-b37dff80.system.entry.js +1 -0
- package/dist/magma-components/p-b3e3226e.entry.js +1 -0
- package/dist/magma-components/p-b40f1153.entry.js +1 -0
- package/dist/magma-components/p-b4709a95.entry.js +1 -0
- package/dist/magma-components/p-b5db6527.system.entry.js +1 -0
- package/dist/magma-components/p-b764defa.entry.js +1 -0
- package/dist/magma-components/p-b9b2501e.system.entry.js +1 -0
- package/dist/magma-components/p-b9b5bcdd.system.entry.js +1 -0
- package/dist/magma-components/p-ba2a0bc1.system.entry.js +1 -0
- package/dist/magma-components/p-bb4380cd.entry.js +1 -0
- package/dist/magma-components/p-bce3a8b0.system.entry.js +1 -0
- package/dist/magma-components/p-bd2998e6.system.entry.js +1 -0
- package/dist/magma-components/p-bd3dbc2d.entry.js +1 -0
- package/dist/magma-components/p-bed57abb.entry.js +1 -0
- package/dist/magma-components/p-bfed0b7a.entry.js +1 -0
- package/dist/magma-components/p-c6177cb9.system.entry.js +1 -0
- package/dist/magma-components/p-c638556c.entry.js +1 -0
- package/dist/magma-components/{p-9b5cfdd8.entry.js → p-c6fa4a21.entry.js} +1 -1
- package/dist/magma-components/p-c8e99385.system.entry.js +1 -0
- package/dist/magma-components/{p-e69e24a3.entry.js → p-c9231987.entry.js} +1 -1
- package/dist/magma-components/p-c9c51ba6.system.entry.js +1 -0
- package/dist/magma-components/p-cc53b30c.entry.js +1 -0
- package/dist/magma-components/{p-823a5efc.entry.js → p-ccc0521c.entry.js} +1 -1
- package/dist/magma-components/p-cd71630e.system.entry.js +1 -0
- package/dist/magma-components/p-cd879243.system.entry.js +1 -0
- package/dist/magma-components/{p-c288b9a1.entry.js → p-ce064d47.entry.js} +1 -1
- package/dist/magma-components/{p-d4a1c10f.system.entry.js → p-d1eea8ca.system.entry.js} +1 -1
- package/dist/magma-components/p-d2537229.system.entry.js +1 -0
- package/dist/magma-components/p-d2617a1a.entry.js +1 -0
- package/dist/magma-components/p-d41c4637.system.entry.js +1 -0
- package/dist/magma-components/{p-a2d2cb35.entry.js → p-d88f44aa.entry.js} +1 -1
- package/dist/magma-components/p-dae9ae8e.system.entry.js +1 -0
- package/dist/magma-components/{p-b9d6a1f7.entry.js → p-dd860de4.entry.js} +1 -1
- package/dist/magma-components/p-df87e2f5.system.entry.js +1 -0
- package/dist/magma-components/p-dfe082be.system.entry.js +1 -0
- package/dist/magma-components/{p-1b165893.entry.js → p-e00ba5a0.entry.js} +1 -1
- package/dist/magma-components/p-e0d12fa2.system.entry.js +1 -0
- package/dist/magma-components/{p-6e94ea64.entry.js → p-e2cd11c3.entry.js} +1 -1
- package/dist/magma-components/p-e5fb3081.system.entry.js +1 -0
- package/dist/magma-components/{p-08f81a0c.entry.js → p-e67a6452.entry.js} +1 -1
- package/dist/magma-components/p-e6d8c9e3.system.entry.js +1 -0
- package/dist/magma-components/p-e71aecc1.entry.js +1 -0
- package/dist/magma-components/p-eac692ea.system.entry.js +1 -0
- package/dist/magma-components/p-ecf2e98d.system.entry.js +1 -0
- package/dist/magma-components/p-ed6d1453.system.entry.js +1 -0
- package/dist/magma-components/p-f289eb5a.entry.js +1 -0
- package/dist/magma-components/p-f3604c99.entry.js +1 -0
- package/dist/magma-components/{p-f56acab0.entry.js → p-f3dbca34.entry.js} +1 -1
- package/dist/magma-components/p-f4b4bdf2.system.entry.js +1 -0
- package/dist/magma-components/p-f56d16f7.entry.js +1 -0
- package/dist/magma-components/p-f8014852.system.entry.js +1 -0
- package/dist/magma-components/{p-41e50837.entry.js → p-f851100d.entry.js} +1 -1
- package/dist/magma-components/{p-6f7bce81.entry.js → p-f8d5adce.entry.js} +1 -1
- package/dist/magma-components/p-fa427f75.system.entry.js +1 -0
- package/dist/magma-components/p-fa6a05b5.entry.js +1 -0
- package/dist/magma-components/p-fb8b0104.entry.js +1 -0
- package/dist/magma-components/p-fcf59139.system.entry.js +1 -0
- package/dist/magma-components/p-fe3d5720.system.entry.js +1 -0
- package/dist/magma-components/p-fe85ad8e.system.entry.js +1 -0
- package/dist/magma-components/p-ffae137a.entry.js +1 -0
- package/dist/magma-components/p-oCzRm29V.system.js +1 -0
- package/dist/stats.json +4561 -2983
- package/dist/types/components/mds-accordion/mds-accordion.d.ts +1 -1
- package/dist/types/components/mds-accordion-item/mds-accordion-item.d.ts +1 -1
- package/dist/types/components/mds-accordion-timer/mds-accordion-timer.d.ts +1 -1
- package/dist/types/components/mds-accordion-timer-item/mds-accordion-timer-item.d.ts +1 -1
- package/dist/types/components/mds-author/mds-author.d.ts +1 -1
- package/dist/types/components/mds-avatar-stack/mds-avatar-stack.d.ts +3 -0
- package/dist/types/components/mds-badge/mds-badge.d.ts +1 -1
- package/dist/types/components/mds-banner/mds-banner.d.ts +4 -1
- package/dist/types/components/mds-benchmark-bar/mds-benchmark-bar.d.ts +1 -1
- package/dist/types/components/mds-breadcrumb/mds-breadcrumb.d.ts +4 -1
- package/dist/types/components/mds-button/mds-button.d.ts +1 -1
- package/dist/types/components/mds-button-dropdown/mds-button-dropdown.d.ts +3 -0
- package/dist/types/components/mds-button-group/mds-button-group.d.ts +3 -0
- package/dist/types/components/mds-calendar/mds-calendar.d.ts +75 -8
- package/dist/types/components/mds-card-content/mds-card-content.d.ts +1 -1
- package/dist/types/components/mds-card-footer/mds-card-footer.d.ts +1 -1
- package/dist/types/components/mds-card-header/mds-card-header.d.ts +1 -1
- package/dist/types/components/mds-card-media/mds-card-media.d.ts +1 -1
- package/dist/types/components/mds-chip/mds-chip.d.ts +3 -0
- package/dist/types/components/mds-details/mds-details.d.ts +1 -1
- package/dist/types/components/mds-dropdown/mds-dropdown.d.ts +4 -4
- package/dist/types/components/mds-emoji/mds-emoji.d.ts +7 -0
- package/dist/types/components/mds-entity/mds-entity.d.ts +1 -1
- package/dist/types/components/mds-file/mds-file.d.ts +3 -0
- package/dist/types/components/mds-file-preview/mds-file-preview.d.ts +3 -0
- package/dist/types/components/mds-filter/mds-filter.d.ts +1 -1
- package/dist/types/components/mds-filter-item/mds-filter-item.d.ts +1 -1
- package/dist/types/components/mds-header/mds-header.d.ts +5 -1
- package/dist/types/components/mds-header-bar/mds-header-bar.d.ts +5 -1
- package/dist/types/components/mds-help/mds-help.d.ts +1 -1
- package/dist/types/components/mds-horizontal-scroll/mds-horizontal-scroll.d.ts +1 -1
- package/dist/types/components/mds-icon/services/icons-set.service.d.ts +2 -1
- package/dist/types/components/mds-img/mds-img.d.ts +3 -0
- package/dist/types/components/mds-input/mds-input.d.ts +15 -0
- package/dist/types/components/mds-input-date/mds-input-date.d.ts +19 -1
- package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +38 -4
- package/dist/types/components/mds-input-date-range/test/mds-input-date-range.stories.d.ts +12 -0
- package/dist/types/components/mds-input-date-range-preselection/mds-input-date-range-preselection.d.ts +3 -0
- package/dist/types/components/mds-input-field/mds-input-field.d.ts +3 -0
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +2 -1
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +4 -0
- package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +4 -1
- package/dist/types/components/mds-input-tip/mds-input-tip.d.ts +3 -0
- package/dist/types/components/mds-input-tip-item/mds-input-tip-item.d.ts +6 -0
- package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +3 -0
- package/dist/types/components/mds-keyboard/mds-keyboard.d.ts +7 -1
- package/dist/types/components/mds-keyboard-key/mds-keyboard-key.d.ts +3 -0
- package/dist/types/components/mds-keyboard-key/meta/icons.d.ts +1 -1
- package/dist/types/components/mds-kpi/mds-kpi.d.ts +1 -1
- package/dist/types/components/mds-label/mds-label.d.ts +4 -1
- package/dist/types/components/mds-list/mds-list.d.ts +1 -1
- package/dist/types/components/mds-list-item/mds-list-item.d.ts +1 -1
- package/dist/types/components/mds-modal/mds-modal.d.ts +4 -1
- package/dist/types/components/mds-note/mds-note.d.ts +4 -1
- package/dist/types/components/mds-paginator-item/mds-paginator-item.d.ts +2 -2
- package/dist/types/components/mds-policy-ai/mds-policy-ai.d.ts +3 -0
- package/dist/types/components/mds-pref/mds-pref.d.ts +4 -1
- package/dist/types/components/mds-pref-animation/mds-pref-animation.d.ts +3 -0
- package/dist/types/components/mds-pref-consumption/mds-pref-consumption.d.ts +3 -0
- package/dist/types/components/mds-pref-contrast/mds-pref-contrast.d.ts +3 -0
- package/dist/types/components/mds-pref-language/mds-pref-language.d.ts +4 -1
- package/dist/types/components/mds-pref-language-item/mds-pref-language-item.d.ts +3 -0
- package/dist/types/components/mds-pref-theme/mds-pref-theme.d.ts +3 -0
- package/dist/types/components/mds-pref-theme-variant/mds-pref-theme-variant.d.ts +4 -1
- package/dist/types/components/mds-pref-theme-variant-item/mds-pref-theme-variant-item.d.ts +3 -0
- package/dist/types/components/mds-price-table/mds-price-table.d.ts +3 -0
- package/dist/types/components/mds-price-table-features/mds-price-table-features.d.ts +1 -1
- package/dist/types/components/mds-price-table-features-cell/mds-price-table-features-cell.d.ts +1 -1
- package/dist/types/components/mds-price-table-features-row/mds-price-table-features-row.d.ts +1 -1
- package/dist/types/components/mds-price-table-header/mds-price-table-header.d.ts +3 -0
- package/dist/types/components/mds-price-table-list/mds-price-table-list.d.ts +1 -1
- package/dist/types/components/mds-price-table-list-item/mds-price-table-list-item.d.ts +3 -0
- package/dist/types/components/mds-push-notification/mds-push-notification.d.ts +12 -4
- package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +3 -0
- package/dist/types/components/mds-quote/mds-quote.d.ts +1 -1
- package/dist/types/components/mds-radial-menu/mds-radial-menu.d.ts +3 -0
- package/dist/types/components/mds-radial-menu-item/mds-radial-menu-item.d.ts +3 -0
- package/dist/types/components/mds-status-bar/mds-status-bar.d.ts +4 -1
- package/dist/types/components/mds-stepper-bar/mds-stepper-bar.d.ts +1 -1
- package/dist/types/components/mds-stepper-bar-item/mds-stepper-bar-item.d.ts +3 -0
- package/dist/types/components/mds-tab/mds-tab.d.ts +1 -1
- package/dist/types/components/mds-tab-bar/mds-tab-bar.d.ts +1 -1
- package/dist/types/components/mds-tab-bar-item/mds-tab-bar-item.d.ts +4 -1
- package/dist/types/components/mds-table/mds-table.d.ts +5 -2
- package/dist/types/components/mds-table-body/mds-table-body.d.ts +7 -1
- package/dist/types/components/mds-table-cell/mds-table-cell.d.ts +1 -1
- package/dist/types/components/mds-table-footer/mds-table-footer.d.ts +1 -1
- package/dist/types/components/mds-table-header/mds-table-header.d.ts +12 -1
- package/dist/types/components/mds-table-header-cell/mds-table-header-cell.d.ts +3 -0
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +19 -1
- package/dist/types/components/mds-text/mds-text.d.ts +1 -1
- package/dist/types/components/mds-toast/mds-toast.d.ts +1 -1
- package/dist/types/components/mds-tooltip/mds-tooltip.d.ts +1 -1
- package/dist/types/components/mds-tree/mds-tree.d.ts +1 -1
- package/dist/types/components/mds-tree-item/mds-tree-item.d.ts +10 -1
- package/dist/types/components/mds-url-view/mds-url-view.d.ts +4 -1
- package/dist/types/components/mds-usage/mds-usage.d.ts +4 -1
- package/dist/types/components/mds-video-wall/mds-video-wall.d.ts +1 -1
- package/dist/types/components/mds-zero/mds-zero.d.ts +1 -1
- package/dist/types/components.d.ts +1316 -219
- package/dist/types/index.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +110 -5
- package/package.json +57 -11
- package/dist/esm-es5/index-BfAC4pqU.js +0 -1
- package/dist/magma-components/p-0130bb78.system.entry.js +0 -1
- package/dist/magma-components/p-01ed6d96.system.entry.js +0 -1
- package/dist/magma-components/p-01ff9d4c.system.entry.js +0 -1
- package/dist/magma-components/p-020e7201.entry.js +0 -1
- package/dist/magma-components/p-0228b956.entry.js +0 -1
- package/dist/magma-components/p-0291dd4c.entry.js +0 -1
- package/dist/magma-components/p-035d53f9.system.entry.js +0 -1
- package/dist/magma-components/p-03fc3cb6.system.entry.js +0 -1
- package/dist/magma-components/p-05069088.system.entry.js +0 -1
- package/dist/magma-components/p-0515681e.system.entry.js +0 -1
- package/dist/magma-components/p-0c530d94.system.entry.js +0 -1
- package/dist/magma-components/p-0e5f654a.entry.js +0 -1
- package/dist/magma-components/p-12a177ab.entry.js +0 -1
- package/dist/magma-components/p-12ba0511.system.entry.js +0 -1
- package/dist/magma-components/p-156af42d.entry.js +0 -1
- package/dist/magma-components/p-15b809ad.entry.js +0 -1
- package/dist/magma-components/p-15d3742b.entry.js +0 -1
- package/dist/magma-components/p-189867fe.system.entry.js +0 -1
- package/dist/magma-components/p-18b16f64.system.entry.js +0 -1
- package/dist/magma-components/p-1ed337e0.entry.js +0 -1
- package/dist/magma-components/p-1eebabf2.entry.js +0 -1
- package/dist/magma-components/p-1f29eafd.entry.js +0 -1
- package/dist/magma-components/p-1ffda3d3.entry.js +0 -1
- package/dist/magma-components/p-20a0e4ed.entry.js +0 -1
- package/dist/magma-components/p-23bdb4b9.entry.js +0 -1
- package/dist/magma-components/p-243cd6ac.entry.js +0 -1
- package/dist/magma-components/p-2445abc7.entry.js +0 -1
- package/dist/magma-components/p-262d9b35.system.entry.js +0 -1
- package/dist/magma-components/p-2634fdb6.system.entry.js +0 -1
- package/dist/magma-components/p-26a6c88d.system.entry.js +0 -1
- package/dist/magma-components/p-26aa7c0a.entry.js +0 -1
- package/dist/magma-components/p-273da050.system.entry.js +0 -1
- package/dist/magma-components/p-28d0a199.entry.js +0 -1
- package/dist/magma-components/p-29666107.system.entry.js +0 -1
- package/dist/magma-components/p-2c591bb6.system.entry.js +0 -1
- package/dist/magma-components/p-2ea972ee.entry.js +0 -1
- package/dist/magma-components/p-2f9a4987.entry.js +0 -1
- package/dist/magma-components/p-2ff9602e.system.entry.js +0 -1
- package/dist/magma-components/p-306e8c38.system.entry.js +0 -1
- package/dist/magma-components/p-311501ee.entry.js +0 -1
- package/dist/magma-components/p-3174b23d.entry.js +0 -1
- package/dist/magma-components/p-3310f321.entry.js +0 -1
- package/dist/magma-components/p-3498386e.entry.js +0 -1
- package/dist/magma-components/p-35347823.system.entry.js +0 -1
- package/dist/magma-components/p-366a19e8.entry.js +0 -1
- package/dist/magma-components/p-378f31a6.system.entry.js +0 -1
- package/dist/magma-components/p-37ed33dd.system.entry.js +0 -1
- package/dist/magma-components/p-37fc281b.system.entry.js +0 -1
- package/dist/magma-components/p-3d26511d.entry.js +0 -1
- package/dist/magma-components/p-3ee572f8.entry.js +0 -1
- package/dist/magma-components/p-40f01f36.system.entry.js +0 -1
- package/dist/magma-components/p-4173feeb.entry.js +0 -1
- package/dist/magma-components/p-424c3870.system.entry.js +0 -1
- package/dist/magma-components/p-425d8aa7.system.entry.js +0 -1
- package/dist/magma-components/p-4337ae15.system.entry.js +0 -1
- package/dist/magma-components/p-4576a939.entry.js +0 -1
- package/dist/magma-components/p-47af67d2.system.entry.js +0 -1
- package/dist/magma-components/p-4c135083.system.entry.js +0 -17
- package/dist/magma-components/p-4cec5cdd.system.entry.js +0 -1
- package/dist/magma-components/p-4dc6a848.system.entry.js +0 -1
- package/dist/magma-components/p-4de2320c.system.entry.js +0 -1
- package/dist/magma-components/p-4e62891c.system.entry.js +0 -1
- package/dist/magma-components/p-50260c87.entry.js +0 -1
- package/dist/magma-components/p-50dae232.entry.js +0 -1
- package/dist/magma-components/p-532ab129.system.entry.js +0 -1
- package/dist/magma-components/p-54c5f7c1.entry.js +0 -1
- package/dist/magma-components/p-54f4ca42.system.entry.js +0 -1
- package/dist/magma-components/p-5846c25b.system.entry.js +0 -1
- package/dist/magma-components/p-588942b7.system.entry.js +0 -1
- package/dist/magma-components/p-58dda765.system.entry.js +0 -1
- package/dist/magma-components/p-5cd12f3a.entry.js +0 -1
- package/dist/magma-components/p-5f73aa83.system.entry.js +0 -1
- package/dist/magma-components/p-6062f434.entry.js +0 -1
- package/dist/magma-components/p-60911cb6.system.entry.js +0 -1
- package/dist/magma-components/p-62e44706.entry.js +0 -1
- package/dist/magma-components/p-67586c4c.system.entry.js +0 -1
- package/dist/magma-components/p-67a980ba.system.entry.js +0 -1
- package/dist/magma-components/p-68489eef.system.entry.js +0 -1
- package/dist/magma-components/p-697204cf.system.entry.js +0 -1
- package/dist/magma-components/p-69f23add.system.entry.js +0 -1
- package/dist/magma-components/p-6ce95afa.entry.js +0 -1
- package/dist/magma-components/p-6f008516.system.entry.js +0 -1
- package/dist/magma-components/p-75ace8e3.entry.js +0 -1
- package/dist/magma-components/p-78657972.system.entry.js +0 -1
- package/dist/magma-components/p-7b437b69.system.entry.js +0 -1
- package/dist/magma-components/p-81cc57c3.system.entry.js +0 -1
- package/dist/magma-components/p-83f64f85.system.entry.js +0 -1
- package/dist/magma-components/p-85f80db8.system.entry.js +0 -1
- package/dist/magma-components/p-862cabb7.entry.js +0 -1
- package/dist/magma-components/p-88a64306.system.entry.js +0 -1
- package/dist/magma-components/p-8904037f.system.entry.js +0 -1
- package/dist/magma-components/p-8a06e18f.system.entry.js +0 -1
- package/dist/magma-components/p-8b3a86e9.system.entry.js +0 -1
- package/dist/magma-components/p-8dc2ff30.entry.js +0 -1
- package/dist/magma-components/p-8e65b812.system.entry.js +0 -1
- package/dist/magma-components/p-9671bf48.system.entry.js +0 -1
- package/dist/magma-components/p-96b887e1.system.entry.js +0 -1
- package/dist/magma-components/p-9a9197b4.system.entry.js +0 -1
- package/dist/magma-components/p-9d276d82.entry.js +0 -1
- package/dist/magma-components/p-9d413aae.system.entry.js +0 -1
- package/dist/magma-components/p-9ed86996.entry.js +0 -1
- package/dist/magma-components/p-BfAC4pqU.js +0 -2
- package/dist/magma-components/p-C3FmKB70.system.js +0 -1
- package/dist/magma-components/p-DQqgZ0cY.system.js +0 -2
- package/dist/magma-components/p-YWpyar7R.system.js +0 -1
- package/dist/magma-components/p-a301089d.system.entry.js +0 -1
- package/dist/magma-components/p-a3b7c3a4.system.entry.js +0 -1
- package/dist/magma-components/p-a8045692.entry.js +0 -8
- package/dist/magma-components/p-a80cccaf.system.entry.js +0 -1
- package/dist/magma-components/p-a97f5bcf.entry.js +0 -1
- package/dist/magma-components/p-aa36fa23.system.entry.js +0 -1
- package/dist/magma-components/p-ab9f8323.system.entry.js +0 -1
- package/dist/magma-components/p-ac58144b.system.entry.js +0 -1
- package/dist/magma-components/p-ac83e397.system.entry.js +0 -1
- package/dist/magma-components/p-b095c76c.system.entry.js +0 -1
- package/dist/magma-components/p-b099c62f.system.entry.js +0 -1
- package/dist/magma-components/p-b1ed5b11.system.entry.js +0 -1
- package/dist/magma-components/p-b357828f.entry.js +0 -1
- package/dist/magma-components/p-b3a2264a.system.entry.js +0 -1
- package/dist/magma-components/p-b3c10df3.system.entry.js +0 -1
- package/dist/magma-components/p-b3f73660.system.entry.js +0 -1
- package/dist/magma-components/p-b4365088.entry.js +0 -1
- package/dist/magma-components/p-b56cbc41.entry.js +0 -1
- package/dist/magma-components/p-b7095315.entry.js +0 -1
- package/dist/magma-components/p-b73122dd.entry.js +0 -1
- package/dist/magma-components/p-b7c13b8f.entry.js +0 -1
- package/dist/magma-components/p-b9accbfe.entry.js +0 -1
- package/dist/magma-components/p-bc187c3e.system.entry.js +0 -1
- package/dist/magma-components/p-bcd19fac.entry.js +0 -1
- package/dist/magma-components/p-bd4d2dde.entry.js +0 -1
- package/dist/magma-components/p-be5f3afa.system.entry.js +0 -1
- package/dist/magma-components/p-bed25376.system.entry.js +0 -1
- package/dist/magma-components/p-c0c4d65e.system.entry.js +0 -1
- package/dist/magma-components/p-c409307f.system.entry.js +0 -1
- package/dist/magma-components/p-c6410cd5.entry.js +0 -1
- package/dist/magma-components/p-c8349720.entry.js +0 -1
- package/dist/magma-components/p-cb329d03.system.entry.js +0 -1
- package/dist/magma-components/p-cd80c3d4.entry.js +0 -1
- package/dist/magma-components/p-ce6e9905.system.entry.js +0 -1
- package/dist/magma-components/p-cfd475d8.system.entry.js +0 -1
- package/dist/magma-components/p-d057243f.system.entry.js +0 -1
- package/dist/magma-components/p-d1188a0a.system.entry.js +0 -9
- package/dist/magma-components/p-d1574fd4.system.entry.js +0 -1
- package/dist/magma-components/p-d1d1d3f9.entry.js +0 -1
- package/dist/magma-components/p-d5aa3d8f.system.entry.js +0 -1
- package/dist/magma-components/p-d7b05354.system.entry.js +0 -1
- package/dist/magma-components/p-d87a0a3c.system.entry.js +0 -1
- package/dist/magma-components/p-dd905ce6.entry.js +0 -1
- package/dist/magma-components/p-de2cf21a.entry.js +0 -1
- package/dist/magma-components/p-e285b234.system.entry.js +0 -1
- package/dist/magma-components/p-e4b2f4a5.entry.js +0 -1
- package/dist/magma-components/p-e5bb0588.system.entry.js +0 -1
- package/dist/magma-components/p-e8a68ec6.system.entry.js +0 -1
- package/dist/magma-components/p-eaf44e56.entry.js +0 -1
- package/dist/magma-components/p-ec80755e.entry.js +0 -1
- package/dist/magma-components/p-ec86fabf.system.entry.js +0 -1
- package/dist/magma-components/p-ed988ff9.entry.js +0 -1
- package/dist/magma-components/p-ef766346.system.entry.js +0 -1
- package/dist/magma-components/p-f02b5c85.system.entry.js +0 -1
- package/dist/magma-components/p-f0df5249.entry.js +0 -1
- package/dist/magma-components/p-f1418e28.system.entry.js +0 -1
- package/dist/magma-components/p-f483796b.system.entry.js +0 -1
- package/dist/magma-components/p-f528e98a.entry.js +0 -1
- package/dist/magma-components/p-f69095c5.entry.js +0 -1
- package/dist/magma-components/p-f6bffd82.entry.js +0 -1
- package/dist/magma-components/p-f7023e4e.system.entry.js +0 -1
- package/dist/magma-components/p-f8f2b590.system.entry.js +0 -1
- package/dist/magma-components/p-f902cb3a.system.entry.js +0 -1
- package/dist/magma-components/p-f962b4dc.entry.js +0 -1
- package/dist/magma-components/p-fa038ac2.entry.js +0 -1
- package/dist/magma-components/p-fbf60d0d.system.entry.js +0 -1
- package/dist/magma-components/p-fdf44de5.system.entry.js +0 -1
- package/dist/magma-components/p-ffeeb010.entry.js +0 -1
|
@@ -1,1695 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom positioning reference element.
|
|
3
|
-
* @see https://floating-ui.com/docs/virtual-elements
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const sides = ['top', 'right', 'bottom', 'left'];
|
|
7
|
-
const alignments = ['start', 'end'];
|
|
8
|
-
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
9
|
-
const min = Math.min;
|
|
10
|
-
const max = Math.max;
|
|
11
|
-
const round = Math.round;
|
|
12
|
-
const floor = Math.floor;
|
|
13
|
-
const createCoords = v => ({
|
|
14
|
-
x: v,
|
|
15
|
-
y: v
|
|
16
|
-
});
|
|
17
|
-
const oppositeSideMap = {
|
|
18
|
-
left: 'right',
|
|
19
|
-
right: 'left',
|
|
20
|
-
bottom: 'top',
|
|
21
|
-
top: 'bottom'
|
|
22
|
-
};
|
|
23
|
-
function clamp(start, value, end) {
|
|
24
|
-
return max(start, min(value, end));
|
|
25
|
-
}
|
|
26
|
-
function evaluate(value, param) {
|
|
27
|
-
return typeof value === 'function' ? value(param) : value;
|
|
28
|
-
}
|
|
29
|
-
function getSide(placement) {
|
|
30
|
-
return placement.split('-')[0];
|
|
31
|
-
}
|
|
32
|
-
function getAlignment(placement) {
|
|
33
|
-
return placement.split('-')[1];
|
|
34
|
-
}
|
|
35
|
-
function getOppositeAxis(axis) {
|
|
36
|
-
return axis === 'x' ? 'y' : 'x';
|
|
37
|
-
}
|
|
38
|
-
function getAxisLength(axis) {
|
|
39
|
-
return axis === 'y' ? 'height' : 'width';
|
|
40
|
-
}
|
|
41
|
-
function getSideAxis(placement) {
|
|
42
|
-
const firstChar = placement[0];
|
|
43
|
-
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
44
|
-
}
|
|
45
|
-
function getAlignmentAxis(placement) {
|
|
46
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
47
|
-
}
|
|
48
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
49
|
-
if (rtl === void 0) {
|
|
50
|
-
rtl = false;
|
|
51
|
-
}
|
|
52
|
-
const alignment = getAlignment(placement);
|
|
53
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
54
|
-
const length = getAxisLength(alignmentAxis);
|
|
55
|
-
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
56
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
57
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
58
|
-
}
|
|
59
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
60
|
-
}
|
|
61
|
-
function getExpandedPlacements(placement) {
|
|
62
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
63
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
64
|
-
}
|
|
65
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
66
|
-
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
67
|
-
}
|
|
68
|
-
const lrPlacement = ['left', 'right'];
|
|
69
|
-
const rlPlacement = ['right', 'left'];
|
|
70
|
-
const tbPlacement = ['top', 'bottom'];
|
|
71
|
-
const btPlacement = ['bottom', 'top'];
|
|
72
|
-
function getSideList(side, isStart, rtl) {
|
|
73
|
-
switch (side) {
|
|
74
|
-
case 'top':
|
|
75
|
-
case 'bottom':
|
|
76
|
-
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
77
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
78
|
-
case 'left':
|
|
79
|
-
case 'right':
|
|
80
|
-
return isStart ? tbPlacement : btPlacement;
|
|
81
|
-
default:
|
|
82
|
-
return [];
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
86
|
-
const alignment = getAlignment(placement);
|
|
87
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
88
|
-
if (alignment) {
|
|
89
|
-
list = list.map(side => side + "-" + alignment);
|
|
90
|
-
if (flipAlignment) {
|
|
91
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return list;
|
|
95
|
-
}
|
|
96
|
-
function getOppositePlacement(placement) {
|
|
97
|
-
const side = getSide(placement);
|
|
98
|
-
return oppositeSideMap[side] + placement.slice(side.length);
|
|
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
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
194
|
-
* element is overflowing a given clipping boundary on each side.
|
|
195
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
196
|
-
* - negative = how many pixels left before it will overflow
|
|
197
|
-
* - 0 = lies flush with the boundary
|
|
198
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
199
|
-
*/
|
|
200
|
-
async function detectOverflow(state, options) {
|
|
201
|
-
var _await$platform$isEle;
|
|
202
|
-
if (options === void 0) {
|
|
203
|
-
options = {};
|
|
204
|
-
}
|
|
205
|
-
const {
|
|
206
|
-
x,
|
|
207
|
-
y,
|
|
208
|
-
platform,
|
|
209
|
-
rects,
|
|
210
|
-
elements,
|
|
211
|
-
strategy
|
|
212
|
-
} = state;
|
|
213
|
-
const {
|
|
214
|
-
boundary = 'clippingAncestors',
|
|
215
|
-
rootBoundary = 'viewport',
|
|
216
|
-
elementContext = 'floating',
|
|
217
|
-
altBoundary = false,
|
|
218
|
-
padding = 0
|
|
219
|
-
} = evaluate(options, state);
|
|
220
|
-
const paddingObject = getPaddingObject(padding);
|
|
221
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
222
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
223
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
224
|
-
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))),
|
|
225
|
-
boundary,
|
|
226
|
-
rootBoundary,
|
|
227
|
-
strategy
|
|
228
|
-
}));
|
|
229
|
-
const rect = elementContext === 'floating' ? {
|
|
230
|
-
x,
|
|
231
|
-
y,
|
|
232
|
-
width: rects.floating.width,
|
|
233
|
-
height: rects.floating.height
|
|
234
|
-
} : rects.reference;
|
|
235
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
236
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
237
|
-
x: 1,
|
|
238
|
-
y: 1
|
|
239
|
-
} : {
|
|
240
|
-
x: 1,
|
|
241
|
-
y: 1
|
|
242
|
-
};
|
|
243
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
244
|
-
elements,
|
|
245
|
-
rect,
|
|
246
|
-
offsetParent,
|
|
247
|
-
strategy
|
|
248
|
-
}) : rect);
|
|
249
|
-
return {
|
|
250
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
251
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
252
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
253
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
258
|
-
const MAX_RESET_COUNT = 50;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
262
|
-
* next to a given reference element.
|
|
263
|
-
*
|
|
264
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
265
|
-
* write one for the platform you are using Floating UI with.
|
|
266
|
-
*/
|
|
267
|
-
const computePosition$1 = async (reference, floating, config) => {
|
|
268
|
-
const {
|
|
269
|
-
placement = 'bottom',
|
|
270
|
-
strategy = 'absolute',
|
|
271
|
-
middleware = [],
|
|
272
|
-
platform
|
|
273
|
-
} = config;
|
|
274
|
-
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
275
|
-
...platform,
|
|
276
|
-
detectOverflow
|
|
277
|
-
};
|
|
278
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
279
|
-
let rects = await platform.getElementRects({
|
|
280
|
-
reference,
|
|
281
|
-
floating,
|
|
282
|
-
strategy
|
|
283
|
-
});
|
|
284
|
-
let {
|
|
285
|
-
x,
|
|
286
|
-
y
|
|
287
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
288
|
-
let statefulPlacement = placement;
|
|
289
|
-
let resetCount = 0;
|
|
290
|
-
const middlewareData = {};
|
|
291
|
-
for (let i = 0; i < middleware.length; i++) {
|
|
292
|
-
const currentMiddleware = middleware[i];
|
|
293
|
-
if (!currentMiddleware) {
|
|
294
|
-
continue;
|
|
295
|
-
}
|
|
296
|
-
const {
|
|
297
|
-
name,
|
|
298
|
-
fn
|
|
299
|
-
} = currentMiddleware;
|
|
300
|
-
const {
|
|
301
|
-
x: nextX,
|
|
302
|
-
y: nextY,
|
|
303
|
-
data,
|
|
304
|
-
reset
|
|
305
|
-
} = await fn({
|
|
306
|
-
x,
|
|
307
|
-
y,
|
|
308
|
-
initialPlacement: placement,
|
|
309
|
-
placement: statefulPlacement,
|
|
310
|
-
strategy,
|
|
311
|
-
middlewareData,
|
|
312
|
-
rects,
|
|
313
|
-
platform: platformWithDetectOverflow,
|
|
314
|
-
elements: {
|
|
315
|
-
reference,
|
|
316
|
-
floating
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
x = nextX != null ? nextX : x;
|
|
320
|
-
y = nextY != null ? nextY : y;
|
|
321
|
-
middlewareData[name] = {
|
|
322
|
-
...middlewareData[name],
|
|
323
|
-
...data
|
|
324
|
-
};
|
|
325
|
-
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
326
|
-
resetCount++;
|
|
327
|
-
if (typeof reset === 'object') {
|
|
328
|
-
if (reset.placement) {
|
|
329
|
-
statefulPlacement = reset.placement;
|
|
330
|
-
}
|
|
331
|
-
if (reset.rects) {
|
|
332
|
-
rects = reset.rects === true ? await platform.getElementRects({
|
|
333
|
-
reference,
|
|
334
|
-
floating,
|
|
335
|
-
strategy
|
|
336
|
-
}) : reset.rects;
|
|
337
|
-
}
|
|
338
|
-
({
|
|
339
|
-
x,
|
|
340
|
-
y
|
|
341
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
342
|
-
}
|
|
343
|
-
i = -1;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return {
|
|
347
|
-
x,
|
|
348
|
-
y,
|
|
349
|
-
placement: statefulPlacement,
|
|
350
|
-
strategy,
|
|
351
|
-
middlewareData
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Provides data to position an inner element of the floating element so that it
|
|
357
|
-
* appears centered to the reference element.
|
|
358
|
-
* @see https://floating-ui.com/docs/arrow
|
|
359
|
-
*/
|
|
360
|
-
const arrow$1 = options => ({
|
|
361
|
-
name: 'arrow',
|
|
362
|
-
options,
|
|
363
|
-
async fn(state) {
|
|
364
|
-
const {
|
|
365
|
-
x,
|
|
366
|
-
y,
|
|
367
|
-
placement,
|
|
368
|
-
rects,
|
|
369
|
-
platform,
|
|
370
|
-
elements,
|
|
371
|
-
middlewareData
|
|
372
|
-
} = state;
|
|
373
|
-
// Since `element` is required, we don't Partial<> the type.
|
|
374
|
-
const {
|
|
375
|
-
element,
|
|
376
|
-
padding = 0
|
|
377
|
-
} = evaluate(options, state) || {};
|
|
378
|
-
if (element == null) {
|
|
379
|
-
return {};
|
|
380
|
-
}
|
|
381
|
-
const paddingObject = getPaddingObject(padding);
|
|
382
|
-
const coords = {
|
|
383
|
-
x,
|
|
384
|
-
y
|
|
385
|
-
};
|
|
386
|
-
const axis = getAlignmentAxis(placement);
|
|
387
|
-
const length = getAxisLength(axis);
|
|
388
|
-
const arrowDimensions = await platform.getDimensions(element);
|
|
389
|
-
const isYAxis = axis === 'y';
|
|
390
|
-
const minProp = isYAxis ? 'top' : 'left';
|
|
391
|
-
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
392
|
-
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
393
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
394
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
395
|
-
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
396
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
397
|
-
|
|
398
|
-
// DOM platform can return `window` as the `offsetParent`.
|
|
399
|
-
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
400
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
401
|
-
}
|
|
402
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
403
|
-
|
|
404
|
-
// If the padding is large enough that it causes the arrow to no longer be
|
|
405
|
-
// centered, modify the padding so that it is centered.
|
|
406
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
407
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
408
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
409
|
-
|
|
410
|
-
// Make sure the arrow doesn't overflow the floating element if the center
|
|
411
|
-
// point is outside the floating element's bounds.
|
|
412
|
-
const min$1 = minPadding;
|
|
413
|
-
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
414
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
415
|
-
const offset = clamp(min$1, center, max);
|
|
416
|
-
|
|
417
|
-
// If the reference is small enough that the arrow's padding causes it to
|
|
418
|
-
// to point to nothing for an aligned placement, adjust the offset of the
|
|
419
|
-
// floating element itself. To ensure `shift()` continues to take action,
|
|
420
|
-
// a single reset is performed when this is true.
|
|
421
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
422
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
423
|
-
return {
|
|
424
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
425
|
-
data: {
|
|
426
|
-
[axis]: offset,
|
|
427
|
-
centerOffset: center - offset - alignmentOffset,
|
|
428
|
-
...(shouldAddOffset && {
|
|
429
|
-
alignmentOffset
|
|
430
|
-
})
|
|
431
|
-
},
|
|
432
|
-
reset: shouldAddOffset
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
438
|
-
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
439
|
-
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
440
|
-
if (alignment) {
|
|
441
|
-
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
442
|
-
}
|
|
443
|
-
return true;
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Optimizes the visibility of the floating element by choosing the placement
|
|
448
|
-
* that has the most space available automatically, without needing to specify a
|
|
449
|
-
* preferred placement. Alternative to `flip`.
|
|
450
|
-
* @see https://floating-ui.com/docs/autoPlacement
|
|
451
|
-
*/
|
|
452
|
-
const autoPlacement$1 = function (options) {
|
|
453
|
-
if (options === void 0) {
|
|
454
|
-
options = {};
|
|
455
|
-
}
|
|
456
|
-
return {
|
|
457
|
-
name: 'autoPlacement',
|
|
458
|
-
options,
|
|
459
|
-
async fn(state) {
|
|
460
|
-
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
461
|
-
const {
|
|
462
|
-
rects,
|
|
463
|
-
middlewareData,
|
|
464
|
-
placement,
|
|
465
|
-
platform,
|
|
466
|
-
elements
|
|
467
|
-
} = state;
|
|
468
|
-
const {
|
|
469
|
-
crossAxis = false,
|
|
470
|
-
alignment,
|
|
471
|
-
allowedPlacements = placements,
|
|
472
|
-
autoAlignment = true,
|
|
473
|
-
...detectOverflowOptions
|
|
474
|
-
} = evaluate(options, state);
|
|
475
|
-
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
476
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
477
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
478
|
-
const currentPlacement = placements$1[currentIndex];
|
|
479
|
-
if (currentPlacement == null) {
|
|
480
|
-
return {};
|
|
481
|
-
}
|
|
482
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
483
|
-
|
|
484
|
-
// Make `computeCoords` start from the right place.
|
|
485
|
-
if (placement !== currentPlacement) {
|
|
486
|
-
return {
|
|
487
|
-
reset: {
|
|
488
|
-
placement: placements$1[0]
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
493
|
-
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
494
|
-
placement: currentPlacement,
|
|
495
|
-
overflows: currentOverflows
|
|
496
|
-
}];
|
|
497
|
-
const nextPlacement = placements$1[currentIndex + 1];
|
|
498
|
-
|
|
499
|
-
// There are more placements to check.
|
|
500
|
-
if (nextPlacement) {
|
|
501
|
-
return {
|
|
502
|
-
data: {
|
|
503
|
-
index: currentIndex + 1,
|
|
504
|
-
overflows: allOverflows
|
|
505
|
-
},
|
|
506
|
-
reset: {
|
|
507
|
-
placement: nextPlacement
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
512
|
-
const alignment = getAlignment(d.placement);
|
|
513
|
-
return [d.placement, alignment && crossAxis ?
|
|
514
|
-
// Check along the mainAxis and main crossAxis side.
|
|
515
|
-
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
516
|
-
// Check only the mainAxis.
|
|
517
|
-
d.overflows[0], d.overflows];
|
|
518
|
-
}).sort((a, b) => a[1] - b[1]);
|
|
519
|
-
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
520
|
-
// Aligned placements should not check their opposite crossAxis
|
|
521
|
-
// side.
|
|
522
|
-
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
523
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
524
|
-
if (resetPlacement !== placement) {
|
|
525
|
-
return {
|
|
526
|
-
data: {
|
|
527
|
-
index: currentIndex + 1,
|
|
528
|
-
overflows: allOverflows
|
|
529
|
-
},
|
|
530
|
-
reset: {
|
|
531
|
-
placement: resetPlacement
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
return {};
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
542
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
543
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
544
|
-
* @see https://floating-ui.com/docs/flip
|
|
545
|
-
*/
|
|
546
|
-
const flip$1 = function (options) {
|
|
547
|
-
if (options === void 0) {
|
|
548
|
-
options = {};
|
|
549
|
-
}
|
|
550
|
-
return {
|
|
551
|
-
name: 'flip',
|
|
552
|
-
options,
|
|
553
|
-
async fn(state) {
|
|
554
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
555
|
-
const {
|
|
556
|
-
placement,
|
|
557
|
-
middlewareData,
|
|
558
|
-
rects,
|
|
559
|
-
initialPlacement,
|
|
560
|
-
platform,
|
|
561
|
-
elements
|
|
562
|
-
} = state;
|
|
563
|
-
const {
|
|
564
|
-
mainAxis: checkMainAxis = true,
|
|
565
|
-
crossAxis: checkCrossAxis = true,
|
|
566
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
567
|
-
fallbackStrategy = 'bestFit',
|
|
568
|
-
fallbackAxisSideDirection = 'none',
|
|
569
|
-
flipAlignment = true,
|
|
570
|
-
...detectOverflowOptions
|
|
571
|
-
} = evaluate(options, state);
|
|
572
|
-
|
|
573
|
-
// If a reset by the arrow was caused due to an alignment offset being
|
|
574
|
-
// added, we should skip any logic now since `flip()` has already done its
|
|
575
|
-
// work.
|
|
576
|
-
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
577
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
578
|
-
return {};
|
|
579
|
-
}
|
|
580
|
-
const side = getSide(placement);
|
|
581
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
582
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
583
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
584
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
585
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
586
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
587
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
588
|
-
}
|
|
589
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
590
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
591
|
-
const overflows = [];
|
|
592
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
593
|
-
if (checkMainAxis) {
|
|
594
|
-
overflows.push(overflow[side]);
|
|
595
|
-
}
|
|
596
|
-
if (checkCrossAxis) {
|
|
597
|
-
const sides = getAlignmentSides(placement, rects, rtl);
|
|
598
|
-
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
599
|
-
}
|
|
600
|
-
overflowsData = [...overflowsData, {
|
|
601
|
-
placement,
|
|
602
|
-
overflows
|
|
603
|
-
}];
|
|
604
|
-
|
|
605
|
-
// One or more sides is overflowing.
|
|
606
|
-
if (!overflows.every(side => side <= 0)) {
|
|
607
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
608
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
609
|
-
const nextPlacement = placements[nextIndex];
|
|
610
|
-
if (nextPlacement) {
|
|
611
|
-
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
612
|
-
if (!ignoreCrossAxisOverflow ||
|
|
613
|
-
// We leave the current main axis only if every placement on that axis
|
|
614
|
-
// overflows the main axis.
|
|
615
|
-
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
616
|
-
// Try next placement and re-run the lifecycle.
|
|
617
|
-
return {
|
|
618
|
-
data: {
|
|
619
|
-
index: nextIndex,
|
|
620
|
-
overflows: overflowsData
|
|
621
|
-
},
|
|
622
|
-
reset: {
|
|
623
|
-
placement: nextPlacement
|
|
624
|
-
}
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
630
|
-
// then find the placement that fits the best on the main crossAxis side.
|
|
631
|
-
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;
|
|
632
|
-
|
|
633
|
-
// Otherwise fallback.
|
|
634
|
-
if (!resetPlacement) {
|
|
635
|
-
switch (fallbackStrategy) {
|
|
636
|
-
case 'bestFit':
|
|
637
|
-
{
|
|
638
|
-
var _overflowsData$filter2;
|
|
639
|
-
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
640
|
-
if (hasFallbackAxisSideDirection) {
|
|
641
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
642
|
-
return currentSideAxis === initialSideAxis ||
|
|
643
|
-
// Create a bias to the `y` side axis due to horizontal
|
|
644
|
-
// reading directions favoring greater width.
|
|
645
|
-
currentSideAxis === 'y';
|
|
646
|
-
}
|
|
647
|
-
return true;
|
|
648
|
-
}).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];
|
|
649
|
-
if (placement) {
|
|
650
|
-
resetPlacement = placement;
|
|
651
|
-
}
|
|
652
|
-
break;
|
|
653
|
-
}
|
|
654
|
-
case 'initialPlacement':
|
|
655
|
-
resetPlacement = initialPlacement;
|
|
656
|
-
break;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
if (placement !== resetPlacement) {
|
|
660
|
-
return {
|
|
661
|
-
reset: {
|
|
662
|
-
placement: resetPlacement
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
return {};
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
673
|
-
|
|
674
|
-
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
675
|
-
// Derivable.
|
|
676
|
-
|
|
677
|
-
async function convertValueToCoords(state, options) {
|
|
678
|
-
const {
|
|
679
|
-
placement,
|
|
680
|
-
platform,
|
|
681
|
-
elements
|
|
682
|
-
} = state;
|
|
683
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
684
|
-
const side = getSide(placement);
|
|
685
|
-
const alignment = getAlignment(placement);
|
|
686
|
-
const isVertical = getSideAxis(placement) === 'y';
|
|
687
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
688
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
689
|
-
const rawValue = evaluate(options, state);
|
|
690
|
-
|
|
691
|
-
// eslint-disable-next-line prefer-const
|
|
692
|
-
let {
|
|
693
|
-
mainAxis,
|
|
694
|
-
crossAxis,
|
|
695
|
-
alignmentAxis
|
|
696
|
-
} = typeof rawValue === 'number' ? {
|
|
697
|
-
mainAxis: rawValue,
|
|
698
|
-
crossAxis: 0,
|
|
699
|
-
alignmentAxis: null
|
|
700
|
-
} : {
|
|
701
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
702
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
703
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
704
|
-
};
|
|
705
|
-
if (alignment && typeof alignmentAxis === 'number') {
|
|
706
|
-
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
707
|
-
}
|
|
708
|
-
return isVertical ? {
|
|
709
|
-
x: crossAxis * crossAxisMulti,
|
|
710
|
-
y: mainAxis * mainAxisMulti
|
|
711
|
-
} : {
|
|
712
|
-
x: mainAxis * mainAxisMulti,
|
|
713
|
-
y: crossAxis * crossAxisMulti
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Modifies the placement by translating the floating element along the
|
|
719
|
-
* specified axes.
|
|
720
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
721
|
-
* object may be passed.
|
|
722
|
-
* @see https://floating-ui.com/docs/offset
|
|
723
|
-
*/
|
|
724
|
-
const offset$1 = function (options) {
|
|
725
|
-
if (options === void 0) {
|
|
726
|
-
options = 0;
|
|
727
|
-
}
|
|
728
|
-
return {
|
|
729
|
-
name: 'offset',
|
|
730
|
-
options,
|
|
731
|
-
async fn(state) {
|
|
732
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
733
|
-
const {
|
|
734
|
-
x,
|
|
735
|
-
y,
|
|
736
|
-
placement,
|
|
737
|
-
middlewareData
|
|
738
|
-
} = state;
|
|
739
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
740
|
-
|
|
741
|
-
// If the placement is the same and the arrow caused an alignment offset
|
|
742
|
-
// then we don't need to change the positioning coordinates.
|
|
743
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
744
|
-
return {};
|
|
745
|
-
}
|
|
746
|
-
return {
|
|
747
|
-
x: x + diffCoords.x,
|
|
748
|
-
y: y + diffCoords.y,
|
|
749
|
-
data: {
|
|
750
|
-
...diffCoords,
|
|
751
|
-
placement
|
|
752
|
-
}
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
};
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
/**
|
|
759
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
760
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
761
|
-
* @see https://floating-ui.com/docs/shift
|
|
762
|
-
*/
|
|
763
|
-
const shift$1 = function (options) {
|
|
764
|
-
if (options === void 0) {
|
|
765
|
-
options = {};
|
|
766
|
-
}
|
|
767
|
-
return {
|
|
768
|
-
name: 'shift',
|
|
769
|
-
options,
|
|
770
|
-
async fn(state) {
|
|
771
|
-
const {
|
|
772
|
-
x,
|
|
773
|
-
y,
|
|
774
|
-
placement,
|
|
775
|
-
platform
|
|
776
|
-
} = state;
|
|
777
|
-
const {
|
|
778
|
-
mainAxis: checkMainAxis = true,
|
|
779
|
-
crossAxis: checkCrossAxis = false,
|
|
780
|
-
limiter = {
|
|
781
|
-
fn: _ref => {
|
|
782
|
-
let {
|
|
783
|
-
x,
|
|
784
|
-
y
|
|
785
|
-
} = _ref;
|
|
786
|
-
return {
|
|
787
|
-
x,
|
|
788
|
-
y
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
...detectOverflowOptions
|
|
793
|
-
} = evaluate(options, state);
|
|
794
|
-
const coords = {
|
|
795
|
-
x,
|
|
796
|
-
y
|
|
797
|
-
};
|
|
798
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
799
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
800
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
801
|
-
let mainAxisCoord = coords[mainAxis];
|
|
802
|
-
let crossAxisCoord = coords[crossAxis];
|
|
803
|
-
if (checkMainAxis) {
|
|
804
|
-
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
805
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
806
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
807
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
808
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
809
|
-
}
|
|
810
|
-
if (checkCrossAxis) {
|
|
811
|
-
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
812
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
813
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
814
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
815
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
816
|
-
}
|
|
817
|
-
const limitedCoords = limiter.fn({
|
|
818
|
-
...state,
|
|
819
|
-
[mainAxis]: mainAxisCoord,
|
|
820
|
-
[crossAxis]: crossAxisCoord
|
|
821
|
-
});
|
|
822
|
-
return {
|
|
823
|
-
...limitedCoords,
|
|
824
|
-
data: {
|
|
825
|
-
x: limitedCoords.x - x,
|
|
826
|
-
y: limitedCoords.y - y,
|
|
827
|
-
enabled: {
|
|
828
|
-
[mainAxis]: checkMainAxis,
|
|
829
|
-
[crossAxis]: checkCrossAxis
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
|
|
837
|
-
function hasWindow() {
|
|
838
|
-
return typeof window !== 'undefined';
|
|
839
|
-
}
|
|
840
|
-
function getNodeName(node) {
|
|
841
|
-
if (isNode(node)) {
|
|
842
|
-
return (node.nodeName || '').toLowerCase();
|
|
843
|
-
}
|
|
844
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
845
|
-
// returning `#document` an infinite loop won't occur.
|
|
846
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
847
|
-
return '#document';
|
|
848
|
-
}
|
|
849
|
-
function getWindow(node) {
|
|
850
|
-
var _node$ownerDocument;
|
|
851
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
852
|
-
}
|
|
853
|
-
function getDocumentElement(node) {
|
|
854
|
-
var _ref;
|
|
855
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
856
|
-
}
|
|
857
|
-
function isNode(value) {
|
|
858
|
-
if (!hasWindow()) {
|
|
859
|
-
return false;
|
|
860
|
-
}
|
|
861
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
862
|
-
}
|
|
863
|
-
function isElement(value) {
|
|
864
|
-
if (!hasWindow()) {
|
|
865
|
-
return false;
|
|
866
|
-
}
|
|
867
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
868
|
-
}
|
|
869
|
-
function isHTMLElement(value) {
|
|
870
|
-
if (!hasWindow()) {
|
|
871
|
-
return false;
|
|
872
|
-
}
|
|
873
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
874
|
-
}
|
|
875
|
-
function isShadowRoot(value) {
|
|
876
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
877
|
-
return false;
|
|
878
|
-
}
|
|
879
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
880
|
-
}
|
|
881
|
-
function isOverflowElement(element) {
|
|
882
|
-
const {
|
|
883
|
-
overflow,
|
|
884
|
-
overflowX,
|
|
885
|
-
overflowY,
|
|
886
|
-
display
|
|
887
|
-
} = getComputedStyle(element);
|
|
888
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
889
|
-
}
|
|
890
|
-
function isTableElement(element) {
|
|
891
|
-
return /^(table|td|th)$/.test(getNodeName(element));
|
|
892
|
-
}
|
|
893
|
-
function isTopLayer(element) {
|
|
894
|
-
try {
|
|
895
|
-
if (element.matches(':popover-open')) {
|
|
896
|
-
return true;
|
|
897
|
-
}
|
|
898
|
-
} catch (_e) {
|
|
899
|
-
// no-op
|
|
900
|
-
}
|
|
901
|
-
try {
|
|
902
|
-
return element.matches(':modal');
|
|
903
|
-
} catch (_e) {
|
|
904
|
-
return false;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
908
|
-
const containRe = /paint|layout|strict|content/;
|
|
909
|
-
const isNotNone = value => !!value && value !== 'none';
|
|
910
|
-
let isWebKitValue;
|
|
911
|
-
function isContainingBlock(elementOrCss) {
|
|
912
|
-
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
913
|
-
|
|
914
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
915
|
-
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
916
|
-
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
917
|
-
}
|
|
918
|
-
function getContainingBlock(element) {
|
|
919
|
-
let currentNode = getParentNode(element);
|
|
920
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
921
|
-
if (isContainingBlock(currentNode)) {
|
|
922
|
-
return currentNode;
|
|
923
|
-
} else if (isTopLayer(currentNode)) {
|
|
924
|
-
return null;
|
|
925
|
-
}
|
|
926
|
-
currentNode = getParentNode(currentNode);
|
|
927
|
-
}
|
|
928
|
-
return null;
|
|
929
|
-
}
|
|
930
|
-
function isWebKit() {
|
|
931
|
-
if (isWebKitValue == null) {
|
|
932
|
-
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
933
|
-
}
|
|
934
|
-
return isWebKitValue;
|
|
935
|
-
}
|
|
936
|
-
function isLastTraversableNode(node) {
|
|
937
|
-
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
938
|
-
}
|
|
939
|
-
function getComputedStyle(element) {
|
|
940
|
-
return getWindow(element).getComputedStyle(element);
|
|
941
|
-
}
|
|
942
|
-
function getNodeScroll(element) {
|
|
943
|
-
if (isElement(element)) {
|
|
944
|
-
return {
|
|
945
|
-
scrollLeft: element.scrollLeft,
|
|
946
|
-
scrollTop: element.scrollTop
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
return {
|
|
950
|
-
scrollLeft: element.scrollX,
|
|
951
|
-
scrollTop: element.scrollY
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
function getParentNode(node) {
|
|
955
|
-
if (getNodeName(node) === 'html') {
|
|
956
|
-
return node;
|
|
957
|
-
}
|
|
958
|
-
const result =
|
|
959
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
960
|
-
node.assignedSlot ||
|
|
961
|
-
// DOM Element detected.
|
|
962
|
-
node.parentNode ||
|
|
963
|
-
// ShadowRoot detected.
|
|
964
|
-
isShadowRoot(node) && node.host ||
|
|
965
|
-
// Fallback.
|
|
966
|
-
getDocumentElement(node);
|
|
967
|
-
return isShadowRoot(result) ? result.host : result;
|
|
968
|
-
}
|
|
969
|
-
function getNearestOverflowAncestor(node) {
|
|
970
|
-
const parentNode = getParentNode(node);
|
|
971
|
-
if (isLastTraversableNode(parentNode)) {
|
|
972
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
973
|
-
}
|
|
974
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
975
|
-
return parentNode;
|
|
976
|
-
}
|
|
977
|
-
return getNearestOverflowAncestor(parentNode);
|
|
978
|
-
}
|
|
979
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
980
|
-
var _node$ownerDocument2;
|
|
981
|
-
if (list === void 0) {
|
|
982
|
-
list = [];
|
|
983
|
-
}
|
|
984
|
-
if (traverseIframes === void 0) {
|
|
985
|
-
traverseIframes = true;
|
|
986
|
-
}
|
|
987
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
988
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
989
|
-
const win = getWindow(scrollableAncestor);
|
|
990
|
-
if (isBody) {
|
|
991
|
-
const frameElement = getFrameElement(win);
|
|
992
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
993
|
-
} else {
|
|
994
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
function getFrameElement(win) {
|
|
998
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
function getCssDimensions(element) {
|
|
1002
|
-
const css = getComputedStyle(element);
|
|
1003
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
1004
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1005
|
-
let width = parseFloat(css.width) || 0;
|
|
1006
|
-
let height = parseFloat(css.height) || 0;
|
|
1007
|
-
const hasOffset = isHTMLElement(element);
|
|
1008
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1009
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1010
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1011
|
-
if (shouldFallback) {
|
|
1012
|
-
width = offsetWidth;
|
|
1013
|
-
height = offsetHeight;
|
|
1014
|
-
}
|
|
1015
|
-
return {
|
|
1016
|
-
width,
|
|
1017
|
-
height,
|
|
1018
|
-
$: shouldFallback
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
function unwrapElement(element) {
|
|
1023
|
-
return !isElement(element) ? element.contextElement : element;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
function getScale(element) {
|
|
1027
|
-
const domElement = unwrapElement(element);
|
|
1028
|
-
if (!isHTMLElement(domElement)) {
|
|
1029
|
-
return createCoords(1);
|
|
1030
|
-
}
|
|
1031
|
-
const rect = domElement.getBoundingClientRect();
|
|
1032
|
-
const {
|
|
1033
|
-
width,
|
|
1034
|
-
height,
|
|
1035
|
-
$
|
|
1036
|
-
} = getCssDimensions(domElement);
|
|
1037
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1038
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1039
|
-
|
|
1040
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
1041
|
-
|
|
1042
|
-
if (!x || !Number.isFinite(x)) {
|
|
1043
|
-
x = 1;
|
|
1044
|
-
}
|
|
1045
|
-
if (!y || !Number.isFinite(y)) {
|
|
1046
|
-
y = 1;
|
|
1047
|
-
}
|
|
1048
|
-
return {
|
|
1049
|
-
x,
|
|
1050
|
-
y
|
|
1051
|
-
};
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1055
|
-
function getVisualOffsets(element) {
|
|
1056
|
-
const win = getWindow(element);
|
|
1057
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
1058
|
-
return noOffsets;
|
|
1059
|
-
}
|
|
1060
|
-
return {
|
|
1061
|
-
x: win.visualViewport.offsetLeft,
|
|
1062
|
-
y: win.visualViewport.offsetTop
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1066
|
-
if (isFixed === void 0) {
|
|
1067
|
-
isFixed = false;
|
|
1068
|
-
}
|
|
1069
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1070
|
-
return false;
|
|
1071
|
-
}
|
|
1072
|
-
return isFixed;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1076
|
-
if (includeScale === void 0) {
|
|
1077
|
-
includeScale = false;
|
|
1078
|
-
}
|
|
1079
|
-
if (isFixedStrategy === void 0) {
|
|
1080
|
-
isFixedStrategy = false;
|
|
1081
|
-
}
|
|
1082
|
-
const clientRect = element.getBoundingClientRect();
|
|
1083
|
-
const domElement = unwrapElement(element);
|
|
1084
|
-
let scale = createCoords(1);
|
|
1085
|
-
if (includeScale) {
|
|
1086
|
-
if (offsetParent) {
|
|
1087
|
-
if (isElement(offsetParent)) {
|
|
1088
|
-
scale = getScale(offsetParent);
|
|
1089
|
-
}
|
|
1090
|
-
} else {
|
|
1091
|
-
scale = getScale(element);
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1095
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1096
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1097
|
-
let width = clientRect.width / scale.x;
|
|
1098
|
-
let height = clientRect.height / scale.y;
|
|
1099
|
-
if (domElement) {
|
|
1100
|
-
const win = getWindow(domElement);
|
|
1101
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1102
|
-
let currentWin = win;
|
|
1103
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
1104
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1105
|
-
const iframeScale = getScale(currentIFrame);
|
|
1106
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1107
|
-
const css = getComputedStyle(currentIFrame);
|
|
1108
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1109
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1110
|
-
x *= iframeScale.x;
|
|
1111
|
-
y *= iframeScale.y;
|
|
1112
|
-
width *= iframeScale.x;
|
|
1113
|
-
height *= iframeScale.y;
|
|
1114
|
-
x += left;
|
|
1115
|
-
y += top;
|
|
1116
|
-
currentWin = getWindow(currentIFrame);
|
|
1117
|
-
currentIFrame = getFrameElement(currentWin);
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
return rectToClientRect({
|
|
1121
|
-
width,
|
|
1122
|
-
height,
|
|
1123
|
-
x,
|
|
1124
|
-
y
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1129
|
-
// incorrect for RTL.
|
|
1130
|
-
function getWindowScrollBarX(element, rect) {
|
|
1131
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1132
|
-
if (!rect) {
|
|
1133
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1134
|
-
}
|
|
1135
|
-
return rect.left + leftScroll;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1139
|
-
if (ignoreScrollbarX === void 0) {
|
|
1140
|
-
ignoreScrollbarX = false;
|
|
1141
|
-
}
|
|
1142
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
1143
|
-
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
1144
|
-
// RTL <body> scrollbar.
|
|
1145
|
-
getWindowScrollBarX(documentElement, htmlRect));
|
|
1146
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
1147
|
-
return {
|
|
1148
|
-
x,
|
|
1149
|
-
y
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1154
|
-
let {
|
|
1155
|
-
elements,
|
|
1156
|
-
rect,
|
|
1157
|
-
offsetParent,
|
|
1158
|
-
strategy
|
|
1159
|
-
} = _ref;
|
|
1160
|
-
const isFixed = strategy === 'fixed';
|
|
1161
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1162
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1163
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1164
|
-
return rect;
|
|
1165
|
-
}
|
|
1166
|
-
let scroll = {
|
|
1167
|
-
scrollLeft: 0,
|
|
1168
|
-
scrollTop: 0
|
|
1169
|
-
};
|
|
1170
|
-
let scale = createCoords(1);
|
|
1171
|
-
const offsets = createCoords(0);
|
|
1172
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1173
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1174
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1175
|
-
scroll = getNodeScroll(offsetParent);
|
|
1176
|
-
}
|
|
1177
|
-
if (isHTMLElement(offsetParent)) {
|
|
1178
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1179
|
-
scale = getScale(offsetParent);
|
|
1180
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1181
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
1185
|
-
return {
|
|
1186
|
-
width: rect.width * scale.x,
|
|
1187
|
-
height: rect.height * scale.y,
|
|
1188
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1189
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1190
|
-
};
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
function getClientRects(element) {
|
|
1194
|
-
return Array.from(element.getClientRects());
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
1198
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1199
|
-
function getDocumentRect(element) {
|
|
1200
|
-
const html = getDocumentElement(element);
|
|
1201
|
-
const scroll = getNodeScroll(element);
|
|
1202
|
-
const body = element.ownerDocument.body;
|
|
1203
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1204
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1205
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1206
|
-
const y = -scroll.scrollTop;
|
|
1207
|
-
if (getComputedStyle(body).direction === 'rtl') {
|
|
1208
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1209
|
-
}
|
|
1210
|
-
return {
|
|
1211
|
-
width,
|
|
1212
|
-
height,
|
|
1213
|
-
x,
|
|
1214
|
-
y
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
function getViewportRect(element, strategy) {
|
|
1219
|
-
const win = getWindow(element);
|
|
1220
|
-
const html = getDocumentElement(element);
|
|
1221
|
-
const visualViewport = win.visualViewport;
|
|
1222
|
-
let width = html.clientWidth;
|
|
1223
|
-
let height = html.clientHeight;
|
|
1224
|
-
let x = 0;
|
|
1225
|
-
let y = 0;
|
|
1226
|
-
if (visualViewport) {
|
|
1227
|
-
width = visualViewport.width;
|
|
1228
|
-
height = visualViewport.height;
|
|
1229
|
-
const visualViewportBased = isWebKit();
|
|
1230
|
-
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1231
|
-
x = visualViewport.offsetLeft;
|
|
1232
|
-
y = visualViewport.offsetTop;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
return {
|
|
1236
|
-
width,
|
|
1237
|
-
height,
|
|
1238
|
-
x,
|
|
1239
|
-
y
|
|
1240
|
-
};
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1244
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
1245
|
-
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1246
|
-
const top = clientRect.top + element.clientTop;
|
|
1247
|
-
const left = clientRect.left + element.clientLeft;
|
|
1248
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1249
|
-
const width = element.clientWidth * scale.x;
|
|
1250
|
-
const height = element.clientHeight * scale.y;
|
|
1251
|
-
const x = left * scale.x;
|
|
1252
|
-
const y = top * scale.y;
|
|
1253
|
-
return {
|
|
1254
|
-
width,
|
|
1255
|
-
height,
|
|
1256
|
-
x,
|
|
1257
|
-
y
|
|
1258
|
-
};
|
|
1259
|
-
}
|
|
1260
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1261
|
-
let rect;
|
|
1262
|
-
if (clippingAncestor === 'viewport') {
|
|
1263
|
-
rect = getViewportRect(element, strategy);
|
|
1264
|
-
} else if (clippingAncestor === 'document') {
|
|
1265
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
1266
|
-
} else if (isElement(clippingAncestor)) {
|
|
1267
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1268
|
-
} else {
|
|
1269
|
-
const visualOffsets = getVisualOffsets(element);
|
|
1270
|
-
rect = {
|
|
1271
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1272
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
1273
|
-
width: clippingAncestor.width,
|
|
1274
|
-
height: clippingAncestor.height
|
|
1275
|
-
};
|
|
1276
|
-
}
|
|
1277
|
-
return rectToClientRect(rect);
|
|
1278
|
-
}
|
|
1279
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1280
|
-
const parentNode = getParentNode(element);
|
|
1281
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1282
|
-
return false;
|
|
1283
|
-
}
|
|
1284
|
-
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1288
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1289
|
-
// of the given element up the tree.
|
|
1290
|
-
function getClippingElementAncestors(element, cache) {
|
|
1291
|
-
const cachedResult = cache.get(element);
|
|
1292
|
-
if (cachedResult) {
|
|
1293
|
-
return cachedResult;
|
|
1294
|
-
}
|
|
1295
|
-
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1296
|
-
let currentContainingBlockComputedStyle = null;
|
|
1297
|
-
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1298
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1299
|
-
|
|
1300
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1301
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1302
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
1303
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1304
|
-
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1305
|
-
currentContainingBlockComputedStyle = null;
|
|
1306
|
-
}
|
|
1307
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1308
|
-
if (shouldDropCurrentNode) {
|
|
1309
|
-
// Drop non-containing blocks.
|
|
1310
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1311
|
-
} else {
|
|
1312
|
-
// Record last containing block for next iteration.
|
|
1313
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1314
|
-
}
|
|
1315
|
-
currentNode = getParentNode(currentNode);
|
|
1316
|
-
}
|
|
1317
|
-
cache.set(element, result);
|
|
1318
|
-
return result;
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1322
|
-
// clipping ancestors.
|
|
1323
|
-
function getClippingRect(_ref) {
|
|
1324
|
-
let {
|
|
1325
|
-
element,
|
|
1326
|
-
boundary,
|
|
1327
|
-
rootBoundary,
|
|
1328
|
-
strategy
|
|
1329
|
-
} = _ref;
|
|
1330
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1331
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1332
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
1333
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1334
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1335
|
-
accRect.top = max(rect.top, accRect.top);
|
|
1336
|
-
accRect.right = min(rect.right, accRect.right);
|
|
1337
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1338
|
-
accRect.left = max(rect.left, accRect.left);
|
|
1339
|
-
return accRect;
|
|
1340
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1341
|
-
return {
|
|
1342
|
-
width: clippingRect.right - clippingRect.left,
|
|
1343
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
1344
|
-
x: clippingRect.left,
|
|
1345
|
-
y: clippingRect.top
|
|
1346
|
-
};
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function getDimensions(element) {
|
|
1350
|
-
const {
|
|
1351
|
-
width,
|
|
1352
|
-
height
|
|
1353
|
-
} = getCssDimensions(element);
|
|
1354
|
-
return {
|
|
1355
|
-
width,
|
|
1356
|
-
height
|
|
1357
|
-
};
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1361
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1362
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1363
|
-
const isFixed = strategy === 'fixed';
|
|
1364
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1365
|
-
let scroll = {
|
|
1366
|
-
scrollLeft: 0,
|
|
1367
|
-
scrollTop: 0
|
|
1368
|
-
};
|
|
1369
|
-
const offsets = createCoords(0);
|
|
1370
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1371
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1372
|
-
scroll = getNodeScroll(offsetParent);
|
|
1373
|
-
}
|
|
1374
|
-
if (isOffsetParentAnElement) {
|
|
1375
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1376
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1377
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1378
|
-
} else if (documentElement) {
|
|
1379
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1380
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1381
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1385
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1386
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1387
|
-
return {
|
|
1388
|
-
x,
|
|
1389
|
-
y,
|
|
1390
|
-
width: rect.width,
|
|
1391
|
-
height: rect.height
|
|
1392
|
-
};
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
function isStaticPositioned(element) {
|
|
1396
|
-
return getComputedStyle(element).position === 'static';
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
1400
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1401
|
-
return null;
|
|
1402
|
-
}
|
|
1403
|
-
if (polyfill) {
|
|
1404
|
-
return polyfill(element);
|
|
1405
|
-
}
|
|
1406
|
-
let rawOffsetParent = element.offsetParent;
|
|
1407
|
-
|
|
1408
|
-
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1409
|
-
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1410
|
-
// be used to perform the correct calculations even if the <html> element is
|
|
1411
|
-
// non-static.
|
|
1412
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1413
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1414
|
-
}
|
|
1415
|
-
return rawOffsetParent;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1419
|
-
// such as table ancestors and cross browser bugs.
|
|
1420
|
-
function getOffsetParent(element, polyfill) {
|
|
1421
|
-
const win = getWindow(element);
|
|
1422
|
-
if (isTopLayer(element)) {
|
|
1423
|
-
return win;
|
|
1424
|
-
}
|
|
1425
|
-
if (!isHTMLElement(element)) {
|
|
1426
|
-
let svgOffsetParent = getParentNode(element);
|
|
1427
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1428
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1429
|
-
return svgOffsetParent;
|
|
1430
|
-
}
|
|
1431
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1432
|
-
}
|
|
1433
|
-
return win;
|
|
1434
|
-
}
|
|
1435
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1436
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1437
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1438
|
-
}
|
|
1439
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1440
|
-
return win;
|
|
1441
|
-
}
|
|
1442
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
const getElementRects = async function (data) {
|
|
1446
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1447
|
-
const getDimensionsFn = this.getDimensions;
|
|
1448
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1449
|
-
return {
|
|
1450
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1451
|
-
floating: {
|
|
1452
|
-
x: 0,
|
|
1453
|
-
y: 0,
|
|
1454
|
-
width: floatingDimensions.width,
|
|
1455
|
-
height: floatingDimensions.height
|
|
1456
|
-
}
|
|
1457
|
-
};
|
|
1458
|
-
};
|
|
1459
|
-
|
|
1460
|
-
function isRTL(element) {
|
|
1461
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
const platform = {
|
|
1465
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1466
|
-
getDocumentElement,
|
|
1467
|
-
getClippingRect,
|
|
1468
|
-
getOffsetParent,
|
|
1469
|
-
getElementRects,
|
|
1470
|
-
getClientRects,
|
|
1471
|
-
getDimensions,
|
|
1472
|
-
getScale,
|
|
1473
|
-
isElement,
|
|
1474
|
-
isRTL
|
|
1475
|
-
};
|
|
1476
|
-
|
|
1477
|
-
// https://samthor.au/2021/observing-dom/
|
|
1478
|
-
function observeMove(element, onMove) {
|
|
1479
|
-
let io = null;
|
|
1480
|
-
let timeoutId;
|
|
1481
|
-
const root = getDocumentElement(element);
|
|
1482
|
-
function cleanup() {
|
|
1483
|
-
var _io;
|
|
1484
|
-
clearTimeout(timeoutId);
|
|
1485
|
-
(_io = io) == null || _io.disconnect();
|
|
1486
|
-
io = null;
|
|
1487
|
-
}
|
|
1488
|
-
function refresh(skip, threshold) {
|
|
1489
|
-
if (skip === void 0) {
|
|
1490
|
-
skip = false;
|
|
1491
|
-
}
|
|
1492
|
-
if (threshold === void 0) {
|
|
1493
|
-
threshold = 1;
|
|
1494
|
-
}
|
|
1495
|
-
cleanup();
|
|
1496
|
-
const {
|
|
1497
|
-
left,
|
|
1498
|
-
top,
|
|
1499
|
-
width,
|
|
1500
|
-
height
|
|
1501
|
-
} = element.getBoundingClientRect();
|
|
1502
|
-
if (!skip) {
|
|
1503
|
-
onMove();
|
|
1504
|
-
}
|
|
1505
|
-
if (!width || !height) {
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
const insetTop = floor(top);
|
|
1509
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
1510
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1511
|
-
const insetLeft = floor(left);
|
|
1512
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1513
|
-
const options = {
|
|
1514
|
-
rootMargin,
|
|
1515
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1516
|
-
};
|
|
1517
|
-
let isFirstUpdate = true;
|
|
1518
|
-
function handleObserve(entries) {
|
|
1519
|
-
const ratio = entries[0].intersectionRatio;
|
|
1520
|
-
if (ratio !== threshold) {
|
|
1521
|
-
if (!isFirstUpdate) {
|
|
1522
|
-
return refresh();
|
|
1523
|
-
}
|
|
1524
|
-
if (!ratio) {
|
|
1525
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1526
|
-
// to prevent an infinite loop of updates.
|
|
1527
|
-
timeoutId = setTimeout(() => {
|
|
1528
|
-
refresh(false, 1e-7);
|
|
1529
|
-
}, 1000);
|
|
1530
|
-
} else {
|
|
1531
|
-
refresh(false, ratio);
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
isFirstUpdate = false;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
1538
|
-
// error.
|
|
1539
|
-
try {
|
|
1540
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1541
|
-
...options,
|
|
1542
|
-
// Handle <iframe>s
|
|
1543
|
-
root: root.ownerDocument
|
|
1544
|
-
});
|
|
1545
|
-
} catch (e) {
|
|
1546
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1547
|
-
}
|
|
1548
|
-
io.observe(element);
|
|
1549
|
-
}
|
|
1550
|
-
refresh(true);
|
|
1551
|
-
return cleanup;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
/**
|
|
1555
|
-
* Automatically updates the position of the floating element when necessary.
|
|
1556
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
1557
|
-
* visible on the screen.
|
|
1558
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
1559
|
-
* removed from the DOM or hidden from the screen.
|
|
1560
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
1561
|
-
*/
|
|
1562
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1563
|
-
if (options === void 0) {
|
|
1564
|
-
options = {};
|
|
1565
|
-
}
|
|
1566
|
-
const {
|
|
1567
|
-
ancestorScroll = true,
|
|
1568
|
-
ancestorResize = true,
|
|
1569
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
1570
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
1571
|
-
animationFrame = false
|
|
1572
|
-
} = options;
|
|
1573
|
-
const referenceEl = unwrapElement(reference);
|
|
1574
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1575
|
-
ancestors.forEach(ancestor => {
|
|
1576
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1577
|
-
passive: true
|
|
1578
|
-
});
|
|
1579
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1580
|
-
});
|
|
1581
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1582
|
-
let reobserveFrame = -1;
|
|
1583
|
-
let resizeObserver = null;
|
|
1584
|
-
if (elementResize) {
|
|
1585
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
1586
|
-
let [firstEntry] = _ref;
|
|
1587
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1588
|
-
// Prevent update loops when using the `size` middleware.
|
|
1589
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1590
|
-
resizeObserver.unobserve(floating);
|
|
1591
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1592
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1593
|
-
var _resizeObserver;
|
|
1594
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1595
|
-
});
|
|
1596
|
-
}
|
|
1597
|
-
update();
|
|
1598
|
-
});
|
|
1599
|
-
if (referenceEl && !animationFrame) {
|
|
1600
|
-
resizeObserver.observe(referenceEl);
|
|
1601
|
-
}
|
|
1602
|
-
resizeObserver.observe(floating);
|
|
1603
|
-
}
|
|
1604
|
-
let frameId;
|
|
1605
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1606
|
-
if (animationFrame) {
|
|
1607
|
-
frameLoop();
|
|
1608
|
-
}
|
|
1609
|
-
function frameLoop() {
|
|
1610
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1611
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1612
|
-
update();
|
|
1613
|
-
}
|
|
1614
|
-
prevRefRect = nextRefRect;
|
|
1615
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1616
|
-
}
|
|
1617
|
-
update();
|
|
1618
|
-
return () => {
|
|
1619
|
-
var _resizeObserver2;
|
|
1620
|
-
ancestors.forEach(ancestor => {
|
|
1621
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
1622
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
1623
|
-
});
|
|
1624
|
-
cleanupIo == null || cleanupIo();
|
|
1625
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1626
|
-
resizeObserver = null;
|
|
1627
|
-
if (animationFrame) {
|
|
1628
|
-
cancelAnimationFrame(frameId);
|
|
1629
|
-
}
|
|
1630
|
-
};
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* Modifies the placement by translating the floating element along the
|
|
1635
|
-
* specified axes.
|
|
1636
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1637
|
-
* object may be passed.
|
|
1638
|
-
* @see https://floating-ui.com/docs/offset
|
|
1639
|
-
*/
|
|
1640
|
-
const offset = offset$1;
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* Optimizes the visibility of the floating element by choosing the placement
|
|
1644
|
-
* that has the most space available automatically, without needing to specify a
|
|
1645
|
-
* preferred placement. Alternative to `flip`.
|
|
1646
|
-
* @see https://floating-ui.com/docs/autoPlacement
|
|
1647
|
-
*/
|
|
1648
|
-
const autoPlacement = autoPlacement$1;
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1652
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
1653
|
-
* @see https://floating-ui.com/docs/shift
|
|
1654
|
-
*/
|
|
1655
|
-
const shift = shift$1;
|
|
1656
|
-
|
|
1657
|
-
/**
|
|
1658
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1659
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1660
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
1661
|
-
* @see https://floating-ui.com/docs/flip
|
|
1662
|
-
*/
|
|
1663
|
-
const flip = flip$1;
|
|
1664
|
-
|
|
1665
|
-
/**
|
|
1666
|
-
* Provides data to position an inner element of the floating element so that it
|
|
1667
|
-
* appears centered to the reference element.
|
|
1668
|
-
* @see https://floating-ui.com/docs/arrow
|
|
1669
|
-
*/
|
|
1670
|
-
const arrow = arrow$1;
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1674
|
-
* next to a given reference element.
|
|
1675
|
-
*/
|
|
1676
|
-
const computePosition = (reference, floating, options) => {
|
|
1677
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1678
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1679
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
1680
|
-
const cache = new Map();
|
|
1681
|
-
const mergedOptions = {
|
|
1682
|
-
platform,
|
|
1683
|
-
...options
|
|
1684
|
-
};
|
|
1685
|
-
const platformWithCache = {
|
|
1686
|
-
...mergedOptions.platform,
|
|
1687
|
-
_c: cache
|
|
1688
|
-
};
|
|
1689
|
-
return computePosition$1(reference, floating, {
|
|
1690
|
-
...mergedOptions,
|
|
1691
|
-
platform: platformWithCache
|
|
1692
|
-
});
|
|
1693
|
-
};
|
|
1694
|
-
|
|
1695
|
-
export { autoPlacement as a, arrow as b, computePosition as c, autoUpdate as d, flip as f, offset as o, shift as s };
|
|
1
|
+
const t=["start","end"],n=["top","right","bottom","left"].reduce(((n,e)=>n.concat(e,e+"-"+t[0],e+"-"+t[1])),[]),e=Math.min,o=Math.max,r=Math.round,i=Math.floor,l=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function a(t,n,r){return o(t,e(n,r))}function s(t,n){return"function"==typeof t?t(n):t}function u(t){return t.split("-")[0]}function f(t){return t.split("-")[1]}function d(t){return"x"===t?"y":"x"}function m(t){return"y"===t?"height":"width"}function y(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function p(t){return d(y(t))}function h(t,n,e){void 0===e&&(e=!1);const o=f(t),r=p(t),i=m(r);let l="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(l=A(l)),[l,A(l)]}function w(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const x=["left","right"],v=["right","left"],g=["top","bottom"],b=["bottom","top"];function A(t){const n=u(t);return c[n]+t.slice(n.length)}function R(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 S(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function k(t,n,e){let{reference:o,floating:r}=t;const i=y(n),l=p(n),c=m(l),a=u(n),s="y"===i,d=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,w=o[c]/2-r[c]/2;let x;switch(a){case"top":x={x:d,y:o.y-r.height};break;case"bottom":x={x:d,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:h};break;case"left":x={x:o.x-r.width,y:h};break;default:x={x:o.x,y:o.y}}switch(f(n)){case"start":x[l]-=w*(e&&s?-1:1);break;case"end":x[l]+=w*(e&&s?-1:1)}return x}async function F(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:l,elements:c,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=s(n,t),p=R(y),h=c[m?"floating"===d?"reference":"floating":d],w=S(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(h)))||e?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:a})),x="floating"===d?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),g=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},b=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:v,strategy:a}):x);return{top:(w.top-b.top+p.top)/g.y,bottom:(b.bottom-w.bottom+p.bottom)/g.y,left:(w.left-b.left+p.left)/g.x,right:(b.right-w.right+p.right)/g.x}}const O=new Set(["left","top"]);function P(){return"undefined"!=typeof window}function D(t){return z(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function M(t){var n;return null==(n=(z(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function z(t){return!!P()&&(t instanceof Node||t instanceof T(t).Node)}function C(t){return!!P()&&(t instanceof Element||t instanceof T(t).Element)}function L(t){return!!P()&&(t instanceof HTMLElement||t instanceof T(t).HTMLElement)}function E(t){return!(!P()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof T(t).ShadowRoot)}function B(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=Y(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function $(t){return/^(table|td|th)$/.test(D(t))}function I(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const N=/transform|translate|scale|rotate|perspective|filter/,j=/paint|layout|strict|content/,q=t=>!!t&&"none"!==t;let H;function V(t){const n=C(t)?Y(t):t;return q(n.transform)||q(n.translate)||q(n.scale)||q(n.rotate)||q(n.perspective)||!W()&&(q(n.backdropFilter)||q(n.filter))||N.test(n.willChange||"")||j.test(n.contain||"")}function W(){return null==H&&(H="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),H}function X(t){return/^(html|body|#document)$/.test(D(t))}function Y(t){return T(t).getComputedStyle(t)}function _(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if("html"===D(t))return t;const n=t.assignedSlot||t.parentNode||E(t)&&t.host||M(t);return E(n)?n.host:n}function J(t){const n=G(t);return X(n)?t.ownerDocument?t.ownerDocument.body:t.body:L(n)&&B(n)?n:J(n)}function K(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=J(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),l=T(r);if(i){const t=Q(l);return n.concat(l,l.visualViewport||[],B(r)?r:[],t&&e?K(t):[])}return n.concat(r,K(r,[],e))}function Q(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function U(t){const n=Y(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=L(t),l=i?t.offsetWidth:e,c=i?t.offsetHeight:o,a=r(e)!==l||r(o)!==c;return a&&(e=l,o=c),{width:e,height:o,$:a}}function Z(t){return C(t)?t:t.contextElement}function tt(t){const n=Z(t);if(!L(n))return l(1);const e=n.getBoundingClientRect(),{width:o,height:i,$:c}=U(n);let a=(c?r(e.width):e.width)/o,s=(c?r(e.height):e.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const nt=l(0);function et(t){const n=T(t);return W()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:nt}function ot(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const r=t.getBoundingClientRect(),i=Z(t);let c=l(1);n&&(o?C(o)&&(c=tt(o)):c=tt(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==T(t))&&n}(i,e,o)?et(i):l(0);let s=(r.left+a.x)/c.x,u=(r.top+a.y)/c.y,f=r.width/c.x,d=r.height/c.y;if(i){const t=T(i),n=o&&C(o)?T(o):o;let e=t,r=Q(e);for(;r&&o&&n!==e;){const t=tt(r),n=r.getBoundingClientRect(),o=Y(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,l=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=l,e=T(r),r=Q(e)}}return S({width:f,height:d,x:s,y:u})}function rt(t,n){const e=_(t).scrollLeft;return n?n.left+e:ot(M(t)).left+e}function it(t,n,e){void 0===e&&(e=!1);const o=t.getBoundingClientRect();return{x:o.left+n.scrollLeft-(e?0:rt(t,o)),y:o.top+n.scrollTop}}function lt(t,n,e){let r;if("viewport"===n)r=function(t,n){const e=T(t),o=M(t),r=e.visualViewport;let i=o.clientWidth,l=o.clientHeight,c=0,a=0;if(r){i=r.width,l=r.height;const t=W();(!t||t&&"fixed"===n)&&(c=r.offsetLeft,a=r.offsetTop)}return{width:i,height:l,x:c,y:a}}(t,e);else if("document"===n)r=function(t){const n=M(t),e=_(t),r=t.ownerDocument.body,i=o(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),l=o(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let c=-e.scrollLeft+rt(t);const a=-e.scrollTop;return"rtl"===Y(r).direction&&(c+=o(n.clientWidth,r.clientWidth)-i),{width:i,height:l,x:c,y:a}}(M(t));else if(C(n))r=function(t,n){const e=ot(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=L(t)?tt(t):l(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e=et(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return S(r)}function ct(t,n){const e=G(t);return!(e===n||!C(e)||X(e))&&("fixed"===Y(e).position||ct(e,n))}function at(t,n,e){const o=L(n),r=M(n),i="fixed"===e,c=ot(t,!0,i,n);let a={scrollLeft:0,scrollTop:0};const s=l(0);if(o||!o&&!i)if(("body"!==D(n)||B(r))&&(a=_(n)),o){const t=ot(n,!0,i,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else r&&(s.x=rt(r));const u=!r||o||i?l(0):it(r,a);return{x:c.left+a.scrollLeft-s.x-u.x,y:c.top+a.scrollTop-s.y-u.y,width:c.width,height:c.height}}function st(t){return"static"===Y(t).position}function ut(t,n){if(!L(t)||"fixed"===Y(t).position)return null;if(n)return n(t);let e=t.offsetParent;return M(t)===e&&(e=e.ownerDocument.body),e}function ft(t,n){const e=T(t);if(I(t))return e;if(!L(t)){let n=G(t);for(;n&&!X(n);){if(C(n)&&!st(n))return n;n=G(n)}return e}let o=ut(t,n);for(;o&&$(o)&&st(o);)o=ut(o,n);return o&&X(o)&&st(o)&&!V(o)?e:o||function(t){let n=G(t);for(;L(n)&&!X(n);){if(V(n))return n;if(I(n))return null;n=G(n)}return null}(t)||e}const dt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:r}=t;const i="fixed"===r,c=M(o),a=!!n&&I(n.floating);if(o===c||a&&i)return e;let s={scrollLeft:0,scrollTop:0},u=l(1);const f=l(0),d=L(o);if((d||!d&&!i)&&(("body"!==D(o)||B(c))&&(s=_(o)),L(o))){const t=ot(o);u=tt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!c||d||i?l(0):it(c,s,!0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:M,getClippingRect:function(t){let{element:n,boundary:r,rootBoundary:i,strategy:l}=t;const c=[..."clippingAncestors"===r?I(n)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=K(t,[],!1).filter((t=>C(t)&&"body"!==D(t))),r=null;const i="fixed"===Y(t).position;let l=i?G(t):t;for(;C(l)&&!X(l);){const n=Y(l),e=V(l);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&["absolute","fixed"].includes(r.position)||B(l)&&!e&&ct(t,l))?o=o.filter((t=>t!==l)):r=n,l=G(l)}return n.set(t,o),o}(n,this._c):[].concat(r),i],a=c.reduce(((t,r)=>{const i=lt(n,r,l);return t.top=o(i.top,t.top),t.right=e(i.right,t.right),t.bottom=e(i.bottom,t.bottom),t.left=o(i.left,t.left),t}),lt(n,c[0],l));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ft,getElementRects:async function(t){const n=this.getOffsetParent||ft,e=this.getDimensions,o=await e(t.floating);return{reference:at(t.reference,await n(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:n,height:e}=U(t);return{width:n,height:e}},getScale:tt,isElement:C,isRTL:function(t){return"rtl"===Y(t).direction}};function mt(t,n,r,l){void 0===l&&(l={});const{ancestorScroll:c=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=l,d=Z(t),m=c||a?[...d?K(d):[],...K(n)]:[];m.forEach((t=>{c&&t.addEventListener("scroll",r,{passive:!0}),a&&t.addEventListener("resize",r)}));const y=d&&u?function(t,n){let r,l=null;const c=M(t);function a(){var t;clearTimeout(r),null==(t=l)||t.disconnect(),l=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const{left:d,top:m,width:y,height:p}=t.getBoundingClientRect();if(u||n(),!y||!p)return;const h={rootMargin:-i(m)+"px "+-i(c.clientWidth-(d+y))+"px "+-i(c.clientHeight-(m+p))+"px "+-i(d)+"px",threshold:o(0,e(1,f))||1};let w=!0;function x(t){const n=t[0].intersectionRatio;if(n!==f){if(!w)return s();n?s(!1,n):r=setTimeout((()=>{s(!1,1e-7)}),1e3)}w=!1}try{l=new IntersectionObserver(x,{...h,root:c.ownerDocument})}catch(t){l=new IntersectionObserver(x,h)}l.observe(t)}(!0),a}(d,r):null;let p,h=-1,w=null;s&&(w=new ResizeObserver((t=>{let[e]=t;e&&e.target===d&&w&&(w.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(n)}))),r()})),d&&!f&&w.observe(d),w.observe(n));let x=f?ot(t):null;return f&&function n(){const e=ot(t);!x||e.x===x.x&&e.y===x.y&&e.width===x.width&&e.height===x.height||r(),x=e,p=requestAnimationFrame(n)}(),r(),()=>{var t;m.forEach((t=>{c&&t.removeEventListener("scroll",r),a&&t.removeEventListener("resize",r)})),null==y||y(),null==(t=w)||t.disconnect(),w=null,f&&cancelAnimationFrame(p)}}const yt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:l,middlewareData:c}=n,a=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=u(e),c=f(e),a="y"===y(e),d=O.has(l)?-1:1,m=i&&a?-1:1,p=s(n,t);let{mainAxis:h,crossAxis:w,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&"number"==typeof x&&(w="end"===c?-1*x:x),a?{x:w*m,y:h*d}:{x:h*d,y:w*m}}(n,t);return l===(null==(e=c.offset)?void 0:e.placement)&&null!=(o=c.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:l}}}}},pt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,r,i;const{rects:l,middlewareData:c,placement:a,platform:d,elements:m}=e,{crossAxis:y=!1,alignment:p,allowedPlacements:x=n,autoAlignment:v=!0,...g}=s(t,e),b=void 0!==p||x===n?function(t,n,e){return(t?[...e.filter((n=>f(n)===t)),...e.filter((n=>f(n)!==t))]:e.filter((t=>u(t)===t))).filter((e=>!t||f(e)===t||!!n&&w(e)!==e))}(p||null,v,x):x,A=await d.detectOverflow(e,g),R=(null==(o=c.autoPlacement)?void 0:o.index)||0,S=b[R];if(null==S)return{};const k=h(S,l,await(null==d.isRTL?void 0:d.isRTL(m.floating)));if(a!==S)return{reset:{placement:b[0]}};const F=[A[u(S)],A[k[0]],A[k[1]]],O=[...(null==(r=c.autoPlacement)?void 0:r.overflows)||[],{placement:S,overflows:F}],P=b[R+1];if(P)return{data:{index:R+1,overflows:O},reset:{placement:P}};const D=O.map((t=>{const n=f(t.placement);return[t.placement,n&&y?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),T=(null==(i=D.filter((t=>t[2].slice(0,f(t[0])?2:3).every((t=>t<=0))))[0])?void 0:i[0])||D[0][0];return T!==a?{data:{index:R+1,overflows:O},reset:{placement:T}}:{}}}},ht=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...m}=s(t,n),p={x:e,y:o},h=await i.detectOverflow(n,m),w=y(u(r)),x=d(w);let v=p[x],g=p[w];l&&(v=a(v+h["y"===x?"top":"left"],v,v-h["y"===x?"bottom":"right"])),c&&(g=a(g+h["y"===w?"top":"left"],g,g-h["y"===w?"bottom":"right"]));const b=f.fn({...n,[x]:v,[w]:g});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[x]:l,[w]:c}}}}}},wt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:c,platform:a,elements:d}=n,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:R,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:F=!0,...O}=s(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const P=u(r),D=y(c),T=u(c)===c,M=await(null==a.isRTL?void 0:a.isRTL(d.floating)),z=R||(T||!F?[A(c)]:function(t){const n=A(t);return[w(t),n,w(n)]}(c)),C="none"!==k;!R&&C&&z.push(...function(t,n,e,o){const r=f(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?v:x:n?x:v;case"left":case"right":return n?g:b;default:return[]}}(u(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(w)))),i}(c,F,k,M));const L=[c,...z],E=await a.detectOverflow(n,O),B=[];let $=(null==(o=i.flip)?void 0:o.overflows)||[];if(m&&B.push(E[P]),p){const t=h(r,l,M);B.push(E[t[0]],E[t[1]])}if($=[...$,{placement:r,overflows:B}],!B.every((t=>t<=0))){var I,N;const t=((null==(I=i.flip)?void 0:I.index)||0)+1,n=L[t];if(n&&("alignment"!==p||D===y(n)||$.every((t=>y(t.placement)!==D||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:n}};let e=null==(N=$.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:N.placement;if(!e)switch(S){case"bestFit":{var j;const t=null==(j=$.filter((t=>{if(C){const n=y(t.placement);return n===D||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:j[0];t&&(e=t);break}case"initialPlacement":e=c}if(r!==e)return{reset:{placement:e}}}return{}}}},xt=t=>({name:"arrow",options:t,async fn(n){const{x:o,y:r,placement:i,rects:l,platform:c,elements:u,middlewareData:d}=n,{element:y,padding:h=0}=s(t,n)||{};if(null==y)return{};const w=R(h),x={x:o,y:r},v=p(i),g=m(v),b=await c.getDimensions(y),A="y"===v,S=A?"top":"left",k=A?"bottom":"right",F=A?"clientHeight":"clientWidth",O=l.reference[g]+l.reference[v]-x[v]-l.floating[g],P=x[v]-l.reference[v],D=await(null==c.getOffsetParent?void 0:c.getOffsetParent(y));let T=D?D[F]:0;T&&await(null==c.isElement?void 0:c.isElement(D))||(T=u.floating[F]||l.floating[g]);const M=O/2-P/2,z=T/2-b[g]/2-1,C=e(w[S],z),L=e(w[k],z),E=C,B=T-b[g]-L,$=T/2-b[g]/2+M,I=a(E,$,B),N=!d.arrow&&null!=f(i)&&$!==I&&l.reference[g]/2-($<E?C:L)-b[g]/2<0,j=N?$<E?$-E:$-B:0;return{[v]:x[v]+j,data:{[v]:I,centerOffset:$-I-j,...N&&{alignmentOffset:j}},reset:N}}}),vt=(t,n,e)=>{const o=new Map,r={platform:dt,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=e,c=l.detectOverflow?l:{...l,detectOverflow:F},a=await(null==l.isRTL?void 0:l.isRTL(n));let s=await l.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=k(s,o,a),d=o,m=0;const y={};for(let e=0;e<i.length;e++){const p=i[e];if(!p)continue;const{name:h,fn:w}=p,{x,y:v,data:g,reset:b}=await w({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:y,rects:s,platform:c,elements:{reference:t,floating:n}});u=null!=x?x:u,f=null!=v?v:f,y[h]={...y[h],...g},b&&m<50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await l.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:f}=k(s,d,a))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:y}})(t,n,{...r,platform:i})};export{pt as a,xt as b,vt as c,mt as d,wt as f,yt as o,ht as s}
|