@42-central/ui-react 0.18.1 → 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 +6 -3
- 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 +206 -84
- 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 +30 -15
- package/dist/components/kbd/index.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts.map +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 +62 -49
- 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 +3 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.d.ts.map +1 -1
- 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 +31 -17
- 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 +212 -0
- package/src/components/data-table/data-table.tsx +92 -23
- 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/kbd/kbd.test.tsx +31 -0
- package/src/components/kbd/kbd.tsx +29 -14
- 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 +74 -27
- package/src/components/schedule/now-cursor-line.tsx +40 -17
- 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/switch/switch.test.tsx +12 -0
- package/src/components/switch/switch.tsx +3 -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
|
),
|
|
@@ -826,11 +884,12 @@ function DataTableStackedRows({
|
|
|
826
884
|
refetching,
|
|
827
885
|
empty,
|
|
828
886
|
onRowClick,
|
|
829
|
-
|
|
887
|
+
isRowClickIgnored: isRowClickIgnored2,
|
|
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
|
}
|
|
@@ -908,7 +967,9 @@ function DataTableStackedRows({
|
|
|
908
967
|
),
|
|
909
968
|
...props({ "data-selected": row.getIsSelected() }),
|
|
910
969
|
onClick: onRowClick ? (event) => {
|
|
911
|
-
if (!
|
|
970
|
+
if (!isRowClickIgnored2(event.target, event.currentTarget)) {
|
|
971
|
+
onRowClick(row.original);
|
|
972
|
+
}
|
|
912
973
|
} : void 0,
|
|
913
974
|
children: /* @__PURE__ */ jsx(Flex, { direction: "col", gap: "xs", children: row.getVisibleCells().map((cell) => {
|
|
914
975
|
const header = headersByColumnId.get(cell.column.id);
|
|
@@ -927,6 +988,7 @@ function DataTableStackedRows({
|
|
|
927
988
|
function DataTableStackOptions({
|
|
928
989
|
table,
|
|
929
990
|
enableColumnVisibility,
|
|
991
|
+
translations,
|
|
930
992
|
className
|
|
931
993
|
}) {
|
|
932
994
|
const [open, setOpen] = useState(false);
|
|
@@ -953,8 +1015,8 @@ function DataTableStackOptions({
|
|
|
953
1015
|
startSlot: /* @__PURE__ */ jsx(ListFilterIcon, {}),
|
|
954
1016
|
endSlot: activeCount > 0 ? /* @__PURE__ */ jsx(Pill, { size: "xs", children: activeCount }) : void 0,
|
|
955
1017
|
onClick: () => setOpen(true),
|
|
956
|
-
"aria-label": activeCount > 0 ?
|
|
957
|
-
children:
|
|
1018
|
+
"aria-label": activeCount > 0 ? translations.tableOptionsActive(activeCount) : translations.tableOptions,
|
|
1019
|
+
children: translations.tableOptions
|
|
958
1020
|
}
|
|
959
1021
|
),
|
|
960
1022
|
/* @__PURE__ */ jsx(
|
|
@@ -963,14 +1025,15 @@ function DataTableStackOptions({
|
|
|
963
1025
|
placement: "bottom",
|
|
964
1026
|
withGrabber: true,
|
|
965
1027
|
size: "lg",
|
|
966
|
-
title:
|
|
1028
|
+
title: translations.tableOptions,
|
|
1029
|
+
translations: { closeTriggerLabel: translations.closeTriggerLabel },
|
|
967
1030
|
open,
|
|
968
1031
|
onOpenChange: setOpen,
|
|
969
1032
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
970
1033
|
enableColumnVisibility && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
971
1034
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
972
1035
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
973
|
-
|
|
1036
|
+
translations.columns
|
|
974
1037
|
] }),
|
|
975
1038
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1.5", children: table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu).map((column) => /* @__PURE__ */ jsx(
|
|
976
1039
|
Checkbox,
|
|
@@ -990,7 +1053,7 @@ function DataTableStackOptions({
|
|
|
990
1053
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
991
1054
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
992
1055
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
993
|
-
|
|
1056
|
+
translations.sortBy
|
|
994
1057
|
] }),
|
|
995
1058
|
activeSortCount > 0 ? /* @__PURE__ */ jsx(
|
|
996
1059
|
"button",
|
|
@@ -998,13 +1061,13 @@ function DataTableStackOptions({
|
|
|
998
1061
|
type: "button",
|
|
999
1062
|
onClick: () => table.resetSorting(),
|
|
1000
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",
|
|
1001
|
-
children:
|
|
1064
|
+
children: translations.clearSorts
|
|
1002
1065
|
}
|
|
1003
1066
|
) : null
|
|
1004
1067
|
] }),
|
|
1005
1068
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: sortableColumns.map((column) => {
|
|
1006
1069
|
const sort = column.getIsSorted() || "none";
|
|
1007
|
-
const
|
|
1070
|
+
const Icon = SORT_ICON[sort];
|
|
1008
1071
|
const label = columnLabel(column);
|
|
1009
1072
|
return /* @__PURE__ */ jsxs(
|
|
1010
1073
|
"button",
|
|
@@ -1012,7 +1075,7 @@ function DataTableStackOptions({
|
|
|
1012
1075
|
type: "button",
|
|
1013
1076
|
onClick: column.getToggleSortingHandler(),
|
|
1014
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",
|
|
1015
|
-
"aria-label":
|
|
1078
|
+
"aria-label": translations.sortColumn(label, sort),
|
|
1016
1079
|
children: [
|
|
1017
1080
|
/* @__PURE__ */ jsx(
|
|
1018
1081
|
Icon,
|
|
@@ -1035,7 +1098,7 @@ function DataTableStackOptions({
|
|
|
1035
1098
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1036
1099
|
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
1037
1100
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
1038
|
-
|
|
1101
|
+
translations.filters
|
|
1039
1102
|
] }),
|
|
1040
1103
|
activeFilterCount > 0 ? /* @__PURE__ */ jsx(
|
|
1041
1104
|
"button",
|
|
@@ -1043,7 +1106,7 @@ function DataTableStackOptions({
|
|
|
1043
1106
|
type: "button",
|
|
1044
1107
|
onClick: () => table.resetColumnFilters(),
|
|
1045
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",
|
|
1046
|
-
children:
|
|
1109
|
+
children: translations.clearFilters
|
|
1047
1110
|
}
|
|
1048
1111
|
) : null
|
|
1049
1112
|
] }),
|
|
@@ -1052,7 +1115,14 @@ function DataTableStackOptions({
|
|
|
1052
1115
|
if (!filter) return null;
|
|
1053
1116
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
1054
1117
|
/* @__PURE__ */ jsx(Text, { size: "xs", className: "font-medium", children: columnLabel(column) }),
|
|
1055
|
-
/* @__PURE__ */ jsx(
|
|
1118
|
+
/* @__PURE__ */ jsx(
|
|
1119
|
+
DataTableFilterControl,
|
|
1120
|
+
{
|
|
1121
|
+
column,
|
|
1122
|
+
filter,
|
|
1123
|
+
translations
|
|
1124
|
+
}
|
|
1125
|
+
)
|
|
1056
1126
|
] }, column.id);
|
|
1057
1127
|
})
|
|
1058
1128
|
] })
|
|
@@ -1083,6 +1153,7 @@ function DataTableGlobalFilter({
|
|
|
1083
1153
|
}
|
|
1084
1154
|
function DataTableColumnVisibilityMenu({
|
|
1085
1155
|
table,
|
|
1156
|
+
label,
|
|
1086
1157
|
className
|
|
1087
1158
|
}) {
|
|
1088
1159
|
const columns = table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu);
|
|
@@ -1093,7 +1164,7 @@ function DataTableColumnVisibilityMenu({
|
|
|
1093
1164
|
variant: "subtle",
|
|
1094
1165
|
color: "neutral",
|
|
1095
1166
|
size: "sm",
|
|
1096
|
-
"aria-label":
|
|
1167
|
+
"aria-label": label,
|
|
1097
1168
|
className,
|
|
1098
1169
|
children: /* @__PURE__ */ jsx(Columns3CogIcon, { strokeWidth: 1 })
|
|
1099
1170
|
}
|
|
@@ -1111,7 +1182,44 @@ function DataTableColumnVisibilityMenu({
|
|
|
1111
1182
|
)) })
|
|
1112
1183
|
] });
|
|
1113
1184
|
}
|
|
1114
|
-
var
|
|
1185
|
+
var INTERACTIVE_SELECTOR = [
|
|
1186
|
+
"a[href]",
|
|
1187
|
+
"button",
|
|
1188
|
+
"input",
|
|
1189
|
+
"label",
|
|
1190
|
+
"select",
|
|
1191
|
+
"textarea",
|
|
1192
|
+
"summary",
|
|
1193
|
+
"[contenteditable]",
|
|
1194
|
+
...[
|
|
1195
|
+
"button",
|
|
1196
|
+
"link",
|
|
1197
|
+
"checkbox",
|
|
1198
|
+
"radio",
|
|
1199
|
+
"switch",
|
|
1200
|
+
"menuitem",
|
|
1201
|
+
"menuitemcheckbox",
|
|
1202
|
+
"menuitemradio",
|
|
1203
|
+
"tab",
|
|
1204
|
+
"option",
|
|
1205
|
+
"combobox",
|
|
1206
|
+
"slider",
|
|
1207
|
+
"spinbutton",
|
|
1208
|
+
"textbox",
|
|
1209
|
+
"searchbox"
|
|
1210
|
+
].map((role) => `[role="${role}"]`)
|
|
1211
|
+
].join(",");
|
|
1212
|
+
var isRowClickIgnored = (target, row) => {
|
|
1213
|
+
const selection = row.ownerDocument.getSelection();
|
|
1214
|
+
const selectsRow = selection != null && !selection.isCollapsed && Array.from({ length: selection.rangeCount }, (_, i) => selection.getRangeAt(i)).some(
|
|
1215
|
+
(range) => range.intersectsNode(row)
|
|
1216
|
+
);
|
|
1217
|
+
if (selectsRow) return true;
|
|
1218
|
+
if (!(target instanceof Element)) return false;
|
|
1219
|
+
if (!row.contains(target)) return true;
|
|
1220
|
+
const hit = target.closest(INTERACTIVE_SELECTOR);
|
|
1221
|
+
return hit != null && hit !== row && row.contains(hit);
|
|
1222
|
+
};
|
|
1115
1223
|
function resolveSort(canSort, sorted) {
|
|
1116
1224
|
return canSort ? sorted ? sorted === "asc" ? "ascending" : "descending" : "none" : void 0;
|
|
1117
1225
|
}
|
|
@@ -1138,7 +1246,7 @@ var DATA_TABLE_DEFAULT_EMPTY = "No results found";
|
|
|
1138
1246
|
var defaultRowTestId = (id) => `row-${id}`;
|
|
1139
1247
|
var SELECT_CHECKBOX_PX = { xs: 14, sm: 16, md: 18, lg: 20, xl: 24 };
|
|
1140
1248
|
var SELECT_CELL_PADDING_PX = { xs: 8, sm: 10, md: 12, lg: 16, xl: 16 };
|
|
1141
|
-
function createSelectColumn(size) {
|
|
1249
|
+
function createSelectColumn(size, labels) {
|
|
1142
1250
|
const width = SELECT_CHECKBOX_PX[size] + SELECT_CELL_PADDING_PX[size] * 2;
|
|
1143
1251
|
return {
|
|
1144
1252
|
id: "__select__",
|
|
@@ -1157,7 +1265,7 @@ function createSelectColumn(size) {
|
|
|
1157
1265
|
size,
|
|
1158
1266
|
checked: table.getIsAllPageRowsSelected() ? true : table.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
1159
1267
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked === true),
|
|
1160
|
-
label:
|
|
1268
|
+
label: labels.current.selectAllRows,
|
|
1161
1269
|
classNames: { label: "sr-only" }
|
|
1162
1270
|
}
|
|
1163
1271
|
) : null,
|
|
@@ -1168,7 +1276,7 @@ function createSelectColumn(size) {
|
|
|
1168
1276
|
checked: row.getIsSelected(),
|
|
1169
1277
|
onCheckedChange: (checked) => row.toggleSelected(checked === true),
|
|
1170
1278
|
disabled: !row.getCanSelect(),
|
|
1171
|
-
label:
|
|
1279
|
+
label: labels.current.selectRow(row.id),
|
|
1172
1280
|
classNames: { label: "sr-only" }
|
|
1173
1281
|
}
|
|
1174
1282
|
) })
|
|
@@ -1274,6 +1382,9 @@ function DataTableComponent({
|
|
|
1274
1382
|
onChange: onColumnSizingChange,
|
|
1275
1383
|
defaultValue: initialState?.columnSizing ?? {}
|
|
1276
1384
|
});
|
|
1385
|
+
const resolvedTranslations = resolveDataTableTranslations(translations);
|
|
1386
|
+
const resolvedTranslationsRef = useRef(resolvedTranslations);
|
|
1387
|
+
resolvedTranslationsRef.current = resolvedTranslations;
|
|
1277
1388
|
const tableColumns = useMemo(() => {
|
|
1278
1389
|
const withFilterFns = columns.map((col) => {
|
|
1279
1390
|
const filter = col.meta?.filter;
|
|
@@ -1281,7 +1392,8 @@ function DataTableComponent({
|
|
|
1281
1392
|
return { ...col, filterFn: resolveFilterFn(filter) };
|
|
1282
1393
|
});
|
|
1283
1394
|
if (!enableRowSelection) return withFilterFns;
|
|
1284
|
-
|
|
1395
|
+
const selectColumn = createSelectColumn(size ?? "md", resolvedTranslationsRef);
|
|
1396
|
+
return [selectColumn, ...withFilterFns];
|
|
1285
1397
|
}, [columns, enableRowSelection, size]);
|
|
1286
1398
|
const table = useTable({
|
|
1287
1399
|
// v9 makes features opt-in; `dataTableFeatures` is the kit's registry and
|
|
@@ -1326,7 +1438,7 @@ function DataTableComponent({
|
|
|
1326
1438
|
const isRefetching = loading && rows.length > 0;
|
|
1327
1439
|
const skeletonRowCount = Math.min(Math.max(pagination.pageSize, 1), 100);
|
|
1328
1440
|
const handleRowClick = (row) => (event) => {
|
|
1329
|
-
if (!onRowClick ||
|
|
1441
|
+
if (!onRowClick || isRowClickIgnored(event.target, event.currentTarget)) return;
|
|
1330
1442
|
onRowClick(row);
|
|
1331
1443
|
};
|
|
1332
1444
|
const enableColumnVisibility = _enableColumnVisibility && table.getAllLeafColumns().some((column) => !column.columnDef.meta?.hideFromMenu);
|
|
@@ -1373,6 +1485,7 @@ function DataTableComponent({
|
|
|
1373
1485
|
DataTableColumnVisibilityMenu,
|
|
1374
1486
|
{
|
|
1375
1487
|
table,
|
|
1488
|
+
label: resolvedTranslations.columnVisibility,
|
|
1376
1489
|
className: isStacked ? "hidden @lg:flex" : void 0
|
|
1377
1490
|
}
|
|
1378
1491
|
)
|
|
@@ -1416,10 +1529,17 @@ function DataTableComponent({
|
|
|
1416
1529
|
DataTableHeaderCell,
|
|
1417
1530
|
{
|
|
1418
1531
|
header,
|
|
1532
|
+
translations: resolvedTranslations,
|
|
1419
1533
|
truncate: isFixedSizing && header.column.id !== "__select__"
|
|
1420
1534
|
}
|
|
1421
1535
|
),
|
|
1422
|
-
resizable && /* @__PURE__ */ jsx(
|
|
1536
|
+
resizable && /* @__PURE__ */ jsx(
|
|
1537
|
+
DataTableColumnResizeHandle,
|
|
1538
|
+
{
|
|
1539
|
+
header,
|
|
1540
|
+
translations: resolvedTranslations
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1423
1543
|
] })
|
|
1424
1544
|
},
|
|
1425
1545
|
header.id
|
|
@@ -1452,7 +1572,7 @@ function DataTableComponent({
|
|
|
1452
1572
|
size: "sm",
|
|
1453
1573
|
startSlot: /* @__PURE__ */ jsx(RotateCwIcon, {}),
|
|
1454
1574
|
onClick: onRetry,
|
|
1455
|
-
children:
|
|
1575
|
+
children: resolvedTranslations.retry
|
|
1456
1576
|
}
|
|
1457
1577
|
)
|
|
1458
1578
|
}
|
|
@@ -1478,7 +1598,7 @@ function DataTableComponent({
|
|
|
1478
1598
|
size: "sm",
|
|
1479
1599
|
startSlot: /* @__PURE__ */ jsx(EraserIcon, {}),
|
|
1480
1600
|
onClick: () => table.resetColumnFilters(),
|
|
1481
|
-
children:
|
|
1601
|
+
children: resolvedTranslations.clearFilters
|
|
1482
1602
|
}
|
|
1483
1603
|
)
|
|
1484
1604
|
}
|
|
@@ -1552,6 +1672,7 @@ function DataTableComponent({
|
|
|
1552
1672
|
{
|
|
1553
1673
|
table,
|
|
1554
1674
|
enableColumnVisibility,
|
|
1675
|
+
translations: resolvedTranslations,
|
|
1555
1676
|
className: "@lg:hidden"
|
|
1556
1677
|
}
|
|
1557
1678
|
),
|
|
@@ -1564,10 +1685,11 @@ function DataTableComponent({
|
|
|
1564
1685
|
refetching: isRefetching,
|
|
1565
1686
|
empty,
|
|
1566
1687
|
onRowClick,
|
|
1567
|
-
|
|
1688
|
+
isRowClickIgnored,
|
|
1568
1689
|
onRetry,
|
|
1569
1690
|
table,
|
|
1570
1691
|
skeletonRowCount,
|
|
1692
|
+
translations: resolvedTranslations,
|
|
1571
1693
|
className: "@lg:hidden"
|
|
1572
1694
|
}
|
|
1573
1695
|
)
|