@gemologic/sheen 0.1.0-rc.0 → 0.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/dist/primitives/Accordion.js +1 -1
- package/dist/primitives/Collapsible.js +1 -1
- package/dist/primitives/Combobox.js +1 -1
- package/dist/primitives/CommandPalette.js +2 -2
- package/dist/primitives/ContextMenu.js +2 -2
- package/dist/primitives/Dialog.js +1 -1
- package/dist/primitives/DropdownMenu.js +2 -2
- package/dist/primitives/LinkTooltip.js +1 -1
- package/dist/primitives/Popover.js +1 -1
- package/dist/primitives/Select.js +1 -1
- package/dist/primitives/Tabs.js +1 -1
- package/dist/primitives/Tooltip.js +1 -1
- package/dist/primitives/tooltip-layer.js +1 -1
- package/dist/theme/ThemeProvider.js +30 -30
- package/dist/theme/intl.js +4 -4
- package/dist/utils/polymorphic.d.ts +1 -1
- package/dist/vite.d.ts +3 -0
- package/dist/vite.js +54 -0
- package/package.json +71 -5
- package/src/primitives/Accordion.tsx +1 -1
- package/src/primitives/Collapsible.tsx +1 -1
- package/src/primitives/Combobox.tsx +1 -1
- package/src/primitives/CommandPalette.tsx +2 -2
- package/src/primitives/ContextMenu.tsx +2 -2
- package/src/primitives/Dialog.tsx +1 -1
- package/src/primitives/DropdownMenu.tsx +2 -2
- package/src/primitives/LinkTooltip.tsx +1 -1
- package/src/primitives/Popover.tsx +1 -1
- package/src/primitives/Select.tsx +1 -1
- package/src/primitives/Tabs.tsx +1 -1
- package/src/primitives/Tooltip.tsx +1 -1
- package/src/primitives/tooltip-layer.tsx +1 -1
- package/src/theme/ThemeProvider.tsx +7 -3
- package/src/theme/intl.ts +4 -2
- package/src/utils/polymorphic.ts +1 -1
- package/src/vite.ts +51 -0
- package/vendor/cmdk-solid/LICENSE +14 -0
- package/vendor/cmdk-solid/chunk/5WIGIOAJ.jsx +98 -0
- package/vendor/cmdk-solid/chunk/IOVUHIGA.js +96 -0
- package/vendor/cmdk-solid/command-score.cjs +98 -0
- package/vendor/cmdk-solid/command-score.d.cts +4 -0
- package/vendor/cmdk-solid/command-score.d.ts +4 -0
- package/vendor/cmdk-solid/command-score.js +2 -0
- package/vendor/cmdk-solid/command-score.jsx +7 -0
- package/vendor/cmdk-solid/index.cjs +827 -0
- package/vendor/cmdk-solid/index.d.cts +184 -0
- package/vendor/cmdk-solid/index.d.ts +184 -0
- package/vendor/cmdk-solid/index.js +729 -0
- package/vendor/cmdk-solid/index.jsx +666 -0
- package/vendor/integrity.json +450 -0
- package/vendor/kobalte-core/LICENSE.md +21 -0
- package/vendor/kobalte-core/NOTICE.txt +231 -0
- package/vendor/kobalte-core/accordion/index.d.ts +10 -0
- package/vendor/kobalte-core/accordion/index.js +2 -0
- package/vendor/kobalte-core/accordion/index.jsx +33 -0
- package/vendor/kobalte-core/alert/index.d.ts +5 -0
- package/vendor/kobalte-core/alert/index.js +2 -0
- package/vendor/kobalte-core/alert/index.jsx +11 -0
- package/vendor/kobalte-core/alert-dialog/index.d.ts +10 -0
- package/vendor/kobalte-core/alert-dialog/index.js +3 -0
- package/vendor/kobalte-core/alert-dialog/index.jsx +40 -0
- package/vendor/kobalte-core/badge/index.d.ts +23 -0
- package/vendor/kobalte-core/badge/index.js +24 -0
- package/vendor/kobalte-core/badge/index.jsx +24 -0
- package/vendor/kobalte-core/breadcrumbs/index.d.ts +5 -0
- package/vendor/kobalte-core/breadcrumbs/index.js +2 -0
- package/vendor/kobalte-core/breadcrumbs/index.jsx +19 -0
- package/vendor/kobalte-core/button/index.d.ts +6 -0
- package/vendor/kobalte-core/button/index.js +2 -0
- package/vendor/kobalte-core/button/index.jsx +12 -0
- package/vendor/kobalte-core/button-root-da654b3e.d.ts +28 -0
- package/vendor/kobalte-core/checkbox/index.d.ts +8 -0
- package/vendor/kobalte-core/checkbox/index.js +2 -0
- package/vendor/kobalte-core/checkbox/index.jsx +35 -0
- package/vendor/kobalte-core/chunk/272QBW42.js +712 -0
- package/vendor/kobalte-core/chunk/27MLNS66.js +353 -0
- package/vendor/kobalte-core/chunk/2RVGL3MU.js +45 -0
- package/vendor/kobalte-core/chunk/2UV3VFID.jsx +431 -0
- package/vendor/kobalte-core/chunk/2X5XWQIS.js +19 -0
- package/vendor/kobalte-core/chunk/2YCOH52P.js +81 -0
- package/vendor/kobalte-core/chunk/3565MS4H.jsx +127 -0
- package/vendor/kobalte-core/chunk/3ARTUDH2.jsx +1633 -0
- package/vendor/kobalte-core/chunk/3D6FM2PJ.js +1001 -0
- package/vendor/kobalte-core/chunk/3DLZMX4Z.jsx +81 -0
- package/vendor/kobalte-core/chunk/3DZKSKAQ.jsx +366 -0
- package/vendor/kobalte-core/chunk/3JA5IX2L.jsx +52 -0
- package/vendor/kobalte-core/chunk/3NGA46QE.js +116 -0
- package/vendor/kobalte-core/chunk/3QQCO6IA.js +46 -0
- package/vendor/kobalte-core/chunk/3T74IGH6.js +860 -0
- package/vendor/kobalte-core/chunk/3XNSRO2W.jsx +226 -0
- package/vendor/kobalte-core/chunk/43XIKO67.js +99 -0
- package/vendor/kobalte-core/chunk/4VWIKJ7Q.jsx +842 -0
- package/vendor/kobalte-core/chunk/53Y5XP3B.js +61 -0
- package/vendor/kobalte-core/chunk/5WXHJDCZ.jsx +10 -0
- package/vendor/kobalte-core/chunk/5ZKAE4VZ.js +8 -0
- package/vendor/kobalte-core/chunk/66KLKSW3.js +36 -0
- package/vendor/kobalte-core/chunk/6TDKM7BK.jsx +815 -0
- package/vendor/kobalte-core/chunk/6Y7B2NEO.js +21 -0
- package/vendor/kobalte-core/chunk/7ABWW5DT.jsx +483 -0
- package/vendor/kobalte-core/chunk/7CVNMTYF.js +171 -0
- package/vendor/kobalte-core/chunk/7DPKSDZL.js +447 -0
- package/vendor/kobalte-core/chunk/7I44E2QD.js +190 -0
- package/vendor/kobalte-core/chunk/7LCANGHD.js +29 -0
- package/vendor/kobalte-core/chunk/7OVKXYPU.js +90 -0
- package/vendor/kobalte-core/chunk/7TPOQ36Z.js +202 -0
- package/vendor/kobalte-core/chunk/7ZHN3PYD.js +30 -0
- package/vendor/kobalte-core/chunk/ANN3A2QM.js +29 -0
- package/vendor/kobalte-core/chunk/AT6SKIG6.js +119 -0
- package/vendor/kobalte-core/chunk/AWVDBFMO.jsx +280 -0
- package/vendor/kobalte-core/chunk/B2CSS4CB.js +36 -0
- package/vendor/kobalte-core/chunk/BDJEWKR2.jsx +153 -0
- package/vendor/kobalte-core/chunk/BK63AFY4.js +348 -0
- package/vendor/kobalte-core/chunk/BLN63FDC.js +40 -0
- package/vendor/kobalte-core/chunk/BU4OFZP5.jsx +146 -0
- package/vendor/kobalte-core/chunk/CLZZ2KZC.js +152 -0
- package/vendor/kobalte-core/chunk/CODJDE4S.jsx +131 -0
- package/vendor/kobalte-core/chunk/CWAEFUDR.js +732 -0
- package/vendor/kobalte-core/chunk/DBKNBLZP.js +395 -0
- package/vendor/kobalte-core/chunk/DTAYBJDT.jsx +339 -0
- package/vendor/kobalte-core/chunk/DX4MAOJL.js +653 -0
- package/vendor/kobalte-core/chunk/E4R2EMM4.js +10 -0
- package/vendor/kobalte-core/chunk/E53DB7BS.jsx +34 -0
- package/vendor/kobalte-core/chunk/EHGSTO6V.jsx +138 -0
- package/vendor/kobalte-core/chunk/EJ5I5XML.jsx +1 -0
- package/vendor/kobalte-core/chunk/ET5T45DO.js +17 -0
- package/vendor/kobalte-core/chunk/EYO4IMPK.jsx +867 -0
- package/vendor/kobalte-core/chunk/FINWO3A5.jsx +21 -0
- package/vendor/kobalte-core/chunk/FKUFPCQ6.jsx +120 -0
- package/vendor/kobalte-core/chunk/FLVHQV4A.jsx +22 -0
- package/vendor/kobalte-core/chunk/FN6EICGO.jsx +44 -0
- package/vendor/kobalte-core/chunk/FOXVCQFV.jsx +48 -0
- package/vendor/kobalte-core/chunk/G3KI2B4X.js +228 -0
- package/vendor/kobalte-core/chunk/G4JQYERT.jsx +1 -0
- package/vendor/kobalte-core/chunk/GAVSAJBM.jsx +86 -0
- package/vendor/kobalte-core/chunk/GIRHAWVP.jsx +46 -0
- package/vendor/kobalte-core/chunk/GROIIANN.jsx +32 -0
- package/vendor/kobalte-core/chunk/GSF7SFRW.jsx +98 -0
- package/vendor/kobalte-core/chunk/GXANOQ5B.jsx +66 -0
- package/vendor/kobalte-core/chunk/H7BK6JF7.jsx +489 -0
- package/vendor/kobalte-core/chunk/HGKTPMYY.js +1332 -0
- package/vendor/kobalte-core/chunk/HWIPVJ7H.js +121 -0
- package/vendor/kobalte-core/chunk/I2LBZHJH.js +144 -0
- package/vendor/kobalte-core/chunk/ICNSTULC.js +33 -0
- package/vendor/kobalte-core/chunk/IGYOA2ZZ.jsx +33 -0
- package/vendor/kobalte-core/chunk/IN725QRS.js +175 -0
- package/vendor/kobalte-core/chunk/INFLGCRV.js +123 -0
- package/vendor/kobalte-core/chunk/JEP7F7FN.js +89 -0
- package/vendor/kobalte-core/chunk/JGNXQB3J.js +140 -0
- package/vendor/kobalte-core/chunk/JHMNWOLY.jsx +87 -0
- package/vendor/kobalte-core/chunk/JNCCF6MP.jsx +12 -0
- package/vendor/kobalte-core/chunk/K6ON3K7Z.js +93 -0
- package/vendor/kobalte-core/chunk/K6P57S75.js +23 -0
- package/vendor/kobalte-core/chunk/KEL2LLJM.jsx +244 -0
- package/vendor/kobalte-core/chunk/KQVCPTCE.js +316 -0
- package/vendor/kobalte-core/chunk/KR2RRKPK.jsx +197 -0
- package/vendor/kobalte-core/chunk/KVL5CS3M.jsx +37 -0
- package/vendor/kobalte-core/chunk/LP6E37CW.jsx +228 -0
- package/vendor/kobalte-core/chunk/LUHKRAPV.js +129 -0
- package/vendor/kobalte-core/chunk/LV6CC6HJ.js +226 -0
- package/vendor/kobalte-core/chunk/MUDPLHYE.js +56 -0
- package/vendor/kobalte-core/chunk/NEFPNRTI.jsx +426 -0
- package/vendor/kobalte-core/chunk/NY67XGGP.js +216 -0
- package/vendor/kobalte-core/chunk/OGE3DKII.jsx +413 -0
- package/vendor/kobalte-core/chunk/OK5BA5VH.jsx +533 -0
- package/vendor/kobalte-core/chunk/OPHDMVQK.jsx +217 -0
- package/vendor/kobalte-core/chunk/OPRD3XHK.js +207 -0
- package/vendor/kobalte-core/chunk/OU7DYFTQ.jsx +191 -0
- package/vendor/kobalte-core/chunk/OYES4GOP.jsx +21 -0
- package/vendor/kobalte-core/chunk/P6IXTWXS.jsx +197 -0
- package/vendor/kobalte-core/chunk/PBBM7A6R.jsx +113 -0
- package/vendor/kobalte-core/chunk/PKWJSNR5.js +474 -0
- package/vendor/kobalte-core/chunk/PTVG6YKC.js +148 -0
- package/vendor/kobalte-core/chunk/PTWD4LYA.jsx +537 -0
- package/vendor/kobalte-core/chunk/PYSNB6I6.jsx +324 -0
- package/vendor/kobalte-core/chunk/Q2T3QQUA.js +419 -0
- package/vendor/kobalte-core/chunk/QEMPLYZX.js +28 -0
- package/vendor/kobalte-core/chunk/QIRIOMOH.js +338 -0
- package/vendor/kobalte-core/chunk/QJIB6BDF.jsx +30 -0
- package/vendor/kobalte-core/chunk/QJK6CGTE.js +293 -0
- package/vendor/kobalte-core/chunk/R4V3527Z.js +130 -0
- package/vendor/kobalte-core/chunk/R5JXRO27.js +1 -0
- package/vendor/kobalte-core/chunk/RFN6X5VH.jsx +1058 -0
- package/vendor/kobalte-core/chunk/SD3NY4DU.js +344 -0
- package/vendor/kobalte-core/chunk/SLRA6PIF.jsx +263 -0
- package/vendor/kobalte-core/chunk/SOM3K36D.jsx +191 -0
- package/vendor/kobalte-core/chunk/STGRFJHZ.js +43 -0
- package/vendor/kobalte-core/chunk/T4C3DMHT.jsx +52 -0
- package/vendor/kobalte-core/chunk/TDH5Z2ZB.js +263 -0
- package/vendor/kobalte-core/chunk/TP2BLHDF.jsx +284 -0
- package/vendor/kobalte-core/chunk/TS4C47MF.js +22 -0
- package/vendor/kobalte-core/chunk/TSB6MOZK.jsx +242 -0
- package/vendor/kobalte-core/chunk/TVVHJCOX.js +204 -0
- package/vendor/kobalte-core/chunk/TY22MKYR.jsx +996 -0
- package/vendor/kobalte-core/chunk/UEEZAKDC.js +1 -0
- package/vendor/kobalte-core/chunk/UESR3MKV.jsx +743 -0
- package/vendor/kobalte-core/chunk/UGE6PPGT.jsx +220 -0
- package/vendor/kobalte-core/chunk/UKTBL2JL.jsx +88 -0
- package/vendor/kobalte-core/chunk/V25KEN4T.jsx +399 -0
- package/vendor/kobalte-core/chunk/VI7QYH27.jsx +33 -0
- package/vendor/kobalte-core/chunk/W4MWOWKG.js +310 -0
- package/vendor/kobalte-core/chunk/WAUM5GOD.jsx +68 -0
- package/vendor/kobalte-core/chunk/WHII6HHI.js +145 -0
- package/vendor/kobalte-core/chunk/WKVBAVXH.jsx +378 -0
- package/vendor/kobalte-core/chunk/WR5BIFYV.js +780 -0
- package/vendor/kobalte-core/chunk/XLBXJFYN.js +108 -0
- package/vendor/kobalte-core/chunk/XNF3WGZ2.jsx +176 -0
- package/vendor/kobalte-core/chunk/XOC6SOOC.jsx +53 -0
- package/vendor/kobalte-core/chunk/XTJD7L6B.jsx +101 -0
- package/vendor/kobalte-core/chunk/XUUROM4M.jsx +120 -0
- package/vendor/kobalte-core/chunk/YA7DCYMB.js +80 -0
- package/vendor/kobalte-core/chunk/YFEENJN5.jsx +41 -0
- package/vendor/kobalte-core/chunk/YGDQXQ2B.js +28 -0
- package/vendor/kobalte-core/chunk/YKGT7A57.js +85 -0
- package/vendor/kobalte-core/chunk/YPUNLYJC.js +268 -0
- package/vendor/kobalte-core/chunk/YSW4UOAR.js +40 -0
- package/vendor/kobalte-core/chunk/ZAGMEN2K.jsx +152 -0
- package/vendor/kobalte-core/chunk/ZG3NR5OC.jsx +120 -0
- package/vendor/kobalte-core/chunk/ZZYKR3VO.jsx +42 -0
- package/vendor/kobalte-core/collapsible/index.d.ts +7 -0
- package/vendor/kobalte-core/collapsible/index.js +2 -0
- package/vendor/kobalte-core/collapsible/index.jsx +23 -0
- package/vendor/kobalte-core/collapsible-trigger-6358fcd4.d.ts +84 -0
- package/vendor/kobalte-core/color-area/index.d.ts +189 -0
- package/vendor/kobalte-core/color-area/index.js +724 -0
- package/vendor/kobalte-core/color-area/index.jsx +777 -0
- package/vendor/kobalte-core/color-channel-field/index.d.ts +49 -0
- package/vendor/kobalte-core/color-channel-field/index.js +72 -0
- package/vendor/kobalte-core/color-channel-field/index.jsx +117 -0
- package/vendor/kobalte-core/color-field/index.d.ts +48 -0
- package/vendor/kobalte-core/color-field/index.js +114 -0
- package/vendor/kobalte-core/color-field/index.jsx +155 -0
- package/vendor/kobalte-core/color-mode/index.d.ts +78 -0
- package/vendor/kobalte-core/color-mode/index.js +2 -0
- package/vendor/kobalte-core/color-mode/index.jsx +28 -0
- package/vendor/kobalte-core/color-slider/index.d.ts +109 -0
- package/vendor/kobalte-core/color-slider/index.js +183 -0
- package/vendor/kobalte-core/color-slider/index.jsx +255 -0
- package/vendor/kobalte-core/color-swatch/index.d.ts +39 -0
- package/vendor/kobalte-core/color-swatch/index.js +48 -0
- package/vendor/kobalte-core/color-swatch/index.jsx +64 -0
- package/vendor/kobalte-core/color-wheel/index.d.ts +166 -0
- package/vendor/kobalte-core/color-wheel/index.js +620 -0
- package/vendor/kobalte-core/color-wheel/index.jsx +640 -0
- package/vendor/kobalte-core/colors/index.d.ts +15 -0
- package/vendor/kobalte-core/colors/index.js +2 -0
- package/vendor/kobalte-core/colors/index.jsx +17 -0
- package/vendor/kobalte-core/combobox/index.d.ts +20 -0
- package/vendor/kobalte-core/combobox/index.js +8 -0
- package/vendor/kobalte-core/combobox/index.jsx +80 -0
- package/vendor/kobalte-core/combobox-root-3702d1f6.d.ts +382 -0
- package/vendor/kobalte-core/context-menu/index.d.ts +15 -0
- package/vendor/kobalte-core/context-menu/index.js +5 -0
- package/vendor/kobalte-core/context-menu/index.jsx +75 -0
- package/vendor/kobalte-core/create-list-state-d9a0f1f2.d.ts +232 -0
- package/vendor/kobalte-core/dialog/index.d.ts +10 -0
- package/vendor/kobalte-core/dialog/index.js +2 -0
- package/vendor/kobalte-core/dialog/index.jsx +40 -0
- package/vendor/kobalte-core/dialog-trigger-f415bd9b.d.ts +184 -0
- package/vendor/kobalte-core/dismissable-layer/index.d.ts +51 -0
- package/vendor/kobalte-core/dismissable-layer/index.js +2 -0
- package/vendor/kobalte-core/dismissable-layer/index.jsx +12 -0
- package/vendor/kobalte-core/dropdown-menu/index.d.ts +18 -0
- package/vendor/kobalte-core/dropdown-menu/index.js +5 -0
- package/vendor/kobalte-core/dropdown-menu/index.jsx +73 -0
- package/vendor/kobalte-core/file-field/index.d.ts +221 -0
- package/vendor/kobalte-core/file-field/index.js +539 -0
- package/vendor/kobalte-core/file-field/index.jsx +564 -0
- package/vendor/kobalte-core/form-control-description-330657bc.d.ts +49 -0
- package/vendor/kobalte-core/form-control-error-message-9efcbea8.d.ts +25 -0
- package/vendor/kobalte-core/form-control-label-2a5ca7a3.d.ts +22 -0
- package/vendor/kobalte-core/hover-card/index.d.ts +11 -0
- package/vendor/kobalte-core/hover-card/index.js +3 -0
- package/vendor/kobalte-core/hover-card/index.jsx +33 -0
- package/vendor/kobalte-core/i18n/index.d.ts +81 -0
- package/vendor/kobalte-core/i18n/index.js +2 -0
- package/vendor/kobalte-core/i18n/index.jsx +28 -0
- package/vendor/kobalte-core/image/index.d.ts +5 -0
- package/vendor/kobalte-core/image/index.js +2 -0
- package/vendor/kobalte-core/image/index.jsx +17 -0
- package/vendor/kobalte-core/index-19a0ff67.d.ts +180 -0
- package/vendor/kobalte-core/index-1a4410b1.d.ts +184 -0
- package/vendor/kobalte-core/index-29c57b8d.d.ts +90 -0
- package/vendor/kobalte-core/index-2a97f0d5.d.ts +259 -0
- package/vendor/kobalte-core/index-339032c6.d.ts +24 -0
- package/vendor/kobalte-core/index-3a4165aa.d.ts +38 -0
- package/vendor/kobalte-core/index-45d19411.d.ts +181 -0
- package/vendor/kobalte-core/index-47114d4c.d.ts +153 -0
- package/vendor/kobalte-core/index-4933558f.d.ts +22 -0
- package/vendor/kobalte-core/index-4cb1a0c7.d.ts +178 -0
- package/vendor/kobalte-core/index-544033ad.d.ts +148 -0
- package/vendor/kobalte-core/index-5eae1bf9.d.ts +145 -0
- package/vendor/kobalte-core/index-64ed0578.d.ts +47 -0
- package/vendor/kobalte-core/index-68c6e688.d.ts +125 -0
- package/vendor/kobalte-core/index-71913923.d.ts +107 -0
- package/vendor/kobalte-core/index-774e18fb.d.ts +155 -0
- package/vendor/kobalte-core/index-78f1e72b.d.ts +22 -0
- package/vendor/kobalte-core/index-79050fd4.d.ts +22 -0
- package/vendor/kobalte-core/index-82a3d7cf.d.ts +76 -0
- package/vendor/kobalte-core/index-839e646d.d.ts +308 -0
- package/vendor/kobalte-core/index-8b78f50e.d.ts +96 -0
- package/vendor/kobalte-core/index-8dfcce13.d.ts +49 -0
- package/vendor/kobalte-core/index-929e4c7c.d.ts +109 -0
- package/vendor/kobalte-core/index-a6cbe732.d.ts +267 -0
- package/vendor/kobalte-core/index-a8504bc6.d.ts +105 -0
- package/vendor/kobalte-core/index-d652f235.d.ts +234 -0
- package/vendor/kobalte-core/index-d734f7ac.d.ts +120 -0
- package/vendor/kobalte-core/index-e3628d61.d.ts +405 -0
- package/vendor/kobalte-core/index-e8f9edc7.d.ts +484 -0
- package/vendor/kobalte-core/index-e96454a3.d.ts +113 -0
- package/vendor/kobalte-core/index-ed2fe8c4.d.ts +176 -0
- package/vendor/kobalte-core/index-f3e15e6a.d.ts +107 -0
- package/vendor/kobalte-core/index.d.ts +333 -0
- package/vendor/kobalte-core/index.js +56 -0
- package/vendor/kobalte-core/index.jsx +322 -0
- package/vendor/kobalte-core/link/index.d.ts +6 -0
- package/vendor/kobalte-core/link/index.js +2 -0
- package/vendor/kobalte-core/link/index.jsx +12 -0
- package/vendor/kobalte-core/link-root-bf54d4f3.d.ts +26 -0
- package/vendor/kobalte-core/listbox/index.d.ts +10 -0
- package/vendor/kobalte-core/listbox/index.js +2 -0
- package/vendor/kobalte-core/listbox/index.jsx +30 -0
- package/vendor/kobalte-core/listbox-item-indicator-b8390ce9.d.ts +27 -0
- package/vendor/kobalte-core/listbox-section-58338bda.d.ts +172 -0
- package/vendor/kobalte-core/menu/index.d.ts +41 -0
- package/vendor/kobalte-core/menu/index.js +2 -0
- package/vendor/kobalte-core/menu/index.jsx +72 -0
- package/vendor/kobalte-core/menu-sub-trigger-29a7ad75.d.ts +462 -0
- package/vendor/kobalte-core/menubar/index.d.ts +19 -0
- package/vendor/kobalte-core/menubar/index.js +6 -0
- package/vendor/kobalte-core/menubar/index.jsx +79 -0
- package/vendor/kobalte-core/menubar-context-c1a81ca0.d.ts +73 -0
- package/vendor/kobalte-core/meter/index.d.ts +15 -0
- package/vendor/kobalte-core/meter/index.js +2 -0
- package/vendor/kobalte-core/meter/index.jsx +23 -0
- package/vendor/kobalte-core/meter-value-label-797727cd.d.ts +117 -0
- package/vendor/kobalte-core/navigation-menu/index.d.ts +191 -0
- package/vendor/kobalte-core/navigation-menu/index.js +432 -0
- package/vendor/kobalte-core/navigation-menu/index.jsx +571 -0
- package/vendor/kobalte-core/number-field/index.d.ts +11 -0
- package/vendor/kobalte-core/number-field/index.js +5 -0
- package/vendor/kobalte-core/number-field/index.jsx +42 -0
- package/vendor/kobalte-core/number-field-root-3524531f.d.ts +128 -0
- package/vendor/kobalte-core/pagination/index.d.ts +6 -0
- package/vendor/kobalte-core/pagination/index.js +2 -0
- package/vendor/kobalte-core/pagination/index.jsx +26 -0
- package/vendor/kobalte-core/polymorphic/index.d.ts +29 -0
- package/vendor/kobalte-core/polymorphic/index.js +2 -0
- package/vendor/kobalte-core/polymorphic/index.jsx +8 -0
- package/vendor/kobalte-core/popover/index.d.ts +11 -0
- package/vendor/kobalte-core/popover/index.js +3 -0
- package/vendor/kobalte-core/popover/index.jsx +45 -0
- package/vendor/kobalte-core/popper/index.d.ts +42 -0
- package/vendor/kobalte-core/popper/index.js +2 -0
- package/vendor/kobalte-core/popper/index.jsx +20 -0
- package/vendor/kobalte-core/popper-arrow-89a19127.d.ts +24 -0
- package/vendor/kobalte-core/popper-root-c2da235c.d.ts +81 -0
- package/vendor/kobalte-core/primitives/create-collection/index.d.ts +16 -0
- package/vendor/kobalte-core/primitives/create-collection/index.js +3 -0
- package/vendor/kobalte-core/primitives/create-collection/index.jsx +12 -0
- package/vendor/kobalte-core/primitives/create-controllable-signal/index.d.ts +33 -0
- package/vendor/kobalte-core/primitives/create-controllable-signal/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-controllable-signal/index.jsx +15 -0
- package/vendor/kobalte-core/primitives/create-disclosure-state/index.d.ts +31 -0
- package/vendor/kobalte-core/primitives/create-disclosure-state/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-disclosure-state/index.jsx +10 -0
- package/vendor/kobalte-core/primitives/create-dom-collection/index.d.ts +32 -0
- package/vendor/kobalte-core/primitives/create-dom-collection/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-dom-collection/index.jsx +17 -0
- package/vendor/kobalte-core/primitives/create-escape-key-down/index.d.ts +18 -0
- package/vendor/kobalte-core/primitives/create-escape-key-down/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-escape-key-down/index.jsx +8 -0
- package/vendor/kobalte-core/primitives/create-focus-scope/index.d.ts +21 -0
- package/vendor/kobalte-core/primitives/create-focus-scope/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-focus-scope/index.jsx +9 -0
- package/vendor/kobalte-core/primitives/create-form-reset-listener/index.d.ts +9 -0
- package/vendor/kobalte-core/primitives/create-form-reset-listener/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-form-reset-listener/index.jsx +8 -0
- package/vendor/kobalte-core/primitives/create-hide-outside/index.d.ts +29 -0
- package/vendor/kobalte-core/primitives/create-hide-outside/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-hide-outside/index.jsx +12 -0
- package/vendor/kobalte-core/primitives/create-interact-outside/index.d.ts +39 -0
- package/vendor/kobalte-core/primitives/create-interact-outside/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-interact-outside/index.jsx +9 -0
- package/vendor/kobalte-core/primitives/create-register-id/index.d.ts +9 -0
- package/vendor/kobalte-core/primitives/create-register-id/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-register-id/index.jsx +8 -0
- package/vendor/kobalte-core/primitives/create-size/index.d.ts +9 -0
- package/vendor/kobalte-core/primitives/create-size/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-size/index.jsx +8 -0
- package/vendor/kobalte-core/primitives/create-tag-name/index.d.ts +15 -0
- package/vendor/kobalte-core/primitives/create-tag-name/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-tag-name/index.jsx +9 -0
- package/vendor/kobalte-core/primitives/create-toggle-state/index.d.ts +33 -0
- package/vendor/kobalte-core/primitives/create-toggle-state/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-toggle-state/index.jsx +10 -0
- package/vendor/kobalte-core/primitives/create-transition/index.d.ts +52 -0
- package/vendor/kobalte-core/primitives/create-transition/index.js +2 -0
- package/vendor/kobalte-core/primitives/create-transition/index.jsx +8 -0
- package/vendor/kobalte-core/progress/index.d.ts +6 -0
- package/vendor/kobalte-core/progress/index.js +2 -0
- package/vendor/kobalte-core/progress/index.jsx +24 -0
- package/vendor/kobalte-core/radio-group/index.d.ts +8 -0
- package/vendor/kobalte-core/radio-group/index.js +4 -0
- package/vendor/kobalte-core/radio-group/index.jsx +40 -0
- package/vendor/kobalte-core/radio-group-root-0af7f9b9.d.ts +195 -0
- package/vendor/kobalte-core/rating/index.d.ts +172 -0
- package/vendor/kobalte-core/rating/index.js +464 -0
- package/vendor/kobalte-core/rating/index.jsx +540 -0
- package/vendor/kobalte-core/search/index.d.ts +85 -0
- package/vendor/kobalte-core/search/index.js +177 -0
- package/vendor/kobalte-core/search/index.jsx +227 -0
- package/vendor/kobalte-core/segmented-control/index.d.ts +69 -0
- package/vendor/kobalte-core/segmented-control/index.js +162 -0
- package/vendor/kobalte-core/segmented-control/index.jsx +217 -0
- package/vendor/kobalte-core/select/index.d.ts +19 -0
- package/vendor/kobalte-core/select/index.js +6 -0
- package/vendor/kobalte-core/select/index.jsx +75 -0
- package/vendor/kobalte-core/separator/index.d.ts +6 -0
- package/vendor/kobalte-core/separator/index.js +2 -0
- package/vendor/kobalte-core/separator/index.jsx +12 -0
- package/vendor/kobalte-core/separator-root-cb685406.d.ts +25 -0
- package/vendor/kobalte-core/skeleton/index.d.ts +5 -0
- package/vendor/kobalte-core/skeleton/index.js +2 -0
- package/vendor/kobalte-core/skeleton/index.jsx +11 -0
- package/vendor/kobalte-core/slider/index.d.ts +11 -0
- package/vendor/kobalte-core/slider/index.js +5 -0
- package/vendor/kobalte-core/slider/index.jsx +43 -0
- package/vendor/kobalte-core/slider-value-label-2be90f59.d.ts +211 -0
- package/vendor/kobalte-core/spin-button/index.d.ts +10 -0
- package/vendor/kobalte-core/spin-button/index.js +2 -0
- package/vendor/kobalte-core/spin-button/index.jsx +12 -0
- package/vendor/kobalte-core/spin-button-root-3a44420a.d.ts +63 -0
- package/vendor/kobalte-core/switch/index.d.ts +8 -0
- package/vendor/kobalte-core/switch/index.js +2 -0
- package/vendor/kobalte-core/switch/index.jsx +35 -0
- package/vendor/kobalte-core/tabs/index.d.ts +8 -0
- package/vendor/kobalte-core/tabs/index.js +2 -0
- package/vendor/kobalte-core/tabs/index.jsx +27 -0
- package/vendor/kobalte-core/text-field/index.d.ts +9 -0
- package/vendor/kobalte-core/text-field/index.js +5 -0
- package/vendor/kobalte-core/text-field/index.jsx +34 -0
- package/vendor/kobalte-core/text-field-root-0b8dfa5a.d.ts +73 -0
- package/vendor/kobalte-core/time-field/index.d.ts +165 -0
- package/vendor/kobalte-core/time-field/index.js +818 -0
- package/vendor/kobalte-core/time-field/index.jsx +824 -0
- package/vendor/kobalte-core/toast/index.d.ts +6 -0
- package/vendor/kobalte-core/toast/index.js +2 -0
- package/vendor/kobalte-core/toast/index.jsx +33 -0
- package/vendor/kobalte-core/toggle-button/index.d.ts +7 -0
- package/vendor/kobalte-core/toggle-button/index.js +2 -0
- package/vendor/kobalte-core/toggle-button/index.jsx +16 -0
- package/vendor/kobalte-core/toggle-button-root-1cfacf95.d.ts +42 -0
- package/vendor/kobalte-core/toggle-group/index.d.ts +10 -0
- package/vendor/kobalte-core/toggle-group/index.js +2 -0
- package/vendor/kobalte-core/toggle-group/index.jsx +26 -0
- package/vendor/kobalte-core/tooltip/index.d.ts +10 -0
- package/vendor/kobalte-core/tooltip/index.js +3 -0
- package/vendor/kobalte-core/tooltip/index.jsx +32 -0
- package/vendor/kobalte-core/types-6adf33e1.d.ts +8 -0
- package/vendor/kobalte-core/types-877adc4a.d.ts +125 -0
- package/vendor/kobalte-core/types-f8ae18e5.d.ts +72 -0
- package/vendor/kobalte-core/utils-45fb8d63.d.ts +11 -0
- package/vendor/kobalte-utils/LICENSE.md +21 -0
- package/vendor/kobalte-utils/NOTICE.txt +231 -0
- package/vendor/kobalte-utils/index.cjs +878 -0
- package/vendor/kobalte-utils/index.d.cts +227 -0
- package/vendor/kobalte-utils/index.d.ts +227 -0
- package/vendor/kobalte-utils/index.js +791 -0
- package/vendor/origins.json +33 -0
- package/vendor/solid-web/LICENSE +21 -0
- package/vendor/solid-web/dev.cjs +896 -0
- package/vendor/solid-web/dev.js +784 -0
- package/vendor/solid-web/server.cjs +2 -0
- package/vendor/solid-web/server.js +2 -0
- package/vendor/solid-web/types/client.d.ts +93 -0
- package/vendor/solid-web/types/core.d.ts +2 -0
- package/vendor/solid-web/types/index.d.ts +50 -0
- package/vendor/solid-web/types/jsx.d.ts +1 -0
- package/vendor/solid-web/types/server-mock.d.ts +65 -0
- package/vendor/solid-web/types/server.d.ts +187 -0
- package/vendor/solid-web/web.cjs +885 -0
- package/vendor/solid-web/web.js +773 -0
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/utils@0.9.2; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import { onCleanup, mergeProps } from 'solid-js';
|
|
3
|
+
export { createEventListener } from '@solid-primitives/event-listener';
|
|
4
|
+
export { Key } from '@solid-primitives/keyed';
|
|
5
|
+
export { ReactiveMap } from '@solid-primitives/map';
|
|
6
|
+
export { createMediaQuery } from '@solid-primitives/media';
|
|
7
|
+
export { combineProps } from '@solid-primitives/props';
|
|
8
|
+
export { mergeRefs } from '@solid-primitives/refs';
|
|
9
|
+
export { access, accessWith, chain } from '@solid-primitives/utils';
|
|
10
|
+
|
|
11
|
+
// src/array.ts
|
|
12
|
+
function addItemToArray(array, item, index = -1) {
|
|
13
|
+
if (!(index in array)) {
|
|
14
|
+
return [...array, item];
|
|
15
|
+
}
|
|
16
|
+
return [...array.slice(0, index), item, ...array.slice(index)];
|
|
17
|
+
}
|
|
18
|
+
function removeItemFromArray(array, item) {
|
|
19
|
+
const updatedArray = [...array];
|
|
20
|
+
const index = updatedArray.indexOf(item);
|
|
21
|
+
if (index !== -1) {
|
|
22
|
+
updatedArray.splice(index, 1);
|
|
23
|
+
}
|
|
24
|
+
return updatedArray;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/assertion.ts
|
|
28
|
+
function isNumber(value) {
|
|
29
|
+
return typeof value === "number";
|
|
30
|
+
}
|
|
31
|
+
function isArray(value) {
|
|
32
|
+
return Array.isArray(value);
|
|
33
|
+
}
|
|
34
|
+
function isString(value) {
|
|
35
|
+
return Object.prototype.toString.call(value) === "[object String]";
|
|
36
|
+
}
|
|
37
|
+
function isFunction(value) {
|
|
38
|
+
return typeof value === "function";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/create-generate-id.ts
|
|
42
|
+
function createGenerateId(baseId) {
|
|
43
|
+
return (suffix) => `${baseId()}-${suffix}`;
|
|
44
|
+
}
|
|
45
|
+
function createGlobalListeners() {
|
|
46
|
+
const globalListeners = /* @__PURE__ */ new Map();
|
|
47
|
+
const addGlobalListener = (eventTarget, type, listener, options) => {
|
|
48
|
+
const fn = options?.once ? (...args) => {
|
|
49
|
+
globalListeners.delete(listener);
|
|
50
|
+
listener(...args);
|
|
51
|
+
} : listener;
|
|
52
|
+
globalListeners.set(listener, { type, eventTarget, fn, options });
|
|
53
|
+
eventTarget.addEventListener(type, listener, options);
|
|
54
|
+
};
|
|
55
|
+
const removeGlobalListener = (eventTarget, type, listener, options) => {
|
|
56
|
+
const fn = globalListeners.get(listener)?.fn || listener;
|
|
57
|
+
eventTarget.removeEventListener(type, fn, options);
|
|
58
|
+
globalListeners.delete(listener);
|
|
59
|
+
};
|
|
60
|
+
const removeAllGlobalListeners = () => {
|
|
61
|
+
globalListeners.forEach((value, key) => {
|
|
62
|
+
removeGlobalListener(value.eventTarget, value.type, key, value.options);
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
onCleanup(() => {
|
|
66
|
+
removeAllGlobalListeners();
|
|
67
|
+
});
|
|
68
|
+
return { addGlobalListener, removeGlobalListener, removeAllGlobalListeners };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// src/dom.ts
|
|
72
|
+
function contains(parent, child) {
|
|
73
|
+
if (!parent) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return parent === child || parent.contains(child);
|
|
77
|
+
}
|
|
78
|
+
function getActiveElement(node, activeDescendant = false) {
|
|
79
|
+
const { activeElement } = getDocument(node);
|
|
80
|
+
if (!activeElement?.nodeName) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
if (isFrame(activeElement) && activeElement.contentDocument) {
|
|
84
|
+
return getActiveElement(
|
|
85
|
+
activeElement.contentDocument.body,
|
|
86
|
+
activeDescendant
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
if (activeDescendant) {
|
|
90
|
+
const id = activeElement.getAttribute("aria-activedescendant");
|
|
91
|
+
if (id) {
|
|
92
|
+
const element = getDocument(activeElement).getElementById(id);
|
|
93
|
+
if (element) {
|
|
94
|
+
return element;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return activeElement;
|
|
99
|
+
}
|
|
100
|
+
function getWindow(node) {
|
|
101
|
+
return getDocument(node).defaultView || window;
|
|
102
|
+
}
|
|
103
|
+
function getDocument(node) {
|
|
104
|
+
return node ? node.ownerDocument || node : document;
|
|
105
|
+
}
|
|
106
|
+
function isFrame(element) {
|
|
107
|
+
return element.tagName === "IFRAME";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/enums.ts
|
|
111
|
+
var EventKey = /* @__PURE__ */ ((EventKey2) => {
|
|
112
|
+
EventKey2["Escape"] = "Escape";
|
|
113
|
+
EventKey2["Enter"] = "Enter";
|
|
114
|
+
EventKey2["Tab"] = "Tab";
|
|
115
|
+
EventKey2["Space"] = " ";
|
|
116
|
+
EventKey2["ArrowDown"] = "ArrowDown";
|
|
117
|
+
EventKey2["ArrowLeft"] = "ArrowLeft";
|
|
118
|
+
EventKey2["ArrowRight"] = "ArrowRight";
|
|
119
|
+
EventKey2["ArrowUp"] = "ArrowUp";
|
|
120
|
+
EventKey2["End"] = "End";
|
|
121
|
+
EventKey2["Home"] = "Home";
|
|
122
|
+
EventKey2["PageDown"] = "PageDown";
|
|
123
|
+
EventKey2["PageUp"] = "PageUp";
|
|
124
|
+
return EventKey2;
|
|
125
|
+
})(EventKey || {});
|
|
126
|
+
|
|
127
|
+
// src/platform.ts
|
|
128
|
+
function testUserAgent(re) {
|
|
129
|
+
if (typeof window === "undefined" || window.navigator == null) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
return (
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
window.navigator.userAgentData?.brands.some(
|
|
135
|
+
(brand) => re.test(brand.brand)
|
|
136
|
+
) || re.test(window.navigator.userAgent)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function testPlatform(re) {
|
|
140
|
+
return typeof window !== "undefined" && window.navigator != null ? re.test(
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
window.navigator.userAgentData?.platform || window.navigator.platform
|
|
143
|
+
) : false;
|
|
144
|
+
}
|
|
145
|
+
function isMac() {
|
|
146
|
+
return testPlatform(/^Mac/i);
|
|
147
|
+
}
|
|
148
|
+
function isIPhone() {
|
|
149
|
+
return testPlatform(/^iPhone/i);
|
|
150
|
+
}
|
|
151
|
+
function isIPad() {
|
|
152
|
+
return testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
153
|
+
isMac() && navigator.maxTouchPoints > 1;
|
|
154
|
+
}
|
|
155
|
+
function isIOS() {
|
|
156
|
+
return isIPhone() || isIPad();
|
|
157
|
+
}
|
|
158
|
+
function isAppleDevice() {
|
|
159
|
+
return isMac() || isIOS();
|
|
160
|
+
}
|
|
161
|
+
function isWebKit() {
|
|
162
|
+
return testUserAgent(/AppleWebKit/i) && !isChrome();
|
|
163
|
+
}
|
|
164
|
+
function isChrome() {
|
|
165
|
+
return testUserAgent(/Chrome/i);
|
|
166
|
+
}
|
|
167
|
+
function isAndroid() {
|
|
168
|
+
return testUserAgent(/Android/i);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// src/events.ts
|
|
172
|
+
function callHandler(event, handler) {
|
|
173
|
+
if (handler) {
|
|
174
|
+
if (isFunction(handler)) {
|
|
175
|
+
handler(event);
|
|
176
|
+
} else {
|
|
177
|
+
handler[0](handler[1], event);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return event?.defaultPrevented;
|
|
181
|
+
}
|
|
182
|
+
function composeEventHandlers(handlers) {
|
|
183
|
+
return (event) => {
|
|
184
|
+
for (const handler of handlers) {
|
|
185
|
+
callHandler(event, handler);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function isCtrlKey(e) {
|
|
190
|
+
if (isMac()) {
|
|
191
|
+
return e.metaKey && !e.ctrlKey;
|
|
192
|
+
}
|
|
193
|
+
return e.ctrlKey && !e.metaKey;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// src/focus-without-scrolling.ts
|
|
197
|
+
function focusWithoutScrolling(element) {
|
|
198
|
+
if (!element) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (supportsPreventScroll()) {
|
|
202
|
+
element.focus({ preventScroll: true });
|
|
203
|
+
} else {
|
|
204
|
+
const scrollableElements = getScrollableElements(element);
|
|
205
|
+
element.focus();
|
|
206
|
+
restoreScrollPosition(scrollableElements);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
var supportsPreventScrollCached = null;
|
|
210
|
+
function supportsPreventScroll() {
|
|
211
|
+
if (supportsPreventScrollCached == null) {
|
|
212
|
+
supportsPreventScrollCached = false;
|
|
213
|
+
try {
|
|
214
|
+
const focusElem = document.createElement("div");
|
|
215
|
+
focusElem.focus({
|
|
216
|
+
get preventScroll() {
|
|
217
|
+
supportsPreventScrollCached = true;
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
} catch (e) {
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return supportsPreventScrollCached;
|
|
225
|
+
}
|
|
226
|
+
function getScrollableElements(element) {
|
|
227
|
+
let parent = element.parentNode;
|
|
228
|
+
const scrollableElements = [];
|
|
229
|
+
const rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
230
|
+
while (parent instanceof HTMLElement && parent !== rootScrollingElement) {
|
|
231
|
+
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) {
|
|
232
|
+
scrollableElements.push({
|
|
233
|
+
element: parent,
|
|
234
|
+
scrollTop: parent.scrollTop,
|
|
235
|
+
scrollLeft: parent.scrollLeft
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
parent = parent.parentNode;
|
|
239
|
+
}
|
|
240
|
+
if (rootScrollingElement instanceof HTMLElement) {
|
|
241
|
+
scrollableElements.push({
|
|
242
|
+
element: rootScrollingElement,
|
|
243
|
+
scrollTop: rootScrollingElement.scrollTop,
|
|
244
|
+
scrollLeft: rootScrollingElement.scrollLeft
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
return scrollableElements;
|
|
248
|
+
}
|
|
249
|
+
function restoreScrollPosition(scrollableElements) {
|
|
250
|
+
for (const { element, scrollTop, scrollLeft } of scrollableElements) {
|
|
251
|
+
element.scrollTop = scrollTop;
|
|
252
|
+
element.scrollLeft = scrollLeft;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// src/tabbable.ts
|
|
257
|
+
var focusableElements = [
|
|
258
|
+
"input:not([type='hidden']):not([disabled])",
|
|
259
|
+
"select:not([disabled])",
|
|
260
|
+
"textarea:not([disabled])",
|
|
261
|
+
"button:not([disabled])",
|
|
262
|
+
"a[href]",
|
|
263
|
+
"area[href]",
|
|
264
|
+
"[tabindex]",
|
|
265
|
+
"iframe",
|
|
266
|
+
"object",
|
|
267
|
+
"embed",
|
|
268
|
+
"audio[controls]",
|
|
269
|
+
"video[controls]",
|
|
270
|
+
"[contenteditable]:not([contenteditable='false'])"
|
|
271
|
+
];
|
|
272
|
+
var tabbableElements = [
|
|
273
|
+
...focusableElements,
|
|
274
|
+
'[tabindex]:not([tabindex="-1"]):not([disabled])'
|
|
275
|
+
];
|
|
276
|
+
var FOCUSABLE_ELEMENT_SELECTOR = `${focusableElements.join(
|
|
277
|
+
":not([hidden]),"
|
|
278
|
+
)},[tabindex]:not([disabled]):not([hidden])`;
|
|
279
|
+
var TABBABLE_ELEMENT_SELECTOR = tabbableElements.join(
|
|
280
|
+
':not([hidden]):not([tabindex="-1"]),'
|
|
281
|
+
);
|
|
282
|
+
function getAllTabbableIn(container, includeContainer) {
|
|
283
|
+
const elements = Array.from(
|
|
284
|
+
container.querySelectorAll(FOCUSABLE_ELEMENT_SELECTOR)
|
|
285
|
+
);
|
|
286
|
+
const tabbableElements2 = elements.filter(isTabbable);
|
|
287
|
+
if (includeContainer && isTabbable(container)) {
|
|
288
|
+
tabbableElements2.unshift(container);
|
|
289
|
+
}
|
|
290
|
+
tabbableElements2.forEach((element, i) => {
|
|
291
|
+
if (isFrame(element) && element.contentDocument) {
|
|
292
|
+
const frameBody = element.contentDocument.body;
|
|
293
|
+
const allFrameTabbable = getAllTabbableIn(frameBody, false);
|
|
294
|
+
tabbableElements2.splice(i, 1, ...allFrameTabbable);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
return tabbableElements2;
|
|
298
|
+
}
|
|
299
|
+
function isTabbable(element) {
|
|
300
|
+
return isFocusable(element) && !hasNegativeTabIndex(element);
|
|
301
|
+
}
|
|
302
|
+
function isFocusable(element) {
|
|
303
|
+
return element.matches(FOCUSABLE_ELEMENT_SELECTOR) && isElementVisible(element);
|
|
304
|
+
}
|
|
305
|
+
function hasNegativeTabIndex(element) {
|
|
306
|
+
const tabIndex = Number.parseInt(element.getAttribute("tabindex") || "0", 10);
|
|
307
|
+
return tabIndex < 0;
|
|
308
|
+
}
|
|
309
|
+
function isElementVisible(element, childElement) {
|
|
310
|
+
return element.nodeName !== "#comment" && isStyleVisible(element) && isAttributeVisible(element, childElement) && (!element.parentElement || isElementVisible(element.parentElement, element));
|
|
311
|
+
}
|
|
312
|
+
function isStyleVisible(element) {
|
|
313
|
+
if (!(element instanceof HTMLElement) && !(element instanceof SVGElement)) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
const { display, visibility } = element.style;
|
|
317
|
+
let isVisible = display !== "none" && visibility !== "hidden" && visibility !== "collapse";
|
|
318
|
+
if (isVisible) {
|
|
319
|
+
if (!element.ownerDocument.defaultView) {
|
|
320
|
+
return isVisible;
|
|
321
|
+
}
|
|
322
|
+
const { getComputedStyle } = element.ownerDocument.defaultView;
|
|
323
|
+
const { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
|
|
324
|
+
isVisible = computedDisplay !== "none" && computedVisibility !== "hidden" && computedVisibility !== "collapse";
|
|
325
|
+
}
|
|
326
|
+
return isVisible;
|
|
327
|
+
}
|
|
328
|
+
function isAttributeVisible(element, childElement) {
|
|
329
|
+
return !element.hasAttribute("hidden") && (element.nodeName === "DETAILS" && childElement && childElement.nodeName !== "SUMMARY" ? element.hasAttribute("open") : true);
|
|
330
|
+
}
|
|
331
|
+
function hasFocusWithin(element) {
|
|
332
|
+
const activeElement = getActiveElement(element);
|
|
333
|
+
if (!activeElement) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
if (!contains(element, activeElement)) {
|
|
337
|
+
const activeDescendant = activeElement.getAttribute(
|
|
338
|
+
"aria-activedescendant"
|
|
339
|
+
);
|
|
340
|
+
if (!activeDescendant) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
if (!("id" in element)) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
if (activeDescendant === element.id) {
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
|
|
350
|
+
}
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// src/focus-manager.ts
|
|
355
|
+
function createFocusManager(ref, defaultOptions = () => ({})) {
|
|
356
|
+
const focusNext = (opts = {}) => {
|
|
357
|
+
const root = ref();
|
|
358
|
+
if (!root) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
const {
|
|
362
|
+
from = defaultOptions().from || document.activeElement,
|
|
363
|
+
tabbable = defaultOptions().tabbable,
|
|
364
|
+
wrap = defaultOptions().wrap,
|
|
365
|
+
accept = defaultOptions().accept
|
|
366
|
+
} = opts;
|
|
367
|
+
const walker = getFocusableTreeWalker(root, { tabbable, accept });
|
|
368
|
+
if (from && root.contains(from)) {
|
|
369
|
+
walker.currentNode = from;
|
|
370
|
+
}
|
|
371
|
+
let nextNode = walker.nextNode();
|
|
372
|
+
if (!nextNode && wrap) {
|
|
373
|
+
walker.currentNode = root;
|
|
374
|
+
nextNode = walker.nextNode();
|
|
375
|
+
}
|
|
376
|
+
if (nextNode) {
|
|
377
|
+
focusElement(nextNode, true);
|
|
378
|
+
}
|
|
379
|
+
return nextNode;
|
|
380
|
+
};
|
|
381
|
+
const focusPrevious = (opts = {}) => {
|
|
382
|
+
const root = ref();
|
|
383
|
+
if (!root) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
const {
|
|
387
|
+
from = defaultOptions().from || document.activeElement,
|
|
388
|
+
tabbable = defaultOptions().tabbable,
|
|
389
|
+
wrap = defaultOptions().wrap,
|
|
390
|
+
accept = defaultOptions().accept
|
|
391
|
+
} = opts;
|
|
392
|
+
const walker = getFocusableTreeWalker(root, { tabbable, accept });
|
|
393
|
+
if (from && root.contains(from)) {
|
|
394
|
+
walker.currentNode = from;
|
|
395
|
+
} else {
|
|
396
|
+
const next = last(walker);
|
|
397
|
+
if (next) {
|
|
398
|
+
focusElement(next, true);
|
|
399
|
+
}
|
|
400
|
+
return next;
|
|
401
|
+
}
|
|
402
|
+
let previousNode = walker.previousNode();
|
|
403
|
+
if (!previousNode && wrap) {
|
|
404
|
+
walker.currentNode = root;
|
|
405
|
+
previousNode = last(walker);
|
|
406
|
+
}
|
|
407
|
+
if (previousNode) {
|
|
408
|
+
focusElement(previousNode, true);
|
|
409
|
+
}
|
|
410
|
+
return previousNode;
|
|
411
|
+
};
|
|
412
|
+
const focusFirst = (opts = {}) => {
|
|
413
|
+
const root = ref();
|
|
414
|
+
if (!root) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const {
|
|
418
|
+
tabbable = defaultOptions().tabbable,
|
|
419
|
+
accept = defaultOptions().accept
|
|
420
|
+
} = opts;
|
|
421
|
+
const walker = getFocusableTreeWalker(root, { tabbable, accept });
|
|
422
|
+
const nextNode = walker.nextNode();
|
|
423
|
+
if (nextNode) {
|
|
424
|
+
focusElement(nextNode, true);
|
|
425
|
+
}
|
|
426
|
+
return nextNode;
|
|
427
|
+
};
|
|
428
|
+
const focusLast = (opts = {}) => {
|
|
429
|
+
const root = ref();
|
|
430
|
+
if (!root) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const {
|
|
434
|
+
tabbable = defaultOptions().tabbable,
|
|
435
|
+
accept = defaultOptions().accept
|
|
436
|
+
} = opts;
|
|
437
|
+
const walker = getFocusableTreeWalker(root, { tabbable, accept });
|
|
438
|
+
const next = last(walker);
|
|
439
|
+
if (next) {
|
|
440
|
+
focusElement(next, true);
|
|
441
|
+
}
|
|
442
|
+
return next;
|
|
443
|
+
};
|
|
444
|
+
return { focusNext, focusPrevious, focusFirst, focusLast };
|
|
445
|
+
}
|
|
446
|
+
function focusElement(element, scroll = false) {
|
|
447
|
+
if (element != null && !scroll) {
|
|
448
|
+
try {
|
|
449
|
+
focusWithoutScrolling(element);
|
|
450
|
+
} catch (err) {
|
|
451
|
+
}
|
|
452
|
+
} else if (element != null) {
|
|
453
|
+
try {
|
|
454
|
+
element.focus();
|
|
455
|
+
} catch (err) {
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function last(walker) {
|
|
460
|
+
let next;
|
|
461
|
+
let last2;
|
|
462
|
+
do {
|
|
463
|
+
last2 = walker.lastChild();
|
|
464
|
+
if (last2) {
|
|
465
|
+
next = last2;
|
|
466
|
+
}
|
|
467
|
+
} while (last2);
|
|
468
|
+
return next;
|
|
469
|
+
}
|
|
470
|
+
function isElementInScope(element, scope) {
|
|
471
|
+
return scope.some((node) => node.contains(element));
|
|
472
|
+
}
|
|
473
|
+
function getFocusableTreeWalker(root, opts, scope) {
|
|
474
|
+
const selector = opts?.tabbable ? TABBABLE_ELEMENT_SELECTOR : FOCUSABLE_ELEMENT_SELECTOR;
|
|
475
|
+
const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
|
|
476
|
+
acceptNode(node) {
|
|
477
|
+
if (opts?.from?.contains(node)) {
|
|
478
|
+
return NodeFilter.FILTER_REJECT;
|
|
479
|
+
}
|
|
480
|
+
if (node.matches(selector) && isElementVisible(node) && (!scope || isElementInScope(node, scope)) && (!opts?.accept || opts.accept(node))) {
|
|
481
|
+
return NodeFilter.FILTER_ACCEPT;
|
|
482
|
+
}
|
|
483
|
+
return NodeFilter.FILTER_SKIP;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
if (opts?.from) {
|
|
487
|
+
walker.currentNode = opts.from;
|
|
488
|
+
}
|
|
489
|
+
return walker;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// src/get-scroll-parent.ts
|
|
493
|
+
function getScrollParent(node) {
|
|
494
|
+
let parentNode = node;
|
|
495
|
+
while (parentNode && !isScrollable(parentNode)) {
|
|
496
|
+
parentNode = parentNode.parentElement;
|
|
497
|
+
}
|
|
498
|
+
return parentNode || document.scrollingElement || document.documentElement;
|
|
499
|
+
}
|
|
500
|
+
function isScrollable(node) {
|
|
501
|
+
const style = window.getComputedStyle(node);
|
|
502
|
+
return /(auto|scroll)/.test(
|
|
503
|
+
style.overflow + style.overflowX + style.overflowY
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// src/is-virtual-event.ts
|
|
508
|
+
function isVirtualClick(event) {
|
|
509
|
+
if (event.mozInputSource === 0 && event.isTrusted) {
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
if (isAndroid() && event.pointerType) {
|
|
513
|
+
return event.type === "click" && event.buttons === 1;
|
|
514
|
+
}
|
|
515
|
+
return event.detail === 0 && !event.pointerType;
|
|
516
|
+
}
|
|
517
|
+
function isVirtualPointerEvent(event) {
|
|
518
|
+
return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// src/noop.ts
|
|
522
|
+
function noop() {
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// src/number.ts
|
|
527
|
+
function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFINITY) {
|
|
528
|
+
return Math.min(Math.max(value, min), max);
|
|
529
|
+
}
|
|
530
|
+
function snapValueToStep(value, min, max, step) {
|
|
531
|
+
const remainder = (value - (Number.isNaN(min) ? 0 : min)) % step;
|
|
532
|
+
let snappedValue = Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder;
|
|
533
|
+
if (!Number.isNaN(min)) {
|
|
534
|
+
if (snappedValue < min) {
|
|
535
|
+
snappedValue = min;
|
|
536
|
+
} else if (!Number.isNaN(max) && snappedValue > max) {
|
|
537
|
+
snappedValue = min + Math.floor((max - min) / step) * step;
|
|
538
|
+
}
|
|
539
|
+
} else if (!Number.isNaN(max) && snappedValue > max) {
|
|
540
|
+
snappedValue = Math.floor(max / step) * step;
|
|
541
|
+
}
|
|
542
|
+
const string = step.toString();
|
|
543
|
+
const index = string.indexOf(".");
|
|
544
|
+
const precision = index >= 0 ? string.length - index : 0;
|
|
545
|
+
if (precision > 0) {
|
|
546
|
+
const pow = 10 ** precision;
|
|
547
|
+
snappedValue = Math.round(snappedValue * pow) / pow;
|
|
548
|
+
}
|
|
549
|
+
return snappedValue;
|
|
550
|
+
}
|
|
551
|
+
var getPrecision = (n) => {
|
|
552
|
+
let e = 1;
|
|
553
|
+
let precision = 0;
|
|
554
|
+
while (Math.round(n * e) / e !== n) {
|
|
555
|
+
e *= 10;
|
|
556
|
+
precision++;
|
|
557
|
+
}
|
|
558
|
+
return precision;
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
// src/polygon.ts
|
|
562
|
+
function getEventPoint(event) {
|
|
563
|
+
return [event.clientX, event.clientY];
|
|
564
|
+
}
|
|
565
|
+
function isPointInPolygon(point, polygon) {
|
|
566
|
+
const [x, y] = point;
|
|
567
|
+
let inside = false;
|
|
568
|
+
const length = polygon.length;
|
|
569
|
+
for (let l = length, i = 0, j = l - 1; i < l; j = i++) {
|
|
570
|
+
const [xi, yi] = polygon[i];
|
|
571
|
+
const [xj, yj] = polygon[j];
|
|
572
|
+
const [, vy] = polygon[j === 0 ? l - 1 : j - 1] || [0, 0];
|
|
573
|
+
const where = (yi - yj) * (x - xi) - (xi - xj) * (y - yi);
|
|
574
|
+
if (yj < yi) {
|
|
575
|
+
if (y >= yj && y < yi) {
|
|
576
|
+
if (where === 0)
|
|
577
|
+
return true;
|
|
578
|
+
if (where > 0) {
|
|
579
|
+
if (y === yj) {
|
|
580
|
+
if (y > vy) {
|
|
581
|
+
inside = !inside;
|
|
582
|
+
}
|
|
583
|
+
} else {
|
|
584
|
+
inside = !inside;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
} else if (yi < yj) {
|
|
589
|
+
if (y > yi && y <= yj) {
|
|
590
|
+
if (where === 0)
|
|
591
|
+
return true;
|
|
592
|
+
if (where < 0) {
|
|
593
|
+
if (y === yj) {
|
|
594
|
+
if (y < vy) {
|
|
595
|
+
inside = !inside;
|
|
596
|
+
}
|
|
597
|
+
} else {
|
|
598
|
+
inside = !inside;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
} else if (y === yi && (x >= xj && x <= xi || x >= xi && x <= xj)) {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return inside;
|
|
607
|
+
}
|
|
608
|
+
function getPolygon() {
|
|
609
|
+
const id = "debug-polygon";
|
|
610
|
+
const existingPolygon = document.getElementById(id);
|
|
611
|
+
if (existingPolygon) {
|
|
612
|
+
return existingPolygon;
|
|
613
|
+
}
|
|
614
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
615
|
+
svg.style.top = "0";
|
|
616
|
+
svg.style.left = "0";
|
|
617
|
+
svg.style.width = "100%";
|
|
618
|
+
svg.style.height = "100%";
|
|
619
|
+
svg.style.fill = "green";
|
|
620
|
+
svg.style.opacity = "0.2";
|
|
621
|
+
svg.style.position = "fixed";
|
|
622
|
+
svg.style.pointerEvents = "none";
|
|
623
|
+
svg.style.zIndex = "999999";
|
|
624
|
+
const polygon = document.createElementNS(
|
|
625
|
+
"http://www.w3.org/2000/svg",
|
|
626
|
+
"polygon"
|
|
627
|
+
);
|
|
628
|
+
polygon.setAttribute("id", id);
|
|
629
|
+
polygon.setAttribute("points", "0,0 0,0");
|
|
630
|
+
svg.appendChild(polygon);
|
|
631
|
+
document.body.appendChild(svg);
|
|
632
|
+
return polygon;
|
|
633
|
+
}
|
|
634
|
+
function debugPolygon(polygon) {
|
|
635
|
+
const polygonElement = getPolygon();
|
|
636
|
+
const points = polygon.map((point) => point.join(",")).join(" ");
|
|
637
|
+
polygonElement.setAttribute("points", points);
|
|
638
|
+
return polygonElement.parentElement;
|
|
639
|
+
}
|
|
640
|
+
function mergeDefaultProps(defaultProps, props) {
|
|
641
|
+
return mergeProps(defaultProps, props);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// src/run-after-transition.ts
|
|
645
|
+
var transitionsByElement = /* @__PURE__ */ new Map();
|
|
646
|
+
var transitionCallbacks = /* @__PURE__ */ new Set();
|
|
647
|
+
function setupGlobalEvents() {
|
|
648
|
+
if (typeof window === "undefined" || document.body === null) {
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
const onTransitionStart = (e) => {
|
|
652
|
+
if (!e.target) {
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
let transitions = transitionsByElement.get(e.target);
|
|
656
|
+
if (!transitions) {
|
|
657
|
+
transitions = /* @__PURE__ */ new Set();
|
|
658
|
+
transitionsByElement.set(e.target, transitions);
|
|
659
|
+
e.target.addEventListener(
|
|
660
|
+
"transitioncancel",
|
|
661
|
+
onTransitionEnd
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
transitions.add(e.propertyName);
|
|
665
|
+
};
|
|
666
|
+
const onTransitionEnd = (e) => {
|
|
667
|
+
if (!e.target) {
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
const properties = transitionsByElement.get(e.target);
|
|
671
|
+
if (!properties) {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
properties.delete(e.propertyName);
|
|
675
|
+
if (properties.size === 0) {
|
|
676
|
+
e.target.removeEventListener(
|
|
677
|
+
"transitioncancel",
|
|
678
|
+
onTransitionEnd
|
|
679
|
+
);
|
|
680
|
+
transitionsByElement.delete(e.target);
|
|
681
|
+
}
|
|
682
|
+
if (transitionsByElement.size === 0) {
|
|
683
|
+
for (const cb of transitionCallbacks) {
|
|
684
|
+
cb();
|
|
685
|
+
}
|
|
686
|
+
transitionCallbacks.clear();
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
690
|
+
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
691
|
+
}
|
|
692
|
+
if (typeof document !== "undefined") {
|
|
693
|
+
if (document.readyState !== "loading") {
|
|
694
|
+
setupGlobalEvents();
|
|
695
|
+
} else {
|
|
696
|
+
document.addEventListener("DOMContentLoaded", setupGlobalEvents);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
function runAfterTransition(fn) {
|
|
700
|
+
requestAnimationFrame(() => {
|
|
701
|
+
if (transitionsByElement.size === 0) {
|
|
702
|
+
fn();
|
|
703
|
+
} else {
|
|
704
|
+
transitionCallbacks.add(fn);
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// src/scroll-into-view.ts
|
|
710
|
+
function scrollIntoView(scrollView, element) {
|
|
711
|
+
const offsetX = relativeOffset(scrollView, element, "left");
|
|
712
|
+
const offsetY = relativeOffset(scrollView, element, "top");
|
|
713
|
+
const width = element.offsetWidth;
|
|
714
|
+
const height = element.offsetHeight;
|
|
715
|
+
let x = scrollView.scrollLeft;
|
|
716
|
+
let y = scrollView.scrollTop;
|
|
717
|
+
const maxX = x + scrollView.offsetWidth;
|
|
718
|
+
const maxY = y + scrollView.offsetHeight;
|
|
719
|
+
if (offsetX <= x) {
|
|
720
|
+
x = offsetX;
|
|
721
|
+
} else if (offsetX + width > maxX) {
|
|
722
|
+
x += offsetX + width - maxX;
|
|
723
|
+
}
|
|
724
|
+
if (offsetY <= y) {
|
|
725
|
+
y = offsetY;
|
|
726
|
+
} else if (offsetY + height > maxY) {
|
|
727
|
+
y += offsetY + height - maxY;
|
|
728
|
+
}
|
|
729
|
+
scrollView.scrollLeft = x;
|
|
730
|
+
scrollView.scrollTop = y;
|
|
731
|
+
}
|
|
732
|
+
function relativeOffset(ancestor, child, axis) {
|
|
733
|
+
const prop = axis === "left" ? "offsetLeft" : "offsetTop";
|
|
734
|
+
let sum = 0;
|
|
735
|
+
while (child.offsetParent) {
|
|
736
|
+
sum += child[prop];
|
|
737
|
+
if (child.offsetParent === ancestor) {
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
if (child.offsetParent.contains(ancestor)) {
|
|
741
|
+
sum -= ancestor[prop];
|
|
742
|
+
break;
|
|
743
|
+
}
|
|
744
|
+
child = child.offsetParent;
|
|
745
|
+
}
|
|
746
|
+
return sum;
|
|
747
|
+
}
|
|
748
|
+
function scrollIntoViewport(targetElement, opts) {
|
|
749
|
+
if (document.contains(targetElement)) {
|
|
750
|
+
const root = document.scrollingElement || document.documentElement;
|
|
751
|
+
const isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
|
|
752
|
+
if (!isScrollPrevented) {
|
|
753
|
+
const { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
754
|
+
targetElement?.scrollIntoView?.({ block: "nearest" });
|
|
755
|
+
const { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
756
|
+
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
757
|
+
opts?.containingElement?.scrollIntoView?.({
|
|
758
|
+
block: "center",
|
|
759
|
+
inline: "center"
|
|
760
|
+
});
|
|
761
|
+
targetElement.scrollIntoView?.({ block: "nearest" });
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
let scrollParent = getScrollParent(targetElement);
|
|
765
|
+
while (targetElement && scrollParent && targetElement !== root && scrollParent !== root) {
|
|
766
|
+
scrollIntoView(
|
|
767
|
+
scrollParent,
|
|
768
|
+
targetElement
|
|
769
|
+
);
|
|
770
|
+
targetElement = scrollParent;
|
|
771
|
+
scrollParent = targetElement.parentElement ? getScrollParent(targetElement.parentElement) : root;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
// src/styles.ts
|
|
778
|
+
var visuallyHiddenStyles = {
|
|
779
|
+
border: "0",
|
|
780
|
+
clip: "rect(0 0 0 0)",
|
|
781
|
+
"clip-path": "inset(50%)",
|
|
782
|
+
height: "1px",
|
|
783
|
+
margin: "0 -1px -1px 0",
|
|
784
|
+
overflow: "hidden",
|
|
785
|
+
padding: "0",
|
|
786
|
+
position: "absolute",
|
|
787
|
+
width: "1px",
|
|
788
|
+
"white-space": "nowrap"
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
export { EventKey, FOCUSABLE_ELEMENT_SELECTOR, TABBABLE_ELEMENT_SELECTOR, addItemToArray, callHandler, clamp, composeEventHandlers, contains, createFocusManager, createGenerateId, createGlobalListeners, debugPolygon, focusWithoutScrolling, getActiveElement, getAllTabbableIn, getDocument, getEventPoint, getFocusableTreeWalker, getPrecision, getScrollParent, getWindow, hasFocusWithin, isAndroid, isAppleDevice, isArray, isChrome, isCtrlKey, isElementVisible, isFocusable, isFrame, isFunction, isIOS, isIPad, isIPhone, isMac, isNumber, isPointInPolygon, isString, isTabbable, isVirtualClick, isVirtualPointerEvent, isWebKit, mergeDefaultProps, noop, removeItemFromArray, runAfterTransition, scrollIntoView, scrollIntoViewport, snapValueToStep, visuallyHiddenStyles };
|