@42-central/ui-react 0.18.2 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-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/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 +6 -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 +1 -2
- package/package.json +1 -1
- 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.tsx +6 -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 +1 -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,58 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ThemeIcon } from '../../chunk-
|
|
2
|
+
import { ThemeIcon } from '../../chunk-BTFBBNRW.js';
|
|
3
3
|
import '../../chunk-ZP6EBROY.js';
|
|
4
|
-
import { Table } from '../../chunk-
|
|
4
|
+
import { Table } from '../../chunk-CZEKZ5HR.js';
|
|
5
5
|
import { Text } from '../../chunk-CSCVTESP.js';
|
|
6
|
-
import { Select } from '../../chunk-
|
|
6
|
+
import { Select } from '../../chunk-SVKU3GUN.js';
|
|
7
7
|
import { Skeleton } from '../../chunk-CHTN5AHI.js';
|
|
8
8
|
import '../../chunk-R5GMMWAY.js';
|
|
9
9
|
import '../../chunk-BJZLQTAZ.js';
|
|
10
|
-
import { Root, Trigger, Content, CheckboxItem } from '../../chunk-
|
|
11
|
-
import { MultiComboboxList } from '../../chunk-
|
|
12
|
-
import { Pill } from '../../chunk-
|
|
13
|
-
import { serializeDateValue, DatePicker } from '../../chunk-
|
|
14
|
-
import { resolveHourCycle } from '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
16
|
-
import { NumberInput } from '../../chunk-
|
|
10
|
+
import { Root, Trigger, Content, CheckboxItem } from '../../chunk-64T6Z7BA.js';
|
|
11
|
+
import { MultiComboboxList } from '../../chunk-UJZIF2BA.js';
|
|
12
|
+
import { Pill } from '../../chunk-RKYXG6X7.js';
|
|
13
|
+
import { serializeDateValue, DatePicker } from '../../chunk-OGJFDNIS.js';
|
|
14
|
+
import { resolveHourCycle } from '../../chunk-Z43YWH4R.js';
|
|
15
|
+
import '../../chunk-HCYULRWT.js';
|
|
16
|
+
import { NUMBER_INPUT_DEFAULT_TRANSLATIONS, NumberInput } from '../../chunk-GCGX4FEF.js';
|
|
17
17
|
import '../../chunk-FMMKEYHB.js';
|
|
18
18
|
import { Flex } from '../../chunk-YKUCSV34.js';
|
|
19
|
-
import { ComboboxList } from '../../chunk-
|
|
20
|
-
import { resolveCalendarTranslations } from '../../chunk-
|
|
21
|
-
import '../../chunk-
|
|
19
|
+
import { ComboboxList } from '../../chunk-YW6Q6ERX.js';
|
|
20
|
+
import { resolveCalendarTranslations } from '../../chunk-VZBUQNLX.js';
|
|
21
|
+
import '../../chunk-ZB5VMGKB.js';
|
|
22
22
|
import { Card } from '../../chunk-VZH6TS7M.js';
|
|
23
|
-
import { Checkbox } from '../../chunk-
|
|
24
|
-
import '../../chunk-
|
|
23
|
+
import { Checkbox } from '../../chunk-CYWMES5P.js';
|
|
24
|
+
import '../../chunk-FOMR74VE.js';
|
|
25
25
|
import '../../chunk-UVYTJQTJ.js';
|
|
26
|
-
import { Drawer } from '../../chunk-
|
|
26
|
+
import { Drawer } from '../../chunk-DBTJEBMO.js';
|
|
27
27
|
import '../../chunk-5FDOOG4J.js';
|
|
28
28
|
import '../../chunk-TWGCWKRV.js';
|
|
29
|
-
import '../../chunk-
|
|
30
|
-
import { Input } from '../../chunk-
|
|
31
|
-
import '../../chunk-
|
|
29
|
+
import { COMBOBOX_DEFAULT_TRANSLATIONS } from '../../chunk-PINENGML.js';
|
|
30
|
+
import { Input } from '../../chunk-Z6RPMRFH.js';
|
|
31
|
+
import '../../chunk-TBTSEPGP.js';
|
|
32
32
|
import '../../chunk-SKPM2FRX.js';
|
|
33
33
|
import '../../chunk-ORTCK34Y.js';
|
|
34
|
-
import { Button } from '../../chunk-
|
|
35
|
-
import '../../chunk-
|
|
36
|
-
import
|
|
34
|
+
import { Button } from '../../chunk-QIDAXFKK.js';
|
|
35
|
+
import { useTimeZone } from '../../chunk-57BTVRRB.js';
|
|
36
|
+
import '../../chunk-OC7I2CTA.js';
|
|
37
|
+
import { Tooltip } from '../../chunk-2NNZHVKD.js';
|
|
37
38
|
import '../../chunk-G52U24GR.js';
|
|
38
|
-
import { Popover } from '../../chunk-
|
|
39
|
+
import { Popover } from '../../chunk-LM6F6DLR.js';
|
|
39
40
|
import '../../chunk-AIQG7IIT.js';
|
|
40
41
|
import '../../chunk-7P32XCEU.js';
|
|
41
42
|
import '../../chunk-BUIHQJGE.js';
|
|
42
43
|
import '../../chunk-2GILNBZW.js';
|
|
43
|
-
import { ActionIcon } from '../../chunk-
|
|
44
|
+
import { ActionIcon } from '../../chunk-RIP5G47F.js';
|
|
44
45
|
import { useUncontrolled } from '../../chunk-BEL75C7N.js';
|
|
45
46
|
import '../../chunk-IG7FBZVM.js';
|
|
46
|
-
import '../../chunk-
|
|
47
|
+
import '../../chunk-PS2PZFXH.js';
|
|
47
48
|
import '../../chunk-I4SQQIP5.js';
|
|
48
49
|
import { props } from '../../chunk-WYCMIIRR.js';
|
|
49
|
-
import { focusStyles } from '../../chunk-
|
|
50
|
+
import { focusStyles } from '../../chunk-INJUILCN.js';
|
|
50
51
|
import { cn } from '../../chunk-QP4I37PA.js';
|
|
51
52
|
import { tableFeatures, filterFn_weakEquals, filterFn_inDateRange, filterFn_arrIncludes, filterFn_equals, filterFn_inNumberRange, filterFn_includesString, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_alphanumeric, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, rowSelectionFeature, rowPaginationFeature, rowSortingFeature, globalFilteringFeature, columnFilteringFeature, createPaginatedRowModel, createSortedRowModel, createFilteredRowModel, useTable, flexRender, createColumnHelper as createColumnHelper$1 } from '@tanstack/react-table';
|
|
52
|
-
import {
|
|
53
|
+
import { useRef, useMemo, useState, useEffect } from 'react';
|
|
53
54
|
import { match, P } from 'ts-pattern';
|
|
54
55
|
import { useLocaleContext } from '@ark-ui/react/locale';
|
|
55
|
-
import {
|
|
56
|
+
import { parseDateTime, parseDate } from '@internationalized/date';
|
|
56
57
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
57
58
|
import { ServerCrashIcon, RotateCwIcon, SearchAlertIcon, EraserIcon, ChevronLeft, ChevronRight, Search, Columns3CogIcon, ListFilterIcon, ChevronsUpDownIcon, ChevronDownIcon, ChevronUpIcon, ArrowUpToLineIcon, ArrowDownToLineIcon } from 'lucide-react';
|
|
58
59
|
import { cva } from 'class-variance-authority';
|
|
@@ -99,6 +100,31 @@ var dataTableFeatures = tableFeatures({
|
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
var createColumnHelper = () => createColumnHelper$1();
|
|
103
|
+
|
|
104
|
+
// src/components/data-table/data-table-translations.ts
|
|
105
|
+
var SORT_MODE_LABEL = { asc: "ascending", desc: "descending", none: "none" };
|
|
106
|
+
var DATA_TABLE_DEFAULT_TRANSLATIONS = {
|
|
107
|
+
selectAllRows: "Select all rows",
|
|
108
|
+
selectRow: (rowId) => `Select row ${rowId}`,
|
|
109
|
+
columnVisibility: "Toggle column visibility",
|
|
110
|
+
resizeColumn: (label) => `Resize ${label} column`,
|
|
111
|
+
sortColumn: (label, mode) => `Sort ${label} (${SORT_MODE_LABEL[mode]})`,
|
|
112
|
+
filterColumn: (label, active) => active ? `Filter ${label} (active)` : `Filter ${label}`,
|
|
113
|
+
tableOptions: "Table options",
|
|
114
|
+
tableOptionsActive: (count) => `Table options (${count} active)`,
|
|
115
|
+
columns: "Columns",
|
|
116
|
+
sortBy: "Sort by",
|
|
117
|
+
clearSorts: "Clear sorts",
|
|
118
|
+
filters: "Filters",
|
|
119
|
+
clearFilters: "Clear filters",
|
|
120
|
+
retry: "Retry",
|
|
121
|
+
min: "Min",
|
|
122
|
+
max: "Max",
|
|
123
|
+
clearTriggerLabel: COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel,
|
|
124
|
+
incrementLabel: NUMBER_INPUT_DEFAULT_TRANSLATIONS.incrementLabel,
|
|
125
|
+
decrementLabel: NUMBER_INPUT_DEFAULT_TRANSLATIONS.decrementLabel
|
|
126
|
+
};
|
|
127
|
+
var resolveDataTableTranslations = (overrides) => overrides ? { ...DATA_TABLE_DEFAULT_TRANSLATIONS, ...overrides } : DATA_TABLE_DEFAULT_TRANSLATIONS;
|
|
102
128
|
var toDateBounds = (value) => {
|
|
103
129
|
if (!value) return ["", ""];
|
|
104
130
|
if (value.op === "between") return [value.from ?? "", value.to ?? ""];
|
|
@@ -123,7 +149,7 @@ var DateFilterPopover = ({
|
|
|
123
149
|
onClose
|
|
124
150
|
}) => {
|
|
125
151
|
const { locale } = useLocaleContext();
|
|
126
|
-
const timeZone = timeZoneProp
|
|
152
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
127
153
|
const hourCycle = resolveHourCycle({ locale });
|
|
128
154
|
return /* @__PURE__ */ jsx(
|
|
129
155
|
DatePicker.Root,
|
|
@@ -294,9 +320,15 @@ var toBounds = (filter) => {
|
|
|
294
320
|
var NumberFilter = ({
|
|
295
321
|
column,
|
|
296
322
|
min,
|
|
297
|
-
max
|
|
323
|
+
max,
|
|
324
|
+
translations
|
|
298
325
|
}) => {
|
|
299
326
|
const [lo, hi] = toBounds(getNumberFilterValue(column));
|
|
327
|
+
const inputTranslations = {
|
|
328
|
+
clearTriggerLabel: translations.clearTriggerLabel,
|
|
329
|
+
incrementLabel: translations.incrementLabel,
|
|
330
|
+
decrementLabel: translations.decrementLabel
|
|
331
|
+
};
|
|
300
332
|
const commit = (nextLo, nextHi) => {
|
|
301
333
|
if (nextLo == null && nextHi == null) {
|
|
302
334
|
setNumberFilterValue(column, void 0);
|
|
@@ -314,12 +346,13 @@ var NumberFilter = ({
|
|
|
314
346
|
NumberInput,
|
|
315
347
|
{
|
|
316
348
|
size: "sm",
|
|
317
|
-
placeholder:
|
|
349
|
+
placeholder: translations.max,
|
|
318
350
|
testId: "number-filter-max",
|
|
319
351
|
min,
|
|
320
352
|
max,
|
|
321
353
|
value: hi,
|
|
322
354
|
clearable: true,
|
|
355
|
+
translations: inputTranslations,
|
|
323
356
|
startSlot: /* @__PURE__ */ jsx(ArrowUpToLineIcon, {}),
|
|
324
357
|
onChange: (next) => commit(lo, next)
|
|
325
358
|
}
|
|
@@ -328,12 +361,13 @@ var NumberFilter = ({
|
|
|
328
361
|
NumberInput,
|
|
329
362
|
{
|
|
330
363
|
size: "sm",
|
|
331
|
-
placeholder:
|
|
364
|
+
placeholder: translations.min,
|
|
332
365
|
testId: "number-filter-min",
|
|
333
366
|
min,
|
|
334
367
|
max,
|
|
335
368
|
value: lo,
|
|
336
369
|
clearable: true,
|
|
370
|
+
translations: inputTranslations,
|
|
337
371
|
startSlot: /* @__PURE__ */ jsx(ArrowDownToLineIcon, {}),
|
|
338
372
|
onChange: (next) => commit(next, hi)
|
|
339
373
|
}
|
|
@@ -345,6 +379,7 @@ var SelectFilter = ({
|
|
|
345
379
|
options,
|
|
346
380
|
multiple,
|
|
347
381
|
renderItem,
|
|
382
|
+
translations,
|
|
348
383
|
onClose
|
|
349
384
|
}) => multiple ? /* @__PURE__ */ jsx(
|
|
350
385
|
MultiComboboxList,
|
|
@@ -353,6 +388,7 @@ var SelectFilter = ({
|
|
|
353
388
|
data: options,
|
|
354
389
|
clearable: true,
|
|
355
390
|
renderItem,
|
|
391
|
+
translations,
|
|
356
392
|
value: column.getFilterValue() ?? [],
|
|
357
393
|
onChange: (value) => column.setFilterValue(value.length > 0 ? value : void 0)
|
|
358
394
|
}
|
|
@@ -363,6 +399,7 @@ var SelectFilter = ({
|
|
|
363
399
|
data: options,
|
|
364
400
|
clearable: true,
|
|
365
401
|
renderItem,
|
|
402
|
+
translations,
|
|
366
403
|
value: column.getFilterValue() ?? null,
|
|
367
404
|
onChange: (value) => {
|
|
368
405
|
column.setFilterValue(value ?? void 0);
|
|
@@ -480,6 +517,7 @@ var hasActiveFilterValue = (value) => {
|
|
|
480
517
|
var DataTableFilterControl = ({
|
|
481
518
|
column,
|
|
482
519
|
filter,
|
|
520
|
+
translations = DATA_TABLE_DEFAULT_TRANSLATIONS,
|
|
483
521
|
onClose
|
|
484
522
|
}) => match(filter).with({ type: "text" }, (f) => /* @__PURE__ */ jsx(TextFilter, { column, placeholder: f.placeholder, debounce: f.debounce })).with({ type: "select" }, (f) => /* @__PURE__ */ jsx(
|
|
485
523
|
SelectFilter,
|
|
@@ -488,9 +526,10 @@ var DataTableFilterControl = ({
|
|
|
488
526
|
options: f.options,
|
|
489
527
|
multiple: f.multiple,
|
|
490
528
|
renderItem: f.renderItem,
|
|
529
|
+
translations: { clearTriggerLabel: translations.clearTriggerLabel },
|
|
491
530
|
onClose
|
|
492
531
|
}
|
|
493
|
-
)).with({ type: "number" }, (f) => /* @__PURE__ */ jsx(NumberFilter, { column, min: f.min, max: f.max })).with({ type: "date" }, (f) => /* @__PURE__ */ jsx(
|
|
532
|
+
)).with({ type: "number" }, (f) => /* @__PURE__ */ jsx(NumberFilter, { column, min: f.min, max: f.max, translations })).with({ type: "date" }, (f) => /* @__PURE__ */ jsx(
|
|
494
533
|
DateFilter,
|
|
495
534
|
{
|
|
496
535
|
column,
|
|
@@ -512,19 +551,10 @@ var DataTableFilterControl = ({
|
|
|
512
551
|
}
|
|
513
552
|
)).exhaustive();
|
|
514
553
|
var RESIZE_STEP = 5;
|
|
515
|
-
var
|
|
516
|
-
asc:
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
},
|
|
520
|
-
desc: {
|
|
521
|
-
icon: ChevronDownIcon,
|
|
522
|
-
label: "descending"
|
|
523
|
-
},
|
|
524
|
-
none: {
|
|
525
|
-
icon: ChevronsUpDownIcon,
|
|
526
|
-
label: "none"
|
|
527
|
-
}
|
|
554
|
+
var SORT_ICON = {
|
|
555
|
+
asc: ChevronUpIcon,
|
|
556
|
+
desc: ChevronDownIcon,
|
|
557
|
+
none: ChevronsUpDownIcon
|
|
528
558
|
};
|
|
529
559
|
var columnLabel = (column) => {
|
|
530
560
|
if (column.columnDef.meta?.label) return column.columnDef.meta.label;
|
|
@@ -542,6 +572,7 @@ var tableHeaderCell = cva(["flex items-center gap-3"], {
|
|
|
542
572
|
});
|
|
543
573
|
function DataTableHeaderCell({
|
|
544
574
|
header,
|
|
575
|
+
translations,
|
|
545
576
|
truncate = true
|
|
546
577
|
}) {
|
|
547
578
|
const { column } = header;
|
|
@@ -555,12 +586,29 @@ function DataTableHeaderCell({
|
|
|
555
586
|
"flex flex-row justify-center align-center"
|
|
556
587
|
);
|
|
557
588
|
return /* @__PURE__ */ jsxs("div", { className: tableHeaderCell({ align }), children: [
|
|
558
|
-
canSort ? /* @__PURE__ */ jsx(
|
|
559
|
-
|
|
589
|
+
canSort ? /* @__PURE__ */ jsx(
|
|
590
|
+
DataTablerHeaderSort,
|
|
591
|
+
{
|
|
592
|
+
column,
|
|
593
|
+
label: translations.sortColumn(ariaLabel, column.getIsSorted() || "none"),
|
|
594
|
+
labelClassName,
|
|
595
|
+
children: label
|
|
596
|
+
}
|
|
597
|
+
) : /* @__PURE__ */ jsx("span", { className: labelClassName, children: label }),
|
|
598
|
+
filter ? /* @__PURE__ */ jsx(
|
|
599
|
+
DataTableHeaderFilter,
|
|
600
|
+
{
|
|
601
|
+
column,
|
|
602
|
+
filter,
|
|
603
|
+
label: ariaLabel,
|
|
604
|
+
translations
|
|
605
|
+
}
|
|
606
|
+
) : null
|
|
560
607
|
] });
|
|
561
608
|
}
|
|
562
609
|
function DataTableColumnResizeHandle({
|
|
563
|
-
header
|
|
610
|
+
header,
|
|
611
|
+
translations
|
|
564
612
|
}) {
|
|
565
613
|
const { column } = header;
|
|
566
614
|
const ref = useRef(null);
|
|
@@ -601,7 +649,7 @@ function DataTableColumnResizeHandle({
|
|
|
601
649
|
onKeyDown: handleKeyDown,
|
|
602
650
|
role: "separator",
|
|
603
651
|
"aria-orientation": "vertical",
|
|
604
|
-
"aria-label":
|
|
652
|
+
"aria-label": translations.resizeColumn(label),
|
|
605
653
|
"aria-valuenow": header.getSize(),
|
|
606
654
|
"aria-valuemin": minSize,
|
|
607
655
|
"aria-valuemax": maxSize === Number.MAX_SAFE_INTEGER ? void 0 : maxSize,
|
|
@@ -628,8 +676,7 @@ function DataTablerHeaderSort({
|
|
|
628
676
|
labelClassName,
|
|
629
677
|
children
|
|
630
678
|
}) {
|
|
631
|
-
const
|
|
632
|
-
const { icon: Icon, label: mode } = SORT_LOOKUP[sort];
|
|
679
|
+
const Icon = SORT_ICON[column.getIsSorted() || "none"];
|
|
633
680
|
return /* @__PURE__ */ jsxs(
|
|
634
681
|
"button",
|
|
635
682
|
{
|
|
@@ -645,7 +692,7 @@ function DataTablerHeaderSort({
|
|
|
645
692
|
// surface-matched pair rather than the helper's own offset.
|
|
646
693
|
"focus-visible:ring-offset-2 focus-visible:ring-offset-brand-50 dark:focus-visible:ring-offset-brand-950"
|
|
647
694
|
),
|
|
648
|
-
"aria-label":
|
|
695
|
+
"aria-label": label,
|
|
649
696
|
children: [
|
|
650
697
|
/* @__PURE__ */ jsx("span", { className: cn("truncate", labelClassName), children }),
|
|
651
698
|
/* @__PURE__ */ jsx(
|
|
@@ -665,7 +712,8 @@ function DataTablerHeaderSort({
|
|
|
665
712
|
function DataTableHeaderFilter({
|
|
666
713
|
column,
|
|
667
714
|
filter,
|
|
668
|
-
label
|
|
715
|
+
label,
|
|
716
|
+
translations
|
|
669
717
|
}) {
|
|
670
718
|
const active = hasActiveFilterValue(column.getFilterValue());
|
|
671
719
|
const [open, setOpen] = useState(false);
|
|
@@ -698,11 +746,19 @@ function DataTableHeaderFilter({
|
|
|
698
746
|
"relative before:absolute before:-top-0.5 before:-inset-e-0.5 before:size-1 before:rounded-full dark:before:bg-gray-dark-50 before:bg-gray-light-950": active
|
|
699
747
|
}
|
|
700
748
|
),
|
|
701
|
-
"aria-label":
|
|
749
|
+
"aria-label": translations.filterColumn(label, active),
|
|
702
750
|
children: /* @__PURE__ */ jsx(ListFilterIcon, {})
|
|
703
751
|
}
|
|
704
752
|
) }),
|
|
705
|
-
/* @__PURE__ */ jsx(Popover.Content, { className: "min-w-48", children: /* @__PURE__ */ jsx(Popover.Body, { className: "overflow-visible p-0", children: /* @__PURE__ */ jsx(
|
|
753
|
+
/* @__PURE__ */ jsx(Popover.Content, { className: "min-w-48", children: /* @__PURE__ */ jsx(Popover.Body, { className: "overflow-visible p-0", children: /* @__PURE__ */ jsx(
|
|
754
|
+
DataTableFilterControl,
|
|
755
|
+
{
|
|
756
|
+
column,
|
|
757
|
+
filter,
|
|
758
|
+
translations,
|
|
759
|
+
onClose: () => setOpen(false)
|
|
760
|
+
}
|
|
761
|
+
) }) })
|
|
706
762
|
]
|
|
707
763
|
}
|
|
708
764
|
);
|
|
@@ -711,7 +767,8 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
711
767
|
rows: "Rows per page",
|
|
712
768
|
items: ({ totalKnown, from, hits, to }) => totalKnown ? `${from} to ${to} of ${hits}` : `${from} to ${to}`,
|
|
713
769
|
previousPage: "Previous page",
|
|
714
|
-
nextPage: "Next page"
|
|
770
|
+
nextPage: "Next page",
|
|
771
|
+
triggerLabel: COMBOBOX_DEFAULT_TRANSLATIONS.triggerLabel
|
|
715
772
|
};
|
|
716
773
|
function DataTablePagination({
|
|
717
774
|
table,
|
|
@@ -760,6 +817,7 @@ function DataTablePagination({
|
|
|
760
817
|
value: String(pageSize),
|
|
761
818
|
onChange: (value) => value && table.setPageSize(Number(value)),
|
|
762
819
|
disabled: sizeOptions.length <= 1,
|
|
820
|
+
translations: { triggerLabel: translations.triggerLabel },
|
|
763
821
|
className: "w-24"
|
|
764
822
|
}
|
|
765
823
|
),
|
|
@@ -830,7 +888,8 @@ function DataTableStackedRows({
|
|
|
830
888
|
onRetry,
|
|
831
889
|
table,
|
|
832
890
|
className,
|
|
833
|
-
skeletonRowCount
|
|
891
|
+
skeletonRowCount,
|
|
892
|
+
translations
|
|
834
893
|
}) {
|
|
835
894
|
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-1 min-h-0 flex-col gap-2 overflow-y-auto p-3", className), children: match(view).with("error", () => /* @__PURE__ */ jsxs(
|
|
836
895
|
"div",
|
|
@@ -851,7 +910,7 @@ function DataTableStackedRows({
|
|
|
851
910
|
size: "sm",
|
|
852
911
|
startSlot: /* @__PURE__ */ jsx(RotateCwIcon, {}),
|
|
853
912
|
onClick: onRetry,
|
|
854
|
-
children:
|
|
913
|
+
children: translations.retry
|
|
855
914
|
}
|
|
856
915
|
)
|
|
857
916
|
}
|
|
@@ -878,7 +937,7 @@ function DataTableStackedRows({
|
|
|
878
937
|
size: "sm",
|
|
879
938
|
startSlot: /* @__PURE__ */ jsx(EraserIcon, {}),
|
|
880
939
|
onClick: () => table.resetColumnFilters(),
|
|
881
|
-
children:
|
|
940
|
+
children: translations.clearFilters
|
|
882
941
|
}
|
|
883
942
|
)
|
|
884
943
|
}
|
|
@@ -929,6 +988,7 @@ function DataTableStackedRows({
|
|
|
929
988
|
function DataTableStackOptions({
|
|
930
989
|
table,
|
|
931
990
|
enableColumnVisibility,
|
|
991
|
+
translations,
|
|
932
992
|
className
|
|
933
993
|
}) {
|
|
934
994
|
const [open, setOpen] = useState(false);
|
|
@@ -955,8 +1015,8 @@ function DataTableStackOptions({
|
|
|
955
1015
|
startSlot: /* @__PURE__ */ jsx(ListFilterIcon, {}),
|
|
956
1016
|
endSlot: activeCount > 0 ? /* @__PURE__ */ jsx(Pill, { size: "xs", children: activeCount }) : void 0,
|
|
957
1017
|
onClick: () => setOpen(true),
|
|
958
|
-
"aria-label": activeCount > 0 ?
|
|
959
|
-
children:
|
|
1018
|
+
"aria-label": activeCount > 0 ? translations.tableOptionsActive(activeCount) : translations.tableOptions,
|
|
1019
|
+
children: translations.tableOptions
|
|
960
1020
|
}
|
|
961
1021
|
),
|
|
962
1022
|
/* @__PURE__ */ jsx(
|
|
@@ -965,14 +1025,15 @@ function DataTableStackOptions({
|
|
|
965
1025
|
placement: "bottom",
|
|
966
1026
|
withGrabber: true,
|
|
967
1027
|
size: "lg",
|
|
968
|
-
title:
|
|
1028
|
+
title: translations.tableOptions,
|
|
1029
|
+
translations: { closeTriggerLabel: translations.closeTriggerLabel },
|
|
969
1030
|
open,
|
|
970
1031
|
onOpenChange: setOpen,
|
|
971
1032
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
972
1033
|
enableColumnVisibility && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
973
1034
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
974
1035
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
975
|
-
|
|
1036
|
+
translations.columns
|
|
976
1037
|
] }),
|
|
977
1038
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1.5", children: table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu).map((column) => /* @__PURE__ */ jsx(
|
|
978
1039
|
Checkbox,
|
|
@@ -992,7 +1053,7 @@ function DataTableStackOptions({
|
|
|
992
1053
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
993
1054
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
994
1055
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
995
|
-
|
|
1056
|
+
translations.sortBy
|
|
996
1057
|
] }),
|
|
997
1058
|
activeSortCount > 0 ? /* @__PURE__ */ jsx(
|
|
998
1059
|
"button",
|
|
@@ -1000,13 +1061,13 @@ function DataTableStackOptions({
|
|
|
1000
1061
|
type: "button",
|
|
1001
1062
|
onClick: () => table.resetSorting(),
|
|
1002
1063
|
className: "text-xs font-medium text-gray-light-500 hover:text-gray-light-900 dark:text-gray-dark-400 dark:hover:text-gray-dark-100",
|
|
1003
|
-
children:
|
|
1064
|
+
children: translations.clearSorts
|
|
1004
1065
|
}
|
|
1005
1066
|
) : null
|
|
1006
1067
|
] }),
|
|
1007
1068
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: sortableColumns.map((column) => {
|
|
1008
1069
|
const sort = column.getIsSorted() || "none";
|
|
1009
|
-
const
|
|
1070
|
+
const Icon = SORT_ICON[sort];
|
|
1010
1071
|
const label = columnLabel(column);
|
|
1011
1072
|
return /* @__PURE__ */ jsxs(
|
|
1012
1073
|
"button",
|
|
@@ -1014,7 +1075,7 @@ function DataTableStackOptions({
|
|
|
1014
1075
|
type: "button",
|
|
1015
1076
|
onClick: column.getToggleSortingHandler(),
|
|
1016
1077
|
className: "flex items-center justify-start gap-2 rounded-md py-1.5 text-sm font-medium hover:bg-black/5 dark:hover:bg-white/8",
|
|
1017
|
-
"aria-label":
|
|
1078
|
+
"aria-label": translations.sortColumn(label, sort),
|
|
1018
1079
|
children: [
|
|
1019
1080
|
/* @__PURE__ */ jsx(
|
|
1020
1081
|
Icon,
|
|
@@ -1037,7 +1098,7 @@ function DataTableStackOptions({
|
|
|
1037
1098
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1038
1099
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
1039
1100
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
1040
|
-
|
|
1101
|
+
translations.filters
|
|
1041
1102
|
] }),
|
|
1042
1103
|
activeFilterCount > 0 ? /* @__PURE__ */ jsx(
|
|
1043
1104
|
"button",
|
|
@@ -1045,7 +1106,7 @@ function DataTableStackOptions({
|
|
|
1045
1106
|
type: "button",
|
|
1046
1107
|
onClick: () => table.resetColumnFilters(),
|
|
1047
1108
|
className: "text-xs font-medium text-gray-light-500 hover:text-gray-light-900 dark:text-gray-dark-400 dark:hover:text-gray-dark-100",
|
|
1048
|
-
children:
|
|
1109
|
+
children: translations.clearFilters
|
|
1049
1110
|
}
|
|
1050
1111
|
) : null
|
|
1051
1112
|
] }),
|
|
@@ -1054,7 +1115,14 @@ function DataTableStackOptions({
|
|
|
1054
1115
|
if (!filter) return null;
|
|
1055
1116
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
1056
1117
|
/* @__PURE__ */ jsx(Text, { size: "xs", className: "font-medium", children: columnLabel(column) }),
|
|
1057
|
-
/* @__PURE__ */ jsx(
|
|
1118
|
+
/* @__PURE__ */ jsx(
|
|
1119
|
+
DataTableFilterControl,
|
|
1120
|
+
{
|
|
1121
|
+
column,
|
|
1122
|
+
filter,
|
|
1123
|
+
translations
|
|
1124
|
+
}
|
|
1125
|
+
)
|
|
1058
1126
|
] }, column.id);
|
|
1059
1127
|
})
|
|
1060
1128
|
] })
|
|
@@ -1085,6 +1153,7 @@ function DataTableGlobalFilter({
|
|
|
1085
1153
|
}
|
|
1086
1154
|
function DataTableColumnVisibilityMenu({
|
|
1087
1155
|
table,
|
|
1156
|
+
label,
|
|
1088
1157
|
className
|
|
1089
1158
|
}) {
|
|
1090
1159
|
const columns = table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu);
|
|
@@ -1095,7 +1164,7 @@ function DataTableColumnVisibilityMenu({
|
|
|
1095
1164
|
variant: "subtle",
|
|
1096
1165
|
color: "neutral",
|
|
1097
1166
|
size: "sm",
|
|
1098
|
-
"aria-label":
|
|
1167
|
+
"aria-label": label,
|
|
1099
1168
|
className,
|
|
1100
1169
|
children: /* @__PURE__ */ jsx(Columns3CogIcon, { strokeWidth: 1 })
|
|
1101
1170
|
}
|
|
@@ -1177,7 +1246,7 @@ var DATA_TABLE_DEFAULT_EMPTY = "No results found";
|
|
|
1177
1246
|
var defaultRowTestId = (id) => `row-${id}`;
|
|
1178
1247
|
var SELECT_CHECKBOX_PX = { xs: 14, sm: 16, md: 18, lg: 20, xl: 24 };
|
|
1179
1248
|
var SELECT_CELL_PADDING_PX = { xs: 8, sm: 10, md: 12, lg: 16, xl: 16 };
|
|
1180
|
-
function createSelectColumn(size) {
|
|
1249
|
+
function createSelectColumn(size, labels) {
|
|
1181
1250
|
const width = SELECT_CHECKBOX_PX[size] + SELECT_CELL_PADDING_PX[size] * 2;
|
|
1182
1251
|
return {
|
|
1183
1252
|
id: "__select__",
|
|
@@ -1196,7 +1265,7 @@ function createSelectColumn(size) {
|
|
|
1196
1265
|
size,
|
|
1197
1266
|
checked: table.getIsAllPageRowsSelected() ? true : table.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
1198
1267
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked === true),
|
|
1199
|
-
label:
|
|
1268
|
+
label: labels.current.selectAllRows,
|
|
1200
1269
|
classNames: { label: "sr-only" }
|
|
1201
1270
|
}
|
|
1202
1271
|
) : null,
|
|
@@ -1207,7 +1276,7 @@ function createSelectColumn(size) {
|
|
|
1207
1276
|
checked: row.getIsSelected(),
|
|
1208
1277
|
onCheckedChange: (checked) => row.toggleSelected(checked === true),
|
|
1209
1278
|
disabled: !row.getCanSelect(),
|
|
1210
|
-
label:
|
|
1279
|
+
label: labels.current.selectRow(row.id),
|
|
1211
1280
|
classNames: { label: "sr-only" }
|
|
1212
1281
|
}
|
|
1213
1282
|
) })
|
|
@@ -1313,6 +1382,9 @@ function DataTableComponent({
|
|
|
1313
1382
|
onChange: onColumnSizingChange,
|
|
1314
1383
|
defaultValue: initialState?.columnSizing ?? {}
|
|
1315
1384
|
});
|
|
1385
|
+
const resolvedTranslations = resolveDataTableTranslations(translations);
|
|
1386
|
+
const resolvedTranslationsRef = useRef(resolvedTranslations);
|
|
1387
|
+
resolvedTranslationsRef.current = resolvedTranslations;
|
|
1316
1388
|
const tableColumns = useMemo(() => {
|
|
1317
1389
|
const withFilterFns = columns.map((col) => {
|
|
1318
1390
|
const filter = col.meta?.filter;
|
|
@@ -1320,7 +1392,8 @@ function DataTableComponent({
|
|
|
1320
1392
|
return { ...col, filterFn: resolveFilterFn(filter) };
|
|
1321
1393
|
});
|
|
1322
1394
|
if (!enableRowSelection) return withFilterFns;
|
|
1323
|
-
|
|
1395
|
+
const selectColumn = createSelectColumn(size ?? "md", resolvedTranslationsRef);
|
|
1396
|
+
return [selectColumn, ...withFilterFns];
|
|
1324
1397
|
}, [columns, enableRowSelection, size]);
|
|
1325
1398
|
const table = useTable({
|
|
1326
1399
|
// v9 makes features opt-in; `dataTableFeatures` is the kit's registry and
|
|
@@ -1412,6 +1485,7 @@ function DataTableComponent({
|
|
|
1412
1485
|
DataTableColumnVisibilityMenu,
|
|
1413
1486
|
{
|
|
1414
1487
|
table,
|
|
1488
|
+
label: resolvedTranslations.columnVisibility,
|
|
1415
1489
|
className: isStacked ? "hidden @lg:flex" : void 0
|
|
1416
1490
|
}
|
|
1417
1491
|
)
|
|
@@ -1455,10 +1529,17 @@ function DataTableComponent({
|
|
|
1455
1529
|
DataTableHeaderCell,
|
|
1456
1530
|
{
|
|
1457
1531
|
header,
|
|
1532
|
+
translations: resolvedTranslations,
|
|
1458
1533
|
truncate: isFixedSizing && header.column.id !== "__select__"
|
|
1459
1534
|
}
|
|
1460
1535
|
),
|
|
1461
|
-
resizable && /* @__PURE__ */ jsx(
|
|
1536
|
+
resizable && /* @__PURE__ */ jsx(
|
|
1537
|
+
DataTableColumnResizeHandle,
|
|
1538
|
+
{
|
|
1539
|
+
header,
|
|
1540
|
+
translations: resolvedTranslations
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1462
1543
|
] })
|
|
1463
1544
|
},
|
|
1464
1545
|
header.id
|
|
@@ -1491,7 +1572,7 @@ function DataTableComponent({
|
|
|
1491
1572
|
size: "sm",
|
|
1492
1573
|
startSlot: /* @__PURE__ */ jsx(RotateCwIcon, {}),
|
|
1493
1574
|
onClick: onRetry,
|
|
1494
|
-
children:
|
|
1575
|
+
children: resolvedTranslations.retry
|
|
1495
1576
|
}
|
|
1496
1577
|
)
|
|
1497
1578
|
}
|
|
@@ -1517,7 +1598,7 @@ function DataTableComponent({
|
|
|
1517
1598
|
size: "sm",
|
|
1518
1599
|
startSlot: /* @__PURE__ */ jsx(EraserIcon, {}),
|
|
1519
1600
|
onClick: () => table.resetColumnFilters(),
|
|
1520
|
-
children:
|
|
1601
|
+
children: resolvedTranslations.clearFilters
|
|
1521
1602
|
}
|
|
1522
1603
|
)
|
|
1523
1604
|
}
|
|
@@ -1591,6 +1672,7 @@ function DataTableComponent({
|
|
|
1591
1672
|
{
|
|
1592
1673
|
table,
|
|
1593
1674
|
enableColumnVisibility,
|
|
1675
|
+
translations: resolvedTranslations,
|
|
1594
1676
|
className: "@lg:hidden"
|
|
1595
1677
|
}
|
|
1596
1678
|
),
|
|
@@ -1607,6 +1689,7 @@ function DataTableComponent({
|
|
|
1607
1689
|
onRetry,
|
|
1608
1690
|
table,
|
|
1609
1691
|
skeletonRowCount,
|
|
1692
|
+
translations: resolvedTranslations,
|
|
1610
1693
|
className: "@lg:hidden"
|
|
1611
1694
|
}
|
|
1612
1695
|
)
|