@purpurds/table 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/LICENSE.txt +213 -0
  2. package/dist/cell-types/badge-cell.d.ts +8 -0
  3. package/dist/cell-types/badge-cell.d.ts.map +1 -0
  4. package/dist/cell-types/body-text-cell.d.ts +8 -0
  5. package/dist/cell-types/body-text-cell.d.ts.map +1 -0
  6. package/dist/cell-types/button-cell.d.ts +8 -0
  7. package/dist/cell-types/button-cell.d.ts.map +1 -0
  8. package/dist/cell-types/button-group-cell.d.ts +16 -0
  9. package/dist/cell-types/button-group-cell.d.ts.map +1 -0
  10. package/dist/cell-types/cta-link-cell.d.ts +8 -0
  11. package/dist/cell-types/cta-link-cell.d.ts.map +1 -0
  12. package/dist/cell-types/date-cell.d.ts +8 -0
  13. package/dist/cell-types/date-cell.d.ts.map +1 -0
  14. package/dist/cell-types/empty-cell.d.ts +4 -0
  15. package/dist/cell-types/empty-cell.d.ts.map +1 -0
  16. package/dist/cell-types/error-message-cell.d.ts +8 -0
  17. package/dist/cell-types/error-message-cell.d.ts.map +1 -0
  18. package/dist/cell-types/icon-text-cell.d.ts +8 -0
  19. package/dist/cell-types/icon-text-cell.d.ts.map +1 -0
  20. package/dist/cell-types/lead-text-cell.d.ts +8 -0
  21. package/dist/cell-types/lead-text-cell.d.ts.map +1 -0
  22. package/dist/cell-types/link-cell.d.ts +8 -0
  23. package/dist/cell-types/link-cell.d.ts.map +1 -0
  24. package/dist/cell-types/number-cell.d.ts +8 -0
  25. package/dist/cell-types/number-cell.d.ts.map +1 -0
  26. package/dist/cell-types/row-selection-cell.d.ts +8 -0
  27. package/dist/cell-types/row-selection-cell.d.ts.map +1 -0
  28. package/dist/cell-types/row-toggle-cell.d.ts +8 -0
  29. package/dist/cell-types/row-toggle-cell.d.ts.map +1 -0
  30. package/dist/cell-types/toggle-cell.d.ts +8 -0
  31. package/dist/cell-types/toggle-cell.d.ts.map +1 -0
  32. package/dist/cell-types/warning-message-cell.d.ts +8 -0
  33. package/dist/cell-types/warning-message-cell.d.ts.map +1 -0
  34. package/dist/metadata.js +17 -0
  35. package/dist/story-utils/column-def.d.ts +5 -0
  36. package/dist/story-utils/column-def.d.ts.map +1 -0
  37. package/dist/story-utils/table-data.d.ts +35 -0
  38. package/dist/story-utils/table-data.d.ts.map +1 -0
  39. package/dist/story-utils/use-fetch-table-data-hook.d.ts +11 -0
  40. package/dist/story-utils/use-fetch-table-data-hook.d.ts.map +1 -0
  41. package/dist/styles.css +1 -0
  42. package/dist/table-action-bar.d.ts +26 -0
  43. package/dist/table-action-bar.d.ts.map +1 -0
  44. package/dist/table-body.d.ts +10 -0
  45. package/dist/table-body.d.ts.map +1 -0
  46. package/dist/table-column-header-cell.d.ts +28 -0
  47. package/dist/table-column-header-cell.d.ts.map +1 -0
  48. package/dist/table-export-drawer.d.ts +17 -0
  49. package/dist/table-export-drawer.d.ts.map +1 -0
  50. package/dist/table-header.d.ts +11 -0
  51. package/dist/table-header.d.ts.map +1 -0
  52. package/dist/table-row-cell-skeleton.d.ts +14 -0
  53. package/dist/table-row-cell-skeleton.d.ts.map +1 -0
  54. package/dist/table-row-cell.d.ts +25 -0
  55. package/dist/table-row-cell.d.ts.map +1 -0
  56. package/dist/table-row.d.ts +11 -0
  57. package/dist/table-row.d.ts.map +1 -0
  58. package/dist/table-settings-drawer.d.ts +41 -0
  59. package/dist/table-settings-drawer.d.ts.map +1 -0
  60. package/dist/table-toolbar.d.ts +37 -0
  61. package/dist/table-toolbar.d.ts.map +1 -0
  62. package/dist/table.cjs.js +259 -0
  63. package/dist/table.cjs.js.map +1 -0
  64. package/dist/table.d.ts +20 -0
  65. package/dist/table.d.ts.map +1 -0
  66. package/dist/table.es.js +13585 -0
  67. package/dist/table.es.js.map +1 -0
  68. package/dist/test-utils/column-def.d.ts +6 -0
  69. package/dist/test-utils/column-def.d.ts.map +1 -0
  70. package/dist/test-utils/helpers.d.ts +138 -0
  71. package/dist/test-utils/helpers.d.ts.map +1 -0
  72. package/dist/test-utils/table-data.d.ts +33 -0
  73. package/dist/test-utils/table-data.d.ts.map +1 -0
  74. package/dist/types.d.ts +420 -0
  75. package/dist/types.d.ts.map +1 -0
  76. package/dist/use-screen-size.hook.d.ts +7 -0
  77. package/dist/use-screen-size.hook.d.ts.map +1 -0
  78. package/dist/use-truncated-hook.d.ts +10 -0
  79. package/dist/use-truncated-hook.d.ts.map +1 -0
  80. package/dist/utils/custom-functions.d.ts +9 -0
  81. package/dist/utils/custom-functions.d.ts.map +1 -0
  82. package/dist/utils/unit-conversions.d.ts +19 -0
  83. package/dist/utils/unit-conversions.d.ts.map +1 -0
  84. package/dist/utils/unit-conversions.spec.d.ts +2 -0
  85. package/dist/utils/unit-conversions.spec.d.ts.map +1 -0
  86. package/eslint.config.mjs +2 -0
  87. package/package.json +82 -0
  88. package/src/cell-types/badge-cell.tsx +25 -0
  89. package/src/cell-types/body-text-cell.tsx +54 -0
  90. package/src/cell-types/button-cell.tsx +26 -0
  91. package/src/cell-types/button-group-cell.tsx +54 -0
  92. package/src/cell-types/cta-link-cell.tsx +25 -0
  93. package/src/cell-types/date-cell.tsx +33 -0
  94. package/src/cell-types/empty-cell.tsx +6 -0
  95. package/src/cell-types/error-message-cell.tsx +30 -0
  96. package/src/cell-types/icon-text-cell.tsx +30 -0
  97. package/src/cell-types/lead-text-cell.tsx +19 -0
  98. package/src/cell-types/link-cell.tsx +58 -0
  99. package/src/cell-types/number-cell.tsx +27 -0
  100. package/src/cell-types/row-selection-cell.tsx +22 -0
  101. package/src/cell-types/row-toggle-cell.tsx +23 -0
  102. package/src/cell-types/toggle-cell.tsx +19 -0
  103. package/src/cell-types/warning-message-cell.tsx +30 -0
  104. package/src/global.d.ts +4 -0
  105. package/src/story-utils/column-def.ts +148 -0
  106. package/src/story-utils/table-data.tsx +262 -0
  107. package/src/story-utils/use-fetch-table-data-hook.tsx +30 -0
  108. package/src/table-action-bar.module.scss +106 -0
  109. package/src/table-action-bar.test.tsx +111 -0
  110. package/src/table-action-bar.tsx +104 -0
  111. package/src/table-body.tsx +25 -0
  112. package/src/table-column-header-cell.tsx +305 -0
  113. package/src/table-export-drawer.module.scss +9 -0
  114. package/src/table-export-drawer.test.tsx +75 -0
  115. package/src/table-export-drawer.tsx +59 -0
  116. package/src/table-header.tsx +35 -0
  117. package/src/table-kitchen-sink.test.tsx +1196 -0
  118. package/src/table-row-cell-skeleton.tsx +61 -0
  119. package/src/table-row-cell.test.tsx +360 -0
  120. package/src/table-row-cell.tsx +188 -0
  121. package/src/table-row.tsx +30 -0
  122. package/src/table-settings-drawer.module.scss +25 -0
  123. package/src/table-settings-drawer.test.tsx +350 -0
  124. package/src/table-settings-drawer.tsx +254 -0
  125. package/src/table-toolbar.module.scss +17 -0
  126. package/src/table-toolbar.test.tsx +95 -0
  127. package/src/table-toolbar.tsx +136 -0
  128. package/src/table.module.scss +367 -0
  129. package/src/table.stories.tsx +1246 -0
  130. package/src/table.story.css +11 -0
  131. package/src/table.test.tsx +318 -0
  132. package/src/table.tsx +501 -0
  133. package/src/test-utils/column-def.ts +152 -0
  134. package/src/test-utils/helpers.ts +234 -0
  135. package/src/test-utils/table-data.tsx +318 -0
  136. package/src/types.ts +496 -0
  137. package/src/use-screen-size.hook.ts +23 -0
  138. package/src/use-truncated-hook.tsx +74 -0
  139. package/src/utils/custom-functions.ts +52 -0
  140. package/src/utils/unit-conversions.spec.ts +92 -0
  141. package/src/utils/unit-conversions.ts +30 -0
  142. package/vitest.setup.ts +60 -0
@@ -0,0 +1,6 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { TableDataLarge, TableDataSmall } from './table-data';
3
+
4
+ export declare const createColumnDefKitchenSink: (clickCellButton: () => void, clickButtonGroupCellButton: () => void) => ColumnDef<TableDataLarge>[];
5
+ export declare const createColumnDefSmall: () => ColumnDef<TableDataSmall>[];
6
+ //# sourceMappingURL=column-def.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-def.d.ts","sourceRoot":"","sources":["../../src/test-utils/column-def.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,eAAO,MAAM,0BAA0B,oBACpB,MAAM,IAAI,8BACC,MAAM,IAAI,KACrC,SAAS,CAAC,cAAc,CAAC,EAiH3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,SAAS,CAAC,cAAc,CAAC,EA6BhE,CAAC"}
@@ -0,0 +1,138 @@
1
+ export declare const getTableHead: (table: HTMLElement) => HTMLElement;
2
+ export declare const getTableBody: (table: HTMLElement) => HTMLElement;
3
+ export declare const getTableColumnHeaderByText: (table: HTMLElement, columnHeader: string) => HTMLElement;
4
+ export declare const getCellInRowContent: (table: HTMLTableElement, rowNr: number, columnHeader: string) => HTMLTableCellElement;
5
+ export declare const getTableHeadRow: (table: HTMLTableElement, rowNr?: number) => HTMLTableRowElement;
6
+ export declare const getTableBodyRow: (table: HTMLTableElement, rowNr: number) => HTMLTableRowElement;
7
+ export declare const getCheckBoxForTableBodyRow: (table: HTMLTableElement, rowNr: number) => HTMLButtonElement;
8
+ export declare const getRadioToggleForTableBodyRow: (table: HTMLTableElement, rowNr: number) => HTMLButtonElement;
9
+ export declare const getCheckBoxForTableHeaderRow: (table: HTMLTableElement, rowNr?: number) => HTMLButtonElement;
10
+ export declare const getInputFilterForHeader: (table: HTMLTableElement, column: string) => HTMLElement;
11
+ export declare const filterOnString: (table: HTMLTableElement, column: string, filterValue: string) => Promise<void>;
12
+ export declare const getComboBoxFilterForHeader: (table: HTMLTableElement, column: string) => HTMLElement;
13
+ export declare const filterOnSelect: (table: HTMLTableElement, column: string, filterValue: string) => Promise<void>;
14
+ export declare const Selectors: {
15
+ ACTION_BAR: {
16
+ CANCEL_BUTTON: string;
17
+ PRIMARY_BUTTON: string;
18
+ ROOT: string;
19
+ SECONDARY_BUTTON: string;
20
+ SELECTED_TEXT: string;
21
+ TOGGLE_SELECTED: string;
22
+ };
23
+ COLUMN_HEADER_CELL_TITLE: string;
24
+ EXPORT_DRAWER: {
25
+ BODY_TEXT: string;
26
+ CLOSE_BUTTON: string;
27
+ CONTENT: string;
28
+ HEADER_ROW: string;
29
+ EXPORT_BUTTON: string;
30
+ TITLE: string;
31
+ };
32
+ SETTINGS_DRAWER: {
33
+ CONTENT: string;
34
+ FOOTER: string;
35
+ FOOTER_RESET_SETTINGS_BUTTON: string;
36
+ GENERAL_SETTINGS: string;
37
+ HEADER_ROW: string;
38
+ ROOT: string;
39
+ TITLE: string;
40
+ TOGGLE: string;
41
+ TOGGLE_LABEL: string;
42
+ VISIBLE_COLUMNS: string;
43
+ };
44
+ TOOLBAR: {
45
+ CLEAR_FILTERS_BUTTON: string;
46
+ EXPAND_BUTTON: string;
47
+ EXPORT_BUTTON: string;
48
+ ROOT: string;
49
+ SETTINGS_BUTTON: string;
50
+ TABLE_ROWS_COUNT: string;
51
+ };
52
+ EMPTY_TABLE: {
53
+ TITLE: string;
54
+ DESCRIPTION: string;
55
+ };
56
+ PAGINATION: {
57
+ ROOT: string;
58
+ PAGE_SIZE_SELECT: string;
59
+ };
60
+ SKELETON: string;
61
+ };
62
+ export declare const copy: {
63
+ actionBar: {
64
+ buttons: {
65
+ cancel: string;
66
+ primary: string;
67
+ secondary: string;
68
+ toggleSelected: string;
69
+ };
70
+ selectedRowsCount: {
71
+ of: string;
72
+ selected: string;
73
+ };
74
+ };
75
+ exportDrawer: {
76
+ bodyText: string;
77
+ closeButtonText: string;
78
+ link: string;
79
+ title: string;
80
+ };
81
+ pagination: {
82
+ nextButtonAriaLabel: string;
83
+ nextButtonText: string;
84
+ outOfLabel: string;
85
+ pageSelectorListBoxLabel: string;
86
+ pageSelectorNoOptionsText: string;
87
+ previousButtonAriaLabel: string;
88
+ previousButtonText: string;
89
+ stepNumberPrefix: string;
90
+ };
91
+ settingsDrawer: {
92
+ buttons: {
93
+ closeDrawer: string;
94
+ resetSettings: string;
95
+ };
96
+ generalSettings: {
97
+ header: string;
98
+ toggles: {
99
+ lockFirstcolumn: string;
100
+ showFilters: string;
101
+ stickyHeader: string;
102
+ };
103
+ };
104
+ title: string;
105
+ visibleColumns: {
106
+ header: string;
107
+ };
108
+ };
109
+ sortingAriaLabels: {
110
+ asc: string;
111
+ default: string;
112
+ desc: string;
113
+ };
114
+ toolbar: {
115
+ buttons: {
116
+ clearFilters: string;
117
+ expand: string;
118
+ export: string;
119
+ settings: string;
120
+ };
121
+ ariaLabels: {
122
+ clearFilters: string;
123
+ expand: string;
124
+ export: string;
125
+ settings: string;
126
+ };
127
+ rowCount: {
128
+ of: string;
129
+ rows: string;
130
+ showing: string;
131
+ };
132
+ };
133
+ rowSelectionAriaLabels: {
134
+ header: string;
135
+ row: string;
136
+ };
137
+ };
138
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/test-utils/helpers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,UAAW,WAAW,KAAG,WAIjD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,KAAG,WAIjD,CAAC;AAEF,eAAO,MAAM,0BAA0B,UAC9B,WAAW,gBACJ,MAAM,KACnB,WAKF,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACvB,gBAAgB,SAChB,MAAM,gBACC,MAAM,KACnB,oBAQF,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,gBAAgB,qBAAc,mBAEpE,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,gBAAgB,SAAS,MAAM,KAAG,mBAExE,CAAC;AAGF,eAAO,MAAM,0BAA0B,UAC9B,gBAAgB,SAChB,MAAM,KACZ,iBAEF,CAAC;AAEF,eAAO,MAAM,6BAA6B,UACjC,gBAAgB,SAChB,MAAM,KACZ,iBAEF,CAAC;AAGF,eAAO,MAAM,4BAA4B,UAChC,gBAAgB,qBAEtB,iBAEF,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAAW,gBAAgB,UAAU,MAAM,gBAG9E,CAAC;AAEF,eAAO,MAAM,cAAc,UAClB,gBAAgB,UACf,MAAM,eACD,MAAM,kBAOpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,UAAU,MAAM,gBAGjF,CAAC;AAEF,eAAO,MAAM,cAAc,UAClB,gBAAgB,UACf,MAAM,eACD,MAAM,kBAIpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CrB,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EhB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { BadgeVariant } from '@purpurds/badge';
2
+ import { ButtonProps } from '@purpurds/button';
3
+ import { ButtonGroupButtonProp } from '../cell-types/button-group-cell';
4
+
5
+ export type TableDataLarge = {
6
+ id: number;
7
+ name: string;
8
+ link: {
9
+ href: string;
10
+ children: string;
11
+ };
12
+ badge: {
13
+ variant: BadgeVariant;
14
+ children: string;
15
+ };
16
+ age: number;
17
+ position: number;
18
+ date: string;
19
+ button: ButtonProps;
20
+ buttonGroup?: ButtonGroupButtonProp[];
21
+ };
22
+ export declare const tableDataLarge: TableDataLarge[];
23
+ export type TableDataSmall = {
24
+ id: number;
25
+ name: string;
26
+ link: {
27
+ href: string;
28
+ children: string;
29
+ };
30
+ age: number;
31
+ };
32
+ export declare const tableDataSmall: TableDataSmall[];
33
+ //# sourceMappingURL=table-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-data.d.ts","sourceRoot":"","sources":["../../src/test-utils/table-data.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,KAAK,EAAE;QACL,OAAO,EAAE,YAAY,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACvC,CAAC;AAuBF,eAAO,MAAM,cAAc,EAAE,cAAc,EAoM1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAAc,EAmE1C,CAAC"}
@@ -0,0 +1,420 @@
1
+ import { HeadingTagType } from '@purpurds/heading';
2
+ import { SelectProps } from '@purpurds/select';
3
+ import { Cell, FilterFn, Row, RowData, SortingFn } from '@tanstack/react-table';
4
+ import { TableActionBarCopyProps } from './table-action-bar';
5
+ import { FilterVariants, SortingAriaLabels } from './table-column-header-cell';
6
+ import { TableExportDrawerCopyProps } from './table-export-drawer';
7
+ import { TableSettingsDrawerCopyProps } from './table-settings-drawer';
8
+
9
+ export type CellType = "badge" | "bodyText" | "button" | "buttonGroup" | "ctaLink" | "date" | "empty" | "errorAlertMessage" | "iconText" | "leadText" | "link" | "number" | "rowSelection" | "rowToggle" | "toggle" | "warningAlertMessage";
10
+ declare module "@tanstack/react-table" {
11
+ interface ColumnMeta<TData extends RowData, TValue> {
12
+ /**
13
+ * Represents the variant of the filter applied to a column.
14
+ * - "string": A text-based filter.
15
+ * - "select": A dropdown-based filter.
16
+ */
17
+ filterVariant?: FilterVariants;
18
+ /**
19
+ * Placeholder text for the filter input.
20
+ */
21
+ filterPlaceholder?: string;
22
+ /**
23
+ * ARIA label for the filter input, used for accessibility.
24
+ */
25
+ filterAriaLabel?: string;
26
+ /**
27
+ * A key used to filter the column data when the data is an object.
28
+ * This is useful for custom filtering logic on a specific key within the object.
29
+ * Required when using the `filterOnFilterKey` filterFn.
30
+ */
31
+ filterKey?: string;
32
+ /**
33
+ * Represents the type of cell in a table row.
34
+ * This determines the behavior and rendering of the cell.
35
+ * - "badge": Displays status, category, or label with visual emphasis, allowing users to differentiate data at a glance without cluttering the table.
36
+ * - "bodyText": Displays all types of textual information.
37
+ * - "button": A single button for performing row-specific actions directly within a table cell, such as edit, delete, or download. Button can be any variant.
38
+ * - "buttonGroup": Similar to the standalone button, but used when multiple actions are needed for a row, grouped together for better organization. Typically placed in the last column. Buttons can be any variants.
39
+ * - "ctaLink": Allowing users to navigate to external or internal resources.
40
+ * - "date": Displays date and time in a consistent format, with the option to toggle the time visibility on or off. Visibility is controlled through the 'showTime' attribute in the meta. Please provide the date in ISO format.
41
+ * - "empty": Used when a cell has no data or when the data is not applicable.
42
+ * - "errorAlertMessage": Displays validation or data-related errors, typically with a brief description to help users identify the issue.
43
+ * - "iconText": A visual symbol that represents contextual information, enhancing readability by conveying meaning at a glance without the need for text. The ext is optional but recommended to use for further clarity.
44
+ * - "leadText": Highlights key information, like a primary identifier, to ensure it stands out in the table. Typically used in the first column.
45
+ * - "link": Enables users to navigate to external or internal resources. It has lower importance and is less intrusive than a CTA link.
46
+ * - "number": Numeric data that isn't related to size should be left-aligned, such as phone numbers or order numbers. Numeric data related to size should be right-aligned for easier scanning, helping users quickly differentiate between values such as prices. Alignment is controlled through the 'numberCellAlignment' attribute in the meta.
47
+ * - "rowSelection":
48
+ * - "toggle": Lets users enable or disable a setting or option directly within a table cell.
49
+ * - "warningAlertMessage": Highlights a potential issue with the data, often accompanied by a brief description to guide users on the necessary action.
50
+ *
51
+ * If you want a custom cell type then leave this undefined and create a custom cell component using the cell attribute in the columnDef.
52
+ */
53
+ cellType?: CellType;
54
+ /**
55
+ * Alignment for number cells. Defaults to "left" if not specified.
56
+ */
57
+ numberCellAlignment?: "left" | "right";
58
+ /**
59
+ * Properties for the select dropdown used in the filter.
60
+ * Required when filterVariant is "select".
61
+ */
62
+ selectProps?: SelectProps;
63
+ /**
64
+ * Callback function triggered when a button cell is clicked.
65
+ * Only applicable when cellType is "button".
66
+ */
67
+ onClick?: (cell: Cell<TData, unknown> & {
68
+ buttonId?: string;
69
+ }) => void;
70
+ /**
71
+ * Determines whether to show the time in a date cell.
72
+ * Enabled by default when cellType is "date".
73
+ */
74
+ showTime?: boolean;
75
+ /**
76
+ * Aria labels for row selection checkboxes.
77
+ * Used for accessibility purposes.
78
+ */
79
+ rowSelectionAriaLabels?: {
80
+ header: string;
81
+ row: string;
82
+ };
83
+ }
84
+ interface FilterFns {
85
+ /**
86
+ * A custom filter function that filters data based on a specified key.
87
+ * Useful for advanced filtering scenarios.
88
+ * Requires the `filterKey` property in the column's meta.
89
+ */
90
+ filterOnFilterKey: FilterFn<unknown>;
91
+ }
92
+ interface SortingFns {
93
+ /**
94
+ * A custom sorting function that sorts badge column based on the badge variant.
95
+ */
96
+ sortOnBadgeVariant: SortingFn<unknown>;
97
+ /**
98
+ * A custom sorting function that sorts badge column based on the badge value.
99
+ */
100
+ sortOnBadgeValue: SortingFn<unknown>;
101
+ }
102
+ }
103
+ /**
104
+ * Props for enabling and configuring the action bar in a data table component.
105
+ */
106
+ export type WithActionBarProps = {
107
+ /**
108
+ * Configuration for the action bar copy, such as labels and messages.
109
+ */
110
+ actionbarCopy: TableActionBarCopyProps;
111
+ /**
112
+ * Flag to enable the action bar functionality.
113
+ */
114
+ enableActionBar: true;
115
+ /**
116
+ * The total number of rows in the data table, displayed in the action bar.
117
+ */
118
+ actionBarTotalRowCount: number;
119
+ /**
120
+ * Callback function triggered when the primary button in the action bar is clicked.
121
+ */
122
+ onPrimaryButtonClick: () => void;
123
+ /**
124
+ * Optional callback function triggered when the secondary button in the action bar is clicked.
125
+ */
126
+ onSecondaryButtonClick?: () => void;
127
+ };
128
+ export type WithoutActionBarProps = {
129
+ actionbarCopy?: never;
130
+ enableActionBar?: false | undefined;
131
+ actionBarTotalRowCount?: never;
132
+ onPrimaryButtonClick?: never;
133
+ onSecondaryButtonClick?: never;
134
+ };
135
+ /**
136
+ * Props for displaying an empty table state in a data table component.
137
+ */
138
+ export type WithEmptyTableProps = {
139
+ /**
140
+ * Copy for the empty table state, such as title and description.
141
+ */
142
+ emptyTableCopy: {
143
+ title: string;
144
+ description: string;
145
+ };
146
+ /**
147
+ * The heading tag to use for the empty table title.
148
+ */
149
+ emptyTableHeadingTag: HeadingTagType;
150
+ /**
151
+ * Icon to display in the empty table state.
152
+ */
153
+ emptyTableIcon: React.ReactNode;
154
+ };
155
+ export type WithoutEmptyTableProps = {
156
+ emptyTableCopy?: never;
157
+ emptyTableHeadingTag?: never;
158
+ emptyTableIcon?: never;
159
+ };
160
+ /**
161
+ * Props for enabling a loading state in a data table component.
162
+ */
163
+ export type WithLoadingProps = {
164
+ /**
165
+ * Flag to enable the loading state.
166
+ */
167
+ loading: boolean;
168
+ /**
169
+ * The number of skeleton rows to display while loading.
170
+ */
171
+ skeletonRows: number;
172
+ };
173
+ export type WithoutLoadingProps = {
174
+ loading?: never;
175
+ skeletonRows?: never;
176
+ };
177
+ /**
178
+ * Props for enabling row selection functionality in a data table component.
179
+ */
180
+ export type WithRowSelectionProps<TData> = {
181
+ /**
182
+ * Flag to enable row selection functionality.
183
+ */
184
+ enableRowSelection: true | ((row: Row<TData>) => boolean);
185
+ /**
186
+ * ARIA labels for row selection checkboxes, used for accessibility.
187
+ */
188
+ rowSelectionAriaLabels: {
189
+ header: string;
190
+ row: string;
191
+ };
192
+ /**
193
+ * showOnlySelectedRows - Flag to filter the table to show only selected rows.
194
+ */
195
+ showOnlySelectedRows: boolean;
196
+ /**
197
+ * setShowOnlySelectedRows - Function to update the showOnlySelectedRows state.
198
+ */
199
+ setShowOnlySelectedRows: React.Dispatch<React.SetStateAction<boolean>>;
200
+ };
201
+ export type WithoutRowSelectionProps = {
202
+ enableRowSelection?: false | undefined;
203
+ rowSelectionAriaLabels?: never;
204
+ showOnlySelectedRows?: never;
205
+ setShowOnlySelectedRows?: never;
206
+ };
207
+ /**
208
+ * Props for enabling sorting functionality in a data table component.
209
+ */
210
+ export type WithSortingProps = {
211
+ /**
212
+ * Flag to enable sorting functionality.
213
+ */
214
+ enableSorting: true;
215
+ /**
216
+ * ARIA labels for sorting controls, used for accessibility.
217
+ */
218
+ sortingAriaLabels: SortingAriaLabels;
219
+ };
220
+ export type WithoutSortingProps = {
221
+ enableSorting?: false | undefined;
222
+ sortingAriaLabels?: never;
223
+ };
224
+ /**
225
+ * Represents the properties for a data table component with a toolbar.
226
+ * This type is used when the toolbar is enabled and provides additional
227
+ * functionality such as exporting data, toggling table expansion, and displaying
228
+ * settings.
229
+ */
230
+ export type WithToolbarProps = {
231
+ /**
232
+ * Indicates whether the toolbar is enabled.
233
+ */
234
+ enableToolbar: true;
235
+ toolbarCopy?: {
236
+ rowCount?: {
237
+ showing: string;
238
+ of: string;
239
+ rows: string;
240
+ };
241
+ };
242
+ /**
243
+ * The total number of rows to display in the toolbar.
244
+ * This is used when handling data on the server side.
245
+ */
246
+ toolbarTotalRowCount?: number;
247
+ } & (WithFiltersProps | WithoutFiltersProps) & (WithSettingsDrawerProps | WithoutSettingsDrawerProps) & ((WithExportDrawerProps | WithSingleExportFormatProps) | WithoutExportProps) & (WithExpandButtonProps | WithoutExpandButtonProps);
248
+ export type WithoutToolbarProps = {
249
+ /**
250
+ * Indicates whether the toolbar is enabled.
251
+ */
252
+ enableToolbar?: false | undefined;
253
+ exportFormats?: never;
254
+ onExportData?: never;
255
+ onToggleExpand?: never;
256
+ settingsDrawerCopy?: never;
257
+ toolbarCopy?: never;
258
+ toolbarTotalRowCount?: never;
259
+ exportDrawerCopy?: never;
260
+ };
261
+ type WithFiltersProps = {
262
+ enableFilters: true;
263
+ /**
264
+ * Optional properties for customizing the filter copy.
265
+ */
266
+ toolbarCopy: {
267
+ buttons: {
268
+ clearFilters: string;
269
+ };
270
+ ariaLabels: {
271
+ clearFilters: string;
272
+ };
273
+ };
274
+ };
275
+ /**
276
+ * Props for enabling an expand button in a data table component.
277
+ */
278
+ type WithExpandButtonProps = {
279
+ /**
280
+ * Callback function triggered when toggling the expansion state of rows.
281
+ */
282
+ onToggleExpand: () => void;
283
+ /**
284
+ * Copy for the toolbar buttons related to expanding rows.
285
+ */
286
+ toolbarCopy: {
287
+ buttons: {
288
+ expand: string;
289
+ };
290
+ ariaLabels: {
291
+ expand: string;
292
+ };
293
+ };
294
+ };
295
+ /**
296
+ * Props for enabling an export drawer in a data table component.
297
+ */
298
+ type WithExportDrawerProps = {
299
+ /**
300
+ * The formats in which the data can be exported.
301
+ */
302
+ exportFormats: string[];
303
+ /**
304
+ * Copy for the export drawer, such as labels and messages.
305
+ */
306
+ exportDrawerCopy: TableExportDrawerCopyProps;
307
+ /**
308
+ * Callback function triggered when exporting data.
309
+ * @param format - The format in which the data should be exported.
310
+ */
311
+ onExportData: (format: string) => void;
312
+ /**
313
+ * Copy for the toolbar buttons and ARIA labels related to exporting.
314
+ */
315
+ toolbarCopy: {
316
+ buttons: {
317
+ export: string;
318
+ };
319
+ ariaLabels: {
320
+ export: string;
321
+ };
322
+ };
323
+ };
324
+ type WithoutExportProps = {
325
+ exportFormats?: never;
326
+ exportDrawerCopy?: never;
327
+ onExportData?: never;
328
+ toolbarCopy?: {
329
+ buttons: {
330
+ export?: never;
331
+ };
332
+ ariaLabels?: {
333
+ export?: never;
334
+ };
335
+ };
336
+ };
337
+ type WithoutExpandButtonProps = {
338
+ onToggleExpand?: never;
339
+ toolbarCopy?: {
340
+ buttons?: {
341
+ expand?: never;
342
+ };
343
+ ariaLabels?: {
344
+ expand?: never;
345
+ };
346
+ };
347
+ };
348
+ type WithoutFiltersProps = {
349
+ enableFilters?: false | undefined;
350
+ /**
351
+ * Optional properties for customizing the filter copy.
352
+ */
353
+ toolbarCopy?: {
354
+ buttons?: {
355
+ clearFilters?: never;
356
+ };
357
+ ariaLabels?: {
358
+ clearFilters?: never;
359
+ };
360
+ };
361
+ };
362
+ /**
363
+ * Props for enabling a settings drawer in a data table component.
364
+ */
365
+ type WithSettingsDrawerProps = {
366
+ /**
367
+ * Optional properties for customizing the settings drawer copy.
368
+ */
369
+ settingsDrawerCopy: TableSettingsDrawerCopyProps;
370
+ toolbarCopy: {
371
+ buttons: {
372
+ settings: string;
373
+ };
374
+ ariaLabels: {
375
+ settings: string;
376
+ };
377
+ };
378
+ };
379
+ /**
380
+ * Props for enabling a single export format in a data table component.
381
+ */
382
+ type WithSingleExportFormatProps = {
383
+ /**
384
+ * The format in which the data should be exported.
385
+ */
386
+ exportFormats: string;
387
+ /**
388
+ * Callback function triggered when exporting data.
389
+ * @param format - The format in which the data should be exported.
390
+ */
391
+ onExportData: (format: string) => void;
392
+ /**
393
+ * Copy for the toolbar buttons and ARIA labels related to exporting.
394
+ */
395
+ toolbarCopy: {
396
+ buttons: {
397
+ export: string;
398
+ };
399
+ ariaLabels: {
400
+ export: string;
401
+ };
402
+ };
403
+ exportDrawerCopy?: never;
404
+ };
405
+ type WithoutSettingsDrawerProps = {
406
+ /**
407
+ * Optional properties for customizing the settings drawer copy.
408
+ */
409
+ settingsDrawerCopy?: undefined;
410
+ toolbarCopy?: {
411
+ buttons?: {
412
+ settings?: undefined;
413
+ };
414
+ ariaLabels?: {
415
+ settings?: undefined;
416
+ };
417
+ };
418
+ };
419
+ export {};
420
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,UAAU,GACV,QAAQ,GACR,aAAa,GACb,SAAS,GACT,MAAM,GACN,OAAO,GACP,mBAAmB,GACnB,UAAU,GACV,UAAU,GACV,MAAM,GACN,QAAQ,GACR,cAAc,GACd,WAAW,GACX,QAAQ,GACR,qBAAqB,CAAC;AAE1B,OAAO,QAAQ,uBAAuB,CAAC;IAIrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD;;;;WAIG;QACH,aAAa,CAAC,EAAE,cAAc,CAAC;QAE/B;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB;;;;WAIG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;;;;;;;;;;;;;;;;;WAoBG;QACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAEpB;;WAEG;QACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAEvC;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AAC,EAAE,SAAS,CAAC;SACtB,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const SCREEN_MEDIA_QUERY: {
2
+ readonly MAX_LG: `(max-width: ${string})`;
3
+ };
4
+ export declare const useScreenSize: () => {
5
+ isLgOrSmaller: boolean;
6
+ };
7
+ //# sourceMappingURL=use-screen-size.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-screen-size.hook.d.ts","sourceRoot":"","sources":["../src/use-screen-size.hook.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX,eAAO,MAAM,aAAa;;CAezB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Cell, RowData } from '@tanstack/react-table';
2
+
3
+ declare const useTruncatedTooltip: <TData extends RowData>(cell: Cell<TData, unknown> | undefined) => {
4
+ divRef: import('react').RefObject<HTMLParagraphElement | null>;
5
+ onMouseEnter: () => void;
6
+ onMouseLeave: () => void;
7
+ showPopover: boolean;
8
+ };
9
+ export default useTruncatedTooltip;
10
+ //# sourceMappingURL=use-truncated-hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-truncated-hook.d.ts","sourceRoot":"","sources":["../src/use-truncated-hook.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEtD,QAAA,MAAM,mBAAmB,GAAI,KAAK,SAAS,OAAO,QAAQ,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,SAAS;;;;;CAoEzF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Row } from '@tanstack/react-table';
2
+
3
+ export declare const filterOnFilterKey: <TData>(row: Row<TData>, columnId: string, filterValue: {
4
+ filterKey: string;
5
+ value: string;
6
+ }) => boolean;
7
+ export declare const sortOnBadgeVariant: <TData>(row1: Row<TData>, row0: Row<TData>, columnId: string) => number;
8
+ export declare const sortOnBadgeValue: <TData>(row1: Row<TData>, row0: Row<TData>, columnId: string) => number;
9
+ //# sourceMappingURL=custom-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-functions.d.ts","sourceRoot":"","sources":["../../src/utils/custom-functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAChC,GAAG,CAAC,KAAK,CAAC,YACL,MAAM,eACH;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,KACA,OAIF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,QAChC,GAAG,CAAC,KAAK,CAAC,QACV,GAAG,CAAC,KAAK,CAAC,YACN,MAAM,KACf,MAWF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,QAC9B,GAAG,CAAC,KAAK,CAAC,QACV,GAAG,CAAC,KAAK,CAAC,YACN,MAAM,KACf,MAcF,CAAC"}