@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,38 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IReqoreBreadcrumbItem, IReqoreBreadcrumbsProps } from '../../components/Breadcrumbs';
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
3
2
|
import { ReqoreBreadcrumbs } from '../../index';
|
|
4
3
|
import breadcrumbs, { breadcrumbsTabs } from '../../mock/breadcrumbs';
|
|
5
|
-
import {
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
6
5
|
import { SizeArg } from '../utils/args';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
const meta = {
|
|
9
8
|
title: 'Navigation/Breadcrumbs/Stories',
|
|
9
|
+
component: ReqoreBreadcrumbs,
|
|
10
10
|
argTypes: {
|
|
11
11
|
withTabs: {
|
|
12
12
|
name: 'With tabs',
|
|
13
|
-
defaultValue: false,
|
|
14
13
|
description: 'Whether tabs should be shown alongside the breadcrumbs',
|
|
15
14
|
control: 'boolean',
|
|
16
15
|
},
|
|
17
16
|
...SizeArg,
|
|
18
17
|
},
|
|
19
|
-
|
|
18
|
+
args: { items: breadcrumbs },
|
|
19
|
+
} as StoryMeta<typeof ReqoreBreadcrumbs>;
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
) => {
|
|
24
|
-
const items = args.withTabs ? [...breadcrumbs, breadcrumbsTabs] : breadcrumbs;
|
|
25
|
-
const customTheme = args.customTheme ? { main: args.customTheme } : undefined;
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
items={items as IReqoreBreadcrumbItem[]}
|
|
31
|
-
customTheme={customTheme as any}
|
|
32
|
-
/>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const Default = buildTemplate(Template);
|
|
37
|
-
export const WithTabs = buildTemplate(Template, { withTabs: true });
|
|
38
|
-
export const Flat = buildTemplate(Template, { flat: true });
|
|
24
|
+
export const Default: Story = {};
|
|
25
|
+
export const WithTabs: Story = { args: { items: [...breadcrumbs, breadcrumbsTabs] } };
|
|
26
|
+
export const Flat: Story = { args: { flat: true } };
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
import ReqoreButton from '../../components/Button';
|
|
4
|
-
import { IReqoreTheme } from '../../constants/theme';
|
|
5
4
|
import { ReqoreControlGroup } from '../../index';
|
|
5
|
+
import { StoryMeta } from '../utils';
|
|
6
6
|
import { IconArg, SizeArg } from '../utils/args';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const meta = {
|
|
9
9
|
title: 'Form/Button/Stories',
|
|
10
|
-
|
|
11
|
-
jest: ['button.test.tsx'],
|
|
12
|
-
},
|
|
10
|
+
component: ReqoreButton,
|
|
13
11
|
argTypes: {
|
|
14
12
|
...IconArg('icon', 'Icon'),
|
|
15
13
|
...IconArg('rightIcon', 'Right Icon'),
|
|
16
14
|
...SizeArg,
|
|
17
15
|
},
|
|
18
|
-
|
|
16
|
+
args: {
|
|
17
|
+
icon: '24HoursFill',
|
|
18
|
+
rightIcon: '24HoursFill',
|
|
19
|
+
},
|
|
20
|
+
} as StoryMeta<typeof ReqoreButton>;
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
|
|
25
|
+
const Template: StoryFn<typeof ReqoreButton> = (buttonProps) => {
|
|
21
26
|
return (
|
|
22
27
|
<ReqoreControlGroup vertical gapSize='big'>
|
|
23
28
|
<ReqoreControlGroup size={buttonProps.size} wrap>
|
|
@@ -246,54 +251,85 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
246
251
|
);
|
|
247
252
|
};
|
|
248
253
|
|
|
249
|
-
export const Default =
|
|
250
|
-
|
|
251
|
-
Info.args = {
|
|
252
|
-
intent: 'info',
|
|
254
|
+
export const Default: Story = {
|
|
255
|
+
render: Template,
|
|
253
256
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
|
|
258
|
+
export const Info: Story = {
|
|
259
|
+
render: Template,
|
|
260
|
+
|
|
261
|
+
args: {
|
|
262
|
+
intent: 'info',
|
|
263
|
+
},
|
|
257
264
|
};
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
|
|
266
|
+
export const Success: Story = {
|
|
267
|
+
render: Template,
|
|
268
|
+
|
|
269
|
+
args: {
|
|
270
|
+
intent: 'success',
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
export const Warning: Story = {
|
|
275
|
+
render: Template,
|
|
276
|
+
|
|
277
|
+
args: {
|
|
278
|
+
intent: 'warning',
|
|
279
|
+
},
|
|
261
280
|
};
|
|
262
|
-
|
|
263
|
-
Pending
|
|
264
|
-
|
|
281
|
+
|
|
282
|
+
export const Pending: Story = {
|
|
283
|
+
render: Template,
|
|
284
|
+
|
|
285
|
+
args: {
|
|
286
|
+
intent: 'pending',
|
|
287
|
+
},
|
|
265
288
|
};
|
|
266
|
-
|
|
267
|
-
Danger
|
|
268
|
-
|
|
289
|
+
|
|
290
|
+
export const Danger: Story = {
|
|
291
|
+
render: Template,
|
|
292
|
+
|
|
293
|
+
args: {
|
|
294
|
+
intent: 'danger',
|
|
295
|
+
},
|
|
269
296
|
};
|
|
270
|
-
|
|
271
|
-
Muted
|
|
272
|
-
|
|
297
|
+
|
|
298
|
+
export const Muted: Story = {
|
|
299
|
+
render: Template,
|
|
300
|
+
|
|
301
|
+
args: {
|
|
302
|
+
intent: 'muted',
|
|
303
|
+
},
|
|
273
304
|
};
|
|
274
|
-
|
|
275
|
-
Effect
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
305
|
+
|
|
306
|
+
export const Effect: Story = {
|
|
307
|
+
render: Template,
|
|
308
|
+
|
|
309
|
+
args: {
|
|
310
|
+
effect: {
|
|
311
|
+
gradient: {
|
|
312
|
+
direction: 'to right bottom',
|
|
313
|
+
colors: { 0: '#33023c', 100: '#0a487b' },
|
|
314
|
+
animate: 'active',
|
|
315
|
+
},
|
|
316
|
+
spaced: 2,
|
|
317
|
+
uppercase: true,
|
|
318
|
+
weight: 'thick',
|
|
319
|
+
textSize: 'small',
|
|
281
320
|
},
|
|
282
|
-
spaced: 2,
|
|
283
|
-
uppercase: true,
|
|
284
|
-
weight: 'thick',
|
|
285
|
-
textSize: 'small',
|
|
286
321
|
},
|
|
287
322
|
};
|
|
288
323
|
|
|
289
|
-
export const GlobalEffect:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
324
|
+
export const GlobalEffect: Story = {
|
|
325
|
+
render: Template,
|
|
326
|
+
|
|
327
|
+
args: {
|
|
328
|
+
otherThemeOptions: {
|
|
329
|
+
buttons: {
|
|
330
|
+
gradient: true,
|
|
331
|
+
animate: 'active',
|
|
332
|
+
},
|
|
297
333
|
},
|
|
298
334
|
},
|
|
299
|
-
}
|
|
335
|
+
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import Checkbox from '../../components/Checkbox';
|
|
3
3
|
import { ReqoreCheckbox, ReqoreControlGroup, ReqoreVerticalSpacer } from '../../index';
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const meta = {
|
|
6
7
|
title: 'Form/Checkbox/Stories',
|
|
7
|
-
|
|
8
|
-
} as
|
|
8
|
+
component: ReqoreCheckbox,
|
|
9
|
+
} as StoryMeta<typeof ReqoreCheckbox>;
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
const Template: StoryFn<typeof Checkbox> = (args) => {
|
|
11
15
|
return (
|
|
12
16
|
<ReqoreControlGroup vertical>
|
|
13
17
|
<ReqoreControlGroup wrap>
|
|
@@ -58,8 +62,14 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
|
|
|
58
62
|
);
|
|
59
63
|
};
|
|
60
64
|
|
|
61
|
-
export const Basic =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
export const Basic: Story = {
|
|
66
|
+
render: Template,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Switch: Story = {
|
|
70
|
+
render: Template,
|
|
71
|
+
|
|
72
|
+
args: {
|
|
73
|
+
asSwitch: true,
|
|
74
|
+
},
|
|
65
75
|
};
|