@42-central/ui-react 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-X6DESK37.js → chunk-2RRTT4AF.js} +17 -5
- package/dist/chunk-2RRTT4AF.js.map +1 -0
- package/dist/{chunk-TUP7WXQE.js → chunk-322I2RSV.js} +9 -6
- package/dist/chunk-322I2RSV.js.map +1 -0
- package/dist/{chunk-ISX3AM32.js → chunk-37SRSNLJ.js} +4 -4
- package/dist/{chunk-ISX3AM32.js.map → chunk-37SRSNLJ.js.map} +1 -1
- package/dist/{chunk-L5GH7LLD.js → chunk-3MFWUG5O.js} +4 -4
- package/dist/{chunk-L5GH7LLD.js.map → chunk-3MFWUG5O.js.map} +1 -1
- package/dist/{chunk-FQJNQW3G.js → chunk-3XQEOJCE.js} +8 -5
- package/dist/chunk-3XQEOJCE.js.map +1 -0
- package/dist/{chunk-JKFPRQB2.js → chunk-4LSZ5JWF.js} +3 -3
- package/dist/{chunk-JKFPRQB2.js.map → chunk-4LSZ5JWF.js.map} +1 -1
- package/dist/{chunk-V2QZG4IT.js → chunk-5HWFYYHW.js} +27 -9
- package/dist/chunk-5HWFYYHW.js.map +1 -0
- package/dist/{chunk-GEZYGBXY.js → chunk-6MVFCS46.js} +99 -42
- package/dist/chunk-6MVFCS46.js.map +1 -0
- package/dist/{chunk-NNPSBC7O.js → chunk-6WZSUS3U.js} +10 -9
- package/dist/chunk-6WZSUS3U.js.map +1 -0
- package/dist/chunk-6YRGP6PS.js +138 -0
- package/dist/chunk-6YRGP6PS.js.map +1 -0
- package/dist/{chunk-B5YHYI7E.js → chunk-ALANKV5Y.js} +23 -6
- package/dist/chunk-ALANKV5Y.js.map +1 -0
- package/dist/{chunk-IA6DCC3N.js → chunk-AUQPNDE5.js} +23 -13
- package/dist/chunk-AUQPNDE5.js.map +1 -0
- package/dist/{chunk-AKXALCUN.js → chunk-D7SW2E24.js} +4 -4
- package/dist/chunk-D7SW2E24.js.map +1 -0
- package/dist/{chunk-OXR7BXZA.js → chunk-DQIYYDFD.js} +4 -3
- package/dist/chunk-DQIYYDFD.js.map +1 -0
- package/dist/{chunk-HMNXNKDA.js → chunk-FCBYUN6F.js} +4 -4
- package/dist/{chunk-HMNXNKDA.js.map → chunk-FCBYUN6F.js.map} +1 -1
- package/dist/{chunk-2W7H43WL.js → chunk-FED6SJWM.js} +23 -14
- package/dist/chunk-FED6SJWM.js.map +1 -0
- package/dist/{chunk-7E7JNWOC.js → chunk-FEPIHXVI.js} +6 -5
- package/dist/chunk-FEPIHXVI.js.map +1 -0
- package/dist/{chunk-Y57NW6G7.js → chunk-G3YOSG3U.js} +4 -4
- package/dist/{chunk-Y57NW6G7.js.map → chunk-G3YOSG3U.js.map} +1 -1
- package/dist/chunk-GZN5CXMR.js +100 -0
- package/dist/chunk-GZN5CXMR.js.map +1 -0
- package/dist/{chunk-HCHGERDB.js → chunk-HCSZPBWV.js} +17 -115
- package/dist/chunk-HCSZPBWV.js.map +1 -0
- package/dist/{chunk-I4B3N3UX.js → chunk-HTVICHT4.js} +12 -7
- package/dist/chunk-HTVICHT4.js.map +1 -0
- package/dist/chunk-I7TC2C3I.js +163 -0
- package/dist/chunk-I7TC2C3I.js.map +1 -0
- package/dist/{chunk-7FPSQBWB.js → chunk-IBXYLO2J.js} +14 -13
- package/dist/chunk-IBXYLO2J.js.map +1 -0
- package/dist/{chunk-7KFUFAVP.js → chunk-IRYG6B5A.js} +9 -8
- package/dist/chunk-IRYG6B5A.js.map +1 -0
- package/dist/{chunk-2RQLPN4U.js → chunk-JCNEW4WJ.js} +8 -8
- package/dist/{chunk-2RQLPN4U.js.map → chunk-JCNEW4WJ.js.map} +1 -1
- package/dist/{chunk-SP6LCCTZ.js → chunk-KZDMVOL6.js} +35 -8
- package/dist/chunk-KZDMVOL6.js.map +1 -0
- package/dist/chunk-LR5U6TZZ.js +169 -0
- package/dist/chunk-LR5U6TZZ.js.map +1 -0
- package/dist/{chunk-MQHD3EJE.js → chunk-LZHZJWVM.js} +6 -4
- package/dist/chunk-LZHZJWVM.js.map +1 -0
- package/dist/{chunk-5EOMSWNO.js → chunk-MAM2X3MW.js} +5 -5
- package/dist/{chunk-5EOMSWNO.js.map → chunk-MAM2X3MW.js.map} +1 -1
- package/dist/{chunk-FSPS7TVD.js → chunk-MCMS4NMO.js} +5 -5
- package/dist/{chunk-FSPS7TVD.js.map → chunk-MCMS4NMO.js.map} +1 -1
- package/dist/{chunk-ZB5VMGKB.js → chunk-MV5DIE2T.js} +15 -4
- package/dist/chunk-MV5DIE2T.js.map +1 -0
- package/dist/chunk-NDI4HLQE.js +41 -0
- package/dist/chunk-NDI4HLQE.js.map +1 -0
- package/dist/{chunk-B4GNSSHU.js → chunk-NLJEQZQQ.js} +3 -3
- package/dist/{chunk-B4GNSSHU.js.map → chunk-NLJEQZQQ.js.map} +1 -1
- package/dist/{chunk-SBZJGFZ6.js → chunk-QHT4DCXE.js} +8 -7
- package/dist/chunk-QHT4DCXE.js.map +1 -0
- package/dist/{chunk-I4IJOLNA.js → chunk-RMUBCTEF.js} +5 -5
- package/dist/{chunk-I4IJOLNA.js.map → chunk-RMUBCTEF.js.map} +1 -1
- package/dist/{chunk-G3AD3NJG.js → chunk-RNTDM3RP.js} +9 -5
- package/dist/chunk-RNTDM3RP.js.map +1 -0
- package/dist/chunk-RPFN6ETQ.js +509 -0
- package/dist/chunk-RPFN6ETQ.js.map +1 -0
- package/dist/{chunk-HWBFRDX7.js → chunk-SI7C3W5M.js} +28 -9
- package/dist/chunk-SI7C3W5M.js.map +1 -0
- package/dist/chunk-TPOV3OCC.js +234 -0
- package/dist/chunk-TPOV3OCC.js.map +1 -0
- package/dist/{chunk-IANYMDKH.js → chunk-UBQ54W46.js} +4 -4
- package/dist/chunk-UBQ54W46.js.map +1 -0
- package/dist/{chunk-QVOBLRCM.js → chunk-UIKQ4X6W.js} +3 -3
- package/dist/{chunk-QVOBLRCM.js.map → chunk-UIKQ4X6W.js.map} +1 -1
- package/dist/chunk-UOWQH53N.js +70 -0
- package/dist/chunk-UOWQH53N.js.map +1 -0
- package/dist/{chunk-QRNQQIQM.js → chunk-WJUY6YWF.js} +52 -20
- package/dist/chunk-WJUY6YWF.js.map +1 -0
- package/dist/{chunk-3KARNPW4.js → chunk-WKIUMLRT.js} +3 -3
- package/dist/{chunk-3KARNPW4.js.map → chunk-WKIUMLRT.js.map} +1 -1
- package/dist/chunk-X6RB74JN.js +37 -0
- package/dist/chunk-X6RB74JN.js.map +1 -0
- package/dist/chunk-XQ6L2CM5.js +83 -0
- package/dist/chunk-XQ6L2CM5.js.map +1 -0
- package/dist/{chunk-RKCUXOU2.js → chunk-YUVKROMA.js} +44 -7
- package/dist/chunk-YUVKROMA.js.map +1 -0
- package/dist/components/action-icon/action-icon.d.ts +9 -2
- package/dist/components/action-icon/action-icon.d.ts.map +1 -1
- package/dist/components/action-icon/index.js +5 -1
- package/dist/components/alert/index.js +4 -4
- package/dist/components/anchor/anchor.d.ts +45 -0
- package/dist/components/anchor/anchor.d.ts.map +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.d.ts.map +1 -0
- package/dist/components/anchor/index.js +11 -0
- package/dist/components/anchor/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +10 -6
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/index.js +23 -24
- package/dist/components/app-shell/index.js.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +15 -9
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +5 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +12 -0
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/button.d.ts +15 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +5 -1
- package/dist/components/button-multi-select/index.js +6 -4
- package/dist/components/button-multi-select/index.js.map +1 -1
- package/dist/components/button-select/button-select-control.d.ts.map +1 -1
- package/dist/components/button-select/button-select.d.ts +2 -2
- package/dist/components/button-select/button-select.d.ts.map +1 -1
- package/dist/components/button-select/index.js +6 -4
- package/dist/components/button-select/index.js.map +1 -1
- package/dist/components/calendar/aliases.d.ts +16 -0
- package/dist/components/calendar/aliases.d.ts.map +1 -0
- package/dist/components/calendar/calendar-body.d.ts +11 -1
- package/dist/components/calendar/calendar-body.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +8 -4
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.d.ts +2 -1
- package/dist/components/calendar/index.d.ts.map +1 -1
- package/dist/components/calendar/index.js +15 -5
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/calendar-heatmap/index.js +85 -73
- package/dist/components/calendar-heatmap/index.js.map +1 -1
- package/dist/components/camera/index.js +16 -14
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/choice-card-group/index.js +2 -2
- package/dist/components/choice-card-group/index.js.map +1 -1
- package/dist/components/circular-progress/circular-progress.d.ts +22 -11
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.d.ts +1 -1
- package/dist/components/circular-progress/index.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +68 -49
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/index.js +7 -3
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code/code.d.ts +10 -0
- package/dist/components/code/code.d.ts.map +1 -1
- package/dist/components/code/index.js +1 -0
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/code-block/chrome.js +10 -6
- package/dist/components/code-block/index.js +10 -7
- package/dist/components/code-block/index.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +5 -3
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +12 -7
- package/dist/components/combobox-list/combobox-list.d.ts +1 -1
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +14 -9
- package/dist/components/compare/index.js +1 -1
- package/dist/components/data-list/data-list.d.ts +96 -0
- package/dist/components/data-list/data-list.d.ts.map +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.d.ts.map +1 -0
- package/dist/components/data-list/index.js +147 -0
- package/dist/components/data-list/index.js.map +1 -0
- package/dist/components/data-table/data-table-group.d.ts.map +1 -1
- package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
- package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts +5 -2
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.js +163 -168
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/aliases.d.ts +16 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +22 -8
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +34 -28
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/download-button/index.js +6 -2
- package/dist/components/drawer/drawer.d.ts +7 -4
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.js +11 -6
- package/dist/components/empty-state/empty-state.d.ts +57 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +8 -0
- package/dist/components/empty-state/index.js.map +1 -0
- package/dist/components/field/field.d.ts +20 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +103 -0
- package/dist/components/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts.map +1 -0
- package/dist/components/fieldset/index.js +150 -0
- package/dist/components/fieldset/index.js.map +1 -0
- package/dist/components/file-item/index.js +10 -7
- package/dist/components/file-preview/file-preview.d.ts.map +1 -1
- package/dist/components/file-preview/index.js +10 -18
- package/dist/components/file-preview/index.js.map +1 -1
- package/dist/components/file-trigger/index.js +6 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +18 -14
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/gallery/index.js +3 -3
- package/dist/components/geodesic/a11y.d.ts +3 -3
- package/dist/components/geodesic/a11y.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/index.js +10 -3
- package/dist/components/hover-card/index.js.map +1 -1
- package/dist/components/image/index.js +3 -3
- package/dist/components/image-cropper/index.js +9 -6
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/kbd/index.js +3 -3
- package/dist/components/kbd/kbd.d.ts +4 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/lightbox/index.js +13 -11
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/menu/index.js +9 -5
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/modal/index.js +11 -6
- package/dist/components/modal/modal.d.ts +10 -4
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +13 -9
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +13 -10
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +4 -4
- package/dist/components/nav-link/tanstack.js +4 -4
- package/dist/components/notification/index.js +6 -6
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/number-input/index.js +11 -7
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/dialog-parts.d.ts +10 -1
- package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
- package/dist/components/overlays/index.js +13 -8
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +362 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +147 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/password-input/index.js +6 -5
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +1 -1
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/phone-input/index.js +14 -11
- package/dist/components/phone-input/index.js.map +1 -1
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/photo-capture/index.js +19 -17
- package/dist/components/photo-capture/index.js.map +1 -1
- package/dist/components/pills-input/index.js +4 -4
- package/dist/components/pills-input/pills-input.d.ts +1 -1
- package/dist/components/pills-input/pills-input.d.ts.map +1 -1
- package/dist/components/pin-input/index.js +6 -5
- package/dist/components/pin-input/index.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +7 -2
- package/dist/components/popover/popover.d.ts +41 -16
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.d.ts +1 -1
- package/dist/components/progress/index.d.ts.map +1 -1
- package/dist/components/progress/index.js +4 -1
- package/dist/components/progress/progress.d.ts +22 -14
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/index.d.ts.map +1 -0
- package/dist/components/prose/index.js +17 -0
- package/dist/components/prose/index.js.map +1 -0
- package/dist/components/prose/prose.d.ts +49 -0
- package/dist/components/prose/prose.d.ts.map +1 -0
- package/dist/components/prose/styles.css +593 -0
- package/dist/components/radio-group/index.js +9 -3
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/rating/index.js +3 -2
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.js +10 -8
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/index.js +10 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +150 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +2 -2
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.js +12 -8
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/splitter/index.d.ts +2 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/index.js +373 -0
- package/dist/components/splitter/index.js.map +1 -0
- package/dist/components/splitter/splitter.d.ts +159 -0
- package/dist/components/splitter/splitter.d.ts.map +1 -0
- package/dist/components/spotlight/index.js +23 -22
- package/dist/components/spotlight/index.js.map +1 -1
- package/dist/components/spotlight/spotlight.d.ts.map +1 -1
- package/dist/components/steps/index.d.ts +4 -0
- package/dist/components/steps/index.d.ts.map +1 -0
- package/dist/components/steps/index.js +478 -0
- package/dist/components/steps/index.js.map +1 -0
- package/dist/components/steps/steps-data.d.ts +78 -0
- package/dist/components/steps/steps-data.d.ts.map +1 -0
- package/dist/components/steps/steps.d.ts +183 -0
- package/dist/components/steps/steps.d.ts.map +1 -0
- package/dist/components/switch/index.js +4 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/table-of-contents/index.d.ts +2 -0
- package/dist/components/table-of-contents/index.d.ts.map +1 -0
- package/dist/components/table-of-contents/index.js +471 -0
- package/dist/components/table-of-contents/index.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +12 -9
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +1 -1
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/text-input/index.js +2 -2
- package/dist/components/textarea/index.js +8 -6
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/time-input/index.js +11 -9
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +3 -8
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tour/conditions.d.ts +83 -0
- package/dist/components/tour/conditions.d.ts.map +1 -0
- package/dist/components/tour/create-tours.d.ts +49 -0
- package/dist/components/tour/create-tours.d.ts.map +1 -0
- package/dist/components/tour/index.d.ts +6 -0
- package/dist/components/tour/index.d.ts.map +1 -0
- package/dist/components/tour/index.js +1449 -0
- package/dist/components/tour/index.js.map +1 -0
- package/dist/components/tour/runtime.d.ts +57 -0
- package/dist/components/tour/runtime.d.ts.map +1 -0
- package/dist/components/tour/storage.d.ts +14 -0
- package/dist/components/tour/storage.d.ts.map +1 -0
- package/dist/components/tour/store.d.ts +62 -0
- package/dist/components/tour/store.d.ts.map +1 -0
- package/dist/components/tour/tour.d.ts +77 -0
- package/dist/components/tour/tour.d.ts.map +1 -0
- package/dist/components/tour/types.d.ts +680 -0
- package/dist/components/tour/types.d.ts.map +1 -0
- package/dist/components/tree/index.d.ts +3 -0
- package/dist/components/tree/index.d.ts.map +1 -0
- package/dist/components/tree/index.js +457 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/tree-row.d.ts +72 -0
- package/dist/components/tree/tree-row.d.ts.map +1 -0
- package/dist/components/tree/tree.d.ts +193 -0
- package/dist/components/tree/tree.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.js +31 -54
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +30 -24
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-popover.d.ts +20 -31
- package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +1 -1
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/date-predicates.d.ts +7 -5
- package/dist/lib/date-predicates.d.ts.map +1 -1
- package/dist/lib/date-value.d.ts +20 -0
- package/dist/lib/date-value.d.ts.map +1 -1
- package/dist/lib/floating-arrow.d.ts +53 -0
- package/dist/lib/floating-arrow.d.ts.map +1 -0
- package/dist/lib/focus-return.d.ts +53 -0
- package/dist/lib/focus-return.d.ts.map +1 -0
- package/dist/lib/meter.d.ts +104 -0
- package/dist/lib/meter.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +26 -8
- package/dist/lib/overlay-layer.d.ts.map +1 -1
- package/dist/lib/pressed.d.ts +92 -0
- package/dist/lib/pressed.d.ts.map +1 -0
- package/dist/lib/tree-data.d.ts +18 -2
- package/dist/lib/tree-data.d.ts.map +1 -1
- package/dist/lib/use-pagination.d.ts +102 -0
- package/dist/lib/use-pagination.d.ts.map +1 -0
- package/dist/lib/use-scroll-spy.d.ts +126 -0
- package/dist/lib/use-scroll-spy.d.ts.map +1 -0
- package/dist/theme.css +39 -3
- package/package.json +1 -1
- package/src/as-child.contract.test.tsx +283 -1
- package/src/components/action-icon/action-icon.tsx +34 -4
- package/src/components/anchor/anchor.test.tsx +232 -0
- package/src/components/anchor/anchor.tsx +187 -0
- package/src/components/anchor/index.ts +12 -0
- package/src/components/app-shell/app-shell.test.tsx +15 -7
- package/src/components/app-shell/app-shell.tsx +27 -20
- package/src/components/autocomplete/autocomplete.tsx +11 -3
- package/src/components/breadcrumb/breadcrumb.test.tsx +24 -0
- package/src/components/breadcrumb/breadcrumb.tsx +20 -1
- package/src/components/button/button-pressed.test.tsx +202 -0
- package/src/components/button/button.tsx +48 -6
- package/src/components/button-select/button-select-control.tsx +2 -2
- package/src/components/button-select/button-select.tsx +22 -2
- package/src/components/calendar/aliases.tsx +28 -0
- package/src/components/calendar/calendar-body.tsx +310 -210
- package/src/components/calendar/calendar.tsx +43 -12
- package/src/components/calendar/index.ts +7 -1
- package/src/components/calendar/month-year-calendar.test.tsx +106 -0
- package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
- package/src/components/checkbox/checkbox.tsx +7 -2
- package/src/components/choice-card-group/choice-card-group.tsx +2 -2
- package/src/components/circular-progress/circular-progress.test.tsx +35 -0
- package/src/components/circular-progress/circular-progress.tsx +116 -59
- package/src/components/circular-progress/index.ts +1 -0
- package/src/components/code/code.test.tsx +16 -0
- package/src/components/code/code.tsx +11 -0
- package/src/components/combobox/combobox.tsx +63 -28
- package/src/components/combobox-list/combobox-list.tsx +11 -3
- package/src/components/data-list/data-list.test.tsx +149 -0
- package/src/components/data-list/data-list.tsx +268 -0
- package/src/components/data-list/index.ts +9 -0
- package/src/components/data-table/data-table-group.test.tsx +16 -0
- package/src/components/data-table/data-table-group.tsx +15 -2
- package/src/components/data-table/data-table-placeholder.tsx +28 -36
- package/src/components/data-table/data-table-stack.tsx +33 -39
- package/src/components/data-table/data-table.test.tsx +31 -0
- package/src/components/data-table/data-table.tsx +41 -42
- package/src/components/date-picker/aliases.tsx +28 -0
- package/src/components/date-picker/date-picker.test.tsx +29 -0
- package/src/components/date-picker/date-picker.tsx +164 -45
- package/src/components/date-picker/index.ts +5 -1
- package/src/components/date-picker/month-year-picker.test.tsx +362 -0
- package/src/components/drawer/drawer.test.tsx +41 -0
- package/src/components/drawer/drawer.tsx +7 -1
- package/src/components/empty-state/empty-state.test.tsx +109 -0
- package/src/components/empty-state/empty-state.tsx +180 -0
- package/src/components/empty-state/index.ts +9 -0
- package/src/components/field/field.tsx +35 -1
- package/src/components/fieldset/fieldset.test.tsx +352 -0
- package/src/components/fieldset/fieldset.tsx +268 -0
- package/src/components/fieldset/index.ts +11 -0
- package/src/components/file-preview/file-preview.test.tsx +2 -1
- package/src/components/file-preview/file-preview.tsx +7 -13
- package/src/components/file-upload/file-upload.tsx +14 -5
- package/src/components/hover-card/hover-card.tsx +5 -1
- package/src/components/input/input.tsx +12 -5
- package/src/components/kbd/kbd.test.tsx +13 -0
- package/src/components/kbd/kbd.tsx +6 -0
- package/src/components/menu/menu.tsx +6 -2
- package/src/components/modal/modal.test.tsx +41 -0
- package/src/components/modal/modal.tsx +17 -9
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
- package/src/components/multi-select/multi-select.tsx +11 -3
- package/src/components/notification/create-notifier.tsx +1 -1
- package/src/components/number-input/number-input.tsx +12 -3
- package/src/components/overlays/dialog-parts.tsx +42 -5
- package/src/components/pagination/index.ts +19 -0
- package/src/components/pagination/pagination.test.tsx +187 -0
- package/src/components/pagination/pagination.tsx +563 -0
- package/src/components/password-input/password-input.tsx +12 -3
- package/src/components/phone-input/phone-input.tsx +12 -3
- package/src/components/pills-input/pills-input.tsx +7 -2
- package/src/components/pin-input/pin-input.tsx +13 -4
- package/src/components/popover/popover.tsx +87 -17
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/progress.test.tsx +102 -0
- package/src/components/progress/progress.tsx +116 -62
- package/src/components/prose/index.ts +1 -0
- package/src/components/prose/prose.test.tsx +90 -0
- package/src/components/prose/prose.tsx +60 -0
- package/src/components/prose/styles.css +593 -0
- package/src/components/radio-group/radio-group.tsx +8 -3
- package/src/components/rating/rating.tsx +5 -2
- package/src/components/scroll-area/index.ts +18 -0
- package/src/components/scroll-area/scroll-area.test.tsx +184 -0
- package/src/components/scroll-area/scroll-area.tsx +448 -0
- package/src/components/segment-group/segment-group.tsx +2 -2
- package/src/components/select/select.tsx +37 -18
- package/src/components/slider/slider.tsx +2 -2
- package/src/components/splitter/index.ts +15 -0
- package/src/components/splitter/splitter.test.tsx +244 -0
- package/src/components/splitter/splitter.tsx +625 -0
- package/src/components/spotlight/spotlight.test.tsx +34 -26
- package/src/components/spotlight/spotlight.tsx +7 -9
- package/src/components/steps/index.ts +21 -0
- package/src/components/steps/steps-data.tsx +179 -0
- package/src/components/steps/steps.test.tsx +235 -0
- package/src/components/steps/steps.tsx +686 -0
- package/src/components/switch/switch.tsx +7 -2
- package/src/components/table-of-contents/index.ts +17 -0
- package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
- package/src/components/table-of-contents/table-of-contents.tsx +708 -0
- package/src/components/tags-input/tags-input.tsx +12 -3
- package/src/components/textarea/textarea.tsx +15 -5
- package/src/components/tooltip/tooltip.tsx +8 -17
- package/src/components/tour/conditions.test.ts +527 -0
- package/src/components/tour/conditions.ts +445 -0
- package/src/components/tour/create-tours.tsx +150 -0
- package/src/components/tour/index.ts +86 -0
- package/src/components/tour/runtime.ts +187 -0
- package/src/components/tour/storage.test.ts +68 -0
- package/src/components/tour/storage.ts +44 -0
- package/src/components/tour/store.test.tsx +784 -0
- package/src/components/tour/store.ts +661 -0
- package/src/components/tour/tour.test.tsx +318 -0
- package/src/components/tour/tour.tsx +773 -0
- package/src/components/tour/tour.types.test.ts +185 -0
- package/src/components/tour/types.ts +904 -0
- package/src/components/tree/index.ts +24 -0
- package/src/components/tree/tree-row.tsx +179 -0
- package/src/components/tree/tree.test.tsx +296 -0
- package/src/components/tree/tree.tsx +796 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
- package/src/components/tree-select/tree-popover.tsx +26 -107
- package/src/components/tree-select/tree-select.tsx +24 -16
- package/src/icon-stroke.test.tsx +2 -0
- package/src/index.ts +16 -0
- package/src/lib/date-predicates.test.ts +46 -0
- package/src/lib/date-predicates.ts +44 -24
- package/src/lib/date-value.test.ts +24 -1
- package/src/lib/date-value.ts +42 -1
- package/src/lib/floating-arrow.tsx +73 -0
- package/src/lib/focus-return.test.tsx +143 -0
- package/src/lib/focus-return.ts +106 -0
- package/src/lib/meter.test.ts +40 -0
- package/src/lib/meter.ts +159 -0
- package/src/lib/overlay-layer.test.tsx +47 -1
- package/src/lib/overlay-layer.tsx +65 -8
- package/src/lib/pressed.ts +130 -0
- package/src/lib/tree-data.ts +42 -2
- package/src/lib/use-pagination.test.ts +105 -0
- package/src/lib/use-pagination.ts +179 -0
- package/src/lib/use-scroll-spy.test.tsx +238 -0
- package/src/lib/use-scroll-spy.ts +336 -0
- package/src/theme.css +39 -3
- package/src/theme.test.ts +29 -1
- package/src/visually-hidden-containment.test.tsx +9 -0
- package/dist/chunk-2W7H43WL.js.map +0 -1
- package/dist/chunk-7E7JNWOC.js.map +0 -1
- package/dist/chunk-7FPSQBWB.js.map +0 -1
- package/dist/chunk-7KFUFAVP.js.map +0 -1
- package/dist/chunk-AKXALCUN.js.map +0 -1
- package/dist/chunk-B5YHYI7E.js.map +0 -1
- package/dist/chunk-FQJNQW3G.js.map +0 -1
- package/dist/chunk-G3AD3NJG.js.map +0 -1
- package/dist/chunk-GEZYGBXY.js.map +0 -1
- package/dist/chunk-HCHGERDB.js.map +0 -1
- package/dist/chunk-HWBFRDX7.js.map +0 -1
- package/dist/chunk-I4B3N3UX.js.map +0 -1
- package/dist/chunk-IA6DCC3N.js.map +0 -1
- package/dist/chunk-IANYMDKH.js.map +0 -1
- package/dist/chunk-MQHD3EJE.js.map +0 -1
- package/dist/chunk-NNPSBC7O.js.map +0 -1
- package/dist/chunk-OXR7BXZA.js.map +0 -1
- package/dist/chunk-QKSLDQM2.js +0 -120
- package/dist/chunk-QKSLDQM2.js.map +0 -1
- package/dist/chunk-QRNQQIQM.js.map +0 -1
- package/dist/chunk-RKCUXOU2.js.map +0 -1
- package/dist/chunk-S5CQRCTF.js +0 -426
- package/dist/chunk-S5CQRCTF.js.map +0 -1
- package/dist/chunk-SBZJGFZ6.js.map +0 -1
- package/dist/chunk-SP6LCCTZ.js.map +0 -1
- package/dist/chunk-TUP7WXQE.js.map +0 -1
- package/dist/chunk-V2QZG4IT.js.map +0 -1
- package/dist/chunk-X6DESK37.js.map +0 -1
- package/dist/chunk-ZB5VMGKB.js.map +0 -1
|
@@ -118,6 +118,8 @@ describe("SpotlightProvider", () => {
|
|
|
118
118
|
// Groups keep the sources' order, whichever answered first.
|
|
119
119
|
const labels = within(screen.getByTestId("spotlight-list"))
|
|
120
120
|
.getAllByRole("presentation")
|
|
121
|
+
// The list's scroll area wraps the groups in presentational parts of its own.
|
|
122
|
+
.filter((label) => !label.matches("[data-scope=scroll-area]"))
|
|
121
123
|
.map((label) => label.textContent)
|
|
122
124
|
expect(labels).toEqual(["People", "Events"])
|
|
123
125
|
})
|
|
@@ -915,6 +917,7 @@ describe("recents", () => {
|
|
|
915
917
|
expect(
|
|
916
918
|
within(list)
|
|
917
919
|
.getAllByRole("presentation")
|
|
920
|
+
.filter((label) => !label.matches("[data-scope=scroll-area]"))
|
|
918
921
|
.map((label) => label.textContent),
|
|
919
922
|
).toEqual(["Recent", "Search in", "Suggested"]),
|
|
920
923
|
)
|
|
@@ -1875,6 +1878,8 @@ describe("Search in", () => {
|
|
|
1875
1878
|
const headings = () =>
|
|
1876
1879
|
within(screen.getByTestId("spotlight-list"))
|
|
1877
1880
|
.getAllByRole("presentation")
|
|
1881
|
+
// The list's scroll area wraps the groups in presentational parts of its own.
|
|
1882
|
+
.filter((label) => !label.matches("[data-scope=scroll-area]"))
|
|
1878
1883
|
.map((label) => label.textContent)
|
|
1879
1884
|
|
|
1880
1885
|
it("lists the level's sources with their prefixes on an empty query, after the recents", async () => {
|
|
@@ -2050,7 +2055,9 @@ describe("pagination", () => {
|
|
|
2050
2055
|
class Observer {
|
|
2051
2056
|
static live = new Set<Observer>()
|
|
2052
2057
|
constructor(readonly callback: (entries: { isIntersecting: boolean }[]) => void) {}
|
|
2053
|
-
observe() {
|
|
2058
|
+
observe(target: Element) {
|
|
2059
|
+
// The list's scroll area watches its own viewport; only the sentinel is driven here.
|
|
2060
|
+
if (target.matches("[data-scope=scroll-area]")) return
|
|
2054
2061
|
Observer.live.add(this)
|
|
2055
2062
|
}
|
|
2056
2063
|
unobserve() {}
|
|
@@ -2169,6 +2176,8 @@ describe("list height", () => {
|
|
|
2169
2176
|
static live = new Map<Element, Observer>()
|
|
2170
2177
|
constructor(readonly callback: (entries: Partial<ResizeObserverEntry>[]) => void) {}
|
|
2171
2178
|
observe(target: Element) {
|
|
2179
|
+
// The list's scroll area measures its own parts; only the rows' wrapper is driven here.
|
|
2180
|
+
if (target.matches("[data-scope=scroll-area]")) return
|
|
2172
2181
|
Observer.live.set(target, this)
|
|
2173
2182
|
}
|
|
2174
2183
|
unobserve() {}
|
|
@@ -2201,10 +2210,10 @@ describe("list height", () => {
|
|
|
2201
2210
|
act(() => spotlight.open({ query: "al" }))
|
|
2202
2211
|
await screen.findByTestId("spotlight-item-commands-a")
|
|
2203
2212
|
const list = screen.getByTestId("spotlight-list")
|
|
2204
|
-
// The scroller is
|
|
2205
|
-
// wrapper, which alone is measured, and the filler under it.
|
|
2206
|
-
const scroller = list.querySelector("[data-part=
|
|
2207
|
-
const frame =
|
|
2213
|
+
// The scroller is the list's scroll-area viewport; inside Ark's list part, a
|
|
2214
|
+
// frame holds the rows' wrapper, which alone is measured, and the filler under it.
|
|
2215
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2216
|
+
const frame = list.querySelector("[data-part=list]")?.firstElementChild as HTMLElement
|
|
2208
2217
|
const wrapper = frame.firstElementChild as HTMLElement
|
|
2209
2218
|
expect([...Observer.live.keys()]).toEqual([wrapper])
|
|
2210
2219
|
expect(scroller.style.getPropertyValue("--spotlight-list-height")).toBe("")
|
|
@@ -2237,10 +2246,10 @@ describe("list height", () => {
|
|
|
2237
2246
|
act(() => spotlight.open({ query: "a" }))
|
|
2238
2247
|
await answer([user("a", "Alpha"), user("b", "Beta")])
|
|
2239
2248
|
await screen.findByTestId("spotlight-item-held-a")
|
|
2240
|
-
const
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2249
|
+
const list = screen.getByTestId("spotlight-list")
|
|
2250
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2251
|
+
const wrapper = list.querySelector("[data-part=list]")?.firstElementChild
|
|
2252
|
+
?.firstElementChild as HTMLElement
|
|
2244
2253
|
const target = () => scroller.style.getPropertyValue("--spotlight-list-height")
|
|
2245
2254
|
resize(wrapper, 200)
|
|
2246
2255
|
expect(target()).toBe("200px")
|
|
@@ -2273,10 +2282,9 @@ describe("list height", () => {
|
|
|
2273
2282
|
act(() => spotlight.open({ query: "a" }))
|
|
2274
2283
|
await answer([user("a", "Alpha"), user("b", "Beta")])
|
|
2275
2284
|
await screen.findByTestId("spotlight-item-held-a")
|
|
2276
|
-
const
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
const frame = scroller.firstElementChild as HTMLElement
|
|
2285
|
+
const list = screen.getByTestId("spotlight-list")
|
|
2286
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2287
|
+
const frame = list.querySelector("[data-part=list]")?.firstElementChild as HTMLElement
|
|
2280
2288
|
const wrapper = frame.firstElementChild as HTMLElement
|
|
2281
2289
|
const filler = () => scroller.querySelector("[data-spotlight-filler]")
|
|
2282
2290
|
expect(filler()).toBeNull()
|
|
@@ -2296,7 +2304,7 @@ describe("list height", () => {
|
|
|
2296
2304
|
expect(shown.querySelector("[role=option], [data-part=item]")).toBeNull()
|
|
2297
2305
|
expect(shown.querySelectorAll(".animate-pulse.rounded-full").length).toBeGreaterThan(0)
|
|
2298
2306
|
// CSS gives it only what the rows leave, and clips the rest.
|
|
2299
|
-
expect(frame.className).toContain("
|
|
2307
|
+
expect(frame.className).toContain("grow")
|
|
2300
2308
|
expect(shown.className).toContain("grow")
|
|
2301
2309
|
expect(shown.className).toContain("basis-0")
|
|
2302
2310
|
expect(shown.className).toContain("overflow-hidden")
|
|
@@ -2318,10 +2326,10 @@ describe("list height", () => {
|
|
|
2318
2326
|
act(() => spotlight.open({ query: "a" }))
|
|
2319
2327
|
await answer([user("a", "Alpha")])
|
|
2320
2328
|
await screen.findByTestId("spotlight-item-held-a")
|
|
2321
|
-
const
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2329
|
+
const list = screen.getByTestId("spotlight-list")
|
|
2330
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2331
|
+
const wrapper = list.querySelector("[data-part=list]")?.firstElementChild
|
|
2332
|
+
?.firstElementChild as HTMLElement
|
|
2325
2333
|
const target = () => scroller.style.getPropertyValue("--spotlight-list-height")
|
|
2326
2334
|
resize(wrapper, 300)
|
|
2327
2335
|
|
|
@@ -2423,10 +2431,10 @@ describe("list height", () => {
|
|
|
2423
2431
|
render(<SpotlightProvider testId="spotlight" />)
|
|
2424
2432
|
act(() => spotlight.open({ path: [{ source: "held" }], query: "" }))
|
|
2425
2433
|
await within(await screen.findByTestId("spotlight-list")).findByText("Search Held")
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2434
|
+
const list = screen.getByTestId("spotlight-list")
|
|
2435
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2436
|
+
const wrapper = list.querySelector("[data-part=list]")?.firstElementChild
|
|
2437
|
+
?.firstElementChild as HTMLElement
|
|
2430
2438
|
const target = () => scroller.style.getPropertyValue("--spotlight-list-height")
|
|
2431
2439
|
resize(wrapper, 168)
|
|
2432
2440
|
|
|
@@ -2458,10 +2466,10 @@ describe("list height", () => {
|
|
|
2458
2466
|
render(<SpotlightProvider testId="spotlight" />)
|
|
2459
2467
|
act(() => spotlight.open())
|
|
2460
2468
|
await screen.findByTestId("spotlight-item-commands-a")
|
|
2461
|
-
const
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2469
|
+
const list = screen.getByTestId("spotlight-list")
|
|
2470
|
+
const scroller = list.querySelector("[data-part=viewport]") as HTMLElement
|
|
2471
|
+
const wrapper = list.querySelector("[data-part=list]")?.firstElementChild
|
|
2472
|
+
?.firstElementChild as HTMLElement
|
|
2465
2473
|
const target = () => scroller.style.getPropertyValue("--spotlight-list-height")
|
|
2466
2474
|
resize(wrapper, 400)
|
|
2467
2475
|
|
|
@@ -186,8 +186,10 @@ const Root = ({ className, testId, children }: SpotlightRootProps) => {
|
|
|
186
186
|
className={cn(modalProps?.className, className)}
|
|
187
187
|
classNames={{
|
|
188
188
|
...modalProps?.classNames,
|
|
189
|
-
body: cn("
|
|
189
|
+
body: cn("overflow-hidden p-0", modalProps?.classNames?.body),
|
|
190
190
|
}}
|
|
191
|
+
// The list is the scroller: a short screen shrinks it instead of scrolling the body.
|
|
192
|
+
scrollable={false}
|
|
191
193
|
>
|
|
192
194
|
{/* The dialog's accessible name. */}
|
|
193
195
|
<Modal.Title className="sr-only">{t.inputLabel}</Modal.Title>
|
|
@@ -584,14 +586,9 @@ const Sentinel = ({ source, root }: { source: string; root: RefObject<HTMLElemen
|
|
|
584
586
|
const List = ({ className, testId, children }: SpotlightListProps) => {
|
|
585
587
|
const { query, view, skeletonDelay } = useSpotlightContext()
|
|
586
588
|
const { more } = view
|
|
587
|
-
const frame = useRef<HTMLDivElement>(null)
|
|
588
589
|
const content = useRef<HTMLDivElement>(null)
|
|
589
|
-
// The scroller
|
|
590
|
-
const
|
|
591
|
-
get current() {
|
|
592
|
-
return frame.current?.parentElement ?? null
|
|
593
|
-
},
|
|
594
|
-
}))
|
|
590
|
+
// The scroller: the list's scroll-area viewport, which the panel's `className` styles.
|
|
591
|
+
const scroller = useRef<HTMLDivElement>(null)
|
|
595
592
|
// Written straight onto the scroller: no state, so a resize renders nothing.
|
|
596
593
|
// theme.css registers the variable as not inherited, so it restyles the
|
|
597
594
|
// scroller alone, not every row under it. `measured` is the rows' last
|
|
@@ -652,6 +649,7 @@ const List = ({ className, testId, children }: SpotlightListProps) => {
|
|
|
652
649
|
<Combobox.Panel
|
|
653
650
|
{...props({ "data-testid": testId })}
|
|
654
651
|
withPaddingTop={false}
|
|
652
|
+
viewportRef={scroller}
|
|
655
653
|
className={cn(
|
|
656
654
|
"max-h-[min(28rem,60dvh)] scroll-py-2 p-0",
|
|
657
655
|
// Capped in the height itself, so shrinking from a long list eases
|
|
@@ -664,7 +662,7 @@ const List = ({ className, testId, children }: SpotlightListProps) => {
|
|
|
664
662
|
>
|
|
665
663
|
{/* The frame fills the held height, so whatever the rows leave of it
|
|
666
664
|
goes to the filler, and the rows alone are measured. */}
|
|
667
|
-
<div
|
|
665
|
+
<div className="flex grow shrink-0 flex-col">
|
|
668
666
|
{/* Nothing to show (an empty query with no recents or suggestions, or
|
|
669
667
|
only groups still under the skeleton delay): it collapses, and so
|
|
670
668
|
does the list, leaving no padded strip between the input and the footer. */}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
export type {
|
|
4
|
+
StepsCompletedContentProps,
|
|
5
|
+
StepsContentProps,
|
|
6
|
+
StepsDescriptionProps,
|
|
7
|
+
StepsIconSlot,
|
|
8
|
+
StepsIndicatorProps,
|
|
9
|
+
StepsItemProps,
|
|
10
|
+
StepsListProps,
|
|
11
|
+
StepsNextTriggerProps,
|
|
12
|
+
StepsPrevTriggerProps,
|
|
13
|
+
StepsRootProps,
|
|
14
|
+
StepsSeparatorProps,
|
|
15
|
+
StepsStatus,
|
|
16
|
+
StepsTitleProps,
|
|
17
|
+
StepsTranslations,
|
|
18
|
+
StepsTriggerProps,
|
|
19
|
+
} from "./steps"
|
|
20
|
+
export { STEPS_DEFAULT_TRANSLATIONS } from "./steps"
|
|
21
|
+
export { Steps, type StepsData, type StepsItem, type StepsProps } from "./steps-data"
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useStepsContext } from "@ark-ui/react/steps"
|
|
4
|
+
import type { ReactNode } from "react"
|
|
5
|
+
import type { ForbidAsChild } from "../../lib/as-child"
|
|
6
|
+
import {
|
|
7
|
+
CompletedContent,
|
|
8
|
+
Content,
|
|
9
|
+
Context,
|
|
10
|
+
Description,
|
|
11
|
+
Indicator,
|
|
12
|
+
Item,
|
|
13
|
+
List,
|
|
14
|
+
NextTrigger,
|
|
15
|
+
PrevTrigger,
|
|
16
|
+
Root,
|
|
17
|
+
Separator,
|
|
18
|
+
type StepsRootProps,
|
|
19
|
+
Title,
|
|
20
|
+
Trigger,
|
|
21
|
+
} from "./steps"
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Data-driven Steps — the convenience wrapper over the composable parts, for
|
|
25
|
+
* the common case of a flat list of steps:
|
|
26
|
+
*
|
|
27
|
+
* <Steps
|
|
28
|
+
* withControls
|
|
29
|
+
* data={[
|
|
30
|
+
* { title: "Account", description: "Email and password", content: <Account /> },
|
|
31
|
+
* { title: "Campus", content: <Campus /> },
|
|
32
|
+
* ]}
|
|
33
|
+
* completed={<Welcome />}
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* `count` comes from `data`. Drop to `Steps.Root` and its parts for anything
|
|
37
|
+
* the array can't express: custom trigger content, your own Prev/Next row,
|
|
38
|
+
* panels laid out elsewhere on the page.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/** One step. */
|
|
42
|
+
export type StepsItem = {
|
|
43
|
+
/** The step's name, beside its indicator. */
|
|
44
|
+
title: ReactNode
|
|
45
|
+
/** A supporting line under the title. */
|
|
46
|
+
description?: ReactNode
|
|
47
|
+
/** The step's panel, shown while it is current. */
|
|
48
|
+
content?: ReactNode
|
|
49
|
+
/** Replaces the number in the indicator while the step is upcoming or
|
|
50
|
+
* current; the check and the cross still win once complete or errored. */
|
|
51
|
+
icon?: ReactNode
|
|
52
|
+
/** Draws the step in the error state. */
|
|
53
|
+
error?: boolean
|
|
54
|
+
/** The step can't be clicked. */
|
|
55
|
+
disabled?: boolean
|
|
56
|
+
/** `data-testid` on the trigger; its panel gets `` `${testId}-panel` ``.
|
|
57
|
+
* Defaults to `` `step-${index}` ``. */
|
|
58
|
+
testId?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** The `data` array `Steps` renders. */
|
|
62
|
+
export type StepsData = ReadonlyArray<StepsItem>
|
|
63
|
+
|
|
64
|
+
export type StepsProps = Omit<
|
|
65
|
+
StepsRootProps,
|
|
66
|
+
"children" | "count" | "onStepChange" | "onChange" | "asChild"
|
|
67
|
+
> &
|
|
68
|
+
ForbidAsChild & {
|
|
69
|
+
/** The steps, in order. */
|
|
70
|
+
data: StepsData
|
|
71
|
+
/** The panel shown once every step is complete. */
|
|
72
|
+
completed?: ReactNode
|
|
73
|
+
/** Render Prev/Next buttons under the panels. Leave it off to drive the
|
|
74
|
+
* step from your own buttons (a form's submit, say) with `step`. */
|
|
75
|
+
withControls?: boolean
|
|
76
|
+
/** Fires with the new step index; `data.length` means completed. */
|
|
77
|
+
onChange?: (step: number) => void
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The Prev/Next row. Next leaves once the flow is complete, so a finished
|
|
81
|
+
* flow offers only the way back. */
|
|
82
|
+
const Controls = ({ testId, color }: { testId: string; color: StepsProps["color"] }) => {
|
|
83
|
+
const { isCompleted } = useStepsContext()
|
|
84
|
+
return (
|
|
85
|
+
<div className="flex items-center justify-between gap-3">
|
|
86
|
+
<PrevTrigger testId={`${testId}-prev`} />
|
|
87
|
+
{!isCompleted && <NextTrigger color={color} testId={`${testId}-next`} />}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const StepsComponent = ({
|
|
93
|
+
data,
|
|
94
|
+
completed,
|
|
95
|
+
withControls = false,
|
|
96
|
+
onChange,
|
|
97
|
+
orientation = "horizontal",
|
|
98
|
+
color,
|
|
99
|
+
testId,
|
|
100
|
+
asChild: _asChild,
|
|
101
|
+
...root
|
|
102
|
+
}: StepsProps) => {
|
|
103
|
+
const prefix = testId ?? "steps"
|
|
104
|
+
const panels = (
|
|
105
|
+
<>
|
|
106
|
+
{data.map((item, index) =>
|
|
107
|
+
item.content == null ? null : (
|
|
108
|
+
<Content
|
|
109
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a step is its position
|
|
110
|
+
key={index}
|
|
111
|
+
index={index}
|
|
112
|
+
testId={`${item.testId ?? `step-${index}`}-panel`}
|
|
113
|
+
>
|
|
114
|
+
{item.content}
|
|
115
|
+
</Content>
|
|
116
|
+
),
|
|
117
|
+
)}
|
|
118
|
+
{completed != null && (
|
|
119
|
+
<CompletedContent testId={`${prefix}-completed`}>{completed}</CompletedContent>
|
|
120
|
+
)}
|
|
121
|
+
{withControls && <Controls testId={prefix} color={color} />}
|
|
122
|
+
</>
|
|
123
|
+
)
|
|
124
|
+
return (
|
|
125
|
+
<Root
|
|
126
|
+
count={data.length}
|
|
127
|
+
orientation={orientation}
|
|
128
|
+
color={color}
|
|
129
|
+
testId={testId}
|
|
130
|
+
onStepChange={onChange ? (details) => onChange(details.step) : undefined}
|
|
131
|
+
{...root}
|
|
132
|
+
>
|
|
133
|
+
<List>
|
|
134
|
+
{data.map((item, index) => (
|
|
135
|
+
<Item
|
|
136
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a step is its position
|
|
137
|
+
key={index}
|
|
138
|
+
index={index}
|
|
139
|
+
error={item.error}
|
|
140
|
+
disabled={item.disabled}
|
|
141
|
+
>
|
|
142
|
+
<Trigger testId={item.testId ?? `step-${index}`}>
|
|
143
|
+
<Indicator>{item.icon}</Indicator>
|
|
144
|
+
<Title>{item.title}</Title>
|
|
145
|
+
{item.description != null && <Description>{item.description}</Description>}
|
|
146
|
+
</Trigger>
|
|
147
|
+
<Separator />
|
|
148
|
+
</Item>
|
|
149
|
+
))}
|
|
150
|
+
</List>
|
|
151
|
+
{orientation === "vertical" ? (
|
|
152
|
+
<div className="flex min-w-0 flex-1 flex-col gap-6">{panels}</div>
|
|
153
|
+
) : (
|
|
154
|
+
panels
|
|
155
|
+
)}
|
|
156
|
+
</Root>
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The public `Steps` export — callable for the data-driven form, with the
|
|
162
|
+
* composable parts attached (like `Tabs`). `<Steps data={…}>` and
|
|
163
|
+
* `<Steps.Root>…</Steps.Root>` both work from one import.
|
|
164
|
+
*/
|
|
165
|
+
export const Steps = Object.assign(StepsComponent, {
|
|
166
|
+
Root,
|
|
167
|
+
List,
|
|
168
|
+
Item,
|
|
169
|
+
Trigger,
|
|
170
|
+
Indicator,
|
|
171
|
+
Title,
|
|
172
|
+
Description,
|
|
173
|
+
Separator,
|
|
174
|
+
Content,
|
|
175
|
+
CompletedContent,
|
|
176
|
+
PrevTrigger,
|
|
177
|
+
NextTrigger,
|
|
178
|
+
Context,
|
|
179
|
+
})
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { act, fireEvent, render, screen } from "@testing-library/react"
|
|
2
|
+
import { useState } from "react"
|
|
3
|
+
import { describe, expect, it, vi } from "vitest"
|
|
4
|
+
import { IntlProvider } from "../../lib/intl"
|
|
5
|
+
import { Steps, type StepsData } from "./index"
|
|
6
|
+
|
|
7
|
+
const DATA: StepsData = [
|
|
8
|
+
{ title: "Account", description: "Email and password", content: "Account panel" },
|
|
9
|
+
{ title: "Campus", content: "Campus panel" },
|
|
10
|
+
{ title: "Confirm", content: "Confirm panel" },
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
/** Ark binds its handlers once the machine is ready (a macrotask); flush it,
|
|
14
|
+
* and the update a click schedules. */
|
|
15
|
+
const tick = () => act(() => new Promise((resolve) => setTimeout(resolve, 0)))
|
|
16
|
+
const click = async (el: HTMLElement) => {
|
|
17
|
+
fireEvent.click(el)
|
|
18
|
+
await tick()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const trigger = (index: number) => screen.getByTestId(`step-${index}`)
|
|
22
|
+
const panel = (index: number) => screen.getByTestId(`step-${index}-panel`)
|
|
23
|
+
|
|
24
|
+
describe("Steps", () => {
|
|
25
|
+
it("renders a trigger per step, numbered, with the first one current", () => {
|
|
26
|
+
render(<Steps data={DATA} />)
|
|
27
|
+
expect(screen.getAllByRole("tab")).toHaveLength(3)
|
|
28
|
+
expect(trigger(0)?.getAttribute("aria-selected")).toBe("true")
|
|
29
|
+
expect(trigger(0)?.textContent).toContain("1")
|
|
30
|
+
expect(trigger(0)?.textContent).toContain("Email and password")
|
|
31
|
+
expect(panel(0).hidden).toBe(false)
|
|
32
|
+
expect(panel(1).hidden).toBe(true)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it("marks the item of the current step with aria-current", () => {
|
|
36
|
+
const { container } = render(<Steps data={DATA} defaultStep={1} />)
|
|
37
|
+
const items = container.querySelectorAll("[data-part=item]")
|
|
38
|
+
expect(items[1]?.getAttribute("aria-current")).toBe("step")
|
|
39
|
+
expect(items[0]?.hasAttribute("aria-current")).toBe(false)
|
|
40
|
+
expect(items[0]?.getAttribute("data-status")).toBe("complete")
|
|
41
|
+
expect(items[2]?.getAttribute("data-status")).toBe("upcoming")
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
it("adds the step's state to a completed or errored trigger's name", () => {
|
|
45
|
+
const data = DATA.map((item, i) => (i === 1 ? { ...item, error: true } : item))
|
|
46
|
+
render(<Steps data={data} defaultStep={2} />)
|
|
47
|
+
expect(screen.getByRole("tab", { name: /Account.*Completed/ })).toBe(trigger(0))
|
|
48
|
+
expect(screen.getByRole("tab", { name: /Campus.*Has errors/ })).toBe(trigger(1))
|
|
49
|
+
expect(trigger(1).closest("[data-part=item]")?.getAttribute("data-status")).toBe("error")
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it("draws a check once complete, and the custom icon until then", () => {
|
|
53
|
+
const data = DATA.map((item, i) => ({ ...item, icon: <span data-icon={i} /> }))
|
|
54
|
+
const { container } = render(<Steps data={data} defaultStep={1} />)
|
|
55
|
+
const indicators = container.querySelectorAll("[data-part=indicator]")
|
|
56
|
+
expect(indicators[0]?.querySelector("svg")).not.toBeNull()
|
|
57
|
+
expect(indicators[0]?.querySelector("[data-icon]")).toBeNull()
|
|
58
|
+
expect(indicators[1]?.querySelector("[data-icon='1']")).not.toBeNull()
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it("prints the number in the locale's digits", () => {
|
|
62
|
+
render(
|
|
63
|
+
<IntlProvider locale="ar-EG">
|
|
64
|
+
<Steps data={DATA} />
|
|
65
|
+
</IntlProvider>,
|
|
66
|
+
)
|
|
67
|
+
expect(trigger(0)?.textContent).toContain("١")
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it("moves with Next and Prev, and shows the completed panel at the end", async () => {
|
|
71
|
+
const onChange = vi.fn()
|
|
72
|
+
render(<Steps data={DATA} withControls completed="All done" onChange={onChange} />)
|
|
73
|
+
await tick()
|
|
74
|
+
const next = screen.getByTestId("steps-next")
|
|
75
|
+
const prev = screen.getByTestId("steps-prev")
|
|
76
|
+
expect((prev as HTMLButtonElement).disabled).toBe(true)
|
|
77
|
+
expect(next?.textContent).toContain("Next")
|
|
78
|
+
await click(next)
|
|
79
|
+
expect(onChange).toHaveBeenLastCalledWith(1)
|
|
80
|
+
expect(panel(1).hidden).toBe(false)
|
|
81
|
+
await click(next)
|
|
82
|
+
expect(next?.textContent).toContain("Finish")
|
|
83
|
+
await click(next)
|
|
84
|
+
expect(onChange).toHaveBeenLastCalledWith(3)
|
|
85
|
+
expect(screen.getByTestId("steps-completed").hidden).toBe(false)
|
|
86
|
+
expect(screen.queryByTestId("steps-next")).toBeNull()
|
|
87
|
+
await click(screen.getByTestId("steps-prev"))
|
|
88
|
+
expect(panel(2).hidden).toBe(false)
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it("lets any step be clicked by default", async () => {
|
|
92
|
+
render(<Steps data={DATA} />)
|
|
93
|
+
await tick()
|
|
94
|
+
await click(trigger(2))
|
|
95
|
+
expect(trigger(2)?.getAttribute("aria-selected")).toBe("true")
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it("under linear, locks the steps ahead but keeps completed ones clickable", async () => {
|
|
99
|
+
render(<Steps data={DATA} linear defaultStep={1} />)
|
|
100
|
+
await tick()
|
|
101
|
+
expect((trigger(2) as HTMLButtonElement).disabled).toBe(true)
|
|
102
|
+
expect(trigger(2)?.hasAttribute("data-locked")).toBe(true)
|
|
103
|
+
await click(trigger(2))
|
|
104
|
+
expect(trigger(1)?.getAttribute("aria-selected")).toBe("true")
|
|
105
|
+
expect((trigger(0) as HTMLButtonElement).disabled).toBe(false)
|
|
106
|
+
await click(trigger(0))
|
|
107
|
+
expect(trigger(0)?.getAttribute("aria-selected")).toBe("true")
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it("never lets a disabled step be clicked", () => {
|
|
111
|
+
const data = DATA.map((item, i) => (i === 2 ? { ...item, disabled: true } : item))
|
|
112
|
+
render(<Steps data={data} />)
|
|
113
|
+
expect((trigger(2) as HTMLButtonElement).disabled).toBe(true)
|
|
114
|
+
expect(trigger(2).closest("[data-part=item]")?.hasAttribute("data-disabled")).toBe(true)
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
it("is controlled through step", async () => {
|
|
118
|
+
const Controlled = () => {
|
|
119
|
+
const [step, setStep] = useState(0)
|
|
120
|
+
return (
|
|
121
|
+
<>
|
|
122
|
+
<button type="button" onClick={() => setStep(2)}>
|
|
123
|
+
jump
|
|
124
|
+
</button>
|
|
125
|
+
<Steps data={DATA} step={step} onChange={setStep} />
|
|
126
|
+
</>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
render(<Controlled />)
|
|
130
|
+
await tick()
|
|
131
|
+
await click(screen.getByText("jump"))
|
|
132
|
+
expect(trigger(2)?.getAttribute("aria-selected")).toBe("true")
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
it("gates Next on isStepValid", async () => {
|
|
136
|
+
render(<Steps data={DATA} withControls isStepValid={() => false} />)
|
|
137
|
+
await tick()
|
|
138
|
+
await click(screen.getByTestId("steps-next"))
|
|
139
|
+
expect(trigger(0)?.getAttribute("aria-selected")).toBe("true")
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
it("fills the connectors of completed steps and omits the last one", () => {
|
|
143
|
+
const { container } = render(<Steps data={DATA} defaultStep={1} />)
|
|
144
|
+
const separators = container.querySelectorAll("[data-part=separator]")
|
|
145
|
+
expect(separators).toHaveLength(2)
|
|
146
|
+
expect(separators[0]?.hasAttribute("data-complete")).toBe(true)
|
|
147
|
+
expect(separators[1]?.hasAttribute("data-complete")).toBe(false)
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
it("announces step changes, but not the first render", async () => {
|
|
151
|
+
render(<Steps data={DATA} withControls />)
|
|
152
|
+
await tick()
|
|
153
|
+
const region = document.querySelector("[aria-live=polite]")
|
|
154
|
+
expect(region?.textContent).toBe("")
|
|
155
|
+
await click(screen.getByTestId("steps-next"))
|
|
156
|
+
expect(region?.textContent).toContain("Step 2 of 3")
|
|
157
|
+
await click(screen.getByTestId("steps-next"))
|
|
158
|
+
await click(screen.getByTestId("steps-next"))
|
|
159
|
+
expect(region?.textContent).toContain("All steps completed")
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
it("takes its strings from translations", async () => {
|
|
163
|
+
render(
|
|
164
|
+
<Steps
|
|
165
|
+
data={DATA}
|
|
166
|
+
withControls
|
|
167
|
+
defaultStep={1}
|
|
168
|
+
translations={{
|
|
169
|
+
next: "Suivant",
|
|
170
|
+
prev: "Retour",
|
|
171
|
+
complete: "Terminée",
|
|
172
|
+
progress: (step, count) => `Étape ${step} sur ${count}`,
|
|
173
|
+
}}
|
|
174
|
+
/>,
|
|
175
|
+
)
|
|
176
|
+
await tick()
|
|
177
|
+
expect(screen.getByTestId("steps-next")?.textContent).toContain("Suivant")
|
|
178
|
+
expect(screen.getByTestId("steps-prev")?.textContent).toContain("Retour")
|
|
179
|
+
expect(screen.getByRole("tab", { name: /Terminée/ })).toBe(trigger(0))
|
|
180
|
+
await click(screen.getByTestId("steps-prev"))
|
|
181
|
+
expect(document.querySelector("[aria-live=polite]")?.textContent).toContain("Étape 1 sur 3")
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
it("puts color on the list, not the panels", () => {
|
|
185
|
+
const { container } = render(<Steps data={DATA} color="green" testId="flow" />)
|
|
186
|
+
expect(container.querySelector("[data-part=list]")?.getAttribute("data-color")).toBe("green")
|
|
187
|
+
expect(screen.getByTestId("flow")?.hasAttribute("data-color")).toBe(false)
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
it("composes from parts", () => {
|
|
191
|
+
render(
|
|
192
|
+
<Steps.Root count={2} testId="root">
|
|
193
|
+
<Steps.List testId="list">
|
|
194
|
+
<Steps.Item index={0} testId="item">
|
|
195
|
+
<Steps.Trigger testId="trigger">
|
|
196
|
+
<Steps.Indicator testId="indicator" />
|
|
197
|
+
<Steps.Title testId="title">One</Steps.Title>
|
|
198
|
+
<Steps.Description testId="description">First</Steps.Description>
|
|
199
|
+
</Steps.Trigger>
|
|
200
|
+
<Steps.Separator testId="separator" />
|
|
201
|
+
</Steps.Item>
|
|
202
|
+
<Steps.Item index={1}>
|
|
203
|
+
<Steps.Trigger>
|
|
204
|
+
<Steps.Indicator />
|
|
205
|
+
<Steps.Title>Two</Steps.Title>
|
|
206
|
+
</Steps.Trigger>
|
|
207
|
+
</Steps.Item>
|
|
208
|
+
</Steps.List>
|
|
209
|
+
<Steps.Content index={0} testId="content">
|
|
210
|
+
One panel
|
|
211
|
+
</Steps.Content>
|
|
212
|
+
<Steps.CompletedContent testId="completed">Done</Steps.CompletedContent>
|
|
213
|
+
<Steps.PrevTrigger testId="prev" />
|
|
214
|
+
<Steps.NextTrigger testId="next">Continue</Steps.NextTrigger>
|
|
215
|
+
</Steps.Root>,
|
|
216
|
+
)
|
|
217
|
+
for (const id of [
|
|
218
|
+
"root",
|
|
219
|
+
"list",
|
|
220
|
+
"item",
|
|
221
|
+
"trigger",
|
|
222
|
+
"indicator",
|
|
223
|
+
"title",
|
|
224
|
+
"description",
|
|
225
|
+
"separator",
|
|
226
|
+
"content",
|
|
227
|
+
"completed",
|
|
228
|
+
"prev",
|
|
229
|
+
"next",
|
|
230
|
+
]) {
|
|
231
|
+
expect(screen.getByTestId(id)).toBeTruthy()
|
|
232
|
+
}
|
|
233
|
+
expect(screen.getByTestId("next")?.textContent).toContain("Continue")
|
|
234
|
+
})
|
|
235
|
+
})
|