@indico-data/design-system 2.2.0 → 2.3.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 (122) hide show
  1. package/.yarn/sdks/eslint/bin/eslint.js +8 -1
  2. package/.yarn/sdks/eslint/package.json +1 -1
  3. package/.yarn/sdks/prettier/bin/prettier.cjs +8 -1
  4. package/.yarn/sdks/prettier/index.cjs +8 -1
  5. package/.yarn/sdks/typescript/bin/tsc +8 -1
  6. package/.yarn/sdks/typescript/bin/tsserver +8 -1
  7. package/.yarn/sdks/typescript/package.json +1 -1
  8. package/.yarnrc.yml +1 -0
  9. package/lib/index.css +105 -101
  10. package/lib/index.d.ts +1 -10
  11. package/lib/index.esm.css +105 -101
  12. package/lib/index.esm.js +1138 -3041
  13. package/lib/index.esm.js.map +1 -1
  14. package/lib/index.js +1135 -3039
  15. package/lib/index.js.map +1 -1
  16. package/lib/src/components/button/types.d.ts +0 -1
  17. package/lib/src/components/index.d.ts +1 -0
  18. package/lib/src/components/tables/table/LoadingComponent.d.ts +1 -0
  19. package/lib/src/components/tables/table/Table.d.ts +78 -0
  20. package/lib/src/components/tables/table/Table.stories.d.ts +6 -0
  21. package/lib/src/components/tables/table/index.d.ts +1 -0
  22. package/lib/src/components/tables/table/sampleData.d.ts +8 -0
  23. package/lib/src/index.d.ts +1 -1
  24. package/lib/src/legacy/components/Accordion/Accordion.stories.d.ts +9 -9
  25. package/lib/src/legacy/components/Accordion/Accordion.styles.d.ts +1 -2
  26. package/lib/src/legacy/components/ListTable/Header/Header.styles.d.ts +1 -2
  27. package/lib/src/legacy/components/ListTable/ListTable.stories.d.ts +7 -7
  28. package/lib/src/legacy/components/ListTable/ListTable.styles.d.ts +1 -2
  29. package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +2 -2
  30. package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +2 -3
  31. package/lib/src/legacy/components/Pagination/Pagination.styles.d.ts +1 -2
  32. package/lib/src/legacy/components/Toggle/Toggle.stories.d.ts +4 -4
  33. package/lib/src/legacy/components/Toggle/Toggle.styles.d.ts +1 -2
  34. package/lib/src/legacy/components/Tooltip/Tooltip.styles.d.ts +1 -2
  35. package/lib/src/legacy/components/basic-section/Section/Section.stories.d.ts +1 -2
  36. package/lib/src/legacy/components/basic-section/Section/Section.styles.d.ts +1 -2
  37. package/lib/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +1 -2
  38. package/lib/src/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +1 -2
  39. package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +1 -1
  40. package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +1 -2
  41. package/lib/src/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +1 -2
  42. package/lib/src/legacy/components/buttons/Button/Button.stories.d.ts +1 -1
  43. package/lib/src/legacy/components/buttons/Button/Button.styles.d.ts +1 -2
  44. package/lib/src/legacy/components/buttons/IconButton/IconButton.stories.d.ts +3 -3
  45. package/lib/src/legacy/components/buttons/IconButton/IconButton.styles.d.ts +4 -3
  46. package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +8 -9
  47. package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +2 -3
  48. package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +5 -5
  49. package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +7 -7
  50. package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +3 -2
  51. package/lib/src/legacy/components/dropdowns/Select/Select.stories.d.ts +6 -7
  52. package/lib/src/legacy/components/dropdowns/Select/Select.styles.d.ts +1 -2
  53. package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +5 -5
  54. package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +5 -6
  55. package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +3 -2
  56. package/lib/src/legacy/components/index.d.ts +0 -1
  57. package/lib/src/legacy/components/inputs/DatePicker/DatePicker.styles.d.ts +1 -2
  58. package/lib/src/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +1 -2
  59. package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +1 -2
  60. package/lib/src/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +2 -2
  61. package/lib/src/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +1 -2
  62. package/lib/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +5 -6
  63. package/lib/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +1 -2
  64. package/lib/src/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +8 -9
  65. package/lib/src/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +1 -2
  66. package/lib/src/legacy/components/inputs/TextInput/TextInput.stories.d.ts +9 -9
  67. package/lib/src/legacy/components/inputs/TextInput/TextInput.styles.d.ts +2 -3
  68. package/lib/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +1 -2
  69. package/lib/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +4 -5
  70. package/lib/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +4 -5
  71. package/lib/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +1 -2
  72. package/lib/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +1 -2
  73. package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +5 -5
  74. package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +1 -2
  75. package/lib/src/legacy/components/modals/ModalBase/ModalBase.styles.d.ts +1 -1
  76. package/lib/src/legacy/components/text-truncate/TextTruncate.styles.d.ts +1 -2
  77. package/lib/src/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +11 -11
  78. package/lib/src/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +1 -2
  79. package/lib/src/legacy/styles/globals/buttons.d.ts +0 -1
  80. package/lib/src/legacy/styles/globals/forms.d.ts +0 -1
  81. package/lib/src/legacy/styles/globals/layout.d.ts +0 -1
  82. package/lib/src/legacy/styles/globals/lists.d.ts +0 -1
  83. package/lib/src/legacy/styles/globals/margin-padding.d.ts +0 -1
  84. package/lib/src/legacy/styles/globals/media.d.ts +0 -1
  85. package/lib/src/legacy/styles/globals/tables.d.ts +0 -1
  86. package/lib/src/legacy/styles/globals/typography.d.ts +0 -1
  87. package/lib/src/legacy/styles/globals/utility-classes.d.ts +0 -1
  88. package/lib/src/types.d.ts +0 -2
  89. package/package.json +4 -2
  90. package/src/components/index.ts +1 -0
  91. package/src/components/tables/table/LoadingComponent.tsx +5 -0
  92. package/src/components/tables/table/Table.mdx +15 -0
  93. package/src/components/tables/table/Table.scss +79 -0
  94. package/src/components/tables/table/Table.stories.tsx +547 -0
  95. package/src/components/tables/table/Table.tsx +112 -0
  96. package/src/components/tables/table/_variables.scss +19 -0
  97. package/src/components/tables/table/index.ts +1 -0
  98. package/src/components/tables/table/sampleData.ts +162 -0
  99. package/src/index.ts +0 -1
  100. package/src/legacy/components/index.ts +0 -1
  101. package/src/styles/index.scss +1 -2
  102. package/src/types.ts +0 -5
  103. package/lib/src/legacy/components/Navigation/Drawer/Drawer.d.ts +0 -16
  104. package/lib/src/legacy/components/Navigation/Drawer/Drawer.stories.d.ts +0 -6
  105. package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.d.ts +0 -9
  106. package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.styles.d.ts +0 -2
  107. package/lib/src/legacy/components/Navigation/Drawer/__mocks__/mocks.d.ts +0 -3
  108. package/lib/src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts +0 -1
  109. package/lib/src/legacy/components/Navigation/Drawer/index.d.ts +0 -1
  110. package/lib/src/legacy/components/Navigation/Drawer/types.d.ts +0 -7
  111. package/lib/src/legacy/components/Navigation/index.d.ts +0 -1
  112. package/src/legacy/components/Navigation/Drawer/Drawer.scss +0 -61
  113. package/src/legacy/components/Navigation/Drawer/Drawer.stories.tsx +0 -43
  114. package/src/legacy/components/Navigation/Drawer/Drawer.tsx +0 -107
  115. package/src/legacy/components/Navigation/Drawer/DrawerLinkList.styles.ts +0 -65
  116. package/src/legacy/components/Navigation/Drawer/DrawerLinkList.tsx +0 -64
  117. package/src/legacy/components/Navigation/Drawer/__mocks__/mocks.ts +0 -49
  118. package/src/legacy/components/Navigation/Drawer/__tests__/Drawer.test.tsx +0 -180
  119. package/src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.tsx +0 -66
  120. package/src/legacy/components/Navigation/Drawer/index.ts +0 -1
  121. package/src/legacy/components/Navigation/Drawer/types.ts +0 -8
  122. package/src/legacy/components/Navigation/index.ts +0 -1
@@ -6,7 +6,5 @@ export type PermafrostComponent = {
6
6
  };
7
7
  export type ButtonVariant = 'default' | 'primary' | 'destructive';
8
8
  export type ButtonSize = 'normal' | 'large';
9
- import { ListItem } from './legacy/components/Navigation/Drawer/types';
10
- export type { ListItem };
11
9
  import { IconName } from '../build/generated/iconTypes';
12
10
  export type { IconName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -39,12 +39,14 @@
39
39
  "@react-types/button": "^3.9.3",
40
40
  "@react-types/checkbox": "^3.8.1",
41
41
  "@react-types/radio": "^3.8.0",
42
+ "@testing-library/react": "^16.0.0",
42
43
  "classnames": "^2.5.1",
43
44
  "date-fns": "^3.6.0",
44
45
  "focus-trap-react": "^10.2.3",
45
46
  "html-webpack-plugin": "^5.6.0",
46
47
  "prop-types": "^15.8.1",
47
48
  "react-aria-components": "^1.2.1",
49
+ "react-data-table-component": "^7.6.2",
48
50
  "react-day-picker": "^8.10.1",
49
51
  "react-grid-system": "^8.2.0",
50
52
  "react-modal": "^3.16.1",
@@ -93,7 +95,7 @@
93
95
  "@storybook/theming": "^8.0.8",
94
96
  "@testing-library/dom": "^9.3.4",
95
97
  "@testing-library/jest-dom": "^6.4.2",
96
- "@testing-library/react": "^14.2.1",
98
+ "@testing-library/react": "^16.0.0",
97
99
  "@testing-library/user-event": "^14.5.2",
98
100
  "@types/css-modules": "^1.0.5",
99
101
  "@types/jest": "^29.5.12",
@@ -1,3 +1,4 @@
1
1
  export { Container, Col, Row } from './grid';
2
2
  export { Button } from './button';
3
3
  export { Icon } from './icons';
4
+ export { Table } from './tables/table';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ export const LoadingComponent = () => {
4
+ return <div className="table-loading">Loading...</div>;
5
+ };
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/blocks';
2
+ import * as TableStories from './Table.stories';
3
+
4
+ <Meta title="Layout/Table" name="Table" />
5
+
6
+ # Table
7
+
8
+ This component facilitates the rapid creation of responsive and paginated tables. This component was created using the React [Data Table Component](https://react-data-table-component.netlify.app/?path=/docs/api-props--docs) library as a base. You can read more on additional props not listed in this documentation at [this link](https://react-data-table-component.netlify.app/?path=/docs/api-props--docs).
9
+
10
+ <Canvas
11
+ of={TableStories.Default}
12
+ />
13
+
14
+
15
+ <Controls of={TableStories.Default} />
@@ -0,0 +1,79 @@
1
+ @import 'variables.scss';
2
+
3
+ :root,
4
+ :root [data-theme='light'],
5
+ :root [data-theme='dark'] {
6
+ .table-loading {
7
+ color: var(--pf-table-font-color);
8
+ }
9
+ .table-wrapper {
10
+ background-color: var(--pf-table-background-color);
11
+ color: var(--pf-table-font-color);
12
+
13
+ .rdt_Table,
14
+ .rdt_TableRow,
15
+ .rdt_TableCol,
16
+ .rdt_TableCol_Sortable,
17
+ .rdt_TableCell,
18
+ .rdt_TableHeader,
19
+ .rdt_TableFooter,
20
+ .rdt_TableHead,
21
+ .rdt_TableHeadRow,
22
+ .rdt_TableBody,
23
+ .rdt_ExpanderRow,
24
+ .rdt_Pagination {
25
+ background-color: var(--pf-table-background-color);
26
+ color: var(--pf-table-font-color);
27
+ }
28
+ button {
29
+ svg {
30
+ fill: var(--pf-table-font-color);
31
+ }
32
+
33
+ &:disabled {
34
+ svg {
35
+ fill: var(--pf-gray-color-900);
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ .pf__table--striped {
42
+ .rdt_TableRow:nth-child(odd) {
43
+ .rdt_TableCell {
44
+ background-color: var(--pf-table-stripe-color);
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ :root [data-theme='light'] {
51
+ .table-wrapper {
52
+ .rdt_Table,
53
+ .rdt_TableRow,
54
+ .rdt_TableCol,
55
+ .rdt_TableCol_Sortable,
56
+ .rdt_TableCell,
57
+ .rdt_TableHeader,
58
+ .rdt_TableFooter,
59
+ .rdt_TableHead,
60
+ .rdt_TableHeadRow,
61
+ .rdt_TableBody,
62
+ .rdt_ExpanderRow,
63
+ .rdt_Pagination {
64
+ background-color: var(--pf-table-background-color);
65
+ color: var(--pf-table-font-color);
66
+ }
67
+ button {
68
+ svg {
69
+ fill: var(--pf-table-font-color);
70
+ }
71
+
72
+ &:disabled {
73
+ svg {
74
+ fill: var(--pf-gray-color-300);
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,547 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Table } from './Table';
3
+ import { sampleData } from './sampleData';
4
+ import React from 'react';
5
+
6
+ const meta: Meta = {
7
+ title: 'Layout/Table',
8
+ component: Table,
9
+ argTypes: {
10
+ columns: {
11
+ control: false,
12
+ description: 'The columns to display in the table',
13
+ table: {
14
+ category: 'Data',
15
+ type: { summary: 'array' },
16
+ defaultValue: { summary: '[]' },
17
+ },
18
+ },
19
+ data: {
20
+ control: false,
21
+ description:
22
+ 'Its highly recommended that your data have a unique identifier (keyField). The default keyField is id. If you need to override this value then use the keyField proeprty below',
23
+ table: {
24
+ category: 'Data',
25
+ type: { summary: 'array' },
26
+ defaultValue: { summary: '[]' },
27
+ },
28
+ },
29
+ isDisabled: {
30
+ control: 'boolean',
31
+ description: 'Disables the Table section',
32
+ table: {
33
+ category: 'Styling',
34
+ type: {
35
+ summary: 'boolean',
36
+ },
37
+ defaultValue: { summary: 'false' },
38
+ },
39
+ },
40
+ isLoading: {
41
+ control: 'boolean',
42
+ description: 'It sets the loading of the table',
43
+ table: {
44
+ category: 'Styling',
45
+ type: {
46
+ summary: 'boolean',
47
+ },
48
+ defaultValue: { summary: 'false' },
49
+ },
50
+ },
51
+ direction: {
52
+ control: 'select',
53
+ options: ['auto', 'ltr', 'rtl'],
54
+ description:
55
+ 'Accepts: ltr, rtl, or auto. When set to auto (default), RDT will attempt to detect direction by checking the HTML and DIV tags. For cases where you need to force rtl, or ltr just set this option manually (i.e. SSR).',
56
+ table: {
57
+ category: 'Accessibility',
58
+ defaultValue: { summary: 'auto' },
59
+ },
60
+ },
61
+
62
+ title: {
63
+ control: 'text',
64
+ description:
65
+ 'The title displayed in the Table Header. If you do not provide the title property the Table Header will not be rendered',
66
+ table: {
67
+ category: 'Styling',
68
+ type: {
69
+ summary: 'string | React Component',
70
+ },
71
+ defaultValue: { summary: '' },
72
+ },
73
+ },
74
+ responsive: {
75
+ control: 'boolean',
76
+ description: 'Makes the table horizontally scrollable on smaller screen widths',
77
+ table: {
78
+ category: 'Accessibility',
79
+ type: {
80
+ summary: 'boolean',
81
+ },
82
+ defaultValue: { summary: 'true' },
83
+ },
84
+ },
85
+ dense: {
86
+ control: 'boolean',
87
+ description:
88
+ 'Compacts the row height. can be overridden via theming rows.denseHeight. Note: If any custom elements exceed the dense height then the row will only compact to the tallest element any of your cells',
89
+ table: {
90
+ category: 'Accessibility',
91
+ type: {
92
+ summary: 'boolean',
93
+ },
94
+ defaultValue: { summary: 'false' },
95
+ },
96
+ },
97
+ noHeader: {
98
+ control: 'boolean',
99
+ description:
100
+ 'Removes the table header. title, contextTitle and contextActions will be ignored',
101
+ table: {
102
+ category: 'Styling',
103
+ type: {
104
+ summary: 'boolean',
105
+ },
106
+ defaultValue: { summary: 'false' },
107
+ },
108
+ },
109
+ onSort: {
110
+ control: false,
111
+ description: 'Callback to access the sort state when a column is clicked. Returns',
112
+ table: {
113
+ category: 'Callbacks',
114
+ type: {
115
+ summary: '(selectedColumn, sortDirection, sortedRows) => {}',
116
+ },
117
+ defaultValue: { summary: 'false' },
118
+ },
119
+ },
120
+ subHeader: {
121
+ control: 'boolean',
122
+ description: 'Show a sub header between the table and table header',
123
+ table: {
124
+ category: 'Styling',
125
+ type: {
126
+ summary: 'boolean',
127
+ },
128
+ defaultValue: { summary: 'false' },
129
+ },
130
+ },
131
+ subHeaderComponent: {
132
+ control: false,
133
+ description: 'A component you want to render',
134
+ table: {
135
+ category: 'Components',
136
+ type: {
137
+ summary: 'React Component',
138
+ },
139
+ defaultValue: { summary: 'null' },
140
+ },
141
+ },
142
+ paginationPerPage: {
143
+ control: 'number',
144
+ description: 'The default rows per page to use when the table initially loads',
145
+ table: {
146
+ category: 'Add-Ons',
147
+ type: {
148
+ summary: 'number',
149
+ },
150
+ defaultValue: { summary: '10' },
151
+ },
152
+ },
153
+ noDataComponent: {
154
+ control: false,
155
+ description: 'A custom component to display when there are no records to display',
156
+ table: {
157
+ category: 'Components',
158
+ type: {
159
+ summary: 'string | React Component',
160
+ },
161
+ defaultValue: { summary: 'built-in' },
162
+ },
163
+ },
164
+ expandableRows: {
165
+ control: 'boolean',
166
+ description:
167
+ 'Whether to make a row expandable, if true it requires an expandableRowsComponent. It is highly recommended your data set have a unique identifier defined as the keyField for row expansion to work properly.',
168
+ table: {
169
+ category: 'Add-Ons',
170
+ type: {
171
+ summary: 'boolean',
172
+ },
173
+ defaultValue: { summary: 'false' },
174
+ },
175
+ },
176
+ clearSelectedRows: {
177
+ control: 'boolean',
178
+ description:
179
+ 'Toggling this property clears the selectedRows. If you use redux or react state you need to make sure that you pass a toggled value or the component will not update',
180
+ table: {
181
+ category: 'Styling',
182
+ type: {
183
+ summary: 'boolean',
184
+ },
185
+ defaultValue: { summary: 'false' },
186
+ },
187
+ },
188
+ pagination: {
189
+ control: 'boolean',
190
+ description:
191
+ 'Enable pagination with defaults. by default the total record set will be sliced depending on the page, rows per page. if you wish to use server side pagination then use the paginationServer property',
192
+ table: {
193
+ category: 'Add-Ons',
194
+ type: {
195
+ summary: 'boolean',
196
+ },
197
+ defaultValue: { summary: 'true' },
198
+ },
199
+ },
200
+ selectableRows: {
201
+ control: 'boolean',
202
+ description: 'Whether to show selectable checkboxes',
203
+ table: {
204
+ category: 'Add-Ons',
205
+ type: {
206
+ summary: 'boolean',
207
+ },
208
+ defaultValue: { summary: 'true' },
209
+ },
210
+ },
211
+
212
+ striped: {
213
+ control: 'boolean',
214
+ description: 'Stripe/band color the odd rows',
215
+ table: {
216
+ category: 'Accessibility',
217
+ type: {
218
+ summary: 'boolean',
219
+ },
220
+ defaultValue: { summary: 'true' },
221
+ },
222
+ },
223
+ // hidden props
224
+ onRowDoubleClicked: {
225
+ table: {
226
+ disable: true,
227
+ },
228
+ },
229
+ onRowMouseEnter: {
230
+ table: {
231
+ disable: true,
232
+ },
233
+ },
234
+ onRowMouseLeave: {
235
+ table: {
236
+ disable: true,
237
+ },
238
+ },
239
+ defaultSortFieldId: {
240
+ table: {
241
+ disable: true,
242
+ },
243
+ },
244
+ defaultSortAsc: {
245
+ table: {
246
+ disable: true,
247
+ },
248
+ },
249
+ sortIcon: {
250
+ table: {
251
+ disable: true,
252
+ },
253
+ },
254
+ sortServer: {
255
+ table: {
256
+ disable: true,
257
+ },
258
+ },
259
+ sortFunction: {
260
+ table: {
261
+ disable: true,
262
+ },
263
+ },
264
+ selectableRowsVisibleOnly: {
265
+ table: {
266
+ disable: true,
267
+ },
268
+ },
269
+ selectableRowsHighlight: {
270
+ table: {
271
+ disable: true,
272
+ },
273
+ },
274
+ selectableRowsSingle: {
275
+ table: {
276
+ disable: true,
277
+ },
278
+ },
279
+ selectableRowsNoSelectAll: {
280
+ table: {
281
+ disable: true,
282
+ },
283
+ },
284
+ selectableRowsComponent: {
285
+ table: {
286
+ disable: true,
287
+ },
288
+ },
289
+ selectableRowsComponentProps: {
290
+ table: {
291
+ disable: true,
292
+ },
293
+ },
294
+ selectableRowSelected: {
295
+ table: {
296
+ disable: true,
297
+ },
298
+ },
299
+ selectableRowDisabled: {
300
+ table: {
301
+ disable: true,
302
+ },
303
+ },
304
+ expandableIcon: {
305
+ table: {
306
+ disable: true,
307
+ },
308
+ },
309
+ expandableRowsComponent: {
310
+ table: {
311
+ disable: true,
312
+ },
313
+ },
314
+ expandableRowDisabled: {
315
+ table: {
316
+ disable: true,
317
+ },
318
+ },
319
+ expandableRowExpanded: {
320
+ table: {
321
+ disable: true,
322
+ },
323
+ },
324
+ expandableRowsComponentProps: {
325
+ table: {
326
+ disable: true,
327
+ },
328
+ },
329
+ expandOnRowClicked: {
330
+ table: {
331
+ disable: true,
332
+ },
333
+ },
334
+ expandOnRowDoubleClicked: {
335
+ table: {
336
+ disable: true,
337
+ },
338
+ },
339
+ expandableRowsHideExpander: {
340
+ table: {
341
+ disable: true,
342
+ },
343
+ },
344
+ expandableInheritConditionalStyles: {
345
+ table: {
346
+ disable: true,
347
+ },
348
+ },
349
+ paginationServer: {
350
+ table: {
351
+ disable: true,
352
+ },
353
+ },
354
+ paginationServerOptions: {
355
+ table: {
356
+ disable: true,
357
+ },
358
+ },
359
+ paginationDefaultPage: {
360
+ table: {
361
+ disable: true,
362
+ },
363
+ },
364
+ paginationComponent: {
365
+ table: {
366
+ disable: true,
367
+ },
368
+ },
369
+ paginationComponentOptions: {
370
+ table: {
371
+ disable: true,
372
+ },
373
+ },
374
+ paginationIconFirstPage: {
375
+ table: {
376
+ disable: true,
377
+ },
378
+ },
379
+ paginationIconLastPage: {
380
+ table: {
381
+ disable: true,
382
+ },
383
+ },
384
+ paginationIconNext: {
385
+ table: {
386
+ disable: true,
387
+ },
388
+ },
389
+ paginationIconPrevious: {
390
+ table: {
391
+ disable: true,
392
+ },
393
+ },
394
+ fixedHeader: {
395
+ table: {
396
+ disable: true,
397
+ },
398
+ },
399
+ fixedHeaderScrollHeight: {
400
+ table: {
401
+ disable: true,
402
+ },
403
+ },
404
+ actions: {
405
+ table: {
406
+ disable: true,
407
+ },
408
+ },
409
+ onChangeRowsPerPage: {
410
+ table: {
411
+ disable: true,
412
+ },
413
+ },
414
+ onChangePage: {
415
+ table: {
416
+ disable: true,
417
+ },
418
+ },
419
+ onSelectedRowsChange: {
420
+ table: {
421
+ disable: true,
422
+ },
423
+ },
424
+ paginationResetDefaultPage: {
425
+ table: {
426
+ disable: true,
427
+ },
428
+ },
429
+ onRowExpandToggled: {
430
+ table: {
431
+ disable: true,
432
+ },
433
+ },
434
+ paginationTotalRows: {
435
+ table: {
436
+ disable: true,
437
+ },
438
+ },
439
+ persistTableHead: {
440
+ table: {
441
+ disable: true,
442
+ },
443
+ },
444
+ highlightOnHover: {
445
+ table: {
446
+ disable: true,
447
+ },
448
+ },
449
+ pointerOnHover: {
450
+ table: {
451
+ disable: true,
452
+ },
453
+ },
454
+ keyField: {
455
+ table: {
456
+ disable: true,
457
+ },
458
+ },
459
+ paginationRowsPerPageOptions: {
460
+ table: {
461
+ disable: true,
462
+ },
463
+ },
464
+ onRowClicked: {
465
+ table: {
466
+ disable: true,
467
+ },
468
+ },
469
+ subHeaderAlign: {
470
+ table: {
471
+ disable: true,
472
+ },
473
+ },
474
+ subHeaderWrap: {
475
+ table: {
476
+ disable: true,
477
+ },
478
+ },
479
+ },
480
+ };
481
+
482
+ export default meta;
483
+
484
+ type Story = StoryObj<typeof Table>;
485
+
486
+ interface DataRow {
487
+ name: string;
488
+ class: string;
489
+ age: number;
490
+ weapon: string;
491
+ backstory: string;
492
+ favoriteMeal: string;
493
+ }
494
+
495
+ export const Default: Story = {
496
+ args: {
497
+ pagination: true,
498
+ selectableRows: true,
499
+ isDisabled: false,
500
+ isLoading: false,
501
+ direction: 'ltr',
502
+ striped: true,
503
+ subHeaderAlign: 'center',
504
+ subHeaderWrap: true,
505
+ paginationRowsPerPageOptions: [5, 10, 15, 20],
506
+ responsive: true,
507
+ title: 'Character List',
508
+ dense: true,
509
+ noHeader: false,
510
+ noDataComponent: null,
511
+ expandableRows: false,
512
+ clearSelectedRows: false,
513
+ onSort: false,
514
+ subHeader: false,
515
+ subHeaderComponent: null,
516
+ paginationPerPage: 10,
517
+ columns: [
518
+ {
519
+ name: 'Name',
520
+ selector: (row) => row.name,
521
+ },
522
+ {
523
+ name: 'Class',
524
+ selector: (row) => row.class,
525
+ },
526
+ {
527
+ name: 'Age',
528
+ selector: (row) => row.age,
529
+ sortable: true,
530
+ },
531
+ {
532
+ name: 'Weapon',
533
+ selector: (row) => row.weapon,
534
+ },
535
+ {
536
+ name: 'Backstory',
537
+ selector: (row) => row.backstory,
538
+ },
539
+ {
540
+ name: 'Favorite Meal',
541
+ selector: (row) => row.favoriteMeal,
542
+ },
543
+ ],
544
+ data: sampleData as DataRow[],
545
+ },
546
+ render: ({ ...args }) => <Table {...args} />,
547
+ };