@esri/calcite-components 1.0.0-beta.86 → 1.0.0-beta.89
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/calcite.css +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/calcite.js +1 -1
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/{p-645da33b.entry.js → p-025d7d38.entry.js} +2 -2
- package/dist/calcite/p-02ea3541.entry.js +6 -0
- package/dist/calcite/{p-64abac3a.system.js → p-056f3ea3.system.js} +1 -1
- package/dist/calcite/p-06bfa7f4.js +6 -0
- package/dist/calcite/{p-ae579245.js → p-06fc9fd6.js} +2 -2
- package/dist/calcite/p-07ac44fd.system.entry.js +6 -0
- package/dist/calcite/{p-8e962e28.system.js → p-0b38cf5e.system.js} +1 -1
- package/dist/calcite/{p-b4afbab0.js → p-1003dcd4.js} +1 -1
- package/dist/calcite/p-106d714c.entry.js +6 -0
- package/dist/calcite/p-119c7d93.js +6 -0
- package/dist/calcite/p-1483d257.system.entry.js +6 -0
- package/dist/calcite/{p-8d7bcbbe.system.js → p-19974612.system.js} +1 -1
- package/dist/calcite/p-1d27e1b2.system.entry.js +6 -0
- package/dist/calcite/{p-f1b829e3.system.entry.js → p-1d528e3a.system.entry.js} +2 -2
- package/dist/calcite/{p-aa40e505.entry.js → p-1dd3c731.entry.js} +2 -2
- package/dist/calcite/p-1fca19bd.entry.js +6 -0
- package/dist/calcite/p-21263865.system.entry.js +6 -0
- package/dist/calcite/p-2172c393.entry.js +6 -0
- package/dist/calcite/p-224b93e9.entry.js +6 -0
- package/dist/calcite/p-251b6d61.js +6 -0
- package/dist/calcite/p-25287fea.entry.js +6 -0
- package/dist/calcite/p-25b0526d.entry.js +6 -0
- package/dist/calcite/p-2806e475.system.entry.js +6 -0
- package/dist/calcite/p-2a7f48fa.entry.js +6 -0
- package/dist/calcite/{p-bc9c9c9b.js → p-2ac8bf37.js} +2 -2
- package/dist/calcite/p-2c07319a.system.entry.js +6 -0
- package/dist/calcite/{p-336d62ab.js → p-2cb5dffe.js} +1 -1
- package/dist/calcite/p-2d1a1a9b.entry.js +6 -0
- package/dist/calcite/{p-694231fe.system.js → p-2d439f5c.system.js} +1 -1
- package/dist/calcite/p-2d63dd1d.system.entry.js +6 -0
- package/dist/calcite/p-2f430a5b.system.entry.js +6 -0
- package/dist/calcite/{p-4c3e960e.js → p-313ff745.js} +2 -2
- package/dist/calcite/{p-786ca76b.system.js → p-317e13b4.system.js} +1 -1
- package/dist/calcite/p-325d5fc2.system.entry.js +6 -0
- package/dist/calcite/p-3278a041.entry.js +6 -0
- package/dist/calcite/p-34dc627d.system.entry.js +6 -0
- package/dist/calcite/p-355c3b49.entry.js +6 -0
- package/dist/calcite/{p-bbbf6fcb.system.entry.js → p-36d43f5d.system.entry.js} +2 -2
- package/dist/calcite/{p-12bca4f1.system.js → p-376901f2.system.js} +1 -1
- package/dist/calcite/p-395d5d81.system.entry.js +6 -0
- package/dist/calcite/p-3a02a16e.system.entry.js +6 -0
- package/dist/calcite/p-3afd8219.js +6 -0
- package/dist/calcite/{p-4c62aae1.system.js → p-3f0fb908.system.js} +2 -2
- package/dist/calcite/p-40ef7538.system.entry.js +6 -0
- package/dist/calcite/p-44a164a5.system.entry.js +6 -0
- package/dist/calcite/p-44c827f6.entry.js +6 -0
- package/dist/calcite/p-44fa20c3.system.entry.js +6 -0
- package/dist/calcite/p-46fcc80b.system.js +6 -0
- package/dist/calcite/{p-4a1a8fac.entry.js → p-4dbd7d99.entry.js} +2 -2
- package/dist/calcite/p-4dfe59ba.entry.js +6 -0
- package/dist/calcite/{p-f8798ee9.system.js → p-4e7eccae.system.js} +2 -2
- package/dist/calcite/p-4ed94b0c.entry.js +6 -0
- package/dist/calcite/p-4f77ab07.system.entry.js +6 -0
- package/dist/calcite/{p-97fef747.system.entry.js → p-51b5c16b.system.entry.js} +2 -2
- package/dist/calcite/p-52a9c9ac.system.entry.js +6 -0
- package/dist/calcite/{p-7624aeb6.system.entry.js → p-5548019b.system.entry.js} +2 -2
- package/dist/calcite/p-5986be6a.system.entry.js +6 -0
- package/dist/calcite/p-5d19ba12.system.entry.js +6 -0
- package/dist/calcite/p-5e00d81b.entry.js +6 -0
- package/dist/calcite/p-5e67de08.system.entry.js +6 -0
- package/dist/calcite/{p-29c3c079.system.js → p-5f640381.system.js} +1 -1
- package/dist/calcite/{p-da045e5a.system.js → p-5fc1eb80.system.js} +2 -2
- package/dist/calcite/{p-85fab359.entry.js → p-61ac6255.entry.js} +2 -2
- package/dist/calcite/{p-cfbd1180.entry.js → p-65714f09.entry.js} +2 -2
- package/dist/calcite/{p-4178c522.system.entry.js → p-66031b70.system.entry.js} +2 -2
- package/dist/calcite/{p-8f789b45.js → p-662dc451.js} +1 -1
- package/dist/calcite/{p-4f206065.system.js → p-66f20a2d.system.js} +2 -2
- package/dist/calcite/p-68c2e792.system.entry.js +6 -0
- package/dist/calcite/p-696189d3.entry.js +6 -0
- package/dist/calcite/p-698aa1c5.system.entry.js +6 -0
- package/dist/calcite/p-6bc01f5f.system.entry.js +6 -0
- package/dist/calcite/{p-29c6691b.js → p-6c22ae2a.js} +1 -1
- package/dist/calcite/p-6f870d52.entry.js +6 -0
- package/dist/calcite/p-6ff70b1f.system.entry.js +6 -0
- package/dist/calcite/{p-e6ad54a7.js → p-71484298.js} +1 -1
- package/dist/calcite/p-738f23ab.system.entry.js +6 -0
- package/dist/calcite/p-75052b74.entry.js +6 -0
- package/dist/calcite/p-758a0313.entry.js +6 -0
- package/dist/calcite/{p-7f519a6f.js → p-76369b99.js} +2 -2
- package/dist/calcite/p-76dcc963.entry.js +6 -0
- package/dist/calcite/{p-8a1593db.system.js → p-794ef1c9.system.js} +1 -1
- package/dist/calcite/p-7a6d2cfd.js +6 -0
- package/dist/calcite/p-7a6e0092.entry.js +6 -0
- package/dist/calcite/p-7dbc88f0.system.entry.js +6 -0
- package/dist/calcite/p-7f536f37.system.entry.js +6 -0
- package/dist/calcite/p-7f5a9744.system.js +6 -0
- package/dist/calcite/p-7f7a2070.entry.js +6 -0
- package/dist/calcite/{p-6c4c7404.system.entry.js → p-81c838da.system.entry.js} +2 -2
- package/dist/calcite/{p-078aa8cf.system.js → p-83b7daee.system.js} +1 -1
- package/dist/calcite/p-85b04b39.system.entry.js +6 -0
- package/dist/calcite/{p-1f289404.entry.js → p-85c94bde.entry.js} +2 -2
- package/dist/calcite/p-85cfc2a7.system.js +6 -0
- package/dist/calcite/{p-741a874b.js → p-868413c4.js} +1 -1
- package/dist/calcite/{p-2ce0209d.system.js → p-8785912e.system.js} +1 -1
- package/dist/calcite/p-8871b3b2.system.entry.js +6 -0
- package/dist/calcite/p-89dcad49.entry.js +6 -0
- package/dist/calcite/p-8bfecbf1.system.entry.js +6 -0
- package/dist/calcite/p-8dfb2a49.system.entry.js +6 -0
- package/dist/calcite/{p-f00b1294.entry.js → p-8e262d98.entry.js} +2 -2
- package/dist/calcite/p-90124757.system.entry.js +6 -0
- package/dist/calcite/{p-2c78140e.js → p-902f9dfe.js} +1 -1
- package/dist/calcite/p-90413eb8.entry.js +6 -0
- package/dist/calcite/p-9279086f.entry.js +6 -0
- package/dist/calcite/{p-f70b3399.js → p-92d33ef8.js} +1 -1
- package/dist/calcite/p-93581d65.entry.js +6 -0
- package/dist/calcite/p-93e2c809.entry.js +6 -0
- package/dist/calcite/{p-660b54aa.system.js → p-94556892.system.js} +2 -2
- package/dist/calcite/{p-2efde396.js → p-948ed6bd.js} +2 -2
- package/dist/calcite/{p-17bb1d46.system.js → p-957ac2e6.system.js} +1 -1
- package/dist/calcite/p-995b06cf.entry.js +6 -0
- package/dist/calcite/p-9c682b55.system.entry.js +6 -0
- package/dist/calcite/p-9cff8f59.entry.js +6 -0
- package/dist/calcite/{p-9d82f6ba.system.js → p-9d398103.system.js} +2 -2
- package/dist/calcite/p-a15628f9.system.entry.js +6 -0
- package/dist/calcite/{p-e2a9bc3c.js → p-a1847f2c.js} +1 -1
- package/dist/calcite/{p-36183756.system.entry.js → p-a24254c4.system.entry.js} +2 -2
- package/dist/calcite/{p-bdbeb0b8.system.js → p-a5ff2716.system.js} +3 -3
- package/dist/calcite/{p-72ac5927.entry.js → p-a944dd17.entry.js} +2 -2
- package/dist/calcite/p-a9ec85ad.system.entry.js +6 -0
- package/dist/calcite/p-ab4d5eba.system.entry.js +6 -0
- package/dist/calcite/p-ac1d3121.entry.js +6 -0
- package/dist/calcite/p-acca3644.system.entry.js +6 -0
- package/dist/calcite/p-ad73fc52.system.entry.js +6 -0
- package/dist/calcite/p-ad85b30b.system.entry.js +6 -0
- package/dist/calcite/p-adb90152.system.entry.js +6 -0
- package/dist/calcite/{p-ba04d4a6.system.js → p-b1593fd6.system.js} +1 -1
- package/dist/calcite/p-b2d2e857.entry.js +6 -0
- package/dist/calcite/p-b4d58ff4.entry.js +6 -0
- package/dist/calcite/{p-9c3e33db.system.entry.js → p-b55e89ba.system.entry.js} +2 -2
- package/dist/calcite/p-b8ba96b7.system.entry.js +6 -0
- package/dist/calcite/p-b95e4b20.entry.js +6 -0
- package/dist/calcite/{p-9191aae7.system.js → p-ba1168ae.system.js} +1 -1
- package/dist/calcite/{p-52474c34.entry.js → p-ba4637e7.entry.js} +2 -2
- package/dist/calcite/p-bab1f14e.entry.js +6 -0
- package/dist/calcite/p-bd2be3f5.entry.js +6 -0
- package/dist/calcite/p-bd2e7fe8.system.entry.js +6 -0
- package/dist/calcite/{p-d313af3b.entry.js → p-be08dcbd.entry.js} +2 -2
- package/dist/calcite/{p-6e59222f.entry.js → p-c027aef8.entry.js} +2 -2
- package/dist/calcite/p-c190d30c.entry.js +6 -0
- package/dist/calcite/p-c92c4d1b.entry.js +6 -0
- package/dist/calcite/p-caa785ff.entry.js +6 -0
- package/dist/calcite/p-cbe1acb3.system.entry.js +6 -0
- package/dist/calcite/{p-a5318c00.entry.js → p-ce3424f9.entry.js} +2 -2
- package/dist/calcite/p-cf730667.entry.js +6 -0
- package/dist/calcite/{p-8e5b28c2.js → p-d0819cad.js} +1 -1
- package/dist/calcite/p-d1c1035b.system.entry.js +6 -0
- package/dist/calcite/p-d4542664.system.entry.js +6 -0
- package/dist/calcite/p-d59fd4ca.entry.js +6 -0
- package/dist/calcite/p-da136364.system.js +6 -0
- package/dist/calcite/p-dd30f3b3.system.entry.js +6 -0
- package/dist/calcite/p-dfe2dca8.system.entry.js +6 -0
- package/dist/calcite/{p-d713b734.system.js → p-e2759901.system.js} +1 -1
- package/dist/calcite/{p-33e02930.entry.js → p-e5211d71.entry.js} +2 -2
- package/dist/calcite/{p-94e059ed.system.js → p-e5403660.system.js} +2 -2
- package/dist/calcite/{p-038a1a34.js → p-e6c4aa14.js} +1 -1
- package/dist/calcite/{p-a2b65dca.entry.js → p-e6f222af.entry.js} +2 -2
- package/dist/calcite/{p-99306484.entry.js → p-e8128e9a.entry.js} +2 -2
- package/dist/calcite/p-e86b7099.entry.js +6 -0
- package/dist/calcite/{p-f54622d6.js → p-edf40370.js} +1 -1
- package/dist/calcite/{p-7bdab3f4.js → p-ee94abb7.js} +1 -1
- package/dist/calcite/p-efc7d73b.entry.js +6 -0
- package/dist/calcite/p-f29b59a6.entry.js +6 -0
- package/dist/calcite/{p-2f717afb.js → p-f33e8b92.js} +2 -2
- package/dist/calcite/{p-2f906310.system.entry.js → p-f5111eb8.system.entry.js} +2 -2
- package/dist/calcite/p-f6525305.system.entry.js +6 -0
- package/dist/calcite/p-ff119586.system.entry.js +6 -0
- package/dist/cjs/{ExpandToggle-62479ccb.js → ExpandToggle-20d1925e.js} +21 -10
- package/dist/cjs/{Heading-f792c5a6.js → Heading-855fbab6.js} +2 -2
- package/dist/cjs/{array-b72d7dd3.js → array-8cba1b68.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +83 -44
- package/dist/cjs/calcite-action-bar.cjs.entry.js +29 -21
- package/dist/cjs/calcite-action-group.cjs.entry.js +11 -11
- package/dist/cjs/calcite-action-menu.cjs.entry.js +15 -32
- package/dist/cjs/calcite-action-pad.cjs.entry.js +12 -12
- package/dist/cjs/calcite-action.cjs.entry.js +7 -7
- package/dist/cjs/calcite-alert.cjs.entry.js +31 -38
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +15 -11
- package/dist/cjs/calcite-button.cjs.entry.js +9 -9
- package/dist/cjs/calcite-card.cjs.entry.js +10 -10
- package/dist/cjs/calcite-checkbox.cjs.entry.js +8 -8
- package/dist/cjs/calcite-chip.cjs.entry.js +7 -7
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +57 -82
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +65 -67
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +109 -142
- package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
- package/dist/cjs/calcite-filter.cjs.entry.js +8 -8
- package/dist/cjs/calcite-flow.cjs.entry.js +4 -4
- package/dist/cjs/calcite-graph_2.cjs.entry.js +11 -11
- package/dist/cjs/calcite-handle.cjs.entry.js +5 -5
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +24 -24
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +100 -95
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +14 -20
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +18 -20
- package/dist/cjs/calcite-input.cjs.entry.js +14 -20
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +6 -6
- package/dist/cjs/calcite-list_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-loader.cjs.entry.js +9 -5
- package/dist/cjs/calcite-modal.cjs.entry.js +44 -16
- package/dist/cjs/calcite-notice.cjs.entry.js +29 -10
- package/dist/cjs/calcite-option_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-pagination.cjs.entry.js +6 -6
- package/dist/cjs/calcite-panel.cjs.entry.js +44 -23
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +14 -14
- package/dist/cjs/calcite-popover_2.cjs.entry.js +66 -80
- 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 +10 -10
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-rating.cjs.entry.js +9 -9
- package/dist/cjs/calcite-scrim.cjs.entry.js +3 -3
- package/dist/cjs/calcite-shell_3.cjs.entry.js +13 -11
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +6 -6
- package/dist/cjs/calcite-split-button.cjs.entry.js +7 -7
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +57 -91
- package/dist/cjs/calcite-switch.cjs.entry.js +11 -13
- package/dist/cjs/calcite-tab_4.cjs.entry.js +61 -61
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +6 -6
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +31 -64
- package/dist/cjs/calcite-tree_2.cjs.entry.js +28 -28
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite.cjs.js +3 -3
- package/dist/cjs/{conditionalSlot-d1eb82ce.js → conditionalSlot-d7d41e5e.js} +3 -3
- package/dist/cjs/{debounce-d2139fc6.js → debounce-c6535474.js} +1 -1
- package/dist/cjs/{dom-99c1b44d.js → dom-63f7a393.js} +2 -2
- package/dist/cjs/floating-ui-1e2c4828.js +1620 -0
- package/dist/cjs/{forIn-9ac96598.js → forIn-31c5151b.js} +2 -2
- package/dist/cjs/{form-4d1ef8c2.js → form-2fb0263d.js} +3 -3
- package/dist/cjs/{guid-609f1c0d.js → guid-bfda150b.js} +1 -1
- package/dist/cjs/{index-68ddfe8e.js → index-aa58cebb.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-d1ef280c.js → interactive-c148950b.js} +1 -1
- package/dist/cjs/{interfaces-a3bdc804.js → interfaces-78d94377.js} +1 -1
- package/dist/cjs/{key-017aa5b0.js → key-790c3a9c.js} +1 -1
- package/dist/cjs/{label-e24023c6.js → label-b3ded17f.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{locale-2d8feb15.js → locale-20b4a0d8.js} +2 -2
- package/dist/cjs/{math-7fe3e64d.js → math-9fec6f1e.js} +1 -1
- package/dist/cjs/{observers-aa7367df.js → observers-b52c783e.js} +1 -1
- package/dist/cjs/{resources-0c0019fb.js → resources-03c28605.js} +5 -5
- package/dist/cjs/{resources-b4ed54b9.js → resources-14e7a312.js} +1 -1
- package/dist/cjs/{resources-9aaa6e0a.js → resources-76621c8a.js} +3 -3
- package/dist/cjs/{resources-a7f0af25.js → resources-c0beb775.js} +1 -1
- package/dist/cjs/{sortable.esm-6dc17794.js → sortable.esm-87003d53.js} +1 -1
- package/dist/cjs/{utils-53d98078.js → utils-32566c58.js} +1 -1
- package/dist/collection/components/accordion/accordion.css +3 -3
- package/dist/collection/components/accordion/accordion.js +25 -20
- package/dist/collection/components/accordion/interfaces.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.css +69 -66
- package/dist/collection/components/accordion-item/accordion-item.js +92 -48
- package/dist/collection/components/accordion-item/interfaces.js +6 -0
- package/dist/collection/components/accordion-item/resources.js +21 -0
- package/dist/collection/components/action/action.css +24 -22
- package/dist/collection/components/action/action.js +3 -3
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.css +35 -9
- package/dist/collection/components/action-bar/action-bar.js +48 -14
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +16 -6
- package/dist/collection/components/action-group/action-group.css +2 -2
- package/dist/collection/components/action-group/action-group.js +5 -5
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.css +3 -3
- package/dist/collection/components/action-menu/action-menu.js +25 -37
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.css +16 -13
- package/dist/collection/components/action-pad/action-pad.js +5 -5
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.css +41 -49
- package/dist/collection/components/alert/alert.js +52 -70
- package/dist/collection/components/alert/interfaces.js +1 -1
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.css +11 -11
- 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 +15 -18
- package/dist/collection/components/block/block.js +12 -5
- package/dist/collection/components/block/resources.js +1 -1
- package/dist/collection/components/block-section/block-section.css +11 -17
- package/dist/collection/components/block-section/block-section.js +3 -3
- package/dist/collection/components/block-section/interfaces.js +1 -1
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.css +37 -37
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/button/interfaces.js +1 -1
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/card.css +22 -23
- package/dist/collection/components/card/card.js +6 -6
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +12 -14
- package/dist/collection/components/checkbox/checkbox.js +7 -7
- package/dist/collection/components/chip/chip.css +23 -21
- package/dist/collection/components/chip/chip.js +9 -4
- package/dist/collection/components/chip/interfaces.js +1 -1
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.css +32 -29
- package/dist/collection/components/color-picker/color-picker.js +5 -5
- package/dist/collection/components/color-picker/interfaces.js +1 -1
- 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 +5 -7
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +3 -3
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.css +12 -15
- 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 +44 -46
- package/dist/collection/components/combobox/combobox.js +76 -110
- package/dist/collection/components/combobox/interfaces.js +1 -1
- 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 +17 -14
- package/dist/collection/components/combobox-item/combobox-item.js +9 -4
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.css +9 -9
- 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 +5 -5
- package/dist/collection/components/date-picker/date-picker.js +14 -14
- package/dist/collection/components/date-picker/interfaces.js +1 -1
- 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 +23 -28
- package/dist/collection/components/date-picker-day/date-picker-day.js +8 -10
- package/dist/collection/components/date-picker-month/date-picker-month.css +14 -24
- package/dist/collection/components/date-picker-month/date-picker-month.js +41 -29
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.css +23 -33
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +20 -20
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.css +19 -18
- package/dist/collection/components/dropdown/dropdown.js +128 -174
- package/dist/collection/components/dropdown/interfaces.js +1 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.css +4 -4
- package/dist/collection/components/dropdown-group/dropdown-group.js +10 -5
- package/dist/collection/components/dropdown-group/interfaces.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +7 -13
- package/dist/collection/components/dropdown-item/dropdown-item.js +18 -13
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.css +7 -6
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.css +16 -18
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.css +4 -4
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/interfaces.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.css +4 -4
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/interfaces.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.css +3 -2
- package/dist/collection/components/handle/handle.js +9 -4
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.css +13 -13
- 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 +1 -1
- package/dist/collection/components/inline-editable/inline-editable.css +12 -11
- package/dist/collection/components/inline-editable/inline-editable.js +19 -19
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.css +74 -96
- package/dist/collection/components/input/input.js +15 -16
- package/dist/collection/components/input/interfaces.js +1 -1
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.css +70 -73
- package/dist/collection/components/input-date-picker/input-date-picker.js +162 -110
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.css +7 -7
- 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 +47 -55
- package/dist/collection/components/input-number/input-number.js +15 -16
- package/dist/collection/components/input-number/interfaces.js +1 -1
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.css +9 -11
- package/dist/collection/components/input-time-picker/input-time-picker.js +12 -20
- package/dist/collection/components/interfaces.js +1 -1
- package/dist/collection/components/label/label.css +15 -15
- 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 +14 -13
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.css +8 -7
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.css +12 -15
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.css +2 -2
- 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 +27 -31
- package/dist/collection/components/loader/loader.js +10 -3
- package/dist/collection/components/modal/interfaces.js +1 -1
- package/dist/collection/components/modal/modal.css +77 -70
- package/dist/collection/components/modal/modal.js +78 -19
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.css +26 -34
- package/dist/collection/components/notice/notice.js +52 -8
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.css +1 -1
- package/dist/collection/components/option/option.js +3 -3
- package/dist/collection/components/option-group/option-group.css +1 -1
- package/dist/collection/components/option-group/option-group.js +3 -3
- package/dist/collection/components/pagination/pagination.css +10 -14
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.css +39 -45
- package/dist/collection/components/panel/panel.js +51 -26
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.css +13 -12
- 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 +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.css +5 -7
- 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 +15 -17
- package/dist/collection/components/pick-list-item/pick-list-item.js +2 -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 +29 -34
- package/dist/collection/components/popover/popover.js +104 -88
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/popover-manager/popover-manager.css +1 -1
- package/dist/collection/components/popover-manager/popover-manager.js +1 -1
- package/dist/collection/components/progress/progress.css +9 -11
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.css +15 -17
- package/dist/collection/components/radio-button/radio-button.js +10 -10
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.css +2 -2
- package/dist/collection/components/radio-button-group/radio-button-group.js +3 -3
- package/dist/collection/components/radio-group/interfaces.js +1 -1
- package/dist/collection/components/radio-group/radio-group.css +15 -17
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/radio-group-item/radio-group-item.css +7 -13
- package/dist/collection/components/radio-group-item/radio-group-item.js +3 -3
- package/dist/collection/components/radio-group-item/resources.js +1 -1
- package/dist/collection/components/rating/rating.css +18 -20
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/rating/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.css +5 -11
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/select/resources.js +1 -1
- package/dist/collection/components/select/select.css +22 -28
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shell/resources.js +3 -1
- package/dist/collection/components/shell/shell.css +21 -24
- package/dist/collection/components/shell/shell.js +7 -3
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.css +11 -13
- 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 +17 -20
- package/dist/collection/components/shell-panel/shell-panel.js +3 -3
- package/dist/collection/components/slider/slider.css +43 -44
- package/dist/collection/components/slider/slider.js +7 -7
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.css +6 -5
- package/dist/collection/components/sortable-list/sortable-list.js +3 -3
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.css +17 -18
- package/dist/collection/components/split-button/split-button.js +21 -11
- package/dist/collection/components/stepper/interfaces.js +1 -1
- package/dist/collection/components/stepper/stepper.css +6 -9
- package/dist/collection/components/stepper/stepper.js +26 -84
- package/dist/collection/components/stepper-item/stepper-item.css +103 -35
- package/dist/collection/components/stepper-item/stepper-item.js +51 -31
- package/dist/collection/components/switch/switch.css +28 -30
- package/dist/collection/components/switch/switch.js +12 -9
- package/dist/collection/components/tab/interfaces.js +1 -1
- package/dist/collection/components/tab/tab.css +10 -13
- package/dist/collection/components/tab/tab.js +4 -4
- package/dist/collection/components/tab-nav/tab-nav.css +24 -25
- package/dist/collection/components/tab-nav/tab-nav.js +29 -29
- package/dist/collection/components/tab-title/tab-title.css +41 -50
- package/dist/collection/components/tab-title/tab-title.js +8 -8
- package/dist/collection/components/tabs/interfaces.js +1 -1
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.css +21 -21
- package/dist/collection/components/tabs/tabs.js +20 -20
- package/dist/collection/components/tile/resources.js +1 -1
- package/dist/collection/components/tile/tile.css +12 -11
- package/dist/collection/components/tile/tile.js +1 -1
- package/dist/collection/components/tile-select/interfaces.js +1 -1
- package/dist/collection/components/tile-select/resources.js +1 -1
- package/dist/collection/components/tile-select/tile-select.css +14 -13
- package/dist/collection/components/tile-select/tile-select.js +3 -3
- package/dist/collection/components/tile-select-group/interfaces.js +1 -1
- package/dist/collection/components/tile-select-group/tile-select-group.css +10 -9
- 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 +11 -17
- package/dist/collection/components/time-picker/time-picker.js +1 -1
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.css +12 -15
- package/dist/collection/components/tip/tip.js +3 -3
- package/dist/collection/components/tip-group/tip-group.css +2 -3
- 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 +11 -16
- package/dist/collection/components/tip-manager/tip-manager.js +7 -7
- package/dist/collection/components/tooltip/TooltipManager.js +1 -1
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +25 -30
- package/dist/collection/components/tooltip/tooltip.js +35 -66
- package/dist/collection/components/tooltip-manager/tooltip-manager.css +1 -1
- package/dist/collection/components/tooltip-manager/tooltip-manager.js +1 -1
- package/dist/collection/components/tree/interfaces.js +1 -1
- package/dist/collection/components/tree/tree.css +1 -1
- package/dist/collection/components/tree/tree.js +12 -12
- package/dist/collection/components/tree-item/interfaces.js +1 -1
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.css +12 -11
- package/dist/collection/components/tree-item/tree-item.js +10 -10
- package/dist/collection/components/value-list/interfaces.js +1 -1
- 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 +12 -11
- package/dist/collection/components/value-list/value-list.js +1 -1
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.css +12 -13
- package/dist/collection/components/value-list-item/value-list-item.js +1 -1
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.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.js +229 -0
- package/dist/collection/utils/form.js +1 -1
- package/dist/collection/utils/globalAttributes.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/locale.js +1 -1
- package/dist/collection/utils/math.js +1 -1
- package/dist/collection/utils/number.js +1 -1
- 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/time.js +2 -2
- package/dist/components/ExpandToggle.js +18 -8
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +5 -5
- package/dist/components/action-menu.js +9 -26
- package/dist/components/action.js +2 -2
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/calcite-accordion-item.js +63 -26
- package/dist/components/calcite-accordion.js +18 -18
- package/dist/components/calcite-action-bar.js +23 -14
- 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 -5
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +28 -35
- package/dist/components/calcite-avatar.js +2 -2
- package/dist/components/calcite-block-section.js +3 -3
- package/dist/components/calcite-block.js +8 -4
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +6 -6
- 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 +3 -3
- package/dist/components/calcite-combobox-item-group.js +2 -2
- package/dist/components/calcite-combobox-item.js +3 -3
- package/dist/components/calcite-combobox.js +44 -69
- 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 +3 -3
- package/dist/components/calcite-dropdown-item.js +9 -9
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +2 -2
- package/dist/components/calcite-filter.js +1 -1
- 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 +19 -19
- package/dist/components/calcite-input-date-picker.js +90 -84
- package/dist/components/calcite-input-message.js +2 -2
- package/dist/components/calcite-input-number.js +5 -11
- package/dist/components/calcite-input-time-picker.js +9 -11
- 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 +3 -3
- package/dist/components/calcite-list.js +2 -2
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +41 -13
- package/dist/components/calcite-notice.js +25 -5
- package/dist/components/calcite-option-group.js +2 -2
- package/dist/components/calcite-option.js +2 -2
- package/dist/components/calcite-pagination.js +2 -2
- package/dist/components/calcite-panel.js +39 -18
- package/dist/components/calcite-pick-list-group.js +3 -3
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +2 -2
- package/dist/components/calcite-popover-manager.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 +4 -4
- package/dist/components/calcite-radio-group-item.js +2 -2
- package/dist/components/calcite-radio-group.js +3 -3
- package/dist/components/calcite-rating.js +2 -2
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-select.js +2 -2
- package/dist/components/calcite-shell-center-row.js +3 -3
- package/dist/components/calcite-shell-panel.js +3 -3
- package/dist/components/calcite-shell.js +6 -4
- package/dist/components/calcite-slider.js +2 -2
- package/dist/components/calcite-sortable-list.js +2 -2
- package/dist/components/calcite-split-button.js +5 -5
- package/dist/components/calcite-stepper-item.js +31 -28
- package/dist/components/calcite-stepper.js +26 -62
- 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 -5
- package/dist/components/calcite-tip.js +3 -3
- package/dist/components/calcite-tooltip-manager.js +2 -2
- package/dist/components/calcite-tooltip.js +26 -59
- package/dist/components/calcite-tree-item.js +12 -12
- package/dist/components/calcite-tree.js +13 -13
- package/dist/components/calcite-value-list-item.js +3 -3
- package/dist/components/calcite-value-list.js +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/chip.js +3 -3
- package/dist/components/color-picker-hex-input.js +2 -2
- package/dist/components/color-picker-swatch.js +2 -2
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +6 -8
- package/dist/components/date-picker-month-header.js +21 -21
- package/dist/components/date-picker-month.js +19 -19
- package/dist/components/date-picker.js +15 -15
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +2 -2
- package/dist/components/dropdown.js +93 -125
- package/dist/components/filter.js +2 -2
- package/dist/components/floating-ui.js +1612 -0
- package/dist/components/forIn.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/graph.js +2 -2
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +2 -2
- package/dist/components/icon.js +3 -3
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +5 -11
- package/dist/components/interactive.js +1 -1
- package/dist/components/interfaces.js +1 -1
- package/dist/components/interfaces2.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +2 -2
- package/dist/components/link.js +3 -3
- package/dist/components/loader.js +7 -3
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/pick-list-item.js +3 -3
- package/dist/components/popover.js +57 -71
- 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 +2 -2
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +5 -7
- package/dist/components/tab-nav.js +31 -31
- package/dist/components/tab-title.js +6 -6
- package/dist/components/tab.js +3 -3
- package/dist/components/tabs.js +21 -21
- package/dist/components/tile.js +3 -3
- package/dist/components/time-picker.js +3 -3
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/custom-elements/index.js +2314 -2613
- package/dist/esm/{ExpandToggle-7076d600.js → ExpandToggle-131c7dcb.js} +21 -11
- package/dist/esm/{Heading-5ccb3b17.js → Heading-93ced199.js} +2 -2
- package/dist/esm/{array-48f23287.js → array-5d7e7abd.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +83 -44
- package/dist/esm/calcite-action-bar.entry.js +29 -21
- package/dist/esm/calcite-action-group.entry.js +11 -11
- package/dist/esm/calcite-action-menu.entry.js +15 -32
- package/dist/esm/calcite-action-pad.entry.js +12 -12
- package/dist/esm/calcite-action.entry.js +7 -7
- package/dist/esm/calcite-alert.entry.js +31 -38
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +15 -11
- package/dist/esm/calcite-button.entry.js +9 -9
- package/dist/esm/calcite-card.entry.js +10 -10
- package/dist/esm/calcite-checkbox.entry.js +8 -8
- package/dist/esm/calcite-chip.entry.js +7 -7
- package/dist/esm/calcite-color-picker_3.entry.js +11 -11
- package/dist/esm/calcite-combobox_3.entry.js +56 -81
- package/dist/esm/calcite-date-picker_4.entry.js +65 -67
- package/dist/esm/calcite-dropdown_3.entry.js +107 -140
- package/dist/esm/calcite-fab.entry.js +6 -6
- package/dist/esm/calcite-filter.entry.js +8 -8
- package/dist/esm/calcite-flow.entry.js +4 -4
- package/dist/esm/calcite-graph_2.entry.js +11 -11
- package/dist/esm/calcite-handle.entry.js +5 -5
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +24 -24
- package/dist/esm/calcite-input-date-picker.entry.js +98 -93
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +14 -20
- package/dist/esm/calcite-input-time-picker_2.entry.js +18 -20
- package/dist/esm/calcite-input.entry.js +14 -20
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +6 -6
- package/dist/esm/calcite-list_3.entry.js +11 -11
- package/dist/esm/calcite-loader.entry.js +9 -5
- package/dist/esm/calcite-modal.entry.js +44 -16
- package/dist/esm/calcite-notice.entry.js +29 -10
- package/dist/esm/calcite-option_3.entry.js +11 -11
- package/dist/esm/calcite-pagination.entry.js +6 -6
- package/dist/esm/calcite-panel.entry.js +44 -23
- package/dist/esm/calcite-pick-list_3.entry.js +14 -14
- package/dist/esm/calcite-popover_2.entry.js +64 -78
- 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 +10 -10
- package/dist/esm/calcite-radio-group_2.entry.js +9 -9
- package/dist/esm/calcite-rating.entry.js +9 -9
- package/dist/esm/calcite-scrim.entry.js +3 -3
- package/dist/esm/calcite-shell_3.entry.js +13 -11
- package/dist/esm/calcite-sortable-list.entry.js +6 -6
- package/dist/esm/calcite-split-button.entry.js +7 -7
- package/dist/esm/calcite-stepper_2.entry.js +57 -91
- package/dist/esm/calcite-switch.entry.js +11 -13
- package/dist/esm/calcite-tab_4.entry.js +61 -61
- package/dist/esm/calcite-tile-select_2.entry.js +6 -6
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +12 -12
- package/dist/esm/calcite-tooltip_2.entry.js +30 -63
- package/dist/esm/calcite-tree_2.entry.js +28 -28
- package/dist/esm/calcite-value-list_2.entry.js +13 -13
- package/dist/esm/calcite.js +3 -3
- package/dist/esm/{conditionalSlot-13c69fa9.js → conditionalSlot-b78ec702.js} +3 -3
- package/dist/esm/{debounce-bef6fc2c.js → debounce-7b337e34.js} +1 -1
- package/dist/esm/{dom-6c1f7204.js → dom-773d1009.js} +2 -2
- package/dist/esm/floating-ui-9b7dcf5f.js +1612 -0
- package/dist/esm/{forIn-566610cc.js → forIn-f0ad73ff.js} +2 -2
- package/dist/esm/{form-115e3241.js → form-2cfa20ec.js} +3 -3
- package/dist/esm/{guid-9ee41ac6.js → guid-41992570.js} +1 -1
- package/dist/esm/{index-dfcf10d7.js → index-e2035750.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-2a03c362.js → interactive-52c414ad.js} +1 -1
- package/dist/esm/{interfaces-02cee59d.js → interfaces-2163b1eb.js} +1 -1
- package/dist/esm/{key-1219c482.js → key-7208494a.js} +1 -1
- package/dist/esm/{label-b30a7cde.js → label-dd1d4ebf.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{locale-98144f51.js → locale-66830132.js} +2 -2
- package/dist/esm/{math-7409ae0d.js → math-d77047f4.js} +1 -1
- package/dist/esm/{observers-fa0db945.js → observers-ebdbf52f.js} +1 -1
- package/dist/esm/{resources-7198828a.js → resources-1b220b88.js} +1 -1
- package/dist/esm/{resources-3b67e62a.js → resources-4e2c9912.js} +1 -1
- package/dist/esm/{resources-ccd18bbb.js → resources-9afaaa17.js} +5 -5
- package/dist/esm/{resources-3157143b.js → resources-9e1ec649.js} +3 -3
- package/dist/esm/{sortable.esm-e7918a0d.js → sortable.esm-9a2fbede.js} +1 -1
- package/dist/esm/{utils-06a51b70.js → utils-011f57d8.js} +1 -1
- package/dist/esm-es5/ExpandToggle-131c7dcb.js +6 -0
- package/dist/esm-es5/Heading-93ced199.js +6 -0
- package/dist/esm-es5/{array-48f23287.js → array-5d7e7abd.js} +1 -1
- package/dist/esm-es5/calcite-accordion_2.entry.js +2 -2
- package/dist/esm-es5/calcite-action-bar.entry.js +3 -3
- package/dist/esm-es5/calcite-action-group.entry.js +2 -2
- package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
- package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
- package/dist/esm-es5/calcite-action.entry.js +2 -2
- package/dist/esm-es5/calcite-alert.entry.js +3 -3
- package/dist/esm-es5/calcite-avatar.entry.js +2 -2
- package/dist/esm-es5/calcite-block_2.entry.js +2 -2
- package/dist/esm-es5/calcite-button.entry.js +2 -2
- package/dist/esm-es5/calcite-card.entry.js +2 -2
- package/dist/esm-es5/calcite-checkbox.entry.js +2 -2
- package/dist/esm-es5/calcite-chip.entry.js +3 -3
- package/dist/esm-es5/calcite-color-picker_3.entry.js +2 -2
- package/dist/esm-es5/calcite-combobox_3.entry.js +2 -2
- package/dist/esm-es5/calcite-date-picker_4.entry.js +2 -2
- package/dist/esm-es5/calcite-dropdown_3.entry.js +3 -3
- package/dist/esm-es5/calcite-fab.entry.js +3 -3
- package/dist/esm-es5/calcite-filter.entry.js +2 -2
- package/dist/esm-es5/calcite-flow.entry.js +3 -3
- package/dist/esm-es5/calcite-graph_2.entry.js +3 -3
- package/dist/esm-es5/calcite-handle.entry.js +2 -2
- package/dist/esm-es5/calcite-icon.entry.js +2 -2
- package/dist/esm-es5/calcite-inline-editable.entry.js +2 -2
- package/dist/esm-es5/calcite-input-date-picker.entry.js +2 -2
- package/dist/esm-es5/calcite-input-message.entry.js +2 -2
- package/dist/esm-es5/calcite-input-number.entry.js +2 -2
- package/dist/esm-es5/calcite-input-time-picker_2.entry.js +2 -2
- package/dist/esm-es5/calcite-input.entry.js +2 -2
- package/dist/esm-es5/calcite-label.entry.js +2 -2
- package/dist/esm-es5/calcite-link.entry.js +2 -2
- package/dist/esm-es5/calcite-list_3.entry.js +2 -2
- package/dist/esm-es5/calcite-loader.entry.js +3 -3
- package/dist/esm-es5/calcite-modal.entry.js +3 -3
- package/dist/esm-es5/calcite-notice.entry.js +2 -2
- package/dist/esm-es5/calcite-option_3.entry.js +3 -3
- package/dist/esm-es5/calcite-pagination.entry.js +2 -2
- package/dist/esm-es5/calcite-panel.entry.js +2 -2
- package/dist/esm-es5/calcite-pick-list_3.entry.js +2 -2
- package/dist/esm-es5/calcite-popover_2.entry.js +3 -3
- package/dist/esm-es5/calcite-progress.entry.js +2 -2
- package/dist/esm-es5/calcite-radio-button-group.entry.js +2 -2
- package/dist/esm-es5/calcite-radio-button.entry.js +2 -2
- package/dist/esm-es5/calcite-radio-group_2.entry.js +3 -3
- package/dist/esm-es5/calcite-rating.entry.js +3 -3
- package/dist/esm-es5/calcite-scrim.entry.js +2 -2
- package/dist/esm-es5/calcite-shell_3.entry.js +2 -2
- package/dist/esm-es5/calcite-sortable-list.entry.js +2 -2
- package/dist/esm-es5/calcite-split-button.entry.js +2 -2
- package/dist/esm-es5/calcite-stepper_2.entry.js +2 -2
- package/dist/esm-es5/calcite-switch.entry.js +3 -3
- package/dist/esm-es5/calcite-tab_4.entry.js +2 -2
- package/dist/esm-es5/calcite-tile-select_2.entry.js +2 -2
- package/dist/esm-es5/calcite-tile.entry.js +2 -2
- package/dist/esm-es5/calcite-tip_3.entry.js +3 -3
- package/dist/esm-es5/calcite-tooltip_2.entry.js +3 -3
- package/dist/esm-es5/calcite-tree_2.entry.js +2 -2
- package/dist/esm-es5/calcite-value-list_2.entry.js +2 -2
- package/dist/esm-es5/calcite.js +2 -2
- package/dist/esm-es5/{conditionalSlot-13c69fa9.js → conditionalSlot-b78ec702.js} +2 -2
- package/dist/esm-es5/{debounce-bef6fc2c.js → debounce-7b337e34.js} +1 -1
- package/dist/esm-es5/{dom-6c1f7204.js → dom-773d1009.js} +2 -2
- package/dist/esm-es5/floating-ui-9b7dcf5f.js +6 -0
- package/dist/esm-es5/{forIn-566610cc.js → forIn-f0ad73ff.js} +2 -2
- package/dist/esm-es5/{form-115e3241.js → form-2cfa20ec.js} +2 -2
- package/dist/esm-es5/{guid-9ee41ac6.js → guid-41992570.js} +1 -1
- package/dist/esm-es5/{index-dfcf10d7.js → index-e2035750.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{interactive-2a03c362.js → interactive-52c414ad.js} +1 -1
- package/dist/esm-es5/{interfaces-02cee59d.js → interfaces-2163b1eb.js} +1 -1
- package/dist/esm-es5/{key-1219c482.js → key-7208494a.js} +1 -1
- package/dist/esm-es5/{label-b30a7cde.js → label-dd1d4ebf.js} +2 -2
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/{locale-98144f51.js → locale-66830132.js} +2 -2
- package/dist/esm-es5/{math-7409ae0d.js → math-d77047f4.js} +1 -1
- package/dist/esm-es5/{observers-fa0db945.js → observers-ebdbf52f.js} +1 -1
- package/dist/esm-es5/{resources-7198828a.js → resources-1b220b88.js} +1 -1
- package/dist/esm-es5/{resources-3b67e62a.js → resources-4e2c9912.js} +1 -1
- package/dist/esm-es5/{resources-ccd18bbb.js → resources-9afaaa17.js} +2 -2
- package/dist/esm-es5/{resources-3157143b.js → resources-9e1ec649.js} +2 -2
- package/dist/esm-es5/{sortable.esm-e7918a0d.js → sortable.esm-9a2fbede.js} +1 -1
- package/dist/esm-es5/{utils-06a51b70.js → utils-011f57d8.js} +1 -1
- package/dist/extras/docs-json.json +345 -178
- 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/accordion/accordion.d.ts +4 -4
- package/dist/types/components/accordion/interfaces.d.ts +3 -0
- package/dist/types/components/accordion-item/accordion-item.d.ts +13 -7
- package/dist/types/components/accordion-item/interfaces.d.ts +11 -0
- package/dist/types/components/accordion-item/resources.d.ts +16 -0
- package/dist/types/components/action/action.d.ts +1 -1
- package/dist/types/components/action-bar/action-bar.d.ts +10 -3
- package/dist/types/components/action-bar/utils.d.ts +9 -1
- package/dist/types/components/action-group/action-group.d.ts +2 -1
- package/dist/types/components/action-menu/action-menu.d.ts +8 -8
- package/dist/types/components/action-pad/action-pad.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts +20 -24
- package/dist/types/components/alert/interfaces.d.ts +3 -0
- package/dist/types/components/block/block.d.ts +6 -2
- package/dist/types/components/block-section/block-section.d.ts +1 -1
- package/dist/types/components/card/card.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +3 -3
- package/dist/types/components/chip/chip.d.ts +7 -3
- package/dist/types/components/color-picker/color-picker.d.ts +2 -2
- package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +1 -1
- package/dist/types/components/combobox/combobox.d.ts +25 -28
- package/dist/types/components/combobox-item/combobox-item.d.ts +4 -2
- package/dist/types/components/date-picker/date-picker.d.ts +5 -5
- package/dist/types/components/date-picker-day/date-picker-day.d.ts +3 -3
- package/dist/types/components/date-picker-month/date-picker-month.d.ts +7 -7
- package/dist/types/components/date-picker-month-header/date-picker-month-header.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +30 -33
- package/dist/types/components/dropdown-group/dropdown-group.d.ts +2 -2
- package/dist/types/components/dropdown-group/interfaces.d.ts +4 -0
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +4 -3
- package/dist/types/components/handle/handle.d.ts +4 -1
- package/dist/types/components/inline-editable/inline-editable.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +6 -4
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +37 -26
- package/dist/types/components/input-number/input-number.d.ts +6 -4
- package/dist/types/components/input-time-picker/input-time-picker.d.ts +4 -5
- package/dist/types/components/interfaces.d.ts +1 -0
- package/dist/types/components/loader/loader.d.ts +5 -1
- package/dist/types/components/modal/modal.d.ts +23 -7
- package/dist/types/components/notice/notice.d.ts +11 -3
- package/dist/types/components/panel/panel.d.ts +12 -9
- package/dist/types/components/popover/PopoverManager.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts +24 -15
- package/dist/types/components/radio-button/radio-button.d.ts +4 -4
- package/dist/types/components/radio-button-group/radio-button-group.d.ts +1 -1
- package/dist/types/components/radio-group-item/radio-group-item.d.ts +1 -1
- package/dist/types/components/shell/resources.d.ts +2 -0
- package/dist/types/components/shell/shell.d.ts +4 -2
- package/dist/types/components/shell-panel/shell-panel.d.ts +1 -1
- package/dist/types/components/slider/slider.d.ts +3 -3
- package/dist/types/components/sortable-list/sortable-list.d.ts +1 -1
- package/dist/types/components/split-button/split-button.d.ts +14 -6
- package/dist/types/components/stepper/interfaces.d.ts +0 -1
- package/dist/types/components/stepper/stepper.d.ts +4 -13
- package/dist/types/components/stepper-item/stepper-item.d.ts +2 -3
- package/dist/types/components/switch/switch.d.ts +5 -3
- package/dist/types/components/tab/tab.d.ts +1 -1
- package/dist/types/components/tab-nav/tab-nav.d.ts +7 -7
- package/dist/types/components/tab-title/tab-title.d.ts +3 -3
- package/dist/types/components/tabs/tabs.d.ts +8 -8
- package/dist/types/components/tile-select/tile-select.d.ts +1 -1
- package/dist/types/components/tip/tip.d.ts +1 -1
- package/dist/types/components/tip-manager/tip-manager.d.ts +3 -3
- package/dist/types/components/tooltip/TooltipManager.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +6 -9
- package/dist/types/components/tree/tree.d.ts +2 -2
- package/dist/types/components/tree-item/tree-item.d.ts +2 -2
- package/dist/types/components.d.ts +211 -120
- package/dist/types/preact.d.ts +15 -9
- package/dist/types/utils/floating-ui.d.ts +109 -0
- package/hydrate/index.js +2318 -2612
- package/package.json +30 -26
- package/readme.md +2 -2
- package/dist/calcite/p-03005912.system.entry.js +0 -6
- package/dist/calcite/p-05acf942.system.entry.js +0 -6
- package/dist/calcite/p-098bf101.entry.js +0 -6
- package/dist/calcite/p-0ac22887.js +0 -6
- package/dist/calcite/p-0d0ab1c5.system.entry.js +0 -6
- package/dist/calcite/p-15a9e209.system.entry.js +0 -6
- package/dist/calcite/p-17c8a622.system.entry.js +0 -6
- package/dist/calcite/p-1b79a3a3.entry.js +0 -6
- package/dist/calcite/p-1b939beb.system.entry.js +0 -6
- package/dist/calcite/p-1e7d3d02.system.entry.js +0 -6
- package/dist/calcite/p-1e9d27fe.system.entry.js +0 -6
- package/dist/calcite/p-1ef82cc5.system.entry.js +0 -6
- package/dist/calcite/p-1f0bf183.system.entry.js +0 -6
- package/dist/calcite/p-22217b06.entry.js +0 -6
- package/dist/calcite/p-247f1abc.entry.js +0 -6
- package/dist/calcite/p-27f31e04.js +0 -6
- package/dist/calcite/p-283ed748.entry.js +0 -6
- package/dist/calcite/p-29122323.system.entry.js +0 -6
- package/dist/calcite/p-2d556f94.system.entry.js +0 -6
- package/dist/calcite/p-2d7b7215.system.entry.js +0 -6
- package/dist/calcite/p-36ee6a02.entry.js +0 -6
- package/dist/calcite/p-37f621e1.entry.js +0 -6
- package/dist/calcite/p-386d256d.entry.js +0 -6
- package/dist/calcite/p-39201c6f.entry.js +0 -6
- package/dist/calcite/p-40825758.entry.js +0 -6
- package/dist/calcite/p-40ddce6a.system.entry.js +0 -6
- package/dist/calcite/p-451e4a81.entry.js +0 -6
- package/dist/calcite/p-498af5d7.system.entry.js +0 -6
- package/dist/calcite/p-55b9c3d8.system.entry.js +0 -6
- package/dist/calcite/p-58ba388d.entry.js +0 -6
- package/dist/calcite/p-62f31a5a.system.entry.js +0 -6
- package/dist/calcite/p-661fe743.system.js +0 -6
- package/dist/calcite/p-667c6be1.entry.js +0 -6
- package/dist/calcite/p-670df541.system.entry.js +0 -6
- package/dist/calcite/p-6abdcefa.system.entry.js +0 -6
- package/dist/calcite/p-6f3fad62.system.entry.js +0 -6
- package/dist/calcite/p-705dcfd0.system.entry.js +0 -6
- package/dist/calcite/p-7124aeac.entry.js +0 -6
- package/dist/calcite/p-718bec4c.entry.js +0 -6
- package/dist/calcite/p-71df706c.system.entry.js +0 -6
- package/dist/calcite/p-7285074f.entry.js +0 -6
- package/dist/calcite/p-72d06cc6.entry.js +0 -6
- package/dist/calcite/p-78f82837.system.entry.js +0 -6
- package/dist/calcite/p-81460471.entry.js +0 -6
- package/dist/calcite/p-822445af.entry.js +0 -6
- package/dist/calcite/p-82655fe7.entry.js +0 -6
- package/dist/calcite/p-82c99865.entry.js +0 -6
- package/dist/calcite/p-8381e935.system.entry.js +0 -6
- package/dist/calcite/p-869ceaf2.system.entry.js +0 -6
- package/dist/calcite/p-8701d6ec.js +0 -6
- package/dist/calcite/p-881346ec.system.entry.js +0 -6
- package/dist/calcite/p-8b8580be.system.entry.js +0 -6
- package/dist/calcite/p-8d90241c.system.entry.js +0 -6
- package/dist/calcite/p-8e8279db.system.entry.js +0 -6
- package/dist/calcite/p-8f8f1f3c.entry.js +0 -6
- package/dist/calcite/p-92c0a612.entry.js +0 -6
- package/dist/calcite/p-93fb8320.js +0 -6
- package/dist/calcite/p-97f24602.entry.js +0 -6
- package/dist/calcite/p-9e7c867f.entry.js +0 -6
- package/dist/calcite/p-a1dec328.system.entry.js +0 -6
- package/dist/calcite/p-a574d688.entry.js +0 -6
- package/dist/calcite/p-a6da6fa9.entry.js +0 -6
- package/dist/calcite/p-a6ec6d30.system.entry.js +0 -6
- package/dist/calcite/p-a792b4d4.system.entry.js +0 -6
- package/dist/calcite/p-a8d26072.entry.js +0 -6
- package/dist/calcite/p-a8e86b7c.system.js +0 -6
- package/dist/calcite/p-a930b4c7.system.entry.js +0 -6
- package/dist/calcite/p-ad42a290.system.entry.js +0 -6
- package/dist/calcite/p-afa96d7b.entry.js +0 -6
- package/dist/calcite/p-b3b7d99f.entry.js +0 -6
- package/dist/calcite/p-b3c08277.system.entry.js +0 -6
- package/dist/calcite/p-bae5371e.entry.js +0 -6
- package/dist/calcite/p-bbad2c78.entry.js +0 -6
- package/dist/calcite/p-bbc195d0.system.entry.js +0 -6
- package/dist/calcite/p-be0b7ae8.entry.js +0 -6
- package/dist/calcite/p-bed13ccd.system.entry.js +0 -6
- package/dist/calcite/p-c075111b.system.entry.js +0 -6
- package/dist/calcite/p-c09197e1.system.entry.js +0 -6
- package/dist/calcite/p-c3200434.system.entry.js +0 -6
- package/dist/calcite/p-c7e8f753.js +0 -6
- package/dist/calcite/p-cda3843c.entry.js +0 -6
- package/dist/calcite/p-d1fef3a5.entry.js +0 -6
- package/dist/calcite/p-d69560ee.system.entry.js +0 -6
- package/dist/calcite/p-d7614205.entry.js +0 -6
- package/dist/calcite/p-d8cca171.system.entry.js +0 -6
- package/dist/calcite/p-d8d3ee29.entry.js +0 -6
- package/dist/calcite/p-d91ab8b3.system.entry.js +0 -6
- package/dist/calcite/p-da603fb6.system.js +0 -6
- package/dist/calcite/p-dc5681bd.system.entry.js +0 -6
- package/dist/calcite/p-dda6305e.system.entry.js +0 -6
- package/dist/calcite/p-dfd66185.entry.js +0 -6
- package/dist/calcite/p-e4a9f3a3.entry.js +0 -6
- package/dist/calcite/p-e5100a68.system.entry.js +0 -6
- package/dist/calcite/p-e55af056.entry.js +0 -6
- package/dist/calcite/p-ec0ff216.entry.js +0 -6
- package/dist/calcite/p-ee4221f2.entry.js +0 -6
- package/dist/calcite/p-ef596bf4.system.js +0 -6
- package/dist/calcite/p-f29e929e.system.entry.js +0 -6
- package/dist/calcite/p-fcbb3104.entry.js +0 -6
- package/dist/calcite/p-fe758da5.system.entry.js +0 -6
- package/dist/calcite/p-ffc4d4f5.system.entry.js +0 -6
- package/dist/cjs/popper-f29f9a3b.js +0 -1876
- package/dist/collection/utils/popper.js +0 -126
- package/dist/components/popper.js +0 -1868
- package/dist/esm/popper-f38ba1ab.js +0 -1868
- package/dist/esm-es5/ExpandToggle-7076d600.js +0 -6
- package/dist/esm-es5/Heading-5ccb3b17.js +0 -6
- package/dist/esm-es5/popper-f38ba1ab.js +0 -6
- package/dist/types/utils/popper.d.ts +0 -35
|
@@ -0,0 +1,1612 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
* v1.0.0-beta.89
|
|
5
|
+
*/
|
|
6
|
+
import { b as getElementDir } from './dom.js';
|
|
7
|
+
|
|
8
|
+
function getSide(placement) {
|
|
9
|
+
return placement.split('-')[0];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function getAlignment(placement) {
|
|
13
|
+
return placement.split('-')[1];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function getMainAxisFromPlacement(placement) {
|
|
17
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function getLengthFromAxis(axis) {
|
|
21
|
+
return axis === 'y' ? 'height' : 'width';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
25
|
+
let {
|
|
26
|
+
reference,
|
|
27
|
+
floating
|
|
28
|
+
} = _ref;
|
|
29
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
30
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
31
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
|
32
|
+
const length = getLengthFromAxis(mainAxis);
|
|
33
|
+
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
|
34
|
+
const side = getSide(placement);
|
|
35
|
+
const isVertical = mainAxis === 'x';
|
|
36
|
+
let coords;
|
|
37
|
+
|
|
38
|
+
switch (side) {
|
|
39
|
+
case 'top':
|
|
40
|
+
coords = {
|
|
41
|
+
x: commonX,
|
|
42
|
+
y: reference.y - floating.height
|
|
43
|
+
};
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'bottom':
|
|
47
|
+
coords = {
|
|
48
|
+
x: commonX,
|
|
49
|
+
y: reference.y + reference.height
|
|
50
|
+
};
|
|
51
|
+
break;
|
|
52
|
+
|
|
53
|
+
case 'right':
|
|
54
|
+
coords = {
|
|
55
|
+
x: reference.x + reference.width,
|
|
56
|
+
y: commonY
|
|
57
|
+
};
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
case 'left':
|
|
61
|
+
coords = {
|
|
62
|
+
x: reference.x - floating.width,
|
|
63
|
+
y: commonY
|
|
64
|
+
};
|
|
65
|
+
break;
|
|
66
|
+
|
|
67
|
+
default:
|
|
68
|
+
coords = {
|
|
69
|
+
x: reference.x,
|
|
70
|
+
y: reference.y
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
switch (getAlignment(placement)) {
|
|
75
|
+
case 'start':
|
|
76
|
+
coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 'end':
|
|
80
|
+
coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return coords;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
89
|
+
* next to a reference element when it is given a certain positioning strategy.
|
|
90
|
+
*
|
|
91
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
92
|
+
* write one for the platform you are using Floating UI with.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
96
|
+
const {
|
|
97
|
+
placement = 'bottom',
|
|
98
|
+
strategy = 'absolute',
|
|
99
|
+
middleware = [],
|
|
100
|
+
platform
|
|
101
|
+
} = config;
|
|
102
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
103
|
+
|
|
104
|
+
let rects = await platform.getElementRects({
|
|
105
|
+
reference,
|
|
106
|
+
floating,
|
|
107
|
+
strategy
|
|
108
|
+
});
|
|
109
|
+
let {
|
|
110
|
+
x,
|
|
111
|
+
y
|
|
112
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
113
|
+
let statefulPlacement = placement;
|
|
114
|
+
let middlewareData = {};
|
|
115
|
+
let resetCount = 0;
|
|
116
|
+
|
|
117
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
118
|
+
const {
|
|
119
|
+
name,
|
|
120
|
+
fn
|
|
121
|
+
} = middleware[i];
|
|
122
|
+
const {
|
|
123
|
+
x: nextX,
|
|
124
|
+
y: nextY,
|
|
125
|
+
data,
|
|
126
|
+
reset
|
|
127
|
+
} = await fn({
|
|
128
|
+
x,
|
|
129
|
+
y,
|
|
130
|
+
initialPlacement: placement,
|
|
131
|
+
placement: statefulPlacement,
|
|
132
|
+
strategy,
|
|
133
|
+
middlewareData,
|
|
134
|
+
rects,
|
|
135
|
+
platform,
|
|
136
|
+
elements: {
|
|
137
|
+
reference,
|
|
138
|
+
floating
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
x = nextX != null ? nextX : x;
|
|
142
|
+
y = nextY != null ? nextY : y;
|
|
143
|
+
middlewareData = { ...middlewareData,
|
|
144
|
+
[name]: { ...middlewareData[name],
|
|
145
|
+
...data
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
if (reset && resetCount <= 50) {
|
|
150
|
+
resetCount++;
|
|
151
|
+
|
|
152
|
+
if (typeof reset === 'object') {
|
|
153
|
+
if (reset.placement) {
|
|
154
|
+
statefulPlacement = reset.placement;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (reset.rects) {
|
|
158
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
159
|
+
reference,
|
|
160
|
+
floating,
|
|
161
|
+
strategy
|
|
162
|
+
}) : reset.rects;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
({
|
|
166
|
+
x,
|
|
167
|
+
y
|
|
168
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
i = -1;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
x,
|
|
178
|
+
y,
|
|
179
|
+
placement: statefulPlacement,
|
|
180
|
+
strategy,
|
|
181
|
+
middlewareData
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
function expandPaddingObject(padding) {
|
|
186
|
+
return {
|
|
187
|
+
top: 0,
|
|
188
|
+
right: 0,
|
|
189
|
+
bottom: 0,
|
|
190
|
+
left: 0,
|
|
191
|
+
...padding
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function getSideObjectFromPadding(padding) {
|
|
196
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
197
|
+
top: padding,
|
|
198
|
+
right: padding,
|
|
199
|
+
bottom: padding,
|
|
200
|
+
left: padding
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function rectToClientRect(rect) {
|
|
205
|
+
return { ...rect,
|
|
206
|
+
top: rect.y,
|
|
207
|
+
left: rect.x,
|
|
208
|
+
right: rect.x + rect.width,
|
|
209
|
+
bottom: rect.y + rect.height
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
215
|
+
* element is overflowing a given clipping boundary.
|
|
216
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
217
|
+
* - negative = how many pixels left before it will overflow
|
|
218
|
+
* - 0 = lies flush with the boundary
|
|
219
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
220
|
+
*/
|
|
221
|
+
async function detectOverflow(middlewareArguments, options) {
|
|
222
|
+
var _await$platform$isEle;
|
|
223
|
+
|
|
224
|
+
if (options === void 0) {
|
|
225
|
+
options = {};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const {
|
|
229
|
+
x,
|
|
230
|
+
y,
|
|
231
|
+
platform,
|
|
232
|
+
rects,
|
|
233
|
+
elements,
|
|
234
|
+
strategy
|
|
235
|
+
} = middlewareArguments;
|
|
236
|
+
const {
|
|
237
|
+
boundary = 'clippingAncestors',
|
|
238
|
+
rootBoundary = 'viewport',
|
|
239
|
+
elementContext = 'floating',
|
|
240
|
+
altBoundary = false,
|
|
241
|
+
padding = 0
|
|
242
|
+
} = options;
|
|
243
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
|
244
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
245
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
246
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
247
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
248
|
+
boundary,
|
|
249
|
+
rootBoundary,
|
|
250
|
+
strategy
|
|
251
|
+
}));
|
|
252
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
253
|
+
rect: elementContext === 'floating' ? { ...rects.floating,
|
|
254
|
+
x,
|
|
255
|
+
y
|
|
256
|
+
} : rects.reference,
|
|
257
|
+
offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
|
|
258
|
+
strategy
|
|
259
|
+
}) : rects[elementContext]);
|
|
260
|
+
return {
|
|
261
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
262
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
263
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
264
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const min$1 = Math.min;
|
|
269
|
+
const max$1 = Math.max;
|
|
270
|
+
|
|
271
|
+
function within(min$1$1, value, max$1$1) {
|
|
272
|
+
return max$1(min$1$1, min$1(value, max$1$1));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Positions an inner element of the floating element such that it is centered
|
|
277
|
+
* to the reference element.
|
|
278
|
+
* @see https://floating-ui.com/docs/arrow
|
|
279
|
+
*/
|
|
280
|
+
const arrow = options => ({
|
|
281
|
+
name: 'arrow',
|
|
282
|
+
options,
|
|
283
|
+
|
|
284
|
+
async fn(middlewareArguments) {
|
|
285
|
+
// Since `element` is required, we don't Partial<> the type
|
|
286
|
+
const {
|
|
287
|
+
element,
|
|
288
|
+
padding = 0
|
|
289
|
+
} = options != null ? options : {};
|
|
290
|
+
const {
|
|
291
|
+
x,
|
|
292
|
+
y,
|
|
293
|
+
placement,
|
|
294
|
+
rects,
|
|
295
|
+
platform
|
|
296
|
+
} = middlewareArguments;
|
|
297
|
+
|
|
298
|
+
if (element == null) {
|
|
299
|
+
|
|
300
|
+
return {};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const paddingObject = getSideObjectFromPadding(padding);
|
|
304
|
+
const coords = {
|
|
305
|
+
x,
|
|
306
|
+
y
|
|
307
|
+
};
|
|
308
|
+
const axis = getMainAxisFromPlacement(placement);
|
|
309
|
+
const alignment = getAlignment(placement);
|
|
310
|
+
const length = getLengthFromAxis(axis);
|
|
311
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
312
|
+
const minProp = axis === 'y' ? 'top' : 'left';
|
|
313
|
+
const maxProp = axis === 'y' ? 'bottom' : 'right';
|
|
314
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
315
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
316
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
317
|
+
let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
|
318
|
+
|
|
319
|
+
if (clientSize === 0) {
|
|
320
|
+
clientSize = rects.floating[length];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
|
|
324
|
+
// point is outside the floating element's bounds
|
|
325
|
+
|
|
326
|
+
const min = paddingObject[minProp];
|
|
327
|
+
const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
328
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
329
|
+
const offset = within(min, center, max); // Make sure that arrow points at the reference
|
|
330
|
+
|
|
331
|
+
const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
|
|
332
|
+
const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
|
|
333
|
+
const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
|
|
334
|
+
return {
|
|
335
|
+
[axis]: coords[axis] - alignmentOffset,
|
|
336
|
+
data: {
|
|
337
|
+
[axis]: offset,
|
|
338
|
+
centerOffset: center - offset
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
const hash$1 = {
|
|
346
|
+
left: 'right',
|
|
347
|
+
right: 'left',
|
|
348
|
+
bottom: 'top',
|
|
349
|
+
top: 'bottom'
|
|
350
|
+
};
|
|
351
|
+
function getOppositePlacement(placement) {
|
|
352
|
+
return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
356
|
+
if (rtl === void 0) {
|
|
357
|
+
rtl = false;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const alignment = getAlignment(placement);
|
|
361
|
+
const mainAxis = getMainAxisFromPlacement(placement);
|
|
362
|
+
const length = getLengthFromAxis(mainAxis);
|
|
363
|
+
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
364
|
+
|
|
365
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
366
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return {
|
|
370
|
+
main: mainAlignmentSide,
|
|
371
|
+
cross: getOppositePlacement(mainAlignmentSide)
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const hash = {
|
|
376
|
+
start: 'end',
|
|
377
|
+
end: 'start'
|
|
378
|
+
};
|
|
379
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
380
|
+
return placement.replace(/start|end/g, matched => hash[matched]);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
384
|
+
const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
|
|
385
|
+
|
|
386
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
387
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
388
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
389
|
+
if (alignment) {
|
|
390
|
+
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return true;
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Automatically chooses the `placement` which has the most space available.
|
|
399
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
400
|
+
*/
|
|
401
|
+
const autoPlacement = function (options) {
|
|
402
|
+
if (options === void 0) {
|
|
403
|
+
options = {};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return {
|
|
407
|
+
name: 'autoPlacement',
|
|
408
|
+
options,
|
|
409
|
+
|
|
410
|
+
async fn(middlewareArguments) {
|
|
411
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _middlewareData$autoP3, _middlewareData$autoP4, _placementsSortedByLe;
|
|
412
|
+
|
|
413
|
+
const {
|
|
414
|
+
x,
|
|
415
|
+
y,
|
|
416
|
+
rects,
|
|
417
|
+
middlewareData,
|
|
418
|
+
placement,
|
|
419
|
+
platform,
|
|
420
|
+
elements
|
|
421
|
+
} = middlewareArguments;
|
|
422
|
+
const {
|
|
423
|
+
alignment = null,
|
|
424
|
+
allowedPlacements = allPlacements,
|
|
425
|
+
autoAlignment = true,
|
|
426
|
+
...detectOverflowOptions
|
|
427
|
+
} = options;
|
|
428
|
+
const placements = getPlacementList(alignment, autoAlignment, allowedPlacements);
|
|
429
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
430
|
+
const currentIndex = (_middlewareData$autoP = (_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.index) != null ? _middlewareData$autoP : 0;
|
|
431
|
+
const currentPlacement = placements[currentIndex];
|
|
432
|
+
|
|
433
|
+
if (currentPlacement == null) {
|
|
434
|
+
return {};
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const {
|
|
438
|
+
main,
|
|
439
|
+
cross
|
|
440
|
+
} = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); // Make `computeCoords` start from the right place
|
|
441
|
+
|
|
442
|
+
if (placement !== currentPlacement) {
|
|
443
|
+
return {
|
|
444
|
+
x,
|
|
445
|
+
y,
|
|
446
|
+
reset: {
|
|
447
|
+
placement: placements[0]
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
|
|
453
|
+
const allOverflows = [...((_middlewareData$autoP3 = (_middlewareData$autoP4 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP4.overflows) != null ? _middlewareData$autoP3 : []), {
|
|
454
|
+
placement: currentPlacement,
|
|
455
|
+
overflows: currentOverflows
|
|
456
|
+
}];
|
|
457
|
+
const nextPlacement = placements[currentIndex + 1]; // There are more placements to check
|
|
458
|
+
|
|
459
|
+
if (nextPlacement) {
|
|
460
|
+
return {
|
|
461
|
+
data: {
|
|
462
|
+
index: currentIndex + 1,
|
|
463
|
+
overflows: allOverflows
|
|
464
|
+
},
|
|
465
|
+
reset: {
|
|
466
|
+
placement: nextPlacement
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);
|
|
472
|
+
const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find(_ref => {
|
|
473
|
+
let {
|
|
474
|
+
overflows
|
|
475
|
+
} = _ref;
|
|
476
|
+
return overflows.every(overflow => overflow <= 0);
|
|
477
|
+
})) == null ? void 0 : _placementsSortedByLe.placement;
|
|
478
|
+
const resetPlacement = placementThatFitsOnAllSides != null ? placementThatFitsOnAllSides : placementsSortedByLeastOverflow[0].placement;
|
|
479
|
+
|
|
480
|
+
if (resetPlacement !== placement) {
|
|
481
|
+
return {
|
|
482
|
+
data: {
|
|
483
|
+
index: currentIndex + 1,
|
|
484
|
+
overflows: allOverflows
|
|
485
|
+
},
|
|
486
|
+
reset: {
|
|
487
|
+
placement: resetPlacement
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
return {};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
function getExpandedPlacements(placement) {
|
|
499
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
500
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Changes the placement of the floating element to one that will fit if the
|
|
505
|
+
* initially specified `placement` does not.
|
|
506
|
+
* @see https://floating-ui.com/docs/flip
|
|
507
|
+
*/
|
|
508
|
+
const flip = function (options) {
|
|
509
|
+
if (options === void 0) {
|
|
510
|
+
options = {};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return {
|
|
514
|
+
name: 'flip',
|
|
515
|
+
options,
|
|
516
|
+
|
|
517
|
+
async fn(middlewareArguments) {
|
|
518
|
+
var _middlewareData$flip;
|
|
519
|
+
|
|
520
|
+
const {
|
|
521
|
+
placement,
|
|
522
|
+
middlewareData,
|
|
523
|
+
rects,
|
|
524
|
+
initialPlacement,
|
|
525
|
+
platform,
|
|
526
|
+
elements
|
|
527
|
+
} = middlewareArguments;
|
|
528
|
+
const {
|
|
529
|
+
mainAxis: checkMainAxis = true,
|
|
530
|
+
crossAxis: checkCrossAxis = true,
|
|
531
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
532
|
+
fallbackStrategy = 'bestFit',
|
|
533
|
+
flipAlignment = true,
|
|
534
|
+
...detectOverflowOptions
|
|
535
|
+
} = options;
|
|
536
|
+
const side = getSide(placement);
|
|
537
|
+
const isBasePlacement = side === initialPlacement;
|
|
538
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
539
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
540
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
541
|
+
const overflows = [];
|
|
542
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
543
|
+
|
|
544
|
+
if (checkMainAxis) {
|
|
545
|
+
overflows.push(overflow[side]);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (checkCrossAxis) {
|
|
549
|
+
const {
|
|
550
|
+
main,
|
|
551
|
+
cross
|
|
552
|
+
} = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
553
|
+
overflows.push(overflow[main], overflow[cross]);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
overflowsData = [...overflowsData, {
|
|
557
|
+
placement,
|
|
558
|
+
overflows
|
|
559
|
+
}]; // One or more sides is overflowing
|
|
560
|
+
|
|
561
|
+
if (!overflows.every(side => side <= 0)) {
|
|
562
|
+
var _middlewareData$flip$, _middlewareData$flip2;
|
|
563
|
+
|
|
564
|
+
const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
|
|
565
|
+
const nextPlacement = placements[nextIndex];
|
|
566
|
+
|
|
567
|
+
if (nextPlacement) {
|
|
568
|
+
// Try next placement and re-run the lifecycle
|
|
569
|
+
return {
|
|
570
|
+
data: {
|
|
571
|
+
index: nextIndex,
|
|
572
|
+
overflows: overflowsData
|
|
573
|
+
},
|
|
574
|
+
reset: {
|
|
575
|
+
placement: nextPlacement
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
let resetPlacement = 'bottom';
|
|
581
|
+
|
|
582
|
+
switch (fallbackStrategy) {
|
|
583
|
+
case 'bestFit':
|
|
584
|
+
{
|
|
585
|
+
var _overflowsData$map$so;
|
|
586
|
+
|
|
587
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d, 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].placement;
|
|
588
|
+
|
|
589
|
+
if (placement) {
|
|
590
|
+
resetPlacement = placement;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
case 'initialPlacement':
|
|
597
|
+
resetPlacement = initialPlacement;
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (placement !== resetPlacement) {
|
|
602
|
+
return {
|
|
603
|
+
reset: {
|
|
604
|
+
placement: resetPlacement
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
return {};
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
function getSideOffsets(overflow, rect) {
|
|
617
|
+
return {
|
|
618
|
+
top: overflow.top - rect.height,
|
|
619
|
+
right: overflow.right - rect.width,
|
|
620
|
+
bottom: overflow.bottom - rect.height,
|
|
621
|
+
left: overflow.left - rect.width
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function isAnySideFullyClipped(overflow) {
|
|
626
|
+
return sides.some(side => overflow[side] >= 0);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
631
|
+
* when it is not in the same clipping context as the reference element.
|
|
632
|
+
* @see https://floating-ui.com/docs/hide
|
|
633
|
+
*/
|
|
634
|
+
const hide = function (_temp) {
|
|
635
|
+
let {
|
|
636
|
+
strategy = 'referenceHidden',
|
|
637
|
+
...detectOverflowOptions
|
|
638
|
+
} = _temp === void 0 ? {} : _temp;
|
|
639
|
+
return {
|
|
640
|
+
name: 'hide',
|
|
641
|
+
|
|
642
|
+
async fn(middlewareArguments) {
|
|
643
|
+
const {
|
|
644
|
+
rects
|
|
645
|
+
} = middlewareArguments;
|
|
646
|
+
|
|
647
|
+
switch (strategy) {
|
|
648
|
+
case 'referenceHidden':
|
|
649
|
+
{
|
|
650
|
+
const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
|
|
651
|
+
elementContext: 'reference'
|
|
652
|
+
});
|
|
653
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
654
|
+
return {
|
|
655
|
+
data: {
|
|
656
|
+
referenceHiddenOffsets: offsets,
|
|
657
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
case 'escaped':
|
|
663
|
+
{
|
|
664
|
+
const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
|
|
665
|
+
altBoundary: true
|
|
666
|
+
});
|
|
667
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
668
|
+
return {
|
|
669
|
+
data: {
|
|
670
|
+
escapedOffsets: offsets,
|
|
671
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
default:
|
|
677
|
+
{
|
|
678
|
+
return {};
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
async function convertValueToCoords(middlewareArguments, value) {
|
|
687
|
+
const {
|
|
688
|
+
placement,
|
|
689
|
+
platform,
|
|
690
|
+
elements
|
|
691
|
+
} = middlewareArguments;
|
|
692
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
693
|
+
const side = getSide(placement);
|
|
694
|
+
const alignment = getAlignment(placement);
|
|
695
|
+
const isVertical = getMainAxisFromPlacement(placement) === 'x';
|
|
696
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
697
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
698
|
+
const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
|
|
699
|
+
|
|
700
|
+
let {
|
|
701
|
+
mainAxis,
|
|
702
|
+
crossAxis,
|
|
703
|
+
alignmentAxis
|
|
704
|
+
} = typeof rawValue === 'number' ? {
|
|
705
|
+
mainAxis: rawValue,
|
|
706
|
+
crossAxis: 0,
|
|
707
|
+
alignmentAxis: null
|
|
708
|
+
} : {
|
|
709
|
+
mainAxis: 0,
|
|
710
|
+
crossAxis: 0,
|
|
711
|
+
alignmentAxis: null,
|
|
712
|
+
...rawValue
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
716
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
return isVertical ? {
|
|
720
|
+
x: crossAxis * crossAxisMulti,
|
|
721
|
+
y: mainAxis * mainAxisMulti
|
|
722
|
+
} : {
|
|
723
|
+
x: mainAxis * mainAxisMulti,
|
|
724
|
+
y: crossAxis * crossAxisMulti
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Displaces the floating element from its reference element.
|
|
729
|
+
* @see https://floating-ui.com/docs/offset
|
|
730
|
+
*/
|
|
731
|
+
|
|
732
|
+
const offset = function (value) {
|
|
733
|
+
if (value === void 0) {
|
|
734
|
+
value = 0;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
return {
|
|
738
|
+
name: 'offset',
|
|
739
|
+
options: value,
|
|
740
|
+
|
|
741
|
+
async fn(middlewareArguments) {
|
|
742
|
+
const {
|
|
743
|
+
x,
|
|
744
|
+
y
|
|
745
|
+
} = middlewareArguments;
|
|
746
|
+
const diffCoords = await convertValueToCoords(middlewareArguments, value);
|
|
747
|
+
return {
|
|
748
|
+
x: x + diffCoords.x,
|
|
749
|
+
y: y + diffCoords.y,
|
|
750
|
+
data: diffCoords
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
function getCrossAxis(axis) {
|
|
758
|
+
return axis === 'x' ? 'y' : 'x';
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Shifts the floating element in order to keep it in view when it will overflow
|
|
763
|
+
* a clipping boundary.
|
|
764
|
+
* @see https://floating-ui.com/docs/shift
|
|
765
|
+
*/
|
|
766
|
+
const shift = function (options) {
|
|
767
|
+
if (options === void 0) {
|
|
768
|
+
options = {};
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
return {
|
|
772
|
+
name: 'shift',
|
|
773
|
+
options,
|
|
774
|
+
|
|
775
|
+
async fn(middlewareArguments) {
|
|
776
|
+
const {
|
|
777
|
+
x,
|
|
778
|
+
y,
|
|
779
|
+
placement
|
|
780
|
+
} = middlewareArguments;
|
|
781
|
+
const {
|
|
782
|
+
mainAxis: checkMainAxis = true,
|
|
783
|
+
crossAxis: checkCrossAxis = false,
|
|
784
|
+
limiter = {
|
|
785
|
+
fn: _ref => {
|
|
786
|
+
let {
|
|
787
|
+
x,
|
|
788
|
+
y
|
|
789
|
+
} = _ref;
|
|
790
|
+
return {
|
|
791
|
+
x,
|
|
792
|
+
y
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
...detectOverflowOptions
|
|
797
|
+
} = options;
|
|
798
|
+
const coords = {
|
|
799
|
+
x,
|
|
800
|
+
y
|
|
801
|
+
};
|
|
802
|
+
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
803
|
+
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
804
|
+
const crossAxis = getCrossAxis(mainAxis);
|
|
805
|
+
let mainAxisCoord = coords[mainAxis];
|
|
806
|
+
let crossAxisCoord = coords[crossAxis];
|
|
807
|
+
|
|
808
|
+
if (checkMainAxis) {
|
|
809
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
810
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
811
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
812
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
813
|
+
mainAxisCoord = within(min, mainAxisCoord, max);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if (checkCrossAxis) {
|
|
817
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
818
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
819
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
820
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
821
|
+
crossAxisCoord = within(min, crossAxisCoord, max);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
const limitedCoords = limiter.fn({ ...middlewareArguments,
|
|
825
|
+
[mainAxis]: mainAxisCoord,
|
|
826
|
+
[crossAxis]: crossAxisCoord
|
|
827
|
+
});
|
|
828
|
+
return { ...limitedCoords,
|
|
829
|
+
data: {
|
|
830
|
+
x: limitedCoords.x - x,
|
|
831
|
+
y: limitedCoords.y - y
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
function isWindow(value) {
|
|
840
|
+
return value && value.document && value.location && value.alert && value.setInterval;
|
|
841
|
+
}
|
|
842
|
+
function getWindow(node) {
|
|
843
|
+
if (node == null) {
|
|
844
|
+
return window;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
if (!isWindow(node)) {
|
|
848
|
+
const ownerDocument = node.ownerDocument;
|
|
849
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
return node;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
function getComputedStyle$1(element) {
|
|
856
|
+
return getWindow(element).getComputedStyle(element);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
function getNodeName(node) {
|
|
860
|
+
return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
function getUAString() {
|
|
864
|
+
const uaData = navigator.userAgentData;
|
|
865
|
+
|
|
866
|
+
if (uaData != null && uaData.brands) {
|
|
867
|
+
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
return navigator.userAgent;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
function isHTMLElement(value) {
|
|
874
|
+
return value instanceof getWindow(value).HTMLElement;
|
|
875
|
+
}
|
|
876
|
+
function isElement(value) {
|
|
877
|
+
return value instanceof getWindow(value).Element;
|
|
878
|
+
}
|
|
879
|
+
function isNode(value) {
|
|
880
|
+
return value instanceof getWindow(value).Node;
|
|
881
|
+
}
|
|
882
|
+
function isShadowRoot(node) {
|
|
883
|
+
// Browsers without `ShadowRoot` support
|
|
884
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
885
|
+
return false;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
const OwnElement = getWindow(node).ShadowRoot;
|
|
889
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
890
|
+
}
|
|
891
|
+
function isOverflowElement(element) {
|
|
892
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
|
893
|
+
const {
|
|
894
|
+
overflow,
|
|
895
|
+
overflowX,
|
|
896
|
+
overflowY
|
|
897
|
+
} = getComputedStyle$1(element);
|
|
898
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
899
|
+
}
|
|
900
|
+
function isTableElement(element) {
|
|
901
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
902
|
+
}
|
|
903
|
+
function isContainingBlock(element) {
|
|
904
|
+
// TODO: Try and use feature detection here instead
|
|
905
|
+
const isFirefox = /firefox/i.test(getUAString());
|
|
906
|
+
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
|
|
907
|
+
// create a containing block.
|
|
908
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
909
|
+
|
|
910
|
+
return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
|
|
911
|
+
css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
|
|
912
|
+
}
|
|
913
|
+
function isLayoutViewport() {
|
|
914
|
+
// Not Safari
|
|
915
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
|
|
916
|
+
// • Always-visible scrollbar or not
|
|
917
|
+
// • Width of <html>, etc.
|
|
918
|
+
// const vV = win.visualViewport;
|
|
919
|
+
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
const min = Math.min;
|
|
923
|
+
const max = Math.max;
|
|
924
|
+
const round = Math.round;
|
|
925
|
+
|
|
926
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
927
|
+
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
|
928
|
+
|
|
929
|
+
if (includeScale === void 0) {
|
|
930
|
+
includeScale = false;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (isFixedStrategy === void 0) {
|
|
934
|
+
isFixedStrategy = false;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
const clientRect = element.getBoundingClientRect();
|
|
938
|
+
let scaleX = 1;
|
|
939
|
+
let scaleY = 1;
|
|
940
|
+
|
|
941
|
+
if (includeScale && isHTMLElement(element)) {
|
|
942
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
943
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
const win = isElement(element) ? getWindow(element) : window;
|
|
947
|
+
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
948
|
+
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
|
|
949
|
+
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
|
|
950
|
+
const width = clientRect.width / scaleX;
|
|
951
|
+
const height = clientRect.height / scaleY;
|
|
952
|
+
return {
|
|
953
|
+
width,
|
|
954
|
+
height,
|
|
955
|
+
top: y,
|
|
956
|
+
right: x + width,
|
|
957
|
+
bottom: y + height,
|
|
958
|
+
left: x,
|
|
959
|
+
x,
|
|
960
|
+
y
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
function getDocumentElement(node) {
|
|
965
|
+
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
function getNodeScroll(element) {
|
|
969
|
+
if (isElement(element)) {
|
|
970
|
+
return {
|
|
971
|
+
scrollLeft: element.scrollLeft,
|
|
972
|
+
scrollTop: element.scrollTop
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
return {
|
|
977
|
+
scrollLeft: element.pageXOffset,
|
|
978
|
+
scrollTop: element.pageYOffset
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
function getWindowScrollBarX(element) {
|
|
983
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
984
|
+
// incorrect for RTL.
|
|
985
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
function isScaled(element) {
|
|
989
|
+
const rect = getBoundingClientRect(element);
|
|
990
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
994
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
995
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
996
|
+
const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
|
|
997
|
+
isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
|
|
998
|
+
let scroll = {
|
|
999
|
+
scrollLeft: 0,
|
|
1000
|
+
scrollTop: 0
|
|
1001
|
+
};
|
|
1002
|
+
const offsets = {
|
|
1003
|
+
x: 0,
|
|
1004
|
+
y: 0
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1008
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1009
|
+
scroll = getNodeScroll(offsetParent);
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
if (isHTMLElement(offsetParent)) {
|
|
1013
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
1014
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1015
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1016
|
+
} else if (documentElement) {
|
|
1017
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
return {
|
|
1022
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
1023
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
1024
|
+
width: rect.width,
|
|
1025
|
+
height: rect.height
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
function getParentNode(node) {
|
|
1030
|
+
if (getNodeName(node) === 'html') {
|
|
1031
|
+
return node;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1035
|
+
// @ts-ignore
|
|
1036
|
+
node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1037
|
+
node.parentNode || ( // DOM Element detected
|
|
1038
|
+
isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
|
|
1039
|
+
getDocumentElement(node) // fallback
|
|
1040
|
+
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function getTrueOffsetParent(element) {
|
|
1045
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1046
|
+
return null;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
return element.offsetParent;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
function getContainingBlock(element) {
|
|
1053
|
+
let currentNode = getParentNode(element);
|
|
1054
|
+
|
|
1055
|
+
if (isShadowRoot(currentNode)) {
|
|
1056
|
+
currentNode = currentNode.host;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
|
|
1060
|
+
if (isContainingBlock(currentNode)) {
|
|
1061
|
+
return currentNode;
|
|
1062
|
+
} else {
|
|
1063
|
+
currentNode = currentNode.parentNode;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
return null;
|
|
1068
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1069
|
+
// such as table ancestors and cross browser bugs.
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
function getOffsetParent(element) {
|
|
1073
|
+
const window = getWindow(element);
|
|
1074
|
+
let offsetParent = getTrueOffsetParent(element);
|
|
1075
|
+
|
|
1076
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
|
|
1077
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1081
|
+
return window;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
function getDimensions(element) {
|
|
1088
|
+
if (isHTMLElement(element)) {
|
|
1089
|
+
return {
|
|
1090
|
+
width: element.offsetWidth,
|
|
1091
|
+
height: element.offsetHeight
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
const rect = getBoundingClientRect(element);
|
|
1096
|
+
return {
|
|
1097
|
+
width: rect.width,
|
|
1098
|
+
height: rect.height
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1103
|
+
let {
|
|
1104
|
+
rect,
|
|
1105
|
+
offsetParent,
|
|
1106
|
+
strategy
|
|
1107
|
+
} = _ref;
|
|
1108
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1109
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1110
|
+
|
|
1111
|
+
if (offsetParent === documentElement) {
|
|
1112
|
+
return rect;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
let scroll = {
|
|
1116
|
+
scrollLeft: 0,
|
|
1117
|
+
scrollTop: 0
|
|
1118
|
+
};
|
|
1119
|
+
const offsets = {
|
|
1120
|
+
x: 0,
|
|
1121
|
+
y: 0
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1124
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1125
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1126
|
+
scroll = getNodeScroll(offsetParent);
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
if (isHTMLElement(offsetParent)) {
|
|
1130
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
1131
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1132
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1133
|
+
} // This doesn't appear to be need to be negated.
|
|
1134
|
+
// else if (documentElement) {
|
|
1135
|
+
// offsets.x = getWindowScrollBarX(documentElement);
|
|
1136
|
+
// }
|
|
1137
|
+
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return { ...rect,
|
|
1141
|
+
x: rect.x - scroll.scrollLeft + offsets.x,
|
|
1142
|
+
y: rect.y - scroll.scrollTop + offsets.y
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
function getViewportRect(element, strategy) {
|
|
1147
|
+
const win = getWindow(element);
|
|
1148
|
+
const html = getDocumentElement(element);
|
|
1149
|
+
const visualViewport = win.visualViewport;
|
|
1150
|
+
let width = html.clientWidth;
|
|
1151
|
+
let height = html.clientHeight;
|
|
1152
|
+
let x = 0;
|
|
1153
|
+
let y = 0;
|
|
1154
|
+
|
|
1155
|
+
if (visualViewport) {
|
|
1156
|
+
width = visualViewport.width;
|
|
1157
|
+
height = visualViewport.height;
|
|
1158
|
+
const layoutViewport = isLayoutViewport();
|
|
1159
|
+
|
|
1160
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
1161
|
+
x = visualViewport.offsetLeft;
|
|
1162
|
+
y = visualViewport.offsetTop;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
return {
|
|
1167
|
+
width,
|
|
1168
|
+
height,
|
|
1169
|
+
x,
|
|
1170
|
+
y
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
|
1175
|
+
|
|
1176
|
+
function getDocumentRect(element) {
|
|
1177
|
+
var _element$ownerDocumen;
|
|
1178
|
+
|
|
1179
|
+
const html = getDocumentElement(element);
|
|
1180
|
+
const scroll = getNodeScroll(element);
|
|
1181
|
+
const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
|
1182
|
+
const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
1183
|
+
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
1184
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1185
|
+
const y = -scroll.scrollTop;
|
|
1186
|
+
|
|
1187
|
+
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
|
1188
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
return {
|
|
1192
|
+
width,
|
|
1193
|
+
height,
|
|
1194
|
+
x,
|
|
1195
|
+
y
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
function getNearestOverflowAncestor(node) {
|
|
1200
|
+
const parentNode = getParentNode(node);
|
|
1201
|
+
|
|
1202
|
+
if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
|
|
1203
|
+
// @ts-ignore assume body is always available
|
|
1204
|
+
return node.ownerDocument.body;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1208
|
+
return parentNode;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
function getOverflowAncestors(node, list) {
|
|
1215
|
+
var _node$ownerDocument;
|
|
1216
|
+
|
|
1217
|
+
if (list === void 0) {
|
|
1218
|
+
list = [];
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1222
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
1223
|
+
const win = getWindow(scrollableAncestor);
|
|
1224
|
+
const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
|
|
1225
|
+
const updatedList = list.concat(target);
|
|
1226
|
+
return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
|
|
1227
|
+
updatedList.concat(getOverflowAncestors(target));
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
function contains(parent, child) {
|
|
1231
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
|
|
1232
|
+
|
|
1233
|
+
if (parent.contains(child)) {
|
|
1234
|
+
return true;
|
|
1235
|
+
} // then fallback to custom implementation with Shadow DOM support
|
|
1236
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
|
1237
|
+
let next = child;
|
|
1238
|
+
|
|
1239
|
+
do {
|
|
1240
|
+
// use `===` replace node.isSameNode()
|
|
1241
|
+
if (next && parent === next) {
|
|
1242
|
+
return true;
|
|
1243
|
+
} // @ts-ignore: need a better way to handle this...
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
next = next.parentNode || next.host;
|
|
1247
|
+
} while (next);
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
return false;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
1254
|
+
const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
|
|
1255
|
+
const top = clientRect.top + element.clientTop;
|
|
1256
|
+
const left = clientRect.left + element.clientLeft;
|
|
1257
|
+
return {
|
|
1258
|
+
top,
|
|
1259
|
+
left,
|
|
1260
|
+
x: left,
|
|
1261
|
+
y: top,
|
|
1262
|
+
right: left + element.clientWidth,
|
|
1263
|
+
bottom: top + element.clientHeight,
|
|
1264
|
+
width: element.clientWidth,
|
|
1265
|
+
height: element.clientHeight
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
|
|
1270
|
+
if (clippingParent === 'viewport') {
|
|
1271
|
+
return rectToClientRect(getViewportRect(element, strategy));
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
if (isElement(clippingParent)) {
|
|
1275
|
+
return getInnerBoundingClientRect(clippingParent, strategy);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
1279
|
+
} // A "clipping ancestor" is an overflowable container with the characteristic of
|
|
1280
|
+
// clipping (or hiding) overflowing elements with a position different from
|
|
1281
|
+
// `initial`
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
function getClippingAncestors(element) {
|
|
1285
|
+
const clippingAncestors = getOverflowAncestors(element);
|
|
1286
|
+
const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
|
|
1287
|
+
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
1288
|
+
|
|
1289
|
+
if (!isElement(clipperElement)) {
|
|
1290
|
+
return [];
|
|
1291
|
+
} // @ts-ignore isElement check ensures we return Array<Element>
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
|
|
1295
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
|
1296
|
+
// clipping ancestors
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
function getClippingRect(_ref) {
|
|
1300
|
+
let {
|
|
1301
|
+
element,
|
|
1302
|
+
boundary,
|
|
1303
|
+
rootBoundary,
|
|
1304
|
+
strategy
|
|
1305
|
+
} = _ref;
|
|
1306
|
+
const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
|
|
1307
|
+
const clippingAncestors = [...mainClippingAncestors, rootBoundary];
|
|
1308
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
1309
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1310
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1311
|
+
accRect.top = max(rect.top, accRect.top);
|
|
1312
|
+
accRect.right = min(rect.right, accRect.right);
|
|
1313
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1314
|
+
accRect.left = max(rect.left, accRect.left);
|
|
1315
|
+
return accRect;
|
|
1316
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1317
|
+
return {
|
|
1318
|
+
width: clippingRect.right - clippingRect.left,
|
|
1319
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
1320
|
+
x: clippingRect.left,
|
|
1321
|
+
y: clippingRect.top
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
const platform = {
|
|
1326
|
+
getClippingRect,
|
|
1327
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1328
|
+
isElement,
|
|
1329
|
+
getDimensions,
|
|
1330
|
+
getOffsetParent,
|
|
1331
|
+
getDocumentElement,
|
|
1332
|
+
getElementRects: _ref => {
|
|
1333
|
+
let {
|
|
1334
|
+
reference,
|
|
1335
|
+
floating,
|
|
1336
|
+
strategy
|
|
1337
|
+
} = _ref;
|
|
1338
|
+
return {
|
|
1339
|
+
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
|
|
1340
|
+
floating: { ...getDimensions(floating),
|
|
1341
|
+
x: 0,
|
|
1342
|
+
y: 0
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
},
|
|
1346
|
+
getClientRects: element => Array.from(element.getClientRects()),
|
|
1347
|
+
isRTL: element => getComputedStyle$1(element).direction === 'rtl'
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* Automatically updates the position of the floating element when necessary.
|
|
1352
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
1353
|
+
*/
|
|
1354
|
+
function autoUpdate(reference, floating, update, options) {
|
|
1355
|
+
if (options === void 0) {
|
|
1356
|
+
options = {};
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
const {
|
|
1360
|
+
ancestorScroll: _ancestorScroll = true,
|
|
1361
|
+
ancestorResize: _ancestorResize = true,
|
|
1362
|
+
elementResize = true,
|
|
1363
|
+
animationFrame = false
|
|
1364
|
+
} = options;
|
|
1365
|
+
const ancestorScroll = _ancestorScroll && !animationFrame;
|
|
1366
|
+
const ancestorResize = _ancestorResize && !animationFrame;
|
|
1367
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
|
|
1368
|
+
ancestors.forEach(ancestor => {
|
|
1369
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1370
|
+
passive: true
|
|
1371
|
+
});
|
|
1372
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1373
|
+
});
|
|
1374
|
+
let observer = null;
|
|
1375
|
+
|
|
1376
|
+
if (elementResize) {
|
|
1377
|
+
let initialUpdate = true;
|
|
1378
|
+
observer = new ResizeObserver(() => {
|
|
1379
|
+
if (!initialUpdate) {
|
|
1380
|
+
update();
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
initialUpdate = false;
|
|
1384
|
+
});
|
|
1385
|
+
isElement(reference) && !animationFrame && observer.observe(reference);
|
|
1386
|
+
observer.observe(floating);
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
let frameId;
|
|
1390
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1391
|
+
|
|
1392
|
+
if (animationFrame) {
|
|
1393
|
+
frameLoop();
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
function frameLoop() {
|
|
1397
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
1398
|
+
|
|
1399
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1400
|
+
update();
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
prevRefRect = nextRefRect;
|
|
1404
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
update();
|
|
1408
|
+
return () => {
|
|
1409
|
+
var _observer;
|
|
1410
|
+
|
|
1411
|
+
ancestors.forEach(ancestor => {
|
|
1412
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
1413
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
1414
|
+
});
|
|
1415
|
+
(_observer = observer) == null ? void 0 : _observer.disconnect();
|
|
1416
|
+
observer = null;
|
|
1417
|
+
|
|
1418
|
+
if (animationFrame) {
|
|
1419
|
+
cancelAnimationFrame(frameId);
|
|
1420
|
+
}
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1426
|
+
* next to a reference element when it is given a certain CSS positioning
|
|
1427
|
+
* strategy.
|
|
1428
|
+
*/
|
|
1429
|
+
|
|
1430
|
+
const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
|
|
1431
|
+
platform,
|
|
1432
|
+
...options
|
|
1433
|
+
});
|
|
1434
|
+
|
|
1435
|
+
const effectivePlacements = [
|
|
1436
|
+
"top",
|
|
1437
|
+
"bottom",
|
|
1438
|
+
"right",
|
|
1439
|
+
"left",
|
|
1440
|
+
"top-start",
|
|
1441
|
+
"top-end",
|
|
1442
|
+
"bottom-start",
|
|
1443
|
+
"bottom-end",
|
|
1444
|
+
"right-start",
|
|
1445
|
+
"right-end",
|
|
1446
|
+
"left-start",
|
|
1447
|
+
"left-end"
|
|
1448
|
+
];
|
|
1449
|
+
const defaultMenuPlacement = "bottom-start";
|
|
1450
|
+
const FloatingCSS = {
|
|
1451
|
+
animation: "calcite-floating-ui-anim",
|
|
1452
|
+
animationActive: "calcite-floating-ui-anim--active"
|
|
1453
|
+
};
|
|
1454
|
+
function getMiddleware({ placement, disableFlip, flipPlacements, offsetDistance, offsetSkidding, arrowEl, type }) {
|
|
1455
|
+
const defaultMiddleware = [shift(), hide()];
|
|
1456
|
+
if (type === "menu") {
|
|
1457
|
+
return [
|
|
1458
|
+
...defaultMiddleware,
|
|
1459
|
+
flip({ fallbackPlacements: ["top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end"] })
|
|
1460
|
+
];
|
|
1461
|
+
}
|
|
1462
|
+
if (type === "popover" || type === "tooltip") {
|
|
1463
|
+
const middleware = [
|
|
1464
|
+
...defaultMiddleware,
|
|
1465
|
+
offset({
|
|
1466
|
+
mainAxis: typeof offsetDistance === "number" ? offsetDistance : 0,
|
|
1467
|
+
crossAxis: typeof offsetSkidding === "number" ? offsetSkidding : 0
|
|
1468
|
+
})
|
|
1469
|
+
];
|
|
1470
|
+
if (placement === "auto" || placement === "auto-start" || placement === "auto-end") {
|
|
1471
|
+
middleware.push(autoPlacement({ alignment: placement === "auto-start" ? "start" : placement === "auto-end" ? "end" : null }));
|
|
1472
|
+
}
|
|
1473
|
+
else if (!disableFlip) {
|
|
1474
|
+
middleware.push(flip(flipPlacements ? { fallbackPlacements: flipPlacements } : {}));
|
|
1475
|
+
}
|
|
1476
|
+
if (arrowEl) {
|
|
1477
|
+
middleware.push(arrow({
|
|
1478
|
+
element: arrowEl
|
|
1479
|
+
}));
|
|
1480
|
+
}
|
|
1481
|
+
return middleware;
|
|
1482
|
+
}
|
|
1483
|
+
return [];
|
|
1484
|
+
}
|
|
1485
|
+
function filterComputedPlacements(placements, el) {
|
|
1486
|
+
const filteredPlacements = placements.filter((placement) => effectivePlacements.includes(placement));
|
|
1487
|
+
if (filteredPlacements.length !== placements.length) {
|
|
1488
|
+
console.warn(`${el.tagName}: Invalid value found in: flipPlacements. Try any of these: ${effectivePlacements
|
|
1489
|
+
.map((placement) => `"${placement}"`)
|
|
1490
|
+
.join(", ")
|
|
1491
|
+
.trim()}`, { el });
|
|
1492
|
+
}
|
|
1493
|
+
return filteredPlacements;
|
|
1494
|
+
}
|
|
1495
|
+
/*
|
|
1496
|
+
In floating-ui, "*-start" and "*-end" are already flipped in RTL.
|
|
1497
|
+
There is no need for our "*-leading" and "*-trailing" values anymore.
|
|
1498
|
+
https://github.com/floating-ui/floating-ui/issues/1530
|
|
1499
|
+
https://github.com/floating-ui/floating-ui/issues/1563
|
|
1500
|
+
*/
|
|
1501
|
+
function getEffectivePlacement(floatingEl, placement) {
|
|
1502
|
+
const placements = ["left", "right"];
|
|
1503
|
+
if (getElementDir(floatingEl) === "rtl") {
|
|
1504
|
+
placements.reverse();
|
|
1505
|
+
}
|
|
1506
|
+
return placement
|
|
1507
|
+
.replace(/-leading/gi, "-start")
|
|
1508
|
+
.replace(/-trailing/gi, "-end")
|
|
1509
|
+
.replace(/leading/gi, placements[0])
|
|
1510
|
+
.replace(/trailing/gi, placements[1]);
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Positions the floating element relative to the reference element.
|
|
1514
|
+
*
|
|
1515
|
+
* @param root0
|
|
1516
|
+
* @param root0.referenceEl
|
|
1517
|
+
* @param root0.floatingEl
|
|
1518
|
+
* @param root0.overlayPositioning
|
|
1519
|
+
* @param root0.placement
|
|
1520
|
+
* @param root0.disableFlip
|
|
1521
|
+
* @param root0.flipPlacements
|
|
1522
|
+
* @param root0.offsetDistance
|
|
1523
|
+
* @param root0.offsetSkidding
|
|
1524
|
+
* @param root0.arrowEl
|
|
1525
|
+
* @param root0.type
|
|
1526
|
+
*/
|
|
1527
|
+
async function positionFloatingUI({ referenceEl, floatingEl, overlayPositioning = "absolute", placement, disableFlip, flipPlacements, offsetDistance, offsetSkidding, arrowEl, type }) {
|
|
1528
|
+
var _a;
|
|
1529
|
+
if (!referenceEl || !floatingEl) {
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1532
|
+
const { x, y, placement: effectivePlacement, strategy: position, middlewareData } = await computePosition(referenceEl, floatingEl, {
|
|
1533
|
+
strategy: overlayPositioning,
|
|
1534
|
+
placement: placement === "auto" || placement === "auto-start" || placement === "auto-end"
|
|
1535
|
+
? undefined
|
|
1536
|
+
: getEffectivePlacement(floatingEl, placement),
|
|
1537
|
+
middleware: getMiddleware({
|
|
1538
|
+
placement,
|
|
1539
|
+
disableFlip,
|
|
1540
|
+
flipPlacements,
|
|
1541
|
+
offsetDistance,
|
|
1542
|
+
offsetSkidding,
|
|
1543
|
+
arrowEl,
|
|
1544
|
+
type
|
|
1545
|
+
})
|
|
1546
|
+
});
|
|
1547
|
+
if (middlewareData === null || middlewareData === void 0 ? void 0 : middlewareData.arrow) {
|
|
1548
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
1549
|
+
Object.assign(arrowEl.style, {
|
|
1550
|
+
left: arrowX != null ? `${arrowX}px` : "",
|
|
1551
|
+
top: arrowY != null ? `${arrowY}px` : ""
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
const referenceHidden = (_a = middlewareData === null || middlewareData === void 0 ? void 0 : middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden;
|
|
1555
|
+
const visibility = referenceHidden ? "hidden" : null;
|
|
1556
|
+
const pointerEvents = visibility ? "none" : null;
|
|
1557
|
+
floatingEl.setAttribute("data-placement", effectivePlacement);
|
|
1558
|
+
const transform = `translate(${Math.round(x)}px,${Math.round(y)}px)`;
|
|
1559
|
+
Object.assign(floatingEl.style, {
|
|
1560
|
+
visibility,
|
|
1561
|
+
pointerEvents,
|
|
1562
|
+
position,
|
|
1563
|
+
top: "0",
|
|
1564
|
+
left: "0",
|
|
1565
|
+
transform
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
const cleanupMap = new WeakMap();
|
|
1569
|
+
/**
|
|
1570
|
+
* Helper to set up floating element interactions on connectedCallback.
|
|
1571
|
+
*
|
|
1572
|
+
* @param component
|
|
1573
|
+
* @param referenceEl
|
|
1574
|
+
* @param floatingEl
|
|
1575
|
+
*/
|
|
1576
|
+
function connectFloatingUI(component, referenceEl, floatingEl) {
|
|
1577
|
+
if (!floatingEl || !referenceEl) {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
disconnectFloatingUI(component, referenceEl, floatingEl);
|
|
1581
|
+
cleanupMap.set(component, autoUpdate(referenceEl, floatingEl, () => {
|
|
1582
|
+
if (component.open) {
|
|
1583
|
+
component.reposition();
|
|
1584
|
+
}
|
|
1585
|
+
}));
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* Helper to tear down floating element interactions on disconnectedCallback.
|
|
1589
|
+
*
|
|
1590
|
+
* @param component
|
|
1591
|
+
* @param referenceEl
|
|
1592
|
+
* @param floatingEl
|
|
1593
|
+
*/
|
|
1594
|
+
function disconnectFloatingUI(component, referenceEl, floatingEl) {
|
|
1595
|
+
if (!floatingEl || !referenceEl) {
|
|
1596
|
+
return;
|
|
1597
|
+
}
|
|
1598
|
+
const cleanup = cleanupMap.get(component);
|
|
1599
|
+
if (cleanup) {
|
|
1600
|
+
cleanup();
|
|
1601
|
+
}
|
|
1602
|
+
cleanupMap.delete(component);
|
|
1603
|
+
}
|
|
1604
|
+
const visiblePointerSize = 4;
|
|
1605
|
+
/**
|
|
1606
|
+
* Default offset the position of the floating element away from the reference element.
|
|
1607
|
+
*
|
|
1608
|
+
* @default 6
|
|
1609
|
+
*/
|
|
1610
|
+
const defaultOffsetDistance = Math.ceil(Math.hypot(visiblePointerSize, visiblePointerSize));
|
|
1611
|
+
|
|
1612
|
+
export { FloatingCSS as F, disconnectFloatingUI as a, defaultMenuPlacement as b, connectFloatingUI as c, defaultOffsetDistance as d, filterComputedPlacements as f, positionFloatingUI as p };
|