@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
|
@@ -13,6 +13,8 @@ import type { ForbidAsChild } from "../../lib/as-child"
|
|
|
13
13
|
import { cn } from "../../lib/cn"
|
|
14
14
|
import type { Color } from "../../lib/colors"
|
|
15
15
|
import type { GradientDir, GradientProps } from "../../lib/gradient"
|
|
16
|
+
import { useLocale } from "../../lib/intl"
|
|
17
|
+
import { arkValue, METER_ZONE_COLORS, type MeterProps, meterZone } from "../../lib/meter"
|
|
16
18
|
import { props } from "../../lib/props"
|
|
17
19
|
import type { Size } from "../../lib/sizes"
|
|
18
20
|
import type { WithTestId } from "../../lib/test-id"
|
|
@@ -35,6 +37,13 @@ import type { WithTestId } from "../../lib/test-id"
|
|
|
35
37
|
* for a non-numeric reading): they land on the `role="progressbar"` `<svg>`,
|
|
36
38
|
* not the wrapping root, so assistive tech reads them with the value.
|
|
37
39
|
*
|
|
40
|
+
* Pass `meter` for a measurement rather than a task (a skill score, a quota):
|
|
41
|
+
* the `<svg>` becomes `role="meter"` with a locale-formatted `aria-valuetext`,
|
|
42
|
+
* can't be indeterminate, and optional `low` / `high` / `optimum` thresholds
|
|
43
|
+
* colour the arc by zone, like HTML `<meter>` (see `lib/meter.ts`).
|
|
44
|
+
*
|
|
45
|
+
* <CircularProgress meter value={82} aria-label="Score" low={40} high={70} optimum={100} />
|
|
46
|
+
*
|
|
38
47
|
* Palette comes through the kit's `data-color` + slot-var system, so a new
|
|
39
48
|
* color in `colors.css` works here for free.
|
|
40
49
|
*/
|
|
@@ -86,6 +95,7 @@ const circularRange = cva(
|
|
|
86
95
|
export type CircularProgressVariant = NonNullable<VariantProps<typeof circularRange>["variant"]>
|
|
87
96
|
export type CircularProgressSize = Size
|
|
88
97
|
|
|
98
|
+
export type { MeterZone } from "../../lib/meter"
|
|
89
99
|
export type { GradientDir, GradientProps }
|
|
90
100
|
|
|
91
101
|
type CircularProgressClassNames = {
|
|
@@ -98,23 +108,43 @@ type CircularProgressClassNames = {
|
|
|
98
108
|
|
|
99
109
|
type ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>
|
|
100
110
|
|
|
101
|
-
|
|
111
|
+
/**
|
|
112
|
+
* `M` is `meter`'s literal type, inferred at the call site (see `MeterProps`).
|
|
113
|
+
* Left out, it is `boolean`: every prop available, `value` plain `number | null`,
|
|
114
|
+
* which is what a generic wrapper or an `Omit<CircularProgressProps, …>` should see.
|
|
115
|
+
*/
|
|
116
|
+
export type CircularProgressProps<M extends boolean = boolean> = Omit<
|
|
102
117
|
ArkRootProps,
|
|
103
|
-
|
|
118
|
+
| "value"
|
|
119
|
+
| "defaultValue"
|
|
120
|
+
| "onValueChange"
|
|
121
|
+
// The kit's own `onChange` reports the value; a div's change event never fires here.
|
|
122
|
+
| "onChange"
|
|
123
|
+
| "ref"
|
|
124
|
+
| "className"
|
|
125
|
+
| "children"
|
|
126
|
+
| "asChild"
|
|
127
|
+
| "locale"
|
|
128
|
+
| "formatOptions"
|
|
129
|
+
| "translations"
|
|
104
130
|
> &
|
|
105
131
|
ForbidAsChild &
|
|
106
132
|
VariantProps<typeof circularRange> &
|
|
107
|
-
WithTestId &
|
|
108
|
-
|
|
109
|
-
value
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
|
|
133
|
+
WithTestId &
|
|
134
|
+
MeterProps<M> & {
|
|
135
|
+
/** Locale the value text is formatted in: a BCP-47 tag, or `"auto"` for the
|
|
136
|
+
* visitor's. Defaults to the `IntlProvider`'s, then `en-US`. */
|
|
137
|
+
locale?: "auto" | (string & {})
|
|
138
|
+
/** `Intl.NumberFormat` options for the value text. Defaults to a percentage;
|
|
139
|
+
* `{ style: "unit", unit: "gigabyte" }` reads the raw value instead. */
|
|
140
|
+
formatOptions?: ArkRootProps["formatOptions"]
|
|
141
|
+
/** Overrides the value text. `value` receives `{ value, min, max, percent,
|
|
142
|
+
* formatter }` and returns what a screen reader says: "Level 7, 40% to 8". */
|
|
143
|
+
translations?: ArkRootProps["translations"]
|
|
114
144
|
size?: CircularProgressSize | number
|
|
115
145
|
/** Stroke width in px, a tee-shirt size, or omitted for a per-size default. */
|
|
116
146
|
thickness?: CircularProgressSize | number
|
|
117
|
-
/** Accent palette. Ignored when `variant="gradient"
|
|
147
|
+
/** Accent palette. Ignored when `variant="gradient"`, and by a meter's zones. */
|
|
118
148
|
color?: Color
|
|
119
149
|
/**
|
|
120
150
|
* Gradient stops; only applied when `variant="gradient"`. `from` / `to` /
|
|
@@ -124,7 +154,7 @@ export type CircularProgressProps = Omit<
|
|
|
124
154
|
gradient?: GradientProps
|
|
125
155
|
/** Centered content, e.g. a percentage label. */
|
|
126
156
|
children?: ReactNode
|
|
127
|
-
/** Lands on the ring `<svg>` — the `role="progressbar"` element. */
|
|
157
|
+
/** Lands on the ring `<svg>` — the `role="progressbar"` (or `"meter"`) element. */
|
|
128
158
|
ref?: Ref<SVGSVGElement>
|
|
129
159
|
/** Names the ring. Lands on the `<svg>`, the `role="progressbar"` element, like the other
|
|
130
160
|
* `aria-*` naming props below; without one, Ark names it by its value ("40"). */
|
|
@@ -132,17 +162,24 @@ export type CircularProgressProps = Omit<
|
|
|
132
162
|
/** Names the ring after a visible caption, by id. Wins over `aria-label`. */
|
|
133
163
|
"aria-labelledby"?: string
|
|
134
164
|
"aria-describedby"?: string
|
|
135
|
-
/** Read instead of the number: "Uploading", "3 of 8 files".
|
|
165
|
+
/** Read instead of the number: "Uploading", "3 of 8 files". A meter
|
|
166
|
+
* writes its formatted value here when unset. */
|
|
136
167
|
"aria-valuetext"?: string
|
|
137
168
|
className?: string
|
|
138
169
|
classNames?: CircularProgressClassNames
|
|
139
170
|
style?: CSSProperties
|
|
140
171
|
}
|
|
141
172
|
|
|
142
|
-
|
|
173
|
+
// `M` defaults to `false`, not `boolean`, so a bar with no `meter` rejects thresholds.
|
|
174
|
+
export const CircularProgress = <M extends boolean = false>({
|
|
143
175
|
value,
|
|
144
176
|
defaultValue,
|
|
145
177
|
onChange,
|
|
178
|
+
meter,
|
|
179
|
+
low,
|
|
180
|
+
high,
|
|
181
|
+
optimum,
|
|
182
|
+
locale,
|
|
146
183
|
variant,
|
|
147
184
|
size,
|
|
148
185
|
thickness,
|
|
@@ -163,19 +200,24 @@ export const CircularProgress = ({
|
|
|
163
200
|
"aria-describedby": describedBy,
|
|
164
201
|
"aria-valuetext": valueText,
|
|
165
202
|
...rest
|
|
166
|
-
}: CircularProgressProps) => {
|
|
203
|
+
}: CircularProgressProps<M>) => {
|
|
167
204
|
const isGradient = variant === "gradient"
|
|
168
205
|
const gradientId = useId()
|
|
206
|
+
const resolvedLocale = useLocale(locale)
|
|
169
207
|
|
|
170
208
|
return (
|
|
171
209
|
<Ark.Root
|
|
172
210
|
// `undefined` → uncontrolled (Ark's own default). `null` → indeterminate.
|
|
173
211
|
// The two must NOT be coalesced, so each is forwarded verbatim.
|
|
174
|
-
value={value}
|
|
175
|
-
defaultValue={defaultValue}
|
|
176
|
-
|
|
212
|
+
value={arkValue("CircularProgress", meter, value, min)}
|
|
213
|
+
defaultValue={arkValue("CircularProgress", meter, defaultValue, min)}
|
|
214
|
+
// A meter's value is never null, so its narrower `onChange` takes Ark's value as is.
|
|
215
|
+
onValueChange={
|
|
216
|
+
onChange ? ({ value: v }) => (onChange as (v: number | null) => void)(v) : undefined
|
|
217
|
+
}
|
|
177
218
|
min={min}
|
|
178
219
|
max={max}
|
|
220
|
+
locale={resolvedLocale}
|
|
179
221
|
data-color={!isGradient ? color : undefined}
|
|
180
222
|
className={cn("group/cprogress relative inline-flex", className, classNames?.root)}
|
|
181
223
|
style={
|
|
@@ -187,48 +229,63 @@ export const CircularProgress = ({
|
|
|
187
229
|
}
|
|
188
230
|
{...rest}
|
|
189
231
|
>
|
|
190
|
-
<Ark.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
<Ark.Context>
|
|
233
|
+
{(api) => {
|
|
234
|
+
// Meter zones read the machine's own value, so an uncontrolled meter is coloured too.
|
|
235
|
+
const zone = meter ? meterZone(api.value, { min, max, low, high, optimum }) : undefined
|
|
236
|
+
return (
|
|
237
|
+
<Ark.Circle
|
|
238
|
+
ref={ref}
|
|
239
|
+
// Ark stamps `role="progressbar"` here; a meter overrides it (local props win).
|
|
240
|
+
{...(meter ? { role: "meter" } : null)}
|
|
241
|
+
className={cn(
|
|
242
|
+
// Ark's CircleRange already rotates the arc to start at 12 o'clock.
|
|
243
|
+
"block",
|
|
244
|
+
// Indeterminate: Ark drops the dash, so the range below pins a fixed
|
|
245
|
+
// arc; spin the whole ring. Gated under reduced motion in theme.css.
|
|
246
|
+
"group-data-[state=indeterminate]/cprogress:animate-progress-spin",
|
|
247
|
+
classNames?.circle,
|
|
248
|
+
)}
|
|
249
|
+
{...props({
|
|
250
|
+
"data-testid": testId,
|
|
251
|
+
// The zone's palette lands on the ring, which the arc inherits from.
|
|
252
|
+
"data-color": zone && !isGradient ? METER_ZONE_COLORS[zone] : undefined,
|
|
253
|
+
"data-zone": zone,
|
|
254
|
+
"aria-label": label,
|
|
255
|
+
"aria-labelledby": labelledBy,
|
|
256
|
+
"aria-describedby": describedBy,
|
|
257
|
+
// A meter always says its value: Ark's locale-aware `valueAsString`, which
|
|
258
|
+
// `formatOptions` / `translations.value` shape, unless the caller wrote one.
|
|
259
|
+
"aria-valuetext": valueText ?? (meter ? api.valueAsString : undefined),
|
|
260
|
+
})}
|
|
261
|
+
>
|
|
262
|
+
{isGradient && (
|
|
263
|
+
<defs>
|
|
264
|
+
<linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="100%">
|
|
265
|
+
<stop offset="0%" stopColor={gradient?.from ?? "var(--color-purple-300)"} />
|
|
266
|
+
{gradient?.via && <stop offset="50%" stopColor={gradient.via} />}
|
|
267
|
+
<stop offset="100%" stopColor={gradient?.to ?? "var(--color-pink-400)"} />
|
|
268
|
+
</linearGradient>
|
|
269
|
+
</defs>
|
|
270
|
+
)}
|
|
271
|
+
<Ark.CircleTrack
|
|
272
|
+
className={cn("fill-none stroke-black/3 dark:stroke-white/4", classNames?.track)}
|
|
273
|
+
/>
|
|
274
|
+
<Ark.CircleRange
|
|
275
|
+
strokeLinecap="round"
|
|
276
|
+
className={cn(
|
|
277
|
+
circularRange({ variant }),
|
|
278
|
+
// Indeterminate: pin a fixed 25% arc (Ark omits the dash here).
|
|
279
|
+
"group-data-[state=indeterminate]/cprogress:[stroke-dasharray:calc(var(--circumference)*0.25)_var(--circumference)]",
|
|
280
|
+
"group-data-[state=indeterminate]/cprogress:[stroke-dashoffset:0]",
|
|
281
|
+
classNames?.range,
|
|
282
|
+
)}
|
|
283
|
+
style={isGradient ? { stroke: `url(#${gradientId})` } : undefined}
|
|
284
|
+
/>
|
|
285
|
+
</Ark.Circle>
|
|
286
|
+
)
|
|
287
|
+
}}
|
|
288
|
+
</Ark.Context>
|
|
232
289
|
|
|
233
290
|
{children != null && (
|
|
234
291
|
<span
|
|
@@ -9,6 +9,22 @@ describe("Code", () => {
|
|
|
9
9
|
expect(container.firstElementChild?.tagName).toBe("CODE")
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
+
// Under an RTL ancestor, `<link>` rendered as `<link` with the `>` flung to
|
|
13
|
+
// the far end of the line: the bidi algorithm resolved the edge neutrals
|
|
14
|
+
// against the page. `dir="ltr"` sets the chip's direction and isolates it.
|
|
15
|
+
it("reads left to right inside an RTL page, unless the caller overrides dir", () => {
|
|
16
|
+
render(
|
|
17
|
+
<p dir="rtl">
|
|
18
|
+
CDN <Code testId="ltr">{"<link>"}</Code>{" "}
|
|
19
|
+
<Code testId="auto" dir="auto">
|
|
20
|
+
x
|
|
21
|
+
</Code>
|
|
22
|
+
</p>,
|
|
23
|
+
)
|
|
24
|
+
expect(screen.getByTestId("ltr").getAttribute("dir")).toBe("ltr")
|
|
25
|
+
expect(screen.getByTestId("auto").getAttribute("dir")).toBe("auto")
|
|
26
|
+
})
|
|
27
|
+
|
|
12
28
|
it("renders testId as data-testid on the root", () => {
|
|
13
29
|
render(<Code testId="snippet">x</Code>)
|
|
14
30
|
expect(screen.getByTestId("snippet")).toBeTruthy()
|
|
@@ -17,6 +17,16 @@ import { Mark } from "../mark/mark"
|
|
|
17
17
|
* source order, same trick Badge's `light` variant uses, applied to text
|
|
18
18
|
* only.
|
|
19
19
|
*
|
|
20
|
+
* `dir="ltr"`: code reads left to right as typed, on an RTL page too. The
|
|
21
|
+
* attribute does two things the HTML rendering rules tie to it: it sets
|
|
22
|
+
* `direction: ltr` inside the chip, so neutral characters at its edges (`<`,
|
|
23
|
+
* `>`, `()`, `;`) resolve LTR, and it gives the element `unicode-bidi:
|
|
24
|
+
* isolate`, so the chip sits in the RTL flow as one unit and neither its text
|
|
25
|
+
* nor the text around it gets reordered across the boundary. Isolation alone
|
|
26
|
+
* would keep an inherited RTL base direction (`onClick()` would read
|
|
27
|
+
* `()onClick`); `direction: ltr` alone would let `<link>`'s `>` escape to the
|
|
28
|
+
* far end of an RTL line. A caller can still pass `dir` to override it.
|
|
29
|
+
*
|
|
20
30
|
* Nesting a `<Mark>` (or `Code.Mark`) inside `Code` needs no special-case
|
|
21
31
|
* code here — Mark always declares its own explicit text color, which wins
|
|
22
32
|
* over any inherited color from `Code` (see `Mark`'s own doc comment).
|
|
@@ -30,6 +40,7 @@ export type CodeProps = HTMLArkProps<"code"> &
|
|
|
30
40
|
function CodeComponent({ className, color, testId, ...rest }: CodeProps) {
|
|
31
41
|
return (
|
|
32
42
|
<ark.code
|
|
43
|
+
dir="ltr"
|
|
33
44
|
data-color={color}
|
|
34
45
|
{...props({ "data-testid": testId })}
|
|
35
46
|
{...rest}
|
|
@@ -7,15 +7,17 @@ import {
|
|
|
7
7
|
type ComponentPropsWithoutRef,
|
|
8
8
|
createContext,
|
|
9
9
|
type ReactNode,
|
|
10
|
+
type Ref,
|
|
10
11
|
useContext,
|
|
11
12
|
} from "react"
|
|
12
13
|
import { composeChildren, type NoAsChild } from "../../lib/as-child"
|
|
13
14
|
import { cn } from "../../lib/cn"
|
|
14
15
|
import { useOverlayContainer } from "../../lib/overlay-container"
|
|
15
|
-
import { useNestedLayer } from "../../lib/overlay-layer"
|
|
16
|
+
import { useNestedLayer, useTourRaised } from "../../lib/overlay-layer"
|
|
16
17
|
import { props } from "../../lib/props"
|
|
17
18
|
import type { ItemRenderState } from "../../lib/select-data"
|
|
18
19
|
import type { WithTestId } from "../../lib/test-id"
|
|
20
|
+
import { useInheritedDisabled, useInheritedInvalid } from "../field/field"
|
|
19
21
|
import {
|
|
20
22
|
type InputSize,
|
|
21
23
|
type InputVariant,
|
|
@@ -25,13 +27,14 @@ import {
|
|
|
25
27
|
} from "../input/input"
|
|
26
28
|
import { CheckIcon, ChevronIcon, CloseIcon } from "../popover/icons"
|
|
27
29
|
import {
|
|
30
|
+
ListboxScrollArea,
|
|
31
|
+
listboxList,
|
|
28
32
|
popoverChevron,
|
|
29
33
|
popoverClearTrigger,
|
|
30
34
|
popoverContent,
|
|
31
35
|
popoverEmpty,
|
|
32
36
|
popoverGroupLabel,
|
|
33
37
|
popoverIndicator,
|
|
34
|
-
popoverList,
|
|
35
38
|
popoverOption,
|
|
36
39
|
scrollHighlightedIntoView,
|
|
37
40
|
} from "../popover/popover"
|
|
@@ -114,27 +117,37 @@ const Root = <T extends Ark.CollectionItem = Ark.CollectionItem>({
|
|
|
114
117
|
children,
|
|
115
118
|
testId,
|
|
116
119
|
translations,
|
|
120
|
+
disabled: disabledProp,
|
|
121
|
+
invalid: invalidProp,
|
|
117
122
|
...rest
|
|
118
|
-
}: ComboboxRootProps<T>) =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
)
|
|
123
|
+
}: ComboboxRootProps<T>) => {
|
|
124
|
+
// Ark's machine reads only a `Field`; a composed combobox with no `Field`
|
|
125
|
+
// takes an enclosing `Fieldset`'s state here, like the kit's own pickers.
|
|
126
|
+
const disabled = useInheritedDisabled(disabledProp)
|
|
127
|
+
const invalid = useInheritedInvalid(invalidProp)
|
|
128
|
+
return (
|
|
129
|
+
<ComboboxStyleContext.Provider value={{ size, variant }}>
|
|
130
|
+
<Ark.Root
|
|
131
|
+
disabled={disabled}
|
|
132
|
+
invalid={invalid}
|
|
133
|
+
// Match the popover width to the control by default; callers can override.
|
|
134
|
+
positioning={{ sameWidth: true, ...positioning }}
|
|
135
|
+
// The popover's Content is an `overflow-hidden` clip wrapper, so the
|
|
136
|
+
// machine's native auto-scroll (which needs Content to be scrollable) is a
|
|
137
|
+
// no-op; route scrolling to the inner List scroller instead. Callers in
|
|
138
|
+
// `rest` can still override.
|
|
139
|
+
scrollToIndexFn={scrollHighlightedIntoView}
|
|
140
|
+
className={cn("w-full", className)}
|
|
141
|
+
// The kit's English wording over zag's; a partial override keeps the other key.
|
|
142
|
+
translations={resolveComboboxTranslations(translations)}
|
|
143
|
+
{...props({ "data-testid": testId })}
|
|
144
|
+
{...rest}
|
|
145
|
+
>
|
|
146
|
+
{children}
|
|
147
|
+
</Ark.Root>
|
|
148
|
+
</ComboboxStyleContext.Provider>
|
|
149
|
+
)
|
|
150
|
+
}
|
|
138
151
|
|
|
139
152
|
export type ComboboxControlProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Control>> &
|
|
140
153
|
WithTestId & {
|
|
@@ -244,12 +257,21 @@ const Content = ({
|
|
|
244
257
|
}) => {
|
|
245
258
|
const portalContainer = useOverlayContainer(container)
|
|
246
259
|
// Holds an enclosing Modal/Drawer/Popover open while the list is; see `lib/overlay-layer.tsx`.
|
|
247
|
-
|
|
260
|
+
const open = useComboboxContext().open
|
|
261
|
+
useNestedLayer(open)
|
|
262
|
+
// Lifted above a running tour; see `useTourRaised`.
|
|
263
|
+
const raised = useTourRaised(open)
|
|
248
264
|
return (
|
|
249
265
|
<Portal disabled={!withinPortal} container={portalContainer}>
|
|
250
266
|
<Ark.Positioner>
|
|
251
|
-
<Ark.Content
|
|
252
|
-
|
|
267
|
+
<Ark.Content
|
|
268
|
+
className={cn(popoverContent, className)}
|
|
269
|
+
data-raised={raised || undefined}
|
|
270
|
+
{...rest}
|
|
271
|
+
>
|
|
272
|
+
<ListboxScrollArea withPaddingTop={withPaddingTop}>
|
|
273
|
+
<Ark.List className={listboxList}>{children}</Ark.List>
|
|
274
|
+
</ListboxScrollArea>
|
|
253
275
|
</Ark.Content>
|
|
254
276
|
</Ark.Positioner>
|
|
255
277
|
</Portal>
|
|
@@ -268,12 +290,25 @@ const Panel = ({
|
|
|
268
290
|
className,
|
|
269
291
|
children,
|
|
270
292
|
withPaddingTop = true,
|
|
293
|
+
viewportRef,
|
|
271
294
|
asChild: _asChild,
|
|
272
295
|
...rest
|
|
273
|
-
}: NoAsChild<ComponentPropsWithoutRef<typeof Ark.Content>> & {
|
|
296
|
+
}: NoAsChild<ComponentPropsWithoutRef<typeof Ark.Content>> & {
|
|
297
|
+
withPaddingTop?: boolean
|
|
298
|
+
/** The scroller (the scroll area's viewport), which `className` styles. */
|
|
299
|
+
viewportRef?: Ref<HTMLDivElement>
|
|
300
|
+
}) => {
|
|
274
301
|
return (
|
|
275
|
-
|
|
276
|
-
|
|
302
|
+
// A shrinkable column, so in a height-capped flex parent (Spotlight's non-scrolling
|
|
303
|
+
// modal body) the list gives way rather than pushing what follows it out of view.
|
|
304
|
+
<Ark.Content {...rest} className="flex min-h-0 flex-col">
|
|
305
|
+
<ListboxScrollArea
|
|
306
|
+
withPaddingTop={withPaddingTop}
|
|
307
|
+
viewportRef={viewportRef}
|
|
308
|
+
className={className}
|
|
309
|
+
>
|
|
310
|
+
<Ark.List className={listboxList}>{children}</Ark.List>
|
|
311
|
+
</ListboxScrollArea>
|
|
277
312
|
</Ark.Content>
|
|
278
313
|
)
|
|
279
314
|
}
|
|
@@ -20,7 +20,12 @@ import {
|
|
|
20
20
|
Combobox,
|
|
21
21
|
type ComboboxTranslations,
|
|
22
22
|
} from "../combobox/combobox"
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
type FieldProps,
|
|
25
|
+
FieldShell,
|
|
26
|
+
useInheritedDisabled,
|
|
27
|
+
useInheritedInvalid,
|
|
28
|
+
} from "../field/field"
|
|
24
29
|
import type { InputSize, InputVariant } from "../input/input"
|
|
25
30
|
import { CheckIcon, CloseIcon } from "../popover/icons"
|
|
26
31
|
import { popoverIndicator } from "../popover/popover"
|
|
@@ -137,7 +142,7 @@ export const ComboboxList = <const Data extends SelectData = SelectData>({
|
|
|
137
142
|
clearable,
|
|
138
143
|
size = "md",
|
|
139
144
|
variant = "unstyled",
|
|
140
|
-
disabled,
|
|
145
|
+
disabled: disabledProp,
|
|
141
146
|
readOnly,
|
|
142
147
|
required,
|
|
143
148
|
invalid,
|
|
@@ -158,9 +163,12 @@ export const ComboboxList = <const Data extends SelectData = SelectData>({
|
|
|
158
163
|
translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel
|
|
159
164
|
type Item = SelectValue<Data>
|
|
160
165
|
|
|
166
|
+
// With no `label` there is no `Field` to pass a `Fieldset`'s state on, so
|
|
167
|
+
// read it here: the shell, the pills and the clear button all key off it.
|
|
168
|
+
const disabled = useInheritedDisabled(disabledProp)
|
|
161
169
|
// Red state is driven independently of the `Field` error slot so a form
|
|
162
170
|
// library can flip it from `fieldState.invalid` (see FormControlProps).
|
|
163
|
-
const isInvalid = invalid || error != null
|
|
171
|
+
const isInvalid = useInheritedInvalid(invalid || error != null)
|
|
164
172
|
|
|
165
173
|
const [value, setValue] = useUncontrolled<Item | null>({
|
|
166
174
|
value: valueProp,
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react"
|
|
2
|
+
import { describe, expect, it } from "vitest"
|
|
3
|
+
import { TEXT_COLOR_CLASSES, TYPOGRAPHY_SHADE_CLASSES } from "../../lib/typography-size"
|
|
4
|
+
import { DataList, LABEL_SHADE_CLASSES } from "./data-list"
|
|
5
|
+
|
|
6
|
+
const DATA = [
|
|
7
|
+
{ label: "Login", value: "jdoe", testId: "login" },
|
|
8
|
+
{ label: "Campus", value: "Paris" },
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
const root = (container: HTMLElement) => container.firstElementChild as HTMLElement
|
|
12
|
+
|
|
13
|
+
describe("DataList", () => {
|
|
14
|
+
it("renders a <dl> of <div>-grouped <dt>/<dd> pairs from data", () => {
|
|
15
|
+
const { container } = render(<DataList data={DATA} />)
|
|
16
|
+
const dl = root(container)
|
|
17
|
+
expect(dl.tagName).toBe("DL")
|
|
18
|
+
const items = dl.querySelectorAll(":scope > div[data-part=item]")
|
|
19
|
+
expect(items).toHaveLength(2)
|
|
20
|
+
expect(items[0]?.querySelector("dt")?.textContent).toBe("Login")
|
|
21
|
+
expect(items[0]?.querySelector("dd")?.textContent).toBe("jdoe")
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it("renders data rows before composed children", () => {
|
|
25
|
+
const { container } = render(
|
|
26
|
+
<DataList data={DATA}>
|
|
27
|
+
<DataList.Item>
|
|
28
|
+
<DataList.Label>Status</DataList.Label>
|
|
29
|
+
<DataList.Value>Active</DataList.Value>
|
|
30
|
+
</DataList.Item>
|
|
31
|
+
</DataList>,
|
|
32
|
+
)
|
|
33
|
+
const labels = [...root(container).querySelectorAll("dt")].map((dt) => dt.textContent)
|
|
34
|
+
expect(labels).toEqual(["Login", "Campus", "Status"])
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it("threads a data row's testId to the item, its label and its value", () => {
|
|
38
|
+
render(<DataList testId="profile" data={DATA} />)
|
|
39
|
+
expect(screen.getByTestId("profile").tagName).toBe("DL")
|
|
40
|
+
expect(screen.getByTestId("login").getAttribute("data-part")).toBe("item")
|
|
41
|
+
expect(screen.getByTestId("login-label").tagName).toBe("DT")
|
|
42
|
+
expect(screen.getByTestId("login-value").tagName).toBe("DD")
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it("puts testId on each composed part", () => {
|
|
46
|
+
render(
|
|
47
|
+
<DataList>
|
|
48
|
+
<DataList.Item testId="i">
|
|
49
|
+
<DataList.Label testId="l">A</DataList.Label>
|
|
50
|
+
<DataList.Value testId="v">B</DataList.Value>
|
|
51
|
+
</DataList.Item>
|
|
52
|
+
</DataList>,
|
|
53
|
+
)
|
|
54
|
+
expect(screen.getByTestId("i").tagName).toBe("DIV")
|
|
55
|
+
expect(screen.getByTestId("l").tagName).toBe("DT")
|
|
56
|
+
expect(screen.getByTestId("v").tagName).toBe("DD")
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it("defaults to horizontal rows on the root's subgrid", () => {
|
|
60
|
+
const { container } = render(<DataList data={DATA} />)
|
|
61
|
+
const dl = root(container)
|
|
62
|
+
expect(dl.getAttribute("data-orientation")).toBe("horizontal")
|
|
63
|
+
expect(dl.className).toContain("*:data-[part=item]:grid-cols-subgrid")
|
|
64
|
+
expect(dl.className).not.toContain("@container")
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it("stacks items when vertical", () => {
|
|
68
|
+
const { container } = render(<DataList orientation="vertical" data={DATA} />)
|
|
69
|
+
const dl = root(container)
|
|
70
|
+
expect(dl.getAttribute("data-orientation")).toBe("vertical")
|
|
71
|
+
expect(dl.className).toContain("*:data-[part=item]:flex-col")
|
|
72
|
+
expect(dl.className).not.toContain("*:data-[part=item]:grid-cols-subgrid")
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it("makes the root a named container only when responsive", () => {
|
|
76
|
+
const { container } = render(<DataList orientation="responsive" data={DATA} />)
|
|
77
|
+
const dl = root(container)
|
|
78
|
+
expect(dl.className).toContain("@container/data-list")
|
|
79
|
+
expect(dl.className).toContain("*:data-[part=item]:flex-col")
|
|
80
|
+
expect(dl.className).toContain("@sm/data-list:*:data-[part=item]:grid-cols-subgrid")
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it("never resets a responsive row's column gap", () => {
|
|
84
|
+
// A subgrid row inherits the root's column gap only while its own is
|
|
85
|
+
// `normal`: a stack `gap-*` (rather than `gap-y-*`) glued labels to values.
|
|
86
|
+
const { container } = render(<DataList orientation="responsive" data={DATA} />)
|
|
87
|
+
const classes = root(container).className.split(" ")
|
|
88
|
+
expect(classes.filter((c) => /data-\[part=item\]:gap-(?!y-)/.test(c))).toEqual([])
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it("sets labelWidth as the label track, in px for a number", () => {
|
|
92
|
+
const { container, rerender } = render(<DataList labelWidth={120} data={DATA} />)
|
|
93
|
+
expect(root(container).style.getPropertyValue("--dl-label")).toBe("120px")
|
|
94
|
+
rerender(<DataList labelWidth="minmax(8rem, 30%)" data={DATA} />)
|
|
95
|
+
expect(root(container).style.getPropertyValue("--dl-label")).toBe("minmax(8rem, 30%)")
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it("keeps the caller's style beside labelWidth", () => {
|
|
99
|
+
const { container } = render(<DataList labelWidth="10rem" style={{ maxWidth: 400 }} />)
|
|
100
|
+
expect(root(container).style.maxWidth).toBe("400px")
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it("draws dividers only with withDivider", () => {
|
|
104
|
+
const { container, rerender } = render(<DataList data={DATA} />)
|
|
105
|
+
expect(root(container).className).not.toContain("not-last:border-b")
|
|
106
|
+
rerender(<DataList withDivider data={DATA} />)
|
|
107
|
+
expect(root(container).className).toContain("*:data-[part=item]:not-last:border-b")
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it("maps size onto the typography scale", () => {
|
|
111
|
+
const { container, rerender } = render(<DataList data={DATA} />)
|
|
112
|
+
expect(root(container).className).toContain("text-base")
|
|
113
|
+
rerender(<DataList size="sm" data={DATA} />)
|
|
114
|
+
expect(root(container).className).toContain("text-sm")
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
it("paints labels secondary by default and muted with muted", () => {
|
|
118
|
+
const { container, rerender } = render(<DataList data={DATA} />)
|
|
119
|
+
expect(root(container).className).toContain(LABEL_SHADE_CLASSES.secondary)
|
|
120
|
+
rerender(<DataList muted data={DATA} />)
|
|
121
|
+
expect(root(container).className).toContain(LABEL_SHADE_CLASSES.muted)
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
it("spells the label shades as the typography helpers behind a label selector", () => {
|
|
125
|
+
const behindLabel = (pair: string) =>
|
|
126
|
+
pair
|
|
127
|
+
.split(" ")
|
|
128
|
+
.map((c) =>
|
|
129
|
+
c.startsWith("dark:")
|
|
130
|
+
? `dark:**:data-[part=label]:${c.slice(5)}`
|
|
131
|
+
: `**:data-[part=label]:${c}`,
|
|
132
|
+
)
|
|
133
|
+
.join(" ")
|
|
134
|
+
expect(LABEL_SHADE_CLASSES.secondary).toBe(behindLabel(TEXT_COLOR_CLASSES.secondary))
|
|
135
|
+
expect(LABEL_SHADE_CLASSES.muted).toBe(behindLabel(TYPOGRAPHY_SHADE_CLASSES.muted))
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
it("composes onto its asChild element with the data rows inside", () => {
|
|
139
|
+
const { container } = render(
|
|
140
|
+
<DataList asChild data={DATA} testId="dl">
|
|
141
|
+
<dl data-own="" />
|
|
142
|
+
</DataList>,
|
|
143
|
+
)
|
|
144
|
+
const dl = root(container)
|
|
145
|
+
expect(dl.hasAttribute("data-own")).toBe(true)
|
|
146
|
+
expect(dl.getAttribute("data-testid")).toBe("dl")
|
|
147
|
+
expect(dl.querySelectorAll("dt")).toHaveLength(2)
|
|
148
|
+
})
|
|
149
|
+
})
|