@42-central/ui-react 0.19.2 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/biome/no-gray-scale-class.grit +27 -0
- package/dist/chunk-2HIX6DKN.js +85 -0
- package/dist/chunk-2HIX6DKN.js.map +1 -0
- package/dist/chunk-2LI3VPDP.js +39 -0
- package/dist/chunk-2LI3VPDP.js.map +1 -0
- package/dist/{chunk-VZH6TS7M.js → chunk-2MXWEIMD.js} +12 -6
- package/dist/chunk-2MXWEIMD.js.map +1 -0
- package/dist/{chunk-SVKU3GUN.js → chunk-3BXKTWWD.js} +14 -14
- package/dist/chunk-3BXKTWWD.js.map +1 -0
- package/dist/{chunk-Z6RPMRFH.js → chunk-45QRQKRC.js} +10 -9
- package/dist/chunk-45QRQKRC.js.map +1 -0
- package/dist/chunk-47LEAR6G.js +437 -0
- package/dist/chunk-47LEAR6G.js.map +1 -0
- package/dist/chunk-4ASNIDV7.js +17 -0
- package/dist/chunk-4ASNIDV7.js.map +1 -0
- package/dist/{chunk-P3XMBETI.js → chunk-4G3N7UMJ.js} +4 -7
- package/dist/chunk-4G3N7UMJ.js.map +1 -0
- package/dist/{chunk-LM6F6DLR.js → chunk-5HUEBSIS.js} +19 -10
- package/dist/chunk-5HUEBSIS.js.map +1 -0
- package/dist/{chunk-RKYXG6X7.js → chunk-6M6YZ3PQ.js} +17 -14
- package/dist/chunk-6M6YZ3PQ.js.map +1 -0
- package/dist/chunk-6N6J2DOE.js +27 -0
- package/dist/chunk-6N6J2DOE.js.map +1 -0
- package/dist/{chunk-CYWMES5P.js → chunk-6VYGK3Q3.js} +24 -12
- package/dist/chunk-6VYGK3Q3.js.map +1 -0
- package/dist/{chunk-IG7FBZVM.js → chunk-6YNLRQ25.js} +13 -12
- package/dist/chunk-6YNLRQ25.js.map +1 -0
- package/dist/{chunk-A6MYJTJI.js → chunk-7AQ4MN4M.js} +8 -9
- package/dist/chunk-7AQ4MN4M.js.map +1 -0
- package/dist/chunk-7BOSX65U.js +176 -0
- package/dist/chunk-7BOSX65U.js.map +1 -0
- package/dist/{chunk-BTFBBNRW.js → chunk-7CNDZZZ6.js} +6 -6
- package/dist/{chunk-BTFBBNRW.js.map → chunk-7CNDZZZ6.js.map} +1 -1
- package/dist/chunk-7TDHT3QD.js +62 -0
- package/dist/chunk-7TDHT3QD.js.map +1 -0
- package/dist/chunk-AHM6SGEU.js +15 -0
- package/dist/chunk-AHM6SGEU.js.map +1 -0
- package/dist/chunk-AZ2VUAGX.js +3 -0
- package/dist/chunk-AZ2VUAGX.js.map +1 -0
- package/dist/{chunk-RIP5G47F.js → chunk-BE2LWUHY.js} +14 -12
- package/dist/chunk-BE2LWUHY.js.map +1 -0
- package/dist/{chunk-YW6Q6ERX.js → chunk-BNWQ7IAZ.js} +49 -56
- package/dist/chunk-BNWQ7IAZ.js.map +1 -0
- package/dist/{chunk-HCYULRWT.js → chunk-C4NFRSOR.js} +39 -35
- package/dist/chunk-C4NFRSOR.js.map +1 -0
- package/dist/chunk-C6NVU4F7.js +89 -0
- package/dist/chunk-C6NVU4F7.js.map +1 -0
- package/dist/chunk-CQ4M4BSF.js +12 -0
- package/dist/chunk-CQ4M4BSF.js.map +1 -0
- package/dist/chunk-D2QIPQ74.js +80 -0
- package/dist/chunk-D2QIPQ74.js.map +1 -0
- package/dist/chunk-DA4QII2N.js +104 -0
- package/dist/chunk-DA4QII2N.js.map +1 -0
- package/dist/chunk-DHM4IG2O.js +13 -0
- package/dist/chunk-DHM4IG2O.js.map +1 -0
- package/dist/chunk-DJLNGWMM.js +140 -0
- package/dist/chunk-DJLNGWMM.js.map +1 -0
- package/dist/chunk-DT6LKNZF.js +148 -0
- package/dist/chunk-DT6LKNZF.js.map +1 -0
- package/dist/chunk-E5H3YWZV.js +337 -0
- package/dist/chunk-E5H3YWZV.js.map +1 -0
- package/dist/{chunk-K5UWVH6P.js → chunk-E63VD25L.js} +36 -27
- package/dist/chunk-E63VD25L.js.map +1 -0
- package/dist/chunk-EIBDLRAR.js +30 -0
- package/dist/chunk-EIBDLRAR.js.map +1 -0
- package/dist/chunk-F342ZT7O.js +104 -0
- package/dist/chunk-F342ZT7O.js.map +1 -0
- package/dist/chunk-FUNTJZX7.js +217 -0
- package/dist/chunk-FUNTJZX7.js.map +1 -0
- package/dist/chunk-GIPQUKCN.js +44 -0
- package/dist/chunk-GIPQUKCN.js.map +1 -0
- package/dist/{chunk-IRXZHLUL.js → chunk-H3PYSAWN.js} +5 -5
- package/dist/chunk-H3PYSAWN.js.map +1 -0
- package/dist/{chunk-AIQG7IIT.js → chunk-H7WOMZXO.js} +10 -5
- package/dist/chunk-H7WOMZXO.js.map +1 -0
- package/dist/chunk-HBWV5EPU.js +31 -0
- package/dist/chunk-HBWV5EPU.js.map +1 -0
- package/dist/chunk-HC4XVBP2.js +118 -0
- package/dist/chunk-HC4XVBP2.js.map +1 -0
- package/dist/chunk-HDYORQZN.js +23 -0
- package/dist/chunk-HDYORQZN.js.map +1 -0
- package/dist/{chunk-4NNGTNPV.js → chunk-HRNWWL3Y.js} +49 -35
- package/dist/chunk-HRNWWL3Y.js.map +1 -0
- package/dist/chunk-HX3LNK26.js +193 -0
- package/dist/chunk-HX3LNK26.js.map +1 -0
- package/dist/chunk-IOYZC7SA.js +948 -0
- package/dist/chunk-IOYZC7SA.js.map +1 -0
- package/dist/{chunk-57BTVRRB.js → chunk-IPYHTCFL.js} +3 -3
- package/dist/{chunk-57BTVRRB.js.map → chunk-IPYHTCFL.js.map} +1 -1
- package/dist/chunk-J2WSKRJW.js +3 -0
- package/dist/chunk-J2WSKRJW.js.map +1 -0
- package/dist/chunk-J43LSYQO.js +14 -0
- package/dist/chunk-J43LSYQO.js.map +1 -0
- package/dist/chunk-JQJ23YQX.js +38 -0
- package/dist/chunk-JQJ23YQX.js.map +1 -0
- package/dist/{chunk-WJOHNCYY.js → chunk-JVG5ISPT.js} +38 -91
- package/dist/chunk-JVG5ISPT.js.map +1 -0
- package/dist/chunk-JYKP4RSG.js +304 -0
- package/dist/chunk-JYKP4RSG.js.map +1 -0
- package/dist/chunk-K6YASO4L.js +25 -0
- package/dist/chunk-K6YASO4L.js.map +1 -0
- package/dist/{chunk-GCGX4FEF.js → chunk-KMZENCEP.js} +28 -42
- package/dist/chunk-KMZENCEP.js.map +1 -0
- package/dist/{chunk-UJZIF2BA.js → chunk-LBAE6FP6.js} +41 -55
- package/dist/chunk-LBAE6FP6.js.map +1 -0
- package/dist/{chunk-YQHOKMSV.js → chunk-LKFHUDEW.js} +61 -54
- package/dist/chunk-LKFHUDEW.js.map +1 -0
- package/dist/{chunk-PINENGML.js → chunk-MKKQE3TM.js} +16 -9
- package/dist/chunk-MKKQE3TM.js.map +1 -0
- package/dist/{chunk-2SVX3MQQ.js → chunk-MW42XVPD.js} +3 -3
- package/dist/{chunk-2SVX3MQQ.js.map → chunk-MW42XVPD.js.map} +1 -1
- package/dist/{chunk-VZBUQNLX.js → chunk-MXAACRWE.js} +52 -41
- package/dist/chunk-MXAACRWE.js.map +1 -0
- package/dist/{chunk-OGJFDNIS.js → chunk-NJPHZBLI.js} +86 -55
- package/dist/chunk-NJPHZBLI.js.map +1 -0
- package/dist/{chunk-WSIVRDRB.js → chunk-NKOTA5TM.js} +4 -4
- package/dist/{chunk-WSIVRDRB.js.map → chunk-NKOTA5TM.js.map} +1 -1
- package/dist/{chunk-FOMR74VE.js → chunk-NLOBBJAA.js} +6 -6
- package/dist/chunk-NLOBBJAA.js.map +1 -0
- package/dist/{chunk-YWRBG23W.js → chunk-NS6RGPWR.js} +7 -4
- package/dist/chunk-NS6RGPWR.js.map +1 -0
- package/dist/{chunk-FAOBC4IS.js → chunk-O5W3QWJ6.js} +39 -29
- package/dist/chunk-O5W3QWJ6.js.map +1 -0
- package/dist/chunk-O7LS6OZR.js +309 -0
- package/dist/chunk-O7LS6OZR.js.map +1 -0
- package/dist/{chunk-BEL75C7N.js → chunk-PMUCGFY5.js} +6 -4
- package/dist/chunk-PMUCGFY5.js.map +1 -0
- package/dist/{chunk-Z43YWH4R.js → chunk-POKLPMSB.js} +48 -26
- package/dist/chunk-POKLPMSB.js.map +1 -0
- package/dist/chunk-QKSLDQM2.js +120 -0
- package/dist/chunk-QKSLDQM2.js.map +1 -0
- package/dist/chunk-QNKD2SQM.js +340 -0
- package/dist/chunk-QNKD2SQM.js.map +1 -0
- package/dist/{chunk-I4SQQIP5.js → chunk-R5LYFTHA.js} +2 -2
- package/dist/chunk-R5LYFTHA.js.map +1 -0
- package/dist/{chunk-64T6Z7BA.js → chunk-RCF7HTG5.js} +108 -96
- package/dist/chunk-RCF7HTG5.js.map +1 -0
- package/dist/{chunk-CTSO6V72.js → chunk-RLOWPCGG.js} +12 -6
- package/dist/chunk-RLOWPCGG.js.map +1 -0
- package/dist/chunk-RNRD6ER5.js +32 -0
- package/dist/chunk-RNRD6ER5.js.map +1 -0
- package/dist/chunk-SDVZFXQ2.js +21 -0
- package/dist/chunk-SDVZFXQ2.js.map +1 -0
- package/dist/{chunk-CZEKZ5HR.js → chunk-SVKN5ZHX.js} +33 -12
- package/dist/chunk-SVKN5ZHX.js.map +1 -0
- package/dist/{chunk-QIDAXFKK.js → chunk-SWVUXEBT.js} +53 -19
- package/dist/chunk-SWVUXEBT.js.map +1 -0
- package/dist/chunk-SXNAUSEB.js +62 -0
- package/dist/chunk-SXNAUSEB.js.map +1 -0
- package/dist/chunk-TCFB23JT.js +354 -0
- package/dist/chunk-TCFB23JT.js.map +1 -0
- package/dist/chunk-TWLJQE75.js +345 -0
- package/dist/chunk-TWLJQE75.js.map +1 -0
- package/dist/{chunk-CHTN5AHI.js → chunk-TWNIAF7K.js} +4 -4
- package/dist/chunk-TWNIAF7K.js.map +1 -0
- package/dist/chunk-UAYENYS2.js +293 -0
- package/dist/chunk-UAYENYS2.js.map +1 -0
- package/dist/chunk-UT3TOV2Q.js +93 -0
- package/dist/chunk-UT3TOV2Q.js.map +1 -0
- package/dist/{chunk-YKUCSV34.js → chunk-UXPINIDN.js} +8 -14
- package/dist/chunk-UXPINIDN.js.map +1 -0
- package/dist/{chunk-TBTSEPGP.js → chunk-VD6PB3VA.js} +10 -8
- package/dist/chunk-VD6PB3VA.js.map +1 -0
- package/dist/{chunk-2NNZHVKD.js → chunk-VTDBWU6H.js} +23 -19
- package/dist/chunk-VTDBWU6H.js.map +1 -0
- package/dist/chunk-WG3BCIU4.js +20 -0
- package/dist/chunk-WG3BCIU4.js.map +1 -0
- package/dist/chunk-XFEPUGUZ.js +15 -0
- package/dist/chunk-XFEPUGUZ.js.map +1 -0
- package/dist/{chunk-CSCVTESP.js → chunk-XKDL4QS6.js} +5 -12
- package/dist/chunk-XKDL4QS6.js.map +1 -0
- package/dist/chunk-XXOR34T4.js +10 -0
- package/dist/chunk-XXOR34T4.js.map +1 -0
- package/dist/chunk-Y57NW6G7.js +316 -0
- package/dist/chunk-Y57NW6G7.js.map +1 -0
- package/dist/chunk-ZYX564HO.js +27 -0
- package/dist/chunk-ZYX564HO.js.map +1 -0
- package/dist/colors.css +16 -8
- package/dist/components/accordion/accordion.d.ts +13 -4
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/accordion/index.js +28 -16
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/action-icon/action-icon.d.ts.map +1 -1
- package/dist/components/action-icon/index.js +6 -5
- package/dist/components/alert/alert.d.ts +20 -8
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.d.ts.map +1 -1
- package/dist/components/alert/index.js +23 -11
- package/dist/components/alert/index.js.map +1 -1
- package/dist/components/ambient-background/ambient-background.d.ts +13 -3
- package/dist/components/ambient-background/ambient-background.d.ts.map +1 -1
- package/dist/components/ambient-background/index.js +39 -28
- package/dist/components/ambient-background/index.js.map +1 -1
- package/dist/components/app-shell/app-shell.d.ts +68 -6
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/index.d.ts +1 -1
- package/dist/components/app-shell/index.d.ts.map +1 -1
- package/dist/components/app-shell/index.js +47 -19
- package/dist/components/app-shell/index.js.map +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +39 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.d.ts.map +1 -0
- package/dist/components/aspect-ratio/index.js +33 -0
- package/dist/components/aspect-ratio/index.js.map +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +17 -20
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +14 -2
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/avatar/index.d.ts.map +1 -1
- package/dist/components/avatar/index.js +27 -14
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/index.js +6 -100
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +21 -5
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +31 -7
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/button.d.ts +37 -16
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +6 -5
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-multi-select/index.js +11 -9
- package/dist/components/button-multi-select/index.js.map +1 -1
- package/dist/components/button-select/button-select.d.ts.map +1 -1
- package/dist/components/button-select/index.js +11 -9
- package/dist/components/button-select/index.js.map +1 -1
- package/dist/components/calendar/calendar-body.d.ts +10 -1
- package/dist/components/calendar/calendar-body.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +24 -7
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.d.ts +2 -1
- package/dist/components/calendar/index.d.ts.map +1 -1
- package/dist/components/calendar/index.js +11 -9
- package/dist/components/camera/camera-machine.d.ts +131 -0
- package/dist/components/camera/camera-machine.d.ts.map +1 -0
- package/dist/components/camera/camera.d.ts +230 -0
- package/dist/components/camera/camera.d.ts.map +1 -0
- package/dist/components/camera/fake-camera.d.ts +77 -0
- package/dist/components/camera/fake-camera.d.ts.map +1 -0
- package/dist/components/camera/index.d.ts +5 -0
- package/dist/components/camera/index.d.ts.map +1 -0
- package/dist/components/camera/index.js +38 -0
- package/dist/components/camera/index.js.map +1 -0
- package/dist/components/camera/platform.d.ts +21 -0
- package/dist/components/camera/platform.d.ts.map +1 -0
- package/dist/components/camera/use-camera.d.ts +98 -0
- package/dist/components/camera/use-camera.d.ts.map +1 -0
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/index.js +3 -2
- package/dist/components/carousel/carousel.d.ts +270 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.d.ts.map +1 -0
- package/dist/components/carousel/index.js +666 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/chart/chart.d.ts +20 -2
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +12 -2
- package/dist/components/chart/index.js.map +1 -1
- package/dist/components/chart/styles.css +12 -10
- package/dist/components/checkbox/checkbox.d.ts +8 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +8 -6
- package/dist/components/choice-card-group/choice-card-group.d.ts +1 -1
- package/dist/components/choice-card-group/choice-card-group.d.ts.map +1 -1
- package/dist/components/choice-card-group/index.js +51 -49
- package/dist/components/choice-card-group/index.js.map +1 -1
- package/dist/components/circular-progress/circular-progress.d.ts +9 -1
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +13 -2
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/clipboard.d.ts +17 -8
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/copy.d.ts +19 -5
- package/dist/components/clipboard/copy.d.ts.map +1 -1
- package/dist/components/clipboard/index.d.ts +1 -1
- package/dist/components/clipboard/index.d.ts.map +1 -1
- package/dist/components/clipboard/index.js +61 -24
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code/code.d.ts.map +1 -1
- package/dist/components/code/index.js +4 -3
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/code-block/chrome.d.ts +10 -9
- package/dist/components/code-block/chrome.d.ts.map +1 -1
- package/dist/components/code-block/chrome.js +11 -9
- package/dist/components/code-block/code-block.d.ts +6 -11
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/index.d.ts +2 -2
- package/dist/components/code-block/index.d.ts.map +1 -1
- package/dist/components/code-block/index.js +12 -10
- package/dist/components/code-block/index.js.map +1 -1
- package/dist/components/code-block/static.d.ts +3 -5
- package/dist/components/code-block/static.d.ts.map +1 -1
- package/dist/components/code-block/static.js +4 -1
- package/dist/components/code-block/static.js.map +1 -1
- package/dist/components/collapse/index.js +3 -3
- package/dist/components/combobox/combobox.d.ts +2 -2
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +11 -9
- package/dist/components/combobox-list/combobox-list.d.ts +10 -2
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/combobox-search-row.d.ts +31 -0
- package/dist/components/combobox-list/combobox-search-row.d.ts.map +1 -0
- package/dist/components/combobox-list/index.d.ts +1 -1
- package/dist/components/combobox-list/index.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +14 -11
- package/dist/components/compare/compare.d.ts +45 -0
- package/dist/components/compare/compare.d.ts.map +1 -0
- package/dist/components/compare/index.d.ts +2 -0
- package/dist/components/compare/index.d.ts.map +1 -0
- package/dist/components/compare/index.js +206 -0
- package/dist/components/compare/index.js.map +1 -0
- package/dist/components/container/container.d.ts +7 -1
- package/dist/components/container/container.d.ts.map +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/container/index.js.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts +13 -12
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/index.d.ts +8 -4
- package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
- package/dist/components/data-table/data-table-header-cell.d.ts +6 -9
- package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
- package/dist/components/data-table/data-table-icons.d.ts +27 -0
- package/dist/components/data-table/data-table-icons.d.ts.map +1 -0
- package/dist/components/data-table/data-table-pagination.d.ts +18 -3
- package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts +5 -2
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table-state.d.ts.map +1 -1
- package/dist/components/data-table/data-table-toolbar.d.ts +7 -2
- package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
- package/dist/components/data-table/data-table-translations.d.ts +11 -2
- package/dist/components/data-table/data-table-translations.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts +12 -1
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.d.ts +1 -0
- package/dist/components/data-table/index.d.ts.map +1 -1
- package/dist/components/data-table/index.js +282 -199
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/aliases.d.ts +7 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +15 -6
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-time-text.d.ts +2 -2
- package/dist/components/date-picker/date-time-text.d.ts.map +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +24 -21
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/divider/divider.d.ts +12 -3
- package/dist/components/divider/divider.d.ts.map +1 -1
- package/dist/components/divider/index.js +3 -2
- package/dist/components/download-button/download-button.d.ts +69 -0
- package/dist/components/download-button/download-button.d.ts.map +1 -0
- package/dist/components/download-button/index.d.ts +2 -0
- package/dist/components/download-button/index.d.ts.map +1 -0
- package/dist/components/download-button/index.js +13 -0
- package/dist/components/download-button/index.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +79 -44
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +11 -7
- package/dist/components/field/field.d.ts +8 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +3 -2
- package/dist/components/figure/figure.d.ts +27 -0
- package/dist/components/figure/figure.d.ts.map +1 -0
- package/dist/components/figure/index.d.ts +2 -0
- package/dist/components/figure/index.d.ts.map +1 -0
- package/dist/components/figure/index.js +7 -0
- package/dist/components/figure/index.js.map +1 -0
- package/dist/components/file-item/file-item.d.ts +178 -0
- package/dist/components/file-item/file-item.d.ts.map +1 -0
- package/dist/components/file-item/index.d.ts +2 -0
- package/dist/components/file-item/index.d.ts.map +1 -0
- package/dist/components/file-item/index.js +25 -0
- package/dist/components/file-item/index.js.map +1 -0
- package/dist/components/file-preview/file-preview.d.ts +189 -0
- package/dist/components/file-preview/file-preview.d.ts.map +1 -0
- package/dist/components/file-preview/index.d.ts +2 -0
- package/dist/components/file-preview/index.d.ts.map +1 -0
- package/dist/components/file-preview/index.js +572 -0
- package/dist/components/file-preview/index.js.map +1 -0
- package/dist/components/file-queue-summary/file-queue-summary.d.ts +35 -0
- package/dist/components/file-queue-summary/file-queue-summary.d.ts.map +1 -0
- package/dist/components/file-queue-summary/index.d.ts +3 -0
- package/dist/components/file-queue-summary/index.d.ts.map +1 -0
- package/dist/components/file-queue-summary/index.js +7 -0
- package/dist/components/file-queue-summary/index.js.map +1 -0
- package/dist/components/file-trigger/file-trigger.d.ts +40 -0
- package/dist/components/file-trigger/file-trigger.d.ts.map +1 -0
- package/dist/components/file-trigger/index.d.ts +2 -0
- package/dist/components/file-trigger/index.d.ts.map +1 -0
- package/dist/components/file-trigger/index.js +11 -0
- package/dist/components/file-trigger/index.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +102 -14
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +206 -102
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/flex/flex.d.ts +14 -2
- package/dist/components/flex/flex.d.ts.map +1 -1
- package/dist/components/flex/index.js +3 -2
- package/dist/components/gallery/gallery.d.ts +77 -0
- package/dist/components/gallery/gallery.d.ts.map +1 -0
- package/dist/components/gallery/index.d.ts +3 -0
- package/dist/components/gallery/index.d.ts.map +1 -0
- package/dist/components/gallery/index.js +272 -0
- package/dist/components/gallery/index.js.map +1 -0
- package/dist/components/gallery/layout.d.ts +96 -0
- package/dist/components/gallery/layout.d.ts.map +1 -0
- package/dist/components/grid/grid.d.ts +7 -1
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/index.js +3 -11
- package/dist/components/grid/index.js.map +1 -1
- package/dist/components/hover-card/index.js +5 -4
- package/dist/components/hover-card/index.js.map +1 -1
- package/dist/components/image/blur-svg.d.ts +11 -0
- package/dist/components/image/blur-svg.d.ts.map +1 -0
- package/dist/components/image/image.d.ts +126 -0
- package/dist/components/image/image.d.ts.map +1 -0
- package/dist/components/image/index.d.ts +3 -0
- package/dist/components/image/index.d.ts.map +1 -0
- package/dist/components/image/index.js +12 -0
- package/dist/components/image/index.js.map +1 -0
- package/dist/components/image/srcset.d.ts +47 -0
- package/dist/components/image/srcset.d.ts.map +1 -0
- package/dist/components/image-cropper/image-cropper.d.ts +208 -0
- package/dist/components/image-cropper/image-cropper.d.ts.map +1 -0
- package/dist/components/image-cropper/index.d.ts +2 -0
- package/dist/components/image-cropper/index.d.ts.map +1 -0
- package/dist/components/image-cropper/index.js +22 -0
- package/dist/components/image-cropper/index.js.map +1 -0
- package/dist/components/indicator/index.js +11 -4
- package/dist/components/indicator/index.js.map +1 -1
- package/dist/components/indicator/indicator.d.ts +21 -8
- package/dist/components/indicator/indicator.d.ts.map +1 -1
- package/dist/components/input/index.js +4 -3
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/index.d.ts.map +1 -1
- package/dist/components/kbd/index.js +10 -78
- package/dist/components/kbd/index.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts +45 -3
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/lightbox/index.d.ts +2 -0
- package/dist/components/lightbox/index.d.ts.map +1 -0
- package/dist/components/lightbox/index.js +1922 -0
- package/dist/components/lightbox/index.js.map +1 -0
- package/dist/components/lightbox/lightbox-controller.d.ts +97 -0
- package/dist/components/lightbox/lightbox-controller.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox-machine.d.ts +165 -0
- package/dist/components/lightbox/lightbox-machine.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox-zoom.d.ts +72 -0
- package/dist/components/lightbox/lightbox-zoom.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox.d.ts +297 -0
- package/dist/components/lightbox/lightbox.d.ts.map +1 -0
- package/dist/components/mark/index.js +2 -2
- package/dist/components/mark/mark.d.ts.map +1 -1
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/index.d.ts.map +1 -1
- package/dist/components/menu/index.js +13 -7
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/menu-data.d.ts +5 -8
- package/dist/components/menu/menu-data.d.ts.map +1 -1
- package/dist/components/menu/menu.d.ts +40 -18
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +11 -7
- package/dist/components/modal/modal.d.ts +25 -19
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.d.ts +1 -1
- package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +16 -13
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +10 -2
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +26 -20
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +5 -2
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +10 -7
- package/dist/components/nav-link/nav-link.d.ts +5 -2
- package/dist/components/nav-link/nav-link.d.ts.map +1 -1
- package/dist/components/nav-link/navigation.d.ts +8 -1
- package/dist/components/nav-link/navigation.d.ts.map +1 -1
- package/dist/components/nav-link/tanstack.js +10 -7
- package/dist/components/nav-link/tanstack.js.map +1 -1
- package/dist/components/notification/create-notifier.d.ts +4 -1
- package/dist/components/notification/create-notifier.d.ts.map +1 -1
- package/dist/components/notification/index.d.ts +1 -1
- package/dist/components/notification/index.d.ts.map +1 -1
- package/dist/components/notification/index.js +60 -22
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.d.ts +41 -11
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.d.ts.map +1 -1
- package/dist/components/number-input/index.js +11 -9
- package/dist/components/number-input/number-input.d.ts +9 -1
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/create-overlays.d.ts.map +1 -1
- package/dist/components/overlays/dialog-parts.d.ts +59 -0
- package/dist/components/overlays/dialog-parts.d.ts.map +1 -0
- package/dist/components/overlays/index.js +29 -32
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/overlays/renderer.d.ts.map +1 -1
- package/dist/components/overlays/store.d.ts.map +1 -1
- package/dist/components/password-input/index.d.ts +1 -1
- package/dist/components/password-input/index.d.ts.map +1 -1
- package/dist/components/password-input/index.js +14 -6
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +10 -1
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/photo-capture/index.d.ts +4 -0
- package/dist/components/photo-capture/index.d.ts.map +1 -0
- package/dist/components/photo-capture/index.js +519 -0
- package/dist/components/photo-capture/index.js.map +1 -0
- package/dist/components/photo-capture/photo-capture-machine.d.ts +74 -0
- package/dist/components/photo-capture/photo-capture-machine.d.ts.map +1 -0
- package/dist/components/photo-capture/photo-capture.d.ts +192 -0
- package/dist/components/photo-capture/photo-capture.d.ts.map +1 -0
- package/dist/components/photo-capture/use-photo-capture.d.ts +92 -0
- package/dist/components/photo-capture/use-photo-capture.d.ts.map +1 -0
- package/dist/components/pill/index.js +6 -4
- package/dist/components/pill/pill.d.ts +4 -3
- package/dist/components/pill/pill.d.ts.map +1 -1
- package/dist/components/pills-input/index.d.ts +1 -1
- package/dist/components/pills-input/index.d.ts.map +1 -1
- package/dist/components/pills-input/index.js +13 -7
- package/dist/components/pills-input/pills-input.d.ts +29 -10
- package/dist/components/pills-input/pills-input.d.ts.map +1 -1
- package/dist/components/pin-input/index.d.ts +1 -1
- package/dist/components/pin-input/index.d.ts.map +1 -1
- package/dist/components/pin-input/index.js +40 -13
- package/dist/components/pin-input/index.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts +14 -2
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/popover/icons.d.ts +9 -4
- package/dist/components/popover/icons.d.ts.map +1 -1
- package/dist/components/popover/index.js +5 -4
- package/dist/components/popover/popover.d.ts +12 -8
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.js +4 -109
- package/dist/components/progress/index.js.map +1 -1
- package/dist/components/progress/progress.d.ts +9 -1
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/radio-group/index.js +12 -6
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts +3 -3
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/rating/icons.d.ts +0 -10
- package/dist/components/rating/icons.d.ts.map +1 -1
- package/dist/components/rating/index.d.ts +1 -1
- package/dist/components/rating/index.d.ts.map +1 -1
- package/dist/components/rating/index.js +17 -7
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts +18 -8
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.d.ts +6 -23
- package/dist/components/schedule/index.d.ts.map +1 -1
- package/dist/components/schedule/index.js +3315 -2730
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/schedule/now-cursor-line.d.ts +11 -3
- package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
- package/dist/components/schedule/schedule-agenda-list.d.ts +1 -1
- package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -1
- package/dist/components/schedule/schedule-agenda-view.d.ts +3 -4
- package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-all-day-row.d.ts +3 -1
- package/dist/components/schedule/schedule-all-day-row.d.ts.map +1 -1
- package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -1
- package/dist/components/schedule/schedule-dates.d.ts +42 -19
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
- package/dist/components/schedule/schedule-day-column.d.ts +111 -0
- package/dist/components/schedule/schedule-day-column.d.ts.map +1 -0
- package/dist/components/schedule/schedule-days-view.d.ts +2 -2
- package/dist/components/schedule/schedule-days-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-chip.d.ts +31 -2
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-details-popover.d.ts +57 -0
- package/dist/components/schedule/schedule-event-details-popover.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts +4 -1
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-pill.d.ts +68 -0
- package/dist/components/schedule/schedule-event-pill.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-styles.d.ts +54 -0
- package/dist/components/schedule/schedule-event-styles.d.ts.map +1 -1
- package/dist/components/schedule/schedule-geometry.d.ts +10 -8
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
- package/dist/components/schedule/schedule-grid-gesture.d.ts +24 -2
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
- package/dist/components/schedule/schedule-icons.d.ts +20 -0
- package/dist/components/schedule/schedule-icons.d.ts.map +1 -0
- package/dist/components/schedule/schedule-month-view.d.ts +1 -1
- package/dist/components/schedule/schedule-month-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-overflow-chip.d.ts +4 -2
- package/dist/components/schedule/schedule-overflow-chip.d.ts.map +1 -1
- package/dist/components/schedule/schedule-overflow-popover.d.ts +4 -1
- package/dist/components/schedule/schedule-overflow-popover.d.ts.map +1 -1
- package/dist/components/schedule/schedule-slot-cursor.d.ts +36 -0
- package/dist/components/schedule/schedule-slot-cursor.d.ts.map +1 -0
- package/dist/components/schedule/schedule-timed-grid-chrome.d.ts +86 -0
- package/dist/components/schedule/schedule-timed-grid-chrome.d.ts.map +1 -0
- package/dist/components/schedule/schedule-timed-grid.d.ts +3 -1
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
- package/dist/components/schedule/schedule-toolbar.d.ts +33 -10
- package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
- package/dist/components/schedule/schedule-types.d.ts +103 -15
- package/dist/components/schedule/schedule-types.d.ts.map +1 -1
- package/dist/components/schedule/schedule-view-pagination-chrome.d.ts +36 -0
- package/dist/components/schedule/schedule-view-pagination-chrome.d.ts.map +1 -0
- package/dist/components/schedule/schedule-year-view.d.ts +1 -1
- package/dist/components/schedule/schedule-year-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule.d.ts +0 -18
- package/dist/components/schedule/schedule.d.ts.map +1 -1
- package/dist/components/schedule/use-chip-keyboard-move.d.ts +45 -0
- package/dist/components/schedule/use-chip-keyboard-move.d.ts.map +1 -0
- package/dist/components/schedule/use-chip-motion.d.ts +28 -0
- package/dist/components/schedule/use-chip-motion.d.ts.map +1 -0
- package/dist/components/schedule/use-date-grid-navigation.d.ts +59 -0
- package/dist/components/schedule/use-date-grid-navigation.d.ts.map +1 -0
- package/dist/components/schedule/use-event-drag.d.ts.map +1 -1
- package/dist/components/schedule/use-event-resize.d.ts +10 -2
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
- package/dist/components/schedule/use-schedule-reveal.d.ts +29 -0
- package/dist/components/schedule/use-schedule-reveal.d.ts.map +1 -0
- package/dist/components/schedule/use-schedule-selection.d.ts +3 -1
- package/dist/components/schedule/use-schedule-selection.d.ts.map +1 -1
- package/dist/components/schedule/use-timed-grid-announcer.d.ts +21 -0
- package/dist/components/schedule/use-timed-grid-announcer.d.ts.map +1 -0
- package/dist/components/schedule/use-timed-grid-paging.d.ts +36 -0
- package/dist/components/schedule/use-timed-grid-paging.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +9 -7
- package/dist/components/segment-group/segment-group.d.ts +1 -1
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.js +14 -12
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +3 -2
- package/dist/components/slider/index.js +6 -256
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/slider.d.ts +18 -10
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/spinner/index.js +3 -2
- package/dist/components/spinner/spinner.d.ts +7 -36
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spotlight/context.d.ts +50 -0
- package/dist/components/spotlight/context.d.ts.map +1 -0
- package/dist/components/spotlight/create-spotlight.d.ts +193 -0
- package/dist/components/spotlight/create-spotlight.d.ts.map +1 -0
- package/dist/components/spotlight/highlight.d.ts +23 -0
- package/dist/components/spotlight/highlight.d.ts.map +1 -0
- package/dist/components/spotlight/icons.d.ts +14 -0
- package/dist/components/spotlight/icons.d.ts.map +1 -0
- package/dist/components/spotlight/index.d.ts +12 -0
- package/dist/components/spotlight/index.d.ts.map +1 -0
- package/dist/components/spotlight/index.js +1695 -0
- package/dist/components/spotlight/index.js.map +1 -0
- package/dist/components/spotlight/label.d.ts +9 -0
- package/dist/components/spotlight/label.d.ts.map +1 -0
- package/dist/components/spotlight/recents.d.ts +29 -0
- package/dist/components/spotlight/recents.d.ts.map +1 -0
- package/dist/components/spotlight/spotlight-engine.d.ts +86 -0
- package/dist/components/spotlight/spotlight-engine.d.ts.map +1 -0
- package/dist/components/spotlight/spotlight.d.ts +233 -0
- package/dist/components/spotlight/spotlight.d.ts.map +1 -0
- package/dist/components/spotlight/static-source.d.ts +32 -0
- package/dist/components/spotlight/static-source.d.ts.map +1 -0
- package/dist/components/spotlight/store.d.ts +39 -0
- package/dist/components/spotlight/store.d.ts.map +1 -0
- package/dist/components/spotlight/translations.d.ts +90 -0
- package/dist/components/spotlight/translations.d.ts.map +1 -0
- package/dist/components/spotlight/types.d.ts +297 -0
- package/dist/components/spotlight/types.d.ts.map +1 -0
- package/dist/components/spotlight/view.d.ts +139 -0
- package/dist/components/spotlight/view.d.ts.map +1 -0
- package/dist/components/switch/index.js +8 -7
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/table/index.js +4 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/index.js +6 -5
- package/dist/components/tabs/tabs-data.d.ts +6 -2
- package/dist/components/tabs/tabs-data.d.ts.map +1 -1
- package/dist/components/tabs/tabs.d.ts +55 -34
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tags-input/index.js +42 -25
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +12 -5
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/text/index.js +3 -3
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/text-input/index.js +4 -3
- package/dist/components/text-input/index.js.map +1 -1
- package/dist/components/textarea/index.js +4 -3
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/theme-icon/index.js +3 -3
- package/dist/components/theme-script/index.js.map +1 -1
- package/dist/components/theme-script/theme-script.d.ts +2 -2
- package/dist/components/theme-script/theme-script.d.ts.map +1 -1
- package/dist/components/time-input/hour-cycle.d.ts +17 -7
- package/dist/components/time-input/hour-cycle.d.ts.map +1 -1
- package/dist/components/time-input/index.js +22 -21
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/time-input/time-input.d.ts +2 -1
- package/dist/components/time-input/time-input.d.ts.map +1 -1
- package/dist/components/time-input/time-row.d.ts +20 -1
- package/dist/components/time-input/time-row.d.ts.map +1 -1
- package/dist/components/timeline/index.d.ts +1 -1
- package/dist/components/timeline/index.d.ts.map +1 -1
- package/dist/components/timeline/index.js +44 -31
- package/dist/components/timeline/index.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts +16 -2
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/title/index.js +3 -3
- package/dist/components/title/title.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +4 -3
- package/dist/components/tooltip/tooltip.d.ts +6 -4
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.d.ts +1 -1
- package/dist/components/tree-multi-select/index.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.js +112 -248
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +12 -5
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +105 -321
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-popover.d.ts +126 -0
- package/dist/components/tree-select/tree-popover.d.ts.map +1 -0
- package/dist/components/tree-select/tree-select.d.ts +24 -2
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -113
- package/dist/index.js.map +1 -1
- package/dist/lib/as-child.d.ts +1 -1
- package/dist/lib/cn.d.ts.map +1 -1
- package/dist/lib/cn.js +1 -1
- package/dist/lib/cutout.d.ts +34 -0
- package/dist/lib/cutout.d.ts.map +1 -0
- package/dist/lib/dev-warn.d.ts +11 -0
- package/dist/lib/dev-warn.d.ts.map +1 -1
- package/dist/lib/file-kind-icons.d.ts +5 -0
- package/dist/lib/file-kind-icons.d.ts.map +1 -0
- package/dist/lib/file-queue-summary.d.ts +89 -0
- package/dist/lib/file-queue-summary.d.ts.map +1 -0
- package/dist/lib/file-queue.d.ts +147 -0
- package/dist/lib/file-queue.d.ts.map +1 -0
- package/dist/lib/files.d.ts +29 -0
- package/dist/lib/files.d.ts.map +1 -0
- package/dist/lib/focus-styles.d.ts +46 -7
- package/dist/lib/focus-styles.d.ts.map +1 -1
- package/dist/lib/gap.d.ts +17 -0
- package/dist/lib/gap.d.ts.map +1 -0
- package/dist/lib/graphemes.d.ts +10 -0
- package/dist/lib/graphemes.d.ts.map +1 -0
- package/dist/lib/icons.d.ts +34 -0
- package/dist/lib/icons.d.ts.map +1 -0
- package/dist/lib/image-file.d.ts +9 -0
- package/dist/lib/image-file.d.ts.map +1 -0
- package/dist/lib/merge-refs.d.ts +34 -7
- package/dist/lib/merge-refs.d.ts.map +1 -1
- package/dist/lib/motion/animate.d.ts +42 -0
- package/dist/lib/motion/animate.d.ts.map +1 -0
- package/dist/lib/motion/easing.d.ts +33 -0
- package/dist/lib/motion/easing.d.ts.map +1 -0
- package/dist/lib/motion/gesture.d.ts +127 -0
- package/dist/lib/motion/gesture.d.ts.map +1 -0
- package/dist/lib/motion/morph.d.ts +61 -0
- package/dist/lib/motion/morph.d.ts.map +1 -0
- package/dist/lib/motion/physics.d.ts +44 -0
- package/dist/lib/motion/physics.d.ts.map +1 -0
- package/dist/lib/motion/rect.d.ts +39 -0
- package/dist/lib/motion/rect.d.ts.map +1 -0
- package/dist/lib/motion/reduced-motion.d.ts +23 -0
- package/dist/lib/motion/reduced-motion.d.ts.map +1 -0
- package/dist/lib/motion/spring.d.ts +80 -0
- package/dist/lib/motion/spring.d.ts.map +1 -0
- package/dist/lib/motion/tokens.d.ts +43 -0
- package/dist/lib/motion/tokens.d.ts.map +1 -0
- package/dist/lib/motion/use-gesture.d.ts +36 -0
- package/dist/lib/motion/use-gesture.d.ts.map +1 -0
- package/dist/lib/open-file.d.ts +82 -0
- package/dist/lib/open-file.d.ts.map +1 -0
- package/dist/lib/open-index.d.ts +59 -0
- package/dist/lib/open-index.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +15 -1
- package/dist/lib/overlay-layer.d.ts.map +1 -1
- package/dist/lib/radius.d.ts +17 -0
- package/dist/lib/radius.d.ts.map +1 -0
- package/dist/lib/ratio.d.ts +16 -0
- package/dist/lib/ratio.d.ts.map +1 -0
- package/dist/lib/save-file.d.ts +52 -0
- package/dist/lib/save-file.d.ts.map +1 -0
- package/dist/lib/select-data.d.ts +57 -24
- package/dist/lib/select-data.d.ts.map +1 -1
- package/dist/lib/tree-data.d.ts +7 -2
- package/dist/lib/tree-data.d.ts.map +1 -1
- package/dist/lib/typography-size.d.ts +27 -8
- package/dist/lib/typography-size.d.ts.map +1 -1
- package/dist/lib/use-debounced.d.ts +17 -0
- package/dist/lib/use-debounced.d.ts.map +1 -0
- package/dist/lib/use-disclosure.d.ts.map +1 -1
- package/dist/lib/use-document-visibility.d.ts +16 -0
- package/dist/lib/use-document-visibility.d.ts.map +1 -0
- package/dist/lib/use-element-size.d.ts +42 -0
- package/dist/lib/use-element-size.d.ts.map +1 -0
- package/dist/lib/use-file-queue.d.ts +62 -0
- package/dist/lib/use-file-queue.d.ts.map +1 -0
- package/dist/lib/use-hotkey.d.ts +240 -0
- package/dist/lib/use-hotkey.d.ts.map +1 -0
- package/dist/lib/use-hydrated.d.ts +16 -0
- package/dist/lib/use-hydrated.d.ts.map +1 -0
- package/dist/lib/use-in-view.d.ts +37 -0
- package/dist/lib/use-in-view.d.ts.map +1 -0
- package/dist/lib/use-now.d.ts +34 -3
- package/dist/lib/use-now.d.ts.map +1 -1
- package/dist/lib/use-object-url.d.ts +61 -0
- package/dist/lib/use-object-url.d.ts.map +1 -0
- package/dist/lib/use-uncontrolled.d.ts.map +1 -1
- package/dist/theme.css +184 -16
- package/package.json +4 -2
- package/src/as-child.contract.test.tsx +221 -6
- package/src/biome-plugins.test.ts +34 -4
- package/src/colors.css +16 -8
- package/src/components/accordion/accordion.test.tsx +45 -2
- package/src/components/accordion/accordion.tsx +38 -17
- package/src/components/accordion/index.ts +2 -0
- package/src/components/action-icon/action-icon.tsx +8 -6
- package/src/components/alert/alert.test.tsx +49 -2
- package/src/components/alert/alert.tsx +47 -14
- package/src/components/alert/index.ts +8 -1
- package/src/components/ambient-background/ambient-background.test.tsx +21 -7
- package/src/components/ambient-background/ambient-background.tsx +49 -28
- package/src/components/app-shell/app-shell.test.tsx +58 -8
- package/src/components/app-shell/app-shell.tsx +69 -17
- package/src/components/app-shell/index.ts +2 -0
- package/src/components/aspect-ratio/aspect-ratio.test.tsx +82 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +63 -0
- package/src/components/aspect-ratio/index.ts +1 -0
- package/src/components/autocomplete/autocomplete.tsx +9 -14
- package/src/components/avatar/avatar.test.tsx +101 -2
- package/src/components/avatar/avatar.tsx +65 -15
- package/src/components/avatar/index.ts +2 -0
- package/src/components/badge/badge.tsx +3 -1
- package/src/components/breadcrumb/breadcrumb.test.tsx +46 -0
- package/src/components/breadcrumb/breadcrumb.tsx +51 -10
- package/src/components/breadcrumb/index.ts +2 -0
- package/src/components/button/button.test.tsx +65 -12
- package/src/components/button/button.tsx +119 -29
- package/src/components/button-select/button-select.tsx +1 -2
- package/src/components/calendar/calendar-body.tsx +42 -28
- package/src/components/calendar/calendar.test.tsx +89 -0
- package/src/components/calendar/calendar.tsx +42 -4
- package/src/components/calendar/index.ts +2 -0
- package/src/components/camera/camera-machine.test.ts +188 -0
- package/src/components/camera/camera-machine.ts +274 -0
- package/src/components/camera/camera.test.tsx +580 -0
- package/src/components/camera/camera.tsx +938 -0
- package/src/components/camera/fake-camera.ts +153 -0
- package/src/components/camera/index.ts +36 -0
- package/src/components/camera/platform.test.ts +40 -0
- package/src/components/camera/platform.ts +53 -0
- package/src/components/camera/use-camera.ts +428 -0
- package/src/components/card/card.test.tsx +80 -0
- package/src/components/card/card.tsx +9 -3
- package/src/components/carousel/carousel.test.tsx +757 -0
- package/src/components/carousel/carousel.tsx +1115 -0
- package/src/components/carousel/index.ts +24 -0
- package/src/components/chart/chart.test.tsx +26 -0
- package/src/components/chart/chart.tsx +33 -3
- package/src/components/chart/styles.css +12 -10
- package/src/components/checkbox/checkbox.test.tsx +38 -1
- package/src/components/checkbox/checkbox.tsx +34 -10
- package/src/components/checkbox/control.ts +3 -3
- package/src/components/checkbox/index.ts +6 -1
- package/src/components/choice-card-group/choice-card-group.test.tsx +18 -0
- package/src/components/choice-card-group/choice-card-group.tsx +78 -58
- package/src/components/circular-progress/circular-progress.test.tsx +24 -5
- package/src/components/circular-progress/circular-progress.tsx +26 -3
- package/src/components/clipboard/clipboard.test.tsx +64 -5
- package/src/components/clipboard/clipboard.tsx +62 -16
- package/src/components/clipboard/copy.tsx +35 -20
- package/src/components/clipboard/index.ts +7 -1
- package/src/components/code/code.test.tsx +1 -1
- package/src/components/code/code.tsx +2 -1
- package/src/components/code-block/chrome.tsx +49 -53
- package/src/components/code-block/code-block.test.tsx +34 -13
- package/src/components/code-block/code-block.tsx +8 -9
- package/src/components/code-block/index.ts +4 -0
- package/src/components/code-block/static.tsx +8 -5
- package/src/components/combobox/combobox.tsx +14 -6
- package/src/components/combobox-list/combobox-list.test.tsx +54 -0
- package/src/components/combobox-list/combobox-list.tsx +57 -61
- package/src/components/combobox-list/combobox-search-row.tsx +92 -0
- package/src/components/combobox-list/index.ts +2 -0
- package/src/components/compare/compare.test.tsx +291 -0
- package/src/components/compare/compare.tsx +300 -0
- package/src/components/compare/index.ts +3 -0
- package/src/components/container/container.test.tsx +47 -0
- package/src/components/container/container.tsx +8 -2
- package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +24 -18
- package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +6 -3
- package/src/components/data-table/data-table-filter/index.tsx +34 -9
- package/src/components/data-table/data-table-filter.test.tsx +72 -0
- package/src/components/data-table/data-table-header-cell.tsx +75 -68
- package/src/components/data-table/data-table-icons.tsx +79 -0
- package/src/components/data-table/data-table-pagination.tsx +55 -19
- package/src/components/data-table/data-table-placeholder.tsx +2 -2
- package/src/components/data-table/data-table-stack.tsx +19 -25
- package/src/components/data-table/data-table-state.ts +4 -5
- package/src/components/data-table/data-table-toolbar.tsx +10 -3
- package/src/components/data-table/data-table-translations.ts +15 -3
- package/src/components/data-table/data-table.test.tsx +300 -13
- package/src/components/data-table/data-table.tsx +54 -21
- package/src/components/data-table/index.ts +5 -0
- package/src/components/date-picker/aliases.tsx +8 -0
- package/src/components/date-picker/date-picker.test.tsx +75 -0
- package/src/components/date-picker/date-picker.tsx +102 -51
- package/src/components/date-picker/date-time-text.test.ts +9 -0
- package/src/components/date-picker/date-time-text.ts +12 -4
- package/src/components/date-picker/index.ts +1 -0
- package/src/components/divider/divider.test.tsx +34 -5
- package/src/components/divider/divider.tsx +23 -6
- package/src/components/download-button/download-button.test.tsx +253 -0
- package/src/components/download-button/download-button.tsx +236 -0
- package/src/components/download-button/index.ts +11 -0
- package/src/components/drawer/drawer.test.tsx +287 -0
- package/src/components/drawer/drawer.tsx +238 -172
- package/src/components/drawer/index.ts +4 -11
- package/src/components/field/field.test.tsx +115 -0
- package/src/components/field/field.tsx +13 -4
- package/src/components/figure/figure.test.tsx +133 -0
- package/src/components/figure/figure.tsx +137 -0
- package/src/components/figure/index.ts +6 -0
- package/src/components/file-item/file-item.test.tsx +395 -0
- package/src/components/file-item/file-item.tsx +625 -0
- package/src/components/file-item/index.ts +22 -0
- package/src/components/file-preview/file-preview.test.tsx +479 -0
- package/src/components/file-preview/file-preview.tsx +953 -0
- package/src/components/file-preview/index.ts +22 -0
- package/src/components/file-queue-summary/file-queue-summary.test.tsx +285 -0
- package/src/components/file-queue-summary/file-queue-summary.tsx +121 -0
- package/src/components/file-queue-summary/index.ts +12 -0
- package/src/components/file-trigger/file-trigger.test.tsx +138 -0
- package/src/components/file-trigger/file-trigger.tsx +135 -0
- package/src/components/file-trigger/index.ts +3 -0
- package/src/components/file-upload/file-upload.test.tsx +416 -2
- package/src/components/file-upload/file-upload.tsx +391 -136
- package/src/components/file-upload/index.ts +11 -1
- package/src/components/flex/flex.test.tsx +15 -0
- package/src/components/flex/flex.tsx +20 -12
- package/src/components/gallery/gallery.test.tsx +436 -0
- package/src/components/gallery/gallery.tsx +367 -0
- package/src/components/gallery/index.ts +16 -0
- package/src/components/gallery/layout.test.ts +158 -0
- package/src/components/gallery/layout.ts +168 -0
- package/src/components/grid/grid.test.tsx +46 -0
- package/src/components/grid/grid.tsx +11 -11
- package/src/components/image/blur-svg.ts +54 -0
- package/src/components/image/image.test.tsx +481 -0
- package/src/components/image/image.tsx +424 -0
- package/src/components/image/index.ts +14 -0
- package/src/components/image/srcset.test.ts +73 -0
- package/src/components/image/srcset.ts +70 -0
- package/src/components/image-cropper/image-cropper.test.tsx +446 -0
- package/src/components/image-cropper/image-cropper.tsx +745 -0
- package/src/components/image-cropper/index.ts +24 -0
- package/src/components/indicator/indicator.test.tsx +73 -6
- package/src/components/indicator/indicator.tsx +38 -10
- package/src/components/input/input.tsx +6 -5
- package/src/components/kbd/index.ts +6 -0
- package/src/components/kbd/kbd.test.tsx +239 -2
- package/src/components/kbd/kbd.tsx +130 -6
- package/src/components/lightbox/index.ts +25 -0
- package/src/components/lightbox/lightbox-controller.ts +796 -0
- package/src/components/lightbox/lightbox-machine.test.ts +460 -0
- package/src/components/lightbox/lightbox-machine.ts +285 -0
- package/src/components/lightbox/lightbox-zoom.test.ts +130 -0
- package/src/components/lightbox/lightbox-zoom.ts +142 -0
- package/src/components/lightbox/lightbox.test.tsx +821 -0
- package/src/components/lightbox/lightbox.tsx +1301 -0
- package/src/components/mark/mark.test.tsx +21 -2
- package/src/components/mark/mark.tsx +15 -1
- package/src/components/menu/index.ts +4 -0
- package/src/components/menu/menu-data.tsx +20 -17
- package/src/components/menu/menu.test.tsx +123 -19
- package/src/components/menu/menu.tsx +150 -102
- package/src/components/modal/close-trigger.test.tsx +49 -0
- package/src/components/modal/index.ts +2 -0
- package/src/components/modal/modal.test.tsx +101 -0
- package/src/components/modal/modal.tsx +64 -103
- package/src/components/multi-combobox-list/index.ts +2 -0
- package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +45 -0
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +45 -62
- package/src/components/multi-select/multi-select.test.tsx +10 -2
- package/src/components/multi-select/multi-select.tsx +20 -18
- package/src/components/nav-link/nav-link.test.tsx +43 -0
- package/src/components/nav-link/nav-link.tsx +34 -15
- package/src/components/nav-link/navigation.test.tsx +29 -1
- package/src/components/nav-link/navigation.tsx +45 -22
- package/src/components/notification/create-notifier.tsx +79 -13
- package/src/components/notification/index.ts +2 -0
- package/src/components/notification/notification.test.tsx +252 -1
- package/src/components/notification/notification.tsx +102 -58
- package/src/components/number-input/index.ts +7 -1
- package/src/components/number-input/number-input.test.tsx +45 -0
- package/src/components/number-input/number-input.tsx +34 -27
- package/src/components/overlays/create-overlays.tsx +18 -21
- package/src/components/overlays/dialog-parts.tsx +201 -0
- package/src/components/overlays/overlays.test.tsx +170 -0
- package/src/components/overlays/renderer.tsx +2 -9
- package/src/components/overlays/store.ts +4 -1
- package/src/components/password-input/index.ts +2 -0
- package/src/components/password-input/password-input.test.tsx +30 -0
- package/src/components/password-input/password-input.tsx +17 -3
- package/src/components/photo-capture/index.ts +35 -0
- package/src/components/photo-capture/photo-capture-machine.test.ts +147 -0
- package/src/components/photo-capture/photo-capture-machine.ts +112 -0
- package/src/components/photo-capture/photo-capture.test.tsx +375 -0
- package/src/components/photo-capture/photo-capture.tsx +665 -0
- package/src/components/photo-capture/use-photo-capture.ts +199 -0
- package/src/components/pill/pill.test.tsx +58 -1
- package/src/components/pill/pill.tsx +34 -16
- package/src/components/pills-input/index.ts +1 -0
- package/src/components/pills-input/pills-input.test.ts +14 -14
- package/src/components/pills-input/pills-input.test.tsx +39 -0
- package/src/components/pills-input/pills-input.tsx +70 -32
- package/src/components/pin-input/index.ts +1 -1
- package/src/components/pin-input/pin-input.test.tsx +28 -0
- package/src/components/pin-input/pin-input.tsx +64 -16
- package/src/components/popover/icons.tsx +16 -12
- package/src/components/popover/popover.test.tsx +11 -0
- package/src/components/popover/popover.tsx +21 -11
- package/src/components/progress/progress.test.tsx +17 -5
- package/src/components/progress/progress.tsx +23 -7
- package/src/components/radio-group/radio-group.test.tsx +21 -1
- package/src/components/radio-group/radio-group.tsx +66 -48
- package/src/components/rating/icons.tsx +4 -2
- package/src/components/rating/index.ts +2 -0
- package/src/components/rating/rating.test.tsx +43 -4
- package/src/components/rating/rating.tsx +29 -13
- package/src/components/schedule/index.ts +4 -1
- package/src/components/schedule/now-cursor-line.test.tsx +6 -6
- package/src/components/schedule/now-cursor-line.tsx +29 -15
- package/src/components/schedule/schedule-a11y.test.tsx +847 -0
- package/src/components/schedule/schedule-agenda-list.tsx +25 -44
- package/src/components/schedule/schedule-agenda-view.test.tsx +2 -2
- package/src/components/schedule/schedule-agenda-view.tsx +22 -37
- package/src/components/schedule/schedule-all-day-row.tsx +35 -96
- package/src/components/schedule/schedule-create-draft.tsx +23 -90
- package/src/components/schedule/schedule-dates.test.ts +64 -20
- package/src/components/schedule/schedule-dates.ts +65 -27
- package/src/components/schedule/schedule-day-column.tsx +607 -0
- package/src/components/schedule/schedule-days-view.tsx +40 -49
- package/src/components/schedule/schedule-details-popover.test.tsx +97 -0
- package/src/components/schedule/schedule-drag-ghost.tsx +30 -98
- package/src/components/schedule/schedule-event-chip.tsx +120 -262
- package/src/components/schedule/schedule-event-details-popover.tsx +132 -0
- package/src/components/schedule/schedule-event-details.tsx +6 -7
- package/src/components/schedule/schedule-event-list-popover-content.tsx +9 -5
- package/src/components/schedule/schedule-event-pill.tsx +159 -0
- package/src/components/schedule/schedule-event-styles.ts +71 -0
- package/src/components/schedule/schedule-geometry.test.ts +5 -5
- package/src/components/schedule/schedule-geometry.ts +16 -13
- package/src/components/schedule/schedule-grid-gesture.test.ts +99 -0
- package/src/components/schedule/schedule-grid-gesture.ts +50 -12
- package/src/components/schedule/schedule-icons.test.tsx +105 -0
- package/src/components/schedule/schedule-icons.tsx +40 -0
- package/src/components/schedule/schedule-month-view.test.tsx +118 -2
- package/src/components/schedule/schedule-month-view.tsx +258 -200
- package/src/components/schedule/schedule-overflow-chip.tsx +9 -4
- package/src/components/schedule/schedule-overflow-popover.tsx +5 -0
- package/src/components/schedule/schedule-slot-cursor.tsx +422 -0
- package/src/components/schedule/schedule-timed-grid-chrome.tsx +330 -0
- package/src/components/schedule/schedule-timed-grid.tsx +222 -893
- package/src/components/schedule/schedule-toolbar.tsx +108 -60
- package/src/components/schedule/schedule-types.test.ts +43 -2
- package/src/components/schedule/schedule-types.ts +164 -17
- package/src/components/schedule/schedule-view-pagination-chrome.tsx +101 -0
- package/src/components/schedule/schedule-year-view.test.tsx +86 -1
- package/src/components/schedule/schedule-year-view.tsx +163 -136
- package/src/components/schedule/schedule.test.tsx +275 -7
- package/src/components/schedule/schedule.tsx +36 -242
- package/src/components/schedule/use-chip-keyboard-move.ts +109 -0
- package/src/components/schedule/use-chip-motion.ts +71 -0
- package/src/components/schedule/use-date-grid-navigation.ts +120 -0
- package/src/components/schedule/use-event-drag.ts +1 -23
- package/src/components/schedule/use-event-resize.ts +27 -22
- package/src/components/schedule/use-schedule-reveal.ts +259 -0
- package/src/components/schedule/use-schedule-selection.ts +14 -2
- package/src/components/schedule/use-timed-grid-announcer.test.ts +72 -0
- package/src/components/schedule/use-timed-grid-announcer.ts +42 -0
- package/src/components/schedule/use-timed-grid-paging.ts +118 -0
- package/src/components/segment-group/segment-group.test.tsx +27 -5
- package/src/components/segment-group/segment-group.tsx +35 -28
- package/src/components/select/select.tsx +8 -8
- package/src/components/skeleton/skeleton.tsx +1 -1
- package/src/components/slider/slider.test.tsx +56 -5
- package/src/components/slider/slider.tsx +93 -31
- package/src/components/spinner/spinner.test.tsx +34 -10
- package/src/components/spinner/spinner.tsx +52 -49
- package/src/components/spotlight/context.ts +62 -0
- package/src/components/spotlight/create-spotlight.test.tsx +252 -0
- package/src/components/spotlight/create-spotlight.tsx +515 -0
- package/src/components/spotlight/highlight.test.ts +57 -0
- package/src/components/spotlight/highlight.ts +86 -0
- package/src/components/spotlight/icons.tsx +27 -0
- package/src/components/spotlight/index.ts +68 -0
- package/src/components/spotlight/label.ts +10 -0
- package/src/components/spotlight/recents.test.ts +46 -0
- package/src/components/spotlight/recents.ts +54 -0
- package/src/components/spotlight/spotlight-engine.test.ts +836 -0
- package/src/components/spotlight/spotlight-engine.ts +525 -0
- package/src/components/spotlight/spotlight.test.tsx +2532 -0
- package/src/components/spotlight/spotlight.tsx +1429 -0
- package/src/components/spotlight/static-source.test.ts +71 -0
- package/src/components/spotlight/static-source.ts +62 -0
- package/src/components/spotlight/store.test.ts +122 -0
- package/src/components/spotlight/store.ts +130 -0
- package/src/components/spotlight/translations.ts +124 -0
- package/src/components/spotlight/types.ts +308 -0
- package/src/components/spotlight/view.test.ts +216 -0
- package/src/components/spotlight/view.ts +350 -0
- package/src/components/switch/switch.test.tsx +8 -0
- package/src/components/switch/switch.tsx +12 -8
- package/src/components/table/table.test.tsx +35 -0
- package/src/components/table/table.tsx +28 -4
- package/src/components/tabs/tabs-data.tsx +7 -2
- package/src/components/tabs/tabs.test.tsx +211 -50
- package/src/components/tabs/tabs.tsx +309 -120
- package/src/components/tags-input/tags-input.test.tsx +116 -2
- package/src/components/tags-input/tags-input.tsx +51 -31
- package/src/components/text/text.test.tsx +1 -1
- package/src/components/text/text.tsx +1 -4
- package/src/components/theme-icon/theme-icon.tsx +2 -2
- package/src/components/theme-script/theme-script.test.tsx +52 -0
- package/src/components/theme-script/theme-script.tsx +1 -1
- package/src/components/time-input/hour-cycle.test.ts +37 -0
- package/src/components/time-input/hour-cycle.ts +37 -10
- package/src/components/time-input/time-input.test.tsx +34 -0
- package/src/components/time-input/time-input.tsx +12 -14
- package/src/components/time-input/time-row.test.ts +10 -0
- package/src/components/time-input/time-row.tsx +39 -19
- package/src/components/timeline/index.ts +1 -0
- package/src/components/timeline/timeline.test.tsx +39 -4
- package/src/components/timeline/timeline.tsx +43 -7
- package/src/components/title/title.test.tsx +3 -3
- package/src/components/title/title.tsx +2 -1
- package/src/components/tooltip/tooltip.test.tsx +38 -5
- package/src/components/tooltip/tooltip.tsx +17 -17
- package/src/components/tree-multi-select/index.ts +2 -0
- package/src/components/tree-multi-select/tree-multi-select.test.tsx +137 -3
- package/src/components/tree-multi-select/tree-multi-select.tsx +130 -332
- package/src/components/tree-select/index.ts +7 -1
- package/src/components/tree-select/tree-popover.tsx +484 -0
- package/src/components/tree-select/tree-select.test.tsx +93 -1
- package/src/components/tree-select/tree-select.tsx +117 -415
- package/src/icon-stroke.test.tsx +114 -0
- package/src/index.ts +71 -0
- package/src/lib/as-child.ts +1 -1
- package/src/lib/cn.test.ts +23 -2
- package/src/lib/cn.ts +9 -1
- package/src/lib/cutout.test.ts +37 -0
- package/src/lib/cutout.ts +56 -0
- package/src/lib/dev-warn.test.ts +89 -0
- package/src/lib/dev-warn.ts +61 -12
- package/src/lib/file-kind-icons.tsx +29 -0
- package/src/lib/file-queue-summary.test.ts +323 -0
- package/src/lib/file-queue-summary.ts +239 -0
- package/src/lib/file-queue.ts +493 -0
- package/src/lib/files.test.ts +72 -0
- package/src/lib/files.ts +211 -0
- package/src/lib/focus-styles.test.ts +97 -1
- package/src/lib/focus-styles.ts +153 -9
- package/src/lib/gap.ts +17 -0
- package/src/lib/graphemes.test.ts +26 -0
- package/src/lib/graphemes.ts +19 -0
- package/src/lib/icons.test.ts +22 -0
- package/src/lib/icons.ts +40 -0
- package/src/lib/image-file.test.ts +18 -0
- package/src/lib/image-file.ts +21 -0
- package/src/lib/merge-refs.test.tsx +79 -0
- package/src/lib/merge-refs.ts +58 -11
- package/src/lib/motion/animate.test.ts +114 -0
- package/src/lib/motion/animate.ts +88 -0
- package/src/lib/motion/easing.test.ts +57 -0
- package/src/lib/motion/easing.ts +107 -0
- package/src/lib/motion/gesture.test.ts +183 -0
- package/src/lib/motion/gesture.ts +300 -0
- package/src/lib/motion/morph.test.ts +93 -0
- package/src/lib/motion/morph.ts +88 -0
- package/src/lib/motion/physics.test.ts +75 -0
- package/src/lib/motion/physics.ts +61 -0
- package/src/lib/motion/rect.test.ts +52 -0
- package/src/lib/motion/rect.ts +67 -0
- package/src/lib/motion/reduced-motion.test.ts +57 -0
- package/src/lib/motion/reduced-motion.ts +34 -0
- package/src/lib/motion/spring.test.ts +93 -0
- package/src/lib/motion/spring.ts +143 -0
- package/src/lib/motion/tokens.ts +48 -0
- package/src/lib/motion/use-gesture.test.tsx +111 -0
- package/src/lib/motion/use-gesture.ts +133 -0
- package/src/lib/open-file.test.ts +275 -0
- package/src/lib/open-file.ts +351 -0
- package/src/lib/open-index.test.tsx +95 -0
- package/src/lib/open-index.tsx +90 -0
- package/src/lib/overlay-layer.test.tsx +32 -13
- package/src/lib/overlay-layer.tsx +25 -3
- package/src/lib/radius.ts +17 -0
- package/src/lib/ratio.test.ts +31 -0
- package/src/lib/ratio.ts +26 -0
- package/src/lib/save-file.test.ts +91 -0
- package/src/lib/save-file.ts +91 -0
- package/src/lib/select-data.test.tsx +123 -0
- package/src/lib/select-data.ts +130 -44
- package/src/lib/tree-data.ts +9 -4
- package/src/lib/typography-size.ts +28 -8
- package/src/lib/use-container-query.ts +4 -4
- package/src/lib/use-debounced.test.ts +105 -0
- package/src/lib/use-debounced.ts +44 -0
- package/src/lib/use-disclosure.ts +6 -1
- package/src/lib/use-document-visibility.test.tsx +46 -0
- package/src/lib/use-document-visibility.ts +37 -0
- package/src/lib/use-element-size.test.ts +142 -0
- package/src/lib/use-element-size.ts +87 -0
- package/src/lib/use-file-queue.test.tsx +774 -0
- package/src/lib/use-file-queue.ts +114 -0
- package/src/lib/use-hotkey.test.tsx +667 -0
- package/src/lib/use-hotkey.ts +562 -0
- package/src/lib/use-hydrated.test.tsx +43 -0
- package/src/lib/use-hydrated.ts +27 -0
- package/src/lib/use-in-view.test.ts +113 -0
- package/src/lib/use-in-view.ts +69 -0
- package/src/lib/use-now.test.tsx +65 -0
- package/src/lib/use-now.ts +37 -14
- package/src/lib/use-object-url.test.ts +195 -0
- package/src/lib/use-object-url.ts +108 -0
- package/src/lib/use-uncontrolled.test.ts +34 -2
- package/src/lib/use-uncontrolled.ts +7 -2
- package/src/test-setup.ts +65 -1
- package/src/theme.css +184 -16
- package/src/theme.forced-colors.test.tsx +152 -0
- package/src/theme.test.ts +34 -0
- package/src/visually-hidden-containment.test.tsx +32 -0
- package/dist/chunk-2GILNBZW.js +0 -31
- package/dist/chunk-2GILNBZW.js.map +0 -1
- package/dist/chunk-2NNZHVKD.js.map +0 -1
- package/dist/chunk-4NNGTNPV.js.map +0 -1
- package/dist/chunk-64T6Z7BA.js.map +0 -1
- package/dist/chunk-A6MYJTJI.js.map +0 -1
- package/dist/chunk-AIQG7IIT.js.map +0 -1
- package/dist/chunk-BEL75C7N.js.map +0 -1
- package/dist/chunk-CHTN5AHI.js.map +0 -1
- package/dist/chunk-CSCVTESP.js.map +0 -1
- package/dist/chunk-CTSO6V72.js.map +0 -1
- package/dist/chunk-CYWMES5P.js.map +0 -1
- package/dist/chunk-CZEKZ5HR.js.map +0 -1
- package/dist/chunk-DBTJEBMO.js +0 -291
- package/dist/chunk-DBTJEBMO.js.map +0 -1
- package/dist/chunk-FAOBC4IS.js.map +0 -1
- package/dist/chunk-FOMR74VE.js.map +0 -1
- package/dist/chunk-GCGX4FEF.js.map +0 -1
- package/dist/chunk-HCYULRWT.js.map +0 -1
- package/dist/chunk-I4SQQIP5.js.map +0 -1
- package/dist/chunk-IG7FBZVM.js.map +0 -1
- package/dist/chunk-INJUILCN.js +0 -31
- package/dist/chunk-INJUILCN.js.map +0 -1
- package/dist/chunk-IRXZHLUL.js.map +0 -1
- package/dist/chunk-K5UWVH6P.js.map +0 -1
- package/dist/chunk-LM6F6DLR.js.map +0 -1
- package/dist/chunk-MQO42HZL.js +0 -223
- package/dist/chunk-MQO42HZL.js.map +0 -1
- package/dist/chunk-OC7I2CTA.js +0 -8
- package/dist/chunk-OC7I2CTA.js.map +0 -1
- package/dist/chunk-OGJFDNIS.js.map +0 -1
- package/dist/chunk-P3XMBETI.js.map +0 -1
- package/dist/chunk-PINENGML.js.map +0 -1
- package/dist/chunk-PS2PZFXH.js +0 -84
- package/dist/chunk-PS2PZFXH.js.map +0 -1
- package/dist/chunk-QIDAXFKK.js.map +0 -1
- package/dist/chunk-QP4I37PA.js +0 -14
- package/dist/chunk-QP4I37PA.js.map +0 -1
- package/dist/chunk-RIP5G47F.js.map +0 -1
- package/dist/chunk-RKYXG6X7.js.map +0 -1
- package/dist/chunk-SVKU3GUN.js.map +0 -1
- package/dist/chunk-TBTSEPGP.js.map +0 -1
- package/dist/chunk-TWGCWKRV.js +0 -44
- package/dist/chunk-TWGCWKRV.js.map +0 -1
- package/dist/chunk-UJZIF2BA.js.map +0 -1
- package/dist/chunk-UVYTJQTJ.js +0 -14
- package/dist/chunk-UVYTJQTJ.js.map +0 -1
- package/dist/chunk-VZBUQNLX.js.map +0 -1
- package/dist/chunk-VZH6TS7M.js.map +0 -1
- package/dist/chunk-WJOHNCYY.js.map +0 -1
- package/dist/chunk-WZB6LPQI.js +0 -47
- package/dist/chunk-WZB6LPQI.js.map +0 -1
- package/dist/chunk-YKUCSV34.js.map +0 -1
- package/dist/chunk-YQHOKMSV.js.map +0 -1
- package/dist/chunk-YW6Q6ERX.js.map +0 -1
- package/dist/chunk-YWRBG23W.js.map +0 -1
- package/dist/chunk-Z43YWH4R.js.map +0 -1
- package/dist/chunk-Z6RPMRFH.js.map +0 -1
- package/dist/components/slider/sliderThumb.d.ts +0 -1
- package/dist/components/slider/sliderThumb.d.ts.map +0 -1
- package/src/components/slider/sliderThumb.tsx +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useState, useEffect, useRef, useCallback, useSyncExternalStore, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/use-in-view.ts
|
|
4
|
+
function useInView(ref, { root, margin, threshold = 0, once = false } = {}) {
|
|
5
|
+
const [inView, setInView] = useState();
|
|
6
|
+
const thresholds = [threshold].flat().join(",");
|
|
7
|
+
const done = once && inView === true;
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const el = ref.current;
|
|
10
|
+
if (!el || done || typeof IntersectionObserver === "undefined") return;
|
|
11
|
+
const steps = thresholds.split(",").map(Number);
|
|
12
|
+
const min = Math.min(...steps);
|
|
13
|
+
const observer = new IntersectionObserver(
|
|
14
|
+
(entries) => {
|
|
15
|
+
const entry = entries.at(-1);
|
|
16
|
+
if (!entry) return;
|
|
17
|
+
setInView(entry.isIntersecting && (min <= 0 || entry.intersectionRatio >= min));
|
|
18
|
+
},
|
|
19
|
+
{ root: root?.current ?? null, rootMargin: margin, threshold: steps }
|
|
20
|
+
);
|
|
21
|
+
observer.observe(el);
|
|
22
|
+
return () => observer.disconnect();
|
|
23
|
+
}, [ref, root, margin, thresholds, done]);
|
|
24
|
+
return inView;
|
|
25
|
+
}
|
|
26
|
+
var listeners = /* @__PURE__ */ new Map();
|
|
27
|
+
var memoryFallback = /* @__PURE__ */ new Map();
|
|
28
|
+
var totalSubscribers = 0;
|
|
29
|
+
function notify(key) {
|
|
30
|
+
for (const listener of listeners.get(key) ?? []) listener();
|
|
31
|
+
}
|
|
32
|
+
function handleStorageEvent(event) {
|
|
33
|
+
if (event.key === null) {
|
|
34
|
+
for (const key of listeners.keys()) notify(key);
|
|
35
|
+
} else {
|
|
36
|
+
notify(event.key);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function subscribe(key, listener) {
|
|
40
|
+
let set = listeners.get(key);
|
|
41
|
+
if (!set) {
|
|
42
|
+
set = /* @__PURE__ */ new Set();
|
|
43
|
+
listeners.set(key, set);
|
|
44
|
+
}
|
|
45
|
+
set.add(listener);
|
|
46
|
+
if (totalSubscribers++ === 0) window.addEventListener("storage", handleStorageEvent);
|
|
47
|
+
return () => {
|
|
48
|
+
set?.delete(listener);
|
|
49
|
+
if (set?.size === 0) {
|
|
50
|
+
listeners.delete(key);
|
|
51
|
+
memoryFallback.delete(key);
|
|
52
|
+
}
|
|
53
|
+
if (--totalSubscribers === 0) window.removeEventListener("storage", handleStorageEvent);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function readStorage(key) {
|
|
57
|
+
const fallback = memoryFallback.get(key);
|
|
58
|
+
if (fallback !== void 0) return fallback;
|
|
59
|
+
try {
|
|
60
|
+
return localStorage.getItem(key);
|
|
61
|
+
} catch {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function writeStorage(key, serialized) {
|
|
66
|
+
try {
|
|
67
|
+
localStorage.setItem(key, serialized);
|
|
68
|
+
memoryFallback.delete(key);
|
|
69
|
+
} catch {
|
|
70
|
+
memoryFallback.set(key, serialized);
|
|
71
|
+
}
|
|
72
|
+
notify(key);
|
|
73
|
+
}
|
|
74
|
+
function removeStorage(key) {
|
|
75
|
+
memoryFallback.delete(key);
|
|
76
|
+
try {
|
|
77
|
+
localStorage.removeItem(key);
|
|
78
|
+
} catch {
|
|
79
|
+
}
|
|
80
|
+
notify(key);
|
|
81
|
+
}
|
|
82
|
+
function getServerSnapshot() {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function useLocalStorage({
|
|
86
|
+
key,
|
|
87
|
+
defaultValue,
|
|
88
|
+
serialize = JSON.stringify,
|
|
89
|
+
deserialize = JSON.parse
|
|
90
|
+
}) {
|
|
91
|
+
const defaultValueRef = useRef(defaultValue);
|
|
92
|
+
const subscribeToKey = useCallback((listener) => subscribe(key, listener), [key]);
|
|
93
|
+
const getSnapshot = useCallback(() => readStorage(key), [key]);
|
|
94
|
+
const raw = useSyncExternalStore(subscribeToKey, getSnapshot, getServerSnapshot);
|
|
95
|
+
const value = useMemo(() => {
|
|
96
|
+
if (raw === null) return defaultValueRef.current;
|
|
97
|
+
try {
|
|
98
|
+
return deserialize(raw);
|
|
99
|
+
} catch {
|
|
100
|
+
return defaultValueRef.current;
|
|
101
|
+
}
|
|
102
|
+
}, [raw, deserialize]);
|
|
103
|
+
const setValue = useCallback(
|
|
104
|
+
(next) => {
|
|
105
|
+
const resolved = typeof next === "function" ? next(value) : next;
|
|
106
|
+
writeStorage(key, serialize(resolved));
|
|
107
|
+
},
|
|
108
|
+
[key, serialize, value]
|
|
109
|
+
);
|
|
110
|
+
const removeValue = useCallback(() => {
|
|
111
|
+
removeStorage(key);
|
|
112
|
+
}, [key]);
|
|
113
|
+
return [value, setValue, removeValue];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { useInView, useLocalStorage };
|
|
117
|
+
//# sourceMappingURL=chunk-HC4XVBP2.js.map
|
|
118
|
+
//# sourceMappingURL=chunk-HC4XVBP2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/use-in-view.ts","../src/lib/use-local-storage.ts"],"names":[],"mappings":";;;AAuCO,SAAS,SAAA,CACd,GAAA,EACA,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAA,GAAY,CAAA,EAAG,IAAA,GAAO,KAAA,EAAM,GAAsB,EAAC,EAC9C;AACrB,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,QAAA,EAAkB;AAG9C,EAAA,MAAM,aAAa,CAAC,SAAS,EAAE,IAAA,EAAK,CAAE,KAAK,GAAG,CAAA;AAC9C,EAAA,MAAM,IAAA,GAAO,QAAQ,MAAA,KAAW,IAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,KAAK,GAAA,CAAI,OAAA;AACf,IAAA,IAAI,CAAC,EAAA,IAAM,IAAA,IAAQ,OAAO,yBAAyB,WAAA,EAAa;AAChE,IAAA,MAAM,QAAQ,UAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAAE,IAAI,MAAM,CAAA;AAC9C,IAAA,MAAM,GAAA,GAAM,IAAA,CAAK,GAAA,CAAI,GAAG,KAAK,CAAA;AAC7B,IAAA,MAAM,WAAW,IAAI,oBAAA;AAAA,MACnB,CAAC,OAAA,KAAY;AAEX,QAAA,MAAM,KAAA,GAAQ,OAAA,CAAQ,EAAA,CAAG,EAAE,CAAA;AAC3B,QAAA,IAAI,CAAC,KAAA,EAAO;AACZ,QAAA,SAAA,CAAU,MAAM,cAAA,KAAmB,GAAA,IAAO,CAAA,IAAK,KAAA,CAAM,qBAAqB,GAAA,CAAI,CAAA;AAAA,MAChF,CA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Content":["\"use client\"\n\nimport { type RefObject, useEffect, useState } from \"react\"\n\nexport type UseInViewOptions = {\n /** The scrolling ancestor to intersect with. Defaults to the viewport. */\n root?: RefObject<Element | null>\n /**\n * Grows (positive) or shrinks (negative) the root's box before testing, in\n * CSS margin syntax: `\"0px 0px 160px 0px\"` reports the target 160px before\n * it scrolls in from below. Percentages are of the root's size.\n */\n margin?: string\n /**\n * How much of the target must be visible to count as in view, from `0`\n * (a single pixel) to `1` (all of it). An array re-checks at each step,\n * and the smallest one decides.\n */\n threshold?: number | number[]\n /** Stops observing the first time the target comes into view, so it stays `true`. */\n once?: boolean\n}\n\n/**\n * Tracks whether an element is scrolled into view, through an\n * `IntersectionObserver`: lazy media, an infinite list's end-of-list\n * sentinel, an entrance that plays once.\n *\n * Returns `undefined` until the first observation: on the server, on the\n * first client render, and where `IntersectionObserver` doesn't exist. That\n * third state is deliberate. A reveal can hide only what is known to be out\n * of view (`inView === false`), so without JS, or for an element already on\n * screen at load (which goes straight from `undefined` to `true`), nothing\n * is ever hidden and nothing animates in.\n *\n * const ref = useRef<HTMLDivElement>(null)\n * const inView = useInView(ref, { margin: \"200px\", once: true })\n * <div ref={ref}>{inView && <img src={src} alt=\"\" />}</div>\n */\nexport function useInView(\n ref: RefObject<Element | null>,\n { root, margin, threshold = 0, once = false }: UseInViewOptions = {},\n): boolean | undefined {\n const [inView, setInView] = useState<boolean>()\n // A stable key for the dependency list, so an inline array doesn't\n // re-observe on every render.\n const thresholds = [threshold].flat().join(\",\")\n const done = once && inView === true\n\n useEffect(() => {\n const el = ref.current\n if (!el || done || typeof IntersectionObserver === \"undefined\") return\n const steps = thresholds.split(\",\").map(Number)\n const min = Math.min(...steps)\n const observer = new IntersectionObserver(\n (entries) => {\n // Entries queue in order; the last one is the current state.\n const entry = entries.at(-1)\n if (!entry) return\n setInView(entry.isIntersecting && (min <= 0 || entry.intersectionRatio >= min))\n },\n { root: root?.current ?? null, rootMargin: margin, threshold: steps },\n )\n observer.observe(el)\n return () => observer.disconnect()\n }, [ref, root, margin, thresholds, done])\n\n return inView\n}\n","\"use client\"\n\nimport { useCallback, useMemo, useRef, useSyncExternalStore } from \"react\"\n\n// Module-level (not per-hook-instance) so every useLocalStorage({ key }) call\n// anywhere in this tab shares one listener set per key — a same-tab write\n// notifies every other instance directly, no CustomEvent needed (contrast\n// with a naive per-instance `useState`, which has no shared registry to call\n// into directly and so needs one to fake same-tab sync).\nconst listeners = new Map<string, Set<() => void>>()\n// Per-key override for when a write couldn't reach localStorage (quota\n// exceeded, Safari private browsing — which throws on every write, etc.).\n// Without this, a failed write would leave every instance on that key unable\n// to reflect the change at all, since their snapshot otherwise comes only\n// from reading storage back. Cleared as soon as a write to that key succeeds\n// (localStorage becomes authoritative again), and once the last listener for\n// a key unsubscribes (nothing left observing it — the next mount starts\n// fresh against real storage instead of a possibly stale in-memory value).\nconst memoryFallback = new Map<string, string>()\nlet totalSubscribers = 0\n\nfunction notify(key: string) {\n for (const listener of listeners.get(key) ?? []) listener()\n}\n\nfunction handleStorageEvent(event: StorageEvent) {\n // `key === null` means the whole storage area was cleared — treat that as\n // every tracked key changing.\n if (event.key === null) {\n for (const key of listeners.keys()) notify(key)\n } else {\n notify(event.key)\n }\n}\n\nfunction subscribe(key: string, listener: () => void) {\n let set = listeners.get(key)\n if (!set) {\n set = new Set()\n listeners.set(key, set)\n }\n set.add(listener)\n // Cross-tab only — this tab's own writes are covered by the direct `notify`\n // call in setValue/removeValue below; the native `storage` event never\n // fires in the document that made the change. Ref-counted so N components\n // sharing a key install exactly one listener, not N.\n if (totalSubscribers++ === 0) window.addEventListener(\"storage\", handleStorageEvent)\n\n return () => {\n set?.delete(listener)\n if (set?.size === 0) {\n listeners.delete(key)\n memoryFallback.delete(key)\n }\n if (--totalSubscribers === 0) window.removeEventListener(\"storage\", handleStorageEvent)\n }\n}\n\nfunction readStorage(key: string): string | null {\n const fallback = memoryFallback.get(key)\n if (fallback !== undefined) return fallback\n try {\n return localStorage.getItem(key)\n } catch {\n return null // private mode / storage disabled — behave as unset\n }\n}\n\nfunction writeStorage(key: string, serialized: string) {\n try {\n localStorage.setItem(key, serialized)\n memoryFallback.delete(key)\n } catch {\n // Quota exceeded or storage unavailable — keep this value in memory so\n // the UI still reflects it for the rest of the session, even though it\n // won't survive a reload (persistence is best-effort).\n memoryFallback.set(key, serialized)\n }\n notify(key)\n}\n\nfunction removeStorage(key: string) {\n memoryFallback.delete(key)\n try {\n localStorage.removeItem(key)\n } catch {\n // Storage unavailable — nothing to remove.\n }\n notify(key)\n}\n\n// Stable across every call: the value seen during SSR and during the client's\n// hydration pass — never the real stored value, so the first render always\n// matches between server and client.\nfunction getServerSnapshot(): string | null {\n return null\n}\n\nexport interface UseLocalStorageOptions<T> {\n /** The `localStorage` key backing this value. Every hook instance — this\n * tab or another — sharing this key reads/writes the same value and stays\n * in sync with it. */\n key: string\n /** Returned before the real stored value is read, whenever nothing is\n * stored, or the stored value fails to deserialize. Captured once on\n * mount, like a lazy `useState` initializer — a fresh object/array\n * literal passed on a later render is ignored, so callers can pass\n * `defaultValue={{}}` inline without creating an unstable reference every\n * render. */\n defaultValue: T\n /** @default JSON.stringify */\n serialize?: (value: T) => string\n /** @default JSON.parse */\n deserialize?: (raw: string) => T\n}\n\nexport type UseLocalStorageReturnValue<T> = [\n T,\n /** Accepts a value or an updater resolved against the current value — the\n * same shape react-table's own `OnChangeFn<T>` and this kit's\n * `useUncontrolled` setter use, so it wires into e.g. `DataTable`'s\n * `onColumnSizingChange` directly, no wrapper needed. */\n (value: T | ((previous: T) => T)) => void,\n /** Deletes the key; every instance on this key falls back to\n * `defaultValue` until something is stored again. */\n () => void,\n]\n\n/**\n * Persists a piece of state to `localStorage`, kept in sync across every\n * component using the same `key` — both within this tab (a write in one\n * instance is reflected in every other instance immediately) and across tabs\n * (via the native `storage` event). SSR-safe: `useSyncExternalStore`'s\n * `getServerSnapshot` guarantees the server-rendered and first-client-render\n * markup agree (always `defaultValue`), so there's no hydration mismatch to\n * guard against.\n *\n * const [columnSizing, setColumnSizing] = useLocalStorage({\n * key: \"users-table\",\n * defaultValue: {},\n * })\n * <DataTable columnSizing={columnSizing} onColumnSizingChange={setColumnSizing} />\n */\nexport function useLocalStorage<T>({\n key,\n defaultValue,\n serialize = JSON.stringify,\n deserialize = JSON.parse,\n}: UseLocalStorageOptions<T>): UseLocalStorageReturnValue<T> {\n const defaultValueRef = useRef(defaultValue)\n\n const subscribeToKey = useCallback((listener: () => void) => subscribe(key, listener), [key])\n const getSnapshot = useCallback(() => readStorage(key), [key])\n const raw = useSyncExternalStore(subscribeToKey, getSnapshot, getServerSnapshot)\n\n const value = useMemo(() => {\n if (raw === null) return defaultValueRef.current\n try {\n return deserialize(raw)\n } catch {\n return defaultValueRef.current // corrupted value — keep the default\n }\n }, [raw, deserialize])\n\n const setValue = useCallback(\n (next: T | ((previous: T) => T)) => {\n const resolved = typeof next === \"function\" ? (next as (previous: T) => T)(value) : next\n writeStorage(key, serialize(resolved))\n },\n [key, serialize, value],\n )\n\n const removeValue = useCallback(() => {\n removeStorage(key)\n }, [key])\n\n return [value, setValue, removeValue]\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/use-media-query.ts
|
|
4
|
+
function subscribe(query, listener) {
|
|
5
|
+
const mediaQueryList = window.matchMedia(query);
|
|
6
|
+
mediaQueryList.addEventListener("change", listener);
|
|
7
|
+
return () => mediaQueryList.removeEventListener("change", listener);
|
|
8
|
+
}
|
|
9
|
+
function getServerSnapshot() {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
function useMediaQuery(query) {
|
|
13
|
+
const subscribeToQuery = useCallback(
|
|
14
|
+
(listener) => subscribe(query, listener),
|
|
15
|
+
[query]
|
|
16
|
+
);
|
|
17
|
+
const getSnapshot = useCallback(() => window.matchMedia(query).matches, [query]);
|
|
18
|
+
return useSyncExternalStore(subscribeToQuery, getSnapshot, getServerSnapshot);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { useMediaQuery };
|
|
22
|
+
//# sourceMappingURL=chunk-HDYORQZN.js.map
|
|
23
|
+
//# sourceMappingURL=chunk-HDYORQZN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/use-media-query.ts"],"names":[],"mappings":";;;AAIA,SAAS,SAAA,CAAU,OAAe,QAAA,EAAkC;AAClE,EAAA,MAAM,cAAA,GAAiB,MAAA,CAAO,UAAA,CAAW,KAAK,CAAA;AAC9C,EAAA,cAAA,CAAe,gBAAA,CAAiB,UAAU,QAAQ,CAAA;AAClD,EAAA,OAAO,MAAM,cAAA,CAAe,mBAAA,CAAoB,QAAA,EAAU,QAAQ,CAAA;AACpE;AAKA,SAAS,iBAAA,GAA6B;AACpC,EAAA,OAAO,KAAA;AACT;AAWO,SAAS,cAAc,KAAA,EAAwB;AACpD,EAAA,MAAM,gBAAA,GAAmB,WAAA;AAAA,IACvB,CAAC,QAAA,KAAyB,SAAA,CAAU,KAAA,EAAO,QAAQ,CAAA;AAAA,IACnD,CAAC,KAAK;AAAA,GACR;AACA,EAAA,MAAM,WAAA,GAAc,WAAA,CAAY,MAAM,MAAA,CAAO,UAAA,CAAW,KAAK,CAAA,CAAE,OAAA,EAAS,CAAC,KAAK,CAAC,CAAA;AAE/E,EAAA,OAAO,oBAAA,CAAqB,gBAAA,EAAkB,WAAA,EAAa,iBAAiB,CAAA;AAC9E","file":"chunk-HDYORQZN.js","sourcesContent":["\"use client\"\n\nimport { useCallback, useSyncExternalStore } from \"react\"\n\nfunction subscribe(query: string, listener: () => void): () => void {\n const mediaQueryList = window.matchMedia(query)\n mediaQueryList.addEventListener(\"change\", listener)\n return () => mediaQueryList.removeEventListener(\"change\", listener)\n}\n\n// Stable across every call: SSR and the first client render must agree, same\n// reasoning as useLocalStorage's getServerSnapshot — a server can't know the\n// visitor's viewport, so `false` is the only value that can't mismatch.\nfunction getServerSnapshot(): boolean {\n return false\n}\n\n/**\n * Tracks whether a media query currently matches, updating live as the\n * viewport (or whichever media feature) changes. SSR-safe via\n * `useSyncExternalStore`, mirroring `useLocalStorage`'s use of the same hook\n * for the same reason: the hydration snapshot is fixed (`false`) so server\n * and first-client-render markup always agree.\n *\n * const isMobile = useMediaQuery(\"(width < 768px)\")\n */\nexport function useMediaQuery(query: string): boolean {\n const subscribeToQuery = useCallback(\n (listener: () => void) => subscribe(query, listener),\n [query],\n )\n const getSnapshot = useCallback(() => window.matchMedia(query).matches, [query])\n\n return useSyncExternalStore(subscribeToQuery, getSnapshot, getServerSnapshot)\n}\n"]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { useLinkComponent } from './chunk-GTKKRV5N.js';
|
|
2
|
-
import { useUncontrolled } from './chunk-
|
|
3
|
-
import { ChevronIcon } from './chunk-
|
|
4
|
-
import { Collapse } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useUncontrolled } from './chunk-PMUCGFY5.js';
|
|
3
|
+
import { ChevronIcon } from './chunk-6YNLRQ25.js';
|
|
4
|
+
import { Collapse } from './chunk-NKOTA5TM.js';
|
|
5
|
+
import { props } from './chunk-WYCMIIRR.js';
|
|
6
|
+
import { focusStyles } from './chunk-C6NVU4F7.js';
|
|
7
|
+
import { TEXT_COLOR_CLASSES } from './chunk-GIPQUKCN.js';
|
|
8
|
+
import { cn } from './chunk-4ASNIDV7.js';
|
|
7
9
|
import { cva } from 'class-variance-authority';
|
|
10
|
+
import { useId } from 'react';
|
|
8
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
12
|
|
|
10
13
|
var navLinkRow = cva(
|
|
@@ -18,16 +21,16 @@ var navLinkRow = cva(
|
|
|
18
21
|
{
|
|
19
22
|
variants: {
|
|
20
23
|
current: {
|
|
21
|
-
true: "bg-black/5 font-medium text-
|
|
22
|
-
false:
|
|
24
|
+
true: "bg-black/5 font-medium text-brand-950 dark:bg-white/8 dark:text-white",
|
|
25
|
+
false: TEXT_COLOR_CLASSES.secondary
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
defaultVariants: { current: false }
|
|
26
29
|
}
|
|
27
30
|
);
|
|
28
31
|
var chevronButton = cn(
|
|
29
|
-
"flex shrink-0 cursor-pointer items-center justify-center rounded-md p-2 text-
|
|
30
|
-
"hover:bg-black/5 dark:text-
|
|
32
|
+
"flex shrink-0 cursor-pointer items-center justify-center rounded-md p-2 text-black/50 transition-colors",
|
|
33
|
+
"hover:bg-black/5 dark:text-white/50 dark:hover:bg-white/8",
|
|
31
34
|
focusStyles()
|
|
32
35
|
);
|
|
33
36
|
var chevron = (open) => /* @__PURE__ */ jsx(
|
|
@@ -53,7 +56,8 @@ function NavLinkImpl({
|
|
|
53
56
|
classNames,
|
|
54
57
|
className,
|
|
55
58
|
translations,
|
|
56
|
-
children
|
|
59
|
+
children,
|
|
60
|
+
testId
|
|
57
61
|
}) {
|
|
58
62
|
const [isOpen, setOpen] = useUncontrolled({
|
|
59
63
|
value: open,
|
|
@@ -64,30 +68,31 @@ function NavLinkImpl({
|
|
|
64
68
|
const hasChildren = children != null;
|
|
65
69
|
const isLink = linkOptions != null;
|
|
66
70
|
const Comp = useLinkComponent(linkComponent) ?? "a";
|
|
71
|
+
const itemsId = `nav-link-items-${useId()}`;
|
|
67
72
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
73
|
startSlot,
|
|
69
74
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
70
75
|
endSlot
|
|
71
76
|
] });
|
|
72
77
|
const rowClassName = cn(navLinkRow({ current }), classNames?.row, className);
|
|
78
|
+
const rowState = props({
|
|
79
|
+
"aria-current": current && "page",
|
|
80
|
+
"aria-disabled": disabled,
|
|
81
|
+
"data-testid": testId
|
|
82
|
+
});
|
|
73
83
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
74
84
|
/* @__PURE__ */ jsxs("div", { className: "flex items-stretch gap-1", children: [
|
|
75
|
-
isLink
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"aria-disabled": disabled || void 0,
|
|
81
|
-
className: rowClassName,
|
|
82
|
-
children: content
|
|
83
|
-
}
|
|
84
|
-
) : /* @__PURE__ */ jsxs(
|
|
85
|
+
isLink && disabled ? (
|
|
86
|
+
// No `href`, so no tab stop and nothing for Enter to follow; the
|
|
87
|
+
// explicit role keeps it announced as a (disabled) link.
|
|
88
|
+
/* @__PURE__ */ jsx("a", { role: "link", ...rowState, className: rowClassName, children: content })
|
|
89
|
+
) : isLink ? /* @__PURE__ */ jsx(Comp, { ...linkOptions, ...rowState, className: rowClassName, children: content }) : /* @__PURE__ */ jsxs(
|
|
85
90
|
"button",
|
|
86
91
|
{
|
|
87
92
|
type: "button",
|
|
88
|
-
|
|
89
|
-
"aria-disabled": disabled || void 0,
|
|
93
|
+
...rowState,
|
|
90
94
|
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
95
|
+
...props({ "aria-controls": hasChildren && itemsId }),
|
|
91
96
|
disabled,
|
|
92
97
|
onClick: () => hasChildren && setOpen(!isOpen),
|
|
93
98
|
className: rowClassName,
|
|
@@ -102,6 +107,7 @@ function NavLinkImpl({
|
|
|
102
107
|
{
|
|
103
108
|
type: "button",
|
|
104
109
|
"aria-expanded": isOpen,
|
|
110
|
+
"aria-controls": itemsId,
|
|
105
111
|
"aria-label": isOpen ? translations?.collapseLabel ?? "Collapse" : translations?.expandLabel ?? "Expand",
|
|
106
112
|
onClick: () => setOpen(!isOpen),
|
|
107
113
|
className: chevronButton,
|
|
@@ -112,6 +118,7 @@ function NavLinkImpl({
|
|
|
112
118
|
hasChildren && /* @__PURE__ */ jsx(Collapse, { open: isOpen, children: /* @__PURE__ */ jsx(
|
|
113
119
|
"div",
|
|
114
120
|
{
|
|
121
|
+
id: itemsId,
|
|
115
122
|
className: cn(
|
|
116
123
|
"ms-4.5 space-y-0.5 border-s border-brand-900/20 ps-2 pt-0.5 dark:border-white/15",
|
|
117
124
|
classNames?.items
|
|
@@ -121,10 +128,11 @@ function NavLinkImpl({
|
|
|
121
128
|
) })
|
|
122
129
|
] });
|
|
123
130
|
}
|
|
124
|
-
function NavLink(
|
|
125
|
-
return /* @__PURE__ */ jsx(NavLinkImpl, { ...
|
|
131
|
+
function NavLink(props2) {
|
|
132
|
+
return /* @__PURE__ */ jsx(NavLinkImpl, { ...props2 });
|
|
126
133
|
}
|
|
127
|
-
var
|
|
134
|
+
var listClasses = "m-0 list-none p-0";
|
|
135
|
+
var renderItem = (item, key, linkComponent, translations) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
128
136
|
NavLink,
|
|
129
137
|
{
|
|
130
138
|
label: item.label,
|
|
@@ -139,17 +147,23 @@ var renderItem = (item, key, linkComponent, translations) => /* @__PURE__ */ jsx
|
|
|
139
147
|
linkComponent,
|
|
140
148
|
classNames: item.classNames,
|
|
141
149
|
translations,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
testId: item.testId,
|
|
151
|
+
children: item.items && item.items.length > 0 ? (
|
|
152
|
+
// NavLink spaces its direct children; the list is now that one child,
|
|
153
|
+
// so it carries the same spacing for its own items.
|
|
154
|
+
/* @__PURE__ */ jsx("ul", { className: `${listClasses} space-y-0.5`, children: item.items.map(
|
|
155
|
+
(child, i) => renderItem(child, `${key}.${i}`, linkComponent, translations)
|
|
156
|
+
) })
|
|
157
|
+
) : void 0
|
|
158
|
+
}
|
|
159
|
+
) }, key);
|
|
160
|
+
function NavigationImpl({ data, linkComponent, translations, testId }) {
|
|
161
|
+
return /* @__PURE__ */ jsx("ul", { className: listClasses, ...props({ "data-testid": testId }), children: data.map((item, i) => renderItem(item, `nav-${i}`, linkComponent, translations)) });
|
|
148
162
|
}
|
|
149
|
-
function Navigation(
|
|
150
|
-
return /* @__PURE__ */ jsx(NavigationImpl, { ...
|
|
163
|
+
function Navigation(props2) {
|
|
164
|
+
return /* @__PURE__ */ jsx(NavigationImpl, { ...props2 });
|
|
151
165
|
}
|
|
152
166
|
|
|
153
167
|
export { NavLink, Navigation };
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
168
|
+
//# sourceMappingURL=chunk-HRNWWL3Y.js.map
|
|
169
|
+
//# sourceMappingURL=chunk-HRNWWL3Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/nav-link/nav-link.tsx","../src/components/nav-link/navigation.tsx"],"names":["props","jsx"],"mappings":";;;;;;;;;;;;AA6CA,IAAM,UAAA,GAAa,GAAA;AAAA,EACjB;AAAA,IACE,iGAAA;AAAA,IACA,gCAAA;AAAA,IACA,wCAAA;AAAA,IACA,WAAA,EAAY;AAAA,IACZ;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,IAAA,EAAM,uEAAA;AAAA,QACN,OAAO,kBAAA,CAAmB;AAAA;AAC5B,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA;AAAM;AAEtC,CAAA;AAEA,IAAM,aAAA,GAAgB,EAAA;AAAA,EACpB,yGAAA;AAAA,EACA,2DAAA;AAAA,EACA,WAAA;AACF,CAAA;AAEA,IAAM,OAAA,GAAU,CAAC,IAAA,qBACf,GAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,aAAA,EAAY,MAAA;AAAA,IACZ,YAAA,EAAY,OAAO,MAAA,GAAS,QAAA;AAAA,IAC5B,SAAA,EAAU,wFAAA;AAAA,IAEV,8BAAC,WAAA,EAAA,EAAY;AAAA;AACf,CAAA;AAkDF,SAAS,WAAA,CAAY;AAAA,EACnB,KAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AA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AA,CAAA,EAAI,aAAA,EAAe,YAAY;AAAA,OAC9D,EACF;AAAA,QACE;AAAA;AACN,CAAA,EAAA,EAzBO,GA0BT,CAAA;AAGF,SAAS,eAAe,EAAE,IAAA,EAAM,aAAA,EAAe,YAAA,EAAc,QAAO,EAAoB;AACtF,EAAA,uBACEA,GAAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAW,WAAA,EAAc,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,MAAA,EAAQ,CAAA,EAC5D,eAAK,GAAA,CAAI,CAAC,IAAA,EAAM,CAAA,KAAM,UAAA,CAAW,IAAA,EAAM,CAAA,IAAA,EAAO,CAAC,CAAA,CAAA,EAAI,aAAA,EAAe,YAAY,CAAC,CAAA,EAClF,CAAA;AAEJ;AAIO,SAAS,WAAWD,MAAAA,EAAmC;AAC5D,EAAA,uBAAOC,GAAAA,CAAC,cAAA,EAAA,EAAgB,GAAGD,MAAAA,EAAO,CAAA;AACpC","file":"chunk-HRNWWL3Y.js","sourcesContent":["\"use client\"\n\nimport { cva } from \"class-variance-authority\"\nimport { type ElementType, type ReactNode, useId } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { useLinkComponent } from \"../../lib/link-component\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Collapse } from \"../collapse/collapse\"\nimport { ChevronIcon } from \"../popover/icons\"\n\n/**\n * NavLink — a single sidebar/nav row: leading `startSlot`, `label`, trailing\n * `endSlot`, current-page treatment, and self-nesting via `children` for\n * arbitrary-depth sub-navigation (each nested `<NavLink>` renders indented,\n * revealed with `Collapse` when the parent is `open`).\n *\n * Router-agnostic: pass whatever the target link needs as `linkOptions` (a\n * plain `{ href }` for a bare `<a>`, or a framework router's own shape, e.g.\n * TanStack Router's `{ to, params }`) — it's spread verbatim onto whatever\n * renders the link. `linkComponent` picks what that is; if omitted, it falls\n * back to the app-wide `<LinkComponentProvider>` (see `lib/link-component`),\n * then to a plain `<a>`. Generic over `linkOptions`'s shape so a router's own\n * type-safety utilities can validate/autocomplete it — see\n * `nav-link/tanstack.tsx` for a TanStack Router–typed wrapper built this way.\n *\n * A row with no `linkOptions` (a pure category / toggle heading) renders as a\n * `<button>` instead of a link. A row with both `linkOptions` and nested\n * children renders the link and its expand/collapse toggle as two separate\n * controls (a link nested inside a button, or vice versa, isn't valid HTML).\n *\n * A `disabled` link row drops its target: it renders a plain `<a role=\"link\"\n * aria-disabled=\"true\">` with no `href` (and so no tab stop), bypassing\n * `linkComponent` — a router's `Link` would put the `href` straight back.\n *\n * <NavLink label=\"Dashboard\" startSlot={<Home />} linkOptions={{ href: \"/dashboard\" }} />\n * <NavLink label=\"Settings\" startSlot={<Settings />} defaultOpen>\n * <NavLink label=\"Profile\" linkOptions={{ href: \"/settings/profile\" }} />\n * <NavLink label=\"Security\" linkOptions={{ href: \"/settings/security\" }} />\n * </NavLink>\n */\n\nconst navLinkRow = cva(\n [\n \"flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-start text-sm\",\n \"outline-none transition-colors\",\n \"hover:bg-black/5 dark:hover:bg-white/8\",\n focusStyles(),\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n ],\n {\n variants: {\n current: {\n true: \"bg-black/5 font-medium text-brand-950 dark:bg-white/8 dark:text-white\",\n false: TEXT_COLOR_CLASSES.secondary,\n },\n },\n defaultVariants: { current: false },\n },\n)\n\nconst chevronButton = cn(\n \"flex shrink-0 cursor-pointer items-center justify-center rounded-md p-2 text-black/50 transition-colors\",\n \"hover:bg-black/5 dark:text-white/50 dark:hover:bg-white/8\",\n focusStyles(),\n)\n\nconst chevron = (open: boolean) => (\n <span\n aria-hidden=\"true\"\n data-state={open ? \"open\" : \"closed\"}\n className=\"ms-auto flex shrink-0 transition-transform data-[state=open]:rotate-180 [&_svg]:size-4\"\n >\n <ChevronIcon />\n </span>\n)\n\nexport type NavLinkClassNames = {\n /** The link/button row itself. */\n row?: string\n /** The indented container holding nested `<NavLink>` children. */\n items?: string\n}\n\n/** The expand/collapse chevron's accessible names — the same keys as `Notification`'s. Only\n * rendered for a row that is both a link and has children (a pure toggle row is its own\n * button, named by its label). */\nexport type NavLinkTranslations = {\n /** While the children are revealed. Default `\"Collapse\"`. */\n collapseLabel?: string\n /** While the children are hidden. Default `\"Expand\"`. */\n expandLabel?: string\n}\n\nexport type NavLinkProps<TOptions = unknown> = WithTestId & {\n label: ReactNode\n /** Leading slot (icon, avatar, etc). */\n startSlot?: ReactNode\n /** Trailing slot (e.g. a count or status badge). */\n endSlot?: ReactNode\n /** Marks this as the active/current page. */\n current?: boolean\n /** Not interactive: a link row loses its `href` and tab stop, a toggle row\n * its button behaviour; both keep `aria-disabled` so they're announced. */\n disabled?: boolean\n /** Whether nested `children` are revealed. Uncontrolled by default. */\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n /** The router's own link options — e.g. `{ href: \"/x\" }` for a plain `<a>`,\n * or `{ to: \"/x\", params: {...} }` for TanStack Router. Omit for a pure\n * category/toggle row with no link of its own. */\n linkOptions?: TOptions\n /** Overrides the `<LinkComponentProvider>` for this row only. */\n linkComponent?: ElementType\n classNames?: NavLinkClassNames\n className?: string\n /** Overrides the expand/collapse chevron's accessible names. A partial override keeps the\n * other default. */\n translations?: NavLinkTranslations\n /** Nested `<NavLink>` elements, revealed when `open`. */\n children?: ReactNode\n}\n\nfunction NavLinkImpl({\n label,\n startSlot,\n endSlot,\n current,\n disabled,\n open,\n defaultOpen,\n onOpenChange,\n linkOptions,\n linkComponent,\n classNames,\n className,\n translations,\n children,\n testId,\n}: NavLinkProps) {\n const [isOpen, setOpen] = useUncontrolled<boolean>({\n value: open,\n defaultValue: defaultOpen,\n finalValue: false,\n onChange: onOpenChange,\n })\n const hasChildren = children != null\n const isLink = linkOptions != null\n const Comp = useLinkComponent(linkComponent) ?? \"a\"\n const itemsId = `nav-link-items-${useId()}`\n\n const content = (\n <>\n {startSlot}\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n {endSlot}\n </>\n )\n\n const rowClassName = cn(navLinkRow({ current }), classNames?.row, className)\n const rowState = props({\n \"aria-current\": current && \"page\",\n \"aria-disabled\": disabled,\n \"data-testid\": testId,\n })\n\n return (\n <div>\n <div className=\"flex items-stretch gap-1\">\n {isLink && disabled ? (\n // No `href`, so no tab stop and nothing for Enter to follow; the\n // explicit role keeps it announced as a (disabled) link.\n <a role=\"link\" {...rowState} className={rowClassName}>\n {content}\n </a>\n ) : isLink ? (\n <Comp {...linkOptions} {...rowState} className={rowClassName}>\n {content}\n </Comp>\n ) : (\n <button\n type=\"button\"\n {...rowState}\n aria-expanded={hasChildren ? isOpen : undefined}\n {...props({ \"aria-controls\": hasChildren && itemsId })}\n disabled={disabled}\n onClick={() => hasChildren && setOpen(!isOpen)}\n className={rowClassName}\n >\n {content}\n {hasChildren && chevron(isOpen)}\n </button>\n )}\n {hasChildren && isLink && (\n <button\n type=\"button\"\n aria-expanded={isOpen}\n aria-controls={itemsId}\n aria-label={\n isOpen\n ? (translations?.collapseLabel ?? \"Collapse\")\n : (translations?.expandLabel ?? \"Expand\")\n }\n onClick={() => setOpen(!isOpen)}\n className={chevronButton}\n >\n {chevron(isOpen)}\n </button>\n )}\n </div>\n {hasChildren && (\n <Collapse open={isOpen}>\n <div\n id={itemsId}\n className={cn(\n \"ms-4.5 space-y-0.5 border-s border-brand-900/20 ps-2 pt-0.5 dark:border-white/15\",\n classNames?.items,\n )}\n >\n {children}\n </div>\n </Collapse>\n )}\n </div>\n )\n}\n\n/**\n * `NavLink<TOptions>` — generic so a router's own type-safety utility (e.g.\n * TanStack Router's `ValidateLinkOptions`) can validate `linkOptions` when\n * explicitly parameterized. The implementation itself stays untyped/loose\n * (the generic can't be forwarded through the JSX body); see\n * TanStack Router's own documented pattern for this exact split.\n */\nexport function NavLink<TOptions = unknown>(props: NavLinkProps<TOptions>): ReactNode\nexport function NavLink(props: NavLinkProps): ReactNode {\n return <NavLinkImpl {...props} />\n}\n","\"use client\"\n\nimport type { ElementType, ReactNode } from \"react\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { NavLink, type NavLinkClassNames, type NavLinkTranslations } from \"./nav-link\"\n\n/**\n * `Navigation` — the `data`-driven convenience wrapper over `NavLink` (same\n * relationship as `menu-data.tsx` to `menu.tsx`): pass a `data` array, get a\n * fully wired, arbitrarily-nested nav tree.\n *\n * <Navigation\n * data={[\n * { label: \"Dashboard\", startSlot: <Home />, linkOptions: { href: \"/dashboard\" } },\n * { label: \"Settings\", startSlot: <Settings />, items: [\n * { label: \"Profile\", linkOptions: { href: \"/settings/profile\" } },\n * { label: \"Security\", linkOptions: { href: \"/settings/security\" } },\n * ]},\n * ]}\n * />\n *\n * Generic over the same `TOptions` as `NavLink` — parameterize it (e.g. with\n * `TanStackLinkOptions` from `nav-link/tanstack`) to get a router's own\n * type-safety utilities validating every entry's `linkOptions`.\n *\n * Renders a real list — a `<ul>` of `<li>`, nested `<ul>`s for `items` — so a\n * screen reader announces how many entries each level holds. List styles are\n * reset, so it looks the same as composing `NavLink`s by hand.\n */\nexport type NavigationItem<TOptions = unknown> = {\n label: ReactNode\n startSlot?: ReactNode\n endSlot?: ReactNode\n current?: boolean\n disabled?: boolean\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n linkOptions?: TOptions\n classNames?: NavLinkClassNames\n /** `data-testid` on this entry's row (its link or button). */\n testId?: string\n /** Nested entries — an item with `items` renders its children indented,\n * revealed on expand/collapse. Recursive: nests to any depth. */\n items?: readonly NavigationItem<TOptions>[]\n}\n\nexport type NavigationProps<TOptions = unknown> = WithTestId & {\n /** The nav entries, in order. */\n data: readonly NavigationItem<TOptions>[]\n /** Overrides the app-wide `<LinkComponentProvider>` for every generated row. */\n linkComponent?: ElementType\n /** `NavLink`'s chevron names, forwarded to every generated row. */\n translations?: NavLinkTranslations\n}\n\n/** The `<ul>` reset: no bullets, no indent, so the list is invisible. */\nconst listClasses = \"m-0 list-none p-0\"\n\nconst renderItem = (\n item: NavigationItem,\n key: string,\n linkComponent: ElementType | undefined,\n translations: NavLinkTranslations | undefined,\n): ReactNode => (\n <li key={key}>\n <NavLink\n label={item.label}\n startSlot={item.startSlot}\n endSlot={item.endSlot}\n current={item.current}\n disabled={item.disabled}\n open={item.open}\n defaultOpen={item.defaultOpen}\n onOpenChange={item.onOpenChange}\n linkOptions={item.linkOptions}\n linkComponent={linkComponent}\n classNames={item.classNames}\n translations={translations}\n testId={item.testId}\n >\n {item.items && item.items.length > 0 ? (\n // NavLink spaces its direct children; the list is now that one child,\n // so it carries the same spacing for its own items.\n <ul className={`${listClasses} space-y-0.5`}>\n {item.items.map((child, i) =>\n renderItem(child, `${key}.${i}`, linkComponent, translations),\n )}\n </ul>\n ) : undefined}\n </NavLink>\n </li>\n)\n\nfunction NavigationImpl({ data, linkComponent, translations, testId }: NavigationProps) {\n return (\n <ul className={listClasses} {...props({ \"data-testid\": testId })}>\n {data.map((item, i) => renderItem(item, `nav-${i}`, linkComponent, translations))}\n </ul>\n )\n}\n\n/** Generic for the same reason as `NavLink` — see its doc comment. */\nexport function Navigation<TOptions = unknown>(props: NavigationProps<TOptions>): ReactNode\nexport function Navigation(props: NavigationProps): ReactNode {\n return <NavigationImpl {...props} />\n}\n"]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { prefersReducedMotion } from './chunk-CQ4M4BSF.js';
|
|
2
|
+
|
|
3
|
+
// src/lib/motion/easing.ts
|
|
4
|
+
var STEP = 10;
|
|
5
|
+
var frames = (duration) => Math.max(1, Math.ceil(duration / STEP));
|
|
6
|
+
var sampleEasing = (easing, count) => Array.from({ length: count + 1 }, (_, i) => easing(i / count));
|
|
7
|
+
var EPSILON = 1e-7;
|
|
8
|
+
function cubicBezier(x1, y1, x2, y2) {
|
|
9
|
+
const cx = 3 * x1;
|
|
10
|
+
const bx = 3 * (x2 - x1) - cx;
|
|
11
|
+
const ax = 1 - cx - bx;
|
|
12
|
+
const cy = 3 * y1;
|
|
13
|
+
const by = 3 * (y2 - y1) - cy;
|
|
14
|
+
const ay = 1 - cy - by;
|
|
15
|
+
const sampleX = (s) => ((ax * s + bx) * s + cx) * s;
|
|
16
|
+
const sampleY = (s) => ((ay * s + by) * s + cy) * s;
|
|
17
|
+
const slopeX = (s) => (3 * ax * s + 2 * bx) * s + cx;
|
|
18
|
+
const newton = (x, s, left) => {
|
|
19
|
+
const error = sampleX(s) - x;
|
|
20
|
+
if (Math.abs(error) < EPSILON) return s;
|
|
21
|
+
const slope = slopeX(s);
|
|
22
|
+
if (left === 0 || Math.abs(slope) < EPSILON) return void 0;
|
|
23
|
+
return newton(x, s - error / slope, left - 1);
|
|
24
|
+
};
|
|
25
|
+
const bisect = (x, lo, hi, left) => {
|
|
26
|
+
const mid = (lo + hi) / 2;
|
|
27
|
+
const error = sampleX(mid) - x;
|
|
28
|
+
if (left === 0 || Math.abs(error) < EPSILON) return mid;
|
|
29
|
+
return error > 0 ? bisect(x, lo, mid, left - 1) : bisect(x, mid, hi, left - 1);
|
|
30
|
+
};
|
|
31
|
+
return (t) => {
|
|
32
|
+
if (t <= 0) return 0;
|
|
33
|
+
if (t >= 1) return 1;
|
|
34
|
+
return sampleY(newton(t, t, 8) ?? bisect(t, 0, 1, 40));
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
var piecewise = (stops) => (t) => {
|
|
38
|
+
const last = stops.length - 1;
|
|
39
|
+
if (t <= 0) return stops[0] ?? 0;
|
|
40
|
+
if (t >= 1) return stops[last] ?? 1;
|
|
41
|
+
const at = t * last;
|
|
42
|
+
const i = Math.floor(at);
|
|
43
|
+
const a = stops[i] ?? 0;
|
|
44
|
+
const b = stops[i + 1] ?? a;
|
|
45
|
+
return a + (b - a) * (at - i);
|
|
46
|
+
};
|
|
47
|
+
var numbers = (args) => args.split(",").map((part) => Number(part.trim()));
|
|
48
|
+
function parseEasing(css) {
|
|
49
|
+
const value = css.trim();
|
|
50
|
+
if (value === "linear") return (t) => t;
|
|
51
|
+
const call = value.match(/^(cubic-bezier|linear)\((.*)\)$/);
|
|
52
|
+
if (!call) return void 0;
|
|
53
|
+
const [, name, args = ""] = call;
|
|
54
|
+
const values = numbers(args);
|
|
55
|
+
if (values.some((n) => !Number.isFinite(n))) return void 0;
|
|
56
|
+
if (name === "linear") return values.length >= 2 ? piecewise(values) : void 0;
|
|
57
|
+
const [x1, y1, x2, y2] = values;
|
|
58
|
+
return values.length === 4 && x1 !== void 0 && y1 !== void 0 && x2 !== void 0 && y2 !== void 0 ? cubicBezier(x1, y1, x2, y2) : void 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/lib/motion/spring.ts
|
|
62
|
+
var SPRINGS = {
|
|
63
|
+
/** Things coming to rest: a released drag snapping back, a panel settling. */
|
|
64
|
+
settle: { duration: 400, bounce: 0 },
|
|
65
|
+
/** A release that carries momentum past its target, once, then settles. */
|
|
66
|
+
overshoot: { duration: 450, bounce: 0.18 },
|
|
67
|
+
/** Short corrective moves — a nudge back into bounds. */
|
|
68
|
+
snap: { duration: 250, bounce: 0 }
|
|
69
|
+
};
|
|
70
|
+
var REST = 1e-3;
|
|
71
|
+
function restPhase(zeta) {
|
|
72
|
+
if (zeta < 1) return Math.log(1 / (REST * Math.sqrt(1 - zeta * zeta))) / zeta;
|
|
73
|
+
const newton = (u, left) => {
|
|
74
|
+
const f = Math.log(1 + u) - u - Math.log(REST);
|
|
75
|
+
const next = u - f / (1 / (1 + u) - 1);
|
|
76
|
+
return left === 0 || Math.abs(next - u) < 1e-9 ? next : newton(next, left - 1);
|
|
77
|
+
};
|
|
78
|
+
return newton(10, 20);
|
|
79
|
+
}
|
|
80
|
+
function spring({ duration, bounce, velocity = 0 }) {
|
|
81
|
+
const zeta = 1 - Math.min(Math.max(bounce, 0), 0.95);
|
|
82
|
+
const omega = 2 * Math.PI / duration;
|
|
83
|
+
const settle = Math.ceil(restPhase(zeta) / omega);
|
|
84
|
+
const x0 = -1;
|
|
85
|
+
const displacement = (t) => {
|
|
86
|
+
if (zeta >= 1) {
|
|
87
|
+
const b2 = velocity + omega * x0;
|
|
88
|
+
const decay2 = Math.exp(-omega * t);
|
|
89
|
+
return {
|
|
90
|
+
value: decay2 * (x0 + b2 * t),
|
|
91
|
+
velocity: decay2 * (b2 - omega * (x0 + b2 * t))
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const damped = omega * Math.sqrt(1 - zeta * zeta);
|
|
95
|
+
const b = (velocity + zeta * omega * x0) / damped;
|
|
96
|
+
const decay = Math.exp(-zeta * omega * t);
|
|
97
|
+
const cos = Math.cos(damped * t);
|
|
98
|
+
const sin = Math.sin(damped * t);
|
|
99
|
+
return {
|
|
100
|
+
value: decay * (x0 * cos + b * sin),
|
|
101
|
+
velocity: decay * ((b * damped - zeta * omega * x0) * cos - (x0 * damped + zeta * omega * b) * sin)
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
duration,
|
|
106
|
+
settle,
|
|
107
|
+
at: (t) => {
|
|
108
|
+
if (t <= 0) return { value: 0, velocity };
|
|
109
|
+
if (t >= settle) return { value: 1, velocity: 0 };
|
|
110
|
+
const state = displacement(t);
|
|
111
|
+
return { value: 1 + state.value, velocity: state.velocity };
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
var sampleSpring = (s) => {
|
|
116
|
+
const count = frames(s.settle);
|
|
117
|
+
return Array.from({ length: count + 1 }, (_, i) => s.at(i / count * s.settle).value);
|
|
118
|
+
};
|
|
119
|
+
var round = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
120
|
+
var springLinear = (options) => `linear(${sampleSpring(spring(options)).map(round).join(", ")})`;
|
|
121
|
+
|
|
122
|
+
// src/lib/motion/tokens.ts
|
|
123
|
+
var DURATIONS = {
|
|
124
|
+
instant: 100,
|
|
125
|
+
fast: 150,
|
|
126
|
+
normal: 200,
|
|
127
|
+
slow: 300,
|
|
128
|
+
/** `SPRINGS.settle`'s perceived duration — the number to design with. */
|
|
129
|
+
spring: SPRINGS.settle.duration,
|
|
130
|
+
/** What `--ease-spring` must be played over. */
|
|
131
|
+
"spring-settle": spring(SPRINGS.settle).settle,
|
|
132
|
+
/** What `--ease-spring-overshoot` must be played over. */
|
|
133
|
+
"spring-overshoot-settle": spring(SPRINGS.overshoot).settle
|
|
134
|
+
};
|
|
135
|
+
var EASINGS = {
|
|
136
|
+
/** Colours and fades. */
|
|
137
|
+
standard: "cubic-bezier(0.2, 0, 0, 1)",
|
|
138
|
+
/** Large travel: a tab pill, a lightbox morph. */
|
|
139
|
+
emphasized: "cubic-bezier(0.32, 0.72, 0, 1)",
|
|
140
|
+
/** Entering transforms only. Never opacity — two-thirds of its motion lands in
|
|
141
|
+
* the first 15%, so a fade on it reads as a blink. */
|
|
142
|
+
decelerate: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
143
|
+
/** Exits. */
|
|
144
|
+
accelerate: "cubic-bezier(0.4, 0, 1, 1)",
|
|
145
|
+
/** Modal and drawer entrances: a hair of wind-up before they travel. */
|
|
146
|
+
anticipate: "cubic-bezier(0.18, -0.04, 0.55, 1)",
|
|
147
|
+
/** A one-shot pop past the target and back. */
|
|
148
|
+
overshoot: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
149
|
+
/** `SPRINGS.settle`, to play over `--duration-spring-settle`. */
|
|
150
|
+
spring: springLinear(SPRINGS.settle),
|
|
151
|
+
/** `SPRINGS.overshoot`, to play over `--duration-spring-overshoot-settle`. */
|
|
152
|
+
"spring-overshoot": springLinear(SPRINGS.overshoot)
|
|
153
|
+
};
|
|
154
|
+
var isEase = (name) => Object.hasOwn(EASINGS, name);
|
|
155
|
+
|
|
156
|
+
// src/lib/motion/animate.ts
|
|
157
|
+
var token = (el, name) => typeof getComputedStyle === "function" ? getComputedStyle(el).getPropertyValue(name).trim() : "";
|
|
158
|
+
function parseTime(value) {
|
|
159
|
+
const time = value.match(/^(-?[\d.]+)(ms|s)$/);
|
|
160
|
+
if (!time) return void 0;
|
|
161
|
+
const n = Number(time[1]);
|
|
162
|
+
if (!Number.isFinite(n)) return void 0;
|
|
163
|
+
return time[2] === "s" ? n * 1e3 : n;
|
|
164
|
+
}
|
|
165
|
+
function durationOf(el, duration) {
|
|
166
|
+
if (typeof duration === "number") return duration;
|
|
167
|
+
return parseTime(token(el, `--duration-${duration}`)) ?? DURATIONS[duration];
|
|
168
|
+
}
|
|
169
|
+
function easingOf(el, easing) {
|
|
170
|
+
if (!isEase(easing)) return easing;
|
|
171
|
+
return token(el, `--ease-${easing}`) || EASINGS[easing];
|
|
172
|
+
}
|
|
173
|
+
var settled = (animation) => animation.finished.then(
|
|
174
|
+
() => true,
|
|
175
|
+
() => false
|
|
176
|
+
);
|
|
177
|
+
function animate(el, keyframes, { duration = "normal", easing = "standard", ...options } = {}) {
|
|
178
|
+
if (typeof el.animate !== "function") {
|
|
179
|
+
return { animation: null, finished: Promise.resolve(true), cancel: () => {
|
|
180
|
+
} };
|
|
181
|
+
}
|
|
182
|
+
const ms = prefersReducedMotion() ? 0 : durationOf(el, duration);
|
|
183
|
+
const animation = el.animate(keyframes, {
|
|
184
|
+
...options,
|
|
185
|
+
duration: ms,
|
|
186
|
+
easing: easingOf(el, easing)
|
|
187
|
+
});
|
|
188
|
+
return { animation, finished: settled(animation), cancel: () => animation.cancel() };
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { EASINGS, SPRINGS, animate, durationOf, easingOf, frames, parseEasing, sampleEasing, sampleSpring, spring };
|
|
192
|
+
//# sourceMappingURL=chunk-HX3LNK26.js.map
|
|
193
|
+
//# sourceMappingURL=chunk-HX3LNK26.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/motion/easing.ts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SAAA,EACA,EAAE,QAAA,GAAW,QAAA,EAAU,MAAA,GAAS,UAAA,EAAY,GAAG,OAAA,EAAQ,GAAoB,EAAC,EAClE;AACV,EAAA,IAAI,OAAO,EAAA,CAAG,OAAA,KAAY,UAAA,EAAY;AAGpC,IAAA,OAAO,EAAE,WAAW,IAAA,EAAM,QAAA,EAAU,QAAQ,OAAA,CAAQ,IAAI,CAAA,EAAG,MAAA,EAAQ,MAAM;AAAA,IAAC,CAAA,EAAE;AAAA,EAC9E;AACA,EAAA,MAAM,KAAK,oBAAA,EAAqB,GAAI,CAAA,GAAI,UAAA,CAAW,IAAI,QAAQ,CAAA;AAC/D,EAAA,MAAM,SAAA,GAAY,EAAA,CAAG,OAAA,CAAQ,SAAA,EAAW;AAAA,IACtC,GAAG,OAAA;AAAA,IACH,QAAA,EAAU,EAAA;AAAA,IACV,MAAA,EAAQ,QAAA,CAAS,EAAA,EAAI,MAAM;AAAA,GAC5B,CAAA;AACD,EAAA,OAAO,EAAE,SAAA,EAAW,QAAA,EAAU,OAAA,CAAQ,SAAS,GAAG,MAAA,EAAQ,MAAM,SAAA,CAAU,MAAA,EAAO,EAAE;AACrF","file":"chunk-HX3LNK26.js","sourcesContent":["/**\n * Easing curves as plain functions of progress, so JS can sample the same\n * curve CSS would play.\n *\n * WAAPI can ease between two keyframes on its own, but not when two elements\n * have to stay in lockstep through a nonlinear relation — the morph's frame\n * and its counter-scaled image drift apart mid-flight if each eases its own\n * pair. Those cases sample the eased progress here, write one keyframe per\n * sample, and play the result with `linear` easing.\n */\n\n/** Maps linear time progress in `[0, 1]` to eased progress. */\nexport type Easing = (t: number) => number\n\n/** ms between samples. Fine enough that the straight segments of a sampled\n * curve read as smooth at 60fps, coarse enough to keep a `linear()` short. */\nexport const STEP = 10\n\n/** Number of segments to sample a curve of `duration` ms into. */\nexport const frames = (duration: number): number => Math.max(1, Math.ceil(duration / STEP))\n\n/** The eased progress at `count + 1` evenly spaced times, ends included. */\nexport const sampleEasing = (easing: Easing, count: number): number[] =>\n Array.from({ length: count + 1 }, (_, i) => easing(i / count))\n\nconst EPSILON = 1e-7\n\n/**\n * A CSS `cubic-bezier()` as a function — the UnitBezier solver browsers use:\n * a few Newton steps on x(s) = t, falling back to bisection where the slope\n * flattens out. The ends are pinned exactly, so a sampled curve always lands.\n */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): Easing {\n const cx = 3 * x1\n const bx = 3 * (x2 - x1) - cx\n const ax = 1 - cx - bx\n const cy = 3 * y1\n const by = 3 * (y2 - y1) - cy\n const ay = 1 - cy - by\n\n const sampleX = (s: number) => ((ax * s + bx) * s + cx) * s\n const sampleY = (s: number) => ((ay * s + by) * s + cy) * s\n const slopeX = (s: number) => (3 * ax * s + 2 * bx) * s + cx\n\n const newton = (x: number, s: number, left: number): number | undefined => {\n const error = sampleX(s) - x\n if (Math.abs(error) < EPSILON) return s\n const slope = slopeX(s)\n if (left === 0 || Math.abs(slope) < EPSILON) return undefined\n return newton(x, s - error / slope, left - 1)\n }\n\n const bisect = (x: number, lo: number, hi: number, left: number): number => {\n const mid = (lo + hi) / 2\n const error = sampleX(mid) - x\n if (left === 0 || Math.abs(error) < EPSILON) return mid\n return error > 0 ? bisect(x, lo, mid, left - 1) : bisect(x, mid, hi, left - 1)\n }\n\n return (t) => {\n if (t <= 0) return 0\n if (t >= 1) return 1\n return sampleY(newton(t, t, 8) ?? bisect(t, 0, 1, 40))\n }\n}\n\n/** A CSS `linear(a, b, …)` with evenly spaced stops — the only form the kit\n * generates — as a function. */\nconst piecewise =\n (stops: readonly number[]): Easing =>\n (t) => {\n const last = stops.length - 1\n if (t <= 0) return stops[0] ?? 0\n if (t >= 1) return stops[last] ?? 1\n const at = t * last\n const i = Math.floor(at)\n const a = stops[i] ?? 0\n const b = stops[i + 1] ?? a\n return a + (b - a) * (at - i)\n }\n\nconst numbers = (args: string) => args.split(\",\").map((part) => Number(part.trim()))\n\n/**\n * Reads a CSS timing function back into an `Easing`: `linear`,\n * `cubic-bezier(…)`, or a `linear(…)` of plain numbers. Anything else —\n * a keyword, `steps()`, a `linear()` with explicit percentages — returns\n * `undefined` so the caller falls back to a curve it knows.\n */\nexport function parseEasing(css: string): Easing | undefined {\n const value = css.trim()\n if (value === \"linear\") return (t) => t\n const call = value.match(/^(cubic-bezier|linear)\\((.*)\\)$/)\n if (!call) return undefined\n const [, name, args = \"\"] = call\n const values = numbers(args)\n if (values.some((n) => !Number.isFinite(n))) return undefined\n if (name === \"linear\") return values.length >= 2 ? piecewise(values) : undefined\n const [x1, y1, x2, y2] = values\n return values.length === 4 &&\n x1 !== undefined &&\n y1 !== undefined &&\n x2 !== undefined &&\n y2 !== undefined\n ? cubicBezier(x1, y1, x2, y2)\n : undefined\n}\n","import { frames } from \"./easing\"\n\n/**\n * A damped spring, solved in closed form — no integration, no frame loop, so\n * any instant can be asked for directly and a test needs no fake timers.\n *\n * Parameterised the way Apple and Framer present springs, by how long and how\n * bouncy rather than by stiffness and damping: the damping ratio is\n * `ζ = 1 − bounce`, so `bounce: 0` is critically damped (the fastest approach\n * that never overshoots) and anything above it overshoots, once noticeably,\n * then settles.\n *\n * `duration` is the *perceived* duration, with Apple's `Spring(duration:\n * bounce:)` mapping: stiffness `(2π / duration)²`, damping `4π·ζ / duration`,\n * unit mass. A 400ms spring looks done at about 400ms (98.6% of the way for\n * `bounce: 0`), then spends a while creeping the last hair into place.\n *\n * That tail is real motion, so a spring also reports `settle`: the ms until\n * the residual displacement is under `REST` (0.1% of the travel). `settle`, not\n * `duration`, is what to play its samples over — cut at `duration` and the\n * last 1.4% would snap. In CSS, `--ease-spring` pairs with\n * `--duration-spring-settle`, which theme.css generates from the same preset.\n *\n * Values are progress: 0 at the start, 1 at the target. Velocity is progress\n * per ms, so a pointer flick of `v` px/ms over a remaining travel of `d` px\n * enters as `velocity: v / d`.\n */\n\nexport type SpringOptions = {\n /** Perceived duration, ms — how long the motion *looks*. */\n duration: number\n /** 0 never overshoots; higher is bouncier. Clamped to `[0, 0.95]`. */\n bounce: number\n /** Starting velocity, in progress per ms. Defaults to 0. */\n velocity?: number\n}\n\nexport type SpringState = {\n /** Progress, 0 → 1. */\n value: number\n /** Progress per ms. */\n velocity: number\n}\n\nexport type Spring = {\n /** Perceived duration, ms, as given. */\n duration: number\n /** ms until at rest — the duration to actually play its samples over. */\n settle: number\n /** The spring's position and velocity `t` ms after it starts. */\n at: (t: number) => SpringState\n}\n\n/** The kit's named springs. `settle` and `overshoot` are also CSS tokens\n * (`--ease-spring`, `--ease-spring-overshoot`), generated by `springLinear`. */\nexport const SPRINGS = {\n /** Things coming to rest: a released drag snapping back, a panel settling. */\n settle: { duration: 400, bounce: 0 },\n /** A release that carries momentum past its target, once, then settles. */\n overshoot: { duration: 450, bounce: 0.18 },\n /** Short corrective moves — a nudge back into bounds. */\n snap: { duration: 250, bounce: 0 },\n} as const satisfies Record<string, SpringOptions>\n\n/** Residual displacement, as a fraction of the travel, left at `settle`. */\nconst REST = 0.001\n\n/**\n * ω₀·t at which exactly `REST` of the envelope is left.\n * Underdamped: the envelope is `e^(−ζu) / √(1−ζ²)`, solved directly.\n * Critically damped: `(1 + u)·e^(−u)` has no closed-form inverse, so a few\n * Newton steps on its log.\n */\nfunction restPhase(zeta: number): number {\n if (zeta < 1) return Math.log(1 / (REST * Math.sqrt(1 - zeta * zeta))) / zeta\n const newton = (u: number, left: number): number => {\n const f = Math.log(1 + u) - u - Math.log(REST)\n const next = u - f / (1 / (1 + u) - 1)\n return left === 0 || Math.abs(next - u) < 1e-9 ? next : newton(next, left - 1)\n }\n return newton(10, 20)\n}\n\nexport function spring({ duration, bounce, velocity = 0 }: SpringOptions): Spring {\n const zeta = 1 - Math.min(Math.max(bounce, 0), 0.95)\n const omega = (2 * Math.PI) / duration\n // Whole ms, rounded up: the residual only shrinks, and tokens stay clean.\n const settle = Math.ceil(restPhase(zeta) / omega)\n // Displacement from the target; starts a full travel short of it.\n const x0 = -1\n\n const displacement = (t: number): SpringState => {\n if (zeta >= 1) {\n const b = velocity + omega * x0\n const decay = Math.exp(-omega * t)\n return {\n value: decay * (x0 + b * t),\n velocity: decay * (b - omega * (x0 + b * t)),\n }\n }\n const damped = omega * Math.sqrt(1 - zeta * zeta)\n const b = (velocity + zeta * omega * x0) / damped\n const decay = Math.exp(-zeta * omega * t)\n const cos = Math.cos(damped * t)\n const sin = Math.sin(damped * t)\n return {\n value: decay * (x0 * cos + b * sin),\n velocity:\n decay * ((b * damped - zeta * omega * x0) * cos - (x0 * damped + zeta * omega * b) * sin),\n }\n }\n\n return {\n duration,\n settle,\n at: (t) => {\n if (t <= 0) return { value: 0, velocity }\n if (t >= settle) return { value: 1, velocity: 0 }\n const state = displacement(t)\n return { value: 1 + state.value, velocity: state.velocity }\n },\n }\n}\n\n/**\n * The spring's progress at evenly spaced instants until it settles, ends\n * exact. Play them as keyframes with `linear` easing over `spring.settle`.\n * Velocity-aware by construction: build the spring with the release velocity\n * and the samples carry the flick into the settle.\n */\nexport const sampleSpring = (s: Spring): number[] => {\n const count = frames(s.settle)\n return Array.from({ length: count + 1 }, (_, i) => s.at((i / count) * s.settle).value)\n}\n\nconst round = (n: number) => String(Math.round(n * 1000) / 1000)\n\n/** The spring as a CSS `linear()` timing function, to play over its *settle*\n * time. The source of `--ease-spring` and `--ease-spring-overshoot` in\n * theme.css; their settle times are `--duration-spring-settle` and\n * `--duration-spring-overshoot-settle`. */\nexport const springLinear = (options: SpringOptions): string =>\n `linear(${sampleSpring(spring(options)).map(round).join(\", \")})`\n","import { SPRINGS, spring, springLinear } from \"./spring\"\n\n/**\n * The motion tokens theme.css declares as `--duration-*` and `--ease-*`,\n * mirrored here as JS fallbacks for when the stylesheet isn't loaded (tests,\n * a consumer that skipped theme.css). theme.test.ts asserts the two agree, so\n * this is a mirror, not a second source of truth.\n */\n\n/** ms. The `-settle` ones are generated: a spring curve's real play time,\n * longer than the perceived duration it was designed at. */\nexport const DURATIONS = {\n instant: 100,\n fast: 150,\n normal: 200,\n slow: 300,\n /** `SPRINGS.settle`'s perceived duration — the number to design with. */\n spring: SPRINGS.settle.duration,\n /** What `--ease-spring` must be played over. */\n \"spring-settle\": spring(SPRINGS.settle).settle,\n /** What `--ease-spring-overshoot` must be played over. */\n \"spring-overshoot-settle\": spring(SPRINGS.overshoot).settle,\n} as const\n\nexport const EASINGS = {\n /** Colours and fades. */\n standard: \"cubic-bezier(0.2, 0, 0, 1)\",\n /** Large travel: a tab pill, a lightbox morph. */\n emphasized: \"cubic-bezier(0.32, 0.72, 0, 1)\",\n /** Entering transforms only. Never opacity — two-thirds of its motion lands in\n * the first 15%, so a fade on it reads as a blink. */\n decelerate: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n /** Exits. */\n accelerate: \"cubic-bezier(0.4, 0, 1, 1)\",\n /** Modal and drawer entrances: a hair of wind-up before they travel. */\n anticipate: \"cubic-bezier(0.18, -0.04, 0.55, 1)\",\n /** A one-shot pop past the target and back. */\n overshoot: \"cubic-bezier(0.34, 1.56, 0.64, 1)\",\n /** `SPRINGS.settle`, to play over `--duration-spring-settle`. */\n spring: springLinear(SPRINGS.settle),\n /** `SPRINGS.overshoot`, to play over `--duration-spring-overshoot-settle`. */\n \"spring-overshoot\": springLinear(SPRINGS.overshoot),\n} as const\n\nexport type Duration = keyof typeof DURATIONS\nexport type Ease = keyof typeof EASINGS\n\nexport const isEase = (name: string): name is Ease => Object.hasOwn(EASINGS, name)\n","import { prefersReducedMotion } from \"./reduced-motion\"\nimport { DURATIONS, type Duration, EASINGS, type Ease, isEase } from \"./tokens\"\n\n/**\n * A thin Web Animations wrapper that speaks the kit's tokens.\n *\n * JS computes, the browser plays: whatever a gesture or a layout measurement\n * decides, the motion itself runs as a WAAPI animation — on the compositor\n * where it can be, and visible to devtools and `pr-record.mjs`'s slow-down\n * like any CSS animation.\n *\n * Named durations and easings resolve through the element's computed style,\n * so a consumer who retunes `--duration-slow` or `--ease-emphasized` in CSS\n * retunes JS-driven motion too; `DURATIONS`/`EASINGS` are only the fallback\n * for when theme.css isn't loaded.\n *\n * Reduced motion plays at 0ms rather than not at all: the element still ends\n * on its final keyframe and `finished` still resolves, so code awaiting the\n * motion (focus after a morph, cleanup after an exit) behaves the same.\n */\n\nexport type AnimateOptions = Omit<KeyframeAnimationOptions, \"duration\" | \"easing\"> & {\n /** A token name or ms. Defaults to `normal`. */\n duration?: Duration | number\n /** A token name or any CSS timing function. Defaults to `standard`. */\n easing?: Ease | (string & {})\n}\n\nexport type Playback = {\n /** The running animation; `null` where the platform has no WAAPI. */\n animation: Animation | null\n /** `true` once it finishes, `false` if it was cancelled first. Never\n * rejects. */\n finished: Promise<boolean>\n cancel: () => void\n}\n\n/** A custom property's value on `el`, or `\"\"` when unset. */\nexport const token = (el: Element, name: string): string =>\n typeof getComputedStyle === \"function\" ? getComputedStyle(el).getPropertyValue(name).trim() : \"\"\n\n/** `\"300ms\"` / `\"0.3s\"` → 300; anything else → `undefined`. */\nfunction parseTime(value: string): number | undefined {\n const time = value.match(/^(-?[\\d.]+)(ms|s)$/)\n if (!time) return undefined\n const n = Number(time[1])\n if (!Number.isFinite(n)) return undefined\n return time[2] === \"s\" ? n * 1000 : n\n}\n\n/** A duration in ms: a number passes through, a token name reads\n * `--duration-<name>` off `el`. */\nexport function durationOf(el: Element, duration: Duration | number): number {\n if (typeof duration === \"number\") return duration\n return parseTime(token(el, `--duration-${duration}`)) ?? DURATIONS[duration]\n}\n\n/** A CSS timing function: a token name reads `--ease-<name>` off `el`, any\n * other string is taken as CSS already. */\nexport function easingOf(el: Element, easing: string): string {\n if (!isEase(easing)) return easing\n return token(el, `--ease-${easing}`) || EASINGS[easing]\n}\n\nconst settled = (animation: Animation): Promise<boolean> =>\n animation.finished.then(\n () => true,\n () => false,\n )\n\nexport function animate(\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes,\n { duration = \"normal\", easing = \"standard\", ...options }: AnimateOptions = {},\n): Playback {\n if (typeof el.animate !== \"function\") {\n // No WAAPI (jsdom without the test stub, a very old engine): nothing\n // moved, and saying so beats a fake animation that ends on no frame.\n return { animation: null, finished: Promise.resolve(true), cancel: () => {} }\n }\n const ms = prefersReducedMotion() ? 0 : durationOf(el, duration)\n const animation = el.animate(keyframes, {\n ...options,\n duration: ms,\n easing: easingOf(el, easing),\n })\n return { animation, finished: settled(animation), cancel: () => animation.cancel() }\n}\n"]}
|