@42-central/ui-react 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/timeline/index.js +8 -1
- package/dist/components/timeline/index.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts.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/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/timeline/timeline.test.tsx +22 -0
- package/src/components/timeline/timeline.tsx +10 -1
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/date-picker/date-time-text.ts","../src/components/date-picker/date-picker.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,SAAA,GAAY,CAAC,EAAE,MAAA,EAAQ,SAAA,EAAW,WAAA,EAAY,EAAwB,QAAA,KAC1E,IAAI,IAAA,CAAK,cAAA,CAAe,MAAA,EAAQ;AAAA,EAC9B,IAAA,EAAM,SAAA;AAAA,EACN,KAAA,EAAO,SAAA;AAAA,EACP,GAAA,EAAK,SAAA;AAAA,EACL,IAAA,EAAM,SAAA;AAAA,EACN,MAAA,EAAQ,SAAA;AAAA,EACR,MAAA,EAAQ,cAAc,SAAA,GAAY,MAAA;AAAA,EAClC,SAAA;AAAA;AAAA,EAEA,eAAA,EAAiB,MAAA;AAAA,EACjB;AACF,CAAC,CAAA;AAEI,IAAM,kBAAA,GAAqB,CAChC,KAAA,EACA,OAAA,EACA,QAAA,KACW,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AA,EAAG,KAAA,EAAO,IAAI,CAAA,GAAI;AAAA;AAAA;AACxE,eAAA,EACF,CAAA,mBAEA,GAAA;AAAA,gBAAC,OAAA;AAAA,gBAAA;AAAA,kBACC,IAAA,EAAK,QAAA;AAAA,kBACL,IAAA;AAAA,kBACA,KAAA,EAAO,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,GAAI,kBAAA,CAAmB,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,EAAG,KAAA,EAAO,IAAI,CAAA,GAAI;AAAA;AAAA,eACxE;AAAA,aAAA,EAEN,CAAA,EAEJ;AAAA;AAAA;AAAA;AACF;AAAA,GACF;AAEJ,CAAA;AAEO,IAAM,UAAA,GAAa,MAAA,CAAO,MAAA,CAAO,cAAA,EAAgB;AAAA,EACtD,MAAMA,YAAA,CAAI,IAAA;AAAA,EACV,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,OAAOA,YAAA,CAAI,KAAA;AAAA,EACX,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,cAAcA,YAAA,CAAI,YAAA;AAAA,EAClB,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,OAAA,EAAS,WAAA;AAAA,EACT,QAAA,EAAU,YAAA;AAAA,EACV,SAAA,EAAW,OAAA;AAAA,EACX,YAAA;AAAA,EACA,QAAQ,OAAA,CAAQ;AAClB,CAAC","file":"chunk-6MVFCS46.js","sourcesContent":["import { CalendarDateTime, type DateValue } from \"@internationalized/date\"\nimport { calendarValueToDate } from \"../../lib/date-value\"\nimport {\n dayPeriodLabels,\n fromDisplayHour,\n type HourCycle,\n is12Hour,\n} from \"../time-input/hour-cycle\"\n\n/**\n * The typed text format for `typeable` + `withTime` — all-numeric, in the locale's own field order\n * (`10/20/2026, 02:30 PM` en-US, `20/10/2026 14:30` fr-FR), so what the field shows is exactly\n * what can be typed back. Ark's own `Input` part can't carry a time: it strips every character\n * but digits and the date separator while typing, and re-applies the previous value's time over\n * whatever its `parse` returns (`preserveTime`) — so `DatePicker` renders its own `<input>` on\n * top of these two helpers instead.\n */\n\ntype DateTimeTextOptions = {\n locale: string\n hourCycle: HourCycle\n withSeconds?: boolean\n}\n\nconst formatter = ({ locale, hourCycle, withSeconds }: DateTimeTextOptions, timeZone: string) =>\n new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: withSeconds ? \"2-digit\" : undefined,\n hourCycle,\n // `parseDateTimeText` reads ASCII digits; keep the display in the same digits it can parse.\n numberingSystem: \"latn\",\n timeZone,\n })\n\nexport const formatDateTimeText = (\n value: DateValue,\n options: DateTimeTextOptions,\n timeZone: string,\n): string => formatter(options, timeZone).format(calendarValueToDate(value, timeZone))\n\ntype NumericField = \"year\" | \"month\" | \"day\" | \"hour\" | \"minute\" | \"second\"\nconst NUMERIC_FIELDS = new Set<string>([\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\"])\n\n/** The locale's numeric field order, read off the same formatter `formatDateTimeText` uses. */\nconst fieldOrder = (options: DateTimeTextOptions): NumericField[] =>\n formatter(options, \"UTC\")\n .formatToParts(new Date(Date.UTC(2001, 10, 22, 13, 44, 55)))\n .map((part) => part.type)\n .filter((type): type is NumericField => NUMERIC_FIELDS.has(type))\n\n/** \"AM\"/\"PM\" from the locale's own labels (`dayPeriodLabels`), falling back to a Latin `a`/`p`. */\nconst readPeriod = (text: string, locale: string): \"AM\" | \"PM\" | undefined => {\n const lower = text.toLowerCase()\n const labels = dayPeriodLabels(locale)\n if (lower.includes(labels.PM.toLowerCase())) return \"PM\"\n if (lower.includes(labels.AM.toLowerCase())) return \"AM\"\n if (/\\bp\\.?\\s?m?\\.?\\b/.test(lower)) return \"PM\"\n if (/\\ba\\.?\\s?m?\\.?\\b/.test(lower)) return \"AM\"\n return undefined\n}\n\nconst inRange = (n: number, min: number, max: number) => Number.isInteger(n) && n >= min && n <= max\n\n/**\n * Parse typed text back into a `CalendarDateTime`. Reads digit runs in the locale's field order\n * (so any separator works — `20/10/2026 14:30`, `20.10.2026 14h30` — but run-together digits like\n * `1430` read as one number); the\n * date is required, the time is optional — omitted fields keep `fallbackTime` (the current\n * value's), else midnight. In 12h mode a missing period reads AM, and a 13–23 hour is taken as\n * 24h as-typed; under `h24`, `24` is midnight. Returns `undefined` for anything that isn't a\n * real date/time (`02/30/2026`, `25:00`), never a silently constrained one.\n */\nexport const parseDateTimeText = (\n text: string,\n options: DateTimeTextOptions,\n fallbackTime?: { hour: number; minute: number; second: number },\n): CalendarDateTime | undefined => {\n const numbers = text.match(/\\d+/g)?.map(Number) ?? []\n const order = fieldOrder(options)\n const field = (name: NumericField) => {\n const index = order.indexOf(name)\n return index === -1 ? undefined : numbers[index]\n }\n\n const rawYear = field(\"year\")\n const month = field(\"month\")\n const day = field(\"day\")\n if (rawYear === undefined || month === undefined || day === undefined) return undefined\n const year = rawYear < 100 ? 2000 + rawYear : rawYear\n\n const typedHour = field(\"hour\")\n let hour = typedHour ?? fallbackTime?.hour ?? 0\n if (typedHour !== undefined && is12Hour(options.hourCycle) && inRange(typedHour, 0, 12)) {\n hour = fromDisplayHour(typedHour, readPeriod(text, options.locale) ?? \"AM\", options.hourCycle)\n } else if (typedHour === 24 && options.hourCycle === \"h24\") {\n // `h24` shows midnight as `24` (and so formats it that way) — read it back as hour 0.\n hour = 0\n }\n const minute = field(\"minute\") ?? (typedHour === undefined ? fallbackTime?.minute : 0) ?? 0\n const second = field(\"second\") ?? (typedHour === undefined ? fallbackTime?.second : 0) ?? 0\n\n if (!inRange(month, 1, 12) || !inRange(day, 1, 31) || !inRange(year, 1, 9999)) return undefined\n if (!inRange(hour, 0, 23) || !inRange(minute, 0, 59) || !inRange(second, 0, 59)) return undefined\n const value = new CalendarDateTime(year, month, day, hour, minute, second)\n // `CalendarDateTime` constrains out-of-range days (Feb 30 → Feb 28) instead of rejecting them.\n return value.day === day ? value : undefined\n}\n","\"use client\"\n\nimport {\n DatePicker as Ark,\n type DatePickerDateRangePreset as DateRangePreset,\n type DateValue,\n type DatePickerDateView as DateView,\n type UseDatePickerContext,\n} from \"@ark-ui/react/date-picker\"\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport {\n DateFormatter,\n endOfYear,\n startOfMonth,\n startOfYear,\n toCalendarDateTime,\n today,\n} from \"@internationalized/date\"\nimport { type FocusEvent, type ReactNode, type Ref, useId, useRef, useState } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport type { DatePredicate } from \"../../lib/date-predicates\"\nimport {\n calendarValueToDate,\n type DateRangeValue,\n type DateUnit,\n dateToArkValue,\n fromArkValues,\n snapBound,\n snapToUnit,\n toArkValues,\n} from \"../../lib/date-value\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport type { FormControlProps } from \"../../lib/form-control\"\nimport { capitalize } from \"../../lib/graphemes\"\nimport { useLocale, useTimeZone } from \"../../lib/intl\"\nimport { useMergedRefs } from \"../../lib/merge-refs\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { NestedLayer, useTourRaised } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Button } from \"../button/button\"\nimport { type CalendarTranslations, resolveCalendarTranslations } from \"../calendar/calendar\"\nimport {\n CalendarBody,\n type CalendarBodyClassNames,\n type CalendarIcons,\n calendarGridWidth,\n} from \"../calendar/calendar-body\"\nimport { CalendarZoneSync, hashArkValues } from \"../calendar/calendar-zone-sync\"\nimport {\n type FieldProps,\n FieldShell,\n fieldA11yProps,\n useInheritedDisabled,\n useInheritedInvalid,\n} from \"../field/field\"\nimport {\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n placeholderColor,\n shellGap,\n} from \"../input/input\"\nimport { CalendarIcon, CloseIcon } from \"../popover/icons\"\nimport { Popover, popoverClearTrigger, popoverPanel } from \"../popover/popover\"\nimport {\n fromDisplayHour,\n type HourCycle,\n resolveHourCycle,\n toDisplayHour,\n} from \"../time-input/hour-cycle\"\nimport { TimeRow, type TimeRowTranslations, timeRowMinWidth } from \"../time-input/time-row\"\nimport { formatDateTimeText, parseDateTimeText } from \"./date-time-text\"\n\n/**\n * DatePicker — a trigger + popover calendar on Ark UI's `date-picker` machine, composing\n * `Calendar`'s shared grid module (`calendar-body.tsx`) and `TimeInput`'s shared time row\n * (`time-row.tsx`). `range` and `withTime` cover all four date combinations; `DateRangePicker`,\n * `DateTimePicker`, and `DateTimeRangePicker` are thin named presets pinning those two flags.\n *\n * - Value is a native `Date | null` (or `{ start, end }` under `range`) — the machine's\n * `DateValue` array contract never leaks out; `lib/date-value.ts` is the one conversion\n * boundary both directions go through, exactly as `Calendar` uses it.\n * - `withConfirm` stages the selection in local state; only Apply calls the outer `onChange`,\n * Cancel reverts. Without it, single dates commit + close on pick and ranges commit on the\n * second click (both Ark-native) — except under `withTime`, where a pick commits but keeps\n * the panel open so the time row can still be set (outside click / Escape closes it).\n * - `presets` renders a sidebar of quick-pick shortcuts — range shortcuts (Ark's own\n * `DateRangePreset` union, or a custom `{ range }`) under `range`; single-date shortcuts\n * (a custom `{ date }`) otherwise. `true` resolves to a mode-appropriate default set.\n * - `isDateUnavailable` / `min` / `max` take native `Date`s; pair with `lib/date-predicates.ts`'s\n * helpers (`disablePast()`, `disableWeekends()`, …), re-exported from this same barrel.\n * - `typeable` swaps the plain button trigger for a text input, so a date can be typed (and\n * parsed on blur / Enter) in addition to picked from the calendar — the leading icon becomes a\n * real open-calendar button alongside it. Opt-in (default `false`); single dates only (see\n * the prop's own doc comment). Under `withTime` the input carries the time too\n * (`date-time-text.ts`).\n *\n * <DatePicker label=\"Start date\" value={date} onChange={setDate} clearable />\n * <DateRangePicker withTime presets withConfirm value={range} onChange={setRange} />\n */\n\nconst datePickerPresets = cn(\n \"flex shrink-0 flex-col gap-0.5 border-e p-1\",\n \"border-brand-900/20 dark:border-white/15\",\n)\n\nconst presetTrigger = cn(\n \"w-full cursor-pointer rounded-xs px-2 py-1.5 text-start text-sm whitespace-nowrap transition-colors\",\n \"hover:bg-brand-900/6 dark:hover:bg-white/8\",\n focusStyles({ offset: false }),\n)\n\nconst timePanelLabel = cn(\"text-xs font-medium\", TEXT_COLOR_CLASSES.muted)\n\n/** `typeable`'s leading calendar icon, promoted from a decorative span (the button-trigger case)\n * to a real open-calendar button — same base look as `inputSlot`, plus the family's interactive-\n * icon treatment (compare `popoverClearTrigger`). `outline-none`: the shell's own `:has()` rule\n * (`shellChrome` in `input.tsx`) already rings the *whole* control on this button's focus-visible\n * state, so its own native outline would just double up. */\nconst datePickerIconTrigger = cn(\n inputSlot,\n \"cursor-pointer rounded-xs outline-none transition-colors hover:text-brand-900/70 dark:hover:text-white/80 disabled:cursor-not-allowed\",\n)\n\n/** The main column (calendar + time row footer) has no explicit width of its own, and neither\n * does the popover above it — deliberately, so the popover sizes to its content. But once the\n * time row's Hour/Minute/(Second) fields are `flex-1` (grow to fill the row), that becomes\n * circular: the row wants to size off \"however much space is available,\" and with nothing\n * concrete above it to measure against, browsers resolve a flex container's own intrinsic width\n * generously when it holds `flex-grow` items — the row (and everything above it) ends up far\n * wider than the calendar actually needs, even for a single time row. Giving the column an\n * explicit width tied to the calendar's own geometry (`calendarGridWidth`, shared with\n * `calendar-body.tsx`'s own month/year grids) breaks that circularity: the row now grows to\n * fill a *real* width instead of an ambiguous one.\n *\n * That width is only ever tied to the *calendar* grid, though — under `withTime`, the column\n * must be at least as wide as the time row itself needs (`timeRowMinWidth`), or the same\n * `flex-1` + `min-w-0` fields that motivated a fixed width in the first place shrink below their\n * content size instead of growing: with the AM/PM toggle present at a single month, the\n * calendar-only width is narrower than Hour+Minute+Period need, and the `<input>`s get starved. */\n\nconst pad = (n: number) => String(n).padStart(2, \"0\")\n\n/** Hidden-input serialization. `DateValue#toString()` isn't safe to call directly here: a\n * `CalendarDateTime` (what our own `dateToArkValue` produces for a `defaultValue`/`value` passed\n * in) stringifies with a time, while a plain `CalendarDate` (what a day-grid click produces)\n * stringifies as a clean date — two different formats for the same picked day depending on\n * provenance. Read the wall-calendar fields directly instead. Whether to append the time portion\n * is driven by the picker's own `withTime` flag, not by whether the value happens to carry an\n * `hour` field — a `CalendarDateTime` always has one (even at local midnight), so that structural\n * check can't tell \"date-only\" from \"with time\" apart. */\nexport const serializeDateValue = (\n value: DateValue,\n withTime: boolean,\n /** A month or year picker's value serializes as `YYYY-MM` (the `<input type=\"month\">` format)\n * or `YYYY`, never as its placeholder first day. */\n unit: DateUnit = \"day\",\n): string => {\n if (unit === \"year\") return String(value.year).padStart(4, \"0\")\n if (unit === \"month\") return `${String(value.year).padStart(4, \"0\")}-${pad(value.month)}`\n const date = `${value.year}-${pad(value.month)}-${pad(value.day)}`\n if (!withTime) return date\n const time = \"hour\" in value ? value : { hour: 0, minute: 0, second: 0 }\n return `${date}T${pad(time.hour)}:${pad(time.minute)}:${pad(time.second)}`\n}\n\nexport type DatePickerClassNames = {\n field?: string\n control?: string\n content?: string\n presets?: string\n calendar?: CalendarBodyClassNames\n timePanel?: { hour?: string; minute?: string; second?: string; period?: string }\n footer?: string\n}\n\n/** `value`/`range`-shaped entries are for `range` mode; `date`-shaped entries are for single-date\n * mode. Nothing prevents mixing them for the picker's current mode — the shape you pass is\n * trusted, not validated at runtime (a mismatched entry just doesn't produce useful behavior;\n * `api.setValue`/`getRangePresetValue` are mode-agnostic in the underlying machine). */\nexport type DatePreset =\n | { label: string; value: DateRangePreset }\n | { label: string; range: { start: Date; end: Date } | null }\n | { label: string; date: Date | null }\n\n/** Identifies each entry `getDefaultPresets` builds for `presets={true}`, so a `translations`\n * override can target one label without redefining the whole set. `nextMonth`, `lastYear` and\n * `nextYear` are the month and year pickers' own. */\nexport type DatePickerPresetId =\n | \"today\"\n | \"yesterday\"\n | \"tomorrow\"\n | \"nextWeek\"\n | \"thisWeek\"\n | \"lastWeek\"\n | \"thisMonth\"\n | \"lastMonth\"\n | \"nextMonth\"\n | \"thisYear\"\n | \"lastYear\"\n | \"nextYear\"\n | \"allTime\"\n\n/** One unified `translations` prop rather than one per string source — Ark's own accessible\n * names, the `presets={true}` default labels, and the embedded time row's strings all belong to\n * the same `DatePicker` instance a consumer is localizing. English defaults throughout;\n * unset keys keep their built-in text. */\nexport type DatePickerTranslations = Partial<CalendarTranslations> &\n TimeRowTranslations & {\n /** The `withConfirm` footer's revert button. Default `\"Cancel\"`. */\n cancel?: string\n /** The `withConfirm` footer's commit button. Default `\"Apply\"`. */\n apply?: string\n /** The embedded time row's label under `range` + `withTime` (first row). Default `\"Start time\"`. */\n startTime?: string\n /** The embedded time row's label under `range` + `withTime` (second row). Default `\"End time\"`. */\n endTime?: string\n /** Individual `presets={true}` default-set labels, keyed by id — override just the ones you\n * need without redefining the whole array. Pass your own `DatePreset[]` for full control.\n * Every label but `allTime` (default `\"All time\"`) is already in the locale's words, from\n * `Intl.RelativeTimeFormat` (\"Aujourd’hui\", \"La semaine dernière\"); an override wins. */\n presets?: Partial<Record<DatePickerPresetId, string>>\n }\n\n/** The calendar's icon slots, one prop for the whole picker. */\nexport type DatePickerIcons = CalendarIcons\n\nexport type DatePickerProps<Range extends boolean = false> = FormControlProps<\n Range extends true ? DateRangeValue : Date | null,\n // Widened from `HTMLButtonElement` alone: under `typeable` the focusable element is Ark's\n // `Input` (a real `<input>`), not the button trigger — `ref`/`onBlur` must be able to land on\n // either depending on that prop, since both are the same generic `DatePickerProps`.\n HTMLButtonElement | HTMLInputElement\n> &\n Pick<FieldProps, \"label\" | \"description\" | \"error\" | \"required\"> &\n WithTestId & {\n /** Select a `{ start, end }` range instead of a single date. */\n range?: Range\n /** Adds an embedded HOUR/MINUTE (+ SECOND) time row; the value carries H/M too. */\n withTime?: boolean\n /** Months shown side by side. Default `1`, regardless of `range` — pass `2` to show a full\n * range without paging (matches `Calendar`'s own plain default). */\n numOfMonths?: number\n /** Always render 6 week rows (padding with adjacent-month days) instead of however many the\n * visible month(s) actually span (4–6) — keeps the popover's height constant while\n * navigating between months. */\n fixedWeeks?: boolean\n /** Preset sidebar — range shortcuts under `range`, single-date shortcuts otherwise. `true`\n * renders a mode-appropriate default set; an array is fully custom. See `DatePreset`. */\n presets?: DatePreset[] | boolean\n /** Stage the selection; commit only on Apply. Cancel reverts to the last committed value. */\n withConfirm?: boolean\n /** Renders a clear trigger once a value is set; emits `null` (or an all-null range). */\n clearable?: boolean\n /** Restriction predicate over a native `Date`. Compose with `lib/date-predicates.ts`'s helpers.\n * Called with this component's own resolved `timeZone` as its second argument, so a predicate\n * reads the candidate day in the same zone the grid renders it in. Under a month or year\n * `minView` it is asked about each month or year cell instead, as that unit's first day, with\n * the unit (`\"month\"` / `\"year\"`) as a third argument. */\n isDateUnavailable?: DatePredicate\n /** Renders a text input (typing, blur-to-parse, `Enter`-to-commit) alongside the\n * calendar-icon trigger, instead of the plain button-only trigger. Opt-in — default `false`\n * keeps the click-to-open button.\n *\n * Without `withTime` this is Ark's own `Input` anatomy part (a numeric date). Under\n * `withTime` it shows and parses a numeric date + time in the locale's own field order\n * (`10/20/2026, 02:30 PM`, `20/10/2026 14:30`) — typing just a date keeps the current time.\n * `range` (cross-field validation across two inputs) is out of scope and falls back to the\n * button trigger. */\n typeable?: boolean\n min?: Date\n max?: Date\n /** The lowest view the popover reaches, and so what one pick commits. `\"day\"` (default)\n * picks a day; `\"month\"` / `\"year\"` make it a month or year picker (`MonthPicker`,\n * `YearPicker`): the value is that month's or year's first day, the trigger shows the month\n * or year, `min`/`max` widen to the whole month or year they fall in, `isDateUnavailable` is\n * asked about each cell, and `withTime` / `typeable` / `numOfMonths` don't apply. */\n minView?: DateView\n maxView?: DateView\n /** Overrides the active locale context. Drives month/day names, first-day-of-week, and the\n * embedded time row's 12h/24h default. */\n locale?: string\n /** Overrides the time zone for every `Date ↔ DateValue` conversion. Resolves\n * **prop → `IntlProvider` → host zone**, through `useTimeZone` like `Calendar` and\n * `Schedule` — **not** Ark's own machine default (`\"UTC\"`). Accepts `\"auto\"` to follow the\n * host zone. */\n timeZone?: string\n /** Force 12-hour or 24-hour display for the embedded time row, overriding the locale default. */\n format?: 12 | 24\n /** Force a specific hour cycle, overriding the locale default and `format`. */\n hourCycle?: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in the embedded time row's empty Hour/Minute/Second fields — see\n * TimeRow's `placeholder`. Default `\"--\"`. */\n timePlaceholder?: string\n /** Overrides built-in English strings — Ark's own accessible names, the `presets={true}`\n * \"All time\" label, Cancel/Apply, Start/End time, and the embedded time row's Hour/Minute/\n * Second/Period labels. The other preset labels already follow `locale`, and an override\n * here still wins over them. Partial — unset keys keep their default. */\n translations?: DatePickerTranslations\n /** Replaces the calendar's default icons: `prev`, `next`, passed through to its grid like\n * `translations`. The kit's chevrons mirror under RTL; an icon passed here is drawn as given. */\n icons?: DatePickerIcons\n /** Placeholder shown while nothing is selected. Default `\"Pick a date\"` (`\"Pick a month\"` /\n * `\"Pick a year\"` under `minView`). */\n placeholder?: string\n /** Inline-start adornment. Defaults to a calendar icon. */\n startSlot?: ReactNode\n size?: Size\n variant?: InputVariant\n /** Render the panel in a Portal so it escapes clipping ancestors.\n * Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n className?: string\n classNames?: DatePickerClassNames\n }\n\n/** `DatePicker`'s own English wording, merged once per render (`presets` one level deeper, in\n * `presetLabels`). \"All time\" is the one non-derivable preset label; every other\n * `presets={true}` label comes from `Intl.RelativeTimeFormat`. */\n/** The trigger's empty-state text per value unit; `placeholder` overrides it. */\nconst DATE_PICKER_PLACEHOLDERS: Record<DateUnit, string> = {\n day: \"Pick a date\",\n month: \"Pick a month\",\n year: \"Pick a year\",\n}\n\n/** The trigger text for a month or year value, from `Intl` in the picker's locale and zone:\n * \"March 2026\" / \"mars 2026\", \"2026\". */\nconst UNIT_FORMAT: Record<\"month\" | \"year\", Intl.DateTimeFormatOptions> = {\n month: { month: \"long\", year: \"numeric\" },\n year: { year: \"numeric\" },\n}\n\nconst DATE_PICKER_DEFAULT_TRANSLATIONS = {\n cancel: \"Cancel\",\n apply: \"Apply\",\n startTime: \"Start time\",\n endTime: \"End time\",\n presets: { allTime: \"All time\" },\n} as const satisfies DatePickerTranslations\n\n/** The `presets={true}` labels: the locale's own words for each relative period\n * (`Intl.RelativeTimeFormat` with `numeric: \"auto\"` — \"Aujourd’hui\", \"La semaine dernière\"),\n * capitalised for a button, then \"All time\" from the defaults, then the consumer's\n * `translations.presets`, which win over both. */\nconst presetLabels = (\n locale: string,\n overrides?: Partial<Record<DatePickerPresetId, string>>,\n): Record<DatePickerPresetId, string> => {\n const relative = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" })\n const say = (value: number, unit: Intl.RelativeTimeFormatUnit) =>\n capitalize(relative.format(value, unit), locale)\n return {\n today: say(0, \"day\"),\n yesterday: say(-1, \"day\"),\n tomorrow: say(1, \"day\"),\n nextWeek: say(1, \"week\"),\n thisWeek: say(0, \"week\"),\n lastWeek: say(-1, \"week\"),\n thisMonth: say(0, \"month\"),\n lastMonth: say(-1, \"month\"),\n nextMonth: say(1, \"month\"),\n thisYear: say(0, \"year\"),\n lastYear: say(-1, \"year\"),\n nextYear: say(1, \"year\"),\n ...DATE_PICKER_DEFAULT_TRANSLATIONS.presets,\n ...overrides,\n }\n}\n\n/** Ark's built-in `DateRangePreset` union has no \"today\" / \"yesterday\" / \"all time\" member\n * (confirmed in `@zag-js/date-utils`'s types) — those three are hand-built here from\n * `today(timeZone)`; the rest map straight to Ark's own string presets. The single-date set\n * (non-`range`) is a different shape entirely, not a trimmed-down copy of the range one — \"This\n * week\"/\"This month\"/etc. are inherently range-shaped and don't collapse to one date. */\nconst getDefaultPresets = (\n range: boolean,\n timeZone: string,\n locale: string,\n overrides?: Partial<Record<DatePickerPresetId, string>>,\n unit: DateUnit = \"day\",\n): DatePreset[] => {\n const now = today(timeZone)\n const toDate = (value: typeof now) => calendarValueToDate(value, timeZone)\n const label = presetLabels(locale, overrides)\n if (unit !== \"day\") return getUnitPresets(range, unit, now, toDate, label)\n if (!range) {\n return [\n { label: label.today, date: toDate(now) },\n { label: label.yesterday, date: toDate(now.subtract({ days: 1 })) },\n { label: label.tomorrow, date: toDate(now.add({ days: 1 })) },\n { label: label.nextWeek, date: toDate(now.add({ days: 7 })) },\n ]\n }\n const yesterday = now.subtract({ days: 1 })\n return [\n { label: label.today, range: { start: toDate(now), end: toDate(now) } },\n { label: label.yesterday, range: { start: toDate(yesterday), end: toDate(yesterday) } },\n { label: label.thisWeek, value: \"thisWeek\" },\n { label: label.lastWeek, value: \"lastWeek\" },\n { label: label.thisMonth, value: \"thisMonth\" },\n { label: label.lastMonth, value: \"lastMonth\" },\n { label: label.thisYear, value: \"thisYear\" },\n { label: label.allTime, range: null },\n ]\n}\n\n/** The month and year pickers' `presets={true}` sets — each value a month's or year's first day.\n * Single: this, last and next month (or year). Range: this year and last year as month (or year)\n * spans, then \"All time\". Ark's own string presets are day spans, so none is used here. */\nconst getUnitPresets = (\n range: boolean,\n unit: \"month\" | \"year\",\n now: ReturnType<typeof today>,\n toDate: (value: ReturnType<typeof today>) => Date,\n label: Record<DatePickerPresetId, string>,\n): DatePreset[] => {\n const shift = (amount: number) =>\n unit === \"month\"\n ? startOfMonth(now).add({ months: amount })\n : startOfYear(now).add({ years: amount })\n if (!range) {\n const [current, previous, following] =\n unit === \"month\"\n ? [label.thisMonth, label.lastMonth, label.nextMonth]\n : [label.thisYear, label.lastYear, label.nextYear]\n return [\n { label: current, date: toDate(shift(0)) },\n { label: previous, date: toDate(shift(-1)) },\n { label: following, date: toDate(shift(1)) },\n ]\n }\n // A whole calendar year, as its first and last month (or as that one year).\n const year = (amount: number) => {\n const start = startOfYear(now).add({ years: amount })\n return { start: toDate(start), end: toDate(snapToUnit(endOfYear(start), unit) as typeof now) }\n }\n return [\n { label: label.thisYear, range: year(0) },\n { label: label.lastYear, range: year(-1) },\n { label: label.allTime, range: null },\n ]\n}\n\nconst PresetsRail = ({\n presets,\n range,\n timeZone,\n locale,\n withConfirm,\n translations,\n unit = \"day\",\n className,\n}: {\n presets: DatePreset[] | boolean\n /** Which default set `presets === true` resolves to — irrelevant once `presets` is a concrete array. */\n range?: boolean\n timeZone: string\n /** Names the `presets === true` periods. Falls back to the `IntlProvider` locale. */\n locale?: string\n withConfirm?: boolean\n /** Overrides individual `presets={true}` default-set labels, keyed by id. No effect on a\n * custom `DatePreset[]`. */\n translations?: Partial<Record<DatePickerPresetId, string>>\n /** The picker's value unit (its `minView`). Picks the `presets === true` set, and snaps every\n * preset's dates to the first day of their month or year, like a picked cell. */\n unit?: DateUnit\n className?: string\n}) => {\n const resolvedLocale = useLocale(locale)\n const resolved =\n presets === true\n ? getDefaultPresets(Boolean(range), timeZone, resolvedLocale, translations, unit)\n : presets === false\n ? []\n : presets\n if (resolved.length === 0) return null\n return (\n <Ark.Context>\n {(api) => (\n <div className={cn(datePickerPresets, className)}>\n {resolved.map((preset) => (\n <button\n key={preset.label}\n type=\"button\"\n // Not `Ark.PresetTrigger`: its own onClick always sends `PRESET.CLICK`, which the\n // machine transitions unconditionally to \"focused\" (closed) regardless of\n // `closeOnSelect` — there's no way to keep it open under `withConfirm`. Resolve the\n // preset's value ourselves and set it via `api.setValue`, which only sets the value\n // (no state-machine transition), then close explicitly only when not staging.\n onClick={() => {\n const values =\n \"value\" in preset\n ? api.getRangePresetValue(preset.value)\n : \"range\" in preset\n ? (toArkValues(preset.range, timeZone) ?? [])\n : (toArkValues(preset.date, timeZone) ?? [])\n api.setValue(values.map((value) => snapToUnit(value, unit)))\n if (!withConfirm) api.setOpen(false)\n }}\n aria-label={preset.label}\n className={presetTrigger}\n >\n {preset.label}\n </button>\n ))}\n </div>\n )}\n </Ark.Context>\n )\n}\n\ntype DisplayTime = {\n hour: number | null\n minute: number | null\n second: number | null\n period: \"AM\" | \"PM\" | null\n}\n\nconst emptyDisplayTime: DisplayTime = { hour: null, minute: null, second: null, period: null }\n\n/** Derive display-space fields (the cycle's own hours, + period) from the machine's own\n * `DateValue` — a plain `CalendarDate` (no time picked yet) has no `hour`, so it reads as all-null. */\nconst toDisplayTime = (value: DateValue | undefined, cycle: HourCycle): DisplayTime => {\n if (!value || !(\"hour\" in value)) return emptyDisplayTime\n const { hour, period } = toDisplayHour(value.hour, cycle)\n return { hour, minute: value.minute, second: value.second ?? null, period }\n}\n\n/** The inverse of `toDisplayTime` — merges a display-space edit into a `setTime`-ready payload.\n * Missing fields default to midnight, same rule `TimeInput` uses for its own first edit. */\nconst fromDisplayTime = (\n display: DisplayTime,\n cycle: HourCycle,\n): { hour: number; minute: number; second?: number } => {\n const hour = fromDisplayHour(display.hour, display.period, cycle)\n const minute = display.minute ?? 0\n return display.second != null ? { hour, minute, second: display.second } : { hour, minute }\n}\n\n/** `api.setTime`, except that a time edit with no day picked yet lands on *today* instead of being\n * dropped — Ark's own `setTime` silently no-ops without a date at that index, so typing a time\n * first used to do nothing at all. Only the first row can hit that (the second is disabled until\n * a range has both ends). `setValue` keeps today within `min`/`max`, like Ark's `selectToday`;\n * a today that `isDateUnavailable` rules out isn't auto-picked. */\nconst setTimeOrToday = (\n api: UseDatePickerContext,\n time: { hour: number; minute: number; second?: number },\n index: number,\n timeZone: string,\n) => {\n if (api.value[index] || index !== 0) return api.setTime(time, index)\n const day = today(timeZone)\n if (api.isUnavailable(day)) return\n api.setValue([toCalendarDateTime(day).set(time)])\n}\n\nexport type TimePanelRowProps = {\n value: DateValue | undefined\n onSetTime: (time: { hour: number; minute: number; second?: number }) => void\n /** Visible label above the row, which also names its `role=\"group\"` (\"Start time\" / \"End\n * time\" under `range`). Without it the group is named `translations.time` (`\"Time\"`). */\n label?: string\n disabled?: boolean\n hourCycle: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in the row's empty Hour/Minute/Second fields — see TimeRow's\n * `placeholder`. Default `\"--\"`. */\n placeholder?: string\n /** Resolves the locale-correct AM/PM labels + Hour/Minute/Second unit suffixes via `Intl`.\n * Falls back to `useLocaleContext()` when omitted. */\n locale?: string\n /** Overrides the sr-only Hour/Minute/Second/Period accessible names. English by default. */\n translations?: TimeRowTranslations\n size?: Size\n variant?: InputVariant\n classNames?: DatePickerClassNames[\"timePanel\"] & { root?: string }\n}\n\n/** One HOUR/MINUTE(+SECOND)+AM/PM row, bridging `TimeRow`'s display-space props to a specific\n * `api.value` index via `api.setTime(time, index)` — the same shared `TimeRow` `TimeInput`\n * wraps with its own local state, wrapped here with the machine's state instead. */\nconst TimePanelRow = ({\n value,\n onSetTime,\n label,\n disabled,\n hourCycle,\n minuteStep,\n withSeconds,\n placeholder,\n locale,\n translations,\n size,\n variant,\n classNames,\n}: TimePanelRowProps) => {\n const display = toDisplayTime(value, hourCycle)\n const patch = (partial: Partial<DisplayTime>) =>\n onSetTime(fromDisplayTime({ ...display, ...partial }, hourCycle))\n const labelId = useId()\n\n return (\n <div className={cn(\"flex flex-col gap-1\", classNames?.root)}>\n {label && (\n <span id={labelId} className={timePanelLabel}>\n {label}\n </span>\n )}\n <TimeRow\n aria-labelledby={label ? labelId : undefined}\n hour={display.hour}\n minute={display.minute}\n second={display.second}\n onHourChange={(hour) => patch({ hour })}\n onMinuteChange={(minute) => patch({ minute })}\n onSecondChange={withSeconds ? (second) => patch({ second }) : undefined}\n period={display.period}\n onPeriodChange={(period) => patch({ period })}\n hourCycle={hourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={placeholder}\n locale={locale}\n translations={translations}\n size={size}\n variant={variant}\n disabled={disabled}\n classNames={classNames}\n />\n </div>\n )\n}\n\n/**\n * `typeable` + `withTime`'s own text input, standing in for Ark's `Input` part — which can't carry\n * a time (see `date-time-text.ts`). It still declares `data-part=\"input\"` inside the Control, so\n * the machine treats it as its input: excluded from interact-outside dismissal, focused on close,\n * and kept in sync with every value change (day pick, time row, clear) through the Root's\n * `format`, which is this same numeric text. Left uncontrolled for that reason — the only thing\n * added here is committing typed text: parsed on blur / `Enter`, then set through `api.setValue`;\n * text that doesn't parse (or lands on an unavailable day) reverts to the current value.\n */\nconst DateTimeTextInput = ({\n api,\n options,\n timeZone,\n ref,\n onBlur,\n placeholder,\n disabled,\n readOnly,\n invalid,\n testId,\n}: {\n api: UseDatePickerContext\n options: Parameters<typeof parseDateTimeText>[1]\n timeZone: string\n ref?: Ref<HTMLInputElement>\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n disabled?: boolean\n readOnly?: boolean\n invalid?: boolean\n testId?: string\n}) => {\n const field = useFieldContext()\n const current = api.value[0]\n const show = (input: HTMLInputElement, value: DateValue | undefined) => {\n input.value = value ? formatDateTimeText(value, options, timeZone) : \"\"\n }\n const commit = (input: HTMLInputElement) => {\n const text = input.value.trim()\n if (text === \"\") {\n if (current) api.clearValue({ focus: false })\n return\n }\n const fallback = current && \"hour\" in current ? current : undefined\n const next = parseDateTimeText(text, options, fallback)\n if (!next || api.isUnavailable(next)) return show(input, current)\n api.setValue([next])\n api.setFocusedValue(next)\n // `setValue` is a no-op (and syncs nothing) when the parsed value equals the current one, so\n // normalize the typed text to the canonical format either way.\n show(input, next)\n }\n return (\n <input\n ref={ref}\n type=\"text\"\n data-scope=\"date-picker\"\n data-part=\"input\"\n autoComplete=\"off\"\n defaultValue={current ? formatDateTimeText(current, options, timeZone) : \"\"}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n {...props({ \"aria-invalid\": invalid })}\n // Ark's own input-click handler, not `api.setOpen`: it opens with `src: \"input.click\"`,\n // which is what stops the machine from moving focus into the grid — typing has to keep\n // landing here. It also honours `openOnClick` and disabled/read-only on its own.\n onClick={api.getInputProps().onClick}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\" || event.nativeEvent.isComposing) return\n event.preventDefault()\n commit(event.currentTarget)\n }}\n onBlur={(event) => {\n if (!readOnly) commit(event.currentTarget)\n onBlur?.(event)\n }}\n {...props({ \"data-testid\": testId })}\n {...fieldA11yProps(field)}\n className={inputControlClasses}\n />\n )\n}\n\nconst DatePickerImpl = <Range extends boolean = false>({\n withinPortal = true,\n container,\n range,\n withTime,\n numOfMonths = 1,\n fixedWeeks,\n presets,\n withConfirm,\n clearable,\n value,\n defaultValue,\n onChange,\n onBlur,\n isDateUnavailable,\n typeable,\n min,\n max,\n minView,\n maxView,\n locale,\n timeZone,\n format,\n hourCycle,\n minuteStep,\n withSeconds,\n timePlaceholder,\n translations,\n icons,\n placeholder,\n startSlot,\n size = \"md\",\n variant = \"default\",\n disabled: disabledProp,\n readOnly,\n required,\n invalid,\n name,\n id,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n}: DatePickerProps<Range>) => {\n // An enclosing `Field` or `Fieldset` disables it too: the shell only dims on\n // the `disabled` handed to it here.\n const disabled = useInheritedDisabled(disabledProp)\n const portalContainer = useOverlayContainer(container)\n // Lifted above a running tour while open; see `useTourRaised`. The\n // calendar's `open` only exists inside `Ark.Context`; a closed one ignores it.\n const raised = useTourRaised(true)\n const { locale: contextLocale } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const resolvedTimeZone = useTimeZone(timeZone)\n const resolvedHourCycle = resolveHourCycle({ locale: resolvedLocale, format, hourCycle })\n const t = { ...DATE_PICKER_DEFAULT_TRANSLATIONS, ...translations }\n const isInvalid = useInheritedInvalid(invalid || error != null)\n const isRange = Boolean(range)\n const unit: DateUnit = minView ?? \"day\"\n // A month or year is picked from one grid, with no time of day and no typed day.\n const timed = Boolean(withTime) && unit === \"day\"\n const months = unit === \"day\" ? numOfMonths : 1\n // Outgoing only: see `Calendar` for why incoming values aren't snapped.\n const snap = (values: DateValue[]) => values.map((v) => snapToUnit(v, unit))\n const resolvedPlaceholder = placeholder ?? DATE_PICKER_PLACEHOLDERS[unit]\n // See `typeable`'s own doc comment: single dates only — `range` silently falls back to the\n // button trigger rather than erroring, so `typeable` composes safely with every other prop.\n // Under `withTime` the input is `DateTimeTextInput` instead of Ark's own date-only `Input`.\n const showTypeableInput = Boolean(typeable) && !isRange && unit === \"day\"\n const dateTimeText = { locale: resolvedLocale, hourCycle: resolvedHourCycle, withSeconds }\n const controlRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLButtonElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n\n type Value = Range extends true ? DateRangeValue : Date | null\n const emptyValue = (isRange ? { start: null, end: null } : null) as Value\n\n // Reserved for the `withConfirm` staged layer only — the base value needs no local state,\n // Ark's machine natively supports controlled/uncontrolled `value`/`defaultValue`/`onValueChange`\n // the same way `Calendar` relies on it.\n const [committed, setCommitted] = useUncontrolled<Value>({\n value,\n defaultValue,\n finalValue: emptyValue,\n onChange,\n })\n const [staged, setStaged] = useState<Value>(committed)\n const zoneReseed = useRef<string | null>(null)\n\n const inputMergedRef = useMergedRefs<HTMLButtonElement | HTMLInputElement>(inputRef, ref)\n const triggerMergedRef = useMergedRefs<HTMLButtonElement | HTMLInputElement>(triggerRef, ref)\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 >\n <Ark.Root\n id={id}\n selectionMode={isRange ? \"range\" : \"single\"}\n // Ark's own default (`true`) auto-closes on a completed pick — under `withConfirm`\n // the picker must stay open for review until Apply/Cancel, and under `withTime` the day\n // is only half the value: closing on pick would hide the time row it still needs.\n // Otherwise leave Ark's default (single closes on pick, range on the second click).\n closeOnSelect={withConfirm || timed ? false : undefined}\n // Ark's own default (`false`) requires the calendar-icon trigger to open the popover —\n // under `typeable` a click into the text field itself should open it too, matching the\n // combined type-or-pick affordance `typeable` is meant to offer. No-op when the Input\n // anatomy part isn't rendered (`!showTypeableInput`).\n openOnClick={showTypeableInput}\n locale={resolvedLocale}\n timeZone={resolvedTimeZone}\n translations={resolveCalendarTranslations(translations)}\n numOfMonths={months}\n fixedWeeks={fixedWeeks}\n minView={minView}\n maxView={maxView}\n value={toArkValues(withConfirm ? staged : value, resolvedTimeZone)}\n defaultValue={withConfirm ? undefined : toArkValues(defaultValue, resolvedTimeZone)}\n onValueChange={(details) => {\n // A zone change re-expresses the selection in the new zone; that echo is not a change.\n if (zoneReseed.current === hashArkValues(details.value)) {\n zoneReseed.current = null\n return\n }\n const next = fromArkValues(snap(details.value), isRange, resolvedTimeZone) as Value\n if (withConfirm) setStaged(next)\n else onChange?.(next)\n }}\n onOpenChange={(details) => {\n if (withConfirm && details.open) setStaged(committed)\n }}\n isDateUnavailable={\n isDateUnavailable\n ? (dateValue) =>\n isDateUnavailable(\n calendarValueToDate(dateValue, resolvedTimeZone),\n resolvedTimeZone,\n unit,\n )\n : undefined\n }\n min={min ? snapBound(dateToArkValue(min, resolvedTimeZone), unit, \"start\") : undefined}\n max={max ? snapBound(dateToArkValue(max, resolvedTimeZone), unit, \"end\") : undefined}\n // The typed date+time input shows (and Ark syncs into it) the same numeric text it parses.\n format={\n unit !== \"day\"\n ? (date, { locale: fmtLocale }) =>\n new DateFormatter(fmtLocale, {\n ...UNIT_FORMAT[unit],\n timeZone: resolvedTimeZone,\n }).format(calendarValueToDate(date, resolvedTimeZone))\n : withTime && showTypeableInput\n ? (date) => formatDateTimeText(date, dateTimeText, resolvedTimeZone)\n : withTime\n ? (date, { locale: fmtLocale }) =>\n // `timeZone`, or the text reads the instant on the browser's clock while the\n // calendar and time row read it in `resolvedTimeZone` (#470).\n new DateFormatter(fmtLocale, {\n dateStyle: \"medium\",\n timeStyle: \"short\",\n timeZone: resolvedTimeZone,\n }).format(calendarValueToDate(date, resolvedTimeZone))\n : undefined\n }\n // Anchor to the Control (not `sameWidth`, unlike Select) — the popover hosts a full\n // calendar grid + presets rail, which needs its own intrinsic width, not the trigger's.\n positioning={{ getAnchorRect: () => controlRef.current?.getBoundingClientRect() ?? null }}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n invalid={isInvalid}\n className={cn(\"w-full\", className)}\n >\n {/* Keeps the selection, and the typeable input's text, on the same instant when the zone\n * changes, in place rather than by remounting; see `calendar-zone-sync.tsx`. Under\n * `withConfirm` Ark's value is the staged `Date`, so it is controlled either way. */}\n <CalendarZoneSync\n timeZone={resolvedTimeZone}\n controlled={withConfirm || value !== undefined}\n pendingRef={zoneReseed}\n />\n <Ark.Context>\n {(api) => (\n <>\n <Ark.Control\n ref={controlRef}\n {...props({\n \"data-invalid\": isInvalid,\n \"data-with-start-slot\": true,\n \"data-with-end-slot\": true,\n })}\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n className={cn(\n inputShell({ size, variant }),\n // A real `<input>` sits in the shell under `typeable` — leave the shell's own\n // cursor at the browser default (text-cursor over the input, pointer over the\n // icon trigger / clear button) instead of forcing pointer everywhere, matching\n // `Combobox`'s Control (see `combobox.tsx`) rather than `Select`'s button-only one.\n !showTypeableInput && \"cursor-pointer\",\n classNames?.control,\n )}\n >\n {showTypeableInput ? (\n <div className={cn(\"flex min-w-0 flex-1 items-center\", shellGap[size])}>\n {/* Ark sets its own accessible `aria-label` (\"Open calendar\" / \"Close\n calendar\") on the trigger regardless of children, so an icon-only button\n here is still accessible without a manual override. */}\n <Ark.Trigger className={datePickerIconTrigger}>\n {startSlot ?? <CalendarIcon />}\n </Ark.Trigger>\n {timed ? (\n <DateTimeTextInput\n api={api}\n options={dateTimeText}\n timeZone={resolvedTimeZone}\n ref={inputMergedRef}\n onBlur={onBlur}\n placeholder={resolvedPlaceholder}\n disabled={disabled}\n readOnly={readOnly}\n invalid={isInvalid}\n testId={testId}\n />\n ) : (\n <Ark.Input\n ref={inputMergedRef}\n onBlur={onBlur}\n placeholder={resolvedPlaceholder}\n {...props({ \"data-testid\": testId })}\n className={inputControlClasses}\n />\n )}\n </div>\n ) : (\n <Ark.Trigger\n ref={triggerMergedRef}\n onBlur={onBlur}\n {...props({ \"aria-invalid\": isInvalid, \"data-testid\": testId })}\n className={cn(\n \"flex min-w-0 flex-1 cursor-pointer items-center bg-transparent text-start outline-none disabled:cursor-not-allowed\",\n shellGap[size],\n )}\n >\n <span className={inputSlot} aria-hidden>\n {startSlot ?? <CalendarIcon />}\n </span>\n <span className=\"min-w-0 flex-1 truncate text-start\">\n {isRange ? (\n api.value.length === 0 ? (\n <span className={placeholderColor}>{resolvedPlaceholder}</span>\n ) : (\n // Not `Ark.RangeText`: despite the name, it renders the calendar's\n // *visible* month/year viewport (the same text the header's ViewTrigger\n // shows), not the selected range — `datePicker.visibleRangeText` in Ark's\n // own source. Build the real selected-range text from `valueAsString`\n // instead (the same per-value formatted strings `Ark.ValueText` uses).\n api.valueAsString.join(\" – \")\n )\n ) : (\n <Ark.ValueText placeholder={resolvedPlaceholder} />\n )}\n </span>\n </Ark.Trigger>\n )}\n {clearable && (\n // Ark's own ClearTrigger already self-hides (`hidden`) while empty.\n <Ark.ClearTrigger className={popoverClearTrigger}>\n <CloseIcon />\n </Ark.ClearTrigger>\n )}\n </Ark.Control>\n\n {/* Holds an enclosing Modal/Drawer/Popover open while the calendar is; see `lib/overlay-layer.tsx`. */}\n <NestedLayer open={api.open} />\n <Portal disabled={!withinPortal} container={portalContainer}>\n <Ark.Positioner>\n <Ark.Content\n data-raised={raised || undefined}\n // `max-content` sizing (no `sameWidth`, see the positioning comment above)\n // means \"as if nothing below ever wraps\" — a `flex-wrap` time-row footer\n // wider than the calendar (two side-by-side \"Start time\"/\"End time\" rows\n // under `range` + `withTime`) would never actually wrap without a real width\n // constraint to shrink against; it'd just overflow off-screen on a narrow\n // viewport instead. `92vw` is generous enough to be a no-op on any normal\n // desktop width, only kicking in once there's genuinely no room.\n className={cn(\n popoverPanel,\n \"max-w-[92vw] flex-row flex-wrap items-stretch\",\n classNames?.content,\n )}\n >\n {presets && (\n <PresetsRail\n presets={presets}\n range={isRange}\n timeZone={resolvedTimeZone}\n locale={resolvedLocale}\n withConfirm={withConfirm}\n translations={translations?.presets}\n unit={unit}\n className={classNames?.presets}\n />\n )}\n <div\n className=\"flex min-w-0 flex-1 flex-col\"\n style={{\n width:\n Math.max(\n calendarGridWidth(size, months),\n timed ? timeRowMinWidth(size, resolvedHourCycle, withSeconds) : 0,\n ) + 16, // Take the x padding into account\n }}\n >\n <Popover.Body\n className={cn(\"p-2\", timed || withConfirm ? \"border-b\" : undefined)}\n >\n <CalendarBody\n numOfMonths={months}\n unit={unit}\n locale={resolvedLocale}\n size={size}\n timeZone={resolvedTimeZone}\n classNames={classNames?.calendar}\n icons={icons}\n />\n </Popover.Body>\n {timed && (\n <Popover.Footer\n className={cn(\n \"flex gap-x-2 gap-y-2 pb-2\",\n // Stacked by default — side by side only widens to match the extra\n // room multiple months already provide; with a single month, sitting\n // two time rows side by side would force the popover wider than the\n // calendar above them for no reason.\n months > 1 ? \"flex-row flex-wrap\" : \"flex-col\",\n classNames?.footer,\n )}\n >\n <TimePanelRow\n value={api.value[0]}\n onSetTime={(time) => setTimeOrToday(api, time, 0, resolvedTimeZone)}\n label={isRange ? t.startTime : undefined}\n hourCycle={resolvedHourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={timePlaceholder}\n locale={resolvedLocale}\n translations={translations}\n size={size}\n variant={variant}\n classNames={{ root: \"flex-1\", ...classNames?.timePanel }}\n />\n {isRange && (\n <TimePanelRow\n value={api.value[1]}\n onSetTime={(time) => api.setTime(time, 1)}\n label={t.endTime}\n disabled={api.value.length < 2}\n hourCycle={resolvedHourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={timePlaceholder}\n locale={resolvedLocale}\n translations={translations}\n size={size}\n variant={variant}\n classNames={{ root: \"flex-1\", ...classNames?.timePanel }}\n />\n )}\n </Popover.Footer>\n )}\n {withConfirm && (\n <Popover.Footer className=\"flex justify-end gap-2 pb-2\">\n <Button\n variant=\"subtle\"\n color=\"neutral\"\n size={size}\n onClick={() => {\n setStaged(committed)\n api.setOpen(false)\n }}\n >\n {t.cancel}\n </Button>\n <Button\n size={size}\n onClick={() => {\n setCommitted(staged)\n api.setOpen(false)\n }}\n >\n {t.apply}\n </Button>\n </Popover.Footer>\n )}\n </div>\n </Ark.Content>\n </Ark.Positioner>\n </Portal>\n\n {name &&\n (isRange ? (\n <>\n <input\n type=\"hidden\"\n name={`${name}Start`}\n value={api.value[0] ? serializeDateValue(api.value[0], timed, unit) : \"\"}\n />\n <input\n type=\"hidden\"\n name={`${name}End`}\n value={api.value[1] ? serializeDateValue(api.value[1], timed, unit) : \"\"}\n />\n </>\n ) : (\n <input\n type=\"hidden\"\n name={name}\n value={api.value[0] ? serializeDateValue(api.value[0], timed, unit) : \"\"}\n />\n ))}\n </>\n )}\n </Ark.Context>\n </Ark.Root>\n </FieldShell>\n )\n}\n\nexport const DatePicker = Object.assign(DatePickerImpl, {\n Root: Ark.Root,\n Context: Ark.Context,\n Control: Ark.Control,\n Input: Ark.Input,\n Trigger: Ark.Trigger,\n ClearTrigger: Ark.ClearTrigger,\n Content: Ark.Content,\n Presets: PresetsRail,\n Calendar: CalendarBody,\n TimePanel: TimeRow,\n TimePanelRow: TimePanelRow,\n Footer: Popover.Footer,\n}) as (<Range extends boolean = false>(props: DatePickerProps<Range>) => ReactNode) & {\n Root: typeof Ark.Root\n Context: typeof Ark.Context\n Control: typeof Ark.Control\n Input: typeof Ark.Input\n Trigger: typeof Ark.Trigger\n ClearTrigger: typeof Ark.ClearTrigger\n Content: typeof Ark.Content\n Presets: typeof PresetsRail\n Calendar: typeof CalendarBody\n TimePanel: typeof TimeRow\n TimePanelRow: typeof TimePanelRow\n Footer: typeof Popover.Footer\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ComboboxSearchRow } from './chunk-
|
|
1
|
+
import { ComboboxSearchRow } from './chunk-37SRSNLJ.js';
|
|
2
2
|
import { normalizeSelectData, useLabelSearch, filterSelectData } from './chunk-7TDHT3QD.js';
|
|
3
|
-
import { COMBOBOX_DEFAULT_TRANSLATIONS, Combobox } from './chunk-
|
|
4
|
-
import { FieldShell } from './chunk-
|
|
5
|
-
import { popoverIndicator } from './chunk-
|
|
6
|
-
import { useUncontrolled } from './chunk-PMUCGFY5.js';
|
|
3
|
+
import { COMBOBOX_DEFAULT_TRANSLATIONS, Combobox } from './chunk-WJUY6YWF.js';
|
|
4
|
+
import { useInheritedDisabled, useInheritedInvalid, FieldShell } from './chunk-2RRTT4AF.js';
|
|
5
|
+
import { popoverIndicator } from './chunk-YUVKROMA.js';
|
|
7
6
|
import { CheckIcon, CloseIcon } from './chunk-6YNLRQ25.js';
|
|
8
7
|
import { mergeIcons, iconStroke } from './chunk-XXOR34T4.js';
|
|
8
|
+
import { useUncontrolled } from './chunk-PMUCGFY5.js';
|
|
9
9
|
import { Combobox as Combobox$1 } from '@ark-ui/react/combobox';
|
|
10
10
|
import { SearchIcon } from 'lucide-react';
|
|
11
11
|
import { useState, useMemo } from 'react';
|
|
@@ -28,7 +28,7 @@ var ComboboxList = ({
|
|
|
28
28
|
clearable,
|
|
29
29
|
size = "md",
|
|
30
30
|
variant = "unstyled",
|
|
31
|
-
disabled,
|
|
31
|
+
disabled: disabledProp,
|
|
32
32
|
readOnly,
|
|
33
33
|
required,
|
|
34
34
|
invalid,
|
|
@@ -46,7 +46,8 @@ var ComboboxList = ({
|
|
|
46
46
|
}) => {
|
|
47
47
|
const icons = mergeIcons(DEFAULT_ICONS, iconsProp);
|
|
48
48
|
const clearLabel = translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel;
|
|
49
|
-
const
|
|
49
|
+
const disabled = useInheritedDisabled(disabledProp);
|
|
50
|
+
const isInvalid = useInheritedInvalid(invalid || error != null);
|
|
50
51
|
const [value, setValue] = useUncontrolled({
|
|
51
52
|
value: valueProp,
|
|
52
53
|
defaultValue: defaultValue ?? null,
|
|
@@ -143,5 +144,5 @@ var ComboboxList = ({
|
|
|
143
144
|
};
|
|
144
145
|
|
|
145
146
|
export { ComboboxList };
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
147
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-6WZSUS3U.js.map
|
|
148
|
+
//# sourceMappingURL=chunk-6WZSUS3U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/combobox-list/combobox-list.tsx"],"names":["ArkCombobox"],"mappings":";;;;;;;;;;;;;AAmEO,IAAM,aAAA,GAAyD;AAAA,EACpE,MAAA,kBAAQ,GAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,UAAA,EAAY,CAAA;AAAA,EAC3C,KAAA,sBAAQ,SAAA,EAAA,EAAU,CAAA;AAAA,EAClB,KAAA,sBAAQ,SAAA,EAAA,EAAU;AACpB,CAAA;AA4DA,IAAM,UAAA,GAAa,CAAC,CAAA,KAAgC,CAAA,KAAM,OAAO,EAAC,GAAI,CAAC,CAAC,CAAA;AAEjE,IAAM,eAAe,CAA6C;AAAA,EACvE,IAAA;AAAA,EACA,KAAA,EAAO,SAAA;AAAA,EACP,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA,GAAc,cAAA;AAAA,EACd,KAAA,GAAQ,eAAA;AAAA,EACR,SAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,UAAA;AAAA,EACV,QAAA,EAAU,YAAA;AAAA,EACV,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA,EAAO;AACT,CAAA,KAA+B;AAC7B,EAAA,MAAM,KAAA,GAAQ,UAAA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;AAAA,YACA,SAAS,MAAM;AACb,cAAA,QAAA,CAAS,IAAI,CAAA;AACb,cAAA,SAAA,CAAU,EAAE,CAAA;AAAA,YACd,CAAA;AAAA,YACA,MAAA;AAAA,YACA,GAAA;AAAA,YACA,MAAA;AAAA,YACA,KAAA;AAAA,YACA;AAAA;AAAA,SACF;AAAA,6BAEC,QAAA,CAAS,KAAA,EAAT,EAAe,SAAA,EAAW,YAAY,IAAA,EACpC,QAAA,EAAA;AAAA,UAAA,MAAA,GACG,MAAA,CAAO,IAAI,CAAC,KAAA,yBACT,QAAA,CAAS,KAAA,EAAT,EAAiC,KAAA,EAAO,KAAA,CAAM,KAAA,EAC5C,gBAAM,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA,EAAA,EADV,KAAA,CAAM,KAE3B,CACD,CAAA,GACD,KAAA,CAAM,GAAA,CAAI,YAAY,CAAA;AAAA,UACzB,SAAS,IAAA,oBAAQ,GAAA,CAAC,QAAA,CAAS,KAAA,EAAT,EAAgB,QAAA,EAAA,KAAA,EAAM;AAAA,SAAA,EAC3C,CAAA;AAAA,QAKC,IAAA,IAAQ,wBAAQ,GAAA,CAAC,OAAA,EAAA,EAAM,MAAK,QAAA,EAAS,IAAA,EAAY,KAAA,EAAO,KAAA,IAAS,EAAA,EAAI;AAAA;AAAA;AAAA,GACxE;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MAEtB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-6WZSUS3U.js","sourcesContent":["\"use client\"\n\nimport { Combobox as ArkCombobox } from \"@ark-ui/react/combobox\"\nimport { SearchIcon } from \"lucide-react\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo, useState } from \"react\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport {\n filterSelectData,\n type NormalizedItemOf,\n normalizeSelectData,\n type RenderItem,\n type SelectData,\n type SelectValue,\n useLabelSearch,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport {\n COMBOBOX_DEFAULT_TRANSLATIONS,\n Combobox,\n type ComboboxTranslations,\n} from \"../combobox/combobox\"\nimport {\n type FieldProps,\n FieldShell,\n useInheritedDisabled,\n useInheritedInvalid,\n} from \"../field/field\"\nimport type { InputSize, InputVariant } from \"../input/input\"\nimport { CheckIcon, CloseIcon } from \"../popover/icons\"\nimport { popoverIndicator } from \"../popover/popover\"\nimport { ComboboxSearchRow } from \"./combobox-search-row\"\n\n/**\n * ComboboxList — a searchable, single-value option list with no trigger of its\n * own. It renders permanently open: embed it inline inside a container you\n * already control the visibility of (a `Popover`, a `Drawer`, a custom panel)\n * rather than owning a floating dropdown. For a self-contained trigger +\n * floating panel, use [`Select`](/docs/select) instead — same `data` contract\n * and value shape, just with its own closed/open trigger button.\n *\n * - `data` / `value` / `onChange` match `Select` exactly\n * (`SelectValue<Data> | null`) — the picked value must come from `data`;\n * for free text see [`Autocomplete`](/docs/autocomplete).\n * - Type to filter; `clearable` adds a clear button next to the search icon\n * once there's a value.\n * - Label / description / error come from the built-in `Field`, same as the\n * rest of the family — omit them when embedding inside your own popover.\n */\n\ntype ComboboxListClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The search row (also targeted by `className`). */\n search?: string\n /** The search `<input>`. */\n input?: string\n /** A single option row. */\n option?: string\n /** The scrollable option list. */\n list?: string\n}\n\nexport type ComboboxListIconSlot = \"search\" | \"clear\" | \"check\"\nexport type ComboboxListIcons = IconMap<ComboboxListIconSlot>\n\n/** The default icons: the search row's magnifier and clear ×, and the selected option's check. */\nexport const DEFAULT_ICONS: Record<ComboboxListIconSlot, ReactNode> = {\n search: <SearchIcon className={iconStroke} />,\n clear: <CloseIcon />,\n check: <CheckIcon />,\n}\n\nexport type ComboboxListProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled value. */\n value?: SelectValue<Data> | null\n /** Uncontrolled initial value. */\n defaultValue?: SelectValue<Data> | null\n /** Fires with the selected value (or `null` when cleared). */\n onChange?: (value: SelectValue<Data> | null) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including any check\n * affordance. Omit it to render the label + selected check.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder for the search field. */\n placeholder?: string\n /** Message shown when no option matches. Pass `null` to render nothing. */\n empty?: ReactNode\n /** Show a clear button once there's a value. */\n clearable?: boolean\n size?: InputSize\n /**\n * Search row treatment. Defaults to `\"unstyled\"` (no border/background) since\n * this is normally embedded inside a container that already draws its own\n * chrome; pass `\"default\"` / `\"filled\"` when using it standalone.\n */\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for native form submission. */\n name?: string\n /** Forwarded to the search input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable search `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: ComboboxListClassNames\n /** Overrides the clear button's accessible name (`clearTriggerLabel`, default\n * `\"Clear value\"`) — the same key as the rest of the combobox family. */\n translations?: ComboboxListTranslations\n /** Replaces the default icons: `search`, `clear`, `check`. A missing key keeps its\n * default; `search: null` drops the magnifier. `renderItem` draws its own rows. */\n icons?: ComboboxListIcons\n }\n\n/** The combobox family's `clearTriggerLabel` — the only family key this always-open list\n * renders (it has no chevron). */\nexport type ComboboxListTranslations = Pick<ComboboxTranslations, \"clearTriggerLabel\">\n\n/** Wrap a scalar value into Ark's array contract (or clear with `[]`) — same\n * bridge `Select` uses (`toArkValue`, `select.tsx`). */\nconst toArkValue = (v: string | null): string[] => (v === null ? [] : [v])\n\nexport const ComboboxList = <const Data extends SelectData = SelectData>({\n data,\n value: valueProp,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Search…\",\n empty = \"Nothing found\",\n clearable,\n size = \"md\",\n variant = \"unstyled\",\n disabled: disabledProp,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n icons: iconsProp,\n}: ComboboxListProps<Data>) => {\n const icons = mergeIcons(DEFAULT_ICONS, iconsProp)\n const clearLabel =\n translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel\n type Item = SelectValue<Data>\n\n // With no `label` there is no `Field` to pass a `Fieldset`'s state on, so\n // read it here: the shell, the pills and the clear button all key off it.\n const disabled = useInheritedDisabled(disabledProp)\n // Red state is driven 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 const [value, setValue] = useUncontrolled<Item | null>({\n value: valueProp,\n defaultValue: defaultValue ?? null,\n onChange,\n })\n const [search, setSearch] = useState(\"\")\n\n // Normalize once per `data`; only the filter re-runs as the query changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const labelSearch = useLabelSearch()\n const { collection, items, groups } = useMemo(\n () => filterSelectData(normalized, (item) => labelSearch.matches(item.label, search)),\n [normalized, search, labelSearch],\n )\n\n // `canClear` reserves the clear button's box (and the shell's end-slot\n // padding) for the whole time the field is clearable, not just while it\n // has a value — otherwise the button mounting/unmounting shifts the\n // search input's width. `showClear` only toggles visibility/interactivity.\n const canClear = Boolean(clearable) && !disabled && !readOnly\n const showClear = canClear && (value != null || search.length > 0)\n\n const renderOption = (item: NormalizedItemOf<Data>) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={classNames?.option}\n >\n {renderItem\n ? (state) => renderItem(item, state)\n : // `Combobox.Item`'s own label + check row, with the check from `icons`.\n () => (\n <>\n <ArkCombobox.ItemText>{item.label}</ArkCombobox.ItemText>\n <ArkCombobox.ItemIndicator className={popoverIndicator}>\n {icons.check}\n </ArkCombobox.ItemIndicator>\n </>\n )}\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root<NormalizedItemOf<Data>>\n collection={collection}\n value={toArkValue(value)}\n // Ark types the value as `string[]`; it always originates from `data`,\n // so narrow it back to the caller's value union.\n onValueChange={(details) => setValue((details.value[0] ?? null) as Item)}\n inputValue={search}\n onInputValueChange={(details) => setSearch(details.inputValue)}\n // There's no trigger to open it — the caller (e.g. a `Popover`) already\n // owns whether this mounts at all, so keep the machine permanently open.\n open\n onOpenChange={() => {}}\n // The caller's own container (Popover, Drawer, …) already owns\n // dismiss-on-outside-click; without this the always-open machine\n // registers its own (functionally inert, since `onOpenChange` is a\n // no-op) listbox dismissable layer, which logs a spurious\n // \"[@zag-js/dismissable] node is `null` or `undefined`\" warning.\n disableLayer\n closeOnSelect={false}\n autoFocus\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n size={size}\n variant={variant}\n className={className}\n >\n <ComboboxSearchRow\n size={size}\n variant={variant}\n invalid={isInvalid}\n placeholder={placeholder}\n canClear={canClear}\n showClear={showClear}\n clearLabel={clearLabel}\n onClear={() => {\n setValue(null)\n setSearch(\"\")\n }}\n onBlur={onBlur}\n ref={ref}\n testId={testId}\n icons={icons}\n classNames={classNames}\n />\n\n <Combobox.Panel className={classNames?.list}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Panel>\n\n {/* Carries the real selection so a native `<form>` submits it — the\n search input is unnamed (it would submit the typed query, not the\n value). */}\n {name != null && <input type=\"hidden\" name={name} value={value ?? \"\"} />}\n </Combobox.Root>\n )\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 >\n {control}\n </FieldShell>\n )\n}\n"]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { meterZone, METER_ZONE_COLORS, arkValue } from './chunk-X6RB74JN.js';
|
|
2
|
+
import { GRADIENT_DIR_CLASS, buildGradientVars } from './chunk-SKPM2FRX.js';
|
|
3
|
+
import { useLocale } from './chunk-OBSZ4NE2.js';
|
|
4
|
+
import { props } from './chunk-WYCMIIRR.js';
|
|
5
|
+
import { cn } from './chunk-4ASNIDV7.js';
|
|
6
|
+
import { Progress as Progress$1 } from '@ark-ui/react/progress';
|
|
7
|
+
import { cva } from 'class-variance-authority';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var progressTrack = cva(
|
|
11
|
+
// `overflow-x-clip` clips the Range's rounded ends to the track's pill shape
|
|
12
|
+
// (mirrors Slider's track); `relative` anchors the indeterminate sweep, whose
|
|
13
|
+
// moving bar is positioned within the track's box.
|
|
14
|
+
"relative w-full overflow-x-clip rounded-full bg-black/3 dark:bg-white/4",
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
xs: "h-0.5",
|
|
19
|
+
sm: "h-1",
|
|
20
|
+
md: "h-1.5",
|
|
21
|
+
lg: "h-2",
|
|
22
|
+
xl: "h-3"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: { size: "md" }
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
var progressRange = cva("h-full rounded-full", {
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
filled: "bg-(--c-solid)",
|
|
32
|
+
// from-*/to-* are the CSS defaults for --tw-gradient-from/to and the
|
|
33
|
+
// --tw-gradient-stops composition chain. A `gradient` prop only overrides
|
|
34
|
+
// the individual vars it provides; the direction class is appended
|
|
35
|
+
// dynamically (mirrors Badge's gradient variant).
|
|
36
|
+
//
|
|
37
|
+
// The gradient is stretched to the full track width and pinned to the
|
|
38
|
+
// start (see the Range `style` below), so the Range reveals only its left
|
|
39
|
+
// slice — the complete from→to shows only at 100%. `bg-no-repeat` keeps
|
|
40
|
+
// the stretched image from tiling.
|
|
41
|
+
gradient: "bg-linear-to-r from-purple-300 to-pink-400 bg-no-repeat bg-left"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: { variant: "filled" }
|
|
45
|
+
});
|
|
46
|
+
var Progress = ({
|
|
47
|
+
value,
|
|
48
|
+
defaultValue,
|
|
49
|
+
onChange,
|
|
50
|
+
meter,
|
|
51
|
+
low,
|
|
52
|
+
high,
|
|
53
|
+
optimum,
|
|
54
|
+
locale,
|
|
55
|
+
variant,
|
|
56
|
+
size,
|
|
57
|
+
color,
|
|
58
|
+
gradient,
|
|
59
|
+
min = 0,
|
|
60
|
+
max = 100,
|
|
61
|
+
ref,
|
|
62
|
+
className,
|
|
63
|
+
classNames,
|
|
64
|
+
style,
|
|
65
|
+
testId,
|
|
66
|
+
asChild: _asChild,
|
|
67
|
+
// The naming attributes describe the progressbar, which is the Track, not the root.
|
|
68
|
+
"aria-label": label,
|
|
69
|
+
"aria-labelledby": labelledBy,
|
|
70
|
+
"aria-describedby": describedBy,
|
|
71
|
+
"aria-valuetext": valueText,
|
|
72
|
+
...rest
|
|
73
|
+
}) => {
|
|
74
|
+
const isGradient = variant === "gradient";
|
|
75
|
+
const resolvedLocale = useLocale(locale);
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
Progress$1.Root,
|
|
78
|
+
{
|
|
79
|
+
value: arkValue("Progress", meter, value, min),
|
|
80
|
+
defaultValue: arkValue("Progress", meter, defaultValue, min),
|
|
81
|
+
onValueChange: onChange ? ({ value: v }) => onChange(v) : void 0,
|
|
82
|
+
min,
|
|
83
|
+
max,
|
|
84
|
+
locale: resolvedLocale,
|
|
85
|
+
"data-color": !isGradient ? color : void 0,
|
|
86
|
+
className: cn("group/progress w-full", className, classNames?.root),
|
|
87
|
+
style,
|
|
88
|
+
...rest,
|
|
89
|
+
children: /* @__PURE__ */ jsx(Progress$1.Context, { children: (api) => {
|
|
90
|
+
const zone = meter ? meterZone(api.value, { min, max, low, high, optimum }) : void 0;
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
Progress$1.Track,
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
className: cn(progressTrack({ size }), classNames?.track),
|
|
96
|
+
...meter ? { role: "meter" } : null,
|
|
97
|
+
...props({
|
|
98
|
+
"data-testid": testId,
|
|
99
|
+
// The zone's palette lands on the Track, which the Range inherits from.
|
|
100
|
+
"data-color": zone && !isGradient ? METER_ZONE_COLORS[zone] : void 0,
|
|
101
|
+
"data-zone": zone,
|
|
102
|
+
"aria-label": label,
|
|
103
|
+
"aria-labelledby": labelledBy,
|
|
104
|
+
"aria-describedby": describedBy,
|
|
105
|
+
// A meter always says its value: Ark's locale-aware `valueAsString`, which
|
|
106
|
+
// `formatOptions` / `translations.value` shape, unless the caller wrote one.
|
|
107
|
+
"aria-valuetext": valueText ?? (meter ? api.valueAsString : void 0)
|
|
108
|
+
}),
|
|
109
|
+
children: /* @__PURE__ */ jsx(
|
|
110
|
+
Progress$1.Range,
|
|
111
|
+
{
|
|
112
|
+
style: isGradient ? {
|
|
113
|
+
backgroundSize: "calc(10000% / var(--percent, 100)) 100%",
|
|
114
|
+
...gradient ? buildGradientVars(gradient) : null
|
|
115
|
+
} : void 0,
|
|
116
|
+
className: cn(
|
|
117
|
+
progressRange({ variant }),
|
|
118
|
+
isGradient && gradient?.dir && GRADIENT_DIR_CLASS[gradient.dir],
|
|
119
|
+
// Indeterminate: Ark omits the inline width, so the Range would
|
|
120
|
+
// otherwise fill the track. Pin it to a fraction and animate a
|
|
121
|
+
// clipped sweep. `group-data-[state=…]` reads the state Ark stamps
|
|
122
|
+
// on the root.
|
|
123
|
+
"group-data-[state=indeterminate]/progress:w-2/5",
|
|
124
|
+
"group-data-[state=indeterminate]/progress:animate-progress-indeterminate",
|
|
125
|
+
classNames?.range
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
} })
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { Progress };
|
|
137
|
+
//# sourceMappingURL=chunk-6YRGP6PS.js.map
|
|
138
|
+
//# sourceMappingURL=chunk-6YRGP6PS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/progress/progress.tsx"],"names":["Ark"],"mappings":";;;;;;;;;AAgDA,IAAM,aAAA,GAAgB,GAAA;AAAA;AAAA;AAAA;AAAA,EAIpB,yEAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,OAAA;AAAA,QACJ,EAAA,EAAI,KAAA;AAAA,QACJ,EAAA,EAAI,OAAA;AAAA,QACJ,EAAA,EAAI,KAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC,CAAA;AAEA,IAAM,aAAA,GAAgB,IAAI,qBAAA,EAAuB;AAAA,EAC/C,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUR,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,OAAA,EAAS,QAAA;AAC9B,CAAC,CAAA;AA2EM,IAAM,WAAW,CAA4B;AAAA,EAClD,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,KAA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kBACA,0EAAA;AAAA,kBACA,UAAA,EAAY;AAAA;AACd;AAAA;AACF;AAAA,SACF;AAAA,MAEJ,CAAA,EACF;AAAA;AAAA,GACF;AAEJ","file":"chunk-6YRGP6PS.js","sourcesContent":["\"use client\"\n\nimport { Progress as Ark } from \"@ark-ui/react/progress\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentPropsWithoutRef, CSSProperties, Ref } from \"react\"\nimport type { ForbidAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport {\n buildGradientVars,\n GRADIENT_DIR_CLASS,\n type GradientDir,\n type GradientProps,\n} from \"../../lib/gradient\"\nimport { useLocale } from \"../../lib/intl\"\nimport { arkValue, METER_ZONE_COLORS, type MeterProps, meterZone } from \"../../lib/meter\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Progress — linear progress bar on top of Ark UI's Progress state machine.\n * Ark owns `role=\"progressbar\"`, the ARIA value wiring, the percent math, and\n * the indeterminate flag; this wrapper supplies the styled Track + Range and a\n * flatter API.\n *\n * - `value` is a single number in `min..max`. Pass `null` for the\n * indeterminate state — Ark drops the inline width and we drive an animated\n * sweep purely in CSS. Leaving both `value` and `defaultValue` unset makes\n * the bar uncontrolled (Ark's own default).\n * - Two fill `variant`s: `filled` (solid accent, the default) and\n * `gradient` (a Tailwind linear gradient on the Range, mirroring `Badge`).\n *\n * Pass `meter` for a measurement rather than a task (an XP level, disk usage,\n * a quota): the Track becomes `role=\"meter\"` with a locale-formatted\n * `aria-valuetext`, can't be indeterminate, and optional `low` / `high` /\n * `optimum` thresholds colour it by zone, like HTML `<meter>` (see\n * `lib/meter.ts`).\n *\n * <Progress meter value={72} aria-label=\"Disk usage\" high={80} optimum={0} />\n *\n * Palette is delivered through the kit's `data-color` + slot-var system\n * (see `colors.ts` / `colors.css`). The root writes `data-color={color}` and\n * the Range references `--c-solid`, so adding a color in\n * `colors.css` works here for free — no progress edits needed. `gradient`\n * sidesteps the slot vars and paints its own stops on the Range instead.\n */\n\nconst progressTrack = cva(\n // `overflow-x-clip` clips the Range's rounded ends to the track's pill shape\n // (mirrors Slider's track); `relative` anchors the indeterminate sweep, whose\n // moving bar is positioned within the track's box.\n \"relative w-full overflow-x-clip rounded-full bg-black/3 dark:bg-white/4\",\n {\n variants: {\n size: {\n xs: \"h-0.5\",\n sm: \"h-1\",\n md: \"h-1.5\",\n lg: \"h-2\",\n xl: \"h-3\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst progressRange = cva(\"h-full rounded-full\", {\n variants: {\n variant: {\n filled: \"bg-(--c-solid)\",\n // from-*/to-* are the CSS defaults for --tw-gradient-from/to and the\n // --tw-gradient-stops composition chain. A `gradient` prop only overrides\n // the individual vars it provides; the direction class is appended\n // dynamically (mirrors Badge's gradient variant).\n //\n // The gradient is stretched to the full track width and pinned to the\n // start (see the Range `style` below), so the Range reveals only its left\n // slice — the complete from→to shows only at 100%. `bg-no-repeat` keeps\n // the stretched image from tiling.\n gradient: \"bg-linear-to-r from-purple-300 to-pink-400 bg-no-repeat bg-left\",\n },\n },\n defaultVariants: { variant: \"filled\" },\n})\n\nexport type ProgressVariant = NonNullable<VariantProps<typeof progressRange>[\"variant\"]>\nexport type ProgressSize = Size\n\nexport type { MeterZone } from \"../../lib/meter\"\nexport type { GradientDir, GradientProps }\n\ntype ProgressClassNames = {\n root?: string\n track?: string\n range?: string\n}\n\ntype ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\n/**\n * `M` is `meter`'s literal type, inferred at the call site (see `MeterProps`).\n * Left out, it is `boolean`: every prop available, `value` plain `number | null`,\n * which is what a generic wrapper or an `Omit<ProgressProps, …>` should see.\n */\nexport type ProgressProps<M extends boolean = boolean> = Omit<\n ArkRootProps,\n | \"value\"\n | \"defaultValue\"\n | \"onValueChange\"\n // The kit's own `onChange` reports the value; a div's change event never fires here.\n | \"onChange\"\n | \"ref\"\n | \"className\"\n | \"asChild\"\n | \"locale\"\n | \"formatOptions\"\n | \"translations\"\n> &\n ForbidAsChild &\n VariantProps<typeof progressRange> &\n WithTestId &\n MeterProps<M> & {\n size?: ProgressSize\n /** Locale the value text is formatted in: a BCP-47 tag, or `\"auto\"` for the\n * visitor's. Defaults to the `IntlProvider`'s, then `en-US`. */\n locale?: \"auto\" | (string & {})\n /** `Intl.NumberFormat` options for the value text. Defaults to a percentage;\n * `{ style: \"unit\", unit: \"gigabyte\" }` reads the raw value instead. */\n formatOptions?: ArkRootProps[\"formatOptions\"]\n /** Overrides the value text. `value` receives `{ value, min, max, percent,\n * formatter }` and returns what a screen reader says: \"Level 7, 40% to 8\". */\n translations?: ArkRootProps[\"translations\"]\n /** Accent palette. Ignored when `variant=\"gradient\"`, and by a meter's zones. */\n color?: Color\n /**\n * Gradient config; only applied when `variant=\"gradient\"`. Mirrors Badge:\n * sets the individual `--tw-gradient-*` vars consumed by the gradient\n * utility chain. Unset fields fall back to the CVA defaults\n * (purple-300 → pink-400, to-r).\n */\n gradient?: GradientProps\n /** Lands on the Track — the `role=\"progressbar\"` (or `\"meter\"`) element. */\n ref?: Ref<HTMLDivElement>\n /** Names the bar. Lands on the Track, the `role=\"progressbar\"` element, like the other\n * `aria-*` naming props below; without one, Ark names it by its value (\"40\"). */\n \"aria-label\"?: string\n /** Names the bar after a visible caption, by id. Wins over `aria-label`. */\n \"aria-labelledby\"?: string\n \"aria-describedby\"?: string\n /** Read instead of the number: \"Processing\", \"3 of 8 files\". A meter\n * writes its formatted value here when unset. */\n \"aria-valuetext\"?: string\n className?: string\n classNames?: ProgressClassNames\n style?: CSSProperties\n }\n\n// `M` defaults to `false`, not `boolean`, so a bar with no `meter` rejects thresholds.\nexport const Progress = <M extends boolean = false>({\n value,\n defaultValue,\n onChange,\n meter,\n low,\n high,\n optimum,\n locale,\n variant,\n size,\n color,\n gradient,\n min = 0,\n max = 100,\n ref,\n className,\n classNames,\n style,\n testId,\n asChild: _asChild,\n // The naming attributes describe the progressbar, which is the Track, not the root.\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n \"aria-valuetext\": valueText,\n ...rest\n}: ProgressProps<M>) => {\n const isGradient = variant === \"gradient\"\n const resolvedLocale = useLocale(locale)\n\n return (\n <Ark.Root\n // `undefined` → uncontrolled (Ark's own default). `null` → indeterminate.\n // The two must NOT be coalesced, so each is forwarded verbatim.\n value={arkValue(\"Progress\", meter, value, min)}\n defaultValue={arkValue(\"Progress\", meter, defaultValue, min)}\n // A meter's value is never null, so its narrower `onChange` takes Ark's value as is.\n onValueChange={\n onChange ? ({ value: v }) => (onChange as (v: number | null) => void)(v) : undefined\n }\n min={min}\n max={max}\n locale={resolvedLocale}\n data-color={!isGradient ? color : undefined}\n className={cn(\"group/progress w-full\", className, classNames?.root)}\n style={style}\n {...rest}\n >\n <Ark.Context>\n {(api) => {\n // Meter zones read the machine's own value, so an uncontrolled meter is coloured too.\n const zone = meter ? meterZone(api.value, { min, max, low, high, optimum }) : undefined\n return (\n <Ark.Track\n ref={ref}\n className={cn(progressTrack({ size }), classNames?.track)}\n // Ark stamps `role=\"progressbar\"` here; a meter overrides it (local props win).\n {...(meter ? { role: \"meter\" } : null)}\n {...props({\n \"data-testid\": testId,\n // The zone's palette lands on the Track, which the Range inherits from.\n \"data-color\": zone && !isGradient ? METER_ZONE_COLORS[zone] : undefined,\n \"data-zone\": zone,\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n // A meter always says its value: Ark's locale-aware `valueAsString`, which\n // `formatOptions` / `translations.value` shape, unless the caller wrote one.\n \"aria-valuetext\": valueText ?? (meter ? api.valueAsString : undefined),\n })}\n >\n <Ark.Range\n // Gradient styling lives on the Range (where the gradient renders),\n // not the root — Ark also sets `style.width` here, but the keys don't\n // overlap and Ark merges the two via mergeProps.\n // - backgroundSize stretches the gradient to the full track width:\n // the Range is `percent%` of the track, so `10000% / percent` of\n // the Range equals the track width (Ark exposes `--percent` on the\n // root; it cascades here). Pinned to the start by `bg-left`, the\n // Range reveals only its left slice — the full from→to shows at\n // 100%. Falls back to 100% when indeterminate (`--percent` unset).\n // - buildGradientVars sets the --tw-gradient-* vars from `gradient`.\n style={\n isGradient\n ? {\n backgroundSize: \"calc(10000% / var(--percent, 100)) 100%\",\n ...(gradient ? buildGradientVars(gradient) : null),\n }\n : undefined\n }\n className={cn(\n progressRange({ variant }),\n isGradient && gradient?.dir && GRADIENT_DIR_CLASS[gradient.dir],\n // Indeterminate: Ark omits the inline width, so the Range would\n // otherwise fill the track. Pin it to a fraction and animate a\n // clipped sweep. `group-data-[state=…]` reads the state Ark stamps\n // on the root.\n \"group-data-[state=indeterminate]/progress:w-2/5\",\n \"group-data-[state=indeterminate]/progress:animate-progress-indeterminate\",\n classNames?.range,\n )}\n />\n </Ark.Track>\n )\n }}\n </Ark.Context>\n </Ark.Root>\n )\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { usePressed, isLinkElement } from './chunk-NDI4HLQE.js';
|
|
1
2
|
import { buttonColorVariants } from './chunk-6B2GNPJP.js';
|
|
2
3
|
import { Spinner } from './chunk-W3XX7BYT.js';
|
|
3
4
|
import { withAsChildContent } from './chunk-R5LYFTHA.js';
|
|
@@ -79,10 +80,24 @@ var ActionIcon = ({
|
|
|
79
80
|
asChild,
|
|
80
81
|
testId,
|
|
81
82
|
onClick,
|
|
83
|
+
pressed: pressedProp,
|
|
84
|
+
defaultPressed,
|
|
85
|
+
onPressedChange,
|
|
86
|
+
pressedVariant,
|
|
82
87
|
...rest
|
|
83
88
|
}) => {
|
|
84
89
|
const resolvedDisabled = disabled || loading;
|
|
85
|
-
const
|
|
90
|
+
const toggle = usePressed({
|
|
91
|
+
pressed: pressedProp,
|
|
92
|
+
defaultPressed,
|
|
93
|
+
onPressedChange,
|
|
94
|
+
disabled: resolvedDisabled,
|
|
95
|
+
onClick: loading ? preventWhileLoading : onClick,
|
|
96
|
+
link: Boolean(asChild) && isLinkElement(children),
|
|
97
|
+
component: "ActionIcon"
|
|
98
|
+
});
|
|
99
|
+
const pressed = toggle.pressed;
|
|
100
|
+
const resolvedVariant = toggle.toggle ? pressed ? pressedVariant ?? "filled" : variant ?? "light" : variant;
|
|
86
101
|
return /* @__PURE__ */ jsx(
|
|
87
102
|
ark.button,
|
|
88
103
|
{
|
|
@@ -90,13 +105,15 @@ var ActionIcon = ({
|
|
|
90
105
|
type: asChild ? type : type ?? "button",
|
|
91
106
|
disabled: resolvedDisabled,
|
|
92
107
|
"data-color": color,
|
|
93
|
-
"data-variant":
|
|
94
|
-
className: cn(actionIconVariants({ variant, size, radius }), className),
|
|
95
|
-
onClick:
|
|
108
|
+
"data-variant": resolvedVariant ?? "default",
|
|
109
|
+
className: cn(actionIconVariants({ variant: resolvedVariant, size, radius }), className),
|
|
110
|
+
onClick: toggle.onClick,
|
|
111
|
+
"aria-pressed": toggle.toggle ? pressed : void 0,
|
|
96
112
|
...props({
|
|
97
113
|
"aria-busy": loading,
|
|
98
114
|
"aria-disabled": resolvedDisabled,
|
|
99
115
|
"data-loading": loading,
|
|
116
|
+
"data-pressed": pressed,
|
|
100
117
|
"data-testid": testId
|
|
101
118
|
}),
|
|
102
119
|
...rest,
|
|
@@ -108,5 +125,5 @@ var ActionIcon = ({
|
|
|
108
125
|
};
|
|
109
126
|
|
|
110
127
|
export { ActionIcon };
|
|
111
|
-
//# sourceMappingURL=chunk-
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-ALANKV5Y.js.map
|
|
129
|
+
//# sourceMappingURL=chunk-ALANKV5Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/action-icon/action-icon.tsx"],"names":[],"mappings":";;;;;;;;;;;AAgDA,IAAM,kBAAA,GAAqB,GAAA;AAAA,EACzB;AAAA,IACE,yCAAA;AAAA,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AA;AAAA,MACvC,GAAG,KAAA,CAAM;AAAA,QACR,WAAA,EAAa,OAAA;AAAA,QACb,eAAA,EAAiB,gBAAA;AAAA,QACjB,cAAA,EAAgB,OAAA;AAAA,QAChB,cAAA,EAAgB,OAAA;AAAA,QAChB,aAAA,EAAe;AAAA,OAChB,CAAA;AAAA,MACA,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA,OAAA,IAAW,UACV,kBAAA,CAAmB,QAAA,EAAU,sBAAM,GAAA,CAAC,OAAA,EAAA,EAAQ,KAAA,EAAO,IAAA,EAAM,CAAA,EAAI;AAAA,QAC3D,OAAA,EAAS;AAAA,OACV,CAAA,GACC,OAAA,uBACD,OAAA,EAAA,EAAQ,KAAA,EAAO,MAAM,CAAA,GAEtB;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-ALANKV5Y.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { MouseEvent } from \"react\"\nimport { withAsChildContent } from \"../../lib/as-child\"\nimport { buttonColorVariants } from \"../../lib/button-colors\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { type ForbidHref, isLinkElement, type PressedProps, usePressed } from \"../../lib/pressed\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { Spinner } from \"../spinner/spinner\"\n\n/**\n * ActionIcon — square, icon-only sibling of `Button`.\n *\n * Same (variant × color) model as `Button`:\n * - `variant` picks the shape (filled / light / outline / subtle / default)\n * - `color` picks the palette (brand / neutral / red / …)\n * - filled / light / outline / subtle share Button's colour classes\n * (`lib/button-colors.ts`, the `--btn-*` slots in `colors.css`): Figma's\n * ActionIcon is an instance of its Button set.\n *\n * What's specific to ActionIcon:\n * - Forced 1:1 aspect ratio.\n * - Own `radius` scale (incl. `full` for circular FABs / like-buttons).\n * - Wider size scale (xs..xl) than Button — toolbar density matters here.\n *\n * The accessible name MUST come from `aria-label` (or `aria-labelledby`); the\n * icon children are decoration.\n *\n * `asChild` renders the single child with ActionIcon's styling. Ark's\n * factory clones exactly one element, so `loading`'s spinner replaces\n * *that* element's own children (`withAsChildContent`, `lib/as-child.ts`)\n * rather than the element itself. The `onClick` guard (`preventWhileLoading`)\n * goes on the same clone, since `disabled` doesn't do anything on an\n * arbitrary `asChild` element (e.g. an `<a>`) — same reason the loading\n * `opacity-50` dimming and `pointer-events-none` blocking are keyed off `data-loading`\n * rather than `:disabled` (see `Button`'s note on this).\n *\n * `pressed` / `defaultPressed` / `onPressedChange` make it a toggle button,\n * exactly as on `Button` (`lib/pressed.ts`): a Bold or a mute button. A\n * toggle's look swaps from `variant` (default `light`) to `pressedVariant`\n * (default `filled`), the pair an `ActionIcon` gets inside a\n * `ButtonMultiSelect`.\n */\nconst actionIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"aspect-square shrink-0 select-none\",\n \"font-medium uppercase tracking-wide\",\n \"no-underline\",\n \"rounded-action-icon border border-transparent\",\n \"transition-colors-radius\",\n focusStyles(),\n \"disabled:not-data-loading:pointer-events-none data-disabled:pointer-events-none\",\n \"not-data-loading:hover:cursor-pointer\",\n \"data-loading:cursor-progress data-loading:opacity-50\",\n // Every svg rule is `[:where(&)_svg]`: zero class specificity, so a size\n // class on the icon itself (`<Star className=\"size-5\" />`) or a nested\n // component's own svg rule wins whatever the CSS order. Lucide's `size`\n // prop is only an HTML attribute and still loses. Same fix as Input (#427).\n \"[:where(&)_svg]:shrink-0 [:where(&)_svg]:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n filled: buttonColorVariants.filled,\n light: buttonColorVariants.light,\n outline: buttonColorVariants.outline,\n subtle: buttonColorVariants.subtle,\n default: [\n \"bg-brand-950 text-white border-brand-800 not-data-loading:hover:bg-brand-800\",\n \"dark:bg-white dark:text-brand-950 dark:border-white/80 dark:not-data-loading:hover:bg-white/80\",\n // Not part of the Figma Button set, so it keeps the plain dim.\n \"disabled:opacity-50 data-disabled:opacity-50\",\n ],\n },\n size: {\n xs: \"h-7 text-xs [:where(&)_svg]:size-3\",\n sm: \"h-8 text-sm [:where(&)_svg]:size-3.5\",\n md: \"h-9 text-md [:where(&)_svg]:size-4\",\n lg: \"h-10 text-lg [:where(&)_svg]:size-5\",\n xl: \"h-12 text-xl [:where(&)_svg]:size-6\",\n },\n radius: {\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n },\n)\n\nexport type ActionIconVariant = NonNullable<VariantProps<typeof actionIconVariants>[\"variant\"]>\nexport type ActionIconSize = NonNullable<VariantProps<typeof actionIconVariants>[\"size\"]>\nexport type ActionIconRadius = NonNullable<VariantProps<typeof actionIconVariants>[\"radius\"]>\n\nexport type ActionIconProps = Omit<HTMLArkProps<\"button\">, \"color\"> &\n VariantProps<typeof actionIconVariants> &\n PressedProps<ActionIconVariant> &\n ForbidHref &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n /**\n * Replace the icon with a spinner, mark the element as busy, and suppress\n * pointer interactions. Mirrors `Button`'s `loading`.\n */\n loading?: boolean\n }\n\n/** Mirrors `Button`'s `preventWhileLoading` — see the note there. */\nconst preventWhileLoading = (event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n}\n\nexport const ActionIcon = ({\n className,\n variant,\n size,\n radius,\n color,\n loading = false,\n children,\n disabled,\n type,\n asChild,\n testId,\n onClick,\n pressed: pressedProp,\n defaultPressed,\n onPressedChange,\n pressedVariant,\n ...rest\n}: ActionIconProps) => {\n const resolvedDisabled = disabled || loading\n const toggle = usePressed({\n pressed: pressedProp,\n defaultPressed,\n onPressedChange,\n disabled: resolvedDisabled,\n onClick: loading ? preventWhileLoading : onClick,\n link: Boolean(asChild) && isLinkElement(children),\n component: \"ActionIcon\",\n })\n const pressed = toggle.pressed\n // A toggle swaps between ButtonSelect's pair; a plain icon keeps `variant`.\n const resolvedVariant = toggle.toggle\n ? pressed\n ? (pressedVariant ?? \"filled\")\n : (variant ?? \"light\")\n : variant\n\n return (\n <ark.button\n asChild={asChild}\n type={asChild ? type : (type ?? \"button\")}\n disabled={resolvedDisabled}\n data-color={color}\n data-variant={resolvedVariant ?? \"default\"}\n className={cn(actionIconVariants({ variant: resolvedVariant, size, radius }), className)}\n onClick={toggle.onClick}\n aria-pressed={toggle.toggle ? pressed : undefined}\n {...props({\n \"aria-busy\": loading,\n \"aria-disabled\": resolvedDisabled,\n \"data-loading\": loading,\n \"data-pressed\": pressed,\n \"data-testid\": testId,\n })}\n {...rest}\n >\n {asChild && loading ? (\n withAsChildContent(children, () => <Spinner label={null} />, {\n onClick: preventWhileLoading,\n })\n ) : loading ? (\n <Spinner label={null} />\n ) : (\n children\n )}\n </ark.button>\n )\n}\n"]}
|