@true-engineering/true-react-common-ui-kit 4.0.0-alpha1 → 4.0.0-alpha11

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 (199) hide show
  1. package/README.md +11 -567
  2. package/dist/components/Button/Button.styles.d.ts +1 -1
  3. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -1
  4. package/dist/components/ControlWrapper/ControlWrapper.d.ts +2 -0
  5. package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +2 -1
  6. package/dist/components/ControlWrapper/index.d.ts +1 -0
  7. package/dist/components/ControlWrapper/types.d.ts +3 -0
  8. package/dist/components/DatePicker/DatePicker.d.ts +2 -2
  9. package/dist/components/DatePicker/helpers.d.ts +3 -0
  10. package/dist/components/DatePicker/types.d.ts +3 -1
  11. package/dist/components/FiltersPane/FiltersPane.d.ts +4 -2
  12. package/dist/components/FiltersPane/components/Filter/Filter.d.ts +2 -2
  13. package/dist/components/FiltersPane/components/Filter/helpers.d.ts +4 -0
  14. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +1 -1
  15. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
  16. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +3 -1
  17. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +2 -2
  18. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +2 -2
  19. package/dist/components/FiltersPane/types.d.ts +15 -5
  20. package/dist/components/Flag/customFlags/customFlags.d.ts +10 -0
  21. package/dist/components/Flag/customFlags/index.d.ts +1 -0
  22. package/dist/components/FlexibleTable/FlexibleTable.d.ts +4 -2
  23. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +6 -6
  24. package/dist/components/FlexibleTable/constants.d.ts +18 -2
  25. package/dist/components/FlexibleTable/types.d.ts +1 -1
  26. package/dist/components/Icon/icons-list.d.ts +1 -1
  27. package/dist/components/IconButton/IconButton.styles.d.ts +1 -1
  28. package/dist/components/Input/Input.d.ts +3 -2
  29. package/dist/components/Input/InputBase.d.ts +2 -2
  30. package/dist/components/List/List.d.ts +1 -1
  31. package/dist/components/List/index.d.ts +2 -1
  32. package/dist/components/List/types.d.ts +4 -0
  33. package/dist/components/Modal/Modal.styles.d.ts +1 -1
  34. package/dist/components/Notification/Notification.styles.d.ts +1 -1
  35. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
  36. package/dist/components/SearchInput/SearchInput.d.ts +2 -2
  37. package/dist/components/SearchInput/SearchInput.styles.d.ts +3 -5
  38. package/dist/components/Select/Select.d.ts +5 -3
  39. package/dist/components/Select/Select.styles.d.ts +4 -4
  40. package/dist/components/Select/index.d.ts +1 -1
  41. package/dist/components/Status/Status.styles.d.ts +3 -2
  42. package/dist/components/Status/constants.d.ts +0 -1
  43. package/dist/components/Status/types.d.ts +5 -2
  44. package/dist/components/TextArea/TextArea.d.ts +2 -3
  45. package/dist/components/TextArea/index.d.ts +0 -1
  46. package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
  47. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  48. package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
  49. package/dist/components/WithMessages/WithMessages.styles.d.ts +1 -1
  50. package/dist/components/WithPopup/WithPopup.d.ts +21 -6
  51. package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
  52. package/dist/components/WithPopup/helpers.d.ts +2 -0
  53. package/dist/components/WithPopup/types.d.ts +3 -0
  54. package/dist/components/WithTooltip/WithTooltip.styles.d.ts +1 -0
  55. package/dist/hooks/index.d.ts +1 -0
  56. package/dist/hooks/use-merge.d.ts +1 -0
  57. package/dist/hooks/use-mixed-styles.d.ts +3 -1
  58. package/dist/hooks/use-tweak-styles.d.ts +5 -5
  59. package/dist/theme/Provider.d.ts +6 -3
  60. package/dist/theme/common.d.ts +4 -2
  61. package/dist/theme/create-themed-styles.d.ts +2 -0
  62. package/dist/theme/helpers.d.ts +9 -3
  63. package/dist/theme/index.d.ts +2 -0
  64. package/dist/theme/true-jss/ThemedStylesManager.d.ts +18 -0
  65. package/dist/theme/true-jss/TweakStylesManager.d.ts +34 -0
  66. package/dist/theme/true-jss/index.d.ts +2 -0
  67. package/dist/theme/true-jss/jss-context.d.ts +9 -0
  68. package/dist/theme/types.d.ts +4 -2
  69. package/dist/true-react-common-ui-kit.js +7308 -6412
  70. package/dist/true-react-common-ui-kit.js.map +1 -1
  71. package/dist/true-react-common-ui-kit.umd.cjs +7136 -6241
  72. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  73. package/dist/types.d.ts +10 -3
  74. package/package.json +1 -1
  75. package/src/components/ControlWrapper/ControlWrapper.styles.ts +6 -5
  76. package/src/components/ControlWrapper/ControlWrapper.tsx +8 -2
  77. package/src/components/ControlWrapper/index.ts +1 -0
  78. package/src/components/ControlWrapper/types.ts +3 -0
  79. package/src/components/DatePicker/DatePicker.tsx +9 -4
  80. package/src/components/DatePicker/helpers.ts +13 -1
  81. package/src/components/DatePicker/types.ts +4 -1
  82. package/src/components/FiltersPane/FiltersPane.stories.tsx +4 -2
  83. package/src/components/FiltersPane/FiltersPane.tsx +14 -9
  84. package/src/components/FiltersPane/components/Filter/Filter.tsx +24 -17
  85. package/src/components/FiltersPane/components/Filter/helpers.ts +18 -0
  86. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +1 -1
  87. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +6 -1
  88. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +27 -22
  89. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.ts +1 -0
  90. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +1 -1
  91. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +7 -5
  92. package/src/components/FiltersPane/types.ts +23 -5
  93. package/src/components/Flag/Flag.stories.tsx +2 -1
  94. package/src/components/Flag/Flag.styles.ts +4 -0
  95. package/src/components/Flag/Flag.tsx +23 -9
  96. package/src/components/Flag/customFlags/AB.svg +1 -0
  97. package/src/components/Flag/customFlags/OS.svg +1 -0
  98. package/src/components/Flag/customFlags/augment.d.ts +1 -0
  99. package/src/components/Flag/customFlags/customFlags.ts +13 -0
  100. package/src/components/Flag/customFlags/index.ts +1 -0
  101. package/src/components/FlexibleTable/FlexibleTable.tsx +13 -12
  102. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +9 -8
  103. package/src/components/FlexibleTable/constants.ts +6 -3
  104. package/src/components/FlexibleTable/types.ts +1 -5
  105. package/src/components/IncrementInput/IncrementInput.styles.ts +1 -1
  106. package/src/components/Input/Input.tsx +5 -3
  107. package/src/components/Input/InputBase.tsx +22 -19
  108. package/src/components/List/List.tsx +5 -2
  109. package/src/components/List/index.ts +2 -1
  110. package/src/components/List/types.ts +5 -0
  111. package/src/components/PhoneInput/PhoneInput.stories.tsx +2 -1
  112. package/src/components/PhoneInput/PhoneInput.tsx +5 -2
  113. package/src/components/SearchInput/SearchInput.styles.ts +16 -29
  114. package/src/components/SearchInput/SearchInput.tsx +17 -30
  115. package/src/components/Select/Select.tsx +12 -2
  116. package/src/components/Select/components/SelectList/SelectList.tsx +1 -1
  117. package/src/components/Select/index.ts +1 -1
  118. package/src/components/Status/Status.stories.tsx +54 -1
  119. package/src/components/Status/Status.styles.ts +2 -37
  120. package/src/components/Status/constants.ts +0 -10
  121. package/src/components/Status/types.ts +7 -3
  122. package/src/components/TextArea/TextArea.tsx +29 -14
  123. package/src/components/TextArea/index.ts +0 -1
  124. package/src/components/Tooltip/Tooltip.styles.ts +2 -0
  125. package/src/components/Tooltip/Tooltip.tsx +1 -1
  126. package/src/components/WithPopup/WithPopup.stories.tsx +1 -0
  127. package/src/components/WithPopup/WithPopup.styles.ts +2 -0
  128. package/src/components/WithPopup/WithPopup.tsx +64 -16
  129. package/src/components/WithPopup/helpers.ts +9 -0
  130. package/src/components/WithPopup/types.ts +7 -0
  131. package/src/components/WithTooltip/WithTooltip.styles.ts +6 -0
  132. package/src/components/WithTooltip/WithTooltip.tsx +7 -2
  133. package/src/constants/phone-info.ts +20 -33
  134. package/src/helpers/phone.ts +19 -15
  135. package/src/hooks/index.ts +1 -0
  136. package/src/hooks/use-merge.ts +8 -0
  137. package/src/hooks/use-mixed-styles.ts +9 -11
  138. package/src/hooks/use-tweak-styles.ts +49 -27
  139. package/src/theme/Provider.tsx +10 -5
  140. package/src/theme/common.ts +5 -2
  141. package/src/theme/create-themed-styles.ts +78 -0
  142. package/src/theme/helpers.ts +39 -39
  143. package/src/theme/index.ts +2 -0
  144. package/src/theme/true-jss/ThemedStylesManager.ts +92 -0
  145. package/src/theme/true-jss/TweakStylesManager.ts +157 -0
  146. package/src/theme/true-jss/index.ts +2 -0
  147. package/src/theme/true-jss/jss-context.tsx +34 -0
  148. package/src/theme/types.ts +4 -2
  149. package/src/types.ts +17 -4
  150. package/dist/components/AccountInfo/AccountInfo.stories.d.ts +0 -6
  151. package/dist/components/AddButton/AddButton.stories.d.ts +0 -6
  152. package/dist/components/Button/Button.stories.d.ts +0 -6
  153. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -8
  154. package/dist/components/CloseButton/CloseButton.stories.d.ts +0 -5
  155. package/dist/components/Colors/Colors.stories.d.ts +0 -5
  156. package/dist/components/ControlWrapper/ControlWrapper.stories.d.ts +0 -6
  157. package/dist/components/DateInput/DateInput.stories.d.ts +0 -7
  158. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
  159. package/dist/components/Description/Description.stories.d.ts +0 -16
  160. package/dist/components/FileInput/FileInput.stories.d.ts +0 -7
  161. package/dist/components/FileItem/FileItem.stories.d.ts +0 -8
  162. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +0 -31
  163. package/dist/components/Flag/Flag.stories.d.ts +0 -12
  164. package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +0 -19
  165. package/dist/components/Icon/Icon.stories.d.ts +0 -6
  166. package/dist/components/IconButton/IconButton.stories.d.ts +0 -6
  167. package/dist/components/IncrementInput/IncrementInput.stories.d.ts +0 -6
  168. package/dist/components/Input/Input.stories.d.ts +0 -25
  169. package/dist/components/List/List.stories.d.ts +0 -5
  170. package/dist/components/Modal/Modal.stories.d.ts +0 -29
  171. package/dist/components/MoreMenu/MoreMenu.stories.d.ts +0 -6
  172. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -13
  173. package/dist/components/NewMoreMenu/NewMoreMenu.stories.d.ts +0 -12
  174. package/dist/components/Notification/Notification.stories.d.ts +0 -8
  175. package/dist/components/NumberInput/NumberInput.stories.d.ts +0 -7
  176. package/dist/components/PhoneInput/PhoneInput.stories.d.ts +0 -28
  177. package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.d.ts +0 -5
  178. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -7
  179. package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -16
  180. package/dist/components/Select/CustomSelect.stories.d.ts +0 -11
  181. package/dist/components/Select/MultiSelect.stories.d.ts +0 -15
  182. package/dist/components/Select/Select.stories.d.ts +0 -15
  183. package/dist/components/Selector/Selector.stories.d.ts +0 -7
  184. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -6
  185. package/dist/components/SmartInput/SmartInput.stories.d.ts +0 -18
  186. package/dist/components/Status/Status.stories.d.ts +0 -6
  187. package/dist/components/Switch/Switch.stories.d.ts +0 -16
  188. package/dist/components/TextArea/TextArea.stories.d.ts +0 -17
  189. package/dist/components/TextArea/types.d.ts +0 -2
  190. package/dist/components/TextButton/TextButton.stories.d.ts +0 -6
  191. package/dist/components/TextWithInfo/TextWithInfo.stories.d.ts +0 -12
  192. package/dist/components/TextWithTooltip/TextWithTooltip.stories.d.ts +0 -24
  193. package/dist/components/ThemedPreloader/ThemedPreloader.stories.d.ts +0 -17
  194. package/dist/components/Toaster/Toaster.stories.d.ts +0 -5
  195. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -5
  196. package/dist/components/WithMessages/WithMessages.stories.d.ts +0 -7
  197. package/dist/components/WithPopup/WithPopup.stories.d.ts +0 -16
  198. package/dist/components/WithTooltip/WithTooltip.stories.d.ts +0 -6
  199. package/src/components/TextArea/types.ts +0 -6
package/README.md CHANGED
@@ -2,580 +2,24 @@
2
2
 
3
3
  Модульный UI Kit на React с поддержкой темизации.
4
4
 
5
- # Публикация
6
-
7
- 1. Слить Pull Request с увеличением версии пакета в файле `package.json` в ветке `master`
8
- 2. `yarn build` локально из ветки `master`
9
- 3. `npm publish` локально из ветки `master`
10
- 4. Добавить тег с версией в гите
11
-
12
5
  # Release Notes
13
6
 
14
- ## 3.42.0
15
-
16
- ### Changes
17
-
18
- - **FiltersPane**: Добавляет `isClearable` в `filtersConfig`
19
- - **FiltersPane**: Заменяет шеврон на крестик у элемента фильтра при активном `isClearable`. Нажатие на крестик производит очистку фильтра
20
-
21
- ## 3.41.0
22
-
23
- ### Changes
24
-
25
- - **SmartInput**: Переписан + исправлен баг с неправильной позицией каретки при повторном вводе
26
- - **SmartInput**: Добавлена пропса `isTransliterationEnabled`
27
- - **SmartInput**: У `onChange` добавлено два новых аргумента `rawValue` и `event`
28
-
29
- ## 3.40.0
30
-
31
- ### Changes
32
-
33
- - Добавлен компонент **WithTooltip** (`floating-ui`)
34
- - **TextWithTooltip** deprecated
35
-
36
- ## 3.39.0
37
-
38
- ### Changes
39
-
40
- - **FlexibleTableCell**: Добавляет `onCellClick` в `config`
41
-
42
- ## 3.38.0
43
-
44
- ### Changes
45
-
46
- - **Select**: Запрещает открывать `SelectList` при `isReadonly`
47
-
48
- ## 3.37.0
49
-
50
- ### Changes
51
-
52
- - **IUiKitTheme**: Удалено поле name
53
-
54
- ## 3.36.0
55
-
56
- ### Changes
57
-
58
- - **ListItem**: Добавляет экспорт ListItem
59
-
60
- ## 3.35.0
61
-
62
- ### Changes
63
-
64
- - **FlexibleTable**: новая пропса `shouldRenderHeader`
65
-
66
- ## 3.34.0
67
-
68
- ### Changes
69
-
70
- - **Toaster**: Пропы `title` и `text` заменёны на `ReactNode`
71
- - **Toaster**: Обработан случай бесконечного `timeout` (напр. Infinity)
72
-
73
- ## 3.33.2
74
-
75
- ### Changes
76
-
77
- - **FlexibleTableCell**: Кастомизирована проверка необходимости отрисовки
78
-
79
- ## 3.33.1
80
-
81
- ### Changes
82
-
83
- - **FlexibleTable**: Поведение пропсы `position` стало таким же как `isFirstColumnSticky`
84
-
85
- ## 3.33.0
86
-
87
- ### Changes
88
-
89
- - **WithPopup**: Пропсы триггера разделены на `referenceProps` (для тегов) и `triggerProps` (для компонентов)
90
- - **WithPopup**: Для `isActive` триггера добавлен класс `active`
91
- - **WithPopup**: Для `flip` добавлен `fallbackAxisSideDirection`
92
- - **ICommonProps**: Разделены на составляющие (чтоб не пикать/омитить)
93
-
94
- ## 3.32.0
95
-
96
- ### Changes
97
-
98
- - **Notification**: Добавлен проп `icon`
99
- - **Notification**: В проп `type` добавлен вариант `custom`
100
-
101
- ## 3.31.0
102
-
103
- ### Changes
104
-
105
- - **FlexibleTable**: Добавлен экспорт `IFlexibleTableRowConfig`
106
-
107
- ## 3.30.0
108
-
109
- ### Changes
110
-
111
- - **WithPopup**: Добавлен проп `shouldStopPropagation` для изменения поведения при onClick
112
- - **WithPopup**: Исправлено поведение всплытия при нажатии на триггер
113
-
114
- ## 3.29.1
115
-
116
- ### Changes
117
-
118
- - **Select**: Убирает `isActive` из `Omit`
119
-
120
- ## 3.29.0
121
-
122
- ### Changes
123
-
124
- - **FlexibleTableRow** Убрана зависимость от `activeRows`, добавлен проп `isActive`
125
- - **FlexibleTableRow** Добавлен проп `isFocusable` для контроля ререндера строки при ховере
126
- - **FlexibleTableCell** Добавлен проп `isActiveRow`
127
- - **FlexibleTable** Значения `renderMode` собраны в `TableRenders`
128
- - **FlexibleTable** Значения добавлен проп `isRowFocusable`
129
-
130
- ## 3.28.4
131
-
132
- ### Changes
133
-
134
- - **FilterWrapper**: Поправлено взаимодействие с **WithPopup**
135
-
136
- ## 3.28.3
137
-
138
- ### Changes
139
-
140
- - **List**: Фикс `testId` у айтемов
141
- - **WithPopup**: Фикс рендера пропсы `isDisabled`
142
-
143
- ## 3.28.2
144
-
145
- ### Changes
146
-
147
- - **List**: `shouldDrawSpacerBelow` и `shouldDrawSpacerAbove` теперь не рендерятся первыми и последними в списке
148
-
149
- ## 3.28.1
150
-
151
- ### Changes
152
-
153
- - **ListItem**: `onClick` стал опциональным. При отсутствии - базовый `onClick` **List** вызван не будет
154
-
155
- ## 3.28.0
156
-
157
- ### Changes
158
-
159
- - Поднята версия `true-react-platform-helpers` (требуется `node:20`)
160
- - Подняты версии `jss` и `react-jss` (можно избавляться от `resolutions`)
161
- - **transformToKebab** и **addDataAttributes**: помечены как `deprecated`
162
- - **useTweakStyles**: усилен тип ClassName
163
- - **FlexibleTable**: `IValueComponent` и `ITitleComponent` заменены на `IValueComponentProps` и `ITitleComponentProps`
164
- - **FlexibleTable**: `title` и `component` переписаны на `IRenderNode`, `titleComponent` удален
165
- - **FlexibleTable**: добавлена типизация для `uniqueField` и соответствующих `onRowClick` и `onRowHover`
166
- - **FlexibleTable**: добавлена типизация для `headerContent` и ~~`titleComponent`~~ `title`
167
-
168
- ## 3.27.1
169
-
170
- ### Changes
171
-
172
- - **List**: Фикс стилей отступов
173
-
174
- ## 3.27.0
175
-
176
- ### Changes
177
-
178
- - **List**: Добавлена поддержка вложенных пунктов меню
179
- - **IListItem**: Новое свойство `nestedItems` для рендера вложенных пунктов меню
180
-
181
- ## 3.26.1
182
-
183
- ### Changes
184
-
185
- - **Input**: Исправлен баг с позиционированием `label` при `shouldAlwaysShowPlaceholder`
186
-
187
- ## 3.26.0
188
-
189
- ### Changes
190
-
191
- - **WithPopup**: Компонент переписан в соответствии с документацией
192
- - **WithPopup**: Изменены сигнатуры `trigger` и `children`
193
- - **WithPopup**: Новое свойство `isTriggerWrapped` - должен ли WithPopup рендерить свой div-wrapper в качестве триггера
194
- - **WithPopup**: `onToggle` - добавлен event вторым параметром
195
- - **WithPopup**: `shouldRenderInBody` - дефолтное значение теперь `true`
196
- - **Button**: Добавлено наследование от `IDomInteractions` для поддержки всех событий пробрасываемых **WithPopup**
197
-
198
- ## 3.25.1
199
-
200
- ### Changes
201
-
202
- - **NumberInput**: Фикс бага с неправильным поведением каретки
203
-
204
- ## 3.25.0
205
-
206
- ### Changes
207
-
208
- - **Select**: Добавлена поддержка проп `header` и `footer`
209
- - **Select**: Исправлено отображение дропдауна в случае, если у поля есть `errorMessage`
210
- - **Select**: Добавлен `tabIndex` для списка, с целью корректной работы для [Keyboard-focusable scroll containers](https://chromestatus.com/feature/5231964663578624)
211
-
212
- ### Chore
213
-
214
- - **Select**: Исправлен каст типа `Styles` на `CSSProperties`
215
- - **Select**: Удалён type guard для проверки `isMultiSelect`
216
- - **SelectList**: Исправлены проверки на `isMultiSelect`
217
- - **TextWithTooltip**: Исправлен каст типа `Styles` на `CSSProperties`
218
-
219
- ## 3.24.1
220
-
221
- ### Changes
222
-
223
- - Фикс бага с перерендером внутренних компонентов таблицы
224
-
225
- ## 3.24.0
226
-
227
- ### Changes
228
-
229
- - Добавлены компоненты: **FileInput**, **FileItem**
230
-
231
- ## v3.23.0
232
-
233
- ### Changes
234
-
235
- - **DatePicker**: добавлена пропса `excludeScrollbar`
236
-
237
- ## v3.22.0
238
-
239
- ### Changes
240
-
241
- - **DatePicker**: добавлена пропса `fixedHeight`
242
-
243
- ## v3.21.0
244
-
245
- ### Changes
246
-
247
- - **DatePicker**: добавлена пропса `highlightDates`
248
-
249
- ## v3.20.1
250
-
251
- ### Changes
252
-
253
- - **TextArea**: убран дефолтный цвет `invalidLabel`
254
-
255
- ## v3.20.0
256
-
257
- ### Changes
258
-
259
- - **TextArea**: добавлена пропса `shouldAlwaysShowPlaceholder`
260
-
261
- ## v3.19.0
262
-
263
- ### Changes
264
-
265
- - **Select**: добавлен синхронный вызов onType при debounceTime = 0
266
-
267
- ## v3.18.0
268
-
269
- ### Changes
270
-
271
- - **WithPopup**: добавлены классы для анимации
272
- - **FilterWrapper**: анимация вынесена в темы
273
-
274
- ## v3.17.0
275
-
276
- ### Changes
277
-
278
- - **FlexibleTable**: добавлена пропса shouldRenderDataId для config, включающая рендер data-id={columnName} для ячеек
279
-
280
- ## v3.16.0
281
-
282
- ### Changes
283
-
284
- - **FiltersPane**: добавлены tweakStyles для FilterWrapper
285
- - **FilterWrapper + Filter**: переписан с использованием WithPopup
286
- - **FilterSelect**: добавлено свойство onClose
287
- - **WithPopup**: добавлена поддержка transition
288
- - **NewMoreMenu**: добавлен свойство onToggle
289
-
290
- ## v3.15.4
291
-
292
- ### Changes
7
+ [Changelog для версии 3.x.x](./CHANGELOG_v3.md)
293
8
 
294
- - **TextArea**: исправлен scrollPadding
9
+ [Changelog для версии 2.x.x](./CHANGELOG_v2.md)
295
10
 
296
- ## v3.15.3
11
+ # Версионность
297
12
 
298
- ### Changes
13
+ При выборе версии пакета придерживаемся [семантического версионирования](https://semver.org/lang/ru/).
299
14
 
300
- - **TextArea**: добавлен scrollPadding
15
+ Основная разработка ведется в ветке – **master**
301
16
 
302
- ## v3.15.2
17
+ Разработка следующей мажорной версии в ветке – **next**
303
18
 
304
- ### Changes
305
-
306
- - **TextArea**: багфикс опечатки в имени класса
307
-
308
- ## v3.15.1
309
-
310
- ### Changes
311
-
312
- - **MultiSelectList**: исправлено отображение фильтра с `not found`, если есть выбранные элементы
313
-
314
- ## v3.15.0
315
-
316
- ### Changes
317
-
318
- - **TextArea**: рефакторинг ресайза и добавление свойства isAutoSizeable
319
-
320
- ## v3.14.2
321
-
322
- ### Changes
323
-
324
- - **Selector**: исправлены стили задизейбленной опции
325
-
326
- ## v3.14.1
327
-
328
- ### Changes
329
-
330
- - **WithPopup**: исправлен баг с невозможностью закрытия popup при нажатии на элемент
331
-
332
- ## v3.14.0
333
-
334
- ### Changes
335
-
336
- - **WithPopup**: добавлена пропса `canBeFlipped` для автоматического позиционирования
337
- - **NewMoreMenu**: добавлена пропса `canBeFlipped`
338
-
339
- ## v3.13.1
340
-
341
- ### Changes
342
-
343
- - Багфикс warning в стилях **IconButton**
344
-
345
- ## v3.13.0
346
-
347
- ### Changes
348
-
349
- - Депрекейт `buttons` внутри **Modal**
350
- - Добавляет `footer` для **Modal**
351
-
352
- ## v3.12.0
353
-
354
- ### Changes
355
-
356
- - Удаляет `isSelected` внутри **Checkbox**
357
- - Добавляет поддержку `isInvalid` для **Checkbox**
358
- - Делает опциональным `value` для **Checkbox**
359
- - Иконка `check-big` стала deprecated
360
- - Иконки `check`, `check-all` и `minus` обновлены до актуальных из Figma UI Kit'а
361
-
362
- ## v3.11.0
363
-
364
- ### Changes
365
-
366
- - Добавляет **animations.defaultTransition**
367
-
368
- ## v3.10.0
369
-
370
- ### Changes
371
-
372
- - Добавлен компонент **IconButton**
373
- - Компонент **CloseButton** стал deprecated
374
-
375
- ### Breaking changes
376
-
377
- - **Modal** использует **IconButton** вместо **CloseButton**
378
- - **Toaster** использует **IconButton** вместо **CloseButton**
379
-
380
- ## v3.9.2
381
-
382
- ### Changes
383
-
384
- - Поднялись версии storybook
385
-
386
- ## v3.9.1
387
-
388
- ### Changes
389
-
390
- - **WithPopup** для `trigger` добавлен `testId`
391
-
392
- ## v3.9.0
393
-
394
- ### Changes
395
-
396
- - **Select**:
397
- 1. Добавлена поддержка для `readonly` опций
398
- 2. Добавлена типизация для `event` в `onChange`
399
- - **WithPopup**: добавлен `z-index: 5` для дропдауна
400
- - **NewMoreMenu**: добавлены твикстайлс для **List** и **WithPopup**
401
-
402
- ## v3.8.1
403
-
404
- ### Changes
405
-
406
- - **WithPopup** и **NewMoreMenu** добавлена пропса `shouldHideOnScroll`
407
-
408
- ## v3.8.0
409
-
410
- ### Changes
411
-
412
- - Добавлены компоненты **WithPopup** и **NewMoreMenu** (`floating-ui`)
413
- - **MoreMenu** deprecated
414
-
415
- ## v3.7.0
416
-
417
- ### Changes
418
-
419
- - Подключен плагин `eslint-plugin-react-hooks` для линтера
420
-
421
- - **FlexibleTable**:
422
-
423
- 1. Улучшение код-стайла
424
- 2. Добавлена пропса `isExpandableRowComponentInitiallyOpen`
425
-
426
- - **FlexibleTableCell**: Добавлены классы `loading` и `skeleton` для отрисовки скелетона
427
-
428
- ### Breaking changes
429
-
430
- - **FlexibleTable**:
431
-
432
- 1. Удалены типы `ITextAlignment`, `IVerticalAlignment` и `IPosition`
433
- 2. Удалены классы `skeletonRow` и `skeleton`
434
-
435
- ### Fixed
436
-
437
- - **FlexibleTable**: Исправлен баг, когда при отрисовка скелетона первая колонка таблицы не была sticky
438
-
439
- ## v3.6.0
440
-
441
- - **Select**: Добавлена возможность передавать `defaultOptionLabel` как `ReactNode`
442
-
443
- ## v3.5.0
444
-
445
- ### Fixed
446
-
447
- - Исправлена ошибка порядка вызова хуков при добавлении/удалении `tweakStyles` во время жизни компонента
448
-
449
- ## v3.4.0
450
-
451
- - **Input**: Добавляет пропс onInput
452
-
453
- ## v3.3.0
454
-
455
- - Улучшение кодстайла
456
-
457
- ## v3.2.0
458
-
459
- - **FlexibleTable** **FlexibleTableCell** **FlexibleTableRow** Добавляет прорс `renderMode`: 'table' | 'divs';
460
-
461
- ## v3.1.1
462
-
463
- - **Status** фикс цветов
464
-
465
- ## v3.1.0
466
-
467
- - Добавлены компоненты **Selector** **Status** **TextButton**
468
-
469
- ## v3.0.0
470
-
471
- - Функции isDateValid / parseStringToDate / и константа DATE_FORMAT -> удалены
472
- - isInt -> isNumberInteger -> (TE_Helpers)
473
- - isNotEmpty -> Проверяет только null и undefined (как и должна) -> (TE_Helpers)
474
- - isEmpty / isStringNotEmpty / addDataTestId / getTestId / getSelectKeyHandler / addClickHandler / createFilter -> (TE_Helpers)
475
- - В очень многих местах где были ReactNode проперти усилена проверка (теперь не допускаются false и пустые строки)
476
- - commonTheme -> **common**
477
- - Подключение провайдера темы теперь через <ThemeProvider theme={u6Theme}>
478
- - **Tooltip** - добавлены классы .error .info (вместо использования стилевых переменных)
479
-
480
- - **Notification** - добавлены классы .error .info .warning .ok .not-ok (вместо использования стилевых переменных)
481
-
482
- - **AccountInfo**, **MultiSelectList**, **FilterSelect** так же лишились стилевых переменных (bye bye width)
483
-
484
- - **DatePicker** - topPosition / leftPosition - используйте tweakStyles для .popper (marginTop, marginLeft)
485
-
486
- - **Checkbox** - alignItems / size / textMargin удалены. отступы через марджин заменены на gap (перепроверьте чекбоксы!)
487
-
488
- - Все типы переименованы по паттерну I{TypeName} (все стилевые типы, а так же связанные с темизацией)
489
-
490
- - **ThemedPreloader** (изменены tweakStyles -> tweakSvgPreloader + tweakDotsPreloader)
491
-
492
- - **FilterWithPeriod** -> tweakSelect -> tweakFilterSelect
493
-
494
- - **FlexibleTable** - чайлдовые компоненты переименованы в FlexibleTableRow и FlexibleTableCell. Теперь у них
495
- свои tweakStyles: tweakTableRow / tweakTableCell (чайлд для FlexibleTableRow)
496
- Классы - root + active + editable / root + sticky + second
497
- .row БОЛЬШЕ НЕ РАСПРОСТРАНЯЕТСЯ на .headerRow (раньше они были вместе)
498
- classes.horizontallyScrolled - удален. заменено на [data-scrolled]
499
- рендер теперь зависит от конфига, а не от первого ряда. т.е. используется не Object.keys(content[0]) а Object.entries(config)
500
-
501
- - **ComponentStyles** -> ITweakStyles
502
- - Проверьте все места 'as Styles', возможно там больше это не нужно
503
-
504
- ## v2.7.0
505
-
506
- ### Changes
507
-
508
- - **ListItem**: вынесен компонент для отрисовки пункта из списка List
509
- - **Icon**: добавлены иконки folder, folder-add, presentation
510
-
511
- ## v2.6.0
512
-
513
- ### Changes
514
-
515
- - **Input**: изменен тип пропса `label` на ReactNode
516
-
517
- ## v2.5.0
518
-
519
- ### Changes
520
-
521
- - **DatePicker**: добавлен тип для стилей `IDatePickerStyleProps`
522
- - **Input**: добавлена пропса `shouldAlwaysShowPlaceholder`
523
-
524
- ## v2.4.0
525
-
526
- ### Changes
527
-
528
- - Изменения по файловой структуре проекта
529
-
530
- ## v2.3.2
531
-
532
- ### Changes
533
-
534
- - **Modal**: исправляет баг с закрытием модалки по Esc
535
-
536
- ## v2.3.1
537
-
538
- ### Changes
539
-
540
- - Обновление версии **@true-engineering/true-react-platform-helpers@0.0.5** и функции isNotEmpty
541
-
542
- ## v2.3.0
543
-
544
- ### Changes
545
-
546
- - **Modal**: расширяет свойства модального окна свойствами для CSSTransition
547
-
548
- ### Breaking changes
549
-
550
- - **Modal**: удалена пропса `onCompletelyHidden`. Вместо неё нужно использовать `onExited`
551
-
552
- ## v2.2.0
553
-
554
- ### Changes
555
-
556
- - Подключена **@true-engineering/true-react-platform-helpers**
557
-
558
- ## v2.1.0
559
-
560
- ### Changes
561
-
562
- - **DatePicker**: добавлена пропса `strictParsing`
563
- - Сохранение JSDoc в `*.d.ts` файлах
564
-
565
- ### Breaking changes
566
-
567
- - **Switch**: удалена пропса `label`. Вместо неё нужно использовать `children`
568
-
569
- ## v2.0.1
570
-
571
- ### Fixed
572
-
573
- - **Select**: исправлено выделение активной опции в списке
574
-
575
- ## v0.4.0
576
-
577
- **PhoneInput**. Теперь компонент принимает в качестве аргумента объект с информацией о номере телефона IPhoneValue, а не строку.
19
+ # Публикация
578
20
 
579
- **PhoneInputCountryList**. Стили компонента переписаны под актуальный дизайн.
21
+ Слить Pull Request с увеличением версии пакета в файле `package.json` в веткe `master` или `next`.
22
+ Не забыть добавить описание изменений в файл changelog.
580
23
 
581
- Для удобной работы в других проектах добавлены общие хелперы для номера телефона и экспорт справочника телефонных кодов стран.
24
+ Публикация в npm и добавление тега на коммит c версией пакета происходит автоматически в пайплайне.
25
+ Так же автоматически будет создан коммит в репозиторий TE_TrueReactPlatform_Moduled и обновится наш сторибук
@@ -1,7 +1,7 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IThemedPreloaderStyles } from '../ThemedPreloader';
3
3
  import { IButtonSize } from './types';
4
- export declare const useStyles: import("../../theme").IUseStyles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown>;
4
+ export declare const useStyles: import("../../theme").IUseStyles<"content" | "outline" | "custom" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown>;
5
5
  export declare const getPreloaderStyles: (size: IButtonSize) => IThemedPreloaderStyles | undefined;
6
6
  export type IButtonStyles = ITweakStyles<typeof useStyles, {
7
7
  tweakPreloader: IThemedPreloaderStyles;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"input" | "invalid" | "root" | "disabled" | "children" | "checked" | "check" | "labelPositionLeft", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"input" | "invalid" | "children" | "root" | "disabled" | "checked" | "check" | "labelPositionLeft", unknown>;
3
3
  export type ICheckboxStyles = ITweakStyles<typeof useStyles>;
@@ -1,11 +1,13 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { IClickHandlerEvent, ICommonProps } from '../../types';
3
3
  import { IIcon } from '../Icon';
4
+ import { IControlWrapperSize } from './types';
4
5
  import { IControlWrapperStyles } from './ControlWrapper.styles';
5
6
  export interface IControlWrapperProps extends ICommonProps<IControlWrapperStyles> {
6
7
  children: ReactNode;
7
8
  label?: ReactNode;
8
9
  icon?: IIcon;
10
+ size?: IControlWrapperSize;
9
11
  groupPlacement?: 'left' | 'right' | 'middle' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
10
12
  /** @default false */
11
13
  isInvalid?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IThemedPreloaderStyles } from '../ThemedPreloader';
3
+ import { IControlWrapperSizes } from './types';
3
4
  export declare const useStyles: import("../../theme").IUseStyles<"invalid" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "wrapper" | "controlWrapper" | "minContent" | "activeLabel" | "disabledLabel" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown>;
4
5
  export type IControlWrapperStyles = ITweakStyles<typeof useStyles, {
5
6
  tweakPreloader: IThemedPreloaderStyles;
6
- }>;
7
+ } & IControlWrapperSizes>;
@@ -1,2 +1,3 @@
1
1
  export * from './ControlWrapper';
2
+ export * from './types';
2
3
  export type { IControlWrapperStyles } from './ControlWrapper.styles';
@@ -0,0 +1,3 @@
1
+ export interface IControlWrapperSizes {
2
+ }
3
+ export type IControlWrapperSize = keyof IControlWrapperSizes;
@@ -3,11 +3,11 @@ import ReactDatePicker from 'react-datepicker';
3
3
  import 'react-datepicker/dist/react-datepicker.css';
4
4
  import { ICommonProps } from '../../types';
5
5
  import { IDateInputProps } from '../DateInput';
6
- import { IDatePickerBaseProps, IRange } from './types';
6
+ import { IDatePickerBaseProps, IDatePickerLocale, IRange } from './types';
7
7
  import { IDatePickerStyles } from './DatePicker.styles';
8
8
  export interface IDatePickerProps extends IDatePickerBaseProps, ICommonProps<IDatePickerStyles> {
9
9
  selectedDate?: Date | null;
10
- locale: Locale;
10
+ locale: IDatePickerLocale;
11
11
  months?: string[];
12
12
  /** @default 'dd.MM.yyyy' */
13
13
  dateFormat?: string;
@@ -1,3 +1,6 @@
1
+ import { type Locale } from 'date-fns';
2
+ import { IDatePickerLocale } from './types';
1
3
  export declare const getDateFormatter: (dateFormat: string) => (date?: Date | null) => string;
2
4
  export declare const getDateValueParser: (dateFormat: string) => (value: string) => Date | null;
3
5
  export declare const areDatesEquals: (date1?: Date | null, date2?: Date | null) => boolean;
6
+ export declare const preparateDatePickerLocale: (locale: IDatePickerLocale) => Locale;
@@ -1,4 +1,6 @@
1
1
  import { ReactDatePickerProps } from 'react-datepicker';
2
- import { IDateInputProps } from '../DateInput';
2
+ import { type Locale } from 'date-fns';
3
+ import { type IDateInputProps } from '../DateInput';
3
4
  export type IRange = [Date | null, Date | null] | null;
5
+ export type IDatePickerLocale = 'ru' | 'en' | Locale;
4
6
  export type IDatePickerBaseProps = Pick<ReactDatePickerProps, 'startDate' | 'endDate' | 'minDate' | 'maxDate' | 'allowSameDay' | 'disabledKeyboardNavigation' | 'monthsShown' | 'popperModifiers' | 'popperPlacement' | 'filterDate' | 'dayClassName' | 'calendarContainer' | 'onCalendarOpen' | 'onCalendarClose' | 'onYearChange' | 'onMonthChange' | 'focusSelectedMonth' | 'shouldCloseOnSelect' | 'showPreviousMonths' | 'todayButton' | 'renderCustomHeader' | 'customInputRef' | 'preventOpenOnFocus' | 'strictParsing' | 'highlightDates' | 'fixedHeight' | 'excludeScrollbar'> & Omit<IDateInputProps, 'date' | 'startDate' | 'endDate' | 'isRange' | 'isActive' | 'icon' | 'maxLength' | 'onChange' | 'onClick' | 'tweakStyles'>;