@gemologic/sheen 0.1.0-rc.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,49 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import { a as FormControlDescription } from '../form-control-description-330657bc.js';
|
|
3
|
+
export { c as ColorChannelFieldDescriptionCommonProps, b as ColorChannelFieldDescriptionOptions, e as ColorChannelFieldDescriptionProps, d as ColorChannelFieldDescriptionRenderProps } from '../form-control-description-330657bc.js';
|
|
4
|
+
import { F as FormControlErrorMessage } from '../form-control-error-message-9efcbea8.js';
|
|
5
|
+
export { b as ColorChannelFieldErrorMessageCommonProps, a as ColorChannelFieldErrorMessageOptions, d as ColorChannelFieldErrorMessageProps, c as ColorChannelFieldErrorMessageRenderProps } from '../form-control-error-message-9efcbea8.js';
|
|
6
|
+
import { F as FormControlLabel } from '../form-control-label-2a5ca7a3.js';
|
|
7
|
+
export { b as ColorChannelFieldLabelCommonProps, a as ColorChannelFieldLabelOptions, d as ColorChannelFieldLabelProps, c as ColorChannelFieldLabelRenderProps } from '../form-control-label-2a5ca7a3.js';
|
|
8
|
+
import { N as NumberFieldRootOptions, a as NumberFieldRootRenderProps, b as NumberFieldHiddenInput, c as NumberFieldInput, d as NumberFieldIncrementTrigger, e as NumberFieldDecrementTrigger } from '../number-field-root-3524531f.js';
|
|
9
|
+
export { p as ColorChannelFieldDecrementTriggerCommonProps, o as ColorChannelFieldDecrementTriggerOptions, r as ColorChannelFieldDecrementTriggerProps, q as ColorChannelFieldDecrementTriggerRenderProps, j as ColorChannelFieldHiddenInputProps, l as ColorChannelFieldIncrementTriggerCommonProps, k as ColorChannelFieldIncrementTriggerOptions, n as ColorChannelFieldIncrementTriggerProps, m as ColorChannelFieldIncrementTriggerRenderProps, g as ColorChannelFieldInputCommonProps, f as ColorChannelFieldInputOptions, i as ColorChannelFieldInputProps, h as ColorChannelFieldInputRenderProps } from '../number-field-root-3524531f.js';
|
|
10
|
+
import * as solid_js from 'solid-js';
|
|
11
|
+
import { ValidComponent } from 'solid-js';
|
|
12
|
+
import { C as Color, b as ColorChannel, a as ColorSpace } from '../types-877adc4a.js';
|
|
13
|
+
import { ElementOf, PolymorphicProps } from '../polymorphic/index.js';
|
|
14
|
+
import "#sheen-kobalte-utils";
|
|
15
|
+
import '../button-root-da654b3e.js';
|
|
16
|
+
import '../spin-button-root-3a44420a.js';
|
|
17
|
+
|
|
18
|
+
interface ColorChannelFieldRootOptions extends Omit<NumberFieldRootOptions, "value" | "defaultValue" | "rawValue" | "onChange" | "onRawValueChange" | "formatOptions" | "allowedInput"> {
|
|
19
|
+
/** The controlled formatted value of the field. */
|
|
20
|
+
value?: Color;
|
|
21
|
+
/** The default formatted value when initially rendered. */
|
|
22
|
+
defaultValue?: Color;
|
|
23
|
+
/** Event handler called when the value of the field changes. */
|
|
24
|
+
onChange?: (value: Color) => void;
|
|
25
|
+
/** The color channel that the field manipulates. */
|
|
26
|
+
channel: ColorChannel;
|
|
27
|
+
/** The color space that the field operates in. The `channel` must be in this color space.
|
|
28
|
+
*/
|
|
29
|
+
colorSpace?: ColorSpace;
|
|
30
|
+
}
|
|
31
|
+
interface ColorChannelFieldRootCommonProps<T extends HTMLElement = HTMLElement> {
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
interface ColorChannelFieldRootRenderProps extends ColorChannelFieldRootCommonProps, NumberFieldRootRenderProps {
|
|
35
|
+
}
|
|
36
|
+
type ColorChannelFieldRootProps<T extends ValidComponent | HTMLElement = HTMLElement> = ColorChannelFieldRootOptions & Partial<ColorChannelFieldRootCommonProps<ElementOf<T>>>;
|
|
37
|
+
declare function ColorChannelFieldRoot<T extends ValidComponent = "div">(props: PolymorphicProps<T, ColorChannelFieldRootProps<T>>): solid_js.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const ColorChannelField: typeof ColorChannelFieldRoot & {
|
|
40
|
+
Description: typeof FormControlDescription;
|
|
41
|
+
ErrorMessage: typeof FormControlErrorMessage;
|
|
42
|
+
HiddenInput: typeof NumberFieldHiddenInput;
|
|
43
|
+
Input: typeof NumberFieldInput;
|
|
44
|
+
IncrementTrigger: typeof NumberFieldIncrementTrigger;
|
|
45
|
+
DecrementTrigger: typeof NumberFieldDecrementTrigger;
|
|
46
|
+
Label: typeof FormControlLabel;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { ColorChannelField, ColorChannelFieldRootCommonProps, ColorChannelFieldRootOptions, ColorChannelFieldRootProps, ColorChannelFieldRootRenderProps, NumberFieldDecrementTrigger as DecrementTrigger, FormControlDescription as Description, FormControlErrorMessage as ErrorMessage, NumberFieldHiddenInput as HiddenInput, NumberFieldIncrementTrigger as IncrementTrigger, NumberFieldInput as Input, FormControlLabel as Label, ColorChannelFieldRoot as Root };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import { parseColor } from '../chunk/CWAEFUDR.js';
|
|
3
|
+
import { NumberFieldHiddenInput, NumberFieldInput, NumberFieldIncrementTrigger, NumberFieldDecrementTrigger, NumberFieldRoot } from '../chunk/Q2T3QQUA.js';
|
|
4
|
+
export { NumberFieldDecrementTrigger as DecrementTrigger, NumberFieldHiddenInput as HiddenInput, NumberFieldIncrementTrigger as IncrementTrigger, NumberFieldInput as Input } from '../chunk/Q2T3QQUA.js';
|
|
5
|
+
import { FormControlLabel } from '../chunk/7ZHN3PYD.js';
|
|
6
|
+
export { FormControlLabel as Label } from '../chunk/7ZHN3PYD.js';
|
|
7
|
+
import { FormControlErrorMessage } from '../chunk/ICNSTULC.js';
|
|
8
|
+
export { FormControlErrorMessage as ErrorMessage } from '../chunk/ICNSTULC.js';
|
|
9
|
+
import { FormControlDescription } from '../chunk/YKGT7A57.js';
|
|
10
|
+
export { FormControlDescription as Description } from '../chunk/YKGT7A57.js';
|
|
11
|
+
import { createControllableSignal } from '../chunk/BLN63FDC.js';
|
|
12
|
+
import { createComponent, mergeProps, memo } from 'solid-js/web';
|
|
13
|
+
import { mergeDefaultProps, clamp } from "#sheen-kobalte-utils";
|
|
14
|
+
import { createUniqueId, splitProps, createMemo } from 'solid-js';
|
|
15
|
+
|
|
16
|
+
function ColorChannelFieldRoot(props) {
|
|
17
|
+
const defaultId = `colorchannelfield-${createUniqueId()}`;
|
|
18
|
+
const mergedProps = mergeDefaultProps({
|
|
19
|
+
id: defaultId
|
|
20
|
+
}, props);
|
|
21
|
+
const [local, others] = splitProps(mergedProps, ["value", "defaultValue", "onChange", "channel", "colorSpace"]);
|
|
22
|
+
const [value, setValue] = createControllableSignal({
|
|
23
|
+
value: () => local.value,
|
|
24
|
+
defaultValue: () => local.defaultValue ?? parseColor("hsl(0, 100%, 50%)"),
|
|
25
|
+
onChange: (value2) => local.onChange?.(value2)
|
|
26
|
+
});
|
|
27
|
+
const color = createMemo(() => local.colorSpace ? value().toFormat(local.colorSpace) : value());
|
|
28
|
+
const range = createMemo(() => color().getChannelRange(local.channel));
|
|
29
|
+
const formatOptions = createMemo(() => color().getChannelFormatOptions(local.channel));
|
|
30
|
+
const multiplier = createMemo(() => formatOptions().style === "percent" && range().maxValue === 100 ? 100 : 1);
|
|
31
|
+
const onRawValueChange = (value2) => {
|
|
32
|
+
if (Number.isNaN(value2)) {
|
|
33
|
+
setValue(color().withChannelValue(local.channel, Number.NaN));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const clampedValue = clamp(value2 * multiplier(), range().minValue, range().maxValue);
|
|
37
|
+
const digits = formatOptions().maximumFractionDigits ?? 0;
|
|
38
|
+
const roundedValue = Math.round(clampedValue * 10 ** digits) / 10 ** digits;
|
|
39
|
+
setValue(color().withChannelValue(local.channel, roundedValue));
|
|
40
|
+
};
|
|
41
|
+
return createComponent(NumberFieldRoot, mergeProps({
|
|
42
|
+
get rawValue() {
|
|
43
|
+
return memo(() => !!Number.isNaN(color().getChannelValue(local.channel)))() ? void 0 : color().getChannelValue(local.channel) / multiplier();
|
|
44
|
+
},
|
|
45
|
+
get minValue() {
|
|
46
|
+
return range().minValue / multiplier();
|
|
47
|
+
},
|
|
48
|
+
get maxValue() {
|
|
49
|
+
return range().maxValue / multiplier();
|
|
50
|
+
},
|
|
51
|
+
get step() {
|
|
52
|
+
return range().step / multiplier();
|
|
53
|
+
},
|
|
54
|
+
get formatOptions() {
|
|
55
|
+
return formatOptions();
|
|
56
|
+
},
|
|
57
|
+
onRawValueChange
|
|
58
|
+
}, others));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/color-channel-field/index.tsx
|
|
62
|
+
var ColorChannelField = Object.assign(ColorChannelFieldRoot, {
|
|
63
|
+
Description: FormControlDescription,
|
|
64
|
+
ErrorMessage: FormControlErrorMessage,
|
|
65
|
+
HiddenInput: NumberFieldHiddenInput,
|
|
66
|
+
Input: NumberFieldInput,
|
|
67
|
+
IncrementTrigger: NumberFieldIncrementTrigger,
|
|
68
|
+
DecrementTrigger: NumberFieldDecrementTrigger,
|
|
69
|
+
Label: FormControlLabel
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export { ColorChannelField, ColorChannelFieldRoot as Root };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import {
|
|
3
|
+
parseColor
|
|
4
|
+
} from "../chunk/UESR3MKV.jsx";
|
|
5
|
+
import {
|
|
6
|
+
NumberFieldDecrementTrigger,
|
|
7
|
+
NumberFieldHiddenInput,
|
|
8
|
+
NumberFieldIncrementTrigger,
|
|
9
|
+
NumberFieldInput,
|
|
10
|
+
NumberFieldRoot
|
|
11
|
+
} from "../chunk/7ABWW5DT.jsx";
|
|
12
|
+
import "../chunk/ZAGMEN2K.jsx";
|
|
13
|
+
import "../chunk/LP6E37CW.jsx";
|
|
14
|
+
import "../chunk/JHMNWOLY.jsx";
|
|
15
|
+
import "../chunk/UKTBL2JL.jsx";
|
|
16
|
+
import "../chunk/YFEENJN5.jsx";
|
|
17
|
+
import {
|
|
18
|
+
FormControlLabel
|
|
19
|
+
} from "../chunk/FOXVCQFV.jsx";
|
|
20
|
+
import "../chunk/QJIB6BDF.jsx";
|
|
21
|
+
import {
|
|
22
|
+
FormControlErrorMessage
|
|
23
|
+
} from "../chunk/ZZYKR3VO.jsx";
|
|
24
|
+
import {
|
|
25
|
+
FormControlDescription
|
|
26
|
+
} from "../chunk/XUUROM4M.jsx";
|
|
27
|
+
import "../chunk/JNCCF6MP.jsx";
|
|
28
|
+
import {
|
|
29
|
+
createControllableSignal
|
|
30
|
+
} from "../chunk/FN6EICGO.jsx";
|
|
31
|
+
import "../chunk/OYES4GOP.jsx";
|
|
32
|
+
import "../chunk/FLVHQV4A.jsx";
|
|
33
|
+
import "../chunk/5WXHJDCZ.jsx";
|
|
34
|
+
|
|
35
|
+
// src/color-channel-field/color-channel-field-root.tsx
|
|
36
|
+
import { clamp, mergeDefaultProps } from "#sheen-kobalte-utils";
|
|
37
|
+
import {
|
|
38
|
+
createMemo,
|
|
39
|
+
createUniqueId,
|
|
40
|
+
splitProps
|
|
41
|
+
} from "solid-js";
|
|
42
|
+
function ColorChannelFieldRoot(props) {
|
|
43
|
+
const defaultId = `colorchannelfield-${createUniqueId()}`;
|
|
44
|
+
const mergedProps = mergeDefaultProps(
|
|
45
|
+
{
|
|
46
|
+
id: defaultId
|
|
47
|
+
},
|
|
48
|
+
props
|
|
49
|
+
);
|
|
50
|
+
const [local, others] = splitProps(mergedProps, [
|
|
51
|
+
"value",
|
|
52
|
+
"defaultValue",
|
|
53
|
+
"onChange",
|
|
54
|
+
"channel",
|
|
55
|
+
"colorSpace"
|
|
56
|
+
]);
|
|
57
|
+
const [value, setValue] = createControllableSignal({
|
|
58
|
+
value: () => local.value,
|
|
59
|
+
defaultValue: () => local.defaultValue ?? parseColor("hsl(0, 100%, 50%)"),
|
|
60
|
+
onChange: (value2) => local.onChange?.(value2)
|
|
61
|
+
});
|
|
62
|
+
const color = createMemo(
|
|
63
|
+
() => local.colorSpace ? value().toFormat(local.colorSpace) : value()
|
|
64
|
+
);
|
|
65
|
+
const range = createMemo(() => color().getChannelRange(local.channel));
|
|
66
|
+
const formatOptions = createMemo(
|
|
67
|
+
() => color().getChannelFormatOptions(local.channel)
|
|
68
|
+
);
|
|
69
|
+
const multiplier = createMemo(
|
|
70
|
+
() => formatOptions().style === "percent" && range().maxValue === 100 ? 100 : 1
|
|
71
|
+
);
|
|
72
|
+
const onRawValueChange = (value2) => {
|
|
73
|
+
if (Number.isNaN(value2)) {
|
|
74
|
+
setValue(color().withChannelValue(local.channel, Number.NaN));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const clampedValue = clamp(
|
|
78
|
+
value2 * multiplier(),
|
|
79
|
+
range().minValue,
|
|
80
|
+
range().maxValue
|
|
81
|
+
);
|
|
82
|
+
const digits = formatOptions().maximumFractionDigits ?? 0;
|
|
83
|
+
const roundedValue = Math.round(clampedValue * 10 ** digits) / 10 ** digits;
|
|
84
|
+
setValue(color().withChannelValue(local.channel, roundedValue));
|
|
85
|
+
};
|
|
86
|
+
return <NumberFieldRoot
|
|
87
|
+
rawValue={Number.isNaN(color().getChannelValue(local.channel)) ? void 0 : color().getChannelValue(local.channel) / multiplier()}
|
|
88
|
+
minValue={range().minValue / multiplier()}
|
|
89
|
+
maxValue={range().maxValue / multiplier()}
|
|
90
|
+
step={range().step / multiplier()}
|
|
91
|
+
formatOptions={formatOptions()}
|
|
92
|
+
onRawValueChange={onRawValueChange}
|
|
93
|
+
{...others}
|
|
94
|
+
/>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// src/color-channel-field/index.tsx
|
|
98
|
+
var ColorChannelField = Object.assign(ColorChannelFieldRoot, {
|
|
99
|
+
Description: FormControlDescription,
|
|
100
|
+
ErrorMessage: FormControlErrorMessage,
|
|
101
|
+
HiddenInput: NumberFieldHiddenInput,
|
|
102
|
+
Input: NumberFieldInput,
|
|
103
|
+
IncrementTrigger: NumberFieldIncrementTrigger,
|
|
104
|
+
DecrementTrigger: NumberFieldDecrementTrigger,
|
|
105
|
+
Label: FormControlLabel
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
ColorChannelField,
|
|
109
|
+
NumberFieldDecrementTrigger as DecrementTrigger,
|
|
110
|
+
FormControlDescription as Description,
|
|
111
|
+
FormControlErrorMessage as ErrorMessage,
|
|
112
|
+
NumberFieldHiddenInput as HiddenInput,
|
|
113
|
+
NumberFieldIncrementTrigger as IncrementTrigger,
|
|
114
|
+
NumberFieldInput as Input,
|
|
115
|
+
FormControlLabel as Label,
|
|
116
|
+
ColorChannelFieldRoot as Root
|
|
117
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import { a as FormControlDescription } from '../form-control-description-330657bc.js';
|
|
3
|
+
export { c as ColorFieldDescriptionCommonProps, b as ColorFieldDescriptionOptions, e as ColorFieldDescriptionProps, d as ColorFieldDescriptionRenderProps } from '../form-control-description-330657bc.js';
|
|
4
|
+
import { F as FormControlErrorMessage } from '../form-control-error-message-9efcbea8.js';
|
|
5
|
+
export { b as ColorFieldErrorMessageCommonProps, a as ColorFieldErrorMessageOptions, d as ColorFieldErrorMessageProps, c as ColorFieldErrorMessageRenderProps } from '../form-control-error-message-9efcbea8.js';
|
|
6
|
+
import { F as FormControlLabel } from '../form-control-label-2a5ca7a3.js';
|
|
7
|
+
export { b as ColorFieldLabelCommonProps, a as ColorFieldLabelOptions, d as ColorFieldLabelProps, c as ColorFieldLabelRenderProps } from '../form-control-label-2a5ca7a3.js';
|
|
8
|
+
import { JSX, ValidComponent } from 'solid-js';
|
|
9
|
+
import { ElementOf, PolymorphicProps } from '../polymorphic/index.js';
|
|
10
|
+
import { d as TextFieldInputOptions, a as TextFieldInputRenderProps, g as TextFieldRootOptions, i as TextFieldRootRenderProps } from '../text-field-root-0b8dfa5a.js';
|
|
11
|
+
import "#sheen-kobalte-utils";
|
|
12
|
+
|
|
13
|
+
interface ColorFieldInputOptions extends TextFieldInputOptions {
|
|
14
|
+
}
|
|
15
|
+
interface ColorFieldInputCommonProps<T extends HTMLElement = HTMLInputElement> {
|
|
16
|
+
onBlur: JSX.EventHandlerUnion<T, FocusEvent>;
|
|
17
|
+
}
|
|
18
|
+
interface ColorFieldInputRenderProps extends ColorFieldInputCommonProps, TextFieldInputRenderProps {
|
|
19
|
+
autoComplete: "off";
|
|
20
|
+
autoCorrect: "off";
|
|
21
|
+
spellCheck: "false";
|
|
22
|
+
}
|
|
23
|
+
type ColorFieldInputProps<T extends ValidComponent | HTMLElement = HTMLElement> = ColorFieldInputOptions & Partial<ColorFieldInputCommonProps<ElementOf<T>>>;
|
|
24
|
+
declare function ColorFieldInput<T extends ValidComponent = "input">(props: PolymorphicProps<T, ColorFieldInputProps<T>>): JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface ColorFieldRootOptions extends TextFieldRootOptions {
|
|
27
|
+
}
|
|
28
|
+
interface ColorFieldRootCommonProps<T extends HTMLElement = HTMLElement> {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
interface ColorFieldRootRenderProps extends ColorFieldRootCommonProps, TextFieldRootRenderProps {
|
|
32
|
+
}
|
|
33
|
+
type ColorFieldRootProps<T extends ValidComponent | HTMLElement = HTMLElement> = ColorFieldRootOptions & Partial<ColorFieldRootCommonProps<ElementOf<T>>>;
|
|
34
|
+
declare function ColorFieldRoot<T extends ValidComponent = "div">(props: PolymorphicProps<T, ColorFieldRootProps<T>>): JSX.Element;
|
|
35
|
+
|
|
36
|
+
interface ColorFieldContextValue {
|
|
37
|
+
onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
|
|
38
|
+
}
|
|
39
|
+
declare function useColorFieldContext(): ColorFieldContextValue;
|
|
40
|
+
|
|
41
|
+
declare const ColorField: typeof ColorFieldRoot & {
|
|
42
|
+
Description: typeof FormControlDescription;
|
|
43
|
+
ErrorMessage: typeof FormControlErrorMessage;
|
|
44
|
+
Input: typeof ColorFieldInput;
|
|
45
|
+
Label: typeof FormControlLabel;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { ColorField, ColorFieldContextValue, ColorFieldInputCommonProps, ColorFieldInputOptions, ColorFieldInputProps, ColorFieldInputRenderProps, ColorFieldRootCommonProps, ColorFieldRootOptions, ColorFieldRootProps, ColorFieldRootRenderProps, FormControlDescription as Description, FormControlErrorMessage as ErrorMessage, ColorFieldInput as Input, FormControlLabel as Label, ColorFieldRoot as Root, useColorFieldContext };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import { parseColor } from '../chunk/CWAEFUDR.js';
|
|
3
|
+
import { TextFieldInput, TextFieldRoot } from '../chunk/OPRD3XHK.js';
|
|
4
|
+
import { FormControlLabel } from '../chunk/7ZHN3PYD.js';
|
|
5
|
+
export { FormControlLabel as Label } from '../chunk/7ZHN3PYD.js';
|
|
6
|
+
import { FormControlErrorMessage } from '../chunk/ICNSTULC.js';
|
|
7
|
+
export { FormControlErrorMessage as ErrorMessage } from '../chunk/ICNSTULC.js';
|
|
8
|
+
import { FormControlDescription } from '../chunk/YKGT7A57.js';
|
|
9
|
+
export { FormControlDescription as Description } from '../chunk/YKGT7A57.js';
|
|
10
|
+
import { createControllableSignal } from '../chunk/BLN63FDC.js';
|
|
11
|
+
import { createComponent, mergeProps } from 'solid-js/web';
|
|
12
|
+
import { composeEventHandlers, mergeDefaultProps } from "#sheen-kobalte-utils";
|
|
13
|
+
import { createContext, useContext, splitProps, createUniqueId, createMemo, createSignal, batch } from 'solid-js';
|
|
14
|
+
|
|
15
|
+
var ColorFieldContext = createContext();
|
|
16
|
+
function useColorFieldContext() {
|
|
17
|
+
const context = useContext(ColorFieldContext);
|
|
18
|
+
if (context === void 0) {
|
|
19
|
+
throw new Error("[kobalte]: `useColorFieldContext` must be used within a `ColorField` component");
|
|
20
|
+
}
|
|
21
|
+
return context;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/color-field/color-field-input.tsx
|
|
25
|
+
function ColorFieldInput(props) {
|
|
26
|
+
const context = useColorFieldContext();
|
|
27
|
+
const [local, others] = splitProps(props, ["onBlur"]);
|
|
28
|
+
return createComponent(TextFieldInput, mergeProps({
|
|
29
|
+
autoComplete: "off",
|
|
30
|
+
autoCorrect: "off",
|
|
31
|
+
spellCheck: "false",
|
|
32
|
+
get onBlur() {
|
|
33
|
+
return composeEventHandlers([local.onBlur, context.onBlur]);
|
|
34
|
+
}
|
|
35
|
+
}, others));
|
|
36
|
+
}
|
|
37
|
+
function ColorFieldRoot(props) {
|
|
38
|
+
const defaultId = `colorfield-${createUniqueId()}`;
|
|
39
|
+
const mergedProps = mergeDefaultProps({
|
|
40
|
+
id: defaultId
|
|
41
|
+
}, props);
|
|
42
|
+
const [local, others] = splitProps(mergedProps, ["value", "defaultValue", "onChange"]);
|
|
43
|
+
const defaultValue = createMemo(() => {
|
|
44
|
+
let defaultValue2 = local.defaultValue;
|
|
45
|
+
try {
|
|
46
|
+
defaultValue2 = parseColor(defaultValue2?.startsWith("#") ? defaultValue2 : `#${defaultValue2}`).toString("hex");
|
|
47
|
+
} catch {
|
|
48
|
+
defaultValue2 = "";
|
|
49
|
+
}
|
|
50
|
+
return defaultValue2;
|
|
51
|
+
});
|
|
52
|
+
const [value, setValue] = createControllableSignal({
|
|
53
|
+
value: () => local.value,
|
|
54
|
+
defaultValue,
|
|
55
|
+
onChange: (value2) => local.onChange?.(value2)
|
|
56
|
+
});
|
|
57
|
+
const [prevValue, setPrevValue] = createSignal(value());
|
|
58
|
+
const onChange = (value2) => {
|
|
59
|
+
if (isAllowedInput(value2)) {
|
|
60
|
+
setValue(value2);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const onBlur = (e) => {
|
|
64
|
+
if (!value().length) {
|
|
65
|
+
setPrevValue("");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
let newValue;
|
|
69
|
+
try {
|
|
70
|
+
newValue = parseColor(value().startsWith("#") ? value() : `#${value()}`).toString("hex");
|
|
71
|
+
} catch {
|
|
72
|
+
if (prevValue()) {
|
|
73
|
+
setValue(prevValue());
|
|
74
|
+
} else {
|
|
75
|
+
setValue("");
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
batch(() => {
|
|
80
|
+
setValue(newValue);
|
|
81
|
+
setPrevValue(newValue);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const context = {
|
|
85
|
+
onBlur
|
|
86
|
+
};
|
|
87
|
+
return createComponent(ColorFieldContext.Provider, {
|
|
88
|
+
value: context,
|
|
89
|
+
get children() {
|
|
90
|
+
return createComponent(TextFieldRoot, mergeProps({
|
|
91
|
+
get value() {
|
|
92
|
+
return value();
|
|
93
|
+
},
|
|
94
|
+
get defaultValue() {
|
|
95
|
+
return defaultValue();
|
|
96
|
+
},
|
|
97
|
+
onChange
|
|
98
|
+
}, others));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function isAllowedInput(value) {
|
|
103
|
+
return value === "" || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// src/color-field/index.tsx
|
|
107
|
+
var ColorField = Object.assign(ColorFieldRoot, {
|
|
108
|
+
Description: FormControlDescription,
|
|
109
|
+
ErrorMessage: FormControlErrorMessage,
|
|
110
|
+
Input: ColorFieldInput,
|
|
111
|
+
Label: FormControlLabel
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export { ColorField, ColorFieldInput as Input, ColorFieldRoot as Root, useColorFieldContext };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import {
|
|
3
|
+
parseColor
|
|
4
|
+
} from "../chunk/UESR3MKV.jsx";
|
|
5
|
+
import {
|
|
6
|
+
TextFieldInput,
|
|
7
|
+
TextFieldRoot
|
|
8
|
+
} from "../chunk/TSB6MOZK.jsx";
|
|
9
|
+
import "../chunk/LP6E37CW.jsx";
|
|
10
|
+
import "../chunk/YFEENJN5.jsx";
|
|
11
|
+
import {
|
|
12
|
+
FormControlLabel
|
|
13
|
+
} from "../chunk/FOXVCQFV.jsx";
|
|
14
|
+
import "../chunk/QJIB6BDF.jsx";
|
|
15
|
+
import {
|
|
16
|
+
FormControlErrorMessage
|
|
17
|
+
} from "../chunk/ZZYKR3VO.jsx";
|
|
18
|
+
import {
|
|
19
|
+
FormControlDescription
|
|
20
|
+
} from "../chunk/XUUROM4M.jsx";
|
|
21
|
+
import "../chunk/JNCCF6MP.jsx";
|
|
22
|
+
import {
|
|
23
|
+
createControllableSignal
|
|
24
|
+
} from "../chunk/FN6EICGO.jsx";
|
|
25
|
+
import "../chunk/OYES4GOP.jsx";
|
|
26
|
+
import "../chunk/FLVHQV4A.jsx";
|
|
27
|
+
import "../chunk/5WXHJDCZ.jsx";
|
|
28
|
+
|
|
29
|
+
// src/color-field/color-field-input.tsx
|
|
30
|
+
import { composeEventHandlers } from "#sheen-kobalte-utils";
|
|
31
|
+
import {
|
|
32
|
+
splitProps
|
|
33
|
+
} from "solid-js";
|
|
34
|
+
|
|
35
|
+
// src/color-field/color-field-context.tsx
|
|
36
|
+
import { createContext, useContext } from "solid-js";
|
|
37
|
+
var ColorFieldContext = createContext();
|
|
38
|
+
function useColorFieldContext() {
|
|
39
|
+
const context = useContext(ColorFieldContext);
|
|
40
|
+
if (context === void 0) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
"[kobalte]: `useColorFieldContext` must be used within a `ColorField` component"
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return context;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// src/color-field/color-field-input.tsx
|
|
49
|
+
function ColorFieldInput(props) {
|
|
50
|
+
const context = useColorFieldContext();
|
|
51
|
+
const [local, others] = splitProps(props, ["onBlur"]);
|
|
52
|
+
return <TextFieldInput
|
|
53
|
+
autoComplete="off"
|
|
54
|
+
autoCorrect="off"
|
|
55
|
+
spellCheck="false"
|
|
56
|
+
onBlur={composeEventHandlers([local.onBlur, context.onBlur])}
|
|
57
|
+
{...others}
|
|
58
|
+
/>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/color-field/color-field-root.tsx
|
|
62
|
+
import { mergeDefaultProps } from "#sheen-kobalte-utils";
|
|
63
|
+
import {
|
|
64
|
+
batch,
|
|
65
|
+
createMemo,
|
|
66
|
+
createSignal,
|
|
67
|
+
createUniqueId,
|
|
68
|
+
splitProps as splitProps2
|
|
69
|
+
} from "solid-js";
|
|
70
|
+
function ColorFieldRoot(props) {
|
|
71
|
+
const defaultId = `colorfield-${createUniqueId()}`;
|
|
72
|
+
const mergedProps = mergeDefaultProps(
|
|
73
|
+
{ id: defaultId },
|
|
74
|
+
props
|
|
75
|
+
);
|
|
76
|
+
const [local, others] = splitProps2(mergedProps, [
|
|
77
|
+
"value",
|
|
78
|
+
"defaultValue",
|
|
79
|
+
"onChange"
|
|
80
|
+
]);
|
|
81
|
+
const defaultValue = createMemo(() => {
|
|
82
|
+
let defaultValue2 = local.defaultValue;
|
|
83
|
+
try {
|
|
84
|
+
defaultValue2 = parseColor(
|
|
85
|
+
defaultValue2?.startsWith("#") ? defaultValue2 : `#${defaultValue2}`
|
|
86
|
+
).toString("hex");
|
|
87
|
+
} catch {
|
|
88
|
+
defaultValue2 = "";
|
|
89
|
+
}
|
|
90
|
+
return defaultValue2;
|
|
91
|
+
});
|
|
92
|
+
const [value, setValue] = createControllableSignal({
|
|
93
|
+
value: () => local.value,
|
|
94
|
+
defaultValue,
|
|
95
|
+
onChange: (value2) => local.onChange?.(value2)
|
|
96
|
+
});
|
|
97
|
+
const [prevValue, setPrevValue] = createSignal(value());
|
|
98
|
+
const onChange = (value2) => {
|
|
99
|
+
if (isAllowedInput(value2)) {
|
|
100
|
+
setValue(value2);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const onBlur = (e) => {
|
|
104
|
+
if (!value().length) {
|
|
105
|
+
setPrevValue("");
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
let newValue;
|
|
109
|
+
try {
|
|
110
|
+
newValue = parseColor(
|
|
111
|
+
value().startsWith("#") ? value() : `#${value()}`
|
|
112
|
+
).toString("hex");
|
|
113
|
+
} catch {
|
|
114
|
+
if (prevValue()) {
|
|
115
|
+
setValue(prevValue());
|
|
116
|
+
} else {
|
|
117
|
+
setValue("");
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
batch(() => {
|
|
122
|
+
setValue(newValue);
|
|
123
|
+
setPrevValue(newValue);
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const context = {
|
|
127
|
+
onBlur
|
|
128
|
+
};
|
|
129
|
+
return <ColorFieldContext.Provider value={context}><TextFieldRoot
|
|
130
|
+
value={value()}
|
|
131
|
+
defaultValue={defaultValue()}
|
|
132
|
+
onChange={onChange}
|
|
133
|
+
{...others}
|
|
134
|
+
/></ColorFieldContext.Provider>;
|
|
135
|
+
}
|
|
136
|
+
function isAllowedInput(value) {
|
|
137
|
+
return value === "" || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// src/color-field/index.tsx
|
|
141
|
+
var ColorField = Object.assign(ColorFieldRoot, {
|
|
142
|
+
Description: FormControlDescription,
|
|
143
|
+
ErrorMessage: FormControlErrorMessage,
|
|
144
|
+
Input: ColorFieldInput,
|
|
145
|
+
Label: FormControlLabel
|
|
146
|
+
});
|
|
147
|
+
export {
|
|
148
|
+
ColorField,
|
|
149
|
+
FormControlDescription as Description,
|
|
150
|
+
FormControlErrorMessage as ErrorMessage,
|
|
151
|
+
ColorFieldInput as Input,
|
|
152
|
+
FormControlLabel as Label,
|
|
153
|
+
ColorFieldRoot as Root,
|
|
154
|
+
useColorFieldContext
|
|
155
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import * as solid_js from 'solid-js';
|
|
3
|
+
import { Accessor, ParentProps } from 'solid-js';
|
|
4
|
+
|
|
5
|
+
type ColorMode = "light" | "dark";
|
|
6
|
+
type ConfigColorMode = ColorMode | "system";
|
|
7
|
+
type MaybeConfigColorMode = ConfigColorMode | undefined;
|
|
8
|
+
interface ColorModeStorageManager {
|
|
9
|
+
/** The type of storage. */
|
|
10
|
+
type: "cookie" | "localStorage";
|
|
11
|
+
/** Whether it's an SSR environment. */
|
|
12
|
+
ssr?: boolean;
|
|
13
|
+
/** Get the color mode from the storage. */
|
|
14
|
+
get: (fallback?: ConfigColorMode) => MaybeConfigColorMode;
|
|
15
|
+
/** Save the color mode in the storage. */
|
|
16
|
+
set: (value: ConfigColorMode) => void;
|
|
17
|
+
}
|
|
18
|
+
interface ColorModeContextType {
|
|
19
|
+
colorMode: Accessor<ColorMode>;
|
|
20
|
+
setColorMode: (value: ConfigColorMode) => void;
|
|
21
|
+
toggleColorMode: () => void;
|
|
22
|
+
}
|
|
23
|
+
interface ColorModeOptions {
|
|
24
|
+
/** The initial color mode to use. */
|
|
25
|
+
initialColorMode?: ConfigColorMode;
|
|
26
|
+
/** Whether css transitions should be disabled during the color mode changes. */
|
|
27
|
+
disableTransitionOnChange?: boolean;
|
|
28
|
+
/** The color mode storage manager, either localStorage or cookie. */
|
|
29
|
+
storageManager?: ColorModeStorageManager;
|
|
30
|
+
}
|
|
31
|
+
type ColorModeProviderProps = ParentProps<ColorModeOptions>;
|
|
32
|
+
type ColorModeScriptProps = {
|
|
33
|
+
/** The initial color mode to use. */
|
|
34
|
+
initialColorMode?: ConfigColorMode;
|
|
35
|
+
/** The type of the color mode storage manager, either localStorage or cookie. */
|
|
36
|
+
storageType?: "localStorage" | "cookie";
|
|
37
|
+
/** The key used to store color mode preference in localStorage or cookie. */
|
|
38
|
+
storageKey?: string;
|
|
39
|
+
nonce?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const ColorModeContext: solid_js.Context<ColorModeContextType | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* Primitive that reads from `ColorModeProvider` context,
|
|
45
|
+
* Returns the color mode and function to toggle it.
|
|
46
|
+
*/
|
|
47
|
+
declare function useColorMode(): ColorModeContextType;
|
|
48
|
+
/**
|
|
49
|
+
* Change value based on color mode.
|
|
50
|
+
*
|
|
51
|
+
* @param light the light mode value
|
|
52
|
+
* @param dark the dark mode value
|
|
53
|
+
* @return A memoized value based on the color mode.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
*
|
|
57
|
+
* ```js
|
|
58
|
+
* const Icon = useColorModeValue(MoonIcon, SunIcon)
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare function useColorModeValue<TLight = unknown, TDark = unknown>(light: TLight, dark: TDark): solid_js.Accessor<TLight | TDark>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Provides context for the color mode based on config in `theme`
|
|
65
|
+
* Returns the color mode and function to toggle the color mode
|
|
66
|
+
*/
|
|
67
|
+
declare function ColorModeProvider(props: ColorModeProviderProps): solid_js.JSX.Element;
|
|
68
|
+
|
|
69
|
+
declare function ColorModeScript(props: ColorModeScriptProps): solid_js.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare const COLOR_MODE_STORAGE_KEY = "kb-color-mode";
|
|
72
|
+
declare function createLocalStorageManager(key: string): ColorModeStorageManager;
|
|
73
|
+
declare const localStorageManager: ColorModeStorageManager;
|
|
74
|
+
declare function createCookieStorageManager(key: string, cookie?: string): ColorModeStorageManager;
|
|
75
|
+
declare const cookieStorageManager: ColorModeStorageManager;
|
|
76
|
+
declare function cookieStorageManagerSSR(cookie: string): ColorModeStorageManager;
|
|
77
|
+
|
|
78
|
+
export { COLOR_MODE_STORAGE_KEY, ColorMode, ColorModeContext, ColorModeContextType, ColorModeOptions, ColorModeProvider, ColorModeProviderProps, ColorModeScript, ColorModeScriptProps, ColorModeStorageManager, ConfigColorMode, MaybeConfigColorMode, cookieStorageManager, cookieStorageManagerSSR, createCookieStorageManager, createLocalStorageManager, localStorageManager, useColorMode, useColorModeValue };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
export { COLOR_MODE_STORAGE_KEY, ColorModeContext, ColorModeProvider, ColorModeScript, cookieStorageManager, cookieStorageManagerSSR, createCookieStorageManager, createLocalStorageManager, localStorageManager, useColorMode, useColorModeValue } from '../chunk/TVVHJCOX.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
|
|
2
|
+
import {
|
|
3
|
+
COLOR_MODE_STORAGE_KEY,
|
|
4
|
+
ColorModeContext,
|
|
5
|
+
ColorModeProvider,
|
|
6
|
+
ColorModeScript,
|
|
7
|
+
cookieStorageManager,
|
|
8
|
+
cookieStorageManagerSSR,
|
|
9
|
+
createCookieStorageManager,
|
|
10
|
+
createLocalStorageManager,
|
|
11
|
+
localStorageManager,
|
|
12
|
+
useColorMode,
|
|
13
|
+
useColorModeValue
|
|
14
|
+
} from "../chunk/OPHDMVQK.jsx";
|
|
15
|
+
import "../chunk/5WXHJDCZ.jsx";
|
|
16
|
+
export {
|
|
17
|
+
COLOR_MODE_STORAGE_KEY,
|
|
18
|
+
ColorModeContext,
|
|
19
|
+
ColorModeProvider,
|
|
20
|
+
ColorModeScript,
|
|
21
|
+
cookieStorageManager,
|
|
22
|
+
cookieStorageManagerSSR,
|
|
23
|
+
createCookieStorageManager,
|
|
24
|
+
createLocalStorageManager,
|
|
25
|
+
localStorageManager,
|
|
26
|
+
useColorMode,
|
|
27
|
+
useColorModeValue
|
|
28
|
+
};
|