@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,226 +1,255 @@
1
- import { Story, StoryObj } from '@storybook/react/types-6-0';
1
+ import { StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
  import { useMount } from 'react-use';
4
- import { IReqorePaginationProps, ReqorePagination } from '../../components/Paging';
5
- import { IReqorePagingOptions } from '../../hooks/usePaging';
4
+ import { ReqorePagination } from '../../components/Paging';
6
5
  import { ReqoreControlGroup, ReqoreTag, useReqorePaging } from '../../index';
7
- import { tableData } from '../../mock/tableData';
6
+ import { TestTableItem, tableData } from '../../mock/tableData';
7
+ import { StoryMeta, StoryRenderer } from '../utils';
8
8
 
9
- export default {
9
+ const meta = {
10
10
  title: 'Collections/Paging/Stories',
11
- } as StoryObj<typeof ReqorePagination>;
12
-
13
- const Template: Story<IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }> =
14
- (args) => {
15
- const [scrollContainer, setScrollContainer] = useState<any>(undefined);
16
- const paging = useReqorePaging<any>({ items: tableData, ...args.pagingOptions });
17
-
18
- useMount(() => {
19
- setScrollContainer(document.querySelector('.reqore-content')!);
20
- });
21
-
22
- return (
23
- <ReqoreControlGroup vertical fluid key='paging-wrapper'>
24
- {paging.items.map((item) => (
25
- <ReqoreTag fixed='key' labelKey={item.id} label={`${item.firstName} ${item.lastName}`} />
26
- ))}
27
- <ReqorePagination<any>
28
- {...paging}
29
- {...args}
30
- scrollContainer={
31
- args.scrollToTopOnPageChange || !!args.changePageOnScroll ? scrollContainer : undefined
32
- }
33
- />
34
- </ReqoreControlGroup>
35
- );
36
- };
37
-
38
- export const Basic = Template.bind({});
39
- export const NoPageButtons = Template.bind({});
40
- NoPageButtons.args = {
41
- showPages: false,
11
+ component: ReqorePagination,
12
+ } as StoryMeta<typeof ReqorePagination<TestTableItem>>;
13
+
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ type StoryType = typeof ReqorePagination<TestTableItem> & any;
17
+
18
+ const Template: StoryRenderer<StoryType> = (args) => {
19
+ const [scrollContainer, setScrollContainer] = useState<any>(undefined);
20
+ const paging = useReqorePaging<any>({ items: tableData, ...args.pagingOptions });
21
+
22
+ useMount(() => {
23
+ setScrollContainer(document.querySelector('.reqore-content')!);
24
+ });
25
+
26
+ return (
27
+ <ReqoreControlGroup vertical fluid key='paging-wrapper'>
28
+ {paging.items.map((item) => (
29
+ <ReqoreTag fixed='key' labelKey={item.id} label={`${item.firstName} ${item.lastName}`} />
30
+ ))}
31
+ <ReqorePagination<any>
32
+ {...paging}
33
+ {...args}
34
+ scrollContainer={
35
+ args.scrollToTopOnPageChange || !!args.changePageOnScroll ? scrollContainer : undefined
36
+ }
37
+ />
38
+ </ReqoreControlGroup>
39
+ );
42
40
  };
43
41
 
44
- export const NoControlButtons = Template.bind({});
45
- NoControlButtons.args = {
46
- showControls: false,
42
+ export const Basic: Story = {
43
+ render: Template,
47
44
  };
48
45
 
49
- export const ShowSomePages = Template.bind({});
50
- ShowSomePages.args = {
51
- pagingOptions: {
52
- pagesToShow: 4,
53
- } as IReqorePagingOptions<any>,
46
+ export const NoPageButtons: Story = {
47
+ render: Template,
48
+
49
+ args: {
50
+ showPages: false,
51
+ },
54
52
  };
55
- export const AsList = Template.bind({});
56
- AsList.args = {
57
- showPagesAs: 'list',
58
- pagingOptions: {
59
- pagesToShow: 5,
60
- } as IReqorePagingOptions<any>,
53
+
54
+ export const NoControlButtons: Story = {
55
+ render: Template,
56
+
57
+ args: {
58
+ showControls: false,
59
+ },
61
60
  };
62
61
 
63
- export const WithStyling: Story<
64
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
65
- > = Template.bind({});
66
- WithStyling.args = {
67
- showPagesAs: 'buttons',
68
- activePageButtonProps: {
69
- effect: {
70
- gradient: {
71
- colors: 'info',
72
- },
62
+ export const ShowSomePages: Story = {
63
+ render: Template,
64
+
65
+ args: {
66
+ pagingOptions: {
67
+ pagesToShow: 4,
73
68
  },
74
69
  },
75
- pageButtonProps: {
76
- effect: {
77
- gradient: {
78
- colors: 'warning',
79
- },
70
+ };
71
+
72
+ export const AsList: Story = {
73
+ render: Template,
74
+
75
+ args: {
76
+ showPagesAs: 'list',
77
+ pagingOptions: {
78
+ pagesToShow: 5,
80
79
  },
81
80
  },
82
- controlPageButtonProps: {
83
- effect: {
84
- gradient: {
85
- colors: 'success',
81
+ };
82
+
83
+ export const WithStyling: Story = {
84
+ render: Template,
85
+
86
+ args: {
87
+ showPagesAs: 'buttons',
88
+ activePageButtonProps: {
89
+ effect: {
90
+ gradient: {
91
+ colors: 'info',
92
+ },
86
93
  },
87
94
  },
95
+ pageButtonProps: {
96
+ effect: {
97
+ gradient: {
98
+ colors: 'warning',
99
+ },
100
+ },
101
+ },
102
+ controlPageButtonProps: {
103
+ effect: {
104
+ gradient: {
105
+ colors: 'success',
106
+ },
107
+ },
108
+ },
109
+ pagingOptions: {
110
+ pagesToShow: 15,
111
+ },
88
112
  },
89
- pagingOptions: {
90
- pagesToShow: 15,
91
- } as IReqorePagingOptions<any>,
92
113
  };
93
114
 
94
- export const ListWithStyling: Story<
95
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
96
- > = Template.bind({});
97
- ListWithStyling.args = {
98
- showPagesAs: 'list',
99
- activePageButtonProps: {
100
- effect: {
101
- gradient: {
102
- colors: 'info',
115
+ export const ListWithStyling: Story = {
116
+ render: Template,
117
+
118
+ args: {
119
+ showPagesAs: 'list',
120
+ activePageButtonProps: {
121
+ effect: {
122
+ gradient: {
123
+ colors: 'info',
124
+ },
103
125
  },
104
126
  },
105
- },
106
- pageButtonProps: {
107
- effect: {
108
- gradient: {
109
- colors: 'warning',
127
+ pageButtonProps: {
128
+ effect: {
129
+ gradient: {
130
+ colors: 'warning',
131
+ },
110
132
  },
111
133
  },
112
- },
113
- listPageButtonProps: {
114
- isDefaultOpen: true,
115
- effect: {
116
- gradient: {
117
- colors: 'info',
134
+ listPageButtonProps: {
135
+ isDefaultOpen: true,
136
+ effect: {
137
+ gradient: {
138
+ colors: 'info',
139
+ },
118
140
  },
119
141
  },
120
- },
121
- controlPageButtonProps: {
122
- effect: {
123
- gradient: {
124
- colors: 'success',
142
+ controlPageButtonProps: {
143
+ effect: {
144
+ gradient: {
145
+ colors: 'success',
146
+ },
125
147
  },
126
148
  },
149
+ pagingOptions: {
150
+ pagesToShow: 15,
151
+ },
127
152
  },
128
- pagingOptions: {
129
- pagesToShow: 15,
130
- } as IReqorePagingOptions<any>,
131
153
  };
132
154
 
133
- export const WithLabels: Story<
134
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
135
- > = Template.bind({});
136
- WithLabels.args = {
137
- showPagesAs: 'list',
138
- showLabels: true,
139
- listPageButtonProps: {
140
- isDefaultOpen: true,
155
+ export const WithLabels: Story = {
156
+ render: Template,
157
+
158
+ args: {
159
+ showPagesAs: 'list',
160
+ showLabels: true,
161
+ listPageButtonProps: {
162
+ isDefaultOpen: true,
163
+ },
164
+ pagingOptions: {
165
+ pagesToShow: 15,
166
+ },
141
167
  },
142
- pagingOptions: {
143
- pagesToShow: 15,
144
- } as IReqorePagingOptions<any>,
145
168
  };
146
169
 
147
- export const NextPageOnVerticalScroll: Story<
148
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
149
- > = Template.bind({});
150
- NextPageOnVerticalScroll.args = {
151
- changePageOnScroll: 'vertical',
152
- };
170
+ export const NextPageOnVerticalScroll: Story = {
171
+ render: Template,
153
172
 
154
- export const NextPageOnHorizontalScroll: Story<
155
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
156
- > = Template.bind({});
157
- NextPageOnHorizontalScroll.args = {
158
- changePageOnScroll: 'horizontal',
173
+ args: {
174
+ changePageOnScroll: 'vertical',
175
+ },
159
176
  };
160
177
 
161
- export const ScrollToTop: Story<
162
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
163
- > = Template.bind({});
164
- ScrollToTop.args = {
165
- scrollToTopOnPageChange: true,
166
- pagingOptions: {
167
- pagesToShow: 5,
168
- itemsPerPage: 100,
169
- } as IReqorePagingOptions<any>,
178
+ export const NextPageOnHorizontalScroll: Story = {
179
+ render: Template,
180
+
181
+ args: {
182
+ changePageOnScroll: 'horizontal',
183
+ },
170
184
  };
171
185
 
172
- export const Infinite: Story<
173
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
174
- > = Template.bind({});
175
- Infinite.args = {
176
- showLabels: true,
177
- fluid: false,
178
- loadMoreButtonProps: {
179
- textAlign: 'center',
186
+ export const ScrollToTop: Story = {
187
+ render: Template,
188
+
189
+ args: {
190
+ scrollToTopOnPageChange: true,
191
+ pagingOptions: {
192
+ pagesToShow: 5,
193
+ itemsPerPage: 100,
194
+ },
180
195
  },
181
- loadMoreLabel: 'Load 10 more',
182
- pagingOptions: {
183
- infinite: true,
184
- } as IReqorePagingOptions<any>,
185
196
  };
186
197
 
187
- export const InfiniteWithAutoScroll: Story<
188
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
189
- > = Template.bind({});
190
- InfiniteWithAutoScroll.args = {
191
- showLabels: true,
192
- fluid: true,
193
- scrollOnLoadMore: true,
194
- loadMoreButtonProps: {
195
- textAlign: 'center',
196
- size: 'big',
198
+ export const Infinite: Story = {
199
+ render: Template,
200
+
201
+ args: {
202
+ showLabels: true,
203
+ fluid: false,
204
+ loadMoreButtonProps: {
205
+ textAlign: 'center',
206
+ },
207
+ loadMoreLabel: 'Load 10 more',
208
+ pagingOptions: {
209
+ infinite: true,
210
+ },
197
211
  },
198
- loadAllButtonProps: {
199
- textAlign: 'center',
200
- size: 'big',
212
+ };
213
+
214
+ export const InfiniteWithAutoScroll: Story = {
215
+ render: Template,
216
+
217
+ args: {
218
+ showLabels: true,
219
+ fluid: true,
220
+ scrollOnLoadMore: true,
221
+ loadMoreButtonProps: {
222
+ textAlign: 'center',
223
+ size: 'big',
224
+ },
225
+ loadAllButtonProps: {
226
+ textAlign: 'center',
227
+ size: 'big',
228
+ },
229
+ loadMoreLabel: 'Load 100 more',
230
+ pagingOptions: {
231
+ infinite: true,
232
+ itemsPerPage: 100,
233
+ },
201
234
  },
202
- loadMoreLabel: 'Load 100 more',
203
- pagingOptions: {
204
- infinite: true,
205
- itemsPerPage: 100,
206
- } as IReqorePagingOptions<any>,
207
235
  };
208
236
 
209
- export const InfiniteWithAutoLoad: Story<
210
- IReqorePaginationProps<any> & { pagingOptions?: IReqorePagingOptions<any> }
211
- > = Template.bind({});
212
- InfiniteWithAutoLoad.args = {
213
- showLabels: true,
214
- fluid: true,
215
- autoLoadMore: true,
216
- scrollOnLoadMore: true,
217
- loadMoreButtonProps: {
218
- textAlign: 'center',
219
- icon: 'Loader5Line',
237
+ export const InfiniteWithAutoLoad: Story = {
238
+ render: Template,
239
+
240
+ args: {
241
+ showLabels: true,
242
+ fluid: true,
243
+ autoLoadMore: true,
244
+ scrollOnLoadMore: true,
245
+ loadMoreButtonProps: {
246
+ textAlign: 'center',
247
+ icon: 'Loader5Line',
248
+ },
249
+ loadMoreLabel: 'Scroll to load 20 more',
250
+ pagingOptions: {
251
+ infinite: true,
252
+ itemsPerPage: 20,
253
+ },
220
254
  },
221
- loadMoreLabel: 'Scroll to load 20 more',
222
- pagingOptions: {
223
- infinite: true,
224
- itemsPerPage: 20,
225
- } as IReqorePagingOptions<any>,
226
255
  };