@vertexvis/ui 0.1.5-testing.0 → 1.0.0-testing.1
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/cjs/components.cjs.js +14 -84
- package/dist/cjs/{dom-a2c535e3.js → dom-v38DVhe2.js} +4 -4
- package/dist/cjs/icon-helper-ut8vR2Rk.js +559 -0
- package/dist/cjs/index-D-R2lvls.js +62 -0
- package/dist/cjs/index-DihxupoM.js +95 -0
- package/dist/cjs/index-DwS9D24e.js +2230 -0
- package/dist/cjs/index.cjs.js +91 -92
- package/dist/cjs/{lib-1bd1e383.js → lib-CCXuRx1c.js} +2 -2
- package/dist/cjs/loader.cjs.js +5 -15
- package/dist/cjs/slots-DEdmqbtw.js +29 -0
- package/dist/cjs/templates-C_WUWcnZ.js +230 -0
- package/dist/cjs/tslib.es6-AsLBQn5u.js +68 -0
- package/dist/cjs/vertex-auto-resize-textarea.cjs.entry.js +132 -5
- package/dist/cjs/vertex-avatar-group.cjs.entry.js +12 -5
- package/dist/cjs/vertex-avatar.cjs.entry.js +44 -6
- package/dist/cjs/vertex-badge.cjs.entry.js +21 -6
- package/dist/cjs/vertex-banner.cjs.entry.js +122 -7
- package/dist/cjs/vertex-button.cjs.entry.js +83 -6
- package/dist/cjs/vertex-card-group.cjs.entry.js +34 -6
- package/dist/cjs/vertex-card.cjs.entry.js +33 -5
- package/dist/cjs/vertex-chip.cjs.entry.js +28 -6
- package/dist/cjs/vertex-click-to-edit-textfield.cjs.entry.js +112 -7
- package/dist/cjs/vertex-collapsible.cjs.entry.js +22 -6
- package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +142 -6
- package/dist/cjs/vertex-color-picker.cjs.entry.js +67 -7
- package/dist/cjs/vertex-color-swatch.cjs.entry.js +141 -7
- package/dist/cjs/vertex-context-menu.cjs.entry.js +91 -6
- package/dist/cjs/vertex-dialog.cjs.entry.js +226 -5
- package/dist/cjs/vertex-draggable-popover.cjs.entry.js +79 -6
- package/dist/cjs/vertex-dropdown-menu.cjs.entry.js +34 -6
- package/dist/cjs/vertex-expandable.cjs.entry.js +101 -6
- package/dist/cjs/vertex-help-tooltip.cjs.entry.js +36 -5
- package/dist/cjs/vertex-icon-button.cjs.entry.js +58 -7
- package/dist/cjs/vertex-icon.cjs.entry.js +29 -7
- package/dist/cjs/vertex-logo-loading.cjs.entry.js +12 -5
- package/dist/cjs/vertex-menu-divider.cjs.entry.js +12 -5
- package/dist/cjs/vertex-menu-item.cjs.entry.js +24 -6
- package/dist/cjs/vertex-menu.cjs.entry.js +80 -6
- package/dist/cjs/vertex-popover.cjs.entry.js +1894 -5
- package/dist/cjs/vertex-radio-group.cjs.entry.js +73 -5
- package/dist/cjs/vertex-radio.cjs.entry.js +29 -6
- package/dist/cjs/vertex-resizable.cjs.entry.js +439 -7
- package/dist/cjs/vertex-result-list.cjs.entry.js +300 -7
- package/dist/cjs/vertex-search-bar.cjs.entry.js +528 -7
- package/dist/cjs/vertex-select.cjs.entry.js +181 -6
- package/dist/cjs/vertex-slider.cjs.entry.js +55 -7
- package/dist/cjs/vertex-spinner.cjs.entry.js +32 -6
- package/dist/cjs/vertex-tab.cjs.entry.js +20 -6
- package/dist/cjs/vertex-tabs.cjs.entry.js +104 -6
- package/dist/cjs/vertex-textfield.cjs.entry.js +147 -7
- package/dist/cjs/vertex-toast.cjs.entry.js +109 -6
- package/dist/cjs/vertex-toggle.cjs.entry.js +47 -6
- package/dist/cjs/vertex-tooltip.cjs.entry.js +343 -8
- package/dist/collection/collection-manifest.json +44 -43
- package/dist/collection/components/auto-resize-textarea/auto-resize-textarea.js +222 -213
- package/dist/collection/components/auto-resize-textarea/utils.js +1 -1
- package/dist/collection/components/avatar/avatar.js +153 -137
- package/dist/collection/components/avatar-group/avatar-group.js +16 -16
- package/dist/collection/components/badge/badge.js +75 -66
- package/dist/collection/components/banner/banner.js +284 -247
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +274 -230
- package/dist/collection/components/card/card.js +89 -76
- package/dist/collection/components/card-group/card-group.js +104 -89
- package/dist/collection/components/chip/chip.js +89 -73
- package/dist/collection/components/click-to-edit-text-field/click-to-edit-text-field.js +412 -373
- package/dist/collection/components/collapsible/collapsible.js +71 -65
- package/dist/collection/components/color-circle-picker/color-circle-picker.js +398 -312
- package/dist/collection/components/color-picker/color-picker.js +225 -186
- package/dist/collection/components/color-swatch/color-swatch.js +341 -272
- package/dist/collection/components/color-swatch/lib.js +2 -2
- package/dist/collection/components/context-menu/context-menu.js +168 -161
- package/dist/collection/components/dialog/dialog.js +332 -323
- package/dist/collection/components/dialog/lib.js +4 -4
- package/dist/collection/components/draggable-popover/draggable-popover.js +182 -175
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +122 -108
- package/dist/collection/components/expandable/expandable.js +272 -224
- package/dist/collection/components/help-tooltip/help-tooltip.js +132 -118
- package/dist/collection/components/icon/icon-helper.js +414 -414
- package/dist/collection/components/icon/icon.js +91 -75
- package/dist/collection/components/icon/icons/adjustments.js +1 -1
- package/dist/collection/components/icon/icons/align-to-global.js +1 -1
- package/dist/collection/components/icon/icons/align-to-part.js +1 -1
- package/dist/collection/components/icon/icons/align-to-surface.js +1 -1
- package/dist/collection/components/icon/icons/align-view-to-plane.js +1 -1
- package/dist/collection/components/icon/icons/annotation.js +1 -1
- package/dist/collection/components/icon/icons/arrow-filled.js +1 -1
- package/dist/collection/components/icon/icons/arrow-left-circled.js +1 -1
- package/dist/collection/components/icon/icons/arrow-line-left.js +1 -1
- package/dist/collection/components/icon/icons/arrow-line-right.js +1 -1
- package/dist/collection/components/icon/icons/arrow-partial.js +1 -1
- package/dist/collection/components/icon/icons/arrow-right-circled.js +2 -2
- package/dist/collection/components/icon/icons/arrow-swap.js +1 -1
- package/dist/collection/components/icon/icons/arrow-triangle-left.js +1 -1
- package/dist/collection/components/icon/icons/arrow-triangle-right.js +1 -1
- package/dist/collection/components/icon/icons/arrow-up-circled.js +1 -1
- package/dist/collection/components/icon/icons/attachment.js +1 -1
- package/dist/collection/components/icon/icons/axis-x.js +1 -1
- package/dist/collection/components/icon/icons/axis-y.js +1 -1
- package/dist/collection/components/icon/icons/axis-z.js +1 -1
- package/dist/collection/components/icon/icons/back.js +1 -1
- package/dist/collection/components/icon/icons/box-cursor.js +1 -1
- package/dist/collection/components/icon/icons/box-select.js +1 -1
- package/dist/collection/components/icon/icons/camera-add.js +1 -1
- package/dist/collection/components/icon/icons/camera.js +1 -1
- package/dist/collection/components/icon/icons/caret-down.js +1 -1
- package/dist/collection/components/icon/icons/caret-left.js +1 -1
- package/dist/collection/components/icon/icons/caret-right.js +1 -1
- package/dist/collection/components/icon/icons/caret-up.js +1 -1
- package/dist/collection/components/icon/icons/caution.js +1 -1
- package/dist/collection/components/icon/icons/check-circle.js +1 -1
- package/dist/collection/components/icon/icons/check.js +1 -1
- package/dist/collection/components/icon/icons/chevron-down.js +1 -1
- package/dist/collection/components/icon/icons/chevron-left.js +1 -1
- package/dist/collection/components/icon/icons/chevron-right.js +1 -1
- package/dist/collection/components/icon/icons/chevron-up.js +1 -1
- package/dist/collection/components/icon/icons/circle-outline.js +1 -1
- package/dist/collection/components/icon/icons/close-circle-fill.js +1 -1
- package/dist/collection/components/icon/icons/close-circle.js +1 -1
- package/dist/collection/components/icon/icons/close.js +1 -1
- package/dist/collection/components/icon/icons/collapse-all.js +1 -1
- package/dist/collection/components/icon/icons/columns-add.js +1 -1
- package/dist/collection/components/icon/icons/columns.js +1 -1
- package/dist/collection/components/icon/icons/comment-add.js +1 -1
- package/dist/collection/components/icon/icons/comment-filled.js +1 -1
- package/dist/collection/components/icon/icons/comment-reopen.js +1 -1
- package/dist/collection/components/icon/icons/comment-resolve.js +1 -1
- package/dist/collection/components/icon/icons/comment-show.js +1 -1
- package/dist/collection/components/icon/icons/compare.js +1 -1
- package/dist/collection/components/icon/icons/compress.js +1 -1
- package/dist/collection/components/icon/icons/copy.js +1 -1
- package/dist/collection/components/icon/icons/cross-section.js +1 -1
- package/dist/collection/components/icon/icons/cube-orthographic.js +1 -1
- package/dist/collection/components/icon/icons/cube-perspective.js +1 -1
- package/dist/collection/components/icon/icons/cube-stack.js +1 -1
- package/dist/collection/components/icon/icons/delete.js +1 -1
- package/dist/collection/components/icon/icons/download.js +1 -1
- package/dist/collection/components/icon/icons/drag-indicator.js +1 -1
- package/dist/collection/components/icon/icons/ellipse.js +1 -1
- package/dist/collection/components/icon/icons/error-circle.js +1 -1
- package/dist/collection/components/icon/icons/expand-all.js +1 -1
- package/dist/collection/components/icon/icons/expand.js +1 -1
- package/dist/collection/components/icon/icons/export.js +1 -1
- package/dist/collection/components/icon/icons/file-folder.js +1 -1
- package/dist/collection/components/icon/icons/file-pdf.js +1 -1
- package/dist/collection/components/icon/icons/file.js +1 -1
- package/dist/collection/components/icon/icons/fit-all.js +1 -1
- package/dist/collection/components/icon/icons/fit-selected.js +1 -1
- package/dist/collection/components/icon/icons/flip.js +1 -1
- package/dist/collection/components/icon/icons/folder-plus.js +1 -1
- package/dist/collection/components/icon/icons/forward.js +1 -1
- package/dist/collection/components/icon/icons/gear.js +1 -1
- package/dist/collection/components/icon/icons/help.js +1 -1
- package/dist/collection/components/icon/icons/info.js +1 -1
- package/dist/collection/components/icon/icons/invert.js +1 -1
- package/dist/collection/components/icon/icons/label-off.js +1 -1
- package/dist/collection/components/icon/icons/label.js +1 -1
- package/dist/collection/components/icon/icons/line-dot-left.js +1 -1
- package/dist/collection/components/icon/icons/line-dot-right.js +1 -1
- package/dist/collection/components/icon/icons/line-hash-left.js +1 -1
- package/dist/collection/components/icon/icons/line-hash-right.js +1 -1
- package/dist/collection/components/icon/icons/line.js +1 -1
- package/dist/collection/components/icon/icons/locate.js +1 -1
- package/dist/collection/components/icon/icons/lock-closed.js +1 -1
- package/dist/collection/components/icon/icons/lock-open.js +1 -1
- package/dist/collection/components/icon/icons/markup.js +1 -1
- package/dist/collection/components/icon/icons/menu.js +1 -1
- package/dist/collection/components/icon/icons/notification.js +1 -1
- package/dist/collection/components/icon/icons/open-window.js +1 -1
- package/dist/collection/components/icon/icons/open.js +1 -1
- package/dist/collection/components/icon/icons/pan.js +1 -1
- package/dist/collection/components/icon/icons/paper-airplane.js +1 -1
- package/dist/collection/components/icon/icons/paste.js +1 -1
- package/dist/collection/components/icon/icons/pencil.js +1 -1
- package/dist/collection/components/icon/icons/person-height.js +1 -1
- package/dist/collection/components/icon/icons/person-run.js +1 -1
- package/dist/collection/components/icon/icons/person-short.js +1 -1
- package/dist/collection/components/icon/icons/person-tall.js +1 -1
- package/dist/collection/components/icon/icons/person-walk.js +1 -1
- package/dist/collection/components/icon/icons/pin-fill.js +1 -1
- package/dist/collection/components/icon/icons/pin-line.js +1 -1
- package/dist/collection/components/icon/icons/pin-text-fill.js +1 -1
- package/dist/collection/components/icon/icons/pin-text-square.js +1 -1
- package/dist/collection/components/icon/icons/pin-text.js +1 -1
- package/dist/collection/components/icon/icons/plus-with-arrow.js +1 -1
- package/dist/collection/components/icon/icons/plus.js +1 -1
- package/dist/collection/components/icon/icons/pmi.js +1 -1
- package/dist/collection/components/icon/icons/precise-measurement.js +1 -1
- package/dist/collection/components/icon/icons/rabbit.js +1 -1
- package/dist/collection/components/icon/icons/refresh.js +1 -1
- package/dist/collection/components/icon/icons/rename.js +1 -1
- package/dist/collection/components/icon/icons/report.js +1 -1
- package/dist/collection/components/icon/icons/reset.js +1 -1
- package/dist/collection/components/icon/icons/resize.js +1 -1
- package/dist/collection/components/icon/icons/rotate.js +1 -1
- package/dist/collection/components/icon/icons/ruler.js +1 -1
- package/dist/collection/components/icon/icons/scissors.js +1 -1
- package/dist/collection/components/icon/icons/search.js +1 -1
- package/dist/collection/components/icon/icons/show-only-nearby.js +1 -1
- package/dist/collection/components/icon/icons/snapshots.js +1 -1
- package/dist/collection/components/icon/icons/square-dot-outline.js +1 -1
- package/dist/collection/components/icon/icons/star.js +1 -1
- package/dist/collection/components/icon/icons/tag.js +1 -1
- package/dist/collection/components/icon/icons/tape-measure.js +1 -1
- package/dist/collection/components/icon/icons/teleport-and-align.js +1 -1
- package/dist/collection/components/icon/icons/teleport-toward.js +1 -1
- package/dist/collection/components/icon/icons/teleport.js +1 -1
- package/dist/collection/components/icon/icons/triad.js +1 -1
- package/dist/collection/components/icon/icons/turtle.js +1 -1
- package/dist/collection/components/icon/icons/update.js +1 -1
- package/dist/collection/components/icon/icons/version-history.js +1 -1
- package/dist/collection/components/icon/icons/views.js +1 -1
- package/dist/collection/components/icon/icons/visibility-hidden.js +1 -1
- package/dist/collection/components/icon/icons/visibility-partial.js +1 -1
- package/dist/collection/components/icon/icons/visibility-visible.js +1 -1
- package/dist/collection/components/icon/icons/workspace-add.js +1 -1
- package/dist/collection/components/icon/icons/zoom.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +5 -2
- package/dist/collection/components/icon-button/icon-button.js +190 -152
- package/dist/collection/components/logo-loading/logo-loading.js +16 -16
- package/dist/collection/components/menu/menu.js +286 -250
- package/dist/collection/components/menu-divider/menu-divider.js +16 -16
- package/dist/collection/components/menu-item/menu-item.js +54 -48
- package/dist/collection/components/popover/middleware.js +22 -22
- package/dist/collection/components/popover/popover.js +654 -567
- package/dist/collection/components/popover/util.js +7 -7
- package/dist/collection/components/radio/radio.js +157 -145
- package/dist/collection/components/radio-group/radio-group.js +135 -133
- package/dist/collection/components/resizable/resizable.js +758 -702
- package/dist/collection/components/result-list/lib.js +6 -6
- package/dist/collection/components/result-list/result-list.js +456 -431
- package/dist/collection/components/search-bar/dom.js +13 -13
- package/dist/collection/components/search-bar/lib.js +50 -50
- package/dist/collection/components/search-bar/search-bar.js +739 -661
- package/dist/collection/components/select/select.css +7 -2
- package/dist/collection/components/select/select.js +332 -303
- package/dist/collection/components/slider/slider.js +258 -220
- package/dist/collection/components/spinner/spinner.js +93 -77
- package/dist/collection/components/tab/tab.js +86 -83
- package/dist/collection/components/tab/util.js +1 -1
- package/dist/collection/components/tabs/tabs.js +150 -151
- package/dist/collection/components/text-field/text-field.js +637 -572
- package/dist/collection/components/toast/toast.js +266 -228
- package/dist/collection/components/toggle/toggle.js +139 -119
- package/dist/collection/components/tooltip/tooltip.js +280 -247
- package/dist/collection/types/icon.js +137 -137
- package/dist/collection/util/components/dom.js +5 -5
- package/dist/collection/util/components/slots.js +17 -17
- package/dist/collection/util/templates/binding.js +121 -121
- package/dist/collection/util/templates/element-pool.js +79 -79
- package/dist/collection/util/templates/templates.js +15 -15
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.d.ts +6 -42
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -52
- package/dist/components/p-00eaa8d7.entry.js +1 -0
- package/dist/components/p-0180556d.entry.js +1 -0
- package/dist/components/p-091b9e27.entry.js +1 -0
- package/dist/components/p-0af9b71c.entry.js +1 -0
- package/dist/components/p-0bd4222b.entry.js +1 -0
- package/dist/components/p-0c389e6f.entry.js +1 -0
- package/dist/{esm/toggle-1fe22e4f.js → components/p-0f13f6f3.entry.js} +1 -38
- package/dist/components/p-1KuzBK7Z.js +1 -0
- package/dist/components/p-1c5e8df5.entry.js +1 -0
- package/dist/components/p-1e6ff76a.entry.js +1 -0
- package/dist/components/p-26f9abc0.entry.js +1 -0
- package/dist/components/p-28460604.entry.js +1 -0
- package/dist/components/p-2cdfe6bf.entry.js +1 -0
- package/dist/components/p-2e0ee616.entry.js +1 -0
- package/dist/components/p-34d8a04e.entry.js +1 -0
- package/dist/components/p-3ddb0c4e.entry.js +1 -0
- package/dist/components/p-4HdACFFW.js +1 -0
- package/dist/components/p-553d01af.entry.js +1 -0
- package/dist/components/p-595b8bd6.entry.js +1 -0
- package/dist/components/p-5c032b37.entry.js +1 -0
- package/dist/components/p-5e3fe5e7.entry.js +1 -0
- package/dist/components/p-61742c05.entry.js +1 -0
- package/dist/components/p-6b2db72c.entry.js +1 -0
- package/dist/components/p-6c6a2fc5.entry.js +1 -0
- package/dist/components/p-6d03a954.entry.js +1 -0
- package/dist/components/p-6qoO8Yf3.js +1 -0
- package/dist/components/p-705d25f3.entry.js +1 -0
- package/dist/components/p-7f768637.entry.js +1 -0
- package/dist/components/p-8358ad1c.entry.js +1 -0
- package/dist/components/p-88781e72.entry.js +1 -0
- package/dist/components/p-B-yvbsY0.js +1 -0
- package/dist/components/p-B23i1cwy.js +1 -0
- package/dist/components/p-B2oECB2P.js +1 -0
- package/dist/components/p-B9qe9CNv.js +1 -0
- package/dist/components/p-BAfJR2VF.js +1 -0
- package/dist/components/p-BHmM6WC-.js +1 -0
- package/dist/components/p-BLc3P-0q.js +1 -0
- package/dist/components/{p-1356f525.js → p-BSoicxl1.js} +1 -1
- package/dist/components/p-BZ5oF5Ci.js +1 -0
- package/dist/components/p-BZutc-CC.js +1 -0
- package/dist/components/p-BbDaHMlz.js +1 -0
- package/dist/components/p-BdR40EV2.js +1 -0
- package/dist/components/p-Beav1bNT.js +6 -0
- package/dist/components/p-Bo65Viuh.js +1 -0
- package/dist/components/p-ByQGREpQ.js +1 -0
- package/dist/components/p-C1H5-_5m.js +1 -0
- package/dist/components/p-C1qwHMcr.js +1 -0
- package/dist/components/p-C27tS7nl.js +2 -0
- package/dist/components/p-C7VaFE8W.js +1 -0
- package/dist/components/p-CAFdRyLE.js +1 -0
- package/dist/components/p-CDYHYPYF.js +1 -0
- package/dist/components/p-CFaiLAq0.js +1 -0
- package/dist/components/{p-59032668.js → p-CIs0DJX1.js} +1 -1
- package/dist/components/p-CZ1Qa_xv.js +1 -0
- package/dist/components/p-CZyp2id8.js +1 -0
- package/dist/components/p-Ci26QjYl.js +1 -0
- package/dist/components/p-D1P5FeY6.js +1 -0
- package/dist/components/p-D3BXoJJN.js +1 -0
- package/dist/components/p-DEpMfvdS.js +1 -0
- package/dist/components/p-DGZHaSjz.js +1 -0
- package/dist/components/p-DHNuRvq0.js +1 -0
- package/dist/components/p-DMLgHhJc.js +1 -0
- package/dist/components/p-DO6VjClS.js +1 -0
- package/dist/components/p-DPgx10Cw.js +1 -0
- package/dist/components/p-DXQBJLz-.js +1 -0
- package/dist/components/p-D_mp9WMh.js +1 -0
- package/dist/components/p-De54LBPx.js +1 -0
- package/dist/components/p-DjrAIJhB.js +1 -0
- package/dist/components/p-DsAkiOMC.js +1 -0
- package/dist/components/p-Dw5WRKyY.js +1 -0
- package/dist/components/p-ILu24ZUX.js +1 -0
- package/dist/components/p-K5a7HQMt.js +1 -0
- package/dist/components/p-KilWQmEJ.js +1 -0
- package/dist/components/p-Mnv_zHXq.js +1 -0
- package/dist/components/p-RaMDrnzd.js +1 -0
- package/dist/components/p-TLO_pywp.js +1 -0
- package/dist/components/p-_3Hgy0Z4.js +1 -0
- package/dist/components/p-a287d016.entry.js +1 -0
- package/dist/components/p-a886721b.entry.js +1 -0
- package/dist/components/p-a8e75bdc.entry.js +1 -0
- package/dist/components/p-al_CUADF.js +1 -0
- package/dist/components/p-b5921385.entry.js +1 -0
- package/dist/components/p-c2f3cf8b.entry.js +1 -0
- package/dist/components/p-ca6a4b08.entry.js +1 -0
- package/dist/components/p-e311af0e.entry.js +1 -0
- package/dist/components/p-eYTN_sVb.js +1 -0
- package/dist/components/p-edfd86c9.entry.js +1 -0
- package/dist/components/p-ef419ddf.entry.js +1 -0
- package/dist/components/p-efd0223b.entry.js +1 -0
- package/dist/components/p-f1abef98.entry.js +1 -0
- package/dist/components/p-f23df530.entry.js +1 -0
- package/dist/components/p-f37dc3c4.entry.js +1 -0
- package/dist/components/p-f793f80a.entry.js +1 -0
- package/dist/components/p-y4p55dbx.js +1 -0
- package/dist/components/vertex-auto-resize-textarea.d.ts +2 -2
- package/dist/components/vertex-auto-resize-textarea.js +1 -6
- package/dist/components/vertex-avatar-group.d.ts +2 -2
- package/dist/components/vertex-avatar-group.js +1 -34
- package/dist/components/vertex-avatar.d.ts +2 -2
- package/dist/components/vertex-avatar.js +1 -68
- package/dist/components/vertex-badge.d.ts +2 -2
- package/dist/components/vertex-badge.js +1 -43
- package/dist/components/vertex-banner.d.ts +2 -2
- package/dist/components/vertex-banner.js +1 -141
- package/dist/components/vertex-button.d.ts +2 -2
- package/dist/components/vertex-button.js +1 -96
- package/dist/components/vertex-card-group.d.ts +2 -2
- package/dist/components/vertex-card-group.js +1 -51
- package/dist/components/vertex-card.d.ts +2 -2
- package/dist/components/vertex-card.js +1 -49
- package/dist/components/vertex-chip.d.ts +2 -2
- package/dist/components/vertex-chip.js +1 -45
- package/dist/components/vertex-click-to-edit-textfield.d.ts +2 -2
- package/dist/components/vertex-click-to-edit-textfield.js +1 -156
- package/dist/components/vertex-collapsible.d.ts +2 -2
- package/dist/components/vertex-collapsible.js +1 -63
- package/dist/components/vertex-color-circle-picker.d.ts +2 -2
- package/dist/components/vertex-color-circle-picker.js +1 -131
- package/dist/components/vertex-color-picker.d.ts +2 -2
- package/dist/components/vertex-color-picker.js +1 -75
- package/dist/components/vertex-color-swatch.d.ts +2 -2
- package/dist/components/vertex-color-swatch.js +1 -6
- package/dist/components/vertex-context-menu.d.ts +2 -2
- package/dist/components/vertex-context-menu.js +1 -125
- package/dist/components/vertex-dialog.d.ts +2 -2
- package/dist/components/vertex-dialog.js +1 -265
- package/dist/components/vertex-draggable-popover.d.ts +2 -2
- package/dist/components/vertex-draggable-popover.js +1 -119
- package/dist/components/vertex-dropdown-menu.d.ts +2 -2
- package/dist/components/vertex-dropdown-menu.js +1 -64
- package/dist/components/vertex-expandable.d.ts +2 -2
- package/dist/components/vertex-expandable.js +1 -6
- package/dist/components/vertex-help-tooltip.d.ts +2 -2
- package/dist/components/vertex-help-tooltip.js +1 -67
- package/dist/components/vertex-icon-button.d.ts +2 -2
- package/dist/components/vertex-icon-button.js +1 -6
- package/dist/components/vertex-icon.d.ts +2 -2
- package/dist/components/vertex-icon.js +1 -6
- package/dist/components/vertex-logo-loading.d.ts +2 -2
- package/dist/components/vertex-logo-loading.js +1 -34
- package/dist/components/vertex-menu-divider.d.ts +2 -2
- package/dist/components/vertex-menu-divider.js +1 -34
- package/dist/components/vertex-menu-item.d.ts +2 -2
- package/dist/components/vertex-menu-item.js +1 -44
- package/dist/components/vertex-menu.d.ts +2 -2
- package/dist/components/vertex-menu.js +1 -6
- package/dist/components/vertex-popover.d.ts +2 -2
- package/dist/components/vertex-popover.js +1 -6
- package/dist/components/vertex-radio-group.d.ts +2 -2
- package/dist/components/vertex-radio-group.js +1 -98
- package/dist/components/vertex-radio.d.ts +2 -2
- package/dist/components/vertex-radio.js +1 -56
- package/dist/components/vertex-resizable.d.ts +2 -2
- package/dist/components/vertex-resizable.js +1 -463
- package/dist/components/vertex-result-list.d.ts +2 -2
- package/dist/components/vertex-result-list.js +1 -6
- package/dist/components/vertex-search-bar.d.ts +2 -2
- package/dist/components/vertex-search-bar.js +1 -568
- package/dist/components/vertex-select.d.ts +2 -2
- package/dist/components/vertex-select.js +1 -202
- package/dist/components/vertex-slider.d.ts +2 -2
- package/dist/components/vertex-slider.js +1 -81
- package/dist/components/vertex-spinner.d.ts +2 -2
- package/dist/components/vertex-spinner.js +1 -49
- package/dist/components/vertex-tab.d.ts +2 -2
- package/dist/components/vertex-tab.js +1 -46
- package/dist/components/vertex-tabs.d.ts +2 -2
- package/dist/components/vertex-tabs.js +1 -133
- package/dist/components/vertex-textfield.d.ts +2 -2
- package/dist/components/vertex-textfield.js +1 -6
- package/dist/components/vertex-toast.d.ts +2 -2
- package/dist/components/vertex-toast.js +1 -127
- package/dist/components/vertex-toggle.d.ts +2 -2
- package/dist/components/vertex-toggle.js +1 -67
- package/dist/components/vertex-tooltip.d.ts +2 -2
- package/dist/components/vertex-tooltip.js +1 -6
- package/dist/esm/components.js +14 -83
- package/dist/{components/dom.js → esm/dom-Oz9KwTs0.js} +4 -4
- package/dist/esm/icon-helper-Dw0fFePg.js +557 -0
- package/dist/esm/index-Beav1bNT.js +92 -0
- package/dist/esm/index-C27tS7nl.js +2219 -0
- package/dist/esm/index-DYRkgxax.js +60 -0
- package/dist/esm/index.js +50 -49
- package/dist/esm/{lib-73fbca8b.js → lib-DgySd_r0.js} +2 -2
- package/dist/esm/loader.js +6 -14
- package/dist/esm/slots-DXuCPm6v.js +26 -0
- package/dist/esm/templates-DZ8xV3--.js +228 -0
- package/dist/esm/tslib.es6-CIs0DJX1.js +65 -0
- package/dist/esm/vertex-auto-resize-textarea.entry.js +136 -3
- package/dist/esm/vertex-avatar-group.entry.js +15 -2
- package/dist/esm/vertex-avatar.entry.js +47 -3
- package/dist/esm/vertex-badge.entry.js +24 -3
- package/dist/esm/vertex-banner.entry.js +125 -4
- package/dist/esm/vertex-button.entry.js +86 -3
- package/dist/esm/vertex-card-group.entry.js +37 -3
- package/dist/esm/vertex-card.entry.js +36 -2
- package/dist/esm/vertex-chip.entry.js +31 -3
- package/dist/esm/vertex-click-to-edit-textfield.entry.js +114 -3
- package/dist/esm/vertex-collapsible.entry.js +25 -3
- package/dist/esm/vertex-color-circle-picker.entry.js +145 -3
- package/dist/esm/vertex-color-picker.entry.js +70 -4
- package/dist/esm/vertex-color-swatch.entry.js +144 -4
- package/dist/esm/vertex-context-menu.entry.js +93 -2
- package/dist/esm/vertex-dialog.entry.js +230 -3
- package/dist/esm/vertex-draggable-popover.entry.js +82 -3
- package/dist/esm/vertex-dropdown-menu.entry.js +36 -2
- package/dist/esm/vertex-expandable.entry.js +104 -3
- package/dist/esm/vertex-help-tooltip.entry.js +39 -2
- package/dist/esm/vertex-icon-button.entry.js +61 -4
- package/dist/esm/vertex-icon.entry.js +32 -4
- package/dist/esm/vertex-logo-loading.entry.js +15 -2
- package/dist/esm/vertex-menu-divider.entry.js +15 -2
- package/dist/esm/vertex-menu-item.entry.js +27 -3
- package/dist/esm/vertex-menu.entry.js +83 -3
- package/dist/esm/vertex-popover.entry.js +1898 -3
- package/dist/esm/vertex-radio-group.entry.js +76 -2
- package/dist/esm/vertex-radio.entry.js +32 -3
- package/dist/esm/vertex-resizable.entry.js +442 -4
- package/dist/esm/vertex-result-list.entry.js +304 -5
- package/dist/esm/vertex-search-bar.entry.js +532 -5
- package/dist/esm/vertex-select.entry.js +184 -3
- package/dist/esm/vertex-slider.entry.js +58 -4
- package/dist/esm/vertex-spinner.entry.js +35 -3
- package/dist/esm/vertex-tab.entry.js +23 -3
- package/dist/esm/vertex-tabs.entry.js +108 -4
- package/dist/esm/vertex-textfield.entry.js +149 -3
- package/dist/esm/vertex-toast.entry.js +112 -3
- package/dist/esm/vertex-toggle.entry.js +50 -3
- package/dist/esm/vertex-tooltip.entry.js +347 -6
- package/dist/types/components/auto-resize-textarea/auto-resize-textarea.d.ts +43 -43
- package/dist/types/components/avatar/avatar.d.ts +33 -33
- package/dist/types/components/avatar-group/avatar-group.d.ts +1 -1
- package/dist/types/components/badge/badge.d.ts +10 -10
- package/dist/types/components/banner/banner.d.ts +50 -50
- package/dist/types/components/button/button.d.ts +52 -52
- package/dist/types/components/card/card.d.ts +19 -19
- package/dist/types/components/card-group/card-group.d.ts +13 -13
- package/dist/types/components/chip/chip.d.ts +11 -11
- package/dist/types/components/click-to-edit-text-field/click-to-edit-text-field.d.ts +78 -78
- package/dist/types/components/collapsible/collapsible.d.ts +10 -10
- package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +89 -89
- package/dist/types/components/color-picker/color-picker.d.ts +46 -46
- package/dist/types/components/color-swatch/color-swatch.d.ts +69 -69
- package/dist/types/components/context-menu/context-menu.d.ts +33 -33
- package/dist/types/components/dialog/dialog.d.ts +55 -55
- package/dist/types/components/draggable-popover/draggable-popover.d.ts +32 -32
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +22 -22
- package/dist/types/components/expandable/expandable.d.ts +58 -58
- package/dist/types/components/help-tooltip/help-tooltip.d.ts +22 -22
- package/dist/types/components/icon/icon.d.ts +15 -15
- package/dist/types/components/icon/icons/adjustments.d.ts +0 -1
- package/dist/types/components/icon/icons/align-to-global.d.ts +0 -1
- package/dist/types/components/icon/icons/align-to-part.d.ts +0 -1
- package/dist/types/components/icon/icons/align-to-surface.d.ts +0 -1
- package/dist/types/components/icon/icons/align-view-to-plane.d.ts +0 -1
- package/dist/types/components/icon/icons/annotation.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-filled.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-left-circled.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-line-left.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-line-right.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-partial.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-right-circled.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-swap.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-triangle-left.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-triangle-right.d.ts +0 -1
- package/dist/types/components/icon/icons/arrow-up-circled.d.ts +0 -1
- package/dist/types/components/icon/icons/attachment.d.ts +0 -1
- package/dist/types/components/icon/icons/axis-x.d.ts +0 -1
- package/dist/types/components/icon/icons/axis-y.d.ts +0 -1
- package/dist/types/components/icon/icons/axis-z.d.ts +0 -1
- package/dist/types/components/icon/icons/back.d.ts +0 -1
- package/dist/types/components/icon/icons/box-cursor.d.ts +0 -1
- package/dist/types/components/icon/icons/box-select.d.ts +0 -1
- package/dist/types/components/icon/icons/camera-add.d.ts +0 -1
- package/dist/types/components/icon/icons/camera.d.ts +0 -1
- package/dist/types/components/icon/icons/caret-down.d.ts +0 -1
- package/dist/types/components/icon/icons/caret-left.d.ts +0 -1
- package/dist/types/components/icon/icons/caret-right.d.ts +0 -1
- package/dist/types/components/icon/icons/caret-up.d.ts +0 -1
- package/dist/types/components/icon/icons/caution.d.ts +0 -1
- package/dist/types/components/icon/icons/check-circle.d.ts +0 -1
- package/dist/types/components/icon/icons/check.d.ts +0 -1
- package/dist/types/components/icon/icons/chevron-down.d.ts +0 -1
- package/dist/types/components/icon/icons/chevron-left.d.ts +0 -1
- package/dist/types/components/icon/icons/chevron-right.d.ts +0 -1
- package/dist/types/components/icon/icons/chevron-up.d.ts +0 -1
- package/dist/types/components/icon/icons/circle-outline.d.ts +0 -1
- package/dist/types/components/icon/icons/close-circle-fill.d.ts +0 -1
- package/dist/types/components/icon/icons/close-circle.d.ts +0 -1
- package/dist/types/components/icon/icons/close.d.ts +0 -1
- package/dist/types/components/icon/icons/collapse-all.d.ts +0 -1
- package/dist/types/components/icon/icons/columns-add.d.ts +0 -1
- package/dist/types/components/icon/icons/columns.d.ts +0 -1
- package/dist/types/components/icon/icons/comment-add.d.ts +0 -1
- package/dist/types/components/icon/icons/comment-filled.d.ts +0 -1
- package/dist/types/components/icon/icons/comment-reopen.d.ts +0 -1
- package/dist/types/components/icon/icons/comment-resolve.d.ts +0 -1
- package/dist/types/components/icon/icons/comment-show.d.ts +0 -1
- package/dist/types/components/icon/icons/compare.d.ts +0 -1
- package/dist/types/components/icon/icons/compress.d.ts +0 -1
- package/dist/types/components/icon/icons/copy.d.ts +0 -1
- package/dist/types/components/icon/icons/cross-section.d.ts +0 -1
- package/dist/types/components/icon/icons/cube-orthographic.d.ts +0 -1
- package/dist/types/components/icon/icons/cube-perspective.d.ts +0 -1
- package/dist/types/components/icon/icons/cube-stack.d.ts +0 -1
- package/dist/types/components/icon/icons/delete.d.ts +0 -1
- package/dist/types/components/icon/icons/download.d.ts +0 -1
- package/dist/types/components/icon/icons/drag-indicator.d.ts +0 -1
- package/dist/types/components/icon/icons/ellipse.d.ts +0 -1
- package/dist/types/components/icon/icons/error-circle.d.ts +0 -1
- package/dist/types/components/icon/icons/expand-all.d.ts +0 -1
- package/dist/types/components/icon/icons/expand.d.ts +0 -1
- package/dist/types/components/icon/icons/export.d.ts +0 -1
- package/dist/types/components/icon/icons/file-folder.d.ts +0 -1
- package/dist/types/components/icon/icons/file-pdf.d.ts +0 -1
- package/dist/types/components/icon/icons/file.d.ts +0 -1
- package/dist/types/components/icon/icons/fit-all.d.ts +0 -1
- package/dist/types/components/icon/icons/fit-selected.d.ts +0 -1
- package/dist/types/components/icon/icons/flip.d.ts +0 -1
- package/dist/types/components/icon/icons/folder-plus.d.ts +0 -1
- package/dist/types/components/icon/icons/forward.d.ts +0 -1
- package/dist/types/components/icon/icons/gear.d.ts +0 -1
- package/dist/types/components/icon/icons/help.d.ts +0 -1
- package/dist/types/components/icon/icons/info.d.ts +0 -1
- package/dist/types/components/icon/icons/invert.d.ts +0 -1
- package/dist/types/components/icon/icons/label-off.d.ts +0 -1
- package/dist/types/components/icon/icons/label.d.ts +0 -1
- package/dist/types/components/icon/icons/line-dot-left.d.ts +0 -1
- package/dist/types/components/icon/icons/line-dot-right.d.ts +0 -1
- package/dist/types/components/icon/icons/line-hash-left.d.ts +0 -1
- package/dist/types/components/icon/icons/line-hash-right.d.ts +0 -1
- package/dist/types/components/icon/icons/line.d.ts +0 -1
- package/dist/types/components/icon/icons/locate.d.ts +0 -1
- package/dist/types/components/icon/icons/lock-closed.d.ts +0 -1
- package/dist/types/components/icon/icons/lock-open.d.ts +0 -1
- package/dist/types/components/icon/icons/markup.d.ts +0 -1
- package/dist/types/components/icon/icons/menu.d.ts +0 -1
- package/dist/types/components/icon/icons/notification.d.ts +0 -1
- package/dist/types/components/icon/icons/open-window.d.ts +0 -1
- package/dist/types/components/icon/icons/open.d.ts +0 -1
- package/dist/types/components/icon/icons/pan.d.ts +0 -1
- package/dist/types/components/icon/icons/paper-airplane.d.ts +0 -1
- package/dist/types/components/icon/icons/paste.d.ts +0 -1
- package/dist/types/components/icon/icons/pencil.d.ts +0 -1
- package/dist/types/components/icon/icons/person-height.d.ts +0 -1
- package/dist/types/components/icon/icons/person-run.d.ts +0 -1
- package/dist/types/components/icon/icons/person-short.d.ts +0 -1
- package/dist/types/components/icon/icons/person-tall.d.ts +0 -1
- package/dist/types/components/icon/icons/person-walk.d.ts +0 -1
- package/dist/types/components/icon/icons/pin-fill.d.ts +0 -1
- package/dist/types/components/icon/icons/pin-line.d.ts +0 -1
- package/dist/types/components/icon/icons/pin-text-fill.d.ts +0 -1
- package/dist/types/components/icon/icons/pin-text-square.d.ts +0 -1
- package/dist/types/components/icon/icons/pin-text.d.ts +0 -1
- package/dist/types/components/icon/icons/plus-with-arrow.d.ts +0 -1
- package/dist/types/components/icon/icons/plus.d.ts +0 -1
- package/dist/types/components/icon/icons/pmi.d.ts +0 -1
- package/dist/types/components/icon/icons/precise-measurement.d.ts +0 -1
- package/dist/types/components/icon/icons/rabbit.d.ts +0 -1
- package/dist/types/components/icon/icons/refresh.d.ts +0 -1
- package/dist/types/components/icon/icons/rename.d.ts +0 -1
- package/dist/types/components/icon/icons/report.d.ts +0 -1
- package/dist/types/components/icon/icons/reset.d.ts +0 -1
- package/dist/types/components/icon/icons/resize.d.ts +0 -1
- package/dist/types/components/icon/icons/rotate.d.ts +0 -1
- package/dist/types/components/icon/icons/ruler.d.ts +0 -1
- package/dist/types/components/icon/icons/scissors.d.ts +0 -1
- package/dist/types/components/icon/icons/search.d.ts +0 -1
- package/dist/types/components/icon/icons/show-only-nearby.d.ts +0 -1
- package/dist/types/components/icon/icons/snapshots.d.ts +0 -1
- package/dist/types/components/icon/icons/square-dot-outline.d.ts +0 -1
- package/dist/types/components/icon/icons/star.d.ts +0 -1
- package/dist/types/components/icon/icons/tag.d.ts +0 -1
- package/dist/types/components/icon/icons/tape-measure.d.ts +0 -1
- package/dist/types/components/icon/icons/teleport-and-align.d.ts +0 -1
- package/dist/types/components/icon/icons/teleport-toward.d.ts +0 -1
- package/dist/types/components/icon/icons/teleport.d.ts +0 -1
- package/dist/types/components/icon/icons/triad.d.ts +0 -1
- package/dist/types/components/icon/icons/turtle.d.ts +0 -1
- package/dist/types/components/icon/icons/update.d.ts +0 -1
- package/dist/types/components/icon/icons/version-history.d.ts +0 -1
- package/dist/types/components/icon/icons/views.d.ts +0 -1
- package/dist/types/components/icon/icons/visibility-hidden.d.ts +0 -1
- package/dist/types/components/icon/icons/visibility-partial.d.ts +0 -1
- package/dist/types/components/icon/icons/visibility-visible.d.ts +0 -1
- package/dist/types/components/icon/icons/workspace-add.d.ts +0 -1
- package/dist/types/components/icon/icons/zoom.d.ts +0 -1
- package/dist/types/components/icon-button/icon-button.d.ts +36 -36
- package/dist/types/components/logo-loading/logo-loading.d.ts +1 -1
- package/dist/types/components/menu/menu.d.ts +53 -53
- package/dist/types/components/menu-divider/menu-divider.d.ts +1 -1
- package/dist/types/components/menu-item/menu-item.d.ts +6 -6
- package/dist/types/components/popover/popover.d.ts +156 -156
- package/dist/types/components/radio/radio.d.ts +28 -28
- package/dist/types/components/radio-group/radio-group.d.ts +23 -23
- package/dist/types/components/resizable/resizable.d.ts +161 -161
- package/dist/types/components/result-list/result-list.d.ts +42 -42
- package/dist/types/components/result-list/types.d.ts +2 -2
- package/dist/types/components/search-bar/lib.d.ts +5 -5
- package/dist/types/components/search-bar/search-bar.d.ts +144 -144
- package/dist/types/components/select/select.d.ts +65 -65
- package/dist/types/components/slider/slider.d.ts +44 -44
- package/dist/types/components/spinner/spinner.d.ts +11 -11
- package/dist/types/components/tab/tab.d.ts +8 -8
- package/dist/types/components/tabs/tabs.d.ts +20 -20
- package/dist/types/components/text-field/text-field.d.ts +112 -112
- package/dist/types/components/toast/toast.d.ts +50 -50
- package/dist/types/components/toggle/toggle.d.ts +17 -17
- package/dist/types/components/tooltip/tooltip.d.ts +60 -60
- package/dist/types/components.d.ts +970 -90
- package/dist/types/stencil-public-runtime.d.ts +257 -34
- package/dist/types/types/icon.d.ts +137 -137
- package/dist/types/types/point.d.ts +2 -2
- package/dist/types/util/components/slots.d.ts +3 -3
- package/dist/types/util/templates/binding.d.ts +20 -20
- package/dist/types/util/templates/disposable.d.ts +4 -4
- package/dist/types/util/templates/element-pool.d.ts +19 -19
- package/dist/types/util/templates/templates.d.ts +2 -2
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +5 -2
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/package.json +61 -36
- package/dist/cjs/auto-resize-textarea-deb05359.js +0 -137
- package/dist/cjs/avatar-e69bb687.js +0 -45
- package/dist/cjs/avatar-group-d2af53e4.js +0 -17
- package/dist/cjs/badge-d39ac1fc.js +0 -23
- package/dist/cjs/banner-8325d5ca.js +0 -104
- package/dist/cjs/button-e63d25b1.js +0 -70
- package/dist/cjs/card-ae9e8a8f.js +0 -30
- package/dist/cjs/card-group-da93e610.js +0 -30
- package/dist/cjs/chip-a3b2e8e0.js +0 -25
- package/dist/cjs/click-to-edit-text-field-2c87ee66.js +0 -105
- package/dist/cjs/collapsible-50ea984c.js +0 -25
- package/dist/cjs/color-circle-picker-b0927289.js +0 -82
- package/dist/cjs/color-picker-6aa97d3b.js +0 -47
- package/dist/cjs/color-swatch-6d98da5f.js +0 -95
- package/dist/cjs/context-menu-664922cd.js +0 -91
- package/dist/cjs/dialog-34244fe1.js +0 -225
- package/dist/cjs/dom-ff96a4bc.js +0 -75
- package/dist/cjs/draggable-popover-125717a7.js +0 -83
- package/dist/cjs/dropdown-menu-5ae03a72.js +0 -31
- package/dist/cjs/expandable-b1cd4f0b.js +0 -72
- package/dist/cjs/help-tooltip-f72eccc7.js +0 -34
- package/dist/cjs/icon-ab3e2b83.js +0 -26
- package/dist/cjs/icon-button-9a6314cd.js +0 -43
- package/dist/cjs/icon-helper-b2117772.js +0 -785
- package/dist/cjs/index-6a92256c.js +0 -2152
- package/dist/cjs/index-e1b40fa6.js +0 -91
- package/dist/cjs/logo-loading-4d49fedf.js +0 -17
- package/dist/cjs/menu-bfc03108.js +0 -74
- package/dist/cjs/menu-divider-5bdebe5d.js +0 -17
- package/dist/cjs/menu-item-d213fd4d.js +0 -25
- package/dist/cjs/popover-942209b8.js +0 -1706
- package/dist/cjs/radio-bff991d2.js +0 -34
- package/dist/cjs/radio-group-11ecf8bf.js +0 -78
- package/dist/cjs/resizable-c0a69532.js +0 -423
- package/dist/cjs/result-list-241ffe8d.js +0 -304
- package/dist/cjs/search-bar-2e7ee35a.js +0 -527
- package/dist/cjs/select-554f3c11.js +0 -163
- package/dist/cjs/shadow-css-8eb74fbb.js +0 -389
- package/dist/cjs/slider-7714cccb.js +0 -44
- package/dist/cjs/slots-fb5ac359.js +0 -29
- package/dist/cjs/spinner-bb990a42.js +0 -29
- package/dist/cjs/tab-4335cd8f.js +0 -26
- package/dist/cjs/tabs-6f3e76e1.js +0 -111
- package/dist/cjs/templates-e7b3ffbb.js +0 -230
- package/dist/cjs/text-field-bccbde1f.js +0 -133
- package/dist/cjs/toast-bee7f47b.js +0 -90
- package/dist/cjs/toggle-a5dde469.js +0 -40
- package/dist/cjs/tooltip-634eb8c9.js +0 -333
- package/dist/cjs/tslib.es6-838fd860.js +0 -68
- package/dist/components/auto-resize-textarea.js +0 -157
- package/dist/components/color-swatch.js +0 -124
- package/dist/components/expandable.js +0 -100
- package/dist/components/icon-button.js +0 -63
- package/dist/components/icon-helper.js +0 -783
- package/dist/components/icon.js +0 -43
- package/dist/components/index2.js +0 -89
- package/dist/components/menu.js +0 -103
- package/dist/components/p-01d4be1d.entry.js +0 -1
- package/dist/components/p-0541e2b0.js +0 -1
- package/dist/components/p-09ba50c3.js +0 -1
- package/dist/components/p-0b4406fa.entry.js +0 -1
- package/dist/components/p-0de26b21.entry.js +0 -1
- package/dist/components/p-0e628c05.js +0 -1
- package/dist/components/p-16fc9e9a.entry.js +0 -1
- package/dist/components/p-18ed73e9.js +0 -1
- package/dist/components/p-1e645c1f.js +0 -1
- package/dist/components/p-211c1186.entry.js +0 -1
- package/dist/components/p-226e83a6.entry.js +0 -1
- package/dist/components/p-22ec9b78.entry.js +0 -1
- package/dist/components/p-24c72960.entry.js +0 -1
- package/dist/components/p-2930bcb0.entry.js +0 -1
- package/dist/components/p-29d7697f.js +0 -1
- package/dist/components/p-2ae8175d.entry.js +0 -1
- package/dist/components/p-2cff3285.js +0 -1
- package/dist/components/p-33400eed.entry.js +0 -1
- package/dist/components/p-3508048d.js +0 -12
- package/dist/components/p-36c853c4.js +0 -1
- package/dist/components/p-39133bc7.js +0 -1
- package/dist/components/p-3b794014.entry.js +0 -1
- package/dist/components/p-3dd08a0f.js +0 -1
- package/dist/components/p-406e73da.entry.js +0 -1
- package/dist/components/p-407430fe.entry.js +0 -1
- package/dist/components/p-41ced35c.entry.js +0 -1
- package/dist/components/p-43b1b3f9.js +0 -1
- package/dist/components/p-48629bf1.js +0 -1
- package/dist/components/p-4e3ba3df.entry.js +0 -1
- package/dist/components/p-53515813.entry.js +0 -1
- package/dist/components/p-5366a759.entry.js +0 -1
- package/dist/components/p-573b8ec6.entry.js +0 -1
- package/dist/components/p-59fb829f.js +0 -1
- package/dist/components/p-5fb1724f.js +0 -1
- package/dist/components/p-606596de.entry.js +0 -1
- package/dist/components/p-65f9817e.js +0 -1
- package/dist/components/p-6834631c.js +0 -2
- package/dist/components/p-69375605.entry.js +0 -1
- package/dist/components/p-6a49c365.entry.js +0 -1
- package/dist/components/p-6a640a2c.js +0 -1
- package/dist/components/p-6b6c2260.js +0 -1
- package/dist/components/p-6b862967.js +0 -1
- package/dist/components/p-6d4f055b.entry.js +0 -1
- package/dist/components/p-756c9977.entry.js +0 -1
- package/dist/components/p-7ace7800.entry.js +0 -1
- package/dist/components/p-7e6ca4fb.entry.js +0 -1
- package/dist/components/p-80c989fa.entry.js +0 -1
- package/dist/components/p-817bf6ff.js +0 -1
- package/dist/components/p-81cb4da4.js +0 -1
- package/dist/components/p-8a52767f.js +0 -1
- package/dist/components/p-8b211d6f.js +0 -1
- package/dist/components/p-8c69bb83.js +0 -1
- package/dist/components/p-8d83dfff.entry.js +0 -1
- package/dist/components/p-8fe0084d.js +0 -1
- package/dist/components/p-90931a94.js +0 -1
- package/dist/components/p-90b4e04b.js +0 -1
- package/dist/components/p-90cf31d2.js +0 -1
- package/dist/components/p-91123ff6.entry.js +0 -1
- package/dist/components/p-95358d00.entry.js +0 -1
- package/dist/components/p-96f55673.js +0 -1
- package/dist/components/p-988058f9.js +0 -1
- package/dist/components/p-9c384f6c.entry.js +0 -1
- package/dist/components/p-a2018217.entry.js +0 -1
- package/dist/components/p-a3c04bbd.js +0 -1
- package/dist/components/p-a6614625.js +0 -1
- package/dist/components/p-bca6275a.entry.js +0 -1
- package/dist/components/p-bec53c3a.js +0 -1
- package/dist/components/p-c2706288.js +0 -1
- package/dist/components/p-c2c076f1.js +0 -1
- package/dist/components/p-c3ec6642.js +0 -19
- package/dist/components/p-c8ab09fb.js +0 -1
- package/dist/components/p-c939fa4e.js +0 -1
- package/dist/components/p-c9a967d9.js +0 -1
- package/dist/components/p-cc2e3192.entry.js +0 -1
- package/dist/components/p-d7c0c287.entry.js +0 -1
- package/dist/components/p-dfe98f07.entry.js +0 -1
- package/dist/components/p-e3d0c2d1.entry.js +0 -1
- package/dist/components/p-e3ea44b2.js +0 -1
- package/dist/components/p-ea8f3750.entry.js +0 -1
- package/dist/components/p-ec7be8df.js +0 -1
- package/dist/components/p-ee496965.entry.js +0 -1
- package/dist/components/p-f2bc7ec5.js +0 -1
- package/dist/components/p-f55574fb.js +0 -1
- package/dist/components/p-f6f2bc86.entry.js +0 -1
- package/dist/components/p-fe062eb0.js +0 -7
- package/dist/components/p-fe7e7a74.entry.js +0 -1
- package/dist/components/p-fedcc21e.js +0 -1
- package/dist/components/p-ff4a1c3a.js +0 -1
- package/dist/components/popover.js +0 -1737
- package/dist/components/result-list.js +0 -565
- package/dist/components/slots.js +0 -26
- package/dist/components/text-field.js +0 -171
- package/dist/components/tooltip.js +0 -360
- package/dist/components/tslib.es6.js +0 -65
- package/dist/esm/auto-resize-textarea-087fecdb.js +0 -135
- package/dist/esm/avatar-775455a5.js +0 -43
- package/dist/esm/avatar-group-e5ca86bf.js +0 -15
- package/dist/esm/badge-6d27ca92.js +0 -21
- package/dist/esm/banner-b292060d.js +0 -102
- package/dist/esm/button-81207236.js +0 -68
- package/dist/esm/card-1e8790aa.js +0 -28
- package/dist/esm/card-group-4e8e0421.js +0 -28
- package/dist/esm/chip-4e568eee.js +0 -23
- package/dist/esm/click-to-edit-text-field-d9b27cd0.js +0 -103
- package/dist/esm/collapsible-b52960e6.js +0 -23
- package/dist/esm/color-circle-picker-c4e92fea.js +0 -80
- package/dist/esm/color-picker-b292ad8d.js +0 -45
- package/dist/esm/color-swatch-ab647632.js +0 -93
- package/dist/esm/context-menu-12f1afe1.js +0 -89
- package/dist/esm/dialog-c69d9152.js +0 -223
- package/dist/esm/dom-64053c71.js +0 -73
- package/dist/esm/dom-9d0f7bf4.js +0 -13
- package/dist/esm/draggable-popover-9f9b7c97.js +0 -81
- package/dist/esm/dropdown-menu-1598ba20.js +0 -29
- package/dist/esm/expandable-b487cb00.js +0 -70
- package/dist/esm/help-tooltip-c2f0d996.js +0 -32
- package/dist/esm/icon-390b9402.js +0 -24
- package/dist/esm/icon-button-552e31fe.js +0 -41
- package/dist/esm/icon-helper-7437b548.js +0 -783
- package/dist/esm/index-72f28b71.js +0 -2118
- package/dist/esm/index-9c609209.js +0 -89
- package/dist/esm/logo-loading-3c7fa23d.js +0 -15
- package/dist/esm/menu-49420f98.js +0 -72
- package/dist/esm/menu-divider-87c888cb.js +0 -15
- package/dist/esm/menu-item-c33aa9dd.js +0 -23
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/popover-6e806354.js +0 -1704
- package/dist/esm/radio-39c11ba4.js +0 -32
- package/dist/esm/radio-group-2f5467b5.js +0 -76
- package/dist/esm/resizable-833336bf.js +0 -421
- package/dist/esm/result-list-16c6afbd.js +0 -302
- package/dist/esm/search-bar-8d18626e.js +0 -525
- package/dist/esm/select-66bb59f8.js +0 -161
- package/dist/esm/shadow-css-008a49f5.js +0 -387
- package/dist/esm/slider-3d8545e3.js +0 -42
- package/dist/esm/slots-fbb5afb3.js +0 -26
- package/dist/esm/spinner-afccea51.js +0 -27
- package/dist/esm/tab-c76332b0.js +0 -24
- package/dist/esm/tabs-e9f6dcbe.js +0 -109
- package/dist/esm/templates-797420bf.js +0 -228
- package/dist/esm/text-field-32ac877e.js +0 -131
- package/dist/esm/toast-255648ff.js +0 -88
- package/dist/esm/tooltip-bed548f4.js +0 -331
- package/dist/esm/tslib.es6-99cd0de8.js +0 -65
- package/loader/package.json +0 -11
- /package/dist/components/{p-b2c7b113.js → p-DXuCPm6v.js} +0 -0
- /package/dist/components/{p-3438c441.js → p-DgySd_r0.js} +0 -0
|
@@ -1,1737 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as classnames } from './index2.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Custom positioning reference element.
|
|
6
|
-
* @see https://floating-ui.com/docs/virtual-elements
|
|
7
|
-
*/
|
|
8
|
-
const min = Math.min;
|
|
9
|
-
const max = Math.max;
|
|
10
|
-
const round = Math.round;
|
|
11
|
-
const floor = Math.floor;
|
|
12
|
-
const createCoords = v => ({
|
|
13
|
-
x: v,
|
|
14
|
-
y: v
|
|
15
|
-
});
|
|
16
|
-
const oppositeSideMap = {
|
|
17
|
-
left: 'right',
|
|
18
|
-
right: 'left',
|
|
19
|
-
bottom: 'top',
|
|
20
|
-
top: 'bottom'
|
|
21
|
-
};
|
|
22
|
-
const oppositeAlignmentMap = {
|
|
23
|
-
start: 'end',
|
|
24
|
-
end: 'start'
|
|
25
|
-
};
|
|
26
|
-
function clamp(start, value, end) {
|
|
27
|
-
return max(start, min(value, end));
|
|
28
|
-
}
|
|
29
|
-
function evaluate(value, param) {
|
|
30
|
-
return typeof value === 'function' ? value(param) : value;
|
|
31
|
-
}
|
|
32
|
-
function getSide(placement) {
|
|
33
|
-
return placement.split('-')[0];
|
|
34
|
-
}
|
|
35
|
-
function getAlignment(placement) {
|
|
36
|
-
return placement.split('-')[1];
|
|
37
|
-
}
|
|
38
|
-
function getOppositeAxis(axis) {
|
|
39
|
-
return axis === 'x' ? 'y' : 'x';
|
|
40
|
-
}
|
|
41
|
-
function getAxisLength(axis) {
|
|
42
|
-
return axis === 'y' ? 'height' : 'width';
|
|
43
|
-
}
|
|
44
|
-
function getSideAxis(placement) {
|
|
45
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
46
|
-
}
|
|
47
|
-
function getAlignmentAxis(placement) {
|
|
48
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
49
|
-
}
|
|
50
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
51
|
-
if (rtl === void 0) {
|
|
52
|
-
rtl = false;
|
|
53
|
-
}
|
|
54
|
-
const alignment = getAlignment(placement);
|
|
55
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
56
|
-
const length = getAxisLength(alignmentAxis);
|
|
57
|
-
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
58
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
59
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
60
|
-
}
|
|
61
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
62
|
-
}
|
|
63
|
-
function getExpandedPlacements(placement) {
|
|
64
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
65
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
66
|
-
}
|
|
67
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
68
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
69
|
-
}
|
|
70
|
-
function getSideList(side, isStart, rtl) {
|
|
71
|
-
const lr = ['left', 'right'];
|
|
72
|
-
const rl = ['right', 'left'];
|
|
73
|
-
const tb = ['top', 'bottom'];
|
|
74
|
-
const bt = ['bottom', 'top'];
|
|
75
|
-
switch (side) {
|
|
76
|
-
case 'top':
|
|
77
|
-
case 'bottom':
|
|
78
|
-
if (rtl) return isStart ? rl : lr;
|
|
79
|
-
return isStart ? lr : rl;
|
|
80
|
-
case 'left':
|
|
81
|
-
case 'right':
|
|
82
|
-
return isStart ? tb : bt;
|
|
83
|
-
default:
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
88
|
-
const alignment = getAlignment(placement);
|
|
89
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
90
|
-
if (alignment) {
|
|
91
|
-
list = list.map(side => side + "-" + alignment);
|
|
92
|
-
if (flipAlignment) {
|
|
93
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return list;
|
|
97
|
-
}
|
|
98
|
-
function getOppositePlacement(placement) {
|
|
99
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
100
|
-
}
|
|
101
|
-
function expandPaddingObject(padding) {
|
|
102
|
-
return {
|
|
103
|
-
top: 0,
|
|
104
|
-
right: 0,
|
|
105
|
-
bottom: 0,
|
|
106
|
-
left: 0,
|
|
107
|
-
...padding
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function getPaddingObject(padding) {
|
|
111
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
112
|
-
top: padding,
|
|
113
|
-
right: padding,
|
|
114
|
-
bottom: padding,
|
|
115
|
-
left: padding
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function rectToClientRect(rect) {
|
|
119
|
-
const {
|
|
120
|
-
x,
|
|
121
|
-
y,
|
|
122
|
-
width,
|
|
123
|
-
height
|
|
124
|
-
} = rect;
|
|
125
|
-
return {
|
|
126
|
-
width,
|
|
127
|
-
height,
|
|
128
|
-
top: y,
|
|
129
|
-
left: x,
|
|
130
|
-
right: x + width,
|
|
131
|
-
bottom: y + height,
|
|
132
|
-
x,
|
|
133
|
-
y
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
138
|
-
let {
|
|
139
|
-
reference,
|
|
140
|
-
floating
|
|
141
|
-
} = _ref;
|
|
142
|
-
const sideAxis = getSideAxis(placement);
|
|
143
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
144
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
145
|
-
const side = getSide(placement);
|
|
146
|
-
const isVertical = sideAxis === 'y';
|
|
147
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
148
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
149
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
150
|
-
let coords;
|
|
151
|
-
switch (side) {
|
|
152
|
-
case 'top':
|
|
153
|
-
coords = {
|
|
154
|
-
x: commonX,
|
|
155
|
-
y: reference.y - floating.height
|
|
156
|
-
};
|
|
157
|
-
break;
|
|
158
|
-
case 'bottom':
|
|
159
|
-
coords = {
|
|
160
|
-
x: commonX,
|
|
161
|
-
y: reference.y + reference.height
|
|
162
|
-
};
|
|
163
|
-
break;
|
|
164
|
-
case 'right':
|
|
165
|
-
coords = {
|
|
166
|
-
x: reference.x + reference.width,
|
|
167
|
-
y: commonY
|
|
168
|
-
};
|
|
169
|
-
break;
|
|
170
|
-
case 'left':
|
|
171
|
-
coords = {
|
|
172
|
-
x: reference.x - floating.width,
|
|
173
|
-
y: commonY
|
|
174
|
-
};
|
|
175
|
-
break;
|
|
176
|
-
default:
|
|
177
|
-
coords = {
|
|
178
|
-
x: reference.x,
|
|
179
|
-
y: reference.y
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
switch (getAlignment(placement)) {
|
|
183
|
-
case 'start':
|
|
184
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
185
|
-
break;
|
|
186
|
-
case 'end':
|
|
187
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
return coords;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
195
|
-
* next to a given reference element.
|
|
196
|
-
*
|
|
197
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
198
|
-
* write one for the platform you are using Floating UI with.
|
|
199
|
-
*/
|
|
200
|
-
const computePosition$1 = async (reference, floating, config) => {
|
|
201
|
-
const {
|
|
202
|
-
placement = 'bottom',
|
|
203
|
-
strategy = 'absolute',
|
|
204
|
-
middleware = [],
|
|
205
|
-
platform
|
|
206
|
-
} = config;
|
|
207
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
208
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
209
|
-
let rects = await platform.getElementRects({
|
|
210
|
-
reference,
|
|
211
|
-
floating,
|
|
212
|
-
strategy
|
|
213
|
-
});
|
|
214
|
-
let {
|
|
215
|
-
x,
|
|
216
|
-
y
|
|
217
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
218
|
-
let statefulPlacement = placement;
|
|
219
|
-
let middlewareData = {};
|
|
220
|
-
let resetCount = 0;
|
|
221
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
222
|
-
const {
|
|
223
|
-
name,
|
|
224
|
-
fn
|
|
225
|
-
} = validMiddleware[i];
|
|
226
|
-
const {
|
|
227
|
-
x: nextX,
|
|
228
|
-
y: nextY,
|
|
229
|
-
data,
|
|
230
|
-
reset
|
|
231
|
-
} = await fn({
|
|
232
|
-
x,
|
|
233
|
-
y,
|
|
234
|
-
initialPlacement: placement,
|
|
235
|
-
placement: statefulPlacement,
|
|
236
|
-
strategy,
|
|
237
|
-
middlewareData,
|
|
238
|
-
rects,
|
|
239
|
-
platform,
|
|
240
|
-
elements: {
|
|
241
|
-
reference,
|
|
242
|
-
floating
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
x = nextX != null ? nextX : x;
|
|
246
|
-
y = nextY != null ? nextY : y;
|
|
247
|
-
middlewareData = {
|
|
248
|
-
...middlewareData,
|
|
249
|
-
[name]: {
|
|
250
|
-
...middlewareData[name],
|
|
251
|
-
...data
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
if (reset && resetCount <= 50) {
|
|
255
|
-
resetCount++;
|
|
256
|
-
if (typeof reset === 'object') {
|
|
257
|
-
if (reset.placement) {
|
|
258
|
-
statefulPlacement = reset.placement;
|
|
259
|
-
}
|
|
260
|
-
if (reset.rects) {
|
|
261
|
-
rects = reset.rects === true ? await platform.getElementRects({
|
|
262
|
-
reference,
|
|
263
|
-
floating,
|
|
264
|
-
strategy
|
|
265
|
-
}) : reset.rects;
|
|
266
|
-
}
|
|
267
|
-
({
|
|
268
|
-
x,
|
|
269
|
-
y
|
|
270
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
271
|
-
}
|
|
272
|
-
i = -1;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
return {
|
|
276
|
-
x,
|
|
277
|
-
y,
|
|
278
|
-
placement: statefulPlacement,
|
|
279
|
-
strategy,
|
|
280
|
-
middlewareData
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
286
|
-
* element is overflowing a given clipping boundary on each side.
|
|
287
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
288
|
-
* - negative = how many pixels left before it will overflow
|
|
289
|
-
* - 0 = lies flush with the boundary
|
|
290
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
291
|
-
*/
|
|
292
|
-
async function detectOverflow$1(state, options) {
|
|
293
|
-
var _await$platform$isEle;
|
|
294
|
-
if (options === void 0) {
|
|
295
|
-
options = {};
|
|
296
|
-
}
|
|
297
|
-
const {
|
|
298
|
-
x,
|
|
299
|
-
y,
|
|
300
|
-
platform,
|
|
301
|
-
rects,
|
|
302
|
-
elements,
|
|
303
|
-
strategy
|
|
304
|
-
} = state;
|
|
305
|
-
const {
|
|
306
|
-
boundary = 'clippingAncestors',
|
|
307
|
-
rootBoundary = 'viewport',
|
|
308
|
-
elementContext = 'floating',
|
|
309
|
-
altBoundary = false,
|
|
310
|
-
padding = 0
|
|
311
|
-
} = evaluate(options, state);
|
|
312
|
-
const paddingObject = getPaddingObject(padding);
|
|
313
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
314
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
315
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
316
|
-
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))),
|
|
317
|
-
boundary,
|
|
318
|
-
rootBoundary,
|
|
319
|
-
strategy
|
|
320
|
-
}));
|
|
321
|
-
const rect = elementContext === 'floating' ? {
|
|
322
|
-
x,
|
|
323
|
-
y,
|
|
324
|
-
width: rects.floating.width,
|
|
325
|
-
height: rects.floating.height
|
|
326
|
-
} : rects.reference;
|
|
327
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
328
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
329
|
-
x: 1,
|
|
330
|
-
y: 1
|
|
331
|
-
} : {
|
|
332
|
-
x: 1,
|
|
333
|
-
y: 1
|
|
334
|
-
};
|
|
335
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
336
|
-
elements,
|
|
337
|
-
rect,
|
|
338
|
-
offsetParent,
|
|
339
|
-
strategy
|
|
340
|
-
}) : rect);
|
|
341
|
-
return {
|
|
342
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
343
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
344
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
345
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
351
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
352
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
353
|
-
* @see https://floating-ui.com/docs/flip
|
|
354
|
-
*/
|
|
355
|
-
const flip$1 = function (options) {
|
|
356
|
-
if (options === void 0) {
|
|
357
|
-
options = {};
|
|
358
|
-
}
|
|
359
|
-
return {
|
|
360
|
-
name: 'flip',
|
|
361
|
-
options,
|
|
362
|
-
async fn(state) {
|
|
363
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
364
|
-
const {
|
|
365
|
-
placement,
|
|
366
|
-
middlewareData,
|
|
367
|
-
rects,
|
|
368
|
-
initialPlacement,
|
|
369
|
-
platform,
|
|
370
|
-
elements
|
|
371
|
-
} = state;
|
|
372
|
-
const {
|
|
373
|
-
mainAxis: checkMainAxis = true,
|
|
374
|
-
crossAxis: checkCrossAxis = true,
|
|
375
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
376
|
-
fallbackStrategy = 'bestFit',
|
|
377
|
-
fallbackAxisSideDirection = 'none',
|
|
378
|
-
flipAlignment = true,
|
|
379
|
-
...detectOverflowOptions
|
|
380
|
-
} = evaluate(options, state);
|
|
381
|
-
|
|
382
|
-
// If a reset by the arrow was caused due to an alignment offset being
|
|
383
|
-
// added, we should skip any logic now since `flip()` has already done its
|
|
384
|
-
// work.
|
|
385
|
-
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
386
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
387
|
-
return {};
|
|
388
|
-
}
|
|
389
|
-
const side = getSide(placement);
|
|
390
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
391
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
392
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
393
|
-
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
|
|
394
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
395
|
-
}
|
|
396
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
397
|
-
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
|
398
|
-
const overflows = [];
|
|
399
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
400
|
-
if (checkMainAxis) {
|
|
401
|
-
overflows.push(overflow[side]);
|
|
402
|
-
}
|
|
403
|
-
if (checkCrossAxis) {
|
|
404
|
-
const sides = getAlignmentSides(placement, rects, rtl);
|
|
405
|
-
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
406
|
-
}
|
|
407
|
-
overflowsData = [...overflowsData, {
|
|
408
|
-
placement,
|
|
409
|
-
overflows
|
|
410
|
-
}];
|
|
411
|
-
|
|
412
|
-
// One or more sides is overflowing.
|
|
413
|
-
if (!overflows.every(side => side <= 0)) {
|
|
414
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
415
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
416
|
-
const nextPlacement = placements[nextIndex];
|
|
417
|
-
if (nextPlacement) {
|
|
418
|
-
// Try next placement and re-run the lifecycle.
|
|
419
|
-
return {
|
|
420
|
-
data: {
|
|
421
|
-
index: nextIndex,
|
|
422
|
-
overflows: overflowsData
|
|
423
|
-
},
|
|
424
|
-
reset: {
|
|
425
|
-
placement: nextPlacement
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
431
|
-
// then find the placement that fits the best on the main crossAxis side.
|
|
432
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
433
|
-
|
|
434
|
-
// Otherwise fallback.
|
|
435
|
-
if (!resetPlacement) {
|
|
436
|
-
switch (fallbackStrategy) {
|
|
437
|
-
case 'bestFit':
|
|
438
|
-
{
|
|
439
|
-
var _overflowsData$map$so;
|
|
440
|
-
const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
441
|
-
if (placement) {
|
|
442
|
-
resetPlacement = placement;
|
|
443
|
-
}
|
|
444
|
-
break;
|
|
445
|
-
}
|
|
446
|
-
case 'initialPlacement':
|
|
447
|
-
resetPlacement = initialPlacement;
|
|
448
|
-
break;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
if (placement !== resetPlacement) {
|
|
452
|
-
return {
|
|
453
|
-
reset: {
|
|
454
|
-
placement: resetPlacement
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return {};
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
465
|
-
// Derivable.
|
|
466
|
-
|
|
467
|
-
async function convertValueToCoords(state, options) {
|
|
468
|
-
const {
|
|
469
|
-
placement,
|
|
470
|
-
platform,
|
|
471
|
-
elements
|
|
472
|
-
} = state;
|
|
473
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
474
|
-
const side = getSide(placement);
|
|
475
|
-
const alignment = getAlignment(placement);
|
|
476
|
-
const isVertical = getSideAxis(placement) === 'y';
|
|
477
|
-
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
478
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
479
|
-
const rawValue = evaluate(options, state);
|
|
480
|
-
|
|
481
|
-
// eslint-disable-next-line prefer-const
|
|
482
|
-
let {
|
|
483
|
-
mainAxis,
|
|
484
|
-
crossAxis,
|
|
485
|
-
alignmentAxis
|
|
486
|
-
} = typeof rawValue === 'number' ? {
|
|
487
|
-
mainAxis: rawValue,
|
|
488
|
-
crossAxis: 0,
|
|
489
|
-
alignmentAxis: null
|
|
490
|
-
} : {
|
|
491
|
-
mainAxis: 0,
|
|
492
|
-
crossAxis: 0,
|
|
493
|
-
alignmentAxis: null,
|
|
494
|
-
...rawValue
|
|
495
|
-
};
|
|
496
|
-
if (alignment && typeof alignmentAxis === 'number') {
|
|
497
|
-
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
498
|
-
}
|
|
499
|
-
return isVertical ? {
|
|
500
|
-
x: crossAxis * crossAxisMulti,
|
|
501
|
-
y: mainAxis * mainAxisMulti
|
|
502
|
-
} : {
|
|
503
|
-
x: mainAxis * mainAxisMulti,
|
|
504
|
-
y: crossAxis * crossAxisMulti
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Modifies the placement by translating the floating element along the
|
|
510
|
-
* specified axes.
|
|
511
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
512
|
-
* object may be passed.
|
|
513
|
-
* @see https://floating-ui.com/docs/offset
|
|
514
|
-
*/
|
|
515
|
-
const offset$1 = function (options) {
|
|
516
|
-
if (options === void 0) {
|
|
517
|
-
options = 0;
|
|
518
|
-
}
|
|
519
|
-
return {
|
|
520
|
-
name: 'offset',
|
|
521
|
-
options,
|
|
522
|
-
async fn(state) {
|
|
523
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
524
|
-
const {
|
|
525
|
-
x,
|
|
526
|
-
y,
|
|
527
|
-
placement,
|
|
528
|
-
middlewareData
|
|
529
|
-
} = state;
|
|
530
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
531
|
-
|
|
532
|
-
// If the placement is the same and the arrow caused an alignment offset
|
|
533
|
-
// then we don't need to change the positioning coordinates.
|
|
534
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
535
|
-
return {};
|
|
536
|
-
}
|
|
537
|
-
return {
|
|
538
|
-
x: x + diffCoords.x,
|
|
539
|
-
y: y + diffCoords.y,
|
|
540
|
-
data: {
|
|
541
|
-
...diffCoords,
|
|
542
|
-
placement
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
551
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
552
|
-
* @see https://floating-ui.com/docs/shift
|
|
553
|
-
*/
|
|
554
|
-
const shift$1 = function (options) {
|
|
555
|
-
if (options === void 0) {
|
|
556
|
-
options = {};
|
|
557
|
-
}
|
|
558
|
-
return {
|
|
559
|
-
name: 'shift',
|
|
560
|
-
options,
|
|
561
|
-
async fn(state) {
|
|
562
|
-
const {
|
|
563
|
-
x,
|
|
564
|
-
y,
|
|
565
|
-
placement
|
|
566
|
-
} = state;
|
|
567
|
-
const {
|
|
568
|
-
mainAxis: checkMainAxis = true,
|
|
569
|
-
crossAxis: checkCrossAxis = false,
|
|
570
|
-
limiter = {
|
|
571
|
-
fn: _ref => {
|
|
572
|
-
let {
|
|
573
|
-
x,
|
|
574
|
-
y
|
|
575
|
-
} = _ref;
|
|
576
|
-
return {
|
|
577
|
-
x,
|
|
578
|
-
y
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
...detectOverflowOptions
|
|
583
|
-
} = evaluate(options, state);
|
|
584
|
-
const coords = {
|
|
585
|
-
x,
|
|
586
|
-
y
|
|
587
|
-
};
|
|
588
|
-
const overflow = await detectOverflow$1(state, detectOverflowOptions);
|
|
589
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
590
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
591
|
-
let mainAxisCoord = coords[mainAxis];
|
|
592
|
-
let crossAxisCoord = coords[crossAxis];
|
|
593
|
-
if (checkMainAxis) {
|
|
594
|
-
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
595
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
596
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
597
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
598
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
599
|
-
}
|
|
600
|
-
if (checkCrossAxis) {
|
|
601
|
-
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
602
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
603
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
604
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
605
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
606
|
-
}
|
|
607
|
-
const limitedCoords = limiter.fn({
|
|
608
|
-
...state,
|
|
609
|
-
[mainAxis]: mainAxisCoord,
|
|
610
|
-
[crossAxis]: crossAxisCoord
|
|
611
|
-
});
|
|
612
|
-
return {
|
|
613
|
-
...limitedCoords,
|
|
614
|
-
data: {
|
|
615
|
-
x: limitedCoords.x - x,
|
|
616
|
-
y: limitedCoords.y - y
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
};
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
function getNodeName(node) {
|
|
624
|
-
if (isNode(node)) {
|
|
625
|
-
return (node.nodeName || '').toLowerCase();
|
|
626
|
-
}
|
|
627
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
628
|
-
// returning `#document` an infinite loop won't occur.
|
|
629
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
630
|
-
return '#document';
|
|
631
|
-
}
|
|
632
|
-
function getWindow(node) {
|
|
633
|
-
var _node$ownerDocument;
|
|
634
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
635
|
-
}
|
|
636
|
-
function getDocumentElement(node) {
|
|
637
|
-
var _ref;
|
|
638
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
639
|
-
}
|
|
640
|
-
function isNode(value) {
|
|
641
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
642
|
-
}
|
|
643
|
-
function isElement(value) {
|
|
644
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
645
|
-
}
|
|
646
|
-
function isHTMLElement(value) {
|
|
647
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
648
|
-
}
|
|
649
|
-
function isShadowRoot(value) {
|
|
650
|
-
// Browsers without `ShadowRoot` support.
|
|
651
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
652
|
-
return false;
|
|
653
|
-
}
|
|
654
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
655
|
-
}
|
|
656
|
-
function isOverflowElement(element) {
|
|
657
|
-
const {
|
|
658
|
-
overflow,
|
|
659
|
-
overflowX,
|
|
660
|
-
overflowY,
|
|
661
|
-
display
|
|
662
|
-
} = getComputedStyle(element);
|
|
663
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
664
|
-
}
|
|
665
|
-
function isTableElement(element) {
|
|
666
|
-
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
667
|
-
}
|
|
668
|
-
function isContainingBlock(element) {
|
|
669
|
-
const webkit = isWebKit();
|
|
670
|
-
const css = getComputedStyle(element);
|
|
671
|
-
|
|
672
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
673
|
-
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
674
|
-
}
|
|
675
|
-
function getContainingBlock(element) {
|
|
676
|
-
let currentNode = getParentNode(element);
|
|
677
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
678
|
-
if (isContainingBlock(currentNode)) {
|
|
679
|
-
return currentNode;
|
|
680
|
-
}
|
|
681
|
-
currentNode = getParentNode(currentNode);
|
|
682
|
-
}
|
|
683
|
-
return null;
|
|
684
|
-
}
|
|
685
|
-
function isWebKit() {
|
|
686
|
-
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
687
|
-
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
688
|
-
}
|
|
689
|
-
function isLastTraversableNode(node) {
|
|
690
|
-
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
691
|
-
}
|
|
692
|
-
function getComputedStyle(element) {
|
|
693
|
-
return getWindow(element).getComputedStyle(element);
|
|
694
|
-
}
|
|
695
|
-
function getNodeScroll(element) {
|
|
696
|
-
if (isElement(element)) {
|
|
697
|
-
return {
|
|
698
|
-
scrollLeft: element.scrollLeft,
|
|
699
|
-
scrollTop: element.scrollTop
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
return {
|
|
703
|
-
scrollLeft: element.pageXOffset,
|
|
704
|
-
scrollTop: element.pageYOffset
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
function getParentNode(node) {
|
|
708
|
-
if (getNodeName(node) === 'html') {
|
|
709
|
-
return node;
|
|
710
|
-
}
|
|
711
|
-
const result =
|
|
712
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
713
|
-
node.assignedSlot ||
|
|
714
|
-
// DOM Element detected.
|
|
715
|
-
node.parentNode ||
|
|
716
|
-
// ShadowRoot detected.
|
|
717
|
-
isShadowRoot(node) && node.host ||
|
|
718
|
-
// Fallback.
|
|
719
|
-
getDocumentElement(node);
|
|
720
|
-
return isShadowRoot(result) ? result.host : result;
|
|
721
|
-
}
|
|
722
|
-
function getNearestOverflowAncestor(node) {
|
|
723
|
-
const parentNode = getParentNode(node);
|
|
724
|
-
if (isLastTraversableNode(parentNode)) {
|
|
725
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
726
|
-
}
|
|
727
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
728
|
-
return parentNode;
|
|
729
|
-
}
|
|
730
|
-
return getNearestOverflowAncestor(parentNode);
|
|
731
|
-
}
|
|
732
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
733
|
-
var _node$ownerDocument2;
|
|
734
|
-
if (list === void 0) {
|
|
735
|
-
list = [];
|
|
736
|
-
}
|
|
737
|
-
if (traverseIframes === void 0) {
|
|
738
|
-
traverseIframes = true;
|
|
739
|
-
}
|
|
740
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
741
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
742
|
-
const win = getWindow(scrollableAncestor);
|
|
743
|
-
if (isBody) {
|
|
744
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
745
|
-
}
|
|
746
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
function getCssDimensions(element) {
|
|
750
|
-
const css = getComputedStyle(element);
|
|
751
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
752
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
753
|
-
let width = parseFloat(css.width) || 0;
|
|
754
|
-
let height = parseFloat(css.height) || 0;
|
|
755
|
-
const hasOffset = isHTMLElement(element);
|
|
756
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
757
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
758
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
759
|
-
if (shouldFallback) {
|
|
760
|
-
width = offsetWidth;
|
|
761
|
-
height = offsetHeight;
|
|
762
|
-
}
|
|
763
|
-
return {
|
|
764
|
-
width,
|
|
765
|
-
height,
|
|
766
|
-
$: shouldFallback
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function unwrapElement(element) {
|
|
771
|
-
return !isElement(element) ? element.contextElement : element;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function getScale(element) {
|
|
775
|
-
const domElement = unwrapElement(element);
|
|
776
|
-
if (!isHTMLElement(domElement)) {
|
|
777
|
-
return createCoords(1);
|
|
778
|
-
}
|
|
779
|
-
const rect = domElement.getBoundingClientRect();
|
|
780
|
-
const {
|
|
781
|
-
width,
|
|
782
|
-
height,
|
|
783
|
-
$
|
|
784
|
-
} = getCssDimensions(domElement);
|
|
785
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
786
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
787
|
-
|
|
788
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
789
|
-
|
|
790
|
-
if (!x || !Number.isFinite(x)) {
|
|
791
|
-
x = 1;
|
|
792
|
-
}
|
|
793
|
-
if (!y || !Number.isFinite(y)) {
|
|
794
|
-
y = 1;
|
|
795
|
-
}
|
|
796
|
-
return {
|
|
797
|
-
x,
|
|
798
|
-
y
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
803
|
-
function getVisualOffsets(element) {
|
|
804
|
-
const win = getWindow(element);
|
|
805
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
806
|
-
return noOffsets;
|
|
807
|
-
}
|
|
808
|
-
return {
|
|
809
|
-
x: win.visualViewport.offsetLeft,
|
|
810
|
-
y: win.visualViewport.offsetTop
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
814
|
-
if (isFixed === void 0) {
|
|
815
|
-
isFixed = false;
|
|
816
|
-
}
|
|
817
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
818
|
-
return false;
|
|
819
|
-
}
|
|
820
|
-
return isFixed;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
824
|
-
if (includeScale === void 0) {
|
|
825
|
-
includeScale = false;
|
|
826
|
-
}
|
|
827
|
-
if (isFixedStrategy === void 0) {
|
|
828
|
-
isFixedStrategy = false;
|
|
829
|
-
}
|
|
830
|
-
const clientRect = element.getBoundingClientRect();
|
|
831
|
-
const domElement = unwrapElement(element);
|
|
832
|
-
let scale = createCoords(1);
|
|
833
|
-
if (includeScale) {
|
|
834
|
-
if (offsetParent) {
|
|
835
|
-
if (isElement(offsetParent)) {
|
|
836
|
-
scale = getScale(offsetParent);
|
|
837
|
-
}
|
|
838
|
-
} else {
|
|
839
|
-
scale = getScale(element);
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
843
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
844
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
845
|
-
let width = clientRect.width / scale.x;
|
|
846
|
-
let height = clientRect.height / scale.y;
|
|
847
|
-
if (domElement) {
|
|
848
|
-
const win = getWindow(domElement);
|
|
849
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
850
|
-
let currentWin = win;
|
|
851
|
-
let currentIFrame = currentWin.frameElement;
|
|
852
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
853
|
-
const iframeScale = getScale(currentIFrame);
|
|
854
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
855
|
-
const css = getComputedStyle(currentIFrame);
|
|
856
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
857
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
858
|
-
x *= iframeScale.x;
|
|
859
|
-
y *= iframeScale.y;
|
|
860
|
-
width *= iframeScale.x;
|
|
861
|
-
height *= iframeScale.y;
|
|
862
|
-
x += left;
|
|
863
|
-
y += top;
|
|
864
|
-
currentWin = getWindow(currentIFrame);
|
|
865
|
-
currentIFrame = currentWin.frameElement;
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
return rectToClientRect({
|
|
869
|
-
width,
|
|
870
|
-
height,
|
|
871
|
-
x,
|
|
872
|
-
y
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
877
|
-
function isTopLayer(element) {
|
|
878
|
-
return topLayerSelectors.some(selector => {
|
|
879
|
-
try {
|
|
880
|
-
return element.matches(selector);
|
|
881
|
-
} catch (e) {
|
|
882
|
-
return false;
|
|
883
|
-
}
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
888
|
-
let {
|
|
889
|
-
elements,
|
|
890
|
-
rect,
|
|
891
|
-
offsetParent,
|
|
892
|
-
strategy
|
|
893
|
-
} = _ref;
|
|
894
|
-
const isFixed = strategy === 'fixed';
|
|
895
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
896
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
897
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
898
|
-
return rect;
|
|
899
|
-
}
|
|
900
|
-
let scroll = {
|
|
901
|
-
scrollLeft: 0,
|
|
902
|
-
scrollTop: 0
|
|
903
|
-
};
|
|
904
|
-
let scale = createCoords(1);
|
|
905
|
-
const offsets = createCoords(0);
|
|
906
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
907
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
908
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
909
|
-
scroll = getNodeScroll(offsetParent);
|
|
910
|
-
}
|
|
911
|
-
if (isHTMLElement(offsetParent)) {
|
|
912
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
913
|
-
scale = getScale(offsetParent);
|
|
914
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
915
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
return {
|
|
919
|
-
width: rect.width * scale.x,
|
|
920
|
-
height: rect.height * scale.y,
|
|
921
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
922
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
function getClientRects(element) {
|
|
927
|
-
return Array.from(element.getClientRects());
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
function getWindowScrollBarX(element) {
|
|
931
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
932
|
-
// incorrect for RTL.
|
|
933
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
937
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
938
|
-
function getDocumentRect(element) {
|
|
939
|
-
const html = getDocumentElement(element);
|
|
940
|
-
const scroll = getNodeScroll(element);
|
|
941
|
-
const body = element.ownerDocument.body;
|
|
942
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
943
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
944
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
945
|
-
const y = -scroll.scrollTop;
|
|
946
|
-
if (getComputedStyle(body).direction === 'rtl') {
|
|
947
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
948
|
-
}
|
|
949
|
-
return {
|
|
950
|
-
width,
|
|
951
|
-
height,
|
|
952
|
-
x,
|
|
953
|
-
y
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
function getViewportRect(element, strategy) {
|
|
958
|
-
const win = getWindow(element);
|
|
959
|
-
const html = getDocumentElement(element);
|
|
960
|
-
const visualViewport = win.visualViewport;
|
|
961
|
-
let width = html.clientWidth;
|
|
962
|
-
let height = html.clientHeight;
|
|
963
|
-
let x = 0;
|
|
964
|
-
let y = 0;
|
|
965
|
-
if (visualViewport) {
|
|
966
|
-
width = visualViewport.width;
|
|
967
|
-
height = visualViewport.height;
|
|
968
|
-
const visualViewportBased = isWebKit();
|
|
969
|
-
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
970
|
-
x = visualViewport.offsetLeft;
|
|
971
|
-
y = visualViewport.offsetTop;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
return {
|
|
975
|
-
width,
|
|
976
|
-
height,
|
|
977
|
-
x,
|
|
978
|
-
y
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
983
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
984
|
-
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
985
|
-
const top = clientRect.top + element.clientTop;
|
|
986
|
-
const left = clientRect.left + element.clientLeft;
|
|
987
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
988
|
-
const width = element.clientWidth * scale.x;
|
|
989
|
-
const height = element.clientHeight * scale.y;
|
|
990
|
-
const x = left * scale.x;
|
|
991
|
-
const y = top * scale.y;
|
|
992
|
-
return {
|
|
993
|
-
width,
|
|
994
|
-
height,
|
|
995
|
-
x,
|
|
996
|
-
y
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1000
|
-
let rect;
|
|
1001
|
-
if (clippingAncestor === 'viewport') {
|
|
1002
|
-
rect = getViewportRect(element, strategy);
|
|
1003
|
-
} else if (clippingAncestor === 'document') {
|
|
1004
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
1005
|
-
} else if (isElement(clippingAncestor)) {
|
|
1006
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1007
|
-
} else {
|
|
1008
|
-
const visualOffsets = getVisualOffsets(element);
|
|
1009
|
-
rect = {
|
|
1010
|
-
...clippingAncestor,
|
|
1011
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1012
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
1013
|
-
};
|
|
1014
|
-
}
|
|
1015
|
-
return rectToClientRect(rect);
|
|
1016
|
-
}
|
|
1017
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1018
|
-
const parentNode = getParentNode(element);
|
|
1019
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1020
|
-
return false;
|
|
1021
|
-
}
|
|
1022
|
-
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1026
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1027
|
-
// of the given element up the tree.
|
|
1028
|
-
function getClippingElementAncestors(element, cache) {
|
|
1029
|
-
const cachedResult = cache.get(element);
|
|
1030
|
-
if (cachedResult) {
|
|
1031
|
-
return cachedResult;
|
|
1032
|
-
}
|
|
1033
|
-
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1034
|
-
let currentContainingBlockComputedStyle = null;
|
|
1035
|
-
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1036
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1037
|
-
|
|
1038
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1039
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1040
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
1041
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1042
|
-
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1043
|
-
currentContainingBlockComputedStyle = null;
|
|
1044
|
-
}
|
|
1045
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1046
|
-
if (shouldDropCurrentNode) {
|
|
1047
|
-
// Drop non-containing blocks.
|
|
1048
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1049
|
-
} else {
|
|
1050
|
-
// Record last containing block for next iteration.
|
|
1051
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1052
|
-
}
|
|
1053
|
-
currentNode = getParentNode(currentNode);
|
|
1054
|
-
}
|
|
1055
|
-
cache.set(element, result);
|
|
1056
|
-
return result;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1060
|
-
// clipping ancestors.
|
|
1061
|
-
function getClippingRect(_ref) {
|
|
1062
|
-
let {
|
|
1063
|
-
element,
|
|
1064
|
-
boundary,
|
|
1065
|
-
rootBoundary,
|
|
1066
|
-
strategy
|
|
1067
|
-
} = _ref;
|
|
1068
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1069
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1070
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
1071
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1072
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1073
|
-
accRect.top = max(rect.top, accRect.top);
|
|
1074
|
-
accRect.right = min(rect.right, accRect.right);
|
|
1075
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1076
|
-
accRect.left = max(rect.left, accRect.left);
|
|
1077
|
-
return accRect;
|
|
1078
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1079
|
-
return {
|
|
1080
|
-
width: clippingRect.right - clippingRect.left,
|
|
1081
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
1082
|
-
x: clippingRect.left,
|
|
1083
|
-
y: clippingRect.top
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
function getDimensions(element) {
|
|
1088
|
-
const {
|
|
1089
|
-
width,
|
|
1090
|
-
height
|
|
1091
|
-
} = getCssDimensions(element);
|
|
1092
|
-
return {
|
|
1093
|
-
width,
|
|
1094
|
-
height
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1099
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1100
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1101
|
-
const isFixed = strategy === 'fixed';
|
|
1102
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1103
|
-
let scroll = {
|
|
1104
|
-
scrollLeft: 0,
|
|
1105
|
-
scrollTop: 0
|
|
1106
|
-
};
|
|
1107
|
-
const offsets = createCoords(0);
|
|
1108
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1109
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1110
|
-
scroll = getNodeScroll(offsetParent);
|
|
1111
|
-
}
|
|
1112
|
-
if (isOffsetParentAnElement) {
|
|
1113
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1114
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1115
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1116
|
-
} else if (documentElement) {
|
|
1117
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
const x = rect.left + scroll.scrollLeft - offsets.x;
|
|
1121
|
-
const y = rect.top + scroll.scrollTop - offsets.y;
|
|
1122
|
-
return {
|
|
1123
|
-
x,
|
|
1124
|
-
y,
|
|
1125
|
-
width: rect.width,
|
|
1126
|
-
height: rect.height
|
|
1127
|
-
};
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
function isStaticPositioned(element) {
|
|
1131
|
-
return getComputedStyle(element).position === 'static';
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
1135
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1136
|
-
return null;
|
|
1137
|
-
}
|
|
1138
|
-
if (polyfill) {
|
|
1139
|
-
return polyfill(element);
|
|
1140
|
-
}
|
|
1141
|
-
return element.offsetParent;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1145
|
-
// such as table ancestors and cross browser bugs.
|
|
1146
|
-
function getOffsetParent(element, polyfill) {
|
|
1147
|
-
const win = getWindow(element);
|
|
1148
|
-
if (isTopLayer(element)) {
|
|
1149
|
-
return win;
|
|
1150
|
-
}
|
|
1151
|
-
if (!isHTMLElement(element)) {
|
|
1152
|
-
let svgOffsetParent = getParentNode(element);
|
|
1153
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1154
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1155
|
-
return svgOffsetParent;
|
|
1156
|
-
}
|
|
1157
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1158
|
-
}
|
|
1159
|
-
return win;
|
|
1160
|
-
}
|
|
1161
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1162
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1163
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1164
|
-
}
|
|
1165
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1166
|
-
return win;
|
|
1167
|
-
}
|
|
1168
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
const getElementRects = async function (data) {
|
|
1172
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1173
|
-
const getDimensionsFn = this.getDimensions;
|
|
1174
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1175
|
-
return {
|
|
1176
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1177
|
-
floating: {
|
|
1178
|
-
x: 0,
|
|
1179
|
-
y: 0,
|
|
1180
|
-
width: floatingDimensions.width,
|
|
1181
|
-
height: floatingDimensions.height
|
|
1182
|
-
}
|
|
1183
|
-
};
|
|
1184
|
-
};
|
|
1185
|
-
|
|
1186
|
-
function isRTL(element) {
|
|
1187
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
const platform = {
|
|
1191
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1192
|
-
getDocumentElement,
|
|
1193
|
-
getClippingRect,
|
|
1194
|
-
getOffsetParent,
|
|
1195
|
-
getElementRects,
|
|
1196
|
-
getClientRects,
|
|
1197
|
-
getDimensions,
|
|
1198
|
-
getScale,
|
|
1199
|
-
isElement,
|
|
1200
|
-
isRTL
|
|
1201
|
-
};
|
|
1202
|
-
|
|
1203
|
-
// https://samthor.au/2021/observing-dom/
|
|
1204
|
-
function observeMove(element, onMove) {
|
|
1205
|
-
let io = null;
|
|
1206
|
-
let timeoutId;
|
|
1207
|
-
const root = getDocumentElement(element);
|
|
1208
|
-
function cleanup() {
|
|
1209
|
-
var _io;
|
|
1210
|
-
clearTimeout(timeoutId);
|
|
1211
|
-
(_io = io) == null || _io.disconnect();
|
|
1212
|
-
io = null;
|
|
1213
|
-
}
|
|
1214
|
-
function refresh(skip, threshold) {
|
|
1215
|
-
if (skip === void 0) {
|
|
1216
|
-
skip = false;
|
|
1217
|
-
}
|
|
1218
|
-
if (threshold === void 0) {
|
|
1219
|
-
threshold = 1;
|
|
1220
|
-
}
|
|
1221
|
-
cleanup();
|
|
1222
|
-
const {
|
|
1223
|
-
left,
|
|
1224
|
-
top,
|
|
1225
|
-
width,
|
|
1226
|
-
height
|
|
1227
|
-
} = element.getBoundingClientRect();
|
|
1228
|
-
if (!skip) {
|
|
1229
|
-
onMove();
|
|
1230
|
-
}
|
|
1231
|
-
if (!width || !height) {
|
|
1232
|
-
return;
|
|
1233
|
-
}
|
|
1234
|
-
const insetTop = floor(top);
|
|
1235
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
1236
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1237
|
-
const insetLeft = floor(left);
|
|
1238
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1239
|
-
const options = {
|
|
1240
|
-
rootMargin,
|
|
1241
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1242
|
-
};
|
|
1243
|
-
let isFirstUpdate = true;
|
|
1244
|
-
function handleObserve(entries) {
|
|
1245
|
-
const ratio = entries[0].intersectionRatio;
|
|
1246
|
-
if (ratio !== threshold) {
|
|
1247
|
-
if (!isFirstUpdate) {
|
|
1248
|
-
return refresh();
|
|
1249
|
-
}
|
|
1250
|
-
if (!ratio) {
|
|
1251
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1252
|
-
// to prevent an infinite loop of updates.
|
|
1253
|
-
timeoutId = setTimeout(() => {
|
|
1254
|
-
refresh(false, 1e-7);
|
|
1255
|
-
}, 1000);
|
|
1256
|
-
} else {
|
|
1257
|
-
refresh(false, ratio);
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
isFirstUpdate = false;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
1264
|
-
// error.
|
|
1265
|
-
try {
|
|
1266
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1267
|
-
...options,
|
|
1268
|
-
// Handle <iframe>s
|
|
1269
|
-
root: root.ownerDocument
|
|
1270
|
-
});
|
|
1271
|
-
} catch (e) {
|
|
1272
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1273
|
-
}
|
|
1274
|
-
io.observe(element);
|
|
1275
|
-
}
|
|
1276
|
-
refresh(true);
|
|
1277
|
-
return cleanup;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* Automatically updates the position of the floating element when necessary.
|
|
1282
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
1283
|
-
* visible on the screen.
|
|
1284
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
1285
|
-
* removed from the DOM or hidden from the screen.
|
|
1286
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
1287
|
-
*/
|
|
1288
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1289
|
-
if (options === void 0) {
|
|
1290
|
-
options = {};
|
|
1291
|
-
}
|
|
1292
|
-
const {
|
|
1293
|
-
ancestorScroll = true,
|
|
1294
|
-
ancestorResize = true,
|
|
1295
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
1296
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
1297
|
-
animationFrame = false
|
|
1298
|
-
} = options;
|
|
1299
|
-
const referenceEl = unwrapElement(reference);
|
|
1300
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1301
|
-
ancestors.forEach(ancestor => {
|
|
1302
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1303
|
-
passive: true
|
|
1304
|
-
});
|
|
1305
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1306
|
-
});
|
|
1307
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1308
|
-
let reobserveFrame = -1;
|
|
1309
|
-
let resizeObserver = null;
|
|
1310
|
-
if (elementResize) {
|
|
1311
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
1312
|
-
let [firstEntry] = _ref;
|
|
1313
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1314
|
-
// Prevent update loops when using the `size` middleware.
|
|
1315
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1316
|
-
resizeObserver.unobserve(floating);
|
|
1317
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1318
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1319
|
-
var _resizeObserver;
|
|
1320
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1321
|
-
});
|
|
1322
|
-
}
|
|
1323
|
-
update();
|
|
1324
|
-
});
|
|
1325
|
-
if (referenceEl && !animationFrame) {
|
|
1326
|
-
resizeObserver.observe(referenceEl);
|
|
1327
|
-
}
|
|
1328
|
-
resizeObserver.observe(floating);
|
|
1329
|
-
}
|
|
1330
|
-
let frameId;
|
|
1331
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1332
|
-
if (animationFrame) {
|
|
1333
|
-
frameLoop();
|
|
1334
|
-
}
|
|
1335
|
-
function frameLoop() {
|
|
1336
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1337
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1338
|
-
update();
|
|
1339
|
-
}
|
|
1340
|
-
prevRefRect = nextRefRect;
|
|
1341
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1342
|
-
}
|
|
1343
|
-
update();
|
|
1344
|
-
return () => {
|
|
1345
|
-
var _resizeObserver2;
|
|
1346
|
-
ancestors.forEach(ancestor => {
|
|
1347
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
1348
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
1349
|
-
});
|
|
1350
|
-
cleanupIo == null || cleanupIo();
|
|
1351
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1352
|
-
resizeObserver = null;
|
|
1353
|
-
if (animationFrame) {
|
|
1354
|
-
cancelAnimationFrame(frameId);
|
|
1355
|
-
}
|
|
1356
|
-
};
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
/**
|
|
1360
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
1361
|
-
* element is overflowing a given clipping boundary on each side.
|
|
1362
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
1363
|
-
* - negative = how many pixels left before it will overflow
|
|
1364
|
-
* - 0 = lies flush with the boundary
|
|
1365
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
1366
|
-
*/
|
|
1367
|
-
const detectOverflow = detectOverflow$1;
|
|
1368
|
-
|
|
1369
|
-
/**
|
|
1370
|
-
* Modifies the placement by translating the floating element along the
|
|
1371
|
-
* specified axes.
|
|
1372
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1373
|
-
* object may be passed.
|
|
1374
|
-
* @see https://floating-ui.com/docs/offset
|
|
1375
|
-
*/
|
|
1376
|
-
const offset = offset$1;
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1380
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
1381
|
-
* @see https://floating-ui.com/docs/shift
|
|
1382
|
-
*/
|
|
1383
|
-
const shift = shift$1;
|
|
1384
|
-
|
|
1385
|
-
/**
|
|
1386
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1387
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1388
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
1389
|
-
* @see https://floating-ui.com/docs/flip
|
|
1390
|
-
*/
|
|
1391
|
-
const flip = flip$1;
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1395
|
-
* next to a given reference element.
|
|
1396
|
-
*/
|
|
1397
|
-
const computePosition = (reference, floating, options) => {
|
|
1398
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1399
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1400
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
1401
|
-
const cache = new Map();
|
|
1402
|
-
const mergedOptions = {
|
|
1403
|
-
platform,
|
|
1404
|
-
...options
|
|
1405
|
-
};
|
|
1406
|
-
const platformWithCache = {
|
|
1407
|
-
...mergedOptions.platform,
|
|
1408
|
-
_c: cache
|
|
1409
|
-
};
|
|
1410
|
-
return computePosition$1(reference, floating, {
|
|
1411
|
-
...mergedOptions,
|
|
1412
|
-
platform: platformWithCache
|
|
1413
|
-
});
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1416
|
-
function getDefaultMiddleware(offsetOptions, overflowOptions, flipOptions) {
|
|
1417
|
-
const isMiddleware = (v) => typeof v !== 'boolean';
|
|
1418
|
-
return [
|
|
1419
|
-
offsetOptions != null ? offset(offsetOptions) : offset(4),
|
|
1420
|
-
overflowOptions == null && flip(flipOptions),
|
|
1421
|
-
shift(),
|
|
1422
|
-
overflowOptions != null && preventOverflow(overflowOptions),
|
|
1423
|
-
].filter(isMiddleware);
|
|
1424
|
-
}
|
|
1425
|
-
function preventOverflow(overflowOptions) {
|
|
1426
|
-
return {
|
|
1427
|
-
name: 'boundaryContain',
|
|
1428
|
-
fn: async (state) => {
|
|
1429
|
-
const overflow = await detectOverflow(state, overflowOptions);
|
|
1430
|
-
const leftOverflow = overflow.left > 0 ? overflow.left : 0;
|
|
1431
|
-
const rightOverflow = overflow.right > 0 ? overflow.right : 0;
|
|
1432
|
-
const topOverflow = overflow.top > 0 ? overflow.top : 0;
|
|
1433
|
-
const bottomOverflow = overflow.bottom > 0 ? overflow.bottom : 0;
|
|
1434
|
-
return {
|
|
1435
|
-
x: state.x + leftOverflow - rightOverflow,
|
|
1436
|
-
y: state.y + topOverflow - bottomOverflow,
|
|
1437
|
-
};
|
|
1438
|
-
},
|
|
1439
|
-
};
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
async function computeUpdatedPosition(referenceElement, contentElement, placement, middleware) {
|
|
1443
|
-
const position = await computePosition(referenceElement, contentElement, {
|
|
1444
|
-
placement,
|
|
1445
|
-
middleware,
|
|
1446
|
-
strategy: 'fixed',
|
|
1447
|
-
});
|
|
1448
|
-
return position;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
const popoverCss = ":host{--open-animation-name:open-scale-all;--open-animation:var(--open-animation-name) 0.1s ease-out 1;--close-animation-name:close-scale-all;--close-animation:var(--close-animation-name) 0.2s ease-in-out 1;--transform-origin:var(--none)}.open-animated{animation:var(--open-animation)}.hidden-animated{animation:var(--close-animation)}.hidden>.content{opacity:0;width:0;height:0;visibility:hidden}.hidden{pointer-events:none}.open{z-index:var(--vertex-ui-context-menu-layer)}.anchor{position:fixed}.backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:var(--backdrop-color, white);opacity:var(--backdrop-opacity, 0);z-index:var(--vertex-ui-context-menu-layer)}.popper{position:fixed}.center-bottom{transform-origin:var(--transform-origin, center bottom)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}.center-top{transform-origin:var(--transform-origin, center top)}.left-top{transform-origin:var(--transform-origin, left top)}.right-top{transform-origin:var(--transform-origin, right top)}.left-center{transform-origin:var(--transform-origin, left center)}.left-top{transform-origin:var(--transform-origin, left top)}.left-bottom{transform-origin:var(--transform-origin, left bottom)}.right-center{transform-origin:var(--transform-origin, right center)}.right-top{transform-origin:var(--transform-origin, right top)}.right-bottom{transform-origin:var(--transform-origin, right bottom)}@keyframes open-fade-in{from{opacity:0}to{opacity:1}}@keyframes close-fade-out{from{visibility:visible;height:auto;width:auto;opacity:1}to{opacity:0;height:auto;width:auto}}@keyframes open-scale-all{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes close-scale-all{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scale(1)}to{opacity:0;height:auto;width:auto;transform:scale(0)}}@keyframes open-scale-y{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes close-scale-y{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleY(1)}to{opacity:0;height:auto;width:auto;transform:scaleY(0)}}@keyframes open-scale-x{from{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes close-scale-x{from{visibility:visible;height:auto;width:auto;opacity:1;transform:scaleX(1)}to{opacity:0;height:auto;width:auto;transform:scaleX(0)}}";
|
|
1452
|
-
|
|
1453
|
-
const WINDOW_RESIZE_DEBOUNCE_THRESHOLD = 200;
|
|
1454
|
-
const Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
1455
|
-
constructor() {
|
|
1456
|
-
super();
|
|
1457
|
-
this.__registerHost();
|
|
1458
|
-
this.__attachShadow();
|
|
1459
|
-
this.dismissed = createEvent(this, "dismissed", 7);
|
|
1460
|
-
this.shouldUpdatePosition = false;
|
|
1461
|
-
this.middleware = [];
|
|
1462
|
-
this.partialWindow = window;
|
|
1463
|
-
this.open = false;
|
|
1464
|
-
this.placement = 'bottom-start';
|
|
1465
|
-
this.position = undefined;
|
|
1466
|
-
this.anchorBounds = undefined;
|
|
1467
|
-
this.backdrop = true;
|
|
1468
|
-
this.animated = false;
|
|
1469
|
-
this.anchorSelector = undefined;
|
|
1470
|
-
this.boundarySelector = undefined;
|
|
1471
|
-
this.resizeBehavior = 'dynamic';
|
|
1472
|
-
this.overflowBehavior = undefined;
|
|
1473
|
-
this.flipBehavior = undefined;
|
|
1474
|
-
this.offsetBehavior = undefined;
|
|
1475
|
-
this.updateOnResize = false;
|
|
1476
|
-
this.opened = false;
|
|
1477
|
-
this.computedPlacement = this.placement;
|
|
1478
|
-
this.resizeObserverFactory = (cb) => new ResizeObserver(cb);
|
|
1479
|
-
this.updateListener = this.updateListener.bind(this);
|
|
1480
|
-
this.handlePositionUpdate = this.handlePositionUpdate.bind(this);
|
|
1481
|
-
this.handleResize = this.handleResize.bind(this);
|
|
1482
|
-
this.handleMiddlewareChange = this.handleMiddlewareChange.bind(this);
|
|
1483
|
-
this.setWindow = this.setWindow.bind(this);
|
|
1484
|
-
this.updateResizeObserver = this.updateResizeObserver.bind(this);
|
|
1485
|
-
}
|
|
1486
|
-
connectedCallback() {
|
|
1487
|
-
this.updatePosition(this.position);
|
|
1488
|
-
this.updateResizeObserver();
|
|
1489
|
-
}
|
|
1490
|
-
componentDidUpdate() {
|
|
1491
|
-
if (this.shouldUpdatePosition) {
|
|
1492
|
-
this.shouldUpdatePosition = false;
|
|
1493
|
-
if (this.updateDispose != null) {
|
|
1494
|
-
this.handlePositionUpdate();
|
|
1495
|
-
}
|
|
1496
|
-
else {
|
|
1497
|
-
this.updateListener();
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
componentDidLoad() {
|
|
1502
|
-
this.updateViewport();
|
|
1503
|
-
this.handleMiddlewareChange();
|
|
1504
|
-
this.updateListener();
|
|
1505
|
-
if (this.resizeBehavior === 'dynamic') {
|
|
1506
|
-
window.addEventListener('resize', this.handleResize);
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
disconnectedCallback() {
|
|
1510
|
-
var _a;
|
|
1511
|
-
this.viewportWidth = undefined;
|
|
1512
|
-
this.viewportHeight = undefined;
|
|
1513
|
-
this.opened = false;
|
|
1514
|
-
if (this.resizeBehavior === 'dynamic') {
|
|
1515
|
-
window.removeEventListener('resize', this.handleResize);
|
|
1516
|
-
}
|
|
1517
|
-
(_a = this.boundaryResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1518
|
-
}
|
|
1519
|
-
updatePosition(position) {
|
|
1520
|
-
if (position != null) {
|
|
1521
|
-
this.anchorPosition =
|
|
1522
|
-
typeof position === 'object' ? position : JSON.parse(position);
|
|
1523
|
-
this.shouldUpdatePosition = true;
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
updatePlacement() {
|
|
1527
|
-
this.updatePosition(this.position);
|
|
1528
|
-
}
|
|
1529
|
-
updateOpened(open) {
|
|
1530
|
-
if (open) {
|
|
1531
|
-
this.opened = true;
|
|
1532
|
-
}
|
|
1533
|
-
this.updateListener();
|
|
1534
|
-
}
|
|
1535
|
-
updateAnimated() {
|
|
1536
|
-
this.opened = this.open;
|
|
1537
|
-
}
|
|
1538
|
-
updateMiddleware() {
|
|
1539
|
-
this.handleMiddlewareChange();
|
|
1540
|
-
}
|
|
1541
|
-
updateResizeObserver() {
|
|
1542
|
-
const observer = this.getOrCreateResizeObserver();
|
|
1543
|
-
observer.disconnect();
|
|
1544
|
-
if (this.boundarySelector != null) {
|
|
1545
|
-
const element = document.querySelector(this.boundarySelector);
|
|
1546
|
-
if (element != null) {
|
|
1547
|
-
observer.observe(element);
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
/**
|
|
1552
|
-
* @private Used for internals or testing.
|
|
1553
|
-
*/
|
|
1554
|
-
setWindow(partialWindow) {
|
|
1555
|
-
this.partialWindow = partialWindow;
|
|
1556
|
-
}
|
|
1557
|
-
render() {
|
|
1558
|
-
var _a, _b;
|
|
1559
|
-
return (h(Host, null, this.open && this.backdrop && (h("div", { class: "backdrop", onPointerDown: () => {
|
|
1560
|
-
this.open = false;
|
|
1561
|
-
this.dismissed.emit();
|
|
1562
|
-
} })), this.anchorPosition && (h("div", { ref: (element) => (this.anchorPointRef = element), class: "anchor", style: {
|
|
1563
|
-
left: `${((_a = this.anchorPosition) === null || _a === void 0 ? void 0 : _a.x) || 0}px`,
|
|
1564
|
-
top: `${((_b = this.anchorPosition) === null || _b === void 0 ? void 0 : _b.y) || 0}px`,
|
|
1565
|
-
} })), h("slot", { name: "anchor" }), h("div", { ref: (element) => (this.wrapperRef = element), class: classnames('popper', {
|
|
1566
|
-
hidden: !this.open,
|
|
1567
|
-
open: this.open,
|
|
1568
|
-
}) }, h("div", { class: classnames('content', {
|
|
1569
|
-
'hidden-animated': !this.open && this.opened && this.animated,
|
|
1570
|
-
'open-animated': this.open && this.animated,
|
|
1571
|
-
}, this.getTransformClass()), onAnimationEnd: () => {
|
|
1572
|
-
this.opened = this.open;
|
|
1573
|
-
} }, h("slot", null)))));
|
|
1574
|
-
}
|
|
1575
|
-
updateListener() {
|
|
1576
|
-
var _a, _b, _c, _d;
|
|
1577
|
-
const referenceElement = (_b = (_a = this.getSlottedAnchorElement()) !== null && _a !== void 0 ? _a : this.anchorPointRef) !== null && _b !== void 0 ? _b : this.getAnchorBoundsVirtualElement();
|
|
1578
|
-
if (this.open && referenceElement != null && this.wrapperRef != null) {
|
|
1579
|
-
(_c = this.updateDispose) === null || _c === void 0 ? void 0 : _c.call(this);
|
|
1580
|
-
this.updateDispose = autoUpdate(referenceElement, this.wrapperRef, this.handlePositionUpdate);
|
|
1581
|
-
this.handlePositionUpdate();
|
|
1582
|
-
}
|
|
1583
|
-
else {
|
|
1584
|
-
(_d = this.updateDispose) === null || _d === void 0 ? void 0 : _d.call(this);
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
async handlePositionUpdate() {
|
|
1588
|
-
var _a, _b, _c;
|
|
1589
|
-
const referenceElement = (_b = (_a = this.getSlottedAnchorElement()) !== null && _a !== void 0 ? _a : this.anchorPointRef) !== null && _b !== void 0 ? _b : this.getAnchorBoundsVirtualElement();
|
|
1590
|
-
if (referenceElement != null && this.wrapperRef != null) {
|
|
1591
|
-
const position = await computeUpdatedPosition(referenceElement, this.wrapperRef, this.placement, this.middleware);
|
|
1592
|
-
this.computedPlacement = position.placement;
|
|
1593
|
-
(_c = this.wrapperRef) === null || _c === void 0 ? void 0 : _c.setAttribute('style', `left: ${position.x}px; top: ${position.y}px;`);
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
handleMiddlewareChange() {
|
|
1597
|
-
var _a, _b, _c;
|
|
1598
|
-
const anchorSlotElement = (_a = this.getSlottedAnchorElement()) !== null && _a !== void 0 ? _a : this.getAnchorBoundsVirtualElement();
|
|
1599
|
-
const offset = anchorSlotElement != null ? 4 : 0;
|
|
1600
|
-
const boundary = this.boundarySelector != null
|
|
1601
|
-
? (_b = document.querySelector(this.boundarySelector)) !== null && _b !== void 0 ? _b : undefined
|
|
1602
|
-
: undefined;
|
|
1603
|
-
this.middleware = getDefaultMiddleware((_c = this.offsetBehavior) !== null && _c !== void 0 ? _c : offset, boundary != null
|
|
1604
|
-
? Object.assign({ boundary }, this.overflowBehavior) : this.overflowBehavior, this.flipBehavior);
|
|
1605
|
-
this.updateListener();
|
|
1606
|
-
}
|
|
1607
|
-
getSlottedAnchorElement() {
|
|
1608
|
-
var _a, _b, _c;
|
|
1609
|
-
if (this.anchorSelector != null) {
|
|
1610
|
-
return (((_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.anchorSelector)) ||
|
|
1611
|
-
this.hostElement.querySelector(this.anchorSelector) ||
|
|
1612
|
-
undefined);
|
|
1613
|
-
}
|
|
1614
|
-
else {
|
|
1615
|
-
const anchorSlot = ((_b = this.hostElement.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('slot[name="anchor"]')) ||
|
|
1616
|
-
undefined;
|
|
1617
|
-
if (((_c = anchorSlot === null || anchorSlot === void 0 ? void 0 : anchorSlot.assignedElements) === null || _c === void 0 ? void 0 : _c.call(anchorSlot).length) || 0 > 0) {
|
|
1618
|
-
return anchorSlot === null || anchorSlot === void 0 ? void 0 : anchorSlot.assignedElements()[0];
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
getAnchorBoundsVirtualElement() {
|
|
1623
|
-
if (this.anchorBounds != null) {
|
|
1624
|
-
return {
|
|
1625
|
-
getBoundingClientRect: () => {
|
|
1626
|
-
return DOMRect.fromRect(this.anchorBounds);
|
|
1627
|
-
},
|
|
1628
|
-
};
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
handleResize() {
|
|
1632
|
-
if (this.resizeTimeout != null) {
|
|
1633
|
-
clearTimeout(this.resizeTimeout);
|
|
1634
|
-
}
|
|
1635
|
-
if (this.open) {
|
|
1636
|
-
this.resizeTimeout = setTimeout(() => {
|
|
1637
|
-
this.resizeTimeout = undefined;
|
|
1638
|
-
if (this.anchorPosition != null &&
|
|
1639
|
-
this.viewportWidth != null &&
|
|
1640
|
-
this.viewportHeight != null) {
|
|
1641
|
-
const relativeWidth = this.anchorPosition.x / this.viewportWidth;
|
|
1642
|
-
const relativeHeight = this.anchorPosition.y / this.viewportHeight;
|
|
1643
|
-
this.position = {
|
|
1644
|
-
x: this.partialWindow.innerWidth * relativeWidth,
|
|
1645
|
-
y: this.partialWindow.innerHeight * relativeHeight,
|
|
1646
|
-
};
|
|
1647
|
-
}
|
|
1648
|
-
this.updateViewport();
|
|
1649
|
-
}, WINDOW_RESIZE_DEBOUNCE_THRESHOLD);
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
updateViewport() {
|
|
1653
|
-
this.viewportWidth = this.partialWindow.innerWidth;
|
|
1654
|
-
this.viewportHeight = this.partialWindow.innerHeight;
|
|
1655
|
-
}
|
|
1656
|
-
getOrCreateResizeObserver() {
|
|
1657
|
-
if (this.boundaryResizeObserver == null) {
|
|
1658
|
-
this.boundaryResizeObserver = this.resizeObserverFactory(this.handleMiddlewareChange);
|
|
1659
|
-
}
|
|
1660
|
-
return this.boundaryResizeObserver;
|
|
1661
|
-
}
|
|
1662
|
-
getTransformClass() {
|
|
1663
|
-
if (this.animated) {
|
|
1664
|
-
switch (this.computedPlacement) {
|
|
1665
|
-
case 'top':
|
|
1666
|
-
return 'center-bottom';
|
|
1667
|
-
case 'top-start':
|
|
1668
|
-
return 'left-bottom';
|
|
1669
|
-
case 'top-end':
|
|
1670
|
-
return 'right-bottom';
|
|
1671
|
-
case 'bottom':
|
|
1672
|
-
return 'center-top';
|
|
1673
|
-
case 'bottom-start':
|
|
1674
|
-
return 'left-top';
|
|
1675
|
-
case 'bottom-end':
|
|
1676
|
-
return 'right-top';
|
|
1677
|
-
case 'right':
|
|
1678
|
-
return 'left-center';
|
|
1679
|
-
case 'right-start':
|
|
1680
|
-
return 'left-top';
|
|
1681
|
-
case 'right-end':
|
|
1682
|
-
return 'left-bottom';
|
|
1683
|
-
case 'left':
|
|
1684
|
-
return 'right-center';
|
|
1685
|
-
case 'left-start':
|
|
1686
|
-
return 'right-top';
|
|
1687
|
-
case 'left-end':
|
|
1688
|
-
return 'right-bottom';
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1692
|
-
get hostElement() { return this; }
|
|
1693
|
-
static get watchers() { return {
|
|
1694
|
-
"position": ["updatePosition"],
|
|
1695
|
-
"placement": ["updatePlacement"],
|
|
1696
|
-
"open": ["updateOpened"],
|
|
1697
|
-
"animated": ["updateAnimated"],
|
|
1698
|
-
"boundarySelector": ["updateMiddleware", "updateResizeObserver"],
|
|
1699
|
-
"overflowBehavior": ["updateMiddleware"],
|
|
1700
|
-
"flipBehavior": ["updateMiddleware"],
|
|
1701
|
-
"offsetBehavior": ["updateMiddleware"]
|
|
1702
|
-
}; }
|
|
1703
|
-
static get style() { return popoverCss; }
|
|
1704
|
-
}, [1, "vertex-popover", {
|
|
1705
|
-
"open": [1540],
|
|
1706
|
-
"placement": [1],
|
|
1707
|
-
"position": [1025],
|
|
1708
|
-
"anchorBounds": [16],
|
|
1709
|
-
"backdrop": [4],
|
|
1710
|
-
"animated": [4],
|
|
1711
|
-
"anchorSelector": [1, "anchor-selector"],
|
|
1712
|
-
"boundarySelector": [1, "boundary-selector"],
|
|
1713
|
-
"resizeBehavior": [1, "resize-behavior"],
|
|
1714
|
-
"overflowBehavior": [16],
|
|
1715
|
-
"flipBehavior": [16],
|
|
1716
|
-
"offsetBehavior": [2, "offset-behavior"],
|
|
1717
|
-
"updateOnResize": [4, "update-on-resize"],
|
|
1718
|
-
"resizeObserverFactory": [16],
|
|
1719
|
-
"opened": [32],
|
|
1720
|
-
"computedPlacement": [32]
|
|
1721
|
-
}]);
|
|
1722
|
-
function defineCustomElement() {
|
|
1723
|
-
if (typeof customElements === "undefined") {
|
|
1724
|
-
return;
|
|
1725
|
-
}
|
|
1726
|
-
const components = ["vertex-popover"];
|
|
1727
|
-
components.forEach(tagName => { switch (tagName) {
|
|
1728
|
-
case "vertex-popover":
|
|
1729
|
-
if (!customElements.get(tagName)) {
|
|
1730
|
-
customElements.define(tagName, Popover);
|
|
1731
|
-
}
|
|
1732
|
-
break;
|
|
1733
|
-
} });
|
|
1734
|
-
}
|
|
1735
|
-
defineCustomElement();
|
|
1736
|
-
|
|
1737
|
-
export { Popover as P, defineCustomElement as d };
|