@itcase/ui 1.8.108 → 1.8.110

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 (226) hide show
  1. package/dist/{Avatar_cjs_bOSuIjlv.js → Avatar_cjs_joB9qjwk.js} +36 -60
  2. package/dist/{Avatar_es_CEiiRkAd.js → Avatar_es_C3HGSiHU.js} +36 -60
  3. package/dist/{Button_cjs_eGfgY2Dz.js → Button_cjs_mau_55Fl.js} +6 -6
  4. package/dist/{Button_es_CEXL2diU.js → Button_es_D_IlkeBp.js} +6 -6
  5. package/dist/{ChipsGroup_cjs_DKLEgUi2.js → ChipsGroup_cjs_D454M1-p.js} +2 -2
  6. package/dist/{ChipsGroup_es_vMh6YMRm.js → ChipsGroup_es_BKG5mK5N.js} +2 -2
  7. package/dist/{DatePicker_cjs_T63y9kcH.js → DatePicker_cjs_C9rI2uTl.js} +5 -5
  8. package/dist/{DatePicker_es_B87jj8h6.js → DatePicker_es_Bi6lgbTb.js} +5 -5
  9. package/dist/{DropdownItem_cjs_BGp4XAme.js → DropdownItem_cjs_D2hHKA5E.js} +2 -2
  10. package/dist/{DropdownItem_es_BwdenrJx.js → DropdownItem_es_D9JBMV70.js} +2 -2
  11. package/dist/{Icon_cjs_LSfBwmrG.js → Icon_cjs_ZerVip3X.js} +32 -47
  12. package/dist/{Icon_es_BYO1LdXJ.js → Icon_es_C76te22j.js} +32 -47
  13. package/dist/{Input_cjs_CFy0tfAO.js → Input_cjs_TC7DOpvh.js} +13 -13
  14. package/dist/{Input_es_l3ry6luZ.js → Input_es_RtN2gtZq.js} +13 -13
  15. package/dist/{Label_cjs_Df_mrKBf.js → Label_cjs_CaTh_laL.js} +2 -2
  16. package/dist/{Label_es_Dl5zb0RD.js → Label_es_CoIII7Ty.js} +2 -2
  17. package/dist/{Loader_cjs_Db9diKuF.js → Loader_cjs_c6yF7akz.js} +1 -1
  18. package/dist/{Loader_es_AhHU-s7_.js → Loader_es_C8ETXkiZ.js} +1 -1
  19. package/dist/{Text_cjs_CeJHeRfI.js → Text_cjs_DpRclhwc.js} +2 -5
  20. package/dist/{Text_es_BXh9Y3hR.js → Text_es_CtCwsa3V.js} +2 -5
  21. package/dist/cjs/components/Accordion.js +4 -3
  22. package/dist/cjs/components/Avatar.js +5 -4
  23. package/dist/cjs/components/AvatarStack.js +5 -4
  24. package/dist/cjs/components/Badge.js +4 -3
  25. package/dist/cjs/components/Breadcrumbs.js +4 -3
  26. package/dist/cjs/components/Button.js +6 -5
  27. package/dist/cjs/components/Cell.js +5 -4
  28. package/dist/cjs/components/Checkbox.js +3 -2
  29. package/dist/cjs/components/Checkmark.js +2 -1
  30. package/dist/cjs/components/Chips.js +5 -4
  31. package/dist/cjs/components/Choice.js +9 -8
  32. package/dist/cjs/components/Code.js +2 -0
  33. package/dist/cjs/components/CookiesWarning.js +6 -5
  34. package/dist/cjs/components/Dadata.js +3 -1
  35. package/dist/cjs/components/DatePeriod.js +9 -8
  36. package/dist/cjs/components/DatePicker.js +9 -8
  37. package/dist/cjs/components/Divider.js +2 -1
  38. package/dist/cjs/components/Dot.js +2 -1
  39. package/dist/cjs/components/Drawer.js +3 -2
  40. package/dist/cjs/components/Dropdown.js +5 -4
  41. package/dist/cjs/components/Flex.js +2 -1
  42. package/dist/cjs/components/Grid.js +2 -1
  43. package/dist/cjs/components/Group.js +2 -1
  44. package/dist/cjs/components/HTMLContent.js +2 -1
  45. package/dist/cjs/components/HeroTitle.js +4 -3
  46. package/dist/cjs/components/Icon.js +4 -3
  47. package/dist/cjs/components/Image.js +2 -1
  48. package/dist/cjs/components/Input.js +3 -1
  49. package/dist/cjs/components/InputPassword.js +4 -3
  50. package/dist/cjs/components/Label.js +5 -4
  51. package/dist/cjs/components/Link.js +2 -1
  52. package/dist/cjs/components/List.js +2 -1
  53. package/dist/cjs/components/Loader.js +4 -3
  54. package/dist/cjs/components/Logo.js +2 -1
  55. package/dist/cjs/components/MenuItem.js +4 -3
  56. package/dist/cjs/components/Modal.js +5 -4
  57. package/dist/cjs/components/ModalSheetBottom.js +4 -3
  58. package/dist/cjs/components/Notification.js +4 -3
  59. package/dist/cjs/components/Overlay.js +2 -1
  60. package/dist/cjs/components/Pagination.js +5 -4
  61. package/dist/cjs/components/Radio.js +6 -2
  62. package/dist/cjs/components/RangeSlider.js +2 -1
  63. package/dist/cjs/components/Response.js +6 -5
  64. package/dist/cjs/components/SVGContent.js +2 -1
  65. package/dist/cjs/components/ScrollOnDrag.js +2 -1
  66. package/dist/cjs/components/ScrollToView.js +2 -1
  67. package/dist/cjs/components/Search.js +4 -3
  68. package/dist/cjs/components/Segmented.js +3 -2
  69. package/dist/cjs/components/Select.js +4 -3
  70. package/dist/cjs/components/Swiper.js +4 -3
  71. package/dist/cjs/components/Switch.js +3 -2
  72. package/dist/cjs/components/Tab.js +14 -16
  73. package/dist/cjs/components/Text.js +3 -2
  74. package/dist/cjs/components/Textarea.js +2 -0
  75. package/dist/cjs/components/Tile.js +4 -3
  76. package/dist/cjs/components/Title.js +4 -3
  77. package/dist/cjs/components/Tooltip.js +4 -3
  78. package/dist/cjs/components/Video.js +1 -0
  79. package/dist/cjs/components/Warning.js +4 -3
  80. package/dist/cjs/hoc/urlWithAssetPrefix.js +17 -0
  81. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +120 -0
  82. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +65 -0
  83. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +64 -0
  84. package/dist/cjs/hooks/useActiveClasses.js +9 -0
  85. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +11 -1
  86. package/dist/cjs/hooks/useDevicePropsGenerator.js +2 -0
  87. package/dist/cjs/hooks/useStyles/useStyles.js +4 -3
  88. package/dist/cjs/hooks/useStyles.js +1 -0
  89. package/dist/cjs/hooks.js +9 -0
  90. package/dist/components/Accordion.js +4 -3
  91. package/dist/components/Avatar.js +5 -4
  92. package/dist/components/AvatarStack.js +5 -4
  93. package/dist/components/Badge.js +4 -3
  94. package/dist/components/Breadcrumbs.js +4 -3
  95. package/dist/components/Button.js +6 -5
  96. package/dist/components/Cell.js +5 -4
  97. package/dist/components/Checkbox.js +3 -2
  98. package/dist/components/Checkmark.js +2 -1
  99. package/dist/components/Chips.js +5 -4
  100. package/dist/components/Choice.js +9 -8
  101. package/dist/components/Code.js +2 -0
  102. package/dist/components/CookiesWarning.js +6 -5
  103. package/dist/components/Dadata.js +3 -1
  104. package/dist/components/DatePeriod.js +9 -8
  105. package/dist/components/DatePicker.js +9 -8
  106. package/dist/components/Divider.js +2 -1
  107. package/dist/components/Dot.js +2 -1
  108. package/dist/components/Drawer.js +3 -2
  109. package/dist/components/Dropdown.js +5 -4
  110. package/dist/components/Flex.js +2 -1
  111. package/dist/components/Grid.js +2 -1
  112. package/dist/components/Group.js +2 -1
  113. package/dist/components/HTMLContent.js +2 -1
  114. package/dist/components/HeroTitle.js +4 -3
  115. package/dist/components/Icon.js +4 -3
  116. package/dist/components/Image.js +2 -1
  117. package/dist/components/Input.js +3 -1
  118. package/dist/components/InputPassword.js +4 -3
  119. package/dist/components/Label.js +5 -4
  120. package/dist/components/Link.js +2 -1
  121. package/dist/components/List.js +2 -1
  122. package/dist/components/Loader.js +4 -3
  123. package/dist/components/Logo.js +2 -1
  124. package/dist/components/MenuItem.js +4 -3
  125. package/dist/components/Modal.js +5 -4
  126. package/dist/components/ModalSheetBottom.js +4 -3
  127. package/dist/components/Notification.js +4 -3
  128. package/dist/components/Overlay.js +2 -1
  129. package/dist/components/Pagination.js +5 -4
  130. package/dist/components/Radio.js +6 -2
  131. package/dist/components/RangeSlider.js +2 -1
  132. package/dist/components/Response.js +6 -5
  133. package/dist/components/SVGContent.js +2 -1
  134. package/dist/components/ScrollOnDrag.js +2 -1
  135. package/dist/components/ScrollToView.js +2 -1
  136. package/dist/components/Search.js +4 -3
  137. package/dist/components/Segmented.js +3 -2
  138. package/dist/components/Select.js +4 -3
  139. package/dist/components/Swiper.js +4 -3
  140. package/dist/components/Switch.js +3 -2
  141. package/dist/components/Tab.js +14 -16
  142. package/dist/components/Text.js +3 -2
  143. package/dist/components/Textarea.js +2 -0
  144. package/dist/components/Tile.js +4 -3
  145. package/dist/components/Title.js +4 -3
  146. package/dist/components/Tooltip.js +4 -3
  147. package/dist/components/Video.js +1 -0
  148. package/dist/components/Warning.js +4 -3
  149. package/dist/css/components/Choice/Choice.css +22 -22
  150. package/dist/css/components/Choice/css/__item/choice__item_size.css +3 -3
  151. package/dist/css/components/Icon/Icon.css +12 -19
  152. package/dist/css/components/Input/Input.css +12 -13
  153. package/dist/css/components/Select/Select.css +8 -5
  154. package/dist/css/styles/bundle.css +2 -1
  155. package/dist/css/styles/text-weight/text-weight.css +2 -1
  156. package/dist/hoc/urlWithAssetPrefix.js +17 -0
  157. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +116 -0
  158. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +63 -0
  159. package/dist/hooks/useActiveClasses/useActiveClasses.js +62 -0
  160. package/dist/hooks/useActiveClasses.js +3 -0
  161. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +11 -1
  162. package/dist/hooks/useDevicePropsGenerator.js +2 -0
  163. package/dist/hooks/useStyles/useStyles.js +4 -3
  164. package/dist/hooks/useStyles.js +1 -0
  165. package/dist/hooks.js +7 -0
  166. package/dist/stories/useActiveClasses.mdx +134 -0
  167. package/dist/types/components/Avatar/Avatar.appearance.d.ts +1878 -2
  168. package/dist/types/components/Avatar/Avatar.interface.d.ts +48 -37
  169. package/dist/types/components/Avatar/appearance/avatarDefault.d.ts +2 -19
  170. package/dist/types/components/Avatar/appearance/avatarShape.d.ts +2 -24
  171. package/dist/types/components/Avatar/appearance/avatarSize.d.ts +2 -83
  172. package/dist/types/components/Avatar/appearance/avatarStyle.d.ts +2 -15
  173. package/dist/types/components/Badge/Badge.appearance.d.ts +986 -228
  174. package/dist/types/components/Badge/Badge.interface.d.ts +6 -6
  175. package/dist/types/components/Badge/appearance/badgeAccent.d.ts +2 -37
  176. package/dist/types/components/Badge/appearance/badgeDanger.d.ts +2 -16
  177. package/dist/types/components/Badge/appearance/badgeDisabled.d.ts +2 -14
  178. package/dist/types/components/Badge/appearance/badgeError.d.ts +2 -16
  179. package/dist/types/components/Badge/appearance/badgeInfo.d.ts +2 -15
  180. package/dist/types/components/Badge/appearance/badgePrimary.d.ts +2 -16
  181. package/dist/types/components/Badge/appearance/badgeSecondary.d.ts +2 -16
  182. package/dist/types/components/Badge/appearance/badgeShape.d.ts +2 -24
  183. package/dist/types/components/Badge/appearance/badgeSize.d.ts +2 -31
  184. package/dist/types/components/Badge/appearance/badgeStyle.d.ts +2 -13
  185. package/dist/types/components/Badge/appearance/badgeSuccess.d.ts +2 -16
  186. package/dist/types/components/Badge/appearance/badgeSurface.d.ts +2 -24
  187. package/dist/types/components/Badge/appearance/badgeWarning.d.ts +2 -16
  188. package/dist/types/components/Icon/Icon.d.ts +30 -6
  189. package/dist/types/components/Icon/Icon.interface.d.ts +2 -0
  190. package/dist/types/components/Image/Image.d.ts +1 -2
  191. package/dist/types/components/Input/appearance/inputDefault.d.ts +2 -2
  192. package/dist/types/components/Input/appearance/inputShape.d.ts +4 -4
  193. package/dist/types/components/Logo/Logo.d.ts +2 -2
  194. package/dist/types/components/Radio/Radio.appearance.d.ts +3 -0
  195. package/dist/types/components/Radio/appearance/radioDefault.d.ts +3 -0
  196. package/dist/types/components/Response/Response.d.ts +2 -2
  197. package/dist/types/components/SVGContent/SVGContent.d.ts +1 -2
  198. package/dist/types/components/Tab/appearance/tabSurface.d.ts +1 -0
  199. package/dist/types/components/Text/Text.appearance.d.ts +698 -2
  200. package/dist/types/components/Text/Text.interface.d.ts +32 -47
  201. package/dist/types/components/Text/appearance/textSize.d.ts +2 -23
  202. package/dist/types/components/Title/Title.appearance.d.ts +2225 -2
  203. package/dist/types/components/Title/Title.interface.d.ts +56 -38
  204. package/dist/types/components/Title/appearance/titleAccent.d.ts +2 -19
  205. package/dist/types/components/Title/appearance/titleDanger.d.ts +2 -6
  206. package/dist/types/components/Title/appearance/titleDisabled.d.ts +2 -19
  207. package/dist/types/components/Title/appearance/titleError.d.ts +2 -10
  208. package/dist/types/components/Title/appearance/titleInfo.d.ts +2 -20
  209. package/dist/types/components/Title/appearance/titlePrimary.d.ts +2 -7
  210. package/dist/types/components/Title/appearance/titleRequire.d.ts +2 -19
  211. package/dist/types/components/Title/appearance/titleSecondary.d.ts +2 -7
  212. package/dist/types/components/Title/appearance/titleSize.d.ts +2 -44
  213. package/dist/types/components/Title/appearance/titleStyle.d.ts +2 -15
  214. package/dist/types/components/Title/appearance/titleSuccess.d.ts +2 -10
  215. package/dist/types/components/Title/appearance/titleSurface.d.ts +2 -24
  216. package/dist/types/components/Title/appearance/titleWarning.d.ts +2 -10
  217. package/dist/types/hoc/urlWithAssetPrefix.d.ts +27 -8
  218. package/dist/types/hooks/index.helpers.d.ts +3 -0
  219. package/dist/types/hooks/useActiveClasses/index.d.ts +2 -0
  220. package/dist/types/hooks/useActiveClasses/useActiveClasses.d.ts +3 -0
  221. package/dist/types/hooks/useActiveClasses/useActiveClasses.helpers.d.ts +5 -0
  222. package/dist/types/hooks/useActiveClasses/useActiveClasses.interface.d.ts +26 -0
  223. package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +1 -1
  224. package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +3 -0
  225. package/dist/types/types/utils.d.ts +34 -0
  226. package/package.json +7 -7
@@ -45,10 +45,10 @@
45
45
  &_size {
46
46
  @each $size in xxl, xl, l, m, s, xs, xxs {
47
47
  &_$(size) {
48
- min-height: var(--choice-item-size-$(size)-min-height);
49
- padding: var(--choice-item-size-$(size)-padding);
48
+ min-height: var(--choice-item-$(size)-min-height);
49
+ padding: var(--choice-item-$(size)-padding);
50
50
  ^^&-label {
51
- gap: var(--choice-item-size-$(size)-gap);
51
+ gap: var(--choice-item-$(size)-gap);
52
52
  }
53
53
  }
54
54
  }
@@ -138,30 +138,30 @@
138
138
  }
139
139
  }
140
140
  :root {
141
- --choice-size-s-height: 28px;
142
- --choice-size-s-min-height: 28px;
143
- --choice-size-s-row-gap: 12px;
144
- --choice-size-s-column-gap: 12px;
141
+ --choice-size-l-height: 48px;
142
+ --choice-size-l-min-height: 48px;
143
+ --choice-size-l-row-gap: 12px;
144
+ --choice-size-l-column-gap: 12px;
145
145
 
146
146
  --choice-size-m-row-gap: 12px;
147
147
  --choice-size-m-column-gap: 12px;
148
- --choice-size-m-height: 36px;
149
- --choice-size-m-min-height: 36px;
148
+ --choice-size-m-height: 40px;
149
+ --choice-size-m-min-height: 40px;
150
150
 
151
- --choice-size-l-height: 40px;
152
- --choice-size-l-min-height: 40px;
153
- --choice-size-l-row-gap: 12px;
154
- --choice-size-l-column-gap: 12px;
151
+ --choice-size-s-height: 28px;
152
+ --choice-size-s-min-height: 28px;
153
+ --choice-size-s-row-gap: 12px;
154
+ --choice-size-s-column-gap: 12px;
155
155
 
156
- --choice-item-size-s-padding: 0px 6px;
157
- --choice-item-size-s-min-height: 24px;
158
- --choice-item-size-s-gap: 8px;
156
+ --choice-item-l-padding: 0px 12px;
157
+ --choice-item-l-min-height: 44px;
158
+ --choice-item-l-gap: 8px;
159
159
 
160
- --choice-item-size-m-padding: 0px 12px;
161
- --choice-item-size-m-min-height: 32px;
162
- --choice-item-size-m-gap: 8px;
160
+ --choice-item-m-padding: 0px 12px;
161
+ --choice-item-m-min-height: 36px;
162
+ --choice-item-m-gap: 8px;
163
163
 
164
- --choice-item-size-l-padding: 0px 12px;
165
- --choice-item-size-l-min-height: 36px;
166
- --choice-item-size-l-gap: 8px;
164
+ --choice-item-s-padding: 0px 6px;
165
+ --choice-item-s-min-height: 24px;
166
+ --choice-item-s-gap: 8px;
167
167
  }
@@ -2,10 +2,10 @@
2
2
  &_size {
3
3
  @each $size in xxl, xl, l, m, s, xs, xxs {
4
4
  &_$(size) {
5
- min-height: var(--choice-item-size-$(size)-min-height);
6
- padding: var(--choice-item-size-$(size)-padding);
5
+ min-height: var(--choice-item-$(size)-min-height);
6
+ padding: var(--choice-item-$(size)-padding);
7
7
  ^^&-label {
8
- gap: var(--choice-item-size-$(size)-gap);
8
+ gap: var(--choice-item-$(size)-gap);
9
9
  }
10
10
  }
11
11
  }
@@ -33,11 +33,10 @@
33
33
  }
34
34
  .icon_fill {
35
35
  @each $type in accent, primary, secondary, tertiary, quaternary, surface,
36
- error, success, warning, info, danger, gradient, disabled, hover, inverse {
36
+ error, success, warning, info, danger {
37
37
  &_$(type) {
38
38
  &-item {
39
- @each $color in primary, secondary, tertiary, quaternary, quinary,
40
- senary, accent, disabled, hover, inverse {
39
+ @each $color in primary, secondary, tertiary, quaternary {
41
40
  &-$(color) {
42
41
  & svg {
43
42
  stroke: none;
@@ -46,8 +45,7 @@
46
45
  }
47
46
  }
48
47
  }
49
- @each $color in primary, secondary, tertiary, quaternary, quinary, senary,
50
- accent, disabled, hover, inverse {
48
+ @each $color in primary, secondary, tertiary, quaternary {
51
49
  &-$(color) {
52
50
  & svg {
53
51
  stroke: none;
@@ -85,12 +83,11 @@
85
83
  }
86
84
  }
87
85
  .icon_fill_hover {
88
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary,
89
- senary, surface, error, success, warning, info, danger, gradient {
86
+ @each $type in accent, primary, secondary, tertiary, quaternary, surface,
87
+ error, success, warning, info, danger {
90
88
  &_$(type) {
91
89
  &-item {
92
- @each $color in primary, secondary, tertiary, quaternary, quinary,
93
- senary, accent, disabled, hover, inverse {
90
+ @each $color in primary, secondary, tertiary, quaternary {
94
91
  &-$(color) {
95
92
  &:hover {
96
93
  & svg {
@@ -137,11 +134,10 @@
137
134
  .icon_fill {
138
135
  &_active {
139
136
  @each $type in accent, primary, secondary, tertiary, quaternary, surface,
140
- error, success, warning, info, danger, gradient, disabled, hover, inverse {
137
+ error, success, warning, info, danger {
141
138
  &_$(type) {
142
139
  &-item {
143
- @each $color in primary, secondary, tertiary, quaternary, quinary,
144
- senary, accent, disabled, hover, inverse {
140
+ @each $color in primary, secondary, tertiary, quaternary {
145
141
  &-$(color) {
146
142
  & svg {
147
143
  stroke: none;
@@ -150,8 +146,7 @@
150
146
  }
151
147
  }
152
148
  }
153
- @each $color in primary, secondary, tertiary, quaternary, quinary,
154
- senary, accent, disabled, hover, inverse {
149
+ @each $color in primary, secondary, tertiary, quaternary {
155
150
  &-$(color) {
156
151
  & svg {
157
152
  stroke: none;
@@ -193,11 +188,10 @@
193
188
  &_active {
194
189
  &_hover {
195
190
  @each $type in accent, primary, secondary, tertiary, quaternary, surface,
196
- error, success, warning, info, danger, gradient, disabled, hover, inverse {
191
+ error, success, warning, info, danger {
197
192
  &_$(type) {
198
193
  &-item {
199
- @each $color in primary, secondary, tertiary, quaternary, quinary,
200
- senary, accent, disabled, hover, inverse {
194
+ @each $color in primary, secondary, tertiary, quaternary {
201
195
  &-$(color) {
202
196
  &:hover {
203
197
  & svg {
@@ -208,8 +202,7 @@
208
202
  }
209
203
  }
210
204
  }
211
- @each $color in primary, secondary, tertiary, quaternary, quinary,
212
- senary, accent, disabled, hover, inverse {
205
+ @each $color in primary, secondary, tertiary, quaternary {
213
206
  &-$(color) {
214
207
  &:hover {
215
208
  & svg {
@@ -3,6 +3,7 @@
3
3
  padding: 0;
4
4
  margin: 0;
5
5
  border: none;
6
+ border: solid 2px red;
6
7
  position: relative;
7
8
  box-shadow: none;
8
9
  appearance: none;
@@ -32,10 +33,10 @@
32
33
  }
33
34
  .input {
34
35
  &&_size {
35
- @each $size in xxl, xl, l, m, s, xs, xxs {
36
+ @each $size in xl, l, m, s {
36
37
  &_$(size) {
37
- min-height: var(--input-size-$(size)-min-height);
38
- padding: var(--input-size-$(size)-padding);
38
+ min-height: var(--input-$(size)-min-height);
39
+ padding: var(--input-$(size)-padding);
39
40
  }
40
41
  }
41
42
  }
@@ -70,16 +71,14 @@
70
71
  --input-shape-rounded: 8px;
71
72
 
72
73
  /* Size */
73
- --input-size-s-padding: 5px 10px;
74
- --input-size-m-padding: 7px 12px;
75
- --input-size-l-padding: 9px 15px;
76
- --input-size-xl-padding: 13px 20px;
77
- --input-size-xxl-padding: 17px 25px;
78
- --input-size-s-min-height: 28px;
79
- --input-size-m-min-height: 36px;
80
- --input-size-l-min-height: 40px;
81
- --input-size-xl-min-height: 48px;
82
- --input-size-xxl-min-height: 56px;
74
+ --input-xl-min-height: 56px;
75
+ --input-xl-padding: 12px 16px;
76
+ --input-l-min-height: 48px;
77
+ --input-l-padding: 12px 12px;
78
+ --input-m-min-height: 40px;
79
+ --input-m-padding: 8px 12px;
80
+ --input-s-min-height: 28px;
81
+ --input-s-padding: 2px 6px;
83
82
 
84
83
  --input-caret-color: var(--color-accent-fill-primary);
85
84
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  .select {
34
34
  &&_size {
35
- @each $size in xxl, xl, l, m, s, xs, xxs {
35
+ @each $size in xl, l, m, s {
36
36
  &_$(size) {
37
37
  ^^&__control {
38
38
  padding: var(--select-$(size)-padding);
@@ -300,11 +300,14 @@
300
300
  }
301
301
 
302
302
  :root {
303
- --select-xxl-padding: 16px 12px;
304
- --select-xl-padding: 12px 12px;
303
+ --select-xl-min-height: 56px;
304
+ --select-xl-padding: 12px 16px;
305
+ --select-l-min-height: 48px;
306
+ --select-l-padding: 12px 12px;
307
+ --select-m-min-height: 40px;
305
308
  --select-m-padding: 8px 12px;
306
- --select-s-padding: 2px 12px;
307
- --select-xs-padding: 2px 12px;
309
+ --select-s-min-height: 28px;
310
+ --select-s-padding: 2px 6px;
308
311
 
309
312
  --select-multi-item-xxl-padding: 5px;
310
313
  --select-multi-item-xl-padding: 5px;
@@ -1572,7 +1572,8 @@ div.alignment {
1572
1572
  }
1573
1573
  }
1574
1574
  /* stylelint-disable order/order */
1575
- .text {
1575
+ span.text,
1576
+ div.text {
1576
1577
  &-weight {
1577
1578
  @each $val in 100, 200, 300, 400, 500, 600, 700, 800, 900, 950 {
1578
1579
  &_$(val) {
@@ -1,6 +1,7 @@
1
1
  /* stylelint-disable order/order */
2
2
 
3
- .text {
3
+ span.text,
4
+ div.text {
4
5
  &-weight {
5
6
  @each $val in 100, 200, 300, 400, 500, 600, 700, 800, 900, 950 {
6
7
  &_$(val) {
@@ -5,6 +5,23 @@ import { formatURL } from '@itcase/common';
5
5
  import { UrlAssetPrefixContext } from '../context/UrlAssetPrefix.js';
6
6
 
7
7
  var urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
8
+ /**
9
+ * HOC, который добавляет assetPrefix к URL-пропсам.
10
+ *
11
+ * @template P - Тип пропсов оборачиваемого компонента.
12
+ * @template T - Тип ref (если используется forwardRef).
13
+ * @template Check - Проверка на наличие хотя бы одного URL-пропа.
14
+ *
15
+ * @param WrappedComponent - Компонент, который оборачиваем.
16
+ * @param _error - Проверка: если ни одного URL-пропа нет, будет ошибка компиляции.
17
+ *
18
+ * @example
19
+ * const A = (props: { src?: string }) => <div />;
20
+ * urlWithAssetPrefix(A); // ✅ OK
21
+ *
22
+ * const B = (props: { id: string }) => <div />;
23
+ * urlWithAssetPrefix(B); // ❌ TS ошибка (нет url-пропов)
24
+ */
8
25
  var urlWithAssetPrefix = function (WrappedComponent) {
9
26
  var HOC = React.forwardRef(function HOC(props, ref) {
10
27
  var _a = useContext(UrlAssetPrefixContext), assetPrefix = _a.assetPrefix, ignorePathsList = _a.ignorePathsList;
@@ -0,0 +1,116 @@
1
+ var CLASS_RULES = {
2
+ fill: [
3
+ {
4
+ key: 'fillClass',
5
+ stateFn: function (_a) {
6
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
7
+ return !isActive && !isDisabled;
8
+ },
9
+ },
10
+ {
11
+ key: 'fillHoverClass',
12
+ stateFn: function (_a) {
13
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
14
+ return !isActive && !isDisabled;
15
+ },
16
+ },
17
+ {
18
+ key: 'fillActiveClass',
19
+ stateFn: function (_a) {
20
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
21
+ return Boolean(isActive) && !isDisabled;
22
+ },
23
+ },
24
+ {
25
+ key: 'fillActiveHoverClass',
26
+ stateFn: function (_a) {
27
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
28
+ return Boolean(isActive) && !isDisabled;
29
+ },
30
+ },
31
+ {
32
+ key: 'fillDisabledClass',
33
+ stateFn: function (_a) {
34
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
35
+ return !isActive && Boolean(isDisabled);
36
+ },
37
+ },
38
+ ],
39
+ borderColor: [
40
+ {
41
+ key: 'borderColorClass',
42
+ stateFn: function (_a) {
43
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
44
+ return !isActive && !isDisabled;
45
+ },
46
+ },
47
+ {
48
+ key: 'borderColorHoverClass',
49
+ stateFn: function (_a) {
50
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
51
+ return !isActive && !isDisabled;
52
+ },
53
+ },
54
+ {
55
+ key: 'borderColorActiveClass',
56
+ stateFn: function (_a) {
57
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
58
+ return Boolean(isActive) && !isDisabled;
59
+ },
60
+ },
61
+ ],
62
+ textColor: [
63
+ {
64
+ key: 'textColorClass',
65
+ stateFn: function (_a) {
66
+ var isDisabled = _a.isDisabled, isActive = _a.isActive;
67
+ return !isActive && !isDisabled;
68
+ },
69
+ },
70
+ ],
71
+ };
72
+ var formatState = function (key) {
73
+ // Try to find one of the state tokens in the input key:
74
+ // - matches "ActiveHover", "Active", "Hover" or "Disabled"
75
+ // - case-insensitive because of the /i flag
76
+ // Examples of matches:
77
+ // "fillActiveHoverColor" -> match[0] === "ActiveHover"
78
+ // "borderDisabled" -> match[0] === "Disabled"
79
+ var stateMatch = key.match(/(ActiveHover|Active|Hover|Disabled)/i);
80
+ if (!stateMatch) {
81
+ return '';
82
+ }
83
+ // Replace the matched token with a normalized snake-like form and
84
+ // prepend an underscore. The chained replace calls map:
85
+ // ActiveHover -> active_hover
86
+ // Active -> active
87
+ // Hover -> hover
88
+ // Disabled -> disabled
89
+ // The final .toLowerCase() ensures output is lowercased regardless of input casing.
90
+ // Examples:
91
+ // "fillActiveHoverColor" -> "_active_hover"
92
+ // "borderDisabled" -> "disabled"
93
+ return ('_' +
94
+ stateMatch[0]
95
+ .replace(/ActiveHover/i, 'active_hover')
96
+ .replace(/Active/i, 'active')
97
+ .replace(/Hover/i, 'hover')
98
+ .replace(/Disabled/i, 'disabled')
99
+ .toLowerCase());
100
+ };
101
+ // Insert a hyphen between a lowercase letter followed by an uppercase letter:
102
+ // - regex: /([a-z])([A-Z])/g
103
+ // ([a-z]) -> capture group 1: a lowercase letter
104
+ // ([A-Z]) -> capture group 2: an uppercase letter
105
+ // g -> global: replace all occurrences
106
+ // - replacement: '$1-$2' puts a hyphen between the two captured groups
107
+ // - finally .toLowerCase() to produce a full kebab-case string
108
+ //
109
+ // Examples:
110
+ // "myTestString" -> "my-test-string"
111
+ // "borderColorActiveHover" -> "border-color-active-hover"
112
+ var toKebabCase = function (str) {
113
+ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
114
+ };
115
+
116
+ export { CLASS_RULES, formatState, toKebabCase };
@@ -0,0 +1,63 @@
1
+ var suffix = [
2
+ 'Button',
3
+ 'Checkbox',
4
+ 'Radio',
5
+ 'Checkmark',
6
+ 'Avatar',
7
+ 'AvatarStack',
8
+ 'Badge',
9
+ 'Breadcrumbs',
10
+ 'Cell',
11
+ 'Chips',
12
+ 'Choice',
13
+ 'Code',
14
+ 'CookiesWarning',
15
+ 'Dadata',
16
+ 'DatePeriod',
17
+ 'Divider',
18
+ 'Dot',
19
+ 'Drawer',
20
+ 'Dropdown',
21
+ 'DropdownItem',
22
+ 'Flex',
23
+ 'Grid',
24
+ 'Group',
25
+ 'HeroTitle',
26
+ 'HTMLContent',
27
+ 'Icon',
28
+ 'Image',
29
+ 'Input',
30
+ 'InputPassword',
31
+ 'Label',
32
+ 'Link',
33
+ 'List',
34
+ 'Loader',
35
+ 'Logo',
36
+ 'MenuItem',
37
+ 'Modal',
38
+ 'ModalSheetBottom',
39
+ 'Notification',
40
+ 'Overlay',
41
+ 'Pagination',
42
+ 'RangeSlider',
43
+ 'Response',
44
+ 'ScrollBar',
45
+ 'ScrollOnDrag',
46
+ 'ScrollToView',
47
+ 'Search',
48
+ 'Segmented',
49
+ 'Select',
50
+ 'SvgContent',
51
+ 'Swiper',
52
+ 'Switch',
53
+ 'Tab',
54
+ 'Text',
55
+ 'Textarea',
56
+ 'Tile',
57
+ 'Title',
58
+ 'Tooltip',
59
+ 'Video',
60
+ 'Warning',
61
+ ];
62
+
63
+ export { suffix };
@@ -0,0 +1,62 @@
1
+ import clsx from 'clsx';
2
+ import { CLASS_RULES, toKebabCase, formatState } from './useActiveClasses.helpers.js';
3
+
4
+ var useActiveClasses = function (params) {
5
+ var isDisabled = params.isDisabled, propsGenerator = params.propsGenerator, _a = params.suffixes, suffixes = _a === void 0 ? [] : _a, isActive = params.isActive;
6
+ var rootClassesArray = [];
7
+ Object.entries(CLASS_RULES).forEach(function (_a) {
8
+ var rulesName = _a[0], rules = _a[1];
9
+ var kebabRuleName = toKebabCase(rulesName);
10
+ rules.forEach(function (_a) {
11
+ var key = _a.key, stateFn = _a.stateFn;
12
+ var value = propsGenerator[key];
13
+ if (!value) {
14
+ return;
15
+ }
16
+ if (stateFn) {
17
+ var active = stateFn({ isDisabled: isDisabled, isActive: isActive });
18
+ if (!active) {
19
+ return;
20
+ }
21
+ }
22
+ var stateName = formatState(key);
23
+ rootClassesArray.push("".concat(kebabRuleName).concat(stateName, "_").concat(value));
24
+ });
25
+ });
26
+ var rootClasses = clsx(rootClassesArray);
27
+ var suffixClasses = suffixes.reduce(function (acc, suffix) {
28
+ var classes = [];
29
+ Object.entries(CLASS_RULES).forEach(function (_a) {
30
+ var rulesName = _a[0], rules = _a[1];
31
+ rules.forEach(function (_a) {
32
+ var key = _a.key, stateFn = _a.stateFn;
33
+ var withoutPrefixRulesName = key.replace(rulesName, '');
34
+ var propKey = rulesName + suffix + withoutPrefixRulesName;
35
+ var value = propsGenerator[propKey];
36
+ if (!value) {
37
+ return;
38
+ }
39
+ if (stateFn) {
40
+ var active = stateFn({ isDisabled: isDisabled, isActive: isActive });
41
+ if (!active) {
42
+ return;
43
+ }
44
+ }
45
+ var state = formatState(propKey);
46
+ var kebabName = toKebabCase(rulesName);
47
+ classes.push("".concat(kebabName).concat(state, "_").concat(value));
48
+ });
49
+ });
50
+ var suffixKey = suffix === 'HTMLContent'
51
+ ? 'htmlContent'
52
+ : (suffix[0].toLowerCase() + suffix.slice(1));
53
+ acc[suffixKey] = clsx(classes);
54
+ return acc;
55
+ }, {});
56
+ return {
57
+ rootClasses: rootClasses,
58
+ suffixClasses: suffixClasses,
59
+ };
60
+ };
61
+
62
+ export { useActiveClasses };
@@ -0,0 +1,3 @@
1
+ export { useActiveClasses } from './useActiveClasses/useActiveClasses.js';
2
+ import 'clsx';
3
+ import './useActiveClasses/useActiveClasses.helpers.js';
@@ -5,6 +5,8 @@ import castArray from 'lodash/castArray';
5
5
  import upperFirst from 'lodash/upperFirst';
6
6
  import '../../context/Notifications.js';
7
7
  import { useUserDeviceContext } from '../../context/UIContext.js';
8
+ import { getStyleAttributeKey } from '../../hooks.js';
9
+ import styleAttributes from '../useStyles/styleAttributes.js';
8
10
  import 'react/jsx-runtime';
9
11
  import 'uuid';
10
12
  import '@itcase/common';
@@ -70,8 +72,16 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
70
72
  // eslint-disable-next-line perfectionist/sort-objects
71
73
  getClassName: function (propKey, params) {
72
74
  var _a = params || {}, _b = _a.prefix, prefix = _b === void 0 ? '' : _b, _c = _a.replace, replace = _c === void 0 ? [/([A-Z])/g, '-$1'] : _c;
73
- // prettier-ignore
74
75
  var targetClassValue = this.getProp(String(propKey));
76
+ var styleAttributeKeys = styleAttributes.map(function (attr) {
77
+ return getStyleAttributeKey(attr);
78
+ });
79
+ if (styleAttributeKeys.includes(String(propKey)) &&
80
+ (typeof targetClassValue === 'number' ||
81
+ (typeof targetClassValue === 'string' &&
82
+ !isNaN(parseFloat(targetClassValue))))) {
83
+ return '';
84
+ }
75
85
  if (targetClassValue) {
76
86
  var cleanClassValue = String(targetClassValue);
77
87
  if (!cleanClassValue.includes('.')) {
@@ -12,3 +12,5 @@ import '../context/UIContext.js';
12
12
  import './useMediaQueries/useMediaQueries.js';
13
13
  import 'react-responsive';
14
14
  import '../utils/setViewportProperty.js';
15
+ import '../hooks.js';
16
+ import './useStyles/styleAttributes.js';
@@ -4,6 +4,7 @@ import maxBy from 'lodash/maxBy';
4
4
  import upperFirst from 'lodash/upperFirst';
5
5
  import '../../context/Notifications.js';
6
6
  import { useUserDeviceContext } from '../../context/UIContext.js';
7
+ import { getStyleAttributeKey } from '../../hooks.js';
7
8
  import styleAttributes from './styleAttributes.js';
8
9
  import '../../tslib.es6_es_Bwu1Cn-t.js';
9
10
  import 'react/jsx-runtime';
@@ -181,10 +182,10 @@ const getTargetStyleAttributeKey = (styleKey, styleValue = '') => {
181
182
 
182
183
  // Get longest style key (e.g. "borderLeftWidth")
183
184
  const targetStyleAttribute = maxBy(possibleStyleAttributesList, styleAttribute => {
184
- const styleAttributeKey = Array.isArray(styleAttribute) ? styleAttribute[0] : styleAttribute;
185
- return styleAttributeKey.length;
185
+ const key = getStyleAttributeKey(styleAttribute);
186
+ return key.length;
186
187
  });
187
- const styleAttributeKey = Array.isArray(targetStyleAttribute) ? targetStyleAttribute[0] : targetStyleAttribute;
188
+ const styleAttributeKey = getStyleAttributeKey(targetStyleAttribute);
188
189
  return styleAttributeKey;
189
190
  };
190
191
 
@@ -12,4 +12,5 @@ import '../context/UIContext.js';
12
12
  import './useMediaQueries/useMediaQueries.js';
13
13
  import 'react-responsive';
14
14
  import '../utils/setViewportProperty.js';
15
+ import '../hooks.js';
15
16
  import './useStyles/styleAttributes.js';
package/dist/hooks.js ADDED
@@ -0,0 +1,7 @@
1
+ var getStyleAttributeKey = function (targetStyleAttribute) {
2
+ return Array.isArray(targetStyleAttribute)
3
+ ? targetStyleAttribute[0]
4
+ : targetStyleAttribute;
5
+ };
6
+
7
+ export { getStyleAttributeKey };