@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
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { resolveLogicalPlacement } from './chunk-G52U24GR.js';
|
|
2
2
|
import { useOverlayContainer } from './chunk-7P32XCEU.js';
|
|
3
3
|
import { props } from './chunk-WYCMIIRR.js';
|
|
4
|
-
import { focusStyles } from './chunk-
|
|
5
|
-
import {
|
|
4
|
+
import { focusStyles } from './chunk-C6NVU4F7.js';
|
|
5
|
+
import { TEXT_COLOR_CLASSES } from './chunk-GIPQUKCN.js';
|
|
6
|
+
import { cn } from './chunk-4ASNIDV7.js';
|
|
6
7
|
import { useLocaleContext } from '@ark-ui/react/locale';
|
|
7
8
|
import { Portal } from '@ark-ui/react/portal';
|
|
8
9
|
import { Tooltip as Tooltip$1 } from '@ark-ui/react/tooltip';
|
|
9
10
|
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { createContext,
|
|
11
|
+
import { createContext, useContext } from 'react';
|
|
11
12
|
import { match } from 'ts-pattern';
|
|
12
13
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
14
|
|
|
14
15
|
var tooltipContent = cn(
|
|
15
16
|
"max-w-[16rem] rounded-xs px-2 py-1",
|
|
16
17
|
"text-xs leading-snug focus:outline-none",
|
|
17
|
-
"bg-
|
|
18
|
+
"bg-brand-950 text-white dark:bg-white dark:text-brand-950",
|
|
18
19
|
"data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out",
|
|
19
20
|
"data-[placement^=top]:origin-bottom data-[placement^=bottom]:origin-top",
|
|
20
21
|
"data-[placement^=left]:origin-right data-[placement^=right]:origin-left"
|
|
21
22
|
);
|
|
22
23
|
var tooltipPositioner = "rounded-xs shadow-md";
|
|
23
|
-
var tooltipArrow = cn("-z-1! rounded-xxs", "bg-
|
|
24
|
+
var tooltipArrow = cn("-z-1! rounded-xxs", "bg-brand-950! dark:bg-white!");
|
|
24
25
|
var tooltipTrigger = cva(
|
|
25
26
|
[
|
|
26
27
|
"inline cursor-help appearance-none border-0 bg-transparent p-0",
|
|
27
|
-
"[font:inherit] text-inherit",
|
|
28
|
+
"[font:inherit] text-inherit text-start",
|
|
28
29
|
focusStyles(),
|
|
29
30
|
"rounded-xs"
|
|
30
31
|
],
|
|
31
32
|
{
|
|
32
33
|
variants: {
|
|
33
34
|
variant: {
|
|
34
|
-
text: "underline decoration-dotted underline-offset-2
|
|
35
|
+
text: cn("underline decoration-dotted underline-offset-2", TEXT_COLOR_CLASSES.primary),
|
|
35
36
|
inline: ""
|
|
36
37
|
}
|
|
37
38
|
},
|
|
@@ -82,11 +83,12 @@ var Content = ({ className, children, testId, ...rest }) => {
|
|
|
82
83
|
if (!withinPortal) return bubble;
|
|
83
84
|
return /* @__PURE__ */ jsx(Portal, { container: portalContainer, children: bubble });
|
|
84
85
|
};
|
|
85
|
-
var Arrow = ({ className, style, testId }) => /* @__PURE__ */ jsx(
|
|
86
|
+
var Arrow = ({ className, style, testId, asChild: _asChild, ...rest }) => /* @__PURE__ */ jsx(
|
|
86
87
|
Tooltip$1.Arrow,
|
|
87
88
|
{
|
|
88
89
|
style: { ["--arrow-size"]: "12px", ["--arrow-offset"]: "-8px", ...style },
|
|
89
90
|
...props({ "data-testid": testId }),
|
|
91
|
+
...rest,
|
|
90
92
|
children: /* @__PURE__ */ jsx(Tooltip$1.ArrowTip, { className: cn(tooltipArrow, className) })
|
|
91
93
|
}
|
|
92
94
|
);
|
|
@@ -100,17 +102,19 @@ var TooltipComponent = ({
|
|
|
100
102
|
testId,
|
|
101
103
|
...root
|
|
102
104
|
}) => {
|
|
103
|
-
const id = `tooltip-${useId()}`;
|
|
104
105
|
return /* @__PURE__ */ jsxs(Root, { ...root, children: [
|
|
105
|
-
match({ asChild }).with({ asChild: true }, () => /* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children })).otherwise(() =>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
match({ asChild }).with({ asChild: true }, () => /* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children })).otherwise(() => (
|
|
107
|
+
// Ark wires `aria-describedby` to the bubble itself, while it's shown.
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
Tooltip$1.Trigger,
|
|
110
|
+
{
|
|
111
|
+
type: "button",
|
|
112
|
+
className: cn(tooltipTrigger({ variant }), classNames?.trigger),
|
|
113
|
+
children
|
|
114
|
+
}
|
|
115
|
+
)
|
|
112
116
|
)),
|
|
113
|
-
/* @__PURE__ */ jsxs(Content, { className: classNames?.content,
|
|
117
|
+
/* @__PURE__ */ jsxs(Content, { className: classNames?.content, testId, children: [
|
|
114
118
|
withArrow && /* @__PURE__ */ jsx(Arrow, { className: classNames?.arrow }),
|
|
115
119
|
label
|
|
116
120
|
] })
|
|
@@ -124,5 +128,5 @@ var Tooltip = Object.assign(TooltipComponent, {
|
|
|
124
128
|
});
|
|
125
129
|
|
|
126
130
|
export { Tooltip };
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-VTDBWU6H.js.map
|
|
132
|
+
//# sourceMappingURL=chunk-VTDBWU6H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"names":["ArkTooltip"],"mappings":";;;;;;;;;;;;;;AAqDA,IAAM,cAAA,GAAiB,EAAA;AAAA,EACrB,oCAAA;AAAA,EACA,yCAAA;AAAA,EACA,2DAAA;AAAA,EACA,8EAAA;AAAA,EACA,yEAAA;AAAA,EACA;AACF,CAAA;AAWA,IAAM,iBAAA,GAAoB,sBAAA;AAK1B,IAAM,YAAA,GAAe,EAAA,CAAG,mBAAA,EAAqB,8BAA8B,CAAA;AAO3E,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,gEAAA;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,EAAA,CAAG,gDAAA,EAAkD,kBAAA,CAAmB,OAAO,CAAA;AAAA,QACrF,MAAA,EAAQ;AAAA;AACV,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS;AAAA;AACX;AAEJ,CAAA;AAYA,IAAM,cAAA,GAAiB,aAAA,CAAmC,EAAE,YAAA,EAAc,MAAM,CAAA;AAkBhF,IAAM,OAAO,CAAC;AAAA,EACZ,QAAA,GAAW,KAAA;AAAA,EACX,MAAA;AAAA,EACA,YAAA,GAAe,IAAA;AAAA,EACf,SAAA;AAAA,EACA,QAAA;AAAA,EACA,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SAAS,CAAA,EAAG,YAAY,OAAO,CAAA;AAAA,UAE7D;AAAA;AAAA;AACH,KACD,CAAA;AAAA,oBACH,IAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,UAAA,EAAY,SAAS,MAAA,EACtC,QAAA,EAAA;AAAA,MAAA,SAAA,oBAAa,GAAA,CAAC,KAAA,EAAA,EAAM,SAAA,EAAW,UAAA,EAAY,KAAA,EAAO,CAAA;AAAA,MAClD;AAAA,KAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ,CAAA;AAEO,IAAM,OAAA,GAAU,MAAA,CAAO,MAAA,CAAO,gBAAA,EAAkB;AAAA,EACrD,IAAA;AAAA,EACA,SAASA,SAAA,CAAW,OAAA;AAAA,EACpB,OAAA;AAAA,EACA;AACF,CAAC","file":"chunk-VTDBWU6H.js","sourcesContent":["\"use client\"\n\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { Tooltip as ArkTooltip } from \"@ark-ui/react/tooltip\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { createContext, type ReactNode, useContext } from \"react\"\nimport { match } from \"ts-pattern\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { type LogicalPosition, resolveLogicalPlacement } from \"../../lib/placement\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * Tooltip — the kit's hover/focus **hint**, a styled layer over Ark UI's\n * Tooltip. It's the lightweight counterpart to `Popover` (which is a clickable,\n * focus-trapping panel): Ark's Tooltip machine opens on hover *and* keyboard\n * focus, wires `role=\"tooltip\"` + `aria-describedby` automatically, dismisses on\n * `Esc` / scroll / pointer-down, and never traps focus.\n *\n * Two ways to use it — the convenience form drops into running text or wraps any\n * element; the compound parts mirror `Popover.Root` / `Trigger` / `Content`.\n *\n * // 1. Inline — `children` become a focusable inline trigger\n * <Tooltip label=\"A project at 42.\">norm</Tooltip>\n *\n * // 2. Wrap an element — `asChild` makes the child the trigger\n * <Tooltip label=\"Delete\" asChild>\n * <ActionIcon aria-label=\"Delete\"><Trash /></ActionIcon>\n * </Tooltip>\n *\n * // 3. Compound\n * <Tooltip.Root position=\"end\">\n * <Tooltip.Trigger asChild><Button>Hover</Button></Tooltip.Trigger>\n * <Tooltip.Content>\n * <Tooltip.Arrow />\n * Rich <strong>content</strong>\n * </Tooltip.Content>\n * </Tooltip.Root>\n *\n * Visually it reuses the Popover's open/close animation but renders as a small,\n * **inverted** bubble (dark surface in light mode, light in dark) to read as an\n * ephemeral hint rather than a panel. Add `withArrow` (convenience form) or a\n * `Tooltip.Arrow` part (compound) to point the bubble at its trigger.\n */\n\n/** Inverted compact bubble — reuses the shared `popover-in/out` animation tokens\n * (which already honour reduced-motion in `theme.css`) and the placement-origin\n * trick so it grows out of the trigger's edge. */\nconst tooltipContent = cn(\n \"max-w-[16rem] rounded-xs px-2 py-1\",\n \"text-xs leading-snug focus:outline-none\",\n \"bg-brand-950 text-white dark:bg-white dark:text-brand-950\",\n \"data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out\",\n \"data-[placement^=top]:origin-bottom data-[placement^=bottom]:origin-top\",\n \"data-[placement^=left]:origin-right data-[placement^=right]:origin-left\",\n)\n\n/** The bubble's shadow lives on the *positioner* (this wrapper), not on the\n * content. A `box-shadow` on the content paints as one unit *with* its\n * background, so it lands on top of the behind-arrow (`-z-1`) and smears\n * across the protruding tip. Hosting the shadow here reorders the paint to\n * shadow → arrow → content: the positioner's shadow sits at the back of its\n * stacking context (it's the `isolate` root), the arrow paints above it, and\n * the content background paints last — so the shadow never touches the arrow,\n * the arrow never covers the label, and the bubble keeps its shadow.\n * `rounded-xs` matches the content radius so the shadow's corners line up. */\nconst tooltipPositioner = \"rounded-xs shadow-md\"\n\n/** Inverted arrow matching the bubble surface. The `!` overrides are required\n * because Ark sets the arrow background via an inline style; `-z-1` tucks the\n * square behind the bubble so only the rotated corner pokes out as the tip. */\nconst tooltipArrow = cn(\"-z-1! rounded-xxs\", \"bg-brand-950! dark:bg-white!\")\n\n/** Resets the `<button type=\"button\">` the default trigger renders down to plain\n * inline text, so a Tooltip can sit on a word inside a `<p>` (a `<button>` is\n * phrasing content) while staying a real, keyboard-focusable control rather\n * than a role-less `tabIndex` span. `cursor-help` signals the hint;\n * `[font:inherit]` and `text-start` undo the UA button's font and centring. */\nconst tooltipTrigger = cva(\n [\n \"inline cursor-help appearance-none border-0 bg-transparent p-0\",\n \"[font:inherit] text-inherit text-start\",\n focusStyles(),\n \"rounded-xs\",\n ],\n {\n variants: {\n variant: {\n text: cn(\"underline decoration-dotted underline-offset-2\", TEXT_COLOR_CLASSES.primary),\n inline: \"\",\n },\n },\n defaultVariants: {\n variant: \"inline\",\n },\n },\n)\n\ntype TooltipPlacement = NonNullable<NonNullable<ArkTooltip.RootProps[\"positioning\"]>[\"placement\"]>\n\n/** `position` accepts Ark's physical placements plus the logical, RTL-aware\n * horizontal sides `start` / `end` (resolved to `left` / `right` by direction). */\nexport type TooltipPosition = LogicalPosition<TooltipPlacement>\n\ntype TooltipContextValue = {\n withinPortal: boolean\n container?: HTMLElement | null\n}\nconst TooltipContext = createContext<TooltipContextValue>({ withinPortal: true })\n\nexport type TooltipRootProps = Omit<ArkTooltip.RootProps, \"positioning\"> & {\n /** Bubble placement relative to the trigger. Prefer the logical `start` / `end`\n * sides (RTL-aware), or use any Ark placement (`top`, `bottom`, `top-start`, …).\n * Defaults to `\"top\"`. */\n position?: TooltipPosition\n /** Gap in px between the trigger and the bubble. */\n offset?: number\n /** Render the bubble in a Portal so it escapes clipping ancestors. Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n /** Fires on close (any source) — pointer/focus leaving the trigger, Escape, or a controlled `onOpenChange`. */\n onClose?: () => void\n}\n\nconst Root = ({\n position = \"top\",\n offset,\n withinPortal = true,\n container,\n children,\n onOpenChange,\n onClose,\n ...rest\n}: TooltipRootProps) => {\n const { dir } = useLocaleContext()\n return (\n <TooltipContext.Provider value={{ withinPortal, container }}>\n {/* Mount the bubble only while shown (lazyMount + unmountOnExit): closed →\n nothing rendered, so an inline trigger never emits a positioner <div>\n into a host <p> on SSR. Both are overridable via `...rest`. */}\n <ArkTooltip.Root\n lazyMount\n unmountOnExit\n positioning={{ placement: resolveLogicalPlacement(position, dir), gutter: offset }}\n onOpenChange={(details) => {\n onOpenChange?.(details)\n if (!details.open) onClose?.()\n }}\n {...rest}\n >\n {children}\n </ArkTooltip.Root>\n </TooltipContext.Provider>\n )\n}\n\nexport type TooltipContentProps = ArkTooltip.ContentProps & WithTestId\n\nconst Content = ({ className, children, testId, ...rest }: TooltipContentProps) => {\n const { withinPortal, container } = useContext(TooltipContext)\n const portalContainer = useOverlayContainer(container)\n const bubble = (\n <ArkTooltip.Positioner className={tooltipPositioner}>\n <ArkTooltip.Content\n className={cn(tooltipContent, className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n )\n if (!withinPortal) return bubble\n return <Portal container={portalContainer}>{bubble}</Portal>\n}\n\nexport type TooltipArrowProps = NoAsChild<ArkTooltip.ArrowProps> & WithTestId\n\n/** The little arrow linking the bubble to its trigger. Compose it inside a\n * `Tooltip.Content` (or let the convenience form's `withArrow` add it for you).\n * The CSS vars size the square (`--arrow-size`) and pull it back under the\n * bubble (`--arrow-offset`) so it reads as a pointer, not a detached diamond. */\nconst Arrow = ({ className, style, testId, asChild: _asChild, ...rest }: TooltipArrowProps) => (\n <ArkTooltip.Arrow\n style={{ [\"--arrow-size\" as string]: \"12px\", [\"--arrow-offset\" as string]: \"-8px\", ...style }}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <ArkTooltip.ArrowTip className={cn(tooltipArrow, className)} />\n </ArkTooltip.Arrow>\n)\n\nexport type TooltipProps = TooltipRootProps &\n WithTestId & {\n /** The hint shown on hover and keyboard focus. Named `label` for parity with\n * the rest of the kit; wired as a description via Ark's `aria-describedby`. */\n label: ReactNode\n /** The trigger. By default it's wrapped in a focusable inline trigger (so it\n * drops into running text); with `asChild`, this element *is* the trigger. */\n children: ReactNode\n /** Render `children` as the trigger instead of wrapping them. */\n asChild?: boolean\n /** Add a small arrow pointing at the trigger. For the compound form, compose\n * `<Tooltip.Arrow />` inside `<Tooltip.Content>` instead. */\n withArrow?: boolean\n variant?: VariantProps<typeof tooltipTrigger>[\"variant\"]\n classNames?: { trigger?: string; content?: string; arrow?: string }\n }\n\n/** Convenience form: `Root` + `Trigger` + `Content` wired from `label`/`children`.\n * `testId` lands on `Content` (the rendered bubble) — `Root` has no DOM node\n * of its own. */\nconst TooltipComponent = ({\n label,\n children,\n asChild,\n classNames,\n withArrow,\n variant = \"inline\",\n testId,\n ...root\n}: TooltipProps) => {\n return (\n <Root {...root}>\n {match({ asChild })\n .with({ asChild: true }, () => <ArkTooltip.Trigger asChild>{children}</ArkTooltip.Trigger>)\n .otherwise(() => (\n // Ark wires `aria-describedby` to the bubble itself, while it's shown.\n <ArkTooltip.Trigger\n type=\"button\"\n className={cn(tooltipTrigger({ variant }), classNames?.trigger)}\n >\n {children}\n </ArkTooltip.Trigger>\n ))}\n <Content className={classNames?.content} testId={testId}>\n {withArrow && <Arrow className={classNames?.arrow} />}\n {label}\n </Content>\n </Root>\n )\n}\n\nexport const Tooltip = Object.assign(TooltipComponent, {\n Root,\n Trigger: ArkTooltip.Trigger,\n Content,\n Arrow,\n})\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/lib/use-document-visibility.ts
|
|
4
|
+
function subscribe(listener) {
|
|
5
|
+
document.addEventListener("visibilitychange", listener);
|
|
6
|
+
return () => document.removeEventListener("visibilitychange", listener);
|
|
7
|
+
}
|
|
8
|
+
function getSnapshot() {
|
|
9
|
+
return document.visibilityState;
|
|
10
|
+
}
|
|
11
|
+
function getServerSnapshot() {
|
|
12
|
+
return "visible";
|
|
13
|
+
}
|
|
14
|
+
function useDocumentVisibility() {
|
|
15
|
+
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { useDocumentVisibility };
|
|
19
|
+
//# sourceMappingURL=chunk-WG3BCIU4.js.map
|
|
20
|
+
//# sourceMappingURL=chunk-WG3BCIU4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/use-document-visibility.ts"],"names":[],"mappings":";;;AAIA,SAAS,UAAU,QAAA,EAAkC;AACnD,EAAA,QAAA,CAAS,gBAAA,CAAiB,oBAAoB,QAAQ,CAAA;AACtD,EAAA,OAAO,MAAM,QAAA,CAAS,mBAAA,CAAoB,kBAAA,EAAoB,QAAQ,CAAA;AACxE;AAEA,SAAS,WAAA,GAAuC;AAC9C,EAAA,OAAO,QAAA,CAAS,eAAA;AAClB;AAKA,SAAS,iBAAA,GAA6C;AACpD,EAAA,OAAO,SAAA;AACT;AAgBO,SAAS,qBAAA,GAAiD;AAC/D,EAAA,OAAO,oBAAA,CAAqB,SAAA,EAAW,WAAA,EAAa,iBAAiB,CAAA;AACvE","file":"chunk-WG3BCIU4.js","sourcesContent":["\"use client\"\n\nimport { useSyncExternalStore } from \"react\"\n\nfunction subscribe(listener: () => void): () => void {\n document.addEventListener(\"visibilitychange\", listener)\n return () => document.removeEventListener(\"visibilitychange\", listener)\n}\n\nfunction getSnapshot(): DocumentVisibilityState {\n return document.visibilityState\n}\n\n// A server renders for a page someone is about to look at, so \"visible\" is the\n// honest default — and the fixed value keeps SSR and the first client render\n// in agreement, the same reasoning as useMediaQuery's getServerSnapshot.\nfunction getServerSnapshot(): DocumentVisibilityState {\n return \"visible\"\n}\n\n/**\n * Tracks `document.visibilityState` — `\"hidden\"` while the tab is in the\n * background, the window minimised or the screen locked, `\"visible\"`\n * otherwise. SSR-safe via `useSyncExternalStore`: the server and the hydration\n * render read `\"visible\"`, then the real state takes over.\n *\n * Code that must act on the change (pause a timer, stop a stream) reacts to\n * the returned value in an effect:\n *\n * const visibility = useDocumentVisibility()\n * useEffect(() => {\n * if (visibility === \"hidden\") video.current?.pause()\n * }, [visibility])\n */\nexport function useDocumentVisibility(): DocumentVisibilityState {\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/lib/gap.ts
|
|
2
|
+
var GAP_CLASSES = {
|
|
3
|
+
none: "gap-0",
|
|
4
|
+
xxs: "gap-0.5",
|
|
5
|
+
xs: "gap-1",
|
|
6
|
+
sm: "gap-1.5",
|
|
7
|
+
md: "gap-2",
|
|
8
|
+
lg: "gap-3",
|
|
9
|
+
xl: "gap-4",
|
|
10
|
+
xxl: "gap-6"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { GAP_CLASSES };
|
|
14
|
+
//# sourceMappingURL=chunk-XFEPUGUZ.js.map
|
|
15
|
+
//# sourceMappingURL=chunk-XFEPUGUZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/gap.ts"],"names":[],"mappings":";AAKO,IAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM,OAAA;AAAA,EACN,GAAA,EAAK,SAAA;AAAA,EACL,EAAA,EAAI,OAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,OAAA;AAAA,EACJ,EAAA,EAAI,OAAA;AAAA,EACJ,EAAA,EAAI,OAAA;AAAA,EACJ,GAAA,EAAK;AACP","file":"chunk-XFEPUGUZ.js","sourcesContent":["/**\n * The layout primitives' shared `gap` scale (`Flex`, `Grid`): a named t-shirt\n * scale mapped to static Tailwind `gap-*` classes, so v4's scanner picks them\n * up at build time. One map, so the two primitives can't drift apart.\n */\nexport const GAP_CLASSES = {\n none: \"gap-0\",\n xxs: \"gap-0.5\",\n xs: \"gap-1\",\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-3\",\n xl: \"gap-4\",\n xxl: \"gap-6\",\n} as const\n\nexport type Gap = keyof typeof GAP_CLASSES\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TYPOGRAPHY_SHADE_CLASSES, TYPOGRAPHY_SIZE_CLASSES, resolveHeadingSize } from './chunk-2GILNBZW.js';
|
|
2
1
|
import { props } from './chunk-WYCMIIRR.js';
|
|
3
|
-
import {
|
|
2
|
+
import { TYPOGRAPHY_SHADE_CLASSES, TYPOGRAPHY_SIZE_CLASSES, resolveHeadingSize } from './chunk-GIPQUKCN.js';
|
|
3
|
+
import { cn } from './chunk-4ASNIDV7.js';
|
|
4
4
|
import { ark } from '@ark-ui/react';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -39,14 +39,7 @@ var Text = ({
|
|
|
39
39
|
asChild,
|
|
40
40
|
className: cn(textVariants({ size: resolvedSize, c }), className),
|
|
41
41
|
children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
-
prefix !== void 0 && /* @__PURE__ */ jsx(
|
|
43
|
-
"span",
|
|
44
|
-
{
|
|
45
|
-
"aria-hidden": "true",
|
|
46
|
-
className: "select-none text-gray-light-600 dark:text-gray-dark-400",
|
|
47
|
-
children: prefix
|
|
48
|
-
}
|
|
49
|
-
),
|
|
42
|
+
prefix !== void 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("select-none", TYPOGRAPHY_SHADE_CLASSES.muted), children: prefix }),
|
|
50
43
|
children
|
|
51
44
|
] })
|
|
52
45
|
}
|
|
@@ -54,5 +47,5 @@ var Text = ({
|
|
|
54
47
|
};
|
|
55
48
|
|
|
56
49
|
export { Text };
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-XKDL4QS6.js.map
|
|
51
|
+
//# sourceMappingURL=chunk-XKDL4QS6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/text/text.tsx"],"names":[],"mappings":";;;;;;;AAqCA,IAAM,YAAA,GAAe,IAAI,EAAA,EAAI;AAAA,EAC3B,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,uBAAA;AAAA,IACN,CAAA,EAAG;AAAA,MACD,OAAA,EAAS,EAAA;AAAA,MACT,GAAG;AAAA;AACL,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,IAAA;AAAA,IACN,CAAA,EAAG;AAAA;AAEP,CAAC,CAAA;AAoBM,IAAM,OAAO,CAAC;AAAA,EACnB,SAAA;AAAA,EACA,IAAA;AAAA,EACA,CAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAiB;AACf,EAAA,MAAM,IAAA,GAAO,IAAA,GAAO,GAAA,CAAI,IAAA,GAAO,GAAA,CAAI,CAAA;AACnC,EAAA,MAAM,YAAA,GAAe,IAAA,GAAO,kBAAA,CAAmB,IAAI,CAAA,GAAI,MAAA;AACvD,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MACJ,OAAA;AAAA,MACA,SAAA,EAAW,GAAG,YAAA,CAAa,EAAE,MAAM,YAAA,EAAc,CAAA,EAAG,CAAA,EAAG,SAAS,CAAA;AAAA,MAE/D,QAAA,EAAA,OAAA,GACC,2BAEA,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,QAAA,MAAA,KAAW,MAAA,oBACV,GAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EAAO,SAAA,EAAW,EAAA,CAAG,aAAA,EAAe,wBAAA,CAAyB,KAAK,CAAA,EACjF,QAAA,EAAA,MAAA,EACH,CAAA;AAAA,QAED;AAAA,OAAA,EACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-XKDL4QS6.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type HeadingSizeAlias,\n resolveHeadingSize,\n TYPOGRAPHY_SHADE_CLASSES,\n TYPOGRAPHY_SIZE_CLASSES,\n} from \"../../lib/typography-size\"\n\n/**\n * Text — styled paragraph primitive.\n *\n * Pure React Server Component. Renders `<p>` by default and exposes a tight\n * prop surface: size (visual scale) and a `c` shade switch (default / secondary /\n * muted), matching the 42 UI Kit Figma's text-color tiers: `secondary` is\n * `text-secondary` (labels, section headings — gray-700/gray-300) and `muted`\n * is `text-tertiary` (supporting/paragraph text — gray-600/gray-400). For\n * headings use `Title`.\n *\n * `size` also accepts the heading aliases (`h1`..`h6`, `p`) as friendlier\n * names for the same scale — e.g. `size=\"h2\"` is identical to `size=\"3xl\"`.\n * These are visual-only: Text always renders `<p>`/`<span>`, never a\n * heading element, regardless of which size alias is used.\n *\n * The `prefix` slot lets callers prepend a decorative leader (the classic\n * `// ` for the code-themed aesthetic) without compromising assistive tech:\n * - `aria-hidden=\"true\"` keeps screen readers from announcing it\n * - `select-none` keeps it out of clipboard copies\n *\n * Pass `span` when a `<p>` isn't valid HTML where Text is composed — e.g.\n * nested inside a consumer's own paragraph, or inside another phrasing-\n * content-only element. Visually identical; only the tag changes.\n */\nconst textVariants = cva(\"\", {\n variants: {\n size: TYPOGRAPHY_SIZE_CLASSES,\n c: {\n default: \"\",\n ...TYPOGRAPHY_SHADE_CLASSES,\n },\n },\n defaultVariants: {\n size: \"md\",\n c: \"default\",\n },\n})\n\nexport type TextSize = NonNullable<VariantProps<typeof textVariants>[\"size\"]>\n\nexport type TextProps = Omit<HTMLArkProps<\"p\">, \"prefix\"> &\n Omit<VariantProps<typeof textVariants>, \"size\"> &\n WithTestId & {\n /** Visual scale. Also accepts the heading aliases (`h1`..`h6`, `p`). */\n size?: TextSize | HeadingSizeAlias\n /**\n * Decorative prefix rendered inside the paragraph. Hidden from screen\n * readers and the clipboard via `aria-hidden` + `select-none`. Ignored\n * when `asChild` is true — the consumer owns the inner structure.\n */\n prefix?: ReactNode\n /** Renders a `<span>` instead of the default `<p>`. Same styling — only\n * the tag changes, for composing Text where a `<p>` isn't valid HTML. */\n span?: boolean\n }\n\nexport const Text = ({\n className,\n size,\n c,\n prefix,\n span,\n children,\n asChild,\n testId,\n ...rest\n}: TextProps) => {\n const Comp = span ? ark.span : ark.p\n const resolvedSize = size ? resolveHeadingSize(size) : undefined\n return (\n <Comp\n {...props({ \"data-testid\": testId })}\n {...rest}\n asChild={asChild}\n className={cn(textVariants({ size: resolvedSize, c }), className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {prefix !== undefined && (\n <span aria-hidden=\"true\" className={cn(\"select-none\", TYPOGRAPHY_SHADE_CLASSES.muted)}>\n {prefix}\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n )\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/lib/icons.ts
|
|
2
|
+
var mergeIcons = (defaults, overrides) => ({
|
|
3
|
+
...defaults,
|
|
4
|
+
...Object.fromEntries(Object.entries(overrides ?? {}).filter(([, icon]) => icon !== void 0))
|
|
5
|
+
});
|
|
6
|
+
var iconStroke = "stroke-[1.5] [&_*]:[vector-effect:non-scaling-stroke]";
|
|
7
|
+
|
|
8
|
+
export { iconStroke, mergeIcons };
|
|
9
|
+
//# sourceMappingURL=chunk-XXOR34T4.js.map
|
|
10
|
+
//# sourceMappingURL=chunk-XXOR34T4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/icons.ts"],"names":[],"mappings":";AAoBO,IAAM,UAAA,GAAa,CACxB,QAAA,EACA,SAAA,MAC6B;AAAA,EAC7B,GAAG,QAAA;AAAA,EACH,GAAG,MAAA,CAAO,WAAA,CAAY,MAAA,CAAO,OAAA,CAAQ,aAAa,EAAE,CAAA,CAAE,MAAA,CAAO,CAAC,GAAG,IAAI,CAAA,KAAM,IAAA,KAAS,MAAS,CAAC;AAChG,CAAA;AAaO,IAAM,UAAA,GAAa","file":"chunk-XXOR34T4.js","sourcesContent":["import type { ReactNode } from \"react\"\n\n/**\n * A component's replaceable icons, by slot: the `icons` prop. The kit's one\n * convention for swapping an icon, parallel to `translations` and\n * `classNames`: a partial map, per component instance, no app-wide provider.\n *\n * <Carousel data={slides} icons={{ prev: <ArrowLeft />, next: <ArrowRight /> }} />\n *\n * `undefined` (or a missing key) keeps the default. `null` renders no icon,\n * where the component documents that as meaningful (a control that shows\n * text instead); elsewhere, give the part `children` rather than an empty icon.\n */\nexport type IconMap<Slot extends string> = { [K in Slot]?: ReactNode }\n\n/**\n * A component's resolved icons: its `DEFAULT_ICONS` with the `icons` prop\n * laid over them, shallowly, like translations. A key set to `undefined`\n * keeps its default instead of erasing it.\n */\nexport const mergeIcons = <Slot extends string>(\n defaults: Record<Slot, ReactNode>,\n overrides?: IconMap<Slot>,\n): Record<Slot, ReactNode> => ({\n ...defaults,\n ...Object.fromEntries(Object.entries(overrides ?? {}).filter(([, icon]) => icon !== undefined)),\n})\n\n/**\n * The kit's icon line: 1.5px at every size. Goes on the `<svg>` of every icon\n * the kit draws itself (each `DEFAULT_ICONS` entry, and the few icons no slot\n * reaches), never on a wrapper, so an icon passed through `icons` is drawn as\n * given. Export it to draw yours the same way: `<Bell className={iconStroke} />`.\n *\n * `non-scaling-stroke` measures the stroke in CSS pixels rather than the\n * icon's 24-unit viewBox, so the line holds at `size-3` and at `size-8` alike.\n * Not lucide's `absoluteStrokeWidth`: that only compensates for its own `size`\n * prop, and every kit icon is sized by CSS.\n */\nexport const iconStroke = \"stroke-[1.5] [&_*]:[vector-effect:non-scaling-stroke]\"\n"]}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { MEDIA_RADIUS } from './chunk-J43LSYQO.js';
|
|
2
|
+
import { useMergedRefs } from './chunk-HBWV5EPU.js';
|
|
3
|
+
import { ratioStyle } from './chunk-AHM6SGEU.js';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from './chunk-BUIHQJGE.js';
|
|
5
|
+
import { mergeIcons, iconStroke } from './chunk-XXOR34T4.js';
|
|
6
|
+
import { props } from './chunk-WYCMIIRR.js';
|
|
7
|
+
import { cn } from './chunk-4ASNIDV7.js';
|
|
8
|
+
import { match, P } from 'ts-pattern';
|
|
9
|
+
import { cva } from 'class-variance-authority';
|
|
10
|
+
import { ImageOff } from 'lucide-react';
|
|
11
|
+
import { useState, useRef, useEffect } from 'react';
|
|
12
|
+
import { preload } from 'react-dom';
|
|
13
|
+
import { jsx } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var IMAGE_WIDTHS = [
|
|
16
|
+
16,
|
|
17
|
+
32,
|
|
18
|
+
48,
|
|
19
|
+
64,
|
|
20
|
+
96,
|
|
21
|
+
128,
|
|
22
|
+
256,
|
|
23
|
+
384,
|
|
24
|
+
640,
|
|
25
|
+
750,
|
|
26
|
+
828,
|
|
27
|
+
1080,
|
|
28
|
+
1200,
|
|
29
|
+
1920,
|
|
30
|
+
2048,
|
|
31
|
+
3840
|
|
32
|
+
];
|
|
33
|
+
function resolveSources({
|
|
34
|
+
src,
|
|
35
|
+
loader,
|
|
36
|
+
width,
|
|
37
|
+
sizes,
|
|
38
|
+
quality
|
|
39
|
+
}) {
|
|
40
|
+
return match({ loader, width, sizes }).with({ loader: P.nullish }, () => ({ src })).with({ loader: P.not(P.nullish), sizes: P.nullish, width: P.number }, ({ loader: loader2, width: width2 }) => {
|
|
41
|
+
const at = (density) => loader2({ src, width: width2 * density, quality });
|
|
42
|
+
return { src: at(2), srcSet: `${at(1)} 1x, ${at(2)} 2x` };
|
|
43
|
+
}).with({ loader: P.not(P.nullish) }, ({ loader: loader2 }) => {
|
|
44
|
+
const cap = width === void 0 ? Number.POSITIVE_INFINITY : width * 2;
|
|
45
|
+
const fitting = IMAGE_WIDTHS.filter((w) => w <= cap);
|
|
46
|
+
const widths = fitting.length > 0 ? fitting : [cap];
|
|
47
|
+
const urls = widths.map((w) => ({ w, url: loader2({ src, width: w, quality }) }));
|
|
48
|
+
return {
|
|
49
|
+
src: urls.at(-1)?.url ?? src,
|
|
50
|
+
srcSet: urls.map(({ w, url }) => `${url} ${w}w`).join(", "),
|
|
51
|
+
sizes: sizes ?? "100vw"
|
|
52
|
+
};
|
|
53
|
+
}).exhaustive();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/components/image/blur-svg.ts
|
|
57
|
+
var BLUR = 20;
|
|
58
|
+
var ASPECT = {
|
|
59
|
+
cover: "xMidYMid slice",
|
|
60
|
+
contain: "xMidYMid",
|
|
61
|
+
fill: "none",
|
|
62
|
+
none: "xMidYMid slice",
|
|
63
|
+
"scale-down": "xMidYMid"
|
|
64
|
+
};
|
|
65
|
+
function blurSvg({ placeholder, width, height, fit }) {
|
|
66
|
+
const sized = width !== void 0 && height !== void 0;
|
|
67
|
+
const viewBox = sized ? `viewBox='0 0 ${width} ${height}'` : "";
|
|
68
|
+
const aspect = sized ? "none" : ASPECT[fit];
|
|
69
|
+
const svg = `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${BLUR}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${BLUR}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${aspect}' style='filter: url(%23b);' href='${placeholder}'/%3E%3C/svg%3E`;
|
|
70
|
+
return `url("data:image/svg+xml;charset=utf-8,${svg}")`;
|
|
71
|
+
}
|
|
72
|
+
var isDataUri = (placeholder) => placeholder.startsWith("data:");
|
|
73
|
+
var imageRoot = cva(
|
|
74
|
+
[
|
|
75
|
+
"relative inline-block max-w-full overflow-clip align-middle",
|
|
76
|
+
// Driven by `width` through a variable, so a consumer's `w-*` still wins.
|
|
77
|
+
"w-(--image-width)",
|
|
78
|
+
// The placeholder is dropped once the image is opaque, not when it starts
|
|
79
|
+
// fading in: removing it at once would flash the page through the fade.
|
|
80
|
+
// A zero-length transition with a delay is how CSS defers a discrete
|
|
81
|
+
// change, and `allow-discrete` lets `background-image` take part.
|
|
82
|
+
"transition-[background] duration-0 transition-discrete",
|
|
83
|
+
// With no fade under reduced motion, there is nothing to wait for.
|
|
84
|
+
"data-[state=loaded]:delay-(--duration-normal) motion-reduce:data-[state=loaded]:delay-0"
|
|
85
|
+
],
|
|
86
|
+
{
|
|
87
|
+
variants: {
|
|
88
|
+
radius: MEDIA_RADIUS,
|
|
89
|
+
// Skeleton's own surface, on a pseudo-element so the pulse never reaches
|
|
90
|
+
// the image's opacity. Hidden on load with the same deferral as above.
|
|
91
|
+
skeleton: {
|
|
92
|
+
true: [
|
|
93
|
+
"before:absolute before:inset-0",
|
|
94
|
+
"before:animate-pulse before:bg-black/15 dark:before:bg-white/8 motion-reduce:before:animate-none",
|
|
95
|
+
"before:transition-[display] before:duration-0 before:transition-discrete",
|
|
96
|
+
"data-[state=loaded]:before:hidden data-[state=loaded]:before:delay-(--duration-normal)",
|
|
97
|
+
"motion-reduce:data-[state=loaded]:before:delay-0"
|
|
98
|
+
],
|
|
99
|
+
false: ""
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
defaultVariants: { radius: "xs", skeleton: false }
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
var FIT = {
|
|
106
|
+
cover: "object-cover",
|
|
107
|
+
contain: "object-contain",
|
|
108
|
+
fill: "object-fill",
|
|
109
|
+
none: "object-none",
|
|
110
|
+
"scale-down": "object-scale-down"
|
|
111
|
+
};
|
|
112
|
+
var BACKGROUND_SIZE = {
|
|
113
|
+
cover: "cover",
|
|
114
|
+
contain: "contain",
|
|
115
|
+
fill: "100% 100%",
|
|
116
|
+
none: "cover",
|
|
117
|
+
"scale-down": "contain"
|
|
118
|
+
};
|
|
119
|
+
var POSITION = {
|
|
120
|
+
center: "",
|
|
121
|
+
top: "[--image-position:top]",
|
|
122
|
+
bottom: "[--image-position:bottom]",
|
|
123
|
+
start: "[--image-position:left] rtl:[--image-position:right]",
|
|
124
|
+
end: "[--image-position:right] rtl:[--image-position:left]",
|
|
125
|
+
"top-start": "[--image-position:left_top] rtl:[--image-position:right_top]",
|
|
126
|
+
"top-end": "[--image-position:right_top] rtl:[--image-position:left_top]",
|
|
127
|
+
"bottom-start": "[--image-position:left_bottom] rtl:[--image-position:right_bottom]",
|
|
128
|
+
"bottom-end": "[--image-position:right_bottom] rtl:[--image-position:left_bottom]"
|
|
129
|
+
};
|
|
130
|
+
var isLogicalPosition = (position) => Object.hasOwn(POSITION, position);
|
|
131
|
+
var DEFAULT_ICONS = {
|
|
132
|
+
fallback: /* @__PURE__ */ jsx(ImageOff, { "aria-hidden": true, className: iconStroke })
|
|
133
|
+
};
|
|
134
|
+
function Image({
|
|
135
|
+
src,
|
|
136
|
+
alt,
|
|
137
|
+
width,
|
|
138
|
+
height,
|
|
139
|
+
ratio,
|
|
140
|
+
fit = "cover",
|
|
141
|
+
position = "center",
|
|
142
|
+
sizes,
|
|
143
|
+
quality,
|
|
144
|
+
loader,
|
|
145
|
+
priority = false,
|
|
146
|
+
placeholder,
|
|
147
|
+
fallbackSrc,
|
|
148
|
+
fallback,
|
|
149
|
+
icons,
|
|
150
|
+
radius,
|
|
151
|
+
onStatusChange,
|
|
152
|
+
className,
|
|
153
|
+
style,
|
|
154
|
+
classNames,
|
|
155
|
+
testId,
|
|
156
|
+
ref,
|
|
157
|
+
onLoad,
|
|
158
|
+
onError,
|
|
159
|
+
...rest
|
|
160
|
+
}) {
|
|
161
|
+
const [results, setResults] = useState({});
|
|
162
|
+
const imgRef = useRef(null);
|
|
163
|
+
const candidates = [...new Set([src, fallbackSrc].filter((c) => Boolean(c)))];
|
|
164
|
+
const current = candidates.find((c) => results[c] !== "error");
|
|
165
|
+
const status = match(current).with(P.nullish, () => candidates.length === 0 ? "empty" : "error").otherwise((c) => results[c] ?? "loading");
|
|
166
|
+
const sources = match(current).with(P.nullish, () => void 0).with(
|
|
167
|
+
P.when((c) => c === src),
|
|
168
|
+
(c) => resolveSources({ src: c, loader, width, sizes, quality })
|
|
169
|
+
).otherwise((c) => ({ src: c }));
|
|
170
|
+
if (priority && src && sources && current === src) {
|
|
171
|
+
preload(sources.src, {
|
|
172
|
+
as: "image",
|
|
173
|
+
fetchPriority: "high",
|
|
174
|
+
imageSrcSet: sources.srcSet,
|
|
175
|
+
imageSizes: sources.sizes
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
const settle = (candidate, result) => setResults(
|
|
179
|
+
(previous) => previous[candidate] === result ? previous : { ...previous, [candidate]: result }
|
|
180
|
+
);
|
|
181
|
+
const reveal = (img, candidate) => {
|
|
182
|
+
const decoded = typeof img.decode === "function" ? img.decode() : Promise.resolve();
|
|
183
|
+
decoded.catch(() => void 0).then(() => {
|
|
184
|
+
if (img.isConnected) settle(candidate, "loaded");
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
useIsomorphicLayoutEffect(() => {
|
|
188
|
+
const img = imgRef.current;
|
|
189
|
+
if (!img || current === void 0 || !img.complete) return;
|
|
190
|
+
const attribute = img.getAttribute("src");
|
|
191
|
+
if (img.naturalWidth > 0) reveal(img, current);
|
|
192
|
+
else if (attribute) img.setAttribute("src", attribute);
|
|
193
|
+
}, [current]);
|
|
194
|
+
const reported = useRef(status);
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
if (reported.current === status) return;
|
|
197
|
+
reported.current = status;
|
|
198
|
+
onStatusChange?.(status);
|
|
199
|
+
}, [status, onStatusChange]);
|
|
200
|
+
const handleLoad = (event) => {
|
|
201
|
+
if (current !== void 0) reveal(event.currentTarget, current);
|
|
202
|
+
onLoad?.(event);
|
|
203
|
+
};
|
|
204
|
+
const handleError = (event) => {
|
|
205
|
+
if (current !== void 0) settle(current, "error");
|
|
206
|
+
onError?.(event);
|
|
207
|
+
};
|
|
208
|
+
const showsPlaceholder = placeholder !== void 0 && (status === "loading" || status === "error");
|
|
209
|
+
const keepsPlaceholder = showsPlaceholder && status === "error";
|
|
210
|
+
const customPosition = isLogicalPosition(position) ? void 0 : position;
|
|
211
|
+
const rootStyle = {
|
|
212
|
+
...width !== void 0 && { "--image-width": `${width}px` },
|
|
213
|
+
...width !== void 0 && height !== void 0 && { aspectRatio: `${width}/${height}` },
|
|
214
|
+
...ratioStyle(ratio),
|
|
215
|
+
...customPosition !== void 0 && { "--image-position": customPosition },
|
|
216
|
+
...showsPlaceholder && (isDataUri(placeholder) ? {
|
|
217
|
+
backgroundImage: blurSvg({ placeholder, width, height, fit }),
|
|
218
|
+
backgroundSize: BACKGROUND_SIZE[fit],
|
|
219
|
+
backgroundPosition: "var(--image-position, center)",
|
|
220
|
+
backgroundRepeat: "no-repeat"
|
|
221
|
+
} : { backgroundColor: placeholder }),
|
|
222
|
+
...style
|
|
223
|
+
};
|
|
224
|
+
const content = fallback ?? mergeIcons(DEFAULT_ICONS, icons).fallback;
|
|
225
|
+
const fallbackLabel = alt ? { role: "img", "aria-label": alt } : { "aria-hidden": true };
|
|
226
|
+
const imageRef = useMergedRefs(imgRef, ref);
|
|
227
|
+
return /* @__PURE__ */ jsx(
|
|
228
|
+
"span",
|
|
229
|
+
{
|
|
230
|
+
"data-part": "root",
|
|
231
|
+
"data-state": status,
|
|
232
|
+
...props({ "data-priority": priority, "data-testid": testId }),
|
|
233
|
+
className: cn(
|
|
234
|
+
imageRoot({
|
|
235
|
+
radius,
|
|
236
|
+
skeleton: placeholder === void 0 && (status === "loading" || status === "loaded")
|
|
237
|
+
}),
|
|
238
|
+
isLogicalPosition(position) && POSITION[position],
|
|
239
|
+
classNames?.root,
|
|
240
|
+
className
|
|
241
|
+
),
|
|
242
|
+
style: rootStyle,
|
|
243
|
+
children: sources && current !== void 0 ? /* @__PURE__ */ jsx(
|
|
244
|
+
"img",
|
|
245
|
+
{
|
|
246
|
+
...rest,
|
|
247
|
+
ref: imageRef,
|
|
248
|
+
"data-part": "image",
|
|
249
|
+
"data-state": status,
|
|
250
|
+
src: sources.src,
|
|
251
|
+
srcSet: sources.srcSet,
|
|
252
|
+
sizes: sources.sizes,
|
|
253
|
+
alt,
|
|
254
|
+
width,
|
|
255
|
+
height,
|
|
256
|
+
loading: priority ? "eager" : "lazy",
|
|
257
|
+
fetchPriority: priority ? "high" : void 0,
|
|
258
|
+
decoding: priority ? void 0 : "async",
|
|
259
|
+
onLoad: handleLoad,
|
|
260
|
+
onError: handleError,
|
|
261
|
+
className: cn(
|
|
262
|
+
// `text-transparent` hides alt text a browser paints while it waits.
|
|
263
|
+
"block size-full text-transparent object-(--image-position)",
|
|
264
|
+
FIT[fit],
|
|
265
|
+
!priority && [
|
|
266
|
+
"opacity-0 data-[state=loaded]:opacity-100",
|
|
267
|
+
"transition-opacity duration-(--duration-normal) ease-standard motion-reduce:transition-none"
|
|
268
|
+
],
|
|
269
|
+
classNames?.image
|
|
270
|
+
)
|
|
271
|
+
},
|
|
272
|
+
current
|
|
273
|
+
) : /* @__PURE__ */ jsx(
|
|
274
|
+
"span",
|
|
275
|
+
{
|
|
276
|
+
"data-part": "fallback",
|
|
277
|
+
"data-state": status,
|
|
278
|
+
...props({ "data-placeholder": keepsPlaceholder }),
|
|
279
|
+
...fallbackLabel,
|
|
280
|
+
className: cn(
|
|
281
|
+
"absolute inset-0 flex items-center justify-center",
|
|
282
|
+
"bg-black/5 text-black/50 dark:bg-white/8 dark:text-white/50",
|
|
283
|
+
// Over a kept placeholder the wash would only dull it.
|
|
284
|
+
"data-placeholder:bg-transparent",
|
|
285
|
+
// Backgrounds are dropped in forced colors; a system-colored edge keeps the box.
|
|
286
|
+
"forced-colors:border forced-colors:border-[CanvasText]",
|
|
287
|
+
// Direct child only, so the chip below sizes its own icon.
|
|
288
|
+
"[&>svg]:size-6 [&>svg]:max-h-1/2 [&>svg]:max-w-1/2",
|
|
289
|
+
classNames?.fallback
|
|
290
|
+
),
|
|
291
|
+
children: content != null && keepsPlaceholder ? (
|
|
292
|
+
// A blur can be light or dark in either theme, so the content gets
|
|
293
|
+
// a small chip of its own rather than relying on the theme's text color.
|
|
294
|
+
/* @__PURE__ */ jsx(
|
|
295
|
+
"span",
|
|
296
|
+
{
|
|
297
|
+
"data-part": "fallback-chip",
|
|
298
|
+
className: cn(
|
|
299
|
+
"flex flex-col items-center gap-1 rounded-sm px-1.5 py-1",
|
|
300
|
+
"bg-white/75 text-brand-900/70 dark:bg-black/55 dark:text-white/80",
|
|
301
|
+
"forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
|
|
302
|
+
"[&_svg]:size-5"
|
|
303
|
+
),
|
|
304
|
+
children: content
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
) : content
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export { IMAGE_WIDTHS, Image, resolveSources };
|
|
315
|
+
//# sourceMappingURL=chunk-Y57NW6G7.js.map
|
|
316
|
+
//# sourceMappingURL=chunk-Y57NW6G7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/image/srcset.ts","../src/components/image/blur-svg.ts","../src/components/image/image.tsx"],"names":["loader","width","match","P"],"mappings":";;;;;;;;;;;;;;AAiBO,IAAM,YAAA,GAAe;AAAA,EAC1B,EAAA;AAAA,EAAI,EAAA;AAAA,EAAI,EAAA;AAAA,EAAI,EAAA;AAAA,EAAI,EAAA;AAAA,EAAI,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,IAAA;AAAA,EAAM,IAAA;AAAA,EAAM,IAAA;AAAA,EAAM,IAAA;AAAA,EAAM;AAC5E;AAyBO,SAAS,cAAA,CAAe;AAAA,EAC7B,GAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAC/B,EAAA,OAAO,MAAM,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,CAAA,CAClC,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAE,OAAA,EAAQ,EAAG,OAAO,EAAE,GAAA,GAAM,CAAA,CAC3C,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAE,GAAA,CAAI,CAAA,CAAE,OAAO,CAAA,EAAG,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,CAAA,CAAE,MAAA,IAAU,CAAC,EAAE,QAAAA,OAAAA,EAAQ,KAAA,EAAAC,QAAM,KAAM;AAC5F,IAAA,MAAM,EAAA,GAAK,CAAC,OAAA,KAAoBD,OAAAA,CAAO,EAAE,KAAK,KAAA,EAAOC,MAAAA,GAAQ,OAAA,EAAS,OAAA,EAAS,CAAA;AAC/E,IAAA,OAAO,EAAE,GAAA,EAAK,EAAA,CAAG,CAAC,GAAG,MAAA,EAAQ,CAAA,EAAG,EAAA,CAAG,CAAC,CAAC,CAAA,KAAA,EAAQ,EAAA,CAAG,CAAC,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;AAAA;AAAA;AAEJ;AAAA,GAEJ;AAEJ","file":"chunk-Y57NW6G7.js","sourcesContent":["import { match, P } from \"ts-pattern\"\n\n/**\n * Builds a CDN URL for one rendition of an image. The kit never resizes\n * anything itself: a loader maps `{ src, width, quality }` onto whatever query\n * string or path your image service expects.\n *\n * const unsplash: ImageLoader = ({ src, width, quality = 75 }) =>\n * `${src}?w=${width}&q=${quality}&auto=format`\n */\nexport type ImageLoader = (params: { src: string; width: number; quality?: number }) => string\n\n/**\n * Candidate widths for a `sizes`-driven srcset: next/image's small image sizes\n * followed by its device sizes, so a thumbnail and a full-bleed hero both land\n * near a real rendition.\n */\nexport const IMAGE_WIDTHS = [\n 16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840,\n] as const\n\nexport type ImageSources = { src: string; srcSet?: string; sizes?: string }\n\ntype ResolveOptions = {\n src: string\n loader?: ImageLoader\n width?: number\n sizes?: string\n quality?: number\n}\n\n/**\n * What the `<img>` (and its priority preload) should request.\n *\n * - No loader: the plain `src`. Without a service to ask, there are no other\n * renditions to choose from.\n * - Loader + `sizes`: `w` descriptors from `IMAGE_WIDTHS`, capped at twice\n * `width` when it's known (nothing gains from a rendition sharper than a 2x\n * screen needs). The browser picks one from `sizes`.\n * - Loader + `width`: a fixed-size image, so `1x` and `2x` are enough.\n * - Loader alone: treated as full-width (`sizes=\"100vw\"`).\n *\n * `src` is always the largest rendition, for browsers that ignore srcset.\n */\nexport function resolveSources({\n src,\n loader,\n width,\n sizes,\n quality,\n}: ResolveOptions): ImageSources {\n return match({ loader, width, sizes })\n .with({ loader: P.nullish }, () => ({ src }))\n .with({ loader: P.not(P.nullish), sizes: P.nullish, width: P.number }, ({ loader, width }) => {\n const at = (density: number) => loader({ src, width: width * density, quality })\n return { src: at(2), srcSet: `${at(1)} 1x, ${at(2)} 2x` }\n })\n .with({ loader: P.not(P.nullish) }, ({ loader }) => {\n const cap = width === undefined ? Number.POSITIVE_INFINITY : width * 2\n const fitting = IMAGE_WIDTHS.filter((w) => w <= cap)\n const widths = fitting.length > 0 ? fitting : [cap]\n const urls = widths.map((w) => ({ w, url: loader({ src, width: w, quality }) }))\n return {\n src: urls.at(-1)?.url ?? src,\n srcSet: urls.map(({ w, url }) => `${url} ${w}w`).join(\", \"),\n sizes: sizes ?? \"100vw\",\n }\n })\n .exhaustive()\n}\n","/**\n * A blurred version of a tiny `data:` placeholder, as a CSS `background-image`\n * value. Ported from next/image's `image-blur-svg.ts`: the thumbnail is drawn\n * into an SVG through an `feGaussianBlur`, so a 10px base64 image scales up\n * into a soft wash instead of a pixelated mosaic. No canvas, no dependency,\n * and it's plain CSS, so it's already painted in the server HTML.\n *\n * The middle of the filter (the `feColorMatrix` alpha boost, then compositing\n * the result over the source) keeps the edges opaque: a bare blur fades to\n * transparent near the border and the box would read as having a halo.\n *\n * With both dimensions known the SVG gets a matching viewBox and stretches to\n * fill (`preserveAspectRatio=\"none\"`), the way the image itself will. Without\n * them, the image inside the SVG follows `fit` instead.\n */\nconst BLUR = 20\n\ntype BlurOptions = {\n placeholder: string\n width?: number\n height?: number\n fit: \"cover\" | \"contain\" | \"fill\" | \"none\" | \"scale-down\"\n}\n\nconst ASPECT = {\n cover: \"xMidYMid slice\",\n contain: \"xMidYMid\",\n fill: \"none\",\n none: \"xMidYMid slice\",\n \"scale-down\": \"xMidYMid\",\n} as const\n\nexport function blurSvg({ placeholder, width, height, fit }: BlurOptions): string {\n const sized = width !== undefined && height !== undefined\n const viewBox = sized ? `viewBox='0 0 ${width} ${height}'` : \"\"\n const aspect = sized ? \"none\" : ASPECT[fit]\n const svg =\n `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E` +\n `%3Cfilter id='b' color-interpolation-filters='sRGB'%3E` +\n `%3CfeGaussianBlur stdDeviation='${BLUR}'/%3E` +\n `%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E` +\n `%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E` +\n `%3CfeComposite operator='out' in='s'/%3E` +\n `%3CfeComposite in2='SourceGraphic'/%3E` +\n `%3CfeGaussianBlur stdDeviation='${BLUR}'/%3E` +\n `%3C/filter%3E` +\n `%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${aspect}' ` +\n `style='filter: url(%23b);' href='${placeholder}'/%3E` +\n `%3C/svg%3E`\n return `url(\"data:image/svg+xml;charset=utf-8,${svg}\")`\n}\n\n/** A placeholder string is a data URI (blurred) or any CSS color (painted flat). */\nexport const isDataUri = (placeholder: string): boolean => placeholder.startsWith(\"data:\")\n","\"use client\"\n\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { ImageOff } from \"lucide-react\"\nimport {\n type ComponentProps,\n type CSSProperties,\n type ReactNode,\n type SyntheticEvent,\n useEffect,\n useRef,\n useState,\n} from \"react\"\nimport { preload } from \"react-dom\"\nimport { match, P } from \"ts-pattern\"\nimport { cn } from \"../../lib/cn\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport { MEDIA_RADIUS } from \"../../lib/radius\"\nimport { type Ratio, ratioStyle } from \"../../lib/ratio\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { blurSvg, isDataUri } from \"./blur-svg\"\nimport { type ImageLoader, resolveSources } from \"./srcset\"\n\n/**\n * Image — an `<img>` that holds its box while it loads, then crossfades in.\n *\n * <Image src={photo.url} alt={photo.description} ratio=\"4/3\" placeholder={photo.blur} />\n *\n * Two elements: a root `<span>` that owns the box (aspect ratio, radius,\n * clipping) and paints the placeholder, and the `<img>` inside it, which\n * fades from transparent to opaque once it has loaded *and* decoded. The\n * placeholder is a CSS color, or a tiny `data:` URI blurred through an SVG\n * filter (`blur-svg.ts`); without one, the root pulses with Skeleton's own\n * tokens. All three are plain CSS, so they're in the server HTML. When the\n * image fails, a color or blur stays under the fallback as a hint of what\n * belonged there; the skeleton doesn't, since a shimmer reads as \"loading\".\n *\n * The fade is pure CSS keyed on `data-state`, so it only runs once React has\n * hydrated and seen the load: a non-priority image shows at hydration or at\n * load, whichever is later. `priority` opts out for the above-the-fold image\n * (the LCP candidate): it's preloaded, fetched eagerly, and never hidden.\n *\n * Loading is tracked per source, in a results map rather than a single flag\n * reset by an effect: a new `src` has no entry and so reads as `loading` on\n * its very first render, and a `fallbackSrc` that fails too is never retried,\n * so the fallback can't loop. The `<img>` is keyed by the source it shows, so\n * a late event from the previous one can't land on the next.\n *\n * Hydration-safe in the same way as next/image: an image that finished (or\n * failed) before React attached its handlers is caught in a layout effect,\n * through `complete` and `naturalWidth`.\n *\n * No `asChild`: the component is two elements, and the consumer's child could\n * only stand in for one of them.\n */\nconst imageRoot = cva(\n [\n \"relative inline-block max-w-full overflow-clip align-middle\",\n // Driven by `width` through a variable, so a consumer's `w-*` still wins.\n \"w-(--image-width)\",\n // The placeholder is dropped once the image is opaque, not when it starts\n // fading in: removing it at once would flash the page through the fade.\n // A zero-length transition with a delay is how CSS defers a discrete\n // change, and `allow-discrete` lets `background-image` take part.\n \"transition-[background] duration-0 transition-discrete\",\n // With no fade under reduced motion, there is nothing to wait for.\n \"data-[state=loaded]:delay-(--duration-normal) motion-reduce:data-[state=loaded]:delay-0\",\n ],\n {\n variants: {\n radius: MEDIA_RADIUS,\n // Skeleton's own surface, on a pseudo-element so the pulse never reaches\n // the image's opacity. Hidden on load with the same deferral as above.\n skeleton: {\n true: [\n \"before:absolute before:inset-0\",\n \"before:animate-pulse before:bg-black/15 dark:before:bg-white/8 motion-reduce:before:animate-none\",\n \"before:transition-[display] before:duration-0 before:transition-discrete\",\n \"data-[state=loaded]:before:hidden data-[state=loaded]:before:delay-(--duration-normal)\",\n \"motion-reduce:data-[state=loaded]:before:delay-0\",\n ],\n false: \"\",\n },\n },\n defaultVariants: { radius: \"xs\", skeleton: false },\n },\n)\n\nconst FIT = {\n cover: \"object-cover\",\n contain: \"object-contain\",\n fill: \"object-fill\",\n none: \"object-none\",\n \"scale-down\": \"object-scale-down\",\n} as const\n\n/** What the blurred placeholder's `background-size` mirrors, per `fit`. */\nconst BACKGROUND_SIZE = {\n cover: \"cover\",\n contain: \"contain\",\n fill: \"100% 100%\",\n none: \"cover\",\n \"scale-down\": \"contain\",\n} as const\n\n/**\n * Logical positions resolve through `--image-position`, flipped under RTL, so\n * the image and its blurred placeholder crop to the same side. A free-form\n * value is written to the same variable inline.\n */\nconst POSITION = {\n center: \"\",\n top: \"[--image-position:top]\",\n bottom: \"[--image-position:bottom]\",\n start: \"[--image-position:left] rtl:[--image-position:right]\",\n end: \"[--image-position:right] rtl:[--image-position:left]\",\n \"top-start\": \"[--image-position:left_top] rtl:[--image-position:right_top]\",\n \"top-end\": \"[--image-position:right_top] rtl:[--image-position:left_top]\",\n \"bottom-start\": \"[--image-position:left_bottom] rtl:[--image-position:right_bottom]\",\n \"bottom-end\": \"[--image-position:right_bottom] rtl:[--image-position:left_bottom]\",\n} as const\n\nconst isLogicalPosition = (position: string): position is keyof typeof POSITION =>\n Object.hasOwn(POSITION, position)\n\nexport type ImageStatus = \"empty\" | \"loading\" | \"loaded\" | \"error\"\nexport type ImageFit = keyof typeof FIT\nexport type ImagePosition = keyof typeof POSITION | (string & {})\nexport type ImageRadius = NonNullable<VariantProps<typeof imageRoot>[\"radius\"]>\nexport type { ImageLoader }\n\nexport type ImageIconSlot = \"fallback\"\nexport type ImageIcons = IconMap<ImageIconSlot>\n\nconst DEFAULT_ICONS: Record<ImageIconSlot, ReactNode> = {\n fallback: <ImageOff aria-hidden className={iconStroke} />,\n}\n\ntype ImageClassNames = {\n root?: string\n image?: string\n fallback?: string\n}\n\n/** Everything the kit decides itself, or redefines, is left out of the `<img>` passthrough. */\ntype ImgAttributes = Omit<\n ComponentProps<\"img\">,\n | \"src\"\n | \"alt\"\n | \"width\"\n | \"height\"\n | \"sizes\"\n | \"srcSet\"\n | \"loading\"\n | \"fetchPriority\"\n | \"placeholder\"\n | \"className\"\n | \"style\"\n>\n\nexport type ImageProps = ImgAttributes &\n WithTestId & {\n /** Image URL. Unset shows the fallback (`data-state=\"empty\"`). */\n src?: string\n /** Required. Describe the image, or pass `\"\"` when it's decorative. */\n alt: string\n /** Intrinsic width in px: sizes the box, and caps the srcset at 2x. */\n width?: number\n /** Intrinsic height in px: with `width`, gives the box its aspect ratio. */\n height?: number\n /** Box aspect ratio (`16 / 9` or `\"16/9\"`). Wins over `width`/`height`'s. */\n ratio?: Ratio\n /** How the image fills its box. */\n fit?: ImageFit\n /** Which part stays visible when cropped. `start`/`end` follow `dir`. */\n position?: ImagePosition\n /** Rendered width per breakpoint, for a loader's `w`-descriptor srcset. */\n sizes?: string\n /** Passed to `loader`. */\n quality?: number\n /** Maps `{ src, width, quality }` to a CDN URL; enables the srcset. */\n loader?: ImageLoader\n /** Above-the-fold image: preloaded, fetched eagerly, never hidden or faded. */\n priority?: boolean\n /** A CSS color, or a tiny `data:` URI shown blurred, also kept under the error fallback. Skeleton pulse when unset. */\n placeholder?: string\n /** Tried once, verbatim (no loader), when `src` fails. */\n fallbackSrc?: string\n /** Shown when there's nothing to load or everything failed. Wins over `icons.fallback`. */\n fallback?: ReactNode\n /**\n * Replaces the default icons: `fallback`, the broken picture shown when\n * there's nothing to load or everything failed. `null` leaves the box\n * empty: the wash, or the kept placeholder.\n */\n icons?: ImageIcons\n /** Corner radius. `\"none\"` for a square edge. */\n radius?: ImageRadius\n /** Fires on every status change after mount. */\n onStatusChange?: (status: ImageStatus) => void\n /** Applies to the root. */\n className?: string\n /** Applies to the root. */\n style?: CSSProperties\n classNames?: ImageClassNames\n }\n\ntype Result = \"loaded\" | \"error\"\n\n/** CSS custom properties alongside regular declarations, typed without a cast. */\ntype RootStyle = CSSProperties & Record<`--${string}`, string | undefined>\n\nexport function Image({\n src,\n alt,\n width,\n height,\n ratio,\n fit = \"cover\",\n position = \"center\",\n sizes,\n quality,\n loader,\n priority = false,\n placeholder,\n fallbackSrc,\n fallback,\n icons,\n radius,\n onStatusChange,\n className,\n style,\n classNames,\n testId,\n ref,\n onLoad,\n onError,\n ...rest\n}: ImageProps) {\n const [results, setResults] = useState<Record<string, Result>>({})\n const imgRef = useRef<HTMLImageElement>(null)\n\n const candidates = [...new Set([src, fallbackSrc].filter((c): c is string => Boolean(c)))]\n const current = candidates.find((c) => results[c] !== \"error\")\n const status: ImageStatus = match(current)\n .with(P.nullish, () => (candidates.length === 0 ? \"empty\" : \"error\"))\n .otherwise((c) => results[c] ?? \"loading\")\n\n // Only `src` goes through the loader: `fallbackSrc` is used verbatim, so a\n // misconfigured loader can't also take the fallback down with it.\n const sources = match(current)\n .with(P.nullish, () => undefined)\n .with(\n P.when((c) => c === src),\n (c) => resolveSources({ src: c, loader, width, sizes, quality }),\n )\n .otherwise((c) => ({ src: c }))\n\n if (priority && src && sources && current === src) {\n preload(sources.src, {\n as: \"image\",\n fetchPriority: \"high\",\n imageSrcSet: sources.srcSet,\n imageSizes: sources.sizes,\n })\n }\n\n const settle = (candidate: string, result: Result) =>\n setResults((previous) =>\n previous[candidate] === result ? previous : { ...previous, [candidate]: result },\n )\n\n /** Marks loaded once decoded, so the fade never starts on an undecoded frame. */\n const reveal = (img: HTMLImageElement, candidate: string) => {\n const decoded = typeof img.decode === \"function\" ? img.decode() : Promise.resolve()\n decoded\n .catch(() => undefined)\n .then(() => {\n if (img.isConnected) settle(candidate, \"loaded\")\n })\n }\n\n // An image that settled before hydration fired its events into the void.\n // A decoded one is revealed now; a broken one gets its `src` reassigned,\n // which makes the browser fire `error` again, this time with a listener.\n // Runs once per source: `reveal` only closes over a state setter.\n useIsomorphicLayoutEffect(() => {\n const img = imgRef.current\n if (!img || current === undefined || !img.complete) return\n const attribute = img.getAttribute(\"src\")\n if (img.naturalWidth > 0) reveal(img, current)\n else if (attribute) img.setAttribute(\"src\", attribute)\n }, [current])\n\n const reported = useRef(status)\n useEffect(() => {\n if (reported.current === status) return\n reported.current = status\n onStatusChange?.(status)\n }, [status, onStatusChange])\n\n const handleLoad = (event: SyntheticEvent<HTMLImageElement>) => {\n if (current !== undefined) reveal(event.currentTarget, current)\n onLoad?.(event)\n }\n const handleError = (event: SyntheticEvent<HTMLImageElement>) => {\n if (current !== undefined) settle(current, \"error\")\n onError?.(event)\n }\n\n // A failed image keeps its placeholder under the fallback, as a hint of what\n // should be there. The skeleton is never kept: a shimmer means \"loading\".\n const showsPlaceholder = placeholder !== undefined && (status === \"loading\" || status === \"error\")\n const keepsPlaceholder = showsPlaceholder && status === \"error\"\n const customPosition = isLogicalPosition(position) ? undefined : position\n const rootStyle: RootStyle = {\n ...(width !== undefined && { \"--image-width\": `${width}px` }),\n ...(width !== undefined && height !== undefined && { aspectRatio: `${width}/${height}` }),\n ...ratioStyle(ratio),\n ...(customPosition !== undefined && { \"--image-position\": customPosition }),\n ...(showsPlaceholder &&\n (isDataUri(placeholder)\n ? {\n backgroundImage: blurSvg({ placeholder, width, height, fit }),\n backgroundSize: BACKGROUND_SIZE[fit],\n backgroundPosition: \"var(--image-position, center)\",\n backgroundRepeat: \"no-repeat\",\n }\n : { backgroundColor: placeholder })),\n ...style,\n }\n\n const content = fallback ?? mergeIcons(DEFAULT_ICONS, icons).fallback\n const fallbackLabel = alt ? { role: \"img\", \"aria-label\": alt } : { \"aria-hidden\": true }\n\n const imageRef = useMergedRefs(imgRef, ref)\n return (\n <span\n data-part=\"root\"\n data-state={status}\n {...props({ \"data-priority\": priority, \"data-testid\": testId })}\n className={cn(\n imageRoot({\n radius,\n skeleton: placeholder === undefined && (status === \"loading\" || status === \"loaded\"),\n }),\n isLogicalPosition(position) && POSITION[position],\n classNames?.root,\n className,\n )}\n style={rootStyle}\n >\n {sources && current !== undefined ? (\n <img\n key={current}\n {...rest}\n ref={imageRef}\n data-part=\"image\"\n data-state={status}\n src={sources.src}\n srcSet={sources.srcSet}\n sizes={sources.sizes}\n alt={alt}\n width={width}\n height={height}\n loading={priority ? \"eager\" : \"lazy\"}\n fetchPriority={priority ? \"high\" : undefined}\n decoding={priority ? undefined : \"async\"}\n onLoad={handleLoad}\n onError={handleError}\n className={cn(\n // `text-transparent` hides alt text a browser paints while it waits.\n \"block size-full text-transparent object-(--image-position)\",\n FIT[fit],\n !priority && [\n \"opacity-0 data-[state=loaded]:opacity-100\",\n \"transition-opacity duration-(--duration-normal) ease-standard motion-reduce:transition-none\",\n ],\n classNames?.image,\n )}\n />\n ) : (\n <span\n data-part=\"fallback\"\n data-state={status}\n {...props({ \"data-placeholder\": keepsPlaceholder })}\n {...fallbackLabel}\n className={cn(\n \"absolute inset-0 flex items-center justify-center\",\n \"bg-black/5 text-black/50 dark:bg-white/8 dark:text-white/50\",\n // Over a kept placeholder the wash would only dull it.\n \"data-placeholder:bg-transparent\",\n // Backgrounds are dropped in forced colors; a system-colored edge keeps the box.\n \"forced-colors:border forced-colors:border-[CanvasText]\",\n // Direct child only, so the chip below sizes its own icon.\n \"[&>svg]:size-6 [&>svg]:max-h-1/2 [&>svg]:max-w-1/2\",\n classNames?.fallback,\n )}\n >\n {content != null && keepsPlaceholder ? (\n // A blur can be light or dark in either theme, so the content gets\n // a small chip of its own rather than relying on the theme's text color.\n <span\n data-part=\"fallback-chip\"\n className={cn(\n \"flex flex-col items-center gap-1 rounded-sm px-1.5 py-1\",\n \"bg-white/75 text-brand-900/70 dark:bg-black/55 dark:text-white/80\",\n \"forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]\",\n \"[&_svg]:size-5\",\n )}\n >\n {content}\n </span>\n ) : (\n content\n )}\n </span>\n )}\n </span>\n )\n}\n"]}
|