@42-central/ui-react 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-X6DESK37.js → chunk-2RRTT4AF.js} +17 -5
- package/dist/chunk-2RRTT4AF.js.map +1 -0
- package/dist/{chunk-TUP7WXQE.js → chunk-322I2RSV.js} +9 -6
- package/dist/chunk-322I2RSV.js.map +1 -0
- package/dist/{chunk-ISX3AM32.js → chunk-37SRSNLJ.js} +4 -4
- package/dist/{chunk-ISX3AM32.js.map → chunk-37SRSNLJ.js.map} +1 -1
- package/dist/{chunk-L5GH7LLD.js → chunk-3MFWUG5O.js} +4 -4
- package/dist/{chunk-L5GH7LLD.js.map → chunk-3MFWUG5O.js.map} +1 -1
- package/dist/{chunk-FQJNQW3G.js → chunk-3XQEOJCE.js} +8 -5
- package/dist/chunk-3XQEOJCE.js.map +1 -0
- package/dist/{chunk-JKFPRQB2.js → chunk-4LSZ5JWF.js} +3 -3
- package/dist/{chunk-JKFPRQB2.js.map → chunk-4LSZ5JWF.js.map} +1 -1
- package/dist/{chunk-V2QZG4IT.js → chunk-5HWFYYHW.js} +27 -9
- package/dist/chunk-5HWFYYHW.js.map +1 -0
- package/dist/{chunk-GEZYGBXY.js → chunk-6MVFCS46.js} +99 -42
- package/dist/chunk-6MVFCS46.js.map +1 -0
- package/dist/{chunk-NNPSBC7O.js → chunk-6WZSUS3U.js} +10 -9
- package/dist/chunk-6WZSUS3U.js.map +1 -0
- package/dist/chunk-6YRGP6PS.js +138 -0
- package/dist/chunk-6YRGP6PS.js.map +1 -0
- package/dist/{chunk-B5YHYI7E.js → chunk-ALANKV5Y.js} +23 -6
- package/dist/chunk-ALANKV5Y.js.map +1 -0
- package/dist/{chunk-IA6DCC3N.js → chunk-AUQPNDE5.js} +23 -13
- package/dist/chunk-AUQPNDE5.js.map +1 -0
- package/dist/{chunk-AKXALCUN.js → chunk-D7SW2E24.js} +4 -4
- package/dist/chunk-D7SW2E24.js.map +1 -0
- package/dist/{chunk-OXR7BXZA.js → chunk-DQIYYDFD.js} +4 -3
- package/dist/chunk-DQIYYDFD.js.map +1 -0
- package/dist/{chunk-HMNXNKDA.js → chunk-FCBYUN6F.js} +4 -4
- package/dist/{chunk-HMNXNKDA.js.map → chunk-FCBYUN6F.js.map} +1 -1
- package/dist/{chunk-2W7H43WL.js → chunk-FED6SJWM.js} +23 -14
- package/dist/chunk-FED6SJWM.js.map +1 -0
- package/dist/{chunk-7E7JNWOC.js → chunk-FEPIHXVI.js} +6 -5
- package/dist/chunk-FEPIHXVI.js.map +1 -0
- package/dist/{chunk-Y57NW6G7.js → chunk-G3YOSG3U.js} +4 -4
- package/dist/{chunk-Y57NW6G7.js.map → chunk-G3YOSG3U.js.map} +1 -1
- package/dist/chunk-GZN5CXMR.js +100 -0
- package/dist/chunk-GZN5CXMR.js.map +1 -0
- package/dist/{chunk-HCHGERDB.js → chunk-HCSZPBWV.js} +17 -115
- package/dist/chunk-HCSZPBWV.js.map +1 -0
- package/dist/{chunk-I4B3N3UX.js → chunk-HTVICHT4.js} +12 -7
- package/dist/chunk-HTVICHT4.js.map +1 -0
- package/dist/chunk-I7TC2C3I.js +163 -0
- package/dist/chunk-I7TC2C3I.js.map +1 -0
- package/dist/{chunk-7FPSQBWB.js → chunk-IBXYLO2J.js} +14 -13
- package/dist/chunk-IBXYLO2J.js.map +1 -0
- package/dist/{chunk-7KFUFAVP.js → chunk-IRYG6B5A.js} +9 -8
- package/dist/chunk-IRYG6B5A.js.map +1 -0
- package/dist/{chunk-2RQLPN4U.js → chunk-JCNEW4WJ.js} +8 -8
- package/dist/{chunk-2RQLPN4U.js.map → chunk-JCNEW4WJ.js.map} +1 -1
- package/dist/{chunk-SP6LCCTZ.js → chunk-KZDMVOL6.js} +35 -8
- package/dist/chunk-KZDMVOL6.js.map +1 -0
- package/dist/chunk-LR5U6TZZ.js +169 -0
- package/dist/chunk-LR5U6TZZ.js.map +1 -0
- package/dist/{chunk-MQHD3EJE.js → chunk-LZHZJWVM.js} +6 -4
- package/dist/chunk-LZHZJWVM.js.map +1 -0
- package/dist/{chunk-5EOMSWNO.js → chunk-MAM2X3MW.js} +5 -5
- package/dist/{chunk-5EOMSWNO.js.map → chunk-MAM2X3MW.js.map} +1 -1
- package/dist/{chunk-FSPS7TVD.js → chunk-MCMS4NMO.js} +5 -5
- package/dist/{chunk-FSPS7TVD.js.map → chunk-MCMS4NMO.js.map} +1 -1
- package/dist/{chunk-ZB5VMGKB.js → chunk-MV5DIE2T.js} +15 -4
- package/dist/chunk-MV5DIE2T.js.map +1 -0
- package/dist/chunk-NDI4HLQE.js +41 -0
- package/dist/chunk-NDI4HLQE.js.map +1 -0
- package/dist/{chunk-B4GNSSHU.js → chunk-NLJEQZQQ.js} +3 -3
- package/dist/{chunk-B4GNSSHU.js.map → chunk-NLJEQZQQ.js.map} +1 -1
- package/dist/{chunk-SBZJGFZ6.js → chunk-QHT4DCXE.js} +8 -7
- package/dist/chunk-QHT4DCXE.js.map +1 -0
- package/dist/{chunk-I4IJOLNA.js → chunk-RMUBCTEF.js} +5 -5
- package/dist/{chunk-I4IJOLNA.js.map → chunk-RMUBCTEF.js.map} +1 -1
- package/dist/{chunk-G3AD3NJG.js → chunk-RNTDM3RP.js} +9 -5
- package/dist/chunk-RNTDM3RP.js.map +1 -0
- package/dist/chunk-RPFN6ETQ.js +509 -0
- package/dist/chunk-RPFN6ETQ.js.map +1 -0
- package/dist/{chunk-HWBFRDX7.js → chunk-SI7C3W5M.js} +28 -9
- package/dist/chunk-SI7C3W5M.js.map +1 -0
- package/dist/chunk-TPOV3OCC.js +234 -0
- package/dist/chunk-TPOV3OCC.js.map +1 -0
- package/dist/{chunk-IANYMDKH.js → chunk-UBQ54W46.js} +4 -4
- package/dist/chunk-UBQ54W46.js.map +1 -0
- package/dist/{chunk-QVOBLRCM.js → chunk-UIKQ4X6W.js} +3 -3
- package/dist/{chunk-QVOBLRCM.js.map → chunk-UIKQ4X6W.js.map} +1 -1
- package/dist/chunk-UOWQH53N.js +70 -0
- package/dist/chunk-UOWQH53N.js.map +1 -0
- package/dist/{chunk-QRNQQIQM.js → chunk-WJUY6YWF.js} +52 -20
- package/dist/chunk-WJUY6YWF.js.map +1 -0
- package/dist/{chunk-3KARNPW4.js → chunk-WKIUMLRT.js} +3 -3
- package/dist/{chunk-3KARNPW4.js.map → chunk-WKIUMLRT.js.map} +1 -1
- package/dist/chunk-X6RB74JN.js +37 -0
- package/dist/chunk-X6RB74JN.js.map +1 -0
- package/dist/chunk-XQ6L2CM5.js +83 -0
- package/dist/chunk-XQ6L2CM5.js.map +1 -0
- package/dist/{chunk-RKCUXOU2.js → chunk-YUVKROMA.js} +44 -7
- package/dist/chunk-YUVKROMA.js.map +1 -0
- package/dist/components/action-icon/action-icon.d.ts +9 -2
- package/dist/components/action-icon/action-icon.d.ts.map +1 -1
- package/dist/components/action-icon/index.js +5 -1
- package/dist/components/alert/index.js +4 -4
- package/dist/components/anchor/anchor.d.ts +45 -0
- package/dist/components/anchor/anchor.d.ts.map +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.d.ts.map +1 -0
- package/dist/components/anchor/index.js +11 -0
- package/dist/components/anchor/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +10 -6
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/index.js +23 -24
- package/dist/components/app-shell/index.js.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +15 -9
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +5 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +12 -0
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/button.d.ts +15 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +5 -1
- package/dist/components/button-multi-select/index.js +6 -4
- package/dist/components/button-multi-select/index.js.map +1 -1
- package/dist/components/button-select/button-select-control.d.ts.map +1 -1
- package/dist/components/button-select/button-select.d.ts +2 -2
- package/dist/components/button-select/button-select.d.ts.map +1 -1
- package/dist/components/button-select/index.js +6 -4
- package/dist/components/button-select/index.js.map +1 -1
- package/dist/components/calendar/aliases.d.ts +16 -0
- package/dist/components/calendar/aliases.d.ts.map +1 -0
- package/dist/components/calendar/calendar-body.d.ts +11 -1
- package/dist/components/calendar/calendar-body.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +8 -4
- 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 +15 -5
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/calendar-heatmap/index.js +85 -73
- package/dist/components/calendar-heatmap/index.js.map +1 -1
- package/dist/components/camera/index.js +16 -14
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/choice-card-group/index.js +2 -2
- package/dist/components/choice-card-group/index.js.map +1 -1
- package/dist/components/circular-progress/circular-progress.d.ts +22 -11
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.d.ts +1 -1
- package/dist/components/circular-progress/index.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +68 -49
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/index.js +7 -3
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code/code.d.ts +10 -0
- package/dist/components/code/code.d.ts.map +1 -1
- package/dist/components/code/index.js +1 -0
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/code-block/chrome.js +10 -6
- package/dist/components/code-block/index.js +10 -7
- package/dist/components/code-block/index.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +5 -3
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +12 -7
- package/dist/components/combobox-list/combobox-list.d.ts +1 -1
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +14 -9
- package/dist/components/compare/index.js +1 -1
- package/dist/components/data-list/data-list.d.ts +96 -0
- package/dist/components/data-list/data-list.d.ts.map +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.d.ts.map +1 -0
- package/dist/components/data-list/index.js +147 -0
- package/dist/components/data-list/index.js.map +1 -0
- package/dist/components/data-table/data-table-group.d.ts.map +1 -1
- package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
- package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts +5 -2
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.js +163 -168
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/aliases.d.ts +16 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +22 -8
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +34 -28
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/download-button/index.js +6 -2
- package/dist/components/drawer/drawer.d.ts +7 -4
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.js +11 -6
- package/dist/components/empty-state/empty-state.d.ts +57 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +8 -0
- package/dist/components/empty-state/index.js.map +1 -0
- package/dist/components/field/field.d.ts +20 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +103 -0
- package/dist/components/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts.map +1 -0
- package/dist/components/fieldset/index.js +150 -0
- package/dist/components/fieldset/index.js.map +1 -0
- package/dist/components/file-item/index.js +10 -7
- package/dist/components/file-preview/file-preview.d.ts.map +1 -1
- package/dist/components/file-preview/index.js +10 -18
- package/dist/components/file-preview/index.js.map +1 -1
- package/dist/components/file-trigger/index.js +6 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +18 -14
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/gallery/index.js +3 -3
- package/dist/components/geodesic/a11y.d.ts +3 -3
- package/dist/components/geodesic/a11y.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/index.js +10 -3
- package/dist/components/hover-card/index.js.map +1 -1
- package/dist/components/image/index.js +3 -3
- package/dist/components/image-cropper/index.js +9 -6
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/kbd/index.js +3 -3
- package/dist/components/kbd/kbd.d.ts +4 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/lightbox/index.js +13 -11
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/menu/index.js +9 -5
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/modal/index.js +11 -6
- package/dist/components/modal/modal.d.ts +10 -4
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +13 -9
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +13 -10
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +4 -4
- package/dist/components/nav-link/tanstack.js +4 -4
- package/dist/components/notification/index.js +6 -6
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/number-input/index.js +11 -7
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/dialog-parts.d.ts +10 -1
- package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
- package/dist/components/overlays/index.js +13 -8
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +362 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +147 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/password-input/index.js +6 -5
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +1 -1
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/phone-input/index.js +14 -11
- package/dist/components/phone-input/index.js.map +1 -1
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/photo-capture/index.js +19 -17
- package/dist/components/photo-capture/index.js.map +1 -1
- package/dist/components/pills-input/index.js +4 -4
- package/dist/components/pills-input/pills-input.d.ts +1 -1
- package/dist/components/pills-input/pills-input.d.ts.map +1 -1
- package/dist/components/pin-input/index.js +6 -5
- package/dist/components/pin-input/index.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +7 -2
- package/dist/components/popover/popover.d.ts +41 -16
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.d.ts +1 -1
- package/dist/components/progress/index.d.ts.map +1 -1
- package/dist/components/progress/index.js +4 -1
- package/dist/components/progress/progress.d.ts +22 -14
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/index.d.ts.map +1 -0
- package/dist/components/prose/index.js +17 -0
- package/dist/components/prose/index.js.map +1 -0
- package/dist/components/prose/prose.d.ts +49 -0
- package/dist/components/prose/prose.d.ts.map +1 -0
- package/dist/components/prose/styles.css +593 -0
- package/dist/components/radio-group/index.js +9 -3
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/rating/index.js +3 -2
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.js +10 -8
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/index.js +10 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +150 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +2 -2
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.js +12 -8
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/splitter/index.d.ts +2 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/index.js +373 -0
- package/dist/components/splitter/index.js.map +1 -0
- package/dist/components/splitter/splitter.d.ts +159 -0
- package/dist/components/splitter/splitter.d.ts.map +1 -0
- package/dist/components/spotlight/index.js +23 -22
- package/dist/components/spotlight/index.js.map +1 -1
- package/dist/components/spotlight/spotlight.d.ts.map +1 -1
- package/dist/components/steps/index.d.ts +4 -0
- package/dist/components/steps/index.d.ts.map +1 -0
- package/dist/components/steps/index.js +478 -0
- package/dist/components/steps/index.js.map +1 -0
- package/dist/components/steps/steps-data.d.ts +78 -0
- package/dist/components/steps/steps-data.d.ts.map +1 -0
- package/dist/components/steps/steps.d.ts +183 -0
- package/dist/components/steps/steps.d.ts.map +1 -0
- package/dist/components/switch/index.js +4 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/table-of-contents/index.d.ts +2 -0
- package/dist/components/table-of-contents/index.d.ts.map +1 -0
- package/dist/components/table-of-contents/index.js +471 -0
- package/dist/components/table-of-contents/index.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +12 -9
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +1 -1
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/text-input/index.js +2 -2
- package/dist/components/textarea/index.js +8 -6
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/time-input/index.js +11 -9
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +3 -8
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tour/conditions.d.ts +83 -0
- package/dist/components/tour/conditions.d.ts.map +1 -0
- package/dist/components/tour/create-tours.d.ts +49 -0
- package/dist/components/tour/create-tours.d.ts.map +1 -0
- package/dist/components/tour/index.d.ts +6 -0
- package/dist/components/tour/index.d.ts.map +1 -0
- package/dist/components/tour/index.js +1449 -0
- package/dist/components/tour/index.js.map +1 -0
- package/dist/components/tour/runtime.d.ts +57 -0
- package/dist/components/tour/runtime.d.ts.map +1 -0
- package/dist/components/tour/storage.d.ts +14 -0
- package/dist/components/tour/storage.d.ts.map +1 -0
- package/dist/components/tour/store.d.ts +62 -0
- package/dist/components/tour/store.d.ts.map +1 -0
- package/dist/components/tour/tour.d.ts +77 -0
- package/dist/components/tour/tour.d.ts.map +1 -0
- package/dist/components/tour/types.d.ts +680 -0
- package/dist/components/tour/types.d.ts.map +1 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/index.js +457 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/tree-row.d.ts +72 -0
- package/dist/components/tree/tree-row.d.ts.map +1 -0
- package/dist/components/tree/tree.d.ts +193 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.js +31 -54
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +30 -24
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-popover.d.ts +20 -31
- package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +1 -1
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/date-predicates.d.ts +7 -5
- package/dist/lib/date-predicates.d.ts.map +1 -1
- package/dist/lib/date-value.d.ts +20 -0
- package/dist/lib/date-value.d.ts.map +1 -1
- package/dist/lib/floating-arrow.d.ts +53 -0
- package/dist/lib/floating-arrow.d.ts.map +1 -0
- package/dist/lib/focus-return.d.ts +53 -0
- package/dist/lib/focus-return.d.ts.map +1 -0
- package/dist/lib/meter.d.ts +104 -0
- package/dist/lib/meter.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +26 -8
- package/dist/lib/overlay-layer.d.ts.map +1 -1
- package/dist/lib/pressed.d.ts +92 -0
- package/dist/lib/pressed.d.ts.map +1 -0
- package/dist/lib/tree-data.d.ts +18 -2
- package/dist/lib/tree-data.d.ts.map +1 -1
- package/dist/lib/use-pagination.d.ts +102 -0
- package/dist/lib/use-pagination.d.ts.map +1 -0
- package/dist/lib/use-scroll-spy.d.ts +126 -0
- package/dist/lib/use-scroll-spy.d.ts.map +1 -0
- package/dist/theme.css +39 -3
- package/package.json +1 -1
- package/src/as-child.contract.test.tsx +283 -1
- package/src/components/action-icon/action-icon.tsx +34 -4
- package/src/components/anchor/anchor.test.tsx +232 -0
- package/src/components/anchor/anchor.tsx +187 -0
- package/src/components/anchor/index.ts +12 -0
- package/src/components/app-shell/app-shell.test.tsx +15 -7
- package/src/components/app-shell/app-shell.tsx +27 -20
- package/src/components/autocomplete/autocomplete.tsx +11 -3
- package/src/components/breadcrumb/breadcrumb.test.tsx +24 -0
- package/src/components/breadcrumb/breadcrumb.tsx +20 -1
- package/src/components/button/button-pressed.test.tsx +202 -0
- package/src/components/button/button.tsx +48 -6
- package/src/components/button-select/button-select-control.tsx +2 -2
- package/src/components/button-select/button-select.tsx +22 -2
- package/src/components/calendar/aliases.tsx +28 -0
- package/src/components/calendar/calendar-body.tsx +310 -210
- package/src/components/calendar/calendar.tsx +43 -12
- package/src/components/calendar/index.ts +7 -1
- package/src/components/calendar/month-year-calendar.test.tsx +106 -0
- package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
- package/src/components/checkbox/checkbox.tsx +7 -2
- package/src/components/choice-card-group/choice-card-group.tsx +2 -2
- package/src/components/circular-progress/circular-progress.test.tsx +35 -0
- package/src/components/circular-progress/circular-progress.tsx +116 -59
- package/src/components/circular-progress/index.ts +1 -0
- package/src/components/code/code.test.tsx +16 -0
- package/src/components/code/code.tsx +11 -0
- package/src/components/combobox/combobox.tsx +63 -28
- package/src/components/combobox-list/combobox-list.tsx +11 -3
- package/src/components/data-list/data-list.test.tsx +149 -0
- package/src/components/data-list/data-list.tsx +268 -0
- package/src/components/data-list/index.ts +9 -0
- package/src/components/data-table/data-table-group.test.tsx +16 -0
- package/src/components/data-table/data-table-group.tsx +15 -2
- package/src/components/data-table/data-table-placeholder.tsx +28 -36
- package/src/components/data-table/data-table-stack.tsx +33 -39
- package/src/components/data-table/data-table.test.tsx +31 -0
- package/src/components/data-table/data-table.tsx +41 -42
- package/src/components/date-picker/aliases.tsx +28 -0
- package/src/components/date-picker/date-picker.test.tsx +29 -0
- package/src/components/date-picker/date-picker.tsx +164 -45
- package/src/components/date-picker/index.ts +5 -1
- package/src/components/date-picker/month-year-picker.test.tsx +362 -0
- package/src/components/drawer/drawer.test.tsx +41 -0
- package/src/components/drawer/drawer.tsx +7 -1
- package/src/components/empty-state/empty-state.test.tsx +109 -0
- package/src/components/empty-state/empty-state.tsx +180 -0
- package/src/components/empty-state/index.ts +9 -0
- package/src/components/field/field.tsx +35 -1
- package/src/components/fieldset/fieldset.test.tsx +352 -0
- package/src/components/fieldset/fieldset.tsx +268 -0
- package/src/components/fieldset/index.ts +11 -0
- package/src/components/file-preview/file-preview.test.tsx +2 -1
- package/src/components/file-preview/file-preview.tsx +7 -13
- package/src/components/file-upload/file-upload.tsx +14 -5
- package/src/components/hover-card/hover-card.tsx +5 -1
- package/src/components/input/input.tsx +12 -5
- package/src/components/kbd/kbd.test.tsx +13 -0
- package/src/components/kbd/kbd.tsx +6 -0
- package/src/components/menu/menu.tsx +6 -2
- package/src/components/modal/modal.test.tsx +41 -0
- package/src/components/modal/modal.tsx +17 -9
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
- package/src/components/multi-select/multi-select.tsx +11 -3
- package/src/components/notification/create-notifier.tsx +1 -1
- package/src/components/number-input/number-input.tsx +12 -3
- package/src/components/overlays/dialog-parts.tsx +42 -5
- package/src/components/pagination/index.ts +19 -0
- package/src/components/pagination/pagination.test.tsx +187 -0
- package/src/components/pagination/pagination.tsx +563 -0
- package/src/components/password-input/password-input.tsx +12 -3
- package/src/components/phone-input/phone-input.tsx +12 -3
- package/src/components/pills-input/pills-input.tsx +7 -2
- package/src/components/pin-input/pin-input.tsx +13 -4
- package/src/components/popover/popover.tsx +87 -17
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/progress.test.tsx +102 -0
- package/src/components/progress/progress.tsx +116 -62
- package/src/components/prose/index.ts +1 -0
- package/src/components/prose/prose.test.tsx +90 -0
- package/src/components/prose/prose.tsx +60 -0
- package/src/components/prose/styles.css +593 -0
- package/src/components/radio-group/radio-group.tsx +8 -3
- package/src/components/rating/rating.tsx +5 -2
- package/src/components/scroll-area/index.ts +18 -0
- package/src/components/scroll-area/scroll-area.test.tsx +184 -0
- package/src/components/scroll-area/scroll-area.tsx +448 -0
- package/src/components/segment-group/segment-group.tsx +2 -2
- package/src/components/select/select.tsx +37 -18
- package/src/components/slider/slider.tsx +2 -2
- package/src/components/splitter/index.ts +15 -0
- package/src/components/splitter/splitter.test.tsx +244 -0
- package/src/components/splitter/splitter.tsx +625 -0
- package/src/components/spotlight/spotlight.test.tsx +34 -26
- package/src/components/spotlight/spotlight.tsx +7 -9
- package/src/components/steps/index.ts +21 -0
- package/src/components/steps/steps-data.tsx +179 -0
- package/src/components/steps/steps.test.tsx +235 -0
- package/src/components/steps/steps.tsx +686 -0
- package/src/components/switch/switch.tsx +7 -2
- package/src/components/table-of-contents/index.ts +17 -0
- package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
- package/src/components/table-of-contents/table-of-contents.tsx +708 -0
- package/src/components/tags-input/tags-input.tsx +12 -3
- package/src/components/textarea/textarea.tsx +15 -5
- package/src/components/tooltip/tooltip.tsx +8 -17
- package/src/components/tour/conditions.test.ts +527 -0
- package/src/components/tour/conditions.ts +445 -0
- package/src/components/tour/create-tours.tsx +150 -0
- package/src/components/tour/index.ts +86 -0
- package/src/components/tour/runtime.ts +187 -0
- package/src/components/tour/storage.test.ts +68 -0
- package/src/components/tour/storage.ts +44 -0
- package/src/components/tour/store.test.tsx +784 -0
- package/src/components/tour/store.ts +661 -0
- package/src/components/tour/tour.test.tsx +318 -0
- package/src/components/tour/tour.tsx +773 -0
- package/src/components/tour/tour.types.test.ts +185 -0
- package/src/components/tour/types.ts +904 -0
- package/src/components/tree/index.ts +24 -0
- package/src/components/tree/tree-row.tsx +179 -0
- package/src/components/tree/tree.test.tsx +296 -0
- package/src/components/tree/tree.tsx +796 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
- package/src/components/tree-select/tree-popover.tsx +26 -107
- package/src/components/tree-select/tree-select.tsx +24 -16
- package/src/icon-stroke.test.tsx +2 -0
- package/src/index.ts +16 -0
- package/src/lib/date-predicates.test.ts +46 -0
- package/src/lib/date-predicates.ts +44 -24
- package/src/lib/date-value.test.ts +24 -1
- package/src/lib/date-value.ts +42 -1
- package/src/lib/floating-arrow.tsx +73 -0
- package/src/lib/focus-return.test.tsx +143 -0
- package/src/lib/focus-return.ts +106 -0
- package/src/lib/meter.test.ts +40 -0
- package/src/lib/meter.ts +159 -0
- package/src/lib/overlay-layer.test.tsx +47 -1
- package/src/lib/overlay-layer.tsx +65 -8
- package/src/lib/pressed.ts +130 -0
- package/src/lib/tree-data.ts +42 -2
- package/src/lib/use-pagination.test.ts +105 -0
- package/src/lib/use-pagination.ts +179 -0
- package/src/lib/use-scroll-spy.test.tsx +238 -0
- package/src/lib/use-scroll-spy.ts +336 -0
- package/src/theme.css +39 -3
- package/src/theme.test.ts +29 -1
- package/src/visually-hidden-containment.test.tsx +9 -0
- package/dist/chunk-2W7H43WL.js.map +0 -1
- package/dist/chunk-7E7JNWOC.js.map +0 -1
- package/dist/chunk-7FPSQBWB.js.map +0 -1
- package/dist/chunk-7KFUFAVP.js.map +0 -1
- package/dist/chunk-AKXALCUN.js.map +0 -1
- package/dist/chunk-B5YHYI7E.js.map +0 -1
- package/dist/chunk-FQJNQW3G.js.map +0 -1
- package/dist/chunk-G3AD3NJG.js.map +0 -1
- package/dist/chunk-GEZYGBXY.js.map +0 -1
- package/dist/chunk-HCHGERDB.js.map +0 -1
- package/dist/chunk-HWBFRDX7.js.map +0 -1
- package/dist/chunk-I4B3N3UX.js.map +0 -1
- package/dist/chunk-IA6DCC3N.js.map +0 -1
- package/dist/chunk-IANYMDKH.js.map +0 -1
- package/dist/chunk-MQHD3EJE.js.map +0 -1
- package/dist/chunk-NNPSBC7O.js.map +0 -1
- package/dist/chunk-OXR7BXZA.js.map +0 -1
- package/dist/chunk-QKSLDQM2.js +0 -120
- package/dist/chunk-QKSLDQM2.js.map +0 -1
- package/dist/chunk-QRNQQIQM.js.map +0 -1
- package/dist/chunk-RKCUXOU2.js.map +0 -1
- package/dist/chunk-S5CQRCTF.js +0 -426
- package/dist/chunk-S5CQRCTF.js.map +0 -1
- package/dist/chunk-SBZJGFZ6.js.map +0 -1
- package/dist/chunk-SP6LCCTZ.js.map +0 -1
- package/dist/chunk-TUP7WXQE.js.map +0 -1
- package/dist/chunk-V2QZG4IT.js.map +0 -1
- package/dist/chunk-X6DESK37.js.map +0 -1
- package/dist/chunk-ZB5VMGKB.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/photo-capture/photo-capture-machine.ts","../../../src/components/photo-capture/use-photo-capture.ts","../../../src/components/photo-capture/photo-capture.tsx"],"names":["match","crop","CameraIcon","useRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDO,IAAM,wBAAA,GAA8C,EAAE,IAAA,EAAM,QAAA,EAAU,OAAO,KAAA,EAAM;AAE1F,IAAM,IAAA,GAAO,CAAC,KAAA,EAAa,MAAA,MAAmD;AAAA,EAC5E,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,IAAA;AAAA,EACP,KAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA,EAAM,KAAA;AAAA,EACN,MAAA,EAAQ;AACV,CAAA,CAAA;AAMO,IAAM,qBAAqB,CAChC,KAAA,EACA,UAEA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A;AAAA,QACC,WAAW,UAAA,EAAY,IAAA;AAAA,QACvB,YAAY,EAAE,UAAA,EAAY,YAAY,UAAA,EAAY,QAAA,EAAU,YAAY,QAAA;AAAS;AAAA,KACnF;AAAA,oBACA,GAAA;AAAA,MAAC,gBAAA;AAAA,MAAA;AAAA,QACC,WAAW,UAAA,EAAY,IAAA;AAAA,QACvB,UAAA,EAAY;AAAA,UACV,UAAU,UAAA,EAAY,QAAA;AAAA,UACtB,UAAU,UAAA,EAAY,QAAA;AAAA,UACtB,SAAS,UAAA,EAAY;AAAA;AACvB;AAAA;AACF,GAAA,EACF,CAAA;AAEJ,CAAA;AAEO,IAAM,YAAA,GAAe,MAAA,CAAO,MAAA,CAAO,qBAAA,EAAuB;AAAA,EAC/D,IAAA,EAAM,gBAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,OAAA,EAAS;AACX,CAAC","file":"index.js","sourcesContent":["import { match, P } from \"ts-pattern\"\n\n/**\n * PhotoCapture's steps, kept pure so every transition is unit-tested without\n * a camera or a canvas: `usePhotoCapture` feeds it what the parts report and\n * renders whatever it returns. The camera and the cropper keep their own\n * state; this only knows which of them is on screen, and with which photo.\n */\n\n/**\n * - `source`: the choice, camera or file. The first step, and where a used photo returns to.\n * - `live`: the in-page camera.\n * - `crop`: the photo, taken or picked, in the cropper, until it's used or retaken.\n */\nexport type PhotoCaptureStep = \"source\" | \"live\" | \"crop\"\n\n/**\n * Where the photo in the cropper came from, which decides what \"retake\"\n * means: the in-page camera again, the phone's camera app again, or another\n * file.\n */\nexport type PhotoCaptureOrigin = \"camera\" | \"native\" | \"file\"\n\nexport type PhotoCaptureState =\n | {\n step: \"source\"\n /** Whether a step was ever left: `false` on mount, so nothing steals focus as the page loads. */\n moved: boolean\n }\n | { step: \"live\"; moved: true }\n | {\n step: \"crop\"\n moved: true\n photo: File\n origin: PhotoCaptureOrigin\n /** The crop is being exported. */\n busy: boolean\n /** The last export failed. */\n failed: boolean\n }\n\nexport type PhotoCaptureEvent =\n /** \"Take photo\", in the page: the camera opens. */\n | { type: \"open\" }\n /** The shutter's photo. */\n | { type: \"take\"; photo: File }\n /** A file from the picker, or from the phone's camera app. */\n | { type: \"pick\"; photo: File; origin: Exclude<PhotoCaptureOrigin, \"camera\"> }\n /** Back to the in-page camera, for another shot. */\n | { type: \"retake\" }\n /** \"Use photo\": the export starts. */\n | { type: \"confirm\" }\n | { type: \"fail\" }\n /** The File went out: back to the start. */\n | { type: \"done\" }\n | { type: \"reset\" }\n\nexport const initialPhotoCaptureState: PhotoCaptureState = { step: \"source\", moved: false }\n\nconst crop = (photo: File, origin: PhotoCaptureOrigin): PhotoCaptureState => ({\n step: \"crop\",\n moved: true,\n photo,\n origin,\n busy: false,\n failed: false,\n})\n\n/**\n * The next state. An event that doesn't apply to the current step (a late\n * shutter after a file was picked, a double \"Use photo\") leaves it as it is.\n */\nexport const reducePhotoCapture = (\n state: PhotoCaptureState,\n event: PhotoCaptureEvent,\n): PhotoCaptureState =>\n match(event)\n .returnType<PhotoCaptureState>()\n .with({ type: \"open\" }, () => (state.step === \"source\" ? { step: \"live\", moved: true } : state))\n .with({ type: \"take\" }, ({ photo }) => (state.step === \"live\" ? crop(photo, \"camera\") : state))\n .with({ type: \"pick\" }, ({ photo, origin }) =>\n // From any step, but never over an export in flight.\n state.step === \"crop\" && state.busy ? state : crop(photo, origin),\n )\n .with({ type: \"retake\" }, () =>\n match(state)\n .returnType<PhotoCaptureState>()\n .with({ step: \"crop\", origin: \"camera\", busy: false }, () => ({\n step: \"live\",\n moved: true,\n }))\n .otherwise(() => state),\n )\n .with({ type: \"confirm\" }, () =>\n match(state)\n .with({ step: \"crop\", busy: false }, (s) => ({ ...s, busy: true, failed: false }))\n .otherwise(() => state),\n )\n .with({ type: \"fail\" }, () =>\n match(state)\n .with({ step: \"crop\", busy: true }, (s) => ({ ...s, busy: false, failed: true }))\n .otherwise(() => state),\n )\n .with({ type: \"done\" }, () => (state.step === \"crop\" ? { step: \"source\", moved: true } : state))\n .with({ type: \"reset\" }, () =>\n match(state)\n .returnType<PhotoCaptureState>()\n .with({ step: \"crop\", busy: true }, () => state)\n .with({ step: P.union(\"live\", \"crop\") }, () => ({ step: \"source\", moved: true }))\n .otherwise(() => state),\n )\n .exhaustive()\n","\"use client\"\n\nimport { useCallback, useReducer, useRef } from \"react\"\nimport { match } from \"ts-pattern\"\nimport { imageFile } from \"../../lib/image-file\"\nimport type { Ratio } from \"../../lib/ratio\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { useMediaQuery } from \"../../lib/use-media-query\"\nimport type { CameraFacing, CameraResolution } from \"../camera/camera-machine\"\nimport { type UseCameraResult, useCamera } from \"../camera/use-camera\"\nimport {\n initialPhotoCaptureState,\n type PhotoCaptureOrigin,\n type PhotoCaptureStep,\n reducePhotoCapture,\n} from \"./photo-capture-machine\"\n\n/**\n * How the photo is taken:\n * - `live`: the camera in the page, a viewfinder and a shutter.\n * - `native`: the phone's own camera app, through a file input with `capture`. No viewfinder in the page.\n * - `auto`: `native` under a coarse pointer (a phone, a tablet), `live` otherwise.\n */\nexport type PhotoCaptureCamera = \"live\" | \"native\" | \"auto\"\n\nexport type PhotoCaptureOutput = {\n /** The encoding. A browser that can't encode it falls back to PNG, and the File says so. Defaults to `image/jpeg`. */\n type?: string\n /** 0–1, for JPEG and WebP. Defaults to 0.9. */\n quality?: number\n /** The longest side, in px: a larger crop is scaled down to fit, a smaller one is kept as is. */\n size?: number\n}\n\nexport type UsePhotoCaptureOptions = {\n /** Receives the cropped photo once \"Use photo\" is pressed. Nothing is emitted before. */\n onChange?: (file: File) => void\n /** The in-page camera, the phone's camera app, or whichever suits the device. Defaults to `auto`. */\n camera?: PhotoCaptureCamera\n /** The camera to open: the front one (`user`, the default) or the back one. */\n facing?: CameraFacing\n /** The crop's width / height, and the viewfinder's box. Free when unset; a circle is always 1. */\n ratio?: Ratio\n /** The capture size to aim for, for the in-page camera. See `useCamera`. */\n resolution?: CameraResolution\n /** Saves a selfie as the preview shows it, mirrored. Off by default: a saved selfie reads the right way round. */\n mirror?: boolean\n /** The File's encoding and size. */\n output?: PhotoCaptureOutput\n}\n\n/** What `confirm()` hands to the cropper's export: `ImageCropper`'s `getCroppedImage`. */\nexport type PhotoCaptureCrop = (options: {\n type: string\n quality: number\n maxSize?: { width: number; height: number }\n}) => Promise<Blob | string | null>\n\nexport type UsePhotoCaptureResult = {\n step: PhotoCaptureStep\n /** `auto` resolved for this device. */\n mode: \"live\" | \"native\"\n /** The photo in the cropper, taken or picked, before it's cropped. */\n photo: File | null\n /** Where `photo` came from, which decides what a retake means. */\n origin: PhotoCaptureOrigin | null\n /** The crop is being exported. */\n busy: boolean\n /** The last export failed. */\n failed: boolean\n /** Whether a step was ever left, so a part knows to move focus when it appears. */\n moved: boolean\n /** The in-page camera. Lazy: it turns on with `open()`, never on its own. */\n camera: UseCameraResult\n facing: CameraFacing\n ratio: Ratio | undefined\n mirror: boolean\n /** Opens the in-page camera. */\n open: () => void\n /** The shutter's photo: `Camera.Root`'s `onCapture`. */\n take: (photo: File) => void\n /** A picked file (the first of `files`), from the library or, with `native`, the phone's camera app. */\n pick: (files: readonly File[], origin?: Exclude<PhotoCaptureOrigin, \"camera\">) => void\n /** Back to the in-page camera for another shot. */\n retake: () => void\n /** Exports the crop through `crop`, then hands the File to `onChange` and starts over. Resolves the File, or `null` if the export failed. */\n confirm: (crop: PhotoCaptureCrop) => Promise<File | null>\n /** Back to the source step, the camera off. */\n reset: () => void\n}\n\n/**\n * PhotoCapture as plain state plus handlers: which step is on screen, the\n * photo in it, and the in-page camera. The steps are a pure reducer\n * (`reducePhotoCapture`); the camera is `useCamera`, mounted lazily so it\n * never lights up before \"Take photo\"; the crop is whatever `ImageCropper`\n * exports. This hook only wires them together.\n *\n * const flow = usePhotoCapture({ ratio: 1, output: { size: 512 }, onChange: upload })\n * <PhotoCapture.Root flow={flow} shape=\"circle\">…</PhotoCapture.Root>\n *\n * The camera turns off when the photo is taken, when a file is picked\n * instead, on `reset()` and on unmount. Nothing is uploaded: `onChange`\n * gets a File and the rest is yours.\n */\nexport function usePhotoCapture({\n onChange,\n camera: wanted = \"auto\",\n facing = \"user\",\n ratio,\n resolution,\n mirror = false,\n output,\n}: UsePhotoCaptureOptions = {}): UsePhotoCaptureResult {\n const [state, dispatch] = useReducer(reducePhotoCapture, initialPhotoCaptureState)\n const camera = useCamera({ facing, ratio, resolution, lazy: true })\n const coarse = useMediaQuery(\"(pointer: coarse)\")\n const mode = match(wanted)\n .returnType<\"live\" | \"native\">()\n .with(\"auto\", () => (coarse ? \"native\" : \"live\"))\n .otherwise((chosen) => chosen)\n\n // Read when the export resolves, not when it started: the latest callback and encoding.\n const latest = useRef({ onChange, output })\n useIsomorphicLayoutEffect(() => {\n latest.current = { onChange, output }\n })\n\n const { start, stop } = camera\n\n const open = useCallback(() => {\n dispatch({ type: \"open\" })\n void start()\n }, [start])\n\n const take = useCallback((photo: File) => dispatch({ type: \"take\", photo }), [])\n\n const pick = useCallback(\n (files: readonly File[], origin: Exclude<PhotoCaptureOrigin, \"camera\"> = \"file\") => {\n const [photo] = files\n if (!photo) return\n // A file instead of the shot: the camera goes off with the viewfinder.\n stop()\n dispatch({ type: \"pick\", photo, origin })\n },\n [stop],\n )\n\n const retake = useCallback(() => {\n if (state.step !== \"crop\" || state.origin !== \"camera\" || state.busy) return\n dispatch({ type: \"retake\" })\n void start()\n }, [state, start])\n\n const confirm = useCallback(async (crop: PhotoCaptureCrop) => {\n dispatch({ type: \"confirm\" })\n const { type = \"image/jpeg\", quality = 0.9, size } = latest.current.output ?? {}\n const blob = await crop({\n type,\n quality,\n ...(size ? { maxSize: { width: size, height: size } } : {}),\n }).catch(() => null)\n if (!(blob instanceof Blob)) {\n // A tainted canvas, an image that never loaded: the crop step says so.\n dispatch({ type: \"fail\" })\n return null\n }\n const file = imageFile(blob, \"photo\")\n latest.current.onChange?.(file)\n dispatch({ type: \"done\" })\n return file\n }, [])\n\n const reset = useCallback(() => {\n stop()\n dispatch({ type: \"reset\" })\n }, [stop])\n\n const crop = state.step === \"crop\" ? state : null\n return {\n step: state.step,\n mode,\n photo: crop?.photo ?? null,\n origin: crop?.origin ?? null,\n busy: crop?.busy ?? false,\n failed: crop?.failed ?? false,\n moved: state.moved,\n camera,\n facing,\n ratio,\n mirror,\n open,\n take,\n pick,\n retake,\n confirm,\n reset,\n }\n}\n","\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react/factory\"\nimport { Camera as CameraIcon, Check, ImageUp, RotateCcw } from \"lucide-react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type Ref,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\"\nimport { match } from \"ts-pattern\"\nimport { composeChildren, type NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { useDirectionCheck } from \"../../lib/intl\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useObjectUrl } from \"../../lib/use-object-url\"\nimport { Button, type ButtonProps } from \"../button/button\"\nimport { Camera, type CameraIconSlot, type CameraTranslations } from \"../camera/camera\"\nimport { FileTrigger } from \"../file-trigger/file-trigger\"\nimport {\n ImageCropper,\n type ImageCropperTranslations,\n useImageCropperContext,\n} from \"../image-cropper/image-cropper\"\nimport {\n type UsePhotoCaptureOptions,\n type UsePhotoCaptureResult,\n usePhotoCapture,\n} from \"./use-photo-capture\"\n\n/**\n * PhotoCapture — take a photo with the camera, or pick a file, crop it, and\n * get a File back. The brick a profile picture, a badge photo or a scanned\n * document is added with.\n *\n * <PhotoCapture shape=\"circle\" output={{ size: 512 }} onChange={(file) => setAvatar(file)} />\n *\n * It's a composition, not a new widget: `Camera` takes the photo,\n * `FileTrigger` picks a file (or opens a phone's camera app), `ImageCropper`\n * crops it, and `usePhotoCapture`, a small step reducer, says which of them\n * is on screen. Every part reads that hook, so a layout of your own drives\n * the same flow:\n *\n * const flow = usePhotoCapture({ ratio: \"3/4\", onChange: setBadge })\n * <PhotoCapture.Root flow={flow} shape=\"rectangle\">\n * <PhotoCapture.Source />\n * <PhotoCapture.Live />\n * <PhotoCapture.Crop />\n * </PhotoCapture.Root>\n *\n * It renders inline. In a modal, it's the modal's content: the camera stops\n * when it unmounts. Nothing is uploaded; `onChange` gets the cropped File\n * after \"Use photo\", and never before.\n */\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** A rectangle, or a circle for a face. Drives the camera's guide and the cropper. */\nexport type PhotoCaptureShape = \"rectangle\" | \"circle\"\n\nexport type PhotoCaptureOwnTranslations = {\n /** The source step's heading. */\n sourceTitle?: string\n sourceBody?: string\n /** Takes a photo: opens the camera in the page, or the phone's camera app. */\n take?: string\n /** Picks a file, next to the in-page camera. */\n file?: string\n /** Picks from the phone's library, next to its camera app. */\n library?: string\n /** Back to the camera, from the crop. */\n retake?: string\n /** Picks another file, from the crop of a picked one. */\n another?: string\n /** Hands the crop to `onChange`. */\n confirm?: string\n /** Shown, as an alert, when the crop couldn't be exported. */\n failed?: string\n /** Announced politely when the photo reaches the cropper, and once it's been used. */\n announceCrop?: string\n announceDone?: string\n}\n\n/**\n * One map for everything PhotoCapture shows: its own strings, the camera's\n * (`CameraTranslations`) and the cropper's (`ImageCropperTranslations`).\n */\nexport type PhotoCaptureTranslations = PhotoCaptureOwnTranslations &\n CameraTranslations &\n ImageCropperTranslations\n\nexport const DEFAULT_TRANSLATIONS: Required<PhotoCaptureOwnTranslations> = {\n sourceTitle: \"Add a photo\",\n sourceBody: \"Nothing leaves this page until you choose Use photo.\",\n take: \"Take photo\",\n file: \"Choose a file\",\n library: \"Choose from library\",\n retake: \"Retake\",\n another: \"Choose another\",\n confirm: \"Use photo\",\n failed: \"The photo couldn't be prepared. Try again, or choose another.\",\n announceCrop: \"Photo ready to crop\",\n announceDone: \"Photo added\",\n}\n\nexport type PhotoCaptureIconSlot = \"take\" | \"file\" | \"retake\" | \"confirm\"\n/** PhotoCapture's own icons, and the camera's (`shutter`, `flip`, `start`, `retry`, `off`). */\nexport type PhotoCaptureIcons = IconMap<PhotoCaptureIconSlot | CameraIconSlot>\n\nexport const DEFAULT_ICONS: Record<PhotoCaptureIconSlot, ReactNode> = {\n take: <CameraIcon aria-hidden className={iconStroke} />,\n file: <ImageUp aria-hidden className={iconStroke} />,\n retake: <RotateCcw aria-hidden className={iconStroke} />,\n confirm: <Check aria-hidden className={iconStroke} />,\n}\n\ntype Shared = {\n flow: UsePhotoCaptureResult\n t: Required<PhotoCaptureOwnTranslations>\n /** The `translations` prop as given, for the camera and the cropper to merge with their own defaults. */\n translations: PhotoCaptureTranslations | undefined\n icons: Record<PhotoCaptureIconSlot, ReactNode>\n /** The `icons` prop as given, for the camera. */\n cameraIcons: PhotoCaptureIcons | undefined\n shape: PhotoCaptureShape\n accept: string | string[]\n color: Color\n announce: (message: string) => void\n}\n\nconst PhotoCaptureContext = createContext<Shared | null>(null)\n\n/** The nearest `PhotoCapture.Root`'s flow, translations and icons, for a part of your own. */\nexport const usePhotoCaptureContext = (): Shared => {\n const shared = useContext(PhotoCaptureContext)\n if (!shared)\n throw new Error(\"[@42/ui-react] PhotoCapture parts must be inside <PhotoCapture.Root>.\")\n return shared\n}\n\n/** What the camera encodes the shot as, on its way to the cropper, which re-encodes it as `output`. */\nconst SHOT = { type: \"image/jpeg\", quality: 0.95 }\n\n// ---------------------------------------------------------------------------\n// Root\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureRootProps = Omit<HTMLArkProps<\"div\">, \"color\" | \"onChange\"> &\n WithTestId & {\n /** The flow, from `usePhotoCapture()`. */\n flow: UsePhotoCaptureResult\n /** A rectangle, or a circle for a face: the camera's guide and the crop. Defaults to `rectangle`. */\n shape?: PhotoCaptureShape\n /** The file types the pickers offer. Defaults to `image/*`. */\n accept?: string | string[]\n translations?: PhotoCaptureTranslations\n icons?: PhotoCaptureIcons\n /** The palette of the buttons, the shutter, the guide and the crop. `brand` by default. */\n color?: Color\n ref?: Ref<HTMLDivElement>\n }\n\n/** Announces each step, politely, from a visually hidden region. */\nconst Announcer = ({ message }: { message: string }) => (\n <div role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {message}\n </div>\n)\n\nconst PhotoCaptureRoot = ({\n flow,\n shape = \"rectangle\",\n accept = \"image/*\",\n translations,\n icons,\n color = \"brand\",\n className,\n testId,\n asChild,\n children,\n ref,\n ...rest\n}: PhotoCaptureRootProps) => {\n const direction = useDirectionCheck()\n const [message, setMessage] = useState(\"\")\n\n const shared = useMemo<Shared>(\n () => ({\n flow,\n t: { ...DEFAULT_TRANSLATIONS, ...translations },\n translations,\n icons: mergeIcons(DEFAULT_ICONS, icons),\n cameraIcons: icons,\n shape,\n accept,\n color,\n announce: setMessage,\n }),\n [flow, translations, icons, shape, accept, color],\n )\n\n // The live step announces itself through the camera's own region.\n useEffect(() => {\n if (flow.step === \"crop\") setMessage(shared.t.announceCrop)\n }, [flow.step, shared.t])\n\n const rootRef = useMergedRefs(ref, direction)\n return (\n <PhotoCaptureContext value={shared}>\n <ark.div\n ref={rootRef}\n asChild={asChild}\n data-color={color}\n data-step={flow.step}\n data-mode={flow.mode}\n className={cn(\"flex w-full flex-col gap-3\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n <Announcer message={message} />\n </>\n ))}\n </ark.div>\n </PhotoCaptureContext>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Actions\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureActionProps = NoAsChild<\n Omit<ButtonProps, \"onClick\" | \"onSelect\" | \"children\"> & {\n /** Replaces the label from `translations`. */\n children?: ReactNode\n }\n>\n\n/**\n * Takes a photo. With the in-page camera, it opens the `live` step; with\n * `native`, it opens the phone's camera app (`capture`), whose photo goes\n * straight to the crop. Hidden where the in-page camera can't work at all.\n */\nconst PhotoCaptureTake = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n const label = children ?? t.take\n return match(flow.mode)\n .with(\"native\", () => (\n <FileTrigger\n accept={accept}\n capture={flow.facing}\n onSelect={(files) => flow.pick(files, \"native\")}\n startSlot={icons.take}\n {...rest}\n >\n {label}\n </FileTrigger>\n ))\n .with(\"live\", () =>\n flow.camera.status === \"unsupported\" ? null : (\n <Button startSlot={icons.take} onClick={flow.open} {...rest}>\n {label}\n </Button>\n ),\n )\n .exhaustive()\n}\n\n/**\n * Picks a file: \"Choose a file\" beside the in-page camera, \"Choose from\n * library\" beside the phone's camera app. Always there, at the same weight\n * as the camera, for anyone whose camera won't do.\n */\nconst PhotoCaptureFile = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n return (\n <FileTrigger\n accept={accept}\n onSelect={(files) => flow.pick(files, \"file\")}\n startSlot={icons.file}\n {...rest}\n >\n {children ?? (flow.mode === \"native\" ? t.library : t.file)}\n </FileTrigger>\n )\n}\n\n/**\n * Back for another photo, the way this one came: the in-page camera again,\n * the phone's camera app again, or another file (\"Choose another\").\n */\nconst PhotoCaptureRetake = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n return match(flow.origin)\n .with(\"camera\", () => (\n <Button\n variant=\"light\"\n startSlot={icons.retake}\n disabled={flow.busy}\n onClick={flow.retake}\n {...rest}\n >\n {children ?? t.retake}\n </Button>\n ))\n .with(\"native\", () => (\n <FileTrigger\n variant=\"light\"\n accept={accept}\n capture={flow.facing}\n disabled={flow.busy}\n onSelect={(files) => flow.pick(files, \"native\")}\n startSlot={icons.retake}\n {...rest}\n >\n {children ?? t.retake}\n </FileTrigger>\n ))\n .with(\"file\", () => (\n <FileTrigger\n variant=\"light\"\n accept={accept}\n disabled={flow.busy}\n onSelect={(files) => flow.pick(files, \"file\")}\n startSlot={icons.file}\n {...rest}\n >\n {children ?? t.another}\n </FileTrigger>\n ))\n .with(null, () => null)\n .exhaustive()\n}\n\n/**\n * \"Use photo\": exports the crop as `output` says, hands the File to\n * `onChange`, and starts over. Inside `PhotoCapture.Crop`, which provides the\n * cropper it exports. Takes focus when it appears, so after the shutter (or a\n * pick) Enter uses the photo.\n */\nconst PhotoCaptureConfirm = ({\n id,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureActionProps) => {\n const { flow, t, icons, announce } = usePhotoCaptureContext()\n const cropper = useImageCropperContext()\n // Button takes no ref: found by its id to move focus to it.\n const generated = useId()\n const button = id ?? generated\n\n // The crop is only ever reached by a user's step: the shutter or a pick.\n // Again after a failure, which disabled (and so blurred) the button.\n useEffect(() => {\n if (!flow.busy) document.getElementById(button)?.focus()\n }, [flow.busy, button])\n\n return (\n <Button\n id={button}\n startSlot={icons.confirm}\n loading={flow.busy}\n onClick={async () => {\n const file = await flow.confirm(cropper.getCroppedImage)\n if (file) announce(t.announceDone)\n }}\n {...rest}\n >\n {children ?? t.confirm}\n </Button>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Steps\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureSourceProps = NoAsChild<ComponentPropsWithoutRef<\"div\"> & WithTestId>\n\n/**\n * The first step: \"Take photo\" and the file picker, side by side at the same\n * weight, under a line that says nothing leaves the page. With `native`,\n * that's the phone's camera app and its library: two pickers, because\n * Android 14 and 15 hide the camera from a picker without `capture`.\n * Children replace the two buttons.\n */\nconst PhotoCaptureSource = ({\n className,\n testId,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureSourceProps) => {\n const { flow, t } = usePhotoCaptureContext()\n const root = useRef<HTMLDivElement>(null)\n\n // Back here after a photo was used: focus goes to the first choice, not the page.\n useEffect(() => {\n if (flow.step === \"source\" && flow.moved)\n root.current?.querySelector<HTMLElement>(\"button:not(:disabled)\")?.focus()\n }, [flow.step, flow.moved])\n\n if (flow.step !== \"source\") return null\n return (\n <div\n ref={root}\n data-part=\"source\"\n className={cn(\n \"flex flex-col items-center justify-center gap-4 rounded-input border border-dashed p-6 text-center\",\n // The kit's hairline, dashed: FileUpload's dropzone.\n \"border-brand-900/20 dark:border-white/15\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <div className=\"flex flex-col gap-1\">\n <p className=\"font-medium text-brand-950 text-md dark:text-white\">{t.sourceTitle}</p>\n <p className=\"text-black/50 text-sm dark:text-white/50\">{t.sourceBody}</p>\n </div>\n {/* Side by side when they fit, stacked full width when not: the same weight either way. */}\n <div className=\"grid w-full max-w-md grid-cols-[repeat(auto-fit,minmax(min(100%,11rem),1fr))] gap-2\">\n {children ?? (\n <>\n <PhotoCaptureTake />\n <PhotoCaptureFile />\n </>\n )}\n </div>\n </div>\n )\n}\n\nexport type PhotoCaptureLiveClassNames = {\n viewfinder?: string\n controls?: string\n}\n\nexport type PhotoCaptureLiveProps = NoAsChild<\n Omit<ComponentPropsWithoutRef<\"div\">, \"children\" | \"color\"> &\n WithTestId & {\n classNames?: PhotoCaptureLiveClassNames\n }\n>\n\n/**\n * The in-page camera: `Camera`'s viewfinder with a guide in the flow's\n * shape, its status panels, the shutter, the camera switch and picker, and\n * the file picker beside the shutter. Every panel (asking, refused, busy, no\n * camera) offers the file picker too.\n *\n * Focus comes here as the step opens, and moves to the shutter once the\n * picture is live.\n */\nconst PhotoCaptureLive = ({\n className,\n classNames,\n testId,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureLiveProps) => {\n const { flow, translations, cameraIcons, shape, color } = usePhotoCaptureContext()\n const root = useRef<HTMLDivElement>(null)\n const shutter = useRef<HTMLButtonElement>(null)\n /** Whether the shutter should take focus once it's enabled: after \"Take photo\" or a retake. */\n const pending = useRef(false)\n const status = flow.camera.status\n\n useEffect(() => {\n if (flow.step !== \"live\" || !flow.moved) return\n pending.current = true\n // The button that brought us here is gone: hold focus in the step until the shutter can take it.\n root.current?.focus()\n }, [flow.step, flow.moved])\n\n useEffect(() => {\n if (!pending.current || status !== \"live\") return\n pending.current = false\n shutter.current?.focus()\n }, [status])\n\n if (flow.step !== \"live\") return null\n return (\n <Camera.Root\n ref={root}\n tabIndex={-1}\n camera={flow.camera}\n onCapture={flow.take}\n output={SHOT}\n mirror={flow.mirror}\n translations={translations}\n icons={cameraIcons}\n color={color}\n data-part=\"live\"\n className={cn(\"outline-none\", className)}\n testId={testId}\n {...rest}\n >\n <Camera.Viewfinder ratio={flow.ratio} className={classNames?.viewfinder}>\n <Camera.Guide shape={shape} ratio={shape === \"rectangle\" ? flow.ratio : undefined} />\n <Camera.Live className=\"absolute start-2 top-2 z-1\" />\n <Camera.Status>{() => <PhotoCaptureFile size=\"sm\" />}</Camera.Status>\n </Camera.Viewfinder>\n <div className={cn(\"grid grid-cols-[1fr_auto_1fr] items-center gap-3\", classNames?.controls)}>\n {/* While a panel is up, it carries the file picker. */}\n <div className=\"flex min-w-0 justify-start\">\n {status === \"live\" && <PhotoCaptureFile variant=\"light\" />}\n </div>\n <Camera.Shutter ref={shutter} />\n <div className=\"flex min-w-0 items-center justify-end gap-2\">\n <Camera.Devices className=\"min-w-0\" />\n <Camera.Flip />\n </div>\n </div>\n </Camera.Root>\n )\n}\n\nexport type PhotoCaptureCropClassNames = {\n viewport?: string\n controls?: string\n actions?: string\n}\n\nexport type PhotoCaptureCropProps = NoAsChild<\n Omit<ComponentPropsWithoutRef<\"div\">, \"color\"> &\n WithTestId & {\n classNames?: PhotoCaptureCropClassNames\n /** Replaces the Retake and Use photo buttons. `PhotoCapture.Confirm` must stay inside. */\n children?: ReactNode\n }\n>\n\n/**\n * The photo in `ImageCropper`, locked to the flow's ratio and shape, with\n * its zoom, rotate and flip controls, then Retake and Use photo. Taking the\n * photo and cropping it are one step: there's no review screen between.\n */\nconst PhotoCaptureCrop = ({\n className,\n classNames,\n testId,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureCropProps) => {\n const { flow, t, translations, shape, color } = usePhotoCaptureContext()\n // One URL per photo, which is also the cropper's key: a new photo starts a new crop.\n const url = useObjectUrl(flow.photo)\n\n if (flow.step !== \"crop\" || !url) return null\n return (\n <ImageCropper.Root\n key={url}\n ratio={shape === \"circle\" ? 1 : flow.ratio}\n shape={shape}\n color={color}\n translations={translations}\n data-part=\"crop\"\n className={className}\n testId={testId}\n {...rest}\n >\n <ImageCropper.Viewport className={classNames?.viewport}>\n <ImageCropper.Image src={url} />\n <ImageCropper.Selection />\n </ImageCropper.Viewport>\n <ImageCropper.Controls className={classNames?.controls} />\n {flow.failed && (\n <p role=\"alert\" className={cn(TEXT_COLOR_CLASSES.error, \"text-sm\")}>\n {t.failed}\n </p>\n )}\n <div className={cn(\"flex flex-wrap items-center justify-end gap-2\", classNames?.actions)}>\n {children ?? (\n <>\n <PhotoCaptureRetake />\n <PhotoCaptureConfirm />\n </>\n )}\n </div>\n </ImageCropper.Root>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Convenience\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureClassNames = {\n source?: string\n live?: string\n viewfinder?: string\n crop?: string\n viewport?: string\n controls?: string\n actions?: string\n}\n\nexport type PhotoCaptureProps = NoAsChild<\n Omit<PhotoCaptureRootProps, \"flow\" | \"children\"> &\n UsePhotoCaptureOptions & {\n classNames?: PhotoCaptureClassNames\n }\n>\n\nconst PhotoCaptureComponent = ({\n onChange,\n camera,\n facing,\n ratio,\n resolution,\n mirror,\n output,\n classNames,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureProps) => {\n const flow = usePhotoCapture({ onChange, camera, facing, ratio, resolution, mirror, output })\n return (\n <PhotoCaptureRoot flow={flow} {...rest}>\n <PhotoCaptureSource className={classNames?.source} />\n <PhotoCaptureLive\n className={classNames?.live}\n classNames={{ viewfinder: classNames?.viewfinder, controls: classNames?.controls }}\n />\n <PhotoCaptureCrop\n className={classNames?.crop}\n classNames={{\n viewport: classNames?.viewport,\n controls: classNames?.controls,\n actions: classNames?.actions,\n }}\n />\n </PhotoCaptureRoot>\n )\n}\n\nexport const PhotoCapture = Object.assign(PhotoCaptureComponent, {\n Root: PhotoCaptureRoot,\n Source: PhotoCaptureSource,\n Live: PhotoCaptureLive,\n Crop: PhotoCaptureCrop,\n Take: PhotoCaptureTake,\n File: PhotoCaptureFile,\n Retake: PhotoCaptureRetake,\n Confirm: PhotoCaptureConfirm,\n})\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/photo-capture/photo-capture-machine.ts","../../../src/components/photo-capture/use-photo-capture.ts","../../../src/components/photo-capture/photo-capture.tsx"],"names":["match","crop","CameraIcon","useRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDO,IAAM,wBAAA,GAA8C,EAAE,IAAA,EAAM,QAAA,EAAU,OAAO,KAAA,EAAM;AAE1F,IAAM,IAAA,GAAO,CAAC,KAAA,EAAa,MAAA,MAAmD;AAAA,EAC5E,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,IAAA;AAAA,EACP,KAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA,EAAM,KAAA;AAAA,EACN,MAAA,EAAQ;AACV,CAAA,CAAA;AAMO,IAAM,qBAAqB,CAChC,KAAA,EACA,UAEA,KAAA,CAAM,KAAK,EACR,UAAA,EAA8B,CAC9B,KAAK,EAAE,IAAA,EAAM,QAAO,EAAG,MAAO,MAAM,IAAA,KAAS,QAAA,GAAW,EAAE,IAAA,EAAM,MAAA,EAAQ,OAAO,IAAA,E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C,gBAAA;AAAA,MAAA;AAAA,QACC,WAAW,UAAA,EAAY,IAAA;AAAA,QACvB,UAAA,EAAY;AAAA,UACV,UAAU,UAAA,EAAY,QAAA;AAAA,UACtB,UAAU,UAAA,EAAY,QAAA;AAAA,UACtB,SAAS,UAAA,EAAY;AAAA;AACvB;AAAA;AACF,GAAA,EACF,CAAA;AAEJ,CAAA;AAEO,IAAM,YAAA,GAAe,MAAA,CAAO,MAAA,CAAO,qBAAA,EAAuB;AAAA,EAC/D,IAAA,EAAM,gBAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,IAAA,EAAM,gBAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,OAAA,EAAS;AACX,CAAC","file":"index.js","sourcesContent":["import { match, P } from \"ts-pattern\"\n\n/**\n * PhotoCapture's steps, kept pure so every transition is unit-tested without\n * a camera or a canvas: `usePhotoCapture` feeds it what the parts report and\n * renders whatever it returns. The camera and the cropper keep their own\n * state; this only knows which of them is on screen, and with which photo.\n */\n\n/**\n * - `source`: the choice, camera or file. The first step, and where a used photo returns to.\n * - `live`: the in-page camera.\n * - `crop`: the photo, taken or picked, in the cropper, until it's used or retaken.\n */\nexport type PhotoCaptureStep = \"source\" | \"live\" | \"crop\"\n\n/**\n * Where the photo in the cropper came from, which decides what \"retake\"\n * means: the in-page camera again, the phone's camera app again, or another\n * file.\n */\nexport type PhotoCaptureOrigin = \"camera\" | \"native\" | \"file\"\n\nexport type PhotoCaptureState =\n | {\n step: \"source\"\n /** Whether a step was ever left: `false` on mount, so nothing steals focus as the page loads. */\n moved: boolean\n }\n | { step: \"live\"; moved: true }\n | {\n step: \"crop\"\n moved: true\n photo: File\n origin: PhotoCaptureOrigin\n /** The crop is being exported. */\n busy: boolean\n /** The last export failed. */\n failed: boolean\n }\n\nexport type PhotoCaptureEvent =\n /** \"Take photo\", in the page: the camera opens. */\n | { type: \"open\" }\n /** The shutter's photo. */\n | { type: \"take\"; photo: File }\n /** A file from the picker, or from the phone's camera app. */\n | { type: \"pick\"; photo: File; origin: Exclude<PhotoCaptureOrigin, \"camera\"> }\n /** Back to the in-page camera, for another shot. */\n | { type: \"retake\" }\n /** \"Use photo\": the export starts. */\n | { type: \"confirm\" }\n | { type: \"fail\" }\n /** The File went out: back to the start. */\n | { type: \"done\" }\n | { type: \"reset\" }\n\nexport const initialPhotoCaptureState: PhotoCaptureState = { step: \"source\", moved: false }\n\nconst crop = (photo: File, origin: PhotoCaptureOrigin): PhotoCaptureState => ({\n step: \"crop\",\n moved: true,\n photo,\n origin,\n busy: false,\n failed: false,\n})\n\n/**\n * The next state. An event that doesn't apply to the current step (a late\n * shutter after a file was picked, a double \"Use photo\") leaves it as it is.\n */\nexport const reducePhotoCapture = (\n state: PhotoCaptureState,\n event: PhotoCaptureEvent,\n): PhotoCaptureState =>\n match(event)\n .returnType<PhotoCaptureState>()\n .with({ type: \"open\" }, () => (state.step === \"source\" ? { step: \"live\", moved: true } : state))\n .with({ type: \"take\" }, ({ photo }) => (state.step === \"live\" ? crop(photo, \"camera\") : state))\n .with({ type: \"pick\" }, ({ photo, origin }) =>\n // From any step, but never over an export in flight.\n state.step === \"crop\" && state.busy ? state : crop(photo, origin),\n )\n .with({ type: \"retake\" }, () =>\n match(state)\n .returnType<PhotoCaptureState>()\n .with({ step: \"crop\", origin: \"camera\", busy: false }, () => ({\n step: \"live\",\n moved: true,\n }))\n .otherwise(() => state),\n )\n .with({ type: \"confirm\" }, () =>\n match(state)\n .with({ step: \"crop\", busy: false }, (s) => ({ ...s, busy: true, failed: false }))\n .otherwise(() => state),\n )\n .with({ type: \"fail\" }, () =>\n match(state)\n .with({ step: \"crop\", busy: true }, (s) => ({ ...s, busy: false, failed: true }))\n .otherwise(() => state),\n )\n .with({ type: \"done\" }, () => (state.step === \"crop\" ? { step: \"source\", moved: true } : state))\n .with({ type: \"reset\" }, () =>\n match(state)\n .returnType<PhotoCaptureState>()\n .with({ step: \"crop\", busy: true }, () => state)\n .with({ step: P.union(\"live\", \"crop\") }, () => ({ step: \"source\", moved: true }))\n .otherwise(() => state),\n )\n .exhaustive()\n","\"use client\"\n\nimport { useCallback, useReducer, useRef } from \"react\"\nimport { match } from \"ts-pattern\"\nimport { imageFile } from \"../../lib/image-file\"\nimport type { Ratio } from \"../../lib/ratio\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\nimport { useMediaQuery } from \"../../lib/use-media-query\"\nimport type { CameraFacing, CameraResolution } from \"../camera/camera-machine\"\nimport { type UseCameraResult, useCamera } from \"../camera/use-camera\"\nimport {\n initialPhotoCaptureState,\n type PhotoCaptureOrigin,\n type PhotoCaptureStep,\n reducePhotoCapture,\n} from \"./photo-capture-machine\"\n\n/**\n * How the photo is taken:\n * - `live`: the camera in the page, a viewfinder and a shutter.\n * - `native`: the phone's own camera app, through a file input with `capture`. No viewfinder in the page.\n * - `auto`: `native` under a coarse pointer (a phone, a tablet), `live` otherwise.\n */\nexport type PhotoCaptureCamera = \"live\" | \"native\" | \"auto\"\n\nexport type PhotoCaptureOutput = {\n /** The encoding. A browser that can't encode it falls back to PNG, and the File says so. Defaults to `image/jpeg`. */\n type?: string\n /** 0–1, for JPEG and WebP. Defaults to 0.9. */\n quality?: number\n /** The longest side, in px: a larger crop is scaled down to fit, a smaller one is kept as is. */\n size?: number\n}\n\nexport type UsePhotoCaptureOptions = {\n /** Receives the cropped photo once \"Use photo\" is pressed. Nothing is emitted before. */\n onChange?: (file: File) => void\n /** The in-page camera, the phone's camera app, or whichever suits the device. Defaults to `auto`. */\n camera?: PhotoCaptureCamera\n /** The camera to open: the front one (`user`, the default) or the back one. */\n facing?: CameraFacing\n /** The crop's width / height, and the viewfinder's box. Free when unset; a circle is always 1. */\n ratio?: Ratio\n /** The capture size to aim for, for the in-page camera. See `useCamera`. */\n resolution?: CameraResolution\n /** Saves a selfie as the preview shows it, mirrored. Off by default: a saved selfie reads the right way round. */\n mirror?: boolean\n /** The File's encoding and size. */\n output?: PhotoCaptureOutput\n}\n\n/** What `confirm()` hands to the cropper's export: `ImageCropper`'s `getCroppedImage`. */\nexport type PhotoCaptureCrop = (options: {\n type: string\n quality: number\n maxSize?: { width: number; height: number }\n}) => Promise<Blob | string | null>\n\nexport type UsePhotoCaptureResult = {\n step: PhotoCaptureStep\n /** `auto` resolved for this device. */\n mode: \"live\" | \"native\"\n /** The photo in the cropper, taken or picked, before it's cropped. */\n photo: File | null\n /** Where `photo` came from, which decides what a retake means. */\n origin: PhotoCaptureOrigin | null\n /** The crop is being exported. */\n busy: boolean\n /** The last export failed. */\n failed: boolean\n /** Whether a step was ever left, so a part knows to move focus when it appears. */\n moved: boolean\n /** The in-page camera. Lazy: it turns on with `open()`, never on its own. */\n camera: UseCameraResult\n facing: CameraFacing\n ratio: Ratio | undefined\n mirror: boolean\n /** Opens the in-page camera. */\n open: () => void\n /** The shutter's photo: `Camera.Root`'s `onCapture`. */\n take: (photo: File) => void\n /** A picked file (the first of `files`), from the library or, with `native`, the phone's camera app. */\n pick: (files: readonly File[], origin?: Exclude<PhotoCaptureOrigin, \"camera\">) => void\n /** Back to the in-page camera for another shot. */\n retake: () => void\n /** Exports the crop through `crop`, then hands the File to `onChange` and starts over. Resolves the File, or `null` if the export failed. */\n confirm: (crop: PhotoCaptureCrop) => Promise<File | null>\n /** Back to the source step, the camera off. */\n reset: () => void\n}\n\n/**\n * PhotoCapture as plain state plus handlers: which step is on screen, the\n * photo in it, and the in-page camera. The steps are a pure reducer\n * (`reducePhotoCapture`); the camera is `useCamera`, mounted lazily so it\n * never lights up before \"Take photo\"; the crop is whatever `ImageCropper`\n * exports. This hook only wires them together.\n *\n * const flow = usePhotoCapture({ ratio: 1, output: { size: 512 }, onChange: upload })\n * <PhotoCapture.Root flow={flow} shape=\"circle\">…</PhotoCapture.Root>\n *\n * The camera turns off when the photo is taken, when a file is picked\n * instead, on `reset()` and on unmount. Nothing is uploaded: `onChange`\n * gets a File and the rest is yours.\n */\nexport function usePhotoCapture({\n onChange,\n camera: wanted = \"auto\",\n facing = \"user\",\n ratio,\n resolution,\n mirror = false,\n output,\n}: UsePhotoCaptureOptions = {}): UsePhotoCaptureResult {\n const [state, dispatch] = useReducer(reducePhotoCapture, initialPhotoCaptureState)\n const camera = useCamera({ facing, ratio, resolution, lazy: true })\n const coarse = useMediaQuery(\"(pointer: coarse)\")\n const mode = match(wanted)\n .returnType<\"live\" | \"native\">()\n .with(\"auto\", () => (coarse ? \"native\" : \"live\"))\n .otherwise((chosen) => chosen)\n\n // Read when the export resolves, not when it started: the latest callback and encoding.\n const latest = useRef({ onChange, output })\n useIsomorphicLayoutEffect(() => {\n latest.current = { onChange, output }\n })\n\n const { start, stop } = camera\n\n const open = useCallback(() => {\n dispatch({ type: \"open\" })\n void start()\n }, [start])\n\n const take = useCallback((photo: File) => dispatch({ type: \"take\", photo }), [])\n\n const pick = useCallback(\n (files: readonly File[], origin: Exclude<PhotoCaptureOrigin, \"camera\"> = \"file\") => {\n const [photo] = files\n if (!photo) return\n // A file instead of the shot: the camera goes off with the viewfinder.\n stop()\n dispatch({ type: \"pick\", photo, origin })\n },\n [stop],\n )\n\n const retake = useCallback(() => {\n if (state.step !== \"crop\" || state.origin !== \"camera\" || state.busy) return\n dispatch({ type: \"retake\" })\n void start()\n }, [state, start])\n\n const confirm = useCallback(async (crop: PhotoCaptureCrop) => {\n dispatch({ type: \"confirm\" })\n const { type = \"image/jpeg\", quality = 0.9, size } = latest.current.output ?? {}\n const blob = await crop({\n type,\n quality,\n ...(size ? { maxSize: { width: size, height: size } } : {}),\n }).catch(() => null)\n if (!(blob instanceof Blob)) {\n // A tainted canvas, an image that never loaded: the crop step says so.\n dispatch({ type: \"fail\" })\n return null\n }\n const file = imageFile(blob, \"photo\")\n latest.current.onChange?.(file)\n dispatch({ type: \"done\" })\n return file\n }, [])\n\n const reset = useCallback(() => {\n stop()\n dispatch({ type: \"reset\" })\n }, [stop])\n\n const crop = state.step === \"crop\" ? state : null\n return {\n step: state.step,\n mode,\n photo: crop?.photo ?? null,\n origin: crop?.origin ?? null,\n busy: crop?.busy ?? false,\n failed: crop?.failed ?? false,\n moved: state.moved,\n camera,\n facing,\n ratio,\n mirror,\n open,\n take,\n pick,\n retake,\n confirm,\n reset,\n }\n}\n","\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react/factory\"\nimport { Camera as CameraIcon, Check, ImageUp, RotateCcw } from \"lucide-react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type Ref,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\"\nimport { match } from \"ts-pattern\"\nimport { composeChildren, type NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { useDirectionCheck } from \"../../lib/intl\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useObjectUrl } from \"../../lib/use-object-url\"\nimport { Button, type ButtonProps } from \"../button/button\"\nimport { Camera, type CameraIconSlot, type CameraTranslations } from \"../camera/camera\"\nimport { FileTrigger } from \"../file-trigger/file-trigger\"\nimport {\n ImageCropper,\n type ImageCropperTranslations,\n useImageCropperContext,\n} from \"../image-cropper/image-cropper\"\nimport {\n type UsePhotoCaptureOptions,\n type UsePhotoCaptureResult,\n usePhotoCapture,\n} from \"./use-photo-capture\"\n\n/**\n * PhotoCapture — take a photo with the camera, or pick a file, crop it, and\n * get a File back. The brick a profile picture, a badge photo or a scanned\n * document is added with.\n *\n * <PhotoCapture shape=\"circle\" output={{ size: 512 }} onChange={(file) => setAvatar(file)} />\n *\n * It's a composition, not a new widget: `Camera` takes the photo,\n * `FileTrigger` picks a file (or opens a phone's camera app), `ImageCropper`\n * crops it, and `usePhotoCapture`, a small step reducer, says which of them\n * is on screen. Every part reads that hook, so a layout of your own drives\n * the same flow:\n *\n * const flow = usePhotoCapture({ ratio: \"3/4\", onChange: setBadge })\n * <PhotoCapture.Root flow={flow} shape=\"rectangle\">\n * <PhotoCapture.Source />\n * <PhotoCapture.Live />\n * <PhotoCapture.Crop />\n * </PhotoCapture.Root>\n *\n * It renders inline. In a modal, it's the modal's content: the camera stops\n * when it unmounts. Nothing is uploaded; `onChange` gets the cropped File\n * after \"Use photo\", and never before.\n */\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** A rectangle, or a circle for a face. Drives the camera's guide and the cropper. */\nexport type PhotoCaptureShape = \"rectangle\" | \"circle\"\n\nexport type PhotoCaptureOwnTranslations = {\n /** The source step's heading. */\n sourceTitle?: string\n sourceBody?: string\n /** Takes a photo: opens the camera in the page, or the phone's camera app. */\n take?: string\n /** Picks a file, next to the in-page camera. */\n file?: string\n /** Picks from the phone's library, next to its camera app. */\n library?: string\n /** Back to the camera, from the crop. */\n retake?: string\n /** Picks another file, from the crop of a picked one. */\n another?: string\n /** Hands the crop to `onChange`. */\n confirm?: string\n /** Shown, as an alert, when the crop couldn't be exported. */\n failed?: string\n /** Announced politely when the photo reaches the cropper, and once it's been used. */\n announceCrop?: string\n announceDone?: string\n}\n\n/**\n * One map for everything PhotoCapture shows: its own strings, the camera's\n * (`CameraTranslations`) and the cropper's (`ImageCropperTranslations`).\n */\nexport type PhotoCaptureTranslations = PhotoCaptureOwnTranslations &\n CameraTranslations &\n ImageCropperTranslations\n\nexport const DEFAULT_TRANSLATIONS: Required<PhotoCaptureOwnTranslations> = {\n sourceTitle: \"Add a photo\",\n sourceBody: \"Nothing leaves this page until you choose Use photo.\",\n take: \"Take photo\",\n file: \"Choose a file\",\n library: \"Choose from library\",\n retake: \"Retake\",\n another: \"Choose another\",\n confirm: \"Use photo\",\n failed: \"The photo couldn't be prepared. Try again, or choose another.\",\n announceCrop: \"Photo ready to crop\",\n announceDone: \"Photo added\",\n}\n\nexport type PhotoCaptureIconSlot = \"take\" | \"file\" | \"retake\" | \"confirm\"\n/** PhotoCapture's own icons, and the camera's (`shutter`, `flip`, `start`, `retry`, `off`). */\nexport type PhotoCaptureIcons = IconMap<PhotoCaptureIconSlot | CameraIconSlot>\n\nexport const DEFAULT_ICONS: Record<PhotoCaptureIconSlot, ReactNode> = {\n take: <CameraIcon aria-hidden className={iconStroke} />,\n file: <ImageUp aria-hidden className={iconStroke} />,\n retake: <RotateCcw aria-hidden className={iconStroke} />,\n confirm: <Check aria-hidden className={iconStroke} />,\n}\n\ntype Shared = {\n flow: UsePhotoCaptureResult\n t: Required<PhotoCaptureOwnTranslations>\n /** The `translations` prop as given, for the camera and the cropper to merge with their own defaults. */\n translations: PhotoCaptureTranslations | undefined\n icons: Record<PhotoCaptureIconSlot, ReactNode>\n /** The `icons` prop as given, for the camera. */\n cameraIcons: PhotoCaptureIcons | undefined\n shape: PhotoCaptureShape\n accept: string | string[]\n color: Color\n announce: (message: string) => void\n}\n\nconst PhotoCaptureContext = createContext<Shared | null>(null)\n\n/** The nearest `PhotoCapture.Root`'s flow, translations and icons, for a part of your own. */\nexport const usePhotoCaptureContext = (): Shared => {\n const shared = useContext(PhotoCaptureContext)\n if (!shared)\n throw new Error(\"[@42/ui-react] PhotoCapture parts must be inside <PhotoCapture.Root>.\")\n return shared\n}\n\n/** What the camera encodes the shot as, on its way to the cropper, which re-encodes it as `output`. */\nconst SHOT = { type: \"image/jpeg\", quality: 0.95 }\n\n// ---------------------------------------------------------------------------\n// Root\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureRootProps = Omit<HTMLArkProps<\"div\">, \"color\" | \"onChange\"> &\n WithTestId & {\n /** The flow, from `usePhotoCapture()`. */\n flow: UsePhotoCaptureResult\n /** A rectangle, or a circle for a face: the camera's guide and the crop. Defaults to `rectangle`. */\n shape?: PhotoCaptureShape\n /** The file types the pickers offer. Defaults to `image/*`. */\n accept?: string | string[]\n translations?: PhotoCaptureTranslations\n icons?: PhotoCaptureIcons\n /** The palette of the buttons, the shutter, the guide and the crop. `brand` by default. */\n color?: Color\n ref?: Ref<HTMLDivElement>\n }\n\n/** Announces each step, politely, from a visually hidden region. */\nconst Announcer = ({ message }: { message: string }) => (\n <div role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {message}\n </div>\n)\n\nconst PhotoCaptureRoot = ({\n flow,\n shape = \"rectangle\",\n accept = \"image/*\",\n translations,\n icons,\n color = \"brand\",\n className,\n testId,\n asChild,\n children,\n ref,\n ...rest\n}: PhotoCaptureRootProps) => {\n const direction = useDirectionCheck()\n const [message, setMessage] = useState(\"\")\n\n const shared = useMemo<Shared>(\n () => ({\n flow,\n t: { ...DEFAULT_TRANSLATIONS, ...translations },\n translations,\n icons: mergeIcons(DEFAULT_ICONS, icons),\n cameraIcons: icons,\n shape,\n accept,\n color,\n announce: setMessage,\n }),\n [flow, translations, icons, shape, accept, color],\n )\n\n // The live step announces itself through the camera's own region.\n useEffect(() => {\n if (flow.step === \"crop\") setMessage(shared.t.announceCrop)\n }, [flow.step, shared.t])\n\n const rootRef = useMergedRefs(ref, direction)\n return (\n <PhotoCaptureContext value={shared}>\n <ark.div\n ref={rootRef}\n asChild={asChild}\n data-color={color}\n data-step={flow.step}\n data-mode={flow.mode}\n className={cn(\"flex w-full flex-col gap-3\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n <Announcer message={message} />\n </>\n ))}\n </ark.div>\n </PhotoCaptureContext>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Actions\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureActionProps = NoAsChild<\n Omit<ButtonProps, \"onClick\" | \"onSelect\" | \"children\"> & {\n /** Replaces the label from `translations`. */\n children?: ReactNode\n }\n>\n\n/**\n * Takes a photo. With the in-page camera, it opens the `live` step; with\n * `native`, it opens the phone's camera app (`capture`), whose photo goes\n * straight to the crop. Hidden where the in-page camera can't work at all.\n */\nconst PhotoCaptureTake = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n const label = children ?? t.take\n return match(flow.mode)\n .with(\"native\", () => (\n <FileTrigger\n accept={accept}\n capture={flow.facing}\n onSelect={(files) => flow.pick(files, \"native\")}\n startSlot={icons.take}\n {...rest}\n >\n {label}\n </FileTrigger>\n ))\n .with(\"live\", () =>\n flow.camera.status === \"unsupported\" ? null : (\n <Button startSlot={icons.take} onClick={flow.open} {...rest}>\n {label}\n </Button>\n ),\n )\n .exhaustive()\n}\n\n/**\n * Picks a file: \"Choose a file\" beside the in-page camera, \"Choose from\n * library\" beside the phone's camera app. Always there, at the same weight\n * as the camera, for anyone whose camera won't do.\n */\nconst PhotoCaptureFile = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n return (\n <FileTrigger\n accept={accept}\n onSelect={(files) => flow.pick(files, \"file\")}\n startSlot={icons.file}\n {...rest}\n >\n {children ?? (flow.mode === \"native\" ? t.library : t.file)}\n </FileTrigger>\n )\n}\n\n/**\n * Back for another photo, the way this one came: the in-page camera again,\n * the phone's camera app again, or another file (\"Choose another\").\n */\nconst PhotoCaptureRetake = ({ children, asChild: _asChild, ...rest }: PhotoCaptureActionProps) => {\n const { flow, t, icons, accept } = usePhotoCaptureContext()\n return match(flow.origin)\n .with(\"camera\", () => (\n <Button\n variant=\"light\"\n startSlot={icons.retake}\n disabled={flow.busy}\n onClick={flow.retake}\n {...rest}\n >\n {children ?? t.retake}\n </Button>\n ))\n .with(\"native\", () => (\n <FileTrigger\n variant=\"light\"\n accept={accept}\n capture={flow.facing}\n disabled={flow.busy}\n onSelect={(files) => flow.pick(files, \"native\")}\n startSlot={icons.retake}\n {...rest}\n >\n {children ?? t.retake}\n </FileTrigger>\n ))\n .with(\"file\", () => (\n <FileTrigger\n variant=\"light\"\n accept={accept}\n disabled={flow.busy}\n onSelect={(files) => flow.pick(files, \"file\")}\n startSlot={icons.file}\n {...rest}\n >\n {children ?? t.another}\n </FileTrigger>\n ))\n .with(null, () => null)\n .exhaustive()\n}\n\n/**\n * \"Use photo\": exports the crop as `output` says, hands the File to\n * `onChange`, and starts over. Inside `PhotoCapture.Crop`, which provides the\n * cropper it exports. Takes focus when it appears, so after the shutter (or a\n * pick) Enter uses the photo.\n */\nconst PhotoCaptureConfirm = ({\n id,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureActionProps) => {\n const { flow, t, icons, announce } = usePhotoCaptureContext()\n const cropper = useImageCropperContext()\n // Button takes no ref: found by its id to move focus to it.\n const generated = useId()\n const button = id ?? generated\n\n // The crop is only ever reached by a user's step: the shutter or a pick.\n // Again after a failure, which disabled (and so blurred) the button.\n useEffect(() => {\n if (!flow.busy) document.getElementById(button)?.focus()\n }, [flow.busy, button])\n\n return (\n <Button\n id={button}\n startSlot={icons.confirm}\n loading={flow.busy}\n onClick={async () => {\n const file = await flow.confirm(cropper.getCroppedImage)\n if (file) announce(t.announceDone)\n }}\n {...rest}\n >\n {children ?? t.confirm}\n </Button>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Steps\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureSourceProps = NoAsChild<ComponentPropsWithoutRef<\"div\"> & WithTestId>\n\n/**\n * The first step: \"Take photo\" and the file picker, side by side at the same\n * weight, under a line that says nothing leaves the page. With `native`,\n * that's the phone's camera app and its library: two pickers, because\n * Android 14 and 15 hide the camera from a picker without `capture`.\n * Children replace the two buttons.\n */\nconst PhotoCaptureSource = ({\n className,\n testId,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureSourceProps) => {\n const { flow, t } = usePhotoCaptureContext()\n const root = useRef<HTMLDivElement>(null)\n\n // Back here after a photo was used: focus goes to the first choice, not the page.\n useEffect(() => {\n if (flow.step === \"source\" && flow.moved)\n root.current?.querySelector<HTMLElement>(\"button:not(:disabled)\")?.focus()\n }, [flow.step, flow.moved])\n\n if (flow.step !== \"source\") return null\n return (\n <div\n ref={root}\n data-part=\"source\"\n className={cn(\n \"flex flex-col items-center justify-center gap-4 rounded-input border border-dashed p-6 text-center\",\n // The kit's hairline, dashed: FileUpload's dropzone.\n \"border-brand-900/20 dark:border-white/15\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <div className=\"flex flex-col gap-1\">\n <p className=\"font-medium text-brand-950 text-md dark:text-white\">{t.sourceTitle}</p>\n <p className=\"text-black/50 text-sm dark:text-white/50\">{t.sourceBody}</p>\n </div>\n {/* Side by side when they fit, stacked full width when not: the same weight either way. */}\n <div className=\"grid w-full max-w-md grid-cols-[repeat(auto-fit,minmax(min(100%,11rem),1fr))] gap-2\">\n {children ?? (\n <>\n <PhotoCaptureTake />\n <PhotoCaptureFile />\n </>\n )}\n </div>\n </div>\n )\n}\n\nexport type PhotoCaptureLiveClassNames = {\n viewfinder?: string\n controls?: string\n}\n\nexport type PhotoCaptureLiveProps = NoAsChild<\n Omit<ComponentPropsWithoutRef<\"div\">, \"children\" | \"color\"> &\n WithTestId & {\n classNames?: PhotoCaptureLiveClassNames\n }\n>\n\n/**\n * The in-page camera: `Camera`'s viewfinder with a guide in the flow's\n * shape, its status panels, the shutter, the camera switch and picker, and\n * the file picker beside the shutter. Every panel (asking, refused, busy, no\n * camera) offers the file picker too.\n *\n * Focus comes here as the step opens, and moves to the shutter once the\n * picture is live.\n */\nconst PhotoCaptureLive = ({\n className,\n classNames,\n testId,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureLiveProps) => {\n const { flow, translations, cameraIcons, shape, color } = usePhotoCaptureContext()\n const root = useRef<HTMLDivElement>(null)\n const shutter = useRef<HTMLButtonElement>(null)\n /** Whether the shutter should take focus once it's enabled: after \"Take photo\" or a retake. */\n const pending = useRef(false)\n const status = flow.camera.status\n\n useEffect(() => {\n if (flow.step !== \"live\" || !flow.moved) return\n pending.current = true\n // The button that brought us here is gone: hold focus in the step until the shutter can take it.\n root.current?.focus()\n }, [flow.step, flow.moved])\n\n useEffect(() => {\n if (!pending.current || status !== \"live\") return\n pending.current = false\n shutter.current?.focus()\n }, [status])\n\n if (flow.step !== \"live\") return null\n return (\n <Camera.Root\n ref={root}\n tabIndex={-1}\n camera={flow.camera}\n onCapture={flow.take}\n output={SHOT}\n mirror={flow.mirror}\n translations={translations}\n icons={cameraIcons}\n color={color}\n data-part=\"live\"\n className={cn(\"outline-none\", className)}\n testId={testId}\n {...rest}\n >\n <Camera.Viewfinder ratio={flow.ratio} className={classNames?.viewfinder}>\n <Camera.Guide shape={shape} ratio={shape === \"rectangle\" ? flow.ratio : undefined} />\n <Camera.Live className=\"absolute start-2 top-2 z-1\" />\n <Camera.Status>{() => <PhotoCaptureFile size=\"sm\" />}</Camera.Status>\n </Camera.Viewfinder>\n <div className={cn(\"grid grid-cols-[1fr_auto_1fr] items-center gap-3\", classNames?.controls)}>\n {/* While a panel is up, it carries the file picker. */}\n <div className=\"flex min-w-0 justify-start\">\n {status === \"live\" && <PhotoCaptureFile variant=\"light\" />}\n </div>\n <Camera.Shutter ref={shutter} />\n <div className=\"flex min-w-0 items-center justify-end gap-2\">\n <Camera.Devices className=\"min-w-0\" />\n <Camera.Flip />\n </div>\n </div>\n </Camera.Root>\n )\n}\n\nexport type PhotoCaptureCropClassNames = {\n viewport?: string\n controls?: string\n actions?: string\n}\n\nexport type PhotoCaptureCropProps = NoAsChild<\n Omit<ComponentPropsWithoutRef<\"div\">, \"color\"> &\n WithTestId & {\n classNames?: PhotoCaptureCropClassNames\n /** Replaces the Retake and Use photo buttons. `PhotoCapture.Confirm` must stay inside. */\n children?: ReactNode\n }\n>\n\n/**\n * The photo in `ImageCropper`, locked to the flow's ratio and shape, with\n * its zoom, rotate and flip controls, then Retake and Use photo. Taking the\n * photo and cropping it are one step: there's no review screen between.\n */\nconst PhotoCaptureCrop = ({\n className,\n classNames,\n testId,\n children,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureCropProps) => {\n const { flow, t, translations, shape, color } = usePhotoCaptureContext()\n // One URL per photo, which is also the cropper's key: a new photo starts a new crop.\n const url = useObjectUrl(flow.photo)\n\n if (flow.step !== \"crop\" || !url) return null\n return (\n <ImageCropper.Root\n key={url}\n ratio={shape === \"circle\" ? 1 : flow.ratio}\n shape={shape}\n color={color}\n translations={translations}\n data-part=\"crop\"\n className={className}\n testId={testId}\n {...rest}\n >\n <ImageCropper.Viewport className={classNames?.viewport}>\n <ImageCropper.Image src={url} />\n <ImageCropper.Selection />\n </ImageCropper.Viewport>\n <ImageCropper.Controls className={classNames?.controls} />\n {flow.failed && (\n <p role=\"alert\" className={cn(TEXT_COLOR_CLASSES.error, \"text-sm\")}>\n {t.failed}\n </p>\n )}\n <div className={cn(\"flex flex-wrap items-center justify-end gap-2\", classNames?.actions)}>\n {children ?? (\n <>\n <PhotoCaptureRetake />\n <PhotoCaptureConfirm />\n </>\n )}\n </div>\n </ImageCropper.Root>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Convenience\n// ---------------------------------------------------------------------------\n\nexport type PhotoCaptureClassNames = {\n source?: string\n live?: string\n viewfinder?: string\n crop?: string\n viewport?: string\n controls?: string\n actions?: string\n}\n\nexport type PhotoCaptureProps = NoAsChild<\n Omit<PhotoCaptureRootProps, \"flow\" | \"children\"> &\n UsePhotoCaptureOptions & {\n classNames?: PhotoCaptureClassNames\n }\n>\n\nconst PhotoCaptureComponent = ({\n onChange,\n camera,\n facing,\n ratio,\n resolution,\n mirror,\n output,\n classNames,\n asChild: _asChild,\n ...rest\n}: PhotoCaptureProps) => {\n const flow = usePhotoCapture({ onChange, camera, facing, ratio, resolution, mirror, output })\n return (\n <PhotoCaptureRoot flow={flow} {...rest}>\n <PhotoCaptureSource className={classNames?.source} />\n <PhotoCaptureLive\n className={classNames?.live}\n classNames={{ viewfinder: classNames?.viewfinder, controls: classNames?.controls }}\n />\n <PhotoCaptureCrop\n className={classNames?.crop}\n classNames={{\n viewport: classNames?.viewport,\n controls: classNames?.controls,\n actions: classNames?.actions,\n }}\n />\n </PhotoCaptureRoot>\n )\n}\n\nexport const PhotoCapture = Object.assign(PhotoCaptureComponent, {\n Root: PhotoCaptureRoot,\n Source: PhotoCaptureSource,\n Live: PhotoCaptureLive,\n Crop: PhotoCaptureCrop,\n Take: PhotoCaptureTake,\n File: PhotoCaptureFile,\n Retake: PhotoCaptureRetake,\n Confirm: PhotoCaptureConfirm,\n})\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { PillOverflowCounter, PillsInput, pillsContent, pillsShell, usePillOverflow } from '../../chunk-
|
|
2
|
+
export { PillOverflowCounter, PillsInput, pillsContent, pillsShell, usePillOverflow } from '../../chunk-3XQEOJCE.js';
|
|
3
3
|
import '../../chunk-6M6YZ3PQ.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-HTVICHT4.js';
|
|
5
|
+
import '../../chunk-2RRTT4AF.js';
|
|
6
6
|
import '../../chunk-2LI3VPDP.js';
|
|
7
7
|
import '../../chunk-OBSZ4NE2.js';
|
|
8
|
+
import '../../chunk-XXOR34T4.js';
|
|
8
9
|
import '../../chunk-PQZSTI3R.js';
|
|
9
10
|
import '../../chunk-BUIHQJGE.js';
|
|
10
|
-
import '../../chunk-XXOR34T4.js';
|
|
11
11
|
import '../../chunk-R5LYFTHA.js';
|
|
12
12
|
import '../../chunk-WYCMIIRR.js';
|
|
13
13
|
import '../../chunk-C6NVU4F7.js';
|
|
@@ -153,7 +153,7 @@ export type PillsInputProps = NoAsChild<Omit<HTMLArkProps<"div">, "color">> & Wi
|
|
|
153
153
|
* is used bare. `PillsInput.Field` has its own `testId`, landing on the real
|
|
154
154
|
* focusable `<input>`; prefer that one when targeting the field.
|
|
155
155
|
*/
|
|
156
|
-
declare const PillsInputBase: ({ size, variant, color, invalid, disabled, pointer, maxLines, startSlot, endSlot, className, classNames, children, testId, translations, asChild: _asChild, ...rest }: PillsInputProps) => import("react").JSX.Element;
|
|
156
|
+
declare const PillsInputBase: ({ size, variant, color, invalid: invalidProp, disabled: disabledProp, pointer, maxLines, startSlot, endSlot, className, classNames, children, testId, translations, asChild: _asChild, ...rest }: PillsInputProps) => import("react").JSX.Element;
|
|
157
157
|
export type PillsInputFieldProps = ComponentPropsWithoutRef<"input"> & WithTestId & {
|
|
158
158
|
/** Fired on Backspace when the field is empty — pop the last value. */
|
|
159
159
|
onRemoveLast?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pills-input.d.ts","sourceRoot":"","sources":["../../../src/components/pills-input/pills-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,EAEL,KAAK,wBAAwB,EAI7B,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"pills-input.d.ts","sourceRoot":"","sources":["../../../src/components/pills-input/pills-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,EAEL,KAAK,wBAAwB,EAI7B,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB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BAAwB,CAAC,OAAO,CAAC,GAClE,UAAU,GAAG;IACX,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAEH,QAAA,MAAM,eAAe,4DAMlB,oBAAoB,gCAgBtB,CAAA;AAED,eAAO,MAAM,UAAU;;CAErB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { shellChrome, shellVariants } from '../../chunk-
|
|
3
|
-
import { FieldShell, fieldA11yProps } from '../../chunk-
|
|
2
|
+
import { shellChrome, shellVariants } from '../../chunk-HTVICHT4.js';
|
|
3
|
+
import { useInheritedDisabled, useInheritedInvalid, FieldShell, fieldA11yProps } from '../../chunk-2RRTT4AF.js';
|
|
4
4
|
import { props } from '../../chunk-WYCMIIRR.js';
|
|
5
5
|
import '../../chunk-GIPQUKCN.js';
|
|
6
6
|
import { cn } from '../../chunk-4ASNIDV7.js';
|
|
@@ -79,7 +79,8 @@ var PinInput = ({
|
|
|
79
79
|
classNames,
|
|
80
80
|
testId
|
|
81
81
|
}) => {
|
|
82
|
-
const
|
|
82
|
+
const isDisabled = useInheritedDisabled(disabled);
|
|
83
|
+
const isInvalid = useInheritedInvalid(invalid || error != null);
|
|
83
84
|
return /* @__PURE__ */ jsx(
|
|
84
85
|
FieldShell,
|
|
85
86
|
{
|
|
@@ -87,7 +88,7 @@ var PinInput = ({
|
|
|
87
88
|
description,
|
|
88
89
|
error,
|
|
89
90
|
required,
|
|
90
|
-
disabled,
|
|
91
|
+
disabled: isDisabled,
|
|
91
92
|
size,
|
|
92
93
|
className: classNames?.field,
|
|
93
94
|
composite: true,
|
|
@@ -105,7 +106,7 @@ var PinInput = ({
|
|
|
105
106
|
placeholder,
|
|
106
107
|
name,
|
|
107
108
|
translations,
|
|
108
|
-
...props({ invalid: isInvalid, disabled, readOnly, required }),
|
|
109
|
+
...props({ invalid: isInvalid, disabled: isDisabled, readOnly, required }),
|
|
109
110
|
ids: id ? { root: id } : void 0,
|
|
110
111
|
"data-color": color,
|
|
111
112
|
className: cn("relative", className, classNames?.root),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/pin-input/pin-input.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;AAoCO,IAAM,OAAA,GAAU,GAAA;AAAA,EACrB;AAAA,IACE,GAAG,WAAA;AAAA,IACH,GAAG,aAAA,CAAc,OAAA;AAAA,IACjB,8BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,iBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC,CAAA;AAuEA,IAAM,gBAAgB,CAAC;AAAA,EACrB,MAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,EAAE,mBAAmB,UAAA,EAAY,GAAG,WAAU,GAAI,cAAA,CAAe,iBAAiB,CAAA;AACxF,EAAA,2BACGA,UAAA,CAAI,OAAA,EAAJ,EAAY,IAAA,EAAK,OAAA,EAAQ,mBAAiB,UAAA,EAAY,SAAA,EAAU,2BAC9D,QAAA,EAAA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAE,GAAA,CAAI,CAAC,GAAG,CAAA,qBAC9B,GAAA;AAAA,IAACA,UAAA,CAAI,KAAA;AAAA,IAAJ;AAAA,MAIC,KAAA,EAAO,CAAA;AAAA,MACP,GAAA,EAAK,CAAA,KAAM,CAAA,GAAI,GAAA,GAAM,MAAA;AAAA,MACrB,MAAA,EAAQ,CAAA,KAAM,CAAA,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AAA;AAAA,UACpC,cAAc,YAAA,IAAgB,IAAA,GAAO,CAAC,GAAG,YAAY,CAAA,GAAI,MAAA;AAAA,UACzD,eAAe,QAAA,GAAW,CAAC,YAAY,QAAA,CAAS,OAAA,CAAQ,aAAa,CAAA,GAAI,MAAA;AAAA,UACzE,iBAAiB,UAAA,GAAa,CAAC,YAAY,UAAA,CAAW,OAAA,CAAQ,aAAa,CAAA,GAAI,MAAA;AAAA,UAC/E,KAAA,EAAO,MAAA;AAAA,UACP,GAAA;AAAA,UACA,IAAA;AAAA,UACA,IAAA;AAAA,UACA,WAAA;AAAA,UACA,IAAA;AAAA,UACA,YAAA;AAAA,UACC,GAAG,MAAM,EAAE,OAAA,EAAS,WAAW,QAAA,EAAU,QAAA,EAAU,UAAU,CAAA;AAAA,UAC9D,GAAA,EAAK,EAAA,GAAK,EAAE,IAAA,EAAM,IAAG,GAAI,MAAA;AAAA,UACzB,YAAA,EAAY,KAAA;AAAA,UAGZ,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAA,EAAW,YAAY,IAAI,CAAA;AAAA,UAErD,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBACC,MAAA;AAAA,gBACA,IAAA;AAAA,gBACA,GAAA;AAAA,gBACA,MAAA;AAAA,gBACA,MAAA;AAAA,gBACA,WAAW,UAAA,EAAY;AAAA;AAAA,aACzB;AAAA,4BACA,GAAA,CAACA,UAAA,CAAI,WAAA,EAAJ,EAAgB;AAAA;AAAA;AAAA;AACnB;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { PinInput as Ark } from \"@ark-ui/react/pin-input\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentProps, FocusEvent, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { type FieldProps, FieldShell, fieldA11yProps } from \"../field/field\"\nimport { type InputSize, shellChrome, shellVariants } from \"../input/input\"\n\n/**\n * PinInput — a row of single-character cells for one-time codes, PINs, and\n * confirmation tokens, on Ark UI's PinInput machine. Each cell is a real\n * `<input>`; the machine handles autofocus advance, paste-to-fill, backspace\n * navigation, masking, and `otp` autocomplete, and a `HiddenInput` backs form\n * submission.\n *\n * - Value is a single `string` here (one char per cell): the machine speaks\n * `string[]`, but `value` / `defaultValue` take a string and `onChange` /\n * `onComplete` hand one back.\n * - Like the rest of the family it carries its own `label` / `description` /\n * `error` / `required` via [`Field`](/docs/field); `error` flips the cells\n * to the invalid (red) state, or set `invalid` directly.\n * - `onComplete` fires once every cell is filled.\n * - The row of cells is a `role=\"group\"` named by `label`; each cell keeps its own\n * position name (\"pin code 1 of 6\"), which `translations.inputLabel` replaces.\n *\n * Cells reuse the shared shell tokens, so PinInput sits visually with the rest\n * of the family; palette rides on `data-color` (the shell's focus halo is a\n * fixed `brand-500`, so nothing tints today).\n */\n\n/** Single PIN cell — the shared shell chrome squared off per `size`. */\nexport const pinCell = cva(\n [\n ...shellChrome,\n ...shellVariants.default,\n \"appearance-none outline-none\",\n \"text-center tabular-nums aspect-square\",\n ],\n {\n variants: {\n size: {\n xs: \"size-7 text-xs\",\n sm: \"size-8 text-sm\",\n md: \"size-9 text-md\",\n lg: \"size-10 text-lg\",\n xl: \"size-12 text-xl\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nexport type PinCellVariants = VariantProps<typeof pinCell>\n\ntype PinInputClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The control row wrapping the cells (also targeted by `className`). */\n root?: string\n /** Each cell `<input>`. */\n input?: string\n}\n\n/** Ark's own `translations` prop type, derived structurally rather than imported by name —\n * `IntlTranslations` lives in `@zag-js/pin-input`, a transitive dependency of the\n * `@ark-ui/react` peer dep. All-optional: an unset key keeps Ark's English default. */\nexport type PinInputTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\nexport type PinInputProps = Pick<FieldProps, \"label\" | \"description\" | \"error\" | \"required\"> &\n WithTestId & {\n /** Controlled value — one character per cell. */\n value?: string\n /** Uncontrolled initial value. */\n defaultValue?: string\n /** Fires with the current joined value on every change. */\n onChange?: (value: string) => void\n /** Fires with the joined value once every cell is filled. */\n onComplete?: (value: string) => void\n /** Number of cells to render. */\n length: number\n /** Use `autocomplete=\"one-time-code\"` so OS-level OTP autofill works. */\n otp?: boolean\n /** Mask the entered characters like a password field. */\n mask?: boolean\n /** Which characters each cell accepts. */\n type?: \"numeric\" | \"alphanumeric\" | \"alphabetic\"\n /** Placeholder shown in each empty cell. */\n placeholder?: string\n /** Field name for native form submission. */\n name?: string\n /** Red invalid state; OR'd with `error`. */\n invalid?: boolean\n /** Dims and disables the cells. */\n disabled?: boolean\n /** Keeps full contrast but blocks edits. */\n readOnly?: boolean\n size?: InputSize\n /** Accent palette. The shell's focus halo stays `brand-500` regardless. */\n color?: Color\n /**\n * Each cell's accessible name. `inputLabel(index, length)` gets the 0-based cell index and\n * the cell count; it defaults to Ark's English \"pin code 1 of 6\".\n */\n translations?: PinInputTranslations\n /** Explicit id for label association. */\n id?: string\n /** Lands on the first cell for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the first cell; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n className?: string\n classNames?: PinInputClassNames\n }\n\n/**\n * The cells and the row that holds them, split out so they read the `Field` context from\n * *inside* `FieldShell` — `PinInput` itself renders that shell. There is no single labelable\n * element (the `HiddenInput` that would take the label's `for` is `aria-hidden`), so the row is a\n * `group` named by the field's label, and each cell keeps its own position name but is described\n * by the field's description, or by its error once invalid.\n */\nconst PinInputCells = ({\n length,\n size,\n ref,\n onBlur,\n testId,\n className,\n}: Pick<PinInputProps, \"length\" | \"size\" | \"ref\" | \"onBlur\" | \"testId\"> & {\n className?: string\n}) => {\n const { \"aria-labelledby\": labelledBy, ...described } = fieldA11yProps(useFieldContext())\n return (\n <Ark.Control role=\"group\" aria-labelledby={labelledBy} className=\"flex items-center gap-2\">\n {Array.from({ length }).map((_, i) => (\n <Ark.Input\n // The cell list is fixed-length and index-keyed by design.\n // biome-ignore lint/suspicious/noArrayIndexKey: stable positional cells\n key={i}\n index={i}\n ref={i === 0 ? ref : undefined}\n onBlur={i === 0 ? onBlur : undefined}\n {...described}\n {...props({ \"data-testid\": testId && `${testId}-${i}` })}\n className={cn(pinCell({ size }), className)}\n />\n ))}\n </Ark.Control>\n )\n}\n\nexport const PinInput = ({\n value,\n defaultValue,\n onChange,\n onComplete,\n length,\n otp,\n mask,\n type,\n placeholder = \"•\",\n name,\n invalid,\n disabled,\n readOnly,\n required,\n label,\n description,\n error,\n size = \"md\",\n color,\n translations,\n id,\n ref,\n onBlur,\n className,\n classNames,\n testId,\n}: PinInputProps) => {\n // Drive the red state independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n // A row of cells: nothing carries the label's `for` id; the row's `aria-labelledby` names it.\n composite\n >\n <Ark.Root\n // The machine speaks `string[]` (one char per cell); bridge the kit's\n // single-string value at the edge.\n value={value != null ? [...value] : undefined}\n defaultValue={defaultValue != null ? [...defaultValue] : undefined}\n onValueChange={onChange ? (details) => onChange(details.valueAsString) : undefined}\n onValueComplete={onComplete ? (details) => onComplete(details.valueAsString) : undefined}\n count={length}\n otp={otp}\n mask={mask}\n type={type}\n placeholder={placeholder}\n name={name}\n translations={translations}\n {...props({ invalid: isInvalid, disabled, readOnly, required })}\n ids={id ? { root: id } : undefined}\n data-color={color}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\"relative\", className, classNames?.root)}\n >\n <PinInputCells\n length={length}\n size={size}\n ref={ref}\n onBlur={onBlur}\n testId={testId}\n className={classNames?.input}\n />\n <Ark.HiddenInput />\n </Ark.Root>\n </FieldShell>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/pin-input/pin-input.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;AA0CO,IAAM,OAAA,GAAU,GAAA;AAAA,EACrB;AAAA,IACE,GAAG,WAAA;AAAA,IACH,GAAG,aAAA,CAAc,OAAA;AAAA,IACjB,8BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,iBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC,CAAA;AAuEA,IAAM,gBAAgB,CAAC;AAAA,EACrB,MAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,EAAE,mBAAmB,UAAA,EAAY,GAAG,WAAU,GAAI,cAAA,CAAe,iBAAiB,CAAA;AACxF,EAAA,2BACGA,UAAA,CAAI,OAAA,EAAJ,EAAY,IAAA,EAAK,OAAA,EAAQ,mBAAiB,UAAA,EAAY,SAAA,EAAU,2BAC9D,QAAA,EAAA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAE,GAAA,CAAI,CAAC,GAAG,CAAA,qBAC9B,GAAA;AAAA,IAACA,UAAA,CAAI,KAAA;AAAA,IAAJ;AAAA,MAIC,KAAA,EAAO,CAAA;AAAA,MACP,GAAA,EAAK,CAAA,KAAM,CAAA,GAAI,GAAA,GAAM,MAAA;AAAA,MACrB,MAAA,EAAQ,CAAA,KAA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,CAAI,IAAA;AAAA,QAAJ;AAAA,UAGC,OAAO,KAAA,IAAS,IAAA,GAAO,CAAC,GAAG,KAAK,CAAA,GAAI,MAAA;AAAA,UACpC,cAAc,YAAA,IAAgB,IAAA,GAAO,CAAC,GAAG,YAAY,CAAA,GAAI,MAAA;AAAA,UACzD,eAAe,QAAA,GAAW,CAAC,YAAY,QAAA,CAAS,OAAA,CAAQ,aAAa,CAAA,GAAI,MAAA;AAAA,UACzE,iBAAiB,UAAA,GAAa,CAAC,YAAY,UAAA,CAAW,OAAA,CAAQ,aAAa,CAAA,GAAI,MAAA;AAAA,UAC/E,KAAA,EAAO,MAAA;AAAA,UACP,GAAA;AAAA,UACA,IAAA;AAAA,UACA,IAAA;AAAA,UACA,WAAA;AAAA,UACA,IAAA;AAAA,UACA,YAAA;AAAA,UACC,GAAG,MAAM,EAAE,OAAA,EAAS,WAAW,QAAA,EAAU,UAAA,EAAY,QAAA,EAAU,QAAA,EAAU,CAAA;AAAA,UAC1E,GAAA,EAAK,EAAA,GAAK,EAAE,IAAA,EAAM,IAAG,GAAI,MAAA;AAAA,UACzB,YAAA,EAAY,KAAA;AAAA,UAGZ,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAA,EAAW,YAAY,IAAI,CAAA;AAAA,UAErD,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBACC,MAAA;AAAA,gBACA,IAAA;AAAA,gBACA,GAAA;AAAA,gBACA,MAAA;AAAA,gBACA,MAAA;AAAA,gBACA,WAAW,UAAA,EAAY;AAAA;AAAA,aACzB;AAAA,4BACA,GAAA,CAACA,UAAA,CAAI,WAAA,EAAJ,EAAgB;AAAA;AAAA;AAAA;AACnB;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["\"use client\"\n\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { PinInput as Ark } from \"@ark-ui/react/pin-input\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentProps, FocusEvent, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type FieldProps,\n FieldShell,\n fieldA11yProps,\n useInheritedDisabled,\n useInheritedInvalid,\n} from \"../field/field\"\nimport { type InputSize, shellChrome, shellVariants } from \"../input/input\"\n\n/**\n * PinInput — a row of single-character cells for one-time codes, PINs, and\n * confirmation tokens, on Ark UI's PinInput machine. Each cell is a real\n * `<input>`; the machine handles autofocus advance, paste-to-fill, backspace\n * navigation, masking, and `otp` autocomplete, and a `HiddenInput` backs form\n * submission.\n *\n * - Value is a single `string` here (one char per cell): the machine speaks\n * `string[]`, but `value` / `defaultValue` take a string and `onChange` /\n * `onComplete` hand one back.\n * - Like the rest of the family it carries its own `label` / `description` /\n * `error` / `required` via [`Field`](/docs/field); `error` flips the cells\n * to the invalid (red) state, or set `invalid` directly.\n * - `onComplete` fires once every cell is filled.\n * - The row of cells is a `role=\"group\"` named by `label`; each cell keeps its own\n * position name (\"pin code 1 of 6\"), which `translations.inputLabel` replaces.\n *\n * Cells reuse the shared shell tokens, so PinInput sits visually with the rest\n * of the family; palette rides on `data-color` (the shell's focus halo is a\n * fixed `brand-500`, so nothing tints today).\n */\n\n/** Single PIN cell — the shared shell chrome squared off per `size`. */\nexport const pinCell = cva(\n [\n ...shellChrome,\n ...shellVariants.default,\n \"appearance-none outline-none\",\n \"text-center tabular-nums aspect-square\",\n ],\n {\n variants: {\n size: {\n xs: \"size-7 text-xs\",\n sm: \"size-8 text-sm\",\n md: \"size-9 text-md\",\n lg: \"size-10 text-lg\",\n xl: \"size-12 text-xl\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nexport type PinCellVariants = VariantProps<typeof pinCell>\n\ntype PinInputClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The control row wrapping the cells (also targeted by `className`). */\n root?: string\n /** Each cell `<input>`. */\n input?: string\n}\n\n/** Ark's own `translations` prop type, derived structurally rather than imported by name —\n * `IntlTranslations` lives in `@zag-js/pin-input`, a transitive dependency of the\n * `@ark-ui/react` peer dep. All-optional: an unset key keeps Ark's English default. */\nexport type PinInputTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\nexport type PinInputProps = Pick<FieldProps, \"label\" | \"description\" | \"error\" | \"required\"> &\n WithTestId & {\n /** Controlled value — one character per cell. */\n value?: string\n /** Uncontrolled initial value. */\n defaultValue?: string\n /** Fires with the current joined value on every change. */\n onChange?: (value: string) => void\n /** Fires with the joined value once every cell is filled. */\n onComplete?: (value: string) => void\n /** Number of cells to render. */\n length: number\n /** Use `autocomplete=\"one-time-code\"` so OS-level OTP autofill works. */\n otp?: boolean\n /** Mask the entered characters like a password field. */\n mask?: boolean\n /** Which characters each cell accepts. */\n type?: \"numeric\" | \"alphanumeric\" | \"alphabetic\"\n /** Placeholder shown in each empty cell. */\n placeholder?: string\n /** Field name for native form submission. */\n name?: string\n /** Red invalid state; OR'd with `error`. */\n invalid?: boolean\n /** Dims and disables the cells. */\n disabled?: boolean\n /** Keeps full contrast but blocks edits. */\n readOnly?: boolean\n size?: InputSize\n /** Accent palette. The shell's focus halo stays `brand-500` regardless. */\n color?: Color\n /**\n * Each cell's accessible name. `inputLabel(index, length)` gets the 0-based cell index and\n * the cell count; it defaults to Ark's English \"pin code 1 of 6\".\n */\n translations?: PinInputTranslations\n /** Explicit id for label association. */\n id?: string\n /** Lands on the first cell for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the first cell; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n className?: string\n classNames?: PinInputClassNames\n }\n\n/**\n * The cells and the row that holds them, split out so they read the `Field` context from\n * *inside* `FieldShell` — `PinInput` itself renders that shell. There is no single labelable\n * element (the `HiddenInput` that would take the label's `for` is `aria-hidden`), so the row is a\n * `group` named by the field's label, and each cell keeps its own position name but is described\n * by the field's description, or by its error once invalid.\n */\nconst PinInputCells = ({\n length,\n size,\n ref,\n onBlur,\n testId,\n className,\n}: Pick<PinInputProps, \"length\" | \"size\" | \"ref\" | \"onBlur\" | \"testId\"> & {\n className?: string\n}) => {\n const { \"aria-labelledby\": labelledBy, ...described } = fieldA11yProps(useFieldContext())\n return (\n <Ark.Control role=\"group\" aria-labelledby={labelledBy} className=\"flex items-center gap-2\">\n {Array.from({ length }).map((_, i) => (\n <Ark.Input\n // The cell list is fixed-length and index-keyed by design.\n // biome-ignore lint/suspicious/noArrayIndexKey: stable positional cells\n key={i}\n index={i}\n ref={i === 0 ? ref : undefined}\n onBlur={i === 0 ? onBlur : undefined}\n {...described}\n {...props({ \"data-testid\": testId && `${testId}-${i}` })}\n className={cn(pinCell({ size }), className)}\n />\n ))}\n </Ark.Control>\n )\n}\n\nexport const PinInput = ({\n value,\n defaultValue,\n onChange,\n onComplete,\n length,\n otp,\n mask,\n type,\n placeholder = \"•\",\n name,\n invalid,\n disabled,\n readOnly,\n required,\n label,\n description,\n error,\n size = \"md\",\n color,\n translations,\n id,\n ref,\n onBlur,\n className,\n classNames,\n testId,\n}: PinInputProps) => {\n // Ark's machine reads only a `Field`, so an unlabelled `PinInput` (no shell\n // of its own) takes an enclosing `Fieldset`'s state here.\n const isDisabled = useInheritedDisabled(disabled)\n // Drive the red state independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = useInheritedInvalid(invalid || error != null)\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={isDisabled}\n size={size}\n className={classNames?.field}\n // A row of cells: nothing carries the label's `for` id; the row's `aria-labelledby` names it.\n composite\n >\n <Ark.Root\n // The machine speaks `string[]` (one char per cell); bridge the kit's\n // single-string value at the edge.\n value={value != null ? [...value] : undefined}\n defaultValue={defaultValue != null ? [...defaultValue] : undefined}\n onValueChange={onChange ? (details) => onChange(details.valueAsString) : undefined}\n onValueComplete={onComplete ? (details) => onComplete(details.valueAsString) : undefined}\n count={length}\n otp={otp}\n mask={mask}\n type={type}\n placeholder={placeholder}\n name={name}\n translations={translations}\n {...props({ invalid: isInvalid, disabled: isDisabled, readOnly, required })}\n ids={id ? { root: id } : undefined}\n data-color={color}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\"relative\", className, classNames?.root)}\n >\n <PinInputCells\n length={length}\n size={size}\n ref={ref}\n onBlur={onBlur}\n testId={testId}\n className={classNames?.input}\n />\n <Ark.HiddenInput />\n </Ark.Root>\n </FieldShell>\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-input.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"pin-input.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OA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,CAAA;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;OAGG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,kDAAkD;IAClD,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;IAC3B,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC,CAAA;AAuCH,eAAO,MAAM,QAAQ,4OA2BlB,aAAa,gCAqDf,CAAA"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { Popover } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
export { Popover } from '../../chunk-YUVKROMA.js';
|
|
3
|
+
import '../../chunk-TPOV3OCC.js';
|
|
4
|
+
import '../../chunk-SI7C3W5M.js';
|
|
5
|
+
import '../../chunk-HBWV5EPU.js';
|
|
6
|
+
import '../../chunk-OBSZ4NE2.js';
|
|
4
7
|
import '../../chunk-V6PY7C6S.js';
|
|
5
8
|
import '../../chunk-SLUOF7XW.js';
|
|
9
|
+
import '../../chunk-PQZSTI3R.js';
|
|
6
10
|
import '../../chunk-PMUCGFY5.js';
|
|
7
11
|
import '../../chunk-BUIHQJGE.js';
|
|
8
12
|
import '../../chunk-WYCMIIRR.js';
|
|
13
|
+
import '../../chunk-C6NVU4F7.js';
|
|
9
14
|
import '../../chunk-GIPQUKCN.js';
|
|
10
15
|
import '../../chunk-4ASNIDV7.js';
|
|
11
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Popover as ArkPopover } from "@ark-ui/react/popover";
|
|
2
|
-
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from "react";
|
|
3
3
|
import type { NoAsChild } from "../../lib/as-child";
|
|
4
4
|
import type { UnavailableProps } from "../../lib/available-if";
|
|
5
5
|
import { type LogicalPosition, type Placement, type PlacementProps } from "../../lib/placement";
|
|
@@ -19,25 +19,50 @@ export declare const popoverChrome: string;
|
|
|
19
19
|
/** Outer chrome for the machine-driven listboxes (Combobox / Select / Autocomplete
|
|
20
20
|
* / MultiSelect): border, surface, shadow, and the open/close animation. It's a
|
|
21
21
|
* rounded **clipping** wrapper (`overflow-hidden`), NOT the scroller — the inner
|
|
22
|
-
* `
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* `ListboxScrollArea` scrolls, and this clip rounds its corners. Border + clip on
|
|
23
|
+
* one element (like `popoverPanel`) keep the border whole, and `data-state` rides
|
|
24
|
+
* here so the whole box animates in/out and unmounts cleanly — no eaten corner,
|
|
25
|
+
* no floating frame on close. */
|
|
26
26
|
export declare const popoverContent: string;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* scrolling is routed here via `scrollHighlightedIntoView` (the root's
|
|
32
|
-
* `scrollToIndexFn`). */
|
|
27
|
+
/** The scroller of the machine-driven listboxes: `ListboxScrollArea`'s viewport,
|
|
28
|
+
* capped at 16rem via `--available-height`. It carries the list's padding, so
|
|
29
|
+
* the scroll padding matches the edges, and has no border/radius of its own:
|
|
30
|
+
* `popoverContent`'s clip rounds it. */
|
|
33
31
|
export declare const popoverList: (props?: ({
|
|
34
32
|
withPaddingTop?: boolean | null | undefined;
|
|
35
33
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
export type ListboxScrollAreaProps = {
|
|
35
|
+
/** Classes for the scroller (the viewport), merged over `popoverList`. */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Pads the top edge too; off when something sits flush above the list. */
|
|
38
|
+
withPaddingTop?: boolean;
|
|
39
|
+
/** The scroller, for a host that watches or drives its scroll position. */
|
|
40
|
+
viewportRef?: Ref<HTMLDivElement>;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The scroll frame of the machine-driven listboxes: a `ScrollArea` whose viewport
|
|
45
|
+
* is the scroller, so a long list shows the kit's bars rather than the OS's.
|
|
46
|
+
*
|
|
47
|
+
* - The viewport stays out of the tab order (`tabIndex={-1}`): the input or
|
|
48
|
+
* trigger that owns focus scrolls it, by moving the highlight.
|
|
49
|
+
* - Scrolling the highlight into view goes through `scrollHighlightedIntoView`
|
|
50
|
+
* (the root's `scrollToIndexFn`): a native `scrollIntoView` walks up to the
|
|
51
|
+
* nearest scroller, which is this viewport.
|
|
52
|
+
* - A focused list (Select's) is ringed on the frame, not on itself: inside the
|
|
53
|
+
* viewport, its own ring would scroll away and be clipped.
|
|
54
|
+
* - A press on the bar is kept from moving focus (`preventDefault` in the capture
|
|
55
|
+
* phase, before the machine's track handler stops the event), as a native
|
|
56
|
+
* scrollbar never takes it: otherwise the input would blur and the list close.
|
|
57
|
+
*/
|
|
58
|
+
export declare const ListboxScrollArea: ({ className, withPaddingTop, viewportRef, children, }: ListboxScrollAreaProps) => import("react").JSX.Element;
|
|
59
|
+
/** The listbox inside `ListboxScrollArea`: a column of options. */
|
|
60
|
+
export declare const listboxList = "flex grow flex-col focus-visible:outline-none";
|
|
61
|
+
/** Scroll the highlighted option into view from inside the `ListboxScrollArea`
|
|
62
|
+
* viewport. Wired as the combobox/select root's `scrollToIndexFn` so the machine
|
|
63
|
+
* routes scrolling through here instead of its native path — which early-returns
|
|
64
|
+
* unless the (`overflow-hidden`) Content is itself scrollable. Native
|
|
65
|
+
* `scrollIntoView` walks to the nearest scrollable ancestor, i.e. the viewport. */
|
|
41
66
|
export declare const scrollHighlightedIntoView: ({ getElement, }: {
|
|
42
67
|
getElement: () => HTMLElement | null;
|
|
43
68
|
}) => void | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAqB,MAAM,uBAAuB,CAAA;AAGhF,OAAO,EACL,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAqB,MAAM,uBAAuB,CAAA;AAGhF,OAAO,EACL,KAAK,wBAAwB,EAI7B,KAAK,SAAS,EACd,KAAK,GAAG,EAMT,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAW9D,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,cAAc,EAEpB,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAanD;;;;;;;;;;gFAUgF;AAChF,eAAO,MAAM,aAAa,QAOzB,CAAA;AAED;;;;;;kCAMkC;AAClC,eAAO,MAAM,cAAc,QAA4D,CAAA;AAEvF;;;yCAGyC;AACzC,eAAO,MAAM,WAAW;;8EAavB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,0EAA0E;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GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG,UAAU,CAAA;AAE7E;;;4CAG4C;AAC5C,QAAA,MAAM,MAAM,mCAAoC,kBAAkB,gCAEjE,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG,UAAU,CAAA;AAE3E,+EAA+E;AAC/E,QAAA,MAAM,IAAI,mCAAoC,gBAAgB,gCAM7D,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,WAAW,CAAA;AAEvD,eAAO,MAAM,OAAO;;;;IAIlB;;;6CAGyC;;;;;;CAM1C,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type GradientDir, type GradientProps, Progress, type ProgressProps, type ProgressSize, type ProgressVariant, } from "./progress";
|
|
1
|
+
export { type GradientDir, type GradientProps, type MeterZone, Progress, type ProgressProps, type ProgressSize, type ProgressVariant, } from "./progress";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { Progress } from '../../chunk-
|
|
2
|
+
export { Progress } from '../../chunk-6YRGP6PS.js';
|
|
3
|
+
import '../../chunk-X6RB74JN.js';
|
|
3
4
|
import '../../chunk-SKPM2FRX.js';
|
|
5
|
+
import '../../chunk-OBSZ4NE2.js';
|
|
6
|
+
import '../../chunk-PQZSTI3R.js';
|
|
4
7
|
import '../../chunk-WYCMIIRR.js';
|
|
5
8
|
import '../../chunk-4ASNIDV7.js';
|
|
6
9
|
//# sourceMappingURL=index.js.map
|