@qoretechnologies/reqore 0.35.3 → 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 +27 -0
- package/dist/components/KeyValueTable/index.d.ts.map +1 -0
- package/dist/components/KeyValueTable/index.js +87 -0
- package/dist/components/KeyValueTable/index.js.map +1 -0
- 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 +63 -53
- 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 +12 -5
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Table/value.d.ts +7 -0
- package/dist/components/Table/value.d.ts.map +1 -0
- package/dist/components/Table/value.js +37 -0
- package/dist/components/Table/value.js.map +1 -0
- 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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- 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 +129 -0
- 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 +127 -90
- package/src/components/Table/row.tsx +21 -10
- package/src/components/Table/value.tsx +27 -0
- 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 +2 -0
- 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 +224 -0
- 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 { useState } from 'react';
|
|
3
3
|
import { IReqorePopoverProps } from '../../components/Popover';
|
|
4
4
|
import usePopover from '../../hooks/usePopover';
|
|
@@ -11,12 +11,18 @@ import {
|
|
|
11
11
|
ReqorePopover,
|
|
12
12
|
ReqoreSpacer,
|
|
13
13
|
} from '../../index';
|
|
14
|
+
import { StoryMeta } from '../utils';
|
|
14
15
|
import { FlatArg, argManager } from '../utils/args';
|
|
15
16
|
|
|
16
17
|
const { createArg } = argManager<IReqorePopoverProps>();
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
const meta = {
|
|
19
20
|
title: 'Other/Popover/Stories',
|
|
21
|
+
component: ReqorePopover,
|
|
22
|
+
args: {
|
|
23
|
+
content: 'This is a popover',
|
|
24
|
+
flat: true,
|
|
25
|
+
},
|
|
20
26
|
argTypes: {
|
|
21
27
|
...createArg('transparent', {
|
|
22
28
|
defaultValue: false,
|
|
@@ -50,10 +56,10 @@ export default {
|
|
|
50
56
|
}),
|
|
51
57
|
...FlatArg,
|
|
52
58
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
} as StoryMeta<typeof ReqorePopover>;
|
|
60
|
+
|
|
61
|
+
type Story = StoryObj<typeof meta>;
|
|
62
|
+
export default meta;
|
|
57
63
|
|
|
58
64
|
const HoverButton = (args: any) => {
|
|
59
65
|
return (
|
|
@@ -105,7 +111,7 @@ const HoverStayButton = (args: any) => {
|
|
|
105
111
|
);
|
|
106
112
|
};
|
|
107
113
|
|
|
108
|
-
const Template:
|
|
114
|
+
const Template: StoryFn<IReqorePopoverProps & { insideModal?: boolean }> = (
|
|
109
115
|
args: IReqorePopoverProps & { insideModal?: boolean }
|
|
110
116
|
) => {
|
|
111
117
|
if (args.insideModal) {
|
|
@@ -332,42 +338,58 @@ const Template: Story<IReqorePopoverProps & { insideModal?: boolean }> = (
|
|
|
332
338
|
);
|
|
333
339
|
};
|
|
334
340
|
|
|
335
|
-
export const Basic =
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
341
|
+
export const Basic: Story = {
|
|
342
|
+
render: Template,
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
export const NotFlat: Story = {
|
|
346
|
+
render: Template,
|
|
347
|
+
|
|
348
|
+
args: {
|
|
349
|
+
flat: false,
|
|
350
|
+
},
|
|
339
351
|
};
|
|
340
|
-
|
|
341
|
-
CustomContent
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
352
|
+
|
|
353
|
+
export const CustomContent: Story = {
|
|
354
|
+
render: Template,
|
|
355
|
+
|
|
356
|
+
args: {
|
|
357
|
+
noWrapper: true,
|
|
358
|
+
content: (
|
|
359
|
+
<ReqorePanel label='This is a test' flat>
|
|
360
|
+
<ReqoreMessage flat>
|
|
361
|
+
In to am attended desirous raptures declared diverted confined at. Collected instantly
|
|
362
|
+
remaining up certainly to necessary as. Over walk dull into
|
|
363
|
+
</ReqoreMessage>
|
|
364
|
+
</ReqorePanel>
|
|
365
|
+
),
|
|
366
|
+
},
|
|
351
367
|
};
|
|
352
368
|
|
|
353
|
-
export const Blurred =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
369
|
+
export const Blurred: Story = {
|
|
370
|
+
render: Template,
|
|
371
|
+
|
|
372
|
+
args: {
|
|
373
|
+
blur: true,
|
|
374
|
+
noWrapper: true,
|
|
375
|
+
content: (
|
|
376
|
+
<ReqorePanel label='This is a test' flat>
|
|
377
|
+
<ReqoreMessage flat>
|
|
378
|
+
In to am attended desirous raptures declared diverted confined at. Collected instantly
|
|
379
|
+
remaining up certainly to necessary as. Over walk dull into
|
|
380
|
+
</ReqoreMessage>
|
|
381
|
+
</ReqorePanel>
|
|
382
|
+
),
|
|
383
|
+
},
|
|
365
384
|
};
|
|
366
385
|
|
|
367
|
-
export const BlurredInsideModal =
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
386
|
+
export const BlurredInsideModal: Story = {
|
|
387
|
+
render: Template,
|
|
388
|
+
|
|
389
|
+
args: {
|
|
390
|
+
blur: true,
|
|
391
|
+
noWrapper: true,
|
|
392
|
+
insideModal: true,
|
|
393
|
+
animatedDialogs: false,
|
|
394
|
+
},
|
|
373
395
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import ReqoreRadioGroup, { IReqoreRadioGroupProps } from '../../components/RadioGroup';
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
4
5
|
import { DisabledArg, SizeArg, argManager } from '../utils/args';
|
|
5
6
|
|
|
6
7
|
const { createArg } = argManager<IReqoreRadioGroupProps>();
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
const meta = {
|
|
9
10
|
title: 'Form/Radio Group/Stories',
|
|
11
|
+
component: ReqoreRadioGroup,
|
|
10
12
|
argTypes: {
|
|
11
13
|
...createArg('asSwitch', {
|
|
12
14
|
type: 'boolean',
|
|
@@ -17,9 +19,12 @@ export default {
|
|
|
17
19
|
...SizeArg,
|
|
18
20
|
...DisabledArg,
|
|
19
21
|
},
|
|
20
|
-
} as
|
|
22
|
+
} as StoryMeta<typeof ReqoreRadioGroup>;
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
|
|
27
|
+
const Template: StoryFn<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) => {
|
|
23
28
|
const [selected, setSelected] = useState(null);
|
|
24
29
|
|
|
25
30
|
return (
|
|
@@ -168,23 +173,40 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
|
|
|
168
173
|
);
|
|
169
174
|
};
|
|
170
175
|
|
|
171
|
-
export const Basic =
|
|
172
|
-
|
|
173
|
-
Horizontal.args = {
|
|
174
|
-
vertical: false,
|
|
176
|
+
export const Basic: Story = {
|
|
177
|
+
render: Template,
|
|
175
178
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
|
|
180
|
+
export const Horizontal: Story = {
|
|
181
|
+
render: Template,
|
|
182
|
+
|
|
183
|
+
args: {
|
|
184
|
+
vertical: false,
|
|
185
|
+
},
|
|
179
186
|
};
|
|
180
187
|
|
|
181
|
-
export const
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
export const Switch: Story = {
|
|
189
|
+
render: Template,
|
|
190
|
+
|
|
191
|
+
args: {
|
|
192
|
+
asSwitch: true,
|
|
193
|
+
},
|
|
184
194
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
195
|
+
|
|
196
|
+
export const WithoutMargin: Story = {
|
|
197
|
+
render: Template,
|
|
198
|
+
|
|
199
|
+
args: {
|
|
200
|
+
margin: 'none',
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export const WithTexts: Story = {
|
|
205
|
+
render: Template,
|
|
206
|
+
|
|
207
|
+
args: {
|
|
208
|
+
asSwitch: true,
|
|
209
|
+
onText: 'True',
|
|
210
|
+
offText: 'False and wrong',
|
|
211
|
+
},
|
|
190
212
|
};
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
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 { StoryMeta } from '../utils';
|
|
6
7
|
import { FlatArg, NoContentArg, argManager } from '../utils/args';
|
|
7
8
|
|
|
8
9
|
const { disableArg, createArg } = argManager<IQorusSidebarProps>();
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const meta = {
|
|
11
12
|
title: 'Navigation/Sidebar/Stories',
|
|
13
|
+
component: ReqoreSidebar,
|
|
14
|
+
args: {
|
|
15
|
+
path: '/',
|
|
16
|
+
floating: false,
|
|
17
|
+
bordered: false,
|
|
18
|
+
isOpen: false,
|
|
19
|
+
position: 'left',
|
|
20
|
+
withoutContent: true,
|
|
21
|
+
},
|
|
12
22
|
argTypes: {
|
|
13
23
|
...disableArg('items'),
|
|
14
24
|
...FlatArg,
|
|
@@ -45,9 +55,12 @@ export default {
|
|
|
45
55
|
}),
|
|
46
56
|
...NoContentArg,
|
|
47
57
|
},
|
|
48
|
-
} as
|
|
58
|
+
} as StoryMeta<typeof ReqoreSidebar>;
|
|
59
|
+
|
|
60
|
+
export default meta;
|
|
61
|
+
type Story = StoryObj<typeof meta>;
|
|
49
62
|
|
|
50
|
-
const Template:
|
|
63
|
+
const Template: StoryFn<IQorusSidebarProps> = (args: IQorusSidebarProps) => {
|
|
51
64
|
return (
|
|
52
65
|
<ReqoreSidebar
|
|
53
66
|
{...args}
|
|
@@ -69,10 +82,16 @@ const Template: Story<IQorusSidebarProps> = (args: IQorusSidebarProps) => {
|
|
|
69
82
|
);
|
|
70
83
|
};
|
|
71
84
|
|
|
72
|
-
export const Basic =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
export const Basic: Story = {
|
|
86
|
+
render: Template,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const Floating: Story = {
|
|
90
|
+
render: Template,
|
|
91
|
+
|
|
92
|
+
args: {
|
|
93
|
+
floating: true,
|
|
94
|
+
isOpen: true,
|
|
95
|
+
hasFloatingBackdrop: true,
|
|
96
|
+
},
|
|
78
97
|
};
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import {
|
|
3
3
|
IReqoreSpacerProps,
|
|
4
4
|
ReqoreHorizontalSpacer,
|
|
5
|
+
ReqoreSpacer,
|
|
5
6
|
ReqoreVerticalSpacer,
|
|
6
7
|
} from '../../components/Spacer';
|
|
7
8
|
import { ReqorePanel } from '../../index';
|
|
9
|
+
import { StoryMeta } from '../utils';
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
const meta = {
|
|
10
12
|
title: 'Utilities/Spacer/Stories',
|
|
11
|
-
|
|
13
|
+
component: ReqoreSpacer,
|
|
14
|
+
} as StoryMeta<typeof ReqoreSpacer>;
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
|
|
19
|
+
const Template: StoryFn<IReqoreSpacerProps> = () => {
|
|
14
20
|
return (
|
|
15
21
|
<>
|
|
16
22
|
<ReqorePanel label='Horizontal'>
|
|
@@ -89,4 +95,6 @@ const Template: Story<IReqoreSpacerProps> = () => {
|
|
|
89
95
|
);
|
|
90
96
|
};
|
|
91
97
|
|
|
92
|
-
export const Basic =
|
|
98
|
+
export const Basic: Story = {
|
|
99
|
+
render: Template,
|
|
100
|
+
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { IReqoreSpinnerProps, ReqoreSpinner } from '../../components/Spinner';
|
|
3
3
|
import { ReqoreControlGroup } from '../../index';
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const meta = {
|
|
6
7
|
title: 'Utilities/Spinner/Stories',
|
|
7
|
-
|
|
8
|
+
component: ReqoreSpinner,
|
|
9
|
+
} as StoryMeta<typeof ReqoreSpinner>;
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
const Template: StoryFn<IReqoreSpinnerProps> = (args) => {
|
|
10
15
|
return (
|
|
11
16
|
<ReqoreControlGroup vertical gapSize='huge'>
|
|
12
17
|
<ReqoreSpinner {...args}>{args.children}</ReqoreSpinner>
|
|
@@ -55,14 +60,23 @@ const Template: Story<IReqoreSpinnerProps> = (args) => {
|
|
|
55
60
|
);
|
|
56
61
|
};
|
|
57
62
|
|
|
58
|
-
export const Basic =
|
|
59
|
-
|
|
60
|
-
WithLabel.args = {
|
|
61
|
-
children: 'Loading...',
|
|
63
|
+
export const Basic: Story = {
|
|
64
|
+
render: Template,
|
|
62
65
|
};
|
|
63
66
|
|
|
64
|
-
export const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
export const WithLabel: Story = {
|
|
68
|
+
render: Template,
|
|
69
|
+
|
|
70
|
+
args: {
|
|
71
|
+
children: 'Loading...',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const Centered: Story = {
|
|
76
|
+
render: Template,
|
|
77
|
+
|
|
78
|
+
args: {
|
|
79
|
+
children: 'Loading...',
|
|
80
|
+
centered: true,
|
|
81
|
+
},
|
|
68
82
|
};
|