@qoretechnologies/reqore 0.36.0 → 0.36.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.
- package/__tests__/collection.test.tsx +1 -22
- package/__tests__/table.test.tsx +1 -1
- package/__tests__/tree.test.tsx +0 -18
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -4
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +11 -26
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +2 -2
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +10 -10
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts +3 -3
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Columns/index.d.ts +1 -1
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Comment/index.d.ts +1 -1
- package/dist/components/Comment/index.d.ts.map +1 -1
- package/dist/components/CommentFeed/index.d.ts +1 -1
- package/dist/components/CommentFeed/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/item.d.ts +2 -2
- package/dist/components/Dropdown/item.d.ts.map +1 -1
- package/dist/components/Dropdown/list.d.ts +1 -1
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Effect/index.d.ts +2 -2
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/ExportModal/index.d.ts +11 -0
- package/dist/components/ExportModal/index.d.ts.map +1 -0
- package/dist/components/ExportModal/index.js +91 -0
- package/dist/components/ExportModal/index.js.map +1 -0
- package/dist/components/Header/index.d.ts +7 -7
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.d.ts +1 -0
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/KeyValueTable/index.d.ts +4 -4
- package/dist/components/KeyValueTable/index.d.ts.map +1 -1
- package/dist/components/KeyValueTable/index.js.map +1 -1
- package/dist/components/Layout/content.d.ts +1 -1
- package/dist/components/Layout/content.d.ts.map +1 -1
- package/dist/components/Layout/index.d.ts +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Menu/item.d.ts +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +3 -3
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +2 -2
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -3
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Paging/index.d.ts +1 -1
- package/dist/components/Paging/index.d.ts.map +1 -1
- package/dist/components/Panel/NonResponsiveActions.d.ts +1 -1
- package/dist/components/Panel/NonResponsiveActions.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Panel/panel.screenshot.d.ts +1 -1
- package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
- package/dist/components/Paragraph/index.d.ts +1 -1
- package/dist/components/Paragraph/index.d.ts.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/Sidebar/item.d.ts +1 -1
- package/dist/components/Sidebar/item.d.ts.map +1 -1
- package/dist/components/Spacer/index.d.ts +3 -3
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Table/body.d.ts +1 -1
- package/dist/components/Table/body.d.ts.map +1 -1
- package/dist/components/Table/body.js +4 -2
- package/dist/components/Table/body.js.map +1 -1
- package/dist/components/Table/cell.d.ts +1 -1
- package/dist/components/Table/cell.d.ts.map +1 -1
- package/dist/components/Table/headerCell.d.ts +1 -1
- package/dist/components/Table/headerCell.d.ts.map +1 -1
- package/dist/components/Table/helpers.d.ts +8 -6
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +49 -16
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +5 -4
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +45 -38
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +7 -5
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +3 -2
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Table/value.d.ts +1 -1
- package/dist/components/Table/value.d.ts.map +1 -1
- package/dist/components/Tabs/content.d.ts +1 -1
- package/dist/components/Tabs/content.d.ts.map +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/list.d.ts +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +1 -1
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts +1 -1
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tree/index.d.ts +2 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +35 -31
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/Paging.d.ts +1 -1
- package/dist/containers/Paging.d.ts.map +1 -1
- package/dist/containers/ThemeProvider.d.ts +1 -1
- package/dist/containers/ThemeProvider.d.ts.map +1 -1
- package/dist/helpers/utils.d.ts +2 -1
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +20 -2
- package/dist/helpers/utils.js.map +1 -1
- package/dist/hooks/useAutoFocus.d.ts +1 -1
- package/dist/hooks/useAutoFocus.d.ts.map +1 -1
- package/dist/hooks/usePopover.d.ts +1 -0
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.d.ts +3 -0
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +49 -11
- package/dist/styles.js.map +1 -1
- package/migration-storybook.log +88 -0
- package/package.json +26 -20
- package/src/components/Breadcrumbs/index.tsx +1 -1
- package/src/components/Button/index.tsx +3 -54
- package/src/components/Collection/index.tsx +18 -15
- package/src/components/Collection/item.tsx +2 -1
- package/src/components/ExportModal/index.tsx +98 -0
- package/src/components/KeyValueTable/index.tsx +17 -11
- package/src/components/Menu/item.tsx +4 -4
- package/src/components/Notifications/notification.tsx +2 -2
- package/src/components/Panel/index.tsx +2 -2
- package/src/components/Table/body.tsx +6 -3
- package/src/components/Table/helpers.ts +52 -21
- package/src/components/Table/index.tsx +108 -75
- package/src/components/Table/row.tsx +12 -7
- package/src/components/Tabs/list.tsx +1 -1
- package/src/components/Tree/index.tsx +82 -75
- package/src/helpers/utils.ts +10 -2
- package/src/hooks/useAutoFocus.ts +1 -1
- package/src/index.tsx +1 -1
- package/src/mock/tableData.ts +12 -0
- package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +11 -23
- package/src/stories/Button/Button.stories.tsx +83 -47
- package/src/stories/Checkbox/Checkbox.stories.tsx +19 -9
- package/src/stories/Collection/Collection.stories.tsx +195 -171
- package/src/stories/Columns/Columns.stories.tsx +38 -24
- package/src/stories/Comment/Comment.stories.tsx +15 -6
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +102 -48
- package/src/stories/Drawer/Drawer.stories.tsx +52 -17
- package/src/stories/Dropdown/Dropdown.stories.tsx +184 -152
- package/src/stories/ExportModal/ExportModal.stories.tsx +18 -0
- package/src/stories/Header/Header.stories.tsx +65 -31
- package/src/stories/Icon/Icon.stories.tsx +139 -133
- package/src/stories/Input/Input.stories.tsx +68 -31
- package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +143 -118
- package/src/stories/Menu/Menu.stories.tsx +56 -20
- package/src/stories/Message/Message.stories.tsx +71 -37
- package/src/stories/Modal/Modal.stories.tsx +28 -8
- package/src/stories/MultiSelect/MultiSelect.stories.tsx +66 -35
- package/src/stories/Navbar/Navbar.stories.tsx +15 -5
- package/src/stories/Notifications/Interactive.stories.tsx +40 -28
- package/src/stories/Notifications/Notification.stories.tsx +55 -41
- package/src/stories/Notifications/Notifications.stories.tsx +45 -29
- package/src/stories/Paging/Paging.stories.tsx +206 -177
- package/src/stories/Panel/Panel.stories.tsx +238 -168
- package/src/stories/Paragraph/Paragraph.stories.tsx +66 -31
- package/src/stories/Popover/Popover.stories.tsx +62 -40
- package/src/stories/RadioGroup/RadioGroup.stories.tsx +41 -19
- package/src/stories/Sidebar/Sidebar.stories.tsx +29 -10
- package/src/stories/Spacer/Spacer.stories.tsx +13 -5
- package/src/stories/Spinner/Spinner.stories.tsx +26 -12
- package/src/stories/Table/Table.stories.tsx +200 -144
- package/src/stories/Table/Tests.stories.tsx +9 -0
- package/src/stories/Tabs/Tabs.stories.tsx +82 -46
- package/src/stories/Tag/Tag.stories.tsx +56 -37
- package/src/stories/Tag/TagGroup.stories.tsx +297 -0
- package/src/stories/TextArea/TextArea.stories.tsx +82 -40
- package/src/stories/Tree/Tree.stories.tsx +84 -22
- package/src/stories/utils.ts +22 -1
- package/src/styles.ts +55 -2
- package/tests.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { IReqoreControlGroupProps } from '../../components/ControlGroup';
|
|
3
3
|
import {
|
|
4
4
|
ReqoreButton,
|
|
@@ -9,12 +9,14 @@ import {
|
|
|
9
9
|
ReqoreTag,
|
|
10
10
|
ReqoreVerticalSpacer,
|
|
11
11
|
} from '../../index';
|
|
12
|
+
import { StoryMeta } from '../utils';
|
|
12
13
|
import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
|
|
13
14
|
|
|
14
15
|
const { createArg } = argManager<IReqoreControlGroupProps>();
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
const meta = {
|
|
17
18
|
title: 'Form/Control Group/Stories',
|
|
19
|
+
component: ReqoreControlGroup,
|
|
18
20
|
argTypes: {
|
|
19
21
|
...SizeArg,
|
|
20
22
|
...GapSizeArg,
|
|
@@ -44,9 +46,19 @@ export default {
|
|
|
44
46
|
control: 'boolean',
|
|
45
47
|
}),
|
|
46
48
|
},
|
|
47
|
-
|
|
49
|
+
args: {
|
|
50
|
+
wrap: true,
|
|
51
|
+
vertical: false,
|
|
52
|
+
stack: false,
|
|
53
|
+
fluid: false,
|
|
54
|
+
minimal: false,
|
|
55
|
+
},
|
|
56
|
+
} as StoryMeta<typeof ReqoreControlGroup>;
|
|
57
|
+
|
|
58
|
+
export default meta;
|
|
59
|
+
type Story = StoryObj<typeof meta>;
|
|
48
60
|
|
|
49
|
-
const Template:
|
|
61
|
+
const Template: StoryFn<typeof ReqoreControlGroup> = (args) => {
|
|
50
62
|
if (args.fill) {
|
|
51
63
|
return (
|
|
52
64
|
<>
|
|
@@ -274,72 +286,114 @@ const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProp
|
|
|
274
286
|
);
|
|
275
287
|
};
|
|
276
288
|
|
|
277
|
-
export const Basic =
|
|
278
|
-
|
|
279
|
-
Minimal.args = {
|
|
280
|
-
minimal: true,
|
|
289
|
+
export const Basic: Story = {
|
|
290
|
+
render: Template,
|
|
281
291
|
};
|
|
282
292
|
|
|
283
|
-
export const
|
|
284
|
-
|
|
285
|
-
|
|
293
|
+
export const Minimal: Story = {
|
|
294
|
+
render: Template,
|
|
295
|
+
|
|
296
|
+
args: {
|
|
297
|
+
minimal: true,
|
|
298
|
+
},
|
|
286
299
|
};
|
|
287
300
|
|
|
288
|
-
export const
|
|
289
|
-
|
|
290
|
-
|
|
301
|
+
export const Fluid: Story = {
|
|
302
|
+
render: Template,
|
|
303
|
+
|
|
304
|
+
args: {
|
|
305
|
+
fluid: true,
|
|
306
|
+
},
|
|
291
307
|
};
|
|
292
308
|
|
|
293
|
-
export const
|
|
294
|
-
|
|
295
|
-
|
|
309
|
+
export const Fill: Story = {
|
|
310
|
+
render: Template,
|
|
311
|
+
|
|
312
|
+
args: {
|
|
313
|
+
fill: true,
|
|
314
|
+
},
|
|
296
315
|
};
|
|
297
316
|
|
|
298
|
-
export const
|
|
299
|
-
|
|
300
|
-
|
|
317
|
+
export const NotFlat: Story = {
|
|
318
|
+
render: Template,
|
|
319
|
+
|
|
320
|
+
args: {
|
|
321
|
+
flat: false,
|
|
322
|
+
},
|
|
301
323
|
};
|
|
302
324
|
|
|
303
|
-
export const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
325
|
+
export const Vertical: Story = {
|
|
326
|
+
render: Template,
|
|
327
|
+
|
|
328
|
+
args: {
|
|
329
|
+
vertical: true,
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export const VerticalFluid: Story = {
|
|
334
|
+
render: Template,
|
|
335
|
+
|
|
336
|
+
args: {
|
|
337
|
+
vertical: true,
|
|
338
|
+
fluid: true,
|
|
339
|
+
},
|
|
307
340
|
};
|
|
308
341
|
|
|
309
|
-
export const VerticalStackedFluid =
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
342
|
+
export const VerticalStackedFluid: Story = {
|
|
343
|
+
render: Template,
|
|
344
|
+
|
|
345
|
+
args: {
|
|
346
|
+
vertical: true,
|
|
347
|
+
stack: true,
|
|
348
|
+
fluid: true,
|
|
349
|
+
},
|
|
314
350
|
};
|
|
315
351
|
|
|
316
|
-
export const Stacked =
|
|
317
|
-
|
|
318
|
-
|
|
352
|
+
export const Stacked: Story = {
|
|
353
|
+
render: Template,
|
|
354
|
+
|
|
355
|
+
args: {
|
|
356
|
+
stack: true,
|
|
357
|
+
},
|
|
319
358
|
};
|
|
320
359
|
|
|
321
|
-
export const BigGapSize =
|
|
322
|
-
|
|
323
|
-
|
|
360
|
+
export const BigGapSize: Story = {
|
|
361
|
+
render: Template,
|
|
362
|
+
|
|
363
|
+
args: {
|
|
364
|
+
gapSize: 'big',
|
|
365
|
+
},
|
|
324
366
|
};
|
|
325
367
|
|
|
326
|
-
export const NoWrap =
|
|
327
|
-
|
|
328
|
-
|
|
368
|
+
export const NoWrap: Story = {
|
|
369
|
+
render: Template,
|
|
370
|
+
|
|
371
|
+
args: {
|
|
372
|
+
wrap: false,
|
|
373
|
+
},
|
|
329
374
|
};
|
|
330
375
|
|
|
331
|
-
export const HorizontalAlign =
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
376
|
+
export const HorizontalAlign: Story = {
|
|
377
|
+
render: Template,
|
|
378
|
+
|
|
379
|
+
args: {
|
|
380
|
+
vertical: true,
|
|
381
|
+
horizontalAlign: 'center',
|
|
382
|
+
},
|
|
335
383
|
};
|
|
336
384
|
|
|
337
|
-
export const VerticalAlign =
|
|
338
|
-
|
|
339
|
-
|
|
385
|
+
export const VerticalAlign: Story = {
|
|
386
|
+
render: Template,
|
|
387
|
+
|
|
388
|
+
args: {
|
|
389
|
+
verticalAlign: 'flex-end',
|
|
390
|
+
},
|
|
340
391
|
};
|
|
341
392
|
|
|
342
|
-
export const Responsive =
|
|
343
|
-
|
|
344
|
-
|
|
393
|
+
export const Responsive: Story = {
|
|
394
|
+
render: Template,
|
|
395
|
+
|
|
396
|
+
args: {
|
|
397
|
+
responsive: true,
|
|
398
|
+
},
|
|
345
399
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
import { IReqoreDrawerProps, ReqoreDrawer } from '../../components/Drawer';
|
|
4
4
|
import { IReqoreInputProps } from '../../components/Input';
|
|
@@ -10,12 +10,14 @@ import {
|
|
|
10
10
|
ReqoreTabsContent,
|
|
11
11
|
useReqoreProperty,
|
|
12
12
|
} from '../../index';
|
|
13
|
+
import { StoryMeta } from '../utils';
|
|
13
14
|
import { FlatArg, IntentArg, argManager } from '../utils/args';
|
|
14
15
|
|
|
15
16
|
const { createArg } = argManager<IReqoreDrawerProps>();
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
const meta = {
|
|
18
19
|
title: 'Dialogs/Drawer/Stories',
|
|
20
|
+
component: ReqoreDrawer,
|
|
19
21
|
parameters: {
|
|
20
22
|
chromatic: {
|
|
21
23
|
viewports: [450, 600, 1440],
|
|
@@ -83,9 +85,24 @@ export default {
|
|
|
83
85
|
}),
|
|
84
86
|
...IntentArg,
|
|
85
87
|
},
|
|
86
|
-
|
|
88
|
+
args: {
|
|
89
|
+
isOpen: true,
|
|
90
|
+
position: 'right',
|
|
91
|
+
resizable: true,
|
|
92
|
+
hidable: true,
|
|
93
|
+
size: 'auto',
|
|
94
|
+
minSize: '150px',
|
|
95
|
+
maxSize: '90vw',
|
|
96
|
+
blur: 3,
|
|
97
|
+
opacity: 1,
|
|
98
|
+
hasBackdrop: true,
|
|
99
|
+
},
|
|
100
|
+
} as StoryMeta<typeof ReqoreDrawer>;
|
|
101
|
+
|
|
102
|
+
export default meta;
|
|
103
|
+
type Story = StoryObj<typeof meta>;
|
|
87
104
|
|
|
88
|
-
const Template:
|
|
105
|
+
const Template: StoryFn<typeof ReqoreDrawer> = (args) => {
|
|
89
106
|
const confirmAction = useReqoreProperty('confirmAction');
|
|
90
107
|
|
|
91
108
|
return (
|
|
@@ -236,20 +253,38 @@ const Template: Story<IReqoreDrawerProps> = (args: IReqoreDrawerProps) => {
|
|
|
236
253
|
);
|
|
237
254
|
};
|
|
238
255
|
|
|
239
|
-
export const Basic =
|
|
240
|
-
|
|
241
|
-
Flat.args = {
|
|
242
|
-
flat: true,
|
|
256
|
+
export const Basic: Story = {
|
|
257
|
+
render: Template,
|
|
243
258
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
259
|
+
|
|
260
|
+
export const Flat: Story = {
|
|
261
|
+
render: Template,
|
|
262
|
+
|
|
263
|
+
args: {
|
|
264
|
+
flat: true,
|
|
265
|
+
},
|
|
247
266
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
267
|
+
|
|
268
|
+
export const Floating: Story = {
|
|
269
|
+
render: Template,
|
|
270
|
+
|
|
271
|
+
args: {
|
|
272
|
+
floating: true,
|
|
273
|
+
},
|
|
251
274
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
275
|
+
|
|
276
|
+
export const Transparent: Story = {
|
|
277
|
+
render: Template,
|
|
278
|
+
|
|
279
|
+
args: {
|
|
280
|
+
opacity: 0.5,
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export const WithSize: Story = {
|
|
285
|
+
render: Template,
|
|
286
|
+
|
|
287
|
+
args: {
|
|
288
|
+
size: '500px',
|
|
289
|
+
},
|
|
255
290
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ReqoreButton from '../../components/Button';
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
|
+
import ReqoreButton, { IReqoreButtonProps } from '../../components/Button';
|
|
3
3
|
import { IReqoreDropdownProps } from '../../components/Dropdown';
|
|
4
4
|
import { ReqoreControlGroup, ReqoreDropdown, ReqoreInput } from '../../index';
|
|
5
|
+
import { StoryMeta } from '../utils';
|
|
5
6
|
import { argManager } from '../utils/args';
|
|
6
7
|
|
|
7
8
|
const { createArg, disableArg } = argManager<IReqoreDropdownProps>();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
const meta = {
|
|
10
11
|
title: 'Form/Dropdown/Stories',
|
|
12
|
+
component: ReqoreDropdown,
|
|
11
13
|
parameters: {
|
|
12
14
|
chromatic: {
|
|
13
15
|
delay: 1500,
|
|
@@ -30,105 +32,112 @@ export default {
|
|
|
30
32
|
table: {
|
|
31
33
|
disable: true,
|
|
32
34
|
},
|
|
33
|
-
|
|
34
|
-
defaultValue: [
|
|
35
|
-
{
|
|
36
|
-
selected: true,
|
|
37
|
-
value: 'Hello',
|
|
38
|
-
icon: 'SunCloudyLine',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
value: 'How are ya, I am super long item and I am not going to fit in the dropdown',
|
|
42
|
-
icon: 'BatteryChargeFill',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
disabled: true,
|
|
46
|
-
value: 'i aM diSAblEd',
|
|
47
|
-
icon: 'StopCircleLine',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
divider: true,
|
|
51
|
-
label: 'Divider',
|
|
52
|
-
dividerAlign: 'left',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
selected: true,
|
|
56
|
-
value: 'Hello',
|
|
57
|
-
icon: 'SunCloudyLine',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
value: 'How are ya',
|
|
61
|
-
icon: 'BatteryChargeFill',
|
|
62
|
-
description:
|
|
63
|
-
"Yep, and the description is now also available and possible, isn't that great?",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
disabled: true,
|
|
67
|
-
value: 'i aM diSAblEd',
|
|
68
|
-
icon: 'StopCircleLine',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
selected: true,
|
|
72
|
-
value: 'Hello',
|
|
73
|
-
icon: 'SunCloudyLine',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
value: 'How are ya',
|
|
77
|
-
icon: 'BatteryChargeFill',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
disabled: true,
|
|
81
|
-
value: 'i aM diSAblEd',
|
|
82
|
-
icon: 'StopCircleLine',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
selected: true,
|
|
86
|
-
value: 'Hello',
|
|
87
|
-
icon: 'SunCloudyLine',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
value: 'How are ya',
|
|
91
|
-
icon: 'BatteryChargeFill',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
disabled: true,
|
|
95
|
-
value: 'i aM diSAblEd',
|
|
96
|
-
icon: 'StopCircleLine',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
selected: true,
|
|
100
|
-
value: 'Hello',
|
|
101
|
-
icon: 'SunCloudyLine',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
value: 'How are ya',
|
|
105
|
-
icon: 'BatteryChargeFill',
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
disabled: true,
|
|
109
|
-
value: 'i aM diSAblEd',
|
|
110
|
-
icon: 'StopCircleLine',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
selected: true,
|
|
114
|
-
value: 'Hello',
|
|
115
|
-
icon: 'SunCloudyLine',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
value: 'How are ya',
|
|
119
|
-
icon: 'BatteryChargeFill',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
disabled: true,
|
|
123
|
-
value: 'i aM diSAblEd',
|
|
124
|
-
icon: 'StopCircleLine',
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
35
|
}),
|
|
128
36
|
},
|
|
129
|
-
|
|
37
|
+
args: {
|
|
38
|
+
component: ReqoreButton,
|
|
39
|
+
filterable: true,
|
|
40
|
+
items: [
|
|
41
|
+
{
|
|
42
|
+
selected: true,
|
|
43
|
+
value: 'Hello',
|
|
44
|
+
icon: 'SunCloudyLine',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: 'How are ya, I am super long item and I am not going to fit in the dropdown',
|
|
48
|
+
icon: 'BatteryChargeFill',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
disabled: true,
|
|
52
|
+
value: 'i aM diSAblEd',
|
|
53
|
+
icon: 'StopCircleLine',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
divider: true,
|
|
57
|
+
label: 'Divider',
|
|
58
|
+
dividerAlign: 'left',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
selected: true,
|
|
62
|
+
value: 'Hello',
|
|
63
|
+
icon: 'SunCloudyLine',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: 'How are ya',
|
|
67
|
+
icon: 'BatteryChargeFill',
|
|
68
|
+
description:
|
|
69
|
+
"Yep, and the description is now also available and possible, isn't that great?",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
disabled: true,
|
|
73
|
+
value: 'i aM diSAblEd',
|
|
74
|
+
icon: 'StopCircleLine',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
selected: true,
|
|
78
|
+
value: 'Hello',
|
|
79
|
+
icon: 'SunCloudyLine',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: 'How are ya',
|
|
83
|
+
icon: 'BatteryChargeFill',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
disabled: true,
|
|
87
|
+
value: 'i aM diSAblEd',
|
|
88
|
+
icon: 'StopCircleLine',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
selected: true,
|
|
92
|
+
value: 'Hello',
|
|
93
|
+
icon: 'SunCloudyLine',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
value: 'How are ya',
|
|
97
|
+
icon: 'BatteryChargeFill',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
disabled: true,
|
|
101
|
+
value: 'i aM diSAblEd',
|
|
102
|
+
icon: 'StopCircleLine',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
selected: true,
|
|
106
|
+
value: 'Hello',
|
|
107
|
+
icon: 'SunCloudyLine',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: 'How are ya',
|
|
111
|
+
icon: 'BatteryChargeFill',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
disabled: true,
|
|
115
|
+
value: 'i aM diSAblEd',
|
|
116
|
+
icon: 'StopCircleLine',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
selected: true,
|
|
120
|
+
value: 'Hello',
|
|
121
|
+
icon: 'SunCloudyLine',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
value: 'How are ya',
|
|
125
|
+
icon: 'BatteryChargeFill',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
disabled: true,
|
|
129
|
+
value: 'i aM diSAblEd',
|
|
130
|
+
icon: 'StopCircleLine',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
} as StoryMeta<typeof ReqoreDropdown<IReqoreButtonProps>>;
|
|
135
|
+
|
|
136
|
+
export default meta;
|
|
137
|
+
|
|
138
|
+
type Story = StoryObj<typeof meta>;
|
|
130
139
|
|
|
131
|
-
const Template:
|
|
140
|
+
const Template: StoryFn<typeof ReqoreDropdown<IReqoreButtonProps>> = (args) => {
|
|
132
141
|
if (args.scrollToSelected || args.paging) {
|
|
133
142
|
return (
|
|
134
143
|
<ReqoreControlGroup>
|
|
@@ -214,72 +223,95 @@ const Template: Story<IReqoreDropdownProps> = (args: IReqoreDropdownProps) => {
|
|
|
214
223
|
);
|
|
215
224
|
};
|
|
216
225
|
|
|
217
|
-
export const Basic =
|
|
218
|
-
|
|
219
|
-
CustomComponent.args = {
|
|
220
|
-
component: ReqoreInput,
|
|
221
|
-
placeholder: 'Custom component',
|
|
226
|
+
export const Basic: Story = {
|
|
227
|
+
render: Template,
|
|
222
228
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
|
|
230
|
+
export const CustomComponent: Story = {
|
|
231
|
+
render: Template,
|
|
232
|
+
|
|
233
|
+
args: {
|
|
234
|
+
component: ReqoreInput,
|
|
235
|
+
placeholder: 'Custom component',
|
|
236
|
+
},
|
|
227
237
|
};
|
|
228
238
|
|
|
229
|
-
export const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
console.log(value);
|
|
239
|
+
export const ScrollToSelectedItem: Story = {
|
|
240
|
+
render: Template,
|
|
241
|
+
|
|
242
|
+
args: {
|
|
243
|
+
scrollToSelected: true,
|
|
244
|
+
label: 'Dropdown that scrolls to selected item',
|
|
236
245
|
},
|
|
237
246
|
};
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
|
|
248
|
+
export const WithCustomFilter: Story = {
|
|
249
|
+
render: Template,
|
|
250
|
+
|
|
251
|
+
args: {
|
|
252
|
+
label: 'Dropdown with custom filter',
|
|
253
|
+
filterPlaceholder: 'Custom filter placeholder',
|
|
254
|
+
filter: 'something',
|
|
255
|
+
onFilterChange: (value) => {
|
|
256
|
+
console.log(value);
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export const WithPaging: Story = {
|
|
262
|
+
render: Template,
|
|
263
|
+
|
|
264
|
+
args: {
|
|
265
|
+
paging: {
|
|
266
|
+
itemsPerPage: 50,
|
|
267
|
+
changePageOnScroll: 'horizontal',
|
|
268
|
+
},
|
|
269
|
+
label: 'Dropdown with paging',
|
|
243
270
|
},
|
|
244
|
-
label: 'Dropdown with paging',
|
|
245
271
|
};
|
|
246
272
|
|
|
247
|
-
export const WithLoadMore: Story
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
273
|
+
export const WithLoadMore: Story = {
|
|
274
|
+
render: Template,
|
|
275
|
+
|
|
276
|
+
args: {
|
|
277
|
+
paging: {
|
|
278
|
+
fluid: true,
|
|
279
|
+
infinite: true,
|
|
280
|
+
scrollOnLoadMore: true,
|
|
281
|
+
loadMoreLabel: 'Load additional items...',
|
|
282
|
+
showLabels: true,
|
|
283
|
+
includeBottomControls: false,
|
|
284
|
+
},
|
|
285
|
+
label: 'Dropdown with load more',
|
|
256
286
|
},
|
|
257
|
-
label: 'Dropdown with load more',
|
|
258
287
|
};
|
|
259
288
|
|
|
260
|
-
export const WithCustomPaging: Story
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
289
|
+
export const WithCustomPaging: Story = {
|
|
290
|
+
render: Template,
|
|
291
|
+
|
|
292
|
+
args: {
|
|
293
|
+
paging: {
|
|
294
|
+
fluid: true,
|
|
295
|
+
infinite: true,
|
|
296
|
+
scrollOnLoadMore: true,
|
|
297
|
+
pageControlsPosition: 'both',
|
|
298
|
+
loadMoreLabel: 'Load additional items...',
|
|
299
|
+
showLabels: true,
|
|
300
|
+
loadMoreButtonProps: {
|
|
301
|
+
textAlign: 'center',
|
|
302
|
+
effect: {
|
|
303
|
+
gradient: {
|
|
304
|
+
colors: 'info',
|
|
305
|
+
animate: 'hover',
|
|
306
|
+
},
|
|
307
|
+
textSize: 'small',
|
|
308
|
+
uppercase: true,
|
|
309
|
+
spaced: 3,
|
|
275
310
|
},
|
|
276
|
-
textSize: 'small',
|
|
277
|
-
uppercase: true,
|
|
278
|
-
spaced: 3,
|
|
279
311
|
},
|
|
280
312
|
},
|
|
313
|
+
label: 'Dropdown with custom paging',
|
|
281
314
|
},
|
|
282
|
-
label: 'Dropdown with custom paging',
|
|
283
|
-
};
|
|
284
315
|
|
|
285
|
-
|
|
316
|
+
play: () => {},
|
|
317
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ReqoreExportModal } from '../../components/ExportModal';
|
|
3
|
+
import { tableData } from '../../mock/tableData';
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Utilities/Export Modal/Stories',
|
|
8
|
+
component: ReqoreExportModal,
|
|
9
|
+
} as StoryMeta<typeof ReqoreExportModal>;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
data: tableData,
|
|
17
|
+
},
|
|
18
|
+
};
|