@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,10 +1,11 @@
1
- import { Meta, Story } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react';
2
2
  import { ReqoreButton, ReqoreControlGroup, ReqoreVerticalSpacer } from '../..';
3
3
  import { IReqoreCollectionProps, ReqoreCollection } from '../../components/Collection';
4
4
  import { IReqoreColumnsProps } from '../../components/Columns';
5
5
  import { PADDING_FROM_SIZE } from '../../constants/sizes';
6
6
  import items, { bigCollection } from '../../mock/collectionData';
7
7
 
8
+ import { StoryMeta } from '../utils';
8
9
  import { argManager, IntentArg, SizeArg } from '../utils/args';
9
10
 
10
11
  export interface IColumnsStoryArgs extends IReqoreColumnsProps {
@@ -13,54 +14,46 @@ export interface IColumnsStoryArgs extends IReqoreColumnsProps {
13
14
 
14
15
  const { createArg, disableArgs } = argManager<IReqoreCollectionProps>();
15
16
 
16
- export default {
17
+ const meta = {
17
18
  title: 'Collections/Collection/Stories',
18
19
  component: ReqoreCollection,
19
20
  argTypes: {
20
21
  ...createArg('stacked', {
21
- defaultValue: false,
22
22
  type: 'boolean',
23
23
  name: 'Stacked',
24
24
  description: 'If true, the collection will be stacked',
25
25
  }),
26
26
  ...createArg('maxItemHeight', {
27
- defaultValue: 100,
28
27
  type: 'number',
29
28
  name: 'Max Item Height',
30
29
  description: 'Max height of the collection item',
31
30
  }),
32
31
  ...createArg('sortable', {
33
- defaultValue: true,
34
32
  type: 'boolean',
35
33
  name: 'Sortable',
36
34
  description: 'If true, the collection will be sortable',
37
35
  }),
38
36
  ...createArg('filterable', {
39
- defaultValue: true,
40
37
  type: 'boolean',
41
38
  name: 'Filterable',
42
39
  description: 'If true, the collection will be filterable',
43
40
  }),
44
41
  ...createArg('rounded', {
45
- defaultValue: true,
46
42
  type: 'boolean',
47
43
  name: 'Rounded',
48
44
  description: 'If true, the collection will be rounded when stacked',
49
45
  }),
50
46
  ...createArg('height', {
51
- defaultValue: undefined,
52
47
  type: 'string',
53
48
  name: 'Height',
54
49
  description: 'Height of the collection',
55
50
  }),
56
51
  ...createArg('fill', {
57
- defaultValue: false,
58
52
  type: 'boolean',
59
53
  name: 'Fill parent',
60
54
  description: 'If true, the collection will fill the parent',
61
55
  }),
62
56
  ...createArg('label', {
63
- defaultValue: undefined,
64
57
  type: 'string',
65
58
  name: 'Label',
66
59
  description: 'Label of the collection',
@@ -69,193 +62,224 @@ export default {
69
62
  ...IntentArg,
70
63
  ...SizeArg,
71
64
  },
72
- } as Meta<IReqoreCollectionProps>;
65
+ args: {
66
+ selectedIcon: 'CheckLine',
67
+ maxItemHeight: 100,
68
+ sortable: true,
69
+ filterable: true,
70
+ rounded: true,
71
+ },
72
+ } as StoryMeta<typeof ReqoreCollection>;
73
73
 
74
- const Template: Story<IReqoreCollectionProps> = (args) => {
75
- return <ReqoreCollection {...args} selectedIcon='CheckLine' />;
76
- };
74
+ export default meta;
75
+ type Story = StoryObj<typeof meta>;
77
76
 
78
- export const Basic = Template.bind({});
79
- Basic.args = {
80
- label: 'Config Items',
81
- items,
82
- actions: [
83
- { label: 'Custom action', icon: 'Home7Line', fixed: true },
84
- { actions: [{ value: 'Test' }] },
85
- ],
77
+ export const Basic: Story = {
78
+ args: {
79
+ label: 'Config Items',
80
+ items,
81
+ actions: [
82
+ { label: 'Custom action', icon: 'Home7Line', fixed: true },
83
+ { actions: [{ label: 'Test' }] },
84
+ ],
85
+ },
86
86
  };
87
87
 
88
- export const WithHeight = Template.bind({});
89
- WithHeight.args = {
90
- label: 'Collection of items',
91
- height: '600px',
92
- items,
93
- actions: [
94
- { label: 'Custom action', icon: 'Home7Line', fixed: true },
95
- { actions: [{ value: 'Test' }] },
96
- ],
88
+ export const WithHeight: Story = {
89
+ args: {
90
+ label: 'Collection of items',
91
+ height: '600px',
92
+ items,
93
+ actions: [
94
+ { label: 'Custom action', icon: 'Home7Line', fixed: true },
95
+ { actions: [{ label: 'Test' }] },
96
+ ],
97
+ },
97
98
  };
98
99
 
99
- export const Stacked = Template.bind({});
100
- Stacked.args = {
101
- label: 'Collection of items',
102
- stacked: true,
103
- items,
104
- actions: [
105
- { label: 'Custom action', icon: 'Home7Line', fixed: true },
106
- { actions: [{ value: 'Test' }] },
107
- ],
100
+ export const Stacked: Story = {
101
+ args: {
102
+ label: 'Collection of items',
103
+ stacked: true,
104
+ items,
105
+ actions: [
106
+ { label: 'Custom action', icon: 'Home7Line', fixed: true },
107
+ { actions: [{ label: 'Test' }] },
108
+ ],
109
+ },
108
110
  };
109
111
 
110
- export const Fill = Template.bind({});
111
- Fill.args = {
112
- label: 'Collection of items',
113
- fill: true,
114
- items,
115
- actions: [
116
- { label: 'Custom action', icon: 'Home7Line', fixed: true },
117
- { actions: [{ value: 'Test' }] },
118
- ],
112
+ export const Fill: Story = {
113
+ args: {
114
+ label: 'Collection of items',
115
+ fill: true,
116
+ items,
117
+ actions: [
118
+ { label: 'Custom action', icon: 'Home7Line', fixed: true },
119
+ { actions: [{ label: 'Test' }] },
120
+ ],
121
+ },
119
122
  };
120
123
 
121
- export const SelectedFirst = Template.bind({});
122
- SelectedFirst.args = {
123
- label: 'Collection of items',
124
- items,
125
- showSelectedFirst: true,
124
+ export const SelectedFirst: Story = {
125
+ args: {
126
+ label: 'Collection of items',
127
+ items,
128
+ showSelectedFirst: true,
129
+ },
126
130
  };
127
131
 
128
- export const Zoomable = Template.bind({});
129
- Zoomable.args = {
130
- label: 'Collection of items',
131
- items,
132
- zoomable: true,
132
+ export const Zoomable: Story = {
133
+ args: {
134
+ label: 'Collection of items',
135
+ items,
136
+ zoomable: true,
137
+ },
133
138
  };
134
139
 
135
- export const WithDefaultZoom = Template.bind({});
136
- WithDefaultZoom.args = {
137
- label: 'Collection of items',
138
- items,
139
- zoomable: true,
140
- size: 'tiny',
141
- defaultZoom: 2,
140
+ export const WithDefaultZoom: Story = {
141
+ args: {
142
+ label: 'Collection of items',
143
+ items,
144
+ zoomable: true,
145
+ size: 'tiny',
146
+ defaultZoom: 2,
147
+ },
142
148
  };
143
149
 
144
- export const CustomColumnsData = Template.bind({});
145
- CustomColumnsData.args = {
146
- columns: 2,
147
- columnsGap: '50px',
148
- minColumnWidth: '100px',
149
- maxColumnWidth: '200px',
150
- items,
151
- label: '2 columns of max 200px width with 50px gap',
150
+ export const CustomColumnsData: Story = {
151
+ args: {
152
+ columns: 2,
153
+ columnsGap: '50px',
154
+ minColumnWidth: '100px',
155
+ maxColumnWidth: '200px',
156
+ items,
157
+ label: '2 columns of max 200px width with 50px gap',
158
+ },
152
159
  };
153
160
 
154
- export const CustomPropsAndTexts = Template.bind({});
155
- CustomPropsAndTexts.args = {
156
- label: 'Collection of items',
157
- items,
158
- inputProps: {
159
- effect: {
160
- gradient: { colors: 'warning' },
161
+ export const CustomPropsAndTexts: Story = {
162
+ args: {
163
+ label: 'Collection of items',
164
+ items,
165
+ inputProps: {
166
+ effect: {
167
+ gradient: { colors: 'warning' },
168
+ },
169
+ minimal: true,
161
170
  },
162
- minimal: true,
171
+ inputPlaceholder: (items) => `Search in ${items.length} crazy items`,
172
+ sortButtonTooltip: (sort) => `Seradit ${sort === 'asc' ? 'vzestupne' : 'sestupne'}`,
173
+ displayButtonTooltip: (display) => `Zobrazit ${display === 'list' ? 'v liste' : 'v mriezke'}`,
163
174
  },
164
- inputPlaceholder: (items) => `Search in ${items.length} crazy items`,
165
- sortButtonTooltip: (sort) => `Seradit ${sort === 'asc' ? 'vzestupne' : 'sestupne'}`,
166
- displayButtonTooltip: (display) => `Zobrazit ${display === 'list' ? 'v liste' : 'v mriezke'}`,
167
175
  };
168
176
 
169
- export const ChildrenBeforeAndAfter = Template.bind({});
170
- ChildrenBeforeAndAfter.args = {
171
- label: 'Collection of items',
172
- padded: false,
173
- items,
174
- contentRenderer: (children) => (
175
- <>
176
- <ReqoreControlGroup horizontalAlign='center' fluid>
177
- <ReqoreButton fluid> I could be a filter of some kind</ReqoreButton>
178
- </ReqoreControlGroup>
179
- <ReqoreVerticalSpacer height={PADDING_FROM_SIZE.normal} />
180
- {children}
181
- <ReqoreVerticalSpacer height={PADDING_FROM_SIZE.normal} />
182
- <ReqoreControlGroup horizontalAlign='center' fluid>
183
- <ReqoreControlGroup fluid={false} fixed>
184
- <ReqoreButton fixed textAlign='center'>
185
- 1
186
- </ReqoreButton>
187
- <ReqoreButton fixed textAlign='center'>
188
- 2
189
- </ReqoreButton>
190
- <ReqoreButton fixed textAlign='center'>
191
- 3
192
- </ReqoreButton>
193
- <ReqoreButton fixed textAlign='center'>
194
- 4
195
- </ReqoreButton>
177
+ export const ChildrenBeforeAndAfter: Story = {
178
+ args: {
179
+ label: 'Collection of items',
180
+ padded: false,
181
+ items,
182
+ contentRenderer: (children) => (
183
+ <>
184
+ <ReqoreControlGroup horizontalAlign='center' fluid>
185
+ <ReqoreButton fluid> I could be a filter of some kind</ReqoreButton>
186
+ </ReqoreControlGroup>
187
+ <ReqoreVerticalSpacer height={PADDING_FROM_SIZE.normal} />
188
+ {children}
189
+ <ReqoreVerticalSpacer height={PADDING_FROM_SIZE.normal} />
190
+ <ReqoreControlGroup horizontalAlign='center' fluid>
191
+ <ReqoreControlGroup fluid={false} fixed>
192
+ <ReqoreButton fixed textAlign='center'>
193
+ 1
194
+ </ReqoreButton>
195
+ <ReqoreButton fixed textAlign='center'>
196
+ 2
197
+ </ReqoreButton>
198
+ <ReqoreButton fixed textAlign='center'>
199
+ 3
200
+ </ReqoreButton>
201
+ <ReqoreButton fixed textAlign='center'>
202
+ 4
203
+ </ReqoreButton>
204
+ </ReqoreControlGroup>
196
205
  </ReqoreControlGroup>
197
- </ReqoreControlGroup>
198
- </>
199
- ),
206
+ </>
207
+ ),
208
+ },
200
209
  };
201
210
 
202
- export const FilteringSearchingPaging = Template.bind({});
203
- FilteringSearchingPaging.args = {
204
- inputProps: {
205
- fluid: true,
206
- focusRules: {
207
- type: 'keypress',
208
- shortcut: 'letters',
209
- clearOnFocus: true,
211
+ export const FilteringSearchingPaging: Story = {
212
+ args: {
213
+ inputProps: {
214
+ fluid: true,
215
+ focusRules: {
216
+ type: 'keypress',
217
+ shortcut: 'letters',
218
+ clearOnFocus: true,
219
+ },
210
220
  },
211
- },
212
- displayButtonProps: {
213
- fixed: false,
214
- },
215
- sortButtonProps: {
216
- fixed: false,
217
- },
218
- paging: 'buttons',
219
- size: 'big',
220
- padded: false,
221
- items: bigCollection,
222
- } as IReqoreCollectionProps;
221
+ displayButtonProps: {
222
+ fixed: false,
223
+ },
224
+ sortButtonProps: {
225
+ fixed: false,
226
+ },
227
+ paging: 'buttons',
228
+ size: 'big',
229
+ padded: false,
230
+ items: bigCollection,
231
+ } as IReqoreCollectionProps,
232
+ };
223
233
 
224
- export const CustomFilteringSearchingPaging = Template.bind({});
225
- CustomFilteringSearchingPaging.args = {
226
- inputProps: {
227
- fluid: true,
228
- focusRules: {
229
- type: 'auto',
230
- clearOnFocus: true,
234
+ export const CustomFilteringSearchingPaging: Story = {
235
+ args: {
236
+ inputProps: {
237
+ fluid: true,
238
+ focusRules: {
239
+ type: 'auto',
240
+ clearOnFocus: true,
241
+ },
231
242
  },
232
- },
233
- paging: {
234
- itemsPerPage: 55,
235
- scrollToTopOnPageChange: true,
236
- },
237
- inputInTitle: false,
238
- responsiveTitle: true,
239
- size: 'small',
240
- padded: false,
241
- fill: true,
242
- items: [...bigCollection, ...bigCollection, ...bigCollection, ...bigCollection, ...bigCollection],
243
- } as IReqoreCollectionProps;
243
+ paging: {
244
+ itemsPerPage: 55,
245
+ scrollToTopOnPageChange: true,
246
+ },
247
+ inputInTitle: false,
248
+ responsiveTitle: true,
249
+ size: 'small',
250
+ padded: false,
251
+ fill: true,
252
+ items: [
253
+ ...bigCollection,
254
+ ...bigCollection,
255
+ ...bigCollection,
256
+ ...bigCollection,
257
+ ...bigCollection,
258
+ ],
259
+ } as IReqoreCollectionProps,
260
+ };
244
261
 
245
- export const DefaultFilter = Template.bind({});
246
- DefaultFilter.args = {
247
- inputProps: {
248
- fluid: true,
249
- },
250
- defaultQuery: 'Med',
251
- paging: {
252
- itemsPerPage: 55,
253
- scrollToTopOnPageChange: true,
254
- },
255
- inputInTitle: false,
256
- responsiveTitle: true,
257
- size: 'small',
258
- padded: false,
259
- fill: true,
260
- items: [...bigCollection, ...bigCollection, ...bigCollection, ...bigCollection, ...bigCollection],
261
- } as IReqoreCollectionProps;
262
+ export const DefaultFilter: Story = {
263
+ args: {
264
+ inputProps: {
265
+ fluid: true,
266
+ },
267
+ defaultQuery: 'Med',
268
+ paging: {
269
+ itemsPerPage: 55,
270
+ scrollToTopOnPageChange: true,
271
+ },
272
+ inputInTitle: false,
273
+ responsiveTitle: true,
274
+ size: 'small',
275
+ padded: false,
276
+ fill: true,
277
+ items: [
278
+ ...bigCollection,
279
+ ...bigCollection,
280
+ ...bigCollection,
281
+ ...bigCollection,
282
+ ...bigCollection,
283
+ ],
284
+ } as IReqoreCollectionProps,
285
+ };
@@ -1,4 +1,4 @@
1
- import { Meta, Story } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react';
2
2
  import { IReqoreColumnsProps } from '../../components/Columns';
3
3
  import {
4
4
  ReqoreButton,
@@ -9,6 +9,7 @@ import {
9
9
  ReqoreInput,
10
10
  ReqoreVerticalSpacer,
11
11
  } from '../../index';
12
+ import { StoryMeta } from '../utils';
12
13
  import { argManager } from '../utils/args';
13
14
 
14
15
  export interface IColumnsStoryArgs extends IReqoreColumnsProps {
@@ -17,15 +18,10 @@ export interface IColumnsStoryArgs extends IReqoreColumnsProps {
17
18
 
18
19
  const { createArg, disableArgs } = argManager<IColumnsStoryArgs>();
19
20
 
20
- export default {
21
+ const meta = {
21
22
  title: 'Layout/Columns/Stories',
22
23
  component: ReqoreColumns,
23
24
  argTypes: {
24
- ...createArg('multipleColumns', {
25
- defaultValue: false,
26
- control: 'boolean',
27
- name: 'Multiple Columns',
28
- }),
29
25
  ...createArg('minColumnWidth', {
30
26
  defaultValue: '200px',
31
27
  }),
@@ -35,9 +31,6 @@ export default {
35
31
  ...createArg('alignItems', {
36
32
  defaultValue: 'normal',
37
33
  }),
38
- ...createArg('alignItems', {
39
- defaultValue: 'normal',
40
- }),
41
34
  ...createArg('columns', {
42
35
  defaultValue: undefined,
43
36
  type: 'string',
@@ -47,9 +40,17 @@ export default {
47
40
  }),
48
41
  ...disableArgs(['className', 'multipleColumns']),
49
42
  },
50
- } as Meta<IColumnsStoryArgs>;
43
+ args: {
44
+ minColumnWidth: '200px',
45
+ maxColumnWidth: '300px',
46
+ alignItems: 'normal',
47
+ },
48
+ } as StoryMeta<typeof ReqoreColumns>;
49
+
50
+ export default meta;
51
+ type Story = StoryObj<typeof meta>;
51
52
 
52
- const Template: Story<IColumnsStoryArgs> = (args) => {
53
+ const Template = (args) => {
53
54
  return (
54
55
  <ReqoreColumns {...args} columnsGap='10px'>
55
56
  <ReqoreColumn
@@ -126,19 +127,32 @@ const Template: Story<IColumnsStoryArgs> = (args) => {
126
127
  );
127
128
  };
128
129
 
129
- export const Basic = Template.bind({});
130
- export const MultipleColumns = Template.bind({});
131
- MultipleColumns.args = {
132
- multipleColumns: true,
130
+ export const Basic: Story = {
131
+ render: Template,
133
132
  };
134
- export const CustomAlignment = Template.bind({});
135
- CustomAlignment.args = {
136
- multipleColumns: true,
137
- alignItems: 'center',
133
+
134
+ export const MultipleColumns: Story = {
135
+ render: Template,
136
+
137
+ args: {
138
+ multipleColumns: true,
139
+ },
138
140
  };
139
141
 
140
- export const WithMinimumWidth = Template.bind({});
141
- WithMinimumWidth.args = {
142
- multipleColumns: true,
143
- minColumnWidth: '500px',
142
+ export const CustomAlignment: Story = {
143
+ render: Template,
144
+
145
+ args: {
146
+ multipleColumns: true,
147
+ alignItems: 'center',
148
+ },
149
+ };
150
+
151
+ export const WithMinimumWidth = {
152
+ render: Template,
153
+
154
+ args: {
155
+ multipleColumns: true,
156
+ minColumnWidth: '500px',
157
+ },
144
158
  };
@@ -1,21 +1,28 @@
1
- import { ComponentMeta, ComponentStory } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react';
2
2
  import { IReqoreCommentFeedProps } from '../../components/CommentFeed';
3
3
  import { ReqoreComment, ReqoreCommentFeed } from '../../index';
4
+ import { StoryMeta } from '../utils';
4
5
  import { argManager } from '../utils/args';
5
6
 
6
7
  const { createArg } = argManager<IReqoreCommentFeedProps>();
7
8
 
8
- export default {
9
+ const meta = {
9
10
  title: 'Other/Comments/Stories',
11
+ component: ReqoreCommentFeed,
10
12
  argTypes: {
11
13
  ...createArg('gapSize', {
12
- defaultValue: '0',
13
14
  type: 'string',
14
15
  }),
15
16
  },
16
- } as ComponentMeta<typeof ReqoreCommentFeed>;
17
+ args: {
18
+ gapSize: '0',
19
+ },
20
+ } as StoryMeta<typeof ReqoreCommentFeed>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
17
24
 
18
- const Template: ComponentStory<typeof ReqoreCommentFeed> = (args) => {
25
+ const Template = (args) => {
19
26
  return (
20
27
  <ReqoreCommentFeed {...args}>
21
28
  <ReqoreComment title='Test comment' detail='2 hours ago' icon='UserFill'>
@@ -124,4 +131,6 @@ const Template: ComponentStory<typeof ReqoreCommentFeed> = (args) => {
124
131
  );
125
132
  };
126
133
 
127
- export const Basic = Template.bind({});
134
+ export const Basic: Story = {
135
+ render: Template,
136
+ };