@42-central/ui-react 0.29.1 → 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/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/tooltip/tooltip.tsx +8 -17
- package/src/components/tour/conditions.test.ts +527 -0
- package/src/components/tour/conditions.ts +445 -0
- package/src/components/tour/create-tours.tsx +150 -0
- package/src/components/tour/index.ts +86 -0
- package/src/components/tour/runtime.ts +187 -0
- package/src/components/tour/storage.test.ts +68 -0
- package/src/components/tour/storage.ts +44 -0
- package/src/components/tour/store.test.tsx +784 -0
- package/src/components/tour/store.ts +661 -0
- package/src/components/tour/tour.test.tsx +318 -0
- package/src/components/tour/tour.tsx +773 -0
- package/src/components/tour/tour.types.test.ts +185 -0
- package/src/components/tour/types.ts +904 -0
- package/src/components/tree/index.ts +24 -0
- package/src/components/tree/tree-row.tsx +179 -0
- package/src/components/tree/tree.test.tsx +296 -0
- package/src/components/tree/tree.tsx +796 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
- package/src/components/tree-select/tree-popover.tsx +26 -107
- package/src/components/tree-select/tree-select.tsx +24 -16
- package/src/icon-stroke.test.tsx +2 -0
- package/src/index.ts +16 -0
- package/src/lib/date-predicates.test.ts +46 -0
- package/src/lib/date-predicates.ts +44 -24
- package/src/lib/date-value.test.ts +24 -1
- package/src/lib/date-value.ts +42 -1
- package/src/lib/floating-arrow.tsx +73 -0
- package/src/lib/focus-return.test.tsx +143 -0
- package/src/lib/focus-return.ts +106 -0
- package/src/lib/meter.test.ts +40 -0
- package/src/lib/meter.ts +159 -0
- package/src/lib/overlay-layer.test.tsx +47 -1
- package/src/lib/overlay-layer.tsx +65 -8
- package/src/lib/pressed.ts +130 -0
- package/src/lib/tree-data.ts +42 -2
- package/src/lib/use-pagination.test.ts +105 -0
- package/src/lib/use-pagination.ts +179 -0
- package/src/lib/use-scroll-spy.test.tsx +238 -0
- package/src/lib/use-scroll-spy.ts +336 -0
- package/src/theme.css +39 -3
- package/src/theme.test.ts +29 -1
- package/src/visually-hidden-containment.test.tsx +9 -0
- package/dist/chunk-2W7H43WL.js.map +0 -1
- package/dist/chunk-7E7JNWOC.js.map +0 -1
- package/dist/chunk-7FPSQBWB.js.map +0 -1
- package/dist/chunk-7KFUFAVP.js.map +0 -1
- package/dist/chunk-AKXALCUN.js.map +0 -1
- package/dist/chunk-B5YHYI7E.js.map +0 -1
- package/dist/chunk-FQJNQW3G.js.map +0 -1
- package/dist/chunk-G3AD3NJG.js.map +0 -1
- package/dist/chunk-GEZYGBXY.js.map +0 -1
- package/dist/chunk-HCHGERDB.js.map +0 -1
- package/dist/chunk-HWBFRDX7.js.map +0 -1
- package/dist/chunk-I4B3N3UX.js.map +0 -1
- package/dist/chunk-IA6DCC3N.js.map +0 -1
- package/dist/chunk-IANYMDKH.js.map +0 -1
- package/dist/chunk-MQHD3EJE.js.map +0 -1
- package/dist/chunk-NNPSBC7O.js.map +0 -1
- package/dist/chunk-OXR7BXZA.js.map +0 -1
- package/dist/chunk-QKSLDQM2.js +0 -120
- package/dist/chunk-QKSLDQM2.js.map +0 -1
- package/dist/chunk-QRNQQIQM.js.map +0 -1
- package/dist/chunk-RKCUXOU2.js.map +0 -1
- package/dist/chunk-S5CQRCTF.js +0 -426
- package/dist/chunk-S5CQRCTF.js.map +0 -1
- package/dist/chunk-SBZJGFZ6.js.map +0 -1
- package/dist/chunk-SP6LCCTZ.js.map +0 -1
- package/dist/chunk-TUP7WXQE.js.map +0 -1
- package/dist/chunk-V2QZG4IT.js.map +0 -1
- package/dist/chunk-X6DESK37.js.map +0 -1
- package/dist/chunk-ZB5VMGKB.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { type HTMLArkProps } from "@ark-ui/react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { Size } from "../../lib/sizes";
|
|
4
|
+
import type { WithTestId } from "../../lib/test-id";
|
|
5
|
+
/**
|
|
6
|
+
* The label shades, as the root writes them onto every label. They are
|
|
7
|
+
* `TEXT_COLOR_CLASSES.secondary` (Figma's `text-secondary`, the labels tier)
|
|
8
|
+
* and `TYPOGRAPHY_SHADE_CLASSES.muted` behind a label selector, spelled out
|
|
9
|
+
* for the scanner; `data-list.test.tsx` checks they still match those helpers.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LABEL_SHADE_CLASSES: {
|
|
12
|
+
readonly secondary: "**:data-[part=label]:text-brand-900/70 dark:**:data-[part=label]:text-white/80";
|
|
13
|
+
readonly muted: "**:data-[part=label]:text-black/60 dark:**:data-[part=label]:text-white/60";
|
|
14
|
+
};
|
|
15
|
+
/** How labels sit against their values. */
|
|
16
|
+
export type DataListOrientation = "horizontal" | "vertical" | "responsive";
|
|
17
|
+
/** One row of the data-driven form. */
|
|
18
|
+
export type DataListEntry = {
|
|
19
|
+
/** The term: what the value is ("Login", "Campus"). Rendered in a `<dt>`. */
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
/** The description: any node, from plain text to a Badge, an Avatar or a Copy button. Rendered in a `<dd>`. */
|
|
22
|
+
value: ReactNode;
|
|
23
|
+
/** React key for the row. Defaults to the label when it is a string, else the row's index. */
|
|
24
|
+
id?: string;
|
|
25
|
+
/** `data-testid` on the item; its label and value get `-label` and `-value` suffixes. */
|
|
26
|
+
testId?: string;
|
|
27
|
+
};
|
|
28
|
+
export type DataListProps = HTMLArkProps<"dl"> & WithTestId & {
|
|
29
|
+
/** Rows to render, before any `children`. Each entry becomes a `DataList.Item` with its label and value. */
|
|
30
|
+
data?: readonly DataListEntry[];
|
|
31
|
+
/**
|
|
32
|
+
* `horizontal` (default) puts each label in a column beside its value. `vertical` stacks the
|
|
33
|
+
* label above the value. `responsive` stacks below a 24rem-wide list and goes horizontal from
|
|
34
|
+
* there, measured on the list itself (a container query), not the viewport.
|
|
35
|
+
*/
|
|
36
|
+
orientation?: DataListOrientation;
|
|
37
|
+
/**
|
|
38
|
+
* The label column's track, for `horizontal` and the wide side of `responsive`: a number in
|
|
39
|
+
* pixels, or any grid track size (`"10rem"`, `"30%"`, `"max-content"`, `"minmax(8rem, 1fr)"`).
|
|
40
|
+
* Default `fit-content(40%)`: the widest label's width, up to 40% of the list.
|
|
41
|
+
*/
|
|
42
|
+
labelWidth?: number | string;
|
|
43
|
+
/** Font size (the `Text` scale) and the spacing that goes with it. Default `md`. */
|
|
44
|
+
size?: Size;
|
|
45
|
+
/** Draws a hairline between items. */
|
|
46
|
+
withDivider?: boolean;
|
|
47
|
+
/** Labels in the muted text shade at normal weight, instead of the secondary shade at medium weight. */
|
|
48
|
+
muted?: boolean;
|
|
49
|
+
};
|
|
50
|
+
export type DataListItemProps = HTMLArkProps<"div"> & WithTestId;
|
|
51
|
+
export type DataListLabelProps = HTMLArkProps<"dt"> & WithTestId;
|
|
52
|
+
export type DataListValueProps = HTMLArkProps<"dd"> & WithTestId;
|
|
53
|
+
/**
|
|
54
|
+
* DataList.Item — one label/value pair. A `<div>` grouping a `<dt>` and its
|
|
55
|
+
* `<dd>` (valid inside a `<dl>`), which lets the pair carry a divider, a
|
|
56
|
+
* `testId` or a click target.
|
|
57
|
+
*/
|
|
58
|
+
declare const DataListItem: ({ testId, ...rest }: DataListItemProps) => import("react").JSX.Element;
|
|
59
|
+
/** DataList.Label — the term, a `<dt>`. Its colour and weight come from the root's `muted`. */
|
|
60
|
+
declare const DataListLabel: ({ className, testId, ...rest }: DataListLabelProps) => import("react").JSX.Element;
|
|
61
|
+
/** DataList.Value — the description, a `<dd>` in the primary text colour. Holds any node; long text wraps inside its column. */
|
|
62
|
+
declare const DataListValue: ({ className, testId, ...rest }: DataListValueProps) => import("react").JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* DataList — a key/value description list on a semantic `<dl>`, for profile
|
|
65
|
+
* and detail pages ("Login: jdoe", "Campus: Paris", "Status: <Badge>").
|
|
66
|
+
*
|
|
67
|
+
* Pure React Server Component. Pass rows as `data`, or compose
|
|
68
|
+
* `DataList.Item` / `.Label` / `.Value` for a row the data form can't
|
|
69
|
+
* describe; the two mix, `data` first.
|
|
70
|
+
*
|
|
71
|
+
* <DataList
|
|
72
|
+
* withDivider
|
|
73
|
+
* data={[
|
|
74
|
+
* { label: "Login", value: "jdoe" },
|
|
75
|
+
* { label: "Campus", value: "Paris" },
|
|
76
|
+
* ]}
|
|
77
|
+
* >
|
|
78
|
+
* <DataList.Item>
|
|
79
|
+
* <DataList.Label>Status</DataList.Label>
|
|
80
|
+
* <DataList.Value><Badge color="green">Active</Badge></DataList.Value>
|
|
81
|
+
* </DataList.Item>
|
|
82
|
+
* </DataList>
|
|
83
|
+
*
|
|
84
|
+
* In `horizontal`, items are subgrid rows of the root's two columns, so labels
|
|
85
|
+
* line up down the list. `responsive` is a container query on the list
|
|
86
|
+
* itself, which therefore always fills its parent's width (it can't
|
|
87
|
+
* shrink-wrap its content in a flex row: give it a width there).
|
|
88
|
+
*/
|
|
89
|
+
declare const DataListComponent: ({ className, style, data, orientation, labelWidth, size, withDivider, muted, asChild, children, testId, ...rest }: DataListProps) => import("react").JSX.Element;
|
|
90
|
+
export declare const DataList: typeof DataListComponent & {
|
|
91
|
+
Item: typeof DataListItem;
|
|
92
|
+
Label: typeof DataListLabel;
|
|
93
|
+
Value: typeof DataListValue;
|
|
94
|
+
};
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=data-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-list.d.ts","sourceRoot":"","sources":["../../../src/components/data-list/data-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AA6BnD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;aAC9B,SAAS,EAAE,gFAAgF;aAC3F,KAAK,EAAE,4EAA4E;CAC3E,CAAA;AAyEV,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,CAAA;AAE1E,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG;IAC1B,6EAA6E;IAC7E,KAAK,EAAE,SAAS,CAAA;IAChB,+GAA+G;IAC/G,KAAK,EAAE,SAAS,CAAA;IAChB,8FAA8F;IAC9F,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,GAC5C,UAAU,GAAG;IACX,4GAA4G;IAC5G,IAAI,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,oFAAoF;IACpF,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wGAAwG;IACxG,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAEH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,UAAU,CAAA;AAChE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;AAChE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;AAEhE;;;;GAIG;AACH,QAAA,MAAM,YAAY,wBAAyB,iBAAiB,gCAE3D,CAAA;AAED,+FAA+F;AAC/F,QAAA,MAAM,aAAa,mCAAoC,kBAAkB,gCAOxE,CAAA;AAED,gIAAgI;AAChI,QAAA,MAAM,aAAa,mCAAoC,kBAAkB,gCAOxE,CAAA;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,iBAAiB,sHAapB,aAAa,gCA4Bf,CAAA;AAED,eAAO,MAAM,QAAQ;;;;CAInB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/data-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { composeChildren } from '../../chunk-R5LYFTHA.js';
|
|
2
|
+
import { props } from '../../chunk-WYCMIIRR.js';
|
|
3
|
+
import { TYPOGRAPHY_SIZE_CLASSES, TEXT_COLOR_CLASSES } from '../../chunk-GIPQUKCN.js';
|
|
4
|
+
import { cn } from '../../chunk-4ASNIDV7.js';
|
|
5
|
+
import { ark } from '@ark-ui/react';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var ROW = "*:data-[part=item]:col-span-full *:data-[part=item]:grid *:data-[part=item]:grid-cols-subgrid *:data-[part=item]:items-baseline";
|
|
10
|
+
var STACK = "*:data-[part=item]:col-span-full *:data-[part=item]:flex *:data-[part=item]:flex-col *:data-[part=item]:gap-y-(--dl-stack)";
|
|
11
|
+
var LABEL_SHADE_CLASSES = {
|
|
12
|
+
secondary: "**:data-[part=label]:text-brand-900/70 dark:**:data-[part=label]:text-white/80",
|
|
13
|
+
muted: "**:data-[part=label]:text-black/60 dark:**:data-[part=label]:text-white/60"
|
|
14
|
+
};
|
|
15
|
+
var dataListVariants = cva(
|
|
16
|
+
[
|
|
17
|
+
"m-0 grid min-w-0 p-0",
|
|
18
|
+
"grid-cols-[var(--dl-label)_minmax(0,1fr)]",
|
|
19
|
+
// The label track's default: as wide as the widest label, but never more
|
|
20
|
+
// than 40% of the list, so a long label wraps instead of squeezing the
|
|
21
|
+
// values. `labelWidth` replaces it through the same property, set inline
|
|
22
|
+
// so it beats this class whatever the selector order.
|
|
23
|
+
"[--dl-label:fit-content(40%)]"
|
|
24
|
+
],
|
|
25
|
+
{
|
|
26
|
+
variants: {
|
|
27
|
+
orientation: {
|
|
28
|
+
horizontal: ROW,
|
|
29
|
+
vertical: STACK,
|
|
30
|
+
// `@container` gives the root `container-type: inline-size`, so its
|
|
31
|
+
// own width can no longer come from its content: it fills its parent,
|
|
32
|
+
// like any block. The query reads the root's content box, which the
|
|
33
|
+
// query's own classes (all on the items) never change, so the switch
|
|
34
|
+
// can't feed back into what it measures. 24rem is Tailwind's `@sm`
|
|
35
|
+
// container step; a `var()` can't appear in a query, so it's a literal.
|
|
36
|
+
responsive: [
|
|
37
|
+
"@container/data-list",
|
|
38
|
+
STACK,
|
|
39
|
+
"@sm/data-list:*:data-[part=item]:grid @sm/data-list:*:data-[part=item]:grid-cols-subgrid",
|
|
40
|
+
// The stack's gap is `gap-y` only, so a subgrid row keeps its
|
|
41
|
+
// `column-gap: normal`, which is the root's column gap. A plain
|
|
42
|
+
// `gap-*` here would reset it and glue each label to its value.
|
|
43
|
+
"@sm/data-list:*:data-[part=item]:items-baseline"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
// Font size from the kit's typography scale (so `size="lg"` reads as
|
|
47
|
+
// `Text size="lg"`), plus the gaps that grow with it. `--dl-stack` is the
|
|
48
|
+
// label-to-value gap of a stacked item, `--dl-row` the space between
|
|
49
|
+
// items (spent as padding instead when there are dividers).
|
|
50
|
+
size: {
|
|
51
|
+
xs: [TYPOGRAPHY_SIZE_CLASSES.xs, "gap-x-3 [--dl-stack:0rem] [--dl-row:0.375rem]"],
|
|
52
|
+
sm: [TYPOGRAPHY_SIZE_CLASSES.sm, "gap-x-4 [--dl-stack:0rem] [--dl-row:0.5rem]"],
|
|
53
|
+
md: [TYPOGRAPHY_SIZE_CLASSES.md, "gap-x-6 [--dl-stack:0.125rem] [--dl-row:0.75rem]"],
|
|
54
|
+
lg: [TYPOGRAPHY_SIZE_CLASSES.lg, "gap-x-6 [--dl-stack:0.125rem] [--dl-row:1rem]"],
|
|
55
|
+
xl: [TYPOGRAPHY_SIZE_CLASSES.xl, "gap-x-8 [--dl-stack:0.25rem] [--dl-row:1.25rem]"]
|
|
56
|
+
},
|
|
57
|
+
// Dividers are the kit's content hairline (the one `Card`'s header and
|
|
58
|
+
// footer draw), between items only. The row spacing moves into each
|
|
59
|
+
// item's padding so the line sits midway between two items, and the
|
|
60
|
+
// first and last item stay flush with the list's edges.
|
|
61
|
+
withDivider: {
|
|
62
|
+
true: [
|
|
63
|
+
"gap-y-0",
|
|
64
|
+
"*:data-[part=item]:py-(--dl-row) *:data-[part=item]:first:pt-0 *:data-[part=item]:last:pb-0",
|
|
65
|
+
"*:data-[part=item]:not-last:border-b *:data-[part=item]:border-brand-900/20 dark:*:data-[part=item]:border-white/8"
|
|
66
|
+
],
|
|
67
|
+
false: "gap-y-(--dl-row)"
|
|
68
|
+
},
|
|
69
|
+
// Labels: the secondary text colour at medium weight by default, a step
|
|
70
|
+
// below the primary-coloured values; `muted` steps them further back,
|
|
71
|
+
// to the typography muted shade at normal weight.
|
|
72
|
+
muted: {
|
|
73
|
+
true: ["**:data-[part=label]:font-normal", LABEL_SHADE_CLASSES.muted],
|
|
74
|
+
false: ["**:data-[part=label]:font-medium", LABEL_SHADE_CLASSES.secondary]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
orientation: "horizontal",
|
|
79
|
+
size: "md",
|
|
80
|
+
withDivider: false,
|
|
81
|
+
muted: false
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
var DataListItem = ({ testId, ...rest }) => /* @__PURE__ */ jsx(ark.div, { ...props({ "data-testid": testId }), "data-part": "item", ...rest });
|
|
86
|
+
var DataListLabel = ({ className, testId, ...rest }) => /* @__PURE__ */ jsx(
|
|
87
|
+
ark.dt,
|
|
88
|
+
{
|
|
89
|
+
...props({ "data-testid": testId }),
|
|
90
|
+
"data-part": "label",
|
|
91
|
+
className: cn("m-0 min-w-0 wrap-break-word", className),
|
|
92
|
+
...rest
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
var DataListValue = ({ className, testId, ...rest }) => /* @__PURE__ */ jsx(
|
|
96
|
+
ark.dd,
|
|
97
|
+
{
|
|
98
|
+
...props({ "data-testid": testId }),
|
|
99
|
+
"data-part": "value",
|
|
100
|
+
className: cn("m-0 min-w-0 wrap-break-word", TEXT_COLOR_CLASSES.primary, className),
|
|
101
|
+
...rest
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
var entryKey = (entry, index) => entry.id ?? (typeof entry.label === "string" ? entry.label : String(index));
|
|
105
|
+
var DataListComponent = ({
|
|
106
|
+
className,
|
|
107
|
+
style,
|
|
108
|
+
data,
|
|
109
|
+
orientation,
|
|
110
|
+
labelWidth,
|
|
111
|
+
size,
|
|
112
|
+
withDivider,
|
|
113
|
+
muted,
|
|
114
|
+
asChild,
|
|
115
|
+
children,
|
|
116
|
+
testId,
|
|
117
|
+
...rest
|
|
118
|
+
}) => {
|
|
119
|
+
const labelTrack = typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth;
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
ark.dl,
|
|
122
|
+
{
|
|
123
|
+
...props({ "data-testid": testId }),
|
|
124
|
+
"data-orientation": orientation ?? "horizontal",
|
|
125
|
+
...rest,
|
|
126
|
+
asChild,
|
|
127
|
+
style: labelTrack ? { ...style, "--dl-label": labelTrack } : style,
|
|
128
|
+
className: cn(dataListVariants({ orientation, size, withDivider, muted }), className),
|
|
129
|
+
children: composeChildren(asChild, children, (own) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
130
|
+
data?.map((entry, index) => /* @__PURE__ */ jsxs(DataListItem, { testId: entry.testId, children: [
|
|
131
|
+
/* @__PURE__ */ jsx(DataListLabel, { testId: entry.testId && `${entry.testId}-label`, children: entry.label }),
|
|
132
|
+
/* @__PURE__ */ jsx(DataListValue, { testId: entry.testId && `${entry.testId}-value`, children: entry.value })
|
|
133
|
+
] }, entryKey(entry, index))),
|
|
134
|
+
own
|
|
135
|
+
] }))
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
var DataList = Object.assign(DataListComponent, {
|
|
140
|
+
Item: DataListItem,
|
|
141
|
+
Label: DataListLabel,
|
|
142
|
+
Value: DataListValue
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
export { DataList };
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
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A,CAAM,MAAM,CAAA,MAAA,CAAA,EACnD,QAAA,EAAA,KAAA,CAAM,KAAA,EACT,CAAA;AAAA,0BACA,GAAA,CAAC,aAAA,EAAA,EAAc,MAAA,EAAQ,KAAA,CAAM,MAAA,IAAU,GAAG,KAAA,CAAM,MAAM,CAAA,MAAA,CAAA,EACnD,QAAA,EAAA,KAAA,CAAM,KAAA,EACT;AAAA,SAAA,EAAA,EANiB,QAAA,CAAS,KAAA,EAAO,KAAK,CAOxC,CACD,CAAA;AAAA,QACA;AAAA,OAAA,EACH,CACD;AAAA;AAAA,GACH;AAEJ,CAAA;AAEO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,iBAAA,EAAmB;AAAA,EACvD,IAAA,EAAM,YAAA;AAAA,EACN,KAAA,EAAO,aAAA;AAAA,EACP,KAAA,EAAO;AACT,CAAC","file":"index.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva } from \"class-variance-authority\"\nimport type { CSSProperties, ReactNode } from \"react\"\nimport { composeChildren } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES, TYPOGRAPHY_SIZE_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * Every part is styled from the root through `data-part` hooks\n * (`*:data-[part=item]`, `**:data-[part=label]`), the split `Timeline` and\n * `Table` use, so the parts stay dumb, need no React context, and the whole\n * tree is a Server Component. The selectors are spelled out in full in each\n * class: Tailwind's scanner only sees literal class names, never ones built\n * by interpolation.\n *\n * An item is either a row or a stack:\n *\n * - A **row** re-uses the root's two tracks through `subgrid`, so every label\n * lines up with every other whatever its own width. Label and value share a\n * first baseline, which keeps a one-line label level with a Badge, a Copy\n * button or the first line of a long value.\n * - A **stack** puts the label above the value. It still spans the root's\n * grid (`col-span-full`), so the root keeps its two tracks either way and\n * only the items change shape. Its gap is `row-gap` alone, so a stack\n * that turns back into a row keeps inheriting the root's column gap. That is what lets `responsive` switch on a\n * container query on the root: a query can only style its container's\n * descendants, never the container itself.\n */\nconst ROW =\n \"*:data-[part=item]:col-span-full *:data-[part=item]:grid *:data-[part=item]:grid-cols-subgrid *:data-[part=item]:items-baseline\"\nconst STACK =\n \"*:data-[part=item]:col-span-full *:data-[part=item]:flex *:data-[part=item]:flex-col *:data-[part=item]:gap-y-(--dl-stack)\"\n\n/**\n * The label shades, as the root writes them onto every label. They are\n * `TEXT_COLOR_CLASSES.secondary` (Figma's `text-secondary`, the labels tier)\n * and `TYPOGRAPHY_SHADE_CLASSES.muted` behind a label selector, spelled out\n * for the scanner; `data-list.test.tsx` checks they still match those helpers.\n */\nexport const LABEL_SHADE_CLASSES = {\n secondary: \"**:data-[part=label]:text-brand-900/70 dark:**:data-[part=label]:text-white/80\",\n muted: \"**:data-[part=label]:text-black/60 dark:**:data-[part=label]:text-white/60\",\n} as const\n\nconst dataListVariants = cva(\n [\n \"m-0 grid min-w-0 p-0\",\n \"grid-cols-[var(--dl-label)_minmax(0,1fr)]\",\n // The label track's default: as wide as the widest label, but never more\n // than 40% of the list, so a long label wraps instead of squeezing the\n // values. `labelWidth` replaces it through the same property, set inline\n // so it beats this class whatever the selector order.\n \"[--dl-label:fit-content(40%)]\",\n ],\n {\n variants: {\n orientation: {\n horizontal: ROW,\n vertical: STACK,\n // `@container` gives the root `container-type: inline-size`, so its\n // own width can no longer come from its content: it fills its parent,\n // like any block. The query reads the root's content box, which the\n // query's own classes (all on the items) never change, so the switch\n // can't feed back into what it measures. 24rem is Tailwind's `@sm`\n // container step; a `var()` can't appear in a query, so it's a literal.\n responsive: [\n \"@container/data-list\",\n STACK,\n \"@sm/data-list:*:data-[part=item]:grid @sm/data-list:*:data-[part=item]:grid-cols-subgrid\",\n // The stack's gap is `gap-y` only, so a subgrid row keeps its\n // `column-gap: normal`, which is the root's column gap. A plain\n // `gap-*` here would reset it and glue each label to its value.\n \"@sm/data-list:*:data-[part=item]:items-baseline\",\n ],\n },\n // Font size from the kit's typography scale (so `size=\"lg\"` reads as\n // `Text size=\"lg\"`), plus the gaps that grow with it. `--dl-stack` is the\n // label-to-value gap of a stacked item, `--dl-row` the space between\n // items (spent as padding instead when there are dividers).\n size: {\n xs: [TYPOGRAPHY_SIZE_CLASSES.xs, \"gap-x-3 [--dl-stack:0rem] [--dl-row:0.375rem]\"],\n sm: [TYPOGRAPHY_SIZE_CLASSES.sm, \"gap-x-4 [--dl-stack:0rem] [--dl-row:0.5rem]\"],\n md: [TYPOGRAPHY_SIZE_CLASSES.md, \"gap-x-6 [--dl-stack:0.125rem] [--dl-row:0.75rem]\"],\n lg: [TYPOGRAPHY_SIZE_CLASSES.lg, \"gap-x-6 [--dl-stack:0.125rem] [--dl-row:1rem]\"],\n xl: [TYPOGRAPHY_SIZE_CLASSES.xl, \"gap-x-8 [--dl-stack:0.25rem] [--dl-row:1.25rem]\"],\n },\n // Dividers are the kit's content hairline (the one `Card`'s header and\n // footer draw), between items only. The row spacing moves into each\n // item's padding so the line sits midway between two items, and the\n // first and last item stay flush with the list's edges.\n withDivider: {\n true: [\n \"gap-y-0\",\n \"*:data-[part=item]:py-(--dl-row) *:data-[part=item]:first:pt-0 *:data-[part=item]:last:pb-0\",\n \"*:data-[part=item]:not-last:border-b *:data-[part=item]:border-brand-900/20 dark:*:data-[part=item]:border-white/8\",\n ],\n false: \"gap-y-(--dl-row)\",\n },\n // Labels: the secondary text colour at medium weight by default, a step\n // below the primary-coloured values; `muted` steps them further back,\n // to the typography muted shade at normal weight.\n muted: {\n true: [\"**:data-[part=label]:font-normal\", LABEL_SHADE_CLASSES.muted],\n false: [\"**:data-[part=label]:font-medium\", LABEL_SHADE_CLASSES.secondary],\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n size: \"md\",\n withDivider: false,\n muted: false,\n },\n },\n)\n\n/** How labels sit against their values. */\nexport type DataListOrientation = \"horizontal\" | \"vertical\" | \"responsive\"\n\n/** One row of the data-driven form. */\nexport type DataListEntry = {\n /** The term: what the value is (\"Login\", \"Campus\"). Rendered in a `<dt>`. */\n label: ReactNode\n /** The description: any node, from plain text to a Badge, an Avatar or a Copy button. Rendered in a `<dd>`. */\n value: ReactNode\n /** React key for the row. Defaults to the label when it is a string, else the row's index. */\n id?: string\n /** `data-testid` on the item; its label and value get `-label` and `-value` suffixes. */\n testId?: string\n}\n\nexport type DataListProps = HTMLArkProps<\"dl\"> &\n WithTestId & {\n /** Rows to render, before any `children`. Each entry becomes a `DataList.Item` with its label and value. */\n data?: readonly DataListEntry[]\n /**\n * `horizontal` (default) puts each label in a column beside its value. `vertical` stacks the\n * label above the value. `responsive` stacks below a 24rem-wide list and goes horizontal from\n * there, measured on the list itself (a container query), not the viewport.\n */\n orientation?: DataListOrientation\n /**\n * The label column's track, for `horizontal` and the wide side of `responsive`: a number in\n * pixels, or any grid track size (`\"10rem\"`, `\"30%\"`, `\"max-content\"`, `\"minmax(8rem, 1fr)\"`).\n * Default `fit-content(40%)`: the widest label's width, up to 40% of the list.\n */\n labelWidth?: number | string\n /** Font size (the `Text` scale) and the spacing that goes with it. Default `md`. */\n size?: Size\n /** Draws a hairline between items. */\n withDivider?: boolean\n /** Labels in the muted text shade at normal weight, instead of the secondary shade at medium weight. */\n muted?: boolean\n }\n\nexport type DataListItemProps = HTMLArkProps<\"div\"> & WithTestId\nexport type DataListLabelProps = HTMLArkProps<\"dt\"> & WithTestId\nexport type DataListValueProps = HTMLArkProps<\"dd\"> & WithTestId\n\n/**\n * DataList.Item — one label/value pair. A `<div>` grouping a `<dt>` and its\n * `<dd>` (valid inside a `<dl>`), which lets the pair carry a divider, a\n * `testId` or a click target.\n */\nconst DataListItem = ({ testId, ...rest }: DataListItemProps) => (\n <ark.div {...props({ \"data-testid\": testId })} data-part=\"item\" {...rest} />\n)\n\n/** DataList.Label — the term, a `<dt>`. Its colour and weight come from the root's `muted`. */\nconst DataListLabel = ({ className, testId, ...rest }: DataListLabelProps) => (\n <ark.dt\n {...props({ \"data-testid\": testId })}\n data-part=\"label\"\n className={cn(\"m-0 min-w-0 wrap-break-word\", className)}\n {...rest}\n />\n)\n\n/** DataList.Value — the description, a `<dd>` in the primary text colour. Holds any node; long text wraps inside its column. */\nconst DataListValue = ({ className, testId, ...rest }: DataListValueProps) => (\n <ark.dd\n {...props({ \"data-testid\": testId })}\n data-part=\"value\"\n className={cn(\"m-0 min-w-0 wrap-break-word\", TEXT_COLOR_CLASSES.primary, className)}\n {...rest}\n />\n)\n\n/** The React key of a data row: its `id`, else a string label, else its index. */\nconst entryKey = (entry: DataListEntry, index: number): string =>\n entry.id ?? (typeof entry.label === \"string\" ? entry.label : String(index))\n\n/**\n * DataList — a key/value description list on a semantic `<dl>`, for profile\n * and detail pages (\"Login: jdoe\", \"Campus: Paris\", \"Status: <Badge>\").\n *\n * Pure React Server Component. Pass rows as `data`, or compose\n * `DataList.Item` / `.Label` / `.Value` for a row the data form can't\n * describe; the two mix, `data` first.\n *\n * <DataList\n * withDivider\n * data={[\n * { label: \"Login\", value: \"jdoe\" },\n * { label: \"Campus\", value: \"Paris\" },\n * ]}\n * >\n * <DataList.Item>\n * <DataList.Label>Status</DataList.Label>\n * <DataList.Value><Badge color=\"green\">Active</Badge></DataList.Value>\n * </DataList.Item>\n * </DataList>\n *\n * In `horizontal`, items are subgrid rows of the root's two columns, so labels\n * line up down the list. `responsive` is a container query on the list\n * itself, which therefore always fills its parent's width (it can't\n * shrink-wrap its content in a flex row: give it a width there).\n */\nconst DataListComponent = ({\n className,\n style,\n data,\n orientation,\n labelWidth,\n size,\n withDivider,\n muted,\n asChild,\n children,\n testId,\n ...rest\n}: DataListProps) => {\n const labelTrack = typeof labelWidth === \"number\" ? `${labelWidth}px` : labelWidth\n return (\n <ark.dl\n {...props({ \"data-testid\": testId })}\n data-orientation={orientation ?? \"horizontal\"}\n {...rest}\n asChild={asChild}\n style={labelTrack ? ({ ...style, \"--dl-label\": labelTrack } as CSSProperties) : style}\n className={cn(dataListVariants({ orientation, size, withDivider, muted }), className)}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {data?.map((entry, index) => (\n <DataListItem key={entryKey(entry, index)} testId={entry.testId}>\n <DataListLabel testId={entry.testId && `${entry.testId}-label`}>\n {entry.label}\n </DataListLabel>\n <DataListValue testId={entry.testId && `${entry.testId}-value`}>\n {entry.value}\n </DataListValue>\n </DataListItem>\n ))}\n {own}\n </>\n ))}\n </ark.dl>\n )\n}\n\nexport const DataList = Object.assign(DataListComponent, {\n Item: DataListItem,\n Label: DataListLabel,\n Value: DataListValue,\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-group.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAA;AAQvD,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAE9E,uDAAuD;AACvD,MAAM,MAAM,2BAA2B,CAAC,OAAO,SAAS,OAAO,IAAI;IACjE,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACnD,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,KAAK,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M,CAAA;IAClB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,6BAA6B,CAAA;IAC3C,KAAK,EAAE,sBAAsB,CAAA;CAC9B,+BAuCA;AAED,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,OAAO,EAAE,EAC9D,IAAI,EACJ,QAAQ,EACR,YAAY,GACb,EAAE;IACD,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACjC,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IACpC,YAAY,EAAE,6BAA6B,CAAA;CAC5C,+BAQA;
|
|
1
|
+
{"version":3,"file":"data-table-group.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAA;AAQvD,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAE9E,uDAAuD;AACvD,MAAM,MAAM,2BAA2B,CAAC,OAAO,SAAS,OAAO,IAAI;IACjE,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACnD,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,KA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,GACV,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IACpC,YAAY,EAAE,6BAA6B,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,+BAsBA"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { Color } from "../../lib/colors";
|
|
3
|
+
import { type EmptyStateRootProps } from "../empty-state";
|
|
2
4
|
type Placeholder = {
|
|
3
5
|
title: ReactNode;
|
|
4
6
|
description?: ReactNode;
|
|
5
7
|
actions?: ReactNode;
|
|
8
|
+
/** Overrides the view's palette: the error view is `red` by default, the
|
|
9
|
+
* empty view neutral. */
|
|
10
|
+
color?: Color;
|
|
6
11
|
};
|
|
7
12
|
export type DataTablePlaceholder = ReactNode | Placeholder;
|
|
8
13
|
/** The body's resolved view — `DataTable` and `DataTableStackedRows` both
|
|
@@ -10,9 +15,15 @@ export type DataTablePlaceholder = ReactNode | Placeholder;
|
|
|
10
15
|
* })` in `data-table.tsx`) so the `<table>` and stacked-card renderings can
|
|
11
16
|
* never disagree on which state is showing. */
|
|
12
17
|
export type DataTableView = "error" | "loading" | "empty" | "items";
|
|
13
|
-
|
|
18
|
+
/** Draws an `empty` / `error` prop as an `EmptyState`: a bare node is its
|
|
19
|
+
* title, an object spells out every part. The view supplies the icon, its
|
|
20
|
+
* default actions (clear filters, retry) and its default palette; the
|
|
21
|
+
* object's own `actions` and `color` win over them. */
|
|
22
|
+
export declare function RenderPlaceholder({ node, icon, defaultActions, defaultColor, ...rest }: Omit<EmptyStateRootProps, "title" | "color"> & {
|
|
14
23
|
node: DataTablePlaceholder;
|
|
24
|
+
icon?: ReactNode;
|
|
15
25
|
defaultActions?: ReactNode;
|
|
26
|
+
defaultColor?: Color;
|
|
16
27
|
}): import("react").JSX.Element;
|
|
17
28
|
export {};
|
|
18
29
|
//# sourceMappingURL=data-table-placeholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-placeholder.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"data-table-placeholder.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;8BAC0B;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,WAAW,CAAA;AAE1D;;;gDAGgD;AAChD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAKnE;;;wDAGwD;AACxD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,GAAG,IAAI,EACR,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IAChD,IAAI,EAAE,oBAAoB,CAAA;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,+BAcA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-stack.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-stack.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,KAAK,IAAI,kBAAkB,EAChC,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"data-table-stack.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-stack.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,KAAK,IAAI,kBAAkB,EAChC,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;AAc9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,KAAK,sBAAsB,EAAY,MAAM,oBAAoB,CAAA;AAC1E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAE9E;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,OAAO,EAAE,EAC5D,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAA;IACpB;yDACqD;IACrD,QAAQ,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;IAC5C;6EACyE;IACzE,IAAI,EAAE,aAAa,CAAA;IACnB,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,iBAAiB,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,EAAE,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,YAAY,EAAE,6BAA6B,CAAA;IAC3C,KAAK,EAAE,sBAAsB,CAAA;CAC9B,+BAiLA;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,OAAO,EAAE,EAC7D,KAAK,EACL,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,GACV,EAAE;IACD,KAAK,EAAE,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;IACrD;sEACkE;IAClE,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,aAAa,CAAA;QACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;QAC3C,QAAQ,EAAE,MAAM,CAAA;QAChB,eAAe,EAAE,OAAO,CAAA;QACxB,uBAAuB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;KAClD,CAAA;IACD;;kCAE8B;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,YAAY,EAAE,6BAA6B,CAAA;IAC3C,KAAK,EAAE,sBAAsB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,sCAyMA"}
|
|
@@ -145,10 +145,13 @@ export type DataTableProps<TEntity extends RowData> = WithTestId & {
|
|
|
145
145
|
paginationMode?: "page" | "rows";
|
|
146
146
|
/** Skeleton rows on first load; dims existing rows on a refetch. */
|
|
147
147
|
loading?: boolean;
|
|
148
|
-
/** Replaces the body with a `role="alert"`
|
|
148
|
+
/** Replaces the body with a `role="alert"` `EmptyState`, red so a failed list
|
|
149
|
+
* doesn't read as an empty one. A node is its title; `{ title, description,
|
|
150
|
+
* actions, color }` spells out the parts, and `color` overrides the red. */
|
|
149
151
|
error?: DataTablePlaceholder;
|
|
150
152
|
onRetry?: () => void;
|
|
151
|
-
/** Shown when `!loading && data` produced no rows
|
|
153
|
+
/** Shown as a neutral `EmptyState` when `!loading && data` produced no rows: a node
|
|
154
|
+
* or `{ title, description, actions, color }`. Default `DATA_TABLE_DEFAULT_EMPTY`. */
|
|
152
155
|
empty?: DataTablePlaceholder;
|
|
153
156
|
/** Auto-injects a leading checkbox column (header = indeterminate
|
|
154
157
|
* select-all); mirrors react-table's own table option of the same name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAElB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAqB,KAAK,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAEnF,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAG5B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,KAAK,cAAc,EAAuC,MAAM,uBAAuB,CAAA;AAEhG,OAA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