@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 { noop } from 'lodash';
|
|
3
3
|
import ReqoreControlGroup from '../../components/ControlGroup';
|
|
4
4
|
import ReqoreInput, { IReqoreInputProps } from '../../components/Input';
|
|
@@ -6,17 +6,28 @@ import { IReqorePanelAction, IReqorePanelProps, ReqorePanel } from '../../compon
|
|
|
6
6
|
import { ReqoreVerticalSpacer } from '../../components/Spacer';
|
|
7
7
|
import ReqoreTag from '../../components/Tag';
|
|
8
8
|
import { IReqoreIconName } from '../../types/icons';
|
|
9
|
+
import { StoryMeta } from '../utils';
|
|
9
10
|
import { FlatArg, IconArg, IntentArg, SizeArg, argManager } from '../utils/args';
|
|
10
11
|
|
|
11
12
|
const { createArg } = argManager<IReqorePanelProps>();
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
const meta = {
|
|
14
15
|
title: 'Layout/Panel/Stories',
|
|
16
|
+
component: ReqorePanel,
|
|
15
17
|
parameters: {
|
|
16
18
|
chromatic: {
|
|
17
19
|
viewports: [450, 600, 1440],
|
|
18
20
|
},
|
|
19
21
|
},
|
|
22
|
+
args: {
|
|
23
|
+
padded: true,
|
|
24
|
+
rounded: true,
|
|
25
|
+
collapsible: true,
|
|
26
|
+
minimal: false,
|
|
27
|
+
label: 'Reqore panel component',
|
|
28
|
+
onClick: noop,
|
|
29
|
+
icon: '24HoursFill',
|
|
30
|
+
},
|
|
20
31
|
argTypes: {
|
|
21
32
|
...IntentArg,
|
|
22
33
|
...FlatArg,
|
|
@@ -71,9 +82,12 @@ export default {
|
|
|
71
82
|
}),
|
|
72
83
|
...IconArg(),
|
|
73
84
|
},
|
|
74
|
-
} as
|
|
85
|
+
} as StoryMeta<typeof ReqorePanel>;
|
|
86
|
+
|
|
87
|
+
export default meta;
|
|
88
|
+
type Story = StoryObj<typeof meta>;
|
|
75
89
|
|
|
76
|
-
const Template:
|
|
90
|
+
const Template: StoryFn<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
77
91
|
if (args.fluid) {
|
|
78
92
|
const actions: IReqorePanelAction[] = [
|
|
79
93
|
{
|
|
@@ -285,202 +299,258 @@ const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
285
299
|
);
|
|
286
300
|
};
|
|
287
301
|
|
|
288
|
-
export const Basic =
|
|
289
|
-
|
|
290
|
-
NoPadding.args = {
|
|
291
|
-
padded: false,
|
|
292
|
-
};
|
|
293
|
-
export const Flat = Template.bind({});
|
|
294
|
-
Flat.args = {
|
|
295
|
-
flat: true,
|
|
302
|
+
export const Basic: Story = {
|
|
303
|
+
render: Template,
|
|
296
304
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
show: false,
|
|
306
|
-
group: [
|
|
307
|
-
{ label: 'test 2', show: true },
|
|
308
|
-
{ label: 'test 3', show: true },
|
|
309
|
-
],
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
bottomActions: [
|
|
313
|
-
{ label: 'test', show: false, position: 'left' },
|
|
314
|
-
{
|
|
315
|
-
position: 'right',
|
|
316
|
-
show: false,
|
|
317
|
-
group: [
|
|
318
|
-
{ label: 'test 2', show: true },
|
|
319
|
-
{ label: 'test 3', show: true },
|
|
320
|
-
],
|
|
321
|
-
},
|
|
322
|
-
],
|
|
323
|
-
collapsible: false,
|
|
305
|
+
|
|
306
|
+
export const NoPadding: Story = {
|
|
307
|
+
render: Template,
|
|
308
|
+
|
|
309
|
+
args: {
|
|
310
|
+
padded: false,
|
|
311
|
+
},
|
|
324
312
|
};
|
|
325
313
|
|
|
326
|
-
export const
|
|
327
|
-
|
|
328
|
-
|
|
314
|
+
export const Flat: Story = {
|
|
315
|
+
render: Template,
|
|
316
|
+
|
|
317
|
+
args: {
|
|
318
|
+
flat: true,
|
|
319
|
+
},
|
|
329
320
|
};
|
|
330
321
|
|
|
331
|
-
export const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
322
|
+
export const NoBars: Story = {
|
|
323
|
+
render: Template,
|
|
324
|
+
|
|
325
|
+
args: {
|
|
326
|
+
label: undefined,
|
|
327
|
+
badge: undefined,
|
|
328
|
+
icon: undefined,
|
|
329
|
+
actions: [
|
|
330
|
+
{ label: 'test', show: false },
|
|
331
|
+
{
|
|
332
|
+
show: false,
|
|
333
|
+
group: [
|
|
334
|
+
{ label: 'test 2', show: true },
|
|
335
|
+
{ label: 'test 3', show: true },
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
bottomActions: [
|
|
340
|
+
{ label: 'test', show: false, position: 'left' },
|
|
341
|
+
{
|
|
342
|
+
position: 'right',
|
|
343
|
+
show: false,
|
|
344
|
+
group: [
|
|
345
|
+
{ label: 'test 2', show: true },
|
|
346
|
+
{ label: 'test 3', show: true },
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
collapsible: false,
|
|
351
|
+
},
|
|
337
352
|
};
|
|
338
353
|
|
|
339
|
-
export const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
354
|
+
export const Transparent: Story = {
|
|
355
|
+
render: Template,
|
|
356
|
+
|
|
357
|
+
args: {
|
|
358
|
+
transparent: true,
|
|
359
|
+
},
|
|
343
360
|
};
|
|
344
361
|
|
|
345
|
-
export const
|
|
346
|
-
|
|
347
|
-
|
|
362
|
+
export const Intent: Story = {
|
|
363
|
+
render: Template,
|
|
364
|
+
|
|
365
|
+
args: {
|
|
366
|
+
intent: 'success',
|
|
367
|
+
iconColor: 'success:lighten:2',
|
|
368
|
+
transparent: true,
|
|
369
|
+
flat: true,
|
|
370
|
+
},
|
|
348
371
|
};
|
|
349
372
|
|
|
350
|
-
export const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
{
|
|
358
|
-
fluid: false,
|
|
359
|
-
responsive: false,
|
|
360
|
-
group: [
|
|
361
|
-
{
|
|
362
|
-
label: 'Non responsive',
|
|
363
|
-
icon: '24HoursFill',
|
|
364
|
-
customTheme: { main: '#eb0e8c' },
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
icon: 'FullscreenExitLine',
|
|
368
|
-
customTheme: { main: '#a40a62' },
|
|
369
|
-
},
|
|
370
|
-
],
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
fluid: false,
|
|
374
|
-
group: [
|
|
375
|
-
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
376
|
-
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
377
|
-
],
|
|
378
|
-
},
|
|
379
|
-
],
|
|
373
|
+
export const Minimal: Story = {
|
|
374
|
+
render: Template,
|
|
375
|
+
|
|
376
|
+
args: {
|
|
377
|
+
minimal: true,
|
|
378
|
+
flat: true,
|
|
379
|
+
},
|
|
380
380
|
};
|
|
381
381
|
|
|
382
|
-
export const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
actions: [{ label: 'test', show: 'hover' }],
|
|
389
|
-
bottomActions: [
|
|
390
|
-
{
|
|
391
|
-
position: 'right',
|
|
392
|
-
show: 'hover',
|
|
393
|
-
fluid: false,
|
|
394
|
-
group: [
|
|
395
|
-
{ label: 'test 2', show: true },
|
|
396
|
-
{ label: 'test 3', show: true },
|
|
397
|
-
],
|
|
398
|
-
},
|
|
399
|
-
],
|
|
382
|
+
export const Disabled: Story = {
|
|
383
|
+
render: Template,
|
|
384
|
+
|
|
385
|
+
args: {
|
|
386
|
+
disabled: true,
|
|
387
|
+
},
|
|
400
388
|
};
|
|
401
389
|
|
|
402
|
-
export const
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
390
|
+
export const NonResponsiveActions: Story = {
|
|
391
|
+
render: Template,
|
|
392
|
+
|
|
393
|
+
args: {
|
|
394
|
+
responsiveActions: false,
|
|
395
|
+
label:
|
|
396
|
+
'This is a really long title that should stretch all the way to the right of the panel, all the way to the end and not end in the middle',
|
|
397
|
+
badge: undefined,
|
|
398
|
+
actions: [
|
|
399
|
+
{
|
|
400
|
+
fluid: false,
|
|
401
|
+
responsive: false,
|
|
402
|
+
group: [
|
|
403
|
+
{
|
|
404
|
+
label: 'Non responsive',
|
|
405
|
+
icon: '24HoursFill',
|
|
406
|
+
customTheme: { main: '#eb0e8c' },
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
icon: 'FullscreenExitLine',
|
|
410
|
+
customTheme: { main: '#a40a62' },
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
fluid: false,
|
|
416
|
+
group: [
|
|
417
|
+
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
418
|
+
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
},
|
|
406
423
|
};
|
|
407
424
|
|
|
408
|
-
export const
|
|
409
|
-
|
|
410
|
-
|
|
425
|
+
export const ActionsShownOnHover: Story = {
|
|
426
|
+
render: Template,
|
|
427
|
+
|
|
428
|
+
args: {
|
|
429
|
+
label: undefined,
|
|
430
|
+
collapsible: false,
|
|
431
|
+
icon: undefined,
|
|
432
|
+
badge: undefined,
|
|
433
|
+
actions: [{ label: 'test', show: 'hover' }],
|
|
434
|
+
bottomActions: [
|
|
435
|
+
{
|
|
436
|
+
position: 'right',
|
|
437
|
+
show: 'hover',
|
|
438
|
+
fluid: false,
|
|
439
|
+
group: [
|
|
440
|
+
{ label: 'test 2', show: true },
|
|
441
|
+
{ label: 'test 3', show: true },
|
|
442
|
+
],
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
411
446
|
};
|
|
412
447
|
|
|
413
|
-
export const
|
|
414
|
-
|
|
415
|
-
|
|
448
|
+
export const TransparentFlat: Story = {
|
|
449
|
+
render: Template,
|
|
450
|
+
|
|
451
|
+
args: {
|
|
452
|
+
transparent: true,
|
|
453
|
+
flat: true,
|
|
454
|
+
},
|
|
416
455
|
};
|
|
417
456
|
|
|
418
|
-
export const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
457
|
+
export const Fluid: Story = {
|
|
458
|
+
render: Template,
|
|
459
|
+
|
|
460
|
+
args: {
|
|
461
|
+
fluid: true,
|
|
462
|
+
},
|
|
424
463
|
};
|
|
425
464
|
|
|
426
|
-
export const
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
group: [
|
|
433
|
-
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
434
|
-
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
435
|
-
],
|
|
436
|
-
},
|
|
437
|
-
],
|
|
438
|
-
label: undefined,
|
|
439
|
-
icon: undefined,
|
|
440
|
-
badge: undefined,
|
|
465
|
+
export const Size: Story = {
|
|
466
|
+
render: Template,
|
|
467
|
+
|
|
468
|
+
args: {
|
|
469
|
+
size: 'small',
|
|
470
|
+
},
|
|
441
471
|
};
|
|
442
472
|
|
|
443
|
-
export const
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
473
|
+
export const NoActions: Story = {
|
|
474
|
+
render: Template,
|
|
475
|
+
|
|
476
|
+
args: {
|
|
477
|
+
collapsible: false,
|
|
478
|
+
actions: [],
|
|
479
|
+
label:
|
|
480
|
+
'This is a really long title that should stretch all the way to the right of the panel, all the way to the end and not end in the middle',
|
|
449
481
|
},
|
|
450
|
-
headerProps: {
|
|
451
|
-
as: 'a',
|
|
452
|
-
href: 'https://qoretechnologies.com',
|
|
453
|
-
target: '_blank',
|
|
454
|
-
} as React.HTMLAttributes<HTMLAnchorElement>,
|
|
455
482
|
};
|
|
456
483
|
|
|
457
|
-
export const
|
|
458
|
-
|
|
459
|
-
|
|
484
|
+
export const NoLabel: Story = {
|
|
485
|
+
render: Template,
|
|
486
|
+
|
|
487
|
+
args: {
|
|
488
|
+
collapsible: false,
|
|
489
|
+
actions: [
|
|
490
|
+
{
|
|
491
|
+
responsive: false,
|
|
492
|
+
group: [
|
|
493
|
+
{ label: 'Stacked Action 1', icon: 'BallPenLine', intent: 'warning' },
|
|
494
|
+
{ icon: 'CopperCoinFill', intent: 'danger' },
|
|
495
|
+
],
|
|
496
|
+
},
|
|
497
|
+
],
|
|
498
|
+
label: undefined,
|
|
499
|
+
icon: undefined,
|
|
500
|
+
badge: undefined,
|
|
501
|
+
},
|
|
460
502
|
};
|
|
461
503
|
|
|
462
|
-
export const
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
direction: 'at bottom center',
|
|
471
|
-
colors: { 0: '#670079', 100: '#180222' },
|
|
472
|
-
animate: 'hover',
|
|
504
|
+
export const ImageAsIconLinkAsHeader: Story = {
|
|
505
|
+
render: Template,
|
|
506
|
+
|
|
507
|
+
args: {
|
|
508
|
+
iconImage:
|
|
509
|
+
'https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4',
|
|
510
|
+
iconProps: {
|
|
511
|
+
size: '30px',
|
|
473
512
|
},
|
|
513
|
+
headerProps: {
|
|
514
|
+
as: 'a',
|
|
515
|
+
href: 'https://qoretechnologies.com',
|
|
516
|
+
target: '_blank',
|
|
517
|
+
} as React.HTMLAttributes<HTMLAnchorElement>,
|
|
474
518
|
},
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export const ContentSize: Story = {
|
|
522
|
+
render: Template,
|
|
523
|
+
|
|
524
|
+
args: {
|
|
525
|
+
contentSize: 'big',
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
export const WithEffect: Story = {
|
|
530
|
+
render: Template,
|
|
531
|
+
|
|
532
|
+
args: {
|
|
533
|
+
iconColor: 'info:lighten:2',
|
|
534
|
+
minimal: true,
|
|
535
|
+
contentEffect: {
|
|
536
|
+
gradient: {
|
|
537
|
+
type: 'radial',
|
|
538
|
+
shape: 'ellipse',
|
|
539
|
+
direction: 'at bottom center',
|
|
540
|
+
colors: { 0: '#670079', 100: '#180222' },
|
|
541
|
+
animate: 'hover',
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
headerEffect: {
|
|
545
|
+
gradient: {
|
|
546
|
+
type: 'linear',
|
|
547
|
+
colors: { 0: '#3b065e', 100: '#00d3c8' },
|
|
548
|
+
direction: 'to right bottom',
|
|
549
|
+
},
|
|
550
|
+
uppercase: true,
|
|
551
|
+
weight: 'normal',
|
|
552
|
+
spaced: 2,
|
|
480
553
|
},
|
|
481
|
-
|
|
482
|
-
weight: 'normal',
|
|
483
|
-
spaced: 2,
|
|
554
|
+
headerSize: 2,
|
|
484
555
|
},
|
|
485
|
-
headerSize: 2,
|
|
486
556
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn, StoryObj } from '@storybook/react';
|
|
2
2
|
import { IReqoreParagraphProps } from '../../components/Paragraph';
|
|
3
3
|
import { ReqoreParagraph, ReqoreVerticalSpacer } from '../../index';
|
|
4
|
+
import { StoryMeta } from '../utils';
|
|
4
5
|
import { IntentArg } from '../utils/args';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const meta = {
|
|
7
8
|
title: 'Other/Paragraph/Stories',
|
|
9
|
+
component: ReqoreParagraph,
|
|
8
10
|
argTypes: {
|
|
9
11
|
...IntentArg,
|
|
10
12
|
},
|
|
11
|
-
} as
|
|
13
|
+
} as StoryMeta<typeof ReqoreParagraph>;
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
const Template: StoryFn<IReqoreParagraphProps> = (args) => {
|
|
14
19
|
return (
|
|
15
20
|
<>
|
|
16
21
|
<ReqoreParagraph size='tiny' {...args}>
|
|
@@ -36,38 +41,68 @@ const Template: Story<IReqoreParagraphProps> = (args) => {
|
|
|
36
41
|
);
|
|
37
42
|
};
|
|
38
43
|
|
|
39
|
-
export const Basic =
|
|
40
|
-
|
|
41
|
-
Success.args = {
|
|
42
|
-
intent: 'success',
|
|
44
|
+
export const Basic: Story = {
|
|
45
|
+
render: Template,
|
|
43
46
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
|
|
48
|
+
export const Success: Story = {
|
|
49
|
+
render: Template,
|
|
50
|
+
|
|
51
|
+
args: {
|
|
52
|
+
intent: 'success',
|
|
53
|
+
},
|
|
47
54
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
|
|
56
|
+
export const Danger: Story = {
|
|
57
|
+
render: Template,
|
|
58
|
+
|
|
59
|
+
args: {
|
|
60
|
+
intent: 'danger',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const Warning: Story = {
|
|
65
|
+
render: Template,
|
|
66
|
+
|
|
67
|
+
args: {
|
|
68
|
+
intent: 'warning',
|
|
69
|
+
},
|
|
51
70
|
};
|
|
52
|
-
|
|
53
|
-
Info
|
|
54
|
-
|
|
71
|
+
|
|
72
|
+
export const Info: Story = {
|
|
73
|
+
render: Template,
|
|
74
|
+
|
|
75
|
+
args: {
|
|
76
|
+
intent: 'info',
|
|
77
|
+
},
|
|
55
78
|
};
|
|
56
|
-
|
|
57
|
-
Pending
|
|
58
|
-
|
|
79
|
+
|
|
80
|
+
export const Pending: Story = {
|
|
81
|
+
render: Template,
|
|
82
|
+
|
|
83
|
+
args: {
|
|
84
|
+
intent: 'pending',
|
|
85
|
+
},
|
|
59
86
|
};
|
|
60
|
-
|
|
61
|
-
Muted
|
|
62
|
-
|
|
87
|
+
|
|
88
|
+
export const Muted: Story = {
|
|
89
|
+
render: Template,
|
|
90
|
+
|
|
91
|
+
args: {
|
|
92
|
+
intent: 'muted',
|
|
93
|
+
},
|
|
63
94
|
};
|
|
64
|
-
|
|
65
|
-
Effect
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
95
|
+
|
|
96
|
+
export const Effect: Story = {
|
|
97
|
+
render: Template,
|
|
98
|
+
|
|
99
|
+
args: {
|
|
100
|
+
effect: {
|
|
101
|
+
gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
|
|
102
|
+
spaced: 4,
|
|
103
|
+
weight: 'bold',
|
|
104
|
+
uppercase: true,
|
|
105
|
+
textSize: '40px',
|
|
106
|
+
},
|
|
72
107
|
},
|
|
73
108
|
};
|