@42-central/ui-react 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-X6DESK37.js → chunk-2RRTT4AF.js} +17 -5
- package/dist/chunk-2RRTT4AF.js.map +1 -0
- package/dist/{chunk-TUP7WXQE.js → chunk-322I2RSV.js} +9 -6
- package/dist/chunk-322I2RSV.js.map +1 -0
- package/dist/{chunk-ISX3AM32.js → chunk-37SRSNLJ.js} +4 -4
- package/dist/{chunk-ISX3AM32.js.map → chunk-37SRSNLJ.js.map} +1 -1
- package/dist/{chunk-L5GH7LLD.js → chunk-3MFWUG5O.js} +4 -4
- package/dist/{chunk-L5GH7LLD.js.map → chunk-3MFWUG5O.js.map} +1 -1
- package/dist/{chunk-FQJNQW3G.js → chunk-3XQEOJCE.js} +8 -5
- package/dist/chunk-3XQEOJCE.js.map +1 -0
- package/dist/{chunk-JKFPRQB2.js → chunk-4LSZ5JWF.js} +3 -3
- package/dist/{chunk-JKFPRQB2.js.map → chunk-4LSZ5JWF.js.map} +1 -1
- package/dist/{chunk-V2QZG4IT.js → chunk-5HWFYYHW.js} +27 -9
- package/dist/chunk-5HWFYYHW.js.map +1 -0
- package/dist/{chunk-GEZYGBXY.js → chunk-6MVFCS46.js} +99 -42
- package/dist/chunk-6MVFCS46.js.map +1 -0
- package/dist/{chunk-NNPSBC7O.js → chunk-6WZSUS3U.js} +10 -9
- package/dist/chunk-6WZSUS3U.js.map +1 -0
- package/dist/chunk-6YRGP6PS.js +138 -0
- package/dist/chunk-6YRGP6PS.js.map +1 -0
- package/dist/{chunk-B5YHYI7E.js → chunk-ALANKV5Y.js} +23 -6
- package/dist/chunk-ALANKV5Y.js.map +1 -0
- package/dist/{chunk-IA6DCC3N.js → chunk-AUQPNDE5.js} +23 -13
- package/dist/chunk-AUQPNDE5.js.map +1 -0
- package/dist/{chunk-AKXALCUN.js → chunk-D7SW2E24.js} +4 -4
- package/dist/chunk-D7SW2E24.js.map +1 -0
- package/dist/{chunk-OXR7BXZA.js → chunk-DQIYYDFD.js} +4 -3
- package/dist/chunk-DQIYYDFD.js.map +1 -0
- package/dist/{chunk-HMNXNKDA.js → chunk-FCBYUN6F.js} +4 -4
- package/dist/{chunk-HMNXNKDA.js.map → chunk-FCBYUN6F.js.map} +1 -1
- package/dist/{chunk-2W7H43WL.js → chunk-FED6SJWM.js} +23 -14
- package/dist/chunk-FED6SJWM.js.map +1 -0
- package/dist/{chunk-7E7JNWOC.js → chunk-FEPIHXVI.js} +6 -5
- package/dist/chunk-FEPIHXVI.js.map +1 -0
- package/dist/{chunk-Y57NW6G7.js → chunk-G3YOSG3U.js} +4 -4
- package/dist/{chunk-Y57NW6G7.js.map → chunk-G3YOSG3U.js.map} +1 -1
- package/dist/chunk-GZN5CXMR.js +100 -0
- package/dist/chunk-GZN5CXMR.js.map +1 -0
- package/dist/{chunk-HCHGERDB.js → chunk-HCSZPBWV.js} +17 -115
- package/dist/chunk-HCSZPBWV.js.map +1 -0
- package/dist/{chunk-I4B3N3UX.js → chunk-HTVICHT4.js} +12 -7
- package/dist/chunk-HTVICHT4.js.map +1 -0
- package/dist/chunk-I7TC2C3I.js +163 -0
- package/dist/chunk-I7TC2C3I.js.map +1 -0
- package/dist/{chunk-7FPSQBWB.js → chunk-IBXYLO2J.js} +14 -13
- package/dist/chunk-IBXYLO2J.js.map +1 -0
- package/dist/{chunk-7KFUFAVP.js → chunk-IRYG6B5A.js} +9 -8
- package/dist/chunk-IRYG6B5A.js.map +1 -0
- package/dist/{chunk-2RQLPN4U.js → chunk-JCNEW4WJ.js} +8 -8
- package/dist/{chunk-2RQLPN4U.js.map → chunk-JCNEW4WJ.js.map} +1 -1
- package/dist/{chunk-SP6LCCTZ.js → chunk-KZDMVOL6.js} +35 -8
- package/dist/chunk-KZDMVOL6.js.map +1 -0
- package/dist/chunk-LR5U6TZZ.js +169 -0
- package/dist/chunk-LR5U6TZZ.js.map +1 -0
- package/dist/{chunk-MQHD3EJE.js → chunk-LZHZJWVM.js} +6 -4
- package/dist/chunk-LZHZJWVM.js.map +1 -0
- package/dist/{chunk-5EOMSWNO.js → chunk-MAM2X3MW.js} +5 -5
- package/dist/{chunk-5EOMSWNO.js.map → chunk-MAM2X3MW.js.map} +1 -1
- package/dist/{chunk-FSPS7TVD.js → chunk-MCMS4NMO.js} +5 -5
- package/dist/{chunk-FSPS7TVD.js.map → chunk-MCMS4NMO.js.map} +1 -1
- package/dist/{chunk-ZB5VMGKB.js → chunk-MV5DIE2T.js} +15 -4
- package/dist/chunk-MV5DIE2T.js.map +1 -0
- package/dist/chunk-NDI4HLQE.js +41 -0
- package/dist/chunk-NDI4HLQE.js.map +1 -0
- package/dist/{chunk-B4GNSSHU.js → chunk-NLJEQZQQ.js} +3 -3
- package/dist/{chunk-B4GNSSHU.js.map → chunk-NLJEQZQQ.js.map} +1 -1
- package/dist/{chunk-SBZJGFZ6.js → chunk-QHT4DCXE.js} +8 -7
- package/dist/chunk-QHT4DCXE.js.map +1 -0
- package/dist/{chunk-I4IJOLNA.js → chunk-RMUBCTEF.js} +5 -5
- package/dist/{chunk-I4IJOLNA.js.map → chunk-RMUBCTEF.js.map} +1 -1
- package/dist/{chunk-G3AD3NJG.js → chunk-RNTDM3RP.js} +9 -5
- package/dist/chunk-RNTDM3RP.js.map +1 -0
- package/dist/chunk-RPFN6ETQ.js +509 -0
- package/dist/chunk-RPFN6ETQ.js.map +1 -0
- package/dist/{chunk-HWBFRDX7.js → chunk-SI7C3W5M.js} +28 -9
- package/dist/chunk-SI7C3W5M.js.map +1 -0
- package/dist/chunk-TPOV3OCC.js +234 -0
- package/dist/chunk-TPOV3OCC.js.map +1 -0
- package/dist/{chunk-IANYMDKH.js → chunk-UBQ54W46.js} +4 -4
- package/dist/chunk-UBQ54W46.js.map +1 -0
- package/dist/{chunk-QVOBLRCM.js → chunk-UIKQ4X6W.js} +3 -3
- package/dist/{chunk-QVOBLRCM.js.map → chunk-UIKQ4X6W.js.map} +1 -1
- package/dist/chunk-UOWQH53N.js +70 -0
- package/dist/chunk-UOWQH53N.js.map +1 -0
- package/dist/{chunk-QRNQQIQM.js → chunk-WJUY6YWF.js} +52 -20
- package/dist/chunk-WJUY6YWF.js.map +1 -0
- package/dist/{chunk-3KARNPW4.js → chunk-WKIUMLRT.js} +3 -3
- package/dist/{chunk-3KARNPW4.js.map → chunk-WKIUMLRT.js.map} +1 -1
- package/dist/chunk-X6RB74JN.js +37 -0
- package/dist/chunk-X6RB74JN.js.map +1 -0
- package/dist/chunk-XQ6L2CM5.js +83 -0
- package/dist/chunk-XQ6L2CM5.js.map +1 -0
- package/dist/{chunk-RKCUXOU2.js → chunk-YUVKROMA.js} +44 -7
- package/dist/chunk-YUVKROMA.js.map +1 -0
- package/dist/components/action-icon/action-icon.d.ts +9 -2
- package/dist/components/action-icon/action-icon.d.ts.map +1 -1
- package/dist/components/action-icon/index.js +5 -1
- package/dist/components/alert/index.js +4 -4
- package/dist/components/anchor/anchor.d.ts +45 -0
- package/dist/components/anchor/anchor.d.ts.map +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.d.ts.map +1 -0
- package/dist/components/anchor/index.js +11 -0
- package/dist/components/anchor/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +10 -6
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/index.js +23 -24
- package/dist/components/app-shell/index.js.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +15 -9
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +5 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +12 -0
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/button.d.ts +15 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +5 -1
- package/dist/components/button-multi-select/index.js +6 -4
- package/dist/components/button-multi-select/index.js.map +1 -1
- package/dist/components/button-select/button-select-control.d.ts.map +1 -1
- package/dist/components/button-select/button-select.d.ts +2 -2
- package/dist/components/button-select/button-select.d.ts.map +1 -1
- package/dist/components/button-select/index.js +6 -4
- package/dist/components/button-select/index.js.map +1 -1
- package/dist/components/calendar/aliases.d.ts +16 -0
- package/dist/components/calendar/aliases.d.ts.map +1 -0
- package/dist/components/calendar/calendar-body.d.ts +11 -1
- package/dist/components/calendar/calendar-body.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +8 -4
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.d.ts +2 -1
- package/dist/components/calendar/index.d.ts.map +1 -1
- package/dist/components/calendar/index.js +15 -5
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/calendar-heatmap/index.js +85 -73
- package/dist/components/calendar-heatmap/index.js.map +1 -1
- package/dist/components/camera/index.js +16 -14
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/choice-card-group/index.js +2 -2
- package/dist/components/choice-card-group/index.js.map +1 -1
- package/dist/components/circular-progress/circular-progress.d.ts +22 -11
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.d.ts +1 -1
- package/dist/components/circular-progress/index.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +68 -49
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/index.js +7 -3
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code/code.d.ts +10 -0
- package/dist/components/code/code.d.ts.map +1 -1
- package/dist/components/code/index.js +1 -0
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/code-block/chrome.js +10 -6
- package/dist/components/code-block/index.js +10 -7
- package/dist/components/code-block/index.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +5 -3
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +12 -7
- package/dist/components/combobox-list/combobox-list.d.ts +1 -1
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +14 -9
- package/dist/components/compare/index.js +1 -1
- package/dist/components/data-list/data-list.d.ts +96 -0
- package/dist/components/data-list/data-list.d.ts.map +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.d.ts.map +1 -0
- package/dist/components/data-list/index.js +147 -0
- package/dist/components/data-list/index.js.map +1 -0
- package/dist/components/data-table/data-table-group.d.ts.map +1 -1
- package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
- package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts +5 -2
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.js +163 -168
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/aliases.d.ts +16 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +22 -8
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +34 -28
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/download-button/index.js +6 -2
- package/dist/components/drawer/drawer.d.ts +7 -4
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.js +11 -6
- package/dist/components/empty-state/empty-state.d.ts +57 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +8 -0
- package/dist/components/empty-state/index.js.map +1 -0
- package/dist/components/field/field.d.ts +20 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +103 -0
- package/dist/components/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts.map +1 -0
- package/dist/components/fieldset/index.js +150 -0
- package/dist/components/fieldset/index.js.map +1 -0
- package/dist/components/file-item/index.js +10 -7
- package/dist/components/file-preview/file-preview.d.ts.map +1 -1
- package/dist/components/file-preview/index.js +10 -18
- package/dist/components/file-preview/index.js.map +1 -1
- package/dist/components/file-trigger/index.js +6 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +18 -14
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/gallery/index.js +3 -3
- package/dist/components/geodesic/a11y.d.ts +3 -3
- package/dist/components/geodesic/a11y.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/index.js +10 -3
- package/dist/components/hover-card/index.js.map +1 -1
- package/dist/components/image/index.js +3 -3
- package/dist/components/image-cropper/index.js +9 -6
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/kbd/index.js +3 -3
- package/dist/components/kbd/kbd.d.ts +4 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/lightbox/index.js +13 -11
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/menu/index.js +9 -5
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/modal/index.js +11 -6
- package/dist/components/modal/modal.d.ts +10 -4
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +13 -9
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +13 -10
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +4 -4
- package/dist/components/nav-link/tanstack.js +4 -4
- package/dist/components/notification/index.js +6 -6
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/number-input/index.js +11 -7
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/dialog-parts.d.ts +10 -1
- package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
- package/dist/components/overlays/index.js +13 -8
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +362 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +147 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/password-input/index.js +6 -5
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +1 -1
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/phone-input/index.js +14 -11
- package/dist/components/phone-input/index.js.map +1 -1
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/photo-capture/index.js +19 -17
- package/dist/components/photo-capture/index.js.map +1 -1
- package/dist/components/pills-input/index.js +4 -4
- package/dist/components/pills-input/pills-input.d.ts +1 -1
- package/dist/components/pills-input/pills-input.d.ts.map +1 -1
- package/dist/components/pin-input/index.js +6 -5
- package/dist/components/pin-input/index.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +7 -2
- package/dist/components/popover/popover.d.ts +41 -16
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.d.ts +1 -1
- package/dist/components/progress/index.d.ts.map +1 -1
- package/dist/components/progress/index.js +4 -1
- package/dist/components/progress/progress.d.ts +22 -14
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/index.d.ts.map +1 -0
- package/dist/components/prose/index.js +17 -0
- package/dist/components/prose/index.js.map +1 -0
- package/dist/components/prose/prose.d.ts +49 -0
- package/dist/components/prose/prose.d.ts.map +1 -0
- package/dist/components/prose/styles.css +593 -0
- package/dist/components/radio-group/index.js +9 -3
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/rating/index.js +3 -2
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.js +10 -8
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/index.js +10 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +150 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +2 -2
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.js +12 -8
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/splitter/index.d.ts +2 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/index.js +373 -0
- package/dist/components/splitter/index.js.map +1 -0
- package/dist/components/splitter/splitter.d.ts +159 -0
- package/dist/components/splitter/splitter.d.ts.map +1 -0
- package/dist/components/spotlight/index.js +23 -22
- package/dist/components/spotlight/index.js.map +1 -1
- package/dist/components/spotlight/spotlight.d.ts.map +1 -1
- package/dist/components/steps/index.d.ts +4 -0
- package/dist/components/steps/index.d.ts.map +1 -0
- package/dist/components/steps/index.js +478 -0
- package/dist/components/steps/index.js.map +1 -0
- package/dist/components/steps/steps-data.d.ts +78 -0
- package/dist/components/steps/steps-data.d.ts.map +1 -0
- package/dist/components/steps/steps.d.ts +183 -0
- package/dist/components/steps/steps.d.ts.map +1 -0
- package/dist/components/switch/index.js +4 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/table-of-contents/index.d.ts +2 -0
- package/dist/components/table-of-contents/index.d.ts.map +1 -0
- package/dist/components/table-of-contents/index.js +471 -0
- package/dist/components/table-of-contents/index.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +12 -9
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +1 -1
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/text-input/index.js +2 -2
- package/dist/components/textarea/index.js +8 -6
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/time-input/index.js +11 -9
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +3 -8
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tour/conditions.d.ts +83 -0
- package/dist/components/tour/conditions.d.ts.map +1 -0
- package/dist/components/tour/create-tours.d.ts +49 -0
- package/dist/components/tour/create-tours.d.ts.map +1 -0
- package/dist/components/tour/index.d.ts +6 -0
- package/dist/components/tour/index.d.ts.map +1 -0
- package/dist/components/tour/index.js +1449 -0
- package/dist/components/tour/index.js.map +1 -0
- package/dist/components/tour/runtime.d.ts +57 -0
- package/dist/components/tour/runtime.d.ts.map +1 -0
- package/dist/components/tour/storage.d.ts +14 -0
- package/dist/components/tour/storage.d.ts.map +1 -0
- package/dist/components/tour/store.d.ts +62 -0
- package/dist/components/tour/store.d.ts.map +1 -0
- package/dist/components/tour/tour.d.ts +77 -0
- package/dist/components/tour/tour.d.ts.map +1 -0
- package/dist/components/tour/types.d.ts +680 -0
- package/dist/components/tour/types.d.ts.map +1 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/index.js +457 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/tree-row.d.ts +72 -0
- package/dist/components/tree/tree-row.d.ts.map +1 -0
- package/dist/components/tree/tree.d.ts +193 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.js +31 -54
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +30 -24
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-popover.d.ts +20 -31
- package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +1 -1
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/date-predicates.d.ts +7 -5
- package/dist/lib/date-predicates.d.ts.map +1 -1
- package/dist/lib/date-value.d.ts +20 -0
- package/dist/lib/date-value.d.ts.map +1 -1
- package/dist/lib/floating-arrow.d.ts +53 -0
- package/dist/lib/floating-arrow.d.ts.map +1 -0
- package/dist/lib/focus-return.d.ts +53 -0
- package/dist/lib/focus-return.d.ts.map +1 -0
- package/dist/lib/meter.d.ts +104 -0
- package/dist/lib/meter.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +26 -8
- package/dist/lib/overlay-layer.d.ts.map +1 -1
- package/dist/lib/pressed.d.ts +92 -0
- package/dist/lib/pressed.d.ts.map +1 -0
- package/dist/lib/tree-data.d.ts +18 -2
- package/dist/lib/tree-data.d.ts.map +1 -1
- package/dist/lib/use-pagination.d.ts +102 -0
- package/dist/lib/use-pagination.d.ts.map +1 -0
- package/dist/lib/use-scroll-spy.d.ts +126 -0
- package/dist/lib/use-scroll-spy.d.ts.map +1 -0
- package/dist/theme.css +39 -3
- package/package.json +1 -1
- package/src/as-child.contract.test.tsx +283 -1
- package/src/components/action-icon/action-icon.tsx +34 -4
- package/src/components/anchor/anchor.test.tsx +232 -0
- package/src/components/anchor/anchor.tsx +187 -0
- package/src/components/anchor/index.ts +12 -0
- package/src/components/app-shell/app-shell.test.tsx +15 -7
- package/src/components/app-shell/app-shell.tsx +27 -20
- package/src/components/autocomplete/autocomplete.tsx +11 -3
- package/src/components/breadcrumb/breadcrumb.test.tsx +24 -0
- package/src/components/breadcrumb/breadcrumb.tsx +20 -1
- package/src/components/button/button-pressed.test.tsx +202 -0
- package/src/components/button/button.tsx +48 -6
- package/src/components/button-select/button-select-control.tsx +2 -2
- package/src/components/button-select/button-select.tsx +22 -2
- package/src/components/calendar/aliases.tsx +28 -0
- package/src/components/calendar/calendar-body.tsx +310 -210
- package/src/components/calendar/calendar.tsx +43 -12
- package/src/components/calendar/index.ts +7 -1
- package/src/components/calendar/month-year-calendar.test.tsx +106 -0
- package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
- package/src/components/checkbox/checkbox.tsx +7 -2
- package/src/components/choice-card-group/choice-card-group.tsx +2 -2
- package/src/components/circular-progress/circular-progress.test.tsx +35 -0
- package/src/components/circular-progress/circular-progress.tsx +116 -59
- package/src/components/circular-progress/index.ts +1 -0
- package/src/components/code/code.test.tsx +16 -0
- package/src/components/code/code.tsx +11 -0
- package/src/components/combobox/combobox.tsx +63 -28
- package/src/components/combobox-list/combobox-list.tsx +11 -3
- package/src/components/data-list/data-list.test.tsx +149 -0
- package/src/components/data-list/data-list.tsx +268 -0
- package/src/components/data-list/index.ts +9 -0
- package/src/components/data-table/data-table-group.test.tsx +16 -0
- package/src/components/data-table/data-table-group.tsx +15 -2
- package/src/components/data-table/data-table-placeholder.tsx +28 -36
- package/src/components/data-table/data-table-stack.tsx +33 -39
- package/src/components/data-table/data-table.test.tsx +31 -0
- package/src/components/data-table/data-table.tsx +41 -42
- package/src/components/date-picker/aliases.tsx +28 -0
- package/src/components/date-picker/date-picker.test.tsx +29 -0
- package/src/components/date-picker/date-picker.tsx +164 -45
- package/src/components/date-picker/index.ts +5 -1
- package/src/components/date-picker/month-year-picker.test.tsx +362 -0
- package/src/components/drawer/drawer.test.tsx +41 -0
- package/src/components/drawer/drawer.tsx +7 -1
- package/src/components/empty-state/empty-state.test.tsx +109 -0
- package/src/components/empty-state/empty-state.tsx +180 -0
- package/src/components/empty-state/index.ts +9 -0
- package/src/components/field/field.tsx +35 -1
- package/src/components/fieldset/fieldset.test.tsx +352 -0
- package/src/components/fieldset/fieldset.tsx +268 -0
- package/src/components/fieldset/index.ts +11 -0
- package/src/components/file-preview/file-preview.test.tsx +2 -1
- package/src/components/file-preview/file-preview.tsx +7 -13
- package/src/components/file-upload/file-upload.tsx +14 -5
- package/src/components/hover-card/hover-card.tsx +5 -1
- package/src/components/input/input.tsx +12 -5
- package/src/components/kbd/kbd.test.tsx +13 -0
- package/src/components/kbd/kbd.tsx +6 -0
- package/src/components/menu/menu.tsx +6 -2
- package/src/components/modal/modal.test.tsx +41 -0
- package/src/components/modal/modal.tsx +17 -9
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
- package/src/components/multi-select/multi-select.tsx +11 -3
- package/src/components/notification/create-notifier.tsx +1 -1
- package/src/components/number-input/number-input.tsx +12 -3
- package/src/components/overlays/dialog-parts.tsx +42 -5
- package/src/components/pagination/index.ts +19 -0
- package/src/components/pagination/pagination.test.tsx +187 -0
- package/src/components/pagination/pagination.tsx +563 -0
- package/src/components/password-input/password-input.tsx +12 -3
- package/src/components/phone-input/phone-input.tsx +12 -3
- package/src/components/pills-input/pills-input.tsx +7 -2
- package/src/components/pin-input/pin-input.tsx +13 -4
- package/src/components/popover/popover.tsx +87 -17
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/progress.test.tsx +102 -0
- package/src/components/progress/progress.tsx +116 -62
- package/src/components/prose/index.ts +1 -0
- package/src/components/prose/prose.test.tsx +90 -0
- package/src/components/prose/prose.tsx +60 -0
- package/src/components/prose/styles.css +593 -0
- package/src/components/radio-group/radio-group.tsx +8 -3
- package/src/components/rating/rating.tsx +5 -2
- package/src/components/scroll-area/index.ts +18 -0
- package/src/components/scroll-area/scroll-area.test.tsx +184 -0
- package/src/components/scroll-area/scroll-area.tsx +448 -0
- package/src/components/segment-group/segment-group.tsx +2 -2
- package/src/components/select/select.tsx +37 -18
- package/src/components/slider/slider.tsx +2 -2
- package/src/components/splitter/index.ts +15 -0
- package/src/components/splitter/splitter.test.tsx +244 -0
- package/src/components/splitter/splitter.tsx +625 -0
- package/src/components/spotlight/spotlight.test.tsx +34 -26
- package/src/components/spotlight/spotlight.tsx +7 -9
- package/src/components/steps/index.ts +21 -0
- package/src/components/steps/steps-data.tsx +179 -0
- package/src/components/steps/steps.test.tsx +235 -0
- package/src/components/steps/steps.tsx +686 -0
- package/src/components/switch/switch.tsx +7 -2
- package/src/components/table-of-contents/index.ts +17 -0
- package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
- package/src/components/table-of-contents/table-of-contents.tsx +708 -0
- package/src/components/tags-input/tags-input.tsx +12 -3
- package/src/components/textarea/textarea.tsx +15 -5
- package/src/components/tooltip/tooltip.tsx +8 -17
- package/src/components/tour/conditions.test.ts +527 -0
- package/src/components/tour/conditions.ts +445 -0
- package/src/components/tour/create-tours.tsx +150 -0
- package/src/components/tour/index.ts +86 -0
- package/src/components/tour/runtime.ts +187 -0
- package/src/components/tour/storage.test.ts +68 -0
- package/src/components/tour/storage.ts +44 -0
- package/src/components/tour/store.test.tsx +784 -0
- package/src/components/tour/store.ts +661 -0
- package/src/components/tour/tour.test.tsx +318 -0
- package/src/components/tour/tour.tsx +773 -0
- package/src/components/tour/tour.types.test.ts +185 -0
- package/src/components/tour/types.ts +904 -0
- package/src/components/tree/index.ts +24 -0
- package/src/components/tree/tree-row.tsx +179 -0
- package/src/components/tree/tree.test.tsx +296 -0
- package/src/components/tree/tree.tsx +796 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
- package/src/components/tree-select/tree-popover.tsx +26 -107
- package/src/components/tree-select/tree-select.tsx +24 -16
- package/src/icon-stroke.test.tsx +2 -0
- package/src/index.ts +16 -0
- package/src/lib/date-predicates.test.ts +46 -0
- package/src/lib/date-predicates.ts +44 -24
- package/src/lib/date-value.test.ts +24 -1
- package/src/lib/date-value.ts +42 -1
- package/src/lib/floating-arrow.tsx +73 -0
- package/src/lib/focus-return.test.tsx +143 -0
- package/src/lib/focus-return.ts +106 -0
- package/src/lib/meter.test.ts +40 -0
- package/src/lib/meter.ts +159 -0
- package/src/lib/overlay-layer.test.tsx +47 -1
- package/src/lib/overlay-layer.tsx +65 -8
- package/src/lib/pressed.ts +130 -0
- package/src/lib/tree-data.ts +42 -2
- package/src/lib/use-pagination.test.ts +105 -0
- package/src/lib/use-pagination.ts +179 -0
- package/src/lib/use-scroll-spy.test.tsx +238 -0
- package/src/lib/use-scroll-spy.ts +336 -0
- package/src/theme.css +39 -3
- package/src/theme.test.ts +29 -1
- package/src/visually-hidden-containment.test.tsx +9 -0
- package/dist/chunk-2W7H43WL.js.map +0 -1
- package/dist/chunk-7E7JNWOC.js.map +0 -1
- package/dist/chunk-7FPSQBWB.js.map +0 -1
- package/dist/chunk-7KFUFAVP.js.map +0 -1
- package/dist/chunk-AKXALCUN.js.map +0 -1
- package/dist/chunk-B5YHYI7E.js.map +0 -1
- package/dist/chunk-FQJNQW3G.js.map +0 -1
- package/dist/chunk-G3AD3NJG.js.map +0 -1
- package/dist/chunk-GEZYGBXY.js.map +0 -1
- package/dist/chunk-HCHGERDB.js.map +0 -1
- package/dist/chunk-HWBFRDX7.js.map +0 -1
- package/dist/chunk-I4B3N3UX.js.map +0 -1
- package/dist/chunk-IA6DCC3N.js.map +0 -1
- package/dist/chunk-IANYMDKH.js.map +0 -1
- package/dist/chunk-MQHD3EJE.js.map +0 -1
- package/dist/chunk-NNPSBC7O.js.map +0 -1
- package/dist/chunk-OXR7BXZA.js.map +0 -1
- package/dist/chunk-QKSLDQM2.js +0 -120
- package/dist/chunk-QKSLDQM2.js.map +0 -1
- package/dist/chunk-QRNQQIQM.js.map +0 -1
- package/dist/chunk-RKCUXOU2.js.map +0 -1
- package/dist/chunk-S5CQRCTF.js +0 -426
- package/dist/chunk-S5CQRCTF.js.map +0 -1
- package/dist/chunk-SBZJGFZ6.js.map +0 -1
- package/dist/chunk-SP6LCCTZ.js.map +0 -1
- package/dist/chunk-TUP7WXQE.js.map +0 -1
- package/dist/chunk-V2QZG4IT.js.map +0 -1
- package/dist/chunk-X6DESK37.js.map +0 -1
- package/dist/chunk-ZB5VMGKB.js.map +0 -1
|
@@ -23,7 +23,12 @@ import {
|
|
|
23
23
|
type ComboboxTranslations,
|
|
24
24
|
} from "../combobox/combobox"
|
|
25
25
|
import { ComboboxSearchRow } from "../combobox-list/combobox-search-row"
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
type FieldProps,
|
|
28
|
+
FieldShell,
|
|
29
|
+
useInheritedDisabled,
|
|
30
|
+
useInheritedInvalid,
|
|
31
|
+
} from "../field/field"
|
|
27
32
|
import type { InputSize, InputVariant } from "../input/input"
|
|
28
33
|
import { CheckIcon, CloseIcon } from "../popover/icons"
|
|
29
34
|
|
|
@@ -142,7 +147,7 @@ export const MultiComboboxList = <const Data extends SelectData = SelectData>({
|
|
|
142
147
|
hidePickedOptions,
|
|
143
148
|
size = "md",
|
|
144
149
|
variant = "unstyled",
|
|
145
|
-
disabled,
|
|
150
|
+
disabled: disabledProp,
|
|
146
151
|
readOnly,
|
|
147
152
|
required,
|
|
148
153
|
invalid,
|
|
@@ -163,9 +168,12 @@ export const MultiComboboxList = <const Data extends SelectData = SelectData>({
|
|
|
163
168
|
translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel
|
|
164
169
|
type Item = SelectValue<Data>
|
|
165
170
|
|
|
171
|
+
// With no `label` there is no `Field` to pass a `Fieldset`'s state on, so
|
|
172
|
+
// read it here: the shell, the pills and the clear button all key off it.
|
|
173
|
+
const disabled = useInheritedDisabled(disabledProp)
|
|
166
174
|
// Red state is driven independently of the `Field` error slot so a form
|
|
167
175
|
// library can flip it from `fieldState.invalid` (see FormControlProps).
|
|
168
|
-
const isInvalid = invalid || error != null
|
|
176
|
+
const isInvalid = useInheritedInvalid(invalid || error != null)
|
|
169
177
|
|
|
170
178
|
const [value, setSelected] = useUncontrolled<Item[]>({
|
|
171
179
|
value: valueProp,
|
|
@@ -22,7 +22,12 @@ import {
|
|
|
22
22
|
Combobox,
|
|
23
23
|
type ComboboxTranslations,
|
|
24
24
|
} from "../combobox/combobox"
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
type FieldProps,
|
|
27
|
+
FieldShell,
|
|
28
|
+
useInheritedDisabled,
|
|
29
|
+
useInheritedInvalid,
|
|
30
|
+
} from "../field/field"
|
|
26
31
|
import {
|
|
27
32
|
type InputSize,
|
|
28
33
|
type InputVariant,
|
|
@@ -158,7 +163,7 @@ export const MultiSelect = <const Data extends SelectData>({
|
|
|
158
163
|
empty = "Nothing found",
|
|
159
164
|
size = "md",
|
|
160
165
|
variant = "default",
|
|
161
|
-
disabled,
|
|
166
|
+
disabled: disabledProp,
|
|
162
167
|
readOnly,
|
|
163
168
|
required,
|
|
164
169
|
invalid,
|
|
@@ -180,9 +185,12 @@ export const MultiSelect = <const Data extends SelectData>({
|
|
|
180
185
|
}
|
|
181
186
|
type Item = SelectValue<Data>
|
|
182
187
|
|
|
188
|
+
// With no `label` there is no `Field` to pass a `Fieldset`'s state on, so
|
|
189
|
+
// read it here: the shell, the pills and the clear button all key off it.
|
|
190
|
+
const disabled = useInheritedDisabled(disabledProp)
|
|
183
191
|
// Red state is driven independently of the `Field` error slot so a form
|
|
184
192
|
// library can flip it from `fieldState.invalid` (see FormControlProps).
|
|
185
|
-
const isInvalid = invalid || error != null
|
|
193
|
+
const isInvalid = useInheritedInvalid(invalid || error != null)
|
|
186
194
|
|
|
187
195
|
const [value, setSelected] = useUncontrolled<Item[]>({
|
|
188
196
|
value: valueProp,
|
|
@@ -553,7 +553,7 @@ export function createNotifier(options: CreateNotifierOptions = {}): Notifier {
|
|
|
553
553
|
"pointer-events-none fixed justify-center flex",
|
|
554
554
|
// Under modals by default; above them while it holds a toast created
|
|
555
555
|
// from inside one (theme.css, OVERLAY STACKING).
|
|
556
|
-
raised ? "z-(--toast-raised-z,
|
|
556
|
+
raised ? "z-(--toast-raised-z,250)" : "z-(--toast-z,100)",
|
|
557
557
|
REGION_POSITION[placement],
|
|
558
558
|
// Phones (< xs): pin to the bottom, full-bleed, above the safe area.
|
|
559
559
|
"max-xs:inset-x-0! max-xs:bottom-[calc(1rem+env(safe-area-inset-bottom))]! max-xs:top-auto! max-xs:translate-x-0!",
|
|
@@ -16,7 +16,13 @@ import { type IconMap, iconStroke, mergeIcons } from "../../lib/icons"
|
|
|
16
16
|
import { useMergedRefs } from "../../lib/merge-refs"
|
|
17
17
|
import { props } from "../../lib/props"
|
|
18
18
|
import type { WithTestId } from "../../lib/test-id"
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
type FieldProps,
|
|
21
|
+
FieldShell,
|
|
22
|
+
fieldA11yProps,
|
|
23
|
+
useInheritedDisabled,
|
|
24
|
+
useInheritedInvalid,
|
|
25
|
+
} from "../field/field"
|
|
20
26
|
import {
|
|
21
27
|
InputBase,
|
|
22
28
|
type InputSize,
|
|
@@ -283,7 +289,7 @@ export const NumberInput = ({
|
|
|
283
289
|
clearable,
|
|
284
290
|
name,
|
|
285
291
|
invalid,
|
|
286
|
-
disabled,
|
|
292
|
+
disabled: disabledProp,
|
|
287
293
|
readOnly,
|
|
288
294
|
required,
|
|
289
295
|
label,
|
|
@@ -302,11 +308,14 @@ export const NumberInput = ({
|
|
|
302
308
|
translations,
|
|
303
309
|
icons: iconsProp,
|
|
304
310
|
}: NumberInputProps) => {
|
|
311
|
+
// An enclosing `Field` or `Fieldset` disables it too: the shell only dims on
|
|
312
|
+
// the `disabled` handed to it here.
|
|
313
|
+
const disabled = useInheritedDisabled(disabledProp)
|
|
305
314
|
const resolvedTranslations = { ...NUMBER_INPUT_DEFAULT_TRANSLATIONS, ...translations }
|
|
306
315
|
const icons = mergeIcons(DEFAULT_ICONS, iconsProp)
|
|
307
316
|
// Drive the red state independently of the `Field` error slot so a form
|
|
308
317
|
// library can flip it from `fieldState.invalid` (see FormControlProps).
|
|
309
|
-
const isInvalid = invalid || error != null
|
|
318
|
+
const isInvalid = useInheritedInvalid(invalid || error != null)
|
|
310
319
|
const inputRef = useRef<HTMLInputElement>(null)
|
|
311
320
|
const cycle: WrapCycle | undefined =
|
|
312
321
|
wrap && min !== undefined && max !== undefined ? { min, max } : undefined
|
|
@@ -19,6 +19,7 @@ import { props } from "../../lib/props"
|
|
|
19
19
|
import type { Size } from "../../lib/sizes"
|
|
20
20
|
import type { WithTestId } from "../../lib/test-id"
|
|
21
21
|
import { ActionIcon } from "../action-icon/action-icon"
|
|
22
|
+
import { ScrollArea } from "../scroll-area/scroll-area"
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Internal parts shared by `Modal` and `Drawer`, which are the same dialog
|
|
@@ -47,7 +48,7 @@ const SURFACE = {
|
|
|
47
48
|
modal: {
|
|
48
49
|
header:
|
|
49
50
|
"flex items-start min-h-15 justify-between gap-4 px-(--modal-px,1.25rem) pt-(--modal-px,1.25rem) pb-3",
|
|
50
|
-
body: "
|
|
51
|
+
body: "px-(--modal-px,1.25rem) py-1",
|
|
51
52
|
footer:
|
|
52
53
|
"flex items-center justify-end gap-2 px-(--modal-px,1.25rem) pb-(--modal-px,1.25rem) pt-4",
|
|
53
54
|
closeSize: "xs",
|
|
@@ -55,7 +56,7 @@ const SURFACE = {
|
|
|
55
56
|
drawer: {
|
|
56
57
|
header:
|
|
57
58
|
"flex items-start justify-between gap-4 px-(--drawer-px,1.25rem) pt-(--drawer-px,1.25rem) pb-3",
|
|
58
|
-
body: "
|
|
59
|
+
body: "px-(--drawer-px,1.25rem) py-1",
|
|
59
60
|
footer:
|
|
60
61
|
"flex items-center justify-end gap-2 px-(--drawer-px,1.25rem) pb-(--drawer-px,1.25rem) pt-4",
|
|
61
62
|
closeSize: "sm",
|
|
@@ -96,6 +97,16 @@ export type DialogCloseTriggerProps = HTMLArkProps<"button"> &
|
|
|
96
97
|
|
|
97
98
|
export type DialogSectionProps = ComponentPropsWithoutRef<"div"> & WithTestId
|
|
98
99
|
|
|
100
|
+
export type DialogBodyProps = DialogSectionProps & {
|
|
101
|
+
/**
|
|
102
|
+
* Scroll the body's content (a `ScrollArea`). `false` renders a plain column instead, for
|
|
103
|
+
* content that owns its own scroller: it takes the space left and lets that scroller shrink
|
|
104
|
+
* (`min-h-0`), so a short screen shrinks the inner list rather than scrolling the whole body.
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
scrollable?: boolean
|
|
108
|
+
}
|
|
109
|
+
|
|
99
110
|
/**
|
|
100
111
|
* Builds a surface's close trigger, header, body and footer. `ArkCloseTrigger`
|
|
101
112
|
* is that machine's own `CloseTrigger` (Dialog's or Drawer's), since each
|
|
@@ -148,9 +159,35 @@ export const createDialogParts = (
|
|
|
148
159
|
<div className={cn(styles.header, className)} {...props({ "data-testid": testId })} {...rest} />
|
|
149
160
|
)
|
|
150
161
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
162
|
+
/**
|
|
163
|
+
* The scroll region between the header and the footer: a `ScrollArea` that takes the
|
|
164
|
+
* space left (`flex-1`) and scrolls vertically with the kit's bars. `className` and the
|
|
165
|
+
* other props land on the scrolled content, where the padding and the layout of the
|
|
166
|
+
* children live, so `p-0` or `flex flex-col gap-4` apply as they did on the old scroller.
|
|
167
|
+
*
|
|
168
|
+
* `scrollable={false}` renders a plain, non-scrolling column in the same slot instead.
|
|
169
|
+
*/
|
|
170
|
+
const Body = ({ className, testId, scrollable = true, ...rest }: DialogBodyProps) =>
|
|
171
|
+
scrollable ? (
|
|
172
|
+
<ScrollArea.Root scrollbars="y" className="flex-1">
|
|
173
|
+
<ScrollArea.Viewport>
|
|
174
|
+
<ScrollArea.Content
|
|
175
|
+
className={cn(styles.body, className)}
|
|
176
|
+
{...props({ "data-testid": testId })}
|
|
177
|
+
{...rest}
|
|
178
|
+
/>
|
|
179
|
+
</ScrollArea.Viewport>
|
|
180
|
+
<ScrollArea.Scrollbar orientation="vertical">
|
|
181
|
+
<ScrollArea.Thumb />
|
|
182
|
+
</ScrollArea.Scrollbar>
|
|
183
|
+
</ScrollArea.Root>
|
|
184
|
+
) : (
|
|
185
|
+
<div
|
|
186
|
+
className={cn("flex min-h-0 flex-1 flex-col", styles.body, className)}
|
|
187
|
+
{...props({ "data-testid": testId })}
|
|
188
|
+
{...rest}
|
|
189
|
+
/>
|
|
190
|
+
)
|
|
154
191
|
|
|
155
192
|
const Footer = ({ className, testId, ...rest }: DialogSectionProps) => (
|
|
156
193
|
<div className={cn(styles.footer, className)} {...props({ "data-testid": testId })} {...rest} />
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
PAGINATION_DEFAULT_TRANSLATIONS,
|
|
5
|
+
Pagination,
|
|
6
|
+
type PaginationDisplay,
|
|
7
|
+
type PaginationEllipsisProps,
|
|
8
|
+
type PaginationIconSlot,
|
|
9
|
+
type PaginationIcons,
|
|
10
|
+
type PaginationItemProps,
|
|
11
|
+
type PaginationItemsProps,
|
|
12
|
+
type PaginationLabelDetails,
|
|
13
|
+
type PaginationLabelProps,
|
|
14
|
+
type PaginationProps,
|
|
15
|
+
type PaginationRootProps,
|
|
16
|
+
type PaginationTranslations,
|
|
17
|
+
type PaginationTriggerProps,
|
|
18
|
+
type PaginationVariant,
|
|
19
|
+
} from "./pagination"
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { act, fireEvent, render, screen } from "@testing-library/react"
|
|
2
|
+
import type { ComponentProps } from "react"
|
|
3
|
+
import { describe, expect, it, vi } from "vitest"
|
|
4
|
+
import { IntlProvider } from "../../lib/intl"
|
|
5
|
+
import { LinkComponentProvider } from "../../lib/link-component"
|
|
6
|
+
import { Pagination } from "./pagination"
|
|
7
|
+
|
|
8
|
+
/** Ark's machine settles a press after the event, so let it flush. */
|
|
9
|
+
const press = (element: HTMLElement) =>
|
|
10
|
+
act(async () => {
|
|
11
|
+
fireEvent.click(element)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const pageButtons = () =>
|
|
15
|
+
screen.getAllByRole("button", { name: /^Page / }).map((button) => button.textContent)
|
|
16
|
+
|
|
17
|
+
describe("Pagination", () => {
|
|
18
|
+
it("renders a navigation landmark with the pages and controls", () => {
|
|
19
|
+
render(<Pagination count={95} pageSize={10} />)
|
|
20
|
+
expect(screen.getByRole("navigation", { name: "Pagination" })).toBeTruthy()
|
|
21
|
+
expect(pageButtons()).toEqual(["1", "2", "3", "4", "5", "10"])
|
|
22
|
+
expect(
|
|
23
|
+
(screen.getByRole("button", { name: "Previous page" }) as HTMLButtonElement).disabled,
|
|
24
|
+
).toBe(true)
|
|
25
|
+
expect((screen.getByRole("button", { name: "Next page" }) as HTMLButtonElement).disabled).toBe(
|
|
26
|
+
false,
|
|
27
|
+
)
|
|
28
|
+
expect(screen.queryByRole("button", { name: "First page" })).toBeNull()
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("marks the current page", () => {
|
|
32
|
+
render(<Pagination pages={10} defaultPage={5} />)
|
|
33
|
+
expect(screen.getByRole("button", { name: "Page 5" }).getAttribute("aria-current")).toBe("page")
|
|
34
|
+
expect(screen.getByRole("button", { name: "Page 4" }).hasAttribute("aria-current")).toBe(false)
|
|
35
|
+
expect(pageButtons()).toEqual(["1", "4", "5", "6", "10"])
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it("moves on a press, uncontrolled", async () => {
|
|
39
|
+
const onPageChange = vi.fn()
|
|
40
|
+
render(<Pagination pages={10} withEdges onPageChange={onPageChange} />)
|
|
41
|
+
await press(screen.getByRole("button", { name: "Next page" }))
|
|
42
|
+
await press(screen.getByRole("button", { name: "Page 3" }))
|
|
43
|
+
await press(screen.getByRole("button", { name: "Last page" }))
|
|
44
|
+
expect(onPageChange.mock.calls.map(([page]) => page)).toEqual([2, 3, 10])
|
|
45
|
+
expect(screen.getByRole("button", { name: "Page 10" }).getAttribute("aria-current")).toBe(
|
|
46
|
+
"page",
|
|
47
|
+
)
|
|
48
|
+
expect((screen.getByRole("button", { name: "Next page" }) as HTMLButtonElement).disabled).toBe(
|
|
49
|
+
true,
|
|
50
|
+
)
|
|
51
|
+
expect((screen.getByRole("button", { name: "First page" }) as HTMLButtonElement).disabled).toBe(
|
|
52
|
+
false,
|
|
53
|
+
)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it("only reports a press when controlled", async () => {
|
|
57
|
+
const onPageChange = vi.fn()
|
|
58
|
+
render(<Pagination pages={10} page={4} onPageChange={onPageChange} />)
|
|
59
|
+
await press(screen.getByRole("button", { name: "Previous page" }))
|
|
60
|
+
expect(onPageChange).toHaveBeenCalledWith(3)
|
|
61
|
+
expect(screen.getByRole("button", { name: "Page 4" }).getAttribute("aria-current")).toBe("page")
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
it("honours siblings and boundaries", () => {
|
|
65
|
+
render(<Pagination pages={20} defaultPage={10} siblings={2} boundaries={2} />)
|
|
66
|
+
expect(pageButtons()).toEqual(["1", "2", "8", "9", "10", "11", "12", "19", "20"])
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
it("shows Page X of Y in the compact display, as a live region", async () => {
|
|
70
|
+
render(<Pagination pages={12} defaultPage={3} display="compact" />)
|
|
71
|
+
expect(screen.getByRole("status").textContent).toContain("Page 3 of 12")
|
|
72
|
+
expect(screen.queryAllByRole("button", { name: /^Page / })).toHaveLength(0)
|
|
73
|
+
await press(screen.getByRole("button", { name: "Next page" }))
|
|
74
|
+
expect(screen.getByRole("status").textContent).toContain("Page 4 of 12")
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
it("disables everything", () => {
|
|
78
|
+
const onPageChange = vi.fn()
|
|
79
|
+
render(<Pagination pages={5} disabled onPageChange={onPageChange} />)
|
|
80
|
+
for (const button of screen.getAllByRole("button"))
|
|
81
|
+
expect((button as HTMLButtonElement).disabled).toBe(true)
|
|
82
|
+
expect(onPageChange).not.toHaveBeenCalled()
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it("translates every string and formats numbers for the locale", () => {
|
|
86
|
+
render(
|
|
87
|
+
<IntlProvider locale="ar-EG">
|
|
88
|
+
<Pagination
|
|
89
|
+
pages={12}
|
|
90
|
+
defaultPage={3}
|
|
91
|
+
display="compact"
|
|
92
|
+
translations={{
|
|
93
|
+
navigation: "Pages",
|
|
94
|
+
previousPage: "Précédente",
|
|
95
|
+
nextPage: "Suivante",
|
|
96
|
+
label: ({ formatted }) => `${formatted.page} / ${formatted.total}`,
|
|
97
|
+
}}
|
|
98
|
+
/>
|
|
99
|
+
</IntlProvider>,
|
|
100
|
+
)
|
|
101
|
+
expect(screen.getByRole("navigation", { name: "Pages" })).toBeTruthy()
|
|
102
|
+
expect(screen.getByRole("button", { name: "Précédente" })).toBeTruthy()
|
|
103
|
+
expect(screen.getByRole("status").textContent).toContain("٣ / ١٢")
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
it("names each page with translations.page", () => {
|
|
107
|
+
render(
|
|
108
|
+
<Pagination pages={3} translations={{ page: ({ page }) => `Aller à la page ${page}` }} />,
|
|
109
|
+
)
|
|
110
|
+
expect(screen.getByRole("button", { name: "Aller à la page 2" })).toBeTruthy()
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
describe("link mode", () => {
|
|
114
|
+
const url = (page: number) => `/blog?page=${page}`
|
|
115
|
+
|
|
116
|
+
it("renders every page as a link", () => {
|
|
117
|
+
render(<Pagination pages={10} defaultPage={2} withEdges getPageUrl={url} />)
|
|
118
|
+
expect(screen.getByRole("link", { name: "Page 3" }).getAttribute("href")).toBe("/blog?page=3")
|
|
119
|
+
expect(screen.getByRole("link", { name: "Page 2" }).getAttribute("aria-current")).toBe("page")
|
|
120
|
+
expect(screen.getByRole("link", { name: "Previous page" }).getAttribute("href")).toBe(
|
|
121
|
+
"/blog?page=1",
|
|
122
|
+
)
|
|
123
|
+
expect(screen.getByRole("link", { name: "Last page" }).getAttribute("href")).toBe(
|
|
124
|
+
"/blog?page=10",
|
|
125
|
+
)
|
|
126
|
+
expect(screen.queryAllByRole("button")).toHaveLength(0)
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
it("leaves a control with nowhere to go without an href", () => {
|
|
130
|
+
render(<Pagination pages={10} withEdges getPageUrl={url} />)
|
|
131
|
+
for (const name of ["First page", "Previous page"]) {
|
|
132
|
+
const link = screen.getByRole("link", { name })
|
|
133
|
+
expect(link.hasAttribute("href")).toBe(false)
|
|
134
|
+
expect(link.getAttribute("aria-disabled")).toBe("true")
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
it("renders through LinkComponentProvider", () => {
|
|
139
|
+
const Link = (props: ComponentProps<"a">) => <a data-router="" {...props} />
|
|
140
|
+
render(
|
|
141
|
+
<LinkComponentProvider component={Link}>
|
|
142
|
+
<Pagination pages={3} getPageUrl={url} />
|
|
143
|
+
</LinkComponentProvider>,
|
|
144
|
+
)
|
|
145
|
+
const link = screen.getByRole("link", { name: "Page 2" })
|
|
146
|
+
expect(link.hasAttribute("data-router")).toBe(true)
|
|
147
|
+
expect(link.getAttribute("href")).toBe("/blog?page=2")
|
|
148
|
+
// A disabled control never reaches the router's component.
|
|
149
|
+
expect(screen.getByRole("link", { name: "Previous page" }).hasAttribute("data-router")).toBe(
|
|
150
|
+
false,
|
|
151
|
+
)
|
|
152
|
+
})
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
it("puts testId on the root and each part", () => {
|
|
156
|
+
render(<Pagination pages={3} testId="pager" withEdges />)
|
|
157
|
+
expect(screen.getByTestId("pager").getAttribute("aria-label")).toBe("Pagination")
|
|
158
|
+
for (const id of [
|
|
159
|
+
"pager-first",
|
|
160
|
+
"pager-prev",
|
|
161
|
+
"pager-items",
|
|
162
|
+
"pager-items-page-2",
|
|
163
|
+
"pager-next",
|
|
164
|
+
]) {
|
|
165
|
+
expect(screen.getByTestId(id)).toBeTruthy()
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
it("composes from parts", async () => {
|
|
170
|
+
render(
|
|
171
|
+
<Pagination.Root pages={4} defaultPage={2}>
|
|
172
|
+
<Pagination.Prev>Back</Pagination.Prev>
|
|
173
|
+
<Pagination.Label />
|
|
174
|
+
<Pagination.Next>Forward</Pagination.Next>
|
|
175
|
+
</Pagination.Root>,
|
|
176
|
+
)
|
|
177
|
+
await press(screen.getByRole("button", { name: "Previous page" }))
|
|
178
|
+
expect(screen.getByRole("status").textContent).toContain("Page 1 of 4")
|
|
179
|
+
expect(screen.getByRole("button", { name: "Next page" }).textContent).toContain("Forward")
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
it("throws outside a Root", () => {
|
|
183
|
+
vi.spyOn(console, "error").mockImplementation(() => {})
|
|
184
|
+
expect(() => render(<Pagination.Next />)).toThrow(/inside Pagination.Root/)
|
|
185
|
+
vi.restoreAllMocks()
|
|
186
|
+
})
|
|
187
|
+
})
|