@beeq/core 1.8.0-beta.1 → 1.8.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/beeq/beeq.css +1 -1
- package/dist/beeq/beeq.esm.js +1 -43
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -64
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/p-0f32aa9d.entry.js +6 -0
- package/dist/beeq/p-0f32aa9d.entry.js.map +1 -0
- package/dist/beeq/p-1075f955.entry.js +6 -0
- package/dist/beeq/{p-14b44a4b.entry.js.map → p-1075f955.entry.js.map} +1 -1
- package/dist/beeq/p-115ed5b2.js +1 -25
- package/dist/beeq/p-115ed5b2.js.map +1 -1
- package/dist/beeq/p-12582165.entry.js +6 -0
- package/dist/beeq/p-12582165.entry.js.map +1 -0
- package/dist/beeq/p-16340dba.js +7 -0
- package/dist/beeq/p-16340dba.js.map +1 -0
- package/dist/beeq/p-1c75d84d.entry.js +6 -0
- package/dist/beeq/{p-5e11b866.entry.js.map → p-1c75d84d.entry.js.map} +1 -1
- package/dist/beeq/p-1c8b6eb4.js +1 -12
- package/dist/beeq/p-1c8b6eb4.js.map +1 -1
- package/dist/beeq/p-1defeea3.js +6 -0
- package/dist/beeq/{p-951ba558.js.map → p-1defeea3.js.map} +1 -1
- package/dist/beeq/p-1f3a4359.js +1 -11
- package/dist/beeq/p-1f3a4359.js.map +1 -1
- package/dist/beeq/p-2189fea5.entry.js +6 -0
- package/dist/beeq/p-2189fea5.entry.js.map +1 -0
- package/dist/beeq/p-27c3db16.entry.js +6 -0
- package/dist/beeq/{p-49249dda.entry.js.map → p-27c3db16.entry.js.map} +1 -1
- package/dist/beeq/p-28203a0f.entry.js +6 -0
- package/dist/beeq/p-28203a0f.entry.js.map +1 -0
- package/dist/beeq/p-327cc47e.entry.js +6 -0
- package/dist/beeq/p-327cc47e.entry.js.map +1 -0
- package/dist/beeq/p-335bb9bd.entry.js +6 -0
- package/dist/beeq/p-335bb9bd.entry.js.map +1 -0
- package/dist/beeq/p-3431c29f.entry.js +6 -0
- package/dist/beeq/{p-39d77ba6.entry.js.map → p-3431c29f.entry.js.map} +1 -1
- package/dist/beeq/p-3b23e4cb.entry.js +6 -0
- package/dist/beeq/{p-ffddc425.entry.js.map → p-3b23e4cb.entry.js.map} +1 -1
- package/dist/beeq/p-3fd0d92d.js +1 -1228
- package/dist/beeq/p-3fd0d92d.js.map +1 -1
- package/dist/beeq/p-42fd96c3.entry.js +6 -0
- package/dist/beeq/p-42fd96c3.entry.js.map +1 -0
- package/dist/beeq/p-4620b9c9.entry.js +6 -0
- package/dist/beeq/p-4620b9c9.entry.js.map +1 -0
- package/dist/beeq/p-57621be1.js +1 -9
- package/dist/beeq/p-57621be1.js.map +1 -1
- package/dist/beeq/p-6148b8ae.entry.js +6 -0
- package/dist/beeq/p-6148b8ae.entry.js.map +1 -0
- package/dist/beeq/p-6285254c.entry.js +6 -0
- package/dist/beeq/p-6285254c.entry.js.map +1 -0
- package/dist/beeq/p-63619085.entry.js +6 -0
- package/dist/beeq/p-63619085.entry.js.map +1 -0
- package/dist/beeq/p-687da041.js +1 -20
- package/dist/beeq/p-687da041.js.map +1 -1
- package/dist/beeq/p-6cd0f30d.entry.js +6 -0
- package/dist/beeq/p-6cd0f30d.entry.js.map +1 -0
- package/dist/beeq/p-73ccb90d.entry.js +6 -0
- package/dist/beeq/p-73ccb90d.entry.js.map +1 -0
- package/dist/beeq/p-75f42cfa.entry.js +6 -0
- package/dist/beeq/{p-36652891.entry.js.map → p-75f42cfa.entry.js.map} +1 -1
- package/dist/beeq/p-7bc123c9.entry.js +6 -0
- package/dist/beeq/p-7bc123c9.entry.js.map +1 -0
- package/dist/beeq/p-7ea20358.entry.js +6 -0
- package/dist/beeq/p-7ea20358.entry.js.map +1 -0
- package/dist/beeq/p-806b189f.entry.js +6 -0
- package/dist/beeq/p-806b189f.entry.js.map +1 -0
- package/dist/beeq/p-82fe8d58.entry.js +6 -0
- package/dist/beeq/p-82fe8d58.entry.js.map +1 -0
- package/dist/beeq/p-899502c0.entry.js +6 -0
- package/dist/beeq/p-899502c0.entry.js.map +1 -0
- package/dist/beeq/p-90077071.entry.js +6 -0
- package/dist/beeq/p-90077071.entry.js.map +1 -0
- package/dist/beeq/p-906cc99d.js +6 -0
- package/dist/beeq/p-906cc99d.js.map +1 -0
- package/dist/beeq/p-99829fc7.js +1 -8
- package/dist/beeq/p-99829fc7.js.map +1 -1
- package/dist/beeq/p-9c4a9790.entry.js +6 -0
- package/dist/beeq/{p-e301647a.entry.js.map → p-9c4a9790.entry.js.map} +1 -1
- package/dist/beeq/p-9cab220d.entry.js +6 -0
- package/dist/beeq/p-9cab220d.entry.js.map +1 -0
- package/dist/beeq/p-9dbbf366.entry.js +6 -0
- package/dist/beeq/p-9dbbf366.entry.js.map +1 -0
- package/dist/beeq/p-9f7a1527.entry.js +6 -0
- package/dist/beeq/{p-0f48adcc.entry.js.map → p-9f7a1527.entry.js.map} +1 -1
- package/dist/beeq/p-a5dc1c94.js +1 -118
- package/dist/beeq/p-a5dc1c94.js.map +1 -1
- package/dist/beeq/p-a8cad5ab.js +1 -5
- package/dist/beeq/p-a8cad5ab.js.map +1 -1
- package/dist/beeq/p-af062402.js +1 -7
- package/dist/beeq/p-af062402.js.map +1 -1
- package/dist/beeq/p-b71d2d9a.entry.js +6 -0
- package/dist/beeq/p-b71d2d9a.entry.js.map +1 -0
- package/dist/beeq/p-b8416ead.entry.js +6 -0
- package/dist/beeq/{p-548b45b7.entry.js.map → p-b8416ead.entry.js.map} +1 -1
- package/dist/beeq/p-bb21df71.entry.js +6 -0
- package/dist/beeq/p-bb21df71.entry.js.map +1 -0
- package/dist/beeq/p-bdbc5548.entry.js +6 -0
- package/dist/beeq/p-bdbc5548.entry.js.map +1 -0
- package/dist/beeq/p-c62189e6.entry.js +6 -0
- package/dist/beeq/p-c62189e6.entry.js.map +1 -0
- package/dist/beeq/p-c78ae3c2.js +6 -0
- package/dist/beeq/p-c78ae3c2.js.map +1 -0
- package/dist/beeq/p-d4397119.entry.js +6 -0
- package/dist/beeq/p-d4397119.entry.js.map +1 -0
- package/dist/beeq/p-d7ce7165.js +6 -0
- package/dist/beeq/p-d7ce7165.js.map +1 -0
- package/dist/beeq/p-dc5086d8.entry.js +6 -0
- package/dist/beeq/p-dc5086d8.entry.js.map +1 -0
- package/dist/beeq/p-e8410587.entry.js +6 -0
- package/dist/beeq/p-e8410587.entry.js.map +1 -0
- package/dist/beeq/p-ecd27cf2.js +1 -11
- package/dist/beeq/p-ecd27cf2.js.map +1 -1
- package/dist/beeq/p-edfd9767.js +6 -0
- package/dist/beeq/p-edfd9767.js.map +1 -0
- package/dist/beeq/p-f09cd30c.entry.js +6 -0
- package/dist/beeq/p-f09cd30c.entry.js.map +1 -0
- package/dist/beeq/p-f2ede993.entry.js +6 -0
- package/dist/beeq/p-f2ede993.entry.js.map +1 -0
- package/dist/beeq/p-fe8d5dea.js +6 -0
- package/dist/beeq/{p-4688e046.js.map → p-fe8d5dea.js.map} +1 -1
- package/dist/cjs/app-globals-b11284b9.js.map +1 -1
- package/dist/cjs/assetsPath-56bdb114.js +79 -0
- package/dist/cjs/assetsPath-56bdb114.js.map +1 -0
- package/dist/cjs/beeq.cjs.js +3 -3
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +3 -4
- package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-accordion.cjs.entry.js +83 -48
- package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-alert.cjs.entry.js +72 -64
- package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +42 -42
- package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +44 -44
- package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +42 -32
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +45 -30
- package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-button_2.cjs.entry.js +189 -117
- package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-card.cjs.entry.js +5 -6
- package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js +63 -54
- package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js +163 -140
- package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +71 -50
- package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +30 -25
- package/dist/cjs/bq-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +52 -38
- package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +45 -35
- package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-empty-state.cjs.entry.js +31 -28
- package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +116 -90
- package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +80 -59
- package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +4 -4
- package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js +77 -58
- package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option.cjs.entry.js +65 -49
- package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-page-title.cjs.entry.js +38 -34
- package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-progress.cjs.entry.js +10 -10
- package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +13 -8
- package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +43 -37
- package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +189 -166
- package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +68 -55
- package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +47 -32
- package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +165 -144
- package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +57 -56
- package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +4 -5
- package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-step-item.cjs.entry.js +24 -17
- package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-steps.cjs.entry.js +13 -11
- package/dist/cjs/bq-steps.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +46 -35
- package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +68 -61
- package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +47 -37
- package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +80 -58
- package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +61 -57
- package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +47 -43
- package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{cssVariables-7139f0c6.js → cssVariables-dd190bc2.js} +3 -1
- package/dist/cjs/cssVariables-dd190bc2.js.map +1 -0
- package/dist/cjs/{debounce-f94a239b.js → debounce-1f7e1176.js} +3 -3
- package/dist/cjs/debounce-1f7e1176.js.map +1 -0
- package/dist/cjs/{index-1d3aac65.js → index-a38a0b5b.js} +30 -33
- package/dist/cjs/index-a38a0b5b.js.map +1 -0
- package/dist/cjs/{index-e4c116b6.js → index-fc7876d6.js} +63 -19
- package/dist/cjs/index-fc7876d6.js.map +1 -0
- package/dist/cjs/index.cjs.js +6 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{isDefined-750bffc4.js → isDefined-30812dd7.js} +2 -2
- package/dist/cjs/{isDefined-750bffc4.js.map → isDefined-30812dd7.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{slot-dd6f7db9.js → slot-2fee189a.js} +3 -4
- package/dist/{beeq/p-d7a88b16.js.map → cjs/slot-2fee189a.js.map} +1 -1
- package/dist/collection/_storybook/foundation/helper/index.js +3 -3
- package/dist/collection/_storybook/foundation/helper/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/bq-accordion.js +72 -39
- package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
- package/dist/collection/components/accordion/helper/index.js +10 -4
- package/dist/collection/components/accordion/helper/index.js.map +1 -1
- package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
- package/dist/collection/components/accordion-group/bq-accordion-group.js +5 -0
- package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
- package/dist/collection/components/accordion-group/scss/bq-accordion-group.css +1 -1
- package/dist/collection/components/alert/bq-alert.js +80 -62
- package/dist/collection/components/alert/bq-alert.js.map +1 -1
- package/dist/collection/components/alert/scss/bq-alert.css +1 -1
- package/dist/collection/components/avatar/bq-avatar.js +42 -38
- package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
- package/dist/collection/components/avatar/scss/bq-avatar.css +1 -1
- package/dist/collection/components/badge/bq-badge.js +42 -38
- package/dist/collection/components/badge/bq-badge.js.map +1 -1
- package/dist/collection/components/badge/scss/bq-badge.css +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +45 -26
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb/scss/bq-breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +43 -27
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/scss/bq-breadcrumb-item.css +1 -1
- package/dist/collection/components/button/bq-button.js +84 -43
- package/dist/collection/components/button/bq-button.js.map +1 -1
- package/dist/collection/components/button/scss/bq-button.css +1 -1
- package/dist/collection/components/card/bq-card.js +7 -2
- package/dist/collection/components/card/bq-card.js.map +1 -1
- package/dist/collection/components/card/scss/bq-card.css +1 -1
- package/dist/collection/components/checkbox/bq-checkbox.js +63 -50
- package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
- package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.js +161 -134
- package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
- package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
- package/dist/collection/components/dialog/bq-dialog.js +70 -45
- package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
- package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
- package/dist/collection/components/divider/bq-divider.js +28 -19
- package/dist/collection/components/divider/bq-divider.js.map +1 -1
- package/dist/collection/components/divider/scss/bq-divider.css +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +51 -33
- package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/dropdown/bq-dropdown.js +34 -23
- package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +30 -23
- package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
- package/dist/collection/components/empty-state/scss/bq-empty-state.css +1 -1
- package/dist/collection/components/icon/bq-icon.js +45 -35
- package/dist/collection/components/icon/bq-icon.js.map +1 -1
- package/dist/collection/components/icon/helper/request.js +51 -33
- package/dist/collection/components/icon/helper/request.js.map +1 -1
- package/dist/collection/components/icon/scss/bq-icon.css +1 -1
- package/dist/collection/components/input/bq-input.js +113 -83
- package/dist/collection/components/input/bq-input.js.map +1 -1
- package/dist/collection/components/input/scss/bq-input.css +1 -1
- package/dist/collection/components/notification/bq-notification.js +86 -54
- package/dist/collection/components/notification/bq-notification.js.map +1 -1
- package/dist/collection/components/notification/scss/bq-notification.css +1 -1
- package/dist/collection/components/option/bq-option.js +64 -44
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/option/scss/bq-option.css +1 -1
- package/dist/collection/components/option-group/bq-option-group.js +6 -1
- package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
- package/dist/collection/components/option-group/scss/bq-option-group.css +1 -1
- package/dist/collection/components/option-list/bq-option-list.js +11 -1
- package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
- package/dist/collection/components/option-list/scss/bq-option-list.css +1 -1
- package/dist/collection/components/page-title/bq-page-title.js +37 -29
- package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
- package/dist/collection/components/page-title/scss/bq-page-title.css +1 -1
- package/dist/collection/components/panel/bq-panel.js +12 -7
- package/dist/collection/components/panel/bq-panel.js.map +1 -1
- package/dist/collection/components/panel/scss/bq-panel.css +1 -1
- package/dist/collection/components/progress/bq-progress.js +12 -6
- package/dist/collection/components/progress/bq-progress.js.map +1 -1
- package/dist/collection/components/progress/scss/bq-progress.css +1 -1
- package/dist/collection/components/radio/bq-radio.js +43 -34
- package/dist/collection/components/radio/bq-radio.js.map +1 -1
- package/dist/collection/components/radio/scss/bq-radio.css +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +13 -4
- package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +187 -160
- package/dist/collection/components/select/bq-select.js.map +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/collection/components/side-menu/bq-side-menu.js +50 -29
- package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
- package/dist/collection/components/side-menu/scss/bq-side-menu.css +1 -1
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js +68 -51
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
- package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
- package/dist/collection/components/slider/bq-slider.js +164 -139
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/slider/scss/bq-slider.css +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +56 -51
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
- package/dist/collection/components/status/bq-status.js +6 -1
- package/dist/collection/components/status/bq-status.js.map +1 -1
- package/dist/collection/components/status/scss/bq-status.css +1 -1
- package/dist/collection/components/step-item/bq-step-item.js +26 -13
- package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
- package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
- package/dist/collection/components/steps/bq-steps.js +13 -7
- package/dist/collection/components/steps/bq-steps.js.map +1 -1
- package/dist/collection/components/steps/scss/bq-steps.css +1 -1
- package/dist/collection/components/switch/bq-switch.js +45 -30
- package/dist/collection/components/switch/bq-switch.js.map +1 -1
- package/dist/collection/components/switch/scss/bq-switch.css +1 -1
- package/dist/collection/components/tab/bq-tab.js +46 -32
- package/dist/collection/components/tab/bq-tab.js.map +1 -1
- package/dist/collection/components/tab/scss/bq-tab.css +1 -1
- package/dist/collection/components/tab-group/bq-tab-group.js +67 -56
- package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
- package/dist/collection/components/tab-group/scss/bq-tab-group.css +1 -1
- package/dist/collection/components/tag/bq-tag.js +67 -49
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/tag/scss/bq-tag.css +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +78 -52
- package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
- package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
- package/dist/collection/components/toast/bq-toast.js +68 -52
- package/dist/collection/components/toast/bq-toast.js.map +1 -1
- package/dist/collection/components/toast/scss/bq-toast.css +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +46 -39
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/components/tooltip/scss/bq-tooltip.css +1 -1
- package/dist/collection/global/scripts/global.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/services/libraries/floating-ui/index.js +4 -0
- package/dist/collection/services/libraries/floating-ui/index.js.map +1 -1
- package/dist/collection/shared/utils/assetsPath.js +46 -46
- package/dist/collection/shared/utils/assetsPath.js.map +1 -1
- package/dist/collection/shared/utils/cssVariables.js +2 -0
- package/dist/collection/shared/utils/cssVariables.js.map +1 -1
- package/dist/collection/shared/utils/debounce.js +2 -2
- package/dist/collection/shared/utils/debounce.js.map +1 -1
- package/dist/collection/shared/utils/slot.js +2 -3
- package/dist/collection/shared/utils/slot.js.map +1 -1
- package/dist/components/bq-accordion-group.js +2 -3
- package/dist/components/bq-accordion-group.js.map +1 -1
- package/dist/components/bq-accordion.js +81 -46
- package/dist/components/bq-accordion.js.map +1 -1
- package/dist/components/bq-alert.js +69 -61
- package/dist/components/bq-alert.js.map +1 -1
- package/dist/components/bq-avatar.js +41 -41
- package/dist/components/bq-avatar.js.map +1 -1
- package/dist/components/bq-badge2.js +41 -41
- package/dist/components/bq-badge2.js.map +1 -1
- package/dist/components/bq-breadcrumb-item.js +40 -30
- package/dist/components/bq-breadcrumb-item.js.map +1 -1
- package/dist/components/bq-breadcrumb.js +44 -29
- package/dist/components/bq-breadcrumb.js.map +1 -1
- package/dist/components/bq-button2.js +84 -47
- package/dist/components/bq-button2.js.map +1 -1
- package/dist/components/bq-card.js +4 -5
- package/dist/components/bq-card.js.map +1 -1
- package/dist/components/bq-checkbox.js +62 -53
- package/dist/components/bq-checkbox.js.map +1 -1
- package/dist/components/bq-date-picker.js +160 -137
- package/dist/components/bq-date-picker.js.map +1 -1
- package/dist/components/bq-dialog.js +69 -48
- package/dist/components/bq-dialog.js.map +1 -1
- package/dist/components/bq-divider2.js +27 -22
- package/dist/components/bq-divider2.js.map +1 -1
- package/dist/components/bq-drawer.js +50 -36
- package/dist/components/bq-drawer.js.map +1 -1
- package/dist/components/bq-dropdown2.js +32 -24
- package/dist/components/bq-dropdown2.js.map +1 -1
- package/dist/components/bq-empty-state.js +29 -26
- package/dist/components/bq-empty-state.js.map +1 -1
- package/dist/components/bq-icon2.js +164 -70
- package/dist/components/bq-icon2.js.map +1 -1
- package/dist/components/bq-input.js +112 -86
- package/dist/components/bq-input.js.map +1 -1
- package/dist/components/bq-notification.js +78 -56
- package/dist/components/bq-notification.js.map +1 -1
- package/dist/components/bq-option-group.js +3 -3
- package/dist/components/bq-option-group.js.map +1 -1
- package/dist/components/bq-option-list2.js +8 -4
- package/dist/components/bq-option-list2.js.map +1 -1
- package/dist/components/bq-option.js +63 -47
- package/dist/components/bq-option.js.map +1 -1
- package/dist/components/bq-page-title.js +36 -32
- package/dist/components/bq-page-title.js.map +1 -1
- package/dist/components/bq-panel2.js +11 -9
- package/dist/components/bq-panel2.js.map +1 -1
- package/dist/components/bq-progress.js +9 -9
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-radio-group.js +11 -6
- package/dist/components/bq-radio-group.js.map +1 -1
- package/dist/components/bq-radio.js +43 -37
- package/dist/components/bq-radio.js.map +1 -1
- package/dist/components/bq-select.js +185 -162
- package/dist/components/bq-select.js.map +1 -1
- package/dist/components/bq-side-menu-item.js +67 -54
- package/dist/components/bq-side-menu-item.js.map +1 -1
- package/dist/components/bq-side-menu.js +47 -31
- package/dist/components/bq-side-menu.js.map +1 -1
- package/dist/components/bq-slider.js +163 -142
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-spinner.js +54 -53
- package/dist/components/bq-spinner.js.map +1 -1
- package/dist/components/bq-status.js +3 -4
- package/dist/components/bq-status.js.map +1 -1
- package/dist/components/bq-step-item.js +23 -16
- package/dist/components/bq-step-item.js.map +1 -1
- package/dist/components/bq-steps.js +12 -10
- package/dist/components/bq-steps.js.map +1 -1
- package/dist/components/bq-switch.js +44 -33
- package/dist/components/bq-switch.js.map +1 -1
- package/dist/components/bq-tab-group.js +66 -59
- package/dist/components/bq-tab-group.js.map +1 -1
- package/dist/components/bq-tab.js +45 -35
- package/dist/components/bq-tab.js.map +1 -1
- package/dist/components/bq-tag2.js +66 -52
- package/dist/components/bq-tag2.js.map +1 -1
- package/dist/components/bq-textarea.js +77 -55
- package/dist/components/bq-textarea.js.map +1 -1
- package/dist/components/bq-toast.js +60 -55
- package/dist/components/bq-toast.js.map +1 -1
- package/dist/components/bq-tooltip2.js +45 -41
- package/dist/components/bq-tooltip2.js.map +1 -1
- package/dist/components/cssVariables.js +2 -0
- package/dist/components/cssVariables.js.map +1 -1
- package/dist/components/debounce.js +2 -2
- package/dist/components/debounce.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +62 -18
- package/dist/components/index2.js.map +1 -1
- package/dist/components/isDefined.js +1 -1
- package/dist/components/slot.js +2 -3
- package/dist/components/slot.js.map +1 -1
- package/dist/esm/app-globals-de5a646b.js.map +1 -1
- package/dist/esm/assetsPath-653f7ee2.js +76 -0
- package/dist/esm/assetsPath-653f7ee2.js.map +1 -0
- package/dist/esm/beeq.js +4 -4
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +3 -4
- package/dist/esm/bq-accordion-group.entry.js.map +1 -1
- package/dist/esm/bq-accordion.entry.js +83 -48
- package/dist/esm/bq-accordion.entry.js.map +1 -1
- package/dist/esm/bq-alert.entry.js +72 -64
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +42 -42
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +44 -44
- package/dist/esm/bq-badge.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +42 -32
- package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +45 -30
- package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
- package/dist/esm/bq-button_2.entry.js +189 -117
- package/dist/esm/bq-button_2.entry.js.map +1 -1
- package/dist/esm/bq-card.entry.js +5 -6
- package/dist/esm/bq-card.entry.js.map +1 -1
- package/dist/esm/bq-checkbox.entry.js +63 -54
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-date-picker.entry.js +163 -140
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +71 -50
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +30 -25
- package/dist/esm/bq-divider.entry.js.map +1 -1
- package/dist/esm/bq-drawer.entry.js +52 -38
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +45 -35
- package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
- package/dist/esm/bq-empty-state.entry.js +31 -28
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +116 -90
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +80 -59
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +4 -4
- package/dist/esm/bq-option-group.entry.js.map +1 -1
- package/dist/esm/bq-option-list_2.entry.js +77 -58
- package/dist/esm/bq-option-list_2.entry.js.map +1 -1
- package/dist/esm/bq-option.entry.js +65 -49
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-page-title.entry.js +38 -34
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +10 -10
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +13 -8
- package/dist/esm/bq-radio-group.entry.js.map +1 -1
- package/dist/esm/bq-radio.entry.js +43 -37
- package/dist/esm/bq-radio.entry.js.map +1 -1
- package/dist/esm/bq-select.entry.js +189 -166
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +68 -55
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +47 -32
- package/dist/esm/bq-side-menu.entry.js.map +1 -1
- package/dist/esm/bq-slider.entry.js +165 -144
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +57 -56
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +4 -5
- package/dist/esm/bq-status.entry.js.map +1 -1
- package/dist/esm/bq-step-item.entry.js +24 -17
- package/dist/esm/bq-step-item.entry.js.map +1 -1
- package/dist/esm/bq-steps.entry.js +13 -11
- package/dist/esm/bq-steps.entry.js.map +1 -1
- package/dist/esm/bq-switch.entry.js +46 -35
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +68 -61
- package/dist/esm/bq-tab-group.entry.js.map +1 -1
- package/dist/esm/bq-tab.entry.js +47 -37
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +80 -58
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +61 -57
- package/dist/esm/bq-toast.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +47 -43
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/{cssVariables-5ffccc29.js → cssVariables-000c23ad.js} +3 -1
- package/dist/esm/cssVariables-000c23ad.js.map +1 -0
- package/dist/esm/{debounce-c82e3da1.js → debounce-3e72f418.js} +3 -3
- package/dist/esm/debounce-3e72f418.js.map +1 -0
- package/dist/esm/{index-136429a6.js → index-1618c78b.js} +63 -19
- package/dist/esm/index-1618c78b.js.map +1 -0
- package/dist/esm/{index-f69556fe.js → index-9dfdd050.js} +30 -34
- package/dist/esm/index-9dfdd050.js.map +1 -0
- package/dist/esm/index.js +7 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{isDefined-170f3095.js → isDefined-e92041ac.js} +2 -2
- package/dist/esm/{isDefined-170f3095.js.map → isDefined-e92041ac.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{slot-179d109d.js → slot-58bfedb5.js} +3 -4
- package/dist/esm/slot-58bfedb5.js.map +1 -0
- package/dist/hydrate/index.d.ts +10 -4
- package/dist/hydrate/index.js +4055 -2107
- package/dist/hydrate/index.mjs +4055 -2107
- package/dist/stencil.config.js +11 -4
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +2 -0
- package/dist/types/{home/workflows/workspace → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/packages/beeq/.stencil/tailwind.config.d.ts +104 -78
- package/dist/types/_storybook/foundation/helper/index.d.ts +1 -3
- package/dist/types/components/alert/bq-alert.d.ts +10 -4
- package/dist/types/components/button/bq-button.d.ts +5 -0
- package/dist/types/components/date-picker/bq-date-picker.d.ts +1 -0
- package/dist/types/components/divider/bq-divider.d.ts +1 -0
- package/dist/types/components/icon/bq-icon.d.ts +3 -1
- package/dist/types/components/icon/helper/request.d.ts +17 -1
- package/dist/types/components/notification/bq-notification.d.ts +8 -0
- package/dist/types/components/radio/bq-radio.d.ts +0 -5
- package/dist/types/components/select/bq-select.d.ts +2 -0
- package/dist/types/components/slider/bq-slider.d.ts +2 -0
- package/dist/types/components/step-item/bq-step-item.d.ts +1 -0
- package/dist/types/components/toast/bq-toast.d.ts +5 -0
- package/dist/types/components.d.ts +8 -8
- package/dist/types/global/scripts/global.d.ts +4 -0
- package/dist/types/shared/utils/assetsPath.d.ts +5 -22
- package/dist/types/shared/utils/cssVariables.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +4 -0
- package/package.json +2 -2
- package/dist/beeq/p-063a3968.entry.js +0 -388
- package/dist/beeq/p-063a3968.entry.js.map +0 -1
- package/dist/beeq/p-0979fdfd.entry.js +0 -297
- package/dist/beeq/p-0979fdfd.entry.js.map +0 -1
- package/dist/beeq/p-0ab0b58d.js +0 -30
- package/dist/beeq/p-0ab0b58d.js.map +0 -1
- package/dist/beeq/p-0c42c08a.js +0 -1811
- package/dist/beeq/p-0c42c08a.js.map +0 -1
- package/dist/beeq/p-0f48adcc.entry.js +0 -117
- package/dist/beeq/p-14b44a4b.entry.js +0 -205
- package/dist/beeq/p-1715ac80.entry.js +0 -274
- package/dist/beeq/p-1715ac80.entry.js.map +0 -1
- package/dist/beeq/p-242ac28a.entry.js +0 -145
- package/dist/beeq/p-242ac28a.entry.js.map +0 -1
- package/dist/beeq/p-297fb76b.entry.js +0 -220
- package/dist/beeq/p-297fb76b.entry.js.map +0 -1
- package/dist/beeq/p-2bb65f53.entry.js +0 -204
- package/dist/beeq/p-2bb65f53.entry.js.map +0 -1
- package/dist/beeq/p-2e66fc4f.entry.js +0 -434
- package/dist/beeq/p-2e66fc4f.entry.js.map +0 -1
- package/dist/beeq/p-36652891.entry.js +0 -102
- package/dist/beeq/p-38d4bd8a.js +0 -1939
- package/dist/beeq/p-38d4bd8a.js.map +0 -1
- package/dist/beeq/p-39b7c578.entry.js +0 -84
- package/dist/beeq/p-39b7c578.entry.js.map +0 -1
- package/dist/beeq/p-39d77ba6.entry.js +0 -90
- package/dist/beeq/p-4688e046.js +0 -16
- package/dist/beeq/p-49249dda.entry.js +0 -156
- package/dist/beeq/p-548b45b7.entry.js +0 -104
- package/dist/beeq/p-57a55ac5.entry.js +0 -261
- package/dist/beeq/p-57a55ac5.entry.js.map +0 -1
- package/dist/beeq/p-5e11b866.entry.js +0 -102
- package/dist/beeq/p-6a4e104b.entry.js +0 -263
- package/dist/beeq/p-6a4e104b.entry.js.map +0 -1
- package/dist/beeq/p-6a5a79a3.entry.js +0 -184
- package/dist/beeq/p-6a5a79a3.entry.js.map +0 -1
- package/dist/beeq/p-7f301da8.entry.js +0 -508
- package/dist/beeq/p-7f301da8.entry.js.map +0 -1
- package/dist/beeq/p-81f1c3ba.entry.js +0 -121
- package/dist/beeq/p-81f1c3ba.entry.js.map +0 -1
- package/dist/beeq/p-822773ae.entry.js +0 -195
- package/dist/beeq/p-822773ae.entry.js.map +0 -1
- package/dist/beeq/p-951ba558.js +0 -69
- package/dist/beeq/p-9990889d.entry.js +0 -222
- package/dist/beeq/p-9990889d.entry.js.map +0 -1
- package/dist/beeq/p-a1b43de6.entry.js +0 -248
- package/dist/beeq/p-a1b43de6.entry.js.map +0 -1
- package/dist/beeq/p-a6489187.entry.js +0 -103
- package/dist/beeq/p-a6489187.entry.js.map +0 -1
- package/dist/beeq/p-ac969486.entry.js +0 -330
- package/dist/beeq/p-ac969486.entry.js.map +0 -1
- package/dist/beeq/p-afc9fd80.entry.js +0 -144
- package/dist/beeq/p-afc9fd80.entry.js.map +0 -1
- package/dist/beeq/p-bef53750.js +0 -79
- package/dist/beeq/p-bef53750.js.map +0 -1
- package/dist/beeq/p-bf2320dd.entry.js +0 -329
- package/dist/beeq/p-bf2320dd.entry.js.map +0 -1
- package/dist/beeq/p-c34e292e.entry.js +0 -127
- package/dist/beeq/p-c34e292e.entry.js.map +0 -1
- package/dist/beeq/p-d7a88b16.js +0 -92
- package/dist/beeq/p-db18eba1.entry.js +0 -173
- package/dist/beeq/p-db18eba1.entry.js.map +0 -1
- package/dist/beeq/p-dd950c12.entry.js +0 -309
- package/dist/beeq/p-dd950c12.entry.js.map +0 -1
- package/dist/beeq/p-e301647a.entry.js +0 -87
- package/dist/beeq/p-e3aa2886.entry.js +0 -203
- package/dist/beeq/p-e3aa2886.entry.js.map +0 -1
- package/dist/beeq/p-e41f07ae.entry.js +0 -173
- package/dist/beeq/p-e41f07ae.entry.js.map +0 -1
- package/dist/beeq/p-e88257a8.entry.js +0 -259
- package/dist/beeq/p-e88257a8.entry.js.map +0 -1
- package/dist/beeq/p-e9a54b49.entry.js +0 -145
- package/dist/beeq/p-e9a54b49.entry.js.map +0 -1
- package/dist/beeq/p-f77d9b8b.entry.js +0 -144
- package/dist/beeq/p-f77d9b8b.entry.js.map +0 -1
- package/dist/beeq/p-fd658de1.entry.js +0 -135
- package/dist/beeq/p-fd658de1.entry.js.map +0 -1
- package/dist/beeq/p-ffb48c40.entry.js +0 -258
- package/dist/beeq/p-ffb48c40.entry.js.map +0 -1
- package/dist/beeq/p-ffddc425.entry.js +0 -149
- package/dist/cjs/assetsPath-3938a05d.js +0 -78
- package/dist/cjs/assetsPath-3938a05d.js.map +0 -1
- package/dist/cjs/cssVariables-7139f0c6.js.map +0 -1
- package/dist/cjs/debounce-f94a239b.js.map +0 -1
- package/dist/cjs/index-1d3aac65.js.map +0 -1
- package/dist/cjs/index-e4c116b6.js.map +0 -1
- package/dist/cjs/slot-dd6f7db9.js.map +0 -1
- package/dist/components/assetsPath.js +0 -75
- package/dist/components/assetsPath.js.map +0 -1
- package/dist/esm/assetsPath-a1b58980.js +0 -75
- package/dist/esm/assetsPath-a1b58980.js.map +0 -1
- package/dist/esm/cssVariables-5ffccc29.js.map +0 -1
- package/dist/esm/debounce-c82e3da1.js.map +0 -1
- package/dist/esm/index-136429a6.js.map +0 -1
- package/dist/esm/index-f69556fe.js.map +0 -1
- package/dist/esm/slot-179d109d.js.map +0 -1
- package/dist/types/home/workflows/workspace/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +0 -2
package/dist/beeq/p-38d4bd8a.js
DELETED
|
@@ -1,1939 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by Endavans
|
|
3
|
-
* © https://beeq.design - Apache 2 License.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Custom positioning reference element.
|
|
7
|
-
* @see https://floating-ui.com/docs/virtual-elements
|
|
8
|
-
*/
|
|
9
|
-
const t = [ "top", "right", "bottom", "left" ];
|
|
10
|
-
|
|
11
|
-
const e = [ "start", "end" ];
|
|
12
|
-
|
|
13
|
-
const n = t.reduce(((t, n) => t.concat(n, n + "-" + e[0], n + "-" + e[1])), []);
|
|
14
|
-
|
|
15
|
-
const o = Math.min;
|
|
16
|
-
|
|
17
|
-
const i = Math.max;
|
|
18
|
-
|
|
19
|
-
const s = Math.round;
|
|
20
|
-
|
|
21
|
-
const c = Math.floor;
|
|
22
|
-
|
|
23
|
-
const createCoords = t => ({
|
|
24
|
-
x: t,
|
|
25
|
-
y: t
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const r = {
|
|
29
|
-
left: "right",
|
|
30
|
-
right: "left",
|
|
31
|
-
bottom: "top",
|
|
32
|
-
top: "bottom"
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const l = {
|
|
36
|
-
start: "end",
|
|
37
|
-
end: "start"
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
function clamp(t, e, n) {
|
|
41
|
-
return i(t, o(e, n));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function evaluate(t, e) {
|
|
45
|
-
return typeof t === "function" ? t(e) : t;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function getSide(t) {
|
|
49
|
-
return t.split("-")[0];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function getAlignment(t) {
|
|
53
|
-
return t.split("-")[1];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function getOppositeAxis(t) {
|
|
57
|
-
return t === "x" ? "y" : "x";
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function getAxisLength(t) {
|
|
61
|
-
return t === "y" ? "height" : "width";
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function getSideAxis(t) {
|
|
65
|
-
return [ "top", "bottom" ].includes(getSide(t)) ? "y" : "x";
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getAlignmentAxis(t) {
|
|
69
|
-
return getOppositeAxis(getSideAxis(t));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function getAlignmentSides(t, e, n) {
|
|
73
|
-
if (n === void 0) {
|
|
74
|
-
n = false;
|
|
75
|
-
}
|
|
76
|
-
const o = getAlignment(t);
|
|
77
|
-
const i = getAlignmentAxis(t);
|
|
78
|
-
const s = getAxisLength(i);
|
|
79
|
-
let c = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
80
|
-
if (e.reference[s] > e.floating[s]) {
|
|
81
|
-
c = getOppositePlacement(c);
|
|
82
|
-
}
|
|
83
|
-
return [ c, getOppositePlacement(c) ];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getExpandedPlacements(t) {
|
|
87
|
-
const e = getOppositePlacement(t);
|
|
88
|
-
return [ getOppositeAlignmentPlacement(t), e, getOppositeAlignmentPlacement(e) ];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getOppositeAlignmentPlacement(t) {
|
|
92
|
-
return t.replace(/start|end/g, (t => l[t]));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getSideList(t, e, n) {
|
|
96
|
-
const o = [ "left", "right" ];
|
|
97
|
-
const i = [ "right", "left" ];
|
|
98
|
-
const s = [ "top", "bottom" ];
|
|
99
|
-
const c = [ "bottom", "top" ];
|
|
100
|
-
switch (t) {
|
|
101
|
-
case "top":
|
|
102
|
-
case "bottom":
|
|
103
|
-
if (n) return e ? i : o;
|
|
104
|
-
return e ? o : i;
|
|
105
|
-
|
|
106
|
-
case "left":
|
|
107
|
-
case "right":
|
|
108
|
-
return e ? s : c;
|
|
109
|
-
|
|
110
|
-
default:
|
|
111
|
-
return [];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function getOppositeAxisPlacements(t, e, n, o) {
|
|
116
|
-
const i = getAlignment(t);
|
|
117
|
-
let s = getSideList(getSide(t), n === "start", o);
|
|
118
|
-
if (i) {
|
|
119
|
-
s = s.map((t => t + "-" + i));
|
|
120
|
-
if (e) {
|
|
121
|
-
s = s.concat(s.map(getOppositeAlignmentPlacement));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return s;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function getOppositePlacement(t) {
|
|
128
|
-
return t.replace(/left|right|bottom|top/g, (t => r[t]));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function expandPaddingObject(t) {
|
|
132
|
-
return {
|
|
133
|
-
top: 0,
|
|
134
|
-
right: 0,
|
|
135
|
-
bottom: 0,
|
|
136
|
-
left: 0,
|
|
137
|
-
...t
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function getPaddingObject(t) {
|
|
142
|
-
return typeof t !== "number" ? expandPaddingObject(t) : {
|
|
143
|
-
top: t,
|
|
144
|
-
right: t,
|
|
145
|
-
bottom: t,
|
|
146
|
-
left: t
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function rectToClientRect(t) {
|
|
151
|
-
const {x: e, y: n, width: o, height: i} = t;
|
|
152
|
-
return {
|
|
153
|
-
width: o,
|
|
154
|
-
height: i,
|
|
155
|
-
top: n,
|
|
156
|
-
left: e,
|
|
157
|
-
right: e + o,
|
|
158
|
-
bottom: n + i,
|
|
159
|
-
x: e,
|
|
160
|
-
y: n
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function computeCoordsFromPlacement(t, e, n) {
|
|
165
|
-
let {reference: o, floating: i} = t;
|
|
166
|
-
const s = getSideAxis(e);
|
|
167
|
-
const c = getAlignmentAxis(e);
|
|
168
|
-
const r = getAxisLength(c);
|
|
169
|
-
const l = getSide(e);
|
|
170
|
-
const a = s === "y";
|
|
171
|
-
const f = o.x + o.width / 2 - i.width / 2;
|
|
172
|
-
const u = o.y + o.height / 2 - i.height / 2;
|
|
173
|
-
const g = o[r] / 2 - i[r] / 2;
|
|
174
|
-
let d;
|
|
175
|
-
switch (l) {
|
|
176
|
-
case "top":
|
|
177
|
-
d = {
|
|
178
|
-
x: f,
|
|
179
|
-
y: o.y - i.height
|
|
180
|
-
};
|
|
181
|
-
break;
|
|
182
|
-
|
|
183
|
-
case "bottom":
|
|
184
|
-
d = {
|
|
185
|
-
x: f,
|
|
186
|
-
y: o.y + o.height
|
|
187
|
-
};
|
|
188
|
-
break;
|
|
189
|
-
|
|
190
|
-
case "right":
|
|
191
|
-
d = {
|
|
192
|
-
x: o.x + o.width,
|
|
193
|
-
y: u
|
|
194
|
-
};
|
|
195
|
-
break;
|
|
196
|
-
|
|
197
|
-
case "left":
|
|
198
|
-
d = {
|
|
199
|
-
x: o.x - i.width,
|
|
200
|
-
y: u
|
|
201
|
-
};
|
|
202
|
-
break;
|
|
203
|
-
|
|
204
|
-
default:
|
|
205
|
-
d = {
|
|
206
|
-
x: o.x,
|
|
207
|
-
y: o.y
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
switch (getAlignment(e)) {
|
|
211
|
-
case "start":
|
|
212
|
-
d[c] -= g * (n && a ? -1 : 1);
|
|
213
|
-
break;
|
|
214
|
-
|
|
215
|
-
case "end":
|
|
216
|
-
d[c] += g * (n && a ? -1 : 1);
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
return d;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
224
|
-
* next to a given reference element.
|
|
225
|
-
*
|
|
226
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
227
|
-
* write one for the platform you are using Floating UI with.
|
|
228
|
-
*/ const computePosition$1 = async (t, e, n) => {
|
|
229
|
-
const {placement: o = "bottom", strategy: i = "absolute", middleware: s = [], platform: c} = n;
|
|
230
|
-
const r = s.filter(Boolean);
|
|
231
|
-
const l = await (c.isRTL == null ? void 0 : c.isRTL(e));
|
|
232
|
-
let a = await c.getElementRects({
|
|
233
|
-
reference: t,
|
|
234
|
-
floating: e,
|
|
235
|
-
strategy: i
|
|
236
|
-
});
|
|
237
|
-
let {x: f, y: u} = computeCoordsFromPlacement(a, o, l);
|
|
238
|
-
let g = o;
|
|
239
|
-
let d = {};
|
|
240
|
-
let m = 0;
|
|
241
|
-
for (let n = 0; n < r.length; n++) {
|
|
242
|
-
const {name: s, fn: p} = r[n];
|
|
243
|
-
const {x: h, y: w, data: y, reset: v} = await p({
|
|
244
|
-
x: f,
|
|
245
|
-
y: u,
|
|
246
|
-
initialPlacement: o,
|
|
247
|
-
placement: g,
|
|
248
|
-
strategy: i,
|
|
249
|
-
middlewareData: d,
|
|
250
|
-
rects: a,
|
|
251
|
-
platform: c,
|
|
252
|
-
elements: {
|
|
253
|
-
reference: t,
|
|
254
|
-
floating: e
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
f = h != null ? h : f;
|
|
258
|
-
u = w != null ? w : u;
|
|
259
|
-
d = {
|
|
260
|
-
...d,
|
|
261
|
-
[s]: {
|
|
262
|
-
...d[s],
|
|
263
|
-
...y
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
if (v && m <= 50) {
|
|
267
|
-
m++;
|
|
268
|
-
if (typeof v === "object") {
|
|
269
|
-
if (v.placement) {
|
|
270
|
-
g = v.placement;
|
|
271
|
-
}
|
|
272
|
-
if (v.rects) {
|
|
273
|
-
a = v.rects === true ? await c.getElementRects({
|
|
274
|
-
reference: t,
|
|
275
|
-
floating: e,
|
|
276
|
-
strategy: i
|
|
277
|
-
}) : v.rects;
|
|
278
|
-
}
|
|
279
|
-
({x: f, y: u} = computeCoordsFromPlacement(a, g, l));
|
|
280
|
-
}
|
|
281
|
-
n = -1;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
x: f,
|
|
286
|
-
y: u,
|
|
287
|
-
placement: g,
|
|
288
|
-
strategy: i,
|
|
289
|
-
middlewareData: d
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
295
|
-
* element is overflowing a given clipping boundary on each side.
|
|
296
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
297
|
-
* - negative = how many pixels left before it will overflow
|
|
298
|
-
* - 0 = lies flush with the boundary
|
|
299
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
300
|
-
*/ async function detectOverflow(t, e) {
|
|
301
|
-
var n;
|
|
302
|
-
if (e === void 0) {
|
|
303
|
-
e = {};
|
|
304
|
-
}
|
|
305
|
-
const {x: o, y: i, platform: s, rects: c, elements: r, strategy: l} = t;
|
|
306
|
-
const {boundary: a = "clippingAncestors", rootBoundary: f = "viewport", elementContext: u = "floating", altBoundary: g = false, padding: d = 0} = evaluate(e, t);
|
|
307
|
-
const m = getPaddingObject(d);
|
|
308
|
-
const p = u === "floating" ? "reference" : "floating";
|
|
309
|
-
const h = r[g ? p : u];
|
|
310
|
-
const w = rectToClientRect(await s.getClippingRect({
|
|
311
|
-
element: ((n = await (s.isElement == null ? void 0 : s.isElement(h))) != null ? n : true) ? h : h.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(r.floating)),
|
|
312
|
-
boundary: a,
|
|
313
|
-
rootBoundary: f,
|
|
314
|
-
strategy: l
|
|
315
|
-
}));
|
|
316
|
-
const y = u === "floating" ? {
|
|
317
|
-
x: o,
|
|
318
|
-
y: i,
|
|
319
|
-
width: c.floating.width,
|
|
320
|
-
height: c.floating.height
|
|
321
|
-
} : c.reference;
|
|
322
|
-
const v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(r.floating));
|
|
323
|
-
const x = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
|
|
324
|
-
x: 1,
|
|
325
|
-
y: 1
|
|
326
|
-
} : {
|
|
327
|
-
x: 1,
|
|
328
|
-
y: 1
|
|
329
|
-
};
|
|
330
|
-
const A = rectToClientRect(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
331
|
-
elements: r,
|
|
332
|
-
rect: y,
|
|
333
|
-
offsetParent: v,
|
|
334
|
-
strategy: l
|
|
335
|
-
}) : y);
|
|
336
|
-
return {
|
|
337
|
-
top: (w.top - A.top + m.top) / x.y,
|
|
338
|
-
bottom: (A.bottom - w.bottom + m.bottom) / x.y,
|
|
339
|
-
left: (w.left - A.left + m.left) / x.x,
|
|
340
|
-
right: (A.right - w.right + m.right) / x.x
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Provides data to position an inner element of the floating element so that it
|
|
346
|
-
* appears centered to the reference element.
|
|
347
|
-
* @see https://floating-ui.com/docs/arrow
|
|
348
|
-
*/ const arrow$1 = t => ({
|
|
349
|
-
name: "arrow",
|
|
350
|
-
options: t,
|
|
351
|
-
async fn(e) {
|
|
352
|
-
const {x: n, y: i, placement: s, rects: c, platform: r, elements: l, middlewareData: a} = e;
|
|
353
|
-
// Since `element` is required, we don't Partial<> the type.
|
|
354
|
-
const {element: f, padding: u = 0} = evaluate(t, e) || {};
|
|
355
|
-
if (f == null) {
|
|
356
|
-
return {};
|
|
357
|
-
}
|
|
358
|
-
const g = getPaddingObject(u);
|
|
359
|
-
const d = {
|
|
360
|
-
x: n,
|
|
361
|
-
y: i
|
|
362
|
-
};
|
|
363
|
-
const m = getAlignmentAxis(s);
|
|
364
|
-
const p = getAxisLength(m);
|
|
365
|
-
const h = await r.getDimensions(f);
|
|
366
|
-
const w = m === "y";
|
|
367
|
-
const y = w ? "top" : "left";
|
|
368
|
-
const v = w ? "bottom" : "right";
|
|
369
|
-
const x = w ? "clientHeight" : "clientWidth";
|
|
370
|
-
const A = c.reference[p] + c.reference[m] - d[m] - c.floating[p];
|
|
371
|
-
const b = d[m] - c.reference[m];
|
|
372
|
-
const O = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(f));
|
|
373
|
-
let S = O ? O[x] : 0;
|
|
374
|
-
// DOM platform can return `window` as the `offsetParent`.
|
|
375
|
-
if (!S || !await (r.isElement == null ? void 0 : r.isElement(O))) {
|
|
376
|
-
S = l.floating[x] || c.floating[p];
|
|
377
|
-
}
|
|
378
|
-
const C = A / 2 - b / 2;
|
|
379
|
-
// If the padding is large enough that it causes the arrow to no longer be
|
|
380
|
-
// centered, modify the padding so that it is centered.
|
|
381
|
-
const R = S / 2 - h[p] / 2 - 1;
|
|
382
|
-
const P = o(g[y], R);
|
|
383
|
-
const E = o(g[v], R);
|
|
384
|
-
// Make sure the arrow doesn't overflow the floating element if the center
|
|
385
|
-
// point is outside the floating element's bounds.
|
|
386
|
-
const T = P;
|
|
387
|
-
const L = S - h[p] - E;
|
|
388
|
-
const N = S / 2 - h[p] / 2 + C;
|
|
389
|
-
const B = clamp(T, N, L);
|
|
390
|
-
// If the reference is small enough that the arrow's padding causes it to
|
|
391
|
-
// to point to nothing for an aligned placement, adjust the offset of the
|
|
392
|
-
// floating element itself. To ensure `shift()` continues to take action,
|
|
393
|
-
// a single reset is performed when this is true.
|
|
394
|
-
const D = !a.arrow && getAlignment(s) != null && N !== B && c.reference[p] / 2 - (N < T ? P : E) - h[p] / 2 < 0;
|
|
395
|
-
const F = D ? N < T ? N - T : N - L : 0;
|
|
396
|
-
return {
|
|
397
|
-
[m]: d[m] + F,
|
|
398
|
-
data: {
|
|
399
|
-
[m]: B,
|
|
400
|
-
centerOffset: N - B - F,
|
|
401
|
-
...D && {
|
|
402
|
-
alignmentOffset: F
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
reset: D
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
function getPlacementList(t, e, n) {
|
|
411
|
-
const o = t ? [ ...n.filter((e => getAlignment(e) === t)), ...n.filter((e => getAlignment(e) !== t)) ] : n.filter((t => getSide(t) === t));
|
|
412
|
-
return o.filter((n => {
|
|
413
|
-
if (t) {
|
|
414
|
-
return getAlignment(n) === t || (e ? getOppositeAlignmentPlacement(n) !== n : false);
|
|
415
|
-
}
|
|
416
|
-
return true;
|
|
417
|
-
}));
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Optimizes the visibility of the floating element by choosing the placement
|
|
422
|
-
* that has the most space available automatically, without needing to specify a
|
|
423
|
-
* preferred placement. Alternative to `flip`.
|
|
424
|
-
* @see https://floating-ui.com/docs/autoPlacement
|
|
425
|
-
*/ const autoPlacement = function(t) {
|
|
426
|
-
if (t === void 0) {
|
|
427
|
-
t = {};
|
|
428
|
-
}
|
|
429
|
-
return {
|
|
430
|
-
name: "autoPlacement",
|
|
431
|
-
options: t,
|
|
432
|
-
async fn(e) {
|
|
433
|
-
var o, i, s;
|
|
434
|
-
const {rects: c, middlewareData: r, placement: l, platform: a, elements: f} = e;
|
|
435
|
-
const {crossAxis: u = false, alignment: g, allowedPlacements: d = n, autoAlignment: m = true, ...p} = evaluate(t, e);
|
|
436
|
-
const h = g !== undefined || d === n ? getPlacementList(g || null, m, d) : d;
|
|
437
|
-
const w = await detectOverflow(e, p);
|
|
438
|
-
const y = ((o = r.autoPlacement) == null ? void 0 : o.index) || 0;
|
|
439
|
-
const v = h[y];
|
|
440
|
-
if (v == null) {
|
|
441
|
-
return {};
|
|
442
|
-
}
|
|
443
|
-
const x = getAlignmentSides(v, c, await (a.isRTL == null ? void 0 : a.isRTL(f.floating)));
|
|
444
|
-
// Make `computeCoords` start from the right place.
|
|
445
|
-
if (l !== v) {
|
|
446
|
-
return {
|
|
447
|
-
reset: {
|
|
448
|
-
placement: h[0]
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
const A = [ w[getSide(v)], w[x[0]], w[x[1]] ];
|
|
453
|
-
const b = [ ...((i = r.autoPlacement) == null ? void 0 : i.overflows) || [], {
|
|
454
|
-
placement: v,
|
|
455
|
-
overflows: A
|
|
456
|
-
} ];
|
|
457
|
-
const O = h[y + 1];
|
|
458
|
-
// There are more placements to check.
|
|
459
|
-
if (O) {
|
|
460
|
-
return {
|
|
461
|
-
data: {
|
|
462
|
-
index: y + 1,
|
|
463
|
-
overflows: b
|
|
464
|
-
},
|
|
465
|
-
reset: {
|
|
466
|
-
placement: O
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
const S = b.map((t => {
|
|
471
|
-
const e = getAlignment(t.placement);
|
|
472
|
-
return [ t.placement, e && u ?
|
|
473
|
-
// Check along the mainAxis and main crossAxis side.
|
|
474
|
-
t.overflows.slice(0, 2).reduce(((t, e) => t + e), 0) :
|
|
475
|
-
// Check only the mainAxis.
|
|
476
|
-
t.overflows[0], t.overflows ];
|
|
477
|
-
})).sort(((t, e) => t[1] - e[1]));
|
|
478
|
-
const C = S.filter((t => t[2].slice(0,
|
|
479
|
-
// Aligned placements should not check their opposite crossAxis
|
|
480
|
-
// side.
|
|
481
|
-
getAlignment(t[0]) ? 2 : 3).every((t => t <= 0))));
|
|
482
|
-
const R = ((s = C[0]) == null ? void 0 : s[0]) || S[0][0];
|
|
483
|
-
if (R !== l) {
|
|
484
|
-
return {
|
|
485
|
-
data: {
|
|
486
|
-
index: y + 1,
|
|
487
|
-
overflows: b
|
|
488
|
-
},
|
|
489
|
-
reset: {
|
|
490
|
-
placement: R
|
|
491
|
-
}
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
return {};
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
501
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
502
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
503
|
-
* @see https://floating-ui.com/docs/flip
|
|
504
|
-
*/ const flip$1 = function(t) {
|
|
505
|
-
if (t === void 0) {
|
|
506
|
-
t = {};
|
|
507
|
-
}
|
|
508
|
-
return {
|
|
509
|
-
name: "flip",
|
|
510
|
-
options: t,
|
|
511
|
-
async fn(e) {
|
|
512
|
-
var n, o;
|
|
513
|
-
const {placement: i, middlewareData: s, rects: c, initialPlacement: r, platform: l, elements: a} = e;
|
|
514
|
-
const {mainAxis: f = true, crossAxis: u = true, fallbackPlacements: g, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: p = true, ...h} = evaluate(t, e);
|
|
515
|
-
// If a reset by the arrow was caused due to an alignment offset being
|
|
516
|
-
// added, we should skip any logic now since `flip()` has already done its
|
|
517
|
-
// work.
|
|
518
|
-
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
519
|
-
if ((n = s.arrow) != null && n.alignmentOffset) {
|
|
520
|
-
return {};
|
|
521
|
-
}
|
|
522
|
-
const w = getSide(i);
|
|
523
|
-
const y = getSideAxis(r);
|
|
524
|
-
const v = getSide(r) === r;
|
|
525
|
-
const x = await (l.isRTL == null ? void 0 : l.isRTL(a.floating));
|
|
526
|
-
const A = g || (v || !p ? [ getOppositePlacement(r) ] : getExpandedPlacements(r));
|
|
527
|
-
const b = m !== "none";
|
|
528
|
-
if (!g && b) {
|
|
529
|
-
A.push(...getOppositeAxisPlacements(r, p, m, x));
|
|
530
|
-
}
|
|
531
|
-
const O = [ r, ...A ];
|
|
532
|
-
const S = await detectOverflow(e, h);
|
|
533
|
-
const C = [];
|
|
534
|
-
let R = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
535
|
-
if (f) {
|
|
536
|
-
C.push(S[w]);
|
|
537
|
-
}
|
|
538
|
-
if (u) {
|
|
539
|
-
const t = getAlignmentSides(i, c, x);
|
|
540
|
-
C.push(S[t[0]], S[t[1]]);
|
|
541
|
-
}
|
|
542
|
-
R = [ ...R, {
|
|
543
|
-
placement: i,
|
|
544
|
-
overflows: C
|
|
545
|
-
} ];
|
|
546
|
-
// One or more sides is overflowing.
|
|
547
|
-
if (!C.every((t => t <= 0))) {
|
|
548
|
-
var P, E;
|
|
549
|
-
const t = (((P = s.flip) == null ? void 0 : P.index) || 0) + 1;
|
|
550
|
-
const e = O[t];
|
|
551
|
-
if (e) {
|
|
552
|
-
// Try next placement and re-run the lifecycle.
|
|
553
|
-
return {
|
|
554
|
-
data: {
|
|
555
|
-
index: t,
|
|
556
|
-
overflows: R
|
|
557
|
-
},
|
|
558
|
-
reset: {
|
|
559
|
-
placement: e
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
564
|
-
// then find the placement that fits the best on the main crossAxis side.
|
|
565
|
-
let n = (E = R.filter((t => t.overflows[0] <= 0)).sort(((t, e) => t.overflows[1] - e.overflows[1]))[0]) == null ? void 0 : E.placement;
|
|
566
|
-
// Otherwise fallback.
|
|
567
|
-
if (!n) {
|
|
568
|
-
switch (d) {
|
|
569
|
-
case "bestFit":
|
|
570
|
-
{
|
|
571
|
-
var T;
|
|
572
|
-
const t = (T = R.filter((t => {
|
|
573
|
-
if (b) {
|
|
574
|
-
const e = getSideAxis(t.placement);
|
|
575
|
-
return e === y ||
|
|
576
|
-
// Create a bias to the `y` side axis due to horizontal
|
|
577
|
-
// reading directions favoring greater width.
|
|
578
|
-
e === "y";
|
|
579
|
-
}
|
|
580
|
-
return true;
|
|
581
|
-
})).map((t => [ t.placement, t.overflows.filter((t => t > 0)).reduce(((t, e) => t + e), 0) ])).sort(((t, e) => t[1] - e[1]))[0]) == null ? void 0 : T[0];
|
|
582
|
-
if (t) {
|
|
583
|
-
n = t;
|
|
584
|
-
}
|
|
585
|
-
break;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
case "initialPlacement":
|
|
589
|
-
n = r;
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
if (i !== n) {
|
|
594
|
-
return {
|
|
595
|
-
reset: {
|
|
596
|
-
placement: n
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
return {};
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
function getSideOffsets(t, e) {
|
|
607
|
-
return {
|
|
608
|
-
top: t.top - e.height,
|
|
609
|
-
right: t.right - e.width,
|
|
610
|
-
bottom: t.bottom - e.height,
|
|
611
|
-
left: t.left - e.width
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
function isAnySideFullyClipped(e) {
|
|
616
|
-
return t.some((t => e[t] >= 0));
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* Provides data to hide the floating element in applicable situations, such as
|
|
621
|
-
* when it is not in the same clipping context as the reference element.
|
|
622
|
-
* @see https://floating-ui.com/docs/hide
|
|
623
|
-
*/ const hide$1 = function(t) {
|
|
624
|
-
if (t === void 0) {
|
|
625
|
-
t = {};
|
|
626
|
-
}
|
|
627
|
-
return {
|
|
628
|
-
name: "hide",
|
|
629
|
-
options: t,
|
|
630
|
-
async fn(e) {
|
|
631
|
-
const {rects: n} = e;
|
|
632
|
-
const {strategy: o = "referenceHidden", ...i} = evaluate(t, e);
|
|
633
|
-
switch (o) {
|
|
634
|
-
case "referenceHidden":
|
|
635
|
-
{
|
|
636
|
-
const t = await detectOverflow(e, {
|
|
637
|
-
...i,
|
|
638
|
-
elementContext: "reference"
|
|
639
|
-
});
|
|
640
|
-
const o = getSideOffsets(t, n.reference);
|
|
641
|
-
return {
|
|
642
|
-
data: {
|
|
643
|
-
referenceHiddenOffsets: o,
|
|
644
|
-
referenceHidden: isAnySideFullyClipped(o)
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
case "escaped":
|
|
650
|
-
{
|
|
651
|
-
const t = await detectOverflow(e, {
|
|
652
|
-
...i,
|
|
653
|
-
altBoundary: true
|
|
654
|
-
});
|
|
655
|
-
const o = getSideOffsets(t, n.floating);
|
|
656
|
-
return {
|
|
657
|
-
data: {
|
|
658
|
-
escapedOffsets: o,
|
|
659
|
-
escaped: isAnySideFullyClipped(o)
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
default:
|
|
665
|
-
{
|
|
666
|
-
return {};
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
function getBoundingRect(t) {
|
|
674
|
-
const e = o(...t.map((t => t.left)));
|
|
675
|
-
const n = o(...t.map((t => t.top)));
|
|
676
|
-
const s = i(...t.map((t => t.right)));
|
|
677
|
-
const c = i(...t.map((t => t.bottom)));
|
|
678
|
-
return {
|
|
679
|
-
x: e,
|
|
680
|
-
y: n,
|
|
681
|
-
width: s - e,
|
|
682
|
-
height: c - n
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
function getRectsByLine(t) {
|
|
687
|
-
const e = t.slice().sort(((t, e) => t.y - e.y));
|
|
688
|
-
const n = [];
|
|
689
|
-
let o = null;
|
|
690
|
-
for (let t = 0; t < e.length; t++) {
|
|
691
|
-
const i = e[t];
|
|
692
|
-
if (!o || i.y - o.y > o.height / 2) {
|
|
693
|
-
n.push([ i ]);
|
|
694
|
-
} else {
|
|
695
|
-
n[n.length - 1].push(i);
|
|
696
|
-
}
|
|
697
|
-
o = i;
|
|
698
|
-
}
|
|
699
|
-
return n.map((t => rectToClientRect(getBoundingRect(t))));
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* Provides improved positioning for inline reference elements that can span
|
|
704
|
-
* over multiple lines, such as hyperlinks or range selections.
|
|
705
|
-
* @see https://floating-ui.com/docs/inline
|
|
706
|
-
*/ const inline = function(t) {
|
|
707
|
-
if (t === void 0) {
|
|
708
|
-
t = {};
|
|
709
|
-
}
|
|
710
|
-
return {
|
|
711
|
-
name: "inline",
|
|
712
|
-
options: t,
|
|
713
|
-
async fn(e) {
|
|
714
|
-
const {placement: n, elements: s, rects: c, platform: r, strategy: l} = e;
|
|
715
|
-
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
|
|
716
|
-
// ClientRect's bounds, despite the event listener being triggered. A
|
|
717
|
-
// padding of 2 seems to handle this issue.
|
|
718
|
-
const {padding: a = 2, x: f, y: u} = evaluate(t, e);
|
|
719
|
-
const g = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(s.reference)) || []);
|
|
720
|
-
const d = getRectsByLine(g);
|
|
721
|
-
const m = rectToClientRect(getBoundingRect(g));
|
|
722
|
-
const p = getPaddingObject(a);
|
|
723
|
-
function getBoundingClientRect() {
|
|
724
|
-
// There are two rects and they are disjoined.
|
|
725
|
-
if (d.length === 2 && d[0].left > d[1].right && f != null && u != null) {
|
|
726
|
-
// Find the first rect in which the point is fully inside.
|
|
727
|
-
return d.find((t => f > t.left - p.left && f < t.right + p.right && u > t.top - p.top && u < t.bottom + p.bottom)) || m;
|
|
728
|
-
}
|
|
729
|
-
// There are 2 or more connected rects.
|
|
730
|
-
if (d.length >= 2) {
|
|
731
|
-
if (getSideAxis(n) === "y") {
|
|
732
|
-
const t = d[0];
|
|
733
|
-
const e = d[d.length - 1];
|
|
734
|
-
const o = getSide(n) === "top";
|
|
735
|
-
const i = t.top;
|
|
736
|
-
const s = e.bottom;
|
|
737
|
-
const c = o ? t.left : e.left;
|
|
738
|
-
const r = o ? t.right : e.right;
|
|
739
|
-
const l = r - c;
|
|
740
|
-
const a = s - i;
|
|
741
|
-
return {
|
|
742
|
-
top: i,
|
|
743
|
-
bottom: s,
|
|
744
|
-
left: c,
|
|
745
|
-
right: r,
|
|
746
|
-
width: l,
|
|
747
|
-
height: a,
|
|
748
|
-
x: c,
|
|
749
|
-
y: i
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
const t = getSide(n) === "left";
|
|
753
|
-
const e = i(...d.map((t => t.right)));
|
|
754
|
-
const s = o(...d.map((t => t.left)));
|
|
755
|
-
const c = d.filter((n => t ? n.left === s : n.right === e));
|
|
756
|
-
const r = c[0].top;
|
|
757
|
-
const l = c[c.length - 1].bottom;
|
|
758
|
-
const a = s;
|
|
759
|
-
const f = e;
|
|
760
|
-
const u = f - a;
|
|
761
|
-
const g = l - r;
|
|
762
|
-
return {
|
|
763
|
-
top: r,
|
|
764
|
-
bottom: l,
|
|
765
|
-
left: a,
|
|
766
|
-
right: f,
|
|
767
|
-
width: u,
|
|
768
|
-
height: g,
|
|
769
|
-
x: a,
|
|
770
|
-
y: r
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
return m;
|
|
774
|
-
}
|
|
775
|
-
const h = await r.getElementRects({
|
|
776
|
-
reference: {
|
|
777
|
-
getBoundingClientRect
|
|
778
|
-
},
|
|
779
|
-
floating: s.floating,
|
|
780
|
-
strategy: l
|
|
781
|
-
});
|
|
782
|
-
if (c.reference.x !== h.reference.x || c.reference.y !== h.reference.y || c.reference.width !== h.reference.width || c.reference.height !== h.reference.height) {
|
|
783
|
-
return {
|
|
784
|
-
reset: {
|
|
785
|
-
rects: h
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
}
|
|
789
|
-
return {};
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
795
|
-
// Derivable.
|
|
796
|
-
async function convertValueToCoords(t, e) {
|
|
797
|
-
const {placement: n, platform: o, elements: i} = t;
|
|
798
|
-
const s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating));
|
|
799
|
-
const c = getSide(n);
|
|
800
|
-
const r = getAlignment(n);
|
|
801
|
-
const l = getSideAxis(n) === "y";
|
|
802
|
-
const a = [ "left", "top" ].includes(c) ? -1 : 1;
|
|
803
|
-
const f = s && l ? -1 : 1;
|
|
804
|
-
const u = evaluate(e, t);
|
|
805
|
-
// eslint-disable-next-line prefer-const
|
|
806
|
-
let {mainAxis: g, crossAxis: d, alignmentAxis: m} = typeof u === "number" ? {
|
|
807
|
-
mainAxis: u,
|
|
808
|
-
crossAxis: 0,
|
|
809
|
-
alignmentAxis: null
|
|
810
|
-
} : {
|
|
811
|
-
mainAxis: 0,
|
|
812
|
-
crossAxis: 0,
|
|
813
|
-
alignmentAxis: null,
|
|
814
|
-
...u
|
|
815
|
-
};
|
|
816
|
-
if (r && typeof m === "number") {
|
|
817
|
-
d = r === "end" ? m * -1 : m;
|
|
818
|
-
}
|
|
819
|
-
return l ? {
|
|
820
|
-
x: d * f,
|
|
821
|
-
y: g * a
|
|
822
|
-
} : {
|
|
823
|
-
x: g * a,
|
|
824
|
-
y: d * f
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Modifies the placement by translating the floating element along the
|
|
830
|
-
* specified axes.
|
|
831
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
832
|
-
* object may be passed.
|
|
833
|
-
* @see https://floating-ui.com/docs/offset
|
|
834
|
-
*/ const offset$1 = function(t) {
|
|
835
|
-
if (t === void 0) {
|
|
836
|
-
t = 0;
|
|
837
|
-
}
|
|
838
|
-
return {
|
|
839
|
-
name: "offset",
|
|
840
|
-
options: t,
|
|
841
|
-
async fn(e) {
|
|
842
|
-
var n, o;
|
|
843
|
-
const {x: i, y: s, placement: c, middlewareData: r} = e;
|
|
844
|
-
const l = await convertValueToCoords(e, t);
|
|
845
|
-
// If the placement is the same and the arrow caused an alignment offset
|
|
846
|
-
// then we don't need to change the positioning coordinates.
|
|
847
|
-
if (c === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset) {
|
|
848
|
-
return {};
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
x: i + l.x,
|
|
852
|
-
y: s + l.y,
|
|
853
|
-
data: {
|
|
854
|
-
...l,
|
|
855
|
-
placement: c
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
};
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
864
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
865
|
-
* @see https://floating-ui.com/docs/shift
|
|
866
|
-
*/ const shift$1 = function(t) {
|
|
867
|
-
if (t === void 0) {
|
|
868
|
-
t = {};
|
|
869
|
-
}
|
|
870
|
-
return {
|
|
871
|
-
name: "shift",
|
|
872
|
-
options: t,
|
|
873
|
-
async fn(e) {
|
|
874
|
-
const {x: n, y: o, placement: i} = e;
|
|
875
|
-
const {mainAxis: s = true, crossAxis: c = false, limiter: r = {
|
|
876
|
-
fn: t => {
|
|
877
|
-
let {x: e, y: n} = t;
|
|
878
|
-
return {
|
|
879
|
-
x: e,
|
|
880
|
-
y: n
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
}, ...l} = evaluate(t, e);
|
|
884
|
-
const a = {
|
|
885
|
-
x: n,
|
|
886
|
-
y: o
|
|
887
|
-
};
|
|
888
|
-
const f = await detectOverflow(e, l);
|
|
889
|
-
const u = getSideAxis(getSide(i));
|
|
890
|
-
const g = getOppositeAxis(u);
|
|
891
|
-
let d = a[g];
|
|
892
|
-
let m = a[u];
|
|
893
|
-
if (s) {
|
|
894
|
-
const t = g === "y" ? "top" : "left";
|
|
895
|
-
const e = g === "y" ? "bottom" : "right";
|
|
896
|
-
const n = d + f[t];
|
|
897
|
-
const o = d - f[e];
|
|
898
|
-
d = clamp(n, d, o);
|
|
899
|
-
}
|
|
900
|
-
if (c) {
|
|
901
|
-
const t = u === "y" ? "top" : "left";
|
|
902
|
-
const e = u === "y" ? "bottom" : "right";
|
|
903
|
-
const n = m + f[t];
|
|
904
|
-
const o = m - f[e];
|
|
905
|
-
m = clamp(n, m, o);
|
|
906
|
-
}
|
|
907
|
-
const p = r.fn({
|
|
908
|
-
...e,
|
|
909
|
-
[g]: d,
|
|
910
|
-
[u]: m
|
|
911
|
-
});
|
|
912
|
-
return {
|
|
913
|
-
...p,
|
|
914
|
-
data: {
|
|
915
|
-
x: p.x - n,
|
|
916
|
-
y: p.y - o
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
925
|
-
*/ const limitShift = function(t) {
|
|
926
|
-
if (t === void 0) {
|
|
927
|
-
t = {};
|
|
928
|
-
}
|
|
929
|
-
return {
|
|
930
|
-
options: t,
|
|
931
|
-
fn(e) {
|
|
932
|
-
const {x: n, y: o, placement: i, rects: s, middlewareData: c} = e;
|
|
933
|
-
const {offset: r = 0, mainAxis: l = true, crossAxis: a = true} = evaluate(t, e);
|
|
934
|
-
const f = {
|
|
935
|
-
x: n,
|
|
936
|
-
y: o
|
|
937
|
-
};
|
|
938
|
-
const u = getSideAxis(i);
|
|
939
|
-
const g = getOppositeAxis(u);
|
|
940
|
-
let d = f[g];
|
|
941
|
-
let m = f[u];
|
|
942
|
-
const p = evaluate(r, e);
|
|
943
|
-
const h = typeof p === "number" ? {
|
|
944
|
-
mainAxis: p,
|
|
945
|
-
crossAxis: 0
|
|
946
|
-
} : {
|
|
947
|
-
mainAxis: 0,
|
|
948
|
-
crossAxis: 0,
|
|
949
|
-
...p
|
|
950
|
-
};
|
|
951
|
-
if (l) {
|
|
952
|
-
const t = g === "y" ? "height" : "width";
|
|
953
|
-
const e = s.reference[g] - s.floating[t] + h.mainAxis;
|
|
954
|
-
const n = s.reference[g] + s.reference[t] - h.mainAxis;
|
|
955
|
-
if (d < e) {
|
|
956
|
-
d = e;
|
|
957
|
-
} else if (d > n) {
|
|
958
|
-
d = n;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
if (a) {
|
|
962
|
-
var w, y;
|
|
963
|
-
const t = g === "y" ? "width" : "height";
|
|
964
|
-
const e = [ "top", "left" ].includes(getSide(i));
|
|
965
|
-
const n = s.reference[u] - s.floating[t] + (e ? ((w = c.offset) == null ? void 0 : w[u]) || 0 : 0) + (e ? 0 : h.crossAxis);
|
|
966
|
-
const o = s.reference[u] + s.reference[t] + (e ? 0 : ((y = c.offset) == null ? void 0 : y[u]) || 0) - (e ? h.crossAxis : 0);
|
|
967
|
-
if (m < n) {
|
|
968
|
-
m = n;
|
|
969
|
-
} else if (m > o) {
|
|
970
|
-
m = o;
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
return {
|
|
974
|
-
[g]: d,
|
|
975
|
-
[u]: m
|
|
976
|
-
};
|
|
977
|
-
}
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* Provides data that allows you to change the size of the floating element —
|
|
983
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
984
|
-
* width of the reference element.
|
|
985
|
-
* @see https://floating-ui.com/docs/size
|
|
986
|
-
*/ const size$1 = function(t) {
|
|
987
|
-
if (t === void 0) {
|
|
988
|
-
t = {};
|
|
989
|
-
}
|
|
990
|
-
return {
|
|
991
|
-
name: "size",
|
|
992
|
-
options: t,
|
|
993
|
-
async fn(e) {
|
|
994
|
-
const {placement: n, rects: s, platform: c, elements: r} = e;
|
|
995
|
-
const {apply: l = (() => {}), ...a} = evaluate(t, e);
|
|
996
|
-
const f = await detectOverflow(e, a);
|
|
997
|
-
const u = getSide(n);
|
|
998
|
-
const g = getAlignment(n);
|
|
999
|
-
const d = getSideAxis(n) === "y";
|
|
1000
|
-
const {width: m, height: p} = s.floating;
|
|
1001
|
-
let h;
|
|
1002
|
-
let w;
|
|
1003
|
-
if (u === "top" || u === "bottom") {
|
|
1004
|
-
h = u;
|
|
1005
|
-
w = g === (await (c.isRTL == null ? void 0 : c.isRTL(r.floating)) ? "start" : "end") ? "left" : "right";
|
|
1006
|
-
} else {
|
|
1007
|
-
w = u;
|
|
1008
|
-
h = g === "end" ? "top" : "bottom";
|
|
1009
|
-
}
|
|
1010
|
-
const y = p - f.top - f.bottom;
|
|
1011
|
-
const v = m - f.left - f.right;
|
|
1012
|
-
const x = o(p - f[h], y);
|
|
1013
|
-
const A = o(m - f[w], v);
|
|
1014
|
-
const b = !e.middlewareData.shift;
|
|
1015
|
-
let O = x;
|
|
1016
|
-
let S = A;
|
|
1017
|
-
if (d) {
|
|
1018
|
-
S = g || b ? o(A, v) : v;
|
|
1019
|
-
} else {
|
|
1020
|
-
O = g || b ? o(x, y) : y;
|
|
1021
|
-
}
|
|
1022
|
-
if (b && !g) {
|
|
1023
|
-
const t = i(f.left, 0);
|
|
1024
|
-
const e = i(f.right, 0);
|
|
1025
|
-
const n = i(f.top, 0);
|
|
1026
|
-
const o = i(f.bottom, 0);
|
|
1027
|
-
if (d) {
|
|
1028
|
-
S = m - 2 * (t !== 0 || e !== 0 ? t + e : i(f.left, f.right));
|
|
1029
|
-
} else {
|
|
1030
|
-
O = p - 2 * (n !== 0 || o !== 0 ? n + o : i(f.top, f.bottom));
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
await l({
|
|
1034
|
-
...e,
|
|
1035
|
-
availableWidth: S,
|
|
1036
|
-
availableHeight: O
|
|
1037
|
-
});
|
|
1038
|
-
const C = await c.getDimensions(r.floating);
|
|
1039
|
-
if (m !== C.width || p !== C.height) {
|
|
1040
|
-
return {
|
|
1041
|
-
reset: {
|
|
1042
|
-
rects: true
|
|
1043
|
-
}
|
|
1044
|
-
};
|
|
1045
|
-
}
|
|
1046
|
-
return {};
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
function getNodeName(t) {
|
|
1052
|
-
if (isNode(t)) {
|
|
1053
|
-
return (t.nodeName || "").toLowerCase();
|
|
1054
|
-
}
|
|
1055
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
1056
|
-
// returning `#document` an infinite loop won't occur.
|
|
1057
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
1058
|
-
return "#document";
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
function getWindow(t) {
|
|
1062
|
-
var e;
|
|
1063
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
function getDocumentElement(t) {
|
|
1067
|
-
var e;
|
|
1068
|
-
return (e = (isNode(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
function isNode(t) {
|
|
1072
|
-
return t instanceof Node || t instanceof getWindow(t).Node;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
function isElement(t) {
|
|
1076
|
-
return t instanceof Element || t instanceof getWindow(t).Element;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
function isHTMLElement(t) {
|
|
1080
|
-
return t instanceof HTMLElement || t instanceof getWindow(t).HTMLElement;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
function isShadowRoot(t) {
|
|
1084
|
-
// Browsers without `ShadowRoot` support.
|
|
1085
|
-
if (typeof ShadowRoot === "undefined") {
|
|
1086
|
-
return false;
|
|
1087
|
-
}
|
|
1088
|
-
return t instanceof ShadowRoot || t instanceof getWindow(t).ShadowRoot;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
function isOverflowElement(t) {
|
|
1092
|
-
const {overflow: e, overflowX: n, overflowY: o, display: i} = getComputedStyle(t);
|
|
1093
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && ![ "inline", "contents" ].includes(i);
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
function isTableElement(t) {
|
|
1097
|
-
return [ "table", "td", "th" ].includes(getNodeName(t));
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
function isTopLayer(t) {
|
|
1101
|
-
return [ ":popover-open", ":modal" ].some((e => {
|
|
1102
|
-
try {
|
|
1103
|
-
return t.matches(e);
|
|
1104
|
-
} catch (t) {
|
|
1105
|
-
return false;
|
|
1106
|
-
}
|
|
1107
|
-
}));
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
function isContainingBlock(t) {
|
|
1111
|
-
const e = isWebKit();
|
|
1112
|
-
const n = isElement(t) ? getComputedStyle(t) : t;
|
|
1113
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1114
|
-
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : false) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : false) || !e && (n.filter ? n.filter !== "none" : false) || [ "transform", "perspective", "filter" ].some((t => (n.willChange || "").includes(t))) || [ "paint", "layout", "strict", "content" ].some((t => (n.contain || "").includes(t)));
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
function getContainingBlock(t) {
|
|
1118
|
-
let e = getParentNode(t);
|
|
1119
|
-
while (isHTMLElement(e) && !isLastTraversableNode(e)) {
|
|
1120
|
-
if (isContainingBlock(e)) {
|
|
1121
|
-
return e;
|
|
1122
|
-
} else if (isTopLayer(e)) {
|
|
1123
|
-
return null;
|
|
1124
|
-
}
|
|
1125
|
-
e = getParentNode(e);
|
|
1126
|
-
}
|
|
1127
|
-
return null;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
function isWebKit() {
|
|
1131
|
-
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
1132
|
-
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
function isLastTraversableNode(t) {
|
|
1136
|
-
return [ "html", "body", "#document" ].includes(getNodeName(t));
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
function getComputedStyle(t) {
|
|
1140
|
-
return getWindow(t).getComputedStyle(t);
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
function getNodeScroll(t) {
|
|
1144
|
-
if (isElement(t)) {
|
|
1145
|
-
return {
|
|
1146
|
-
scrollLeft: t.scrollLeft,
|
|
1147
|
-
scrollTop: t.scrollTop
|
|
1148
|
-
};
|
|
1149
|
-
}
|
|
1150
|
-
return {
|
|
1151
|
-
scrollLeft: t.scrollX,
|
|
1152
|
-
scrollTop: t.scrollY
|
|
1153
|
-
};
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
function getParentNode(t) {
|
|
1157
|
-
if (getNodeName(t) === "html") {
|
|
1158
|
-
return t;
|
|
1159
|
-
}
|
|
1160
|
-
const e =
|
|
1161
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
1162
|
-
t.assignedSlot ||
|
|
1163
|
-
// DOM Element detected.
|
|
1164
|
-
t.parentNode ||
|
|
1165
|
-
// ShadowRoot detected.
|
|
1166
|
-
isShadowRoot(t) && t.host ||
|
|
1167
|
-
// Fallback.
|
|
1168
|
-
getDocumentElement(t);
|
|
1169
|
-
return isShadowRoot(e) ? e.host : e;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
function getNearestOverflowAncestor(t) {
|
|
1173
|
-
const e = getParentNode(t);
|
|
1174
|
-
if (isLastTraversableNode(e)) {
|
|
1175
|
-
return t.ownerDocument ? t.ownerDocument.body : t.body;
|
|
1176
|
-
}
|
|
1177
|
-
if (isHTMLElement(e) && isOverflowElement(e)) {
|
|
1178
|
-
return e;
|
|
1179
|
-
}
|
|
1180
|
-
return getNearestOverflowAncestor(e);
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
function getOverflowAncestors(t, e, n) {
|
|
1184
|
-
var o;
|
|
1185
|
-
if (e === void 0) {
|
|
1186
|
-
e = [];
|
|
1187
|
-
}
|
|
1188
|
-
if (n === void 0) {
|
|
1189
|
-
n = true;
|
|
1190
|
-
}
|
|
1191
|
-
const i = getNearestOverflowAncestor(t);
|
|
1192
|
-
const s = i === ((o = t.ownerDocument) == null ? void 0 : o.body);
|
|
1193
|
-
const c = getWindow(i);
|
|
1194
|
-
if (s) {
|
|
1195
|
-
const t = getFrameElement(c);
|
|
1196
|
-
return e.concat(c, c.visualViewport || [], isOverflowElement(i) ? i : [], t && n ? getOverflowAncestors(t) : []);
|
|
1197
|
-
}
|
|
1198
|
-
return e.concat(i, getOverflowAncestors(i, [], n));
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
function getFrameElement(t) {
|
|
1202
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
function getCssDimensions(t) {
|
|
1206
|
-
const e = getComputedStyle(t);
|
|
1207
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
1208
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1209
|
-
let n = parseFloat(e.width) || 0;
|
|
1210
|
-
let o = parseFloat(e.height) || 0;
|
|
1211
|
-
const i = isHTMLElement(t);
|
|
1212
|
-
const c = i ? t.offsetWidth : n;
|
|
1213
|
-
const r = i ? t.offsetHeight : o;
|
|
1214
|
-
const l = s(n) !== c || s(o) !== r;
|
|
1215
|
-
if (l) {
|
|
1216
|
-
n = c;
|
|
1217
|
-
o = r;
|
|
1218
|
-
}
|
|
1219
|
-
return {
|
|
1220
|
-
width: n,
|
|
1221
|
-
height: o,
|
|
1222
|
-
$: l
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
function unwrapElement(t) {
|
|
1227
|
-
return !isElement(t) ? t.contextElement : t;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
function getScale(t) {
|
|
1231
|
-
const e = unwrapElement(t);
|
|
1232
|
-
if (!isHTMLElement(e)) {
|
|
1233
|
-
return createCoords(1);
|
|
1234
|
-
}
|
|
1235
|
-
const n = e.getBoundingClientRect();
|
|
1236
|
-
const {width: o, height: i, $: c} = getCssDimensions(e);
|
|
1237
|
-
let r = (c ? s(n.width) : n.width) / o;
|
|
1238
|
-
let l = (c ? s(n.height) : n.height) / i;
|
|
1239
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
1240
|
-
if (!r || !Number.isFinite(r)) {
|
|
1241
|
-
r = 1;
|
|
1242
|
-
}
|
|
1243
|
-
if (!l || !Number.isFinite(l)) {
|
|
1244
|
-
l = 1;
|
|
1245
|
-
}
|
|
1246
|
-
return {
|
|
1247
|
-
x: r,
|
|
1248
|
-
y: l
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
const a = createCoords(0);
|
|
1253
|
-
|
|
1254
|
-
function getVisualOffsets(t) {
|
|
1255
|
-
const e = getWindow(t);
|
|
1256
|
-
if (!isWebKit() || !e.visualViewport) {
|
|
1257
|
-
return a;
|
|
1258
|
-
}
|
|
1259
|
-
return {
|
|
1260
|
-
x: e.visualViewport.offsetLeft,
|
|
1261
|
-
y: e.visualViewport.offsetTop
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
function shouldAddVisualOffsets(t, e, n) {
|
|
1266
|
-
if (e === void 0) {
|
|
1267
|
-
e = false;
|
|
1268
|
-
}
|
|
1269
|
-
if (!n || e && n !== getWindow(t)) {
|
|
1270
|
-
return false;
|
|
1271
|
-
}
|
|
1272
|
-
return e;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
function getBoundingClientRect(t, e, n, o) {
|
|
1276
|
-
if (e === void 0) {
|
|
1277
|
-
e = false;
|
|
1278
|
-
}
|
|
1279
|
-
if (n === void 0) {
|
|
1280
|
-
n = false;
|
|
1281
|
-
}
|
|
1282
|
-
const i = t.getBoundingClientRect();
|
|
1283
|
-
const s = unwrapElement(t);
|
|
1284
|
-
let c = createCoords(1);
|
|
1285
|
-
if (e) {
|
|
1286
|
-
if (o) {
|
|
1287
|
-
if (isElement(o)) {
|
|
1288
|
-
c = getScale(o);
|
|
1289
|
-
}
|
|
1290
|
-
} else {
|
|
1291
|
-
c = getScale(t);
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
const r = shouldAddVisualOffsets(s, n, o) ? getVisualOffsets(s) : createCoords(0);
|
|
1295
|
-
let l = (i.left + r.x) / c.x;
|
|
1296
|
-
let a = (i.top + r.y) / c.y;
|
|
1297
|
-
let f = i.width / c.x;
|
|
1298
|
-
let u = i.height / c.y;
|
|
1299
|
-
if (s) {
|
|
1300
|
-
const t = getWindow(s);
|
|
1301
|
-
const e = o && isElement(o) ? getWindow(o) : o;
|
|
1302
|
-
let n = t;
|
|
1303
|
-
let i = getFrameElement(n);
|
|
1304
|
-
while (i && o && e !== n) {
|
|
1305
|
-
const t = getScale(i);
|
|
1306
|
-
const e = i.getBoundingClientRect();
|
|
1307
|
-
const o = getComputedStyle(i);
|
|
1308
|
-
const s = e.left + (i.clientLeft + parseFloat(o.paddingLeft)) * t.x;
|
|
1309
|
-
const c = e.top + (i.clientTop + parseFloat(o.paddingTop)) * t.y;
|
|
1310
|
-
l *= t.x;
|
|
1311
|
-
a *= t.y;
|
|
1312
|
-
f *= t.x;
|
|
1313
|
-
u *= t.y;
|
|
1314
|
-
l += s;
|
|
1315
|
-
a += c;
|
|
1316
|
-
n = getWindow(i);
|
|
1317
|
-
i = getFrameElement(n);
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
return rectToClientRect({
|
|
1321
|
-
width: f,
|
|
1322
|
-
height: u,
|
|
1323
|
-
x: l,
|
|
1324
|
-
y: a
|
|
1325
|
-
});
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(t) {
|
|
1329
|
-
let {elements: e, rect: n, offsetParent: o, strategy: i} = t;
|
|
1330
|
-
const s = i === "fixed";
|
|
1331
|
-
const c = getDocumentElement(o);
|
|
1332
|
-
const r = e ? isTopLayer(e.floating) : false;
|
|
1333
|
-
if (o === c || r && s) {
|
|
1334
|
-
return n;
|
|
1335
|
-
}
|
|
1336
|
-
let l = {
|
|
1337
|
-
scrollLeft: 0,
|
|
1338
|
-
scrollTop: 0
|
|
1339
|
-
};
|
|
1340
|
-
let a = createCoords(1);
|
|
1341
|
-
const f = createCoords(0);
|
|
1342
|
-
const u = isHTMLElement(o);
|
|
1343
|
-
if (u || !u && !s) {
|
|
1344
|
-
if (getNodeName(o) !== "body" || isOverflowElement(c)) {
|
|
1345
|
-
l = getNodeScroll(o);
|
|
1346
|
-
}
|
|
1347
|
-
if (isHTMLElement(o)) {
|
|
1348
|
-
const t = getBoundingClientRect(o);
|
|
1349
|
-
a = getScale(o);
|
|
1350
|
-
f.x = t.x + o.clientLeft;
|
|
1351
|
-
f.y = t.y + o.clientTop;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
return {
|
|
1355
|
-
width: n.width * a.x,
|
|
1356
|
-
height: n.height * a.y,
|
|
1357
|
-
x: n.x * a.x - l.scrollLeft * a.x + f.x,
|
|
1358
|
-
y: n.y * a.y - l.scrollTop * a.y + f.y
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
function getClientRects(t) {
|
|
1363
|
-
return Array.from(t.getClientRects());
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
function getWindowScrollBarX(t) {
|
|
1367
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1368
|
-
// incorrect for RTL.
|
|
1369
|
-
return getBoundingClientRect(getDocumentElement(t)).left + getNodeScroll(t).scrollLeft;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
1373
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1374
|
-
function getDocumentRect(t) {
|
|
1375
|
-
const e = getDocumentElement(t);
|
|
1376
|
-
const n = getNodeScroll(t);
|
|
1377
|
-
const o = t.ownerDocument.body;
|
|
1378
|
-
const s = i(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth);
|
|
1379
|
-
const c = i(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1380
|
-
let r = -n.scrollLeft + getWindowScrollBarX(t);
|
|
1381
|
-
const l = -n.scrollTop;
|
|
1382
|
-
if (getComputedStyle(o).direction === "rtl") {
|
|
1383
|
-
r += i(e.clientWidth, o.clientWidth) - s;
|
|
1384
|
-
}
|
|
1385
|
-
return {
|
|
1386
|
-
width: s,
|
|
1387
|
-
height: c,
|
|
1388
|
-
x: r,
|
|
1389
|
-
y: l
|
|
1390
|
-
};
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
function getViewportRect(t, e) {
|
|
1394
|
-
const n = getWindow(t);
|
|
1395
|
-
const o = getDocumentElement(t);
|
|
1396
|
-
const i = n.visualViewport;
|
|
1397
|
-
let s = o.clientWidth;
|
|
1398
|
-
let c = o.clientHeight;
|
|
1399
|
-
let r = 0;
|
|
1400
|
-
let l = 0;
|
|
1401
|
-
if (i) {
|
|
1402
|
-
s = i.width;
|
|
1403
|
-
c = i.height;
|
|
1404
|
-
const t = isWebKit();
|
|
1405
|
-
if (!t || t && e === "fixed") {
|
|
1406
|
-
r = i.offsetLeft;
|
|
1407
|
-
l = i.offsetTop;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
return {
|
|
1411
|
-
width: s,
|
|
1412
|
-
height: c,
|
|
1413
|
-
x: r,
|
|
1414
|
-
y: l
|
|
1415
|
-
};
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1419
|
-
function getInnerBoundingClientRect(t, e) {
|
|
1420
|
-
const n = getBoundingClientRect(t, true, e === "fixed");
|
|
1421
|
-
const o = n.top + t.clientTop;
|
|
1422
|
-
const i = n.left + t.clientLeft;
|
|
1423
|
-
const s = isHTMLElement(t) ? getScale(t) : createCoords(1);
|
|
1424
|
-
const c = t.clientWidth * s.x;
|
|
1425
|
-
const r = t.clientHeight * s.y;
|
|
1426
|
-
const l = i * s.x;
|
|
1427
|
-
const a = o * s.y;
|
|
1428
|
-
return {
|
|
1429
|
-
width: c,
|
|
1430
|
-
height: r,
|
|
1431
|
-
x: l,
|
|
1432
|
-
y: a
|
|
1433
|
-
};
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
function getClientRectFromClippingAncestor(t, e, n) {
|
|
1437
|
-
let o;
|
|
1438
|
-
if (e === "viewport") {
|
|
1439
|
-
o = getViewportRect(t, n);
|
|
1440
|
-
} else if (e === "document") {
|
|
1441
|
-
o = getDocumentRect(getDocumentElement(t));
|
|
1442
|
-
} else if (isElement(e)) {
|
|
1443
|
-
o = getInnerBoundingClientRect(e, n);
|
|
1444
|
-
} else {
|
|
1445
|
-
const n = getVisualOffsets(t);
|
|
1446
|
-
o = {
|
|
1447
|
-
...e,
|
|
1448
|
-
x: e.x - n.x,
|
|
1449
|
-
y: e.y - n.y
|
|
1450
|
-
};
|
|
1451
|
-
}
|
|
1452
|
-
return rectToClientRect(o);
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
function hasFixedPositionAncestor(t, e) {
|
|
1456
|
-
const n = getParentNode(t);
|
|
1457
|
-
if (n === e || !isElement(n) || isLastTraversableNode(n)) {
|
|
1458
|
-
return false;
|
|
1459
|
-
}
|
|
1460
|
-
return getComputedStyle(n).position === "fixed" || hasFixedPositionAncestor(n, e);
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1464
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1465
|
-
// of the given element up the tree.
|
|
1466
|
-
function getClippingElementAncestors(t, e) {
|
|
1467
|
-
const n = e.get(t);
|
|
1468
|
-
if (n) {
|
|
1469
|
-
return n;
|
|
1470
|
-
}
|
|
1471
|
-
let o = getOverflowAncestors(t, [], false).filter((t => isElement(t) && getNodeName(t) !== "body"));
|
|
1472
|
-
let i = null;
|
|
1473
|
-
const s = getComputedStyle(t).position === "fixed";
|
|
1474
|
-
let c = s ? getParentNode(t) : t;
|
|
1475
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1476
|
-
while (isElement(c) && !isLastTraversableNode(c)) {
|
|
1477
|
-
const e = getComputedStyle(c);
|
|
1478
|
-
const n = isContainingBlock(c);
|
|
1479
|
-
if (!n && e.position === "fixed") {
|
|
1480
|
-
i = null;
|
|
1481
|
-
}
|
|
1482
|
-
const r = s ? !n && !i : !n && e.position === "static" && !!i && [ "absolute", "fixed" ].includes(i.position) || isOverflowElement(c) && !n && hasFixedPositionAncestor(t, c);
|
|
1483
|
-
if (r) {
|
|
1484
|
-
// Drop non-containing blocks.
|
|
1485
|
-
o = o.filter((t => t !== c));
|
|
1486
|
-
} else {
|
|
1487
|
-
// Record last containing block for next iteration.
|
|
1488
|
-
i = e;
|
|
1489
|
-
}
|
|
1490
|
-
c = getParentNode(c);
|
|
1491
|
-
}
|
|
1492
|
-
e.set(t, o);
|
|
1493
|
-
return o;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1497
|
-
// clipping ancestors.
|
|
1498
|
-
function getClippingRect(t) {
|
|
1499
|
-
let {element: e, boundary: n, rootBoundary: s, strategy: c} = t;
|
|
1500
|
-
const r = n === "clippingAncestors" ? isTopLayer(e) ? [] : getClippingElementAncestors(e, this._c) : [].concat(n);
|
|
1501
|
-
const l = [ ...r, s ];
|
|
1502
|
-
const a = l[0];
|
|
1503
|
-
const f = l.reduce(((t, n) => {
|
|
1504
|
-
const s = getClientRectFromClippingAncestor(e, n, c);
|
|
1505
|
-
t.top = i(s.top, t.top);
|
|
1506
|
-
t.right = o(s.right, t.right);
|
|
1507
|
-
t.bottom = o(s.bottom, t.bottom);
|
|
1508
|
-
t.left = i(s.left, t.left);
|
|
1509
|
-
return t;
|
|
1510
|
-
}), getClientRectFromClippingAncestor(e, a, c));
|
|
1511
|
-
return {
|
|
1512
|
-
width: f.right - f.left,
|
|
1513
|
-
height: f.bottom - f.top,
|
|
1514
|
-
x: f.left,
|
|
1515
|
-
y: f.top
|
|
1516
|
-
};
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
function getDimensions(t) {
|
|
1520
|
-
const {width: e, height: n} = getCssDimensions(t);
|
|
1521
|
-
return {
|
|
1522
|
-
width: e,
|
|
1523
|
-
height: n
|
|
1524
|
-
};
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
function getRectRelativeToOffsetParent(t, e, n) {
|
|
1528
|
-
const o = isHTMLElement(e);
|
|
1529
|
-
const i = getDocumentElement(e);
|
|
1530
|
-
const s = n === "fixed";
|
|
1531
|
-
const c = getBoundingClientRect(t, true, s, e);
|
|
1532
|
-
let r = {
|
|
1533
|
-
scrollLeft: 0,
|
|
1534
|
-
scrollTop: 0
|
|
1535
|
-
};
|
|
1536
|
-
const l = createCoords(0);
|
|
1537
|
-
if (o || !o && !s) {
|
|
1538
|
-
if (getNodeName(e) !== "body" || isOverflowElement(i)) {
|
|
1539
|
-
r = getNodeScroll(e);
|
|
1540
|
-
}
|
|
1541
|
-
if (o) {
|
|
1542
|
-
const t = getBoundingClientRect(e, true, s, e);
|
|
1543
|
-
l.x = t.x + e.clientLeft;
|
|
1544
|
-
l.y = t.y + e.clientTop;
|
|
1545
|
-
} else if (i) {
|
|
1546
|
-
l.x = getWindowScrollBarX(i);
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
const a = c.left + r.scrollLeft - l.x;
|
|
1550
|
-
const f = c.top + r.scrollTop - l.y;
|
|
1551
|
-
return {
|
|
1552
|
-
x: a,
|
|
1553
|
-
y: f,
|
|
1554
|
-
width: c.width,
|
|
1555
|
-
height: c.height
|
|
1556
|
-
};
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
function isStaticPositioned(t) {
|
|
1560
|
-
return getComputedStyle(t).position === "static";
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
function getTrueOffsetParent(t, e) {
|
|
1564
|
-
if (!isHTMLElement(t) || getComputedStyle(t).position === "fixed") {
|
|
1565
|
-
return null;
|
|
1566
|
-
}
|
|
1567
|
-
if (e) {
|
|
1568
|
-
return e(t);
|
|
1569
|
-
}
|
|
1570
|
-
return t.offsetParent;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1574
|
-
// such as table ancestors and cross browser bugs.
|
|
1575
|
-
function getOffsetParent(t, e) {
|
|
1576
|
-
const n = getWindow(t);
|
|
1577
|
-
if (isTopLayer(t)) {
|
|
1578
|
-
return n;
|
|
1579
|
-
}
|
|
1580
|
-
if (!isHTMLElement(t)) {
|
|
1581
|
-
let e = getParentNode(t);
|
|
1582
|
-
while (e && !isLastTraversableNode(e)) {
|
|
1583
|
-
if (isElement(e) && !isStaticPositioned(e)) {
|
|
1584
|
-
return e;
|
|
1585
|
-
}
|
|
1586
|
-
e = getParentNode(e);
|
|
1587
|
-
}
|
|
1588
|
-
return n;
|
|
1589
|
-
}
|
|
1590
|
-
let o = getTrueOffsetParent(t, e);
|
|
1591
|
-
while (o && isTableElement(o) && isStaticPositioned(o)) {
|
|
1592
|
-
o = getTrueOffsetParent(o, e);
|
|
1593
|
-
}
|
|
1594
|
-
if (o && isLastTraversableNode(o) && isStaticPositioned(o) && !isContainingBlock(o)) {
|
|
1595
|
-
return n;
|
|
1596
|
-
}
|
|
1597
|
-
return o || getContainingBlock(t) || n;
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
const getElementRects = async function(t) {
|
|
1601
|
-
const e = this.getOffsetParent || getOffsetParent;
|
|
1602
|
-
const n = this.getDimensions;
|
|
1603
|
-
const o = await n(t.floating);
|
|
1604
|
-
return {
|
|
1605
|
-
reference: getRectRelativeToOffsetParent(t.reference, await e(t.floating), t.strategy),
|
|
1606
|
-
floating: {
|
|
1607
|
-
x: 0,
|
|
1608
|
-
y: 0,
|
|
1609
|
-
width: o.width,
|
|
1610
|
-
height: o.height
|
|
1611
|
-
}
|
|
1612
|
-
};
|
|
1613
|
-
};
|
|
1614
|
-
|
|
1615
|
-
function isRTL(t) {
|
|
1616
|
-
return getComputedStyle(t).direction === "rtl";
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
const f = {
|
|
1620
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1621
|
-
getDocumentElement,
|
|
1622
|
-
getClippingRect,
|
|
1623
|
-
getOffsetParent,
|
|
1624
|
-
getElementRects,
|
|
1625
|
-
getClientRects,
|
|
1626
|
-
getDimensions,
|
|
1627
|
-
getScale,
|
|
1628
|
-
isElement,
|
|
1629
|
-
isRTL
|
|
1630
|
-
};
|
|
1631
|
-
|
|
1632
|
-
// https://samthor.au/2021/observing-dom/
|
|
1633
|
-
function observeMove(t, e) {
|
|
1634
|
-
let n = null;
|
|
1635
|
-
let s;
|
|
1636
|
-
const r = getDocumentElement(t);
|
|
1637
|
-
function cleanup() {
|
|
1638
|
-
var t;
|
|
1639
|
-
clearTimeout(s);
|
|
1640
|
-
(t = n) == null || t.disconnect();
|
|
1641
|
-
n = null;
|
|
1642
|
-
}
|
|
1643
|
-
function refresh(l, a) {
|
|
1644
|
-
if (l === void 0) {
|
|
1645
|
-
l = false;
|
|
1646
|
-
}
|
|
1647
|
-
if (a === void 0) {
|
|
1648
|
-
a = 1;
|
|
1649
|
-
}
|
|
1650
|
-
cleanup();
|
|
1651
|
-
const {left: f, top: u, width: g, height: d} = t.getBoundingClientRect();
|
|
1652
|
-
if (!l) {
|
|
1653
|
-
e();
|
|
1654
|
-
}
|
|
1655
|
-
if (!g || !d) {
|
|
1656
|
-
return;
|
|
1657
|
-
}
|
|
1658
|
-
const m = c(u);
|
|
1659
|
-
const p = c(r.clientWidth - (f + g));
|
|
1660
|
-
const h = c(r.clientHeight - (u + d));
|
|
1661
|
-
const w = c(f);
|
|
1662
|
-
const y = -m + "px " + -p + "px " + -h + "px " + -w + "px";
|
|
1663
|
-
const v = {
|
|
1664
|
-
rootMargin: y,
|
|
1665
|
-
threshold: i(0, o(1, a)) || 1
|
|
1666
|
-
};
|
|
1667
|
-
let x = true;
|
|
1668
|
-
function handleObserve(t) {
|
|
1669
|
-
const e = t[0].intersectionRatio;
|
|
1670
|
-
if (e !== a) {
|
|
1671
|
-
if (!x) {
|
|
1672
|
-
return refresh();
|
|
1673
|
-
}
|
|
1674
|
-
if (!e) {
|
|
1675
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1676
|
-
// to prevent an infinite loop of updates.
|
|
1677
|
-
s = setTimeout((() => {
|
|
1678
|
-
refresh(false, 1e-7);
|
|
1679
|
-
}), 1e3);
|
|
1680
|
-
} else {
|
|
1681
|
-
refresh(false, e);
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
x = false;
|
|
1685
|
-
}
|
|
1686
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
1687
|
-
// error.
|
|
1688
|
-
try {
|
|
1689
|
-
n = new IntersectionObserver(handleObserve, {
|
|
1690
|
-
...v,
|
|
1691
|
-
// Handle <iframe>s
|
|
1692
|
-
root: r.ownerDocument
|
|
1693
|
-
});
|
|
1694
|
-
} catch (t) {
|
|
1695
|
-
n = new IntersectionObserver(handleObserve, v);
|
|
1696
|
-
}
|
|
1697
|
-
n.observe(t);
|
|
1698
|
-
}
|
|
1699
|
-
refresh(true);
|
|
1700
|
-
return cleanup;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
/**
|
|
1704
|
-
* Automatically updates the position of the floating element when necessary.
|
|
1705
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
1706
|
-
* visible on the screen.
|
|
1707
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
1708
|
-
* removed from the DOM or hidden from the screen.
|
|
1709
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
1710
|
-
*/ function autoUpdate(t, e, n, o) {
|
|
1711
|
-
if (o === void 0) {
|
|
1712
|
-
o = {};
|
|
1713
|
-
}
|
|
1714
|
-
const {ancestorScroll: i = true, ancestorResize: s = true, elementResize: c = typeof ResizeObserver === "function", layoutShift: r = typeof IntersectionObserver === "function", animationFrame: l = false} = o;
|
|
1715
|
-
const a = unwrapElement(t);
|
|
1716
|
-
const f = i || s ? [ ...a ? getOverflowAncestors(a) : [], ...getOverflowAncestors(e) ] : [];
|
|
1717
|
-
f.forEach((t => {
|
|
1718
|
-
i && t.addEventListener("scroll", n, {
|
|
1719
|
-
passive: true
|
|
1720
|
-
});
|
|
1721
|
-
s && t.addEventListener("resize", n);
|
|
1722
|
-
}));
|
|
1723
|
-
const u = a && r ? observeMove(a, n) : null;
|
|
1724
|
-
let g = -1;
|
|
1725
|
-
let d = null;
|
|
1726
|
-
if (c) {
|
|
1727
|
-
d = new ResizeObserver((t => {
|
|
1728
|
-
let [o] = t;
|
|
1729
|
-
if (o && o.target === a && d) {
|
|
1730
|
-
// Prevent update loops when using the `size` middleware.
|
|
1731
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1732
|
-
d.unobserve(e);
|
|
1733
|
-
cancelAnimationFrame(g);
|
|
1734
|
-
g = requestAnimationFrame((() => {
|
|
1735
|
-
var t;
|
|
1736
|
-
(t = d) == null || t.observe(e);
|
|
1737
|
-
}));
|
|
1738
|
-
}
|
|
1739
|
-
n();
|
|
1740
|
-
}));
|
|
1741
|
-
if (a && !l) {
|
|
1742
|
-
d.observe(a);
|
|
1743
|
-
}
|
|
1744
|
-
d.observe(e);
|
|
1745
|
-
}
|
|
1746
|
-
let m;
|
|
1747
|
-
let p = l ? getBoundingClientRect(t) : null;
|
|
1748
|
-
if (l) {
|
|
1749
|
-
frameLoop();
|
|
1750
|
-
}
|
|
1751
|
-
function frameLoop() {
|
|
1752
|
-
const e = getBoundingClientRect(t);
|
|
1753
|
-
if (p && (e.x !== p.x || e.y !== p.y || e.width !== p.width || e.height !== p.height)) {
|
|
1754
|
-
n();
|
|
1755
|
-
}
|
|
1756
|
-
p = e;
|
|
1757
|
-
m = requestAnimationFrame(frameLoop);
|
|
1758
|
-
}
|
|
1759
|
-
n();
|
|
1760
|
-
return () => {
|
|
1761
|
-
var t;
|
|
1762
|
-
f.forEach((t => {
|
|
1763
|
-
i && t.removeEventListener("scroll", n);
|
|
1764
|
-
s && t.removeEventListener("resize", n);
|
|
1765
|
-
}));
|
|
1766
|
-
u == null || u();
|
|
1767
|
-
(t = d) == null || t.disconnect();
|
|
1768
|
-
d = null;
|
|
1769
|
-
if (l) {
|
|
1770
|
-
cancelAnimationFrame(m);
|
|
1771
|
-
}
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
/**
|
|
1776
|
-
* Modifies the placement by translating the floating element along the
|
|
1777
|
-
* specified axes.
|
|
1778
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1779
|
-
* object may be passed.
|
|
1780
|
-
* @see https://floating-ui.com/docs/offset
|
|
1781
|
-
*/ const u = offset$1;
|
|
1782
|
-
|
|
1783
|
-
/**
|
|
1784
|
-
* Optimizes the visibility of the floating element by choosing the placement
|
|
1785
|
-
* that has the most space available automatically, without needing to specify a
|
|
1786
|
-
* preferred placement. Alternative to `flip`.
|
|
1787
|
-
* @see https://floating-ui.com/docs/autoPlacement
|
|
1788
|
-
*/ autoPlacement;
|
|
1789
|
-
|
|
1790
|
-
/**
|
|
1791
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1792
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
1793
|
-
* @see https://floating-ui.com/docs/shift
|
|
1794
|
-
*/ const g = shift$1;
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1798
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1799
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
1800
|
-
* @see https://floating-ui.com/docs/flip
|
|
1801
|
-
*/ const d = flip$1;
|
|
1802
|
-
|
|
1803
|
-
/**
|
|
1804
|
-
* Provides data that allows you to change the size of the floating element —
|
|
1805
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1806
|
-
* width of the reference element.
|
|
1807
|
-
* @see https://floating-ui.com/docs/size
|
|
1808
|
-
*/ const m = size$1;
|
|
1809
|
-
|
|
1810
|
-
/**
|
|
1811
|
-
* Provides data to hide the floating element in applicable situations, such as
|
|
1812
|
-
* when it is not in the same clipping context as the reference element.
|
|
1813
|
-
* @see https://floating-ui.com/docs/hide
|
|
1814
|
-
*/ const p = hide$1;
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* Provides data to position an inner element of the floating element so that it
|
|
1818
|
-
* appears centered to the reference element.
|
|
1819
|
-
* @see https://floating-ui.com/docs/arrow
|
|
1820
|
-
*/ const h = arrow$1;
|
|
1821
|
-
|
|
1822
|
-
/**
|
|
1823
|
-
* Provides improved positioning for inline reference elements that can span
|
|
1824
|
-
* over multiple lines, such as hyperlinks or range selections.
|
|
1825
|
-
* @see https://floating-ui.com/docs/inline
|
|
1826
|
-
*/ inline;
|
|
1827
|
-
|
|
1828
|
-
/**
|
|
1829
|
-
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1830
|
-
*/ limitShift;
|
|
1831
|
-
|
|
1832
|
-
/**
|
|
1833
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1834
|
-
* next to a given reference element.
|
|
1835
|
-
*/ const computePosition = (t, e, n) => {
|
|
1836
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1837
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1838
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
1839
|
-
const o = new Map;
|
|
1840
|
-
const i = {
|
|
1841
|
-
platform: f,
|
|
1842
|
-
...n
|
|
1843
|
-
};
|
|
1844
|
-
const s = {
|
|
1845
|
-
...i.platform,
|
|
1846
|
-
_c: o
|
|
1847
|
-
};
|
|
1848
|
-
return computePosition$1(t, e, {
|
|
1849
|
-
...i,
|
|
1850
|
-
platform: s
|
|
1851
|
-
});
|
|
1852
|
-
};
|
|
1853
|
-
|
|
1854
|
-
class w {
|
|
1855
|
-
constructor(t, e, n) {
|
|
1856
|
-
this.trigger = t;
|
|
1857
|
-
this.panel = e;
|
|
1858
|
-
this.options = {
|
|
1859
|
-
distance: 20,
|
|
1860
|
-
placement: "bottom",
|
|
1861
|
-
strategy: "fixed",
|
|
1862
|
-
sameWidth: false,
|
|
1863
|
-
...n
|
|
1864
|
-
};
|
|
1865
|
-
this.init(n);
|
|
1866
|
-
}
|
|
1867
|
-
init(t) {
|
|
1868
|
-
this.options = Object.assign(this.options, t);
|
|
1869
|
-
this.update();
|
|
1870
|
-
}
|
|
1871
|
-
update() {
|
|
1872
|
-
this.cleanUp = autoUpdate(this.trigger, this.panel, (() => {
|
|
1873
|
-
(async () => {
|
|
1874
|
-
const {x: t, y: e, placement: n, middlewareData: o} = await computePosition(this.trigger, this.panel, {
|
|
1875
|
-
placement: this.options.placement,
|
|
1876
|
-
strategy: this.options.strategy,
|
|
1877
|
-
middleware: [ u({
|
|
1878
|
-
mainAxis: this.options.distance,
|
|
1879
|
-
crossAxis: this.options.skidding
|
|
1880
|
-
}), d(), g(), m(this.options.sameWidth && {
|
|
1881
|
-
apply({rects: t, elements: e}) {
|
|
1882
|
-
Object.assign(e.floating.style, {
|
|
1883
|
-
width: `${t.reference.width}px`
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
}), h({
|
|
1887
|
-
element: this.options.arrow || null
|
|
1888
|
-
}), this.positionChange(), p() ]
|
|
1889
|
-
});
|
|
1890
|
-
Object.assign(this.panel.style, {
|
|
1891
|
-
top: "0",
|
|
1892
|
-
left: "0",
|
|
1893
|
-
transform: `translate(${this.roundByDPR(t)}px,${this.roundByDPR(e)}px)`
|
|
1894
|
-
});
|
|
1895
|
-
if (this.options.arrow) {
|
|
1896
|
-
const {x: t, y: e} = o.arrow;
|
|
1897
|
-
const i = {
|
|
1898
|
-
top: "bottom",
|
|
1899
|
-
right: "left",
|
|
1900
|
-
bottom: "top",
|
|
1901
|
-
left: "right"
|
|
1902
|
-
}[n.split("-")[0]];
|
|
1903
|
-
Object.assign(this.options.arrow.style, {
|
|
1904
|
-
left: t != null ? `${t}px` : "",
|
|
1905
|
-
top: e != null ? `${e}px` : "",
|
|
1906
|
-
right: "",
|
|
1907
|
-
bottom: "",
|
|
1908
|
-
[i]: "-4px"
|
|
1909
|
-
});
|
|
1910
|
-
}
|
|
1911
|
-
const {referenceHidden: i} = o.hide;
|
|
1912
|
-
Object.assign(this.panel.style, {
|
|
1913
|
-
visibility: i ? "hidden" : "visible"
|
|
1914
|
-
});
|
|
1915
|
-
})();
|
|
1916
|
-
}));
|
|
1917
|
-
}
|
|
1918
|
-
destroy() {
|
|
1919
|
-
if (!this.cleanUp) return;
|
|
1920
|
-
this.cleanUp();
|
|
1921
|
-
}
|
|
1922
|
-
positionChange() {
|
|
1923
|
-
return {
|
|
1924
|
-
name: "positionChange",
|
|
1925
|
-
fn: ({placement: t}) => {
|
|
1926
|
-
if (typeof this.options.onPositionChange !== "function") return {};
|
|
1927
|
-
this.options.onPositionChange(t);
|
|
1928
|
-
return {};
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
roundByDPR(t) {
|
|
1933
|
-
const e = window.devicePixelRatio || 1;
|
|
1934
|
-
return Math.round(t * e) / e;
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
export { w as F };
|
|
1939
|
-
//# sourceMappingURL=p-38d4bd8a.js.map
|