@esri/calcite-components 1.1.0-next.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/assets/handle/t9n/index.d.ts +3 -0
- package/dist/calcite/assets/handle/t9n/messages.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ar.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_bg.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_bs.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ca.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_cs.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_da.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_de.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_el.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_en.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_es.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_et.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_fi.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_fr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_he.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_hr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_hu.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_id.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_it.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ja.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ko.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_lt.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_lv.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_nl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_no.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pt-BR.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pt-PT.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ro.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ru.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sk.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sv.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_th.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_tr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_uk.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_vi.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-CN.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-HK.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-TW.json +3 -0
- package/dist/calcite/assets/icon/analysisOverlay16.json +1 -0
- package/dist/calcite/assets/icon/analysisOverlay24.json +1 -0
- package/dist/calcite/assets/icon/analysisOverlay32.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem16.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem24.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem32.json +1 -0
- package/dist/calcite/assets/icon/graphAxis16.json +1 -0
- package/dist/calcite/assets/icon/graphAxis24.json +1 -0
- package/dist/calcite/assets/icon/graphAxis32.json +1 -0
- package/dist/calcite/assets/icon/graphGuides16.json +1 -0
- package/dist/calcite/assets/icon/graphGuides24.json +1 -0
- package/dist/calcite/assets/icon/graphGuides32.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries16.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries24.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries32.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice16.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice24.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice32.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer16.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer24.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer32.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable16.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable24.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable32.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea16.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea24.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea32.json +1 -0
- package/dist/calcite/calcite.css +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/p-041d0f9f.entry.js +6 -0
- package/dist/calcite/{p-f4ae848c.js → p-0534cef5.js} +1 -1
- package/dist/calcite/{p-d3614e9b.entry.js → p-0743cc15.entry.js} +2 -2
- package/dist/calcite/p-07cddbf9.entry.js +6 -0
- package/dist/calcite/p-0824c673.entry.js +6 -0
- package/dist/calcite/p-09b4dbc1.entry.js +6 -0
- package/dist/calcite/p-0a7542f8.entry.js +6 -0
- package/dist/calcite/p-0df568c3.entry.js +6 -0
- package/dist/calcite/{p-d62db6f4.entry.js → p-0edfedfc.entry.js} +2 -2
- package/dist/calcite/p-145b7cdc.js +6 -0
- package/dist/calcite/p-1d322131.entry.js +6 -0
- package/dist/calcite/p-1e3db270.entry.js +6 -0
- package/dist/calcite/{p-25361452.entry.js → p-28ee997e.entry.js} +2 -2
- package/dist/calcite/p-291b75d5.entry.js +6 -0
- package/dist/calcite/p-299618f6.entry.js +6 -0
- package/dist/calcite/p-2afe300d.js +6 -0
- package/dist/calcite/p-31cf383e.js +6 -0
- package/dist/calcite/{p-8061aecd.js → p-32d3d2c6.js} +1 -1
- package/dist/calcite/p-3449e5c5.entry.js +6 -0
- package/dist/calcite/p-3abc3397.entry.js +6 -0
- package/dist/calcite/p-3b712fa3.entry.js +6 -0
- package/dist/calcite/p-3bd84462.js +10 -0
- package/dist/calcite/{p-383ae263.js → p-43215088.js} +2 -2
- package/dist/calcite/p-443e7495.js +6 -0
- package/dist/calcite/{p-ce1ac637.js → p-44e65dab.js} +1 -1
- package/dist/calcite/{p-871dd426.entry.js → p-45aba393.entry.js} +2 -2
- package/dist/calcite/p-4a902f71.entry.js +6 -0
- package/dist/calcite/p-4b8aad63.entry.js +6 -0
- package/dist/calcite/{p-fa92d0fa.entry.js → p-5738ec05.entry.js} +2 -2
- package/dist/calcite/{p-e76ab8cb.entry.js → p-586f2188.entry.js} +2 -2
- package/dist/calcite/p-5e2b13eb.js +6 -0
- package/dist/calcite/{p-2aa07ce3.js → p-5e822482.js} +1 -1
- package/dist/calcite/{p-0f8d9c80.js → p-6293ed16.js} +1 -1
- package/dist/calcite/p-681f5bcd.entry.js +6 -0
- package/dist/calcite/{p-d8f305f9.js → p-6cc03406.js} +1 -1
- package/dist/calcite/p-6ebb0713.entry.js +6 -0
- package/dist/calcite/{p-cc21ee89.js → p-6f9b73aa.js} +1 -1
- package/dist/calcite/p-721d4a15.entry.js +6 -0
- package/dist/calcite/{p-1cc77a48.js → p-72e0a2c6.js} +1 -1
- package/dist/calcite/p-747d2b6e.entry.js +6 -0
- package/dist/calcite/{p-6e558447.js → p-75651de9.js} +2 -2
- package/dist/calcite/p-7aee1b7a.js +6 -0
- package/dist/calcite/p-7beda7c9.entry.js +6 -0
- package/dist/calcite/p-7d37e5a3.entry.js +6 -0
- package/dist/calcite/p-7e570f52.entry.js +6 -0
- package/dist/calcite/{p-09c57eb5.js → p-7f1192e2.js} +2 -2
- package/dist/calcite/{p-a544dc0a.entry.js → p-8190fef7.entry.js} +2 -2
- package/dist/calcite/p-81a8751c.entry.js +6 -0
- package/dist/calcite/{p-45db0321.entry.js → p-88552502.entry.js} +2 -2
- package/dist/calcite/p-8880449d.entry.js +6 -0
- package/dist/calcite/p-8a48ce07.entry.js +6 -0
- package/dist/calcite/p-92c57358.entry.js +6 -0
- package/dist/calcite/p-941bc30e.entry.js +6 -0
- package/dist/calcite/{p-51c09654.js → p-95affd38.js} +1 -1
- package/dist/calcite/p-98c10ed9.entry.js +6 -0
- package/dist/calcite/{p-917b5c3c.js → p-9a811534.js} +2 -2
- package/dist/calcite/p-9b383655.entry.js +6 -0
- package/dist/calcite/p-9e7d290a.entry.js +6 -0
- package/dist/calcite/p-a0699bed.entry.js +6 -0
- package/dist/calcite/{p-7f40d693.js → p-a5d23ef8.js} +2 -2
- package/dist/calcite/p-a82b983d.entry.js +6 -0
- package/dist/calcite/{p-7adcf447.js → p-adef0422.js} +1 -1
- package/dist/calcite/{p-9b8c6bd5.entry.js → p-aea382ce.entry.js} +2 -2
- package/dist/calcite/p-b2fd4072.entry.js +6 -0
- package/dist/calcite/p-b33dc129.js +6 -0
- package/dist/calcite/{p-42a11557.entry.js → p-b3a9a53c.entry.js} +2 -2
- package/dist/calcite/p-b4c2f2ce.js +11 -0
- package/dist/calcite/{p-75936643.js → p-b4f3b351.js} +2 -2
- package/dist/calcite/p-b5a392d6.entry.js +6 -0
- package/dist/calcite/{p-c45ca041.js → p-b90df3dd.js} +1 -1
- package/dist/calcite/p-b9421f54.entry.js +6 -0
- package/dist/calcite/{p-c4b38335.entry.js → p-ba3e198d.entry.js} +2 -2
- package/dist/calcite/{p-63ab7d7a.js → p-bb1240f3.js} +1 -1
- package/dist/calcite/{p-b93df4a3.js → p-c097b143.js} +1 -1
- package/dist/calcite/p-c4d076eb.entry.js +6 -0
- package/dist/calcite/p-cc1203c0.entry.js +6 -0
- package/dist/calcite/{p-e06fda39.js → p-ce6a7f8c.js} +2 -2
- package/dist/calcite/p-d438c49f.entry.js +6 -0
- package/dist/calcite/{p-414f1e94.entry.js → p-d841eb93.entry.js} +2 -2
- package/dist/calcite/{p-8669328f.entry.js → p-de571c36.entry.js} +2 -2
- package/dist/calcite/p-de99d897.entry.js +6 -0
- package/dist/calcite/p-df405411.entry.js +6 -0
- package/dist/calcite/p-e370cd2d.entry.js +6 -0
- package/dist/calcite/p-e4e7c6c0.entry.js +6 -0
- package/dist/calcite/{p-4321c513.entry.js → p-e5e67c4b.entry.js} +2 -2
- package/dist/calcite/p-e683cacc.entry.js +6 -0
- package/dist/calcite/p-eaad3707.entry.js +6 -0
- package/dist/calcite/{p-9375c53f.entry.js → p-f27daa9e.entry.js} +2 -2
- package/dist/calcite/{p-ce9f7164.js → p-f44952aa.js} +2 -2
- package/dist/calcite/{p-abd69d92.js → p-f510244b.js} +1 -1
- package/dist/calcite/p-f91b9012.entry.js +6 -0
- package/dist/calcite/{p-1ca20cfc.js → p-fda34bfd.js} +1 -1
- package/dist/cjs/{ExpandToggle-e64129de.js → ExpandToggle-a335cfb1.js} +8 -6
- package/dist/cjs/{Heading-2fba9a7a.js → Heading-d361823f.js} +2 -2
- package/dist/cjs/{app-globals-c2211671.js → app-globals-a113245f.js} +2 -2
- package/dist/cjs/{array-77e138b0.js → array-2d1e4569.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-bar.cjs.entry.js +19 -17
- package/dist/cjs/calcite-action-group.cjs.entry.js +13 -28
- package/dist/cjs/calcite-action-menu.cjs.entry.js +13 -11
- package/dist/cjs/calcite-action-pad.cjs.entry.js +18 -16
- package/dist/cjs/calcite-action.cjs.entry.js +15 -13
- package/dist/cjs/calcite-alert.cjs.entry.js +19 -15
- package/dist/cjs/calcite-avatar.cjs.entry.js +7 -7
- package/dist/cjs/calcite-block_2.cjs.entry.js +14 -14
- package/dist/cjs/calcite-button.cjs.entry.js +17 -15
- package/dist/cjs/calcite-card.cjs.entry.js +11 -11
- package/dist/cjs/calcite-checkbox.cjs.entry.js +22 -17
- package/dist/cjs/calcite-chip.cjs.entry.js +15 -13
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +27 -19
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +34 -26
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +23 -34
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +26 -32
- package/dist/cjs/calcite-fab.cjs.entry.js +12 -10
- package/dist/cjs/calcite-filter.cjs.entry.js +18 -17
- package/dist/cjs/calcite-flow-item.cjs.entry.js +19 -15
- package/dist/cjs/calcite-flow.cjs.entry.js +4 -4
- package/dist/cjs/calcite-graph_2.cjs.entry.js +55 -29
- package/dist/cjs/calcite-handle.cjs.entry.js +41 -11
- package/dist/cjs/calcite-icon.cjs.entry.js +23 -18
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +23 -17
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +33 -21
- package/dist/cjs/calcite-input-message.cjs.entry.js +6 -6
- package/dist/cjs/calcite-input-number.cjs.entry.js +46 -37
- package/dist/cjs/calcite-input-text.cjs.entry.js +24 -21
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +34 -20
- package/dist/cjs/calcite-input.cjs.entry.js +53 -56
- package/dist/cjs/calcite-label.cjs.entry.js +7 -7
- package/dist/cjs/calcite-link.cjs.entry.js +11 -9
- package/dist/cjs/calcite-list_3.cjs.entry.js +43 -33
- package/dist/cjs/calcite-loader.cjs.entry.js +4 -4
- package/dist/cjs/calcite-modal.cjs.entry.js +45 -21
- package/dist/cjs/calcite-notice.cjs.entry.js +16 -14
- package/dist/cjs/calcite-option_3.cjs.entry.js +16 -14
- package/dist/cjs/calcite-pagination.cjs.entry.js +10 -20
- package/dist/cjs/calcite-panel.cjs.entry.js +24 -18
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +22 -20
- package/dist/cjs/calcite-popover.cjs.entry.js +25 -19
- package/dist/cjs/calcite-progress.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +4 -4
- package/dist/cjs/calcite-radio-button.cjs.entry.js +22 -17
- package/dist/cjs/calcite-rating.cjs.entry.js +18 -16
- package/dist/cjs/calcite-scrim.cjs.entry.js +10 -10
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +11 -11
- package/dist/cjs/calcite-shell_3.cjs.entry.js +20 -16
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +6 -6
- package/dist/cjs/calcite-split-button.cjs.entry.js +4 -21
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +16 -14
- package/dist/cjs/calcite-switch.cjs.entry.js +22 -17
- package/dist/cjs/calcite-tab_4.cjs.entry.js +21 -13
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tip_3.cjs.entry.js +17 -15
- package/dist/cjs/calcite-tooltip.cjs.entry.js +29 -21
- package/dist/cjs/calcite-tree_2.cjs.entry.js +20 -15
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +32 -22
- package/dist/cjs/calcite.cjs.js +5 -5
- package/dist/cjs/{conditionalSlot-096f7053.js → conditionalSlot-3a4fe2dc.js} +3 -3
- package/dist/cjs/{debounce-2cdcf435.js → debounce-408eb927.js} +1 -1
- package/dist/cjs/{dom-0d96f224.js → dom-553866e5.js} +100 -20
- package/dist/cjs/{filter-b111e6bc.js → filter-501e11ad.js} +2 -2
- package/dist/cjs/{floating-ui-e868382e.js → floating-ui-54f4c5a9.js} +365 -281
- package/dist/cjs/{focusTrapComponent-133aa5a6.js → focusTrapComponent-5bcf753e.js} +21 -26
- package/dist/cjs/{form-454d0da7.js → form-bffda67a.js} +4 -7
- package/dist/cjs/{guid-6b7d0d0a.js → guid-6bebe20b.js} +1 -1
- package/dist/cjs/{index-101ebeb8.js → index-16b54251.js} +251 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-ae2b81e5.js → interactive-9a753e3b.js} +1 -1
- package/dist/cjs/{key-1113b650.js → key-b11206cb.js} +1 -1
- package/dist/cjs/{label-4fa0c613.js → label-06c122f9.js} +2 -2
- package/dist/cjs/{loadable-be936384.js → loadable-03215740.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{locale-7871bab2.js → locale-8539ef25.js} +62 -14
- package/dist/cjs/{math-91fa6fed.js → math-acfe02f4.js} +3 -2
- package/dist/cjs/{observers-958f20c2.js → observers-ef9e3899.js} +1 -1
- package/dist/cjs/{openCloseComponent-901d3fd9.js → openCloseComponent-ce345b01.js} +2 -2
- package/dist/cjs/{resources-2b9c8f2b.js → resources-305406be.js} +1 -1
- package/dist/cjs/{resources-dc916f0b.js → resources-379e317d.js} +1 -1
- package/dist/cjs/{resources-320ae0e0.js → resources-9f12de5f.js} +1 -1
- package/dist/cjs/{resources-a6a0d47b.js → resources-b829d4a6.js} +11 -7
- package/dist/cjs/{resources-8d67e54c.js → resources-bd729e69.js} +1 -1
- package/dist/cjs/{resources-e219e503.js → resources-d4657a03.js} +1 -1
- package/dist/cjs/{sortable.esm-8f9a6e42.js → sortable.esm-6dea5d6e.js} +1 -1
- package/dist/cjs/{t9n-75897fe6.js → t9n-64e84ec9.js} +3 -3
- package/dist/cjs/{utils-4bf76b74.js → utils-4aac28db.js} +3 -3
- package/dist/cjs/{utils-3251b332.js → utils-6539bbb0.js} +1 -1
- package/dist/cjs/utils-9af7bb5a.js +49 -0
- package/dist/collection/components/accordion/accordion.css +2 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.css +2 -1
- package/dist/collection/components/accordion-item/accordion-item.js +1 -1
- package/dist/collection/components/accordion-item/resources.js +1 -1
- package/dist/collection/components/action/action.css +3 -4
- package/dist/collection/components/action/action.js +4 -2
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.css +2 -1
- package/dist/collection/components/action-bar/action-bar.js +4 -2
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +1 -1
- package/dist/collection/components/action-group/action-group.css +2 -1
- package/dist/collection/components/action-group/action-group.js +3 -37
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.css +2 -1
- package/dist/collection/components/action-menu/action-menu.js +4 -2
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.css +2 -1
- package/dist/collection/components/action-pad/action-pad.js +4 -2
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.css +2 -1
- package/dist/collection/components/alert/alert.js +7 -3
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.css +3 -2
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/avatar/utils.js +1 -1
- package/dist/collection/components/block/block.css +77 -2
- package/dist/collection/components/block/block.js +1 -1
- package/dist/collection/components/block/resources.js +1 -1
- package/dist/collection/components/block-section/block-section.css +2 -1
- package/dist/collection/components/block-section/block-section.js +1 -1
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.css +2 -1
- package/dist/collection/components/button/button.js +4 -2
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/card.css +2 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +2 -1
- package/dist/collection/components/checkbox/checkbox.js +12 -7
- package/dist/collection/components/chip/chip.css +2 -1
- package/dist/collection/components/chip/chip.js +4 -2
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.css +2 -1
- package/dist/collection/components/color-picker/color-picker.js +8 -2
- package/dist/collection/components/color-picker/resources.js +1 -1
- package/dist/collection/components/color-picker/utils.js +1 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.css +2 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +4 -2
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.css +2 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
- package/dist/collection/components/color-picker-swatch/resources.js +1 -1
- package/dist/collection/components/combobox/combobox.css +2 -1
- package/dist/collection/components/combobox/combobox.js +13 -5
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +1 -1
- package/dist/collection/components/combobox-item/combobox-item.css +2 -1
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.css +2 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.css +2 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -36
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.css +2 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.css +2 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +5 -3
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.css +2 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +4 -2
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.css +2 -1
- package/dist/collection/components/dropdown/dropdown.js +9 -34
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.css +2 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +2 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +4 -2
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.css +2 -1
- package/dist/collection/components/fab/fab.js +5 -3
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.css +2 -1
- package/dist/collection/components/filter/filter.js +5 -4
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.css +2 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.css +2 -1
- package/dist/collection/components/flow-item/flow-item.js +7 -3
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +4 -2
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.css +2 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/assets/handle/t9n/index.d.ts +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ar.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_bg.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_bs.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ca.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_cs.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_da.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_de.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_el.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_en.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_es.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_et.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_fi.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_fr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_he.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_hr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_hu.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_id.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_it.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ja.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ko.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_lt.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_lv.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_nl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_no.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pt-BR.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pt-PT.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ro.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ru.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sk.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sv.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_th.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_tr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_uk.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_vi.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-CN.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-HK.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-TW.json +3 -0
- package/dist/collection/components/handle/handle.css +2 -1
- package/dist/collection/components/handle/handle.js +93 -9
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/assets/icon/analysisOverlay16.json +1 -0
- package/dist/collection/components/icon/assets/icon/analysisOverlay24.json +1 -0
- package/dist/collection/components/icon/assets/icon/analysisOverlay32.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem16.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem24.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice32.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer16.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer24.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer32.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable16.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable24.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable32.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea16.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea24.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea32.json +1 -0
- package/dist/collection/components/icon/icon.css +2 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +17 -12
- package/dist/collection/components/inline-editable/inline-editable.css +2 -1
- package/dist/collection/components/inline-editable/inline-editable.js +11 -5
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.css +2 -1
- package/dist/collection/components/input/input.js +41 -44
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.css +2 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +17 -5
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.css +3 -2
- package/dist/collection/components/input-message/input-message.js +1 -1
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.css +2 -1
- package/dist/collection/components/input-number/input-number.js +34 -25
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.css +2 -1
- package/dist/collection/components/input-text/input-text.js +11 -8
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.css +2 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +8 -2
- package/dist/collection/components/label/label.css +2 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.css +2 -1
- package/dist/collection/components/link/link.js +4 -2
- package/dist/collection/components/list/list.css +2 -1
- package/dist/collection/components/list/list.js +20 -18
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.css +2 -1
- package/dist/collection/components/list-item/list-item.js +13 -5
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.css +2 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.css +85 -5
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.css +59 -15
- package/dist/collection/components/modal/modal.js +32 -8
- package/dist/collection/components/modal/resources.js +6 -2
- package/dist/collection/components/notice/notice.css +2 -1
- package/dist/collection/components/notice/notice.js +4 -2
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.css +2 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.css +2 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.css +2 -1
- package/dist/collection/components/pagination/pagination.js +1 -27
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.css +2 -1
- package/dist/collection/components/panel/panel.js +10 -4
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.css +2 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +6 -2
- package/dist/collection/components/pick-list-group/pick-list-group.css +2 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.css +2 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +4 -2
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.css +2 -1
- package/dist/collection/components/popover/popover.js +10 -4
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.css +77 -2
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.css +2 -1
- package/dist/collection/components/radio-button/radio-button.js +12 -7
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.css +2 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/rating/function/star.js +1 -1
- package/dist/collection/components/rating/rating.css +2 -1
- package/dist/collection/components/rating/rating.js +5 -3
- package/dist/collection/components/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.css +2 -1
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.css +2 -1
- package/dist/collection/components/segmented-control/segmented-control.js +2 -2
- package/dist/collection/components/segmented-control-item/resources.js +1 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.css +2 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
- package/dist/collection/components/select/resources.js +1 -1
- package/dist/collection/components/select/select.css +2 -1
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.css +2 -1
- package/dist/collection/components/shell/shell.js +1 -1
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.css +2 -1
- package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.css +2 -1
- package/dist/collection/components/shell-panel/shell-panel.js +7 -3
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.css +19 -17
- package/dist/collection/components/slider/slider.js +42 -16
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.css +2 -1
- package/dist/collection/components/sortable-list/sortable-list.js +1 -1
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.css +2 -1
- package/dist/collection/components/split-button/split-button.js +1 -38
- package/dist/collection/components/stepper/stepper.css +2 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.css +2 -1
- package/dist/collection/components/stepper-item/stepper-item.js +5 -3
- package/dist/collection/components/switch/switch.css +2 -1
- package/dist/collection/components/switch/switch.js +12 -7
- package/dist/collection/components/tab/tab.css +2 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.css +2 -1
- package/dist/collection/components/tab-nav/tab-nav.js +8 -2
- package/dist/collection/components/tab-title/resources.js +1 -1
- package/dist/collection/components/tab-title/tab-title.css +2 -1
- package/dist/collection/components/tab-title/tab-title.js +4 -2
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.css +2 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tile/resources.js +1 -1
- package/dist/collection/components/tile/tile.css +2 -1
- package/dist/collection/components/tile/tile.js +1 -1
- package/dist/collection/components/tile-select/resources.js +1 -1
- package/dist/collection/components/tile-select/tile-select.css +2 -1
- package/dist/collection/components/tile-select/tile-select.js +1 -1
- package/dist/collection/components/tile-select-group/tile-select-group.css +2 -1
- package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
- package/dist/collection/components/time-picker/resources.js +1 -1
- package/dist/collection/components/time-picker/time-picker.css +2 -1
- package/dist/collection/components/time-picker/time-picker.js +13 -5
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.css +2 -1
- package/dist/collection/components/tip/tip.js +1 -1
- package/dist/collection/components/tip-group/tip-group.css +2 -1
- package/dist/collection/components/tip-group/tip-group.js +1 -1
- package/dist/collection/components/tip-manager/resources.js +1 -1
- package/dist/collection/components/tip-manager/tip-manager.css +2 -1
- package/dist/collection/components/tip-manager/tip-manager.js +4 -2
- package/dist/collection/components/tooltip/TooltipManager.js +10 -5
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +2 -1
- package/dist/collection/components/tooltip/tooltip.js +9 -10
- package/dist/collection/components/tooltip/utils.js +11 -0
- package/dist/collection/components/tree/tree.css +2 -1
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/tree/utils.js +1 -1
- package/dist/collection/components/tree-item/resources.js +3 -2
- package/dist/collection/components/tree-item/tree-item.css +38 -32
- package/dist/collection/components/tree-item/tree-item.js +8 -4
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +1 -1
- package/dist/collection/components/value-list/value-list.css +2 -1
- package/dist/collection/components/value-list/value-list.js +15 -2
- package/dist/collection/components/value-list-item/interfaces.js +1 -0
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.css +2 -1
- package/dist/collection/components/value-list-item/value-list-item.js +29 -4
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/utils.js +45 -0
- package/dist/collection/utils/floating-ui.js +20 -9
- package/dist/collection/utils/focusTrapComponent.js +1 -1
- package/dist/collection/utils/form.js +2 -5
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +3 -2
- package/dist/collection/utils/mode.js +1 -1
- package/dist/collection/utils/number.js +58 -11
- package/dist/collection/utils/observers.js +1 -1
- package/dist/collection/utils/openCloseComponent.js +1 -1
- package/dist/collection/utils/resources.js +1 -1
- package/dist/collection/utils/t9n.js +1 -1
- package/dist/collection/utils/time.js +1 -1
- package/dist/components/ExpandToggle.js +4 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +3 -19
- package/dist/components/action-menu.js +5 -3
- package/dist/components/action.js +5 -3
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +5 -3
- package/dist/components/calcite-accordion-item.js +2 -2
- package/dist/components/calcite-accordion.js +2 -2
- package/dist/components/calcite-action-bar.js +5 -3
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +5 -3
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +8 -4
- package/dist/components/calcite-avatar.js +2 -2
- package/dist/components/calcite-block-section.js +2 -2
- package/dist/components/calcite-block.js +2 -2
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +2 -2
- package/dist/components/calcite-checkbox.js +1 -1
- package/dist/components/calcite-chip.js +1 -1
- package/dist/components/calcite-color-picker-hex-input.js +1 -1
- package/dist/components/calcite-color-picker-swatch.js +1 -1
- package/dist/components/calcite-color-picker.js +9 -3
- package/dist/components/calcite-combobox-item-group.js +2 -2
- package/dist/components/calcite-combobox-item.js +2 -2
- package/dist/components/calcite-combobox.js +14 -6
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +2 -2
- package/dist/components/calcite-dropdown-item.js +5 -3
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +6 -4
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +8 -4
- package/dist/components/calcite-flow.js +2 -2
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +12 -6
- package/dist/components/calcite-input-date-picker.js +18 -6
- package/dist/components/calcite-input-message.js +2 -2
- package/dist/components/calcite-input-number.js +35 -26
- package/dist/components/calcite-input-text.js +12 -9
- package/dist/components/calcite-input-time-picker.js +9 -3
- package/dist/components/calcite-input.js +1 -1
- package/dist/components/calcite-label.js +1 -1
- package/dist/components/calcite-link.js +1 -1
- package/dist/components/calcite-list-item-group.js +2 -2
- package/dist/components/calcite-list-item.js +14 -6
- package/dist/components/calcite-list.js +21 -19
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +36 -10
- package/dist/components/calcite-notice.js +5 -3
- package/dist/components/calcite-option-group.js +2 -2
- package/dist/components/calcite-option.js +2 -2
- package/dist/components/calcite-pagination.js +2 -13
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +2 -2
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +2 -2
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +2 -2
- package/dist/components/calcite-radio-button.js +13 -8
- package/dist/components/calcite-rating.js +6 -4
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-segmented-control-item.js +2 -2
- package/dist/components/calcite-segmented-control.js +2 -2
- package/dist/components/calcite-select.js +6 -4
- package/dist/components/calcite-shell-center-row.js +2 -2
- package/dist/components/calcite-shell-panel.js +8 -4
- package/dist/components/calcite-shell.js +2 -2
- package/dist/components/calcite-slider.js +43 -17
- package/dist/components/calcite-sortable-list.js +2 -2
- package/dist/components/calcite-split-button.js +3 -21
- package/dist/components/calcite-stepper-item.js +6 -4
- package/dist/components/calcite-stepper.js +2 -2
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-tile-select-group.js +2 -2
- package/dist/components/calcite-tile-select.js +2 -2
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +2 -2
- package/dist/components/calcite-tip-manager.js +5 -3
- package/dist/components/calcite-tip.js +2 -2
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +11 -6
- package/dist/components/calcite-tree.js +2 -2
- package/dist/components/calcite-value-list-item.js +8 -5
- package/dist/components/calcite-value-list.js +11 -4
- package/dist/components/checkbox.js +13 -8
- package/dist/components/chip.js +5 -3
- package/dist/components/color-picker-hex-input.js +5 -3
- package/dist/components/color-picker-swatch.js +2 -2
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +2 -2
- package/dist/components/date-picker-month-header.js +5 -3
- package/dist/components/date-picker-month.js +6 -4
- package/dist/components/date-picker.js +3 -19
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +98 -18
- package/dist/components/dropdown.js +10 -20
- package/dist/components/filter.js +6 -5
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +364 -279
- package/dist/components/focusTrapComponent.js +20 -25
- package/dist/components/form.js +2 -5
- package/dist/components/graph.js +2 -2
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +39 -7
- package/dist/components/icon.js +18 -13
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +42 -45
- package/dist/components/interactive.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +2 -2
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +5 -3
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +2 -2
- package/dist/components/locale.js +59 -12
- package/dist/components/math.js +3 -2
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +11 -5
- package/dist/components/pick-list-item.js +5 -3
- package/dist/components/popover.js +11 -5
- package/dist/components/progress.js +2 -2
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +2 -2
- package/dist/components/shared-list-render.js +7 -3
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +13 -8
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +9 -3
- package/dist/components/tab-title.js +5 -3
- package/dist/components/tab.js +2 -2
- package/dist/components/tabs.js +2 -2
- package/dist/components/tile.js +2 -2
- package/dist/components/time-picker.js +14 -6
- package/dist/components/tooltip.js +23 -15
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/components/utils3.js +1 -1
- package/dist/components/utils4.js +47 -0
- package/dist/esm/{ExpandToggle-414f7b66.js → ExpandToggle-4727adf8.js} +8 -6
- package/dist/esm/{Heading-84086ab0.js → Heading-3bac0cfa.js} +2 -2
- package/dist/esm/{app-globals-b5c8ff3d.js → app-globals-74d44d89.js} +2 -2
- package/dist/esm/{array-bf7de305.js → array-6fd99808.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +9 -9
- package/dist/esm/calcite-action-bar.entry.js +19 -17
- package/dist/esm/calcite-action-group.entry.js +13 -28
- package/dist/esm/calcite-action-menu.entry.js +13 -11
- package/dist/esm/calcite-action-pad.entry.js +18 -16
- package/dist/esm/calcite-action.entry.js +15 -13
- package/dist/esm/calcite-alert.entry.js +19 -15
- package/dist/esm/calcite-avatar.entry.js +7 -7
- package/dist/esm/calcite-block_2.entry.js +14 -14
- package/dist/esm/calcite-button.entry.js +17 -15
- package/dist/esm/calcite-card.entry.js +11 -11
- package/dist/esm/calcite-checkbox.entry.js +22 -17
- package/dist/esm/calcite-chip.entry.js +15 -13
- package/dist/esm/calcite-color-picker_3.entry.js +27 -19
- package/dist/esm/calcite-combobox_3.entry.js +33 -25
- package/dist/esm/calcite-date-picker_4.entry.js +23 -34
- package/dist/esm/calcite-dropdown_3.entry.js +26 -32
- package/dist/esm/calcite-fab.entry.js +12 -10
- package/dist/esm/calcite-filter.entry.js +18 -17
- package/dist/esm/calcite-flow-item.entry.js +19 -15
- package/dist/esm/calcite-flow.entry.js +4 -4
- package/dist/esm/calcite-graph_2.entry.js +55 -29
- package/dist/esm/calcite-handle.entry.js +41 -11
- package/dist/esm/calcite-icon.entry.js +23 -18
- package/dist/esm/calcite-inline-editable.entry.js +23 -17
- package/dist/esm/calcite-input-date-picker.entry.js +33 -21
- package/dist/esm/calcite-input-message.entry.js +6 -6
- package/dist/esm/calcite-input-number.entry.js +46 -37
- package/dist/esm/calcite-input-text.entry.js +24 -21
- package/dist/esm/calcite-input-time-picker_2.entry.js +34 -20
- package/dist/esm/calcite-input.entry.js +53 -56
- package/dist/esm/calcite-label.entry.js +7 -7
- package/dist/esm/calcite-link.entry.js +11 -9
- package/dist/esm/calcite-list_3.entry.js +43 -33
- package/dist/esm/calcite-loader.entry.js +4 -4
- package/dist/esm/calcite-modal.entry.js +45 -21
- package/dist/esm/calcite-notice.entry.js +16 -14
- package/dist/esm/calcite-option_3.entry.js +16 -14
- package/dist/esm/calcite-pagination.entry.js +10 -20
- package/dist/esm/calcite-panel.entry.js +24 -18
- package/dist/esm/calcite-pick-list_3.entry.js +22 -20
- package/dist/esm/calcite-popover.entry.js +25 -19
- package/dist/esm/calcite-progress.entry.js +3 -3
- package/dist/esm/calcite-radio-button-group.entry.js +4 -4
- package/dist/esm/calcite-radio-button.entry.js +22 -17
- package/dist/esm/calcite-rating.entry.js +18 -16
- package/dist/esm/calcite-scrim.entry.js +10 -10
- package/dist/esm/calcite-segmented-control_2.entry.js +11 -11
- package/dist/esm/calcite-shell_3.entry.js +20 -16
- package/dist/esm/calcite-sortable-list.entry.js +6 -6
- package/dist/esm/calcite-split-button.entry.js +4 -21
- package/dist/esm/calcite-stepper_2.entry.js +16 -14
- package/dist/esm/calcite-switch.entry.js +22 -17
- package/dist/esm/calcite-tab_4.entry.js +21 -13
- package/dist/esm/calcite-tile-select_2.entry.js +7 -7
- package/dist/esm/calcite-tile.entry.js +9 -9
- package/dist/esm/calcite-tip_3.entry.js +17 -15
- package/dist/esm/calcite-tooltip.entry.js +29 -21
- package/dist/esm/calcite-tree_2.entry.js +20 -15
- package/dist/esm/calcite-value-list_2.entry.js +32 -22
- package/dist/esm/calcite.js +5 -5
- package/dist/esm/{conditionalSlot-ae0dd61c.js → conditionalSlot-03f34e10.js} +3 -3
- package/dist/esm/{debounce-189d5dea.js → debounce-f893dc12.js} +1 -1
- package/dist/esm/{dom-78b18cb9.js → dom-13d14bf1.js} +100 -20
- package/dist/esm/{filter-e6512b85.js → filter-e9b22c1c.js} +2 -2
- package/dist/esm/{floating-ui-0d6ec2b2.js → floating-ui-1d9078ac.js} +366 -281
- package/dist/esm/{focusTrapComponent-4aa7d5d9.js → focusTrapComponent-d8df0d61.js} +21 -26
- package/dist/esm/{form-e328ec3a.js → form-948b3633.js} +4 -7
- package/dist/esm/{guid-64b3949a.js → guid-7a9e307b.js} +1 -1
- package/dist/esm/{index-9cf36d00.js → index-b8735a76.js} +251 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-d51bcec3.js → interactive-7c601b75.js} +1 -1
- package/dist/esm/{key-a234775a.js → key-4f8ab7a0.js} +1 -1
- package/dist/esm/{label-563cd240.js → label-84c0027e.js} +2 -2
- package/dist/esm/{loadable-5922f388.js → loadable-eacac1b0.js} +1 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{locale-bbb2ebf7.js → locale-e71d40b1.js} +62 -15
- package/dist/esm/{math-02026e26.js → math-bad59c37.js} +3 -2
- package/dist/esm/{observers-839e1444.js → observers-f268ee68.js} +1 -1
- package/dist/esm/{openCloseComponent-98481985.js → openCloseComponent-ec590820.js} +2 -2
- package/dist/esm/{resources-7229c9aa.js → resources-2537ff53.js} +1 -1
- package/dist/esm/{resources-e5970a41.js → resources-455d50da.js} +11 -7
- package/dist/esm/{resources-0e1235ca.js → resources-4c7e12d7.js} +1 -1
- package/dist/esm/{resources-743bbf4e.js → resources-6efb094b.js} +1 -1
- package/dist/esm/{resources-586c9301.js → resources-8032eb01.js} +1 -1
- package/dist/esm/{resources-0d118882.js → resources-8ee51466.js} +1 -1
- package/dist/esm/{sortable.esm-77d6f29b.js → sortable.esm-ad7263e5.js} +1 -1
- package/dist/esm/{t9n-754b0fb8.js → t9n-df463c97.js} +3 -3
- package/dist/esm/{utils-d4d4185c.js → utils-4755b12f.js} +3 -3
- package/dist/esm/utils-9b472a57.js +47 -0
- package/dist/esm/{utils-3599eaa5.js → utils-e9181006.js} +1 -1
- package/dist/extras/docs-json.json +43 -66
- package/dist/extras/vscode-data.json +1 -1
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/action-group/action-group.d.ts +1 -5
- package/dist/types/components/checkbox/checkbox.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -5
- package/dist/types/components/dropdown/dropdown.d.ts +1 -5
- package/dist/types/components/handle/assets/handle/t9n/index.d.ts +3 -0
- package/dist/types/components/handle/handle.d.ts +21 -3
- package/dist/types/components/icon/utils.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/input-number/input-number.d.ts +2 -1
- package/dist/types/components/modal/modal.d.ts +8 -0
- package/dist/types/components/modal/resources.d.ts +5 -1
- package/dist/types/components/pagination/pagination.d.ts +1 -5
- package/dist/types/components/radio-button/radio-button.d.ts +1 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +1 -1
- package/dist/types/components/split-button/split-button.d.ts +1 -6
- package/dist/types/components/switch/switch.d.ts +1 -0
- package/dist/types/components/tooltip/tooltip.d.ts +0 -1
- package/dist/types/components/tooltip/utils.d.ts +2 -0
- package/dist/types/components/tree-item/resources.d.ts +1 -0
- package/dist/types/components/value-list/value-list.d.ts +2 -0
- package/dist/types/components/value-list-item/interfaces.d.ts +4 -0
- package/dist/types/components/value-list-item/value-list-item.d.ts +6 -0
- package/dist/types/components.d.ts +23 -29
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/floating-ui/utils.d.ts +4 -0
- package/dist/types/utils/number.d.ts +14 -6
- package/hydrate/index.js +1099 -711
- package/package.json +19 -20
- package/readme.md +2 -2
- package/dist/calcite/p-00aaee4e.entry.js +0 -6
- package/dist/calcite/p-028df927.entry.js +0 -6
- package/dist/calcite/p-06b480ca.js +0 -6
- package/dist/calcite/p-085432f2.entry.js +0 -6
- package/dist/calcite/p-0b3db293.entry.js +0 -6
- package/dist/calcite/p-0df64c24.entry.js +0 -6
- package/dist/calcite/p-1a0b1b58.entry.js +0 -6
- package/dist/calcite/p-22876cde.entry.js +0 -6
- package/dist/calcite/p-26ca50af.entry.js +0 -6
- package/dist/calcite/p-371a9b25.js +0 -6
- package/dist/calcite/p-375aa8c5.entry.js +0 -6
- package/dist/calcite/p-3809dc43.entry.js +0 -6
- package/dist/calcite/p-3bf7891d.js +0 -6
- package/dist/calcite/p-3c0e3f7f.js +0 -10
- package/dist/calcite/p-4237e0a1.entry.js +0 -6
- package/dist/calcite/p-4318c033.entry.js +0 -6
- package/dist/calcite/p-5aa021f0.entry.js +0 -6
- package/dist/calcite/p-609edb26.entry.js +0 -6
- package/dist/calcite/p-65e6a718.entry.js +0 -6
- package/dist/calcite/p-698f8148.entry.js +0 -6
- package/dist/calcite/p-6a98931b.entry.js +0 -6
- package/dist/calcite/p-6ea72871.entry.js +0 -6
- package/dist/calcite/p-74301242.entry.js +0 -6
- package/dist/calcite/p-76f9d7e3.entry.js +0 -6
- package/dist/calcite/p-819f44b8.entry.js +0 -6
- package/dist/calcite/p-88b36d52.entry.js +0 -6
- package/dist/calcite/p-89eff9a5.entry.js +0 -6
- package/dist/calcite/p-9182f791.entry.js +0 -6
- package/dist/calcite/p-93262a30.entry.js +0 -6
- package/dist/calcite/p-96aa3e0a.entry.js +0 -6
- package/dist/calcite/p-9b7daa41.entry.js +0 -6
- package/dist/calcite/p-9c2f54a4.js +0 -6
- package/dist/calcite/p-a89528a5.entry.js +0 -6
- package/dist/calcite/p-bcf5419a.entry.js +0 -6
- package/dist/calcite/p-c0571703.entry.js +0 -6
- package/dist/calcite/p-c2e55866.js +0 -6
- package/dist/calcite/p-c41f36fa.entry.js +0 -6
- package/dist/calcite/p-c4ab60b0.js +0 -10
- package/dist/calcite/p-ca009796.entry.js +0 -6
- package/dist/calcite/p-ca8c0e97.entry.js +0 -6
- package/dist/calcite/p-d37321dc.entry.js +0 -6
- package/dist/calcite/p-d7098e62.entry.js +0 -6
- package/dist/calcite/p-d85ede55.entry.js +0 -6
- package/dist/calcite/p-d9461bd7.entry.js +0 -6
- package/dist/calcite/p-dab743a0.entry.js +0 -6
- package/dist/calcite/p-db3067be.js +0 -6
- package/dist/calcite/p-e5e13c12.entry.js +0 -6
- package/dist/calcite/p-ec14b352.entry.js +0 -6
- package/dist/calcite/p-ece7e6e5.entry.js +0 -6
- package/dist/calcite/p-f1ee4f0c.entry.js +0 -6
- package/dist/calcite/p-f8c9e6f5.entry.js +0 -6
- package/dist/calcite/p-f9367f73.entry.js +0 -6
- package/dist/calcite/p-fa867df2.js +0 -6
- package/dist/calcite/p-fda1dd03.entry.js +0 -6
- package/dist/cjs/nonChromiumPlatformUtils-fc704952.js +0 -506
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +0 -496
- package/dist/components/nonChromiumPlatformUtils.js +0 -498
- package/dist/esm/nonChromiumPlatformUtils-37df43f5.js +0 -502
- package/dist/types/utils/floating-ui/nonChromiumPlatformUtils.d.ts +0 -15
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.1.0
|
|
4
|
+
* v1.1.0
|
|
5
5
|
*/
|
|
6
6
|
import { Build } from '@stencil/core/internal/client/index.js';
|
|
7
7
|
import { c as getElementDir, r as closestElementCrossShadowBoundary } from './dom.js';
|
|
8
8
|
import { d as debounce } from './debounce.js';
|
|
9
9
|
|
|
10
|
-
function getSide(placement) {
|
|
11
|
-
return placement.split('-')[0];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
function getAlignment(placement) {
|
|
15
11
|
return placement.split('-')[1];
|
|
16
12
|
}
|
|
17
13
|
|
|
18
|
-
function getMainAxisFromPlacement(placement) {
|
|
19
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
14
|
function getLengthFromAxis(axis) {
|
|
23
15
|
return axis === 'y' ? 'height' : 'width';
|
|
24
16
|
}
|
|
25
17
|
|
|
18
|
+
function getSide(placement) {
|
|
19
|
+
return placement.split('-')[0];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getMainAxisFromPlacement(placement) {
|
|
23
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
26
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
27
27
|
let {
|
|
28
28
|
reference,
|
|
@@ -201,13 +201,13 @@ function rectToClientRect(rect) {
|
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
* Resolves with an object of overflow side offsets that determine how much the
|
|
204
|
-
* element is overflowing a given clipping boundary.
|
|
204
|
+
* element is overflowing a given clipping boundary on each side.
|
|
205
205
|
* - positive = overflowing the boundary by that number of pixels
|
|
206
206
|
* - negative = how many pixels left before it will overflow
|
|
207
207
|
* - 0 = lies flush with the boundary
|
|
208
208
|
* @see https://floating-ui.com/docs/detectOverflow
|
|
209
209
|
*/
|
|
210
|
-
async function detectOverflow(
|
|
210
|
+
async function detectOverflow(state, options) {
|
|
211
211
|
var _await$platform$isEle;
|
|
212
212
|
if (options === void 0) {
|
|
213
213
|
options = {};
|
|
@@ -219,7 +219,7 @@ async function detectOverflow(middlewareArguments, options) {
|
|
|
219
219
|
rects,
|
|
220
220
|
elements,
|
|
221
221
|
strategy
|
|
222
|
-
} =
|
|
222
|
+
} = state;
|
|
223
223
|
const {
|
|
224
224
|
boundary = 'clippingAncestors',
|
|
225
225
|
rootBoundary = 'viewport',
|
|
@@ -270,26 +270,26 @@ function within(min$1$1, value, max$1$1) {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
/**
|
|
273
|
-
*
|
|
274
|
-
* to the reference element.
|
|
273
|
+
* Provides data to position an inner element of the floating element so that it
|
|
274
|
+
* appears centered to the reference element.
|
|
275
275
|
* @see https://floating-ui.com/docs/arrow
|
|
276
276
|
*/
|
|
277
277
|
const arrow = options => ({
|
|
278
278
|
name: 'arrow',
|
|
279
279
|
options,
|
|
280
|
-
async fn(
|
|
281
|
-
// Since `element` is required, we don't Partial<> the type
|
|
280
|
+
async fn(state) {
|
|
281
|
+
// Since `element` is required, we don't Partial<> the type.
|
|
282
282
|
const {
|
|
283
283
|
element,
|
|
284
284
|
padding = 0
|
|
285
|
-
} = options
|
|
285
|
+
} = options || {};
|
|
286
286
|
const {
|
|
287
287
|
x,
|
|
288
288
|
y,
|
|
289
289
|
placement,
|
|
290
290
|
rects,
|
|
291
291
|
platform
|
|
292
|
-
} =
|
|
292
|
+
} = state;
|
|
293
293
|
if (element == null) {
|
|
294
294
|
return {};
|
|
295
295
|
}
|
|
@@ -313,7 +313,7 @@ const arrow = options => ({
|
|
|
313
313
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
314
314
|
|
|
315
315
|
// Make sure the arrow doesn't overflow the floating element if the center
|
|
316
|
-
// point is outside the floating element's bounds
|
|
316
|
+
// point is outside the floating element's bounds.
|
|
317
317
|
const min = paddingObject[minProp];
|
|
318
318
|
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
319
319
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
@@ -335,14 +335,17 @@ const arrow = options => ({
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
const
|
|
338
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
339
|
+
const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
|
|
340
|
+
|
|
341
|
+
const oppositeSideMap = {
|
|
339
342
|
left: 'right',
|
|
340
343
|
right: 'left',
|
|
341
344
|
bottom: 'top',
|
|
342
345
|
top: 'bottom'
|
|
343
346
|
};
|
|
344
347
|
function getOppositePlacement(placement) {
|
|
345
|
-
return placement.replace(/left|right|bottom|top/g,
|
|
348
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
function getAlignmentSides(placement, rects, rtl) {
|
|
@@ -362,17 +365,14 @@ function getAlignmentSides(placement, rects, rtl) {
|
|
|
362
365
|
};
|
|
363
366
|
}
|
|
364
367
|
|
|
365
|
-
const
|
|
368
|
+
const oppositeAlignmentMap = {
|
|
366
369
|
start: 'end',
|
|
367
370
|
end: 'start'
|
|
368
371
|
};
|
|
369
372
|
function getOppositeAlignmentPlacement(placement) {
|
|
370
|
-
return placement.replace(/start|end/g,
|
|
373
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
371
374
|
}
|
|
372
375
|
|
|
373
|
-
const sides = ['top', 'right', 'bottom', 'left'];
|
|
374
|
-
const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
|
|
375
|
-
|
|
376
376
|
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
377
377
|
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
378
378
|
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
@@ -383,7 +383,9 @@ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
386
|
-
*
|
|
386
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
387
|
+
* that has the most space available automatically, without needing to specify a
|
|
388
|
+
* preferred placement. Alternative to `flip`.
|
|
387
389
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
388
390
|
*/
|
|
389
391
|
const autoPlacement = function (options) {
|
|
@@ -393,26 +395,25 @@ const autoPlacement = function (options) {
|
|
|
393
395
|
return {
|
|
394
396
|
name: 'autoPlacement',
|
|
395
397
|
options,
|
|
396
|
-
async fn(
|
|
397
|
-
var _middlewareData$autoP, _middlewareData$autoP2,
|
|
398
|
+
async fn(state) {
|
|
399
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
398
400
|
const {
|
|
399
|
-
x,
|
|
400
|
-
y,
|
|
401
401
|
rects,
|
|
402
402
|
middlewareData,
|
|
403
403
|
placement,
|
|
404
404
|
platform,
|
|
405
405
|
elements
|
|
406
|
-
} =
|
|
406
|
+
} = state;
|
|
407
407
|
const {
|
|
408
|
+
crossAxis = false,
|
|
408
409
|
alignment,
|
|
409
410
|
allowedPlacements = allPlacements,
|
|
410
411
|
autoAlignment = true,
|
|
411
412
|
...detectOverflowOptions
|
|
412
413
|
} = options;
|
|
413
414
|
const placements = alignment !== undefined || allowedPlacements === allPlacements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
414
|
-
const overflow = await detectOverflow(
|
|
415
|
-
const currentIndex = (_middlewareData$autoP =
|
|
415
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
416
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
416
417
|
const currentPlacement = placements[currentIndex];
|
|
417
418
|
if (currentPlacement == null) {
|
|
418
419
|
return {};
|
|
@@ -422,24 +423,22 @@ const autoPlacement = function (options) {
|
|
|
422
423
|
cross
|
|
423
424
|
} = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
424
425
|
|
|
425
|
-
// Make `computeCoords` start from the right place
|
|
426
|
+
// Make `computeCoords` start from the right place.
|
|
426
427
|
if (placement !== currentPlacement) {
|
|
427
428
|
return {
|
|
428
|
-
x,
|
|
429
|
-
y,
|
|
430
429
|
reset: {
|
|
431
430
|
placement: placements[0]
|
|
432
431
|
}
|
|
433
432
|
};
|
|
434
433
|
}
|
|
435
434
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
|
|
436
|
-
const allOverflows = [...((
|
|
435
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
437
436
|
placement: currentPlacement,
|
|
438
437
|
overflows: currentOverflows
|
|
439
438
|
}];
|
|
440
439
|
const nextPlacement = placements[currentIndex + 1];
|
|
441
440
|
|
|
442
|
-
// There are more placements to check
|
|
441
|
+
// There are more placements to check.
|
|
443
442
|
if (nextPlacement) {
|
|
444
443
|
return {
|
|
445
444
|
data: {
|
|
@@ -451,14 +450,19 @@ const autoPlacement = function (options) {
|
|
|
451
450
|
}
|
|
452
451
|
};
|
|
453
452
|
}
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
453
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
454
|
+
const alignment = getAlignment(d.placement);
|
|
455
|
+
return [d.placement, alignment && crossAxis ?
|
|
456
|
+
// Check along the mainAxis and main crossAxis side.
|
|
457
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
458
|
+
// Check only the mainAxis.
|
|
459
|
+
d.overflows[0], d.overflows];
|
|
460
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
461
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
462
|
+
// Aligned placements should not check their opposite crossAxis
|
|
463
|
+
// side.
|
|
464
|
+
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
465
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
462
466
|
if (resetPlacement !== placement) {
|
|
463
467
|
return {
|
|
464
468
|
data: {
|
|
@@ -480,9 +484,39 @@ function getExpandedPlacements(placement) {
|
|
|
480
484
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
481
485
|
}
|
|
482
486
|
|
|
487
|
+
function getSideList(side, isStart, rtl) {
|
|
488
|
+
const lr = ['left', 'right'];
|
|
489
|
+
const rl = ['right', 'left'];
|
|
490
|
+
const tb = ['top', 'bottom'];
|
|
491
|
+
const bt = ['bottom', 'top'];
|
|
492
|
+
switch (side) {
|
|
493
|
+
case 'top':
|
|
494
|
+
case 'bottom':
|
|
495
|
+
if (rtl) return isStart ? rl : lr;
|
|
496
|
+
return isStart ? lr : rl;
|
|
497
|
+
case 'left':
|
|
498
|
+
case 'right':
|
|
499
|
+
return isStart ? tb : bt;
|
|
500
|
+
default:
|
|
501
|
+
return [];
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
505
|
+
const alignment = getAlignment(placement);
|
|
506
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
507
|
+
if (alignment) {
|
|
508
|
+
list = list.map(side => side + "-" + alignment);
|
|
509
|
+
if (flipAlignment) {
|
|
510
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return list;
|
|
514
|
+
}
|
|
515
|
+
|
|
483
516
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
517
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
518
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
519
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
486
520
|
* @see https://floating-ui.com/docs/flip
|
|
487
521
|
*/
|
|
488
522
|
const flip = function (options) {
|
|
@@ -492,7 +526,7 @@ const flip = function (options) {
|
|
|
492
526
|
return {
|
|
493
527
|
name: 'flip',
|
|
494
528
|
options,
|
|
495
|
-
async fn(
|
|
529
|
+
async fn(state) {
|
|
496
530
|
var _middlewareData$flip;
|
|
497
531
|
const {
|
|
498
532
|
placement,
|
|
@@ -501,20 +535,25 @@ const flip = function (options) {
|
|
|
501
535
|
initialPlacement,
|
|
502
536
|
platform,
|
|
503
537
|
elements
|
|
504
|
-
} =
|
|
538
|
+
} = state;
|
|
505
539
|
const {
|
|
506
540
|
mainAxis: checkMainAxis = true,
|
|
507
541
|
crossAxis: checkCrossAxis = true,
|
|
508
542
|
fallbackPlacements: specifiedFallbackPlacements,
|
|
509
543
|
fallbackStrategy = 'bestFit',
|
|
544
|
+
fallbackAxisSideDirection = 'none',
|
|
510
545
|
flipAlignment = true,
|
|
511
546
|
...detectOverflowOptions
|
|
512
547
|
} = options;
|
|
513
548
|
const side = getSide(placement);
|
|
514
|
-
const isBasePlacement =
|
|
549
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
550
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
515
551
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
552
|
+
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
|
|
553
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
554
|
+
}
|
|
516
555
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
517
|
-
const overflow = await detectOverflow(
|
|
556
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
518
557
|
const overflows = [];
|
|
519
558
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
520
559
|
if (checkMainAxis) {
|
|
@@ -524,7 +563,7 @@ const flip = function (options) {
|
|
|
524
563
|
const {
|
|
525
564
|
main,
|
|
526
565
|
cross
|
|
527
|
-
} = getAlignmentSides(placement, rects,
|
|
566
|
+
} = getAlignmentSides(placement, rects, rtl);
|
|
528
567
|
overflows.push(overflow[main], overflow[cross]);
|
|
529
568
|
}
|
|
530
569
|
overflowsData = [...overflowsData, {
|
|
@@ -532,13 +571,13 @@ const flip = function (options) {
|
|
|
532
571
|
overflows
|
|
533
572
|
}];
|
|
534
573
|
|
|
535
|
-
// One or more sides is overflowing
|
|
574
|
+
// One or more sides is overflowing.
|
|
536
575
|
if (!overflows.every(side => side <= 0)) {
|
|
537
|
-
var _middlewareData$
|
|
538
|
-
const nextIndex = ((
|
|
576
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
577
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
539
578
|
const nextPlacement = placements[nextIndex];
|
|
540
579
|
if (nextPlacement) {
|
|
541
|
-
// Try next placement and re-run the lifecycle
|
|
580
|
+
// Try next placement and re-run the lifecycle.
|
|
542
581
|
return {
|
|
543
582
|
data: {
|
|
544
583
|
index: nextIndex,
|
|
@@ -549,20 +588,27 @@ const flip = function (options) {
|
|
|
549
588
|
}
|
|
550
589
|
};
|
|
551
590
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
591
|
+
|
|
592
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
593
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
594
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
595
|
+
|
|
596
|
+
// Otherwise fallback.
|
|
597
|
+
if (!resetPlacement) {
|
|
598
|
+
switch (fallbackStrategy) {
|
|
599
|
+
case 'bestFit':
|
|
600
|
+
{
|
|
601
|
+
var _overflowsData$map$so;
|
|
602
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
603
|
+
if (placement) {
|
|
604
|
+
resetPlacement = placement;
|
|
605
|
+
}
|
|
606
|
+
break;
|
|
560
607
|
}
|
|
608
|
+
case 'initialPlacement':
|
|
609
|
+
resetPlacement = initialPlacement;
|
|
561
610
|
break;
|
|
562
|
-
|
|
563
|
-
case 'initialPlacement':
|
|
564
|
-
resetPlacement = initialPlacement;
|
|
565
|
-
break;
|
|
611
|
+
}
|
|
566
612
|
}
|
|
567
613
|
if (placement !== resetPlacement) {
|
|
568
614
|
return {
|
|
@@ -600,18 +646,18 @@ const hide = function (options) {
|
|
|
600
646
|
return {
|
|
601
647
|
name: 'hide',
|
|
602
648
|
options,
|
|
603
|
-
async fn(
|
|
649
|
+
async fn(state) {
|
|
604
650
|
const {
|
|
605
651
|
strategy = 'referenceHidden',
|
|
606
652
|
...detectOverflowOptions
|
|
607
653
|
} = options;
|
|
608
654
|
const {
|
|
609
655
|
rects
|
|
610
|
-
} =
|
|
656
|
+
} = state;
|
|
611
657
|
switch (strategy) {
|
|
612
658
|
case 'referenceHidden':
|
|
613
659
|
{
|
|
614
|
-
const overflow = await detectOverflow(
|
|
660
|
+
const overflow = await detectOverflow(state, {
|
|
615
661
|
...detectOverflowOptions,
|
|
616
662
|
elementContext: 'reference'
|
|
617
663
|
});
|
|
@@ -625,7 +671,7 @@ const hide = function (options) {
|
|
|
625
671
|
}
|
|
626
672
|
case 'escaped':
|
|
627
673
|
{
|
|
628
|
-
const overflow = await detectOverflow(
|
|
674
|
+
const overflow = await detectOverflow(state, {
|
|
629
675
|
...detectOverflowOptions,
|
|
630
676
|
altBoundary: true
|
|
631
677
|
});
|
|
@@ -646,19 +692,19 @@ const hide = function (options) {
|
|
|
646
692
|
};
|
|
647
693
|
};
|
|
648
694
|
|
|
649
|
-
async function convertValueToCoords(
|
|
695
|
+
async function convertValueToCoords(state, value) {
|
|
650
696
|
const {
|
|
651
697
|
placement,
|
|
652
698
|
platform,
|
|
653
699
|
elements
|
|
654
|
-
} =
|
|
700
|
+
} = state;
|
|
655
701
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
656
702
|
const side = getSide(placement);
|
|
657
703
|
const alignment = getAlignment(placement);
|
|
658
704
|
const isVertical = getMainAxisFromPlacement(placement) === 'x';
|
|
659
705
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
660
706
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
661
|
-
const rawValue = typeof value === 'function' ? value(
|
|
707
|
+
const rawValue = typeof value === 'function' ? value(state) : value;
|
|
662
708
|
|
|
663
709
|
// eslint-disable-next-line prefer-const
|
|
664
710
|
let {
|
|
@@ -688,7 +734,10 @@ async function convertValueToCoords(middlewareArguments, value) {
|
|
|
688
734
|
}
|
|
689
735
|
|
|
690
736
|
/**
|
|
691
|
-
*
|
|
737
|
+
* Modifies the placement by translating the floating element along the
|
|
738
|
+
* specified axes.
|
|
739
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
740
|
+
* object may be passed.
|
|
692
741
|
* @see https://floating-ui.com/docs/offset
|
|
693
742
|
*/
|
|
694
743
|
const offset = function (value) {
|
|
@@ -698,12 +747,12 @@ const offset = function (value) {
|
|
|
698
747
|
return {
|
|
699
748
|
name: 'offset',
|
|
700
749
|
options: value,
|
|
701
|
-
async fn(
|
|
750
|
+
async fn(state) {
|
|
702
751
|
const {
|
|
703
752
|
x,
|
|
704
753
|
y
|
|
705
|
-
} =
|
|
706
|
-
const diffCoords = await convertValueToCoords(
|
|
754
|
+
} = state;
|
|
755
|
+
const diffCoords = await convertValueToCoords(state, value);
|
|
707
756
|
return {
|
|
708
757
|
x: x + diffCoords.x,
|
|
709
758
|
y: y + diffCoords.y,
|
|
@@ -718,8 +767,8 @@ function getCrossAxis(axis) {
|
|
|
718
767
|
}
|
|
719
768
|
|
|
720
769
|
/**
|
|
721
|
-
*
|
|
722
|
-
*
|
|
770
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
771
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
723
772
|
* @see https://floating-ui.com/docs/shift
|
|
724
773
|
*/
|
|
725
774
|
const shift = function (options) {
|
|
@@ -729,12 +778,12 @@ const shift = function (options) {
|
|
|
729
778
|
return {
|
|
730
779
|
name: 'shift',
|
|
731
780
|
options,
|
|
732
|
-
async fn(
|
|
781
|
+
async fn(state) {
|
|
733
782
|
const {
|
|
734
783
|
x,
|
|
735
784
|
y,
|
|
736
785
|
placement
|
|
737
|
-
} =
|
|
786
|
+
} = state;
|
|
738
787
|
const {
|
|
739
788
|
mainAxis: checkMainAxis = true,
|
|
740
789
|
crossAxis: checkCrossAxis = false,
|
|
@@ -756,7 +805,7 @@ const shift = function (options) {
|
|
|
756
805
|
x,
|
|
757
806
|
y
|
|
758
807
|
};
|
|
759
|
-
const overflow = await detectOverflow(
|
|
808
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
760
809
|
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
761
810
|
const crossAxis = getCrossAxis(mainAxis);
|
|
762
811
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -776,7 +825,7 @@ const shift = function (options) {
|
|
|
776
825
|
crossAxisCoord = within(min, crossAxisCoord, max);
|
|
777
826
|
}
|
|
778
827
|
const limitedCoords = limiter.fn({
|
|
779
|
-
...
|
|
828
|
+
...state,
|
|
780
829
|
[mainAxis]: mainAxisCoord,
|
|
781
830
|
[crossAxis]: crossAxisCoord
|
|
782
831
|
});
|
|
@@ -800,6 +849,28 @@ function getComputedStyle$1(element) {
|
|
|
800
849
|
return getWindow(element).getComputedStyle(element);
|
|
801
850
|
}
|
|
802
851
|
|
|
852
|
+
const min = Math.min;
|
|
853
|
+
const max = Math.max;
|
|
854
|
+
const round = Math.round;
|
|
855
|
+
|
|
856
|
+
function getCssDimensions(element) {
|
|
857
|
+
const css = getComputedStyle$1(element);
|
|
858
|
+
let width = parseFloat(css.width);
|
|
859
|
+
let height = parseFloat(css.height);
|
|
860
|
+
const offsetWidth = element.offsetWidth;
|
|
861
|
+
const offsetHeight = element.offsetHeight;
|
|
862
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
863
|
+
if (shouldFallback) {
|
|
864
|
+
width = offsetWidth;
|
|
865
|
+
height = offsetHeight;
|
|
866
|
+
}
|
|
867
|
+
return {
|
|
868
|
+
width,
|
|
869
|
+
height,
|
|
870
|
+
fallback: shouldFallback
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
|
|
803
874
|
function getNodeName(node) {
|
|
804
875
|
return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
|
|
805
876
|
}
|
|
@@ -827,7 +898,7 @@ function isNode(value) {
|
|
|
827
898
|
return value instanceof getWindow(value).Node;
|
|
828
899
|
}
|
|
829
900
|
function isShadowRoot(node) {
|
|
830
|
-
// Browsers without `ShadowRoot` support
|
|
901
|
+
// Browsers without `ShadowRoot` support.
|
|
831
902
|
if (typeof ShadowRoot === 'undefined') {
|
|
832
903
|
return false;
|
|
833
904
|
}
|
|
@@ -847,7 +918,7 @@ function isTableElement(element) {
|
|
|
847
918
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
848
919
|
}
|
|
849
920
|
function isContainingBlock(element) {
|
|
850
|
-
// TODO: Try
|
|
921
|
+
// TODO: Try to use feature detection here instead.
|
|
851
922
|
const isFirefox = /firefox/i.test(getUAString());
|
|
852
923
|
const css = getComputedStyle$1(element);
|
|
853
924
|
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
@@ -855,49 +926,33 @@ function isContainingBlock(element) {
|
|
|
855
926
|
// This is non-exhaustive but covers the most common CSS properties that
|
|
856
927
|
// create a containing block.
|
|
857
928
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
858
|
-
return css.transform !== 'none' || css.perspective !== 'none' || (backdropFilter ? backdropFilter !== 'none' : false) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some(
|
|
859
|
-
|
|
860
|
-
value => {
|
|
929
|
+
return css.transform !== 'none' || css.perspective !== 'none' || (backdropFilter ? backdropFilter !== 'none' : false) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => {
|
|
930
|
+
// Add type check for old browsers.
|
|
861
931
|
const contain = css.contain;
|
|
862
932
|
return contain != null ? contain.includes(value) : false;
|
|
863
933
|
});
|
|
864
934
|
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Determines whether or not `.getBoundingClientRect()` is affected by visual
|
|
938
|
+
* viewport offsets. In Safari, the `x`/`y` offsets are values relative to the
|
|
939
|
+
* visual viewport, while in other engines, they are values relative to the
|
|
940
|
+
* layout viewport.
|
|
941
|
+
*/
|
|
942
|
+
function isClientRectVisualViewportBased() {
|
|
943
|
+
// TODO: Try to use feature detection here instead. Feature detection for
|
|
944
|
+
// this can fail in various ways, making the userAgent check the most
|
|
945
|
+
// reliable:
|
|
869
946
|
// • Always-visible scrollbar or not
|
|
870
|
-
// • Width of <html
|
|
871
|
-
// const vV = win.visualViewport;
|
|
872
|
-
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
|
873
|
-
}
|
|
947
|
+
// • Width of <html>
|
|
874
948
|
|
|
949
|
+
// Is Safari.
|
|
950
|
+
return /^((?!chrome|android).)*safari/i.test(getUAString());
|
|
951
|
+
}
|
|
875
952
|
function isLastTraversableNode(node) {
|
|
876
953
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
877
954
|
}
|
|
878
955
|
|
|
879
|
-
const min = Math.min;
|
|
880
|
-
const max = Math.max;
|
|
881
|
-
const round = Math.round;
|
|
882
|
-
|
|
883
|
-
function getCssDimensions(element) {
|
|
884
|
-
const css = getComputedStyle$1(element);
|
|
885
|
-
let width = parseFloat(css.width);
|
|
886
|
-
let height = parseFloat(css.height);
|
|
887
|
-
const offsetWidth = element.offsetWidth;
|
|
888
|
-
const offsetHeight = element.offsetHeight;
|
|
889
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
890
|
-
if (shouldFallback) {
|
|
891
|
-
width = offsetWidth;
|
|
892
|
-
height = offsetHeight;
|
|
893
|
-
}
|
|
894
|
-
return {
|
|
895
|
-
width,
|
|
896
|
-
height,
|
|
897
|
-
fallback: shouldFallback
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
|
|
901
956
|
function unwrapElement(element) {
|
|
902
957
|
return !isElement(element) ? element.contextElement : element;
|
|
903
958
|
}
|
|
@@ -955,7 +1010,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
955
1010
|
}
|
|
956
1011
|
}
|
|
957
1012
|
const win = domElement ? getWindow(domElement) : window;
|
|
958
|
-
const addVisualOffsets =
|
|
1013
|
+
const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy;
|
|
959
1014
|
let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale.x;
|
|
960
1015
|
let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale.y;
|
|
961
1016
|
let width = clientRect.width / scale.x;
|
|
@@ -1008,96 +1063,6 @@ function getNodeScroll(element) {
|
|
|
1008
1063
|
};
|
|
1009
1064
|
}
|
|
1010
1065
|
|
|
1011
|
-
function getWindowScrollBarX(element) {
|
|
1012
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1013
|
-
// incorrect for RTL.
|
|
1014
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1018
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1019
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1020
|
-
const rect = getBoundingClientRect(element, true, strategy === 'fixed', offsetParent);
|
|
1021
|
-
let scroll = {
|
|
1022
|
-
scrollLeft: 0,
|
|
1023
|
-
scrollTop: 0
|
|
1024
|
-
};
|
|
1025
|
-
const offsets = {
|
|
1026
|
-
x: 0,
|
|
1027
|
-
y: 0
|
|
1028
|
-
};
|
|
1029
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1030
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1031
|
-
scroll = getNodeScroll(offsetParent);
|
|
1032
|
-
}
|
|
1033
|
-
if (isHTMLElement(offsetParent)) {
|
|
1034
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
1035
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1036
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1037
|
-
} else if (documentElement) {
|
|
1038
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return {
|
|
1042
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
1043
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
1044
|
-
width: rect.width,
|
|
1045
|
-
height: rect.height
|
|
1046
|
-
};
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
function getParentNode(node) {
|
|
1050
|
-
if (getNodeName(node) === 'html') {
|
|
1051
|
-
return node;
|
|
1052
|
-
}
|
|
1053
|
-
const result =
|
|
1054
|
-
// Step into the shadow DOM of the parent of a slotted node
|
|
1055
|
-
node.assignedSlot ||
|
|
1056
|
-
// DOM Element detected
|
|
1057
|
-
node.parentNode || (
|
|
1058
|
-
// ShadowRoot detected
|
|
1059
|
-
isShadowRoot(node) ? node.host : null) ||
|
|
1060
|
-
// Fallback
|
|
1061
|
-
getDocumentElement(node);
|
|
1062
|
-
return isShadowRoot(result) ? result.host : result;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
function getTrueOffsetParent(element) {
|
|
1066
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1067
|
-
return null;
|
|
1068
|
-
}
|
|
1069
|
-
return element.offsetParent;
|
|
1070
|
-
}
|
|
1071
|
-
function getContainingBlock(element) {
|
|
1072
|
-
let currentNode = getParentNode(element);
|
|
1073
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1074
|
-
if (isContainingBlock(currentNode)) {
|
|
1075
|
-
return currentNode;
|
|
1076
|
-
} else {
|
|
1077
|
-
currentNode = getParentNode(currentNode);
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
return null;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1084
|
-
// such as table ancestors and cross browser bugs.
|
|
1085
|
-
function getOffsetParent(element) {
|
|
1086
|
-
const window = getWindow(element);
|
|
1087
|
-
let offsetParent = getTrueOffsetParent(element);
|
|
1088
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
|
1089
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
|
1090
|
-
}
|
|
1091
|
-
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1092
|
-
return window;
|
|
1093
|
-
}
|
|
1094
|
-
return offsetParent || getContainingBlock(element) || window;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
function getDimensions(element) {
|
|
1098
|
-
return getCssDimensions(element);
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
1066
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1102
1067
|
let {
|
|
1103
1068
|
rect,
|
|
@@ -1131,12 +1096,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1131
1096
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1132
1097
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1133
1098
|
}
|
|
1134
|
-
// This doesn't appear to need to be negated.
|
|
1135
|
-
// else if (documentElement) {
|
|
1136
|
-
// offsets.x = getWindowScrollBarX(documentElement);
|
|
1137
|
-
// }
|
|
1138
1099
|
}
|
|
1139
|
-
|
|
1140
1100
|
return {
|
|
1141
1101
|
width: rect.width * scale.x,
|
|
1142
1102
|
height: rect.height * scale.y,
|
|
@@ -1145,44 +1105,24 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1145
1105
|
};
|
|
1146
1106
|
}
|
|
1147
1107
|
|
|
1148
|
-
function
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
let width = html.clientWidth;
|
|
1153
|
-
let height = html.clientHeight;
|
|
1154
|
-
let x = 0;
|
|
1155
|
-
let y = 0;
|
|
1156
|
-
if (visualViewport) {
|
|
1157
|
-
width = visualViewport.width;
|
|
1158
|
-
height = visualViewport.height;
|
|
1159
|
-
const layoutViewport = isLayoutViewport();
|
|
1160
|
-
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
1161
|
-
x = visualViewport.offsetLeft;
|
|
1162
|
-
y = visualViewport.offsetTop;
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
return {
|
|
1166
|
-
width,
|
|
1167
|
-
height,
|
|
1168
|
-
x,
|
|
1169
|
-
y
|
|
1170
|
-
};
|
|
1108
|
+
function getWindowScrollBarX(element) {
|
|
1109
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1110
|
+
// incorrect for RTL.
|
|
1111
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
1171
1112
|
}
|
|
1172
1113
|
|
|
1173
1114
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
1174
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
|
1115
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1175
1116
|
function getDocumentRect(element) {
|
|
1176
|
-
var _element$ownerDocumen;
|
|
1177
1117
|
const html = getDocumentElement(element);
|
|
1178
1118
|
const scroll = getNodeScroll(element);
|
|
1179
|
-
const body =
|
|
1180
|
-
const width = max(html.scrollWidth, html.clientWidth, body
|
|
1181
|
-
const height = max(html.scrollHeight, html.clientHeight, body
|
|
1119
|
+
const body = element.ownerDocument.body;
|
|
1120
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1121
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1182
1122
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1183
1123
|
const y = -scroll.scrollTop;
|
|
1184
|
-
if (getComputedStyle$1(body
|
|
1185
|
-
x += max(html.clientWidth, body
|
|
1124
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1125
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1186
1126
|
}
|
|
1187
1127
|
return {
|
|
1188
1128
|
width,
|
|
@@ -1192,11 +1132,28 @@ function getDocumentRect(element) {
|
|
|
1192
1132
|
};
|
|
1193
1133
|
}
|
|
1194
1134
|
|
|
1135
|
+
function getParentNode(node) {
|
|
1136
|
+
if (getNodeName(node) === 'html') {
|
|
1137
|
+
return node;
|
|
1138
|
+
}
|
|
1139
|
+
const result =
|
|
1140
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1141
|
+
node.assignedSlot ||
|
|
1142
|
+
// DOM Element detected.
|
|
1143
|
+
node.parentNode ||
|
|
1144
|
+
// ShadowRoot detected.
|
|
1145
|
+
isShadowRoot(node) && node.host ||
|
|
1146
|
+
// Fallback.
|
|
1147
|
+
getDocumentElement(node);
|
|
1148
|
+
return isShadowRoot(result) ? result.host : result;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1195
1151
|
function getNearestOverflowAncestor(node) {
|
|
1196
1152
|
const parentNode = getParentNode(node);
|
|
1197
1153
|
if (isLastTraversableNode(parentNode)) {
|
|
1198
|
-
//
|
|
1199
|
-
|
|
1154
|
+
// `getParentNode` will never return a `Document` due to the fallback
|
|
1155
|
+
// check, so it's either the <html> or <body> element.
|
|
1156
|
+
return parentNode.ownerDocument.body;
|
|
1200
1157
|
}
|
|
1201
1158
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1202
1159
|
return parentNode;
|
|
@@ -1218,7 +1175,32 @@ function getOverflowAncestors(node, list) {
|
|
|
1218
1175
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
1219
1176
|
}
|
|
1220
1177
|
|
|
1221
|
-
|
|
1178
|
+
function getViewportRect(element, strategy) {
|
|
1179
|
+
const win = getWindow(element);
|
|
1180
|
+
const html = getDocumentElement(element);
|
|
1181
|
+
const visualViewport = win.visualViewport;
|
|
1182
|
+
let width = html.clientWidth;
|
|
1183
|
+
let height = html.clientHeight;
|
|
1184
|
+
let x = 0;
|
|
1185
|
+
let y = 0;
|
|
1186
|
+
if (visualViewport) {
|
|
1187
|
+
width = visualViewport.width;
|
|
1188
|
+
height = visualViewport.height;
|
|
1189
|
+
const visualViewportBased = isClientRectVisualViewportBased();
|
|
1190
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1191
|
+
x = visualViewport.offsetLeft;
|
|
1192
|
+
y = visualViewport.offsetTop;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
return {
|
|
1196
|
+
width,
|
|
1197
|
+
height,
|
|
1198
|
+
x,
|
|
1199
|
+
y
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1222
1204
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1223
1205
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1224
1206
|
const top = clientRect.top + element.clientTop;
|
|
@@ -1232,24 +1214,33 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
1232
1214
|
const x = left * scale.x;
|
|
1233
1215
|
const y = top * scale.y;
|
|
1234
1216
|
return {
|
|
1235
|
-
top: y,
|
|
1236
|
-
left: x,
|
|
1237
|
-
right: x + width,
|
|
1238
|
-
bottom: y + height,
|
|
1239
|
-
x,
|
|
1240
|
-
y,
|
|
1241
1217
|
width,
|
|
1242
|
-
height
|
|
1218
|
+
height,
|
|
1219
|
+
x,
|
|
1220
|
+
y
|
|
1243
1221
|
};
|
|
1244
1222
|
}
|
|
1245
1223
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1224
|
+
let rect;
|
|
1246
1225
|
if (clippingAncestor === 'viewport') {
|
|
1247
|
-
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
|
|
1226
|
+
rect = getViewportRect(element, strategy);
|
|
1227
|
+
} else if (clippingAncestor === 'document') {
|
|
1228
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
1229
|
+
} else if (isElement(clippingAncestor)) {
|
|
1230
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1231
|
+
} else {
|
|
1232
|
+
const mutableRect = {
|
|
1233
|
+
...clippingAncestor
|
|
1234
|
+
};
|
|
1235
|
+
if (isClientRectVisualViewportBased()) {
|
|
1236
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
1237
|
+
const win = getWindow(element);
|
|
1238
|
+
mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0;
|
|
1239
|
+
mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0;
|
|
1240
|
+
}
|
|
1241
|
+
rect = mutableRect;
|
|
1251
1242
|
}
|
|
1252
|
-
return rectToClientRect(
|
|
1243
|
+
return rectToClientRect(rect);
|
|
1253
1244
|
}
|
|
1254
1245
|
|
|
1255
1246
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
@@ -1269,13 +1260,18 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1269
1260
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1270
1261
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
1271
1262
|
const containingBlock = isContainingBlock(currentNode);
|
|
1272
|
-
const
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1263
|
+
const shouldIgnoreCurrentNode = computedStyle.position === 'fixed';
|
|
1264
|
+
if (shouldIgnoreCurrentNode) {
|
|
1265
|
+
currentContainingBlockComputedStyle = null;
|
|
1276
1266
|
} else {
|
|
1277
|
-
|
|
1278
|
-
|
|
1267
|
+
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
|
|
1268
|
+
if (shouldDropCurrentNode) {
|
|
1269
|
+
// Drop non-containing blocks.
|
|
1270
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1271
|
+
} else {
|
|
1272
|
+
// Record last containing block for next iteration.
|
|
1273
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
1274
|
+
}
|
|
1279
1275
|
}
|
|
1280
1276
|
currentNode = getParentNode(currentNode);
|
|
1281
1277
|
}
|
|
@@ -1284,7 +1280,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1284
1280
|
}
|
|
1285
1281
|
|
|
1286
1282
|
// Gets the maximum area that the element is visible in due to any number of
|
|
1287
|
-
// clipping ancestors
|
|
1283
|
+
// clipping ancestors.
|
|
1288
1284
|
function getClippingRect(_ref) {
|
|
1289
1285
|
let {
|
|
1290
1286
|
element,
|
|
@@ -1311,6 +1307,80 @@ function getClippingRect(_ref) {
|
|
|
1311
1307
|
};
|
|
1312
1308
|
}
|
|
1313
1309
|
|
|
1310
|
+
function getDimensions(element) {
|
|
1311
|
+
if (isHTMLElement(element)) {
|
|
1312
|
+
return getCssDimensions(element);
|
|
1313
|
+
}
|
|
1314
|
+
return element.getBoundingClientRect();
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
1318
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1319
|
+
return null;
|
|
1320
|
+
}
|
|
1321
|
+
if (polyfill) {
|
|
1322
|
+
return polyfill(element);
|
|
1323
|
+
}
|
|
1324
|
+
return element.offsetParent;
|
|
1325
|
+
}
|
|
1326
|
+
function getContainingBlock(element) {
|
|
1327
|
+
let currentNode = getParentNode(element);
|
|
1328
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1329
|
+
if (isContainingBlock(currentNode)) {
|
|
1330
|
+
return currentNode;
|
|
1331
|
+
} else {
|
|
1332
|
+
currentNode = getParentNode(currentNode);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
return null;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1339
|
+
// such as table ancestors and cross browser bugs.
|
|
1340
|
+
function getOffsetParent(element, polyfill) {
|
|
1341
|
+
const window = getWindow(element);
|
|
1342
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1343
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
|
1344
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1345
|
+
}
|
|
1346
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1347
|
+
return window;
|
|
1348
|
+
}
|
|
1349
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1353
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1354
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1355
|
+
const rect = getBoundingClientRect(element, true, strategy === 'fixed', offsetParent);
|
|
1356
|
+
let scroll = {
|
|
1357
|
+
scrollLeft: 0,
|
|
1358
|
+
scrollTop: 0
|
|
1359
|
+
};
|
|
1360
|
+
const offsets = {
|
|
1361
|
+
x: 0,
|
|
1362
|
+
y: 0
|
|
1363
|
+
};
|
|
1364
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1365
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1366
|
+
scroll = getNodeScroll(offsetParent);
|
|
1367
|
+
}
|
|
1368
|
+
if (isHTMLElement(offsetParent)) {
|
|
1369
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
1370
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1371
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1372
|
+
} else if (documentElement) {
|
|
1373
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
return {
|
|
1377
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
1378
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
1379
|
+
width: rect.width,
|
|
1380
|
+
height: rect.height
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1314
1384
|
const platform = {
|
|
1315
1385
|
getClippingRect,
|
|
1316
1386
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
@@ -1342,6 +1412,10 @@ const platform = {
|
|
|
1342
1412
|
|
|
1343
1413
|
/**
|
|
1344
1414
|
* Automatically updates the position of the floating element when necessary.
|
|
1415
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
1416
|
+
* visible on the screen.
|
|
1417
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
1418
|
+
* removed from the DOM or hidden from the screen.
|
|
1345
1419
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
1346
1420
|
*/
|
|
1347
1421
|
function autoUpdate(reference, floating, update, options) {
|
|
@@ -1448,21 +1522,32 @@ const config = {
|
|
|
1448
1522
|
|
|
1449
1523
|
const floatingUIBrowserCheck = patchFloatingUiForNonChromiumBrowsers();
|
|
1450
1524
|
async function patchFloatingUiForNonChromiumBrowsers() {
|
|
1525
|
+
function getUAData() {
|
|
1526
|
+
return navigator.userAgentData;
|
|
1527
|
+
}
|
|
1451
1528
|
function getUAString() {
|
|
1452
|
-
const uaData =
|
|
1529
|
+
const uaData = getUAData();
|
|
1530
|
+
return uaData?.brands
|
|
1531
|
+
? uaData.brands.map(({ brand, version }) => `${brand}/${version}`).join(" ")
|
|
1532
|
+
: navigator.userAgent;
|
|
1533
|
+
}
|
|
1534
|
+
function isChrome109OrAbove() {
|
|
1535
|
+
const uaData = getUAData();
|
|
1453
1536
|
if (uaData?.brands) {
|
|
1454
|
-
return uaData.brands.
|
|
1537
|
+
return !!uaData.brands.find(({ brand, version }) => (brand === "Google Chrome" || brand === "Chromium") && Number(version) >= 109);
|
|
1455
1538
|
}
|
|
1456
|
-
return navigator.userAgent
|
|
1539
|
+
return !!navigator.userAgent.split(" ").find((ua) => {
|
|
1540
|
+
const [browser, version] = ua.split("/");
|
|
1541
|
+
return browser === "Chrome" && parseInt(version) >= 109;
|
|
1542
|
+
});
|
|
1457
1543
|
}
|
|
1458
1544
|
if (Build.isBrowser &&
|
|
1459
1545
|
config.floatingUINonChromiumPositioningFix &&
|
|
1460
1546
|
// ⚠️ browser-sniffing is not a best practice and should be avoided ⚠️
|
|
1461
|
-
/firefox|safari/i.test(getUAString())) {
|
|
1462
|
-
const {
|
|
1463
|
-
|
|
1464
|
-
platform.getOffsetParent =
|
|
1465
|
-
platform.getElementRects = getElementRects;
|
|
1547
|
+
(/firefox|safari/i.test(getUAString()) || isChrome109OrAbove())) {
|
|
1548
|
+
const { offsetParent } = await import('./utils4.js');
|
|
1549
|
+
const originalGetOffsetParent = platform.getOffsetParent;
|
|
1550
|
+
platform.getOffsetParent = (element) => originalGetOffsetParent(element, offsetParent);
|
|
1466
1551
|
}
|
|
1467
1552
|
}
|
|
1468
1553
|
/**
|
|
@@ -1731,4 +1816,4 @@ function getFloatingElFromTransitionTarget(floatingTransitionEl) {
|
|
|
1731
1816
|
return closestElementCrossShadowBoundary(floatingTransitionEl, `[${placementDataAttribute}]`);
|
|
1732
1817
|
}
|
|
1733
1818
|
|
|
1734
|
-
export { FloatingCSS as F, disconnectFloatingUI as a, defaultOffsetDistance as b, connectFloatingUI as c, defaultMenuPlacement as d,
|
|
1819
|
+
export { FloatingCSS as F, disconnectFloatingUI as a, defaultOffsetDistance as b, connectFloatingUI as c, defaultMenuPlacement as d, filterComputedPlacements as f, reposition as r, updateAfterClose as u };
|