@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.
Files changed (193) 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/KeyValueTable/index.d.ts +4 -4
  42. package/dist/components/KeyValueTable/index.d.ts.map +1 -1
  43. package/dist/components/KeyValueTable/index.js.map +1 -1
  44. package/dist/components/Layout/content.d.ts +1 -1
  45. package/dist/components/Layout/content.d.ts.map +1 -1
  46. package/dist/components/Layout/index.d.ts +1 -1
  47. package/dist/components/Layout/index.d.ts.map +1 -1
  48. package/dist/components/Menu/item.d.ts +1 -1
  49. package/dist/components/Menu/item.d.ts.map +1 -1
  50. package/dist/components/Menu/item.js +3 -3
  51. package/dist/components/Menu/item.js.map +1 -1
  52. package/dist/components/Modal/index.d.ts +1 -1
  53. package/dist/components/Modal/index.d.ts.map +1 -1
  54. package/dist/components/MultiSelect/index.d.ts +2 -2
  55. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  56. package/dist/components/Notifications/notification.js +3 -3
  57. package/dist/components/Notifications/notification.js.map +1 -1
  58. package/dist/components/Paging/index.d.ts +1 -1
  59. package/dist/components/Paging/index.d.ts.map +1 -1
  60. package/dist/components/Panel/NonResponsiveActions.d.ts +1 -1
  61. package/dist/components/Panel/NonResponsiveActions.d.ts.map +1 -1
  62. package/dist/components/Panel/index.js +1 -1
  63. package/dist/components/Panel/index.js.map +1 -1
  64. package/dist/components/Panel/panel.screenshot.d.ts +1 -1
  65. package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
  66. package/dist/components/Paragraph/index.d.ts +1 -1
  67. package/dist/components/Paragraph/index.d.ts.map +1 -1
  68. package/dist/components/Popover/index.d.ts +1 -1
  69. package/dist/components/Popover/index.d.ts.map +1 -1
  70. package/dist/components/RadioGroup/index.d.ts +1 -1
  71. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  72. package/dist/components/Sidebar/item.d.ts +1 -1
  73. package/dist/components/Sidebar/item.d.ts.map +1 -1
  74. package/dist/components/Spacer/index.d.ts +3 -3
  75. package/dist/components/Spacer/index.d.ts.map +1 -1
  76. package/dist/components/Spinner/index.d.ts +1 -1
  77. package/dist/components/Spinner/index.d.ts.map +1 -1
  78. package/dist/components/Table/body.d.ts +1 -1
  79. package/dist/components/Table/body.d.ts.map +1 -1
  80. package/dist/components/Table/body.js +4 -2
  81. package/dist/components/Table/body.js.map +1 -1
  82. package/dist/components/Table/cell.d.ts +1 -1
  83. package/dist/components/Table/cell.d.ts.map +1 -1
  84. package/dist/components/Table/headerCell.d.ts +1 -1
  85. package/dist/components/Table/headerCell.d.ts.map +1 -1
  86. package/dist/components/Table/helpers.d.ts +8 -6
  87. package/dist/components/Table/helpers.d.ts.map +1 -1
  88. package/dist/components/Table/helpers.js +49 -16
  89. package/dist/components/Table/helpers.js.map +1 -1
  90. package/dist/components/Table/index.d.ts +5 -4
  91. package/dist/components/Table/index.d.ts.map +1 -1
  92. package/dist/components/Table/index.js +45 -38
  93. package/dist/components/Table/index.js.map +1 -1
  94. package/dist/components/Table/row.d.ts +7 -5
  95. package/dist/components/Table/row.d.ts.map +1 -1
  96. package/dist/components/Table/row.js +3 -2
  97. package/dist/components/Table/row.js.map +1 -1
  98. package/dist/components/Table/value.d.ts +1 -1
  99. package/dist/components/Table/value.d.ts.map +1 -1
  100. package/dist/components/Tabs/content.d.ts +1 -1
  101. package/dist/components/Tabs/content.d.ts.map +1 -1
  102. package/dist/components/Tabs/index.d.ts +1 -1
  103. package/dist/components/Tabs/index.d.ts.map +1 -1
  104. package/dist/components/Tabs/list.d.ts +1 -1
  105. package/dist/components/Tabs/list.d.ts.map +1 -1
  106. package/dist/components/Tabs/list.js +1 -1
  107. package/dist/components/Tabs/list.js.map +1 -1
  108. package/dist/components/Tag/group.d.ts +1 -1
  109. package/dist/components/Tag/group.d.ts.map +1 -1
  110. package/dist/components/Tree/index.d.ts +2 -1
  111. package/dist/components/Tree/index.d.ts.map +1 -1
  112. package/dist/components/Tree/index.js +35 -31
  113. package/dist/components/Tree/index.js.map +1 -1
  114. package/dist/containers/Paging.d.ts +1 -1
  115. package/dist/containers/Paging.d.ts.map +1 -1
  116. package/dist/containers/ThemeProvider.d.ts +1 -1
  117. package/dist/containers/ThemeProvider.d.ts.map +1 -1
  118. package/dist/helpers/utils.d.ts +2 -1
  119. package/dist/helpers/utils.d.ts.map +1 -1
  120. package/dist/helpers/utils.js +20 -2
  121. package/dist/helpers/utils.js.map +1 -1
  122. package/dist/hooks/useAutoFocus.d.ts +1 -1
  123. package/dist/hooks/useAutoFocus.d.ts.map +1 -1
  124. package/dist/hooks/usePopover.d.ts +1 -0
  125. package/dist/hooks/usePopover.d.ts.map +1 -1
  126. package/dist/index.d.ts +1 -1
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js.map +1 -1
  129. package/dist/styles.d.ts +3 -0
  130. package/dist/styles.d.ts.map +1 -1
  131. package/dist/styles.js +49 -11
  132. package/dist/styles.js.map +1 -1
  133. package/migration-storybook.log +88 -0
  134. package/package.json +26 -20
  135. package/src/components/Breadcrumbs/index.tsx +1 -1
  136. package/src/components/Button/index.tsx +3 -54
  137. package/src/components/Collection/index.tsx +18 -15
  138. package/src/components/Collection/item.tsx +2 -1
  139. package/src/components/ExportModal/index.tsx +98 -0
  140. package/src/components/KeyValueTable/index.tsx +17 -11
  141. package/src/components/Menu/item.tsx +4 -4
  142. package/src/components/Notifications/notification.tsx +2 -2
  143. package/src/components/Panel/index.tsx +2 -2
  144. package/src/components/Table/body.tsx +6 -3
  145. package/src/components/Table/helpers.ts +52 -21
  146. package/src/components/Table/index.tsx +108 -75
  147. package/src/components/Table/row.tsx +12 -7
  148. package/src/components/Tabs/list.tsx +1 -1
  149. package/src/components/Tree/index.tsx +82 -75
  150. package/src/helpers/utils.ts +10 -2
  151. package/src/hooks/useAutoFocus.ts +1 -1
  152. package/src/index.tsx +1 -1
  153. package/src/mock/tableData.ts +12 -0
  154. package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +11 -23
  155. package/src/stories/Button/Button.stories.tsx +83 -47
  156. package/src/stories/Checkbox/Checkbox.stories.tsx +19 -9
  157. package/src/stories/Collection/Collection.stories.tsx +195 -171
  158. package/src/stories/Columns/Columns.stories.tsx +38 -24
  159. package/src/stories/Comment/Comment.stories.tsx +15 -6
  160. package/src/stories/ControlGroup/ControlGroup.stories.tsx +102 -48
  161. package/src/stories/Drawer/Drawer.stories.tsx +52 -17
  162. package/src/stories/Dropdown/Dropdown.stories.tsx +184 -152
  163. package/src/stories/ExportModal/ExportModal.stories.tsx +18 -0
  164. package/src/stories/Header/Header.stories.tsx +65 -31
  165. package/src/stories/Icon/Icon.stories.tsx +139 -133
  166. package/src/stories/Input/Input.stories.tsx +68 -31
  167. package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +143 -118
  168. package/src/stories/Menu/Menu.stories.tsx +56 -20
  169. package/src/stories/Message/Message.stories.tsx +71 -37
  170. package/src/stories/Modal/Modal.stories.tsx +28 -8
  171. package/src/stories/MultiSelect/MultiSelect.stories.tsx +66 -35
  172. package/src/stories/Navbar/Navbar.stories.tsx +15 -5
  173. package/src/stories/Notifications/Interactive.stories.tsx +40 -28
  174. package/src/stories/Notifications/Notification.stories.tsx +55 -41
  175. package/src/stories/Notifications/Notifications.stories.tsx +45 -29
  176. package/src/stories/Paging/Paging.stories.tsx +206 -177
  177. package/src/stories/Panel/Panel.stories.tsx +238 -168
  178. package/src/stories/Paragraph/Paragraph.stories.tsx +66 -31
  179. package/src/stories/Popover/Popover.stories.tsx +62 -40
  180. package/src/stories/RadioGroup/RadioGroup.stories.tsx +41 -19
  181. package/src/stories/Sidebar/Sidebar.stories.tsx +29 -10
  182. package/src/stories/Spacer/Spacer.stories.tsx +13 -5
  183. package/src/stories/Spinner/Spinner.stories.tsx +26 -12
  184. package/src/stories/Table/Table.stories.tsx +200 -144
  185. package/src/stories/Table/Tests.stories.tsx +9 -0
  186. package/src/stories/Tabs/Tabs.stories.tsx +82 -46
  187. package/src/stories/Tag/Tag.stories.tsx +56 -37
  188. package/src/stories/Tag/TagGroup.stories.tsx +297 -0
  189. package/src/stories/TextArea/TextArea.stories.tsx +82 -40
  190. package/src/stories/Tree/Tree.stories.tsx +84 -22
  191. package/src/stories/utils.ts +22 -1
  192. package/src/styles.ts +55 -2
  193. package/tests.json +1 -1
@@ -1,16 +1,20 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
2
- import { IReqoreHeadingProps } from '../../components/Header';
1
+ import { StoryFn, StoryObj } from '@storybook/react';
3
2
  import { ReqoreControlGroup, ReqoreHeading } from '../../index';
3
+ import { StoryMeta } from '../utils';
4
4
  import { IntentArg } from '../utils/args';
5
5
 
6
- export default {
6
+ const meta = {
7
7
  title: 'Other/Heading/Stories',
8
+ component: ReqoreHeading,
8
9
  argTypes: {
9
10
  ...IntentArg,
10
11
  },
11
- } as Meta;
12
+ } as StoryMeta<typeof ReqoreHeading>;
12
13
 
13
- const Template: Story<IReqoreHeadingProps> = (args) => {
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ const Template: StoryFn<typeof ReqoreHeading> = (args) => {
14
18
  return (
15
19
  <ReqoreControlGroup gapSize='big' vertical>
16
20
  <ReqoreHeading size={1} {...args}>
@@ -38,37 +42,67 @@ const Template: Story<IReqoreHeadingProps> = (args) => {
38
42
  );
39
43
  };
40
44
 
41
- export const Basic = Template.bind({});
42
- export const Success = Template.bind({});
43
- Success.args = {
44
- intent: 'success',
45
+ export const Basic: Story = {
46
+ render: Template,
45
47
  };
46
- export const Danger = Template.bind({});
47
- Danger.args = {
48
- intent: 'danger',
48
+
49
+ export const Success: Story = {
50
+ render: Template,
51
+
52
+ args: {
53
+ intent: 'success',
54
+ },
49
55
  };
50
- export const Warning = Template.bind({});
51
- Warning.args = {
52
- intent: 'warning',
56
+
57
+ export const Danger: Story = {
58
+ render: Template,
59
+
60
+ args: {
61
+ intent: 'danger',
62
+ },
63
+ };
64
+
65
+ export const Warning: Story = {
66
+ render: Template,
67
+
68
+ args: {
69
+ intent: 'warning',
70
+ },
53
71
  };
54
- export const Info = Template.bind({});
55
- Info.args = {
56
- intent: 'info',
72
+
73
+ export const Info: Story = {
74
+ render: Template,
75
+
76
+ args: {
77
+ intent: 'info',
78
+ },
57
79
  };
58
- export const Pending = Template.bind({});
59
- Pending.args = {
60
- intent: 'pending',
80
+
81
+ export const Pending: Story = {
82
+ render: Template,
83
+
84
+ args: {
85
+ intent: 'pending',
86
+ },
61
87
  };
62
- export const Muted = Template.bind({});
63
- Muted.args = {
64
- intent: 'muted',
88
+
89
+ export const Muted: Story = {
90
+ render: Template,
91
+
92
+ args: {
93
+ intent: 'muted',
94
+ },
65
95
  };
66
- export const Effect = Template.bind({});
67
- Effect.args = {
68
- effect: {
69
- gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
70
- spaced: 4,
71
- weight: 'bold',
72
- uppercase: true,
96
+
97
+ export const Effect: Story = {
98
+ render: Template,
99
+
100
+ args: {
101
+ effect: {
102
+ gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
103
+ spaced: 4,
104
+ weight: 'bold',
105
+ uppercase: true,
106
+ },
73
107
  },
74
108
  };
@@ -1,143 +1,149 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
2
- import { IReqoreIconProps } from '../../components/Icon';
1
+ import { StoryObj } from '@storybook/react';
3
2
  import { ReqoreIcon, ReqorePanel } from '../../index';
3
+ import { StoryMeta } from '../utils';
4
4
 
5
- export default {
5
+ const meta = {
6
6
  title: 'Other/Icon/Stories',
7
- } as Meta;
7
+ component: ReqoreIcon,
8
+ } as StoryMeta<typeof ReqoreIcon>;
8
9
 
9
- export const Icon: Story<IReqoreIconProps> = () => {
10
- return (
11
- <>
12
- <ReqorePanel label='Basic' flat minimal>
13
- <ReqoreIcon icon='AccountCircleLine' size='12px' margin='both' />
14
- <ReqoreIcon icon='4KFill' size='14px' margin='both' />
15
- <ReqoreIcon icon='ArrowLeftCircleFill' intent='success' margin='both' />
16
- <ReqoreIcon icon='HotelFill' size='18px' margin='both' />
17
- <ReqoreIcon icon='SignalTowerFill' size='20px' color='#ff0000' margin='both' />
18
- <ReqoreIcon
19
- icon='SignalTowerFill'
20
- size='20px'
21
- color='#291133'
22
- effect={{ sepia: true }}
23
- margin='both'
24
- tooltip={{ content: 'I have a tooltip', openOnMount: true }}
25
- />
26
- <ReqoreIcon
27
- icon='SignalTowerFill'
28
- size='20px'
29
- color='#0c7052'
30
- effect={{ blur: 1 }}
31
- margin='both'
32
- />
33
- <ReqoreIcon
34
- icon='SignalTowerFill'
35
- size='20px'
36
- color='#700c57'
37
- effect={{ contrast: 150 }}
38
- margin='both'
39
- />
40
- <ReqoreIcon
41
- icon='SignalTowerFill'
42
- size='20px'
43
- color='#d5be0f'
44
- effect={{ grayscale: true }}
45
- margin='both'
46
- />
47
- <ReqoreIcon
48
- icon='SignalTowerFill'
49
- size='20px'
50
- color='#0f5bd5'
51
- effect={{ invert: true }}
52
- margin='both'
53
- />
54
- <ReqoreIcon
55
- icon='SignalTowerFill'
56
- size='20px'
57
- color='#ffffff'
58
- effect={{ opacity: 0.5 }}
59
- margin='both'
60
- />
61
- </ReqorePanel>
62
- <br />
63
- <ReqorePanel label='Image' flat minimal>
64
- <ReqoreIcon
65
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
66
- size='20px'
67
- margin='both'
68
- />
69
- <ReqoreIcon
70
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
71
- size='40px'
72
- rounded
73
- margin='both'
74
- />
75
- <ReqoreIcon
76
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
77
- size='30px'
78
- effect={{ sepia: true }}
79
- margin='both'
80
- />
81
- <ReqoreIcon
82
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
83
- size='40px'
84
- effect={{ grayscale: true }}
85
- margin='both'
86
- />
87
- <ReqoreIcon
88
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
89
- size='70px'
90
- effect={{ blur: 1 }}
91
- margin='both'
92
- />
93
- <ReqoreIcon
94
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
95
- size='40px'
96
- effect={{ contrast: 150 }}
97
- margin='both'
98
- />
99
- <ReqoreIcon
100
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
101
- size='40px'
102
- effect={{ invert: true }}
103
- margin='both'
104
- />
105
- <ReqoreIcon
106
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
107
- size='40px'
108
- effect={{ opacity: 0.5 }}
109
- margin='both'
110
- />
111
- <ReqoreIcon
112
- image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
113
- size='40px'
114
- effect={{ saturate: 150 }}
115
- margin='both'
116
- />
117
- </ReqorePanel>
118
- <br />
119
- <ReqorePanel label='Margined' flat minimal>
120
- <ReqoreIcon icon='AccountCircleLine' />
121
- No Margin
122
- <div>
123
- <ReqoreIcon icon='4KFill' margin='right' />
124
- Right Margin
125
- </div>
126
- <div>
127
- Left Margin
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Basic: Story = {
14
+ render: () => {
15
+ return (
16
+ <>
17
+ <ReqorePanel label='Basic' flat minimal>
18
+ <ReqoreIcon icon='AccountCircleLine' size='12px' margin='both' />
19
+ <ReqoreIcon icon='4KFill' size='14px' margin='both' />
20
+ <ReqoreIcon icon='ArrowLeftCircleFill' intent='success' margin='both' />
21
+ <ReqoreIcon icon='HotelFill' size='18px' margin='both' />
22
+ <ReqoreIcon icon='SignalTowerFill' size='20px' color='#ff0000' margin='both' />
23
+ <ReqoreIcon
24
+ icon='SignalTowerFill'
25
+ size='20px'
26
+ color='#291133'
27
+ effect={{ sepia: true }}
28
+ margin='both'
29
+ tooltip={{ content: 'I have a tooltip', openOnMount: true }}
30
+ />
31
+ <ReqoreIcon
32
+ icon='SignalTowerFill'
33
+ size='20px'
34
+ color='#0c7052'
35
+ effect={{ blur: 1 }}
36
+ margin='both'
37
+ />
38
+ <ReqoreIcon
39
+ icon='SignalTowerFill'
40
+ size='20px'
41
+ color='#700c57'
42
+ effect={{ contrast: 150 }}
43
+ margin='both'
44
+ />
45
+ <ReqoreIcon
46
+ icon='SignalTowerFill'
47
+ size='20px'
48
+ color='#d5be0f'
49
+ effect={{ grayscale: true }}
50
+ margin='both'
51
+ />
52
+ <ReqoreIcon
53
+ icon='SignalTowerFill'
54
+ size='20px'
55
+ color='#0f5bd5'
56
+ effect={{ invert: true }}
57
+ margin='both'
58
+ />
59
+ <ReqoreIcon
60
+ icon='SignalTowerFill'
61
+ size='20px'
62
+ color='#ffffff'
63
+ effect={{ opacity: 0.5 }}
64
+ margin='both'
65
+ />
66
+ </ReqorePanel>
67
+ <br />
68
+ <ReqorePanel label='Image' flat minimal>
128
69
  <ReqoreIcon
129
70
  image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
130
71
  size='20px'
72
+ margin='both'
73
+ />
74
+ <ReqoreIcon
75
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
76
+ size='40px'
131
77
  rounded
132
- margin='left'
78
+ margin='both'
79
+ />
80
+ <ReqoreIcon
81
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
82
+ size='30px'
83
+ effect={{ sepia: true }}
84
+ margin='both'
85
+ />
86
+ <ReqoreIcon
87
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
88
+ size='40px'
89
+ effect={{ grayscale: true }}
90
+ margin='both'
91
+ />
92
+ <ReqoreIcon
93
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
94
+ size='70px'
95
+ effect={{ blur: 1 }}
96
+ margin='both'
97
+ />
98
+ <ReqoreIcon
99
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
100
+ size='40px'
101
+ effect={{ contrast: 150 }}
102
+ margin='both'
103
+ />
104
+ <ReqoreIcon
105
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
106
+ size='40px'
107
+ effect={{ invert: true }}
108
+ margin='both'
109
+ />
110
+ <ReqoreIcon
111
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
112
+ size='40px'
113
+ effect={{ opacity: 0.5 }}
114
+ margin='both'
115
+ />
116
+ <ReqoreIcon
117
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
118
+ size='40px'
119
+ effect={{ saturate: 150 }}
120
+ margin='both'
133
121
  />
134
- </div>
135
- <div>
136
- Both
137
- <ReqoreIcon icon='HotelFill' margin='both' />
138
- Sides
139
- </div>
140
- </ReqorePanel>
141
- </>
142
- );
122
+ </ReqorePanel>
123
+ <br />
124
+ <ReqorePanel label='Margined' flat minimal>
125
+ <ReqoreIcon icon='AccountCircleLine' />
126
+ No Margin
127
+ <div>
128
+ <ReqoreIcon icon='4KFill' margin='right' />
129
+ Right Margin
130
+ </div>
131
+ <div>
132
+ Left Margin
133
+ <ReqoreIcon
134
+ image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
135
+ size='20px'
136
+ rounded
137
+ margin='left'
138
+ />
139
+ </div>
140
+ <div>
141
+ Both
142
+ <ReqoreIcon icon='HotelFill' margin='both' />
143
+ Sides
144
+ </div>
145
+ </ReqorePanel>
146
+ </>
147
+ );
148
+ },
143
149
  };
@@ -1,20 +1,28 @@
1
- import { Meta, Story } from '@storybook/react/types-6-0';
1
+ import { StoryFn, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import ReqoreInput, { IReqoreInputProps } from '../../components/Input';
4
4
  import { ReqoreControlGroup } from '../../index';
5
+ import { StoryMeta } from '../utils';
5
6
  import { FlatArg, IconArg, MinimalArg, SizeArg } from '../utils/args';
6
7
 
7
- export default {
8
+ const meta = {
8
9
  title: 'Form/Input/Stories',
10
+ component: ReqoreInput,
9
11
  argTypes: {
10
12
  ...MinimalArg,
11
13
  ...FlatArg,
12
14
  ...SizeArg,
13
- ...IconArg('icon', 'Icon', 'SearchLine'),
15
+ ...IconArg('icon', 'Icon'),
14
16
  },
15
- } as Meta<IReqoreInputProps>;
17
+ args: {
18
+ icon: 'SearchLine',
19
+ },
20
+ } as StoryMeta<typeof ReqoreInput>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
16
24
 
17
- const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
25
+ const Template: StoryFn<typeof ReqoreInput> = (args: IReqoreInputProps) => {
18
26
  const [value, setValue] = useState('Input value');
19
27
 
20
28
  const handleValueChange = (e: React.ChangeEvent<HTMLInputElement>) => {
@@ -133,39 +141,68 @@ const Template: Story<IReqoreInputProps> = (args: IReqoreInputProps) => {
133
141
  );
134
142
  };
135
143
 
136
- export const Basic = Template.bind({});
137
- export const Info = Template.bind({});
138
- Info.args = {
139
- intent: 'info',
144
+ export const Basic: Story = {
145
+ render: Template,
140
146
  };
141
- export const Success = Template.bind({});
142
- Success.args = {
143
- intent: 'success',
147
+
148
+ export const Info: Story = {
149
+ render: Template,
150
+
151
+ args: {
152
+ intent: 'info',
153
+ },
144
154
  };
145
- export const Warning = Template.bind({});
146
- Warning.args = {
147
- intent: 'warning',
155
+
156
+ export const Success: Story = {
157
+ render: Template,
158
+
159
+ args: {
160
+ intent: 'success',
161
+ },
162
+ };
163
+
164
+ export const Warning: Story = {
165
+ render: Template,
166
+
167
+ args: {
168
+ intent: 'warning',
169
+ },
148
170
  };
149
- export const Danger = Template.bind({});
150
- Danger.args = {
151
- intent: 'danger',
171
+
172
+ export const Danger: Story = {
173
+ render: Template,
174
+
175
+ args: {
176
+ intent: 'danger',
177
+ },
152
178
  };
153
- export const Pending = Template.bind({});
154
- Pending.args = {
155
- intent: 'pending',
179
+
180
+ export const Pending: Story = {
181
+ render: Template,
182
+
183
+ args: {
184
+ intent: 'pending',
185
+ },
156
186
  };
157
- export const Muted = Template.bind({});
158
- Muted.args = {
159
- intent: 'muted',
187
+
188
+ export const Muted: Story = {
189
+ render: Template,
190
+
191
+ args: {
192
+ intent: 'muted',
193
+ },
160
194
  };
161
195
 
162
- export const Effect = Template.bind({});
163
- Effect.args = {
164
- effect: {
165
- gradient: {
166
- colors: {
167
- 0: '#56345e',
168
- 100: 'transparent',
196
+ export const Effect: Story = {
197
+ render: Template,
198
+
199
+ args: {
200
+ effect: {
201
+ gradient: {
202
+ colors: {
203
+ 0: '#56345e',
204
+ 100: 'transparent',
205
+ },
169
206
  },
170
207
  },
171
208
  },