@itcase/ui 1.8.122 → 1.8.124

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 (266) hide show
  1. package/dist/Avatar_cjs_mojzcWRL.js +161 -0
  2. package/dist/Avatar_es_BFom0nAS.js +157 -0
  3. package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
  4. package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
  5. package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
  7. package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
  8. package/dist/DatePicker_es_D1LvY5RT.js +178 -0
  9. package/dist/Divider_cjs_DrmV2ezS.js +105 -0
  10. package/dist/Divider_es_BiYozVBS.js +101 -0
  11. package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
  12. package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
  13. package/dist/Group_cjs_DmfeUcFI.js +59 -0
  14. package/dist/Group_es_BU5k8f5S.js +55 -0
  15. package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
  17. package/dist/Image_cjs_CBDMUzv_.js +29 -0
  18. package/dist/Image_es_BHec4iVN.js +27 -0
  19. package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_CiDHjDqJ.js → Input_es_BnCXATnh.js} +27 -19
  21. package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
  23. package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
  24. package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
  25. package/dist/Loader_cjs_DIDsIq3J.js +143 -0
  26. package/dist/Loader_es_CmSggwbR.js +139 -0
  27. package/dist/Overlay_cjs_tGA2fU43.js +42 -0
  28. package/dist/Overlay_es_BS7OTFoy.js +38 -0
  29. package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
  30. package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
  31. package/dist/Text_cjs_BDTjOTVB.js +69 -0
  32. package/dist/Text_es_CnymlElo.js +65 -0
  33. package/dist/cjs/components/Accordion.js +37 -34
  34. package/dist/cjs/components/Avatar.js +5 -6
  35. package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
  36. package/dist/cjs/components/AvatarStack.js +17 -16
  37. package/dist/cjs/components/Badge.js +3 -4
  38. package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
  39. package/dist/cjs/components/Breadcrumbs.js +27 -23
  40. package/dist/cjs/components/Button.js +5 -6
  41. package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
  42. package/dist/cjs/components/Cell.js +28 -25
  43. package/dist/cjs/components/Checkbox.js +33 -26
  44. package/dist/cjs/components/Checkmark.js +28 -23
  45. package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
  46. package/dist/cjs/components/Chips.js +4 -5
  47. package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
  48. package/dist/cjs/components/Choice.js +46 -40
  49. package/dist/cjs/components/Code.js +34 -26
  50. package/dist/cjs/components/CookiesWarning.js +23 -23
  51. package/dist/cjs/components/Dadata.js +14 -9
  52. package/dist/cjs/components/DatePeriod.js +32 -30
  53. package/dist/cjs/components/DatePicker.js +8 -9
  54. package/dist/cjs/components/Divider.js +1 -2
  55. package/dist/cjs/components/Dot.js +5 -6
  56. package/dist/cjs/components/Drawer.js +23 -21
  57. package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
  58. package/dist/cjs/components/Dropdown.js +5 -6
  59. package/dist/cjs/components/Flex.js +11 -12
  60. package/dist/cjs/components/Grid.js +15 -16
  61. package/dist/cjs/components/Group.js +1 -2
  62. package/dist/cjs/components/HTMLContent.js +5 -6
  63. package/dist/cjs/components/HeroTitle.js +17 -16
  64. package/dist/cjs/components/Icon.js +3 -4
  65. package/dist/cjs/components/Image.js +1 -2
  66. package/dist/cjs/components/Input.js +1 -2
  67. package/dist/cjs/components/InputPassword.js +114 -84
  68. package/dist/cjs/components/Label.js +4 -5
  69. package/dist/cjs/components/Link.js +1 -2
  70. package/dist/cjs/components/List.js +39 -28
  71. package/dist/cjs/components/Loader.js +2 -3
  72. package/dist/cjs/components/Logo.js +10 -11
  73. package/dist/cjs/components/MenuItem.js +36 -33
  74. package/dist/cjs/components/Modal.js +40 -38
  75. package/dist/cjs/components/ModalSheetBottom.js +17 -18
  76. package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
  77. package/dist/cjs/components/Notification.js +31 -24
  78. package/dist/cjs/components/Overlay.js +1 -2
  79. package/dist/cjs/components/Pagination.js +43 -41
  80. package/dist/cjs/components/Radio.js +34 -26
  81. package/dist/cjs/components/RangeSlider.js +8 -9
  82. package/dist/cjs/components/Response/img.js +1 -1
  83. package/dist/cjs/components/Response.js +102 -84
  84. package/dist/cjs/components/SVGContent.js +6 -7
  85. package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
  86. package/dist/cjs/components/ScrollOnDrag.js +7 -8
  87. package/dist/cjs/components/ScrollToView.js +8 -9
  88. package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
  89. package/dist/cjs/components/Scrollbar.js +1 -1
  90. package/dist/cjs/components/Search.js +39 -31
  91. package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
  92. package/dist/cjs/components/Segmented.js +47 -42
  93. package/dist/cjs/components/Select.js +118 -113
  94. package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
  95. package/dist/cjs/components/Swiper.js +27 -29
  96. package/dist/cjs/components/Switch.js +33 -26
  97. package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
  98. package/dist/cjs/components/Tab.js +59 -69
  99. package/dist/cjs/components/Text.js +1 -2
  100. package/dist/cjs/components/Textarea.js +26 -18
  101. package/dist/cjs/components/Tile.js +21 -17
  102. package/dist/cjs/components/Title.js +3 -4
  103. package/dist/cjs/components/Tooltip.js +3 -4
  104. package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
  105. package/dist/cjs/components/Video.js +3 -4
  106. package/dist/cjs/components/Warning.js +26 -20
  107. package/dist/cjs/context/Notifications.js +38 -42
  108. package/dist/cjs/context/UIContext.js +19 -17
  109. package/dist/cjs/context/UrlAssetPrefix.js +3 -3
  110. package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
  111. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  112. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  113. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
  114. package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  115. package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
  116. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  117. package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
  118. package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
  119. package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
  120. package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
  121. package/dist/cjs/hooks/useStyles.js +0 -1
  122. package/dist/cjs/hooks/useViewportFix.js +5 -5
  123. package/dist/cjs/hooks.js +1 -1
  124. package/dist/cjs/utils/setViewportProperty.js +3 -3
  125. package/dist/components/Accordion.js +37 -34
  126. package/dist/components/Avatar.js +5 -6
  127. package/dist/components/AvatarStack/stories/__mock__.js +1 -1
  128. package/dist/components/AvatarStack.js +17 -16
  129. package/dist/components/Badge.js +3 -4
  130. package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
  131. package/dist/components/Breadcrumbs.js +27 -23
  132. package/dist/components/Button.js +5 -6
  133. package/dist/components/Cell/stories/__mock__.js +1 -1
  134. package/dist/components/Cell.js +28 -25
  135. package/dist/components/Checkbox.js +33 -26
  136. package/dist/components/Checkmark.js +28 -23
  137. package/dist/components/Chips/stories/__mock__.js +1 -1
  138. package/dist/components/Chips.js +4 -5
  139. package/dist/components/Choice/stories/__mock__.js +2 -2
  140. package/dist/components/Choice.js +46 -40
  141. package/dist/components/Code.js +34 -26
  142. package/dist/components/CookiesWarning.js +23 -23
  143. package/dist/components/Dadata.js +14 -9
  144. package/dist/components/DatePeriod.js +32 -30
  145. package/dist/components/DatePicker.js +8 -9
  146. package/dist/components/Divider.js +1 -2
  147. package/dist/components/Dot.js +5 -6
  148. package/dist/components/Drawer.js +23 -21
  149. package/dist/components/Dropdown/stories/__mock__.js +6 -6
  150. package/dist/components/Dropdown.js +5 -6
  151. package/dist/components/Flex.js +11 -12
  152. package/dist/components/Grid.js +15 -16
  153. package/dist/components/Group.js +1 -2
  154. package/dist/components/HTMLContent.js +5 -6
  155. package/dist/components/HeroTitle.js +17 -16
  156. package/dist/components/Icon.js +3 -4
  157. package/dist/components/Image.js +1 -2
  158. package/dist/components/Input.js +1 -2
  159. package/dist/components/InputPassword.js +114 -84
  160. package/dist/components/Label.js +4 -5
  161. package/dist/components/Link.js +1 -2
  162. package/dist/components/List.js +39 -28
  163. package/dist/components/Loader.js +2 -3
  164. package/dist/components/Logo.js +10 -11
  165. package/dist/components/MenuItem.js +36 -33
  166. package/dist/components/Modal.js +40 -38
  167. package/dist/components/ModalSheetBottom.js +17 -18
  168. package/dist/components/Notification/stories/__mock__.js +1 -1
  169. package/dist/components/Notification.js +31 -24
  170. package/dist/components/Overlay.js +1 -2
  171. package/dist/components/Pagination.js +43 -41
  172. package/dist/components/Radio.js +34 -26
  173. package/dist/components/RangeSlider.js +8 -9
  174. package/dist/components/Response/img.js +1 -1
  175. package/dist/components/Response.js +102 -84
  176. package/dist/components/SVGContent.js +6 -7
  177. package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
  178. package/dist/components/ScrollOnDrag.js +7 -8
  179. package/dist/components/ScrollToView.js +8 -9
  180. package/dist/components/Scrollbar/stories/__mock__.js +1 -1
  181. package/dist/components/Scrollbar.js +1 -1
  182. package/dist/components/Search.js +39 -31
  183. package/dist/components/Segmented/stories/__mock__.js +23 -10
  184. package/dist/components/Segmented.js +47 -42
  185. package/dist/components/Select.js +118 -113
  186. package/dist/components/Swiper/stories/__mock__.js +3 -3
  187. package/dist/components/Swiper.js +27 -29
  188. package/dist/components/Switch.js +33 -26
  189. package/dist/components/Tab/stories/__mock__.js +1 -1
  190. package/dist/components/Tab.js +59 -69
  191. package/dist/components/Text.js +1 -2
  192. package/dist/components/Textarea.js +26 -18
  193. package/dist/components/Tile.js +21 -17
  194. package/dist/components/Title.js +3 -4
  195. package/dist/components/Tooltip.js +3 -4
  196. package/dist/components/Video/stories/__mocks__.js +1 -1
  197. package/dist/components/Video.js +3 -4
  198. package/dist/components/Warning.js +26 -20
  199. package/dist/context/Notifications.js +38 -42
  200. package/dist/context/UIContext.js +19 -17
  201. package/dist/context/UrlAssetPrefix.js +3 -3
  202. package/dist/css/components/Checkmark/Checkmark.css +2 -0
  203. package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
  204. package/dist/css/components/Input/Input.css +0 -8
  205. package/dist/css/components/InputPassword/InputPassword.css +34 -43
  206. package/dist/css/components/Tile/Tile.css +3 -3
  207. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  208. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  209. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  210. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  211. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  212. package/dist/hooks/useAppearanceConfig.js +0 -1
  213. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  214. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  215. package/dist/hooks/useDeviceTargetClass.js +0 -1
  216. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  217. package/dist/hooks/useStyles/useStyles.js +0 -1
  218. package/dist/hooks/useStyles.js +0 -1
  219. package/dist/hooks/useViewportFix.js +5 -5
  220. package/dist/hooks.js +1 -1
  221. package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
  222. package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
  223. package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
  224. package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
  225. package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
  226. package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
  227. package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
  228. package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
  229. package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
  230. package/dist/types/components/Response/Response.constant.d.ts +32 -35
  231. package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
  232. package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
  233. package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
  234. package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
  235. package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
  236. package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
  237. package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
  238. package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
  239. package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
  240. package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
  241. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  242. package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
  243. package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
  244. package/dist/utils/setViewportProperty.js +3 -3
  245. package/package.json +14 -14
  246. package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
  247. package/dist/Avatar_es_lx7s4Vla.js +0 -153
  248. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  249. package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
  250. package/dist/DatePicker_es_BP5BrEr-.js +0 -179
  251. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  252. package/dist/Divider_es_CCLBFIx6.js +0 -93
  253. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  254. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  255. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  256. package/dist/Group_es_DRqIIM9m.js +0 -55
  257. package/dist/Image_cjs_B6YlGx8G.js +0 -28
  258. package/dist/Image_es_BvYo_cHH.js +0 -26
  259. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  260. package/dist/Loader_es_BUSqFrCd.js +0 -128
  261. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  262. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  263. package/dist/Text_cjs_0EINiUq4.js +0 -68
  264. package/dist/Text_es_CwV9rjFD.js +0 -64
  265. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  266. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -1,56 +1,38 @@
1
1
  .input-password {
2
+ width: 100%;
2
3
  position: relative;
3
4
  &__icon {
4
5
  position: absolute;
5
- right: 8px;
6
6
  top: 50%;
7
+ right: 8px;
7
8
  transform: translate(0, -50%);
8
9
  }
9
10
  &__input {
10
- border: none;
11
- appearance: none;
11
+ width: 100%;
12
+ min-width: unset;
12
13
  padding: 0;
13
14
  margin: 0;
14
- min-width: unset;
15
+ border: none;
16
+ border: solid 1px none;
17
+ position: relative;
15
18
  box-shadow: none;
19
+ appearance: none;
16
20
  outline: 0;
17
- position: relative;
18
21
  caret-color: var(--input-password-caret-color);
22
+ transition: var(--input-password-transition);
19
23
  &:focus {
20
24
  outline: none;
21
25
  }
22
- &:hover {
23
- border: solid 1px var(--input-password-state-hover-border);
24
- background: var(--input-password-state-hover-background);
25
- }
26
- &&_state {
27
- &_success {
28
- border: solid 1px var(--input-password-state-success-border);
29
- background: var(--input-password-state-success-background);
30
- }
31
- &_error {
32
- border: solid 1px var(--input-password-state-error-border);
33
- background: var(--input-password-state-error-background);
34
- }
35
- &_focus {
36
- border: solid 1px var(--input-password-state-focus-border);
37
- background: var(--input-password-state-focus-background);
38
- }
39
- }
40
26
  }
41
27
  }
42
28
  .input-password {
43
29
  &__input {
44
30
  &_shape {
45
- &_rounded {
46
- border-radius: var(--input-password-shape-rounded);
47
- position: relative;
48
- }
49
31
  &_underline {
50
- position: relative;
51
32
  border-left: none !important;
52
- border-right: none !important;
53
33
  border-top: none !important;
34
+ border-right: none !important;
35
+ position: relative;
54
36
  }
55
37
  }
56
38
  }
@@ -58,26 +40,36 @@
58
40
  .input-password {
59
41
  &__input {
60
42
  &&_size {
61
- @each $size in xxl, xl, l, m, s, xs, xxs, normal, tiny, compact, large {
43
+ @each $size in xl, l, m, s {
62
44
  &_$(size) {
63
- padding: var(--input-password-size-$(size)-padding);
45
+ min-height: var(--input-password-$(size)-min-height);
46
+ padding: var(--input-password-$(size)-padding);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ .input-password {
53
+ &&_state {
54
+ @each $state in error, success, require, disabled, focus {
55
+ &_$(state) {
56
+ & .input {
57
+ background: var(--input-state-$(state)-background);
58
+ border: solid 1px var(--input-state-$(state)-border);
64
59
  }
65
60
  }
66
61
  }
67
62
  }
68
63
  }
69
64
  :root {
70
- --input-password-size-xs-padding: 4px 8px;
71
- --input-password-size-s-padding: 5px 10px;
72
- --input-password-size-m-padding: 7px 12px;
73
- --input-password-size-l-padding: 9px 15px;
74
- --input-password-size-xl-padding: 15px 20px;
75
- --input-password-size-xxl-padding: 18px 25px;
76
-
77
- --input-password-size-tiny-padding: 4px 8px;
78
- --input-password-size-compact-padding: 5px 10px;
79
- --input-password-size-normal-padding: 7px 12px;
80
- --input-password-size-large-padding: 9px 15px;
65
+ --input-password-xl-min-height: 56px;
66
+ --input-password-xl-padding: 12px 16px;
67
+ --input-password-l-min-height: 48px;
68
+ --input-password-l-padding: 12px 12px;
69
+ --input-password-m-min-height: 40px;
70
+ --input-password-m-padding: 8px 12px;
71
+ --input-password-s-min-height: 28px;
72
+ --input-password-s-padding: 2px 6px;
81
73
 
82
74
  --input-password-state-focus-border: var(--color-active-border-primary);
83
75
  --input-password-state-focus-background: none;
@@ -88,5 +80,4 @@
88
80
  --input-password-state-hover-border: var(--color-surface-border-quaternary);
89
81
  --input-password-state-hover-background: none;
90
82
  --input-password-caret-color: var(--color-accent-fill-primary);
91
- --input-password-shape-rounded: 0;
92
83
  }
@@ -68,15 +68,15 @@
68
68
  }
69
69
  }
70
70
  :root {
71
- --tile-size-xxl-min-width: 320px;
71
+ --tile-size-xxl-min-width: 240px;
72
72
  --tile-size-xxl-padding: 24px;
73
73
  --tile-size-xxl-gap: 24px;
74
74
 
75
- --tile-size-xl-min-width: 320px;
75
+ --tile-size-xl-min-width: 240px;
76
76
  --tile-size-xl-padding: 24px;
77
77
  --tile-size-xl-gap: 24px;
78
78
 
79
- --tile-size-l-min-width: 320px;
79
+ --tile-size-l-min-width: 240px;
80
80
  --tile-size-l-padding: 24px;
81
81
  --tile-size-l-gap: 24px;
82
82
 
@@ -1,10 +1,9 @@
1
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import React, { useContext } from 'react';
4
3
  import { formatURL } from '@itcase/common';
5
4
  import { UrlAssetPrefixContext } from '../context/UrlAssetPrefix.js';
6
5
 
7
- var urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
6
+ const urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
8
7
  /**
9
8
  * HOC, который добавляет assetPrefix к URL-пропсам.
10
9
  *
@@ -22,31 +21,30 @@ var urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
22
21
  * const B = (props: { id: string }) => <div />;
23
22
  * urlWithAssetPrefix(B); // ❌ TS ошибка (нет url-пропов)
24
23
  */
25
- var urlWithAssetPrefix = function (WrappedComponent) {
26
- var HOC = React.forwardRef(function HOC(props, ref) {
27
- var _a = useContext(UrlAssetPrefixContext), assetPrefix = _a.assetPrefix, ignorePathsList = _a.ignorePathsList;
28
- var overrideProps = urlPropsList.reduce(function (resultProps, propKey) {
29
- var url = props[propKey];
24
+ const urlWithAssetPrefix = (WrappedComponent, ..._error) => {
25
+ const HOC = React.forwardRef(function HOC(props, ref) {
26
+ const { assetPrefix, ignorePathsList } = useContext(UrlAssetPrefixContext);
27
+ const overrideProps = urlPropsList.reduce((resultProps, propKey) => {
28
+ let url = props[propKey];
30
29
  if (url && typeof url === 'string') {
31
30
  if (assetPrefix) {
32
- var isNeedAssetPrefix = checkIsNeedAssetPrefix(url, assetPrefix, ignorePathsList);
31
+ const isNeedAssetPrefix = checkIsNeedAssetPrefix(url, assetPrefix, ignorePathsList);
33
32
  if (isNeedAssetPrefix) {
34
- var prefixPath = formatURL(assetPrefix).slice(0, -1);
35
- url = "".concat(prefixPath).concat(url);
33
+ const prefixPath = formatURL(assetPrefix).slice(0, -1);
34
+ url = `${prefixPath}${url}`;
36
35
  }
37
36
  }
38
37
  resultProps[propKey] = url;
39
38
  }
40
39
  return resultProps;
41
40
  }, {});
42
- return jsx(WrappedComponent, __assign({}, props, overrideProps, { ref: ref }));
41
+ return jsx(WrappedComponent, { ...props, ...overrideProps, ref: ref });
43
42
  });
44
43
  return HOC;
45
44
  };
46
- var checkIsNeedAssetPrefix = function (url, assetPrefix, ignorePathsList) {
47
- if (ignorePathsList === void 0) { ignorePathsList = []; }
45
+ const checkIsNeedAssetPrefix = (url, assetPrefix, ignorePathsList = []) => {
48
46
  // Ignore prefix if:
49
- var isPrefixIgnore =
47
+ const isPrefixIgnore =
50
48
  // Url is absolute
51
49
  url.startsWith('http:') ||
52
50
  url.startsWith('https:') ||
@@ -58,8 +56,7 @@ var checkIsNeedAssetPrefix = function (url, assetPrefix, ignorePathsList) {
58
56
  return false;
59
57
  }
60
58
  // And check special paths for ignore prefix
61
- for (var _i = 0, ignorePathsList_1 = ignorePathsList; _i < ignorePathsList_1.length; _i++) {
62
- var urlPath = ignorePathsList_1[_i];
59
+ for (const urlPath of ignorePathsList) {
63
60
  if (urlPath instanceof RegExp) {
64
61
  if (urlPath.test(url)) {
65
62
  return false;
@@ -1,82 +1,55 @@
1
- var CLASS_RULES = {
1
+ const CLASS_RULES = {
2
2
  fill: [
3
3
  {
4
4
  key: 'fillClass',
5
- stateFn: function (_a) {
6
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
7
- return !isActive && !isDisabled;
8
- },
5
+ stateFn: ({ isDisabled, isActive }) => !isActive && !isDisabled,
9
6
  },
10
7
  {
11
8
  key: 'fillHoverClass',
12
- stateFn: function (_a) {
13
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
14
- return !isActive && !isDisabled;
15
- },
9
+ stateFn: ({ isDisabled, isActive }) => !isActive && !isDisabled,
16
10
  },
17
11
  {
18
12
  key: 'fillActiveClass',
19
- stateFn: function (_a) {
20
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
21
- return Boolean(isActive) && !isDisabled;
22
- },
13
+ stateFn: ({ isDisabled, isActive }) => Boolean(isActive) && !isDisabled,
23
14
  },
24
15
  {
25
16
  key: 'fillActiveHoverClass',
26
- stateFn: function (_a) {
27
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
28
- return Boolean(isActive) && !isDisabled;
29
- },
17
+ stateFn: ({ isDisabled, isActive }) => Boolean(isActive) && !isDisabled,
30
18
  },
31
19
  {
32
20
  key: 'fillDisabledClass',
33
- stateFn: function (_a) {
34
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
35
- return !isActive && Boolean(isDisabled);
36
- },
21
+ stateFn: ({ isDisabled, isActive }) => !isActive && Boolean(isDisabled),
37
22
  },
38
23
  ],
39
24
  borderColor: [
40
25
  {
41
26
  key: 'borderColorClass',
42
- stateFn: function (_a) {
43
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
44
- return !isActive && !isDisabled;
45
- },
27
+ stateFn: ({ isDisabled, isActive }) => !isActive && !isDisabled,
46
28
  },
47
29
  {
48
30
  key: 'borderColorHoverClass',
49
- stateFn: function (_a) {
50
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
51
- return !isActive && !isDisabled;
52
- },
31
+ stateFn: ({ isDisabled, isActive }) => !isActive && !isDisabled,
53
32
  },
54
33
  {
55
34
  key: 'borderColorActiveClass',
56
- stateFn: function (_a) {
57
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
58
- return Boolean(isActive) && !isDisabled;
59
- },
35
+ stateFn: ({ isDisabled, isActive }) => Boolean(isActive) && !isDisabled,
60
36
  },
61
37
  ],
62
38
  textColor: [
63
39
  {
64
40
  key: 'textColorClass',
65
- stateFn: function (_a) {
66
- var isDisabled = _a.isDisabled, isActive = _a.isActive;
67
- return !isActive && !isDisabled;
68
- },
41
+ stateFn: ({ isDisabled, isActive }) => !isActive && !isDisabled,
69
42
  },
70
43
  ],
71
44
  };
72
- var formatState = function (key) {
45
+ const formatState = (key) => {
73
46
  // Try to find one of the state tokens in the input key:
74
47
  // - matches "ActiveHover", "Active", "Hover" or "Disabled"
75
48
  // - case-insensitive because of the /i flag
76
49
  // Examples of matches:
77
50
  // "fillActiveHoverColor" -> match[0] === "ActiveHover"
78
51
  // "borderDisabled" -> match[0] === "Disabled"
79
- var stateMatch = key.match(/(ActiveHover|Active|Hover|Disabled)/i);
52
+ const stateMatch = key.match(/(ActiveHover|Active|Hover|Disabled)/i);
80
53
  if (!stateMatch) {
81
54
  return '';
82
55
  }
@@ -109,7 +82,7 @@ var formatState = function (key) {
109
82
  // Examples:
110
83
  // "myTestString" -> "my-test-string"
111
84
  // "borderColorActiveHover" -> "border-color-active-hover"
112
- var toKebabCase = function (str) {
85
+ const toKebabCase = (str) => {
113
86
  return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
114
87
  };
115
88
 
@@ -1,4 +1,4 @@
1
- var suffix = [
1
+ const suffix = [
2
2
  'Button',
3
3
  'Checkbox',
4
4
  'Radio',
@@ -1,61 +1,57 @@
1
1
  import clsx from 'clsx';
2
2
  import { CLASS_RULES, toKebabCase, formatState } from './useActiveClasses.helpers.js';
3
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];
4
+ const useActiveClasses = (params) => {
5
+ const { isDisabled, propsGenerator, suffixes = [], isActive } = params;
6
+ const rootClassesArray = [];
7
+ Object.entries(CLASS_RULES).forEach(([rulesName, rules]) => {
8
+ const kebabRuleName = toKebabCase(rulesName);
9
+ rules.forEach(({ key, stateFn }) => {
10
+ const value = propsGenerator[key];
13
11
  if (!value) {
14
12
  return;
15
13
  }
16
14
  if (stateFn) {
17
- var active = stateFn({ isDisabled: isDisabled, isActive: isActive });
15
+ const active = stateFn({ isDisabled, isActive });
18
16
  if (!active) {
19
17
  return;
20
18
  }
21
19
  }
22
- var stateName = formatState(key);
23
- rootClassesArray.push("".concat(kebabRuleName).concat(stateName, "_").concat(value));
20
+ const stateName = formatState(key);
21
+ rootClassesArray.push(`${kebabRuleName}${stateName}_${value}`);
24
22
  });
25
23
  });
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];
24
+ const rootClasses = clsx(rootClassesArray);
25
+ const suffixClasses = suffixes.reduce((acc, suffix) => {
26
+ const classes = [];
27
+ Object.entries(CLASS_RULES).forEach(([rulesName, rules]) => {
28
+ rules.forEach(({ key, stateFn }) => {
29
+ const withoutPrefixRulesName = key.replace(rulesName, '');
30
+ const propKey = rulesName + suffix + withoutPrefixRulesName;
31
+ const value = propsGenerator[propKey];
36
32
  if (!value) {
37
33
  return;
38
34
  }
39
35
  if (stateFn) {
40
- var active = stateFn({ isDisabled: isDisabled, isActive: isActive });
36
+ const active = stateFn({ isDisabled, isActive });
41
37
  if (!active) {
42
38
  return;
43
39
  }
44
40
  }
45
- var state = formatState(propKey);
46
- var kebabName = toKebabCase(rulesName);
47
- classes.push("".concat(kebabName).concat(state, "_").concat(value));
41
+ const state = formatState(propKey);
42
+ const kebabName = toKebabCase(rulesName);
43
+ classes.push(`${kebabName}${state}_${value}`);
48
44
  });
49
45
  });
50
- var suffixKey = suffix === 'HTMLContent'
46
+ const suffixKey = suffix === 'HTMLContent'
51
47
  ? 'htmlContent'
52
48
  : (suffix[0].toLowerCase() + suffix.slice(1));
53
49
  acc[suffixKey] = clsx(classes);
54
50
  return acc;
55
51
  }, {});
56
52
  return {
57
- rootClasses: rootClasses,
58
- suffixClasses: suffixClasses,
53
+ rootClasses,
54
+ suffixClasses,
59
55
  };
60
56
  };
61
57
 
@@ -1,28 +1,26 @@
1
- import { _ as __assign } from '../../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { useMemo } from 'react';
3
2
 
4
- var useAppearanceConfig = function (appearance, componentConfig, isDisabled) {
5
- var appearanceConfig = useMemo(function () {
6
- var _a, _b, _c, _d, _e, _f;
3
+ const useAppearanceConfig = (appearance, componentConfig, isDisabled) => {
4
+ const appearanceConfig = useMemo(() => {
7
5
  if (appearance) {
8
- var appearanceProps = appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
9
- var _a;
10
- return (__assign(__assign({}, resultConfig), (_a = componentConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
11
- }, {});
6
+ const appearanceProps = appearance.split(' ').reduce((resultConfig, appearanceKey) => ({
7
+ ...resultConfig,
8
+ ...componentConfig.appearance?.[appearanceKey],
9
+ }), {});
12
10
  if (isDisabled &&
13
- (((_a = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _a === void 0 ? void 0 : _a.disabled) ||
14
- ((_b = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _b === void 0 ? void 0 : _b.disabledPrimary))) {
15
- Object.assign(appearanceProps, ((_c = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _c === void 0 ? void 0 : _c.disabled) ||
16
- ((_d = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _d === void 0 ? void 0 : _d.disabledPrimary));
11
+ (componentConfig?.appearance?.disabled ||
12
+ componentConfig?.appearance?.disabledPrimary)) {
13
+ Object.assign(appearanceProps, componentConfig?.appearance?.disabled ||
14
+ componentConfig?.appearance?.disabledPrimary);
17
15
  }
18
16
  return appearanceProps;
19
17
  }
20
18
  if (isDisabled) {
21
- return (((_e = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _e === void 0 ? void 0 : _e.disabled) ||
22
- ((_f = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance) === null || _f === void 0 ? void 0 : _f.disabledPrimary));
19
+ return (componentConfig?.appearance?.disabled ||
20
+ componentConfig?.appearance?.disabledPrimary);
23
21
  }
24
22
  return {};
25
- }, [appearance, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.appearance, isDisabled]);
23
+ }, [appearance, componentConfig?.appearance, isDisabled]);
26
24
  return appearanceConfig;
27
25
  };
28
26
 
@@ -1,3 +1,2 @@
1
1
  export { useAppearanceConfig } from './useAppearanceConfig/useAppearanceConfig.js';
2
- import '../tslib.es6_es_Bwu1Cn-t.js';
3
2
  import 'react';
@@ -1,4 +1,3 @@
1
- import { a as __spreadArray } from '../../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { useMemo } from 'react';
3
2
  import camelCase from 'lodash/camelCase';
4
3
  import castArray from 'lodash/castArray';
@@ -48,17 +47,17 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
48
47
  * - titleTextSizeDesktop
49
48
  * ---------
50
49
  **/
51
- var deviceCurrentMainType = useUserDeviceContext().deviceCurrentMainType;
52
- var devicePropsGenerator = useMemo(function () {
53
- var propsGenerator = {
54
- getProp: function (propKey) {
55
- var propsForDeviceKey = "".concat(propKey).concat(upperFirst(deviceCurrentMainType));
56
- var valueForDevice = componentProps[propsForDeviceKey];
57
- var valueDefault = componentProps[propKey];
58
- var appearanceForDevice = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propsForDeviceKey];
59
- var appearanceDefault = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propKey];
50
+ const { deviceCurrentMainType } = useUserDeviceContext();
51
+ const devicePropsGenerator = useMemo(() => {
52
+ const propsGenerator = {
53
+ getProp(propKey) {
54
+ const propsForDeviceKey = `${propKey}${upperFirst(deviceCurrentMainType)}`;
55
+ const valueForDevice = componentProps[propsForDeviceKey];
56
+ const valueDefault = componentProps[propKey];
57
+ const appearanceForDevice = appearanceConfig?.[propsForDeviceKey];
58
+ const appearanceDefault = appearanceConfig?.[propKey];
60
59
  // prettier-ignore
61
- var targetPropsValue = (
60
+ const targetPropsValue = (
62
61
  // Value for device from props is first priority
63
62
  valueForDevice ||
64
63
  // Value without device from props is second priority
@@ -70,12 +69,10 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
70
69
  return targetPropsValue;
71
70
  },
72
71
  // eslint-disable-next-line perfectionist/sort-objects
73
- getClassName: function (propKey, params) {
74
- var _a = params || {}, _b = _a.prefix, prefix = _b === void 0 ? '' : _b, _c = _a.replace, replace = _c === void 0 ? [/([A-Z])/g, '-$1'] : _c;
75
- var targetClassValue = this.getProp(String(propKey));
76
- var styleAttributeKeys = styleAttributes.map(function (attr) {
77
- return getStyleAttributeKey(attr);
78
- });
72
+ getClassName(propKey, params) {
73
+ const { prefix = '', replace = [/([A-Z])/g, '-$1'] } = params || {};
74
+ const targetClassValue = this.getProp(String(propKey));
75
+ const styleAttributeKeys = styleAttributes.map((attr) => getStyleAttributeKey(attr));
79
76
  if (styleAttributeKeys.includes(String(propKey)) &&
80
77
  (typeof targetClassValue === 'number' ||
81
78
  (typeof targetClassValue === 'string' &&
@@ -83,36 +80,32 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
83
80
  return '';
84
81
  }
85
82
  if (targetClassValue) {
86
- var cleanClassValue = String(targetClassValue);
83
+ let cleanClassValue = String(targetClassValue);
87
84
  if (!cleanClassValue.includes('.')) {
88
85
  cleanClassValue = camelCase(cleanClassValue);
89
86
  }
90
87
  if (replace) {
91
- var replaceList = castArray(replace);
88
+ const replaceList = castArray(replace);
92
89
  cleanClassValue = cleanClassValue.replace(replaceList[0],
93
90
  // @ts-expect-error
94
91
  replaceList[1] || '');
95
92
  }
96
93
  // prettier-ignore
97
- return "".concat(prefix).concat(cleanClassValue).toLowerCase();
94
+ return `${prefix}${cleanClassValue}`.toLowerCase();
98
95
  }
99
96
  // If target key not exists in props and appearance config - return empty class
100
97
  return '';
101
98
  },
102
99
  };
103
- var generatorProxyHandler = {
104
- get: function (target, propKey, receiver) {
105
- var args = [];
106
- for (var _i = 3; _i < arguments.length; _i++) {
107
- args[_i - 3] = arguments[_i];
108
- }
100
+ const generatorProxyHandler = {
101
+ get(target, propKey, receiver, ...args) {
109
102
  if (typeof propKey === 'string') {
110
103
  // If object does not have the property being retrieved
111
104
  if (!Reflect.has(target, propKey)) {
112
105
  // And property ended on "Class" keyword
113
106
  if (propKey.endsWith('Class')) {
114
107
  // prettier-ignore
115
- var shortProp = propKey.substring(0, propKey.lastIndexOf('Class'));
108
+ const shortProp = propKey.substring(0, propKey.lastIndexOf('Class'));
116
109
  // Return prop from props for device as formatted class name
117
110
  return target.getClassName(shortProp);
118
111
  }
@@ -121,7 +114,7 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
121
114
  }
122
115
  // Return object property. Original "get".
123
116
  // @ts-expect-error
124
- return Reflect.get.apply(Reflect, __spreadArray([target, propKey, receiver], args, false));
117
+ return Reflect.get(target, propKey, receiver, ...args);
125
118
  }
126
119
  // In some cases, like in Chrome browser, sometime "prop" is not string.
127
120
  // We return this object as is.
@@ -1,5 +1,4 @@
1
1
  export { useDevicePropsGenerator } from './useDevicePropsGenerator/useDevicePropsGenerator.js';
2
- import '../tslib.es6_es_Bwu1Cn-t.js';
3
2
  import 'react';
4
3
  import 'lodash/camelCase';
5
4
  import 'lodash/castArray';
@@ -2,7 +2,6 @@ import { useMemo } from 'react';
2
2
  import camelCase from 'lodash/camelCase';
3
3
  import castArray from 'lodash/castArray';
4
4
  import { useUserDeviceContext } from '../context/UIContext.js';
5
- import '../tslib.es6_es_Bwu1Cn-t.js';
6
5
  import 'react/jsx-runtime';
7
6
  import './useMediaQueries/useMediaQueries.js';
8
7
  import 'react-responsive';
@@ -33,7 +33,7 @@ var styleAttributes = [
33
33
  /**
34
34
  * Grid
35
35
  */
36
- 'gridTemplateColumns', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateRows', 'gridColumn', 'gridColumnGap', 'gridRow', 'gridRowGap',
36
+ 'gridTemplateColumns', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateRows', 'gridColumn', 'gridColumnStart', 'gridColumnEnd', 'gridColumnGap', 'gridRow', 'gridRowStart', 'gridRowEnd', 'gridRowGap',
37
37
  /**
38
38
  * Filter
39
39
  */
@@ -6,7 +6,6 @@ import '../../context/Notifications.js';
6
6
  import { useUserDeviceContext } from '../../context/UIContext.js';
7
7
  import { getStyleAttributeKey } from '../../hooks.js';
8
8
  import styleAttributes from './styleAttributes.js';
9
- import '../../tslib.es6_es_Bwu1Cn-t.js';
10
9
  import 'react/jsx-runtime';
11
10
  import 'uuid';
12
11
  import '@itcase/common';
@@ -4,7 +4,6 @@ import 'lodash/camelCase';
4
4
  import 'lodash/maxBy';
5
5
  import 'lodash/upperFirst';
6
6
  import '../context/Notifications.js';
7
- import '../tslib.es6_es_Bwu1Cn-t.js';
8
7
  import 'react/jsx-runtime';
9
8
  import 'uuid';
10
9
  import '@itcase/common';
@@ -1,12 +1,12 @@
1
1
  import { useEffect } from 'react';
2
2
 
3
3
  function useViewportFix() {
4
- useEffect(function () {
4
+ useEffect(() => {
5
5
  // https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
6
- var setViewportProperty = function () {
6
+ const setViewportProperty = () => {
7
7
  // "vh" unit is equal to 1% of the height of the initial containing block
8
8
  // https://www.w3.org/R/css-values-3/#viewport-relative-lengths
9
- var vh = window.innerHeight * 0.01;
9
+ const vh = window.innerHeight * 0.01;
10
10
  /** NOTE:
11
11
  * In JavaScript, you can always get the value of the current viewport
12
12
  * by using the global variable window.innerHeight. This value takes
@@ -26,13 +26,13 @@ function useViewportFix() {
26
26
  * to assign as our viewport height unit value.
27
27
  * Then we politely asked JS to create the CSS variable "--vh" at the ":root":
28
28
  */
29
- document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
29
+ document.documentElement.style.setProperty('--vh', `${vh}px`);
30
30
  };
31
31
  // Update the value of "--vh" after render
32
32
  setViewportProperty();
33
33
  // Update the value of "--vh" by listening to the window resize event
34
34
  window.addEventListener('resize', setViewportProperty);
35
- return function () {
35
+ return () => {
36
36
  window.removeEventListener('resize', setViewportProperty);
37
37
  };
38
38
  }, []);
package/dist/hooks.js CHANGED
@@ -1,4 +1,4 @@
1
- var getStyleAttributeKey = function (targetStyleAttribute) {
1
+ const getStyleAttributeKey = (targetStyleAttribute) => {
2
2
  return Array.isArray(targetStyleAttribute)
3
3
  ? targetStyleAttribute[0]
4
4
  : targetStyleAttribute;