@42-central/ui-react 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/biome/no-gray-scale-class.grit +27 -0
- package/dist/{chunk-HCYULRWT.js → chunk-2KN3MI7I.js} +38 -34
- package/dist/chunk-2KN3MI7I.js.map +1 -0
- package/dist/chunk-2LI3VPDP.js +39 -0
- package/dist/chunk-2LI3VPDP.js.map +1 -0
- package/dist/{chunk-2NNZHVKD.js → chunk-2OQP7UY4.js} +22 -18
- package/dist/chunk-2OQP7UY4.js.map +1 -0
- package/dist/{chunk-RKYXG6X7.js → chunk-2TM7UVM2.js} +16 -13
- package/dist/chunk-2TM7UVM2.js.map +1 -0
- package/dist/chunk-3REFDGOM.js +89 -0
- package/dist/chunk-3REFDGOM.js.map +1 -0
- package/dist/{chunk-TBTSEPGP.js → chunk-45DFYIK5.js} +9 -7
- package/dist/chunk-45DFYIK5.js.map +1 -0
- package/dist/{chunk-CYWMES5P.js → chunk-4BGU2UQB.js} +23 -11
- package/dist/chunk-4BGU2UQB.js.map +1 -0
- package/dist/chunk-4EU6FGGB.js +104 -0
- package/dist/chunk-4EU6FGGB.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-4TCTMRR5.js +293 -0
- package/dist/chunk-4TCTMRR5.js.map +1 -0
- package/dist/chunk-5337N3FE.js +176 -0
- package/dist/chunk-5337N3FE.js.map +1 -0
- package/dist/{chunk-GCGX4FEF.js → chunk-6KER77RS.js} +27 -41
- package/dist/chunk-6KER77RS.js.map +1 -0
- package/dist/chunk-6N6J2DOE.js +27 -0
- package/dist/chunk-6N6J2DOE.js.map +1 -0
- package/dist/{chunk-A6MYJTJI.js → chunk-6OV6EJQ2.js} +6 -7
- package/dist/chunk-6OV6EJQ2.js.map +1 -0
- package/dist/chunk-7AWOMWCQ.js +345 -0
- package/dist/chunk-7AWOMWCQ.js.map +1 -0
- package/dist/{chunk-Z6RPMRFH.js → chunk-7R4CDHBK.js} +9 -8
- package/dist/chunk-7R4CDHBK.js.map +1 -0
- 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-BUFALAEK.js +337 -0
- package/dist/chunk-BUFALAEK.js.map +1 -0
- package/dist/chunk-CDHIF2NV.js +340 -0
- package/dist/chunk-CDHIF2NV.js.map +1 -0
- package/dist/chunk-CQ4M4BSF.js +12 -0
- package/dist/chunk-CQ4M4BSF.js.map +1 -0
- package/dist/chunk-DHM4IG2O.js +13 -0
- package/dist/chunk-DHM4IG2O.js.map +1 -0
- package/dist/chunk-DHTSVJ4G.js +948 -0
- package/dist/chunk-DHTSVJ4G.js.map +1 -0
- package/dist/{chunk-WSIVRDRB.js → chunk-DUPE2CRU.js} +3 -3
- package/dist/{chunk-WSIVRDRB.js.map → chunk-DUPE2CRU.js.map} +1 -1
- package/dist/chunk-EIBDLRAR.js +30 -0
- package/dist/chunk-EIBDLRAR.js.map +1 -0
- package/dist/chunk-FUNTJZX7.js +217 -0
- package/dist/chunk-FUNTJZX7.js.map +1 -0
- package/dist/{chunk-YWRBG23W.js → chunk-FXDLS23K.js} +6 -3
- package/dist/chunk-FXDLS23K.js.map +1 -0
- package/dist/chunk-FZNPJAGJ.js +62 -0
- package/dist/chunk-FZNPJAGJ.js.map +1 -0
- package/dist/{chunk-CHTN5AHI.js → chunk-GGT4GJD6.js} +3 -3
- package/dist/chunk-GGT4GJD6.js.map +1 -0
- package/dist/chunk-GIPQUKCN.js +44 -0
- package/dist/chunk-GIPQUKCN.js.map +1 -0
- package/dist/chunk-H26K66EU.js +316 -0
- package/dist/chunk-H26K66EU.js.map +1 -0
- package/dist/chunk-H7INUXZD.js +104 -0
- package/dist/chunk-H7INUXZD.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-WJOHNCYY.js → chunk-HBFN5W7Q.js} +37 -90
- package/dist/chunk-HBFN5W7Q.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-HDRC6ITF.js +93 -0
- package/dist/chunk-HDRC6ITF.js.map +1 -0
- package/dist/chunk-HDYORQZN.js +23 -0
- package/dist/chunk-HDYORQZN.js.map +1 -0
- package/dist/chunk-HEQ2H6VO.js +148 -0
- package/dist/chunk-HEQ2H6VO.js.map +1 -0
- package/dist/chunk-HVOEVB4E.js +80 -0
- package/dist/chunk-HVOEVB4E.js.map +1 -0
- package/dist/chunk-HX3LNK26.js +193 -0
- package/dist/chunk-HX3LNK26.js.map +1 -0
- package/dist/{chunk-CSCVTESP.js → chunk-IMP5VHEN.js} +4 -11
- package/dist/chunk-IMP5VHEN.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-Z43YWH4R.js → chunk-JL4QMM46.js} +47 -25
- package/dist/chunk-JL4QMM46.js.map +1 -0
- package/dist/chunk-JQJ23YQX.js +38 -0
- package/dist/chunk-JQJ23YQX.js.map +1 -0
- package/dist/{chunk-SVKU3GUN.js → chunk-JYK6JVR3.js} +13 -13
- package/dist/chunk-JYK6JVR3.js.map +1 -0
- package/dist/chunk-JYKP4RSG.js +304 -0
- package/dist/chunk-JYKP4RSG.js.map +1 -0
- package/dist/chunk-K6BHDFX3.js +120 -0
- package/dist/chunk-K6BHDFX3.js.map +1 -0
- package/dist/chunk-K6YASO4L.js +25 -0
- package/dist/chunk-K6YASO4L.js.map +1 -0
- package/dist/{chunk-64T6Z7BA.js → chunk-KOT4PWGE.js} +107 -95
- package/dist/chunk-KOT4PWGE.js.map +1 -0
- package/dist/{chunk-RIP5G47F.js → chunk-LJ3GHC4V.js} +13 -11
- package/dist/chunk-LJ3GHC4V.js.map +1 -0
- package/dist/{chunk-YW6Q6ERX.js → chunk-LSIX2PVU.js} +49 -56
- package/dist/chunk-LSIX2PVU.js.map +1 -0
- package/dist/chunk-LZWA7V62.js +140 -0
- package/dist/chunk-LZWA7V62.js.map +1 -0
- package/dist/chunk-MKJKCBRE.js +437 -0
- package/dist/chunk-MKJKCBRE.js.map +1 -0
- package/dist/{chunk-QIDAXFKK.js → chunk-NJ4RO3CT.js} +52 -18
- package/dist/chunk-NJ4RO3CT.js.map +1 -0
- package/dist/{chunk-PINENGML.js → chunk-P276SCCV.js} +15 -8
- package/dist/chunk-P276SCCV.js.map +1 -0
- package/dist/chunk-PAFS7TED.js +85 -0
- package/dist/chunk-PAFS7TED.js.map +1 -0
- package/dist/chunk-PD4FX34E.js +309 -0
- package/dist/chunk-PD4FX34E.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-4NNGTNPV.js → chunk-Q5ZO2O25.js} +48 -34
- package/dist/chunk-Q5ZO2O25.js.map +1 -0
- package/dist/{chunk-YKUCSV34.js → chunk-R52P43LZ.js} +7 -13
- package/dist/chunk-R52P43LZ.js.map +1 -0
- package/dist/{chunk-CZEKZ5HR.js → chunk-R57QP43T.js} +32 -11
- package/dist/chunk-R57QP43T.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-FOMR74VE.js → chunk-RGLNH7A5.js} +6 -6
- package/dist/chunk-RGLNH7A5.js.map +1 -0
- package/dist/chunk-RNRD6ER5.js +32 -0
- package/dist/chunk-RNRD6ER5.js.map +1 -0
- package/dist/{chunk-VZBUQNLX.js → chunk-S4TRYMCU.js} +51 -40
- package/dist/chunk-S4TRYMCU.js.map +1 -0
- package/dist/chunk-SDVZFXQ2.js +21 -0
- package/dist/chunk-SDVZFXQ2.js.map +1 -0
- package/dist/{chunk-CTSO6V72.js → chunk-SE3CGQRO.js} +11 -5
- package/dist/chunk-SE3CGQRO.js.map +1 -0
- package/dist/chunk-TCFB23JT.js +354 -0
- package/dist/chunk-TCFB23JT.js.map +1 -0
- package/dist/{chunk-BTFBBNRW.js → chunk-THLMW5IU.js} +5 -5
- package/dist/{chunk-BTFBBNRW.js.map → chunk-THLMW5IU.js.map} +1 -1
- package/dist/{chunk-YQHOKMSV.js → chunk-U2PNMMDB.js} +60 -53
- package/dist/chunk-U2PNMMDB.js.map +1 -0
- package/dist/{chunk-IRXZHLUL.js → chunk-VALQ2XVA.js} +4 -4
- package/dist/chunk-VALQ2XVA.js.map +1 -0
- package/dist/{chunk-UJZIF2BA.js → chunk-VVM7JMZS.js} +40 -54
- package/dist/chunk-VVM7JMZS.js.map +1 -0
- package/dist/{chunk-OGJFDNIS.js → chunk-WFHY6NRQ.js} +85 -54
- package/dist/chunk-WFHY6NRQ.js.map +1 -0
- package/dist/chunk-WG3BCIU4.js +20 -0
- package/dist/chunk-WG3BCIU4.js.map +1 -0
- package/dist/{chunk-K5UWVH6P.js → chunk-WR444JRU.js} +35 -26
- package/dist/chunk-WR444JRU.js.map +1 -0
- package/dist/chunk-XFEPUGUZ.js +15 -0
- package/dist/chunk-XFEPUGUZ.js.map +1 -0
- package/dist/chunk-XXOR34T4.js +10 -0
- package/dist/chunk-XXOR34T4.js.map +1 -0
- package/dist/{chunk-VZH6TS7M.js → chunk-Z5WYYDG2.js} +7 -4
- package/dist/chunk-Z5WYYDG2.js.map +1 -0
- package/dist/{chunk-IG7FBZVM.js → chunk-ZFUTGBJC.js} +13 -12
- package/dist/chunk-ZFUTGBJC.js.map +1 -0
- package/dist/{chunk-LM6F6DLR.js → chunk-ZN3WYGIQ.js} +18 -9
- package/dist/chunk-ZN3WYGIQ.js.map +1 -0
- package/dist/{chunk-FAOBC4IS.js → chunk-ZWOZL4XX.js} +38 -28
- package/dist/chunk-ZWOZL4XX.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 +27 -15
- 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 +5 -4
- 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 +22 -10
- 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 +38 -27
- 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 +46 -18
- 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 +16 -19
- 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 +26 -13
- 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 +30 -6
- 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 +5 -4
- package/dist/components/button-multi-select/index.js +9 -7
- 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 +9 -7
- 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 +10 -8
- 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 +2 -1
- 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 +11 -1
- 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 +7 -5
- 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 +50 -48
- 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 +12 -1
- 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 +60 -23
- 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 +3 -2
- 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 +10 -8
- 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 +11 -9
- 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.map +1 -1
- package/dist/components/collapse/index.js +2 -2
- 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 +10 -8
- 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 +13 -10
- 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.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 +281 -198
- 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 +23 -20
- 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 +2 -1
- 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 +10 -6
- 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 +2 -1
- 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 +205 -101
- 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 +2 -1
- 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 +2 -10
- package/dist/components/grid/index.js.map +1 -1
- package/dist/components/hover-card/index.js +4 -3
- 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 +10 -3
- 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 +3 -2
- 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 +1 -1
- 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 +12 -6
- 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 +10 -6
- 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 +15 -12
- 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 +25 -19
- 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 +9 -6
- 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 +9 -6
- 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 +59 -21
- 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 +10 -8
- 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 +28 -31
- 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 +13 -5
- 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 +5 -3
- 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 +12 -6
- 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 +39 -12
- 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 +4 -3
- 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 +11 -5
- 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 +16 -6
- 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 +3314 -2729
- 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 +8 -6
- 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 +13 -11
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +2 -1
- 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 +2 -1
- 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 +7 -6
- 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 +3 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/index.js +5 -4
- 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 +41 -24
- 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 +2 -2
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/text-input/index.js +3 -2
- package/dist/components/text-input/index.js.map +1 -1
- package/dist/components/textarea/index.js +3 -2
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/theme-icon/index.js +2 -2
- 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 +21 -20
- 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 +43 -30
- 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 +2 -2
- package/dist/components/title/title.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +3 -2
- 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 +111 -247
- 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 +104 -320
- 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 +59 -112
- package/dist/index.js.map +1 -1
- package/dist/lib/as-child.d.ts +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 +70 -0
- package/src/components/card/card.tsx +5 -2
- 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 +14 -2
- 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-RIP5G47F.js.map +0 -1
- package/dist/chunk-RKYXG6X7.js.map +0 -1
- package/dist/chunk-SVKU3GUN.js.map +0 -1
- package/dist/chunk-TBTSEPGP.js.map +0 -1
- package/dist/chunk-TWGCWKRV.js +0 -44
- package/dist/chunk-TWGCWKRV.js.map +0 -1
- package/dist/chunk-UJZIF2BA.js.map +0 -1
- package/dist/chunk-UVYTJQTJ.js +0 -14
- package/dist/chunk-UVYTJQTJ.js.map +0 -1
- package/dist/chunk-VZBUQNLX.js.map +0 -1
- package/dist/chunk-VZH6TS7M.js.map +0 -1
- package/dist/chunk-WJOHNCYY.js.map +0 -1
- package/dist/chunk-WZB6LPQI.js +0 -47
- package/dist/chunk-WZB6LPQI.js.map +0 -1
- package/dist/chunk-YKUCSV34.js.map +0 -1
- package/dist/chunk-YQHOKMSV.js.map +0 -1
- package/dist/chunk-YW6Q6ERX.js.map +0 -1
- package/dist/chunk-YWRBG23W.js.map +0 -1
- package/dist/chunk-Z43YWH4R.js.map +0 -1
- package/dist/chunk-Z6RPMRFH.js.map +0 -1
- package/dist/components/slider/sliderThumb.d.ts +0 -1
- package/dist/components/slider/sliderThumb.d.ts.map +0 -1
- package/src/components/slider/sliderThumb.tsx +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../../src/components/gallery/gallery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAmB,MAAM,OAAO,CAAA;AAEpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAOnD,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,EAAS,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,EAGL,KAAK,aAAa,EAIlB,KAAK,cAAc,EAIpB,MAAM,UAAU,CAAA;AAwCjB,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,MAAM,CAAA;AAE1C,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,UAAU,EACV,KAAK,GAAG,KAAK,GAAG,aAAa,GAAG,SAAS,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M,CAAA;IAClB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,SAAS,CAAA;IACjF,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAgFH,eAAO,MAAM,OAAO,0MAsBjB,YAAY,gCAqHd,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Gallery, type GalleryItem, type GalleryProps, type GallerySpacing, type GalleryTranslations, } from "./gallery";
|
|
2
|
+
export { type Breakpoint, columnCount, type GalleryLayout, type MasonryColumns, masonryColumns, } from "./layout";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/gallery/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,UAAU,EACf,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,cAAc,GACf,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Figure } from '../../chunk-PAFS7TED.js';
|
|
3
|
+
import '../../chunk-AZ2VUAGX.js';
|
|
4
|
+
import { Image } from '../../chunk-H26K66EU.js';
|
|
5
|
+
import { MEDIA_RADIUS } from '../../chunk-J43LSYQO.js';
|
|
6
|
+
import { useOpenIndexTrigger } from '../../chunk-RNRD6ER5.js';
|
|
7
|
+
import { useElementSize } from '../../chunk-2LI3VPDP.js';
|
|
8
|
+
import { useMergedRefs } from '../../chunk-HBWV5EPU.js';
|
|
9
|
+
import { ratioStyle } from '../../chunk-AHM6SGEU.js';
|
|
10
|
+
import { useLocale } from '../../chunk-IPYHTCFL.js';
|
|
11
|
+
import '../../chunk-6N6J2DOE.js';
|
|
12
|
+
import { useIsomorphicLayoutEffect } from '../../chunk-BUIHQJGE.js';
|
|
13
|
+
import '../../chunk-XXOR34T4.js';
|
|
14
|
+
import { props } from '../../chunk-WYCMIIRR.js';
|
|
15
|
+
import { focusStyles } from '../../chunk-3REFDGOM.js';
|
|
16
|
+
import '../../chunk-GIPQUKCN.js';
|
|
17
|
+
import { cn } from '../../chunk-QP4I37PA.js';
|
|
18
|
+
import { ark } from '@ark-ui/react';
|
|
19
|
+
import { useRef, useMemo } from 'react';
|
|
20
|
+
import { match, P } from 'ts-pattern';
|
|
21
|
+
import { jsx } from 'react/jsx-runtime';
|
|
22
|
+
|
|
23
|
+
var aspectOf = ({ width, height }) => width > 0 && height > 0 ? width / height : 1;
|
|
24
|
+
var masonryColumns = (data, columns) => {
|
|
25
|
+
const count = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;
|
|
26
|
+
const start = Array.from({ length: count }, () => ({ height: 0, indices: [] }));
|
|
27
|
+
return data.reduce((cols, item, index) => {
|
|
28
|
+
const shortest = cols.reduce(
|
|
29
|
+
(best, col, i) => col.height < best.height ? { i, height: col.height } : best,
|
|
30
|
+
{ i: 0, height: Number.POSITIVE_INFINITY }
|
|
31
|
+
).i;
|
|
32
|
+
return cols.map(
|
|
33
|
+
(col, i) => i === shortest ? { height: col.height + 1 / aspectOf(item), indices: [...col.indices, index] } : col
|
|
34
|
+
);
|
|
35
|
+
}, start).map((col) => col.indices);
|
|
36
|
+
};
|
|
37
|
+
var gridStyle = (min) => ({
|
|
38
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${min}px), 1fr))`
|
|
39
|
+
});
|
|
40
|
+
var ROW_FLOOR = 96;
|
|
41
|
+
var ROW_SLOPE = "25cqi";
|
|
42
|
+
var justifiedRootStyle = (rowHeight) => ({
|
|
43
|
+
"--row": `clamp(${Math.min(ROW_FLOOR, rowHeight)}px, ${ROW_SLOPE}, ${rowHeight}px)`
|
|
44
|
+
});
|
|
45
|
+
var justifiedItemStyle = (item, tolerance) => {
|
|
46
|
+
const ratio = aspectOf(item);
|
|
47
|
+
return {
|
|
48
|
+
flex: `${ratio} 1 calc(var(--row) * ${ratio})`,
|
|
49
|
+
maxWidth: `calc(var(--row) * ${ratio * (1 + tolerance)})`,
|
|
50
|
+
aspectRatio: String(ratio)
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
var itemStyle = (layout, item, { ratio, tolerance }) => match(layout).with("grid", () => ratioStyle(ratio)).with("masonry", () => ({ aspectRatio: String(aspectOf(item)) })).with("justified", () => justifiedItemStyle(item, tolerance)).exhaustive();
|
|
54
|
+
var BREAKPOINT_NAMES = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
55
|
+
var BREAKPOINTS = {
|
|
56
|
+
xs: 480,
|
|
57
|
+
sm: 640,
|
|
58
|
+
md: 768,
|
|
59
|
+
lg: 1024,
|
|
60
|
+
xl: 1280,
|
|
61
|
+
"2xl": 1536
|
|
62
|
+
};
|
|
63
|
+
var measuresColumns = (columns, min) => min !== void 0 || typeof columns === "object";
|
|
64
|
+
var columnCount = ({ columns, min, size }) => {
|
|
65
|
+
const base = typeof columns === "number" ? columns : columns.base ?? 1;
|
|
66
|
+
const count = match(size).with(P.nullish, () => base).otherwise(({ width, gap }) => {
|
|
67
|
+
if (min !== void 0) return Math.floor((width + gap) / (Math.max(1, min) + gap));
|
|
68
|
+
if (typeof columns === "number") return columns;
|
|
69
|
+
return BREAKPOINT_NAMES.filter((name) => BREAKPOINTS[name] <= width).reduce(
|
|
70
|
+
(current, name) => columns[name] ?? current,
|
|
71
|
+
base
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
return Number.isFinite(count) ? Math.max(1, Math.floor(count)) : 1;
|
|
75
|
+
};
|
|
76
|
+
var defaultSizes = (layout, item, { min, columns, rowHeight, tolerance }) => match(layout).with("grid", () => `${2 * min}px`).with("masonry", () => `${Math.ceil(100 / Math.max(1, Math.floor(columns)))}vw`).with("justified", () => `${Math.ceil(rowHeight * aspectOf(item) * (1 + tolerance))}px`).exhaustive();
|
|
77
|
+
var SPACING = {
|
|
78
|
+
none: "gap-0",
|
|
79
|
+
xs: "gap-1",
|
|
80
|
+
sm: "gap-1.5",
|
|
81
|
+
md: "gap-2",
|
|
82
|
+
lg: "gap-3",
|
|
83
|
+
xl: "gap-4"
|
|
84
|
+
};
|
|
85
|
+
var DEFAULT_TRANSLATIONS = {
|
|
86
|
+
openLabel: (position, count) => `Open image ${position} of ${count}`
|
|
87
|
+
};
|
|
88
|
+
var Tile = ({ item, index, media, radius, label, classNames }) => {
|
|
89
|
+
const trigger = useOpenIndexTrigger(index);
|
|
90
|
+
const tile = trigger ? /* @__PURE__ */ jsx(
|
|
91
|
+
"button",
|
|
92
|
+
{
|
|
93
|
+
...trigger,
|
|
94
|
+
"aria-label": item.alt ? void 0 : label,
|
|
95
|
+
className: "block size-full cursor-zoom-in focus-visible:outline-none",
|
|
96
|
+
children: media
|
|
97
|
+
}
|
|
98
|
+
) : media;
|
|
99
|
+
if (item.caption === void 0) return tile;
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
101
|
+
Figure,
|
|
102
|
+
{
|
|
103
|
+
placement: "overlay",
|
|
104
|
+
radius,
|
|
105
|
+
caption: item.caption,
|
|
106
|
+
className: "size-full",
|
|
107
|
+
classNames: { caption: cn(trigger && "pointer-events-none", classNames?.caption) },
|
|
108
|
+
children: tile
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
var useMeasure = (ref, enabled) => {
|
|
113
|
+
const width = useElementSize(ref, { enabled })?.width;
|
|
114
|
+
return useMemo(() => {
|
|
115
|
+
const element = ref.current;
|
|
116
|
+
if (width === void 0 || !element) return void 0;
|
|
117
|
+
return { width, gap: Number.parseFloat(getComputedStyle(element).columnGap) || 0 };
|
|
118
|
+
}, [ref, width]);
|
|
119
|
+
};
|
|
120
|
+
var useRefocusOnRelayout = (root, count) => {
|
|
121
|
+
const last = useRef(void 0);
|
|
122
|
+
useIsomorphicLayoutEffect(() => {
|
|
123
|
+
const previous = last.current;
|
|
124
|
+
if (!previous || previous.element.isConnected) return;
|
|
125
|
+
const active = document.activeElement;
|
|
126
|
+
if (active && active !== document.body) return;
|
|
127
|
+
const tile = root.current?.querySelector(`[data-index="${previous.index}"] button`);
|
|
128
|
+
if (tile instanceof HTMLElement) tile.focus({ preventScroll: true });
|
|
129
|
+
}, [count]);
|
|
130
|
+
return (target) => {
|
|
131
|
+
const index = target.closest('[data-part="item"]')?.getAttribute("data-index");
|
|
132
|
+
if (index != null) last.current = { index, element: target };
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
var Gallery = ({
|
|
136
|
+
data,
|
|
137
|
+
layout = "grid",
|
|
138
|
+
spacing = "md",
|
|
139
|
+
radius = "xs",
|
|
140
|
+
loader,
|
|
141
|
+
sizes,
|
|
142
|
+
min,
|
|
143
|
+
ratio = 1,
|
|
144
|
+
columns = 3,
|
|
145
|
+
rowHeight = 200,
|
|
146
|
+
tolerance = 0.25,
|
|
147
|
+
renderItem,
|
|
148
|
+
translations,
|
|
149
|
+
className,
|
|
150
|
+
classNames,
|
|
151
|
+
style,
|
|
152
|
+
testId,
|
|
153
|
+
ref,
|
|
154
|
+
onFocus,
|
|
155
|
+
asChild: _asChild,
|
|
156
|
+
...rest
|
|
157
|
+
}) => {
|
|
158
|
+
const locale = useLocale();
|
|
159
|
+
const t = { ...DEFAULT_TRANSLATIONS, ...translations };
|
|
160
|
+
const format = new Intl.NumberFormat(locale);
|
|
161
|
+
const rootRef = useRef(null);
|
|
162
|
+
const size = useMeasure(rootRef, layout === "masonry" && measuresColumns(columns, min));
|
|
163
|
+
const count = columnCount({ columns, min, size });
|
|
164
|
+
const focused = useRefocusOnRelayout(rootRef, count);
|
|
165
|
+
const track = min ?? 160;
|
|
166
|
+
const sizing = { min: track, columns: count, rowHeight, tolerance };
|
|
167
|
+
const renderAt = (index) => {
|
|
168
|
+
const item = data[index];
|
|
169
|
+
if (!item) return null;
|
|
170
|
+
const image = /* @__PURE__ */ jsx(
|
|
171
|
+
Image,
|
|
172
|
+
{
|
|
173
|
+
src: item.src,
|
|
174
|
+
alt: item.alt,
|
|
175
|
+
width: item.width,
|
|
176
|
+
height: item.height,
|
|
177
|
+
placeholder: item.placeholder,
|
|
178
|
+
quality: item.quality,
|
|
179
|
+
fallback: item.fallback,
|
|
180
|
+
fit: item.fit,
|
|
181
|
+
position: item.position,
|
|
182
|
+
loader,
|
|
183
|
+
sizes: sizes ?? defaultSizes(layout, item, sizing),
|
|
184
|
+
radius,
|
|
185
|
+
className: cn("block size-full", classNames?.image)
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
return (
|
|
189
|
+
// biome-ignore lint/a11y/useSemanticElements: masonry puts layout columns between the list and its items, where an <li> isn't valid; one structure serves all three layouts
|
|
190
|
+
/* @__PURE__ */ jsx(
|
|
191
|
+
"div",
|
|
192
|
+
{
|
|
193
|
+
role: "listitem",
|
|
194
|
+
"data-part": "item",
|
|
195
|
+
"data-index": index,
|
|
196
|
+
...props({ "data-testid": item.testId }),
|
|
197
|
+
className: cn(
|
|
198
|
+
"relative min-w-0",
|
|
199
|
+
MEDIA_RADIUS[radius],
|
|
200
|
+
focusStyles({ source: "has-focus-visible" }),
|
|
201
|
+
layout === "masonry" && "w-full",
|
|
202
|
+
classNames?.item
|
|
203
|
+
),
|
|
204
|
+
style: itemStyle(layout, item, { ratio, tolerance }),
|
|
205
|
+
children: /* @__PURE__ */ jsx(
|
|
206
|
+
Tile,
|
|
207
|
+
{
|
|
208
|
+
item,
|
|
209
|
+
index,
|
|
210
|
+
media: renderItem ? renderItem(item, index, image) : image,
|
|
211
|
+
radius,
|
|
212
|
+
label: t.openLabel(format.format(index + 1), format.format(data.length)),
|
|
213
|
+
classNames
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
},
|
|
217
|
+
item.key ?? index
|
|
218
|
+
)
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
const mergedRef = useMergedRefs(rootRef, ref);
|
|
222
|
+
const gap = SPACING[spacing];
|
|
223
|
+
const indices = data.map((_, index) => index);
|
|
224
|
+
return /* @__PURE__ */ jsx(
|
|
225
|
+
ark.div,
|
|
226
|
+
{
|
|
227
|
+
ref: mergedRef,
|
|
228
|
+
role: "list",
|
|
229
|
+
"data-part": "root",
|
|
230
|
+
"data-layout": layout,
|
|
231
|
+
...props({ "data-testid": testId }),
|
|
232
|
+
...rest,
|
|
233
|
+
onFocus: (event) => {
|
|
234
|
+
focused(event.target);
|
|
235
|
+
onFocus?.(event);
|
|
236
|
+
},
|
|
237
|
+
className: cn(
|
|
238
|
+
// Takes its width from its parent, never from its photos: the row
|
|
239
|
+
// height and the measured column count both read that width.
|
|
240
|
+
"@container",
|
|
241
|
+
gap,
|
|
242
|
+
match(layout).with("grid", () => "grid").with("masonry", () => "flex items-start").with("justified", () => "flex flex-wrap items-start").exhaustive(),
|
|
243
|
+
classNames?.root,
|
|
244
|
+
className
|
|
245
|
+
),
|
|
246
|
+
style: {
|
|
247
|
+
...match(layout).with("grid", () => gridStyle(track)).with("justified", () => justifiedRootStyle(rowHeight)).with("masonry", () => ({})).exhaustive(),
|
|
248
|
+
...style
|
|
249
|
+
},
|
|
250
|
+
children: match(layout).with(
|
|
251
|
+
"masonry",
|
|
252
|
+
() => masonryColumns(data, count).map((column, i) => (
|
|
253
|
+
// A layout box only: the items inside stay the list's items.
|
|
254
|
+
/* @__PURE__ */ jsx(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
role: "none",
|
|
258
|
+
"data-part": "column",
|
|
259
|
+
className: cn("flex min-w-0 flex-1 basis-0 flex-col", gap),
|
|
260
|
+
children: column.map(renderAt)
|
|
261
|
+
},
|
|
262
|
+
i
|
|
263
|
+
)
|
|
264
|
+
))
|
|
265
|
+
).with("grid", "justified", () => indices.map(renderAt)).exhaustive()
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export { Gallery, columnCount, masonryColumns };
|
|
271
|
+
//# sourceMappingURL=index.js.map
|
|
272
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/gallery/layout.ts","../../../src/components/gallery/gallery.tsx"],"names":["match"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,IAAM,QAAA,GAAW,CAAC,EAAE,KAAA,EAAO,MAAA,EAAO,KACvC,KAAA,GAAQ,CAAA,IAAK,MAAA,GAAS,CAAA,GAAI,KAAA,GAAQ,MAAA,GAAS,CAAA;AAStC,IAAM,cAAA,GAAiB,CAAC,IAAA,EAA6B,OAAA,KAAgC;AAC1F,EAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,QAAA,CAAS,OAAO,CAAA,GAAI,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,IAAA,CAAK,KAAA,CAAM,OAAO,CAAC,CAAA,GAAI,CAAA;AAC5E,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,IAAA,CAAK,EAAE,QAAQ,KAAA,EAAM,EAAG,OAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,OAAA,EAAS,IAAe,CAAE,CAAA;AAC1F,EAAA,OAAO,IAAA,CACJ,MAAA,CAAO,CAAC,IAAA,EAAM,MAAM,KAAA,KAAU;AAC7B,IAAA,MAAM,WAAW,IAAA,CAAK,MAAA;AAAA,MACpB,CAAC,IAAA,EAAM,GAAA,EAAK,CAAA,KAAO,GAAA,CAAI,MAAA,GAAS,IAAA,CAAK,MAAA,GAAS,EAAE,CAAA,EAAG,MAAA,EAAQ,GAAA,CAAI,QA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MAAM,kBAAA,CAAmB,SAAS,CAAC,CAAA,CACrD,IAAA,CAAK,WAAW,OAAO,EAAC,CAAE,CAAA,CAC1B,UAAA,EAAW;AAAA,QACd,GAAG;AAAA,OACL;AAAA,MAEC,QAAA,EAAAA,KAAAA,CAAM,MAAM,CAAA,CACV,IAAA;AAAA,QAAK,SAAA;AAAA,QAAW,MACf,cAAA,CAAe,IAAA,EAAM,KAAK,CAAA,CAAE,GAAA,CAAI,CAAC,MAAA,EAAQ,CAAA;AAAA;AAAA,0BAEvC,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cAGC,IAAA,EAAK,MAAA;AAAA,cACL,WAAA,EAAU,QAAA;AAAA,cACV,SAAA,EAAW,EAAA,CAAG,sCAAA,EAAwC,GAAG,CAAA;AAAA,cAExD,QAAA,EAAA,MAAA,CAAO,IAAI,QAAQ;AAAA,aAAA;AAAA,YALf;AAAA;AAMP,SACD;AAAA,OACH,CACC,IAAA,CAAK,MAAA,EAAQ,WAAA,EAAa,MAAM,QAAQ,GAAA,CAAI,QAAQ,CAAC,CAAA,CACrD,UAAA;AAAW;AAAA,GAChB;AAEJ","file":"index.js","sourcesContent":["import type { CSSProperties } from \"react\"\nimport { match, P } from \"ts-pattern\"\nimport { type Ratio, ratioStyle } from \"../../lib/ratio\"\n\n/**\n * Gallery's three layouts, as pure functions of the data and the props. None\n * of them measures anything: every box is decided by CSS from the item's\n * intrinsic size, so the server HTML is already the final layout.\n */\n\nexport type GalleryLayout = \"grid\" | \"masonry\" | \"justified\"\n\n/** The part of an item the layouts read. */\nexport type GalleryBox = { width: number; height: number }\n\n/** Width over height. A degenerate box (zero, negative, `NaN`) reads as square. */\nexport const aspectOf = ({ width, height }: GalleryBox): number =>\n width > 0 && height > 0 ? width / height : 1\n\n/**\n * Splits items into `columns` columns, each item going to the column that is\n * shortest so far (ties go to the first). Heights are counted in column\n * widths (`height / width`), since every column is as wide as the others.\n * Returns data indices, so an item keeps its own index whichever column it\n * lands in.\n */\nexport const masonryColumns = (data: readonly GalleryBox[], columns: number): number[][] => {\n const count = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1\n const start = Array.from({ length: count }, () => ({ height: 0, indices: [] as number[] }))\n return data\n .reduce((cols, item, index) => {\n const shortest = cols.reduce(\n (best, col, i) => (col.height < best.height ? { i, height: col.height } : best),\n { i: 0, height: Number.POSITIVE_INFINITY },\n ).i\n return cols.map((col, i) =>\n i === shortest\n ? { height: col.height + 1 / aspectOf(item), indices: [...col.indices, index] }\n : col,\n )\n }, start)\n .map((col) => col.indices)\n}\n\n/** Grid: as many `min`-wide tracks as fit, never wider than the gallery itself. */\nexport const gridStyle = (min: number): CSSProperties => ({\n gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${min}px), 1fr))`,\n})\n\n/**\n * Justified: the row height scales with the gallery's own width, so a phone\n * gets shorter rows that fit more photos across. A quarter of the width fits\n * three 4:3 photos a row (3 × 4/3 = 4 row heights), which leaves the row's\n * last gap small; `rowHeight` caps it on wide galleries, and a 96px floor\n * keeps thumbnails tappable in a very narrow one. The root is an inline-size\n * container, so `cqi` is the gallery's width and never depends on the rows.\n */\nexport const ROW_FLOOR = 96\nexport const ROW_SLOPE = \"25cqi\"\n\n/** CSS custom properties alongside regular declarations, typed without a cast. */\nexport type StyleWithVars = CSSProperties & Record<`--${string}`, string>\n\nexport const justifiedRootStyle = (rowHeight: number): StyleWithVars => ({\n \"--row\": `clamp(${Math.min(ROW_FLOOR, rowHeight)}px, ${ROW_SLOPE}, ${rowHeight}px)`,\n})\n\n/**\n * Each item asks for its width at the row height and grows in proportion to\n * its ratio, so every item on a row grows to the same height and the row\n * fills its width. The cap stops a short row (the last one, or one whose next\n * photo doesn't fit) from blowing up: all items on a row reach it together,\n * so heights stay even and the row just ends early.\n */\nexport const justifiedItemStyle = (item: GalleryBox, tolerance: number): CSSProperties => {\n const ratio = aspectOf(item)\n return {\n flex: `${ratio} 1 calc(var(--row) * ${ratio})`,\n maxWidth: `calc(var(--row) * ${ratio * (1 + tolerance)})`,\n aspectRatio: String(ratio),\n }\n}\n\nexport type ItemStyleOptions = { ratio: Ratio; tolerance: number }\n\n/** One item's box, per layout. */\nexport const itemStyle = (\n layout: GalleryLayout,\n item: GalleryBox,\n { ratio, tolerance }: ItemStyleOptions,\n): CSSProperties =>\n match(layout)\n .with(\"grid\", () => ratioStyle(ratio))\n .with(\"masonry\", () => ({ aspectRatio: String(aspectOf(item)) }))\n .with(\"justified\", () => justifiedItemStyle(item, tolerance))\n .exhaustive()\n\nexport type SizesOptions = { min: number; columns: number; rowHeight: number; tolerance: number }\n\n/**\n * The kit's breakpoints (`theme.css`: Tailwind's, plus `xs`), in px. Masonry\n * matches them against the gallery's own width, not the viewport's.\n */\nexport const BREAKPOINT_NAMES = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"2xl\"] as const\n\nexport type Breakpoint = (typeof BREAKPOINT_NAMES)[number]\n\nexport const BREAKPOINTS: Record<Breakpoint, number> = {\n xs: 480,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n \"2xl\": 1536,\n}\n\n/** A column count, or one per breakpoint from `base` up (mobile first). */\nexport type MasonryColumns = number | ({ base?: number } & Partial<Record<Breakpoint, number>>)\n\n/** Whether the count depends on the gallery's width, and so needs measuring. */\nexport const measuresColumns = (columns: MasonryColumns, min: number | undefined): boolean =>\n min !== undefined || typeof columns === \"object\"\n\nexport type ColumnCountOptions = {\n columns: MasonryColumns\n /** The narrowest a column gets, in px; wins over `columns` once measured. */\n min?: number\n /** The gallery's inner width and its gap, in px; unset before the first measurement. */\n size?: { width: number; gap: number }\n}\n\n/**\n * How many masonry columns to render. Before the gallery is measured (on the\n * server, and until the first observation), that's `columns`, or its `base`.\n * Once measured, `min` fits as many columns as it can, the way a grid track\n * auto-fills; a breakpoint map takes the largest breakpoint the width reaches.\n */\nexport const columnCount = ({ columns, min, size }: ColumnCountOptions): number => {\n const base = typeof columns === \"number\" ? columns : (columns.base ?? 1)\n const count = match(size)\n .with(P.nullish, () => base)\n .otherwise(({ width, gap }) => {\n if (min !== undefined) return Math.floor((width + gap) / (Math.max(1, min) + gap))\n if (typeof columns === \"number\") return columns\n return BREAKPOINT_NAMES.filter((name) => BREAKPOINTS[name] <= width).reduce(\n (current, name) => columns[name] ?? current,\n base,\n )\n })\n return Number.isFinite(count) ? Math.max(1, Math.floor(count)) : 1\n}\n\n/**\n * A default `sizes` for one item: an upper bound on the width it renders at.\n * A grid track is under twice `min` wide (one more would fit otherwise), a\n * masonry column is a fraction of the viewport at most, and a justified item\n * never grows past its cap at the full `rowHeight`.\n */\nexport const defaultSizes = (\n layout: GalleryLayout,\n item: GalleryBox,\n { min, columns, rowHeight, tolerance }: SizesOptions,\n): string =>\n match(layout)\n .with(\"grid\", () => `${2 * min}px`)\n .with(\"masonry\", () => `${Math.ceil(100 / Math.max(1, Math.floor(columns)))}vw`)\n .with(\"justified\", () => `${Math.ceil(rowHeight * aspectOf(item) * (1 + tolerance))}px`)\n .exhaustive()\n","\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { type ReactElement, type ReactNode, type Ref, useMemo, useRef } 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 { useLocale } from \"../../lib/intl\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { useOpenIndexTrigger } from \"../../lib/open-index\"\nimport { props } from \"../../lib/props\"\nimport { MEDIA_RADIUS, type MediaRadius } from \"../../lib/radius\"\nimport type { Ratio } from \"../../lib/ratio\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useElementSize } from \"../../lib/use-element-size\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { Figure } from \"../figure\"\nimport { Image, type ImageLoader, type ImageProps } from \"../image\"\nimport {\n columnCount,\n defaultSizes,\n type GalleryLayout,\n gridStyle,\n itemStyle,\n justifiedRootStyle,\n type MasonryColumns,\n masonryColumns,\n measuresColumns,\n type SizesOptions,\n} from \"./layout\"\n\n/**\n * Gallery — a set of photos in a grid, masonry columns or justified rows.\n *\n * <Gallery data={photos} layout=\"justified\" rowHeight={220} loader={cdn} />\n *\n * The layouts are plain CSS decided from each item's `width` and `height`\n * and the gallery's own width (the root is an inline-size container), so\n * the server HTML is already the final layout:\n *\n * - `grid`: as many `min`-wide tracks as fit, each cell cropped to `ratio`.\n * - `masonry`: columns of uncropped photos, filled shortest-first by\n * `masonryColumns`. The DOM follows the columns, so the reading and tab\n * order runs down each column in turn; `data-index` keeps the data index.\n * A fixed `columns` count is SSR-exact. A breakpoint map or a `min` width\n * needs the gallery's width, which only the client has: the server renders\n * the base count, and an observer (mounted only then) switches it.\n * - `justified`: flex-wrapped rows whose height scales with the gallery's\n * width up to `rowHeight`, each photo uncropped. See `justifiedItemStyle`.\n *\n * Under an `OpenIndexProvider` (a lightbox, or your own), each tile is a\n * button that opens its index and registers itself, so the viewer can return\n * focus to the tile of whichever photo it ends on. With no provider the\n * gallery is inert. Gallery never imports a lightbox.\n *\n * The focus ring lives on the item rather than the button: an overlay\n * caption's `Figure` clips to the photo's corners, and would cut off a ring\n * drawn on anything inside it.\n */\n\nconst SPACING = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-3\",\n xl: \"gap-4\",\n} as const\n\nexport type GallerySpacing = Size | \"none\"\n\nexport type GalleryItem = Pick<\n ImageProps,\n \"src\" | \"alt\" | \"placeholder\" | \"quality\" | \"fallback\" | \"fit\" | \"position\"\n> &\n WithTestId & {\n /** Intrinsic width in px; with `height`, the item's aspect ratio. */\n width: number\n /** Intrinsic height in px. */\n height: number\n /** Shown over the photo's bottom edge, on Figure's overlay scrim. */\n caption?: ReactNode\n /** A stable React key. Defaults to the index. */\n key?: string\n }\n\nexport type GalleryTranslations = {\n /**\n * The open button's name when the photo's `alt` is empty. Receives the\n * 1-based position and the count, already formatted for the locale.\n */\n openLabel?: (position: string, count: string) => string\n}\n\nexport const DEFAULT_TRANSLATIONS: Required<GalleryTranslations> = {\n openLabel: (position, count) => `Open image ${position} of ${count}`,\n}\n\ntype GalleryClassNames = {\n root?: string\n item?: string\n image?: string\n caption?: string\n}\n\nexport type GalleryProps = NoAsChild<HTMLArkProps<\"div\">> &\n WithTestId & {\n /** The photos, in order. `width` and `height` are required: they lay the gallery out. */\n data: readonly GalleryItem[]\n layout?: GalleryLayout\n /** The gap between photos. */\n spacing?: GallerySpacing\n /** Corner radius of every photo. `\"none\"` squares them. */\n radius?: MediaRadius\n /** Forwarded to every photo's `Image`, for a srcset from your CDN. */\n loader?: ImageLoader\n /** Overrides the per-layout default `sizes` for every photo. */\n sizes?: string\n /**\n * The narrowest a column gets, in px. Grid: auto-fills tracks (default\n * 160). Masonry: fits as many columns as the measured width allows, and\n * wins over `columns`, which then only sets the count before measuring.\n */\n min?: number\n /** Grid: the cell's aspect ratio. Photos are cropped to it. */\n ratio?: Ratio\n /**\n * Masonry: the number of columns, or one per breakpoint of the gallery's\n * own width (`{ base: 2, md: 3, lg: 4 }`). A map is measured on the client;\n * the server renders `base`.\n */\n columns?: MasonryColumns\n /** Justified: the row height on a wide gallery, in px. Narrower galleries get shorter rows. */\n rowHeight?: number\n /** Justified: how far past `rowHeight` a short row may grow, as a fraction. */\n tolerance?: number\n /**\n * Replaces a tile's media. `image` is the `Image` the gallery would have\n * rendered. The caption and the open button stay the gallery's, so under\n * a provider return phrasing content only (an `Image`, spans).\n */\n renderItem?: (item: GalleryItem, index: number, image: ReactElement) => ReactNode\n translations?: GalleryTranslations\n classNames?: GalleryClassNames\n ref?: Ref<HTMLDivElement>\n }\n\ntype TileProps = {\n item: GalleryItem\n index: number\n media: ReactNode\n radius: MediaRadius\n label: string\n classNames?: GalleryClassNames\n}\n\n/** One tile's content: the media, inside its open button and its caption when there are any. */\nconst Tile = ({ item, index, media, radius, label, classNames }: TileProps) => {\n const trigger = useOpenIndexTrigger(index)\n const tile = trigger ? (\n <button\n {...trigger}\n // An empty alt leaves the button nameless; the label stands in.\n aria-label={item.alt ? undefined : label}\n className=\"block size-full cursor-zoom-in focus-visible:outline-none\"\n >\n {media}\n </button>\n ) : (\n media\n )\n if (item.caption === undefined) return tile\n return (\n <Figure\n placement=\"overlay\"\n radius={radius}\n caption={item.caption}\n className=\"size-full\"\n // Clicks on the caption go to the button under it.\n classNames={{ caption: cn(trigger && \"pointer-events-none\", classNames?.caption) }}\n >\n {tile}\n </Figure>\n )\n}\n\n/**\n * The root's inner width and gap, observed only while `enabled`: a fixed\n * column count never mounts an observer. `undefined` on the server and until\n * the first observation, which `ResizeObserver` delivers on `observe()`. The\n * gap is read once per new width, the way it was read once per observation.\n */\nconst useMeasure = (ref: { current: HTMLElement | null }, enabled: boolean) => {\n const width = useElementSize(ref, { enabled })?.width\n return useMemo(() => {\n const element = ref.current\n if (width === undefined || !element) return undefined\n return { width, gap: Number.parseFloat(getComputedStyle(element).columnGap) || 0 }\n }, [ref, width])\n}\n\n/**\n * Keeps keyboard focus through a masonry re-layout. Switching the column\n * count moves every tile to a new column, and React can't move an element\n * between parents, so the focused button is replaced and focus would drop to\n * the page. This remembers the focused tile's data index, and after a count\n * change puts focus back on that index's new button, before paint. It only\n * acts when the remembered element is gone and nothing else took focus.\n */\nconst useRefocusOnRelayout = (root: { current: HTMLElement | null }, count: number) => {\n const last = useRef<{ index: string; element: Element }>(undefined)\n useIsomorphicLayoutEffect(() => {\n const previous = last.current\n if (!previous || previous.element.isConnected) return\n const active = document.activeElement\n if (active && active !== document.body) return\n const tile = root.current?.querySelector(`[data-index=\"${previous.index}\"] button`)\n if (tile instanceof HTMLElement) tile.focus({ preventScroll: true })\n }, [count])\n return (target: Element) => {\n const index = target.closest('[data-part=\"item\"]')?.getAttribute(\"data-index\")\n if (index != null) last.current = { index, element: target }\n }\n}\n\nexport const Gallery = ({\n data,\n layout = \"grid\",\n spacing = \"md\",\n radius = \"xs\",\n loader,\n sizes,\n min,\n ratio = 1,\n columns = 3,\n rowHeight = 200,\n tolerance = 0.25,\n renderItem,\n translations,\n className,\n classNames,\n style,\n testId,\n ref,\n onFocus,\n asChild: _asChild,\n ...rest\n}: GalleryProps) => {\n const locale = useLocale()\n const t = { ...DEFAULT_TRANSLATIONS, ...translations }\n const format = new Intl.NumberFormat(locale)\n const rootRef = useRef<HTMLDivElement>(null)\n const size = useMeasure(rootRef, layout === \"masonry\" && measuresColumns(columns, min))\n const count = columnCount({ columns, min, size })\n const focused = useRefocusOnRelayout(rootRef, count)\n const track = min ?? 160\n const sizing: SizesOptions = { min: track, columns: count, rowHeight, tolerance }\n\n const renderAt = (index: number) => {\n const item = data[index]\n if (!item) return null\n const image = (\n <Image\n src={item.src}\n alt={item.alt}\n width={item.width}\n height={item.height}\n placeholder={item.placeholder}\n quality={item.quality}\n fallback={item.fallback}\n fit={item.fit}\n position={item.position}\n loader={loader}\n sizes={sizes ?? defaultSizes(layout, item, sizing)}\n radius={radius}\n className={cn(\"block size-full\", classNames?.image)}\n />\n )\n return (\n // biome-ignore lint/a11y/useSemanticElements: masonry puts layout columns between the list and its items, where an <li> isn't valid; one structure serves all three layouts\n <div\n key={item.key ?? index}\n role=\"listitem\"\n data-part=\"item\"\n data-index={index}\n {...props({ \"data-testid\": item.testId })}\n className={cn(\n \"relative min-w-0\",\n MEDIA_RADIUS[radius],\n focusStyles({ source: \"has-focus-visible\" }),\n layout === \"masonry\" && \"w-full\",\n classNames?.item,\n )}\n style={itemStyle(layout, item, { ratio, tolerance })}\n >\n <Tile\n item={item}\n index={index}\n media={renderItem ? renderItem(item, index, image) : image}\n radius={radius}\n label={t.openLabel(format.format(index + 1), format.format(data.length))}\n classNames={classNames}\n />\n </div>\n )\n }\n\n const mergedRef = useMergedRefs(rootRef, ref)\n const gap = SPACING[spacing]\n const indices = data.map((_, index) => index)\n\n return (\n <ark.div\n ref={mergedRef}\n role=\"list\"\n data-part=\"root\"\n data-layout={layout}\n {...props({ \"data-testid\": testId })}\n {...rest}\n onFocus={(event) => {\n focused(event.target)\n onFocus?.(event)\n }}\n className={cn(\n // Takes its width from its parent, never from its photos: the row\n // height and the measured column count both read that width.\n \"@container\",\n gap,\n match(layout)\n .with(\"grid\", () => \"grid\")\n .with(\"masonry\", () => \"flex items-start\")\n .with(\"justified\", () => \"flex flex-wrap items-start\")\n .exhaustive(),\n classNames?.root,\n className,\n )}\n style={{\n ...match(layout)\n .with(\"grid\", () => gridStyle(track))\n .with(\"justified\", () => justifiedRootStyle(rowHeight))\n .with(\"masonry\", () => ({}))\n .exhaustive(),\n ...style,\n }}\n >\n {match(layout)\n .with(\"masonry\", () =>\n masonryColumns(data, count).map((column, i) => (\n // A layout box only: the items inside stay the list's items.\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: columns are positional by nature\n key={i}\n role=\"none\"\n data-part=\"column\"\n className={cn(\"flex min-w-0 flex-1 basis-0 flex-col\", gap)}\n >\n {column.map(renderAt)}\n </div>\n )),\n )\n .with(\"grid\", \"justified\", () => indices.map(renderAt))\n .exhaustive()}\n </ark.div>\n )\n}\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { type Ratio } from "../../lib/ratio";
|
|
3
|
+
/**
|
|
4
|
+
* Gallery's three layouts, as pure functions of the data and the props. None
|
|
5
|
+
* of them measures anything: every box is decided by CSS from the item's
|
|
6
|
+
* intrinsic size, so the server HTML is already the final layout.
|
|
7
|
+
*/
|
|
8
|
+
export type GalleryLayout = "grid" | "masonry" | "justified";
|
|
9
|
+
/** The part of an item the layouts read. */
|
|
10
|
+
export type GalleryBox = {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
/** Width over height. A degenerate box (zero, negative, `NaN`) reads as square. */
|
|
15
|
+
export declare const aspectOf: ({ width, height }: GalleryBox) => number;
|
|
16
|
+
/**
|
|
17
|
+
* Splits items into `columns` columns, each item going to the column that is
|
|
18
|
+
* shortest so far (ties go to the first). Heights are counted in column
|
|
19
|
+
* widths (`height / width`), since every column is as wide as the others.
|
|
20
|
+
* Returns data indices, so an item keeps its own index whichever column it
|
|
21
|
+
* lands in.
|
|
22
|
+
*/
|
|
23
|
+
export declare const masonryColumns: (data: readonly GalleryBox[], columns: number) => number[][];
|
|
24
|
+
/** Grid: as many `min`-wide tracks as fit, never wider than the gallery itself. */
|
|
25
|
+
export declare const gridStyle: (min: number) => CSSProperties;
|
|
26
|
+
/**
|
|
27
|
+
* Justified: the row height scales with the gallery's own width, so a phone
|
|
28
|
+
* gets shorter rows that fit more photos across. A quarter of the width fits
|
|
29
|
+
* three 4:3 photos a row (3 × 4/3 = 4 row heights), which leaves the row's
|
|
30
|
+
* last gap small; `rowHeight` caps it on wide galleries, and a 96px floor
|
|
31
|
+
* keeps thumbnails tappable in a very narrow one. The root is an inline-size
|
|
32
|
+
* container, so `cqi` is the gallery's width and never depends on the rows.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ROW_FLOOR = 96;
|
|
35
|
+
export declare const ROW_SLOPE = "25cqi";
|
|
36
|
+
/** CSS custom properties alongside regular declarations, typed without a cast. */
|
|
37
|
+
export type StyleWithVars = CSSProperties & Record<`--${string}`, string>;
|
|
38
|
+
export declare const justifiedRootStyle: (rowHeight: number) => StyleWithVars;
|
|
39
|
+
/**
|
|
40
|
+
* Each item asks for its width at the row height and grows in proportion to
|
|
41
|
+
* its ratio, so every item on a row grows to the same height and the row
|
|
42
|
+
* fills its width. The cap stops a short row (the last one, or one whose next
|
|
43
|
+
* photo doesn't fit) from blowing up: all items on a row reach it together,
|
|
44
|
+
* so heights stay even and the row just ends early.
|
|
45
|
+
*/
|
|
46
|
+
export declare const justifiedItemStyle: (item: GalleryBox, tolerance: number) => CSSProperties;
|
|
47
|
+
export type ItemStyleOptions = {
|
|
48
|
+
ratio: Ratio;
|
|
49
|
+
tolerance: number;
|
|
50
|
+
};
|
|
51
|
+
/** One item's box, per layout. */
|
|
52
|
+
export declare const itemStyle: (layout: GalleryLayout, item: GalleryBox, { ratio, tolerance }: ItemStyleOptions) => CSSProperties;
|
|
53
|
+
export type SizesOptions = {
|
|
54
|
+
min: number;
|
|
55
|
+
columns: number;
|
|
56
|
+
rowHeight: number;
|
|
57
|
+
tolerance: number;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The kit's breakpoints (`theme.css`: Tailwind's, plus `xs`), in px. Masonry
|
|
61
|
+
* matches them against the gallery's own width, not the viewport's.
|
|
62
|
+
*/
|
|
63
|
+
export declare const BREAKPOINT_NAMES: readonly ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
64
|
+
export type Breakpoint = (typeof BREAKPOINT_NAMES)[number];
|
|
65
|
+
export declare const BREAKPOINTS: Record<Breakpoint, number>;
|
|
66
|
+
/** A column count, or one per breakpoint from `base` up (mobile first). */
|
|
67
|
+
export type MasonryColumns = number | ({
|
|
68
|
+
base?: number;
|
|
69
|
+
} & Partial<Record<Breakpoint, number>>);
|
|
70
|
+
/** Whether the count depends on the gallery's width, and so needs measuring. */
|
|
71
|
+
export declare const measuresColumns: (columns: MasonryColumns, min: number | undefined) => boolean;
|
|
72
|
+
export type ColumnCountOptions = {
|
|
73
|
+
columns: MasonryColumns;
|
|
74
|
+
/** The narrowest a column gets, in px; wins over `columns` once measured. */
|
|
75
|
+
min?: number;
|
|
76
|
+
/** The gallery's inner width and its gap, in px; unset before the first measurement. */
|
|
77
|
+
size?: {
|
|
78
|
+
width: number;
|
|
79
|
+
gap: number;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* How many masonry columns to render. Before the gallery is measured (on the
|
|
84
|
+
* server, and until the first observation), that's `columns`, or its `base`.
|
|
85
|
+
* Once measured, `min` fits as many columns as it can, the way a grid track
|
|
86
|
+
* auto-fills; a breakpoint map takes the largest breakpoint the width reaches.
|
|
87
|
+
*/
|
|
88
|
+
export declare const columnCount: ({ columns, min, size }: ColumnCountOptions) => number;
|
|
89
|
+
/**
|
|
90
|
+
* A default `sizes` for one item: an upper bound on the width it renders at.
|
|
91
|
+
* A grid track is under twice `min` wide (one more would fit otherwise), a
|
|
92
|
+
* masonry column is a fraction of the viewport at most, and a justified item
|
|
93
|
+
* never grows past its cap at the full `rowHeight`.
|
|
94
|
+
*/
|
|
95
|
+
export declare const defaultSizes: (layout: GalleryLayout, item: GalleryBox, { min, columns, rowHeight, tolerance }: SizesOptions) => string;
|
|
96
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/components/gallery/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,iBAAiB,CAAA;AAExD;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAA;AAE5D,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1D,mFAAmF;AACnF,eAAO,MAAM,QAAQ,sBAAuB,UAAU,KAAG,MACX,CAAA;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,SAAU,SAAS,UAAU,EAAE,WAAW,MAAM,KAAG,MAAM,EAAE,EAgBrF,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,aAEtC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,KAAK,CAAA;AAC3B,eAAO,MAAM,SAAS,UAAU,CAAA;AAEhC,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,MAAM,CAAC,KAAK,MA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,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACtC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,2BAA4B,kBAAkB,KAAG,MAaxE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WACf,aAAa,QACf,UAAU,0CACwB,YAAY,KACnD,MAKc,CAAA"}
|
|
@@ -15,7 +15,13 @@ declare const gridVariants: (props?: ({
|
|
|
15
15
|
cols?: 1 | 2 | 3 | 4 | 6 | 12 | null | undefined;
|
|
16
16
|
gap?: "lg" | "md" | "none" | "sm" | "xl" | "xs" | "xxl" | "xxs" | null | undefined;
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
-
|
|
18
|
+
type GridVariants = VariantProps<typeof gridVariants>;
|
|
19
|
+
export type GridProps = HTMLArkProps<"div"> & WithTestId & {
|
|
20
|
+
/** Number of equal columns: 1, 2, 3, 4, 6 or 12. Default `12`. */
|
|
21
|
+
cols?: GridVariants["cols"];
|
|
22
|
+
/** Space between cells, off the shared `xxs`–`xxl` gap scale (or `"none"`). Default `"xl"`. */
|
|
23
|
+
gap?: GridVariants["gap"];
|
|
24
|
+
};
|
|
19
25
|
export declare const Grid: ({ className, cols, gap, testId, ...rest }: GridProps) => import("react").JSX.Element;
|
|
20
26
|
export {};
|
|
21
27
|
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;GASG;AACH,QAAA,MAAM,YAAY;;;8EAgBhB,CAAA;AAEF,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,GACzC,UAAU,GAAG;IACX,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAC3B,+FAA+F;IAC/F,GAAG,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;CAC1B,CAAA;AAEH,eAAO,MAAM,IAAI,8CAA+C,SAAS,gCAMxE,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GAP_CLASSES } from '../../chunk-XFEPUGUZ.js';
|
|
1
2
|
import { props } from '../../chunk-WYCMIIRR.js';
|
|
2
3
|
import { cn } from '../../chunk-QP4I37PA.js';
|
|
3
4
|
import { ark } from '@ark-ui/react';
|
|
@@ -14,16 +15,7 @@ var gridVariants = cva("grid", {
|
|
|
14
15
|
6: "grid-cols-6",
|
|
15
16
|
12: "grid-cols-12"
|
|
16
17
|
},
|
|
17
|
-
gap:
|
|
18
|
-
none: "gap-0",
|
|
19
|
-
xxs: "gap-0.5",
|
|
20
|
-
xs: "gap-1",
|
|
21
|
-
sm: "gap-1.5",
|
|
22
|
-
md: "gap-2",
|
|
23
|
-
lg: "gap-3",
|
|
24
|
-
xl: "gap-4",
|
|
25
|
-
xxl: "gap-6"
|
|
26
|
-
}
|
|
18
|
+
gap: GAP_CLASSES
|
|
27
19
|
},
|
|
28
20
|
defaultVariants: {
|
|
29
21
|
cols: 12,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/grid/grid.tsx"],"names":[],"mappings":";;;;;;;AAiBA,IAAM,YAAA,GAAe,IAAI,MAAA,EAAQ;AAAA,EAC/B,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,CAAA,EAAG,aAAA;AAAA,MACH,CAAA,EAAG,aAAA;AAAA,MACH,CAAA,EAAG,aAAA;AAAA,MACH,CAAA,EAAG,aAAA;AAAA,MACH,CAAA,EAAG,aAAA;AAAA,MACH,EAAA,EAAI;AAAA,KACN;AAAA,IACA,GAAA,EAAK;AAAA,GACP;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,EAAA;AAAA,IACN,GAAA,EAAK;AAAA;AAET,CAAC,CAAA;AAYM,IAAM,IAAA,GAAO,CAAC,EAAE,SAAA,EAAW,MAAM,GAAA,EAAK,MAAA,EAAQ,GAAG,IAAA,EAAK,qBAC3D,GAAA;AAAA,EAAC,GAAA,CAAI,GAAA;AAAA,EAAJ;AAAA,IACE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,GAAG,YAAA,CAAa,EAAE,MAAM,GAAA,EAAK,GAAG,SAAS;AAAA;AACtD","file":"index.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport { GAP_CLASSES } from \"../../lib/gap\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Grid — CSS-grid layout primitive.\n *\n * Pure React Server Component (no `\"use client\"`): renders to `<div>` by\n * default but defers to its single child when `asChild` is set (Ark UI's\n * native polymorphism).\n *\n * Variants are exposed as static class lookups so Tailwind v4's compiler\n * picks them up at scan time — no dynamic class concatenation.\n */\nconst gridVariants = cva(\"grid\", {\n variants: {\n cols: {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-2\",\n 3: \"grid-cols-3\",\n 4: \"grid-cols-4\",\n 6: \"grid-cols-6\",\n 12: \"grid-cols-12\",\n },\n gap: GAP_CLASSES,\n },\n defaultVariants: {\n cols: 12,\n gap: \"xl\",\n },\n})\n\ntype GridVariants = VariantProps<typeof gridVariants>\n\nexport type GridProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** Number of equal columns: 1, 2, 3, 4, 6 or 12. Default `12`. */\n cols?: GridVariants[\"cols\"]\n /** Space between cells, off the shared `xxs`–`xxl` gap scale (or `\"none\"`). Default `\"xl\"`. */\n gap?: GridVariants[\"gap\"]\n }\n\nexport const Grid = ({ className, cols, gap, testId, ...rest }: GridProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(gridVariants({ cols, gap }), className)}\n />\n)\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { resolveLogicalPlacement } from '../../chunk-G52U24GR.js';
|
|
3
|
-
import { popoverChrome } from '../../chunk-
|
|
4
|
-
import '../../chunk-AIQG7IIT.js';
|
|
3
|
+
import { popoverChrome } from '../../chunk-ZN3WYGIQ.js';
|
|
5
4
|
import { useOverlayContainer } from '../../chunk-7P32XCEU.js';
|
|
5
|
+
import '../../chunk-H7WOMZXO.js';
|
|
6
|
+
import '../../chunk-PMUCGFY5.js';
|
|
6
7
|
import '../../chunk-BUIHQJGE.js';
|
|
7
|
-
import '../../chunk-BEL75C7N.js';
|
|
8
8
|
import { props } from '../../chunk-WYCMIIRR.js';
|
|
9
|
+
import '../../chunk-GIPQUKCN.js';
|
|
9
10
|
import { cn } from '../../chunk-QP4I37PA.js';
|
|
10
11
|
import { HoverCard as HoverCard$1 } from '@ark-ui/react/hover-card';
|
|
11
12
|
import { useLocaleContext } from '@ark-ui/react/locale';
|