@payfit/unity-components 1.0.0 → 1.1.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.
Files changed (254) hide show
  1. package/dist/esm/components/action-bar/ActionBar.d.ts +153 -0
  2. package/dist/esm/components/action-bar/ActionBar.js +173 -0
  3. package/dist/esm/components/action-bar/parts/ActionBarAction.d.ts +44 -0
  4. package/dist/esm/components/action-bar/parts/ActionBarAction.js +45 -0
  5. package/dist/esm/components/action-bar/parts/ActionBarRoot.d.ts +44 -0
  6. package/dist/esm/components/action-bar/parts/ActionBarRoot.js +46 -0
  7. package/dist/esm/components/actionable/Actionable.js +20 -21
  8. package/dist/esm/components/alert/Alert.d.ts +1 -1
  9. package/dist/esm/components/alert/Alert.js +1 -1
  10. package/dist/esm/components/alert/parts/AlertActions.d.ts +1 -1
  11. package/dist/esm/components/alert/parts/AlertActions.js +1 -1
  12. package/dist/esm/components/alert/parts/AlertContent.d.ts +1 -1
  13. package/dist/esm/components/alert/parts/AlertTitle.d.ts +1 -1
  14. package/dist/esm/components/anchor/Anchor.js +1 -1
  15. package/dist/esm/components/app-layout/AppLayout.js +6 -6
  16. package/dist/esm/components/app-menu/parts/AppMenuFooter.js +30 -30
  17. package/dist/esm/components/app-menu/parts/AppMenuNavContent.js +1 -1
  18. package/dist/esm/components/autocomplete/Autocomplete.d.ts +1 -1
  19. package/dist/esm/components/autocomplete/Autocomplete.js +14 -14
  20. package/dist/esm/components/autocomplete/parts/AutocompleteClearButton.js +5 -5
  21. package/dist/esm/components/autocomplete/parts/AutocompleteItem.d.ts +1 -1
  22. package/dist/esm/components/autocomplete/parts/AutocompleteItem.js +4 -4
  23. package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.d.ts +1 -1
  24. package/dist/esm/components/autocomplete/parts/AutocompleteItemGroup.js +12 -12
  25. package/dist/esm/components/autocomplete/parts/AutocompletePanel.d.ts +1 -1
  26. package/dist/esm/components/autocomplete/parts/AutocompletePanel.js +7 -7
  27. package/dist/esm/components/avatar/Avatar.d.ts +1 -1
  28. package/dist/esm/components/avatar/Avatar.js +15 -16
  29. package/dist/esm/components/avatar/Avatar.variants.js +1 -1
  30. package/dist/esm/components/avatar/parts/AvatarFallback.d.ts +1 -1
  31. package/dist/esm/components/avatar/parts/AvatarFallback.js +9 -10
  32. package/dist/esm/components/avatar/parts/AvatarImage.js +12 -12
  33. package/dist/esm/components/avatar/parts/AvatarPair.d.ts +1 -1
  34. package/dist/esm/components/avatar/parts/AvatarPair.js +4 -4
  35. package/dist/esm/components/badge/Badge.d.ts +1 -1
  36. package/dist/esm/components/badge/Badge.js +31 -35
  37. package/dist/esm/components/bottom-sheet/BottomSheet.d.ts +1 -1
  38. package/dist/esm/components/bottom-sheet/BottomSheet.js +14 -14
  39. package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.d.ts +1 -1
  40. package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.js +4 -4
  41. package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.js +11 -11
  42. package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.d.ts +1 -1
  43. package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.js +4 -4
  44. package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.d.ts +4 -4
  45. package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.js +6 -6
  46. package/dist/esm/components/breadcrumbs/Breadcrumbs.context.d.ts +1 -1
  47. package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
  48. package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +3 -3
  49. package/dist/esm/components/button/Button.js +33 -41
  50. package/dist/esm/components/button/Button.variants.d.ts +1 -1
  51. package/dist/esm/components/button/Button.variants.js +1 -1
  52. package/dist/esm/components/checkbox/Checkbox.js +53 -49
  53. package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
  54. package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +1 -1
  55. package/dist/esm/components/checkbox-field/CheckboxField.js +39 -34
  56. package/dist/esm/components/checkbox-group/CheckboxGroup.d.ts +1 -1
  57. package/dist/esm/components/checkbox-group/CheckboxGroup.js +12 -12
  58. package/dist/esm/components/collapsible/Collapsible.js +22 -16
  59. package/dist/esm/components/collapsible/parts/CollapsibleContent.js +16 -7
  60. package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +23 -23
  61. package/dist/esm/components/data-table/DataTable.d.ts +48 -17
  62. package/dist/esm/components/data-table/DataTable.js +104 -60
  63. package/dist/esm/components/data-table/mocks/employee-columns.d.ts +4 -0
  64. package/dist/esm/components/data-table/parts/DataTableBulkActions.d.ts +55 -0
  65. package/dist/esm/components/data-table/parts/DataTableBulkActions.js +65 -0
  66. package/dist/esm/components/data-table/parts/DataTableRoot.d.ts +37 -0
  67. package/dist/esm/components/data-table/parts/DataTableRoot.js +13 -0
  68. package/dist/esm/components/date-calendar/DateCalendar.js +8 -8
  69. package/dist/esm/components/date-picker/DatePicker.js +9 -9
  70. package/dist/esm/components/date-picker/parts/DateInput.js +7 -7
  71. package/dist/esm/components/date-picker-field/DatePickerField.js +12 -12
  72. package/dist/esm/components/definition-tooltip/DefinitionTooltip.js +4 -4
  73. package/dist/esm/components/dialog/Dialog.d.ts +1 -1
  74. package/dist/esm/components/dialog/Dialog.js +9 -9
  75. package/dist/esm/components/dialog/parts/DialogActions/DialogButton.d.ts +1 -1
  76. package/dist/esm/components/fieldset/Fieldset.d.ts +1 -1
  77. package/dist/esm/components/fieldset/Fieldset.js +4 -4
  78. package/dist/esm/components/flex/Flex.d.ts +1 -1
  79. package/dist/esm/components/flex/Flex.variants.js +189 -207
  80. package/dist/esm/components/flex/FlexItem.d.ts +1 -1
  81. package/dist/esm/components/form/Form.context.d.ts +1 -4
  82. package/dist/esm/components/form/Form.context.js +11 -13
  83. package/dist/esm/components/form/Form.d.ts +13 -11
  84. package/dist/esm/components/form/Form.js +45 -48
  85. package/dist/esm/components/form-field/FormField.context.d.ts +1 -6
  86. package/dist/esm/components/form-field/FormField.context.js +39 -47
  87. package/dist/esm/components/form-field/FormField.d.ts +0 -2
  88. package/dist/esm/components/form-field/FormField.js +37 -42
  89. package/dist/esm/components/form-field/parts/FormContextualLink.js +17 -17
  90. package/dist/esm/components/form-field/parts/FormControl.js +39 -35
  91. package/dist/esm/components/form-field/parts/FormFeedbackText.js +15 -17
  92. package/dist/esm/components/full-page-loader/FullPageLoader.js +7 -7
  93. package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +2 -2
  94. package/dist/esm/components/funnel-layout/FunnelLayout.js +26 -26
  95. package/dist/esm/components/funnel-layout/parts/FunnelBody.d.ts +2 -2
  96. package/dist/esm/components/funnel-layout/parts/FunnelBody.js +4 -4
  97. package/dist/esm/components/funnel-layout/parts/FunnelPage.d.ts +2 -2
  98. package/dist/esm/components/funnel-layout/parts/FunnelPage.js +10 -10
  99. package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +1 -1
  100. package/dist/esm/components/funnel-layout/parts/FunnelPageActions.d.ts +2 -2
  101. package/dist/esm/components/funnel-layout/parts/FunnelPageActions.js +13 -13
  102. package/dist/esm/components/funnel-layout/parts/FunnelPageContent.d.ts +2 -2
  103. package/dist/esm/components/funnel-layout/parts/FunnelPageContent.js +1 -1
  104. package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.d.ts +2 -2
  105. package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +7 -7
  106. package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.d.ts +2 -2
  107. package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.js +4 -4
  108. package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.d.ts +1 -1
  109. package/dist/esm/components/funnel-layout/parts/FunnelProgressBar.js +4 -4
  110. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
  111. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +7 -7
  112. package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +2 -2
  113. package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +9 -9
  114. package/dist/esm/components/grid/Grid.d.ts +1 -1
  115. package/dist/esm/components/grid/Grid.variants.d.ts +1 -1
  116. package/dist/esm/components/grid/Grid.variants.js +3 -3
  117. package/dist/esm/components/grid/GridItem.d.ts +1 -1
  118. package/dist/esm/components/icon/Icon.d.ts +1 -1
  119. package/dist/esm/components/icon/Icon.js +1 -1
  120. package/dist/esm/components/icon-button/CircularIconButton.d.ts +1 -1
  121. package/dist/esm/components/icon-button/CircularIconButton.js +21 -20
  122. package/dist/esm/components/icon-button/IconButton.variants.d.ts +1 -1
  123. package/dist/esm/components/icon-button/IconButton.variants.js +2 -2
  124. package/dist/esm/components/input/Input.js +6 -6
  125. package/dist/esm/components/label/Label.js +13 -13
  126. package/dist/esm/components/link/Link.d.ts +11 -1
  127. package/dist/esm/components/link/Link.js +32 -30
  128. package/dist/esm/components/link/Link.variants.d.ts +141 -30
  129. package/dist/esm/components/link/Link.variants.js +44 -16
  130. package/dist/esm/components/menu/parts/MenuItem.js +8 -8
  131. package/dist/esm/components/multi-select/parts/MultiSelectButton.js +14 -14
  132. package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.js +5 -5
  133. package/dist/esm/components/multi-select/parts/MultiSelectOption.js +3 -3
  134. package/dist/esm/components/multi-select/parts/MultiSelectPopover.js +1 -1
  135. package/dist/esm/components/multi-select-field/MultiSelectField.js +6 -6
  136. package/dist/esm/components/nav/parts/NavGroup.js +28 -29
  137. package/dist/esm/components/nav/parts/NavItem.d.ts +1 -1
  138. package/dist/esm/components/nav/parts/NavItem.js +13 -14
  139. package/dist/esm/components/number-field/NumberField.js +14 -14
  140. package/dist/esm/components/number-input/NumberInput.d.ts +2 -2
  141. package/dist/esm/components/number-input/NumberInput.js +37 -37
  142. package/dist/esm/components/page/Page.d.ts +1 -1
  143. package/dist/esm/components/page/Page.js +5 -5
  144. package/dist/esm/components/page/parts/PageHeader.d.ts +1 -1
  145. package/dist/esm/components/page/parts/PageHeader.js +4 -4
  146. package/dist/esm/components/pagination/Pagination.d.ts +1 -1
  147. package/dist/esm/components/pagination/Pagination.js +16 -16
  148. package/dist/esm/components/pagination/parts/PaginationEllipsis.d.ts +1 -1
  149. package/dist/esm/components/pagination/parts/PaginationEllipsis.js +8 -8
  150. package/dist/esm/components/pagination/parts/PaginationJumpDialog.js +9 -9
  151. package/dist/esm/components/pagination/parts/PaginationLink.d.ts +1 -1
  152. package/dist/esm/components/pagination/parts/PaginationLink.js +6 -6
  153. package/dist/esm/components/payfit-brand/PayFitBrand.js +4 -4
  154. package/dist/esm/components/pill/Pill.d.ts +1 -1
  155. package/dist/esm/components/pill/Pill.js +1 -1
  156. package/dist/esm/components/popover/Popover.js +5 -5
  157. package/dist/esm/components/popover/parts/PopoverHeader.js +7 -7
  158. package/dist/esm/components/progress-bar/ProgressBar.js +11 -11
  159. package/dist/esm/components/radio-button-group/parts/RadioButton.d.ts +1 -1
  160. package/dist/esm/components/radio-button-group/parts/RadioButton.js +5 -5
  161. package/dist/esm/components/search/Search.d.ts +1 -1
  162. package/dist/esm/components/search/Search.js +14 -14
  163. package/dist/esm/components/segmented-button-group/parts/ToggleButton.js +10 -10
  164. package/dist/esm/components/select/Select.js +12 -12
  165. package/dist/esm/components/select/parts/SearchInput.js +7 -7
  166. package/dist/esm/components/select/parts/SelectButton.js +17 -14
  167. package/dist/esm/components/select/parts/SelectOption.js +4 -4
  168. package/dist/esm/components/select/parts/SelectOptionGroup.js +8 -8
  169. package/dist/esm/components/select/parts/SelectOptionHelper.js +1 -1
  170. package/dist/esm/components/select-field/SelectField.d.ts +1 -1
  171. package/dist/esm/components/select-field/SelectField.js +16 -16
  172. package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.ts +1 -1
  173. package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +8 -8
  174. package/dist/esm/components/selectable-button-group/parts/SelectableButton.js +10 -10
  175. package/dist/esm/components/selectable-card/internals/Content.js +5 -5
  176. package/dist/esm/components/selectable-card/internals/Description.js +1 -1
  177. package/dist/esm/components/selectable-card/internals/Illustration.js +3 -3
  178. package/dist/esm/components/selectable-card/internals/SelectedIndicator.js +4 -4
  179. package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.d.ts +1 -1
  180. package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/RadioIndicator.js +3 -3
  181. package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.d.ts +1 -1
  182. package/dist/esm/components/selectable-card/selectableCard.variant.js +1 -1
  183. package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +22 -22
  184. package/dist/esm/components/side-panel/SidePanel.d.ts +1 -1
  185. package/dist/esm/components/side-panel/SidePanel.js +6 -6
  186. package/dist/esm/components/side-panel/parts/SidePanelContent.d.ts +1 -1
  187. package/dist/esm/components/side-panel/parts/SidePanelContent.js +9 -9
  188. package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.js +11 -11
  189. package/dist/esm/components/side-panel/parts/SidePanelFooter.d.ts +1 -1
  190. package/dist/esm/components/side-panel/parts/SidePanelFooter.js +4 -4
  191. package/dist/esm/components/side-panel/parts/SidePanelHeader.d.ts +4 -4
  192. package/dist/esm/components/side-panel/parts/SidePanelHeader.js +6 -6
  193. package/dist/esm/components/skip-links/SkipLinks.d.ts +79 -0
  194. package/dist/esm/components/skip-links/SkipLinks.js +80 -0
  195. package/dist/esm/components/spinner/Spinner.js +5 -5
  196. package/dist/esm/components/table/Table.js +101 -100
  197. package/dist/esm/components/table/hooks/useTableKeyboardNavigation.d.ts +1 -19
  198. package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +147 -95
  199. package/dist/esm/components/table/parts/TableBody.js +1 -1
  200. package/dist/esm/components/table/parts/TableCell.d.ts +17 -1
  201. package/dist/esm/components/table/parts/TableCell.js +45 -41
  202. package/dist/esm/components/table/parts/TableColumnHeader.d.ts +2 -1
  203. package/dist/esm/components/table/parts/TableColumnHeader.js +63 -57
  204. package/dist/esm/components/table/parts/TableEmptyState.d.ts +1 -1
  205. package/dist/esm/components/table/parts/TableEmptyState.js +1 -1
  206. package/dist/esm/components/table/parts/TableHeader.d.ts +3 -3
  207. package/dist/esm/components/table/parts/TableHeader.js +28 -26
  208. package/dist/esm/components/table/parts/TablePagination.d.ts +1 -1
  209. package/dist/esm/components/table/parts/TablePagination.js +9 -9
  210. package/dist/esm/components/table/parts/TableRow.d.ts +1 -1
  211. package/dist/esm/components/table/parts/TableRow.js +36 -34
  212. package/dist/esm/components/tabs/Tabs.context.d.ts +1 -1
  213. package/dist/esm/components/tabs/Tabs.d.ts +1 -1
  214. package/dist/esm/components/tabs/Tabs.variant.js +1 -1
  215. package/dist/esm/components/tabs/parts/NavigationButton.js +12 -12
  216. package/dist/esm/components/tabs/parts/Tab.d.ts +3 -2
  217. package/dist/esm/components/tabs/parts/Tab.js +12 -12
  218. package/dist/esm/components/tabs/parts/TabPanel.d.ts +4 -2
  219. package/dist/esm/components/tabs/parts/TabPanel.js +7 -7
  220. package/dist/esm/components/task-menu/TaskMenu.d.ts +1 -1
  221. package/dist/esm/components/task-menu/TaskMenu.js +7 -7
  222. package/dist/esm/components/task-menu/parts/Content.js +6 -6
  223. package/dist/esm/components/task-menu/parts/Header.js +7 -7
  224. package/dist/esm/components/task-menu/parts/SubTask.js +6 -6
  225. package/dist/esm/components/task-menu/parts/Task.d.ts +1 -1
  226. package/dist/esm/components/task-menu/parts/Task.js +12 -12
  227. package/dist/esm/components/task-menu/parts/TaskGroup.js +7 -7
  228. package/dist/esm/components/task-menu/parts/task.variants.js +1 -1
  229. package/dist/esm/components/text/Text.d.ts +1 -1
  230. package/dist/esm/components/text/Text.variants.js +1 -1
  231. package/dist/esm/components/text-area/TextArea.js +6 -6
  232. package/dist/esm/components/text-field/TextField.js +5 -5
  233. package/dist/esm/components/toast/UnityToast.d.ts +1 -1
  234. package/dist/esm/components/toast/UnityToast.js +11 -11
  235. package/dist/esm/components/toggle-switch/ToggleSwitch.d.ts +1 -1
  236. package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -4
  237. package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +35 -31
  238. package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.d.ts +1 -1
  239. package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +5 -5
  240. package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +43 -38
  241. package/dist/esm/components/tooltip/Tooltip.d.ts +2 -0
  242. package/dist/esm/components/tooltip/Tooltip.js +27 -19
  243. package/dist/esm/hooks/use-form.js +7 -7
  244. package/dist/esm/index.d.ts +6 -1
  245. package/dist/esm/index.js +366 -352
  246. package/dist/esm/integrations/react-router/v5/UnityReactRouterV5Provider.js +28 -0
  247. package/dist/esm/integrations/react-router/v5/index.d.ts +1 -0
  248. package/dist/esm/integrations/react-router/v5.js +4 -0
  249. package/i18n/en-GB.json +6 -0
  250. package/i18n/es-ES.json +6 -0
  251. package/i18n/fr-FR.json +6 -0
  252. package/package.json +38 -35
  253. package/dist/esm/providers/router/integrations/UnityReactRouterV5Provider.js +0 -28
  254. /package/dist/esm/{providers/router/integrations → integrations/react-router/v5}/UnityReactRouterV5Provider.d.ts +0 -0
@@ -1,49 +1,54 @@
1
- import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as b } from "react";
3
- import { useFormContext as k } from "react-hook-form";
4
- import { Checkbox as C } from "../checkbox/Checkbox.js";
5
- import { FormField as y } from "../form-field/FormField.js";
1
+ import { jsxs as k, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as C, useMemo as y } from "react";
3
+ import { useFormContext as R } from "react-hook-form";
4
+ import { Checkbox as q } from "../checkbox/Checkbox.js";
5
+ import { FormField as P } from "../form-field/FormField.js";
6
6
  import { FormControl as j } from "../form-field/parts/FormControl.js";
7
- import { FormFeedbackText as w } from "../form-field/parts/FormFeedbackText.js";
8
- function N({
7
+ import { FormFeedbackText as v } from "../form-field/parts/FormFeedbackText.js";
8
+ import { isFieldRequired as w } from "../form-field/utils/isFieldRequired.js";
9
+ import { useUnityFormProvider as N } from "../form/Form.context.js";
10
+ function S({
9
11
  name: o,
10
12
  children: e,
11
13
  defaultSelected: r,
12
- helperText: m,
14
+ helperText: t,
13
15
  contextualLink: c,
14
- isRequired: i,
15
- isInvalid: l,
16
- isLoading: n,
17
- isDisabled: f,
18
- isReadOnly: s,
16
+ isRequired: s,
17
+ isInvalid: d,
18
+ isLoading: l,
19
+ isDisabled: n,
20
+ isReadOnly: f,
19
21
  requiredVariant: p,
20
- ...x
21
- }, d) {
22
- const { control: F, watch: a } = k(), u = a(o);
23
- return /* @__PURE__ */ h(
24
- y,
22
+ ...u
23
+ }, x) {
24
+ const { control: F, watch: h } = R(), { schema: m } = N(), a = y(
25
+ () => w(m, o),
26
+ [m, o]
27
+ ), b = h(o);
28
+ return /* @__PURE__ */ k(
29
+ P,
25
30
  {
26
31
  control: F,
27
32
  name: o,
28
33
  className: "uy:flex uy:flex-col uy:gap-100",
29
34
  ...{
30
- isRequired: i,
31
- isInvalid: l,
32
- isLoading: n,
33
- isDisabled: f,
34
- isReadOnly: s
35
+ isInvalid: d,
36
+ isLoading: l,
37
+ isDisabled: n,
38
+ isReadOnly: f
35
39
  },
36
40
  children: [
37
- /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(
38
- C,
41
+ /* @__PURE__ */ i(j, { children: /* @__PURE__ */ i(
42
+ q,
39
43
  {
40
- ref: d,
44
+ ref: x,
41
45
  defaultSelected: r,
42
- isSelected: u,
46
+ isSelected: b,
43
47
  requiredVariant: p,
44
- helperText: m,
45
- feedbackText: /* @__PURE__ */ t(w, {}),
46
- ...x,
48
+ helperText: t,
49
+ feedbackText: /* @__PURE__ */ i(v, {}),
50
+ ...u,
51
+ isRequired: a ?? s,
47
52
  children: e
48
53
  }
49
54
  ) }),
@@ -52,10 +57,10 @@ function N({
52
57
  }
53
58
  );
54
59
  }
55
- const P = b(function(e, r) {
56
- return N(e, r);
60
+ const T = C(function(e, r) {
61
+ return S(e, r);
57
62
  });
58
- P.displayName = "CheckboxField";
63
+ T.displayName = "CheckboxField";
59
64
  export {
60
- P as CheckboxField
65
+ T as CheckboxField
61
66
  };
@@ -1,6 +1,6 @@
1
+ import { VariantProps } from '@payfit/unity-themes';
1
2
  import { ReactNode } from 'react';
2
3
  import { CheckboxGroupProps as AriaCheckboxGroupProps } from 'react-aria-components';
3
- import { VariantProps } from 'tailwind-variants';
4
4
  export declare const checkboxGroup: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex uy:flex-col uy:gap-50", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex uy:flex-col uy:gap-50", unknown, unknown, undefined>>;
5
5
  export interface CheckboxGroupProps extends VariantProps<typeof checkboxGroup>, Omit<AriaCheckboxGroupProps, 'className' | 'class'> {
6
6
  /** The label for the checkbox group. */
@@ -1,31 +1,31 @@
1
1
  import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as d, isValidElement as x, cloneElement as h } from "react";
3
- import { CheckboxGroup as g } from "react-aria-components";
4
- import { tv as b } from "tailwind-variants";
3
+ import { uyTv as g } from "@payfit/unity-themes";
4
+ import { CheckboxGroup as b } from "react-aria-components";
5
5
  import { Label as v } from "../label/Label.js";
6
6
  import { Text as c } from "../text/Text.js";
7
- const G = b({
7
+ const G = g({
8
8
  base: "uy:flex uy:flex-col uy:gap-50"
9
9
  }), C = d(
10
10
  ({
11
- label: t,
12
- helperText: l,
11
+ label: l,
12
+ helperText: m,
13
13
  feedbackText: o,
14
14
  isDisabled: e,
15
15
  isReadOnly: n,
16
- isInvalid: m,
16
+ isInvalid: t,
17
17
  isRequired: s,
18
18
  isLoading: a,
19
19
  children: p,
20
20
  requiredVariant: i,
21
21
  ...u
22
22
  }, y) => /* @__PURE__ */ f(
23
- g,
23
+ b,
24
24
  {
25
25
  ...{
26
26
  isDisabled: e,
27
27
  isReadOnly: n,
28
- isInvalid: m,
28
+ isInvalid: t,
29
29
  isRequired: s,
30
30
  isLoading: a
31
31
  },
@@ -33,14 +33,14 @@ const G = b({
33
33
  ref: y,
34
34
  className: G(),
35
35
  children: [
36
- t && /* @__PURE__ */ r(v, { isRequired: s, requiredVariant: i, children: t }),
37
- l && /* @__PURE__ */ r(
36
+ l && /* @__PURE__ */ r(v, { isRequired: s, requiredVariant: i, children: l }),
37
+ m && /* @__PURE__ */ r(
38
38
  c,
39
39
  {
40
40
  variant: "bodySmall",
41
41
  color: "content.neutral.low",
42
42
  slot: "description",
43
- children: l
43
+ children: m
44
44
  }
45
45
  ),
46
46
  /* @__PURE__ */ r(
@@ -51,7 +51,7 @@ const G = b({
51
51
  children: p
52
52
  }
53
53
  ),
54
- m && (typeof o == "string" ? /* @__PURE__ */ r(
54
+ t && (typeof o == "string" ? /* @__PURE__ */ r(
55
55
  c,
56
56
  {
57
57
  variant: "bodySmallStrong",
@@ -1,23 +1,29 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import { Disclosure as r } from "react-aria-components";
4
- import { tv as e } from "tailwind-variants";
5
- const f = e({
6
- base: "uy:w-full uy:rounded-50 uy:focus-within:outline-2 uy:focus-within:outline-solid uy:focus-within:outline-offset-2 uy:focus-within:outline-utility-focus-ring"
7
- }), a = s(
8
- ({ children: o, isExpanded: i, ...l }, t) => /* @__PURE__ */ u(
9
- r,
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ import { uyTv as e } from "@payfit/unity-themes";
4
+ import { Disclosure as l } from "react-aria-components";
5
+ const r = e({
6
+ base: [
7
+ "uy:w-full uy:rounded-50",
8
+ "uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-2",
9
+ "uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-solid",
10
+ "uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-offset-2",
11
+ "uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-utility-focus-ring"
12
+ ]
13
+ }), n = u(
14
+ ({ children: i, isExpanded: t, ...o }, s) => /* @__PURE__ */ a(
15
+ l,
10
16
  {
11
17
  "data-dd-privacy": "allow",
12
- ...l,
13
- className: f(),
14
- ref: t,
15
- isExpanded: i,
16
- children: o
18
+ ...o,
19
+ className: r(),
20
+ ref: s,
21
+ isExpanded: t,
22
+ children: i
17
23
  }
18
24
  )
19
25
  );
20
- a.displayName = "Collapsible";
26
+ n.displayName = "Collapsible";
21
27
  export {
22
- a as Collapsible
28
+ n as Collapsible
23
29
  };
@@ -1,10 +1,19 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as e } from "react";
3
- import { DisclosurePanel as t } from "react-aria-components";
4
- const i = e(
5
- ({ children: r, ...l }, a) => /* @__PURE__ */ o(t, { ref: a, "data-dd-privacy": "allow", ...l, children: /* @__PURE__ */ o("div", { className: "uy:ml-400 uy:typography-body", children: r }) })
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as t } from "react";
3
+ import { DisclosurePanel as e } from "react-aria-components";
4
+ const l = t(
5
+ ({ children: i, ...o }, r) => /* @__PURE__ */ a(
6
+ e,
7
+ {
8
+ ref: r,
9
+ "data-dd-privacy": "allow",
10
+ ...o,
11
+ className: "uy:transition-all uy:transition-discrete uy:duration-200 uy:origin-top-left uy:aria-hidden:opacity-0 uy:aria-hidden:scale-y-0",
12
+ children: /* @__PURE__ */ a("div", { className: "uy:ml-400 uy:typography-body", children: i })
13
+ }
14
+ )
6
15
  );
7
- i.displayName = "CollapsibleContent";
16
+ l.displayName = "CollapsibleContent";
8
17
  export {
9
- i as CollapsibleContent
18
+ l as CollapsibleContent
10
19
  };
@@ -1,15 +1,17 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { forwardRef as m, useContext as p } from "react";
3
- import { DisclosureStateContext as y, Heading as f, Button as x } from "react-aria-components";
4
- import { tv as b } from "tailwind-variants";
1
+ import { jsx as t, jsxs as y } from "react/jsx-runtime";
2
+ import { forwardRef as d, useContext as m } from "react";
3
+ import { uyTv as p } from "@payfit/unity-themes";
4
+ import { DisclosureStateContext as f, Heading as x, Button as b } from "react-aria-components";
5
5
  import { Icon as v } from "../../icon/Icon.js";
6
6
  import { Text as r } from "../../text/Text.js";
7
- const h = b({
7
+ const g = p({
8
8
  slots: {
9
9
  base: "uy:w-full",
10
- button: "uy:flex uy:pb-100 uy:pt-100 uy:w-full uy:hover:text-content-neutral-hover uy:focus-visible:outline-none",
10
+ button: [
11
+ "uy:flex uy:gap-50 uy:pb-100 uy:pt-100 uy:w-full uy:hover:text-content-neutral-hover uy:focus-visible:outline-none"
12
+ ],
11
13
  title: "uy:flex uy:grow uy:text-left uy:items-center",
12
- icon: "uy:mr-100"
14
+ icon: "uy:mr-100 uy:transition-transform uy:duration-150 uy:ease-linear uy:origin-center"
13
15
  },
14
16
  variants: {
15
17
  isExpanded: {
@@ -24,24 +26,22 @@ const h = b({
24
26
  defaultVariants: {
25
27
  isExpanded: !1
26
28
  }
27
- }), w = m(
29
+ }), w = d(
28
30
  ({ children: a, suffix: o, ...n }, i) => {
29
- const t = p(y), { base: s, button: u, title: c, icon: d } = h({
30
- isExpanded: t == null ? void 0 : t.isExpanded
31
+ const e = m(f), { base: l, button: s, title: u, icon: c } = g({
32
+ isExpanded: e == null ? void 0 : e.isExpanded
31
33
  });
32
- return /* @__PURE__ */ e(f, { "data-dd-privacy": "allow", ...n, ref: i, className: s(), children: /* @__PURE__ */ l(x, { className: u(), slot: "trigger", children: [
33
- /* @__PURE__ */ l(r, { variant: "bodyStrong", className: c(), children: [
34
- /* @__PURE__ */ e(
35
- v,
36
- {
37
- src: "CaretDownOutlined",
38
- className: d(),
39
- role: "presentation"
40
- }
41
- ),
42
- a
43
- ] }),
44
- o ? /* @__PURE__ */ e(r, { variant: "body", children: o }) : null
34
+ return /* @__PURE__ */ t(x, { "data-dd-privacy": "allow", ...n, ref: i, className: l(), children: /* @__PURE__ */ y(b, { className: s(), slot: "trigger", children: [
35
+ /* @__PURE__ */ t(
36
+ v,
37
+ {
38
+ src: "CaretDownOutlined",
39
+ className: c(),
40
+ role: "presentation"
41
+ }
42
+ ),
43
+ /* @__PURE__ */ t(r, { variant: "bodyStrong", className: u(), children: a }),
44
+ o ? /* @__PURE__ */ t(r, { variant: "body", children: o }) : null
45
45
  ] }) });
46
46
  }
47
47
  );
@@ -1,7 +1,15 @@
1
1
  import { default as React } from 'react';
2
- import { Row, Table as TableType } from '@tanstack/react-table';
2
+ import { Row, RowData, Table as TableType } from '@tanstack/react-table';
3
3
  import { TablePaginationProps } from '../table/parts/TablePagination.js';
4
4
  import { TableProps, TableRootProps } from '../table/Table.js';
5
+ declare module '@tanstack/react-table' {
6
+ interface ColumnMeta<TData extends RowData, TValue> {
7
+ isRowHeader?: boolean;
8
+ className?: string;
9
+ helperText?: string;
10
+ isFocusable?: boolean;
11
+ }
12
+ }
5
13
  export interface DataTablePaginationLabels {
6
14
  /** Label for the "rows per page" and pagination label dropdown */
7
15
  itemLabel?: string;
@@ -50,39 +58,62 @@ export interface DataTableProps<TData> extends Omit<TableRootProps, 'children'>,
50
58
  * @see {@link DataTableProps} for all available props
51
59
  * @example
52
60
  * ```tsx
53
- * import { DataTable, TableRow, TableCell } from '@payfit/unity-components'
61
+ * import { DataTableRoot, DataTable, DataTableBulkActions, TableRow, TableCell } from '@payfit/unity-components'
54
62
  * import { flexRender, useReactTable, getCoreRowModel, getPaginationRowModel } from '@tanstack/react-table'
55
- * import { useState } from 'react'
63
+ * import { useState, useMemo } from 'react'
56
64
  *
57
65
  * function EmployeeTable() {
58
66
  * const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 10 })
67
+ * const [rowSelection, setRowSelection] = useState({})
68
+ *
69
+ * // Memoize columns to prevent unnecessary re-renders
70
+ * const columns = useMemo(() => employeeColumns, [])
59
71
  *
60
72
  * const table = useReactTable({
61
73
  * data: employees,
62
- * columns: employeeColumns,
63
- * state: { pagination },
74
+ * columns,
75
+ * // Provide stable row ID for better performance
76
+ * getRowId: (row) => row.id,
77
+ * state: {
78
+ * pagination,
79
+ * rowSelection,
80
+ * },
64
81
  * onPaginationChange: setPagination,
82
+ * onRowSelectionChange: setRowSelection,
65
83
  * getCoreRowModel: getCoreRowModel(),
66
84
  * getPaginationRowModel: getPaginationRowModel(),
85
+ * // Enable row selection features
86
+ * enableRowSelection: true,
87
+ * enableMultiRowSelection: true,
67
88
  * })
68
89
  *
90
+ * const actions = [
91
+ * { id: 'delete', label: 'Delete', onPress: handleDelete },
92
+ * { id: 'archive', label: 'Archive', onPress: handleArchive },
93
+ * ]
94
+ *
69
95
  * return (
70
- * <DataTable table={table} minRows={5} maxRows={10}>
71
- * {row => (
72
- * <TableRow key={row.id}>
73
- * {row.getVisibleCells().map(cell => (
74
- * <TableCell key={cell.id}>
75
- * {flexRender(cell.column.columnDef.cell, cell.getContext())}
76
- * </TableCell>
77
- * ))}
78
- * </TableRow>
79
- * )}
80
- * </DataTable>
96
+ * <DataTableRoot>
97
+ * <DataTable table={table} minRows={5} maxRows={10}>
98
+ * {row => (
99
+ * <TableRow key={row.id} isSelected={row.getIsSelected()}>
100
+ * {row.getVisibleCells().map(cell => (
101
+ * <TableCell key={cell.id}>
102
+ * {flexRender(cell.column.columnDef.cell, cell.getContext())}
103
+ * </TableCell>
104
+ * ))}
105
+ * </TableRow>
106
+ * )}
107
+ * </DataTable>
108
+ * <DataTableBulkActions table={table} actions={actions} />
109
+ * </DataTableRoot>
81
110
  * )
82
111
  * }
83
112
  * ```
84
113
  * @remarks
85
- * [API](https://unity-components.payfit.io/?path=/docs/data-datatable--docs) [Demo](https://unity-components.payfit.io/?path=/docs/data-datatable--docs)
114
+ * - For bulk actions, use DataTableBulkActions component alongside DataTable within DataTableRoot
115
+ * - DataTableBulkActions provides the F6 keyboard shortcut for accessibility
116
+ * - [API](https://unity-components.payfit.io/?path=/docs/data-datatable--docs) • [Demo](https://unity-components.payfit.io/?path=/docs/data-datatable--docs)
86
117
  */
87
118
  declare function DataTable<TData extends object>({ table, isLoading, error, emptyState, loadingState, errorState, pagination, minRows, maxRows, children, ...rest }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
88
119
  declare namespace DataTable {
@@ -1,82 +1,126 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { useRef as x, useEffect as E } from "react";
3
- import { flexRender as g } from "@tanstack/react-table";
4
- import { TableBody as R } from "../table/parts/TableBody.js";
5
- import { TableColumnHeader as z } from "../table/parts/TableColumnHeader.js";
6
- import { TableEmptyStateLoading as D, TableEmptyStateError as H, TableEmptyStateNoData as y } from "../table/parts/TableEmptyState.js";
7
- import { TableHeader as M } from "../table/parts/TableHeader.js";
8
- import { TablePagination as j } from "../table/parts/TablePagination.js";
9
- import { TableRoot as I, Table as N } from "../table/Table.js";
10
- import { ColumnSortHeader as O } from "./parts/ColumnSortHeader.js";
11
- function v({
12
- table: e,
13
- isLoading: l,
14
- error: a,
1
+ import { jsxs as c, jsx as e, Fragment as H } from "react/jsx-runtime";
2
+ import { useRef as v, useEffect as I } from "react";
3
+ import { flexRender as x } from "@tanstack/react-table";
4
+ import { useId as N } from "react-aria";
5
+ import { CircularIconButton as M } from "../icon-button/CircularIconButton.js";
6
+ import { TableBody as F } from "../table/parts/TableBody.js";
7
+ import { TableColumnHeader as O } from "../table/parts/TableColumnHeader.js";
8
+ import { TableEmptyStateLoading as j, TableEmptyStateError as B, TableEmptyStateNoData as $ } from "../table/parts/TableEmptyState.js";
9
+ import { TableHeader as G } from "../table/parts/TableHeader.js";
10
+ import { TablePagination as L } from "../table/parts/TablePagination.js";
11
+ import { TableRoot as Q, Table as W } from "../table/Table.js";
12
+ import { ColumnSortHeader as k } from "./parts/ColumnSortHeader.js";
13
+ const S = ({
14
+ children: o,
15
+ columnNameId: m,
16
+ helperText: l
17
+ }) => l !== void 0 ? /* @__PURE__ */ c("div", { className: "uy:flex uy:gap-50 uy:items-center", children: [
18
+ o,
19
+ /* @__PURE__ */ e(
20
+ M,
21
+ {
22
+ "aria-labelledby": m,
23
+ className: "uy:text-content-neutral-low uy:hover:bg-surface-neutral-hover uy:hover:text-content-neutral-low",
24
+ icon: "QuestionOutlined",
25
+ title: l,
26
+ color: "content.neutral.low"
27
+ }
28
+ )
29
+ ] }) : /* @__PURE__ */ e(H, { children: o });
30
+ function q({
31
+ table: o,
32
+ isLoading: m,
33
+ error: l,
15
34
  emptyState: i,
16
- loadingState: S,
17
- errorState: T,
35
+ loadingState: w,
36
+ errorState: C,
18
37
  pagination: n,
19
- minRows: P,
20
- maxRows: b,
21
- children: C,
22
- ...m
38
+ minRows: y,
39
+ maxRows: P,
40
+ children: D,
41
+ ...u
23
42
  }) {
24
- var p;
25
- const c = x(null), { pageIndex: s, pageSize: u } = e.getState().pagination;
26
- E(() => {
43
+ var g;
44
+ const s = v(null), E = N(), { pageIndex: d, pageSize: p } = o.getState().pagination;
45
+ I(() => {
27
46
  var r;
28
- (r = c.current) == null || r.scrollToTop();
29
- }, [s, u]);
30
- const h = {
31
- label: m.label,
32
- description: m.description,
33
- isHorizontalScrollEnabled: m.isHorizontalScrollEnabled
34
- }, d = () => {
47
+ (r = s.current) == null || r.scrollToTop();
48
+ }, [d, p]);
49
+ const R = {
50
+ label: u.label,
51
+ description: u.description,
52
+ isHorizontalScrollEnabled: u.isHorizontalScrollEnabled
53
+ }, f = () => {
54
+ if (m)
55
+ return w ?? /* @__PURE__ */ e(j, {});
35
56
  if (l)
36
- return S ?? /* @__PURE__ */ o(D, {});
37
- if (a)
38
- return T ?? /* @__PURE__ */ o(H, {});
39
- }, w = () => l || a ? d() : e.getRowModel().rows.length === 0 ? i ?? /* @__PURE__ */ o(y, {}) : i;
40
- return /* @__PURE__ */ f(I, { minRows: P, maxRows: b, children: [
41
- /* @__PURE__ */ f(N, { ref: c, ...h, children: [
42
- /* @__PURE__ */ o(M, { children: e.getHeaderGroups().map(
43
- (r) => r.headers.map((t) => /* @__PURE__ */ o(z, { children: e.getRowModel().rows.length > 0 && t.column.getCanSort() ? /* @__PURE__ */ o(O, { header: t, children: /* @__PURE__ */ o("span", { children: g(
44
- t.column.columnDef.header,
45
- t.getContext()
46
- ) }) }) : /* @__PURE__ */ o("span", { children: g(
47
- t.column.columnDef.header,
48
- t.getContext()
49
- ) }) }, t.id))
57
+ return C ?? /* @__PURE__ */ e(B, {});
58
+ }, z = () => m || l ? f() : o.getRowModel().rows.length === 0 ? i ?? /* @__PURE__ */ e($, {}) : i;
59
+ return /* @__PURE__ */ c(Q, { minRows: y, maxRows: P, children: [
60
+ /* @__PURE__ */ c(W, { ref: s, ...R, children: [
61
+ /* @__PURE__ */ e(G, { children: o.getHeaderGroups().map(
62
+ (r) => r.headers.map((t) => {
63
+ var b, T, h;
64
+ const a = `${E}-column-name-${t.column.columnDef.id}`;
65
+ return /* @__PURE__ */ e(
66
+ O,
67
+ {
68
+ isFocusable: (b = t.column.columnDef.meta) == null ? void 0 : b.isFocusable,
69
+ children: o.getRowModel().rows.length > 0 && t.column.getCanSort() ? /* @__PURE__ */ e(k, { header: t, children: /* @__PURE__ */ e(
70
+ S,
71
+ {
72
+ columnNameId: a,
73
+ helperText: (T = t.column.columnDef.meta) == null ? void 0 : T.helperText,
74
+ children: /* @__PURE__ */ e("span", { id: a, children: x(
75
+ t.column.columnDef.header,
76
+ t.getContext()
77
+ ) })
78
+ }
79
+ ) }) : /* @__PURE__ */ e(
80
+ S,
81
+ {
82
+ columnNameId: a,
83
+ helperText: (h = t.column.columnDef.meta) == null ? void 0 : h.helperText,
84
+ children: /* @__PURE__ */ e("span", { id: a, children: x(
85
+ t.column.columnDef.header,
86
+ t.getContext()
87
+ ) })
88
+ }
89
+ )
90
+ },
91
+ t.id
92
+ );
93
+ })
50
94
  ) }),
51
- /* @__PURE__ */ o(
52
- R,
95
+ /* @__PURE__ */ e(
96
+ F,
53
97
  {
54
- renderEmptyState: w,
55
- renderDataState: d,
56
- children: !l && !a && e.getRowModel().rows.map(C)
98
+ renderEmptyState: z,
99
+ renderDataState: f,
100
+ children: !m && !l && o.getRowModel().rows.map(D)
57
101
  }
58
102
  )
59
103
  ] }),
60
- e.getPageCount() > 1 && /* @__PURE__ */ o(
61
- j,
104
+ o.getPageCount() > 1 && /* @__PURE__ */ e(
105
+ L,
62
106
  {
63
- pageCount: e.getPageCount(),
64
- rowCount: e.getPaginationRowModel().rows.length,
65
- currentPage: s + 1,
66
- rowsPerPage: u,
107
+ pageCount: o.getPageCount(),
108
+ rowCount: o.getPaginationRowModel().rows.length,
109
+ currentPage: d + 1,
110
+ rowsPerPage: p,
67
111
  pageSizeOptions: n == null ? void 0 : n.pageSizeOptions,
68
112
  onPageChange: (r) => {
69
- e.setPageIndex(r - 1);
113
+ o.setPageIndex(r - 1);
70
114
  },
71
115
  onPageSizeChange: (r) => {
72
- e.setPageSize(r);
116
+ o.setPageSize(r);
73
117
  },
74
- itemLabel: (p = n == null ? void 0 : n.labels) == null ? void 0 : p.itemLabel
118
+ itemLabel: (g = n == null ? void 0 : n.labels) == null ? void 0 : g.itemLabel
75
119
  }
76
120
  )
77
121
  ] });
78
122
  }
79
- v.displayName = "DataTable";
123
+ q.displayName = "DataTable";
80
124
  export {
81
- v as DataTable
125
+ q as DataTable
82
126
  };
@@ -1,3 +1,7 @@
1
1
  import { Employee } from './employee-data.js';
2
+ /**
3
+ * Creates optimized checkbox column with stable handlers to prevent unnecessary re-renders
4
+ */
5
+ export declare const createCheckboxColumn: () => import('@tanstack/table-core').DisplayColumnDef<Employee, unknown>;
2
6
  export declare const employeeColumns: (import('@tanstack/table-core').AccessorKeyColumnDefBase<Employee, string> & Partial<import('@tanstack/table-core').IdIdentifier<Employee, string>>)[];
3
7
  export declare const employeeColumnsWithCheckbox: ((import('@tanstack/table-core').AccessorKeyColumnDefBase<Employee, string> & Partial<import('@tanstack/table-core').IdIdentifier<Employee, string>>) | import('@tanstack/table-core').DisplayColumnDef<Employee, unknown>)[];