@qoretechnologies/reqore 0.36.0 → 0.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/__tests__/collection.test.tsx +1 -22
  2. package/__tests__/table.test.tsx +1 -1
  3. package/__tests__/tree.test.tsx +0 -18
  4. package/dist/components/Breadcrumbs/index.js +1 -1
  5. package/dist/components/Breadcrumbs/index.js.map +1 -1
  6. package/dist/components/Button/index.d.ts +1 -4
  7. package/dist/components/Button/index.d.ts.map +1 -1
  8. package/dist/components/Button/index.js +11 -26
  9. package/dist/components/Button/index.js.map +1 -1
  10. package/dist/components/Collection/index.d.ts +2 -2
  11. package/dist/components/Collection/index.d.ts.map +1 -1
  12. package/dist/components/Collection/index.js +10 -10
  13. package/dist/components/Collection/index.js.map +1 -1
  14. package/dist/components/Collection/item.d.ts +3 -3
  15. package/dist/components/Collection/item.d.ts.map +1 -1
  16. package/dist/components/Collection/item.js.map +1 -1
  17. package/dist/components/Columns/index.d.ts +1 -1
  18. package/dist/components/Columns/index.d.ts.map +1 -1
  19. package/dist/components/Comment/index.d.ts +1 -1
  20. package/dist/components/Comment/index.d.ts.map +1 -1
  21. package/dist/components/CommentFeed/index.d.ts +1 -1
  22. package/dist/components/CommentFeed/index.d.ts.map +1 -1
  23. package/dist/components/ControlGroup/index.d.ts +1 -1
  24. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  25. package/dist/components/Dropdown/index.d.ts +1 -1
  26. package/dist/components/Dropdown/index.d.ts.map +1 -1
  27. package/dist/components/Dropdown/item.d.ts +2 -2
  28. package/dist/components/Dropdown/item.d.ts.map +1 -1
  29. package/dist/components/Dropdown/list.d.ts +1 -1
  30. package/dist/components/Dropdown/list.d.ts.map +1 -1
  31. package/dist/components/Effect/index.d.ts +2 -2
  32. package/dist/components/Effect/index.d.ts.map +1 -1
  33. package/dist/components/ExportModal/index.d.ts +11 -0
  34. package/dist/components/ExportModal/index.d.ts.map +1 -0
  35. package/dist/components/ExportModal/index.js +91 -0
  36. package/dist/components/ExportModal/index.js.map +1 -0
  37. package/dist/components/Header/index.d.ts +7 -7
  38. package/dist/components/Header/index.d.ts.map +1 -1
  39. package/dist/components/InputClearButton/index.d.ts +1 -0
  40. package/dist/components/InputClearButton/index.d.ts.map +1 -1
  41. package/dist/components/InternalPopover/index.js +2 -2
  42. package/dist/components/InternalPopover/index.js.map +1 -1
  43. package/dist/components/KeyValueTable/index.d.ts +7 -4
  44. package/dist/components/KeyValueTable/index.d.ts.map +1 -1
  45. package/dist/components/KeyValueTable/index.js +32 -2
  46. package/dist/components/KeyValueTable/index.js.map +1 -1
  47. package/dist/components/Layout/content.d.ts +1 -1
  48. package/dist/components/Layout/content.d.ts.map +1 -1
  49. package/dist/components/Layout/index.d.ts +1 -1
  50. package/dist/components/Layout/index.d.ts.map +1 -1
  51. package/dist/components/Menu/item.d.ts +1 -1
  52. package/dist/components/Menu/item.d.ts.map +1 -1
  53. package/dist/components/Menu/item.js +3 -3
  54. package/dist/components/Menu/item.js.map +1 -1
  55. package/dist/components/Message/index.d.ts +1 -0
  56. package/dist/components/Message/index.d.ts.map +1 -1
  57. package/dist/components/Message/index.js.map +1 -1
  58. package/dist/components/Modal/index.d.ts +1 -1
  59. package/dist/components/Modal/index.d.ts.map +1 -1
  60. package/dist/components/MultiSelect/index.d.ts +2 -2
  61. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  62. package/dist/components/Notifications/notification.d.ts +1 -0
  63. package/dist/components/Notifications/notification.d.ts.map +1 -1
  64. package/dist/components/Notifications/notification.js +23 -16
  65. package/dist/components/Notifications/notification.js.map +1 -1
  66. package/dist/components/Paging/index.d.ts +1 -1
  67. package/dist/components/Paging/index.d.ts.map +1 -1
  68. package/dist/components/Panel/NonResponsiveActions.d.ts +1 -1
  69. package/dist/components/Panel/NonResponsiveActions.d.ts.map +1 -1
  70. package/dist/components/Panel/index.js +1 -1
  71. package/dist/components/Panel/index.js.map +1 -1
  72. package/dist/components/Panel/panel.screenshot.d.ts +1 -1
  73. package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
  74. package/dist/components/Paragraph/index.d.ts +1 -1
  75. package/dist/components/Paragraph/index.d.ts.map +1 -1
  76. package/dist/components/Popover/index.d.ts +1 -1
  77. package/dist/components/Popover/index.d.ts.map +1 -1
  78. package/dist/components/Popover/index.js +2 -0
  79. package/dist/components/Popover/index.js.map +1 -1
  80. package/dist/components/RadioGroup/index.d.ts +1 -1
  81. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  82. package/dist/components/Sidebar/item.d.ts +1 -1
  83. package/dist/components/Sidebar/item.d.ts.map +1 -1
  84. package/dist/components/Spacer/index.d.ts +3 -3
  85. package/dist/components/Spacer/index.d.ts.map +1 -1
  86. package/dist/components/Spinner/index.d.ts +1 -1
  87. package/dist/components/Spinner/index.d.ts.map +1 -1
  88. package/dist/components/Table/body.d.ts +1 -1
  89. package/dist/components/Table/body.d.ts.map +1 -1
  90. package/dist/components/Table/body.js +26 -21
  91. package/dist/components/Table/body.js.map +1 -1
  92. package/dist/components/Table/cell.d.ts +3 -2
  93. package/dist/components/Table/cell.d.ts.map +1 -1
  94. package/dist/components/Table/cell.js +8 -4
  95. package/dist/components/Table/cell.js.map +1 -1
  96. package/dist/components/Table/headerCell.d.ts +1 -1
  97. package/dist/components/Table/headerCell.d.ts.map +1 -1
  98. package/dist/components/Table/helpers.d.ts +8 -6
  99. package/dist/components/Table/helpers.d.ts.map +1 -1
  100. package/dist/components/Table/helpers.js +49 -16
  101. package/dist/components/Table/helpers.js.map +1 -1
  102. package/dist/components/Table/index.d.ts +5 -4
  103. package/dist/components/Table/index.d.ts.map +1 -1
  104. package/dist/components/Table/index.js +47 -38
  105. package/dist/components/Table/index.js.map +1 -1
  106. package/dist/components/Table/row.d.ts +7 -5
  107. package/dist/components/Table/row.d.ts.map +1 -1
  108. package/dist/components/Table/row.js +38 -36
  109. package/dist/components/Table/row.js.map +1 -1
  110. package/dist/components/Table/value.d.ts +1 -1
  111. package/dist/components/Table/value.d.ts.map +1 -1
  112. package/dist/components/Tabs/content.d.ts +1 -1
  113. package/dist/components/Tabs/content.d.ts.map +1 -1
  114. package/dist/components/Tabs/index.d.ts +1 -1
  115. package/dist/components/Tabs/index.d.ts.map +1 -1
  116. package/dist/components/Tabs/list.d.ts +1 -1
  117. package/dist/components/Tabs/list.d.ts.map +1 -1
  118. package/dist/components/Tabs/list.js +1 -1
  119. package/dist/components/Tabs/list.js.map +1 -1
  120. package/dist/components/Tag/group.d.ts +1 -1
  121. package/dist/components/Tag/group.d.ts.map +1 -1
  122. package/dist/components/Tree/index.d.ts +2 -1
  123. package/dist/components/Tree/index.d.ts.map +1 -1
  124. package/dist/components/Tree/index.js +35 -31
  125. package/dist/components/Tree/index.js.map +1 -1
  126. package/dist/constants/sizes.js +5 -5
  127. package/dist/containers/Paging.d.ts +1 -1
  128. package/dist/containers/Paging.d.ts.map +1 -1
  129. package/dist/containers/ThemeProvider.d.ts +1 -1
  130. package/dist/containers/ThemeProvider.d.ts.map +1 -1
  131. package/dist/helpers/utils.d.ts +2 -1
  132. package/dist/helpers/utils.d.ts.map +1 -1
  133. package/dist/helpers/utils.js +20 -2
  134. package/dist/helpers/utils.js.map +1 -1
  135. package/dist/hooks/useAutoFocus.d.ts +1 -1
  136. package/dist/hooks/useAutoFocus.d.ts.map +1 -1
  137. package/dist/hooks/usePopover.d.ts +1 -0
  138. package/dist/hooks/usePopover.d.ts.map +1 -1
  139. package/dist/index.d.ts +1 -1
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.js.map +1 -1
  142. package/dist/styles.d.ts +3 -0
  143. package/dist/styles.d.ts.map +1 -1
  144. package/dist/styles.js +49 -11
  145. package/dist/styles.js.map +1 -1
  146. package/migration-storybook.log +88 -0
  147. package/package.json +26 -20
  148. package/src/components/Breadcrumbs/index.tsx +1 -1
  149. package/src/components/Button/index.tsx +3 -54
  150. package/src/components/Collection/index.tsx +18 -15
  151. package/src/components/Collection/item.tsx +2 -1
  152. package/src/components/ExportModal/index.tsx +98 -0
  153. package/src/components/InternalPopover/index.tsx +2 -2
  154. package/src/components/KeyValueTable/index.tsx +59 -11
  155. package/src/components/Menu/item.tsx +4 -4
  156. package/src/components/Message/index.tsx +1 -0
  157. package/src/components/Notifications/notification.tsx +14 -3
  158. package/src/components/Panel/index.tsx +2 -2
  159. package/src/components/Popover/index.tsx +3 -0
  160. package/src/components/Table/body.tsx +26 -20
  161. package/src/components/Table/cell.tsx +15 -4
  162. package/src/components/Table/helpers.ts +52 -21
  163. package/src/components/Table/index.tsx +119 -75
  164. package/src/components/Table/row.tsx +47 -46
  165. package/src/components/Tabs/list.tsx +1 -1
  166. package/src/components/Tree/index.tsx +82 -75
  167. package/src/constants/sizes.ts +5 -5
  168. package/src/helpers/utils.ts +10 -2
  169. package/src/hooks/useAutoFocus.ts +1 -1
  170. package/src/index.tsx +1 -1
  171. package/src/mock/tableData.ts +12 -0
  172. package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +11 -23
  173. package/src/stories/Button/Button.stories.tsx +83 -47
  174. package/src/stories/Checkbox/Checkbox.stories.tsx +19 -9
  175. package/src/stories/Collection/Collection.stories.tsx +195 -171
  176. package/src/stories/Columns/Columns.stories.tsx +38 -24
  177. package/src/stories/Comment/Comment.stories.tsx +15 -6
  178. package/src/stories/ControlGroup/ControlGroup.stories.tsx +102 -48
  179. package/src/stories/Drawer/Drawer.stories.tsx +52 -17
  180. package/src/stories/Dropdown/Dropdown.stories.tsx +184 -152
  181. package/src/stories/ExportModal/ExportModal.stories.tsx +18 -0
  182. package/src/stories/Header/Header.stories.tsx +65 -31
  183. package/src/stories/Icon/Icon.stories.tsx +139 -133
  184. package/src/stories/Input/Input.stories.tsx +68 -31
  185. package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +183 -117
  186. package/src/stories/Menu/Menu.stories.tsx +56 -20
  187. package/src/stories/Message/Message.stories.tsx +96 -37
  188. package/src/stories/Modal/Modal.stories.tsx +28 -8
  189. package/src/stories/MultiSelect/MultiSelect.stories.tsx +66 -35
  190. package/src/stories/Navbar/Navbar.stories.tsx +15 -5
  191. package/src/stories/Notifications/Interactive.stories.tsx +40 -28
  192. package/src/stories/Notifications/Notification.stories.tsx +55 -41
  193. package/src/stories/Notifications/Notifications.stories.tsx +45 -29
  194. package/src/stories/Paging/Paging.stories.tsx +206 -177
  195. package/src/stories/Panel/Panel.stories.tsx +238 -168
  196. package/src/stories/Paragraph/Paragraph.stories.tsx +66 -31
  197. package/src/stories/Popover/Popover.stories.tsx +62 -40
  198. package/src/stories/RadioGroup/RadioGroup.stories.tsx +41 -19
  199. package/src/stories/Sidebar/Sidebar.stories.tsx +29 -10
  200. package/src/stories/Spacer/Spacer.stories.tsx +13 -5
  201. package/src/stories/Spinner/Spinner.stories.tsx +26 -12
  202. package/src/stories/Table/Table.stories.tsx +200 -144
  203. package/src/stories/Table/Tests.stories.tsx +9 -0
  204. package/src/stories/Tabs/Tabs.stories.tsx +82 -46
  205. package/src/stories/Tag/Tag.stories.tsx +56 -37
  206. package/src/stories/Tag/TagGroup.stories.tsx +297 -0
  207. package/src/stories/TextArea/TextArea.stories.tsx +82 -40
  208. package/src/stories/Tree/Tree.stories.tsx +84 -22
  209. package/src/stories/utils.ts +22 -1
  210. package/src/styles.ts +55 -2
  211. package/tests.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
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
- export default {
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 Meta<IReqorePanelProps>;
85
+ } as StoryMeta<typeof ReqorePanel>;
86
+
87
+ export default meta;
88
+ type Story = StoryObj<typeof meta>;
75
89
 
76
- const Template: Story<IReqorePanelProps> = (args: IReqorePanelProps) => {
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 = Template.bind({});
289
- export const NoPadding = Template.bind({});
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
- export const NoBars: Story<IReqorePanelProps> = Template.bind({});
298
- NoBars.args = {
299
- label: undefined,
300
- badge: undefined,
301
- icon: undefined,
302
- actions: [
303
- { label: 'test', show: false },
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 Transparent: Story<IReqorePanelProps> = Template.bind({});
327
- Transparent.args = {
328
- transparent: true,
314
+ export const Flat: Story = {
315
+ render: Template,
316
+
317
+ args: {
318
+ flat: true,
319
+ },
329
320
  };
330
321
 
331
- export const Intent: Story<IReqorePanelProps> = Template.bind({});
332
- Intent.args = {
333
- intent: 'success',
334
- iconColor: 'success:lighten:2',
335
- transparent: true,
336
- flat: true,
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 Minimal: Story<IReqorePanelProps> = Template.bind({});
340
- Minimal.args = {
341
- minimal: true,
342
- flat: true,
354
+ export const Transparent: Story = {
355
+ render: Template,
356
+
357
+ args: {
358
+ transparent: true,
359
+ },
343
360
  };
344
361
 
345
- export const Disabled: Story<IReqorePanelProps> = Template.bind({});
346
- Disabled.args = {
347
- disabled: true,
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 NonResponsiveActions: Story<IReqorePanelProps> = Template.bind({});
351
- NonResponsiveActions.args = {
352
- responsiveActions: false,
353
- label:
354
- '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',
355
- badge: undefined,
356
- actions: [
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 ActionsShownOnHover: Story<IReqorePanelProps> = Template.bind({});
383
- ActionsShownOnHover.args = {
384
- label: undefined,
385
- collapsible: false,
386
- icon: undefined,
387
- badge: undefined,
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 TransparentFlat: Story<IReqorePanelProps> = Template.bind({});
403
- TransparentFlat.args = {
404
- transparent: true,
405
- flat: true,
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 Fluid: Story<IReqorePanelProps> = Template.bind({});
409
- Fluid.args = {
410
- fluid: true,
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 Size: Story<IReqorePanelProps> = Template.bind({});
414
- Size.args = {
415
- size: 'small',
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 NoActions: Story<IReqorePanelProps> = Template.bind({});
419
- NoActions.args = {
420
- collapsible: false,
421
- actions: [],
422
- label:
423
- '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',
457
+ export const Fluid: Story = {
458
+ render: Template,
459
+
460
+ args: {
461
+ fluid: true,
462
+ },
424
463
  };
425
464
 
426
- export const NoLabel: Story<IReqorePanelProps> = Template.bind({});
427
- NoLabel.args = {
428
- collapsible: false,
429
- actions: [
430
- {
431
- responsive: false,
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 ImageAsIconLinkAsHeader: Story<IReqorePanelProps> = Template.bind({});
444
- ImageAsIconLinkAsHeader.args = {
445
- iconImage:
446
- 'https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4',
447
- iconProps: {
448
- size: '30px',
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 ContentSize: Story<IReqorePanelProps> = Template.bind({});
458
- ContentSize.args = {
459
- contentSize: 'big',
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 WithEffect: Story<IReqorePanelProps> = Template.bind({});
463
- WithEffect.args = {
464
- iconColor: 'info:lighten:2',
465
- minimal: true,
466
- contentEffect: {
467
- gradient: {
468
- type: 'radial',
469
- shape: 'ellipse',
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
- headerEffect: {
476
- gradient: {
477
- type: 'linear',
478
- colors: { 0: '#3b065e', 100: '#00d3c8' },
479
- direction: 'to right bottom',
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
- uppercase: true,
482
- weight: 'normal',
483
- spaced: 2,
554
+ headerSize: 2,
484
555
  },
485
- headerSize: 2,
486
556
  };
@@ -1,16 +1,21 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
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
- export default {
7
+ const meta = {
7
8
  title: 'Other/Paragraph/Stories',
9
+ component: ReqoreParagraph,
8
10
  argTypes: {
9
11
  ...IntentArg,
10
12
  },
11
- } as Meta;
13
+ } as StoryMeta<typeof ReqoreParagraph>;
12
14
 
13
- const Template: Story<IReqoreParagraphProps> = (args) => {
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 = Template.bind({});
40
- export const Success = Template.bind({});
41
- Success.args = {
42
- intent: 'success',
44
+ export const Basic: Story = {
45
+ render: Template,
43
46
  };
44
- export const Danger = Template.bind({});
45
- Danger.args = {
46
- intent: 'danger',
47
+
48
+ export const Success: Story = {
49
+ render: Template,
50
+
51
+ args: {
52
+ intent: 'success',
53
+ },
47
54
  };
48
- export const Warning = Template.bind({});
49
- Warning.args = {
50
- intent: 'warning',
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
- export const Info = Template.bind({});
53
- Info.args = {
54
- intent: 'info',
71
+
72
+ export const Info: Story = {
73
+ render: Template,
74
+
75
+ args: {
76
+ intent: 'info',
77
+ },
55
78
  };
56
- export const Pending = Template.bind({});
57
- Pending.args = {
58
- intent: 'pending',
79
+
80
+ export const Pending: Story = {
81
+ render: Template,
82
+
83
+ args: {
84
+ intent: 'pending',
85
+ },
59
86
  };
60
- export const Muted = Template.bind({});
61
- Muted.args = {
62
- intent: 'muted',
87
+
88
+ export const Muted: Story = {
89
+ render: Template,
90
+
91
+ args: {
92
+ intent: 'muted',
93
+ },
63
94
  };
64
- export const Effect = Template.bind({});
65
- Effect.args = {
66
- effect: {
67
- gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
68
- spaced: 4,
69
- weight: 'bold',
70
- uppercase: true,
71
- textSize: '40px',
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
  };