silver-ui 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/LICENSE +21 -0
- package/README.md +306 -0
- package/dist/chunk-25OAUQRF.cjs +151 -0
- package/dist/chunk-25OAUQRF.cjs.map +1 -0
- package/dist/chunk-2FPZULX3.cjs +713 -0
- package/dist/chunk-2FPZULX3.cjs.map +1 -0
- package/dist/chunk-2FUG6NKO.js +390 -0
- package/dist/chunk-2FUG6NKO.js.map +1 -0
- package/dist/chunk-2OXKEUKG.cjs +17 -0
- package/dist/chunk-2OXKEUKG.cjs.map +1 -0
- package/dist/chunk-2PHHFBJ3.cjs +102 -0
- package/dist/chunk-2PHHFBJ3.cjs.map +1 -0
- package/dist/chunk-2QK2NZN5.js +370 -0
- package/dist/chunk-2QK2NZN5.js.map +1 -0
- package/dist/chunk-2QM5XBX4.cjs +32 -0
- package/dist/chunk-2QM5XBX4.cjs.map +1 -0
- package/dist/chunk-2UTRYTT3.cjs +285 -0
- package/dist/chunk-2UTRYTT3.cjs.map +1 -0
- package/dist/chunk-2WP6NYYY.cjs +113 -0
- package/dist/chunk-2WP6NYYY.cjs.map +1 -0
- package/dist/chunk-2XCNB2O6.js +614 -0
- package/dist/chunk-2XCNB2O6.js.map +1 -0
- package/dist/chunk-2ZGGJWJY.cjs +145 -0
- package/dist/chunk-2ZGGJWJY.cjs.map +1 -0
- package/dist/chunk-32XQJNKY.cjs +211 -0
- package/dist/chunk-32XQJNKY.cjs.map +1 -0
- package/dist/chunk-3DE4GOZU.js +207 -0
- package/dist/chunk-3DE4GOZU.js.map +1 -0
- package/dist/chunk-3L3M7SJ3.js +24 -0
- package/dist/chunk-3L3M7SJ3.js.map +1 -0
- package/dist/chunk-3PSQDJQH.js +207 -0
- package/dist/chunk-3PSQDJQH.js.map +1 -0
- package/dist/chunk-3UUZY42Z.js +207 -0
- package/dist/chunk-3UUZY42Z.js.map +1 -0
- package/dist/chunk-47BELFYO.cjs +3549 -0
- package/dist/chunk-47BELFYO.cjs.map +1 -0
- package/dist/chunk-4A4EI26N.cjs +771 -0
- package/dist/chunk-4A4EI26N.cjs.map +1 -0
- package/dist/chunk-4W7L63LH.js +86 -0
- package/dist/chunk-4W7L63LH.js.map +1 -0
- package/dist/chunk-4XRVXUJQ.cjs +242 -0
- package/dist/chunk-4XRVXUJQ.cjs.map +1 -0
- package/dist/chunk-5EQN3YMQ.cjs +234 -0
- package/dist/chunk-5EQN3YMQ.cjs.map +1 -0
- package/dist/chunk-5G3BY75L.cjs +28 -0
- package/dist/chunk-5G3BY75L.cjs.map +1 -0
- package/dist/chunk-5OS5A27C.js +179 -0
- package/dist/chunk-5OS5A27C.js.map +1 -0
- package/dist/chunk-6BSEY2DF.js +258 -0
- package/dist/chunk-6BSEY2DF.js.map +1 -0
- package/dist/chunk-6NIFOTUZ.cjs +439 -0
- package/dist/chunk-6NIFOTUZ.cjs.map +1 -0
- package/dist/chunk-6SHL7FYO.cjs +29 -0
- package/dist/chunk-6SHL7FYO.cjs.map +1 -0
- package/dist/chunk-6SPQDYHC.cjs +455 -0
- package/dist/chunk-6SPQDYHC.cjs.map +1 -0
- package/dist/chunk-6UVJUY7Z.cjs +142 -0
- package/dist/chunk-6UVJUY7Z.cjs.map +1 -0
- package/dist/chunk-7EXVJWG5.js +151 -0
- package/dist/chunk-7EXVJWG5.js.map +1 -0
- package/dist/chunk-A45WLNF7.cjs +10 -0
- package/dist/chunk-A45WLNF7.cjs.map +1 -0
- package/dist/chunk-AFT635BR.cjs +308 -0
- package/dist/chunk-AFT635BR.cjs.map +1 -0
- package/dist/chunk-AZDWQGAX.cjs +286 -0
- package/dist/chunk-AZDWQGAX.cjs.map +1 -0
- package/dist/chunk-BCJ25X7C.js +281 -0
- package/dist/chunk-BCJ25X7C.js.map +1 -0
- package/dist/chunk-BSBEPQLM.cjs +93 -0
- package/dist/chunk-BSBEPQLM.cjs.map +1 -0
- package/dist/chunk-BTBOTNOE.cjs +261 -0
- package/dist/chunk-BTBOTNOE.cjs.map +1 -0
- package/dist/chunk-C2CNRYZI.cjs +453 -0
- package/dist/chunk-C2CNRYZI.cjs.map +1 -0
- package/dist/chunk-CA6645TQ.js +287 -0
- package/dist/chunk-CA6645TQ.js.map +1 -0
- package/dist/chunk-CK3UJQRI.cjs +104 -0
- package/dist/chunk-CK3UJQRI.cjs.map +1 -0
- package/dist/chunk-CR4NB42L.cjs +375 -0
- package/dist/chunk-CR4NB42L.cjs.map +1 -0
- package/dist/chunk-CVH6X6ND.js +125 -0
- package/dist/chunk-CVH6X6ND.js.map +1 -0
- package/dist/chunk-CWUC4TOQ.js +255 -0
- package/dist/chunk-CWUC4TOQ.js.map +1 -0
- package/dist/chunk-CXBB2LN7.js +12 -0
- package/dist/chunk-CXBB2LN7.js.map +1 -0
- package/dist/chunk-CZJUKLFD.cjs +169 -0
- package/dist/chunk-CZJUKLFD.cjs.map +1 -0
- package/dist/chunk-D6KXW75E.js +424 -0
- package/dist/chunk-D6KXW75E.js.map +1 -0
- package/dist/chunk-DFF72N57.js +192 -0
- package/dist/chunk-DFF72N57.js.map +1 -0
- package/dist/chunk-DHUK3GNK.cjs +258 -0
- package/dist/chunk-DHUK3GNK.cjs.map +1 -0
- package/dist/chunk-DJW7T3WJ.js +2019 -0
- package/dist/chunk-DJW7T3WJ.js.map +1 -0
- package/dist/chunk-DNVOWNQG.cjs +209 -0
- package/dist/chunk-DNVOWNQG.cjs.map +1 -0
- package/dist/chunk-DONU5ALC.cjs +330 -0
- package/dist/chunk-DONU5ALC.cjs.map +1 -0
- package/dist/chunk-E4TIWN4Z.cjs +153 -0
- package/dist/chunk-E4TIWN4Z.cjs.map +1 -0
- package/dist/chunk-E7EO3YVJ.js +323 -0
- package/dist/chunk-E7EO3YVJ.js.map +1 -0
- package/dist/chunk-EB5EHX6I.js +143 -0
- package/dist/chunk-EB5EHX6I.js.map +1 -0
- package/dist/chunk-EBUSMPS6.js +306 -0
- package/dist/chunk-EBUSMPS6.js.map +1 -0
- package/dist/chunk-EETTQWW5.cjs +142 -0
- package/dist/chunk-EETTQWW5.cjs.map +1 -0
- package/dist/chunk-EHBV6ZMM.js +239 -0
- package/dist/chunk-EHBV6ZMM.js.map +1 -0
- package/dist/chunk-ELCRG7WZ.js +2090 -0
- package/dist/chunk-ELCRG7WZ.js.map +1 -0
- package/dist/chunk-EM2F6BZ2.js +355 -0
- package/dist/chunk-EM2F6BZ2.js.map +1 -0
- package/dist/chunk-F7AUYO3H.cjs +211 -0
- package/dist/chunk-F7AUYO3H.cjs.map +1 -0
- package/dist/chunk-FVIEYPDB.js +490 -0
- package/dist/chunk-FVIEYPDB.js.map +1 -0
- package/dist/chunk-G44NDBPN.cjs +62 -0
- package/dist/chunk-G44NDBPN.cjs.map +1 -0
- package/dist/chunk-GI3NLBCW.cjs +375 -0
- package/dist/chunk-GI3NLBCW.cjs.map +1 -0
- package/dist/chunk-GKG47NK6.cjs +2505 -0
- package/dist/chunk-GKG47NK6.cjs.map +1 -0
- package/dist/chunk-GUF4ZNPQ.js +138 -0
- package/dist/chunk-GUF4ZNPQ.js.map +1 -0
- package/dist/chunk-GZ5SRSD4.js +194 -0
- package/dist/chunk-GZ5SRSD4.js.map +1 -0
- package/dist/chunk-H6OY6FLC.js +139 -0
- package/dist/chunk-H6OY6FLC.js.map +1 -0
- package/dist/chunk-HPZ7LLXK.js +367 -0
- package/dist/chunk-HPZ7LLXK.js.map +1 -0
- package/dist/chunk-HWCL6JFB.js +149 -0
- package/dist/chunk-HWCL6JFB.js.map +1 -0
- package/dist/chunk-HXT6A6GH.cjs +61 -0
- package/dist/chunk-HXT6A6GH.cjs.map +1 -0
- package/dist/chunk-I25KF3UF.js +519 -0
- package/dist/chunk-I25KF3UF.js.map +1 -0
- package/dist/chunk-I6IGTQLG.cjs +251 -0
- package/dist/chunk-I6IGTQLG.cjs.map +1 -0
- package/dist/chunk-I7PJTLP2.cjs +425 -0
- package/dist/chunk-I7PJTLP2.cjs.map +1 -0
- package/dist/chunk-IT72TF72.js +612 -0
- package/dist/chunk-IT72TF72.js.map +1 -0
- package/dist/chunk-IWSS5745.js +307 -0
- package/dist/chunk-IWSS5745.js.map +1 -0
- package/dist/chunk-JAX62FUE.cjs +75 -0
- package/dist/chunk-JAX62FUE.cjs.map +1 -0
- package/dist/chunk-JCYPM27J.js +153 -0
- package/dist/chunk-JCYPM27J.js.map +1 -0
- package/dist/chunk-K574UTWP.cjs +182 -0
- package/dist/chunk-K574UTWP.cjs.map +1 -0
- package/dist/chunk-KLMODPEE.js +8 -0
- package/dist/chunk-KLMODPEE.js.map +1 -0
- package/dist/chunk-KVREBGWA.js +711 -0
- package/dist/chunk-KVREBGWA.js.map +1 -0
- package/dist/chunk-KXXRALHT.cjs +304 -0
- package/dist/chunk-KXXRALHT.cjs.map +1 -0
- package/dist/chunk-KXXTWWJZ.cjs +71 -0
- package/dist/chunk-KXXTWWJZ.cjs.map +1 -0
- package/dist/chunk-KYDRDJRM.cjs +326 -0
- package/dist/chunk-KYDRDJRM.cjs.map +1 -0
- package/dist/chunk-L3G7SHEP.cjs +525 -0
- package/dist/chunk-L3G7SHEP.cjs.map +1 -0
- package/dist/chunk-LBRKUZSQ.cjs +258 -0
- package/dist/chunk-LBRKUZSQ.cjs.map +1 -0
- package/dist/chunk-LFZXGIR6.cjs +492 -0
- package/dist/chunk-LFZXGIR6.cjs.map +1 -0
- package/dist/chunk-MCOVG6W6.js +254 -0
- package/dist/chunk-MCOVG6W6.js.map +1 -0
- package/dist/chunk-MKAOIB2O.cjs +146 -0
- package/dist/chunk-MKAOIB2O.cjs.map +1 -0
- package/dist/chunk-NAELQLZN.js +73 -0
- package/dist/chunk-NAELQLZN.js.map +1 -0
- package/dist/chunk-NGWNIMMX.js +247 -0
- package/dist/chunk-NGWNIMMX.js.map +1 -0
- package/dist/chunk-NILB6Y4Z.cjs +313 -0
- package/dist/chunk-NILB6Y4Z.cjs.map +1 -0
- package/dist/chunk-NJDV3LDH.js +722 -0
- package/dist/chunk-NJDV3LDH.js.map +1 -0
- package/dist/chunk-NMHCRHRI.cjs +163 -0
- package/dist/chunk-NMHCRHRI.cjs.map +1 -0
- package/dist/chunk-NOZ6U6ZJ.js +140 -0
- package/dist/chunk-NOZ6U6ZJ.js.map +1 -0
- package/dist/chunk-NPJXGQOF.cjs +2031 -0
- package/dist/chunk-NPJXGQOF.cjs.map +1 -0
- package/dist/chunk-NSHWBZL4.cjs +197 -0
- package/dist/chunk-NSHWBZL4.cjs.map +1 -0
- package/dist/chunk-O32BKXTR.cjs +271 -0
- package/dist/chunk-O32BKXTR.cjs.map +1 -0
- package/dist/chunk-O5RVLBKN.cjs +252 -0
- package/dist/chunk-O5RVLBKN.cjs.map +1 -0
- package/dist/chunk-OA4KIVLO.cjs +243 -0
- package/dist/chunk-OA4KIVLO.cjs.map +1 -0
- package/dist/chunk-OAUKYH6C.cjs +15 -0
- package/dist/chunk-OAUKYH6C.cjs.map +1 -0
- package/dist/chunk-OKKL652L.js +449 -0
- package/dist/chunk-OKKL652L.js.map +1 -0
- package/dist/chunk-OX4ZMUF4.js +16 -0
- package/dist/chunk-OX4ZMUF4.js.map +1 -0
- package/dist/chunk-OZNNBPMP.cjs +288 -0
- package/dist/chunk-OZNNBPMP.cjs.map +1 -0
- package/dist/chunk-P5AZUUM2.cjs +155 -0
- package/dist/chunk-P5AZUUM2.cjs.map +1 -0
- package/dist/chunk-PBZWX2RJ.js +142 -0
- package/dist/chunk-PBZWX2RJ.js.map +1 -0
- package/dist/chunk-PDXZDPOY.cjs +617 -0
- package/dist/chunk-PDXZDPOY.cjs.map +1 -0
- package/dist/chunk-PGKOWMP4.js +297 -0
- package/dist/chunk-PGKOWMP4.js.map +1 -0
- package/dist/chunk-PHFEQG4E.cjs +89 -0
- package/dist/chunk-PHFEQG4E.cjs.map +1 -0
- package/dist/chunk-PLFKU46A.js +204 -0
- package/dist/chunk-PLFKU46A.js.map +1 -0
- package/dist/chunk-PPNETWIP.js +8 -0
- package/dist/chunk-PPNETWIP.js.map +1 -0
- package/dist/chunk-PZO5MZ46.js +3543 -0
- package/dist/chunk-PZO5MZ46.js.map +1 -0
- package/dist/chunk-QFO5ZTZZ.js +68 -0
- package/dist/chunk-QFO5ZTZZ.js.map +1 -0
- package/dist/chunk-QRDRZNCS.cjs +393 -0
- package/dist/chunk-QRDRZNCS.cjs.map +1 -0
- package/dist/chunk-QRXMW7MQ.cjs +730 -0
- package/dist/chunk-QRXMW7MQ.cjs.map +1 -0
- package/dist/chunk-QSEDH7T2.js +84 -0
- package/dist/chunk-QSEDH7T2.js.map +1 -0
- package/dist/chunk-QXI446BK.cjs +209 -0
- package/dist/chunk-QXI446BK.cjs.map +1 -0
- package/dist/chunk-R2NQNVEV.js +2476 -0
- package/dist/chunk-R2NQNVEV.js.map +1 -0
- package/dist/chunk-R37R7DEV.cjs +20 -0
- package/dist/chunk-R37R7DEV.cjs.map +1 -0
- package/dist/chunk-RCAA2CZJ.js +232 -0
- package/dist/chunk-RCAA2CZJ.js.map +1 -0
- package/dist/chunk-RDNMAV5B.js +269 -0
- package/dist/chunk-RDNMAV5B.js.map +1 -0
- package/dist/chunk-RGPL6EDK.js +110 -0
- package/dist/chunk-RGPL6EDK.js.map +1 -0
- package/dist/chunk-RJQQ2UIQ.js +422 -0
- package/dist/chunk-RJQQ2UIQ.js.map +1 -0
- package/dist/chunk-RJXHAQCR.cjs +141 -0
- package/dist/chunk-RJXHAQCR.cjs.map +1 -0
- package/dist/chunk-RLQYXUDO.js +59 -0
- package/dist/chunk-RLQYXUDO.js.map +1 -0
- package/dist/chunk-S5NFDKPL.js +161 -0
- package/dist/chunk-S5NFDKPL.js.map +1 -0
- package/dist/chunk-SGLIDI6R.js +27 -0
- package/dist/chunk-SGLIDI6R.js.map +1 -0
- package/dist/chunk-SMF3YBH5.cjs +2099 -0
- package/dist/chunk-SMF3YBH5.cjs.map +1 -0
- package/dist/chunk-SPDVNY2Z.cjs +10 -0
- package/dist/chunk-SPDVNY2Z.cjs.map +1 -0
- package/dist/chunk-T55MB2CA.js +90 -0
- package/dist/chunk-T55MB2CA.js.map +1 -0
- package/dist/chunk-TPSOUQG7.cjs +309 -0
- package/dist/chunk-TPSOUQG7.cjs.map +1 -0
- package/dist/chunk-U35V3GVC.js +64 -0
- package/dist/chunk-U35V3GVC.js.map +1 -0
- package/dist/chunk-UHQRL4OA.js +278 -0
- package/dist/chunk-UHQRL4OA.js.map +1 -0
- package/dist/chunk-UWG5UQFV.cjs +66 -0
- package/dist/chunk-UWG5UQFV.cjs.map +1 -0
- package/dist/chunk-UZNSGQT3.cjs +431 -0
- package/dist/chunk-UZNSGQT3.cjs.map +1 -0
- package/dist/chunk-V5W7NZN5.js +30 -0
- package/dist/chunk-V5W7NZN5.js.map +1 -0
- package/dist/chunk-VIJHDURK.js +78 -0
- package/dist/chunk-VIJHDURK.js.map +1 -0
- package/dist/chunk-VL6IDFI2.js +206 -0
- package/dist/chunk-VL6IDFI2.js.map +1 -0
- package/dist/chunk-VLIQPSPM.js +310 -0
- package/dist/chunk-VLIQPSPM.js.map +1 -0
- package/dist/chunk-VT7VKCHL.cjs +362 -0
- package/dist/chunk-VT7VKCHL.cjs.map +1 -0
- package/dist/chunk-VTQRXV32.js +565 -0
- package/dist/chunk-VTQRXV32.js.map +1 -0
- package/dist/chunk-VVYUCQHP.js +328 -0
- package/dist/chunk-VVYUCQHP.js.map +1 -0
- package/dist/chunk-W6B55MNU.js +371 -0
- package/dist/chunk-W6B55MNU.js.map +1 -0
- package/dist/chunk-WA4DRAQ7.js +236 -0
- package/dist/chunk-WA4DRAQ7.js.map +1 -0
- package/dist/chunk-WBPIJ4D5.js +58 -0
- package/dist/chunk-WBPIJ4D5.js.map +1 -0
- package/dist/chunk-WE3ECIRS.cjs +616 -0
- package/dist/chunk-WE3ECIRS.cjs.map +1 -0
- package/dist/chunk-WEEYUS7M.cjs +222 -0
- package/dist/chunk-WEEYUS7M.cjs.map +1 -0
- package/dist/chunk-WIIDQ44X.cjs +209 -0
- package/dist/chunk-WIIDQ44X.cjs.map +1 -0
- package/dist/chunk-WIO3XITR.js +769 -0
- package/dist/chunk-WIO3XITR.js.map +1 -0
- package/dist/chunk-WIW2YR46.js +88 -0
- package/dist/chunk-WIW2YR46.js.map +1 -0
- package/dist/chunk-WM66IPV4.cjs +567 -0
- package/dist/chunk-WM66IPV4.cjs.map +1 -0
- package/dist/chunk-WSAZHUB3.cjs +373 -0
- package/dist/chunk-WSAZHUB3.cjs.map +1 -0
- package/dist/chunk-XQMLA75S.js +436 -0
- package/dist/chunk-XQMLA75S.js.map +1 -0
- package/dist/chunk-Y73472IA.js +99 -0
- package/dist/chunk-Y73472IA.js.map +1 -0
- package/dist/chunk-YHR44PWO.js +217 -0
- package/dist/chunk-YHR44PWO.js.map +1 -0
- package/dist/chunk-YLXM3CGV.js +209 -0
- package/dist/chunk-YLXM3CGV.js.map +1 -0
- package/dist/chunk-YMC56K6R.cjs +289 -0
- package/dist/chunk-YMC56K6R.cjs.map +1 -0
- package/dist/chunk-YOFCBZAX.js +286 -0
- package/dist/chunk-YOFCBZAX.js.map +1 -0
- package/dist/chunk-YOWRLFMF.cjs +128 -0
- package/dist/chunk-YOWRLFMF.cjs.map +1 -0
- package/dist/chunk-YQJJCYJP.js +449 -0
- package/dist/chunk-YQJJCYJP.js.map +1 -0
- package/dist/chunk-YRXGCYT2.js +354 -0
- package/dist/chunk-YRXGCYT2.js.map +1 -0
- package/dist/chunk-YT3UWEVY.js +81 -0
- package/dist/chunk-YT3UWEVY.js.map +1 -0
- package/dist/chunk-YX7DI3O3.cjs +358 -0
- package/dist/chunk-YX7DI3O3.cjs.map +1 -0
- package/dist/chunk-YZUBJ2L2.cjs +195 -0
- package/dist/chunk-YZUBJ2L2.cjs.map +1 -0
- package/dist/chunk-Z2STCD6I.js +165 -0
- package/dist/chunk-Z2STCD6I.js.map +1 -0
- package/dist/chunk-Z2UFJIZU.cjs +207 -0
- package/dist/chunk-Z2UFJIZU.cjs.map +1 -0
- package/dist/chunk-Z4TZAJS3.js +14 -0
- package/dist/chunk-Z4TZAJS3.js.map +1 -0
- package/dist/chunk-ZC7H4S4T.cjs +81 -0
- package/dist/chunk-ZC7H4S4T.cjs.map +1 -0
- package/dist/chunk-ZHFAFEI2.js +247 -0
- package/dist/chunk-ZHFAFEI2.js.map +1 -0
- package/dist/chunk-ZVBVKZ4P.cjs +84 -0
- package/dist/chunk-ZVBVKZ4P.cjs.map +1 -0
- package/dist/chunk-ZW4XKNDR.cjs +91 -0
- package/dist/chunk-ZW4XKNDR.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +87 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionContext.d.ts +6 -0
- package/dist/components/Accordion/AccordionContext.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionItem.d.ts +64 -0
- package/dist/components/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/components/Accordion/Collapsible.d.ts +60 -0
- package/dist/components/Accordion/Collapsible.d.ts.map +1 -0
- package/dist/components/Accordion/index.cjs +24 -0
- package/dist/components/Accordion/index.cjs.map +1 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/Accordion/index.js +7 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Accordion/useCollapsible.d.ts +15 -0
- package/dist/components/Accordion/useCollapsible.d.ts.map +1 -0
- package/dist/components/Alert/Alert.d.ts +79 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -0
- package/dist/components/Alert/Alert.recipe.d.ts +48 -0
- package/dist/components/Alert/Alert.recipe.d.ts.map +1 -0
- package/dist/components/Alert/index.cjs +29 -0
- package/dist/components/Alert/index.cjs.map +1 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +16 -0
- package/dist/components/Alert/index.js.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +72 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.cjs +32 -0
- package/dist/components/AlertDialog/index.cjs.map +1 -0
- package/dist/components/AlertDialog/index.d.ts +3 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.js +19 -0
- package/dist/components/AlertDialog/index.js.map +1 -0
- package/dist/components/AlertDialog/useAlertDialog.d.ts +23 -0
- package/dist/components/AlertDialog/useAlertDialog.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.d.ts +74 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.recipe.d.ts +21 -0
- package/dist/components/AppShell/AppShell.recipe.d.ts.map +1 -0
- package/dist/components/AppShell/AppShellMobileContext.d.ts +12 -0
- package/dist/components/AppShell/AppShellMobileContext.d.ts.map +1 -0
- package/dist/components/AppShell/index.cjs +44 -0
- package/dist/components/AppShell/index.cjs.map +1 -0
- package/dist/components/AppShell/index.d.ts +4 -0
- package/dist/components/AppShell/index.d.ts.map +1 -0
- package/dist/components/AppShell/index.js +23 -0
- package/dist/components/AppShell/index.js.map +1 -0
- package/dist/components/AppShell/useSlotPresence.d.ts +5 -0
- package/dist/components/AppShell/useSlotPresence.d.ts.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +19 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.recipe.d.ts +4 -0
- package/dist/components/AspectRatio/AspectRatio.recipe.d.ts.map +1 -0
- package/dist/components/AspectRatio/index.cjs +19 -0
- package/dist/components/AspectRatio/index.cjs.map +1 -0
- package/dist/components/AspectRatio/index.d.ts +3 -0
- package/dist/components/AspectRatio/index.d.ts.map +1 -0
- package/dist/components/AspectRatio/index.js +6 -0
- package/dist/components/AspectRatio/index.js.map +1 -0
- package/dist/components/AutocompleteInput/AutocompleteInput.d.ts +127 -0
- package/dist/components/AutocompleteInput/AutocompleteInput.d.ts.map +1 -0
- package/dist/components/AutocompleteInput/AutocompleteInputItem.d.ts +46 -0
- package/dist/components/AutocompleteInput/AutocompleteInputItem.d.ts.map +1 -0
- package/dist/components/AutocompleteInput/BaseAutocompleteInput.d.ts +108 -0
- package/dist/components/AutocompleteInput/BaseAutocompleteInput.d.ts.map +1 -0
- package/dist/components/AutocompleteInput/index.cjs +43 -0
- package/dist/components/AutocompleteInput/index.cjs.map +1 -0
- package/dist/components/AutocompleteInput/index.d.ts +5 -0
- package/dist/components/AutocompleteInput/index.d.ts.map +1 -0
- package/dist/components/AutocompleteInput/index.js +22 -0
- package/dist/components/AutocompleteInput/index.js.map +1 -0
- package/dist/components/AutocompleteInput/types.d.ts +41 -0
- package/dist/components/AutocompleteInput/types.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +59 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.recipe.d.ts +19 -0
- package/dist/components/Avatar/Avatar.recipe.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarSizeContext.d.ts +3 -0
- package/dist/components/Avatar/AvatarSizeContext.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarStatusDot.d.ts +43 -0
- package/dist/components/Avatar/AvatarStatusDot.d.ts.map +1 -0
- package/dist/components/Avatar/index.cjs +28 -0
- package/dist/components/Avatar/index.cjs.map +1 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +7 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +44 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.recipe.d.ts +2 -0
- package/dist/components/AvatarGroup/AvatarGroup.recipe.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroupContext.d.ts +9 -0
- package/dist/components/AvatarGroup/AvatarGroupContext.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroupOverflow.d.ts +42 -0
- package/dist/components/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -0
- package/dist/components/AvatarGroup/index.cjs +25 -0
- package/dist/components/AvatarGroup/index.cjs.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +4 -0
- package/dist/components/AvatarGroup/index.d.ts.map +1 -0
- package/dist/components/AvatarGroup/index.js +8 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +59 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/Badge.recipe.d.ts +83 -0
- package/dist/components/Badge/Badge.recipe.d.ts.map +1 -0
- package/dist/components/Badge/index.cjs +20 -0
- package/dist/components/Badge/index.cjs.map +1 -0
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +7 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Blockquote/Blockquote.d.ts +38 -0
- package/dist/components/Blockquote/Blockquote.d.ts.map +1 -0
- package/dist/components/Blockquote/index.cjs +50 -0
- package/dist/components/Blockquote/index.cjs.map +1 -0
- package/dist/components/Blockquote/index.d.ts +2 -0
- package/dist/components/Blockquote/index.d.ts.map +1 -0
- package/dist/components/Blockquote/index.js +48 -0
- package/dist/components/Blockquote/index.js.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +54 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +47 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbsContext.d.ts +8 -0
- package/dist/components/Breadcrumbs/BreadcrumbsContext.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/index.cjs +29 -0
- package/dist/components/Breadcrumbs/index.cjs.map +1 -0
- package/dist/components/Breadcrumbs/index.d.ts +4 -0
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/index.js +12 -0
- package/dist/components/Breadcrumbs/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +193 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.recipe.d.ts +96 -0
- package/dist/components/Button/Button.recipe.d.ts.map +1 -0
- package/dist/components/Button/index.cjs +28 -0
- package/dist/components/Button/index.cjs.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +15 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +54 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.recipe.d.ts +35 -0
- package/dist/components/ButtonGroup/ButtonGroup.recipe.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroupContext.d.ts +10 -0
- package/dist/components/ButtonGroup/ButtonGroupContext.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.cjs +20 -0
- package/dist/components/ButtonGroup/index.cjs.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +4 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.js +7 -0
- package/dist/components/ButtonGroup/index.js.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +120 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/index.cjs +27 -0
- package/dist/components/Calendar/index.cjs.map +1 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Calendar/index.js +18 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Card/Card.d.ts +30 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.recipe.d.ts +82 -0
- package/dist/components/Card/Card.recipe.d.ts.map +1 -0
- package/dist/components/Card/index.cjs +19 -0
- package/dist/components/Card/index.cjs.map +1 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.js +6 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Center/Center.d.ts +38 -0
- package/dist/components/Center/Center.d.ts.map +1 -0
- package/dist/components/Center/Center.recipe.d.ts +23 -0
- package/dist/components/Center/Center.recipe.d.ts.map +1 -0
- package/dist/components/Center/index.cjs +20 -0
- package/dist/components/Center/index.cjs.map +1 -0
- package/dist/components/Center/index.d.ts +3 -0
- package/dist/components/Center/index.d.ts.map +1 -0
- package/dist/components/Center/index.js +7 -0
- package/dist/components/Center/index.js.map +1 -0
- package/dist/components/CheckboxInput/CheckboxInput.d.ts +110 -0
- package/dist/components/CheckboxInput/CheckboxInput.d.ts.map +1 -0
- package/dist/components/CheckboxInput/index.cjs +26 -0
- package/dist/components/CheckboxInput/index.cjs.map +1 -0
- package/dist/components/CheckboxInput/index.d.ts +2 -0
- package/dist/components/CheckboxInput/index.d.ts.map +1 -0
- package/dist/components/CheckboxInput/index.js +17 -0
- package/dist/components/CheckboxInput/index.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +89 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.cjs +25 -0
- package/dist/components/CodeBlock/index.cjs.map +1 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/CodeBlock/index.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.js +16 -0
- package/dist/components/CodeBlock/index.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +74 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/components/ContextMenu/index.cjs +34 -0
- package/dist/components/ContextMenu/index.cjs.map +1 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/ContextMenu/index.d.ts.map +1 -0
- package/dist/components/ContextMenu/index.js +21 -0
- package/dist/components/ContextMenu/index.js.map +1 -0
- package/dist/components/DateInput/DateInput.d.ts +101 -0
- package/dist/components/DateInput/DateInput.d.ts.map +1 -0
- package/dist/components/DateInput/index.cjs +32 -0
- package/dist/components/DateInput/index.cjs.map +1 -0
- package/dist/components/DateInput/index.d.ts +2 -0
- package/dist/components/DateInput/index.d.ts.map +1 -0
- package/dist/components/DateInput/index.js +23 -0
- package/dist/components/DateInput/index.js.map +1 -0
- package/dist/components/DateRangeInput/DateRangeInput.d.ts +106 -0
- package/dist/components/DateRangeInput/DateRangeInput.d.ts.map +1 -0
- package/dist/components/DateRangeInput/index.cjs +32 -0
- package/dist/components/DateRangeInput/index.cjs.map +1 -0
- package/dist/components/DateRangeInput/index.d.ts +2 -0
- package/dist/components/DateRangeInput/index.d.ts.map +1 -0
- package/dist/components/DateRangeInput/index.js +23 -0
- package/dist/components/DateRangeInput/index.js.map +1 -0
- package/dist/components/DateTimeInput/DateTimeInput.d.ts +97 -0
- package/dist/components/DateTimeInput/DateTimeInput.d.ts.map +1 -0
- package/dist/components/DateTimeInput/index.cjs +34 -0
- package/dist/components/DateTimeInput/index.cjs.map +1 -0
- package/dist/components/DateTimeInput/index.d.ts +2 -0
- package/dist/components/DateTimeInput/index.d.ts.map +1 -0
- package/dist/components/DateTimeInput/index.js +25 -0
- package/dist/components/DateTimeInput/index.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +86 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.recipe.d.ts +24 -0
- package/dist/components/Dialog/Dialog.recipe.d.ts.map +1 -0
- package/dist/components/Dialog/DialogContext.d.ts +6 -0
- package/dist/components/Dialog/DialogContext.d.ts.map +1 -0
- package/dist/components/Dialog/index.cjs +33 -0
- package/dist/components/Dialog/index.cjs.map +1 -0
- package/dist/components/Dialog/index.d.ts +5 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +8 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/Dialog/useDialog.d.ts +11 -0
- package/dist/components/Dialog/useDialog.d.ts.map +1 -0
- package/dist/components/Divider/Divider.d.ts +50 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.recipe.d.ts +22 -0
- package/dist/components/Divider/Divider.recipe.d.ts.map +1 -0
- package/dist/components/Divider/index.cjs +19 -0
- package/dist/components/Divider/index.cjs.map +1 -0
- package/dist/components/Divider/index.d.ts +3 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/Divider/index.js +6 -0
- package/dist/components/Divider/index.js.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +53 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/index.cjs +203 -0
- package/dist/components/Drawer/index.cjs.map +1 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.js +200 -0
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/Drawer/useDrawer.d.ts +11 -0
- package/dist/components/Drawer/useDrawer.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +70 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuContext.d.ts +8 -0
- package/dist/components/DropdownMenu/DropdownMenuContext.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts +53 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.cjs +41 -0
- package/dist/components/DropdownMenu/index.cjs.map +1 -0
- package/dist/components/DropdownMenu/index.d.ts +4 -0
- package/dist/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.js +20 -0
- package/dist/components/DropdownMenu/index.js.map +1 -0
- package/dist/components/DropdownMenu/menuUtils.d.ts +6 -0
- package/dist/components/DropdownMenu/menuUtils.d.ts.map +1 -0
- package/dist/components/DropdownMenu/types.d.ts +46 -0
- package/dist/components/DropdownMenu/types.d.ts.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +54 -0
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState/EmptyState.recipe.d.ts +13 -0
- package/dist/components/EmptyState/EmptyState.recipe.d.ts.map +1 -0
- package/dist/components/EmptyState/index.cjs +23 -0
- package/dist/components/EmptyState/index.cjs.map +1 -0
- package/dist/components/EmptyState/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts.map +1 -0
- package/dist/components/EmptyState/index.js +10 -0
- package/dist/components/EmptyState/index.js.map +1 -0
- package/dist/components/Field/Field.d.ts +113 -0
- package/dist/components/Field/Field.d.ts.map +1 -0
- package/dist/components/Field/Field.recipe.d.ts +40 -0
- package/dist/components/Field/Field.recipe.d.ts.map +1 -0
- package/dist/components/Field/index.cjs +38 -0
- package/dist/components/Field/index.cjs.map +1 -0
- package/dist/components/Field/index.d.ts +5 -0
- package/dist/components/Field/index.d.ts.map +1 -0
- package/dist/components/Field/index.js +13 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/Field/inputStyles.d.ts +60 -0
- package/dist/components/Field/inputStyles.d.ts.map +1 -0
- package/dist/components/Field/inputUtils.d.ts +6 -0
- package/dist/components/Field/inputUtils.d.ts.map +1 -0
- package/dist/components/Field/types.d.ts +13 -0
- package/dist/components/Field/types.d.ts.map +1 -0
- package/dist/components/FileInput/FileInput.d.ts +125 -0
- package/dist/components/FileInput/FileInput.d.ts.map +1 -0
- package/dist/components/FileInput/index.cjs +25 -0
- package/dist/components/FileInput/index.cjs.map +1 -0
- package/dist/components/FileInput/index.d.ts +2 -0
- package/dist/components/FileInput/index.d.ts.map +1 -0
- package/dist/components/FileInput/index.js +16 -0
- package/dist/components/FileInput/index.js.map +1 -0
- package/dist/components/HoverCard/HoverCard.d.ts +73 -0
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/HoverCard/index.cjs +19 -0
- package/dist/components/HoverCard/index.cjs.map +1 -0
- package/dist/components/HoverCard/index.d.ts +3 -0
- package/dist/components/HoverCard/index.d.ts.map +1 -0
- package/dist/components/HoverCard/index.js +6 -0
- package/dist/components/HoverCard/index.js.map +1 -0
- package/dist/components/HoverCard/useHoverCard.d.ts +26 -0
- package/dist/components/HoverCard/useHoverCard.d.ts.map +1 -0
- package/dist/components/Icon/Icon.d.ts +45 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.recipe.d.ts +81 -0
- package/dist/components/Icon/Icon.recipe.d.ts.map +1 -0
- package/dist/components/Icon/index.cjs +19 -0
- package/dist/components/Icon/index.cjs.map +1 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +6 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +63 -0
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
- package/dist/components/InputGroup/InputGroup.recipe.d.ts +75 -0
- package/dist/components/InputGroup/InputGroup.recipe.d.ts.map +1 -0
- package/dist/components/InputGroup/InputGroupContext.d.ts +11 -0
- package/dist/components/InputGroup/InputGroupContext.d.ts.map +1 -0
- package/dist/components/InputGroup/InputGroupText.d.ts +13 -0
- package/dist/components/InputGroup/InputGroupText.d.ts.map +1 -0
- package/dist/components/InputGroup/index.cjs +35 -0
- package/dist/components/InputGroup/index.cjs.map +1 -0
- package/dist/components/InputGroup/index.d.ts +4 -0
- package/dist/components/InputGroup/index.d.ts.map +1 -0
- package/dist/components/InputGroup/index.js +14 -0
- package/dist/components/InputGroup/index.js.map +1 -0
- package/dist/components/Item/Item.d.ts +129 -0
- package/dist/components/Item/Item.d.ts.map +1 -0
- package/dist/components/Item/index.cjs +22 -0
- package/dist/components/Item/index.cjs.map +1 -0
- package/dist/components/Item/index.d.ts +2 -0
- package/dist/components/Item/index.d.ts.map +1 -0
- package/dist/components/Item/index.js +13 -0
- package/dist/components/Item/index.js.map +1 -0
- package/dist/components/Kbd/Kbd.d.ts +41 -0
- package/dist/components/Kbd/Kbd.d.ts.map +1 -0
- package/dist/components/Kbd/Kbd.recipe.d.ts +25 -0
- package/dist/components/Kbd/Kbd.recipe.d.ts.map +1 -0
- package/dist/components/Kbd/index.cjs +15 -0
- package/dist/components/Kbd/index.cjs.map +1 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.d.ts.map +1 -0
- package/dist/components/Kbd/index.js +6 -0
- package/dist/components/Kbd/index.js.map +1 -0
- package/dist/components/Layout/Layout.d.ts +60 -0
- package/dist/components/Layout/Layout.d.ts.map +1 -0
- package/dist/components/Layout/Layout.recipe.d.ts +88 -0
- package/dist/components/Layout/Layout.recipe.d.ts.map +1 -0
- package/dist/components/Layout/LayoutContent.d.ts +37 -0
- package/dist/components/Layout/LayoutContent.d.ts.map +1 -0
- package/dist/components/Layout/LayoutContext.d.ts +16 -0
- package/dist/components/Layout/LayoutContext.d.ts.map +1 -0
- package/dist/components/Layout/LayoutFooter.d.ts +70 -0
- package/dist/components/Layout/LayoutFooter.d.ts.map +1 -0
- package/dist/components/Layout/LayoutHeader.d.ts +69 -0
- package/dist/components/Layout/LayoutHeader.d.ts.map +1 -0
- package/dist/components/Layout/LayoutPanel.d.ts +37 -0
- package/dist/components/Layout/LayoutPanel.d.ts.map +1 -0
- package/dist/components/Layout/index.cjs +46 -0
- package/dist/components/Layout/index.cjs.map +1 -0
- package/dist/components/Layout/index.d.ts +8 -0
- package/dist/components/Layout/index.d.ts.map +1 -0
- package/dist/components/Layout/index.js +17 -0
- package/dist/components/Layout/index.js.map +1 -0
- package/dist/components/Layout/types.d.ts +5 -0
- package/dist/components/Layout/types.d.ts.map +1 -0
- package/dist/components/Lightbox/Lightbox.d.ts +86 -0
- package/dist/components/Lightbox/Lightbox.d.ts.map +1 -0
- package/dist/components/Lightbox/index.cjs +29 -0
- package/dist/components/Lightbox/index.cjs.map +1 -0
- package/dist/components/Lightbox/index.d.ts +3 -0
- package/dist/components/Lightbox/index.d.ts.map +1 -0
- package/dist/components/Lightbox/index.js +16 -0
- package/dist/components/Lightbox/index.js.map +1 -0
- package/dist/components/Lightbox/useLightbox.d.ts +57 -0
- package/dist/components/Lightbox/useLightbox.d.ts.map +1 -0
- package/dist/components/Link/Link.d.ts +140 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.recipe.d.ts +83 -0
- package/dist/components/Link/Link.recipe.d.ts.map +1 -0
- package/dist/components/Link/LinkContext.d.ts +6 -0
- package/dist/components/Link/LinkContext.d.ts.map +1 -0
- package/dist/components/Link/LinkProvider.d.ts +11 -0
- package/dist/components/Link/LinkProvider.d.ts.map +1 -0
- package/dist/components/Link/index.cjs +32 -0
- package/dist/components/Link/index.cjs.map +1 -0
- package/dist/components/Link/index.d.ts +6 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Link/index.js +11 -0
- package/dist/components/Link/index.js.map +1 -0
- package/dist/components/Link/types.d.ts +30 -0
- package/dist/components/Link/types.d.ts.map +1 -0
- package/dist/components/Link/useLinkComponent.d.ts +3 -0
- package/dist/components/Link/useLinkComponent.d.ts.map +1 -0
- package/dist/components/List/List.d.ts +52 -0
- package/dist/components/List/List.d.ts.map +1 -0
- package/dist/components/List/ListContext.d.ts +7 -0
- package/dist/components/List/ListContext.d.ts.map +1 -0
- package/dist/components/List/ListItem.d.ts +69 -0
- package/dist/components/List/ListItem.d.ts.map +1 -0
- package/dist/components/List/index.cjs +27 -0
- package/dist/components/List/index.cjs.map +1 -0
- package/dist/components/List/index.d.ts +3 -0
- package/dist/components/List/index.d.ts.map +1 -0
- package/dist/components/List/index.js +14 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/MetadataList/MetadataList.d.ts +41 -0
- package/dist/components/MetadataList/MetadataList.d.ts.map +1 -0
- package/dist/components/MetadataList/MetadataListContext.d.ts +6 -0
- package/dist/components/MetadataList/MetadataListContext.d.ts.map +1 -0
- package/dist/components/MetadataList/MetadataListItem.d.ts +43 -0
- package/dist/components/MetadataList/MetadataListItem.d.ts.map +1 -0
- package/dist/components/MetadataList/index.cjs +24 -0
- package/dist/components/MetadataList/index.cjs.map +1 -0
- package/dist/components/MetadataList/index.d.ts +4 -0
- package/dist/components/MetadataList/index.d.ts.map +1 -0
- package/dist/components/MetadataList/index.js +11 -0
- package/dist/components/MetadataList/index.js.map +1 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +175 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/dist/components/MultiSelect/index.cjs +32 -0
- package/dist/components/MultiSelect/index.cjs.map +1 -0
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/MultiSelect/index.d.ts.map +1 -0
- package/dist/components/MultiSelect/index.js +23 -0
- package/dist/components/MultiSelect/index.js.map +1 -0
- package/dist/components/NavIcon/NavIcon.d.ts +32 -0
- package/dist/components/NavIcon/NavIcon.d.ts.map +1 -0
- package/dist/components/NavIcon/index.cjs +42 -0
- package/dist/components/NavIcon/index.cjs.map +1 -0
- package/dist/components/NavIcon/index.d.ts +2 -0
- package/dist/components/NavIcon/index.d.ts.map +1 -0
- package/dist/components/NavIcon/index.js +40 -0
- package/dist/components/NavIcon/index.js.map +1 -0
- package/dist/components/NumberInput/NumberInput.d.ts +157 -0
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/dist/components/NumberInput/index.cjs +26 -0
- package/dist/components/NumberInput/index.cjs.map +1 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.d.ts.map +1 -0
- package/dist/components/NumberInput/index.js +17 -0
- package/dist/components/NumberInput/index.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +83 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/index.cjs +25 -0
- package/dist/components/Pagination/index.cjs.map +1 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Pagination/index.js +16 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +16 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -0
- package/dist/components/PasswordInput/index.cjs +63 -0
- package/dist/components/PasswordInput/index.cjs.map +1 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/PasswordInput/index.d.ts.map +1 -0
- package/dist/components/PasswordInput/index.js +61 -0
- package/dist/components/PasswordInput/index.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +103 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -0
- package/dist/components/Popover/index.cjs +30 -0
- package/dist/components/Popover/index.cjs.map +1 -0
- package/dist/components/Popover/index.d.ts +3 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +17 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Popover/usePopover.d.ts +34 -0
- package/dist/components/Popover/usePopover.d.ts.map +1 -0
- package/dist/components/Progress/Progress.d.ts +77 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -0
- package/dist/components/Progress/Progress.recipe.d.ts +40 -0
- package/dist/components/Progress/Progress.recipe.d.ts.map +1 -0
- package/dist/components/Progress/index.cjs +20 -0
- package/dist/components/Progress/index.cjs.map +1 -0
- package/dist/components/Progress/index.d.ts +3 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Progress/index.js +7 -0
- package/dist/components/Progress/index.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +79 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroupContext.d.ts +13 -0
- package/dist/components/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroupItem.d.ts +52 -0
- package/dist/components/RadioGroup/RadioGroupItem.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.cjs +30 -0
- package/dist/components/RadioGroup/index.cjs.map +1 -0
- package/dist/components/RadioGroup/index.d.ts +4 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.js +17 -0
- package/dist/components/RadioGroup/index.js.map +1 -0
- package/dist/components/Rating/Rating.d.ts +71 -0
- package/dist/components/Rating/Rating.d.ts.map +1 -0
- package/dist/components/Rating/index.cjs +185 -0
- package/dist/components/Rating/index.cjs.map +1 -0
- package/dist/components/Rating/index.d.ts +2 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/Rating/index.js +183 -0
- package/dist/components/Rating/index.js.map +1 -0
- package/dist/components/Schedule/CalendarEvent.d.ts +30 -0
- package/dist/components/Schedule/CalendarEvent.d.ts.map +1 -0
- package/dist/components/Schedule/DayView.d.ts +23 -0
- package/dist/components/Schedule/DayView.d.ts.map +1 -0
- package/dist/components/Schedule/ListView.d.ts +13 -0
- package/dist/components/Schedule/ListView.d.ts.map +1 -0
- package/dist/components/Schedule/MonthlyView.d.ts +13 -0
- package/dist/components/Schedule/MonthlyView.d.ts.map +1 -0
- package/dist/components/Schedule/Schedule.d.ts +60 -0
- package/dist/components/Schedule/Schedule.d.ts.map +1 -0
- package/dist/components/Schedule/TimeGridView.d.ts +26 -0
- package/dist/components/Schedule/TimeGridView.d.ts.map +1 -0
- package/dist/components/Schedule/WeeklyView.d.ts +28 -0
- package/dist/components/Schedule/WeeklyView.d.ts.map +1 -0
- package/dist/components/Schedule/context.d.ts +20 -0
- package/dist/components/Schedule/context.d.ts.map +1 -0
- package/dist/components/Schedule/dateMath.d.ts +14 -0
- package/dist/components/Schedule/dateMath.d.ts.map +1 -0
- package/dist/components/Schedule/index.cjs +72 -0
- package/dist/components/Schedule/index.cjs.map +1 -0
- package/dist/components/Schedule/index.d.ts +13 -0
- package/dist/components/Schedule/index.d.ts.map +1 -0
- package/dist/components/Schedule/index.js +23 -0
- package/dist/components/Schedule/index.js.map +1 -0
- package/dist/components/Schedule/plugins/PaginationPlugin.d.ts +7 -0
- package/dist/components/Schedule/plugins/PaginationPlugin.d.ts.map +1 -0
- package/dist/components/Schedule/plugins/ViewSelectorPlugin.d.ts +11 -0
- package/dist/components/Schedule/plugins/ViewSelectorPlugin.d.ts.map +1 -0
- package/dist/components/Schedule/plugins/index.d.ts +5 -0
- package/dist/components/Schedule/plugins/index.d.ts.map +1 -0
- package/dist/components/Schedule/shared.d.ts +59 -0
- package/dist/components/Schedule/shared.d.ts.map +1 -0
- package/dist/components/Schedule/types.d.ts +44 -0
- package/dist/components/Schedule/types.d.ts.map +1 -0
- package/dist/components/Schedule/useCurrentTime.d.ts +3 -0
- package/dist/components/Schedule/useCurrentTime.d.ts.map +1 -0
- package/dist/components/Schedule/zonedDateTime.d.ts +14 -0
- package/dist/components/Schedule/zonedDateTime.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/SearchFilterInput.d.ts +143 -0
- package/dist/components/SearchFilterInput/SearchFilterInput.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/SearchFilterInputEditPopover.d.ts +43 -0
- package/dist/components/SearchFilterInput/SearchFilterInputEditPopover.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/SearchFilterInputFilterEditor.d.ts +9 -0
- package/dist/components/SearchFilterInput/SearchFilterInputFilterEditor.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/SearchFilterInputTag.d.ts +9 -0
- package/dist/components/SearchFilterInput/SearchFilterInputTag.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/SearchFilterInputValueEditor.d.ts +13 -0
- package/dist/components/SearchFilterInput/SearchFilterInputValueEditor.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/formatFilterValue.d.ts +4 -0
- package/dist/components/SearchFilterInput/formatFilterValue.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/index.cjs +73 -0
- package/dist/components/SearchFilterInput/index.cjs.map +1 -0
- package/dist/components/SearchFilterInput/index.d.ts +9 -0
- package/dist/components/SearchFilterInput/index.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/index.js +36 -0
- package/dist/components/SearchFilterInput/index.js.map +1 -0
- package/dist/components/SearchFilterInput/internalConfig.d.ts +11 -0
- package/dist/components/SearchFilterInput/internalConfig.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/types.d.ts +240 -0
- package/dist/components/SearchFilterInput/types.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/useSearchFilterInputConfig.d.ts +31 -0
- package/dist/components/SearchFilterInput/useSearchFilterInputConfig.d.ts.map +1 -0
- package/dist/components/SearchFilterInput/useSearchFilterInputSource.d.ts +5 -0
- package/dist/components/SearchFilterInput/useSearchFilterInputSource.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +59 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControlContext.d.ts +12 -0
- package/dist/components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControlItem.d.ts +50 -0
- package/dist/components/SegmentedControl/SegmentedControlItem.d.ts.map +1 -0
- package/dist/components/SegmentedControl/index.cjs +22 -0
- package/dist/components/SegmentedControl/index.cjs.map +1 -0
- package/dist/components/SegmentedControl/index.d.ts +4 -0
- package/dist/components/SegmentedControl/index.d.ts.map +1 -0
- package/dist/components/SegmentedControl/index.js +9 -0
- package/dist/components/SegmentedControl/index.js.map +1 -0
- package/dist/components/Select/Select.d.ts +149 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/SelectOption.d.ts +44 -0
- package/dist/components/Select/SelectOption.d.ts.map +1 -0
- package/dist/components/Select/index.cjs +36 -0
- package/dist/components/Select/index.cjs.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +23 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/SideNav/SideNav.d.ts +53 -0
- package/dist/components/SideNav/SideNav.d.ts.map +1 -0
- package/dist/components/SideNav/SideNav.recipe.d.ts +21 -0
- package/dist/components/SideNav/SideNav.recipe.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavContext.d.ts +11 -0
- package/dist/components/SideNav/SideNavContext.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavHeading.d.ts +21 -0
- package/dist/components/SideNav/SideNavHeading.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavItem.d.ts +79 -0
- package/dist/components/SideNav/SideNavItem.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavSection.d.ts +17 -0
- package/dist/components/SideNav/SideNavSection.d.ts.map +1 -0
- package/dist/components/SideNav/index.cjs +51 -0
- package/dist/components/SideNav/index.cjs.map +1 -0
- package/dist/components/SideNav/index.d.ts +7 -0
- package/dist/components/SideNav/index.d.ts.map +1 -0
- package/dist/components/SideNav/index.js +18 -0
- package/dist/components/SideNav/index.js.map +1 -0
- package/dist/components/SideNav/internal/SideNavCollapseButton.d.ts +9 -0
- package/dist/components/SideNav/internal/SideNavCollapseButton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +57 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/index.cjs +14 -0
- package/dist/components/Skeleton/index.cjs.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +5 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +134 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/index.cjs +23 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +14 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +51 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.recipe.d.ts +36 -0
- package/dist/components/Spinner/Spinner.recipe.d.ts.map +1 -0
- package/dist/components/Spinner/index.cjs +23 -0
- package/dist/components/Spinner/index.cjs.map +1 -0
- package/dist/components/Spinner/index.d.ts +3 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/Spinner/index.js +10 -0
- package/dist/components/Spinner/index.js.map +1 -0
- package/dist/components/Stack/HStack.d.ts +14 -0
- package/dist/components/Stack/HStack.d.ts.map +1 -0
- package/dist/components/Stack/Stack.d.ts +69 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/Stack.recipe.d.ts +59 -0
- package/dist/components/Stack/Stack.recipe.d.ts.map +1 -0
- package/dist/components/Stack/VStack.d.ts +14 -0
- package/dist/components/Stack/VStack.d.ts.map +1 -0
- package/dist/components/Stack/index.cjs +24 -0
- package/dist/components/Stack/index.cjs.map +1 -0
- package/dist/components/Stack/index.d.ts +5 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/Stack/index.js +7 -0
- package/dist/components/Stack/index.js.map +1 -0
- package/dist/components/Stepper/Step.d.ts +62 -0
- package/dist/components/Stepper/Step.d.ts.map +1 -0
- package/dist/components/Stepper/Step.recipe.d.ts +95 -0
- package/dist/components/Stepper/Step.recipe.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +51 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Stepper/StepperContext.d.ts +10 -0
- package/dist/components/Stepper/StepperContext.d.ts.map +1 -0
- package/dist/components/Stepper/index.cjs +28 -0
- package/dist/components/Stepper/index.cjs.map +1 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Stepper/index.js +11 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +92 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/index.cjs +23 -0
- package/dist/components/Switch/index.cjs.map +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +14 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Table/BaseTable.d.ts +6 -0
- package/dist/components/Table/BaseTable.d.ts.map +1 -0
- package/dist/components/Table/Table.d.ts +42 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/TableBody.d.ts +31 -0
- package/dist/components/Table/TableBody.d.ts.map +1 -0
- package/dist/components/Table/TableCell.d.ts +47 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -0
- package/dist/components/Table/TableContext.d.ts +4 -0
- package/dist/components/Table/TableContext.d.ts.map +1 -0
- package/dist/components/Table/TableFooter.d.ts +31 -0
- package/dist/components/Table/TableFooter.d.ts.map +1 -0
- package/dist/components/Table/TableHeader.d.ts +31 -0
- package/dist/components/Table/TableHeader.d.ts.map +1 -0
- package/dist/components/Table/TableHeaderCell.d.ts +36 -0
- package/dist/components/Table/TableHeaderCell.d.ts.map +1 -0
- package/dist/components/Table/TableRow.d.ts +31 -0
- package/dist/components/Table/TableRow.d.ts.map +1 -0
- package/dist/components/Table/columnUtils.d.ts +19 -0
- package/dist/components/Table/columnUtils.d.ts.map +1 -0
- package/dist/components/Table/index.cjs +156 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.ts +18 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +39 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Table/plugins/columnResize/index.d.ts +2 -0
- package/dist/components/Table/plugins/columnResize/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/columnResize/useTableColumnResize.d.ts +10 -0
- package/dist/components/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -0
- package/dist/components/Table/plugins/columnSettings/index.d.ts +3 -0
- package/dist/components/Table/plugins/columnSettings/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/columnSettings/useTableColumnSettings.d.ts +11 -0
- package/dist/components/Table/plugins/columnSettings/useTableColumnSettings.d.ts.map +1 -0
- package/dist/components/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts +19 -0
- package/dist/components/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts.map +1 -0
- package/dist/components/Table/plugins/filtering/index.d.ts +3 -0
- package/dist/components/Table/plugins/filtering/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/filtering/useTableFilterState.d.ts +8 -0
- package/dist/components/Table/plugins/filtering/useTableFilterState.d.ts.map +1 -0
- package/dist/components/Table/plugins/filtering/useTableFiltering.d.ts +22 -0
- package/dist/components/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -0
- package/dist/components/Table/plugins/pagination/index.d.ts +3 -0
- package/dist/components/Table/plugins/pagination/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/pagination/paginateData.d.ts +6 -0
- package/dist/components/Table/plugins/pagination/paginateData.d.ts.map +1 -0
- package/dist/components/Table/plugins/pagination/useTablePagination.d.ts +16 -0
- package/dist/components/Table/plugins/pagination/useTablePagination.d.ts.map +1 -0
- package/dist/components/Table/plugins/selection/index.d.ts +3 -0
- package/dist/components/Table/plugins/selection/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/selection/useTableSelection.d.ts +17 -0
- package/dist/components/Table/plugins/selection/useTableSelection.d.ts.map +1 -0
- package/dist/components/Table/plugins/selection/useTableSelectionState.d.ts +14 -0
- package/dist/components/Table/plugins/selection/useTableSelectionState.d.ts.map +1 -0
- package/dist/components/Table/plugins/sortable/index.d.ts +3 -0
- package/dist/components/Table/plugins/sortable/index.d.ts.map +1 -0
- package/dist/components/Table/plugins/sortable/useTableSortable.d.ts +15 -0
- package/dist/components/Table/plugins/sortable/useTableSortable.d.ts.map +1 -0
- package/dist/components/Table/plugins/sortable/useTableSortableState.d.ts +19 -0
- package/dist/components/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -0
- package/dist/components/Table/types.d.ts +107 -0
- package/dist/components/Table/types.d.ts.map +1 -0
- package/dist/components/Table/useBaseTablePlugins.d.ts +3 -0
- package/dist/components/Table/useBaseTablePlugins.d.ts.map +1 -0
- package/dist/components/Tabs/Tab.d.ts +74 -0
- package/dist/components/Tabs/Tab.d.ts.map +1 -0
- package/dist/components/Tabs/TabMenu.d.ts +59 -0
- package/dist/components/Tabs/TabMenu.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +60 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/TabsContext.d.ts +11 -0
- package/dist/components/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/components/Tabs/index.cjs +43 -0
- package/dist/components/Tabs/index.cjs.map +1 -0
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +18 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +86 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -0
- package/dist/components/Tag/Tag.recipe.d.ts +121 -0
- package/dist/components/Tag/Tag.recipe.d.ts.map +1 -0
- package/dist/components/Tag/index.cjs +25 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.d.ts +3 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.js +12 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/TagsInput/TagsInput.d.ts +190 -0
- package/dist/components/TagsInput/TagsInput.d.ts.map +1 -0
- package/dist/components/TagsInput/index.cjs +32 -0
- package/dist/components/TagsInput/index.cjs.map +1 -0
- package/dist/components/TagsInput/index.d.ts +2 -0
- package/dist/components/TagsInput/index.d.ts.map +1 -0
- package/dist/components/TagsInput/index.js +23 -0
- package/dist/components/TagsInput/index.js.map +1 -0
- package/dist/components/Text/Heading.d.ts +78 -0
- package/dist/components/Text/Heading.d.ts.map +1 -0
- package/dist/components/Text/Text.d.ts +98 -0
- package/dist/components/Text/Text.d.ts.map +1 -0
- package/dist/components/Text/Text.recipe.d.ts +283 -0
- package/dist/components/Text/Text.recipe.d.ts.map +1 -0
- package/dist/components/Text/Text.utils.d.ts +2 -0
- package/dist/components/Text/Text.utils.d.ts.map +1 -0
- package/dist/components/Text/index.cjs +29 -0
- package/dist/components/Text/index.cjs.map +1 -0
- package/dist/components/Text/index.d.ts +4 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/Text/index.js +8 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Text/useTruncation.d.ts +12 -0
- package/dist/components/Text/useTruncation.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.d.ts +120 -0
- package/dist/components/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/TextArea/index.cjs +25 -0
- package/dist/components/TextArea/index.cjs.map +1 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.d.ts.map +1 -0
- package/dist/components/TextArea/index.js +16 -0
- package/dist/components/TextArea/index.js.map +1 -0
- package/dist/components/TextInput/TextInput.d.ts +122 -0
- package/dist/components/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput/index.cjs +26 -0
- package/dist/components/TextInput/index.cjs.map +1 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/index.d.ts.map +1 -0
- package/dist/components/TextInput/index.js +17 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/Theme/Theme.d.ts +216 -0
- package/dist/components/Theme/Theme.d.ts.map +1 -0
- package/dist/components/Theme/index.cjs +13 -0
- package/dist/components/Theme/index.cjs.map +1 -0
- package/dist/components/Theme/index.d.ts +2 -0
- package/dist/components/Theme/index.d.ts.map +1 -0
- package/dist/components/Theme/index.js +4 -0
- package/dist/components/Theme/index.js.map +1 -0
- package/dist/components/Thumbnail/Thumbnail.d.ts +59 -0
- package/dist/components/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/dist/components/Thumbnail/index.cjs +26 -0
- package/dist/components/Thumbnail/index.cjs.map +1 -0
- package/dist/components/Thumbnail/index.d.ts +2 -0
- package/dist/components/Thumbnail/index.d.ts.map +1 -0
- package/dist/components/Thumbnail/index.js +17 -0
- package/dist/components/Thumbnail/index.js.map +1 -0
- package/dist/components/TimeInput/TimeInput.d.ts +115 -0
- package/dist/components/TimeInput/TimeInput.d.ts.map +1 -0
- package/dist/components/TimeInput/index.cjs +25 -0
- package/dist/components/TimeInput/index.cjs.map +1 -0
- package/dist/components/TimeInput/index.d.ts +2 -0
- package/dist/components/TimeInput/index.d.ts.map +1 -0
- package/dist/components/TimeInput/index.js +16 -0
- package/dist/components/TimeInput/index.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +57 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/ToastContext.d.ts +8 -0
- package/dist/components/Toast/ToastContext.d.ts.map +1 -0
- package/dist/components/Toast/ToastViewport.d.ts +70 -0
- package/dist/components/Toast/ToastViewport.d.ts.map +1 -0
- package/dist/components/Toast/index.cjs +34 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +17 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toast/types.d.ts +50 -0
- package/dist/components/Toast/types.d.ts.map +1 -0
- package/dist/components/Toast/useToast.d.ts +8 -0
- package/dist/components/Toast/useToast.d.ts.map +1 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +81 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +90 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts.map +1 -0
- package/dist/components/ToggleButton/index.cjs +29 -0
- package/dist/components/ToggleButton/index.cjs.map +1 -0
- package/dist/components/ToggleButton/index.d.ts +3 -0
- package/dist/components/ToggleButton/index.d.ts.map +1 -0
- package/dist/components/ToggleButton/index.js +16 -0
- package/dist/components/ToggleButton/index.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +80 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/index.cjs +19 -0
- package/dist/components/Tooltip/index.cjs.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +6 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Tooltip/useTooltip.d.ts +49 -0
- package/dist/components/Tooltip/useTooltip.d.ts.map +1 -0
- package/dist/components/TopNav/TopNav.d.ts +54 -0
- package/dist/components/TopNav/TopNav.d.ts.map +1 -0
- package/dist/components/TopNav/TopNav.recipe.d.ts +17 -0
- package/dist/components/TopNav/TopNav.recipe.d.ts.map +1 -0
- package/dist/components/TopNav/TopNavContext.d.ts +9 -0
- package/dist/components/TopNav/TopNavContext.d.ts.map +1 -0
- package/dist/components/TopNav/TopNavHeading.d.ts +26 -0
- package/dist/components/TopNav/TopNavHeading.d.ts.map +1 -0
- package/dist/components/TopNav/TopNavItem.d.ts +77 -0
- package/dist/components/TopNav/TopNavItem.d.ts.map +1 -0
- package/dist/components/TopNav/TopNavItem.recipe.d.ts +35 -0
- package/dist/components/TopNav/TopNavItem.recipe.d.ts.map +1 -0
- package/dist/components/TopNav/index.cjs +51 -0
- package/dist/components/TopNav/index.cjs.map +1 -0
- package/dist/components/TopNav/index.d.ts +6 -0
- package/dist/components/TopNav/index.d.ts.map +1 -0
- package/dist/components/TopNav/index.js +18 -0
- package/dist/components/TopNav/index.js.map +1 -0
- package/dist/components/TreeView/TreeView.d.ts +42 -0
- package/dist/components/TreeView/TreeView.d.ts.map +1 -0
- package/dist/components/TreeView/TreeViewBranches.d.ts +19 -0
- package/dist/components/TreeView/TreeViewBranches.d.ts.map +1 -0
- package/dist/components/TreeView/TreeViewItem.d.ts +111 -0
- package/dist/components/TreeView/TreeViewItem.d.ts.map +1 -0
- package/dist/components/TreeView/index.cjs +16 -0
- package/dist/components/TreeView/index.cjs.map +1 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/TreeView/index.d.ts.map +1 -0
- package/dist/components/TreeView/index.js +7 -0
- package/dist/components/TreeView/index.js.map +1 -0
- package/dist/components/TreeView/types.d.ts +61 -0
- package/dist/components/TreeView/types.d.ts.map +1 -0
- package/dist/index.cjs +867 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/HoverLayerTrigger.d.ts +17 -0
- package/dist/internal/HoverLayerTrigger.d.ts.map +1 -0
- package/dist/internal/MobileNav/MobileNav.d.ts +58 -0
- package/dist/internal/MobileNav/MobileNav.d.ts.map +1 -0
- package/dist/internal/MobileNav/MobileNav.recipe.d.ts +11 -0
- package/dist/internal/MobileNav/MobileNav.recipe.d.ts.map +1 -0
- package/dist/internal/MobileNav/MobileNavToggle.d.ts +37 -0
- package/dist/internal/MobileNav/MobileNavToggle.d.ts.map +1 -0
- package/dist/internal/MobileNav/index.d.ts +3 -0
- package/dist/internal/MobileNav/index.d.ts.map +1 -0
- package/dist/internal/OverflowList.d.ts +18 -0
- package/dist/internal/OverflowList.d.ts.map +1 -0
- package/dist/internal/VisuallyHidden.d.ts +10 -0
- package/dist/internal/VisuallyHidden.d.ts.map +1 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/cx.d.ts.map +1 -0
- package/dist/internal/dateTypes.d.ts +8 -0
- package/dist/internal/dateTypes.d.ts.map +1 -0
- package/dist/internal/formatFileSize.d.ts +2 -0
- package/dist/internal/formatFileSize.d.ts.map +1 -0
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/linkAccessibility.d.ts +7 -0
- package/dist/internal/linkAccessibility.d.ts.map +1 -0
- package/dist/internal/mergeRefs.d.ts +3 -0
- package/dist/internal/mergeRefs.d.ts.map +1 -0
- package/dist/internal/parseDateInput.d.ts +8 -0
- package/dist/internal/parseDateInput.d.ts.map +1 -0
- package/dist/internal/plainDate.d.ts +22 -0
- package/dist/internal/plainDate.d.ts.map +1 -0
- package/dist/internal/sharedResizeObserver.d.ts +5 -0
- package/dist/internal/sharedResizeObserver.d.ts.map +1 -0
- package/dist/internal/time.d.ts +4 -0
- package/dist/internal/time.d.ts.map +1 -0
- package/dist/internal/toPixelSize.d.ts +3 -0
- package/dist/internal/toPixelSize.d.ts.map +1 -0
- package/dist/internal/useFocusTrap.d.ts +10 -0
- package/dist/internal/useFocusTrap.d.ts.map +1 -0
- package/dist/internal/useGridFocus.d.ts +17 -0
- package/dist/internal/useGridFocus.d.ts.map +1 -0
- package/dist/internal/useHoverLayer.d.ts +30 -0
- package/dist/internal/useHoverLayer.d.ts.map +1 -0
- package/dist/internal/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/internal/useLayer.d.ts +27 -0
- package/dist/internal/useLayer.d.ts.map +1 -0
- package/dist/internal/useListboxNavigation.d.ts +24 -0
- package/dist/internal/useListboxNavigation.d.ts.map +1 -0
- package/dist/internal/useMediaQuery.d.ts +5 -0
- package/dist/internal/useMediaQuery.d.ts.map +1 -0
- package/dist/internal/useSelectListbox.d.ts +63 -0
- package/dist/internal/useSelectListbox.d.ts.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/theme/generate-color-scale.d.ts +6 -0
- package/dist/theme/generate-color-scale.d.ts.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,2505 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkWE3ECIRS_cjs = require('./chunk-WE3ECIRS.cjs');
|
|
4
|
+
var chunk6NIFOTUZ_cjs = require('./chunk-6NIFOTUZ.cjs');
|
|
5
|
+
var chunkLFZXGIR6_cjs = require('./chunk-LFZXGIR6.cjs');
|
|
6
|
+
var chunkWIIDQ44X_cjs = require('./chunk-WIIDQ44X.cjs');
|
|
7
|
+
var chunk32XQJNKY_cjs = require('./chunk-32XQJNKY.cjs');
|
|
8
|
+
var chunkRJXHAQCR_cjs = require('./chunk-RJXHAQCR.cjs');
|
|
9
|
+
var chunk2PHHFBJ3_cjs = require('./chunk-2PHHFBJ3.cjs');
|
|
10
|
+
var chunk5EQN3YMQ_cjs = require('./chunk-5EQN3YMQ.cjs');
|
|
11
|
+
var chunkEETTQWW5_cjs = require('./chunk-EETTQWW5.cjs');
|
|
12
|
+
var chunkTPSOUQG7_cjs = require('./chunk-TPSOUQG7.cjs');
|
|
13
|
+
var chunkCK3UJQRI_cjs = require('./chunk-CK3UJQRI.cjs');
|
|
14
|
+
var chunkPDXZDPOY_cjs = require('./chunk-PDXZDPOY.cjs');
|
|
15
|
+
var chunkWSAZHUB3_cjs = require('./chunk-WSAZHUB3.cjs');
|
|
16
|
+
var chunkR37R7DEV_cjs = require('./chunk-R37R7DEV.cjs');
|
|
17
|
+
var chunkNILB6Y4Z_cjs = require('./chunk-NILB6Y4Z.cjs');
|
|
18
|
+
var chunk47BELFYO_cjs = require('./chunk-47BELFYO.cjs');
|
|
19
|
+
var chunk6SHL7FYO_cjs = require('./chunk-6SHL7FYO.cjs');
|
|
20
|
+
var chunkPHFEQG4E_cjs = require('./chunk-PHFEQG4E.cjs');
|
|
21
|
+
var chunkSPDVNY2Z_cjs = require('./chunk-SPDVNY2Z.cjs');
|
|
22
|
+
var chunkAZDWQGAX_cjs = require('./chunk-AZDWQGAX.cjs');
|
|
23
|
+
var react = require('react');
|
|
24
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
25
|
+
var polyfill = require('@js-temporal/polyfill');
|
|
26
|
+
var lucideReact = require('lucide-react');
|
|
27
|
+
|
|
28
|
+
function TableBody({
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
"data-testid": dataTestId,
|
|
32
|
+
ref,
|
|
33
|
+
style
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
+
"tbody",
|
|
37
|
+
{
|
|
38
|
+
className,
|
|
39
|
+
"data-testid": dataTestId,
|
|
40
|
+
ref,
|
|
41
|
+
style,
|
|
42
|
+
children
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
TableBody.displayName = "TableBody";
|
|
47
|
+
var TableContext = react.createContext(null);
|
|
48
|
+
TableContext.displayName = "TableContext";
|
|
49
|
+
function useTableContext() {
|
|
50
|
+
return react.use(TableContext);
|
|
51
|
+
}
|
|
52
|
+
var styles = {
|
|
53
|
+
base: chunkAZDWQGAX_cjs.css({
|
|
54
|
+
boxSizing: "border-box",
|
|
55
|
+
maxWidth: 0
|
|
56
|
+
}),
|
|
57
|
+
density: {
|
|
58
|
+
balanced: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "3", py: "2" }),
|
|
59
|
+
compact: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "2", py: "1" }),
|
|
60
|
+
spacious: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "4", py: "3" })
|
|
61
|
+
},
|
|
62
|
+
dividerColumns: chunkAZDWQGAX_cjs.css({
|
|
63
|
+
borderInlineEndWidth: "default",
|
|
64
|
+
borderInlineEndStyle: "solid",
|
|
65
|
+
borderInlineEndColor: "border",
|
|
66
|
+
_last: {
|
|
67
|
+
borderInlineEndWidth: 0
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
dividerRows: chunkAZDWQGAX_cjs.css({
|
|
71
|
+
borderBottomWidth: "default",
|
|
72
|
+
borderBottomStyle: "solid",
|
|
73
|
+
borderBottomColor: "border",
|
|
74
|
+
"tbody > tr:last-child > &": {
|
|
75
|
+
borderBottomWidth: 0
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
truncate: chunkAZDWQGAX_cjs.css({
|
|
79
|
+
overflow: "hidden",
|
|
80
|
+
textOverflow: "ellipsis",
|
|
81
|
+
whiteSpace: "nowrap"
|
|
82
|
+
}),
|
|
83
|
+
verticalAlign: {
|
|
84
|
+
bottom: chunkAZDWQGAX_cjs.css({ verticalAlign: "bottom" }),
|
|
85
|
+
middle: chunkAZDWQGAX_cjs.css({ verticalAlign: "middle" }),
|
|
86
|
+
top: chunkAZDWQGAX_cjs.css({ verticalAlign: "top" })
|
|
87
|
+
},
|
|
88
|
+
wrap: chunkAZDWQGAX_cjs.css({
|
|
89
|
+
overflow: "hidden",
|
|
90
|
+
overflowWrap: "break-word",
|
|
91
|
+
whiteSpace: "normal",
|
|
92
|
+
wordBreak: "break-word"
|
|
93
|
+
})
|
|
94
|
+
};
|
|
95
|
+
function TableCell({
|
|
96
|
+
children,
|
|
97
|
+
className,
|
|
98
|
+
colSpan,
|
|
99
|
+
"data-testid": dataTestId,
|
|
100
|
+
headers,
|
|
101
|
+
ref,
|
|
102
|
+
rowSpan,
|
|
103
|
+
style
|
|
104
|
+
}) {
|
|
105
|
+
const context = useTableContext();
|
|
106
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
"td",
|
|
108
|
+
{
|
|
109
|
+
className: chunkSPDVNY2Z_cjs.cx(
|
|
110
|
+
"silver-table-cell",
|
|
111
|
+
styles.base,
|
|
112
|
+
context == null ? void 0 : styles.density[context.density],
|
|
113
|
+
context == null ? void 0 : styles.verticalAlign[context.verticalAlign],
|
|
114
|
+
context?.textOverflow === "truncate" ? styles.truncate : styles.wrap,
|
|
115
|
+
context?.dividers === "rows" || context?.dividers === "grid" ? styles.dividerRows : void 0,
|
|
116
|
+
context?.dividers === "columns" || context?.dividers === "grid" ? styles.dividerColumns : void 0,
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
colSpan,
|
|
120
|
+
"data-testid": dataTestId,
|
|
121
|
+
headers,
|
|
122
|
+
ref,
|
|
123
|
+
rowSpan,
|
|
124
|
+
style,
|
|
125
|
+
children
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
TableCell.displayName = "TableCell";
|
|
130
|
+
function TableHeader({
|
|
131
|
+
children,
|
|
132
|
+
className,
|
|
133
|
+
"data-testid": dataTestId,
|
|
134
|
+
ref,
|
|
135
|
+
style
|
|
136
|
+
}) {
|
|
137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
+
"thead",
|
|
139
|
+
{
|
|
140
|
+
className,
|
|
141
|
+
"data-testid": dataTestId,
|
|
142
|
+
ref,
|
|
143
|
+
style,
|
|
144
|
+
children
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
TableHeader.displayName = "TableHeader";
|
|
149
|
+
var styles2 = {
|
|
150
|
+
base: chunkAZDWQGAX_cjs.css({
|
|
151
|
+
boxSizing: "border-box",
|
|
152
|
+
color: "fg.muted",
|
|
153
|
+
fontWeight: "semibold",
|
|
154
|
+
maxWidth: 0,
|
|
155
|
+
overflow: "hidden",
|
|
156
|
+
textAlign: "start",
|
|
157
|
+
textOverflow: "ellipsis",
|
|
158
|
+
whiteSpace: "nowrap"
|
|
159
|
+
}),
|
|
160
|
+
density: {
|
|
161
|
+
balanced: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "3", py: "2" }),
|
|
162
|
+
compact: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "2", py: "1" }),
|
|
163
|
+
spacious: chunkAZDWQGAX_cjs.css({ fontSize: "md", px: "4", py: "3" })
|
|
164
|
+
},
|
|
165
|
+
dividerBottom: chunkAZDWQGAX_cjs.css({
|
|
166
|
+
borderBottomWidth: "default",
|
|
167
|
+
borderBottomStyle: "solid",
|
|
168
|
+
borderBottomColor: "border"
|
|
169
|
+
}),
|
|
170
|
+
dividerColumns: chunkAZDWQGAX_cjs.css({
|
|
171
|
+
borderInlineEndWidth: "default",
|
|
172
|
+
borderInlineEndStyle: "solid",
|
|
173
|
+
borderInlineEndColor: "border",
|
|
174
|
+
_last: {
|
|
175
|
+
borderInlineEndWidth: 0
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
};
|
|
179
|
+
function TableHeaderCell({
|
|
180
|
+
children,
|
|
181
|
+
className,
|
|
182
|
+
"data-testid": dataTestId,
|
|
183
|
+
ref,
|
|
184
|
+
scope = "col",
|
|
185
|
+
style
|
|
186
|
+
}) {
|
|
187
|
+
const context = useTableContext();
|
|
188
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
189
|
+
"th",
|
|
190
|
+
{
|
|
191
|
+
className: chunkSPDVNY2Z_cjs.cx(
|
|
192
|
+
"silver-table-header-cell",
|
|
193
|
+
styles2.base,
|
|
194
|
+
styles2.dividerBottom,
|
|
195
|
+
context == null ? void 0 : styles2.density[context.density],
|
|
196
|
+
context?.dividers === "columns" || context?.dividers === "grid" ? styles2.dividerColumns : void 0,
|
|
197
|
+
className
|
|
198
|
+
),
|
|
199
|
+
"data-testid": dataTestId,
|
|
200
|
+
ref,
|
|
201
|
+
scope,
|
|
202
|
+
style,
|
|
203
|
+
children
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
TableHeaderCell.displayName = "TableHeaderCell";
|
|
208
|
+
var styles3 = {
|
|
209
|
+
base: chunkAZDWQGAX_cjs.css({
|
|
210
|
+
transitionDuration: "fast",
|
|
211
|
+
transitionProperty: "background-color",
|
|
212
|
+
transitionTimingFunction: "default"
|
|
213
|
+
}),
|
|
214
|
+
hover: chunkAZDWQGAX_cjs.css({
|
|
215
|
+
_hover: {
|
|
216
|
+
"@media (hover: hover)": {
|
|
217
|
+
bg: "bg.subtle"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
striped: chunkAZDWQGAX_cjs.css({
|
|
222
|
+
_even: {
|
|
223
|
+
bg: "bg.subtle"
|
|
224
|
+
}
|
|
225
|
+
}),
|
|
226
|
+
stripedHover: chunkAZDWQGAX_cjs.css({
|
|
227
|
+
_even: {
|
|
228
|
+
bg: "bg.subtle"
|
|
229
|
+
},
|
|
230
|
+
_hover: {
|
|
231
|
+
"@media (hover: hover)": {
|
|
232
|
+
bg: "bg.hover"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
};
|
|
237
|
+
function TableRow({
|
|
238
|
+
children,
|
|
239
|
+
className,
|
|
240
|
+
"data-testid": dataTestId,
|
|
241
|
+
ref,
|
|
242
|
+
style
|
|
243
|
+
}) {
|
|
244
|
+
const context = useTableContext();
|
|
245
|
+
const rowClassName = context == null ? void 0 : context.isStriped && context.hasHover ? styles3.stripedHover : context.isStriped ? styles3.striped : context.hasHover ? styles3.hover : void 0;
|
|
246
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
+
"tr",
|
|
248
|
+
{
|
|
249
|
+
className: chunkSPDVNY2Z_cjs.cx("silver-table-row", styles3.base, rowClassName, className),
|
|
250
|
+
"data-testid": dataTestId,
|
|
251
|
+
ref,
|
|
252
|
+
style,
|
|
253
|
+
children
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
TableRow.displayName = "TableRow";
|
|
258
|
+
var DEFAULT_MIN_COLUMN_WIDTH = 120;
|
|
259
|
+
function proportional(value = 1, options) {
|
|
260
|
+
return {
|
|
261
|
+
minWidth: options?.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH,
|
|
262
|
+
type: "proportional",
|
|
263
|
+
value
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function pixel(value) {
|
|
267
|
+
return { type: "pixel", value };
|
|
268
|
+
}
|
|
269
|
+
function resolveColumnWidths(columns) {
|
|
270
|
+
let totalProportion = 0;
|
|
271
|
+
let pixelTotal = 0;
|
|
272
|
+
const proportionalColumns = [];
|
|
273
|
+
for (const column of columns) {
|
|
274
|
+
const width = column.width;
|
|
275
|
+
if (width?.type === "pixel") {
|
|
276
|
+
pixelTotal += width.value;
|
|
277
|
+
} else {
|
|
278
|
+
const proportion = width?.value ?? 1;
|
|
279
|
+
const minWidth = width == null ? 0 : width.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH;
|
|
280
|
+
totalProportion += proportion;
|
|
281
|
+
proportionalColumns.push({ key: column.key, minWidth, proportion });
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
let proportionalMinSpace = 0;
|
|
285
|
+
if (totalProportion > 0) {
|
|
286
|
+
for (const column of proportionalColumns) {
|
|
287
|
+
proportionalMinSpace = Math.max(
|
|
288
|
+
proportionalMinSpace,
|
|
289
|
+
column.minWidth * totalProportion / column.proportion
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
294
|
+
for (const column of columns) {
|
|
295
|
+
const width = column.width;
|
|
296
|
+
const style = {};
|
|
297
|
+
if (width?.type === "pixel") {
|
|
298
|
+
style.minWidth = `${width.value}px`;
|
|
299
|
+
style.width = `${width.value}px`;
|
|
300
|
+
} else {
|
|
301
|
+
const proportion = width?.value ?? 1;
|
|
302
|
+
if (totalProportion > 0) {
|
|
303
|
+
style.width = `${proportion / totalProportion * 100}%`;
|
|
304
|
+
}
|
|
305
|
+
if (width != null) {
|
|
306
|
+
style.minWidth = `${width.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH}px`;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
resolved.set(column.key, { style });
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
columns: resolved,
|
|
313
|
+
tableMinWidth: pixelTotal + proportionalMinSpace
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function capitalize(value) {
|
|
317
|
+
return value.length === 0 ? value : value.charAt(0).toUpperCase() + value.slice(1);
|
|
318
|
+
}
|
|
319
|
+
function defaultCellRenderer(item, key) {
|
|
320
|
+
const value = item[key];
|
|
321
|
+
if (value == null) {
|
|
322
|
+
return "";
|
|
323
|
+
}
|
|
324
|
+
if (value instanceof polyfill.Temporal.Instant || value instanceof polyfill.Temporal.PlainDate || value instanceof polyfill.Temporal.PlainDateTime || value instanceof polyfill.Temporal.PlainTime || value instanceof polyfill.Temporal.ZonedDateTime) {
|
|
325
|
+
return value.toString();
|
|
326
|
+
}
|
|
327
|
+
if (typeof value === "bigint" || typeof value === "boolean" || typeof value === "number" || typeof value === "string") {
|
|
328
|
+
return String(value);
|
|
329
|
+
}
|
|
330
|
+
return "";
|
|
331
|
+
}
|
|
332
|
+
function estimateContentLength(value) {
|
|
333
|
+
if (value == null) {
|
|
334
|
+
return 0;
|
|
335
|
+
}
|
|
336
|
+
if (typeof value === "boolean" || typeof value === "number" || typeof value === "string") {
|
|
337
|
+
return String(value).length;
|
|
338
|
+
}
|
|
339
|
+
return 0;
|
|
340
|
+
}
|
|
341
|
+
function longestWord(value) {
|
|
342
|
+
if (value == null || typeof value !== "boolean" && typeof value !== "number" && typeof value !== "string") {
|
|
343
|
+
return 0;
|
|
344
|
+
}
|
|
345
|
+
return String(value).split(/\s+/).reduce((max, word) => Math.max(max, word.length), 0);
|
|
346
|
+
}
|
|
347
|
+
function generateColumns(data) {
|
|
348
|
+
if (data.length === 0) {
|
|
349
|
+
return [];
|
|
350
|
+
}
|
|
351
|
+
const sampleRows = data.slice(0, Math.min(5, data.length));
|
|
352
|
+
return Object.keys(data[0]).map((key) => {
|
|
353
|
+
const header = capitalize(key);
|
|
354
|
+
let maxContentLength = header.length;
|
|
355
|
+
let maxWordLength = header.length;
|
|
356
|
+
for (const row of sampleRows) {
|
|
357
|
+
maxContentLength = Math.max(
|
|
358
|
+
maxContentLength,
|
|
359
|
+
estimateContentLength(row[key])
|
|
360
|
+
);
|
|
361
|
+
maxWordLength = Math.max(maxWordLength, longestWord(row[key]));
|
|
362
|
+
}
|
|
363
|
+
const proportion = maxContentLength <= 6 ? 1 : maxContentLength <= 15 ? 2 : 3;
|
|
364
|
+
const minWidth = Math.max(Math.max(header.length, maxWordLength) * 8, 60);
|
|
365
|
+
return {
|
|
366
|
+
header,
|
|
367
|
+
key,
|
|
368
|
+
width: proportional(proportion, { minWidth })
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
var styles4 = {
|
|
373
|
+
headerLabelRow: chunkAZDWQGAX_cjs.css({
|
|
374
|
+
display: "inline-flex",
|
|
375
|
+
alignItems: "center",
|
|
376
|
+
gap: "1",
|
|
377
|
+
minW: 0
|
|
378
|
+
}),
|
|
379
|
+
table: chunkAZDWQGAX_cjs.css({
|
|
380
|
+
w: "full",
|
|
381
|
+
borderCollapse: "collapse",
|
|
382
|
+
borderSpacing: 0,
|
|
383
|
+
tableLayout: "fixed"
|
|
384
|
+
}),
|
|
385
|
+
tableAutoLayout: chunkAZDWQGAX_cjs.css({
|
|
386
|
+
tableLayout: "auto"
|
|
387
|
+
})
|
|
388
|
+
};
|
|
389
|
+
var EMPTY_PLUGINS = [];
|
|
390
|
+
function areArraysShallowEqual(previous, next) {
|
|
391
|
+
if (previous === next) {
|
|
392
|
+
return true;
|
|
393
|
+
}
|
|
394
|
+
if (previous.length !== next.length) {
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
for (let index = 0; index < previous.length; index++) {
|
|
398
|
+
if (previous[index] !== next[index]) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
function applyPlugins(plugins, getter, initial, ...args) {
|
|
405
|
+
return plugins.reduce((accumulator, plugin, index) => {
|
|
406
|
+
const transform = getter(plugin);
|
|
407
|
+
if (transform == null) {
|
|
408
|
+
return accumulator;
|
|
409
|
+
}
|
|
410
|
+
try {
|
|
411
|
+
return transform(accumulator, ...args);
|
|
412
|
+
} catch (error) {
|
|
413
|
+
console.error(`[Table] Plugin at index ${index} threw:`, error);
|
|
414
|
+
return accumulator;
|
|
415
|
+
}
|
|
416
|
+
}, initial);
|
|
417
|
+
}
|
|
418
|
+
function DataRowInner({
|
|
419
|
+
CellComponent,
|
|
420
|
+
RowComponent,
|
|
421
|
+
columns,
|
|
422
|
+
item,
|
|
423
|
+
plugins,
|
|
424
|
+
rowIndex,
|
|
425
|
+
rowKey,
|
|
426
|
+
textOverflow
|
|
427
|
+
}) {
|
|
428
|
+
const cells = columns.map((column) => {
|
|
429
|
+
const initialHtmlProps = {};
|
|
430
|
+
if (column.align) {
|
|
431
|
+
initialHtmlProps.style = { textAlign: column.align };
|
|
432
|
+
}
|
|
433
|
+
const cellProps = applyPlugins(
|
|
434
|
+
plugins,
|
|
435
|
+
(plugin) => plugin.transformBodyCell,
|
|
436
|
+
{ htmlProps: initialHtmlProps },
|
|
437
|
+
column,
|
|
438
|
+
item
|
|
439
|
+
);
|
|
440
|
+
const isDefaultRenderer = column.renderCell == null;
|
|
441
|
+
const rawContent = isDefaultRenderer ? defaultCellRenderer(item, column.key) : column.renderCell?.(item) ?? null;
|
|
442
|
+
const content = isDefaultRenderer && textOverflow === "truncate" && typeof rawContent === "string" && rawContent.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunk47BELFYO_cjs.Text, { maxLines: 1, type: "body", children: rawContent }) : rawContent;
|
|
443
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
444
|
+
CellComponent,
|
|
445
|
+
{
|
|
446
|
+
...cellProps.htmlProps,
|
|
447
|
+
className: chunkSPDVNY2Z_cjs.cx(cellProps.htmlProps.className, cellProps.className),
|
|
448
|
+
children: content
|
|
449
|
+
},
|
|
450
|
+
column.key
|
|
451
|
+
);
|
|
452
|
+
});
|
|
453
|
+
const rowProps = applyPlugins(
|
|
454
|
+
plugins,
|
|
455
|
+
(plugin) => plugin.transformBodyRow,
|
|
456
|
+
{
|
|
457
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: cells }),
|
|
458
|
+
htmlProps: {}
|
|
459
|
+
},
|
|
460
|
+
item,
|
|
461
|
+
rowIndex
|
|
462
|
+
);
|
|
463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
464
|
+
RowComponent,
|
|
465
|
+
{
|
|
466
|
+
...rowProps.htmlProps,
|
|
467
|
+
className: chunkSPDVNY2Z_cjs.cx(rowProps.htmlProps.className, rowProps.className),
|
|
468
|
+
ref: rowProps.ref,
|
|
469
|
+
children: rowProps.children
|
|
470
|
+
},
|
|
471
|
+
rowKey
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
function areRowPropsEqual(previous, next) {
|
|
475
|
+
if (previous.CellComponent !== next.CellComponent || previous.RowComponent !== next.RowComponent || previous.columns !== next.columns || previous.plugins !== next.plugins || previous.rowIndex !== next.rowIndex || previous.rowKey !== next.rowKey || previous.textOverflow !== next.textOverflow) {
|
|
476
|
+
return false;
|
|
477
|
+
}
|
|
478
|
+
if (previous.item === next.item) {
|
|
479
|
+
return true;
|
|
480
|
+
}
|
|
481
|
+
return Object.keys(next.item).every(
|
|
482
|
+
(key) => previous.item[key] === next.item[key]
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
var MemoizedDataRow = react.memo(DataRowInner, areRowPropsEqual);
|
|
486
|
+
function BaseTableInner({
|
|
487
|
+
children,
|
|
488
|
+
className,
|
|
489
|
+
columns: columnsProp,
|
|
490
|
+
data,
|
|
491
|
+
"data-testid": dataTestId,
|
|
492
|
+
emptyState,
|
|
493
|
+
idKey,
|
|
494
|
+
plugins: pluginsProp,
|
|
495
|
+
ref,
|
|
496
|
+
scrollWrapper: ScrollWrapper,
|
|
497
|
+
style,
|
|
498
|
+
tableProps,
|
|
499
|
+
textOverflow = "wrap"
|
|
500
|
+
}) {
|
|
501
|
+
const plugins = pluginsProp ?? EMPTY_PLUGINS;
|
|
502
|
+
const RowComponent = TableRow;
|
|
503
|
+
const CellComponent = TableCell;
|
|
504
|
+
const HeaderCellComponent = TableHeaderCell;
|
|
505
|
+
const baseColumns = columnsProp ?? (data == null ? [] : generateColumns(data));
|
|
506
|
+
const transformedColumns = applyPlugins(
|
|
507
|
+
plugins,
|
|
508
|
+
(plugin) => plugin.transformColumns,
|
|
509
|
+
baseColumns
|
|
510
|
+
);
|
|
511
|
+
const columnsRef = react.useRef(transformedColumns);
|
|
512
|
+
const areColumnsStable = areArraysShallowEqual(
|
|
513
|
+
columnsRef.current,
|
|
514
|
+
transformedColumns
|
|
515
|
+
);
|
|
516
|
+
if (!areColumnsStable) {
|
|
517
|
+
columnsRef.current = transformedColumns;
|
|
518
|
+
}
|
|
519
|
+
const columns = columnsRef.current;
|
|
520
|
+
const widths = resolveColumnWidths(columns);
|
|
521
|
+
const tableRenderProps = applyPlugins(
|
|
522
|
+
plugins,
|
|
523
|
+
(plugin) => plugin.transformTable,
|
|
524
|
+
{
|
|
525
|
+
htmlProps: tableProps ?? {}
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
const headerCells = columns.map((column) => {
|
|
529
|
+
const headerContent = column.header ?? column.key;
|
|
530
|
+
const initialHtmlProps = {
|
|
531
|
+
"data-column-key": column.key
|
|
532
|
+
};
|
|
533
|
+
if (column.align) {
|
|
534
|
+
initialHtmlProps.style = { textAlign: column.align };
|
|
535
|
+
}
|
|
536
|
+
const headerCellProps = applyPlugins(
|
|
537
|
+
plugins,
|
|
538
|
+
(plugin) => plugin.transformHeaderCell,
|
|
539
|
+
{
|
|
540
|
+
content: headerContent,
|
|
541
|
+
htmlProps: initialHtmlProps
|
|
542
|
+
},
|
|
543
|
+
column
|
|
544
|
+
);
|
|
545
|
+
const widthStyle = widths.columns.get(column.key)?.style ?? {};
|
|
546
|
+
const mergedStyle = {
|
|
547
|
+
...widthStyle,
|
|
548
|
+
...headerCellProps.htmlProps.style
|
|
549
|
+
};
|
|
550
|
+
const resolvedContent = headerCellProps.content ?? headerContent;
|
|
551
|
+
const title = typeof resolvedContent === "string" && resolvedContent.length > 0 ? resolvedContent : void 0;
|
|
552
|
+
const renderedContent = typeof resolvedContent === "string" || typeof resolvedContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
553
|
+
chunk47BELFYO_cjs.Text,
|
|
554
|
+
{
|
|
555
|
+
color: "secondary",
|
|
556
|
+
maxLines: 1,
|
|
557
|
+
size: "md",
|
|
558
|
+
type: "body",
|
|
559
|
+
weight: "semibold",
|
|
560
|
+
children: resolvedContent
|
|
561
|
+
}
|
|
562
|
+
) : resolvedContent;
|
|
563
|
+
const hasSlots = headerCellProps.before != null || headerCellProps.after != null || headerCellProps.overlay != null || headerCellProps.below != null;
|
|
564
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
565
|
+
HeaderCellComponent,
|
|
566
|
+
{
|
|
567
|
+
...headerCellProps.htmlProps,
|
|
568
|
+
className: chunkSPDVNY2Z_cjs.cx(
|
|
569
|
+
headerCellProps.htmlProps.className,
|
|
570
|
+
headerCellProps.className
|
|
571
|
+
),
|
|
572
|
+
style: mergedStyle,
|
|
573
|
+
title,
|
|
574
|
+
children: hasSlots ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
575
|
+
headerCellProps.before,
|
|
576
|
+
headerCellProps.after == null ? renderedContent : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles4.headerLabelRow, children: [
|
|
577
|
+
renderedContent,
|
|
578
|
+
headerCellProps.after
|
|
579
|
+
] }),
|
|
580
|
+
headerCellProps.overlay,
|
|
581
|
+
headerCellProps.below
|
|
582
|
+
] }) : renderedContent
|
|
583
|
+
},
|
|
584
|
+
column.key
|
|
585
|
+
);
|
|
586
|
+
});
|
|
587
|
+
const headerRowProps = applyPlugins(
|
|
588
|
+
plugins,
|
|
589
|
+
(plugin) => plugin.transformHeaderRow,
|
|
590
|
+
{
|
|
591
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: headerCells }),
|
|
592
|
+
htmlProps: {}
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
const tableStyle = {
|
|
596
|
+
...style,
|
|
597
|
+
...tableRenderProps.htmlProps.style,
|
|
598
|
+
minWidth: widths.tableMinWidth > 0 ? `${widths.tableMinWidth}px` : void 0
|
|
599
|
+
};
|
|
600
|
+
const hasData = data != null && data.length > 0;
|
|
601
|
+
const hasColumns = columns.length > 0;
|
|
602
|
+
let tableElement = /* @__PURE__ */ jsxRuntime.jsx(
|
|
603
|
+
"table",
|
|
604
|
+
{
|
|
605
|
+
...tableRenderProps.htmlProps,
|
|
606
|
+
className: chunkSPDVNY2Z_cjs.cx(
|
|
607
|
+
"silver-base-table",
|
|
608
|
+
styles4.table,
|
|
609
|
+
children != null ? styles4.tableAutoLayout : void 0,
|
|
610
|
+
tableRenderProps.htmlProps.className,
|
|
611
|
+
tableRenderProps.className,
|
|
612
|
+
className
|
|
613
|
+
),
|
|
614
|
+
"data-testid": dataTestId,
|
|
615
|
+
ref,
|
|
616
|
+
style: tableStyle,
|
|
617
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
618
|
+
hasColumns ? /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
619
|
+
RowComponent,
|
|
620
|
+
{
|
|
621
|
+
...headerRowProps.htmlProps,
|
|
622
|
+
className: chunkSPDVNY2Z_cjs.cx(
|
|
623
|
+
headerRowProps.htmlProps.className,
|
|
624
|
+
headerRowProps.className
|
|
625
|
+
),
|
|
626
|
+
children: headerRowProps.children
|
|
627
|
+
}
|
|
628
|
+
) }) : null,
|
|
629
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: hasData ? data.map((item, rowIndex) => {
|
|
630
|
+
const rowKey = idKey == null ? rowIndex : typeof idKey === "function" ? idKey(item) : String(item[idKey]);
|
|
631
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
632
|
+
MemoizedDataRow,
|
|
633
|
+
{
|
|
634
|
+
CellComponent,
|
|
635
|
+
columns,
|
|
636
|
+
item,
|
|
637
|
+
plugins,
|
|
638
|
+
RowComponent,
|
|
639
|
+
rowIndex,
|
|
640
|
+
rowKey,
|
|
641
|
+
textOverflow
|
|
642
|
+
},
|
|
643
|
+
rowKey
|
|
644
|
+
);
|
|
645
|
+
}) : data != null && emptyState !== false && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: Math.max(columns.length, 1), children: emptyState ?? /* @__PURE__ */ jsxRuntime.jsx(chunk2PHHFBJ3_cjs.EmptyState, { isCompact: true, title: "No data" }) }) }) })
|
|
646
|
+
] })
|
|
647
|
+
}
|
|
648
|
+
);
|
|
649
|
+
if (ScrollWrapper != null) {
|
|
650
|
+
tableElement = /* @__PURE__ */ jsxRuntime.jsx(ScrollWrapper, { children: tableElement });
|
|
651
|
+
}
|
|
652
|
+
for (let index = plugins.length - 1; index >= 0; index--) {
|
|
653
|
+
const plugin = plugins[index];
|
|
654
|
+
if (plugin.transformTableContext != null) {
|
|
655
|
+
try {
|
|
656
|
+
tableElement = plugin.transformTableContext(tableElement);
|
|
657
|
+
} catch (error) {
|
|
658
|
+
console.error("[Table] Plugin threw in transformTableContext:", error);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return tableElement;
|
|
663
|
+
}
|
|
664
|
+
var BaseTable = BaseTableInner;
|
|
665
|
+
BaseTable.displayName = "BaseTable";
|
|
666
|
+
var CANONICAL_PLUGIN_ORDER = [
|
|
667
|
+
"columnSettings",
|
|
668
|
+
"sort",
|
|
669
|
+
"selection",
|
|
670
|
+
"filtering",
|
|
671
|
+
"columnResize",
|
|
672
|
+
"pagination"
|
|
673
|
+
];
|
|
674
|
+
var CANONICAL_PLUGIN_KEYS = new Set(CANONICAL_PLUGIN_ORDER);
|
|
675
|
+
function orderNamedPlugins(userPlugins) {
|
|
676
|
+
const entries = Object.entries(userPlugins);
|
|
677
|
+
const pluginsByName = new Map(entries);
|
|
678
|
+
const orderedPlugins = CANONICAL_PLUGIN_ORDER.filter(
|
|
679
|
+
(key) => pluginsByName.has(key)
|
|
680
|
+
).map((key) => pluginsByName.get(key));
|
|
681
|
+
const customPlugins = entries.filter(([key]) => !CANONICAL_PLUGIN_KEYS.has(key)).map(([, plugin]) => plugin);
|
|
682
|
+
return [...orderedPlugins, ...customPlugins];
|
|
683
|
+
}
|
|
684
|
+
function useBaseTablePlugins(basePlugins, userPlugins) {
|
|
685
|
+
return react.useMemo(() => {
|
|
686
|
+
const plugins = Array.isArray(userPlugins) ? userPlugins : orderNamedPlugins(userPlugins ?? {});
|
|
687
|
+
return [...basePlugins, ...plugins];
|
|
688
|
+
}, [basePlugins, userPlugins]);
|
|
689
|
+
}
|
|
690
|
+
var styles5 = {
|
|
691
|
+
scrollWrapper: chunkAZDWQGAX_cjs.css({
|
|
692
|
+
overflowX: "auto",
|
|
693
|
+
WebkitOverflowScrolling: "touch"
|
|
694
|
+
}),
|
|
695
|
+
table: chunkAZDWQGAX_cjs.css({
|
|
696
|
+
color: "fg",
|
|
697
|
+
fontFamily: "body"
|
|
698
|
+
})
|
|
699
|
+
};
|
|
700
|
+
function TableScrollWrapper({
|
|
701
|
+
children
|
|
702
|
+
}) {
|
|
703
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles5.scrollWrapper, children });
|
|
704
|
+
}
|
|
705
|
+
function buildTableStylePlugin() {
|
|
706
|
+
return {
|
|
707
|
+
transformTable(props) {
|
|
708
|
+
return {
|
|
709
|
+
...props,
|
|
710
|
+
className: chunkSPDVNY2Z_cjs.cx(props.className, styles5.table, "silver-table")
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
function TableInner({
|
|
716
|
+
children,
|
|
717
|
+
className,
|
|
718
|
+
columns,
|
|
719
|
+
data,
|
|
720
|
+
"data-testid": dataTestId,
|
|
721
|
+
density = "balanced",
|
|
722
|
+
dividers = "rows",
|
|
723
|
+
emptyState,
|
|
724
|
+
hasHover = false,
|
|
725
|
+
idKey,
|
|
726
|
+
isStriped = false,
|
|
727
|
+
plugins: userPlugins,
|
|
728
|
+
ref,
|
|
729
|
+
style,
|
|
730
|
+
tableProps,
|
|
731
|
+
textOverflow = "wrap",
|
|
732
|
+
verticalAlign = "middle"
|
|
733
|
+
}) {
|
|
734
|
+
const tablePlugin = react.useMemo(() => buildTableStylePlugin(), []);
|
|
735
|
+
const basePlugins = react.useMemo(() => [tablePlugin], [tablePlugin]);
|
|
736
|
+
const plugins = useBaseTablePlugins(basePlugins, userPlugins);
|
|
737
|
+
const contextValue = react.useMemo(
|
|
738
|
+
() => ({
|
|
739
|
+
density,
|
|
740
|
+
dividers,
|
|
741
|
+
hasHover,
|
|
742
|
+
isStriped,
|
|
743
|
+
textOverflow,
|
|
744
|
+
verticalAlign
|
|
745
|
+
}),
|
|
746
|
+
[density, dividers, hasHover, isStriped, textOverflow, verticalAlign]
|
|
747
|
+
);
|
|
748
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableContext, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
749
|
+
BaseTable,
|
|
750
|
+
{
|
|
751
|
+
className,
|
|
752
|
+
columns,
|
|
753
|
+
data,
|
|
754
|
+
"data-testid": dataTestId,
|
|
755
|
+
emptyState,
|
|
756
|
+
idKey,
|
|
757
|
+
plugins,
|
|
758
|
+
ref,
|
|
759
|
+
scrollWrapper: TableScrollWrapper,
|
|
760
|
+
style,
|
|
761
|
+
tableProps,
|
|
762
|
+
textOverflow,
|
|
763
|
+
children
|
|
764
|
+
}
|
|
765
|
+
) });
|
|
766
|
+
}
|
|
767
|
+
var Table = TableInner;
|
|
768
|
+
Table.displayName = "Table";
|
|
769
|
+
function TableFooter({
|
|
770
|
+
children,
|
|
771
|
+
className,
|
|
772
|
+
"data-testid": dataTestId,
|
|
773
|
+
ref,
|
|
774
|
+
style
|
|
775
|
+
}) {
|
|
776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
777
|
+
"tfoot",
|
|
778
|
+
{
|
|
779
|
+
className,
|
|
780
|
+
"data-testid": dataTestId,
|
|
781
|
+
ref,
|
|
782
|
+
style,
|
|
783
|
+
children
|
|
784
|
+
}
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
TableFooter.displayName = "TableFooter";
|
|
788
|
+
var KEYBOARD_STEP = 10;
|
|
789
|
+
var KEYBOARD_LARGE_STEP = 50;
|
|
790
|
+
var styles6 = {
|
|
791
|
+
handle: chunkAZDWQGAX_cjs.css({
|
|
792
|
+
position: "absolute",
|
|
793
|
+
insetInlineEnd: 0,
|
|
794
|
+
top: 0,
|
|
795
|
+
bottom: 0,
|
|
796
|
+
zIndex: 1,
|
|
797
|
+
w: "4",
|
|
798
|
+
cursor: "ew-resize",
|
|
799
|
+
borderWidth: 0,
|
|
800
|
+
bg: "transparent",
|
|
801
|
+
p: 0,
|
|
802
|
+
touchAction: "none",
|
|
803
|
+
userSelect: "none",
|
|
804
|
+
_after: {
|
|
805
|
+
content: '""',
|
|
806
|
+
position: "absolute",
|
|
807
|
+
insetInlineEnd: 0,
|
|
808
|
+
top: 0,
|
|
809
|
+
bottom: 0,
|
|
810
|
+
w: "2px",
|
|
811
|
+
bg: "transparent",
|
|
812
|
+
transitionDuration: "fast",
|
|
813
|
+
transitionProperty: "background-color, width",
|
|
814
|
+
transitionTimingFunction: "default"
|
|
815
|
+
},
|
|
816
|
+
_focusVisible: {
|
|
817
|
+
outlineWidth: "focus",
|
|
818
|
+
outlineStyle: "solid",
|
|
819
|
+
outlineColor: "primary",
|
|
820
|
+
outlineOffset: "focusOffset"
|
|
821
|
+
},
|
|
822
|
+
_hover: {
|
|
823
|
+
_after: {
|
|
824
|
+
bg: "primary"
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"@media (pointer: coarse)": {
|
|
828
|
+
display: "none"
|
|
829
|
+
}
|
|
830
|
+
}),
|
|
831
|
+
headerCell: chunkAZDWQGAX_cjs.css({
|
|
832
|
+
overflow: "visible",
|
|
833
|
+
position: "relative"
|
|
834
|
+
})
|
|
835
|
+
};
|
|
836
|
+
function resolveColumnMinWidth(width, globalMinWidth) {
|
|
837
|
+
if (globalMinWidth != null) {
|
|
838
|
+
return globalMinWidth;
|
|
839
|
+
}
|
|
840
|
+
if (width?.type === "pixel") {
|
|
841
|
+
return width.value;
|
|
842
|
+
}
|
|
843
|
+
return width?.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH;
|
|
844
|
+
}
|
|
845
|
+
function applyWidth(th, width) {
|
|
846
|
+
th.style.width = `${width}px`;
|
|
847
|
+
th.style.minWidth = `${width}px`;
|
|
848
|
+
th.style.maxWidth = `${width}px`;
|
|
849
|
+
}
|
|
850
|
+
function isProportionalColumn(width) {
|
|
851
|
+
return width == null || width.type === "proportional";
|
|
852
|
+
}
|
|
853
|
+
function getRTLMultiplier(element) {
|
|
854
|
+
return getComputedStyle(element).direction === "rtl" ? -1 : 1;
|
|
855
|
+
}
|
|
856
|
+
function computeColumnWidths(drag, delta) {
|
|
857
|
+
const widths = drag.snapshots.map((snapshot) => snapshot.initialWidth);
|
|
858
|
+
if (drag.neighborIndex != null) {
|
|
859
|
+
const neighbor = drag.snapshots[drag.neighborIndex];
|
|
860
|
+
const self = drag.snapshots[drag.resizeIndex];
|
|
861
|
+
const maxDelta = neighbor.initialWidth - neighbor.minWidth;
|
|
862
|
+
const minDelta = self.minWidth - self.initialWidth;
|
|
863
|
+
const clampedDelta = Math.max(minDelta, Math.min(delta, maxDelta));
|
|
864
|
+
widths[drag.resizeIndex] = self.initialWidth + clampedDelta;
|
|
865
|
+
widths[drag.neighborIndex] = neighbor.initialWidth - clampedDelta;
|
|
866
|
+
} else {
|
|
867
|
+
const self = drag.snapshots[drag.resizeIndex];
|
|
868
|
+
widths[drag.resizeIndex] = Math.min(
|
|
869
|
+
self.maxWidth,
|
|
870
|
+
Math.max(self.minWidth, self.initialWidth + delta)
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
const lastIndex = drag.snapshots.length - 1;
|
|
874
|
+
const isResizingLastColumnWithoutNeighbor = drag.resizeIndex === lastIndex && drag.neighborIndex == null;
|
|
875
|
+
if (lastIndex >= 0 && drag.tableWidth > 0 && !isResizingLastColumnWithoutNeighbor) {
|
|
876
|
+
const sumOthers = widths.reduce(
|
|
877
|
+
(sum, width, index) => index === lastIndex ? sum : sum + width,
|
|
878
|
+
0
|
|
879
|
+
);
|
|
880
|
+
widths[lastIndex] = Math.max(
|
|
881
|
+
drag.snapshots[lastIndex].minWidth,
|
|
882
|
+
drag.tableWidth - sumOthers
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
return widths;
|
|
886
|
+
}
|
|
887
|
+
function applyWidths(snapshots, widths) {
|
|
888
|
+
snapshots.forEach((snapshot, index) => {
|
|
889
|
+
applyWidth(snapshot.th, widths[index]);
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
function restoreSnapshotStyles(snapshots) {
|
|
893
|
+
snapshots.forEach((snapshot) => {
|
|
894
|
+
snapshot.th.style.width = snapshot.initialWidthStyle;
|
|
895
|
+
snapshot.th.style.minWidth = snapshot.initialMinWidth;
|
|
896
|
+
snapshot.th.style.maxWidth = snapshot.initialMaxWidth;
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
function buildUpdates(drag, widths) {
|
|
900
|
+
const updates = {};
|
|
901
|
+
const lastIndex = drag.snapshots.length - 1;
|
|
902
|
+
const isResizingLastColumnWithoutNeighbor = drag.resizeIndex === lastIndex && drag.neighborIndex == null;
|
|
903
|
+
if (isResizingLastColumnWithoutNeighbor) {
|
|
904
|
+
const snapshot = drag.snapshots[drag.resizeIndex];
|
|
905
|
+
updates[snapshot.key] = Math.round(widths[drag.resizeIndex]);
|
|
906
|
+
return updates;
|
|
907
|
+
}
|
|
908
|
+
drag.snapshots.forEach((snapshot, index) => {
|
|
909
|
+
if (index === lastIndex) {
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
updates[snapshot.key] = Math.round(widths[index]);
|
|
913
|
+
});
|
|
914
|
+
return updates;
|
|
915
|
+
}
|
|
916
|
+
function ResizeHandle({
|
|
917
|
+
columnHeader,
|
|
918
|
+
columnKey,
|
|
919
|
+
configRef,
|
|
920
|
+
currentWidth,
|
|
921
|
+
maxWidth,
|
|
922
|
+
minWidth,
|
|
923
|
+
neighborKey
|
|
924
|
+
}) {
|
|
925
|
+
const dragStateRef = react.useRef(null);
|
|
926
|
+
const pointerListenersRef = react.useRef(null);
|
|
927
|
+
const removePointerListeners = react.useCallback(() => {
|
|
928
|
+
const listeners = pointerListenersRef.current;
|
|
929
|
+
if (listeners == null) {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
window.removeEventListener("pointermove", listeners.move);
|
|
933
|
+
window.removeEventListener("pointerup", listeners.up);
|
|
934
|
+
window.removeEventListener("pointercancel", listeners.cancel);
|
|
935
|
+
pointerListenersRef.current = null;
|
|
936
|
+
}, []);
|
|
937
|
+
const buildDragState = react.useCallback(
|
|
938
|
+
(th, startX) => {
|
|
939
|
+
const headerRow = th.parentElement;
|
|
940
|
+
if (headerRow == null) {
|
|
941
|
+
return null;
|
|
942
|
+
}
|
|
943
|
+
const table = th.closest("table");
|
|
944
|
+
const tableWidth = table?.getBoundingClientRect().width ?? 0;
|
|
945
|
+
const columns = configRef.current.columns;
|
|
946
|
+
const activeHeaderIndex = Array.from(headerRow.children).indexOf(th);
|
|
947
|
+
const activeColumnIndex = columns?.findIndex((column) => column.key === columnKey) ?? -1;
|
|
948
|
+
const columnIndexOffset = activeHeaderIndex >= 0 && activeColumnIndex >= 0 ? activeHeaderIndex - activeColumnIndex : 0;
|
|
949
|
+
const columnsByKey = new Map(
|
|
950
|
+
columns?.map((column) => [column.key, column])
|
|
951
|
+
);
|
|
952
|
+
const currentWidths = configRef.current.columnWidths ?? {};
|
|
953
|
+
const snapshots = [];
|
|
954
|
+
const allHeaders = Array.from(headerRow.children).filter(
|
|
955
|
+
(child) => child instanceof HTMLTableCellElement
|
|
956
|
+
);
|
|
957
|
+
for (const [index, header] of allHeaders.entries()) {
|
|
958
|
+
const key = header.querySelector("[data-column-key]")?.getAttribute("data-column-key") ?? columns?.[index - columnIndexOffset]?.key;
|
|
959
|
+
if (key == null) {
|
|
960
|
+
continue;
|
|
961
|
+
}
|
|
962
|
+
const snapshotColumn = columnsByKey.get(key);
|
|
963
|
+
if (columns != null && snapshotColumn == null) {
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
if (snapshotColumn?.resizable === false) {
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
const renderedWidth = header.getBoundingClientRect().width;
|
|
970
|
+
const overrideWidth = Object.prototype.hasOwnProperty.call(currentWidths, key) ? currentWidths[key] : void 0;
|
|
971
|
+
snapshots.push({
|
|
972
|
+
initialMaxWidth: header.style.maxWidth,
|
|
973
|
+
initialMinWidth: header.style.minWidth,
|
|
974
|
+
initialWidth: overrideWidth ?? (renderedWidth > 0 ? renderedWidth : minWidth),
|
|
975
|
+
initialWidthStyle: header.style.width,
|
|
976
|
+
key,
|
|
977
|
+
maxWidth: configRef.current.maxWidth ?? Number.POSITIVE_INFINITY,
|
|
978
|
+
minWidth: snapshotColumn == null ? minWidth : resolveColumnMinWidth(
|
|
979
|
+
snapshotColumn.width,
|
|
980
|
+
configRef.current.minWidth
|
|
981
|
+
),
|
|
982
|
+
th: header
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
const resizeIndex = snapshots.findIndex(
|
|
986
|
+
(snapshot) => snapshot.key === columnKey
|
|
987
|
+
);
|
|
988
|
+
if (resizeIndex < 0) {
|
|
989
|
+
return null;
|
|
990
|
+
}
|
|
991
|
+
const neighborIndex = neighborKey == null ? null : snapshots.findIndex((snapshot) => snapshot.key === neighborKey);
|
|
992
|
+
return {
|
|
993
|
+
columnKey,
|
|
994
|
+
neighborIndex: neighborIndex == null || neighborIndex < 0 ? null : neighborIndex,
|
|
995
|
+
resizeIndex,
|
|
996
|
+
snapshots,
|
|
997
|
+
startX,
|
|
998
|
+
tableWidth
|
|
999
|
+
};
|
|
1000
|
+
},
|
|
1001
|
+
[columnKey, configRef, minWidth, neighborKey]
|
|
1002
|
+
);
|
|
1003
|
+
const commitResize = react.useCallback(
|
|
1004
|
+
(drag, delta) => {
|
|
1005
|
+
const widths = computeColumnWidths(drag, delta);
|
|
1006
|
+
applyWidths(drag.snapshots, widths);
|
|
1007
|
+
const updates = buildUpdates(drag, widths);
|
|
1008
|
+
if (Object.keys(updates).length > 0) {
|
|
1009
|
+
configRef.current.onColumnResizeEnd?.(updates);
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
[configRef]
|
|
1013
|
+
);
|
|
1014
|
+
const handlePointerMove = react.useCallback(
|
|
1015
|
+
(event) => {
|
|
1016
|
+
const drag = dragStateRef.current;
|
|
1017
|
+
if (drag == null) {
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
const delta = (event.clientX - drag.startX) * getRTLMultiplier(drag.snapshots[drag.resizeIndex].th);
|
|
1021
|
+
applyWidths(drag.snapshots, computeColumnWidths(drag, delta));
|
|
1022
|
+
},
|
|
1023
|
+
[dragStateRef]
|
|
1024
|
+
);
|
|
1025
|
+
const handlePointerUp = react.useCallback(
|
|
1026
|
+
(event) => {
|
|
1027
|
+
const drag = dragStateRef.current;
|
|
1028
|
+
removePointerListeners();
|
|
1029
|
+
if (drag != null) {
|
|
1030
|
+
const delta = (event.clientX - drag.startX) * getRTLMultiplier(drag.snapshots[drag.resizeIndex].th);
|
|
1031
|
+
commitResize(drag, delta);
|
|
1032
|
+
}
|
|
1033
|
+
dragStateRef.current = null;
|
|
1034
|
+
},
|
|
1035
|
+
[commitResize, dragStateRef, removePointerListeners]
|
|
1036
|
+
);
|
|
1037
|
+
const handlePointerCancel = react.useCallback(() => {
|
|
1038
|
+
const drag = dragStateRef.current;
|
|
1039
|
+
if (drag != null) {
|
|
1040
|
+
restoreSnapshotStyles(drag.snapshots);
|
|
1041
|
+
}
|
|
1042
|
+
removePointerListeners();
|
|
1043
|
+
dragStateRef.current = null;
|
|
1044
|
+
}, [dragStateRef, removePointerListeners]);
|
|
1045
|
+
const handlePointerDown = react.useCallback(
|
|
1046
|
+
(event) => {
|
|
1047
|
+
event.preventDefault();
|
|
1048
|
+
event.stopPropagation();
|
|
1049
|
+
const th = event.currentTarget.closest("th");
|
|
1050
|
+
if (th == null) {
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
const drag = buildDragState(th, event.clientX);
|
|
1054
|
+
if (drag == null) {
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
dragStateRef.current = drag;
|
|
1058
|
+
applyWidths(drag.snapshots, computeColumnWidths(drag, 0));
|
|
1059
|
+
pointerListenersRef.current = {
|
|
1060
|
+
cancel: handlePointerCancel,
|
|
1061
|
+
move: handlePointerMove,
|
|
1062
|
+
up: handlePointerUp
|
|
1063
|
+
};
|
|
1064
|
+
window.addEventListener("pointermove", handlePointerMove);
|
|
1065
|
+
window.addEventListener("pointerup", handlePointerUp);
|
|
1066
|
+
window.addEventListener("pointercancel", handlePointerCancel);
|
|
1067
|
+
},
|
|
1068
|
+
[
|
|
1069
|
+
buildDragState,
|
|
1070
|
+
dragStateRef,
|
|
1071
|
+
handlePointerCancel,
|
|
1072
|
+
handlePointerMove,
|
|
1073
|
+
handlePointerUp
|
|
1074
|
+
]
|
|
1075
|
+
);
|
|
1076
|
+
const handleKeyDown = react.useCallback(
|
|
1077
|
+
(event) => {
|
|
1078
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight" && event.key !== "Home" && event.key !== "End") {
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
event.preventDefault();
|
|
1082
|
+
event.stopPropagation();
|
|
1083
|
+
const th = event.currentTarget.closest("th");
|
|
1084
|
+
if (th == null) {
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
const drag = buildDragState(th, 0);
|
|
1088
|
+
if (drag == null) {
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
const activeSnapshot = drag.snapshots[drag.resizeIndex];
|
|
1092
|
+
const step = event.shiftKey ? KEYBOARD_LARGE_STEP : KEYBOARD_STEP;
|
|
1093
|
+
const delta = event.key === "Home" ? activeSnapshot.minWidth - activeSnapshot.initialWidth : event.key === "End" ? Number.isFinite(activeSnapshot.maxWidth) ? activeSnapshot.maxWidth - activeSnapshot.initialWidth : 0 : event.key === "ArrowLeft" ? -step * getRTLMultiplier(th) : step * getRTLMultiplier(th);
|
|
1094
|
+
commitResize(drag, delta);
|
|
1095
|
+
},
|
|
1096
|
+
[buildDragState, commitResize]
|
|
1097
|
+
);
|
|
1098
|
+
const headerLabel = typeof columnHeader === "string" ? columnHeader : columnKey;
|
|
1099
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1100
|
+
"div",
|
|
1101
|
+
{
|
|
1102
|
+
"aria-label": `Resize column ${headerLabel}`,
|
|
1103
|
+
"aria-orientation": "vertical",
|
|
1104
|
+
"aria-valuemax": Number.isFinite(maxWidth) ? maxWidth : void 0,
|
|
1105
|
+
"aria-valuemin": minWidth,
|
|
1106
|
+
"aria-valuenow": currentWidth,
|
|
1107
|
+
className: styles6.handle,
|
|
1108
|
+
"data-column-key": columnKey,
|
|
1109
|
+
onKeyDown: handleKeyDown,
|
|
1110
|
+
onPointerDown: handlePointerDown,
|
|
1111
|
+
role: "separator",
|
|
1112
|
+
tabIndex: 0
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1116
|
+
function useTableColumnResize(config) {
|
|
1117
|
+
const configRef = react.useRef(config);
|
|
1118
|
+
react.useEffect(() => {
|
|
1119
|
+
configRef.current = config;
|
|
1120
|
+
}, [config]);
|
|
1121
|
+
const globalMinWidth = config.minWidth;
|
|
1122
|
+
const maxWidth = config.maxWidth ?? Number.POSITIVE_INFINITY;
|
|
1123
|
+
const columnWidths = config.columnWidths;
|
|
1124
|
+
const resizableColumns = react.useMemo(
|
|
1125
|
+
() => config.columns?.filter((column) => column.resizable !== false),
|
|
1126
|
+
[config.columns]
|
|
1127
|
+
);
|
|
1128
|
+
return react.useMemo(
|
|
1129
|
+
() => ({
|
|
1130
|
+
transformHeaderCell(props, column) {
|
|
1131
|
+
if (column.resizable === false) {
|
|
1132
|
+
return props;
|
|
1133
|
+
}
|
|
1134
|
+
let neighborKey = null;
|
|
1135
|
+
if (resizableColumns != null && isProportionalColumn(column.width)) {
|
|
1136
|
+
const columnIndex = resizableColumns.findIndex(
|
|
1137
|
+
(resizableColumn) => resizableColumn.key === column.key
|
|
1138
|
+
);
|
|
1139
|
+
const isLastResizable = columnIndex === resizableColumns.length - 1;
|
|
1140
|
+
if (isLastResizable) {
|
|
1141
|
+
return props;
|
|
1142
|
+
}
|
|
1143
|
+
if (columnIndex >= 0) {
|
|
1144
|
+
neighborKey = resizableColumns[columnIndex + 1]?.key ?? null;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
const overrideWidth = columnWidths?.[column.key];
|
|
1148
|
+
const widthStyle = overrideWidth == null ? void 0 : {
|
|
1149
|
+
maxWidth: `${overrideWidth}px`,
|
|
1150
|
+
minWidth: `${overrideWidth}px`,
|
|
1151
|
+
width: `${overrideWidth}px`
|
|
1152
|
+
};
|
|
1153
|
+
const effectiveMinWidth = resolveColumnMinWidth(
|
|
1154
|
+
column.width,
|
|
1155
|
+
globalMinWidth
|
|
1156
|
+
);
|
|
1157
|
+
return {
|
|
1158
|
+
...props,
|
|
1159
|
+
className: styles6.headerCell,
|
|
1160
|
+
htmlProps: {
|
|
1161
|
+
...props.htmlProps,
|
|
1162
|
+
style: widthStyle == null ? props.htmlProps.style : { ...props.htmlProps.style, ...widthStyle }
|
|
1163
|
+
},
|
|
1164
|
+
overlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1165
|
+
props.overlay,
|
|
1166
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1167
|
+
ResizeHandle,
|
|
1168
|
+
{
|
|
1169
|
+
columnHeader: column.header ?? column.key,
|
|
1170
|
+
columnKey: column.key,
|
|
1171
|
+
configRef,
|
|
1172
|
+
currentWidth: overrideWidth,
|
|
1173
|
+
maxWidth,
|
|
1174
|
+
minWidth: effectiveMinWidth,
|
|
1175
|
+
neighborKey
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
] })
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
}),
|
|
1182
|
+
[columnWidths, configRef, globalMinWidth, maxWidth, resizableColumns]
|
|
1183
|
+
);
|
|
1184
|
+
}
|
|
1185
|
+
function useTableColumnSettings(config) {
|
|
1186
|
+
return react.useMemo(
|
|
1187
|
+
() => ({
|
|
1188
|
+
transformColumns(columns) {
|
|
1189
|
+
const activeSet = new Set(config.activeColumnKeys);
|
|
1190
|
+
const orderMap = new Map(
|
|
1191
|
+
config.activeColumnKeys.map((key, index) => [key, index])
|
|
1192
|
+
);
|
|
1193
|
+
return columns.filter((column) => activeSet.has(column.key)).sort(
|
|
1194
|
+
(a, b) => (orderMap.get(a.key) ?? Infinity) - (orderMap.get(b.key) ?? Infinity)
|
|
1195
|
+
);
|
|
1196
|
+
}
|
|
1197
|
+
}),
|
|
1198
|
+
[config]
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
function useTableColumnSettingsState(config) {
|
|
1202
|
+
const { activeColumnKeys, columns } = config;
|
|
1203
|
+
const activeSet = react.useMemo(
|
|
1204
|
+
() => new Set(activeColumnKeys),
|
|
1205
|
+
[activeColumnKeys]
|
|
1206
|
+
);
|
|
1207
|
+
const alwaysVisibleSet = react.useMemo(
|
|
1208
|
+
() => new Set(
|
|
1209
|
+
columns.filter((column) => column.isAlwaysVisible).map((column) => column.key)
|
|
1210
|
+
),
|
|
1211
|
+
[columns]
|
|
1212
|
+
);
|
|
1213
|
+
const toggleColumn = react.useCallback(
|
|
1214
|
+
(key) => {
|
|
1215
|
+
if (config.columns.some(
|
|
1216
|
+
(column) => column.key === key && column.isAlwaysVisible
|
|
1217
|
+
)) {
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
const currentSet = new Set(config.activeColumnKeys);
|
|
1221
|
+
config.onChangeActiveColumnKeys(
|
|
1222
|
+
currentSet.has(key) ? config.activeColumnKeys.filter((columnKey) => columnKey !== key) : [...config.activeColumnKeys, key]
|
|
1223
|
+
);
|
|
1224
|
+
},
|
|
1225
|
+
[config]
|
|
1226
|
+
);
|
|
1227
|
+
const getIsColumnActive = react.useCallback(
|
|
1228
|
+
(key) => activeSet.has(key),
|
|
1229
|
+
[activeSet]
|
|
1230
|
+
);
|
|
1231
|
+
const getIsColumnToggleable = react.useCallback(
|
|
1232
|
+
(key) => !alwaysVisibleSet.has(key),
|
|
1233
|
+
[alwaysVisibleSet]
|
|
1234
|
+
);
|
|
1235
|
+
const showAllColumns = react.useCallback(() => {
|
|
1236
|
+
config.onChangeActiveColumnKeys(config.columns.map((column) => column.key));
|
|
1237
|
+
}, [config]);
|
|
1238
|
+
const resetToDefault = react.useCallback(() => {
|
|
1239
|
+
config.onChangeActiveColumnKeys(
|
|
1240
|
+
config.defaultColumnKeys ?? config.columns.map((column) => column.key)
|
|
1241
|
+
);
|
|
1242
|
+
}, [config]);
|
|
1243
|
+
const setActiveColumnKeys = react.useCallback(
|
|
1244
|
+
(keys) => {
|
|
1245
|
+
const next = new Set(keys);
|
|
1246
|
+
for (const column of config.columns) {
|
|
1247
|
+
if (column.isAlwaysVisible) {
|
|
1248
|
+
next.add(column.key);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
config.onChangeActiveColumnKeys(Array.from(next));
|
|
1252
|
+
},
|
|
1253
|
+
[config]
|
|
1254
|
+
);
|
|
1255
|
+
return {
|
|
1256
|
+
activeColumnKeys,
|
|
1257
|
+
columnSettingsConfig: config,
|
|
1258
|
+
getIsColumnActive,
|
|
1259
|
+
getIsColumnToggleable,
|
|
1260
|
+
resetToDefault,
|
|
1261
|
+
setActiveColumnKeys,
|
|
1262
|
+
showAllColumns,
|
|
1263
|
+
toggleColumn
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
var FilterStoreContext = react.createContext(null);
|
|
1267
|
+
FilterStoreContext.displayName = "TableFilterStoreContext";
|
|
1268
|
+
var styles7 = {
|
|
1269
|
+
afterPopover: chunkAZDWQGAX_cjs.css({
|
|
1270
|
+
display: "inline-flex",
|
|
1271
|
+
alignItems: "center",
|
|
1272
|
+
flexShrink: 0
|
|
1273
|
+
}),
|
|
1274
|
+
inlineWrapper: chunkAZDWQGAX_cjs.css({
|
|
1275
|
+
mt: "1"
|
|
1276
|
+
}),
|
|
1277
|
+
popoverActions: chunkAZDWQGAX_cjs.css({
|
|
1278
|
+
display: "flex",
|
|
1279
|
+
justifyContent: "flex-end",
|
|
1280
|
+
gap: "2",
|
|
1281
|
+
mt: "2"
|
|
1282
|
+
}),
|
|
1283
|
+
popoverActionsSpacer: chunkAZDWQGAX_cjs.css({
|
|
1284
|
+
flex: 1
|
|
1285
|
+
}),
|
|
1286
|
+
popoverContent: chunkAZDWQGAX_cjs.css({
|
|
1287
|
+
w: "60"
|
|
1288
|
+
})
|
|
1289
|
+
};
|
|
1290
|
+
function useFilterStore() {
|
|
1291
|
+
const store = react.use(FilterStoreContext);
|
|
1292
|
+
if (store == null) {
|
|
1293
|
+
throw new Error(
|
|
1294
|
+
"useFilterStore must be used within a Table filtering plugin"
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
return store;
|
|
1298
|
+
}
|
|
1299
|
+
function resolveOperator(field, operatorKey) {
|
|
1300
|
+
if (operatorKey != null) {
|
|
1301
|
+
return field.operators.find((operator) => operator.key === operatorKey);
|
|
1302
|
+
}
|
|
1303
|
+
if (field.defaultOperator != null) {
|
|
1304
|
+
return field.operators.find(
|
|
1305
|
+
(operator) => operator.key === field.defaultOperator
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
return field.operators[0];
|
|
1309
|
+
}
|
|
1310
|
+
function resolveFilterConfig(filter, searchConfig) {
|
|
1311
|
+
const fieldKey = typeof filter === "string" ? filter : filter.field;
|
|
1312
|
+
const operatorKey = typeof filter === "string" ? void 0 : filter.operator;
|
|
1313
|
+
const field = searchConfig.fields.find(
|
|
1314
|
+
(candidate) => candidate.key === fieldKey
|
|
1315
|
+
);
|
|
1316
|
+
return field == null ? void 0 : resolveOperator(field, operatorKey)?.value;
|
|
1317
|
+
}
|
|
1318
|
+
function tableValueToFilterValue(value, operatorValue, timezoneID) {
|
|
1319
|
+
switch (operatorValue.type) {
|
|
1320
|
+
case "date_absolute":
|
|
1321
|
+
return value instanceof polyfill.Temporal.PlainDate ? {
|
|
1322
|
+
type: "date_absolute",
|
|
1323
|
+
unixSeconds: chunkCK3UJQRI_cjs.plainDateToUnixSeconds(value, timezoneID)
|
|
1324
|
+
} : void 0;
|
|
1325
|
+
case "enum":
|
|
1326
|
+
return typeof value === "string" ? { type: "enum", value } : void 0;
|
|
1327
|
+
case "enum_list":
|
|
1328
|
+
return Array.isArray(value) ? { type: "enum_list", value } : void 0;
|
|
1329
|
+
case "entity_list":
|
|
1330
|
+
return Array.isArray(value) ? {
|
|
1331
|
+
type: "entity_list",
|
|
1332
|
+
value: value.map((id) => ({ id, label: id }))
|
|
1333
|
+
} : void 0;
|
|
1334
|
+
case "float":
|
|
1335
|
+
return typeof value === "number" ? { type: "float", value } : void 0;
|
|
1336
|
+
case "integer":
|
|
1337
|
+
return typeof value === "number" ? { type: "integer", value } : void 0;
|
|
1338
|
+
case "string":
|
|
1339
|
+
return typeof value === "string" ? { type: "string", value } : void 0;
|
|
1340
|
+
case "string_list":
|
|
1341
|
+
return Array.isArray(value) ? { type: "string_list", value } : void 0;
|
|
1342
|
+
case "time":
|
|
1343
|
+
return typeof value === "string" ? { type: "time", value } : void 0;
|
|
1344
|
+
case "custom":
|
|
1345
|
+
case "date_range":
|
|
1346
|
+
case "date_relative":
|
|
1347
|
+
case "empty":
|
|
1348
|
+
case "nested":
|
|
1349
|
+
return void 0;
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
function toSearchFilters(filters, columns, config, timezoneID) {
|
|
1353
|
+
const result = [];
|
|
1354
|
+
const searchConfig = "searchConfig" in config ? config.searchConfig : config;
|
|
1355
|
+
const effectiveTimezoneID = ("searchConfig" in config ? config.timezoneID : void 0) ?? timezoneID ?? chunkR37R7DEV_cjs.getBrowserTimezoneID();
|
|
1356
|
+
for (const column of columns) {
|
|
1357
|
+
if (column.filter == null) {
|
|
1358
|
+
continue;
|
|
1359
|
+
}
|
|
1360
|
+
const value = filters[column.key];
|
|
1361
|
+
if (value == null) {
|
|
1362
|
+
continue;
|
|
1363
|
+
}
|
|
1364
|
+
const fieldKey = typeof column.filter === "string" ? column.filter : column.filter.field;
|
|
1365
|
+
const operatorKey = typeof column.filter === "string" ? void 0 : column.filter.operator;
|
|
1366
|
+
const field = searchConfig.fields.find(
|
|
1367
|
+
(candidate) => candidate.key === fieldKey
|
|
1368
|
+
);
|
|
1369
|
+
const operator = field == null ? void 0 : resolveOperator(field, operatorKey);
|
|
1370
|
+
if (operator == null) {
|
|
1371
|
+
continue;
|
|
1372
|
+
}
|
|
1373
|
+
const filterValue = tableValueToFilterValue(
|
|
1374
|
+
value,
|
|
1375
|
+
operator.value,
|
|
1376
|
+
effectiveTimezoneID
|
|
1377
|
+
);
|
|
1378
|
+
if (filterValue != null) {
|
|
1379
|
+
result.push({
|
|
1380
|
+
field: fieldKey,
|
|
1381
|
+
operator: operator.key,
|
|
1382
|
+
value: filterValue
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
return result;
|
|
1387
|
+
}
|
|
1388
|
+
function TextFilterControl({
|
|
1389
|
+
columnKey,
|
|
1390
|
+
hasClear,
|
|
1391
|
+
header,
|
|
1392
|
+
size
|
|
1393
|
+
}) {
|
|
1394
|
+
const store = useFilterStore();
|
|
1395
|
+
const value = store.getConfig().filters[columnKey];
|
|
1396
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
+
chunkRJXHAQCR_cjs.TextInput,
|
|
1398
|
+
{
|
|
1399
|
+
hasClear,
|
|
1400
|
+
isLabelHidden: true,
|
|
1401
|
+
label: `Filter ${header}`,
|
|
1402
|
+
onChange: (nextValue) => {
|
|
1403
|
+
store.getConfig().onFilterChange(columnKey, nextValue === "" ? null : nextValue);
|
|
1404
|
+
},
|
|
1405
|
+
placeholder: `Filter ${header}`,
|
|
1406
|
+
size,
|
|
1407
|
+
value: typeof value === "string" ? value : ""
|
|
1408
|
+
}
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
function NumberFilterControl({
|
|
1412
|
+
columnKey,
|
|
1413
|
+
hasClear,
|
|
1414
|
+
header,
|
|
1415
|
+
operatorValue,
|
|
1416
|
+
size
|
|
1417
|
+
}) {
|
|
1418
|
+
const store = useFilterStore();
|
|
1419
|
+
const value = store.getConfig().filters[columnKey];
|
|
1420
|
+
const sharedProps = {
|
|
1421
|
+
isIntegerOnly: operatorValue.type === "integer",
|
|
1422
|
+
isLabelHidden: true,
|
|
1423
|
+
label: `Filter ${header}`,
|
|
1424
|
+
max: operatorValue.maxValue ?? null,
|
|
1425
|
+
min: operatorValue.minValue ?? null,
|
|
1426
|
+
placeholder: `Filter ${header}`,
|
|
1427
|
+
size,
|
|
1428
|
+
step: operatorValue.type === "integer" ? 1 : null,
|
|
1429
|
+
value: typeof value === "number" ? value : null
|
|
1430
|
+
};
|
|
1431
|
+
if (hasClear === false) {
|
|
1432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1433
|
+
chunkWIIDQ44X_cjs.NumberInput,
|
|
1434
|
+
{
|
|
1435
|
+
...sharedProps,
|
|
1436
|
+
onChange: (nextValue) => {
|
|
1437
|
+
store.getConfig().onFilterChange(columnKey, nextValue);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
);
|
|
1441
|
+
}
|
|
1442
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
|
+
chunkWIIDQ44X_cjs.NumberInput,
|
|
1444
|
+
{
|
|
1445
|
+
...sharedProps,
|
|
1446
|
+
hasClear: true,
|
|
1447
|
+
onChange: (nextValue) => {
|
|
1448
|
+
store.getConfig().onFilterChange(columnKey, nextValue);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
function SelectFilterControl({
|
|
1454
|
+
columnKey,
|
|
1455
|
+
hasClear,
|
|
1456
|
+
header,
|
|
1457
|
+
operatorValue,
|
|
1458
|
+
size
|
|
1459
|
+
}) {
|
|
1460
|
+
const store = useFilterStore();
|
|
1461
|
+
const value = store.getConfig().filters[columnKey];
|
|
1462
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1463
|
+
chunk6NIFOTUZ_cjs.Select,
|
|
1464
|
+
{
|
|
1465
|
+
hasClear,
|
|
1466
|
+
isLabelHidden: true,
|
|
1467
|
+
label: `Filter ${header}`,
|
|
1468
|
+
onChange: (nextValue) => {
|
|
1469
|
+
store.getConfig().onFilterChange(columnKey, nextValue);
|
|
1470
|
+
},
|
|
1471
|
+
options: operatorValue.values.map((option) => ({
|
|
1472
|
+
icon: option.icon,
|
|
1473
|
+
label: option.label,
|
|
1474
|
+
value: option.value
|
|
1475
|
+
})),
|
|
1476
|
+
placeholder: "All",
|
|
1477
|
+
size,
|
|
1478
|
+
value: typeof value === "string" ? value : null
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
function MultiSelectFilterControl({
|
|
1483
|
+
columnKey,
|
|
1484
|
+
hasClear,
|
|
1485
|
+
header,
|
|
1486
|
+
operatorValue,
|
|
1487
|
+
size
|
|
1488
|
+
}) {
|
|
1489
|
+
const store = useFilterStore();
|
|
1490
|
+
const value = store.getConfig().filters[columnKey];
|
|
1491
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1492
|
+
chunkLFZXGIR6_cjs.MultiSelect,
|
|
1493
|
+
{
|
|
1494
|
+
hasClear,
|
|
1495
|
+
hasSearch: false,
|
|
1496
|
+
hasSelectAll: true,
|
|
1497
|
+
isLabelHidden: true,
|
|
1498
|
+
label: `Filter ${header}`,
|
|
1499
|
+
onChange: (nextValue) => {
|
|
1500
|
+
store.getConfig().onFilterChange(columnKey, nextValue.length === 0 ? null : nextValue);
|
|
1501
|
+
},
|
|
1502
|
+
options: operatorValue.values.map((option) => ({
|
|
1503
|
+
icon: option.icon,
|
|
1504
|
+
label: option.label,
|
|
1505
|
+
value: option.value
|
|
1506
|
+
})),
|
|
1507
|
+
placeholder: "All",
|
|
1508
|
+
size,
|
|
1509
|
+
value: Array.isArray(value) ? value : []
|
|
1510
|
+
}
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
1513
|
+
function DateFilterControl({
|
|
1514
|
+
columnKey,
|
|
1515
|
+
hasClear,
|
|
1516
|
+
header,
|
|
1517
|
+
size
|
|
1518
|
+
}) {
|
|
1519
|
+
const store = useFilterStore();
|
|
1520
|
+
const value = store.getConfig().filters[columnKey];
|
|
1521
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
|
+
chunkTPSOUQG7_cjs.DateInput,
|
|
1523
|
+
{
|
|
1524
|
+
hasClear,
|
|
1525
|
+
isLabelHidden: true,
|
|
1526
|
+
label: `Filter ${header}`,
|
|
1527
|
+
onChange: (nextValue) => {
|
|
1528
|
+
store.getConfig().onFilterChange(columnKey, nextValue ?? null);
|
|
1529
|
+
},
|
|
1530
|
+
placeholder: `Filter ${header}`,
|
|
1531
|
+
size,
|
|
1532
|
+
value: value instanceof polyfill.Temporal.PlainDate ? value : void 0
|
|
1533
|
+
}
|
|
1534
|
+
);
|
|
1535
|
+
}
|
|
1536
|
+
function TimeFilterControl({
|
|
1537
|
+
columnKey,
|
|
1538
|
+
hasClear,
|
|
1539
|
+
header,
|
|
1540
|
+
size
|
|
1541
|
+
}) {
|
|
1542
|
+
const store = useFilterStore();
|
|
1543
|
+
const value = store.getConfig().filters[columnKey];
|
|
1544
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1545
|
+
chunkEETTQWW5_cjs.TimeInput,
|
|
1546
|
+
{
|
|
1547
|
+
hasClear,
|
|
1548
|
+
isLabelHidden: true,
|
|
1549
|
+
label: `Filter ${header}`,
|
|
1550
|
+
onChange: (nextValue) => {
|
|
1551
|
+
store.getConfig().onFilterChange(columnKey, nextValue?.toString() ?? null);
|
|
1552
|
+
},
|
|
1553
|
+
placeholder: `Filter ${header}`,
|
|
1554
|
+
size,
|
|
1555
|
+
value: value instanceof polyfill.Temporal.PlainTime ? value : void 0
|
|
1556
|
+
}
|
|
1557
|
+
);
|
|
1558
|
+
}
|
|
1559
|
+
function ListFilterControl({
|
|
1560
|
+
columnKey,
|
|
1561
|
+
hasClear,
|
|
1562
|
+
header,
|
|
1563
|
+
operatorValue,
|
|
1564
|
+
size
|
|
1565
|
+
}) {
|
|
1566
|
+
const store = useFilterStore();
|
|
1567
|
+
const value = store.getConfig().filters[columnKey];
|
|
1568
|
+
const items = Array.isArray(value) ? value.map((id) => ({ id, label: id })) : [];
|
|
1569
|
+
const source = operatorValue.searchSource ?? chunkPDXZDPOY_cjs.createStaticSource(items, { keywords: (item) => [item.id] });
|
|
1570
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
|
+
chunkWE3ECIRS_cjs.TagsInput,
|
|
1572
|
+
{
|
|
1573
|
+
hasClear,
|
|
1574
|
+
hasCreate: operatorValue.isArbitraryStringAllowed ?? true,
|
|
1575
|
+
isLabelHidden: true,
|
|
1576
|
+
label: `Filter ${header}`,
|
|
1577
|
+
onChange: (nextItems) => {
|
|
1578
|
+
const ids = nextItems.map((item) => item.id);
|
|
1579
|
+
store.getConfig().onFilterChange(columnKey, ids.length === 0 ? null : ids);
|
|
1580
|
+
},
|
|
1581
|
+
placeholder: `Filter ${header}`,
|
|
1582
|
+
renderItem: operatorValue.type === "entity_list" ? operatorValue.renderItem : void 0,
|
|
1583
|
+
searchSource: source,
|
|
1584
|
+
size,
|
|
1585
|
+
value: items
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1589
|
+
function getHeaderText(column) {
|
|
1590
|
+
return typeof column.header === "string" ? column.header : column.key;
|
|
1591
|
+
}
|
|
1592
|
+
function FilterControl({
|
|
1593
|
+
column,
|
|
1594
|
+
hasClear,
|
|
1595
|
+
operatorValue,
|
|
1596
|
+
size
|
|
1597
|
+
}) {
|
|
1598
|
+
const header = getHeaderText(column);
|
|
1599
|
+
switch (operatorValue.type) {
|
|
1600
|
+
case "date_absolute":
|
|
1601
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1602
|
+
DateFilterControl,
|
|
1603
|
+
{
|
|
1604
|
+
columnKey: column.key,
|
|
1605
|
+
hasClear,
|
|
1606
|
+
header,
|
|
1607
|
+
size
|
|
1608
|
+
}
|
|
1609
|
+
);
|
|
1610
|
+
case "enum":
|
|
1611
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1612
|
+
SelectFilterControl,
|
|
1613
|
+
{
|
|
1614
|
+
columnKey: column.key,
|
|
1615
|
+
hasClear,
|
|
1616
|
+
header,
|
|
1617
|
+
operatorValue,
|
|
1618
|
+
size
|
|
1619
|
+
}
|
|
1620
|
+
);
|
|
1621
|
+
case "enum_list":
|
|
1622
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
+
MultiSelectFilterControl,
|
|
1624
|
+
{
|
|
1625
|
+
columnKey: column.key,
|
|
1626
|
+
hasClear,
|
|
1627
|
+
header,
|
|
1628
|
+
operatorValue,
|
|
1629
|
+
size
|
|
1630
|
+
}
|
|
1631
|
+
);
|
|
1632
|
+
case "entity_list":
|
|
1633
|
+
case "string_list":
|
|
1634
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1635
|
+
ListFilterControl,
|
|
1636
|
+
{
|
|
1637
|
+
columnKey: column.key,
|
|
1638
|
+
hasClear,
|
|
1639
|
+
header,
|
|
1640
|
+
operatorValue,
|
|
1641
|
+
size
|
|
1642
|
+
}
|
|
1643
|
+
);
|
|
1644
|
+
case "float":
|
|
1645
|
+
case "integer":
|
|
1646
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
|
+
NumberFilterControl,
|
|
1648
|
+
{
|
|
1649
|
+
columnKey: column.key,
|
|
1650
|
+
hasClear,
|
|
1651
|
+
header,
|
|
1652
|
+
operatorValue,
|
|
1653
|
+
size
|
|
1654
|
+
}
|
|
1655
|
+
);
|
|
1656
|
+
case "string":
|
|
1657
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1658
|
+
TextFilterControl,
|
|
1659
|
+
{
|
|
1660
|
+
columnKey: column.key,
|
|
1661
|
+
hasClear,
|
|
1662
|
+
header,
|
|
1663
|
+
size
|
|
1664
|
+
}
|
|
1665
|
+
);
|
|
1666
|
+
case "time":
|
|
1667
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1668
|
+
TimeFilterControl,
|
|
1669
|
+
{
|
|
1670
|
+
columnKey: column.key,
|
|
1671
|
+
hasClear,
|
|
1672
|
+
header,
|
|
1673
|
+
size
|
|
1674
|
+
}
|
|
1675
|
+
);
|
|
1676
|
+
case "custom":
|
|
1677
|
+
case "date_range":
|
|
1678
|
+
case "date_relative":
|
|
1679
|
+
case "empty":
|
|
1680
|
+
case "nested":
|
|
1681
|
+
return null;
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
function PopoverFilterTrigger({
|
|
1685
|
+
column,
|
|
1686
|
+
operatorValue
|
|
1687
|
+
}) {
|
|
1688
|
+
const store = useFilterStore();
|
|
1689
|
+
const value = store.getConfig().filters[column.key];
|
|
1690
|
+
const isActive = value != null;
|
|
1691
|
+
const [isOpen, setIsOpen] = react.useState(false);
|
|
1692
|
+
const [draft, setDraft] = react.useState(null);
|
|
1693
|
+
const handleOpenChange = react.useCallback(
|
|
1694
|
+
(isOpenNext) => {
|
|
1695
|
+
if (isOpenNext) {
|
|
1696
|
+
setDraft(value ?? null);
|
|
1697
|
+
}
|
|
1698
|
+
setIsOpen(isOpenNext);
|
|
1699
|
+
},
|
|
1700
|
+
[value]
|
|
1701
|
+
);
|
|
1702
|
+
const handleApply = react.useCallback(() => {
|
|
1703
|
+
store.getConfig().onFilterChange(column.key, draft);
|
|
1704
|
+
setIsOpen(false);
|
|
1705
|
+
}, [column.key, draft, store]);
|
|
1706
|
+
const handleReset = react.useCallback(() => {
|
|
1707
|
+
store.getConfig().onFilterChange(column.key, null);
|
|
1708
|
+
setDraft(null);
|
|
1709
|
+
setIsOpen(false);
|
|
1710
|
+
}, [column.key, store]);
|
|
1711
|
+
const draftStore = react.useMemo(
|
|
1712
|
+
() => ({
|
|
1713
|
+
getConfig() {
|
|
1714
|
+
const config = store.getConfig();
|
|
1715
|
+
return {
|
|
1716
|
+
...config,
|
|
1717
|
+
filters: {
|
|
1718
|
+
...config.filters,
|
|
1719
|
+
[column.key]: draft ?? void 0
|
|
1720
|
+
},
|
|
1721
|
+
onFilterChange: (_columnKey, nextValue) => {
|
|
1722
|
+
setDraft(nextValue);
|
|
1723
|
+
}
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
}),
|
|
1727
|
+
[column.key, draft, store]
|
|
1728
|
+
);
|
|
1729
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
+
chunkWSAZHUB3_cjs.Popover,
|
|
1731
|
+
{
|
|
1732
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(FilterStoreContext, { value: draftStore, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles7.popoverContent, children: [
|
|
1733
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1734
|
+
FilterControl,
|
|
1735
|
+
{
|
|
1736
|
+
column,
|
|
1737
|
+
hasClear: false,
|
|
1738
|
+
operatorValue,
|
|
1739
|
+
size: "sm"
|
|
1740
|
+
}
|
|
1741
|
+
),
|
|
1742
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles7.popoverActions, children: [
|
|
1743
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
+
chunkNILB6Y4Z_cjs.Button,
|
|
1745
|
+
{
|
|
1746
|
+
label: "Reset",
|
|
1747
|
+
onClick: handleReset,
|
|
1748
|
+
size: "sm",
|
|
1749
|
+
variant: "ghost"
|
|
1750
|
+
}
|
|
1751
|
+
),
|
|
1752
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles7.popoverActionsSpacer }),
|
|
1753
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1754
|
+
chunkNILB6Y4Z_cjs.Button,
|
|
1755
|
+
{
|
|
1756
|
+
label: "Apply",
|
|
1757
|
+
onClick: handleApply,
|
|
1758
|
+
size: "sm",
|
|
1759
|
+
variant: "primary"
|
|
1760
|
+
}
|
|
1761
|
+
)
|
|
1762
|
+
] })
|
|
1763
|
+
] }) }),
|
|
1764
|
+
isOpen,
|
|
1765
|
+
label: `Filter ${getHeaderText(column)}`,
|
|
1766
|
+
onOpenChange: handleOpenChange,
|
|
1767
|
+
padding: "3",
|
|
1768
|
+
placement: "below",
|
|
1769
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1770
|
+
chunkNILB6Y4Z_cjs.Button,
|
|
1771
|
+
{
|
|
1772
|
+
icon: lucideReact.Filter,
|
|
1773
|
+
isIconOnly: true,
|
|
1774
|
+
label: `Filter ${getHeaderText(column)}`,
|
|
1775
|
+
size: "sm",
|
|
1776
|
+
variant: isActive ? "primary" : "ghost"
|
|
1777
|
+
}
|
|
1778
|
+
)
|
|
1779
|
+
}
|
|
1780
|
+
);
|
|
1781
|
+
}
|
|
1782
|
+
function useTableFiltering(config) {
|
|
1783
|
+
const { variant = "popover" } = config;
|
|
1784
|
+
const store = react.useMemo(
|
|
1785
|
+
() => ({
|
|
1786
|
+
getConfig: () => config
|
|
1787
|
+
}),
|
|
1788
|
+
[config]
|
|
1789
|
+
);
|
|
1790
|
+
return react.useMemo(
|
|
1791
|
+
() => ({
|
|
1792
|
+
transformColumns: variant === "inline" ? (columns) => columns.map((column) => {
|
|
1793
|
+
if (column.filter != null && column.width == null) {
|
|
1794
|
+
return { ...column, width: proportional(1) };
|
|
1795
|
+
}
|
|
1796
|
+
return column;
|
|
1797
|
+
}) : void 0,
|
|
1798
|
+
transformHeaderCell(props, column) {
|
|
1799
|
+
if (column.filter == null) {
|
|
1800
|
+
if (variant === "inline") {
|
|
1801
|
+
return {
|
|
1802
|
+
...props,
|
|
1803
|
+
htmlProps: {
|
|
1804
|
+
...props.htmlProps,
|
|
1805
|
+
style: {
|
|
1806
|
+
...props.htmlProps.style,
|
|
1807
|
+
verticalAlign: "bottom"
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
return props;
|
|
1813
|
+
}
|
|
1814
|
+
const operatorValue = resolveFilterConfig(
|
|
1815
|
+
column.filter,
|
|
1816
|
+
config.searchConfig
|
|
1817
|
+
);
|
|
1818
|
+
if (operatorValue == null) {
|
|
1819
|
+
return props;
|
|
1820
|
+
}
|
|
1821
|
+
if (variant === "popover") {
|
|
1822
|
+
return {
|
|
1823
|
+
...props,
|
|
1824
|
+
after: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles7.afterPopover, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1825
|
+
PopoverFilterTrigger,
|
|
1826
|
+
{
|
|
1827
|
+
column,
|
|
1828
|
+
operatorValue
|
|
1829
|
+
}
|
|
1830
|
+
) })
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
return {
|
|
1834
|
+
...props,
|
|
1835
|
+
below: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1836
|
+
props.below,
|
|
1837
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles7.inlineWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1838
|
+
FilterControl,
|
|
1839
|
+
{
|
|
1840
|
+
column,
|
|
1841
|
+
hasClear: true,
|
|
1842
|
+
operatorValue,
|
|
1843
|
+
size: "sm"
|
|
1844
|
+
}
|
|
1845
|
+
) })
|
|
1846
|
+
] })
|
|
1847
|
+
};
|
|
1848
|
+
},
|
|
1849
|
+
transformTableContext(children) {
|
|
1850
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FilterStoreContext, { value: store, children });
|
|
1851
|
+
}
|
|
1852
|
+
}),
|
|
1853
|
+
[config.searchConfig, store, variant]
|
|
1854
|
+
);
|
|
1855
|
+
}
|
|
1856
|
+
function useTableFilterState(initialState) {
|
|
1857
|
+
const [filters, setFilters] = react.useState(initialState ?? {});
|
|
1858
|
+
const onFilterChange = react.useCallback(
|
|
1859
|
+
(key, value) => {
|
|
1860
|
+
setFilters((previous) => {
|
|
1861
|
+
if (value == null) {
|
|
1862
|
+
const { [key]: _removed, ...next } = previous;
|
|
1863
|
+
return next;
|
|
1864
|
+
}
|
|
1865
|
+
return { ...previous, [key]: value };
|
|
1866
|
+
});
|
|
1867
|
+
},
|
|
1868
|
+
[]
|
|
1869
|
+
);
|
|
1870
|
+
const clearAll = react.useCallback(() => setFilters({}), []);
|
|
1871
|
+
return { clearAll, filters, onFilterChange };
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
// src/components/Table/plugins/pagination/paginateData.ts
|
|
1875
|
+
function paginateData(data, { page, pageSize }) {
|
|
1876
|
+
const safePage = Math.max(1, page);
|
|
1877
|
+
const safePageSize = Math.max(1, pageSize);
|
|
1878
|
+
const start = (safePage - 1) * safePageSize;
|
|
1879
|
+
return data.slice(start, start + safePageSize);
|
|
1880
|
+
}
|
|
1881
|
+
var styles8 = {
|
|
1882
|
+
align: {
|
|
1883
|
+
center: chunkAZDWQGAX_cjs.css({ justifyContent: "center" }),
|
|
1884
|
+
end: chunkAZDWQGAX_cjs.css({ justifyContent: "flex-end" }),
|
|
1885
|
+
start: chunkAZDWQGAX_cjs.css({ justifyContent: "flex-start" })
|
|
1886
|
+
},
|
|
1887
|
+
below: chunkAZDWQGAX_cjs.css({ mt: "2" }),
|
|
1888
|
+
root: chunkAZDWQGAX_cjs.css({ display: "flex" }),
|
|
1889
|
+
above: chunkAZDWQGAX_cjs.css({ mb: "2" })
|
|
1890
|
+
};
|
|
1891
|
+
function useTablePagination({
|
|
1892
|
+
align = "center",
|
|
1893
|
+
hasMore,
|
|
1894
|
+
label = "Table pagination",
|
|
1895
|
+
onPageChange,
|
|
1896
|
+
page,
|
|
1897
|
+
pageSize = 10,
|
|
1898
|
+
position = "below",
|
|
1899
|
+
size = "md",
|
|
1900
|
+
totalItems,
|
|
1901
|
+
totalPages,
|
|
1902
|
+
variant = "pages"
|
|
1903
|
+
}) {
|
|
1904
|
+
const computedTotalPages = totalPages ?? (totalItems == null ? void 0 : Math.ceil(totalItems / pageSize));
|
|
1905
|
+
const paginationProps = react.useMemo(
|
|
1906
|
+
() => ({
|
|
1907
|
+
hasMore,
|
|
1908
|
+
label,
|
|
1909
|
+
onChange: onPageChange,
|
|
1910
|
+
page,
|
|
1911
|
+
pageSize,
|
|
1912
|
+
size,
|
|
1913
|
+
...totalItems != null ? { totalItems } : computedTotalPages != null ? { totalPages: computedTotalPages } : {},
|
|
1914
|
+
variant
|
|
1915
|
+
}),
|
|
1916
|
+
[
|
|
1917
|
+
computedTotalPages,
|
|
1918
|
+
hasMore,
|
|
1919
|
+
label,
|
|
1920
|
+
onPageChange,
|
|
1921
|
+
page,
|
|
1922
|
+
pageSize,
|
|
1923
|
+
size,
|
|
1924
|
+
totalItems,
|
|
1925
|
+
variant
|
|
1926
|
+
]
|
|
1927
|
+
);
|
|
1928
|
+
return react.useMemo(
|
|
1929
|
+
() => ({
|
|
1930
|
+
transformTableContext(children) {
|
|
1931
|
+
const current = { align, paginationProps, position };
|
|
1932
|
+
if (current.position === "none") {
|
|
1933
|
+
return children;
|
|
1934
|
+
}
|
|
1935
|
+
if (computedTotalPages === 1 && hasMore !== true) {
|
|
1936
|
+
return children;
|
|
1937
|
+
}
|
|
1938
|
+
const makePagination = (side) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1939
|
+
"div",
|
|
1940
|
+
{
|
|
1941
|
+
className: `${styles8.root} ${styles8.align[current.align]} ${side === "above" ? styles8.above : styles8.below}`,
|
|
1942
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunk32XQJNKY_cjs.Pagination, { ...current.paginationProps })
|
|
1943
|
+
}
|
|
1944
|
+
);
|
|
1945
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1946
|
+
(current.position === "above" || current.position === "both") && makePagination("above"),
|
|
1947
|
+
children,
|
|
1948
|
+
(current.position === "below" || current.position === "both") && makePagination("below")
|
|
1949
|
+
] });
|
|
1950
|
+
}
|
|
1951
|
+
}),
|
|
1952
|
+
[align, computedTotalPages, hasMore, paginationProps, position]
|
|
1953
|
+
);
|
|
1954
|
+
}
|
|
1955
|
+
var styles9 = {
|
|
1956
|
+
center: chunkAZDWQGAX_cjs.css({
|
|
1957
|
+
display: "flex",
|
|
1958
|
+
alignItems: "center",
|
|
1959
|
+
justifyContent: "center"
|
|
1960
|
+
}),
|
|
1961
|
+
selectedRow: chunkAZDWQGAX_cjs.css({
|
|
1962
|
+
bg: "bg.selected"
|
|
1963
|
+
})
|
|
1964
|
+
};
|
|
1965
|
+
var SELECTION_COLUMN_KEY = "__table_selection";
|
|
1966
|
+
function createSelectionStore(configRef) {
|
|
1967
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1968
|
+
return {
|
|
1969
|
+
getConfig: () => configRef.current,
|
|
1970
|
+
notify: () => {
|
|
1971
|
+
for (const listener of listeners) {
|
|
1972
|
+
listener();
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
subscribe: (listener) => {
|
|
1976
|
+
listeners.add(listener);
|
|
1977
|
+
return () => {
|
|
1978
|
+
listeners.delete(listener);
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
function applyRowSelectionStyle(element, isSelected) {
|
|
1984
|
+
element.classList.toggle(styles9.selectedRow, isSelected);
|
|
1985
|
+
if (isSelected) {
|
|
1986
|
+
element.setAttribute("aria-selected", "true");
|
|
1987
|
+
} else {
|
|
1988
|
+
element.removeAttribute("aria-selected");
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
var ITEM_SELECTED = 1;
|
|
1992
|
+
var ITEM_SELECTABLE = 2;
|
|
1993
|
+
var ITEM_ENABLED = 4;
|
|
1994
|
+
function getItemSelectionSnapshot(config, item) {
|
|
1995
|
+
const isSelected = config.getIsItemSelected(item);
|
|
1996
|
+
const isSelectable = config.getIsItemSelectable?.(item) ?? true;
|
|
1997
|
+
const isEnabled = config.getIsItemEnabled?.(item) ?? true;
|
|
1998
|
+
return (isSelected ? ITEM_SELECTED : 0) | (isSelectable ? ITEM_SELECTABLE : 0) | (isEnabled ? ITEM_ENABLED : 0);
|
|
1999
|
+
}
|
|
2000
|
+
var SELECT_NONE = 0;
|
|
2001
|
+
var SELECT_INDETERMINATE = 1;
|
|
2002
|
+
var SELECT_ALL = 2;
|
|
2003
|
+
var SelectionStoreContext = react.createContext(null);
|
|
2004
|
+
SelectionStoreContext.displayName = "TableSelectionStoreContext";
|
|
2005
|
+
function SelectAllCheckbox() {
|
|
2006
|
+
const store = react.use(SelectionStoreContext);
|
|
2007
|
+
if (store == null) {
|
|
2008
|
+
return null;
|
|
2009
|
+
}
|
|
2010
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectAllCheckboxInner, { store });
|
|
2011
|
+
}
|
|
2012
|
+
function SelectAllCheckboxInner({
|
|
2013
|
+
store
|
|
2014
|
+
}) {
|
|
2015
|
+
const getSnapshot = react.useCallback(() => {
|
|
2016
|
+
const config = store.getConfig();
|
|
2017
|
+
if (config.getIsAllSelected()) {
|
|
2018
|
+
return SELECT_ALL;
|
|
2019
|
+
}
|
|
2020
|
+
return config.getIsIndeterminate?.() === true ? SELECT_INDETERMINATE : SELECT_NONE;
|
|
2021
|
+
}, [store]);
|
|
2022
|
+
const state = react.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
|
|
2023
|
+
const isAllSelected = state === SELECT_ALL;
|
|
2024
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2025
|
+
chunk5EQN3YMQ_cjs.CheckboxInput,
|
|
2026
|
+
{
|
|
2027
|
+
isLabelHidden: true,
|
|
2028
|
+
label: "Select all rows",
|
|
2029
|
+
onChange: () => {
|
|
2030
|
+
store.getConfig().onSelectAll({
|
|
2031
|
+
isAllSelected: !isAllSelected
|
|
2032
|
+
});
|
|
2033
|
+
},
|
|
2034
|
+
size: "sm",
|
|
2035
|
+
value: isAllSelected ? true : state === SELECT_INDETERMINATE ? "indeterminate" : false
|
|
2036
|
+
}
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
function SelectionCellContent({
|
|
2040
|
+
item
|
|
2041
|
+
}) {
|
|
2042
|
+
const store = react.use(SelectionStoreContext);
|
|
2043
|
+
if (store == null) {
|
|
2044
|
+
return null;
|
|
2045
|
+
}
|
|
2046
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectionCellContentInner, { item, store });
|
|
2047
|
+
}
|
|
2048
|
+
function SelectionCellContentInner({
|
|
2049
|
+
item,
|
|
2050
|
+
store
|
|
2051
|
+
}) {
|
|
2052
|
+
const getSnapshot = react.useCallback(
|
|
2053
|
+
() => getItemSelectionSnapshot(store.getConfig(), item),
|
|
2054
|
+
[item, store]
|
|
2055
|
+
);
|
|
2056
|
+
const state = react.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
|
|
2057
|
+
const isSelected = (state & ITEM_SELECTED) !== 0;
|
|
2058
|
+
const isSelectable = (state & ITEM_SELECTABLE) !== 0;
|
|
2059
|
+
const isEnabled = (state & ITEM_ENABLED) !== 0;
|
|
2060
|
+
if (!isSelectable) {
|
|
2061
|
+
return null;
|
|
2062
|
+
}
|
|
2063
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
|
+
chunk5EQN3YMQ_cjs.CheckboxInput,
|
|
2065
|
+
{
|
|
2066
|
+
isDisabled: !isEnabled,
|
|
2067
|
+
isLabelHidden: true,
|
|
2068
|
+
label: "Select row",
|
|
2069
|
+
onChange: () => {
|
|
2070
|
+
store.getConfig().onSelectItem({ isSelected: !isSelected, item });
|
|
2071
|
+
},
|
|
2072
|
+
size: "sm",
|
|
2073
|
+
value: isSelected
|
|
2074
|
+
}
|
|
2075
|
+
);
|
|
2076
|
+
}
|
|
2077
|
+
function useTableSelection(config) {
|
|
2078
|
+
const configRef = react.useRef(config);
|
|
2079
|
+
configRef.current = config;
|
|
2080
|
+
const storeRef = react.useRef(null);
|
|
2081
|
+
storeRef.current ?? (storeRef.current = createSelectionStore(configRef));
|
|
2082
|
+
const store = storeRef.current;
|
|
2083
|
+
react.useEffect(() => {
|
|
2084
|
+
store.notify();
|
|
2085
|
+
});
|
|
2086
|
+
const selectionColumn = react.useMemo(
|
|
2087
|
+
() => ({
|
|
2088
|
+
header: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles9.center, children: /* @__PURE__ */ jsxRuntime.jsx(SelectAllCheckbox, {}) }),
|
|
2089
|
+
key: SELECTION_COLUMN_KEY,
|
|
2090
|
+
renderCell: (item) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles9.center, children: /* @__PURE__ */ jsxRuntime.jsx(SelectionCellContent, { item }) }),
|
|
2091
|
+
resizable: false,
|
|
2092
|
+
width: pixel(36)
|
|
2093
|
+
}),
|
|
2094
|
+
[]
|
|
2095
|
+
);
|
|
2096
|
+
return react.useMemo(
|
|
2097
|
+
() => ({
|
|
2098
|
+
transformTableContext(children) {
|
|
2099
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2100
|
+
SelectionStoreContext,
|
|
2101
|
+
{
|
|
2102
|
+
value: store,
|
|
2103
|
+
children
|
|
2104
|
+
}
|
|
2105
|
+
);
|
|
2106
|
+
},
|
|
2107
|
+
transformBodyRow(props, item) {
|
|
2108
|
+
let unsubscribe = null;
|
|
2109
|
+
const selectionRef = (element) => {
|
|
2110
|
+
unsubscribe?.();
|
|
2111
|
+
unsubscribe = null;
|
|
2112
|
+
if (element == null) {
|
|
2113
|
+
return;
|
|
2114
|
+
}
|
|
2115
|
+
applyRowSelectionStyle(
|
|
2116
|
+
element,
|
|
2117
|
+
store.getConfig().getIsItemSelected(item)
|
|
2118
|
+
);
|
|
2119
|
+
unsubscribe = store.subscribe(() => {
|
|
2120
|
+
if (!element.isConnected) {
|
|
2121
|
+
unsubscribe?.();
|
|
2122
|
+
unsubscribe = null;
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
applyRowSelectionStyle(
|
|
2126
|
+
element,
|
|
2127
|
+
store.getConfig().getIsItemSelected(item)
|
|
2128
|
+
);
|
|
2129
|
+
});
|
|
2130
|
+
};
|
|
2131
|
+
return {
|
|
2132
|
+
...props,
|
|
2133
|
+
ref: props.ref == null ? selectionRef : chunk6SHL7FYO_cjs.mergeRefs(props.ref, selectionRef)
|
|
2134
|
+
};
|
|
2135
|
+
},
|
|
2136
|
+
transformColumns(columns) {
|
|
2137
|
+
return [selectionColumn, ...columns];
|
|
2138
|
+
}
|
|
2139
|
+
}),
|
|
2140
|
+
[selectionColumn, store]
|
|
2141
|
+
);
|
|
2142
|
+
}
|
|
2143
|
+
var stableTrue = () => true;
|
|
2144
|
+
function useTableSelectionState({
|
|
2145
|
+
data,
|
|
2146
|
+
getIsItemEnabled = stableTrue,
|
|
2147
|
+
getIsItemSelectable = stableTrue,
|
|
2148
|
+
idKey,
|
|
2149
|
+
selectedKeys,
|
|
2150
|
+
setSelectedKeys
|
|
2151
|
+
}) {
|
|
2152
|
+
const getId = react.useCallback(
|
|
2153
|
+
(item) => typeof idKey === "function" ? idKey(item) : String(item[idKey]),
|
|
2154
|
+
[idKey]
|
|
2155
|
+
);
|
|
2156
|
+
const getIsActionable = react.useCallback(
|
|
2157
|
+
(item) => getIsItemSelectable(item) && getIsItemEnabled(item),
|
|
2158
|
+
[getIsItemEnabled, getIsItemSelectable]
|
|
2159
|
+
);
|
|
2160
|
+
const actionableIDs = react.useMemo(
|
|
2161
|
+
() => new Set(data.filter(getIsActionable).map(getId)),
|
|
2162
|
+
[data, getId, getIsActionable]
|
|
2163
|
+
);
|
|
2164
|
+
const frozenSelectedIDs = react.useMemo(() => {
|
|
2165
|
+
const frozen = /* @__PURE__ */ new Set();
|
|
2166
|
+
for (const id of selectedKeys) {
|
|
2167
|
+
if (!actionableIDs.has(id)) {
|
|
2168
|
+
frozen.add(id);
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
return frozen;
|
|
2172
|
+
}, [actionableIDs, selectedKeys]);
|
|
2173
|
+
const allSelectableIDs = react.useMemo(
|
|
2174
|
+
() => /* @__PURE__ */ new Set([...selectedKeys, ...actionableIDs]),
|
|
2175
|
+
[actionableIDs, selectedKeys]
|
|
2176
|
+
);
|
|
2177
|
+
const onSelectAll = react.useCallback(
|
|
2178
|
+
({ isAllSelected }) => {
|
|
2179
|
+
setSelectedKeys(isAllSelected ? allSelectableIDs : frozenSelectedIDs);
|
|
2180
|
+
},
|
|
2181
|
+
[allSelectableIDs, frozenSelectedIDs, setSelectedKeys]
|
|
2182
|
+
);
|
|
2183
|
+
const onSelectItem = react.useCallback(
|
|
2184
|
+
({ isSelected, item }) => {
|
|
2185
|
+
setSelectedKeys((previous) => {
|
|
2186
|
+
const next = new Set(previous);
|
|
2187
|
+
const id = getId(item);
|
|
2188
|
+
if (isSelected) {
|
|
2189
|
+
next.add(id);
|
|
2190
|
+
} else {
|
|
2191
|
+
next.delete(id);
|
|
2192
|
+
}
|
|
2193
|
+
return next;
|
|
2194
|
+
});
|
|
2195
|
+
},
|
|
2196
|
+
[getId, setSelectedKeys]
|
|
2197
|
+
);
|
|
2198
|
+
const getIsAllSelected = react.useCallback(
|
|
2199
|
+
() => allSelectableIDs.size > 0 && allSelectableIDs.size === selectedKeys.size,
|
|
2200
|
+
[allSelectableIDs, selectedKeys]
|
|
2201
|
+
);
|
|
2202
|
+
const getIsIndeterminate = react.useCallback(() => {
|
|
2203
|
+
const selectedActionableCount = data.filter(
|
|
2204
|
+
(item) => getIsActionable(item) && selectedKeys.has(getId(item))
|
|
2205
|
+
).length;
|
|
2206
|
+
return selectedActionableCount > 0 && selectedActionableCount < actionableIDs.size;
|
|
2207
|
+
}, [actionableIDs.size, data, getId, getIsActionable, selectedKeys]);
|
|
2208
|
+
const selectionConfig = react.useMemo(
|
|
2209
|
+
() => ({
|
|
2210
|
+
getIsAllSelected,
|
|
2211
|
+
getIsIndeterminate,
|
|
2212
|
+
getIsItemEnabled,
|
|
2213
|
+
getIsItemSelectable,
|
|
2214
|
+
getIsItemSelected: (item) => selectedKeys.has(getId(item)),
|
|
2215
|
+
onSelectAll,
|
|
2216
|
+
onSelectItem
|
|
2217
|
+
}),
|
|
2218
|
+
[
|
|
2219
|
+
getId,
|
|
2220
|
+
getIsAllSelected,
|
|
2221
|
+
getIsIndeterminate,
|
|
2222
|
+
getIsItemEnabled,
|
|
2223
|
+
getIsItemSelectable,
|
|
2224
|
+
onSelectAll,
|
|
2225
|
+
onSelectItem,
|
|
2226
|
+
selectedKeys
|
|
2227
|
+
]
|
|
2228
|
+
);
|
|
2229
|
+
return { selectionConfig };
|
|
2230
|
+
}
|
|
2231
|
+
var styles10 = {
|
|
2232
|
+
button: chunkAZDWQGAX_cjs.css({
|
|
2233
|
+
display: "flex",
|
|
2234
|
+
alignItems: "center",
|
|
2235
|
+
gap: "1",
|
|
2236
|
+
w: "full",
|
|
2237
|
+
h: "full",
|
|
2238
|
+
p: 0,
|
|
2239
|
+
m: 0,
|
|
2240
|
+
borderWidth: 0,
|
|
2241
|
+
borderRadius: "sm",
|
|
2242
|
+
bg: "transparent",
|
|
2243
|
+
color: "inherit",
|
|
2244
|
+
cursor: "pointer",
|
|
2245
|
+
font: "inherit",
|
|
2246
|
+
textAlign: "inherit",
|
|
2247
|
+
_focusVisible: {
|
|
2248
|
+
outlineWidth: "focus",
|
|
2249
|
+
outlineStyle: "solid",
|
|
2250
|
+
outlineColor: "primary",
|
|
2251
|
+
outlineOffset: "focusOffset"
|
|
2252
|
+
},
|
|
2253
|
+
'&:is(:hover, [data-hover]) [data-table-sort-icon-state="inactive"], &:is(:focus-visible, [data-focus-visible]) [data-table-sort-icon-state="inactive"]': {
|
|
2254
|
+
opacity: 1
|
|
2255
|
+
}
|
|
2256
|
+
}),
|
|
2257
|
+
icon: chunkAZDWQGAX_cjs.css({
|
|
2258
|
+
display: "inline-flex",
|
|
2259
|
+
flexShrink: 0,
|
|
2260
|
+
color: "fg.muted"
|
|
2261
|
+
}),
|
|
2262
|
+
iconInactive: chunkAZDWQGAX_cjs.css({
|
|
2263
|
+
opacity: 0.35
|
|
2264
|
+
}),
|
|
2265
|
+
iconActive: chunkAZDWQGAX_cjs.css({
|
|
2266
|
+
color: "primary"
|
|
2267
|
+
}),
|
|
2268
|
+
label: chunkAZDWQGAX_cjs.css({
|
|
2269
|
+
minW: 0,
|
|
2270
|
+
overflow: "hidden",
|
|
2271
|
+
textOverflow: "ellipsis"
|
|
2272
|
+
}),
|
|
2273
|
+
rank: chunkAZDWQGAX_cjs.css({
|
|
2274
|
+
color: "primary",
|
|
2275
|
+
fontSize: "2xs",
|
|
2276
|
+
lineHeight: 1
|
|
2277
|
+
})
|
|
2278
|
+
};
|
|
2279
|
+
function resolveSortKey(column) {
|
|
2280
|
+
if (!column.sortable) {
|
|
2281
|
+
return null;
|
|
2282
|
+
}
|
|
2283
|
+
return column.sortable === true ? column.key : column.sortable.sortKey ?? column.key;
|
|
2284
|
+
}
|
|
2285
|
+
function getHeaderLabel(column) {
|
|
2286
|
+
return typeof column.header === "string" ? column.header : column.key;
|
|
2287
|
+
}
|
|
2288
|
+
function getNextDirection(current, hasUnsortedState) {
|
|
2289
|
+
if (current == null) {
|
|
2290
|
+
return "ascending";
|
|
2291
|
+
}
|
|
2292
|
+
if (current === "ascending") {
|
|
2293
|
+
return "descending";
|
|
2294
|
+
}
|
|
2295
|
+
return hasUnsortedState ? null : "ascending";
|
|
2296
|
+
}
|
|
2297
|
+
function SortHeaderButton({
|
|
2298
|
+
children,
|
|
2299
|
+
column,
|
|
2300
|
+
config
|
|
2301
|
+
}) {
|
|
2302
|
+
const sortKey = resolveSortKey(column) ?? "";
|
|
2303
|
+
const entryIndex = config.sort.findIndex((entry2) => entry2.sortKey === sortKey);
|
|
2304
|
+
const entry = entryIndex >= 0 ? config.sort[entryIndex] : null;
|
|
2305
|
+
const direction = entry?.direction ?? null;
|
|
2306
|
+
const rank = config.isMultiSortEnabled === true && config.sort.length > 1 && entryIndex >= 0 ? entryIndex + 1 : null;
|
|
2307
|
+
const SortIcon = direction === "ascending" ? lucideReact.ArrowUp : direction === "descending" ? lucideReact.ArrowDown : lucideReact.ChevronsUpDown;
|
|
2308
|
+
const label = getHeaderLabel(column);
|
|
2309
|
+
const ariaLabel = direction == null ? `Sort by ${label}` : `Sort by ${label}, sorted ${direction}${rank == null ? "" : `, priority ${rank} of ${config.sort.length}`}`;
|
|
2310
|
+
const handleClick = (event) => {
|
|
2311
|
+
const nextConfig = config;
|
|
2312
|
+
const isMultiSort = event.shiftKey && nextConfig.isMultiSortEnabled === true;
|
|
2313
|
+
const allowUnsorted = nextConfig.hasUnsortedState ?? true;
|
|
2314
|
+
if (isMultiSort) {
|
|
2315
|
+
const index = nextConfig.sort.findIndex((sort) => sort.sortKey === sortKey);
|
|
2316
|
+
if (index >= 0) {
|
|
2317
|
+
const nextDirection2 = getNextDirection(
|
|
2318
|
+
nextConfig.sort[index].direction,
|
|
2319
|
+
allowUnsorted
|
|
2320
|
+
);
|
|
2321
|
+
const nextSort = [...nextConfig.sort];
|
|
2322
|
+
if (nextDirection2 == null) {
|
|
2323
|
+
nextSort.splice(index, 1);
|
|
2324
|
+
} else {
|
|
2325
|
+
nextSort[index] = { ...nextSort[index], direction: nextDirection2 };
|
|
2326
|
+
}
|
|
2327
|
+
nextConfig.onSortChange(nextSort);
|
|
2328
|
+
} else {
|
|
2329
|
+
nextConfig.onSortChange([
|
|
2330
|
+
...nextConfig.sort,
|
|
2331
|
+
{ direction: "ascending", sortKey }
|
|
2332
|
+
]);
|
|
2333
|
+
}
|
|
2334
|
+
return;
|
|
2335
|
+
}
|
|
2336
|
+
const currentEntry = nextConfig.sort.find((sort) => sort.sortKey === sortKey);
|
|
2337
|
+
const nextDirection = getNextDirection(
|
|
2338
|
+
currentEntry?.direction ?? null,
|
|
2339
|
+
allowUnsorted
|
|
2340
|
+
);
|
|
2341
|
+
nextConfig.onSortChange(
|
|
2342
|
+
nextDirection == null ? [] : [{ direction: nextDirection, sortKey }]
|
|
2343
|
+
);
|
|
2344
|
+
};
|
|
2345
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2346
|
+
"button",
|
|
2347
|
+
{
|
|
2348
|
+
"aria-label": ariaLabel,
|
|
2349
|
+
className: styles10.button,
|
|
2350
|
+
onClick: handleClick,
|
|
2351
|
+
type: "button",
|
|
2352
|
+
children: [
|
|
2353
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles10.label, children }),
|
|
2354
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2355
|
+
"span",
|
|
2356
|
+
{
|
|
2357
|
+
className: `${styles10.icon} ${direction == null ? styles10.iconInactive : styles10.iconActive}`,
|
|
2358
|
+
"data-table-sort-icon-state": direction == null ? "inactive" : "active",
|
|
2359
|
+
"data-testid": `table-sort-icon-${sortKey}`,
|
|
2360
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkPHFEQG4E_cjs.Icon, { icon: SortIcon, size: "sm" })
|
|
2361
|
+
}
|
|
2362
|
+
),
|
|
2363
|
+
rank == null ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: styles10.rank, children: rank })
|
|
2364
|
+
]
|
|
2365
|
+
}
|
|
2366
|
+
);
|
|
2367
|
+
}
|
|
2368
|
+
function useTableSortable(config) {
|
|
2369
|
+
const sortableConfig = config;
|
|
2370
|
+
return react.useMemo(
|
|
2371
|
+
() => ({
|
|
2372
|
+
transformHeaderCell(props, column) {
|
|
2373
|
+
const sortKey = resolveSortKey(column);
|
|
2374
|
+
if (sortKey == null) {
|
|
2375
|
+
return props;
|
|
2376
|
+
}
|
|
2377
|
+
const entry = sortableConfig.sort.find(
|
|
2378
|
+
(sort) => sort.sortKey === sortKey
|
|
2379
|
+
);
|
|
2380
|
+
return {
|
|
2381
|
+
...props,
|
|
2382
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(SortHeaderButton, { column, config: sortableConfig, children: props.content }),
|
|
2383
|
+
htmlProps: {
|
|
2384
|
+
...props.htmlProps,
|
|
2385
|
+
...entry == null ? {} : { "aria-sort": entry.direction }
|
|
2386
|
+
}
|
|
2387
|
+
};
|
|
2388
|
+
}
|
|
2389
|
+
}),
|
|
2390
|
+
[sortableConfig]
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
function stringifySortable(value) {
|
|
2394
|
+
if (value instanceof polyfill.Temporal.Instant || value instanceof polyfill.Temporal.PlainDate || value instanceof polyfill.Temporal.PlainDateTime || value instanceof polyfill.Temporal.PlainTime || value instanceof polyfill.Temporal.ZonedDateTime) {
|
|
2395
|
+
return value.toString();
|
|
2396
|
+
}
|
|
2397
|
+
if (typeof value === "bigint" || typeof value === "boolean" || typeof value === "number" || typeof value === "string") {
|
|
2398
|
+
return String(value);
|
|
2399
|
+
}
|
|
2400
|
+
return "";
|
|
2401
|
+
}
|
|
2402
|
+
function defaultCompare(a, b, sortKey) {
|
|
2403
|
+
const left = a[sortKey];
|
|
2404
|
+
const right = b[sortKey];
|
|
2405
|
+
if (left == null && right == null) {
|
|
2406
|
+
return 0;
|
|
2407
|
+
}
|
|
2408
|
+
if (left == null) {
|
|
2409
|
+
return 1;
|
|
2410
|
+
}
|
|
2411
|
+
if (right == null) {
|
|
2412
|
+
return -1;
|
|
2413
|
+
}
|
|
2414
|
+
if (typeof left === "number" && typeof right === "number") {
|
|
2415
|
+
return left - right;
|
|
2416
|
+
}
|
|
2417
|
+
return stringifySortable(left).localeCompare(
|
|
2418
|
+
stringifySortable(right),
|
|
2419
|
+
void 0,
|
|
2420
|
+
{
|
|
2421
|
+
numeric: true
|
|
2422
|
+
}
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2425
|
+
function useTableSortableState({
|
|
2426
|
+
hasUnsortedState,
|
|
2427
|
+
comparators,
|
|
2428
|
+
data,
|
|
2429
|
+
defaultSort = [],
|
|
2430
|
+
isMultiSortEnabled,
|
|
2431
|
+
onSortChange: controlledOnSortChange,
|
|
2432
|
+
sort: controlledSort
|
|
2433
|
+
}) {
|
|
2434
|
+
const [uncontrolledSort, setUncontrolledSort] = react.useState(defaultSort);
|
|
2435
|
+
const sort = controlledSort ?? uncontrolledSort;
|
|
2436
|
+
const onSortChange = react.useCallback(
|
|
2437
|
+
(nextSort) => {
|
|
2438
|
+
if (controlledSort == null) {
|
|
2439
|
+
setUncontrolledSort(nextSort);
|
|
2440
|
+
}
|
|
2441
|
+
controlledOnSortChange?.(nextSort);
|
|
2442
|
+
},
|
|
2443
|
+
[controlledOnSortChange, controlledSort]
|
|
2444
|
+
);
|
|
2445
|
+
const applySort = react.useCallback(
|
|
2446
|
+
(items) => {
|
|
2447
|
+
if (sort.length === 0) {
|
|
2448
|
+
return items;
|
|
2449
|
+
}
|
|
2450
|
+
return [...items].sort((a, b) => {
|
|
2451
|
+
for (const entry of sort) {
|
|
2452
|
+
const customCompare = comparators?.[entry.sortKey];
|
|
2453
|
+
const result = customCompare == null ? defaultCompare(a, b, entry.sortKey) : customCompare(a, b);
|
|
2454
|
+
if (result !== 0) {
|
|
2455
|
+
return entry.direction === "ascending" ? result : -result;
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
return 0;
|
|
2459
|
+
});
|
|
2460
|
+
},
|
|
2461
|
+
[comparators, sort]
|
|
2462
|
+
);
|
|
2463
|
+
const sortedData = react.useMemo(() => applySort(data), [applySort, data]);
|
|
2464
|
+
const sortConfig = react.useMemo(
|
|
2465
|
+
() => ({
|
|
2466
|
+
hasUnsortedState,
|
|
2467
|
+
isMultiSortEnabled,
|
|
2468
|
+
onSortChange,
|
|
2469
|
+
sort
|
|
2470
|
+
}),
|
|
2471
|
+
[hasUnsortedState, isMultiSortEnabled, onSortChange, sort]
|
|
2472
|
+
);
|
|
2473
|
+
return { applySort, sort, sortConfig, sortedData };
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
exports.BaseTable = BaseTable;
|
|
2477
|
+
exports.DEFAULT_MIN_COLUMN_WIDTH = DEFAULT_MIN_COLUMN_WIDTH;
|
|
2478
|
+
exports.Table = Table;
|
|
2479
|
+
exports.TableBody = TableBody;
|
|
2480
|
+
exports.TableCell = TableCell;
|
|
2481
|
+
exports.TableFooter = TableFooter;
|
|
2482
|
+
exports.TableHeader = TableHeader;
|
|
2483
|
+
exports.TableHeaderCell = TableHeaderCell;
|
|
2484
|
+
exports.TableRow = TableRow;
|
|
2485
|
+
exports.capitalize = capitalize;
|
|
2486
|
+
exports.defaultCellRenderer = defaultCellRenderer;
|
|
2487
|
+
exports.generateColumns = generateColumns;
|
|
2488
|
+
exports.paginateData = paginateData;
|
|
2489
|
+
exports.pixel = pixel;
|
|
2490
|
+
exports.proportional = proportional;
|
|
2491
|
+
exports.resolveColumnWidths = resolveColumnWidths;
|
|
2492
|
+
exports.toSearchFilters = toSearchFilters;
|
|
2493
|
+
exports.useBaseTablePlugins = useBaseTablePlugins;
|
|
2494
|
+
exports.useTableColumnResize = useTableColumnResize;
|
|
2495
|
+
exports.useTableColumnSettings = useTableColumnSettings;
|
|
2496
|
+
exports.useTableColumnSettingsState = useTableColumnSettingsState;
|
|
2497
|
+
exports.useTableFilterState = useTableFilterState;
|
|
2498
|
+
exports.useTableFiltering = useTableFiltering;
|
|
2499
|
+
exports.useTablePagination = useTablePagination;
|
|
2500
|
+
exports.useTableSelection = useTableSelection;
|
|
2501
|
+
exports.useTableSelectionState = useTableSelectionState;
|
|
2502
|
+
exports.useTableSortable = useTableSortable;
|
|
2503
|
+
exports.useTableSortableState = useTableSortableState;
|
|
2504
|
+
//# sourceMappingURL=chunk-GKG47NK6.cjs.map
|
|
2505
|
+
//# sourceMappingURL=chunk-GKG47NK6.cjs.map
|