@qoretechnologies/reqore 0.34.13 → 0.35.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 (110) hide show
  1. package/__tests__/helpers/table.test.tsx +47 -0
  2. package/__tests__/table.test.tsx +356 -124
  3. package/dist/components/Button/index.d.ts +2 -0
  4. package/dist/components/Button/index.d.ts.map +1 -1
  5. package/dist/components/Button/index.js +7 -4
  6. package/dist/components/Button/index.js.map +1 -1
  7. package/dist/components/Collection/index.d.ts +2 -1
  8. package/dist/components/Collection/index.d.ts.map +1 -1
  9. package/dist/components/Collection/index.js +5 -11
  10. package/dist/components/Collection/index.js.map +1 -1
  11. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  12. package/dist/components/ControlGroup/index.js +4 -3
  13. package/dist/components/ControlGroup/index.js.map +1 -1
  14. package/dist/components/Dropdown/index.d.ts +4 -1
  15. package/dist/components/Dropdown/index.d.ts.map +1 -1
  16. package/dist/components/Dropdown/index.js +2 -2
  17. package/dist/components/Dropdown/index.js.map +1 -1
  18. package/dist/components/Dropdown/list.d.ts +4 -1
  19. package/dist/components/Dropdown/list.d.ts.map +1 -1
  20. package/dist/components/Dropdown/list.js +10 -5
  21. package/dist/components/Dropdown/list.js.map +1 -1
  22. package/dist/components/Input/index.js +4 -4
  23. package/dist/components/Input/index.js.map +1 -1
  24. package/dist/components/Panel/index.d.ts +4 -1
  25. package/dist/components/Panel/index.d.ts.map +1 -1
  26. package/dist/components/Panel/index.js.map +1 -1
  27. package/dist/components/Table/cell.d.ts +13 -0
  28. package/dist/components/Table/cell.d.ts.map +1 -0
  29. package/dist/components/Table/cell.js +89 -0
  30. package/dist/components/Table/cell.js.map +1 -0
  31. package/dist/components/Table/header.d.ts +15 -2
  32. package/dist/components/Table/header.d.ts.map +1 -1
  33. package/dist/components/Table/header.js +31 -14
  34. package/dist/components/Table/header.js.map +1 -1
  35. package/dist/components/Table/headerCell.d.ts +9 -6
  36. package/dist/components/Table/headerCell.d.ts.map +1 -1
  37. package/dist/components/Table/headerCell.js +73 -51
  38. package/dist/components/Table/headerCell.js.map +1 -1
  39. package/dist/components/Table/helpers.d.ts +43 -1
  40. package/dist/components/Table/helpers.d.ts.map +1 -1
  41. package/dist/components/Table/helpers.js +145 -1
  42. package/dist/components/Table/helpers.js.map +1 -1
  43. package/dist/components/Table/index.d.ts +45 -25
  44. package/dist/components/Table/index.d.ts.map +1 -1
  45. package/dist/components/Table/index.js +167 -52
  46. package/dist/components/Table/index.js.map +1 -1
  47. package/dist/components/Table/row.d.ts +11 -5
  48. package/dist/components/Table/row.d.ts.map +1 -1
  49. package/dist/components/Table/row.js +32 -55
  50. package/dist/components/Table/row.js.map +1 -1
  51. package/dist/hooks/useQueryWithDelay.d.ts +8 -0
  52. package/dist/hooks/useQueryWithDelay.d.ts.map +1 -0
  53. package/dist/hooks/useQueryWithDelay.js +25 -0
  54. package/dist/hooks/useQueryWithDelay.js.map +1 -0
  55. package/dist/index.d.ts +3 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +7 -1
  58. package/dist/index.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/components/Button/index.tsx +6 -1
  61. package/src/components/Collection/index.tsx +9 -15
  62. package/src/components/ControlGroup/index.tsx +10 -5
  63. package/src/components/Dropdown/index.tsx +9 -0
  64. package/src/components/Dropdown/list.tsx +18 -6
  65. package/src/components/Input/index.tsx +3 -3
  66. package/src/components/Panel/index.tsx +3 -1
  67. package/src/components/Table/cell.tsx +120 -0
  68. package/src/components/Table/header.tsx +102 -45
  69. package/src/components/Table/headerCell.tsx +133 -80
  70. package/src/components/Table/helpers.ts +211 -1
  71. package/src/components/Table/index.tsx +334 -91
  72. package/src/components/Table/row.tsx +51 -127
  73. package/src/hooks/useQueryWithDelay.ts +30 -0
  74. package/src/index.tsx +3 -0
  75. package/src/mock/tableData.ts +40 -20
  76. package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
  77. package/src/stories/Button/Button.stories.tsx +1 -1
  78. package/src/stories/Checkbox/Checkbox.stories.tsx +1 -1
  79. package/src/stories/Collection/Collection.stories.tsx +19 -1
  80. package/src/stories/Columns/Columns.stories.tsx +1 -1
  81. package/src/stories/Comment/Comment.stories.tsx +1 -1
  82. package/src/stories/ControlGroup/ControlGroup.stories.tsx +1 -1
  83. package/src/stories/Drawer/Drawer.stories.tsx +5 -5
  84. package/src/stories/Dropdown/Dropdown.stories.tsx +11 -1
  85. package/src/stories/Header/Header.stories.tsx +1 -1
  86. package/src/stories/Icon/Icon.stories.tsx +1 -1
  87. package/src/stories/Input/Input.stories.tsx +1 -1
  88. package/src/stories/Menu/Menu.stories.tsx +1 -1
  89. package/src/stories/Message/Message.stories.tsx +1 -1
  90. package/src/stories/Modal/Modal.stories.tsx +1 -1
  91. package/src/stories/MultiSelect/MultiSelect.stories.tsx +1 -1
  92. package/src/stories/Navbar/Navbar.stories.tsx +1 -1
  93. package/src/stories/Notifications/Interactive.stories.tsx +1 -1
  94. package/src/stories/Notifications/Notification.stories.tsx +1 -1
  95. package/src/stories/Notifications/Notifications.stories.tsx +1 -1
  96. package/src/stories/Paging/Paging.stories.tsx +1 -1
  97. package/src/stories/Panel/Panel.stories.tsx +5 -5
  98. package/src/stories/Paragraph/Paragraph.stories.tsx +1 -1
  99. package/src/stories/Popover/Popover.stories.tsx +2 -2
  100. package/src/stories/RadioGroup/RadioGroup.stories.tsx +1 -1
  101. package/src/stories/Sidebar/Sidebar.stories.tsx +2 -2
  102. package/src/stories/Spacer/Spacer.stories.tsx +1 -1
  103. package/src/stories/Spinner/Spinner.stories.tsx +1 -1
  104. package/src/stories/Table/Table.stories.tsx +297 -78
  105. package/src/stories/Tabs/Tabs.stories.tsx +1 -1
  106. package/src/stories/Tag/Tag.stories.tsx +1 -1
  107. package/src/stories/TextArea/TextArea.stories.tsx +2 -2
  108. package/src/stories/Tree/Tree.stories.tsx +2 -2
  109. package/src/stories/utils/args.ts +1 -1
  110. package/tests.json +1 -1
@@ -7,7 +7,7 @@ import { ReqoreControlGroup, ReqoreTag, useReqorePaging } from '../../index';
7
7
  import { tableData } from '../../mock/tableData';
8
8
 
9
9
  export default {
10
- title: 'Components/Paging',
10
+ title: 'Collections/Paging/Stories',
11
11
  } as StoryObj<typeof ReqorePagination>;
12
12
 
13
13
  const Template: Story<IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }> =
@@ -11,7 +11,7 @@ import { FlatArg, IconArg, IntentArg, SizeArg, argManager } from '../utils/args'
11
11
  const { createArg } = argManager<IReqorePanelProps>();
12
12
 
13
13
  export default {
14
- title: 'Components/Panel',
14
+ title: 'Layout/Panel/Stories',
15
15
  parameters: {
16
16
  chromatic: {
17
17
  viewports: [450, 600, 1440],
@@ -230,8 +230,8 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
230
230
  {
231
231
  label: 'More actions',
232
232
  actions: [
233
- { value: 'Sub Test', icon: 'FileDownloadLine' },
234
- { value: 'Sub Test 2', icon: 'FileDownloadLine', intent: 'success' },
233
+ { label: 'Sub Test', icon: 'FileDownloadLine' },
234
+ { label: 'Sub Test 2', icon: 'FileDownloadLine', intent: 'success' },
235
235
  ],
236
236
  intent: 'info',
237
237
  },
@@ -249,8 +249,8 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
249
249
  label: 'More actions',
250
250
  position: 'right',
251
251
  actions: [
252
- { value: 'Sub Test', icon: 'FileDownloadLine', intent: 'success' },
253
- { value: 'Sub Test 2', icon: 'FileDownloadLine' },
252
+ { label: 'Sub Test', icon: 'FileDownloadLine', intent: 'success' },
253
+ { label: 'Sub Test 2', icon: 'FileDownloadLine' },
254
254
  ],
255
255
  },
256
256
  ]}
@@ -4,7 +4,7 @@ import { ReqoreParagraph, ReqoreVerticalSpacer } from '../../index';
4
4
  import { IntentArg } from '../utils/args';
5
5
 
6
6
  export default {
7
- title: 'Components/Paragraph',
7
+ title: 'Other/Paragraph/Stories',
8
8
  argTypes: {
9
9
  ...IntentArg,
10
10
  },
@@ -11,12 +11,12 @@ import {
11
11
  ReqorePopover,
12
12
  ReqoreSpacer,
13
13
  } from '../../index';
14
- import { argManager, FlatArg } from '../utils/args';
14
+ import { FlatArg, argManager } from '../utils/args';
15
15
 
16
16
  const { createArg } = argManager<IReqorePopoverProps>();
17
17
 
18
18
  export default {
19
- title: 'Components/Popover',
19
+ title: 'Other/Popover/Stories',
20
20
  argTypes: {
21
21
  ...createArg('transparent', {
22
22
  defaultValue: false,
@@ -6,7 +6,7 @@ import { DisabledArg, SizeArg, argManager } from '../utils/args';
6
6
  const { createArg } = argManager<IReqoreRadioGroupProps>();
7
7
 
8
8
  export default {
9
- title: 'Components/Radio Group',
9
+ title: 'Form/Radio Group/Stories',
10
10
  argTypes: {
11
11
  ...createArg('asSwitch', {
12
12
  type: 'boolean',
@@ -3,12 +3,12 @@ import { noop } from 'lodash';
3
3
  import { IQorusSidebarProps } from '../../components/Sidebar';
4
4
  import { ReqorePanel, ReqoreSidebar } from '../../index';
5
5
  import { qorusSidebarItems } from '../../mock/menu';
6
- import { argManager, FlatArg, NoContentArg } from '../utils/args';
6
+ import { FlatArg, NoContentArg, argManager } from '../utils/args';
7
7
 
8
8
  const { disableArg, createArg } = argManager<IQorusSidebarProps>();
9
9
 
10
10
  export default {
11
- title: 'Components/Sidebar',
11
+ title: 'Navigation/Sidebar/Stories',
12
12
  argTypes: {
13
13
  ...disableArg('items'),
14
14
  ...FlatArg,
@@ -7,7 +7,7 @@ import {
7
7
  import { ReqorePanel } from '../../index';
8
8
 
9
9
  export default {
10
- title: 'Components/Spacer',
10
+ title: 'Utilities/Spacer/Stories',
11
11
  } as Meta;
12
12
 
13
13
  const Template: Story<IReqoreSpacerProps> = () => {
@@ -3,7 +3,7 @@ import { IReqoreSpinnerProps, ReqoreSpinner } from '../../components/Spinner';
3
3
  import { ReqoreControlGroup } from '../../index';
4
4
 
5
5
  export default {
6
- title: 'Components/Spinner',
6
+ title: 'Utilities/Spinner/Stories',
7
7
  } as Meta;
8
8
 
9
9
  const Template: Story<IReqoreSpinnerProps> = (args) => {
@@ -1,13 +1,219 @@
1
1
  import { Meta, Story } from '@storybook/react/types-6-0';
2
+ import { StyledEffect } from '../../components/Effect';
2
3
  import { IReqoreTableColumn, IReqoreTableProps } from '../../components/Table';
3
- import { ReqoreTable } from '../../index';
4
+ import { IReqoreCustomTableBodyCellProps } from '../../components/Table/cell';
5
+ import { IReqoreCustomHeaderCellProps } from '../../components/Table/header';
6
+ import {
7
+ ReqoreH3,
8
+ ReqoreH4,
9
+ ReqoreIcon,
10
+ ReqoreInput,
11
+ ReqoreP,
12
+ ReqoreTable,
13
+ ReqoreTag,
14
+ } from '../../index';
4
15
  import tableData from '../../mock/tableData';
5
- import { argManager, CustomIntentArg, FlatArg, IntentArg, SizeArg } from '../utils/args';
16
+ import { CustomIntentArg, FlatArg, IntentArg, SizeArg, argManager } from '../utils/args';
6
17
 
7
18
  const { createArg } = argManager<IReqoreTableProps>();
8
19
 
20
+ const defaultColumns: IReqoreTableColumn[] = [
21
+ {
22
+ dataId: 'id',
23
+ header: {
24
+ label: 'ID',
25
+ tooltip: 'Custom ID tooltip nice',
26
+ },
27
+ cell: {
28
+ content: 'tag',
29
+ },
30
+ width: 80,
31
+ align: 'center',
32
+ sortable: true,
33
+ },
34
+ {
35
+ header: {
36
+ label: 'Name',
37
+ columns: [
38
+ {
39
+ dataId: 'firstName',
40
+ header: {
41
+ icon: 'SlideshowLine',
42
+ label: 'First Name',
43
+ effect: {
44
+ gradient: {
45
+ colors: {
46
+ 0: 'success',
47
+ 100: 'info',
48
+ },
49
+ },
50
+ },
51
+ },
52
+ cell: {
53
+ padded: 'none',
54
+ content: ({ _size, firstName }) => (
55
+ <ReqoreInput icon='PriceTag2Fill' size={_size} value={firstName} />
56
+ ),
57
+ },
58
+ width: 150,
59
+ grow: 2,
60
+ },
61
+ {
62
+ dataId: 'lastName',
63
+ header: {
64
+ icon: 'SlideshowLine',
65
+ label: 'Last Name',
66
+ },
67
+ width: 150,
68
+ grow: 1,
69
+ sortable: true,
70
+ cell: {
71
+ onClick: ({ lastName }) => alert(`Clicked last name cell ${lastName}`),
72
+ content: 'title:info',
73
+ },
74
+ },
75
+ ],
76
+ },
77
+ dataId: 'name',
78
+ grow: 3,
79
+ },
80
+ {
81
+ dataId: 'address',
82
+ header: {
83
+ label: 'Address',
84
+ description: 'This is the address',
85
+ onClick: () => alert('clicked address'),
86
+ },
87
+ width: 300,
88
+ grow: 2,
89
+ resizable: false,
90
+ },
91
+ {
92
+ dataId: 'age',
93
+ header: {
94
+ label: 'Really long age header',
95
+ icon: 'User4Line',
96
+ tooltip: 'Custom age tooltip',
97
+ actions: [
98
+ {
99
+ label: 'Do something',
100
+ icon: 'EBike2Fill',
101
+ },
102
+ ],
103
+ },
104
+ width: 100,
105
+ align: 'center',
106
+ sortable: true,
107
+
108
+ cell: {
109
+ intent: 'danger',
110
+ content: 'tag:#000000',
111
+ tooltip: (value) => `Age is ${value}`,
112
+ onClick: ({ age }) => alert(`Clicked age cell ${age}`),
113
+ },
114
+ },
115
+ {
116
+ header: {
117
+ label: 'Data',
118
+ columns: [
119
+ {
120
+ dataId: 'occupation',
121
+ header: { label: 'Ocuppation' },
122
+ width: 200,
123
+ cell: { content: 'text:warning' },
124
+ filterable: true,
125
+ filterPlaceholder: 'Search occupation',
126
+ },
127
+ {
128
+ dataId: 'group',
129
+ align: 'right',
130
+ header: { label: <ReqoreTag label='Group' icon='Group2Line' size='small' /> },
131
+ width: 150,
132
+ cell: { intent: 'muted' },
133
+ filterable: true,
134
+ },
135
+ ],
136
+ },
137
+ dataId: 'data',
138
+ },
139
+ {
140
+ dataId: 'date',
141
+ header: { label: 'Date' },
142
+ sortable: true,
143
+ grow: 2,
144
+ width: 150,
145
+ cell: {
146
+ content: 'time-ago',
147
+ tooltip: () => ({
148
+ title: 'Custom tooltip',
149
+ content: 'This is a custom tooltip',
150
+ effect: {
151
+ gradient: {
152
+ colors: {
153
+ 0: 'warning',
154
+ 100: 'info',
155
+ },
156
+ },
157
+ },
158
+ }),
159
+ },
160
+ },
161
+ ];
162
+
163
+ const defaultColumnsWithFilters = defaultColumns.map((column, index) => {
164
+ if (index === 4) {
165
+ return {
166
+ ...column,
167
+ header: {
168
+ ...column.header,
169
+ columns: column.header.columns.map((subColumn, subIndex) =>
170
+ subIndex === 0
171
+ ? {
172
+ ...subColumn,
173
+ filter: 'Advisor',
174
+ }
175
+ : {
176
+ ...subColumn,
177
+ filter: 'net',
178
+ }
179
+ ),
180
+ },
181
+ };
182
+ }
183
+
184
+ return column;
185
+ });
186
+
187
+ const defaultColumnsWithHiddenColumns = defaultColumns.map((column, index) => {
188
+ if (index === 4) {
189
+ return {
190
+ ...column,
191
+ header: {
192
+ ...column.header,
193
+ columns: column.header.columns.map((subColumn, subIndex) =>
194
+ subIndex === 0
195
+ ? {
196
+ ...subColumn,
197
+ show: false,
198
+ }
199
+ : subColumn
200
+ ),
201
+ },
202
+ };
203
+ }
204
+
205
+ if (index === 2) {
206
+ return {
207
+ ...column,
208
+ show: false,
209
+ };
210
+ }
211
+
212
+ return column;
213
+ });
214
+
9
215
  export default {
10
- title: 'Components/Table',
216
+ title: 'Collections/Table/Stories',
11
217
  argTypes: {
12
218
  ...createArg('rounded', {
13
219
  type: 'boolean',
@@ -26,77 +232,11 @@ export default {
26
232
  }),
27
233
  ...createArg('columns', {
28
234
  name: 'Columns',
29
- defaultValue: [
30
- {
31
- dataId: 'id',
32
- header: 'ID',
33
- width: 50,
34
- align: 'center',
35
- sortable: true,
36
- tooltip: 'Custom ID tooltip nice',
37
- content: 'tag',
38
- },
39
- {
40
- header: 'Name',
41
- dataId: 'name',
42
- grow: 3,
43
- columns: [
44
- {
45
- icon: 'SlideshowLine',
46
- dataId: 'firstName',
47
- header: 'First Name',
48
- width: 150,
49
- grow: 2,
50
- },
51
- {
52
- icon: 'SlideshowLine',
53
- dataId: 'lastName',
54
- header: 'Last Name',
55
- width: 150,
56
- grow: 1,
57
- sortable: true,
58
- onCellClick: ({ lastName }) => alert(`Clicked last name cell ${lastName}`),
59
- content: 'title:info',
60
- },
61
- ],
62
- },
63
- {
64
- dataId: 'address',
65
- header: 'Address',
66
- width: 300,
67
- grow: 2,
68
- onClick: () => alert('clicked address'),
69
- },
70
- {
71
- icon: 'User4Line',
72
- dataId: 'age',
73
- header: 'Really long age header',
74
- width: 50,
75
- align: 'center',
76
- sortable: true,
77
- intent: 'danger',
78
- content: 'tag:#000000',
79
- onCellClick: ({ age }) => alert(`Clicked age cell ${age}`),
80
- },
81
- {
82
- header: 'Data',
83
- dataId: 'data',
84
- columns: [
85
- { dataId: 'occupation', header: 'Ocuppation', width: 200, content: 'text:warning' },
86
- { dataId: 'group', header: 'Group', width: 150, intent: 'muted' },
87
- ],
88
- },
89
- {
90
- dataId: 'date',
91
- header: 'Date',
92
- sortable: true,
93
- content: 'time-ago',
94
- },
95
- ] as IReqoreTableColumn[],
235
+ defaultValue: defaultColumns,
96
236
  }),
97
237
  ...createArg('width', {
98
238
  type: 'number',
99
- defaultValue: 800,
239
+ defaultValue: undefined,
100
240
  name: 'Width',
101
241
  description: 'The width of the table',
102
242
  }),
@@ -135,28 +275,107 @@ export default {
135
275
  } as Meta<IReqoreTableProps>;
136
276
 
137
277
  const Template: Story<IReqoreTableProps> = (args) => {
138
- return <ReqoreTable {...args} sort={{ by: 'age', direction: 'desc' }} />;
278
+ return <ReqoreTable label='Table' {...args} sort={{ by: 'lastName', direction: 'desc' }} />;
139
279
  };
140
280
 
141
281
  export const Basic = Template.bind({});
142
- export const Flat = Template.bind({});
143
- Flat.args = {
144
- flat: true,
282
+ export const NoLabel = Template.bind({});
283
+ NoLabel.args = {
284
+ label: undefined,
285
+ };
286
+
287
+ export const CustomWidth = Template.bind({});
288
+ CustomWidth.args = {
289
+ width: 400,
290
+ };
291
+
292
+ export const NotFlat = Template.bind({});
293
+ NotFlat.args = {
294
+ flat: false,
145
295
  };
146
296
  export const Striped = Template.bind({});
147
297
  Striped.args = {
148
298
  striped: true,
149
299
  };
150
- export const Rounded = Template.bind({});
151
- Rounded.args = {
152
- rounded: true,
300
+ export const Filterable = Template.bind({});
301
+ Filterable.args = {
302
+ filterable: true,
303
+ };
304
+ export const DefaultFilter = Template.bind({});
305
+ DefaultFilter.args = {
306
+ filterable: true,
307
+ filter: 'Village',
308
+ };
309
+
310
+ export const NoDataMessage = Template.bind({});
311
+ NoDataMessage.args = {
312
+ filterable: true,
313
+ filter: 'asjkghakshgjkashg',
314
+ };
315
+
316
+ export const FilterableColumns = Template.bind({});
317
+ FilterableColumns.args = {
318
+ columns: defaultColumnsWithFilters,
153
319
  };
320
+
321
+ export const AllFiltersActive = Template.bind({});
322
+ AllFiltersActive.args = {
323
+ filterable: true,
324
+ filter: 'Road',
325
+ columns: defaultColumnsWithFilters,
326
+ };
327
+
328
+ export const HiddenColumns = Template.bind({});
329
+ HiddenColumns.args = {
330
+ columns: defaultColumnsWithHiddenColumns,
331
+ };
332
+
154
333
  export const Selectable = Template.bind({});
155
334
  Selectable.args = {
156
335
  selectable: true,
157
336
  };
158
337
 
338
+ export const Zoomable = Template.bind({});
339
+ Zoomable.args = {
340
+ zoomable: true,
341
+ };
342
+
159
343
  export const FillParent = Template.bind({});
160
344
  FillParent.args = {
161
345
  fill: true,
162
346
  };
347
+
348
+ export const Sizes = Template.bind({});
349
+ Sizes.args = {
350
+ size: 'small',
351
+ filterable: true,
352
+ wrapperSize: 'big',
353
+ };
354
+
355
+ const CustomHeaderCell = (props: IReqoreCustomHeaderCellProps) => {
356
+ if (props.hasColumns) {
357
+ return <ReqoreH3 intent='success'>{props.label}</ReqoreH3>;
358
+ }
359
+
360
+ return (
361
+ <ReqoreH4 style={{ width: props.width, flexGrow: props.grow }}>
362
+ <ReqoreIcon icon={props.icon} />
363
+ {props.label}
364
+ </ReqoreH4>
365
+ );
366
+ };
367
+
368
+ const CustomCell = (props: IReqoreCustomTableBodyCellProps) => {
369
+ return <ReqoreP style={{ width: props.width, flexGrow: props.grow }}>{props.children}</ReqoreP>;
370
+ };
371
+
372
+ const CustomRow = (props: IReqoreCustomTableBodyCellProps) => {
373
+ return <StyledEffect style={props.style}>{props.children}</StyledEffect>;
374
+ };
375
+
376
+ export const CustomCellsAndRows = Template.bind({});
377
+ CustomCellsAndRows.args = {
378
+ headerCellComponent: CustomHeaderCell,
379
+ bodyCellComponent: CustomCell,
380
+ rowComponent: CustomRow,
381
+ };
@@ -103,7 +103,7 @@ const tabs = [
103
103
  const { createArg } = argManager<IReqoreTabsProps & { tabPadding: TReqoreTabsContentPadding }>();
104
104
 
105
105
  export default {
106
- title: 'Components/Tabs',
106
+ title: 'Navigation/Tabs/Stories',
107
107
  argTypes: {
108
108
  ...SizeArg,
109
109
  ...IntentArg,
@@ -8,7 +8,7 @@ import { SizeArg, argManager } from '../utils/args';
8
8
  const { createArg } = argManager<IReqoreTagGroup & IReqoreTagProps>();
9
9
 
10
10
  export default {
11
- title: 'Components/Tag',
11
+ title: 'Form/Tag/Stories',
12
12
  argTypes: {
13
13
  ...SizeArg,
14
14
  ...createArg('columns', {
@@ -2,12 +2,12 @@ import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { useState } from 'react';
3
3
  import { IReqoreTextareaProps } from '../../components/Textarea';
4
4
  import { ReqoreControlGroup, ReqoreTextarea } from '../../index';
5
- import { argManager, DisabledArg, MinimalArg, SizeArg } from '../utils/args';
5
+ import { DisabledArg, MinimalArg, SizeArg, argManager } from '../utils/args';
6
6
 
7
7
  const { createArg } = argManager<IReqoreTextareaProps>();
8
8
 
9
9
  export default {
10
- title: 'Components/TextArea',
10
+ title: 'Form/TextArea/Stories',
11
11
  argTypes: {
12
12
  ...MinimalArg(),
13
13
  ...DisabledArg,
@@ -2,12 +2,12 @@ import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { noop } from 'lodash';
3
3
  import { IReqoreTreeProps, ReqoreTree } from '../../components/Tree';
4
4
  import MockObject from '../../mock/object.json';
5
- import { argManager, SizeArg } from '../utils/args';
5
+ import { SizeArg, argManager } from '../utils/args';
6
6
 
7
7
  const { createArg } = argManager<IReqoreTreeProps>();
8
8
 
9
9
  export default {
10
- title: 'Components/Tree',
10
+ title: 'Collections/Tree/Stories',
11
11
  argTypes: {
12
12
  ...createArg('withLabelCopy', {
13
13
  name: 'With label copy',
@@ -81,7 +81,7 @@ export const FlatArg = {
81
81
  ...argManager<any>().createArg('flat', {
82
82
  description: 'Whether the component should be flat',
83
83
  name: 'Flat',
84
- defaultValue: false,
84
+ defaultValue: undefined,
85
85
  control: {
86
86
  type: 'boolean',
87
87
  },