@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
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DatePicker as Ark,
|
|
3
|
+
type DateValue,
|
|
4
|
+
type UseDatePickerContext,
|
|
5
|
+
} from "@ark-ui/react/date-picker"
|
|
6
|
+
import { useLocaleContext } from "@ark-ui/react/locale"
|
|
2
7
|
import { cva } from "class-variance-authority"
|
|
3
8
|
import type { ReactNode } from "react"
|
|
4
9
|
import { match } from "ts-pattern"
|
|
5
10
|
import { cn } from "../../lib/cn"
|
|
6
|
-
import { calendarValueToDate } from "../../lib/date-value"
|
|
11
|
+
import { calendarValueToDate, type DateUnit, snapToUnit } from "../../lib/date-value"
|
|
7
12
|
import { focusStyles } from "../../lib/focus-styles"
|
|
8
13
|
import { type IconMap, mergeIcons } from "../../lib/icons"
|
|
9
14
|
import { props } from "../../lib/props"
|
|
@@ -36,6 +41,8 @@ export type CalendarBodyClassNames = {
|
|
|
36
41
|
table?: string
|
|
37
42
|
/** Each day cell's clickable trigger. */
|
|
38
43
|
day?: string
|
|
44
|
+
/** Each month or year cell's clickable trigger (the month and year views). */
|
|
45
|
+
cell?: string
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
export type CalendarIconSlot = "prev" | "next"
|
|
@@ -66,6 +73,13 @@ export type CalendarBodyProps = {
|
|
|
66
73
|
classNames?: CalendarBodyClassNames
|
|
67
74
|
/** Replaces the prev/next icons. Drawn as given, never restroked or mirrored. */
|
|
68
75
|
icons?: CalendarIcons
|
|
76
|
+
/** Names the year view's decade. Falls back to the locale context; pass the root's own `locale`
|
|
77
|
+
* when it overrides that. */
|
|
78
|
+
locale?: string
|
|
79
|
+
/** What one pick commits: a day (default), or a whole month or year. Set it to the root's own
|
|
80
|
+
* `minView`. At `"month"`/`"year"` the month or year grid is the value grid, so its cells take
|
|
81
|
+
* the root's `isDateUnavailable` (a day grid's cells already do, through Ark). */
|
|
82
|
+
unit?: DateUnit
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
const dayCellTrigger = cva(
|
|
@@ -157,8 +171,21 @@ const gridCellTrigger = cva(
|
|
|
157
171
|
"cursor-pointer transition-colors",
|
|
158
172
|
"hover:bg-brand-900/6 dark:hover:bg-white/8",
|
|
159
173
|
focusStyles({ offset: false }),
|
|
160
|
-
|
|
174
|
+
// A month/year range draws the day grid's band (see `dayCellTrigger`): the cells are flush,
|
|
175
|
+
// so the in-between ones lose their corners and share one tint, and each end keeps only its
|
|
176
|
+
// outer corners, gated the same way (a committed range or a live hover preview) so a lone
|
|
177
|
+
// first pick stays a plain rounded cell. `data-selected` (both ends) keeps the solid fill
|
|
178
|
+
// over the tint (`!`).
|
|
179
|
+
"data-in-range:rounded-none data-in-range:bg-brand-950/10 dark:data-in-range:bg-white/10",
|
|
180
|
+
"data-in-range:hover:bg-brand-950/20 dark:data-in-range:hover:bg-white/20",
|
|
181
|
+
"data-range-start:data-range-committed:rounded-s-sm",
|
|
182
|
+
"data-range-end:data-range-committed:rounded-e-sm",
|
|
183
|
+
"data-hover-range-start:not-data-hover-range-end:rounded-s-sm",
|
|
184
|
+
"data-hover-range-end:not-data-hover-range-start:rounded-e-sm",
|
|
185
|
+
"data-hover-range-start:data-hover-range-end:rounded-sm!",
|
|
186
|
+
"data-selected:bg-(--c-solid)! data-selected:text-(--c-on-solid) data-selected:hover:bg-(--c-solid-hover)!",
|
|
161
187
|
"data-disabled:pointer-events-none data-disabled:opacity-40",
|
|
188
|
+
"data-unavailable:pointer-events-none data-unavailable:text-brand-900/20 data-unavailable:line-through dark:data-unavailable:text-white/16",
|
|
162
189
|
],
|
|
163
190
|
{
|
|
164
191
|
variants: {
|
|
@@ -168,6 +195,33 @@ const gridCellTrigger = cva(
|
|
|
168
195
|
},
|
|
169
196
|
)
|
|
170
197
|
|
|
198
|
+
/**
|
|
199
|
+
* What a month or year cell needs when that grid is the value grid (`unit`): whether the root's
|
|
200
|
+
* `isDateUnavailable` (or `min`/`max`) rules it out, and the props that keep it from being
|
|
201
|
+
* picked. Ark consults `isDateUnavailable` only for day cells, and composes its own handlers
|
|
202
|
+
* ahead of ours, so the click is stopped in the capture phase, before Ark's own `onClick` sees it.
|
|
203
|
+
*/
|
|
204
|
+
const unitCell = (api: UseDatePickerContext, cell: DateValue, unit: DateUnit, active: boolean) => {
|
|
205
|
+
const unavailable = active && api.isUnavailable(snapToUnit(cell, unit))
|
|
206
|
+
return {
|
|
207
|
+
unavailable,
|
|
208
|
+
props: unavailable
|
|
209
|
+
? {
|
|
210
|
+
"aria-disabled": true as const,
|
|
211
|
+
"data-unavailable": "",
|
|
212
|
+
onClickCapture: (event: { preventDefault: () => void }) => event.preventDefault(),
|
|
213
|
+
}
|
|
214
|
+
: {},
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Stops `Enter` from committing a focused month/year that `unitCell` ruled out; the arrows
|
|
219
|
+
* still move past it. Ark's table handler bails on `defaultPrevented`. */
|
|
220
|
+
const guardEnter =
|
|
221
|
+
(blocked: () => boolean) => (event: { key: string; preventDefault: () => void }) => {
|
|
222
|
+
if (event.key === "Enter" && blocked()) event.preventDefault()
|
|
223
|
+
}
|
|
224
|
+
|
|
171
225
|
const weekdayHeader = cn("pb-1 text-center text-xs font-medium", TEXT_COLOR_CLASSES.muted)
|
|
172
226
|
|
|
173
227
|
const weekNumberCell = cn(
|
|
@@ -190,6 +244,16 @@ const navIcon = (icon: ReactNode, size: Size | undefined, className?: string) =>
|
|
|
190
244
|
* a shorter, text-sized row. */
|
|
191
245
|
const NAV_ICON_SIZE: Record<Size, number> = { xs: 28, sm: 32, md: 36, lg: 40, xl: 48 }
|
|
192
246
|
|
|
247
|
+
/** The year view's title, "2020 – 2029", through `Intl`'s own range format in `locale` (Ark's
|
|
248
|
+
* text joins the two years with a hardcoded " - "). NFKC folds the thin spaces some ICU builds
|
|
249
|
+
* put around the dash, so the server and the browser print the same string. */
|
|
250
|
+
const decadeLabel = (text: { start: string; end: string }, locale: string): string => {
|
|
251
|
+
const at = (year: string) => new Date(Date.UTC(Number(year), 0, 1))
|
|
252
|
+
return new Intl.DateTimeFormat(locale, { year: "numeric", timeZone: "UTC" })
|
|
253
|
+
.formatRange(at(text.start), at(text.end))
|
|
254
|
+
.normalize("NFKC")
|
|
255
|
+
}
|
|
256
|
+
|
|
193
257
|
export const CalendarBody = ({
|
|
194
258
|
numOfMonths = 1,
|
|
195
259
|
withWeekNumbers,
|
|
@@ -198,227 +262,263 @@ export const CalendarBody = ({
|
|
|
198
262
|
timeZone,
|
|
199
263
|
classNames,
|
|
200
264
|
icons,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<Ark.
|
|
211
|
-
className={cn(
|
|
212
|
-
"transition-colors",
|
|
213
|
-
"min-w-0 flex-1 cursor-pointer truncate rounded-sm px-2 py-1 text-center text-sm font-medium",
|
|
214
|
-
"hover:bg-brand-900/6 dark:hover:bg-white/8",
|
|
215
|
-
focusStyles({ offset: false }),
|
|
216
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
217
|
-
)}
|
|
265
|
+
unit = "day",
|
|
266
|
+
locale,
|
|
267
|
+
}: CalendarBodyProps) => {
|
|
268
|
+
const contextLocale = useLocaleContext().locale
|
|
269
|
+
return (
|
|
270
|
+
<Ark.Context>
|
|
271
|
+
{(api) => {
|
|
272
|
+
const { prev, next } = mergeIcons(DEFAULT_ICONS, icons)
|
|
273
|
+
const nav = (
|
|
274
|
+
<Ark.ViewControl
|
|
275
|
+
className={cn("mb-2 flex items-stretch justify-between gap-1", classNames?.header)}
|
|
218
276
|
>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
277
|
+
<Ark.PrevTrigger asChild>{navIcon(prev, size)}</Ark.PrevTrigger>
|
|
278
|
+
<Ark.ViewTrigger
|
|
279
|
+
className={cn(
|
|
280
|
+
"transition-colors",
|
|
281
|
+
"min-w-0 flex-1 cursor-pointer truncate rounded-sm px-2 py-1 text-center text-sm font-medium",
|
|
282
|
+
"hover:bg-brand-900/6 dark:hover:bg-white/8",
|
|
283
|
+
focusStyles({ offset: false }),
|
|
284
|
+
// At the top view (`maxView`) the switch is disabled but still the grid's title, so
|
|
285
|
+
// it only dims when the whole calendar is disabled.
|
|
286
|
+
"disabled:pointer-events-none",
|
|
287
|
+
api.disabled && "opacity-50",
|
|
288
|
+
)}
|
|
289
|
+
>
|
|
290
|
+
{api.view === "year"
|
|
291
|
+
? decadeLabel(api.visibleRangeText, locale ?? contextLocale)
|
|
292
|
+
: api.visibleRange.end.month === api.visibleRange.start.month
|
|
293
|
+
? api.visibleRangeText.start
|
|
294
|
+
: api.visibleRangeText.formatted}
|
|
295
|
+
</Ark.ViewTrigger>
|
|
296
|
+
<Ark.NextTrigger asChild>{navIcon(next, size)}</Ark.NextTrigger>
|
|
297
|
+
</Ark.ViewControl>
|
|
298
|
+
)
|
|
226
299
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
300
|
+
// A real, two-endpoint committed range — read off the machine's own value, not the DOM, so
|
|
301
|
+
// it stays true regardless of whether either endpoint's month is currently paged into view
|
|
302
|
+
// (see the pill-cap rounding comment in `dayCellTrigger` above).
|
|
303
|
+
const isCommittedRange = api.value.length === 2
|
|
231
304
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<div
|
|
236
|
-
className="grid items-center justify-center"
|
|
237
|
-
style={{
|
|
238
|
-
gridTemplateColumns: `repeat(${numOfMonths}, auto)`,
|
|
239
|
-
columnGap: MONTH_GAP,
|
|
240
|
-
rowGap: 8,
|
|
241
|
-
}}
|
|
242
|
-
>
|
|
243
|
-
{/* The prev/next icons are overlaid on the control (`absolute`), not given their
|
|
244
|
-
* own grid columns — this row's total width must stay exactly the width of the
|
|
245
|
-
* day tables below (the columns this grid actually has), because `DatePicker`
|
|
246
|
-
* sizes its popover to that exact figure (`calendarGridWidth`, `date-picker.tsx`).
|
|
247
|
-
* Extra icon columns would push this row wider than that budget and force the
|
|
248
|
-
* popover to scroll. */}
|
|
305
|
+
return match(api.view)
|
|
306
|
+
.with("day", () => (
|
|
307
|
+
<Ark.View view="day">
|
|
249
308
|
<div
|
|
250
|
-
className=
|
|
309
|
+
className="grid items-center justify-center"
|
|
251
310
|
style={{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
311
|
+
gridTemplateColumns: `repeat(${numOfMonths}, auto)`,
|
|
312
|
+
columnGap: MONTH_GAP,
|
|
313
|
+
rowGap: 8,
|
|
255
314
|
}}
|
|
256
315
|
>
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
* same total width, with the same gap, into the same number of equal shares —
|
|
266
|
-
* true because every month always renders at the same cell size) — so no width
|
|
267
|
-
* formula is duplicated between this row and the tables, and it degenerates to
|
|
268
|
-
* the `numOfMonths === 1` case for free.
|
|
269
|
-
*
|
|
270
|
-
* The button itself stays full width (so its grid tracks — and hence its click
|
|
271
|
-
* target — line up with the tables below), but its *visible* hover pill is a
|
|
272
|
-
* separate, inset layer (`group-hover`) that stops short of the prev/next icons
|
|
273
|
-
* instead of running the full width underneath them. */}
|
|
274
|
-
<Ark.ViewTrigger
|
|
275
|
-
className={cn(
|
|
276
|
-
"group relative grid size-full cursor-pointer items-center rounded-sm text-sm font-medium transition-colors",
|
|
277
|
-
focusStyles({ offset: false }),
|
|
278
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
279
|
-
)}
|
|
316
|
+
{/* The prev/next icons are overlaid on the control (`absolute`), not given their
|
|
317
|
+
* own grid columns — this row's total width must stay exactly the width of the
|
|
318
|
+
* day tables below (the columns this grid actually has), because `DatePicker`
|
|
319
|
+
* sizes its popover to that exact figure (`calendarGridWidth`, `date-picker.tsx`).
|
|
320
|
+
* Extra icon columns would push this row wider than that budget and force the
|
|
321
|
+
* popover to scroll. */}
|
|
322
|
+
<div
|
|
323
|
+
className={cn("relative", classNames?.header)}
|
|
280
324
|
style={{
|
|
281
|
-
|
|
282
|
-
|
|
325
|
+
gridColumn: `1 / span ${numOfMonths}`,
|
|
326
|
+
gridRow: 1,
|
|
327
|
+
height: NAV_ICON_SIZE[size],
|
|
283
328
|
}}
|
|
284
329
|
>
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
330
|
+
<Ark.PrevTrigger asChild>
|
|
331
|
+
{navIcon(prev, size, "absolute start-0 top-1/2 z-10 -translate-y-1/2")}
|
|
332
|
+
</Ark.PrevTrigger>
|
|
333
|
+
{/* One button, not one per month — Ark's month/year view is a single shared grid
|
|
334
|
+
* (confirmed below), so every month's label leads to the exact same destination;
|
|
335
|
+
* splitting it into N `Ark.ViewTrigger`s would only duplicate the same generated
|
|
336
|
+
* `id`/`aria-label` across them. Its own `repeat(numOfMonths, 1fr)` columns land
|
|
337
|
+
* on the exact same boundaries as the day-table columns below (both divide the
|
|
338
|
+
* same total width, with the same gap, into the same number of equal shares —
|
|
339
|
+
* true because every month always renders at the same cell size) — so no width
|
|
340
|
+
* formula is duplicated between this row and the tables, and it degenerates to
|
|
341
|
+
* the `numOfMonths === 1` case for free.
|
|
342
|
+
*
|
|
343
|
+
* The button itself stays full width (so its grid tracks — and hence its click
|
|
344
|
+
* target — line up with the tables below), but its *visible* hover pill is a
|
|
345
|
+
* separate, inset layer (`group-hover`) that stops short of the prev/next icons
|
|
346
|
+
* instead of running the full width underneath them. */}
|
|
347
|
+
<Ark.ViewTrigger
|
|
348
|
+
className={cn(
|
|
349
|
+
"group relative grid size-full cursor-pointer items-center rounded-sm text-sm font-medium transition-colors",
|
|
350
|
+
focusStyles({ offset: false }),
|
|
351
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
352
|
+
)}
|
|
288
353
|
style={{
|
|
289
|
-
|
|
290
|
-
|
|
354
|
+
gridTemplateColumns: `repeat(${numOfMonths}, 1fr)`,
|
|
355
|
+
columnGap: MONTH_GAP,
|
|
291
356
|
}}
|
|
292
|
-
/>
|
|
293
|
-
{Array.from({ length: numOfMonths }, (_, monthIndex) => (
|
|
294
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.
|
|
295
|
-
<span key={monthIndex} className="relative min-w-0 truncate text-center">
|
|
296
|
-
{api.getOffset({ months: monthIndex }).visibleRangeText.start}
|
|
297
|
-
</span>
|
|
298
|
-
))}
|
|
299
|
-
</Ark.ViewTrigger>
|
|
300
|
-
<Ark.NextTrigger asChild>
|
|
301
|
-
{navIcon(next, size, "absolute end-0 top-1/2 z-10 -translate-y-1/2")}
|
|
302
|
-
</Ark.NextTrigger>
|
|
303
|
-
</div>
|
|
304
|
-
|
|
305
|
-
{Array.from({ length: numOfMonths }, (_, monthIndex) => {
|
|
306
|
-
const offset = api.getOffset({ months: monthIndex })
|
|
307
|
-
return (
|
|
308
|
-
<Ark.Table
|
|
309
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.
|
|
310
|
-
key={monthIndex}
|
|
311
|
-
style={{ gridColumn: monthIndex + 1, gridRow: 2 }}
|
|
312
|
-
className={cn("border-separate border-spacing-0", classNames?.table)}
|
|
313
357
|
>
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
358
|
+
<span
|
|
359
|
+
aria-hidden
|
|
360
|
+
className="pointer-events-none absolute inset-y-0 rounded-sm transition-colors group-hover:bg-brand-900/6 dark:group-hover:bg-white/8"
|
|
361
|
+
style={{
|
|
362
|
+
insetInlineStart: NAV_ICON_SIZE[size],
|
|
363
|
+
insetInlineEnd: NAV_ICON_SIZE[size],
|
|
364
|
+
}}
|
|
365
|
+
/>
|
|
366
|
+
{Array.from({ length: numOfMonths }, (_, monthIndex) => (
|
|
367
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.
|
|
368
|
+
<span key={monthIndex} className="relative min-w-0 truncate text-center">
|
|
369
|
+
{api.getOffset({ months: monthIndex }).visibleRangeText.start}
|
|
370
|
+
</span>
|
|
371
|
+
))}
|
|
372
|
+
</Ark.ViewTrigger>
|
|
373
|
+
<Ark.NextTrigger asChild>
|
|
374
|
+
{navIcon(next, size, "absolute end-0 top-1/2 z-10 -translate-y-1/2")}
|
|
375
|
+
</Ark.NextTrigger>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
{Array.from({ length: numOfMonths }, (_, monthIndex) => {
|
|
379
|
+
const offset = api.getOffset({ months: monthIndex })
|
|
380
|
+
return (
|
|
381
|
+
<Ark.Table
|
|
382
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.
|
|
383
|
+
key={monthIndex}
|
|
384
|
+
style={{ gridColumn: monthIndex + 1, gridRow: 2 }}
|
|
385
|
+
className={cn("border-separate border-spacing-0", classNames?.table)}
|
|
386
|
+
>
|
|
387
|
+
<Ark.TableHead>
|
|
388
|
+
<Ark.TableRow>
|
|
328
389
|
{withWeekNumbers && (
|
|
329
|
-
<Ark.
|
|
330
|
-
<span className={weekNumberCell}>{api.getWeekNumber(week)}</span>
|
|
331
|
-
</Ark.WeekNumberCell>
|
|
390
|
+
<Ark.WeekNumberHeaderCell className={weekdayHeader} />
|
|
332
391
|
)}
|
|
333
|
-
{
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
})
|
|
339
|
-
: undefined
|
|
340
|
-
return (
|
|
341
|
-
<Ark.TableCell
|
|
342
|
-
key={value.toString()}
|
|
343
|
-
value={value}
|
|
344
|
-
visibleRange={offset.visibleRange}
|
|
345
|
-
>
|
|
346
|
-
<Ark.TableCellTrigger
|
|
347
|
-
{...props({ "data-range-committed": isCommittedRange })}
|
|
348
|
-
className={cn(dayCellTrigger({ size }), classNames?.day)}
|
|
349
|
-
>
|
|
350
|
-
{value.day}
|
|
351
|
-
{cellState &&
|
|
352
|
-
renderDay?.(calendarValueToDate(value, timeZone), {
|
|
353
|
-
isUnavailable: cellState.unavailable,
|
|
354
|
-
isSelected: cellState.selected,
|
|
355
|
-
})}
|
|
356
|
-
</Ark.TableCellTrigger>
|
|
357
|
-
</Ark.TableCell>
|
|
358
|
-
)
|
|
359
|
-
})}
|
|
392
|
+
{api.weekDays.map((weekDay) => (
|
|
393
|
+
<Ark.TableHeader key={weekDay.long} className={weekdayHeader}>
|
|
394
|
+
{weekDay.narrow}
|
|
395
|
+
</Ark.TableHeader>
|
|
396
|
+
))}
|
|
360
397
|
</Ark.TableRow>
|
|
398
|
+
</Ark.TableHead>
|
|
399
|
+
<Ark.TableBody>
|
|
400
|
+
{offset.weeks.map((week, weekIndex) => (
|
|
401
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of consecutive weeks, never reordered.
|
|
402
|
+
<Ark.TableRow key={weekIndex}>
|
|
403
|
+
{withWeekNumbers && (
|
|
404
|
+
<Ark.WeekNumberCell weekIndex={weekIndex} week={week}>
|
|
405
|
+
<span className={weekNumberCell}>{api.getWeekNumber(week)}</span>
|
|
406
|
+
</Ark.WeekNumberCell>
|
|
407
|
+
)}
|
|
408
|
+
{week.map((value) => {
|
|
409
|
+
const cellState = renderDay
|
|
410
|
+
? api.getDayTableCellState({
|
|
411
|
+
value,
|
|
412
|
+
visibleRange: offset.visibleRange,
|
|
413
|
+
})
|
|
414
|
+
: undefined
|
|
415
|
+
return (
|
|
416
|
+
<Ark.TableCell
|
|
417
|
+
key={value.toString()}
|
|
418
|
+
value={value}
|
|
419
|
+
visibleRange={offset.visibleRange}
|
|
420
|
+
>
|
|
421
|
+
<Ark.TableCellTrigger
|
|
422
|
+
{...props({ "data-range-committed": isCommittedRange })}
|
|
423
|
+
className={cn(dayCellTrigger({ size }), classNames?.day)}
|
|
424
|
+
>
|
|
425
|
+
{value.day}
|
|
426
|
+
{cellState &&
|
|
427
|
+
renderDay?.(calendarValueToDate(value, timeZone), {
|
|
428
|
+
isUnavailable: cellState.unavailable,
|
|
429
|
+
isSelected: cellState.selected,
|
|
430
|
+
})}
|
|
431
|
+
</Ark.TableCellTrigger>
|
|
432
|
+
</Ark.TableCell>
|
|
433
|
+
)
|
|
434
|
+
})}
|
|
435
|
+
</Ark.TableRow>
|
|
436
|
+
))}
|
|
437
|
+
</Ark.TableBody>
|
|
438
|
+
</Ark.Table>
|
|
439
|
+
)
|
|
440
|
+
})}
|
|
441
|
+
</div>
|
|
442
|
+
</Ark.View>
|
|
443
|
+
))
|
|
444
|
+
.with("month", () => (
|
|
445
|
+
<Ark.View view="month">
|
|
446
|
+
{nav}
|
|
447
|
+
<Ark.Table
|
|
448
|
+
className={cn("mx-auto table-fixed", classNames?.table)}
|
|
449
|
+
style={{ width: calendarGridWidth(size, numOfMonths) }}
|
|
450
|
+
onKeyDownCapture={guardEnter(
|
|
451
|
+
() => unitCell(api, api.focusedValue, unit, unit === "month").unavailable,
|
|
452
|
+
)}
|
|
453
|
+
>
|
|
454
|
+
<Ark.TableBody>
|
|
455
|
+
{/* "short" (e.g. "Jan"), not the default "long" ("January") — the grid's width is
|
|
456
|
+
* pinned to the day view's (see `calendarGridWidth` above), which at a single
|
|
457
|
+
* narrow month can be too tight for full month names across 4 columns. */}
|
|
458
|
+
{api.getMonthsGrid({ columns: 4, format: "short" }).map((row, rowIndex) => (
|
|
459
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.
|
|
460
|
+
<Ark.TableRow key={rowIndex}>
|
|
461
|
+
{row.map((month) => (
|
|
462
|
+
<Ark.TableCell key={month.value} value={month.value}>
|
|
463
|
+
<Ark.TableCellTrigger
|
|
464
|
+
{...unitCell(
|
|
465
|
+
api,
|
|
466
|
+
api.focusedValue.set({ month: month.value }),
|
|
467
|
+
unit,
|
|
468
|
+
unit === "month",
|
|
469
|
+
).props}
|
|
470
|
+
{...props({ "data-range-committed": isCommittedRange })}
|
|
471
|
+
className={cn(gridCellTrigger({ size }), classNames?.cell)}
|
|
472
|
+
>
|
|
473
|
+
{month.label}
|
|
474
|
+
</Ark.TableCellTrigger>
|
|
475
|
+
</Ark.TableCell>
|
|
361
476
|
))}
|
|
362
|
-
</Ark.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
</
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
>
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
<Ark.TableCellTrigger className={gridCellTrigger({ size })}>
|
|
411
|
-
{year.label}
|
|
412
|
-
</Ark.TableCellTrigger>
|
|
413
|
-
</Ark.TableCell>
|
|
414
|
-
))}
|
|
415
|
-
</Ark.TableRow>
|
|
416
|
-
))}
|
|
417
|
-
</Ark.TableBody>
|
|
418
|
-
</Ark.Table>
|
|
419
|
-
</Ark.View>
|
|
420
|
-
))
|
|
421
|
-
.exhaustive()
|
|
422
|
-
}}
|
|
423
|
-
</Ark.Context>
|
|
424
|
-
)
|
|
477
|
+
</Ark.TableRow>
|
|
478
|
+
))}
|
|
479
|
+
</Ark.TableBody>
|
|
480
|
+
</Ark.Table>
|
|
481
|
+
</Ark.View>
|
|
482
|
+
))
|
|
483
|
+
.with("year", () => (
|
|
484
|
+
<Ark.View view="year">
|
|
485
|
+
{nav}
|
|
486
|
+
<Ark.Table
|
|
487
|
+
columns={5}
|
|
488
|
+
className={cn("mx-auto table-fixed", classNames?.table)}
|
|
489
|
+
style={{ width: calendarGridWidth(size, numOfMonths) }}
|
|
490
|
+
onKeyDownCapture={guardEnter(
|
|
491
|
+
() => unitCell(api, api.focusedValue, unit, unit === "year").unavailable,
|
|
492
|
+
)}
|
|
493
|
+
>
|
|
494
|
+
<Ark.TableBody>
|
|
495
|
+
{api.getYearsGrid({ columns: 5 }).map((row, rowIndex) => (
|
|
496
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.
|
|
497
|
+
<Ark.TableRow key={rowIndex}>
|
|
498
|
+
{row.map((year) => (
|
|
499
|
+
<Ark.TableCell key={year.value} value={year.value}>
|
|
500
|
+
<Ark.TableCellTrigger
|
|
501
|
+
{...unitCell(
|
|
502
|
+
api,
|
|
503
|
+
api.focusedValue.set({ year: year.value }),
|
|
504
|
+
unit,
|
|
505
|
+
unit === "year",
|
|
506
|
+
).props}
|
|
507
|
+
{...props({ "data-range-committed": isCommittedRange })}
|
|
508
|
+
className={cn(gridCellTrigger({ size }), classNames?.cell)}
|
|
509
|
+
>
|
|
510
|
+
{year.label}
|
|
511
|
+
</Ark.TableCellTrigger>
|
|
512
|
+
</Ark.TableCell>
|
|
513
|
+
))}
|
|
514
|
+
</Ark.TableRow>
|
|
515
|
+
))}
|
|
516
|
+
</Ark.TableBody>
|
|
517
|
+
</Ark.Table>
|
|
518
|
+
</Ark.View>
|
|
519
|
+
))
|
|
520
|
+
.exhaustive()
|
|
521
|
+
}}
|
|
522
|
+
</Ark.Context>
|
|
523
|
+
)
|
|
524
|
+
}
|