@true-engineering/true-react-common-ui-kit 4.0.0-alpha44 → 4.0.0-alpha46

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 (210) hide show
  1. package/dist/components/AccountInfo/AccountInfo.styles.d.ts +1 -1
  2. package/dist/components/AddButton/AddButton.styles.d.ts +1 -1
  3. package/dist/components/Button/Button.d.ts +1 -1
  4. package/dist/components/Button/Button.styles.d.ts +1 -1
  5. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -1
  6. package/dist/components/CloseButton/CloseButton.styles.d.ts +1 -1
  7. package/dist/components/ControlWrapper/ControlWrapper.d.ts +2 -2
  8. package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +1 -1
  9. package/dist/components/ControlWrapper/constants.d.ts +1 -0
  10. package/dist/components/ControlWrapper/index.d.ts +1 -0
  11. package/dist/components/ControlWrapper/types.d.ts +3 -1
  12. package/dist/components/CssBaseline/CssBaseline.styles.d.ts +1 -1
  13. package/dist/components/DateInput/DateInput.d.ts +1 -2
  14. package/dist/components/DateInput/DateInput.styles.d.ts +1 -1
  15. package/dist/components/DateInput/constants.d.ts +1 -1
  16. package/dist/components/DatePicker/DatePicker.d.ts +2 -3
  17. package/dist/components/DatePicker/DatePicker.styles.d.ts +1 -1
  18. package/dist/components/DatePicker/components/DatePickerBase/DatePickerBase.d.ts +1 -1
  19. package/dist/components/DatePicker/components/DatePickerHeader/DatePickerHeader.styles.d.ts +1 -1
  20. package/dist/components/DatePicker/constants.d.ts +1 -1
  21. package/dist/components/DatePicker/types.d.ts +2 -2
  22. package/dist/components/Description/Description.styles.d.ts +1 -1
  23. package/dist/components/FileInput/FileInput.d.ts +1 -1
  24. package/dist/components/FileInput/FileInput.styles.d.ts +1 -1
  25. package/dist/components/FileItem/FileItem.styles.d.ts +1 -1
  26. package/dist/components/FiltersPane/FiltersPane.d.ts +0 -1
  27. package/dist/components/FiltersPane/FiltersPane.styles.d.ts +2 -2
  28. package/dist/components/FiltersPane/components/Filter/Filter.d.ts +1 -2
  29. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +3 -6
  30. package/dist/components/FiltersPane/components/FilterMultiSelect/FilterMultiSelect.d.ts +0 -1
  31. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +3 -6
  32. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +1 -2
  33. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.styles.d.ts +1 -1
  34. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +5 -11
  35. package/dist/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.styles.d.ts +1 -1
  36. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +0 -1
  37. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.styles.d.ts +2 -2
  38. package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
  39. package/dist/components/FiltersPane/constants.d.ts +1 -1
  40. package/dist/components/FiltersPane/helpers.d.ts +1 -1
  41. package/dist/components/FiltersPane/types.d.ts +1 -1
  42. package/dist/components/Flag/Flag.styles.d.ts +1 -1
  43. package/dist/components/Flag/customFlags/customFlags.d.ts +2 -2
  44. package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +2 -2
  45. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts +1 -1
  46. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.d.ts +1 -1
  47. package/dist/components/FlexibleTable/helpers.d.ts +2 -2
  48. package/dist/components/FloatDocActions/FloatDocActions.styles.d.ts +1 -1
  49. package/dist/components/FloatDocActions/components/DocActions/DocActions.styles.d.ts +1 -1
  50. package/dist/components/Icon/Icon.styles.d.ts +1 -1
  51. package/dist/components/Icon/icons/index.d.ts +29 -29
  52. package/dist/components/IconButton/IconButton.d.ts +1 -2
  53. package/dist/components/IconButton/IconButton.styles.d.ts +1 -1
  54. package/dist/components/IncrementInput/IncrementInput.styles.d.ts +1 -1
  55. package/dist/components/Input/Input.d.ts +1 -2
  56. package/dist/components/Input/Input.styles.d.ts +1 -1
  57. package/dist/components/Input/InputBase.d.ts +1 -1
  58. package/dist/components/List/List.styles.d.ts +1 -1
  59. package/dist/components/List/components/ListItem/ListItem.styles.d.ts +1 -1
  60. package/dist/components/Modal/Modal.styles.d.ts +1 -1
  61. package/dist/components/MoreMenu/MoreMenu.styles.d.ts +1 -1
  62. package/dist/components/MultiSelect/MultiSelect.d.ts +0 -1
  63. package/dist/components/MultiSelect/MultiSelect.styles.d.ts +1 -1
  64. package/dist/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.styles.d.ts +1 -1
  65. package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +1 -1
  66. package/dist/components/MultiSelectList/constants.d.ts +1 -1
  67. package/dist/components/MultiSelectList/helpers.d.ts +1 -1
  68. package/dist/components/NewMoreMenu/NewMoreMenu.styles.d.ts +1 -1
  69. package/dist/components/Notification/Notification.styles.d.ts +1 -1
  70. package/dist/components/NumberInput/NumberInput.d.ts +1 -2
  71. package/dist/components/NumberInput/helpers.d.ts +2 -2
  72. package/dist/components/PhoneInput/PhoneInput.styles.d.ts +1 -1
  73. package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +1 -1
  74. package/dist/components/RadioButton/RadioButton.styles.d.ts +1 -1
  75. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +3 -373
  76. package/dist/components/ScrollIntoViewIfNeeded/constants.d.ts +1 -1
  77. package/dist/components/SearchInput/SearchInput.d.ts +1 -2
  78. package/dist/components/Select/Select.d.ts +1 -1
  79. package/dist/components/Select/Select.styles.d.ts +12 -22
  80. package/dist/components/Select/components/SelectList/SelectList.d.ts +5 -5
  81. package/dist/components/Select/components/SelectList/SelectList.styles.d.ts +1 -1
  82. package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +2 -2
  83. package/dist/components/Select/helpers.d.ts +1 -1
  84. package/dist/components/Selector/Selector.d.ts +0 -1
  85. package/dist/components/Selector/Selector.styles.d.ts +1 -1
  86. package/dist/components/Skeleton/Skeleton.styles.d.ts +1 -1
  87. package/dist/components/SmartInput/SmartInput.d.ts +1 -1
  88. package/dist/components/Status/Status.styles.d.ts +1 -1
  89. package/dist/components/Status/types.d.ts +1 -1
  90. package/dist/components/Switch/Switch.styles.d.ts +1 -1
  91. package/dist/components/TextArea/TextArea.d.ts +1 -1
  92. package/dist/components/TextArea/TextArea.styles.d.ts +1 -1
  93. package/dist/components/TextButton/TextButton.d.ts +1 -1
  94. package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
  95. package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +1 -1
  96. package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +1 -1
  97. package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +1 -1
  98. package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +1 -1
  99. package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +1 -1
  100. package/dist/components/Toaster/Toaster.styles.d.ts +1 -1
  101. package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
  102. package/dist/components/WithMessages/WithMessages.d.ts +1 -1
  103. package/dist/components/WithMessages/WithMessages.styles.d.ts +1 -1
  104. package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
  105. package/dist/components/WithPopup/types.d.ts +4 -4
  106. package/dist/components/index.d.ts +0 -1
  107. package/dist/constants/phone-info.d.ts +1 -1
  108. package/dist/helpers/misc.d.ts +2 -1
  109. package/dist/helpers/phone.d.ts +1 -1
  110. package/dist/hooks/use-dropdown.d.ts +3 -3
  111. package/dist/hooks/use-merge.d.ts +1 -1
  112. package/dist/hooks/use-mixed-styles.d.ts +3 -3
  113. package/dist/hooks/use-tweak-styles.d.ts +5 -5
  114. package/dist/theme/Provider.d.ts +2 -2
  115. package/dist/theme/common.d.ts +1 -1
  116. package/dist/theme/helpers.d.ts +3 -3
  117. package/dist/theme/true-jss/ThemedStylesManager.d.ts +1 -1
  118. package/dist/theme/true-jss/TweakStylesManager.d.ts +1 -1
  119. package/dist/theme/types.d.ts +1 -1
  120. package/dist/true-react-common-ui-kit.js +881 -733
  121. package/dist/true-react-common-ui-kit.js.map +1 -1
  122. package/dist/true-react-common-ui-kit.umd.cjs +881 -733
  123. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  124. package/dist/types.d.ts +4 -4
  125. package/package.json +14 -16
  126. package/src/components/AccountInfo/AccountInfo.stories.tsx +19 -27
  127. package/src/components/AddButton/AddButton.stories.tsx +14 -17
  128. package/src/components/Button/Button.stories.tsx +7 -24
  129. package/src/components/Checkbox/Checkbox.stories.tsx +24 -26
  130. package/src/components/Checkbox/types.ts +1 -1
  131. package/src/components/CloseButton/CloseButton.stories.tsx +5 -6
  132. package/src/components/Colors/Colors.stories.tsx +63 -3
  133. package/src/components/ControlWrapper/ControlWrapper.stories.tsx +43 -38
  134. package/src/components/ControlWrapper/ControlWrapper.tsx +2 -11
  135. package/src/components/ControlWrapper/constants.ts +11 -0
  136. package/src/components/ControlWrapper/index.ts +1 -0
  137. package/src/components/ControlWrapper/types.ts +4 -1
  138. package/src/components/DateInput/DateInput.stories.tsx +13 -30
  139. package/src/components/DatePicker/DatePicker.stories.tsx +15 -52
  140. package/src/components/Description/Description.stories.tsx +11 -16
  141. package/src/components/FileInput/FileInput.stories.tsx +59 -63
  142. package/src/components/FileItem/FileItem.stories.tsx +46 -45
  143. package/src/components/FiltersPane/FiltersPane.stories.tsx +27 -30
  144. package/src/components/FiltersPane/components/Filter/Filter.tsx +1 -1
  145. package/src/components/FiltersPane/components/Filter/helpers.ts +3 -3
  146. package/src/components/FiltersPane/types.ts +0 -2
  147. package/src/components/Flag/Flag.stories.tsx +15 -20
  148. package/src/components/Flag/Flag.tsx +2 -2
  149. package/src/components/FlexibleTable/FlexibleTable.stories.tsx +47 -50
  150. package/src/components/FloatDocActions/FloatDocActions.stories.tsx +18 -24
  151. package/src/components/Icon/Icon.stories.tsx +9 -5
  152. package/src/components/Icon/types.ts +1 -1
  153. package/src/components/IconButton/IconButton.stories.tsx +7 -11
  154. package/src/components/IncrementInput/IncrementInput.stories.tsx +25 -25
  155. package/src/components/Input/Input.stories.tsx +35 -61
  156. package/src/components/List/List.stories.tsx +22 -17
  157. package/src/components/List/List.styles.ts +2 -1
  158. package/src/components/Modal/Modal.stories.tsx +50 -59
  159. package/src/components/MoreMenu/MoreMenu.stories.tsx +24 -15
  160. package/src/components/MultiSelect/MultiSelect.stories.tsx +23 -20
  161. package/src/components/NewMoreMenu/NewMoreMenu.stories.tsx +42 -40
  162. package/src/components/Notification/Notification.stories.tsx +34 -32
  163. package/src/components/NumberInput/NumberInput.stories.tsx +27 -27
  164. package/src/components/PhoneInput/PhoneInput.stories.tsx +28 -54
  165. package/src/components/PhoneInput/PhoneInput.tsx +1 -1
  166. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +5 -11
  167. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +1 -4
  168. package/src/components/RadioButton/RadioButton.stories.tsx +28 -31
  169. package/src/components/RadioButton/types.ts +1 -1
  170. package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +15 -9
  171. package/src/components/SearchInput/SearchInput.stories.tsx +14 -14
  172. package/src/components/Select/CustomSelect.stories.tsx +29 -33
  173. package/src/components/Select/MultiSelect.stories.tsx +41 -46
  174. package/src/components/Select/Select.stories.tsx +41 -46
  175. package/src/components/Select/Select.tsx +27 -27
  176. package/src/components/Select/components/SelectList/SelectList.tsx +4 -4
  177. package/src/components/Selector/Selector.stories.tsx +25 -27
  178. package/src/components/Selector/Selector.tsx +1 -2
  179. package/src/components/Skeleton/Skeleton.stories.tsx +13 -12
  180. package/src/components/SmartInput/SmartInput.stories.tsx +23 -23
  181. package/src/components/Status/Status.stories.tsx +29 -30
  182. package/src/components/Status/types.ts +1 -1
  183. package/src/components/Switch/Switch.stories.tsx +19 -26
  184. package/src/components/TextArea/TextArea.stories.tsx +32 -35
  185. package/src/components/TextArea/types.ts +1 -1
  186. package/src/components/TextButton/TextButton.stories.tsx +6 -16
  187. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +13 -21
  188. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +26 -25
  189. package/src/components/TextWithTooltip/TextWithTooltip.tsx +1 -2
  190. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +12 -23
  191. package/src/components/Toaster/Toaster.stories.tsx +16 -14
  192. package/src/components/Tooltip/Tooltip.stories.tsx +5 -4
  193. package/src/components/WithMessages/WithMessages.stories.tsx +16 -20
  194. package/src/components/WithPopup/WithPopup.stories.tsx +27 -26
  195. package/src/components/WithTooltip/WithTooltip.stories.tsx +28 -28
  196. package/src/components/index.ts +0 -1
  197. package/src/helpers/misc.ts +8 -5
  198. package/src/helpers/popper-helpers.ts +0 -1
  199. package/src/theme/helpers.ts +3 -1
  200. package/src/theme/true-jss/ThemedStylesManager.ts +2 -1
  201. package/src/theme/true-jss/TweakStylesManager.ts +1 -2
  202. package/src/theme/types.ts +0 -1
  203. package/src/types.ts +0 -2
  204. package/dist/components/Colors/Colors.d.ts +0 -2
  205. package/dist/components/Colors/Colors.styles.d.ts +0 -1
  206. package/dist/components/Colors/index.d.ts +0 -1
  207. package/src/components/Colors/Colors.styles.ts +0 -36
  208. package/src/components/Colors/Colors.tsx +0 -26
  209. package/src/components/Colors/index.ts +0 -1
  210. package/src/components/Flag/customFlags/augment.d.ts +0 -1
@@ -1,14 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { isNotEmpty } from '@true-engineering/true-react-platform-helpers';
3
- import { ComponentMeta, ComponentStory } from '@storybook/react';
4
- import { FlexibleTable } from './FlexibleTable';
3
+ import { type Meta } from '@storybook/react';
4
+ import { FlexibleTable, IFlexibleTableProps } from './FlexibleTable';
5
5
  import { IFlexibleTableConfigType, IValueComponentProps } from './types';
6
6
 
7
- export default {
8
- title: 'Table/FlexibleTable',
9
- component: FlexibleTable,
10
- } as ComponentMeta<typeof FlexibleTable>;
11
-
12
7
  interface ITableContent {
13
8
  contractCode: string;
14
9
  validFrom: Date;
@@ -77,7 +72,7 @@ const config: IFlexibleTableConfigType<ITableContent> = {
77
72
 
78
73
  const content: ITableContent[] = [
79
74
  {
80
- contractCode: 'SOME_CODE',
75
+ contractCode: 'SOME_CODE1',
81
76
  validFrom: new Date('2015-05-18'),
82
77
  validTo: new Date('2020-05-18'),
83
78
  title: 'Название',
@@ -91,7 +86,7 @@ const content: ITableContent[] = [
91
86
  publicNote: 'Public Note',
92
87
  },
93
88
  {
94
- contractCode: 'SOME_CODE',
89
+ contractCode: 'SOME_CODE2',
95
90
  validFrom: new Date('2015-05-18'),
96
91
  validTo: new Date('2020-05-18'),
97
92
  title: 'Название',
@@ -104,7 +99,7 @@ const content: ITableContent[] = [
104
99
  note: 'Only Note',
105
100
  },
106
101
  {
107
- contractCode: 'SOME_CODE',
102
+ contractCode: 'SOME_CODE3',
108
103
  validFrom: new Date('2015-05-18'),
109
104
  validTo: new Date('2020-05-18'),
110
105
  title: 'Название',
@@ -117,7 +112,7 @@ const content: ITableContent[] = [
117
112
  publicNote: 'Only Public Note',
118
113
  },
119
114
  {
120
- contractCode: 'SOME_CODE_1',
115
+ contractCode: 'SOME_CODE4',
121
116
  validFrom: new Date('2015-05-18'),
122
117
  validTo: new Date('2020-05-18'),
123
118
  title: 'Название',
@@ -129,7 +124,7 @@ const content: ITableContent[] = [
129
124
  status: 'Active',
130
125
  },
131
126
  {
132
- contractCode: 'SOME_CODE',
127
+ contractCode: 'SOME_CODE5',
133
128
  validFrom: new Date('2015-05-18'),
134
129
  validTo: new Date('2020-05-18'),
135
130
  title: 'Название',
@@ -141,7 +136,7 @@ const content: ITableContent[] = [
141
136
  status: 'Active',
142
137
  },
143
138
  {
144
- contractCode: 'SOME_CODE',
139
+ contractCode: 'SOME_CODE6',
145
140
  validFrom: new Date('2015-05-18'),
146
141
  validTo: new Date('2020-05-18'),
147
142
  title: 'Название',
@@ -153,7 +148,7 @@ const content: ITableContent[] = [
153
148
  status: 'Active',
154
149
  },
155
150
  {
156
- contractCode: 'SOME_CODE',
151
+ contractCode: 'SOME_CODE7',
157
152
  validFrom: new Date('2015-05-18'),
158
153
  validTo: new Date('2020-05-18'),
159
154
  title: 'Название',
@@ -165,7 +160,7 @@ const content: ITableContent[] = [
165
160
  status: 'Active',
166
161
  },
167
162
  {
168
- contractCode: 'SOME_CODE',
163
+ contractCode: 'SOME_CODE8',
169
164
  validFrom: new Date('2015-05-18'),
170
165
  validTo: new Date('2020-05-18'),
171
166
  title: 'Название',
@@ -177,7 +172,7 @@ const content: ITableContent[] = [
177
172
  status: 'Active',
178
173
  },
179
174
  {
180
- contractCode: 'SOME_CODE',
175
+ contractCode: 'SOME_CODE9',
181
176
  validFrom: new Date('2015-05-18'),
182
177
  validTo: new Date('2020-05-18'),
183
178
  title: 'Название',
@@ -189,7 +184,7 @@ const content: ITableContent[] = [
189
184
  status: 'Active',
190
185
  },
191
186
  {
192
- contractCode: 'SOME_CODE',
187
+ contractCode: 'SOME_CODE10',
193
188
  validFrom: new Date('2015-05-18'),
194
189
  validTo: new Date('2020-05-18'),
195
190
  title: 'Название',
@@ -201,7 +196,7 @@ const content: ITableContent[] = [
201
196
  status: 'Active',
202
197
  },
203
198
  {
204
- contractCode: 'SOME_CODE',
199
+ contractCode: 'SOME_CODE11',
205
200
  validFrom: new Date('2015-05-18'),
206
201
  validTo: new Date('2020-05-18'),
207
202
  title: 'Название',
@@ -213,7 +208,7 @@ const content: ITableContent[] = [
213
208
  status: 'Active',
214
209
  },
215
210
  {
216
- contractCode: 'SOME_CODE',
211
+ contractCode: 'SOME_CODE12',
217
212
  validFrom: new Date('2015-05-18'),
218
213
  validTo: new Date('2020-05-18'),
219
214
  title: 'Название',
@@ -225,7 +220,7 @@ const content: ITableContent[] = [
225
220
  status: 'Active',
226
221
  },
227
222
  {
228
- contractCode: 'OB_UT_M119',
223
+ contractCode: 'OB_UT_M13',
229
224
  validFrom: new Date('2015-05-18'),
230
225
  validTo: new Date('2020-05-18'),
231
226
  title: 'Название',
@@ -237,7 +232,7 @@ const content: ITableContent[] = [
237
232
  status: 'Active',
238
233
  },
239
234
  {
240
- contractCode: 'SOME_CODE',
235
+ contractCode: 'SOME_CODE14',
241
236
  validFrom: new Date('2015-05-18'),
242
237
  validTo: new Date('2020-05-18'),
243
238
  title: 'Название',
@@ -250,13 +245,15 @@ const content: ITableContent[] = [
250
245
  },
251
246
  ];
252
247
 
253
- const Template: ComponentStory<typeof FlexibleTable<ITableContent>> = (args) => (
248
+ const Story: FC<IFlexibleTableProps<ITableContent, unknown, 'contractCode'>> = (args) => (
254
249
  <div style={{ width: 700, overflow: 'auto' }}>
255
250
  <FlexibleTable<ITableContent>
256
251
  {...args}
257
252
  config={config}
258
253
  content={content}
259
254
  rowAttributes={['contractCode']}
255
+ enabledColumns={undefined}
256
+ uniqueField="contractCode"
260
257
  expandableRowComponent={(_0, _1, close) => (
261
258
  <div onClick={close}>
262
259
  всем привет :)
@@ -268,33 +265,33 @@ const Template: ComponentStory<typeof FlexibleTable<ITableContent>> = (args) =>
268
265
  </div>
269
266
  );
270
267
 
271
- export const Default = Template.bind({});
272
-
273
- Default.args = {
274
- isLoading: false,
275
- isFirstColumnSticky: true,
276
- isHorizontallyScrollable: true,
277
- isExpandableRowComponentInitiallyOpen: false,
278
- };
279
-
280
- Default.argTypes = {
281
- isExpandableRowComponentInitiallyOpen: { control: 'boolean' },
282
- };
283
-
284
- Default.parameters = {
285
- controls: {
286
- exclude: [
287
- 'data',
288
- 'testId',
289
- 'content',
290
- 'config',
291
- 'rowAttributes',
292
- 'headerContent',
293
- 'tweakStyles',
294
- 'onHeadClick',
295
- 'onRowClick',
296
- 'onRowHover',
297
- 'expandableRowComponent',
298
- ],
268
+ const meta: Meta<typeof Story> = {
269
+ title: 'Table/FlexibleTable',
270
+ component: Story,
271
+ args: {
272
+ isLoading: false,
273
+ isFirstColumnSticky: true,
274
+ isHorizontallyScrollable: true,
275
+ isExpandableRowComponentInitiallyOpen: false,
276
+ },
277
+ parameters: {
278
+ controls: {
279
+ exclude: [
280
+ 'data',
281
+ 'testId',
282
+ 'content',
283
+ 'config',
284
+ 'rowAttributes',
285
+ 'headerContent',
286
+ 'tweakStyles',
287
+ 'onHeadClick',
288
+ 'onRowClick',
289
+ 'onRowHover',
290
+ 'expandableRowComponent',
291
+ ],
292
+ },
299
293
  },
300
294
  };
295
+
296
+ export default meta;
297
+ export const Default = {};
@@ -1,6 +1,7 @@
1
1
  import { FC, useState } from 'react';
2
2
  import { isNotEmpty } from '@true-engineering/true-react-platform-helpers';
3
- import type { Meta, StoryObj } from '@storybook/react';
3
+ import { type Meta } from '@storybook/react';
4
+ import { excludeStorybookParams } from '../../helpers';
4
5
  import { Button } from '../Button';
5
6
  import { Checkbox, ICheckboxProps } from '../Checkbox';
6
7
  import { NewMoreMenu } from '../NewMoreMenu';
@@ -13,19 +14,7 @@ import { DOC_ACTIONS_VIEWS } from './components';
13
14
 
14
15
  const DATA_LENGTH = 300;
15
16
 
16
- const Actions: FC = () => (
17
- <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
18
- <TextButton icon="trash-can" view="custom">
19
- Удалить
20
- </TextButton>
21
- <TextButton icon="pencil">Редактировать</TextButton>
22
- <Button view="secondary">Отказать</Button>
23
- <Button>Одобрить</Button>
24
- <NewMoreMenu items={[]} />
25
- </div>
26
- );
27
-
28
- const DocActionsWithData: FC<IFloatDocActionsProps> = (props) => {
17
+ const Story: FC<IFloatDocActionsProps> = (args) => {
29
18
  const [isOpen, setIsOpen] = useState(false);
30
19
  const [state, setState] = useState<Set<number>>(new Set());
31
20
 
@@ -56,7 +45,7 @@ const DocActionsWithData: FC<IFloatDocActionsProps> = (props) => {
56
45
  };
57
46
 
58
47
  const isAllRowsSelected = state.size === DATA_LENGTH;
59
- const title = props.title + ': ' + state.size;
48
+ const title = args.title + ': ' + state.size;
60
49
 
61
50
  return (
62
51
  <div style={{ display: 'flex', gap: '50px' }}>
@@ -78,14 +67,22 @@ const DocActionsWithData: FC<IFloatDocActionsProps> = (props) => {
78
67
  </table>
79
68
  <div style={{ position: 'sticky', bottom: '12px', left: '8px', right: '18px' }}>
80
69
  <FloatDocActionsComponent
81
- {...props}
70
+ {...args}
82
71
  title={title}
83
72
  isOpen={isOpen}
84
73
  isChecked={isAllRowsSelected}
85
74
  isSemiChecked={!isAllRowsSelected && state.size !== 0}
86
75
  onSelect={handleSelectAll}
87
76
  >
88
- <Actions />
77
+ <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
78
+ <TextButton icon="trash-can" view="custom">
79
+ Удалить
80
+ </TextButton>
81
+ <TextButton icon="calendar">Редактировать</TextButton>
82
+ <Button view="secondary">Отказать</Button>
83
+ <Button>Одобрить</Button>
84
+ <NewMoreMenu items={[]} />
85
+ </div>
89
86
  </FloatDocActionsComponent>
90
87
  </div>
91
88
  </div>
@@ -93,9 +90,9 @@ const DocActionsWithData: FC<IFloatDocActionsProps> = (props) => {
93
90
  );
94
91
  };
95
92
 
96
- const meta: Meta<typeof DocActionsWithData> = {
93
+ const meta: Meta<typeof Story> = {
97
94
  title: 'Table/FloatDocActions',
98
- component: DocActionsWithData,
95
+ component: Story,
99
96
  args: {
100
97
  title: 'Выбрано',
101
98
  view: 'neutral',
@@ -105,13 +102,10 @@ const meta: Meta<typeof DocActionsWithData> = {
105
102
  },
106
103
  parameters: {
107
104
  controls: {
108
- exclude: ['actions'],
105
+ exclude: excludeStorybookParams(['actions']),
109
106
  },
110
107
  },
111
108
  };
112
109
 
113
110
  export default meta;
114
-
115
- type Story = StoryObj<typeof FloatDocActionsComponent>;
116
-
117
- export const Default: Story = {};
111
+ export const Default = {};
@@ -5,10 +5,6 @@ import { Icon } from './Icon';
5
5
  import { iconsMap } from './icons';
6
6
  import { IIconType } from './types';
7
7
 
8
- export default {
9
- title: 'Data Display/Icon',
10
- };
11
-
12
8
  const GalleryIcon: FC<{ type: IIconType }> = ({ type }) => (
13
9
  <div
14
10
  key={type}
@@ -49,7 +45,7 @@ const GalleryIcon: FC<{ type: IIconType }> = ({ type }) => (
49
45
  </div>
50
46
  );
51
47
 
52
- export const Gallery = () => {
48
+ const Story: FC = () => {
53
49
  const theme = useTheme();
54
50
  const notCustomizedIcons = Object.keys(iconsMap).filter((icon) =>
55
51
  isEmpty(theme.icons?.[icon]),
@@ -93,3 +89,11 @@ export const Gallery = () => {
93
89
  </div>
94
90
  );
95
91
  };
92
+
93
+ const meta = {
94
+ title: 'Data Display/Icon',
95
+ component: Story,
96
+ };
97
+
98
+ export default meta;
99
+ export const Default = {};
@@ -4,7 +4,7 @@ import { iconsMap } from './icons';
4
4
  export type ISvgIcon = string;
5
5
 
6
6
  type IUiKitIconsMap = typeof iconsMap;
7
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
7
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
8
8
  export interface IIconsMap extends IUiKitIconsMap {}
9
9
 
10
10
  export type IIconType = keyof IIconsMap;
@@ -1,11 +1,11 @@
1
- import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import { iconsMap } from '../Icon';
1
+ import { type Meta } from '@storybook/react';
2
+ import { iconsMap, IIconType } from '../Icon';
3
3
  import { IconButton } from './IconButton';
4
4
  import { ICON_BUTTON_SIZES, ICON_BUTTON_VIEWS } from './constants';
5
5
 
6
- const icons = Object.keys(iconsMap);
6
+ const icons = Object.keys(iconsMap) as IIconType[];
7
7
 
8
- export default {
8
+ const meta: Meta<typeof IconButton> = {
9
9
  title: 'Buttons/IconButton',
10
10
  component: IconButton,
11
11
  args: {
@@ -21,11 +21,7 @@ export default {
21
21
  size: { options: ICON_BUTTON_SIZES, control: 'inline-radio' },
22
22
  view: { options: ICON_BUTTON_VIEWS, control: 'inline-radio' },
23
23
  },
24
- parameters: {
25
- controls: {
26
- exclude: ['tweakStyles', 'testId', 'data'],
27
- },
28
- },
29
- } as ComponentMeta<typeof IconButton>;
24
+ };
30
25
 
31
- export const Default: ComponentStory<typeof IconButton> = (args) => <IconButton {...args} />;
26
+ export default meta;
27
+ export const Default = {};
@@ -1,31 +1,31 @@
1
- import { useState } from 'react';
2
- import { ComponentStory } from '@storybook/react';
3
- import { IncrementInput } from './IncrementInput';
1
+ import { FC, useState } from 'react';
2
+ import { type Meta } from '@storybook/react';
3
+ import { IIncrementInputProps, IncrementInput } from './IncrementInput';
4
4
 
5
- export default {
6
- title: 'Inputs/IncrementInput',
7
- component: IncrementInput,
8
- };
9
-
10
- const Template: ComponentStory<typeof IncrementInput> = (args) => {
5
+ const Story: FC<IIncrementInputProps> = (args) => {
11
6
  const [value, setValue] = useState<number>();
12
7
  return <IncrementInput {...args} value={value} onChange={(v) => setValue(v)} />;
13
8
  };
14
9
 
15
- export const Default = Template.bind({});
16
-
17
- Default.args = {
18
- min: 0,
19
- max: 99,
20
- step: 1,
21
- intPartPrecision: 10,
22
- label: 'Label',
23
- placeholder: 'Placeholder',
24
- isInvalid: false,
25
- errorMessage: 'Error Text',
26
- isDisabled: false,
27
- isRequired: false,
28
- isReadonly: false,
29
- icon: 'question',
30
- isClearable: true,
10
+ const meta: Meta<typeof Story> = {
11
+ title: 'Inputs/IncrementInput',
12
+ component: Story,
13
+ args: {
14
+ min: 0,
15
+ max: 99,
16
+ step: 1,
17
+ intPartPrecision: 10,
18
+ label: 'Label',
19
+ placeholder: 'Placeholder',
20
+ isInvalid: false,
21
+ errorMessage: 'Error Text',
22
+ isDisabled: false,
23
+ isRequired: false,
24
+ isReadonly: false,
25
+ icon: 'information',
26
+ isClearable: true,
27
+ },
31
28
  };
29
+
30
+ export default meta;
31
+ export const Default = {};
@@ -1,38 +1,17 @@
1
- import { useState } from 'react';
2
- import { ComponentStory } from '@storybook/react';
1
+ import { FC, useState } from 'react';
2
+ import { type Meta } from '@storybook/react';
3
+ import { GROUP_PLACEMENTS } from '../ControlWrapper';
3
4
  import { iconsMap } from '../Icon';
4
5
  import { IInputProps, Input } from './Input';
5
6
 
6
7
  const types: Array<IInputProps['type']> = ['text', 'password', 'email', 'number'];
7
- const groupPositions = [
8
- undefined,
9
- 'top',
10
- 'bottom',
11
- 'top-left',
12
- 'top-right',
13
- 'bottom-left',
14
- 'bottom-right',
15
- 'left',
16
- 'right',
17
- 'middle',
18
- ];
8
+
19
9
  const masks = [undefined, '99/99', 'aaa-aaa', '***+***'];
20
- const icons = [undefined, ...Object.keys(iconsMap)];
21
10
 
22
- export default {
23
- title: 'Inputs/Input',
24
- component: Input,
25
- argTypes: {
26
- type: { control: 'radio', options: types },
27
- icon: { control: 'select', options: icons },
28
- mask: { control: 'select', options: masks },
29
- groupPositions: { control: 'select', options: groupPositions },
30
- },
31
- };
11
+ const icons = [undefined, ...Object.keys(iconsMap)];
32
12
 
33
- const Template: ComponentStory<typeof Input> = (args) => {
13
+ const Story: FC<IInputProps> = (args) => {
34
14
  const [value, setValue] = useState('');
35
-
36
15
  return (
37
16
  <div style={{ width: 300 }}>
38
17
  <Input {...args} value={value} onChange={setValue} />
@@ -40,39 +19,34 @@ const Template: ComponentStory<typeof Input> = (args) => {
40
19
  );
41
20
  };
42
21
 
43
- export const Default = Template.bind({});
44
-
45
- Default.args = {
46
- label: 'Label',
47
- placeholder: 'Placeholder',
48
- infoMessage: 'Message Info',
49
- type: 'text',
50
- isInvalid: false,
51
- units: '',
52
- errorMessage: 'Error Text',
53
- isActive: false,
54
- isDisabled: false,
55
- isRequired: false,
56
- isReadonly: false,
57
- isClearable: false,
58
- isLoading: false,
59
- isAutoSized: false,
60
- shouldAlwaysShowPlaceholder: false,
61
- groupPlacement: undefined,
62
- };
63
-
64
- Default.parameters = {
65
- controls: {
66
- exclude: [
67
- 'testId',
68
- 'data',
69
- 'tabIndex',
70
- 'onChange',
71
- 'onFocus',
72
- 'onBlur',
73
- 'onPaste',
74
- 'onKeyDown',
75
- 'onIconClick',
76
- ],
22
+ const meta: Meta<typeof Story> = {
23
+ title: 'Inputs/Input',
24
+ component: Story,
25
+ args: {
26
+ label: 'Label',
27
+ placeholder: 'Placeholder',
28
+ infoMessage: 'Message Info',
29
+ type: 'text',
30
+ isInvalid: false,
31
+ units: '',
32
+ errorMessage: 'Error Text',
33
+ isActive: false,
34
+ isDisabled: false,
35
+ isRequired: false,
36
+ isReadonly: false,
37
+ isClearable: false,
38
+ isLoading: false,
39
+ isAutoSized: false,
40
+ shouldAlwaysShowPlaceholder: false,
41
+ groupPlacement: undefined,
42
+ },
43
+ argTypes: {
44
+ type: { control: 'radio', options: types },
45
+ icon: { control: 'select', options: icons },
46
+ mask: { control: 'select', options: masks },
47
+ groupPlacement: { options: [undefined, ...GROUP_PLACEMENTS], control: 'select' },
77
48
  },
78
49
  };
50
+
51
+ export default meta;
52
+ export const Default = {};
@@ -1,13 +1,15 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
1
+ import { FC } from 'react';
2
+ import { type Meta } from '@storybook/react';
3
+ import { excludeStorybookParams } from '../../helpers';
2
4
  import { colors } from '../../theme';
3
- import { List } from './List';
5
+ import { IListProps, List } from './List';
4
6
  import { IListItemProps as IListItem } from './components';
5
7
 
6
8
  const listItems: IListItem[] = [
7
9
  {
8
10
  item: 'Печатать билет',
9
11
  onClick: console.log,
10
- icon: 'sign-out',
12
+ icon: 'filter',
11
13
  },
12
14
  { item: 'Выписать', onClick: console.log, withIconGap: true },
13
15
  {
@@ -62,20 +64,7 @@ const listItems: IListItem[] = [
62
64
  },
63
65
  ];
64
66
 
65
- export default {
66
- title: 'Data Display/List',
67
- component: List,
68
- args: {
69
- items: listItems,
70
- },
71
- parameters: {
72
- controls: {
73
- exclude: ['data', 'tweakStyles', 'testId', 'onClick'],
74
- },
75
- },
76
- } as ComponentMeta<typeof List>;
77
-
78
- export const Default: ComponentStory<typeof List> = (args) => (
67
+ const Story: FC<IListProps> = (args) => (
79
68
  <div
80
69
  style={{
81
70
  border: '1px dotted rgba(0,0,0,.2)',
@@ -88,3 +77,19 @@ export const Default: ComponentStory<typeof List> = (args) => (
88
77
  <List {...args} />
89
78
  </div>
90
79
  );
80
+
81
+ const meta: Meta<typeof Story> = {
82
+ title: 'Data Display/List',
83
+ component: Story,
84
+ args: {
85
+ items: listItems,
86
+ },
87
+ parameters: {
88
+ controls: {
89
+ exclude: excludeStorybookParams(['items']),
90
+ },
91
+ },
92
+ };
93
+
94
+ export default meta;
95
+ export const Default = {};
@@ -1,4 +1,4 @@
1
- import { colors, ITweakStyles, createThemedStyles } from '../../theme';
1
+ import { colors, createThemedStyles, ITweakStyles } from '../../theme';
2
2
  import { IWithPopupStyles } from '../WithPopup';
3
3
 
4
4
  export const useStyles = createThemedStyles('List', {
@@ -8,6 +8,7 @@ export const useStyles = createThemedStyles('List', {
8
8
  padding: [8, 0],
9
9
  listStyle: 'none',
10
10
  margin: 0,
11
+ textAlign: 'left',
11
12
  },
12
13
 
13
14
  nestedItems: {