@42-central/ui-react 0.18.2 → 0.19.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-YXE4B6X3.js → chunk-2NNZHVKD.js} +3 -3
- package/dist/{chunk-YXE4B6X3.js.map → chunk-2NNZHVKD.js.map} +1 -1
- package/dist/{chunk-5JHDSVEZ.js → chunk-4NNGTNPV.js} +10 -8
- package/dist/chunk-4NNGTNPV.js.map +1 -0
- package/dist/{chunk-7NZSTCJO.js → chunk-57BTVRRB.js} +4 -9
- package/dist/chunk-57BTVRRB.js.map +1 -0
- package/dist/{chunk-S2HWWR2H.js → chunk-64T6Z7BA.js} +3 -3
- package/dist/{chunk-S2HWWR2H.js.map → chunk-64T6Z7BA.js.map} +1 -1
- package/dist/{chunk-MI2WZRK3.js → chunk-A6MYJTJI.js} +4 -4
- package/dist/{chunk-MI2WZRK3.js.map → chunk-A6MYJTJI.js.map} +1 -1
- package/dist/{chunk-RQL7FVCS.js → chunk-BTFBBNRW.js} +11 -6
- package/dist/chunk-BTFBBNRW.js.map +1 -0
- package/dist/{chunk-OWG4BCQR.js → chunk-CYWMES5P.js} +4 -4
- package/dist/{chunk-OWG4BCQR.js.map → chunk-CYWMES5P.js.map} +1 -1
- package/dist/{chunk-YBJB7FGE.js → chunk-CZEKZ5HR.js} +6 -6
- package/dist/chunk-CZEKZ5HR.js.map +1 -0
- package/dist/{chunk-HAQJQFE6.js → chunk-DBTJEBMO.js} +11 -4
- package/dist/{chunk-HAQJQFE6.js.map → chunk-DBTJEBMO.js.map} +1 -1
- package/dist/{chunk-AE7QTLJ5.js → chunk-FAOBC4IS.js} +4 -4
- package/dist/{chunk-AE7QTLJ5.js.map → chunk-FAOBC4IS.js.map} +1 -1
- package/dist/{chunk-NF5JM2YO.js → chunk-FOMR74VE.js} +3 -3
- package/dist/{chunk-NF5JM2YO.js.map → chunk-FOMR74VE.js.map} +1 -1
- package/dist/{chunk-FZIHZT5R.js → chunk-GCGX4FEF.js} +16 -10
- package/dist/chunk-GCGX4FEF.js.map +1 -0
- package/dist/{chunk-B2YJKRNQ.js → chunk-HCYULRWT.js} +13 -9
- package/dist/chunk-HCYULRWT.js.map +1 -0
- package/dist/{chunk-B2LCHXUB.js → chunk-INJUILCN.js} +9 -4
- package/dist/chunk-INJUILCN.js.map +1 -0
- package/dist/{chunk-ZDXQ64A7.js → chunk-K5UWVH6P.js} +5 -5
- package/dist/{chunk-ZDXQ64A7.js.map → chunk-K5UWVH6P.js.map} +1 -1
- package/dist/{chunk-6GDMSENK.js → chunk-LM6F6DLR.js} +3 -24
- package/dist/chunk-LM6F6DLR.js.map +1 -0
- package/dist/{chunk-KHMFNH3X.js → chunk-MQO42HZL.js} +7 -7
- package/dist/chunk-MQO42HZL.js.map +1 -0
- package/dist/chunk-OC7I2CTA.js +8 -0
- package/dist/chunk-OC7I2CTA.js.map +1 -0
- package/dist/{chunk-O23Y5ML4.js → chunk-OGJFDNIS.js} +249 -231
- package/dist/chunk-OGJFDNIS.js.map +1 -0
- package/dist/{chunk-6OLTJYSX.js → chunk-PINENGML.js} +12 -5
- package/dist/chunk-PINENGML.js.map +1 -0
- package/dist/{chunk-NSDM3FEB.js → chunk-PS2PZFXH.js} +5 -3
- package/dist/chunk-PS2PZFXH.js.map +1 -0
- package/dist/{chunk-RAUOFTUH.js → chunk-QIDAXFKK.js} +4 -4
- package/dist/{chunk-RAUOFTUH.js.map → chunk-QIDAXFKK.js.map} +1 -1
- package/dist/{chunk-S7N4LGLZ.js → chunk-RIP5G47F.js} +4 -4
- package/dist/{chunk-S7N4LGLZ.js.map → chunk-RIP5G47F.js.map} +1 -1
- package/dist/{chunk-Z2Z5EXVT.js → chunk-RKYXG6X7.js} +3 -3
- package/dist/{chunk-Z2Z5EXVT.js.map → chunk-RKYXG6X7.js.map} +1 -1
- package/dist/{chunk-WQN64ZHG.js → chunk-SVKU3GUN.js} +10 -6
- package/dist/chunk-SVKU3GUN.js.map +1 -0
- package/dist/{chunk-FHG54IT5.js → chunk-TBTSEPGP.js} +13 -4
- package/dist/chunk-TBTSEPGP.js.map +1 -0
- package/dist/{chunk-HT5JAHR3.js → chunk-UJZIF2BA.js} +20 -9
- package/dist/chunk-UJZIF2BA.js.map +1 -0
- package/dist/{chunk-UHNRAI6V.js → chunk-VZBUQNLX.js} +68 -29
- package/dist/chunk-VZBUQNLX.js.map +1 -0
- package/dist/{chunk-JITF6I7N.js → chunk-WJOHNCYY.js} +11 -4
- package/dist/{chunk-JITF6I7N.js.map → chunk-WJOHNCYY.js.map} +1 -1
- package/dist/{chunk-EBREIC3L.js → chunk-YQHOKMSV.js} +26 -8
- package/dist/chunk-YQHOKMSV.js.map +1 -0
- package/dist/{chunk-WHKKN3ZK.js → chunk-YW6Q6ERX.js} +10 -8
- package/dist/chunk-YW6Q6ERX.js.map +1 -0
- package/dist/{chunk-PH354ECN.js → chunk-Z43YWH4R.js} +13 -4
- package/dist/chunk-Z43YWH4R.js.map +1 -0
- package/dist/{chunk-5OQLFX47.js → chunk-Z6RPMRFH.js} +3 -3
- package/dist/{chunk-5OQLFX47.js.map → chunk-Z6RPMRFH.js.map} +1 -1
- package/dist/{chunk-TCWYBVIL.js → chunk-ZB5VMGKB.js} +10 -7
- package/dist/chunk-ZB5VMGKB.js.map +1 -0
- package/dist/colors.css +15 -10
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/action-icon/index.js +3 -3
- package/dist/components/alert/index.js +3 -3
- package/dist/components/app-shell/index.js +4 -4
- package/dist/components/autocomplete/autocomplete.d.ts +8 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.d.ts +1 -1
- package/dist/components/autocomplete/index.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +10 -7
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.js +3 -3
- package/dist/components/button-multi-select/index.js +5 -5
- package/dist/components/button-select/index.js +5 -5
- package/dist/components/calendar/calendar-zone-sync.d.ts +41 -0
- package/dist/components/calendar/calendar-zone-sync.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +6 -5
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +8 -5
- package/dist/components/chart/chart.d.ts +17 -10
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +50 -7
- package/dist/components/chart/index.js.map +1 -1
- package/dist/components/chart/styles.css +100 -0
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/choice-card-group/index.d.ts.map +1 -1
- package/dist/components/choice-card-group/index.js +4 -3
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/copy.d.ts.map +1 -1
- package/dist/components/clipboard/index.js +5 -5
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code-block/chrome.js +4 -4
- package/dist/components/code-block/index.js +5 -5
- package/dist/components/combobox/combobox.d.ts +20 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/index.js +4 -4
- package/dist/components/combobox-list/combobox-list.d.ts +8 -1
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/index.d.ts +1 -1
- package/dist/components/combobox-list/index.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +5 -5
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +4 -1
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/index.d.ts +5 -1
- package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
- package/dist/components/data-table/data-table-header-cell.d.ts +11 -15
- package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
- package/dist/components/data-table/data-table-meta.d.ts +2 -2
- package/dist/components/data-table/data-table-meta.d.ts.map +1 -1
- package/dist/components/data-table/data-table-pagination.d.ts +3 -0
- package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts +5 -2
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table-toolbar.d.ts +3 -1
- package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
- package/dist/components/data-table/data-table-translations.d.ts +68 -0
- package/dist/components/data-table/data-table-translations.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +5 -8
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.d.ts +2 -1
- package/dist/components/data-table/index.d.ts.map +1 -1
- package/dist/components/data-table/index.js +162 -79
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +13 -9
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +16 -15
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +9 -1
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +4 -4
- package/dist/components/field/field.d.ts +9 -2
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +13 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +16 -7
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/menu/index.js +2 -2
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +4 -4
- package/dist/components/modal/modal.d.ts +9 -1
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.d.ts +1 -1
- package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +7 -5
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +8 -1
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.d.ts +1 -1
- package/dist/components/multi-select/index.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +20 -9
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +11 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.d.ts +1 -1
- package/dist/components/nav-link/index.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +2 -2
- package/dist/components/nav-link/nav-link.d.ts +12 -0
- package/dist/components/nav-link/nav-link.d.ts.map +1 -1
- package/dist/components/nav-link/navigation.d.ts +3 -1
- package/dist/components/nav-link/navigation.d.ts.map +1 -1
- package/dist/components/nav-link/tanstack.js +2 -2
- package/dist/components/notification/create-notifier.d.ts +12 -1
- package/dist/components/notification/create-notifier.d.ts.map +1 -1
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/notification/index.d.ts.map +1 -1
- package/dist/components/notification/index.js +9 -6
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.d.ts +14 -1
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.d.ts.map +1 -1
- package/dist/components/number-input/index.js +4 -4
- package/dist/components/number-input/number-input.d.ts +20 -2
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/index.js +6 -6
- package/dist/components/password-input/index.d.ts +1 -1
- package/dist/components/password-input/index.d.ts.map +1 -1
- package/dist/components/password-input/index.js +68 -7
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +45 -6
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/pill/index.js +2 -2
- package/dist/components/pills-input/index.js +5 -5
- package/dist/components/pin-input/index.js +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +0 -10
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.js.map +1 -1
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/radio-group/index.js +3 -3
- package/dist/components/rating/index.js +2 -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 +60 -48
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/schedule/now-cursor-line.d.ts +10 -5
- package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
- package/dist/components/schedule/schedule-dates.d.ts +11 -26
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-chip.d.ts +4 -1
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-details.d.ts +3 -2
- package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
- package/dist/components/schedule/schedule-geometry.d.ts +20 -21
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
- package/dist/components/schedule/schedule-grid-gesture.d.ts +5 -9
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
- package/dist/components/schedule/schedule-segments.d.ts +2 -3
- package/dist/components/schedule/schedule-segments.d.ts.map +1 -1
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
- package/dist/components/segment-group/index.js +4 -3
- package/dist/components/segment-group/segment-group.d.ts +3 -2
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +6 -4
- package/dist/components/select/select.d.ts +12 -2
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/switch/index.js +2 -2
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/index.js +4 -3
- package/dist/components/tabs/tabs.d.ts +3 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/tags-input/index.d.ts.map +1 -1
- package/dist/components/tags-input/index.js +9 -7
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +9 -2
- 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 +2 -2
- package/dist/components/theme-icon/index.js +2 -2
- package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
- package/dist/components/time-input/index.js +24 -8
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/time-input/time-input.d.ts.map +1 -1
- package/dist/components/time-input/time-row.d.ts +16 -3
- package/dist/components/time-input/time-row.d.ts.map +1 -1
- package/dist/components/timeline/index.js +11 -3
- package/dist/components/timeline/index.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/tree-multi-select/index.d.ts +1 -1
- package/dist/components/tree-multi-select/index.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.js +62 -44
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +10 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +45 -15
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +10 -1
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/date-value.d.ts +14 -1
- package/dist/lib/date-value.d.ts.map +1 -1
- package/dist/lib/focus-styles.d.ts +13 -5
- package/dist/lib/focus-styles.d.ts.map +1 -1
- package/dist/theme.css +24 -2
- package/package.json +1 -1
- package/src/colors.css +15 -10
- package/src/components/autocomplete/autocomplete.test.tsx +32 -0
- package/src/components/autocomplete/autocomplete.tsx +17 -5
- package/src/components/autocomplete/index.ts +5 -1
- package/src/components/button/button.test.tsx +6 -0
- package/src/components/calendar/calendar-zone-sync.tsx +79 -0
- package/src/components/calendar/calendar.test.tsx +134 -14
- package/src/components/calendar/calendar.tsx +36 -22
- package/src/components/chart/chart.test.tsx +115 -8
- package/src/components/chart/chart.tsx +115 -25
- package/src/components/chart/styles.css +100 -0
- package/src/components/choice-card-group/index.ts +2 -0
- package/src/components/circular-progress/circular-progress.tsx +2 -0
- package/src/components/clipboard/clipboard.test.tsx +54 -22
- package/src/components/clipboard/clipboard.tsx +2 -0
- package/src/components/clipboard/copy.tsx +2 -0
- package/src/components/clipboard/index.ts +3 -3
- package/src/components/combobox/combobox.test.tsx +22 -0
- package/src/components/combobox/combobox.tsx +20 -0
- package/src/components/combobox/index.ts +1 -0
- package/src/components/combobox-list/combobox-list.test.tsx +19 -0
- package/src/components/combobox-list/combobox-list.tsx +16 -2
- package/src/components/combobox-list/index.ts +5 -1
- package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +5 -4
- package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +16 -2
- package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +9 -1
- package/src/components/data-table/data-table-filter/index.tsx +15 -1
- package/src/components/data-table/data-table-filter.test.tsx +33 -0
- package/src/components/data-table/data-table-header-cell.tsx +37 -22
- package/src/components/data-table/data-table-meta.ts +2 -2
- package/src/components/data-table/data-table-pagination.tsx +6 -0
- package/src/components/data-table/data-table-stack.tsx +26 -14
- package/src/components/data-table/data-table-toolbar.tsx +4 -1
- package/src/components/data-table/data-table-translations.ts +105 -0
- package/src/components/data-table/data-table.test.tsx +121 -0
- package/src/components/data-table/data-table.tsx +37 -17
- package/src/components/data-table/index.ts +9 -1
- package/src/components/date-picker/date-picker.test.tsx +197 -5
- package/src/components/date-picker/date-picker.tsx +42 -16
- package/src/components/drawer/drawer.tsx +14 -1
- package/src/components/drawer/index.ts +1 -0
- package/src/components/field/field.tsx +29 -3
- package/src/components/file-upload/file-upload.test.tsx +21 -0
- package/src/components/file-upload/file-upload.tsx +26 -3
- package/src/components/file-upload/index.ts +1 -1
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/modal-translations.test.tsx +27 -0
- package/src/components/modal/modal.tsx +14 -1
- package/src/components/multi-combobox-list/index.ts +5 -1
- package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +19 -0
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +26 -4
- package/src/components/multi-select/index.ts +1 -1
- package/src/components/multi-select/multi-select.test.tsx +38 -0
- package/src/components/multi-select/multi-select.tsx +28 -4
- package/src/components/nav-link/index.ts +6 -1
- package/src/components/nav-link/nav-link.test.tsx +16 -0
- package/src/components/nav-link/nav-link.tsx +19 -1
- package/src/components/nav-link/navigation.test.tsx +18 -0
- package/src/components/nav-link/navigation.tsx +8 -4
- package/src/components/notification/create-notifier.tsx +20 -4
- package/src/components/notification/index.ts +7 -1
- package/src/components/notification/notification.test.tsx +49 -0
- package/src/components/notification/notification.tsx +39 -5
- package/src/components/number-input/index.ts +1 -1
- package/src/components/number-input/number-input.test.tsx +37 -0
- package/src/components/number-input/number-input.tsx +33 -4
- package/src/components/password-input/index.ts +5 -1
- package/src/components/password-input/password-input.test.tsx +201 -4
- package/src/components/password-input/password-input.tsx +162 -13
- package/src/components/popover/popover.tsx +0 -29
- package/src/components/progress/index.ts +3 -3
- package/src/components/progress/progress.tsx +2 -0
- package/src/components/rating/rating.tsx +2 -0
- package/src/components/schedule/now-cursor-line.test.tsx +56 -28
- package/src/components/schedule/now-cursor-line.tsx +30 -16
- package/src/components/schedule/schedule-agenda-view.test.tsx +1 -1
- package/src/components/schedule/schedule-dates.test.ts +19 -0
- package/src/components/schedule/schedule-dates.ts +16 -30
- package/src/components/schedule/schedule-details-popover.test.tsx +77 -6
- package/src/components/schedule/schedule-event-chip.tsx +17 -6
- package/src/components/schedule/schedule-event-details.test.tsx +38 -0
- package/src/components/schedule/schedule-event-details.tsx +7 -5
- package/src/components/schedule/schedule-geometry.test.ts +21 -18
- package/src/components/schedule/schedule-geometry.ts +37 -24
- package/src/components/schedule/schedule-grid-gesture.ts +5 -9
- package/src/components/schedule/schedule-segments.ts +2 -3
- package/src/components/schedule/schedule-timed-grid.tsx +43 -20
- package/src/components/schedule/schedule.test.tsx +34 -11
- package/src/components/schedule/use-event-resize.ts +6 -13
- package/src/components/segment-group/segment-group.test.tsx +23 -0
- package/src/components/segment-group/segment-group.tsx +13 -7
- package/src/components/select/index.ts +1 -1
- package/src/components/select/select.test.tsx +32 -0
- package/src/components/select/select.tsx +15 -1
- package/src/components/spinner/spinner.test.tsx +26 -0
- package/src/components/spinner/spinner.tsx +4 -1
- package/src/components/table/table.test.tsx +13 -0
- package/src/components/table/table.tsx +9 -5
- package/src/components/tabs/tabs.test.tsx +11 -0
- package/src/components/tabs/tabs.tsx +6 -4
- package/src/components/tags-input/index.ts +1 -1
- package/src/components/tags-input/tags-input.test.tsx +28 -0
- package/src/components/tags-input/tags-input.tsx +17 -1
- package/src/components/theme-icon/theme-icon.tsx +8 -3
- package/src/components/time-input/time-input.test.tsx +75 -0
- package/src/components/time-input/time-input.tsx +27 -3
- package/src/components/time-input/time-row.tsx +27 -3
- package/src/components/timeline/timeline.test.tsx +4 -1
- package/src/components/timeline/timeline.tsx +11 -3
- package/src/components/tree-multi-select/index.ts +5 -1
- package/src/components/tree-multi-select/tree-multi-select.test.tsx +72 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +156 -115
- package/src/components/tree-select/index.ts +1 -1
- package/src/components/tree-select/tree-select.test.tsx +69 -0
- package/src/components/tree-select/tree-select.tsx +128 -74
- package/src/lib/date-value.test.ts +19 -0
- package/src/lib/date-value.ts +21 -5
- package/src/lib/focus-styles.test.ts +21 -2
- package/src/lib/focus-styles.ts +24 -5
- package/src/theme.css +24 -2
- package/src/use-client-barrels.test.ts +80 -0
- package/dist/chunk-5JHDSVEZ.js.map +0 -1
- package/dist/chunk-6GDMSENK.js.map +0 -1
- package/dist/chunk-6OLTJYSX.js.map +0 -1
- package/dist/chunk-7NZSTCJO.js.map +0 -1
- package/dist/chunk-B2LCHXUB.js.map +0 -1
- package/dist/chunk-B2YJKRNQ.js.map +0 -1
- package/dist/chunk-EBREIC3L.js.map +0 -1
- package/dist/chunk-FHG54IT5.js.map +0 -1
- package/dist/chunk-FZIHZT5R.js.map +0 -1
- package/dist/chunk-HT5JAHR3.js.map +0 -1
- package/dist/chunk-KHMFNH3X.js.map +0 -1
- package/dist/chunk-NSDM3FEB.js.map +0 -1
- package/dist/chunk-O23Y5ML4.js.map +0 -1
- package/dist/chunk-PH354ECN.js.map +0 -1
- package/dist/chunk-RQL7FVCS.js.map +0 -1
- package/dist/chunk-TCWYBVIL.js.map +0 -1
- package/dist/chunk-UHNRAI6V.js.map +0 -1
- package/dist/chunk-WHKKN3ZK.js.map +0 -1
- package/dist/chunk-WQN64ZHG.js.map +0 -1
- package/dist/chunk-YBJB7FGE.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/date-picker/date-time-text.ts","../src/components/date-picker/date-picker.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAM,SAAA,GAAY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AA;AAAA,kBACC,IAAA,EAAK,QAAA;AAAA,kBACL,IAAA,EAAM,GAAG,IAAI,CAAA,GAAA,CAAA;AAAA,kBACb,KAAA,EACE,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,GAAI,kBAAA,CAAmB,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,EAAG,OAAA,CAAQ,QAAQ,CAAC,CAAA,GAAI;AAAA;AAAA;AAEzE,aAAA,EACF,CAAA,mBAEA,GAAA;AAAA,cAAC,OAAA;AAAA,cAAA;AAAA,gBACC,IAAA,EAAK,QAAA;AAAA,gBACL,IAAA;AAAA,gBACA,KAAA,EAAO,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,GAAI,kBAAA,CAAmB,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,EAAG,OAAA,CAAQ,QAAQ,CAAC,CAAA,GAAI;AAAA;AAAA,aAC9E;AAAA,WAAA,EAEN,CAAA,EAEJ;AAAA;AAAA;AACF;AAAA,GACF;AAEJ,CAAA;AAEO,IAAM,UAAA,GAAa,MAAA,CAAO,MAAA,CAAO,cAAA,EAAgB;AAAA,EACtD,MAAMA,YAAA,CAAI,IAAA;AAAA,EACV,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,OAAOA,YAAA,CAAI,KAAA;AAAA,EACX,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,cAAcA,YAAA,CAAI,YAAA;AAAA,EAClB,SAASA,YAAA,CAAI,OAAA;AAAA,EACb,OAAA,EAAS,WAAA;AAAA,EACT,QAAA,EAAU,YAAA;AAAA,EACV,SAAA,EAAW,OAAA;AAAA,EACX,YAAA;AAAA,EACA,QAAQ,OAAA,CAAQ;AAClB,CAAC","file":"chunk-O23Y5ML4.js","sourcesContent":["import { CalendarDateTime, type DateValue } from \"@internationalized/date\"\nimport { calendarValueToDate } from \"../../lib/date-value\"\nimport { dayPeriodLabels, type HourCycle, is12Hour, to24Hour } from \"../time-input/hour-cycle\"\n\n/**\n * The typed text format for `typeable` + `withTime` — all-numeric, in the locale's own field order\n * (`10/20/2026, 02:30 PM` en-US, `20/10/2026 14:30` fr-FR), so what the field shows is exactly\n * what can be typed back. Ark's own `Input` part can't carry a time: it strips every character\n * but digits and the date separator while typing, and re-applies the previous value's time over\n * whatever its `parse` returns (`preserveTime`) — so `DatePicker` renders its own `<input>` on\n * top of these two helpers instead.\n */\n\ntype DateTimeTextOptions = {\n locale: string\n hourCycle: HourCycle\n withSeconds?: boolean\n}\n\nconst formatter = ({ locale, hourCycle, withSeconds }: DateTimeTextOptions, timeZone: string) =>\n new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: withSeconds ? \"2-digit\" : undefined,\n hourCycle,\n // `parseDateTimeText` reads ASCII digits; keep the display in the same digits it can parse.\n numberingSystem: \"latn\",\n timeZone,\n })\n\nexport const formatDateTimeText = (\n value: DateValue,\n options: DateTimeTextOptions,\n timeZone: string,\n): string => formatter(options, timeZone).format(calendarValueToDate(value, timeZone))\n\ntype NumericField = \"year\" | \"month\" | \"day\" | \"hour\" | \"minute\" | \"second\"\nconst NUMERIC_FIELDS = new Set<string>([\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\"])\n\n/** The locale's numeric field order, read off the same formatter `formatDateTimeText` uses. */\nconst fieldOrder = (options: DateTimeTextOptions): NumericField[] =>\n formatter(options, \"UTC\")\n .formatToParts(new Date(Date.UTC(2001, 10, 22, 13, 44, 55)))\n .map((part) => part.type)\n .filter((type): type is NumericField => NUMERIC_FIELDS.has(type))\n\n/** \"AM\"/\"PM\" from the locale's own labels (`dayPeriodLabels`), falling back to a Latin `a`/`p`. */\nconst readPeriod = (text: string, locale: string): \"AM\" | \"PM\" | undefined => {\n const lower = text.toLowerCase()\n const labels = dayPeriodLabels(locale)\n if (lower.includes(labels.PM.toLowerCase())) return \"PM\"\n if (lower.includes(labels.AM.toLowerCase())) return \"AM\"\n if (/\\bp\\.?\\s?m?\\.?\\b/.test(lower)) return \"PM\"\n if (/\\ba\\.?\\s?m?\\.?\\b/.test(lower)) return \"AM\"\n return undefined\n}\n\nconst inRange = (n: number, min: number, max: number) => Number.isInteger(n) && n >= min && n <= max\n\n/**\n * Parse typed text back into a `CalendarDateTime`. Reads digit runs in the locale's field order\n * (so any separator works — `20/10/2026 14:30`, `20.10.2026 14h30` — but run-together digits like\n * `1430` read as one number); the\n * date is required, the time is optional — omitted fields keep `fallbackTime` (the current\n * value's), else midnight. In 12h mode a missing period reads AM, and a 13–23 hour is taken as\n * 24h as-typed. Returns `undefined` for anything that isn't a real date/time (`02/30/2026`,\n * `25:00`), never a silently constrained one.\n */\nexport const parseDateTimeText = (\n text: string,\n options: DateTimeTextOptions,\n fallbackTime?: { hour: number; minute: number; second: number },\n): CalendarDateTime | undefined => {\n const numbers = text.match(/\\d+/g)?.map(Number) ?? []\n const order = fieldOrder(options)\n const field = (name: NumericField) => {\n const index = order.indexOf(name)\n return index === -1 ? undefined : numbers[index]\n }\n\n const rawYear = field(\"year\")\n const month = field(\"month\")\n const day = field(\"day\")\n if (rawYear === undefined || month === undefined || day === undefined) return undefined\n const year = rawYear < 100 ? 2000 + rawYear : rawYear\n\n const typedHour = field(\"hour\")\n let hour = typedHour ?? fallbackTime?.hour ?? 0\n if (typedHour !== undefined && is12Hour(options.hourCycle) && inRange(typedHour, 0, 12)) {\n hour = to24Hour(typedHour, readPeriod(text, options.locale) ?? \"AM\")\n }\n const minute = field(\"minute\") ?? (typedHour === undefined ? fallbackTime?.minute : 0) ?? 0\n const second = field(\"second\") ?? (typedHour === undefined ? fallbackTime?.second : 0) ?? 0\n\n if (!inRange(month, 1, 12) || !inRange(day, 1, 31) || !inRange(year, 1, 9999)) return undefined\n if (!inRange(hour, 0, 23) || !inRange(minute, 0, 59) || !inRange(second, 0, 59)) return undefined\n const value = new CalendarDateTime(year, month, day, hour, minute, second)\n // `CalendarDateTime` constrains out-of-range days (Feb 30 → Feb 28) instead of rejecting them.\n return value.day === day ? value : undefined\n}\n","\"use client\"\n\nimport {\n DatePicker as Ark,\n type DatePickerDateRangePreset as DateRangePreset,\n type DateValue,\n type DatePickerDateView as DateView,\n type UseDatePickerContext,\n} from \"@ark-ui/react/date-picker\"\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { DateFormatter, getLocalTimeZone, toCalendarDateTime, today } from \"@internationalized/date\"\nimport { type FocusEvent, type ReactNode, type Ref, useRef, useState } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport type { DatePredicate } from \"../../lib/date-predicates\"\nimport {\n calendarValueToDate,\n type DateRangeValue,\n dateToCalendarValue,\n fromArkValues,\n toArkValues,\n} from \"../../lib/date-value\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport type { FormControlProps } from \"../../lib/form-control\"\nimport { mergeRefs } from \"../../lib/merge-refs\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { NestedLayer } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Button } from \"../button/button\"\nimport { type CalendarTranslations, resolveCalendarTranslations } from \"../calendar/calendar\"\nimport {\n CalendarBody,\n type CalendarBodyClassNames,\n calendarGridWidth,\n} from \"../calendar/calendar-body\"\nimport { type FieldProps, FieldShell, fieldA11yProps } from \"../field/field\"\nimport {\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n placeholderColor,\n shellGap,\n} from \"../input/input\"\nimport { CalendarIcon, CloseIcon } from \"../popover/icons\"\nimport { Popover, popoverClearTrigger, popoverPanel } from \"../popover/popover\"\nimport {\n type HourCycle,\n is12Hour,\n resolveHourCycle,\n to12Hour,\n to24Hour,\n} from \"../time-input/hour-cycle\"\nimport { TimeRow, type TimeRowTranslations, timeRowMinWidth } from \"../time-input/time-row\"\nimport { formatDateTimeText, parseDateTimeText } from \"./date-time-text\"\n\n/**\n * DatePicker — a trigger + popover calendar on Ark UI's `date-picker` machine, composing\n * `Calendar`'s shared grid module (`calendar-body.tsx`) and `TimeInput`'s shared time row\n * (`time-row.tsx`). `range` and `withTime` cover all four date combinations; `DateRangePicker`,\n * `DateTimePicker`, and `DateTimeRangePicker` are thin named presets pinning those two flags.\n *\n * - Value is a native `Date | null` (or `{ start, end }` under `range`) — the machine's\n * `DateValue` array contract never leaks out; `lib/date-value.ts` is the one conversion\n * boundary both directions go through, exactly as `Calendar` uses it.\n * - `withConfirm` stages the selection in local state; only Apply calls the outer `onChange`,\n * Cancel reverts. Without it, single dates commit + close on pick and ranges commit on the\n * second click (both Ark-native) — except under `withTime`, where a pick commits but keeps\n * the panel open so the time row can still be set (outside click / Escape closes it).\n * - `presets` renders a sidebar of quick-pick shortcuts — range shortcuts (Ark's own\n * `DateRangePreset` union, or a custom `{ range }`) under `range`; single-date shortcuts\n * (a custom `{ date }`) otherwise. `true` resolves to a mode-appropriate default set.\n * - `isDateUnavailable` / `min` / `max` take native `Date`s; pair with `lib/date-predicates.ts`'s\n * helpers (`disablePast()`, `disableWeekends()`, …), re-exported from this same barrel.\n * - `typeable` swaps the plain button trigger for a text input, so a date can be typed (and\n * parsed on blur / Enter) in addition to picked from the calendar — the leading icon becomes a\n * real open-calendar button alongside it. Opt-in (default `false`); single dates only (see\n * the prop's own doc comment). Under `withTime` the input carries the time too\n * (`date-time-text.ts`).\n *\n * <DatePicker label=\"Start date\" value={date} onChange={setDate} clearable />\n * <DateRangePicker withTime presets withConfirm value={range} onChange={setRange} />\n */\n\nconst datePickerPresets = cn(\n \"flex shrink-0 flex-col gap-0.5 border-e p-1\",\n \"border-brand-900/20 dark:border-white/15\",\n)\n\nconst presetTrigger = cn(\n \"w-full cursor-pointer rounded-xs px-2 py-1.5 text-start text-sm whitespace-nowrap transition-colors\",\n \"hover:bg-gray-light-100 dark:hover:bg-gray-dark-800\",\n focusStyles({ offset: false }),\n)\n\nconst timePanelLabel = \"text-xs font-medium text-gray-light-500 dark:text-gray-dark-400\"\n\n/** `typeable`'s leading calendar icon, promoted from a decorative span (the button-trigger case)\n * to a real open-calendar button — same base look as `inputSlot`, plus the family's interactive-\n * icon treatment (compare `popoverClearTrigger`). `outline-none`: the shell's own `:has()` rule\n * (`shellChrome` in `input.tsx`) already rings the *whole* control on this button's focus-visible\n * state, so its own native outline would just double up. */\nconst datePickerIconTrigger = cn(\n inputSlot,\n \"cursor-pointer rounded-xs outline-none transition-colors hover:text-gray-light-700 dark:hover:text-gray-dark-200 disabled:cursor-not-allowed\",\n)\n\n/** The main column (calendar + time row footer) has no explicit width of its own, and neither\n * does the popover above it — deliberately, so the popover sizes to its content. But once the\n * time row's Hour/Minute/(Second) fields are `flex-1` (grow to fill the row), that becomes\n * circular: the row wants to size off \"however much space is available,\" and with nothing\n * concrete above it to measure against, browsers resolve a flex container's own intrinsic width\n * generously when it holds `flex-grow` items — the row (and everything above it) ends up far\n * wider than the calendar actually needs, even for a single time row. Giving the column an\n * explicit width tied to the calendar's own geometry (`calendarGridWidth`, shared with\n * `calendar-body.tsx`'s own month/year grids) breaks that circularity: the row now grows to\n * fill a *real* width instead of an ambiguous one.\n *\n * That width is only ever tied to the *calendar* grid, though — under `withTime`, the column\n * must be at least as wide as the time row itself needs (`timeRowMinWidth`), or the same\n * `flex-1` + `min-w-0` fields that motivated a fixed width in the first place shrink below their\n * content size instead of growing: with the AM/PM toggle present at a single month, the\n * calendar-only width is narrower than Hour+Minute+Period need, and the `<input>`s get starved. */\n\nconst pad = (n: number) => String(n).padStart(2, \"0\")\n\n/** Hidden-input serialization. `DateValue#toString()` isn't safe to call directly here: a\n * `ZonedDateTime` (what our own `dateToCalendarValue` produces for a `defaultValue`/`value`\n * passed in) stringifies with a full offset + IANA zone suffix, while a plain `CalendarDate`\n * (what a day-grid click produces) stringifies as a clean date — two different formats for the\n * same picked day depending on provenance. Read the wall-calendar fields directly instead.\n * Whether to append the time portion is driven by the picker's own `withTime` flag, not by\n * whether the value happens to carry an `hour` field — a `ZonedDateTime` always has one (even\n * at local midnight), so that structural check can't tell \"date-only\" from \"with time\" apart. */\nexport const serializeDateValue = (value: DateValue, withTime: boolean): string => {\n const date = `${value.year}-${pad(value.month)}-${pad(value.day)}`\n if (!withTime) return date\n const time = \"hour\" in value ? value : { hour: 0, minute: 0, second: 0 }\n return `${date}T${pad(time.hour)}:${pad(time.minute)}:${pad(time.second)}`\n}\n\nexport type DatePickerClassNames = {\n field?: string\n control?: string\n content?: string\n presets?: string\n calendar?: CalendarBodyClassNames\n timePanel?: { hour?: string; minute?: string; second?: string; period?: string }\n footer?: string\n}\n\n/** `value`/`range`-shaped entries are for `range` mode; `date`-shaped entries are for single-date\n * mode. Nothing prevents mixing them for the picker's current mode — the shape you pass is\n * trusted, not validated at runtime (a mismatched entry just doesn't produce useful behavior;\n * `api.setValue`/`getRangePresetValue` are mode-agnostic in the underlying machine). */\nexport type DatePreset =\n | { label: string; value: DateRangePreset }\n | { label: string; range: { start: Date; end: Date } | null }\n | { label: string; date: Date | null }\n\n/** Identifies each entry `getDefaultPresets` builds for `presets={true}`, so a `translations`\n * override can target one label without redefining the whole set. */\nexport type DatePickerPresetId =\n | \"today\"\n | \"yesterday\"\n | \"tomorrow\"\n | \"nextWeek\"\n | \"thisWeek\"\n | \"lastWeek\"\n | \"thisMonth\"\n | \"lastMonth\"\n | \"thisYear\"\n | \"allTime\"\n\n/** One unified `translations` prop rather than one per string source — Ark's own accessible\n * names, the `presets={true}` default labels, and the embedded time row's strings all belong to\n * the same `DatePicker` instance a consumer is localizing. English defaults throughout;\n * unset keys keep their built-in text. */\nexport type DatePickerTranslations = Partial<CalendarTranslations> &\n TimeRowTranslations & {\n /** The `withConfirm` footer's revert button. Default `\"Cancel\"`. */\n cancel?: string\n /** The `withConfirm` footer's commit button. Default `\"Apply\"`. */\n apply?: string\n /** The embedded time row's label under `range` + `withTime` (first row). Default `\"Start time\"`. */\n startTime?: string\n /** The embedded time row's label under `range` + `withTime` (second row). Default `\"End time\"`. */\n endTime?: string\n /** Individual `presets={true}` default-set labels, keyed by id — override just the ones you\n * need without redefining the whole array. Pass your own `DatePreset[]` for full control. */\n presets?: Partial<Record<DatePickerPresetId, string>>\n }\n\nexport type DatePickerProps<Range extends boolean = false> = FormControlProps<\n Range extends true ? DateRangeValue : Date | null,\n // Widened from `HTMLButtonElement` alone: under `typeable` the focusable element is Ark's\n // `Input` (a real `<input>`), not the button trigger — `ref`/`onBlur` must be able to land on\n // either depending on that prop, since both are the same generic `DatePickerProps`.\n HTMLButtonElement | HTMLInputElement\n> &\n Pick<FieldProps, \"label\" | \"description\" | \"error\" | \"required\"> &\n WithTestId & {\n /** Select a `{ start, end }` range instead of a single date. */\n range?: Range\n /** Adds an embedded HOUR/MINUTE (+ SECOND) time row; the value carries H/M too. */\n withTime?: boolean\n /** Months shown side by side. Default `1`, regardless of `range` — pass `2` to show a full\n * range without paging (matches `Calendar`'s own plain default). */\n numOfMonths?: number\n /** Always render 6 week rows (padding with adjacent-month days) instead of however many the\n * visible month(s) actually span (4–6) — keeps the popover's height constant while\n * navigating between months. */\n fixedWeeks?: boolean\n /** Preset sidebar — range shortcuts under `range`, single-date shortcuts otherwise. `true`\n * renders a mode-appropriate default set; an array is fully custom. See `DatePreset`. */\n presets?: DatePreset[] | boolean\n /** Stage the selection; commit only on Apply. Cancel reverts to the last committed value. */\n withConfirm?: boolean\n /** Renders a clear trigger once a value is set; emits `null` (or an all-null range). */\n clearable?: boolean\n /** Restriction predicate over a native `Date`. Compose with `lib/date-predicates.ts`'s helpers.\n * Called with this component's own resolved `timeZone` as its second argument, so a predicate\n * reads the candidate day in the same zone the grid renders it in. */\n isDateUnavailable?: DatePredicate\n /** Renders a text input (typing, blur-to-parse, `Enter`-to-commit) alongside the\n * calendar-icon trigger, instead of the plain button-only trigger. Opt-in — default `false`\n * keeps the click-to-open button.\n *\n * Without `withTime` this is Ark's own `Input` anatomy part (a numeric date). Under\n * `withTime` it shows and parses a numeric date + time in the locale's own field order\n * (`10/20/2026, 02:30 PM`, `20/10/2026 14:30`) — typing just a date keeps the current time.\n * `range` (cross-field validation across two inputs) is out of scope and falls back to the\n * button trigger. */\n typeable?: boolean\n min?: Date\n max?: Date\n /** Bounds the view levels reachable via navigation (e.g. `minView=\"month\"`). */\n minView?: DateView\n maxView?: DateView\n /** Overrides the active locale context. Drives month/day names, first-day-of-week, and the\n * embedded time row's 12h/24h default. */\n locale?: string\n /** Overrides the local time zone for every `Date ↔ DateValue` conversion. Default\n * `getLocalTimeZone()` — **not** Ark's own machine default (`\"UTC\"`). */\n timeZone?: string\n /** Force 12-hour or 24-hour display for the embedded time row, overriding the locale default. */\n format?: 12 | 24\n /** Force a specific hour cycle, overriding the locale default and `format`. */\n hourCycle?: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in the embedded time row's empty Hour/Minute/Second fields — see\n * TimeRow's `placeholder`. Default `\"--\"`. */\n timePlaceholder?: string\n /** Overrides built-in English strings — Ark's own accessible names, the `presets={true}`\n * default labels, Cancel/Apply, Start/End time, and the embedded time row's Hour/Minute/\n * Second/Period labels. Unlike `locale`, nothing here auto-derives. Partial — unset keys\n * keep their English default. */\n translations?: DatePickerTranslations\n /** Placeholder shown while no date is selected. */\n placeholder?: string\n /** Inline-start adornment. Defaults to a calendar icon. */\n startSlot?: ReactNode\n size?: Size\n variant?: InputVariant\n /** Render the panel in a Portal so it escapes clipping ancestors.\n * Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n className?: string\n classNames?: DatePickerClassNames\n }\n\n/** Ark's built-in `DateRangePreset` union has no \"today\" / \"yesterday\" / \"all time\" member\n * (confirmed in `@zag-js/date-utils`'s types) — those three are hand-built here from\n * `today(timeZone)`; the rest map straight to Ark's own string presets. The single-date set\n * (non-`range`) is a different shape entirely, not a trimmed-down copy of the range one — \"This\n * week\"/\"This month\"/etc. are inherently range-shaped and don't collapse to one date. */\nconst getDefaultPresets = (\n range: boolean,\n timeZone: string,\n labels?: Partial<Record<DatePickerPresetId, string>>,\n): DatePreset[] => {\n const now = today(timeZone)\n const toDate = (value: typeof now) => calendarValueToDate(value, timeZone)\n const label = (id: DatePickerPresetId, fallback: string) => labels?.[id] ?? fallback\n if (!range) {\n return [\n { label: label(\"today\", \"Today\"), date: toDate(now) },\n { label: label(\"yesterday\", \"Yesterday\"), date: toDate(now.subtract({ days: 1 })) },\n { label: label(\"tomorrow\", \"Tomorrow\"), date: toDate(now.add({ days: 1 })) },\n { label: label(\"nextWeek\", \"Next week\"), date: toDate(now.add({ days: 7 })) },\n ]\n }\n const yesterday = now.subtract({ days: 1 })\n return [\n { label: label(\"today\", \"Today\"), range: { start: toDate(now), end: toDate(now) } },\n {\n label: label(\"yesterday\", \"Yesterday\"),\n range: { start: toDate(yesterday), end: toDate(yesterday) },\n },\n { label: label(\"thisWeek\", \"This week\"), value: \"thisWeek\" },\n { label: label(\"lastWeek\", \"Last week\"), value: \"lastWeek\" },\n { label: label(\"thisMonth\", \"This month\"), value: \"thisMonth\" },\n { label: label(\"lastMonth\", \"Last month\"), value: \"lastMonth\" },\n { label: label(\"thisYear\", \"This year\"), value: \"thisYear\" },\n { label: label(\"allTime\", \"All time\"), range: null },\n ]\n}\n\nconst PresetsRail = ({\n presets,\n range,\n timeZone,\n withConfirm,\n translations,\n className,\n}: {\n presets: DatePreset[] | boolean\n /** Which default set `presets === true` resolves to — irrelevant once `presets` is a concrete array. */\n range?: boolean\n timeZone: string\n withConfirm?: boolean\n /** Overrides individual `presets={true}` default-set labels, keyed by id. No effect on a\n * custom `DatePreset[]`. */\n translations?: Partial<Record<DatePickerPresetId, string>>\n className?: string\n}) => {\n const resolved =\n presets === true\n ? getDefaultPresets(Boolean(range), timeZone, translations)\n : presets === false\n ? []\n : presets\n if (resolved.length === 0) return null\n return (\n <Ark.Context>\n {(api) => (\n <div className={cn(datePickerPresets, className)}>\n {resolved.map((preset) => (\n <button\n key={preset.label}\n type=\"button\"\n // Not `Ark.PresetTrigger`: its own onClick always sends `PRESET.CLICK`, which the\n // machine transitions unconditionally to \"focused\" (closed) regardless of\n // `closeOnSelect` — there's no way to keep it open under `withConfirm`. Resolve the\n // preset's value ourselves and set it via `api.setValue`, which only sets the value\n // (no state-machine transition), then close explicitly only when not staging.\n onClick={() => {\n const values =\n \"value\" in preset\n ? api.getRangePresetValue(preset.value)\n : \"range\" in preset\n ? (toArkValues(preset.range, timeZone) ?? [])\n : (toArkValues(preset.date, timeZone) ?? [])\n api.setValue(values)\n if (!withConfirm) api.setOpen(false)\n }}\n aria-label={preset.label}\n className={presetTrigger}\n >\n {preset.label}\n </button>\n ))}\n </div>\n )}\n </Ark.Context>\n )\n}\n\ntype DisplayTime = {\n hour: number | null\n minute: number | null\n second: number | null\n period: \"AM\" | \"PM\" | null\n}\n\nconst emptyDisplayTime: DisplayTime = { hour: null, minute: null, second: null, period: null }\n\n/** Derive display-space fields (1–12 or 0–23, + period) from the machine's own `DateValue` — a\n * plain `CalendarDate` (no time picked yet) has no `hour`, so it reads as all-null. */\nconst toDisplayTime = (value: DateValue | undefined, twelveHour: boolean): DisplayTime => {\n if (!value || !(\"hour\" in value)) return emptyDisplayTime\n const { hour, period } = twelveHour ? to12Hour(value.hour) : { hour: value.hour, period: null }\n return { hour, minute: value.minute, second: value.second ?? null, period }\n}\n\n/** The inverse of `toDisplayTime` — merges a display-space edit into a `setTime`-ready payload.\n * Missing fields default to midnight, same rule `TimeInput` uses for its own first edit. */\nconst fromDisplayTime = (\n display: DisplayTime,\n twelveHour: boolean,\n): { hour: number; minute: number; second?: number } => {\n const hour = twelveHour\n ? to24Hour(display.hour ?? 12, display.period ?? \"AM\")\n : (display.hour ?? 0)\n const minute = display.minute ?? 0\n return display.second != null ? { hour, minute, second: display.second } : { hour, minute }\n}\n\n/** `api.setTime`, except that a time edit with no day picked yet lands on *today* instead of being\n * dropped — Ark's own `setTime` silently no-ops without a date at that index, so typing a time\n * first used to do nothing at all. Only the first row can hit that (the second is disabled until\n * a range has both ends). `setValue` keeps today within `min`/`max`, like Ark's `selectToday`;\n * a today that `isDateUnavailable` rules out isn't auto-picked. */\nconst setTimeOrToday = (\n api: UseDatePickerContext,\n time: { hour: number; minute: number; second?: number },\n index: number,\n timeZone: string,\n) => {\n if (api.value[index] || index !== 0) return api.setTime(time, index)\n const day = today(timeZone)\n if (api.isUnavailable(day)) return\n api.setValue([toCalendarDateTime(day).set(time)])\n}\n\nexport type TimePanelRowProps = {\n value: DateValue | undefined\n onSetTime: (time: { hour: number; minute: number; second?: number }) => void\n label?: string\n disabled?: boolean\n hourCycle: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in the row's empty Hour/Minute/Second fields — see TimeRow's\n * `placeholder`. Default `\"--\"`. */\n placeholder?: string\n /** Resolves the locale-correct AM/PM labels + Hour/Minute/Second unit suffixes via `Intl`.\n * Falls back to `useLocaleContext()` when omitted. */\n locale?: string\n /** Overrides the sr-only Hour/Minute/Second/Period accessible names. English by default. */\n translations?: TimeRowTranslations\n size?: Size\n variant?: InputVariant\n classNames?: DatePickerClassNames[\"timePanel\"] & { root?: string }\n}\n\n/** One HOUR/MINUTE(+SECOND)+AM/PM row, bridging `TimeRow`'s display-space props to a specific\n * `api.value` index via `api.setTime(time, index)` — the same shared `TimeRow` `TimeInput`\n * wraps with its own local state, wrapped here with the machine's state instead. */\nconst TimePanelRow = ({\n value,\n onSetTime,\n label,\n disabled,\n hourCycle,\n minuteStep,\n withSeconds,\n placeholder,\n locale,\n translations,\n size,\n variant,\n classNames,\n}: TimePanelRowProps) => {\n const twelveHour = is12Hour(hourCycle)\n const display = toDisplayTime(value, twelveHour)\n const patch = (partial: Partial<DisplayTime>) =>\n onSetTime(fromDisplayTime({ ...display, ...partial }, twelveHour))\n\n return (\n <div className={cn(\"flex flex-col gap-1\", classNames?.root)}>\n {label && <span className={timePanelLabel}>{label}</span>}\n <TimeRow\n hour={display.hour}\n minute={display.minute}\n second={display.second}\n onHourChange={(hour) => patch({ hour })}\n onMinuteChange={(minute) => patch({ minute })}\n onSecondChange={withSeconds ? (second) => patch({ second }) : undefined}\n period={display.period}\n onPeriodChange={(period) => patch({ period })}\n hourCycle={hourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={placeholder}\n locale={locale}\n translations={translations}\n size={size}\n variant={variant}\n disabled={disabled}\n classNames={classNames}\n />\n </div>\n )\n}\n\n/**\n * `typeable` + `withTime`'s own text input, standing in for Ark's `Input` part — which can't carry\n * a time (see `date-time-text.ts`). It still declares `data-part=\"input\"` inside the Control, so\n * the machine treats it as its input: excluded from interact-outside dismissal, focused on close,\n * and kept in sync with every value change (day pick, time row, clear) through the Root's\n * `format`, which is this same numeric text. Left uncontrolled for that reason — the only thing\n * added here is committing typed text: parsed on blur / `Enter`, then set through `api.setValue`;\n * text that doesn't parse (or lands on an unavailable day) reverts to the current value.\n */\nconst DateTimeTextInput = ({\n api,\n options,\n timeZone,\n ref,\n onBlur,\n placeholder,\n disabled,\n readOnly,\n invalid,\n testId,\n}: {\n api: UseDatePickerContext\n options: Parameters<typeof parseDateTimeText>[1]\n timeZone: string\n ref?: Ref<HTMLInputElement>\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n placeholder?: string\n disabled?: boolean\n readOnly?: boolean\n invalid?: boolean\n testId?: string\n}) => {\n const field = useFieldContext()\n const current = api.value[0]\n const show = (input: HTMLInputElement, value: DateValue | undefined) => {\n input.value = value ? formatDateTimeText(value, options, timeZone) : \"\"\n }\n const commit = (input: HTMLInputElement) => {\n const text = input.value.trim()\n if (text === \"\") {\n if (current) api.clearValue({ focus: false })\n return\n }\n const fallback = current && \"hour\" in current ? current : undefined\n const next = parseDateTimeText(text, options, fallback)\n if (!next || api.isUnavailable(next)) return show(input, current)\n api.setValue([next])\n api.setFocusedValue(next)\n // `setValue` is a no-op (and syncs nothing) when the parsed value equals the current one, so\n // normalize the typed text to the canonical format either way.\n show(input, next)\n }\n return (\n <input\n ref={ref}\n type=\"text\"\n data-scope=\"date-picker\"\n data-part=\"input\"\n autoComplete=\"off\"\n defaultValue={current ? formatDateTimeText(current, options, timeZone) : \"\"}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid || undefined}\n // Ark's own input-click handler, not `api.setOpen`: it opens with `src: \"input.click\"`,\n // which is what stops the machine from moving focus into the grid — typing has to keep\n // landing here. It also honours `openOnClick` and disabled/read-only on its own.\n onClick={api.getInputProps().onClick}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\" || event.nativeEvent.isComposing) return\n event.preventDefault()\n commit(event.currentTarget)\n }}\n onBlur={(event) => {\n if (!readOnly) commit(event.currentTarget)\n onBlur?.(event)\n }}\n {...props({ \"data-testid\": testId })}\n {...fieldA11yProps(field)}\n className={inputControlClasses}\n />\n )\n}\n\nconst DatePickerImpl = <Range extends boolean = false>({\n withinPortal = true,\n container,\n range,\n withTime,\n numOfMonths = 1,\n fixedWeeks,\n presets,\n withConfirm,\n clearable,\n value,\n defaultValue,\n onChange,\n onBlur,\n isDateUnavailable,\n typeable,\n min,\n max,\n minView,\n maxView,\n locale,\n timeZone,\n format,\n hourCycle,\n minuteStep,\n withSeconds,\n timePlaceholder,\n translations,\n placeholder = \"Pick a date\",\n startSlot,\n size = \"md\",\n variant = \"default\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n id,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n}: DatePickerProps<Range>) => {\n const portalContainer = useOverlayContainer(container)\n const { locale: contextLocale } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const resolvedTimeZone = timeZone ?? getLocalTimeZone()\n const resolvedHourCycle = resolveHourCycle({ locale: resolvedLocale, format, hourCycle })\n const isInvalid = invalid || error != null\n const isRange = Boolean(range)\n // See `typeable`'s own doc comment: single dates only — `range` silently falls back to the\n // button trigger rather than erroring, so `typeable` composes safely with every other prop.\n // Under `withTime` the input is `DateTimeTextInput` instead of Ark's own date-only `Input`.\n const showTypeableInput = Boolean(typeable) && !isRange\n const dateTimeText = { locale: resolvedLocale, hourCycle: resolvedHourCycle, withSeconds }\n const controlRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLButtonElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n\n type Value = Range extends true ? DateRangeValue : Date | null\n const emptyValue = (isRange ? { start: null, end: null } : null) as Value\n\n // Reserved for the `withConfirm` staged layer only — the base value needs no local state,\n // Ark's machine natively supports controlled/uncontrolled `value`/`defaultValue`/`onValueChange`\n // the same way `Calendar` relies on it.\n const [committed, setCommitted] = useUncontrolled<Value>({\n value,\n defaultValue,\n finalValue: emptyValue,\n onChange,\n })\n const [staged, setStaged] = useState<Value>(committed)\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n <Ark.Root\n id={id}\n selectionMode={isRange ? \"range\" : \"single\"}\n // Ark's own default (`true`) auto-closes on a completed pick — under `withConfirm`\n // the picker must stay open for review until Apply/Cancel, and under `withTime` the day\n // is only half the value: closing on pick would hide the time row it still needs.\n // Otherwise leave Ark's default (single closes on pick, range on the second click).\n closeOnSelect={withConfirm || withTime ? false : undefined}\n // Ark's own default (`false`) requires the calendar-icon trigger to open the popover —\n // under `typeable` a click into the text field itself should open it too, matching the\n // combined type-or-pick affordance `typeable` is meant to offer. No-op when the Input\n // anatomy part isn't rendered (`!showTypeableInput`).\n openOnClick={showTypeableInput}\n locale={resolvedLocale}\n timeZone={resolvedTimeZone}\n translations={resolveCalendarTranslations(translations)}\n numOfMonths={numOfMonths}\n fixedWeeks={fixedWeeks}\n minView={minView}\n maxView={maxView}\n value={toArkValues(withConfirm ? staged : value, resolvedTimeZone)}\n defaultValue={withConfirm ? undefined : toArkValues(defaultValue, resolvedTimeZone)}\n onValueChange={(details) => {\n const next = fromArkValues(details.value, isRange, resolvedTimeZone) as Value\n if (withConfirm) setStaged(next)\n else onChange?.(next)\n }}\n onOpenChange={(details) => {\n if (withConfirm && details.open) setStaged(committed)\n }}\n isDateUnavailable={\n isDateUnavailable\n ? (dateValue) =>\n isDateUnavailable(\n calendarValueToDate(dateValue, resolvedTimeZone),\n resolvedTimeZone,\n )\n : undefined\n }\n min={min ? dateToCalendarValue(min, resolvedTimeZone) : undefined}\n max={max ? dateToCalendarValue(max, resolvedTimeZone) : undefined}\n // The typed date+time input shows (and Ark syncs into it) the same numeric text it parses.\n format={\n withTime && showTypeableInput\n ? (date) => formatDateTimeText(date, dateTimeText, resolvedTimeZone)\n : withTime\n ? (date, { locale: fmtLocale }) =>\n new DateFormatter(fmtLocale, { dateStyle: \"medium\", timeStyle: \"short\" }).format(\n calendarValueToDate(date, resolvedTimeZone),\n )\n : undefined\n }\n // Anchor to the Control (not `sameWidth`, unlike Select) — the popover hosts a full\n // calendar grid + presets rail, which needs its own intrinsic width, not the trigger's.\n positioning={{ getAnchorRect: () => controlRef.current?.getBoundingClientRect() ?? null }}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n invalid={isInvalid}\n className={cn(\"w-full\", className)}\n >\n <Ark.Context>\n {(api) => (\n <>\n <Ark.Control\n ref={controlRef}\n {...props({\n \"data-invalid\": isInvalid,\n \"data-with-start-slot\": true,\n \"data-with-end-slot\": true,\n })}\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n className={cn(\n inputShell({ size, variant }),\n // A real `<input>` sits in the shell under `typeable` — leave the shell's own\n // cursor at the browser default (text-cursor over the input, pointer over the\n // icon trigger / clear button) instead of forcing pointer everywhere, matching\n // `Combobox`'s Control (see `combobox.tsx`) rather than `Select`'s button-only one.\n !showTypeableInput && \"cursor-pointer\",\n classNames?.control,\n )}\n >\n {showTypeableInput ? (\n <div className={cn(\"flex min-w-0 flex-1 items-center\", shellGap[size])}>\n {/* Ark sets its own accessible `aria-label` (\"Open calendar\" / \"Close\n calendar\") on the trigger regardless of children, so an icon-only button\n here is still accessible without a manual override. */}\n <Ark.Trigger className={datePickerIconTrigger}>\n {startSlot ?? <CalendarIcon />}\n </Ark.Trigger>\n {withTime ? (\n <DateTimeTextInput\n api={api}\n options={dateTimeText}\n timeZone={resolvedTimeZone}\n ref={mergeRefs<HTMLButtonElement | HTMLInputElement>(inputRef, ref)}\n onBlur={onBlur}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n invalid={isInvalid}\n testId={testId}\n />\n ) : (\n <Ark.Input\n ref={mergeRefs<HTMLButtonElement | HTMLInputElement>(inputRef, ref)}\n onBlur={onBlur}\n placeholder={placeholder}\n {...props({ \"data-testid\": testId })}\n className={inputControlClasses}\n />\n )}\n </div>\n ) : (\n <Ark.Trigger\n ref={mergeRefs<HTMLButtonElement | HTMLInputElement>(triggerRef, ref)}\n onBlur={onBlur}\n aria-invalid={isInvalid || undefined}\n {...props({ \"data-testid\": testId })}\n className={cn(\n \"flex min-w-0 flex-1 cursor-pointer items-center bg-transparent text-start outline-none disabled:cursor-not-allowed\",\n shellGap[size],\n )}\n >\n <span className={inputSlot} aria-hidden>\n {startSlot ?? <CalendarIcon />}\n </span>\n <span className=\"min-w-0 flex-1 truncate text-start\">\n {isRange ? (\n api.value.length === 0 ? (\n <span className={placeholderColor}>{placeholder}</span>\n ) : (\n // Not `Ark.RangeText`: despite the name, it renders the calendar's\n // *visible* month/year viewport (the same text the header's ViewTrigger\n // shows), not the selected range — `datePicker.visibleRangeText` in Ark's\n // own source. Build the real selected-range text from `valueAsString`\n // instead (the same per-value formatted strings `Ark.ValueText` uses).\n api.valueAsString.join(\" – \")\n )\n ) : (\n <Ark.ValueText placeholder={placeholder} />\n )}\n </span>\n </Ark.Trigger>\n )}\n {clearable && (\n // Ark's own ClearTrigger already self-hides (`hidden`) while empty.\n <Ark.ClearTrigger className={popoverClearTrigger}>\n <CloseIcon />\n </Ark.ClearTrigger>\n )}\n </Ark.Control>\n\n {/* Holds an enclosing Modal/Drawer/Popover open while the calendar is; see `lib/overlay-layer.tsx`. */}\n <NestedLayer open={api.open} />\n <Portal disabled={!withinPortal} container={portalContainer}>\n <Ark.Positioner>\n <Ark.Content\n // `max-content` sizing (no `sameWidth`, see the positioning comment above)\n // means \"as if nothing below ever wraps\" — a `flex-wrap` time-row footer\n // wider than the calendar (two side-by-side \"Start time\"/\"End time\" rows\n // under `range` + `withTime`) would never actually wrap without a real width\n // constraint to shrink against; it'd just overflow off-screen on a narrow\n // viewport instead. `92vw` is generous enough to be a no-op on any normal\n // desktop width, only kicking in once there's genuinely no room.\n className={cn(\n popoverPanel,\n \"max-w-[92vw] flex-row flex-wrap items-stretch\",\n classNames?.content,\n )}\n >\n {presets && (\n <PresetsRail\n presets={presets}\n range={isRange}\n timeZone={resolvedTimeZone}\n withConfirm={withConfirm}\n translations={translations?.presets}\n className={classNames?.presets}\n />\n )}\n <div\n className=\"flex min-w-0 flex-1 flex-col\"\n style={{\n width:\n Math.max(\n calendarGridWidth(size, numOfMonths),\n withTime ? timeRowMinWidth(size, resolvedHourCycle, withSeconds) : 0,\n ) + 16, // Take the x padding into account\n }}\n >\n <Popover.Body\n className={cn(\"p-2\", withTime || withConfirm ? \"border-b\" : undefined)}\n >\n <CalendarBody\n numOfMonths={numOfMonths}\n size={size}\n timeZone={resolvedTimeZone}\n classNames={classNames?.calendar}\n />\n </Popover.Body>\n {withTime && (\n <Popover.Footer\n className={cn(\n \"flex gap-x-2 gap-y-2 pb-2\",\n // Stacked by default — side by side only widens to match the extra\n // room multiple months already provide; with a single month, sitting\n // two time rows side by side would force the popover wider than the\n // calendar above them for no reason.\n numOfMonths > 1 ? \"flex-row flex-wrap\" : \"flex-col\",\n classNames?.footer,\n )}\n >\n <TimePanelRow\n value={api.value[0]}\n onSetTime={(time) => setTimeOrToday(api, time, 0, resolvedTimeZone)}\n label={isRange ? (translations?.startTime ?? \"Start time\") : undefined}\n hourCycle={resolvedHourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={timePlaceholder}\n locale={resolvedLocale}\n translations={translations}\n size={size}\n variant={variant}\n classNames={{ root: \"flex-1\", ...classNames?.timePanel }}\n />\n {isRange && (\n <TimePanelRow\n value={api.value[1]}\n onSetTime={(time) => api.setTime(time, 1)}\n label={translations?.endTime ?? \"End time\"}\n disabled={api.value.length < 2}\n hourCycle={resolvedHourCycle}\n minuteStep={minuteStep}\n withSeconds={withSeconds}\n placeholder={timePlaceholder}\n locale={resolvedLocale}\n translations={translations}\n size={size}\n variant={variant}\n classNames={{ root: \"flex-1\", ...classNames?.timePanel }}\n />\n )}\n </Popover.Footer>\n )}\n {withConfirm && (\n <Popover.Footer className=\"flex justify-end gap-2 pb-2\">\n <Button\n variant=\"subtle\"\n color=\"neutral\"\n size={size}\n onClick={() => {\n setStaged(committed)\n api.setOpen(false)\n }}\n >\n {translations?.cancel ?? \"Cancel\"}\n </Button>\n <Button\n size={size}\n onClick={() => {\n setCommitted(staged)\n api.setOpen(false)\n }}\n >\n {translations?.apply ?? \"Apply\"}\n </Button>\n </Popover.Footer>\n )}\n </div>\n </Ark.Content>\n </Ark.Positioner>\n </Portal>\n\n {name &&\n (isRange ? (\n <>\n <input\n type=\"hidden\"\n name={`${name}Start`}\n value={\n api.value[0] ? serializeDateValue(api.value[0], Boolean(withTime)) : \"\"\n }\n />\n <input\n type=\"hidden\"\n name={`${name}End`}\n value={\n api.value[1] ? serializeDateValue(api.value[1], Boolean(withTime)) : \"\"\n }\n />\n </>\n ) : (\n <input\n type=\"hidden\"\n name={name}\n value={api.value[0] ? serializeDateValue(api.value[0], Boolean(withTime)) : \"\"}\n />\n ))}\n </>\n )}\n </Ark.Context>\n </Ark.Root>\n </FieldShell>\n )\n}\n\nexport const DatePicker = Object.assign(DatePickerImpl, {\n Root: Ark.Root,\n Context: Ark.Context,\n Control: Ark.Control,\n Input: Ark.Input,\n Trigger: Ark.Trigger,\n ClearTrigger: Ark.ClearTrigger,\n Content: Ark.Content,\n Presets: PresetsRail,\n Calendar: CalendarBody,\n TimePanel: TimeRow,\n TimePanelRow: TimePanelRow,\n Footer: Popover.Footer,\n}) as (<Range extends boolean = false>(props: DatePickerProps<Range>) => ReactNode) & {\n Root: typeof Ark.Root\n Context: typeof Ark.Context\n Control: typeof Ark.Control\n Input: typeof Ark.Input\n Trigger: typeof Ark.Trigger\n ClearTrigger: typeof Ark.ClearTrigger\n Content: typeof Ark.Content\n Presets: typeof PresetsRail\n Calendar: typeof CalendarBody\n TimePanel: typeof TimeRow\n TimePanelRow: typeof TimePanelRow\n Footer: typeof Popover.Footer\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/time-input/hour-cycle.ts","../src/components/time-input/time-row.tsx"],"names":[],"mappings":";;;;;;;AAQO,IAAM,mBAAmB,CAAC;AAAA,EAC/B,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAIiB;AACf,EAAA,IAAI,WAAW,OAAO,SAAA;AACtB,EAAA,IAAI,MAAA,KAAW,MAAA,EAAW,OAAO,MAAA,KAAW,KAAK,KAAA,GAAQ,KAAA;AACzD,EAAA,OAAO,IAAA,CAAK,eAAe,MAAA,EAAQ,EAAE,MAAM,SAAA,EAAW,CAAA,CAAE,eAAA,EAAgB,CAAE,SAAA;AAC5E;AAGO,IAAM,QAAA,GAAW,CAAC,KAAA,KAA8B,KAAA,KAAU,SAAS,KAAA,KAAU;AAG7E,IAAM,QAAA,GAAW,CAAC,MAAA,MAA2D;AAAA,EAClF,IAAA,EAAM,SAAS,EAAA,IAAM,EAAA;AAAA,EACrB,MAAA,EAAQ,MAAA,GAAS,EAAA,GAAK,IAAA,GAAO;AAC/B,CAAA;AAGO,IAAM,QAAA,GAAW,CAAC,MAAA,EAAgB,MAAA,KACv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,CAAA;AAAA,cAGxD,IAAA;AAAA,cACA,QAAA;AAAA,cACA,QAAA;AAAA,cACA,OAAA;AAAA,cACA,WAAW,UAAA,EAAY,MAAA;AAAA,cAOvB,UAAA,EAAY,EAAE,KAAA,EAAO,iBAAA,EAAmB,OAAO,SAAA;AAAU;AAAA;AAC3D;AAAA;AAAA;AAEJ;AAEJ","file":"chunk-PH354ECN.js","sourcesContent":["export type HourCycle = \"h11\" | \"h12\" | \"h23\" | \"h24\"\n\n/**\n * Resolve 12h vs 24h display (Req #6): an explicit `hourCycle` wins, then\n * `format`, else the locale's own convention via `Intl.DateTimeFormat`. Shared\n * by `TimeInput` and `DatePicker`'s embedded time panel so both pick the same\n * cycle for the same locale.\n */\nexport const resolveHourCycle = ({\n locale,\n format,\n hourCycle,\n}: {\n locale: string\n format?: 12 | 24\n hourCycle?: HourCycle\n}): HourCycle => {\n if (hourCycle) return hourCycle\n if (format !== undefined) return format === 12 ? \"h12\" : \"h23\"\n return Intl.DateTimeFormat(locale, { hour: \"numeric\" }).resolvedOptions().hourCycle as HourCycle\n}\n\n/** Whether a resolved cycle displays 1–12 + AM/PM (`h11`/`h12`) rather than 0–23. */\nexport const is12Hour = (cycle: HourCycle): boolean => cycle === \"h11\" || cycle === \"h12\"\n\n/** Convert a stored 24h hour (`0`–`23`) to a displayed 12h hour (`1`–`12`) + period. */\nexport const to12Hour = (hour24: number): { hour: number; period: \"AM\" | \"PM\" } => ({\n hour: hour24 % 12 || 12,\n period: hour24 < 12 ? \"AM\" : \"PM\",\n})\n\n/** Convert a displayed 12h hour (`1`–`12`) + period back to a stored 24h hour. */\nexport const to24Hour = (hour12: number, period: \"AM\" | \"PM\"): number =>\n period === \"PM\" ? (hour12 % 12) + 12 : hour12 % 12\n\n/** Locale-correct AM/PM display strings (e.g. \"AM\"/\"PM\" en-US, \"午前\"/\"午後\" ja-JP), read via\n * `Intl.DateTimeFormat`'s own `dayPeriod` part rather than a hardcoded English literal. Keyed by\n * the same `\"AM\" | \"PM\"` domain value `to12Hour`/`to24Hour` use throughout, so this only ever\n * changes what's *displayed*, never what's stored/serialized. */\nexport const dayPeriodLabels = (locale: string): Record<\"AM\" | \"PM\", string> => {\n const dayPeriod = (hour: number) =>\n new Intl.DateTimeFormat(locale, { hour: \"numeric\", hour12: true })\n .formatToParts(new Date(2000, 0, 1, hour))\n .find((part) => part.type === \"dayPeriod\")?.value ?? (hour < 12 ? \"AM\" : \"PM\")\n return { AM: dayPeriod(9), PM: dayPeriod(21) }\n}\n\n/** Locale-correct narrow unit abbreviations for the Hour/Minute/Second suffix (e.g. \"h\"/\"m\"/\"s\"\n * en-US, \"h\"/\"min\"/\"s\" fr-FR), read via `Intl.NumberFormat`'s own unit formatting rather than\n * hardcoded English literals. */\nconst UNIT_FALLBACK = { hour: \"h\", minute: \"m\", second: \"s\" } as const\n\nexport const timeUnitLabels = (\n locale: string,\n): { hour: string; minute: string; second: string } => {\n const unit = (u: \"hour\" | \"minute\" | \"second\") =>\n new Intl.NumberFormat(locale, { style: \"unit\", unit: u, unitDisplay: \"narrow\" })\n .formatToParts(1)\n .find((part) => part.type === \"unit\")?.value ?? UNIT_FALLBACK[u]\n return { hour: unit(\"hour\"), minute: unit(\"minute\"), second: unit(\"second\") }\n}\n","\"use client\"\n\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport type { FocusEvent, KeyboardEvent, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { InputVariant } from \"../input/input\"\nimport { NumberInput } from \"../number-input/number-input\"\nimport { SegmentGroup } from \"../segment-group/segment-group\"\nimport { dayPeriodLabels, type HourCycle, is12Hour, timeUnitLabels } from \"./hour-cycle\"\n\n/**\n * The HOUR/MINUTE (+ SECOND) + AM/PM row — the piece `TimeInput` wraps with\n * state, and `DatePicker`'s embedded time panel wraps with `api.setTime()`\n * (one implementation, two call sites). Operates entirely in *display* units\n * (1–12 in 12h mode, 0–23 in 24h) — the always-24h stored `hour` conversion\n * happens at the caller's boundary, not here.\n */\n\ntype TimeRowClassNames = {\n hour?: string\n minute?: string\n second?: string\n period?: string\n}\n\n/** Overrides the sr-only accessible names for Hour/Minute/Second/Period — English by default.\n * Arbitrary microcopy with no locale-derivation path (unlike AM/PM and the unit suffixes,\n * which read from `Intl` instead). */\nexport type TimeRowTranslations = {\n hour?: string\n minute?: string\n second?: string\n period?: string\n}\n\n/** Starting *and floor* size for the Hour/Minute/Second fields, per `size` — `flex-1`'s basis so\n * each field still grows to fill the row, plus an equal `min-width` so it never shrinks back\n * below that. Without the `min-width`, the field's inner `<input>` has `min-w-0` (needed so the\n * value can shrink instead of forcing the row to overflow when it's genuinely too narrow), which\n * otherwise lets `flex-1` starve it arbitrarily close to zero — that's exactly how the `<input>`\n * was measured shrinking to ~11px in a too-narrow `DatePicker` popover column, clipping the\n * 2-digit value. A too-narrow row now genuinely overflows (or wraps, if a wrapping ancestor\n * provides one) instead of silently clipping — the honest failure mode; `DatePicker`'s own\n * column-width fix (`timeRowMinWidth` below) is what actually prevents hitting it in practice.\n *\n * Calibrated against a real measurement, minus `shellGap`'s own per-size pixel value (6/6/8/10/12px\n * for xs/sm/md/lg/xl) — `NumberInput`'s value↔suffix pair no longer carries that gap (glued\n * together in their own nested row, see its own comment), so each field's true minimum content\n * width shrank by exactly that much. */\nconst TIME_FIELD_BASIS_PX: Record<Size, number> = { xs: 64, sm: 72, md: 78, lg: 86, xl: 100 }\nconst timeFieldBasis: Record<Size, string> = {\n xs: `basis-[${TIME_FIELD_BASIS_PX.xs}px] min-w-[${TIME_FIELD_BASIS_PX.xs}px]`,\n sm: `basis-[${TIME_FIELD_BASIS_PX.sm}px] min-w-[${TIME_FIELD_BASIS_PX.sm}px]`,\n md: `basis-[${TIME_FIELD_BASIS_PX.md}px] min-w-[${TIME_FIELD_BASIS_PX.md}px]`,\n lg: `basis-[${TIME_FIELD_BASIS_PX.lg}px] min-w-[${TIME_FIELD_BASIS_PX.lg}px]`,\n xl: `basis-[${TIME_FIELD_BASIS_PX.xl}px] min-w-[${TIME_FIELD_BASIS_PX.xl}px]`,\n}\n\n/** The row's own gap between Hour/Minute/Second/Period (`gap-2` below) — flat across `size`,\n * unlike each field's *internal* value↔suffix↔steppers gap (`shellGap`, size-dependent). */\nconst ROW_GAP_PX = 8\n\n/** The AM/PM toggle's own natural (unstretched — it's `shrink-0`, not `flex-1`) rendered width\n * per `size`, measured directly rather than estimated. It wraps onto its own line below\n * Hour/Minute (the row's `flex-wrap` below) instead of forcing the whole row wider, so this\n * only matters for `timeRowMinWidth` as a floor *in case* it's ever wider than Hour+Minute\n * themselves — not as an unconditional addition to their combined width (see below). */\nconst PERIOD_WIDTH_PX: Record<Size, number> = { xs: 60, sm: 74, md: 88, lg: 110, xl: 133 }\n\n/** The row's own minimum rendered width for a given configuration. `DatePicker` uses this (see\n * its own `calendarColumnWidth` comment) to keep its popover column at least as wide as the\n * embedded time row needs, instead of only ever sizing off the calendar grid — otherwise the\n * row's `flex-1` + `min-w-0` fields silently shrink below their content size to fit.\n *\n * This is deliberately just Hour/Minute/[Second] at their basis plus the gaps *between* them —\n * not the AM/PM toggle's width added on top. The toggle wraps onto its own line (the row's\n * `flex-wrap` below) rather than forcing the row wider, so at a single narrow month it drops\n * below Hour/Minute instead of pushing the popover past the calendar's own width — the row only\n * needs to be as wide as the toggle itself in the (currently never hit — Hour+Minute together\n * are wider than the toggle at every size) case where that's the larger requirement. */\nexport const timeRowMinWidth = (\n size: Size,\n hourCycle: HourCycle,\n withSeconds: boolean | undefined,\n): number => {\n const fieldCount = 2 + (withSeconds ? 1 : 0)\n const fieldsWidth = fieldCount * TIME_FIELD_BASIS_PX[size] + (fieldCount - 1) * ROW_GAP_PX\n return is12Hour(hourCycle) ? Math.max(fieldsWidth, PERIOD_WIDTH_PX[size]) : fieldsWidth\n}\n\n/** ArrowLeft/ArrowRight at the edge of a field's text moves to the neighbouring field — caret at\n * its far side, so the motion reads as one continuous caret across the row — and from the last\n * number field \"next\" lands on the AM/PM toggle's checked (or first) radio. Inside the toggle the\n * arrows stay the radio group's own (switching AM/PM); Shift+Tab leaves it. `dir=\"rtl\"` mirrors\n * the keys, since the row's visual order is mirrored too. Anything else — a modifier, a\n * selection, a caret mid-text — keeps the native caret movement. */\nconst moveAcrossFields = (event: KeyboardEvent<HTMLDivElement>, dir: \"ltr\" | \"rtl\") => {\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return\n if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return\n const input = event.target\n if (!(input instanceof HTMLInputElement) || input.type !== \"text\") return\n const { selectionStart, selectionEnd, value } = input\n if (selectionStart !== selectionEnd) return\n const forward = (event.key === \"ArrowRight\") !== (dir === \"rtl\")\n if (forward ? selectionEnd !== value.length : selectionStart !== 0) return\n\n const row = event.currentTarget\n const fields = [...row.querySelectorAll<HTMLInputElement>('input[type=\"text\"]:not(:disabled)')]\n const next =\n fields[fields.indexOf(input) + (forward ? 1 : -1)] ??\n (forward\n ? (row.querySelector<HTMLInputElement>('input[type=\"radio\"]:checked:not(:disabled)') ??\n row.querySelector<HTMLInputElement>('input[type=\"radio\"]:not(:disabled)'))\n : null)\n if (!next) return\n event.preventDefault()\n next.focus()\n if (next.type === \"text\") {\n const caret = forward ? 0 : next.value.length\n next.setSelectionRange(caret, caret)\n }\n}\n\nexport type TimeRowProps = {\n hour: number | null\n minute: number | null\n second?: number | null\n onHourChange: (hour: number | null) => void\n onMinuteChange: (minute: number | null) => void\n onSecondChange?: (second: number | null) => void\n period: \"AM\" | \"PM\" | null\n onPeriodChange: (period: \"AM\" | \"PM\") => void\n hourCycle: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in each empty Hour/Minute/Second field. Default `\"--\"`. */\n placeholder?: string\n /** Resolves the locale-correct AM/PM labels + Hour/Minute/Second unit suffixes via `Intl`.\n * Falls back to `useLocaleContext()` when omitted. */\n locale?: string\n /** Overrides the sr-only Hour/Minute/Second/Period accessible names. English by default. */\n translations?: TimeRowTranslations\n size?: Size\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n invalid?: boolean\n /** Lands on the hour field's `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the hour field's `<input>`; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n className?: string\n classNames?: TimeRowClassNames\n}\n\nexport const TimeRow = ({\n hour,\n minute,\n second,\n onHourChange,\n onMinuteChange,\n onSecondChange,\n period,\n onPeriodChange,\n hourCycle,\n minuteStep = 1,\n withSeconds,\n placeholder = \"--\",\n locale,\n translations,\n size = \"md\",\n variant = \"default\",\n disabled,\n readOnly,\n invalid,\n ref,\n onBlur,\n className,\n classNames,\n}: TimeRowProps) => {\n const { locale: contextLocale, dir } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const twelveHour = is12Hour(hourCycle)\n const units = timeUnitLabels(resolvedLocale)\n const periodLabels = twelveHour ? dayPeriodLabels(resolvedLocale) : null\n\n return (\n // `flex-wrap`: at a single narrow month under `DatePicker`, Hour/Minute/[Second] fit the\n // calendar's own width but the AM/PM toggle doesn't (see `timeRowMinWidth`'s comment) — this\n // drops it to its own line there instead of forcing the whole popover wider than the\n // calendar to fit it on the same line. No visual change wherever there's already enough\n // width (every other context) — wrapping only kicks in once it's genuinely too narrow.\n // `role=\"group\"`: Hour/Minute/[Second]/Period are the parts of one time value — and the\n // row owns keyboard behaviour across them (`moveAcrossFields`), which a bare `<div>` can't.\n // biome-ignore lint/a11y/useSemanticElements: a `<fieldset>` brings UA border/padding/`min-inline-size` that fight this wrapping flex row, for the same `group` semantics\n <div\n role=\"group\"\n className={cn(\"flex flex-wrap items-end gap-2\", className)}\n onKeyDown={(event) => moveAcrossFields(event, dir)}\n >\n <NumberInput\n ref={ref}\n onBlur={onBlur}\n label={translations?.hour ?? \"Hour\"}\n placeholder={placeholder}\n value={hour}\n onChange={onHourChange}\n min={twelveHour ? 1 : 0}\n max={twelveHour ? 12 : 23}\n step={1}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n // \"Hour\" stays the accessible name (sr-only keeps it in the a11y tree,\n // just visually hidden) — the unit suffix is a decorative stand-in,\n // right next to the value once it's right-aligned (`text-end`).\n suffix={units.hour}\n className={classNames?.hour}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n <NumberInput\n label={translations?.minute ?? \"Minute\"}\n placeholder={placeholder}\n value={minute}\n onChange={onMinuteChange}\n min={0}\n max={59}\n step={minuteStep}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n suffix={units.minute}\n className={classNames?.minute}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n {withSeconds && (\n <NumberInput\n label={translations?.second ?? \"Second\"}\n placeholder={placeholder}\n value={second ?? null}\n onChange={onSecondChange}\n min={0}\n max={59}\n step={1}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n suffix={units.second}\n className={classNames?.second}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n )}\n {twelveHour && periodLabels && (\n <SegmentGroup\n data={[\n { value: \"AM\", label: periodLabels.AM },\n { value: \"PM\", label: periodLabels.PM },\n ]}\n label={translations?.period ?? \"Period\"}\n value={period}\n onChange={(value) => onPeriodChange(value as \"AM\" | \"PM\")}\n // `SegmentGroup`'s sizes match `NumberInput`'s box height exactly, so\n // the AM/PM toggle sits flush with the Hour/Minute fields.\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n className={classNames?.period}\n // Unlike Hour/Minute/Second, the AM/PM toggle has a fixed, small set of labels — it\n // doesn't need (or look right) stretching to share the row's leftover width. `w-auto`\n // cancels the Field wrapper's own default `w-full` (which would otherwise still set its\n // flex-basis to the full row width even without `flex-1`); `shrink-0` keeps it stable.\n // \"Period\" keeps the accessible name (sr-only) but no visible label or suffix — the\n // segment control itself already shows \"AM\"/\"PM\", self-descriptive.\n classNames={{ field: \"w-auto shrink-0\", label: \"sr-only\" }}\n />\n )}\n </div>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/theme-icon/theme-icon.tsx"],"names":[],"mappings":";;;;;;;AAuBA,IAAM,iBAAA,GAAoB,GAAA;AAAA,EACxB;AAAA,IACE,yCAAA;AAAA,IACA,oCAAA;AAAA,IACA,mBAAA;AAAA,IACA,8CAAA;AAAA;AAAA;AAAA,IAGA,WAAA;AAAY,GACd;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAYP,MAAA,EACE,6FAAA;AAAA,QACF,KAAA,EAAO,kDAAA;AAAA,QACP,OAAA,EAAS,mDAAA;AAAA,QACT,MAAA,EAAQ,mDAAA;AAAA;AAAA;AAAA;AAAA,QAIR,OAAA,EAAS;AAAA,UACP,mEAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,oBAAA;AAAA,QACJ,EAAA,EAAI,sBAAA;AAAA,QACJ,EAAA,EAAI,oBAAA;AAAA,QACJ,EAAA,EAAI,qBAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAQ;AAAA;AACV;AAEJ,CAAA;AAaO,IAAM,YAAY,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,GAAA;AAAA,EAAC,GAAA,CAAI,GAAA;AAAA,EAAJ;AAAA,IACC,OAAA;AAAA,IACA,YAAA,EAAY,KAAA;AAAA,IACZ,gBAAc,OAAA,IAAW,SAAA;AAAA,IACzB,SAAA,EAAW,GAAG,iBAAA,CAAkB,EAAE,SAAS,IAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,SAAS,CAAA;AAAA,IACpE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN","file":"chunk-RQL7FVCS.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * ThemeIcon — square, non-interactive icon-display box. Visually related to\n * `ActionIcon` (same size/radius scales) but deliberately **not** its\n * (variant × color) look: every variant here is a muted, low-saturation\n * surface — just enough contrast to read as \"raised above the page,\" never\n * a vivid CTA-style fill. There's no hover state and no cursor affordance,\n * because this is a display, not a control.\n *\n * `asChild` renders the single child as the root, so it composes on top of\n * an interactive element (e.g. wrap a `Link`) when the icon itself needs to\n * be clickable. The kit's focus ring (`focusStyles`) rides along for that\n * case and stays inert on the default `<div>` — but reach for `ActionIcon`\n * when an interactive icon is the common case, since it also supplies the\n * `aria-label`, disabled and loading handling a real trigger needs.\n */\nconst themeIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"aspect-square shrink-0 select-none\",\n \"rounded-lg border\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n // Inert on the default non-focusable <div>; applies once `asChild`\n // renders ThemeIcon onto a real <a>/<button>. See `focusStyles`.\n focusStyles(),\n ],\n {\n variants: {\n variant: {\n // A translucent wash of `--c-solid` (not the opaque token) so the\n // fill blends with whatever surface it sits on instead of reading\n // as a painted CTA block. The border mixes in black on top of that\n // same var — a fixed darkening, not another opacity step of it —\n // so it reads as a recessed edge in both themes; some colors (neutral\n // in particular) have a dark-mode `--c-solid` that's lighter than\n // its own soft/text steps, which would flip a same-var-opacity\n // border the wrong way. This is the ThemeIcon-specific reading of\n // \"filled\": raised, not loud. Button/Badge/ActionIcon's `filled`\n // (opaque bg-(--c-solid)) would look like a button here —\n // intentionally not reused.\n filled:\n \"bg-(--c-solid)/15 text-(--c-text) border-[color-mix(in_oklab,var(--c-solid)_35%,black_65%)]\",\n light: \"bg-(--c-soft) text-(--c-text) border-transparent\",\n outline: \"bg-transparent text-(--c-text) border-(--c-solid)\",\n subtle: \"bg-transparent text-(--c-text) border-transparent\",\n // Palette-independent neutral surface. Unlike ActionIcon's\n // high-contrast inverted `default` (a black/white button look),\n // this stays a muted card in both themes.\n default: [\n \"bg-gray-light-100/50 text-gray-light-700 border-gray-light-300/50\",\n \"dark:bg-gray-dark-800/50 dark:text-gray-dark-300 dark:border-gray-dark-700/50\",\n ],\n },\n size: {\n xs: \"h-7 [&_svg]:size-5\",\n sm: \"h-8 [&_svg]:size-5.5\",\n md: \"h-9 [&_svg]:size-6\",\n lg: \"h-10 [&_svg]:size-7\",\n xl: \"h-12 [&_svg]:size-8\",\n },\n radius: {\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n radius: \"md\",\n },\n },\n)\n\nexport type ThemeIconVariant = NonNullable<VariantProps<typeof themeIconVariants>[\"variant\"]>\nexport type ThemeIconSize = NonNullable<VariantProps<typeof themeIconVariants>[\"size\"]>\nexport type ThemeIconRadius = NonNullable<VariantProps<typeof themeIconVariants>[\"radius\"]>\n\nexport type ThemeIconProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof themeIconVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n }\n\nexport const ThemeIcon = ({\n className,\n variant,\n size,\n radius,\n color,\n asChild,\n testId,\n ...rest\n}: ThemeIconProps) => (\n <ark.div\n asChild={asChild}\n data-color={color}\n data-variant={variant ?? \"default\"}\n className={cn(themeIconVariants({ variant, size, radius }), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/date-value.ts"],"names":[],"mappings":";;;AAqBO,SAAS,mBAAA,CAAoB,MAAY,QAAA,EAA6B;AAC3E,EAAA,OAAO,QAAA,CAAS,MAAM,QAAQ,CAAA;AAChC;AAUO,SAAS,mBAAA,CAAoB,OAAkB,QAAA,EAAwB;AAC5E,EAAA,OAAO,cAAc,KAAA,GAAQ,KAAA,CAAM,QAAO,GAAI,KAAA,CAAM,OAAO,QAAQ,CAAA;AACrE;AAQO,SAAS,WAAA,CACd,OACA,QAAA,EACyB;AACzB,EAAA,IAAI,KAAA,KAAU,QAAW,OAAO,MAAA;AAChC,EAAA,IAAI,KAAA,KAAU,IAAA,EAAM,OAAO,EAAC;AAC5B,EAAA,IAAI,iBAAiB,IAAA,EAAM,OAAO,CAAC,mBAAA,CAAoB,KAAA,EAAO,QAAQ,CAAC,CAAA;AACvE,EAAA,MAAM,SAAsB,EAAC;AAC7B,EAAA,IAAI,KAAA,CAAM,UAAU,IAAA,EAAM,MAAA,CAAO,KAAK,mBAAA,CAAoB,KAAA,CAAM,KAAA,EAAO,QAAQ,CAAC,CAAA;AAChF,EAAA,IAAI,KAAA,CAAM,QAAQ,IAAA,EAAM,MAAA,CAAO,KAAK,mBAAA,CAAoB,KAAA,CAAM,GAAA,EAAK,QAAQ,CAAC,CAAA;AAC5E,EAAA,OAAO,MAAA;AACT;AAOO,SAAS,aAAA,CACd,MAAA,EACA,KAAA,EACA,QAAA,EAC8B;AAC9B,EAAA,IAAI,CAAC,KAAA,EAAO;AACV,IAAA,MAAM,CAAC,IAAI,CAAA,GAAI,MAAA;AACf,IAAA,OAAO,IAAA,GAAO,mBAAA,CAAoB,IAAA,EAAM,QAAQ,CAAA,GAAI,IAAA;AAAA,EACtD;AACA,EAAA,MAAM,CAAC,KAAA,EAAO,GAAG,CAAA,GAAI,MAAA;AACrB,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,KAAA,GAAQ,mBAAA,CAAoB,KAAA,EAAO,QAAQ,CAAA,GAAI,IAAA;AAAA,IACtD,GAAA,EAAK,GAAA,GAAM,mBAAA,CAAoB,GAAA,EAAK,QAAQ,CAAA,GAAI;AAAA,GAClD;AACF","file":"chunk-TCWYBVIL.js","sourcesContent":["import { type DateValue, fromDate } from \"@internationalized/date\"\n\n/**\n * The `Date ↔ DateValue` boundary (RFC §4/§13, `docs/rfcs/date-picker.md`) — the one place a\n * native `Date` *instant* converts to/from Ark's wall-calendar `DateValue`\n * (`CalendarDate | CalendarDateTime | ZonedDateTime`). `Calendar` and (later) `DatePicker` both\n * funnel every conversion through here, so there is exactly one audited crossing point instead\n * of one per component.\n *\n * `@internationalized/date` internals are deliberately NOT re-exported from this module — keep\n * the public surface to the boundary functions below (PR3's `date-picker/index.ts` re-exports\n * exactly one unrelated helper, `getLocalTimeZone`, directly from the library itself).\n */\n\n/**\n * A range value: `{ start, end }`, each independently nullable (a real \"unset\" endpoint, never\n * `undefined`). Mirrors `Calendar`/`DatePicker`'s `range` value shape.\n */\nexport type DateRangeValue = { start: Date | null; end: Date | null }\n\n/** Convert a native `Date` instant to Ark's `DateValue`, interpreted in `timeZone`. */\nexport function dateToCalendarValue(date: Date, timeZone: string): DateValue {\n return fromDate(date, timeZone)\n}\n\n/**\n * Convert Ark's `DateValue` back to a native `Date`. A `ZonedDateTime` (what `dateToCalendarValue`\n * produces) already carries its own zone/offset — its `toDate()` takes no argument and would\n * silently ignore a mismatched `timeZone` here — while a plain `CalendarDate`/`CalendarDateTime`\n * (what the day-grid's own calendar arithmetic produces) needs one to resolve to an instant, so\n * branch on which shape we actually got rather than assuming the caller's `dateToCalendarValue`\n * origin.\n */\nexport function calendarValueToDate(value: DateValue, timeZone: string): Date {\n return \"timeZone\" in value ? value.toDate() : value.toDate(timeZone)\n}\n\n/**\n * Wrap a public value into Ark's array contract. `undefined` stays uncontrolled (Ark's own\n * default takes over); `null` — or an all-null range — clears to `[]`; a single `Date` becomes a\n * one-element array; a range pushes only its defined ends, so a mid-selection range\n * (`{ start, end: null }`) naturally comes out length 1.\n */\nexport function toArkValues(\n value: Date | DateRangeValue | null | undefined,\n timeZone: string,\n): DateValue[] | undefined {\n if (value === undefined) return undefined\n if (value === null) return []\n if (value instanceof Date) return [dateToCalendarValue(value, timeZone)]\n const values: DateValue[] = []\n if (value.start !== null) values.push(dateToCalendarValue(value.start, timeZone))\n if (value.end !== null) values.push(dateToCalendarValue(value.end, timeZone))\n return values\n}\n\n/**\n * The inverse of `toArkValues` — Ark's `value` array back to the public shape. `range` picks\n * which shape to produce; a length-1 array under `range` is a mid-selection (`start` set,\n * `end` still `null`), not an error.\n */\nexport function fromArkValues(\n values: DateValue[],\n range: boolean,\n timeZone: string,\n): Date | DateRangeValue | null {\n if (!range) {\n const [only] = values\n return only ? calendarValueToDate(only, timeZone) : null\n }\n const [start, end] = values\n return {\n start: start ? calendarValueToDate(start, timeZone) : null,\n end: end ? calendarValueToDate(end, timeZone) : null,\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/calendar/calendar-body.tsx","../src/components/calendar/calendar.tsx"],"names":["Ark","jsx"],"mappings":";;;;;;;;;;;;;AAsDA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,gEAAA;AAAA,IACA,kEAAA;AAAA,IACA,0DAAA;AAAA,IACA,oBAAA;AAAA,IACA,WAAA,CAAY,EAAE,MAAA,EAAQ,KAAA,EAAO,CAAA;AAAA,IAC7B,oDAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,uNAAA;AAAA,IACA,qGAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsBA,oDAAA;AAAA,IACA,kDAAA;AAAA,IACA,8DAAA;AAAA,IACA,8DAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,yDAAA;AAAA,IACA,mFAAA;AAAA,IACA,+GAAA;AAAA,IACA,kJAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,gBAAA;AAAA,QACJ,EAAA,EAAI,mBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC,CAAA;AAUA,IAAM,aAAA,GAAsC,EAAE,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAG;AAErF,IAAM,SAAA,GAAY,EAAA;AAEX,IAAM,iBAAA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A,CAAQ,KAAA,EAAO,OAAA,EAAS,gBAAgB;AAAA;AAGxD,UACF,MAAA;AAAA,MAEN,MAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MAGA,eAAA,EAAiB,eAAA;AAAA,MACjB,iBAAA,EACE,iBAAA,GACI,CAAC,SAAA,KACC,iBAAA,CAAkB,oBAAoB,SAAA,EAAW,gBAAgB,CAAA,EAAG,gBAAgB,CAAA,GACtF,MAAA;AAAA,MAEN,GAAA,EAAK,GAAA,GAAM,mBAAA,CAAoB,GAAA,EAAK,gBAAgB,CAAA,GAAI,MAAA;AAAA,MACxD,GAAA,EAAK,GAAA,GAAM,mBAAA,CAAoB,GAAA,EAAK,gBAAgB,CAAA,GAAI,MAAA;AAAA,MACxD,OAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAA,EAAW,YAAY,IAAI,CAAA;AAAA,MAChE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MASnC,QAAA,kBAAAC,GAAAA,CAACD,UAAAA,CAAI,OAAA,EAAJ,EACC,QAAA,kBAAAC,GAAAA;AAAA,QAAC,YAAA;AAAA,QAAA;AAAA,UACC,WAAA;AAAA,UACA,eAAA;AAAA,UACA,SAAA;AAAA,UACA,IAAA;AAAA,UACA,QAAA,EAAU,gBAAA;AAAA,UACV;AAAA;AAAA,OACF,EACF;AAAA;AAAA,GACF;AAEJ","file":"chunk-UHNRAI6V.js","sourcesContent":["import { DatePicker as Ark } from \"@ark-ui/react/date-picker\"\nimport { cva } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport { match } from \"ts-pattern\"\nimport { cn } from \"../../lib/cn\"\nimport { calendarValueToDate } from \"../../lib/date-value\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport type { Size } from \"../../lib/sizes\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../popover/icons\"\n\n/**\n * CalendarBody — the shared grid module behind both `Calendar` (inline) and, later,\n * `DatePicker` (popover): the RFC §3 \"one implementation, not two\" module. It renders only the\n * grid anatomy (`View` / `ViewControl` / nav triggers / `Table*` / `MonthSelect` / `YearSelect`)\n * — deliberately **not** `Control` / `Content` / `Positioner` / `Trigger` / `ClearTrigger`, the\n * popover-only chrome that belongs to `DatePicker`, not here.\n *\n * Every part below self-connects to the nearest ancestor `Ark.Root` via Ark's own React\n * context, so this module needs no `api` prop threaded in — both `Calendar` and `DatePicker`\n * just mount it as a plain child inside their own differently-configured `Ark.Root`.\n *\n * Not barrel-exported (no export from `calendar/index.ts`) — `DatePicker` reaches it directly\n * via `import { CalendarBody } from \"../calendar/calendar-body\"`, the established cross-folder\n * pattern for a shared internal part (`multi-select.tsx` → `../combobox/combobox`,\n * `drawer.tsx` → `../action-icon/action-icon`).\n */\n\nexport type CalendarBodyClassNames = {\n /** The prev/label/next navigation row. */\n header?: string\n /** Each rendered `<table>` (one per visible month in the day view). */\n table?: string\n /** Each day cell's clickable trigger. */\n day?: string\n}\n\nexport type CalendarBodyProps = {\n /** Months shown side by side in the day view. */\n numOfMonths?: number\n withWeekNumbers?: boolean\n /** Per-day decoration slot (RFC §9's \"event dot\"). Receives a native `Date` — converted from\n * Ark's `DateValue` at the point of the call, via the same `timeZone` the root was configured\n * with — and the day's live selection state. */\n renderDay?: (date: Date, ctx: { isUnavailable: boolean; isSelected: boolean }) => ReactNode\n size?: Size\n /** The time zone the nearest `Ark.Root` was configured with. Required (not read from Ark's\n * own api, which exposes no public `timeZone` getter) so `renderDay`'s Date conversion uses\n * the exact same boundary `Calendar`/`DatePicker` used to build the root's own value —\n * see `lib/date-value.ts`'s module doc on why this one conversion point matters. */\n timeZone: string\n classNames?: CalendarBodyClassNames\n}\n\nconst dayCellTrigger = cva(\n [\n \"relative flex size-full items-center justify-center rounded-xs\",\n \"cursor-pointer select-none tabular-nums transition-colors-radius\",\n \"hover:bg-gray-light-950/20 dark:hover:bg-gray-dark-50/20\",\n \"focus-visible:z-10\",\n focusStyles({ offset: false }),\n \"data-today:font-semibold data-today:text-brand-500\",\n // `!` (important) on bg/text: a day can be `data-today` *and* `data-selected` at once (e.g.\n // the default `new Date()` value), or a range endpoint is simultaneously `data-selected` *and*\n // `data-in-range` (the closed interval includes its own ends) — without `!`, these rules fight\n // over the same `background-color`/`color` and Tailwind's variant ordering (not this class\n // list's order) can win the wrong one, e.g. leaving the selected cell's text the same color\n // as its own solid-fill background, invisible. `data-selected` — the solid highlight — always\n // wins over both.\n \"data-selected:bg-gray-light-950! dark:data-selected:bg-gray-dark-50! data-selected:text-(--c-on-solid)! data-selected:font-semibold data-selected:hover:bg-gray-light-700! dark:data-selected:hover:bg-gray-dark-300!\",\n \"data-in-range:rounded-none data-in-range:bg-gray-light-950/10 dark:data-in-range:bg-gray-dark-50/10\",\n // Pill-cap rounding, split into two independently-true conditions rather than reacting to\n // `data-range-start`/`data-range-end` alone: a lone click (before any second day exists)\n // still carries `data-range-start`, and capping on that alone made the first pick look like\n // an already-established range extending rightward.\n //\n // 1. A genuinely *committed* range exists — `data-range-committed` is set from\n // `api.value.length === 2` in JS, not from the DOM. An earlier version checked whether the\n // *other* endpoint's `data-range-start`/`data-range-end` was present anywhere among the\n // visible months instead — that broke as soon as only one endpoint's month was in view\n // (e.g. the range was set, then the calendar paged away from one end): the other endpoint\n // was never rendered at all, so its attribute could never be found, and the cap silently\n // stopped applying to the *visible* endpoint too, even though the range was still fully\n // committed. `api.value` reflects the committed selection regardless of what's currently\n // paged into view, so this doesn't have that failure mode.\n // 2. A genuine *live hover preview* toward a different day — self-contained on this cell's\n // own attributes, no group lookup needed: `hoveredRangeValue` is `[start, hoveredValue]`\n // sorted chronologically, so the anchor cell gets exactly one of `data-hover-range-start` /\n // `data-hover-range-end` when truly hovering elsewhere (direction decides which), but\n // *both* simultaneously when the pointer is merely resting on the same cell it just\n // clicked (a zero-width hover range) — requiring the other one be *absent* rules out that\n // degenerate, \"changes before you've moved anywhere\" case.\n \"data-range-start:data-range-committed:rounded-s-xs\",\n \"data-range-end:data-range-committed:rounded-e-xs\",\n \"data-hover-range-start:not-data-hover-range-end:rounded-s-xs\",\n \"data-hover-range-end:not-data-hover-range-start:rounded-e-xs\",\n // The degenerate case above (pointer resting on the just-clicked day, `data-hover-range-start`\n // and `data-hover-range-end` both present on this same cell) still falls into `data-in-range`\n // (a zero-width range trivially contains itself), which would otherwise render it\n // `rounded-none` — sharp corners, reading as broken rather than \"just this one day, nothing\n // decided yet.\" Round it fully instead, `!` to beat that `data-in-range:rounded-none`\n // regardless of Tailwind's variant ordering.\n \"data-hover-range-start:data-hover-range-end:rounded-xs!\",\n \"data-outside-range:text-gray-light-500 dark:data-outside-range:text-gray-dark-700\",\n \"data-in-range:data-outside-range:text-gray-light-700 dark:data-in-range:data-outside-range:text-gray-dark-400\",\n \"data-unavailable:pointer-events-none data-unavailable:text-gray-light-300 data-unavailable:line-through dark:data-unavailable:text-gray-dark-700\",\n \"data-disabled:pointer-events-none data-disabled:opacity-40\",\n ],\n {\n variants: {\n size: {\n xs: \"size-7 text-xs\",\n sm: \"size-8 text-xs\",\n md: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n xl: \"size-11 text-base\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\n/** Day-cell pixel size per `size`, matching `dayCellTrigger`'s `size-*` variants (`size-7`..\n * `size-11`) — the day view's own total width. The month/year grids below are plain `<table>`s\n * that would otherwise size to their own (longer) text content instead, so at `numOfMonths ===\n * 1` a month grid comes out *wider* than the day view (overflowing a fixed-width ancestor, e.g.\n * `DatePicker`'s popover column, which is sized off this same geometry via `calendarGridWidth`)\n * and a year grid comes out *narrower* (leaving unfilled space instead of stretching to match).\n * Pinning both to this exact width — `table-fixed` divides it evenly across columns — keeps\n * every view the same footprint. */\nconst DAY_CELL_SIZE: Record<Size, number> = { xs: 28, sm: 32, md: 36, lg: 40, xl: 44 }\n/** Gap between adjacent months in the day view (`gap-6`). */\nconst MONTH_GAP = 24\n\nexport const calendarGridWidth = (size: Size, numOfMonths: number): number =>\n DAY_CELL_SIZE[size] * 7 * numOfMonths + MONTH_GAP * (numOfMonths - 1)\n\nconst gridCellTrigger = cva(\n [\n \"flex w-full items-center justify-center truncate rounded-sm px-2 py-2.5\",\n \"cursor-pointer transition-colors\",\n \"hover:bg-gray-light-100 dark:hover:bg-gray-dark-800\",\n focusStyles({ offset: false }),\n \"data-selected:bg-(--c-solid) data-selected:text-(--c-on-solid) data-selected:hover:bg-(--c-solid-hover)\",\n \"data-disabled:pointer-events-none data-disabled:opacity-40\",\n ],\n {\n variants: {\n size: { xs: \"text-xs\", sm: \"text-xs\", md: \"text-sm\", lg: \"text-base\", xl: \"text-base\" },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst weekdayHeader =\n \"pb-1 text-center text-xs font-medium text-gray-light-500 dark:text-gray-dark-400\"\n\nconst weekNumberCell = cn(\n \"p-1 align-top text-center text-xs font-medium text-gray-light-500 dark:text-gray-dark-400 h-full\",\n)\n\nconst navIcon = (direction: \"prev\" | \"next\", size: Size | undefined, className?: string) => (\n // The glyphs are physical; prev sits on the inline-start edge, which is the\n // right one under RTL, so both chevrons mirror to keep pointing outward.\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size={size}\n className={cn(\"rtl:[&_svg]:rotate-180\", className)}\n >\n {direction === \"prev\" ? <ChevronLeftIcon /> : <ChevronRightIcon />}\n </ActionIcon>\n)\n\n/** `ActionIcon`'s own rendered height per `size` (its `h-7`..`h-12` variants) — the day view's\n * nav row is pinned to this so the prev/next icons and the view-trigger control are the same\n * height, instead of the icons (overlaid on the control, see below) poking out top and bottom of\n * a shorter, text-sized row. */\nconst NAV_ICON_SIZE: Record<Size, number> = { xs: 28, sm: 32, md: 36, lg: 40, xl: 48 }\n\nexport const CalendarBody = ({\n numOfMonths = 1,\n withWeekNumbers,\n renderDay,\n size = \"md\",\n timeZone,\n classNames,\n}: CalendarBodyProps) => (\n <Ark.Context>\n {(api) => {\n const nav = (\n <Ark.ViewControl\n className={cn(\"mb-2 flex items-strech justify-between gap-1\", classNames?.header)}\n >\n <Ark.PrevTrigger asChild>{navIcon(\"prev\", size)}</Ark.PrevTrigger>\n <Ark.ViewTrigger\n className={cn(\n \"transition-colors\",\n \"min-w-0 flex-1 cursor-pointer truncate rounded-sm px-2 py-1 text-center text-sm font-medium\",\n \"hover:bg-gray-light-100 dark:hover:bg-gray-dark-800\",\n focusStyles({ offset: false }),\n \"disabled:pointer-events-none disabled:opacity-50\",\n )}\n >\n {api.visibleRange.end.month === api.visibleRange.start.month\n ? api.visibleRangeText.start\n : api.visibleRangeText.formatted}\n </Ark.ViewTrigger>\n <Ark.NextTrigger asChild>{navIcon(\"next\", size)}</Ark.NextTrigger>\n </Ark.ViewControl>\n )\n\n // A real, two-endpoint committed range — read off the machine's own value, not the DOM, so\n // it stays true regardless of whether either endpoint's month is currently paged into view\n // (see the pill-cap rounding comment in `dayCellTrigger` above).\n const isCommittedRange = api.value.length === 2\n\n return match(api.view)\n .with(\"day\", () => (\n <Ark.View view=\"day\">\n <div\n className=\"grid items-center justify-center\"\n style={{\n gridTemplateColumns: `repeat(${numOfMonths}, auto)`,\n columnGap: MONTH_GAP,\n rowGap: 8,\n }}\n >\n {/* The prev/next icons are overlaid on the control (`absolute`), not given their\n * own grid columns — this row's total width must stay exactly the width of the\n * day tables below (the columns this grid actually has), because `DatePicker`\n * sizes its popover to that exact figure (`calendarGridWidth`, `date-picker.tsx`).\n * Extra icon columns would push this row wider than that budget and force the\n * popover to scroll. */}\n <div\n className={cn(\"relative\", classNames?.header)}\n style={{\n gridColumn: `1 / span ${numOfMonths}`,\n gridRow: 1,\n height: NAV_ICON_SIZE[size],\n }}\n >\n <Ark.PrevTrigger asChild>\n {navIcon(\"prev\", size, \"absolute start-0 top-1/2 z-10 -translate-y-1/2\")}\n </Ark.PrevTrigger>\n {/* One button, not one per month — Ark's month/year view is a single shared grid\n * (confirmed below), so every month's label leads to the exact same destination;\n * splitting it into N `Ark.ViewTrigger`s would only duplicate the same generated\n * `id`/`aria-label` across them. Its own `repeat(numOfMonths, 1fr)` columns land\n * on the exact same boundaries as the day-table columns below (both divide the\n * same total width, with the same gap, into the same number of equal shares —\n * true because every month always renders at the same cell size) — so no width\n * formula is duplicated between this row and the tables, and it degenerates to\n * the `numOfMonths === 1` case for free.\n *\n * The button itself stays full width (so its grid tracks — and hence its click\n * target — line up with the tables below), but its *visible* hover pill is a\n * separate, inset layer (`group-hover`) that stops short of the prev/next icons\n * instead of running the full width underneath them. */}\n <Ark.ViewTrigger\n className={cn(\n \"group relative grid size-full cursor-pointer items-center rounded-sm text-sm font-medium transition-colors\",\n focusStyles({ offset: false }),\n \"disabled:pointer-events-none disabled:opacity-50\",\n )}\n style={{\n gridTemplateColumns: `repeat(${numOfMonths}, 1fr)`,\n columnGap: MONTH_GAP,\n }}\n >\n <span\n aria-hidden\n className=\"pointer-events-none absolute inset-y-0 rounded-sm transition-colors group-hover:bg-gray-light-100 dark:group-hover:bg-gray-dark-800\"\n style={{\n insetInlineStart: NAV_ICON_SIZE[size],\n insetInlineEnd: NAV_ICON_SIZE[size],\n }}\n />\n {Array.from({ length: numOfMonths }, (_, monthIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.\n <span key={monthIndex} className=\"relative min-w-0 truncate text-center\">\n {api.getOffset({ months: monthIndex }).visibleRangeText.start}\n </span>\n ))}\n </Ark.ViewTrigger>\n <Ark.NextTrigger asChild>\n {navIcon(\"next\", size, \"absolute end-0 top-1/2 z-10 -translate-y-1/2\")}\n </Ark.NextTrigger>\n </div>\n\n {Array.from({ length: numOfMonths }, (_, monthIndex) => {\n const offset = api.getOffset({ months: monthIndex })\n return (\n <Ark.Table\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.\n key={monthIndex}\n style={{ gridColumn: monthIndex + 1, gridRow: 2 }}\n className={cn(\"border-separate border-spacing-0\", classNames?.table)}\n >\n <Ark.TableHead>\n <Ark.TableRow>\n {withWeekNumbers && <Ark.WeekNumberHeaderCell className={weekdayHeader} />}\n {api.weekDays.map((weekDay) => (\n <Ark.TableHeader key={weekDay.long} className={weekdayHeader}>\n {weekDay.narrow}\n </Ark.TableHeader>\n ))}\n </Ark.TableRow>\n </Ark.TableHead>\n <Ark.TableBody>\n {offset.weeks.map((week, weekIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of consecutive weeks, never reordered.\n <Ark.TableRow key={weekIndex}>\n {withWeekNumbers && (\n <Ark.WeekNumberCell weekIndex={weekIndex} week={week}>\n <span className={weekNumberCell}>{api.getWeekNumber(week)}</span>\n </Ark.WeekNumberCell>\n )}\n {week.map((value) => {\n const cellState = renderDay\n ? api.getDayTableCellState({\n value,\n visibleRange: offset.visibleRange,\n })\n : undefined\n return (\n <Ark.TableCell\n key={value.toString()}\n value={value}\n visibleRange={offset.visibleRange}\n >\n <Ark.TableCellTrigger\n data-range-committed={isCommittedRange || undefined}\n className={cn(dayCellTrigger({ size }), classNames?.day)}\n >\n {value.day}\n {cellState &&\n renderDay?.(calendarValueToDate(value, timeZone), {\n isUnavailable: cellState.unavailable,\n isSelected: cellState.selected,\n })}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n )\n })}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n )\n })}\n </div>\n </Ark.View>\n ))\n .with(\"month\", () => (\n <Ark.View view=\"month\">\n {nav}\n <Ark.Table\n className={cn(\"mx-auto table-fixed\", classNames?.table)}\n style={{ width: calendarGridWidth(size, numOfMonths) }}\n >\n <Ark.TableBody>\n {/* \"short\" (e.g. \"Jan\"), not the default \"long\" (\"January\") — the grid's width is\n * pinned to the day view's (see `calendarGridWidth` above), which at a single\n * narrow month can be too tight for full month names across 4 columns. */}\n {api.getMonthsGrid({ columns: 4, format: \"short\" }).map((row, rowIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.\n <Ark.TableRow key={rowIndex}>\n {row.map((month) => (\n <Ark.TableCell key={month.value} value={month.value}>\n <Ark.TableCellTrigger className={gridCellTrigger({ size })}>\n {month.label}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n ))}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n </Ark.View>\n ))\n .with(\"year\", () => (\n <Ark.View view=\"year\">\n {nav}\n <Ark.Table\n columns={5}\n className={cn(\"mx-auto table-fixed\", classNames?.table)}\n style={{ width: calendarGridWidth(size, numOfMonths) }}\n >\n <Ark.TableBody>\n {api.getYearsGrid({ columns: 5 }).map((row, rowIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.\n <Ark.TableRow key={rowIndex}>\n {row.map((year) => (\n <Ark.TableCell key={year.value} value={year.value}>\n <Ark.TableCellTrigger className={gridCellTrigger({ size })}>\n {year.label}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n ))}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n </Ark.View>\n ))\n .exhaustive()\n }}\n </Ark.Context>\n)\n","\"use client\"\n\nimport { DatePicker as Ark, type DatePickerDateView as DateView } from \"@ark-ui/react/date-picker\"\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { getLocalTimeZone } from \"@internationalized/date\"\nimport type { ComponentProps, ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { DatePredicate } from \"../../lib/date-predicates\"\nimport {\n calendarValueToDate,\n type DateRangeValue,\n dateToCalendarValue,\n fromArkValues,\n toArkValues,\n} from \"../../lib/date-value\"\nimport type { FormControlProps } from \"../../lib/form-control\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { CalendarBody, type CalendarBodyClassNames } from \"./calendar-body\"\n\n/**\n * Calendar — the inline month grid (RFC §9, `docs/rfcs/date-picker.md`): Ark's `date-picker`\n * machine rendered `inline` (no trigger/popover), wrapping the shared `CalendarBody` grid that\n * `DatePicker` will later reuse verbatim inside its own popover.\n *\n * - Value is a native `Date | null` (or `{ start, end }` under `range`) — the machine's\n * `DateValue` array contract never leaks out; `lib/date-value.ts` is the one conversion\n * boundary both directions go through.\n * - Controlled/uncontrolled `value` / `defaultValue` / `onChange` go straight to Ark's own\n * machine, which supports both natively — no `useUncontrolled` needed here.\n * - `isDateUnavailable` / `min` / `max` take native `Date`s and are adapted to Ark's\n * `DateValue`-based signature at this boundary; pair with the `lib/date-predicates.ts`\n * helpers (`disablePast()`, `disableWeekends()`, …).\n * - No `label` / `description` / `error` / `FieldShell` wrap — `Calendar` is a bare widget\n * (like `Table`), not a form field. A `DatePicker` popover is where a field wrapper belongs.\n *\n * <Calendar value={date} onChange={setDate} isDateUnavailable={disableWeekends()} />\n */\n\nexport type CalendarClassNames = CalendarBodyClassNames & {\n /** The outermost `Ark.Root` element. */\n root?: string\n}\n\n/** Ark's own `translations` prop type, derived structurally rather than imported by name —\n * `IntlTranslations` lives in `@zag-js/date-picker`, a transitive dependency of the\n * `@ark-ui/react` peer dep, not one this package declares itself. */\ntype ArkTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\n/** The subset `CalendarBody`'s rendered anatomy actually exercises — `trigger`/`clearTrigger`\n * only apply when composed under `DatePicker` (a bare `Calendar` never renders a trigger/clear\n * button; harmless no-op keys there). Unset keys fall back to Ark's own English text. */\nexport type CalendarTranslations = Pick<\n ArkTranslations,\n | \"dayCell\"\n | \"trigger\"\n | \"viewTrigger\"\n | \"prevTrigger\"\n | \"nextTrigger\"\n | \"clearTrigger\"\n | \"content\"\n | \"weekColumnHeader\"\n | \"weekNumberCell\"\n>\n\n/** Passes a partial override straight through to `Ark.Root`. Ark's `translations` prop is\n * itself all-optional (since @ark-ui/react 5.38.2), so unset keys fall back to Ark's own\n * English defaults and this kit no longer keeps a copy of them to merge over. That copy was\n * load-bearing when the prop demanded every key at once; keeping it now would only let a\n * stale duplicate override Ark's upstream fixes — which is exactly what happened to\n * `viewTrigger`, whose day-view label named the wrong target view until Ark corrected it. */\nexport const resolveCalendarTranslations = (\n overrides?: Partial<CalendarTranslations>,\n): ArkTranslations | undefined => overrides\n\nexport type CalendarProps<Range extends boolean = false> = FormControlProps<\n Range extends true ? DateRangeValue : Date | null,\n HTMLDivElement\n> &\n WithTestId & {\n /** Select a `{ start, end }` range instead of a single date. */\n range?: Range\n /** Months shown side by side. Default 1. */\n numOfMonths?: number\n /** Restriction predicate over a native `Date`. Compose with `lib/date-predicates.ts`'s helpers.\n * Called with this component's own resolved `timeZone` as its second argument, so a predicate\n * reads the candidate day in the same zone the grid renders it in. */\n isDateUnavailable?: DatePredicate\n min?: Date\n max?: Date\n /** Bounds the view levels reachable via navigation (e.g. `minView=\"month\"` for a month-only\n * picker that never drills into individual days). */\n minView?: DateView\n maxView?: DateView\n /** Per-day decoration slot — the \"event dot\" (RFC §9). */\n renderDay?: (date: Date, ctx: { isUnavailable: boolean; isSelected: boolean }) => ReactNode\n /** Always render 6 week rows (padding with adjacent-month days) instead of however many the\n * visible month(s) actually span (4–6) — keeps the grid's height constant while navigating\n * between months. */\n fixedWeeks?: boolean\n withWeekNumbers?: boolean\n /** Overrides the active locale context. Drives month/day names and first-day-of-week. */\n locale?: string\n /** Overrides the local time zone for every `Date ↔ DateValue` conversion. Default\n * `getLocalTimeZone()` — **not** Ark's own machine default (`\"UTC\"`), which is why this is\n * forwarded to `Ark.Root` explicitly rather than only used in this component's own\n * conversions (see `lib/date-value.ts`'s module doc). */\n timeZone?: string\n /** Overrides Ark's own built-in aria-label/accessible-name strings (day cells, prev/next, the\n * view-cycling header, week numbers) — English by default. Unlike `locale`, nothing here\n * auto-derives; supply your own translated strings. Partial — unset keys keep Ark's default. */\n translations?: Partial<CalendarTranslations>\n size?: Size\n className?: string\n classNames?: CalendarClassNames\n }\n\nexport const Calendar = <Range extends boolean = false>({\n range,\n value,\n defaultValue,\n onChange,\n onBlur,\n numOfMonths = 1,\n isDateUnavailable,\n min,\n max,\n minView,\n maxView,\n renderDay,\n fixedWeeks,\n withWeekNumbers,\n locale,\n timeZone,\n translations,\n size = \"md\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n id,\n ref,\n className,\n classNames,\n testId,\n}: CalendarProps<Range>) => {\n const { locale: contextLocale } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const resolvedTimeZone = timeZone ?? getLocalTimeZone()\n const isRange = Boolean(range)\n\n return (\n <Ark.Root\n inline\n ref={ref}\n id={id}\n selectionMode={isRange ? \"range\" : \"single\"}\n locale={resolvedLocale}\n timeZone={resolvedTimeZone}\n translations={resolveCalendarTranslations(translations)}\n value={toArkValues(value, resolvedTimeZone)}\n defaultValue={toArkValues(defaultValue, resolvedTimeZone)}\n onValueChange={\n onChange\n ? // The machine's value is a plain DateValue[]; `range` is a runtime flag here, so\n // narrow the result back to the caller's declared shape.\n (details) =>\n onChange(\n fromArkValues(details.value, isRange, resolvedTimeZone) as Range extends true\n ? DateRangeValue\n : Date | null,\n )\n : undefined\n }\n onBlur={onBlur}\n numOfMonths={numOfMonths}\n fixedWeeks={fixedWeeks}\n // Ark's own prop — its name doesn't follow this kit's `withX` convention, so it stays\n // `showWeekNumbers` even though our public prop is `withWeekNumbers`.\n showWeekNumbers={withWeekNumbers}\n isDateUnavailable={\n isDateUnavailable\n ? (dateValue) =>\n isDateUnavailable(calendarValueToDate(dateValue, resolvedTimeZone), resolvedTimeZone)\n : undefined\n }\n min={min ? dateToCalendarValue(min, resolvedTimeZone) : undefined}\n max={max ? dateToCalendarValue(max, resolvedTimeZone) : undefined}\n minView={minView}\n maxView={maxView}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n invalid={invalid}\n name={name}\n className={cn(\"inline-flex flex-col\", className, classNames?.root)}\n {...props({ \"data-testid\": testId })}\n >\n {/* The machine looks up the currently-focused cell by querying inside the `Content` part\n * (`getFocusedCell` scopes its DOM query to `getContentEl`) to call `.focus()` on it after\n * every arrow-key/Home/End/PageUp/PageDown press — even though `inline` never opens a real\n * popover, that lookup still runs, and with no `Content` element in the DOM at all it\n * always finds nothing, so keyboard navigation updates the machine's internal focus state\n * (visible via `data-focus`) but never moves real DOM focus. `inline` implies `open` (the\n * machine treats it as permanently open), so `Content`'s `hidden={!open}` never hides this. */}\n <Ark.Content>\n <CalendarBody\n numOfMonths={numOfMonths}\n withWeekNumbers={withWeekNumbers}\n renderDay={renderDay}\n size={size}\n timeZone={resolvedTimeZone}\n classNames={classNames}\n />\n </Ark.Content>\n </Ark.Root>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/combobox-list/combobox-list.tsx"],"names":["ArkCombobox"],"mappings":";;;;;;;;;;;;;;AA4GA,IAAM,UAAA,GAAa,CAAC,CAAA,KAAgC,CAAA,KAAM,OAAO,EAAC,GAAI,CAAC,CAAC,CAAA;AAEjE,IAAM,eAAe,CAA6C;AAAA,EACvE,IAAA;AAAA,EACA,KAAA,EAAO,SAAA;AAAA,EACP,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA,GAAc,cAAA;AAAA,EACd,KAAA,GAAQ,eAAA;AAAA,EACR,SAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,UAAA;AAAA,EACV,QAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAA+B;AAK7B,EAAA,MAAM,SAA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EAAO,KAAA,IAAS,EAAA,EAAI;AAAA;AAAA;AAAA,GACxE;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MAEtB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-WHKKN3ZK.js","sourcesContent":["\"use client\"\n\nimport { Combobox as ArkCombobox } from \"@ark-ui/react/combobox\"\nimport { SearchIcon } from \"lucide-react\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo, useState } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport {\n filterSelectData,\n type NormalizedItem,\n normalizeSelectData,\n type RenderableItem,\n type RenderItem,\n type SelectData,\n type SelectValue,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Combobox } from \"../combobox/combobox\"\nimport { type FieldProps, FieldShell } from \"../field/field\"\nimport {\n type InputSize,\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n} from \"../input/input\"\nimport { CloseIcon } from \"../popover/icons\"\nimport { popoverClearTrigger } from \"../popover/popover\"\n\n/**\n * ComboboxList — a searchable, single-value option list with no trigger of its\n * own. It renders permanently open: embed it inline inside a container you\n * already control the visibility of (a `Popover`, a `Drawer`, a custom panel)\n * rather than owning a floating dropdown. For a self-contained trigger +\n * floating panel, use [`Select`](/docs/select) instead — same `data` contract\n * and value shape, just with its own closed/open trigger button.\n *\n * - `data` / `value` / `onChange` match `Select` exactly\n * (`SelectValue<Data> | null`) — the picked value must come from `data`;\n * for free text see [`Autocomplete`](/docs/autocomplete).\n * - Type to filter; `clearable` adds a clear button next to the search icon\n * once there's a value.\n * - Label / description / error come from the built-in `Field`, same as the\n * rest of the family — omit them when embedding inside your own popover.\n */\n\ntype ComboboxListClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The search row (also targeted by `className`). */\n search?: string\n /** The search `<input>`. */\n input?: string\n /** A single option row. */\n option?: string\n /** The scrollable option list. */\n list?: string\n}\n\nexport type ComboboxListProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled value. */\n value?: SelectValue<Data> | null\n /** Uncontrolled initial value. */\n defaultValue?: SelectValue<Data> | null\n /** Fires with the selected value (or `null` when cleared). */\n onChange?: (value: SelectValue<Data> | null) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including any check\n * affordance. Omit it to render the label + selected check.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder for the search field. */\n placeholder?: string\n /** Message shown when no option matches. Pass `null` to render nothing. */\n empty?: ReactNode\n /** Show a clear button once there's a value. */\n clearable?: boolean\n size?: InputSize\n /**\n * Search row treatment. Defaults to `\"unstyled\"` (no border/background) since\n * this is normally embedded inside a container that already draws its own\n * chrome; pass `\"default\"` / `\"filled\"` when using it standalone.\n */\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for native form submission. */\n name?: string\n /** Forwarded to the search input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable search `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: ComboboxListClassNames\n }\n\n/** Wrap a scalar value into Ark's array contract (or clear with `[]`) — same\n * bridge `Select` uses (`toArkValue`, `select.tsx`). */\nconst toArkValue = (v: string | null): string[] => (v === null ? [] : [v])\n\nexport const ComboboxList = <const Data extends SelectData = SelectData>({\n data,\n value: valueProp,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Search…\",\n empty = \"Nothing found\",\n clearable,\n size = \"md\",\n variant = \"unstyled\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n}: ComboboxListProps<Data>) => {\n type Item = SelectValue<Data>\n\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n const [value, setValue] = useUncontrolled<Item | null>({\n value: valueProp,\n defaultValue: defaultValue ?? null,\n onChange,\n })\n const [search, setSearch] = useState(\"\")\n\n // Normalize once per `data`; only the filter re-runs as the query changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const { collection, items, groups } = useMemo(() => {\n const q = search.trim().toLowerCase()\n return filterSelectData(normalized, (item) => q === \"\" || item.label.toLowerCase().includes(q))\n }, [normalized, search])\n\n // `canClear` reserves the clear button's box (and the shell's end-slot\n // padding) for the whole time the field is clearable, not just while it\n // has a value — otherwise the button mounting/unmounting shifts the\n // search input's width. `showClear` only toggles visibility/interactivity.\n const canClear = Boolean(clearable) && !disabled && !readOnly\n const showClear = canClear && (value != null || search.length > 0)\n\n const renderOption = (item: NormalizedItem) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={classNames?.option}\n >\n {renderItem\n ? (state) => renderItem(item as unknown as RenderableItem<Data>, state)\n : item.label}\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root<NormalizedItem>\n collection={collection}\n value={toArkValue(value)}\n // Ark types the value as `string[]`; it always originates from `data`,\n // so narrow it back to the caller's value union.\n onValueChange={(details) => setValue((details.value[0] ?? null) as Item)}\n inputValue={search}\n onInputValueChange={(details) => setSearch(details.inputValue)}\n // There's no trigger to open it — the caller (e.g. a `Popover`) already\n // owns whether this mounts at all, so keep the machine permanently open.\n open\n onOpenChange={() => {}}\n // The caller's own container (Popover, Drawer, …) already owns\n // dismiss-on-outside-click; without this the always-open machine\n // registers its own (functionally inert, since `onOpenChange` is a\n // no-op) listbox dismissable layer, which logs a spurious\n // \"[@zag-js/dismissable] node is `null` or `undefined`\" warning.\n disableLayer\n closeOnSelect={false}\n autoFocus\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n size={size}\n variant={variant}\n className={className}\n >\n <div\n {...props({ \"data-invalid\": isInvalid, \"data-with-end-slot\": canClear })}\n className={cn(\n inputShell({ size, variant }),\n \"rounded-none border-t-0 border-e-0 border-s-0 border-b border-brand-900/20 dark:border-white/15\",\n classNames?.search,\n )}\n >\n <span className={inputSlot} aria-hidden>\n <SearchIcon />\n </span>\n {/* Ark's own Input (a forwardRef) so the caller's `ref` lands on the\n real focusable `<input>` for RHF focus-on-error; the kit's\n `Combobox.Input` wrapper only adds `inputControlClasses`, replicated\n here. */}\n <ArkCombobox.Input\n placeholder={placeholder}\n onBlur={onBlur}\n ref={ref}\n aria-invalid={isInvalid || undefined}\n {...props({ \"data-testid\": testId })}\n className={cn(inputControlClasses, classNames?.input)}\n />\n {canClear && (\n <button\n type=\"button\"\n aria-label=\"Clear value\"\n aria-hidden={!showClear}\n tabIndex={showClear ? 0 : -1}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => {\n setValue(null)\n setSearch(\"\")\n }}\n className={cn(popoverClearTrigger, !showClear && \"invisible\")}\n >\n <CloseIcon />\n </button>\n )}\n </div>\n\n <Combobox.Panel className={classNames?.list}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Panel>\n\n {/* Carries the real selection so a native `<form>` submits it — the\n search input is unnamed (it would submit the typed query, not the\n value). */}\n {name != null && <input type=\"hidden\" name={name} value={value ?? \"\"} />}\n </Combobox.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/select/select.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;;;;;;AAqIA,IAAM,UAAA,GAAa,CAAC,CAAA,KAClB,CAAA,KAAM,MAAA,GAAY,MAAA,GAAY,CAAA,KAAM,IAAA,GAAO,EAAC,GAAI,CAAC,CAAC,CAAA;AAQpD,IAAM,gBAAgB,CAAC;AAAA,EACrB,GAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,KAMmB;AACjB,EAAA,MAAM,QAAQ,eAAA,EAAgB;AAC9B,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAI,OAAA;AAAA,IAAJ;AAAA,MACC,GAAA;AAAA,MACA,MAAA;AAAA,MACA,gBAAc,OAAA,IAAW,MAAA;AAAA,MACxB,GAAG,eAAe,KAAK,CAAA;AAAA,MACvB,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MACnC,SAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ,CAAA;AAEO,IAAM,SAAS,CAA6C;AAAA,EACjE,YAAA,GAAe,IAAA;AAAA,EACf,SAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA,GAAc,cAAA;AAAA,EACd,SAAA;AAAA,EACA,gBAAA,GAAmB,SAAA;AAAA,EACnB,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,SAAA;AAAA,EACV,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,E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EAAW,iBAC1C,QAAA,kBAAA,GAAA,CAACA,QAAA,CAAI,YAAJ,EACC,QAAA,kBAAA,GAAA,CAACA,SAAI,OAAA,EAAJ,EAAY,cAAY,KAAA,EAAO,SAAA,EAAW,GAAG,cAAA,EAAgB,UAAA,EAAY,OAAO,CAAA,EAC/E,8BAACA,QAAA,CAAI,IAAA,EAAJ,EAAS,SAAA,EAAW,WAAA,CAAY,EAAE,cAAA,EAAgB,IAAA,EAAM,CAAA,EACtD,QAAA,EAAA,MAAA,GACG,OAAO,GAAA,CAAI,CAAC,0BACV,IAAA,CAACA,QAAA,CAAI,WAAJ,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA,CAACA,SAAI,cAAA,EAAJ,EAAmB,SAAA,EAAW,iBAAA,EAC5B,gBAAM,KAAA,EACT,CAAA;AAAA,UACC,KAAA,CAAM,KAAA,CAAM,GAAA,CAAI,YAAY;AAAA,SAAA,EAAA,EAJX,KAAA,CAAM,KAK1B,CACD,CAAA,GACD,KAAA,CAAM,IAAI,YAAY,CAAA,EAC5B,CAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,wBAEA,GAAA,CAACA,QAAA,CAAI,YAAA,EAAJ,EAAkB,GAAG,WAAA,EAAa;AAAA;AAAA;AAAA,GACrC;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MACvB,UAAA,EAAY,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAM;AAAA,MAEtC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-WQN64ZHG.js","sourcesContent":["\"use client\"\n\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { Select as Ark } from \"@ark-ui/react/select\"\nimport {\n type ComponentProps,\n type FocusEvent,\n type ReactNode,\n type Ref,\n useMemo,\n useRef,\n} from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport { mergeRefs } from \"../../lib/merge-refs\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { NestedLayer } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport {\n type ClearSectionMode,\n type NormalizedItem,\n normalizeSelectData,\n type RenderableItem,\n type RenderItem,\n type SelectData,\n type SelectValue,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { type FieldProps, FieldShell, fieldA11yProps } from \"../field/field\"\nimport {\n type InputSize,\n type InputVariant,\n inputShell,\n inputSlot,\n placeholderColor,\n shellGap,\n} from \"../input/input\"\nimport { CheckIcon, ChevronIcon, CloseIcon } from \"../popover/icons\"\nimport {\n popoverChevron,\n popoverClearTrigger,\n popoverContent,\n popoverGroupLabel,\n popoverIndicator,\n popoverList,\n popoverOption,\n scrollHighlightedIntoView,\n} from \"../popover/popover\"\n\n/**\n * Select — data-driven single-value picker on Ark UI's Select machine. Pass\n * `data` and it renders: a styled trigger, a popover of options, native form\n * submission (hidden `<select>`), typeahead, and full keyboard / RTL / ARIA from\n * Ark. For a *searchable* picker use `Autocomplete`; for multiple values use\n * `MultiSelect`.\n *\n * - `data` accepts `string[]`, `{ value, label?, disabled? }[]`, or grouped\n * `{ group, items }[]` (see `SelectData`).\n * - Value is a single `string | null`; the machine's array contract is hidden.\n * - Label / description / error come from the built-in `Field` wrapper, so a\n * `Select` is accessible and complete on its own.\n * - `clearable` swaps the chevron for a clear button once a value is set.\n *\n * Palette rides on `data-color`; the trigger reuses the shared input shell and\n * the popover the shared option styling, so Select and Combobox look identical.\n */\n\ntype SelectClassNames = {\n field?: string\n /** The label element itself — e.g. `\"sr-only\"` to keep the accessible name\n * without showing it (pair with a sibling element for a visible label\n * placed elsewhere in the layout). */\n label?: string\n control?: string\n option?: string\n popover?: string\n}\n\nexport type SelectProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled value. */\n value?: SelectValue<Data> | null\n /** Uncontrolled initial value. */\n defaultValue?: SelectValue<Data> | null\n /** Fires with the selected value (or `null` when cleared). */\n onChange?: (value: SelectValue<Data> | null) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including any check\n * affordance. Omit it to render the label + selected check.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder shown while no value is selected. */\n placeholder?: string\n /** Show a clear button (and allow deselecting) once a value is set. */\n clearable?: boolean\n /** Whether the clear button replaces the chevron (`\"replace\"`, default) or sits beside it (`\"both\"`). */\n clearSectionMode?: ClearSectionMode\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before the chevron / clear button. */\n endSlot?: ReactNode\n size?: InputSize\n variant?: InputVariant\n color?: Color\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Wires the hidden `<select>` into native form submission. */\n name?: string\n /** Forwarded to the trigger; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLButtonElement>) => void\n /** Lands on the trigger `<button>` for focus-on-error. */\n ref?: Ref<HTMLButtonElement>\n /** Render the panel in a Portal so it escapes clipping ancestors.\n * Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n className?: string\n classNames?: SelectClassNames\n }\n\n/** Wrap a scalar value into Ark's array contract (or clear with `[]`). */\nconst toArkValue = (v: string | null | undefined): string[] | undefined =>\n v === undefined ? undefined : v === null ? [] : [v]\n\n/**\n * The real, focusable `<button role=\"combobox\">`, split out so it reads the\n * `Field` context from *inside* the wrapping `FieldShell` — `Select` itself\n * renders that shell, so calling `useFieldContext()` at its own top level\n * would run too early.\n */\nconst SelectTrigger = ({\n ref,\n onBlur,\n invalid,\n testId,\n className,\n children,\n}: {\n ref?: Ref<HTMLButtonElement>\n onBlur?: (event: FocusEvent<HTMLButtonElement>) => void\n invalid: boolean\n className?: string\n children: ReactNode\n} & WithTestId) => {\n const field = useFieldContext()\n return (\n <Ark.Trigger\n ref={ref}\n onBlur={onBlur}\n aria-invalid={invalid || undefined}\n {...fieldA11yProps(field)}\n {...props({ \"data-testid\": testId })}\n className={className}\n >\n {children}\n </Ark.Trigger>\n )\n}\n\nexport const Select = <const Data extends SelectData = SelectData>({\n withinPortal = true,\n container,\n data,\n value,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Pick a value\",\n clearable,\n clearSectionMode = \"replace\",\n startSlot,\n endSlot,\n size = \"md\",\n variant = \"default\",\n color,\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n ...selectProps\n}: SelectProps<Data> & Omit<ComponentProps<\"select\">, keyof SelectProps>) => {\n const portalContainer = useOverlayContainer(container)\n const { collection, items, groups } = useMemo(() => normalizeSelectData(data), [data])\n const controlRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLButtonElement>(null)\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n const selected = items.find(({ value: iv }) => value === iv)\n\n const renderOption = (item: NormalizedItem) => (\n <Ark.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={cn(popoverOption({ size }), classNames?.option)}\n >\n {renderItem ? (\n <Ark.ItemContext>\n {(ctx) =>\n renderItem(item as unknown as RenderableItem<Data>, {\n selected: ctx.selected,\n highlighted: ctx.highlighted,\n })\n }\n </Ark.ItemContext>\n ) : (\n <>\n <Ark.ItemText>{item.label}</Ark.ItemText>\n <Ark.ItemIndicator className={popoverIndicator}>\n <CheckIcon />\n </Ark.ItemIndicator>\n </>\n )}\n </Ark.Item>\n )\n\n const control = (\n <Ark.Root\n collection={collection}\n value={toArkValue(value)}\n defaultValue={toArkValue(defaultValue)}\n // The machine's collection is typed by value (`string`); the runtime value\n // always originates from `data`, so narrow it back to the caller's value union.\n onValueChange={\n onChange ? (d) => onChange((d.value[0] ?? null) as SelectValue<Data> | null) : undefined\n }\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n deselectable={clearable}\n // Ark anchors Select's positioner to the Trigger, which sits inside the\n // padded `inputShell` Control — so `sameWidth` would inset the panel. Anchor\n // to the full Control instead (matching Combobox), so the panel aligns with\n // and matches the trigger's width.\n positioning={{\n sameWidth: true,\n getAnchorRect: () => controlRef.current?.getBoundingClientRect() ?? null,\n }}\n // Content is an `overflow-hidden` clip wrapper, so the machine's native\n // auto-scroll (which needs Content scrollable) no-ops; route scrolling to\n // the inner List scroller instead.\n scrollToIndexFn={scrollHighlightedIntoView}\n data-color={color}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\"relative w-full\", className)}\n >\n <Ark.Context>\n {(api) => {\n const showClear = Boolean(clearable) && api.hasSelectedItems && !disabled && !readOnly\n const showChevron = clearSectionMode === \"both\" || !showClear\n return (\n <Ark.Control\n ref={controlRef}\n {...props({\n \"data-invalid\": isInvalid,\n \"data-with-start-slot\": startSlot != null,\n // The trigger always ends in a chevron / clear control.\n \"data-with-end-slot\": true,\n })}\n // Tablet affordance: a tap on the shell's dead zones (padding) opens\n // the menu too, not just the trigger. The trigger, clear and chevron\n // are all buttons, so the helper skips them and they self-handle.\n // Inert when disabled / readOnly, so it never opens where the trigger won't.\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n className={cn(inputShell({ size, variant }), \"cursor-pointer\", classNames?.control)}\n >\n <SelectTrigger\n ref={mergeRefs(triggerRef, ref)}\n onBlur={onBlur}\n invalid={isInvalid}\n testId={testId}\n className={cn(\n \"flex min-w-0 flex-1 cursor-pointer items-center bg-transparent text-start outline-none disabled:cursor-not-allowed\",\n // Slots live inside the trigger (not the shell), so re-apply the\n // shell's per-size gap here to space the icon from the value.\n shellGap[size],\n )}\n >\n {startSlot != null && (\n <span className={inputSlot} aria-hidden>\n {startSlot}\n </span>\n )}\n <span className=\"min-w-0 flex-1 truncate text-start\">\n {api.hasSelectedItems ? (\n renderItem && selected ? (\n renderItem(selected as unknown as RenderableItem<Data>, {\n selected: false,\n highlighted: false,\n })\n ) : (\n api.valueAsString\n )\n ) : (\n <span className={placeholderColor}>{placeholder}</span>\n )}\n </span>\n {endSlot != null && <span className={inputSlot}>{endSlot}</span>}\n </SelectTrigger>\n {showClear && (\n <Ark.ClearTrigger className={popoverClearTrigger}>\n <CloseIcon />\n </Ark.ClearTrigger>\n )}\n {showChevron && (\n // A sibling toggle button (the value `Ark.Trigger` can't nest it\n // next to the clear button), so the chevron sits at the far edge\n // like the rest of the family. Focus the trigger first so keyboard\n // nav stays on the combobox; `preventDefault` stops the tap from\n // stealing focus to this button. `tabIndex=-1`: the trigger is the\n // tab stop.\n <button\n type=\"button\"\n tabIndex={-1}\n aria-label=\"Show options\"\n data-chevron\n className={cn(\n popoverChevron,\n \"inline-flex cursor-pointer items-center justify-center rounded-sm data-disabled:cursor-not-allowed\",\n api.open && \"rotate-180\",\n )}\n {...props({\n \"data-disabled\": disabled,\n \"data-readonly\": readOnly,\n })}\n onPointerDown={(event) => event.preventDefault()}\n {...(!(disabled || readOnly) && {\n onClick: () => {\n triggerRef.current?.focus()\n api.setOpen(!api.open)\n },\n })}\n >\n <ChevronIcon />\n </button>\n )}\n </Ark.Control>\n )\n }}\n </Ark.Context>\n\n {/* Holds an enclosing Modal/Drawer/Popover open while the list is; see `lib/overlay-layer.tsx`. */}\n <Ark.Context>{(api) => <NestedLayer open={api.open} />}</Ark.Context>\n <Portal disabled={!withinPortal} container={portalContainer}>\n <Ark.Positioner>\n <Ark.Content data-color={color} className={cn(popoverContent, classNames?.popover)}>\n <Ark.List className={popoverList({ withPaddingTop: true })}>\n {groups\n ? groups.map((group) => (\n <Ark.ItemGroup key={group.group}>\n <Ark.ItemGroupLabel className={popoverGroupLabel}>\n {group.group}\n </Ark.ItemGroupLabel>\n {group.items.map(renderOption)}\n </Ark.ItemGroup>\n ))\n : items.map(renderOption)}\n </Ark.List>\n </Ark.Content>\n </Ark.Positioner>\n </Portal>\n\n <Ark.HiddenSelect {...selectProps} />\n </Ark.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n classNames={{ label: classNames?.label }}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/table/table.tsx"],"names":[],"mappings":";;;;;;AA6BA,IAAM,cAAA,GAAiB,EAAA;AAAA,EACrB,qDAAA;AAAA;AAAA;AAAA,EAGA;AACF,CAAA;AAcA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACpB;AAAA;AAAA,IAEE,2CAAA;AAAA,IACA,oEAAA;AAAA;AAAA,IAEA,qBAAA;AAAA,IACA,mHAAA;AAAA;AAAA;AAAA;AAAA,IAIA,yDAAA;AAAA,IACA,0FAAA;AAAA;AAAA,IAEA,+EAAA;AAAA,IACA,6CAAA;AAAA,IACA,uIAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA,MAER,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,yDAAA;AAAA,QACJ,EAAA,EAAI,iEAAA;AAAA,QACJ,EAAA,EAAI,6DAAA;AAAA,QACJ,EAAA,EAAI,2DAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,OAAA,EAAS;A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AA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAGK,IAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,SAAA,EAAW;AAAA,EAC5C,OAAA,EAAS,YAAA;AAAA,EACT,KAAA,EAAO,UAAA;AAAA,EACP,OAAA,EAAS,YAAA;AAAA,EACT,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,UAAA,EAAY,eAAA;AAAA,EACZ,IAAA,EAAM;AACR,CAAC","file":"chunk-YBJB7FGE.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * The outermost element: a bordered, rounded surface that `overflow-hidden`\n * clips. Clipping is what keeps the rounded corners intact once the inner\n * scroll region shows a scrollbar (a scrollbar on the *rounded* element would\n * otherwise square off its corners). `flex flex-col` lets an optional\n * `Table.Toolbar` stack above the scroll region.\n *\n * `contain-layout` stops a bug that only shows up when this sits inside an\n * ancestor chain with no *definite* height (e.g. a CSS Grid track sized off\n * `min-height`, not `height` — common when a page fills the viewport via a\n * grid). Without it, a browser can size that indefinite ancestor off this\n * box's unclipped descendants' natural size — the *actual* content behind\n * an internal `overflow-auto`/`max-h-*` scroll region, not its rendered,\n * already-clipped size — inflating the whole page's scroll height in\n * proportion to row count despite this box's own height staying correct.\n * `contain: layout` declares this subtree's size as fully self-contained, so\n * an indefinite ancestor sizes off its real (bounded) box instead. Doesn't\n * affect `stickyHeader`/`stickyFooter` (governed by the nearest *scrolling*\n * ancestor, not containing-block/layout-containment rules) or the absolute-\n * positioned `.table-fade-*` overlays (already resolve against\n * `.table-scroll-frame`'s own `position: relative` in theme.css).\n */\nconst tableContainer = cn(\n \"flex w-full flex-col overflow-hidden contain-layout\",\n // Brand-derived border, matching InputBase/Popover/Modal/Drawer's shell\n // (border-brand-900/20 dark:border-white/15) rather than a neutral gray.\n \"rounded-sm border border-brand-900/20 dark:border-white/15\",\n)\n\n/**\n * All table styling rides on the container as descendant-selector classes, so\n * the part components stay dumb and `size` / `striped` / sticky can live on\n * `<Table>` (the root) without React context — keeping the whole thing a pure\n * Server Component. Every variant value is a static class string so Tailwind\n * v4's scanner keeps it.\n *\n * The `<table>` uses `border-collapse: separate` (see `TableContent`): collapsed\n * borders detach from sticky `<thead>` / `<tfoot>` while scrolling, so the\n * header/footer separators are cell borders (`thead th` bottom, `tfoot td/th`\n * top) that stay put when pinned.\n */\nconst tableVariants = cva(\n [\n // Row separators — on cells, since separate-mode ignores <tr> borders.\n \"[&_tbody_tr:not(:last-child)_td]:border-b\",\n \"[&_tbody_td]:border-brand-900/20 dark:[&_tbody_td]:border-white/15\",\n // Cells\n \"[&_td]:align-middle\",\n \"[&_th]:text-left [&_th]:align-middle [&_th]:font-medium [&_th]:text-gray-light-800 dark:[&_th]:text-gray-dark-200\",\n // Header — subtle fill + a bottom separator that survives sticky. Same\n // brand-tinted fill Popover/Modal/Drawer use for their own surface, at\n // the same /90 light /85 dark opacity recipe.\n \"[&_thead]:bg-brand-50/90 dark:[&_thead]:bg-brand-950/85\",\n \"[&_thead_th]:border-b [&_thead_th]:border-brand-900/20 dark:[&_thead_th]:border-white/15\",\n // Footer — subtle fill + a top separator that survives sticky.\n \"[&_tfoot]:bg-brand-50/90 dark:[&_tfoot]:bg-brand-950/85 [&_tfoot]:font-medium\",\n \"[&_tfoot_th]:border-t [&_tfoot_td]:border-t\",\n \"[&_tfoot_th]:border-brand-900/20 [&_tfoot_td]:border-brand-900/20 dark:[&_tfoot_th]:border-white/15 dark:[&_tfoot_td]:border-white/15\",\n // Excludes a `data-placeholder` row (an empty/error/loading state, e.g.\n // `DataTable`'s) — it has no row to hover, so it shouldn't tint like one.\n // Black/white wash, same convention as Popover/Menu/TreeSelect's own row\n // highlight — background-dependent instead of a fixed per-theme gray.\n \"[&_tbody_tr:not([data-placeholder]):hover]:bg-black/5! dark:[&_tbody_tr:not([data-placeholder]):hover]:bg-white/8! [&_tbody_tr]:transition-colors\",\n ],\n {\n variants: {\n // Cell padding + text scale, keyed to the kit's canonical `Size` scale.\n size: {\n xs: \"text-xs [&_th]:px-2 [&_td]:px-2 [&_th]:py-1 [&_td]:py-1\",\n sm: \"text-sm [&_th]:px-2.5 [&_td]:px-2.5 [&_th]:py-1.5 [&_td]:py-1.5\",\n md: \"text-sm [&_th]:px-3 [&_td]:px-3 [&_th]:py-2.5 [&_td]:py-2.5\",\n lg: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-3 [&_td]:py-3\",\n xl: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-4 [&_td]:py-4\",\n },\n striped: {\n true: \"[&_tbody_tr:nth-child(even)]:bg-black/3 dark:[&_tbody_tr:nth-child(even)]:bg-white/4\",\n false: \"\",\n },\n },\n defaultVariants: { size: \"md\", striped: false },\n },\n)\n\n/** Pin the whole `<thead>` to the top of the scroll region; `backdrop-blur`\n * keeps scrolled body rows legible behind the translucent header fill. */\nconst stickyHeaderClasses =\n \"[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [&_thead]:backdrop-blur-lg\"\n\n/** Pin the whole `<tfoot>` (e.g. a totals row) to the bottom of the scroll region. */\nconst stickyFooterClasses =\n \"[&_tfoot]:sticky [&_tfoot]:bottom-0 [&_tfoot]:z-10 [&_tfoot]:backdrop-blur-lg\"\n\n/** `Table`'s density scale — the kit's canonical `Size` (xs–xl). */\nexport type TableSize = Size\n\nexport type TableProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof tableVariants> &\n WithTestId & {\n /** Pins the header row during vertical scroll. Needs a bounded height —\n * set `max-h-*` on `Table` or `Table.Content`. */\n stickyHeader?: boolean\n /** Pins a `Table.Foot` row (e.g. totals) to the bottom during vertical\n * scroll. Same bounded-height requirement as `stickyHeader`. */\n stickyFooter?: boolean\n }\n\n/**\n * Table — a dumb, styled semantic `<table>` inside a bordered, rounded surface.\n * Pure React Server Component (no `\"use client\"`): static markup, no state, so\n * it's safe in an RSC tree and usable for static / MDX tables. Composed from\n * namespaced parts: an optional non-table header (`Table.Toolbar` +\n * `Table.Title` for a title and actions), a `Table.Content` scroll region that\n * holds the `<table>`, and the semantic parts `Table.Head` / `Table.Body` /\n * `Table.Foot` / `Table.Row` / `Table.HeaderCell` / `Table.Cell`.\n *\n * Density (`size`), `striped`, and `stickyHeader` / `stickyFooter` ride on\n * `<Table>` and style the table via descendant selectors. To pin a header or\n * footer, give the scroll region a bounded height (`max-h-*` on `Table` or\n * `Table.Content`). The rounded border is `overflow-hidden`, so the corners\n * stay intact even once a scrollbar appears. There is no `variant`×`color`\n * axis — a table retints from `:root` slot vars via CSS.\n *\n * <Table striped size=\"sm\" stickyHeader className=\"max-h-80\">\n * <Table.Toolbar>\n * <Table.Title>Users</Table.Title>\n * <Button size=\"sm\">Add</Button>\n * </Table.Toolbar>\n * <Table.Content>\n * <Table.Head>\n * <Table.Row>\n * <Table.HeaderCell>Name</Table.HeaderCell>\n * <Table.HeaderCell className=\"text-right\">Age</Table.HeaderCell>\n * </Table.Row>\n * </Table.Head>\n * <Table.Body>\n * <Table.Row>\n * <Table.Cell>Ada</Table.Cell>\n * <Table.Cell className=\"text-right\">36</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table.Content>\n * </Table>\n */\nconst TableRoot = ({\n className,\n size,\n striped,\n stickyHeader,\n stickyFooter,\n testId,\n ...rest\n}: TableProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n tableContainer,\n tableVariants({ size, striped }),\n stickyHeader && stickyHeaderClasses,\n stickyFooter && stickyFooterClasses,\n className,\n )}\n />\n)\n\nexport type TableToolbarProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Non-`<table>` header bar: a title + actions row above the scroll region,\n * separated by a bottom border. `shrink-0` so it never collapses when the\n * content scrolls. */\nconst TableToolbar = ({ className, testId, ...rest }: TableToolbarProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-b border-brand-900/20 px-3 ps-5 py-3 dark:border-white/15\",\n className,\n )}\n />\n)\n\nexport type TableTitleProps = HTMLArkProps<\"h3\"> & WithTestId\n\nconst TableTitle = ({ className, testId, ...rest }: TableTitleProps) => (\n <ark.h3\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\"font-semibold tracking-normal\", className)}\n />\n)\n\nexport type TableContentProps = HTMLArkProps<\"table\"> &\n WithTestId & {\n /** Style the inner `<table>` element; `className` targets the scroll region. */\n classNames?: { table?: string }\n }\n\n/** The scroll region + the `<table>`, framed so horizontal scroll affordances\n * (soft edge shadows on each side with more to scroll) can overlay it. `className`\n * bounds the scroll surface (`max-h-*` here bounds a sticky header/footer);\n * `classNames.table` styles the `<table>`. `border-separate` keeps sticky\n * header/footer borders. The `table-scroll-*` / `table-fade-*` classes are the\n * scroll-driven-animation affordance defined in theme.css. */\nconst TableContent = ({ className, classNames, testId, ...rest }: TableContentProps) => (\n <div className={cn(\"table-scroll-frame flex min-h-0 flex-1 flex-col\", className)}>\n <div className=\"table-scroll-x min-h-0 w-full flex-1 overflow-auto\">\n <ark.table\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"w-full border-separate border-spacing-0 text-left text-gray-light-900 dark:text-gray-dark-25\",\n classNames?.table,\n )}\n />\n </div>\n {/* Horizontal scroll affordance — a soft shadow on each side that still has\n content to scroll to (pure CSS, hidden where unsupported). */}\n <div\n aria-hidden=\"true\"\n className=\"table-fade-start pointer-events-none absolute inset-y-0 left-0 w-6\"\n />\n <div\n aria-hidden=\"true\"\n className=\"table-fade-end pointer-events-none absolute inset-y-0 right-0 w-6\"\n />\n </div>\n)\n\nexport type TableHeadProps = HTMLArkProps<\"thead\"> & WithTestId\n\n// Parts are dumb: all styling is driven by the root's descendant selectors, so\n// they just forward a caller className (through `cn` when present).\nconst TableHead = ({ className, testId, ...rest }: TableHeadProps) => (\n <ark.thead\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableBodyProps = HTMLArkProps<\"tbody\"> & WithTestId\n\nconst TableBody = ({ className, testId, ...rest }: TableBodyProps) => (\n <ark.tbody\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableFootProps = HTMLArkProps<\"tfoot\"> & WithTestId\n\nconst TableFoot = ({ className, testId, ...rest }: TableFootProps) => (\n <ark.tfoot\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableRowProps = HTMLArkProps<\"tr\"> & WithTestId\n\nconst TableRow = ({ className, testId, ...rest }: TableRowProps) => (\n <ark.tr\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableHeaderCellProps = HTMLArkProps<\"th\"> & WithTestId\n\nconst TableHeaderCell = ({ className, scope = \"col\", testId, ...rest }: TableHeaderCellProps) => (\n <ark.th\n scope={scope}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableCellProps = HTMLArkProps<\"td\"> & WithTestId\n\nconst TableCell = ({ className, testId, ...rest }: TableCellProps) => (\n <ark.td\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport const Table = Object.assign(TableRoot, {\n Toolbar: TableToolbar,\n Title: TableTitle,\n Content: TableContent,\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n})\n"]}
|