@prom-ui/core 1.3.1 → 1.4.0

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 (233) hide show
  1. package/Avatar/cjs/index.development.js +99 -67
  2. package/Avatar/cjs/index.development.v2.js +99 -67
  3. package/Avatar/cjs/index.production.js +1 -1
  4. package/Avatar/cjs/index.production.v2.js +1 -1
  5. package/Avatar/index.d.ts +14 -14
  6. package/Avatar/package.json +1 -1
  7. package/Avatar/utils.d.ts +2 -2
  8. package/Backdrop/cjs/index.development.js +131 -77
  9. package/Backdrop/cjs/index.development.v2.js +131 -77
  10. package/Backdrop/cjs/index.production.js +1 -1
  11. package/Backdrop/cjs/index.production.v2.js +1 -1
  12. package/Backdrop/index.d.ts +25 -25
  13. package/Backdrop/package.json +1 -1
  14. package/Body/cjs/index.development.js +2 -0
  15. package/Body/cjs/index.development.v2.js +2 -0
  16. package/Body/index.d.ts +36 -36
  17. package/Body/package.json +1 -1
  18. package/BodyContext/cjs/index.development.js +6 -7
  19. package/BodyContext/cjs/index.development.v2.js +6 -7
  20. package/BodyContext/cjs/index.production.js +1 -1
  21. package/BodyContext/cjs/index.production.v2.js +1 -1
  22. package/BodyContext/index.d.ts +12 -12
  23. package/BodyContext/package.json +1 -1
  24. package/BodyProvider/cjs/index.development.js +7 -6
  25. package/BodyProvider/cjs/index.development.v2.js +7 -6
  26. package/BodyProvider/index.d.ts +10 -10
  27. package/BodyProvider/package.json +1 -1
  28. package/Box/cjs/index.development.js +4 -4
  29. package/Box/cjs/index.development.v2.js +4 -4
  30. package/Box/index.d.ts +106 -106
  31. package/Box/package.json +1 -1
  32. package/Button/cjs/index.development.js +67 -62
  33. package/Button/cjs/index.development.v2.js +67 -62
  34. package/Button/cjs/index.production.js +1 -1
  35. package/Button/cjs/index.production.v2.js +1 -1
  36. package/Button/index.d.ts +45 -45
  37. package/Button/package.json +1 -1
  38. package/ButtonPageUp/cjs/index.development.js +195 -85
  39. package/ButtonPageUp/cjs/index.development.v2.js +195 -85
  40. package/ButtonPageUp/cjs/index.production.js +1 -1
  41. package/ButtonPageUp/cjs/index.production.v2.js +1 -1
  42. package/ButtonPageUp/index.d.ts +18 -18
  43. package/ButtonPageUp/package.json +1 -1
  44. package/Checkbox/cjs/index.development.js +99 -67
  45. package/Checkbox/cjs/index.development.v2.js +99 -67
  46. package/Checkbox/cjs/index.production.js +1 -1
  47. package/Checkbox/cjs/index.production.v2.js +1 -1
  48. package/Checkbox/index.d.ts +8 -8
  49. package/Checkbox/package.json +1 -1
  50. package/Flex/index.d.ts +34 -34
  51. package/Flex/package.json +1 -1
  52. package/Grid/index.d.ts +46 -46
  53. package/Grid/package.json +1 -1
  54. package/Icon/index.d.ts +9 -9
  55. package/Icon/package.json +1 -1
  56. package/Image/index.d.ts +42 -42
  57. package/Image/package.json +1 -1
  58. package/ImageEmoji/cjs/index.development.js +70 -63
  59. package/ImageEmoji/cjs/index.development.v2.js +70 -63
  60. package/ImageEmoji/cjs/index.production.js +1 -1
  61. package/ImageEmoji/cjs/index.production.v2.js +1 -1
  62. package/ImageEmoji/index.d.ts +9 -9
  63. package/ImageEmoji/package.json +1 -1
  64. package/Input/index.d.ts +18 -18
  65. package/Input/package.json +1 -1
  66. package/InputField/addons/AfterClearValue.d.ts +3 -3
  67. package/InputField/addons/AfterCorrectValue.d.ts +2 -2
  68. package/InputField/addons/AfterLoading.d.ts +2 -2
  69. package/InputField/addons/AfterTogglePassword.d.ts +6 -6
  70. package/InputField/addons/ErrorText.d.ts +6 -6
  71. package/InputField/cjs/index.development.js +237 -173
  72. package/InputField/cjs/index.development.v2.js +237 -173
  73. package/InputField/cjs/index.production.js +1 -1
  74. package/InputField/cjs/index.production.v2.js +1 -1
  75. package/InputField/index.d.ts +18 -18
  76. package/InputField/package.json +1 -1
  77. package/InputField/utils.d.ts +10 -10
  78. package/KeyPress/cjs/index.development.js +13 -13
  79. package/KeyPress/cjs/index.development.v2.js +13 -13
  80. package/KeyPress/index.d.ts +14 -14
  81. package/KeyPress/package.json +1 -1
  82. package/Line/index.d.ts +13 -13
  83. package/Line/package.json +1 -1
  84. package/Link/cjs/index.development.js +5 -5
  85. package/Link/cjs/index.development.v2.js +5 -5
  86. package/Link/index.d.ts +28 -28
  87. package/Link/package.json +1 -1
  88. package/List/index.d.ts +23 -23
  89. package/List/package.json +1 -1
  90. package/Media/MediaProvider.d.ts +8 -8
  91. package/Media/cjs/index.development.js +70 -19
  92. package/Media/cjs/index.development.v2.js +70 -19
  93. package/Media/cjs/index.production.js +1 -1
  94. package/Media/cjs/index.production.v2.js +1 -1
  95. package/Media/index.d.ts +20 -20
  96. package/Media/package.json +1 -1
  97. package/OutsideClick/cjs/index.development.js +117 -61
  98. package/OutsideClick/cjs/index.development.v2.js +117 -61
  99. package/OutsideClick/cjs/index.production.js +1 -1
  100. package/OutsideClick/cjs/index.production.v2.js +1 -1
  101. package/OutsideClick/index.d.ts +12 -12
  102. package/OutsideClick/package.json +1 -1
  103. package/Overlay/cjs/index.development.js +197 -183
  104. package/Overlay/cjs/index.development.v2.js +197 -183
  105. package/Overlay/cjs/index.production.js +1 -1
  106. package/Overlay/cjs/index.production.v2.js +1 -1
  107. package/Overlay/components/OverlayHeader.d.ts +11 -11
  108. package/Overlay/components/SwipeClose.d.ts +11 -11
  109. package/Overlay/components/TouchScrollable.d.ts +8 -8
  110. package/Overlay/index.d.ts +76 -76
  111. package/Overlay/package.json +1 -1
  112. package/Overlay/utils.d.ts +10 -10
  113. package/Picture/index.d.ts +70 -70
  114. package/Picture/package.json +1 -1
  115. package/Portal/cjs/index.development.js +11 -11
  116. package/Portal/cjs/index.development.v2.js +11 -11
  117. package/Portal/index.d.ts +10 -10
  118. package/Portal/package.json +1 -1
  119. package/QRCode/cjs/index.development.js +11 -11
  120. package/QRCode/cjs/index.development.v2.js +11 -11
  121. package/QRCode/index.d.ts +17 -17
  122. package/QRCode/package.json +1 -1
  123. package/Rating/cjs/index.development.js +75 -69
  124. package/Rating/cjs/index.development.v2.js +75 -69
  125. package/Rating/cjs/index.production.js +1 -1
  126. package/Rating/cjs/index.production.v2.js +1 -1
  127. package/Rating/index.d.ts +17 -17
  128. package/Rating/package.json +1 -1
  129. package/RatingSelect/cjs/index.development.js +148 -68
  130. package/RatingSelect/cjs/index.development.v2.js +148 -68
  131. package/RatingSelect/cjs/index.production.js +1 -1
  132. package/RatingSelect/cjs/index.production.v2.js +1 -1
  133. package/RatingSelect/index.d.ts +22 -18
  134. package/RatingSelect/package.json +1 -1
  135. package/SafeQuery/cjs/index.development.js +158 -110
  136. package/SafeQuery/cjs/index.development.v2.js +158 -110
  137. package/SafeQuery/cjs/index.production.js +1 -1
  138. package/SafeQuery/cjs/index.production.v2.js +1 -1
  139. package/SafeQuery/components/Error.d.ts +7 -7
  140. package/SafeQuery/index.d.ts +10 -10
  141. package/SafeQuery/package.json +1 -1
  142. package/Scroll/index.d.ts +25 -25
  143. package/Scroll/package.json +1 -1
  144. package/ScrollControls/ScrollControlsButton.d.ts +11 -11
  145. package/ScrollControls/cjs/index.development.js +201 -113
  146. package/ScrollControls/cjs/index.development.v2.js +201 -113
  147. package/ScrollControls/cjs/index.production.js +1 -1
  148. package/ScrollControls/cjs/index.production.v2.js +1 -1
  149. package/ScrollControls/index.d.ts +16 -16
  150. package/ScrollControls/package.json +1 -1
  151. package/SimpleSlider/cjs/index.development.js +270 -158
  152. package/SimpleSlider/cjs/index.development.v2.js +270 -158
  153. package/SimpleSlider/cjs/index.production.js +1 -1
  154. package/SimpleSlider/cjs/index.production.v2.js +1 -1
  155. package/SimpleSlider/index.d.ts +41 -41
  156. package/SimpleSlider/package.json +1 -1
  157. package/SimpleSlider/useAutoPlay.d.ts +3 -3
  158. package/SimpleSlider/utils.d.ts +19 -19
  159. package/Skeleton/cjs/index.development.js +118 -64
  160. package/Skeleton/cjs/index.development.v2.js +118 -64
  161. package/Skeleton/cjs/index.production.js +1 -1
  162. package/Skeleton/cjs/index.production.v2.js +1 -1
  163. package/Skeleton/index.d.ts +37 -37
  164. package/Skeleton/package.json +1 -1
  165. package/Spinner/cjs/index.development.js +66 -61
  166. package/Spinner/cjs/index.development.v2.js +66 -61
  167. package/Spinner/cjs/index.production.js +1 -1
  168. package/Spinner/cjs/index.production.v2.js +1 -1
  169. package/Spinner/index.d.ts +29 -29
  170. package/Spinner/package.json +1 -1
  171. package/Text/index.d.ts +25 -25
  172. package/Text/package.json +1 -1
  173. package/TextEmoji/cjs/index.development.js +65 -60
  174. package/TextEmoji/cjs/index.development.v2.js +65 -60
  175. package/TextEmoji/cjs/index.production.js +1 -1
  176. package/TextEmoji/cjs/index.production.v2.js +1 -1
  177. package/TextEmoji/index.d.ts +9 -9
  178. package/TextEmoji/package.json +1 -1
  179. package/Tooltip/cjs/index.development.js +80 -91
  180. package/Tooltip/cjs/index.development.v2.js +80 -91
  181. package/Tooltip/cjs/index.production.js +1 -1
  182. package/Tooltip/cjs/index.production.v2.js +1 -1
  183. package/Tooltip/index.d.ts +87 -87
  184. package/Tooltip/package.json +1 -1
  185. package/Tumbler/cjs/index.development.js +98 -66
  186. package/Tumbler/cjs/index.development.v2.js +98 -66
  187. package/Tumbler/cjs/index.production.js +1 -1
  188. package/Tumbler/cjs/index.production.v2.js +1 -1
  189. package/Tumbler/index.d.ts +8 -8
  190. package/Tumbler/package.json +1 -1
  191. package/package.json +7 -5
  192. package/useBodyTTag/cjs/index.development.js +1 -1
  193. package/useBodyTTag/cjs/index.development.v2.js +1 -1
  194. package/useBodyTTag/index.d.ts +2 -2
  195. package/useBodyTTag/package.json +1 -1
  196. package/useDebounce/cjs/index.development.js +58 -6
  197. package/useDebounce/cjs/index.development.v2.js +58 -6
  198. package/useDebounce/cjs/index.production.js +1 -1
  199. package/useDebounce/cjs/index.production.v2.js +1 -1
  200. package/useDebounce/index.d.ts +4 -4
  201. package/useDebounce/package.json +1 -1
  202. package/useId/cjs/index.development.js +6 -7
  203. package/useId/cjs/index.development.v2.js +6 -7
  204. package/useId/cjs/index.production.js +1 -1
  205. package/useId/cjs/index.production.v2.js +1 -1
  206. package/useId/index.d.ts +4 -4
  207. package/useId/package.json +1 -1
  208. package/useIsMounted/cjs/index.development.js +3 -3
  209. package/useIsMounted/cjs/index.development.v2.js +3 -3
  210. package/useIsMounted/index.d.ts +4 -4
  211. package/useIsMounted/package.json +1 -1
  212. package/useKeyPress/cjs/index.development.js +76 -22
  213. package/useKeyPress/cjs/index.development.v2.js +76 -22
  214. package/useKeyPress/cjs/index.production.js +1 -1
  215. package/useKeyPress/cjs/index.production.v2.js +1 -1
  216. package/useKeyPress/index.d.ts +6 -6
  217. package/useKeyPress/package.json +1 -1
  218. package/useMedia/cjs/index.development.js +5 -5
  219. package/useMedia/cjs/index.development.v2.js +5 -5
  220. package/useMedia/index.d.ts +21 -21
  221. package/useMedia/package.json +1 -1
  222. package/useOutsideClick/cjs/index.development.js +2 -2
  223. package/useOutsideClick/cjs/index.development.v2.js +2 -2
  224. package/useOutsideClick/index.d.ts +5 -5
  225. package/useOutsideClick/package.json +1 -1
  226. package/usePortal/cjs/index.development.js +32 -27
  227. package/usePortal/cjs/index.development.v2.js +32 -27
  228. package/usePortal/index.d.ts +12 -12
  229. package/usePortal/package.json +1 -1
  230. package/useScrollPosition/cjs/index.development.js +2 -2
  231. package/useScrollPosition/cjs/index.development.v2.js +2 -2
  232. package/useScrollPosition/index.d.ts +5 -5
  233. package/useScrollPosition/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@prom-ui/core/Input"),n=require("@prom-ui/core/useId"),r=require("@prom-ui/core/Button"),i=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/useBodyTTag"),o=require("@prom-ui/icons/EyeOpen"),u=require("@prom-ui/icons/EyeClose"),c=require("@prom-ui/core/Spinner"),l=require("@prom-ui/icons/Ok"),d=require("@prom-ui/icons/Cancel");function s(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var f=s(e),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)};function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var m,h,b,y=function(e){var t=e.inputType,n=e.onChange,c=a.useBodyTTag().t;return"text"===t?f.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("password")},title:c(m||(m=v(["Скрыть пароль"],["Скрыть пароль"]))),tabIndex:-1,"data-qaid":"input_field_hide_password","data-testid":"input_field_hide_password"},f.createElement(i.Icon,{"icon-as":o.SvgEyeOpen,"icon-color":"black-700","icon-events":"none",style:{width:16,height:16}})):f.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("text")},title:c(h||(h=v(["Показать пароль"],["Показать пароль"]))),tabIndex:-1,"data-qaid":"input_field_show_password","data-testid":"input_field_show_password"},f.createElement(i.Icon,{"icon-as":u.SvgEyeClose,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},g=function(){return f.createElement(c.Spinner,{"spinner-color":"violet-500",width:16,height:16,"data-qaid":"input_field_loading","data-testid":"input_field_loading"})},_=function(){return f.createElement(i.Icon,{"icon-as":l.SvgOk,"icon-color":"green-800","icon-events":"none","data-qaid":"input_field_correct_value","data-testid":"input_field_correct_value",style:{width:16,height:16}})},q=function(e){var t=a.useBodyTTag().t;return f.createElement(r.Button,p({type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",title:t(b||(b=v(["Очистить"],["Очистить"]))),tabIndex:-1,"data-qaid":"input_field_clear_value","data-testid":"input_field_clear_value"},e),f.createElement(i.Icon,{"icon-as":d.SvgCancel,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},E="UnXum",w="_1Wl0O",O="-TbcG cUXq3",j="QmiGS cUXq3",B="_7Fcq2",I="uV711",x="cxqrg",T=function(e){var t=e.id,n=e.children;return f.createElement("div",{id:t,className:B,"data-qaid":"input_field_error","data-testid":"input_field_error"},n)};function C(e,t,n,r){if(n){var i=t;if("click"===t.type){var a=e.cloneNode(!0);return i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(i)}if(void 0!==r)return i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,void n(i);n(i)}}function N(e){return function(e){return Number.isInteger(e)||e?"".concat(e):""}(e).length<=0}var S=f.forwardRef((function(e,r){var i=e.addonBefore,a=e.addonAfter,o=e.addonBeforeWidth,u=void 0===o?40:o,c=e.addonAfterWidth,l=void 0===c?40:c,d=e.error,s=void 0!==d&&d,v=e.label,m=e.isLabelRequired,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["addonBefore","addonAfter","addonBeforeWidth","addonAfterWidth","error","label","isLabelRequired"]),b=n.useId(),B=f.useRef(!1),S=f.useRef(!1),k=f.useRef(!1),P=function(e,t){void 0===t&&(t=null);var n=f.useRef(t);return f.useEffect((function(){return e&&("function"==typeof e?e(n.current):e.current=n.current),function(){}}),[e]),n}(r,null),A=f.useState(h.type),F=A[0],R=A[1],W=f.useState(N(h.value||h.defaultValue)),L=W[0],V=W[1];f.useEffect((function(){if(B.current){var e=N(h.value);e!==L&&V(e)}else B.current=!0}),[h.value]);var M=null;M="password"===h.type&&"togglePassword"===a?f.createElement(y,{inputType:F,onChange:function(e){return R(e)}}):"clearValue"===a?L?null:f.createElement(q,{onClick:function(e){var t;N(h.value)||h.onChange?P.current&&(V(!0),P.current.focus(),C(P.current,e,h.onChange),N(h.value)&&(P.current.value="")):null===(t=P.current)||void 0===t||t.focus()},onMouseEnter:function(){S.current=!0,k.current=!0},onTouchStart:function(){S.current=!0,k.current=!0},onMouseLeave:function(){S.current=!1,k.current=!1},onTouchEnd:function(){S.current=!1,k.current=!1}}):"correctValue"===a?f.createElement(_,null):"loading"===a?f.createElement(g,null):a;var U,X=(null==h?void 0:h.id)||b,G=function(e,t){var n=[];return Array.isArray(t)?n=t.filter((function(e){return Boolean(e)})).map((function(t,n){return{id:"".concat(e,"-error-").concat(n),content:t}})):"string"==typeof t&&Boolean(t)&&(n=[{id:"".concat(e,"-error-0"),content:t}]),n}(X,s),z=!!v,D=!!i,Q=!!M,H=(U=G,Array.isArray(U)&&U.length>0),J=H||!0===s,K=Boolean((null==h?void 0:h.required)||m);return f.createElement("div",{className:h.className,style:h.style,"data-qaid":h["data-qaid"]||"input_field","data-testid":h["data-testid"]||"input_field"},z&&f.createElement("div",{className:I},f.createElement("label",{"data-qaid":"input_field_label","data-testid":"input_field_label",htmlFor:X},v),K&&f.createElement(f.Fragment,null," ",f.createElement("span",{className:x,"data-qaid":"input_field_label_required","data-testid":"input_field_label_required"},"*"))),f.createElement("div",{className:E},f.createElement(t.Input,p({ref:P,"input-theme":J?"red":"white","aria-invalid":J,"aria-required":K,"aria-describedby":H?G.map((function(e){return e.id})).join(" "):void 0},h,{id:X,"data-qaid":"input_field_textbox","data-testid":"input_field_textbox",style:{paddingLeft:D?u:void 0,paddingRight:Q?l:void 0},className:w,type:F,onFocus:function(e){!S.current&&h.onFocus&&h.onFocus(e),S.current=!1},onBlur:function(e){!k.current&&h.onBlur&&h.onBlur(e),k.current=!1},onChange:function(e){V(N(e.target.value)),C(e.currentTarget,e,h.onChange)}})),D&&f.createElement("div",{className:O,style:{width:u}},i),Q&&f.createElement("div",{className:j,style:{width:l}},M)),H&&G.map((function(e){var t=e.id,n=e.content;return f.createElement(T,{key:t,id:t},n)})))}));S.displayName="InputField",exports.InputField=S,require("./style.production.css");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@prom-ui/core/Input"),n=require("@prom-ui/core/useId"),r=require("@prom-ui/core/Button"),i=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/useBodyTTag"),o=require("@prom-ui/icons/EyeOpen"),u=require("@prom-ui/icons/EyeClose"),c=require("@prom-ui/core/Spinner"),l=require("@prom-ui/icons/Ok"),d=require("@prom-ui/icons/Cancel");function f(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s,p,v=f(e);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,u=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(d){l=!0,i=d}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _,E=function(e){var t=e.inputType,n=e.onChange,c=a.useBodyTTag().t;return"text"===t?v.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("password")},title:c(s||(s=m(["Скрыть пароль"]))),tabIndex:-1,"data-qaid":"input_field_hide_password","data-testid":"input_field_hide_password"},v.createElement(i.Icon,{"icon-as":o.SvgEyeOpen,"icon-color":"black-700","icon-events":"none",style:{width:16,height:16}})):v.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("text")},title:c(p||(p=m(["Показать пароль"]))),tabIndex:-1,"data-qaid":"input_field_show_password","data-testid":"input_field_show_password"},v.createElement(i.Icon,{"icon-as":u.SvgEyeClose,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},q=function(){return v.createElement(c.Spinner,{"spinner-color":"violet-500",width:16,height:16,"data-qaid":"input_field_loading","data-testid":"input_field_loading"})},O=function(){return v.createElement(i.Icon,{"icon-as":l.SvgOk,"icon-color":"green-800","icon-events":"none","data-qaid":"input_field_correct_value","data-testid":"input_field_correct_value",style:{width:16,height:16}})},w=function(e){var t=a.useBodyTTag().t;return v.createElement(r.Button,b({type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",title:t(_||(_=m(["Очистить"]))),tabIndex:-1,"data-qaid":"input_field_clear_value","data-testid":"input_field_clear_value"},e),v.createElement(i.Icon,{"icon-as":d.SvgCancel,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},j="UnXum",I="_1Wl0O",B="-TbcG cUXq3",S="QmiGS cUXq3",x="_7Fcq2",T="uV711",A="cxqrg",C=function(e){var t=e.id,n=e.children;return v.createElement("div",{id:t,className:x,"data-qaid":"input_field_error","data-testid":"input_field_error"},n)};function k(e,t,n,r){if(n){var i=t;if("click"===t.type){var a=e.cloneNode(!0);return i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(i)}if(void 0!==r)return i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,void n(i);n(i)}}function N(e){return function(e){return Number.isInteger(e)||e?"".concat(e):""}(e).length<=0}var F=["addonBefore","addonAfter","addonBeforeWidth","addonAfterWidth","error","label","isLabelRequired"],P=v.forwardRef((function(e,r){var i=e.addonBefore,a=e.addonAfter,o=e.addonBeforeWidth,u=void 0===o?40:o,c=e.addonAfterWidth,l=void 0===c?40:c,d=e.error,f=void 0!==d&&d,s=e.label,p=e.isLabelRequired,m=y(e,F),g=n.useId(),_=v.useRef(!1),x=v.useRef(!1),P=v.useRef(!1),R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=v.useRef(t);return v.useEffect((function(){return e&&("function"==typeof e?e(n.current):e.current=n.current),function(){}}),[e]),n}(r,null),W=h(v.useState(m.type),2),L=W[0],M=W[1],U=h(v.useState(N(m.value||m.defaultValue)),2),V=U[0],z=U[1];v.useEffect((function(){if(_.current){var e=N(m.value);e!==V&&z(e)}else _.current=!0}),[m.value]);var X=null;X="password"===m.type&&"togglePassword"===a?v.createElement(E,{inputType:L,onChange:function(e){return M(e)}}):"clearValue"===a?V?null:v.createElement(w,{onClick:function(e){var t;N(m.value)||m.onChange?R.current&&(z(!0),R.current.focus(),k(R.current,e,m.onChange),N(m.value)&&(R.current.value="")):null===(t=R.current)||void 0===t||t.focus()},onMouseEnter:function(){x.current=!0,P.current=!0},onTouchStart:function(){x.current=!0,P.current=!0},onMouseLeave:function(){x.current=!1,P.current=!1},onTouchEnd:function(){x.current=!1,P.current=!1}}):"correctValue"===a?v.createElement(O,null):"loading"===a?v.createElement(q,null):a;var G,D=(null==m?void 0:m.id)||g,Q=function(e,t){var n=[];return Array.isArray(t)?n=t.filter((function(e){return Boolean(e)})).map((function(t,n){return{id:"".concat(e,"-error-").concat(n),content:t}})):"string"==typeof t&&Boolean(t)&&(n=[{id:"".concat(e,"-error-0"),content:t}]),n}(D,f),$=!!s,H=!!i,J=!!X,K=(G=Q,Array.isArray(G)&&G.length>0),Y=K||!0===f,Z=Boolean((null==m?void 0:m.required)||p);return v.createElement("div",{className:m.className,style:m.style,"data-qaid":m["data-qaid"]||"input_field","data-testid":m["data-testid"]||"input_field"},$&&v.createElement("div",{className:T},v.createElement("label",{"data-qaid":"input_field_label","data-testid":"input_field_label",htmlFor:D},s),Z&&v.createElement(v.Fragment,null," ",v.createElement("span",{className:A,"data-qaid":"input_field_label_required","data-testid":"input_field_label_required"},"*"))),v.createElement("div",{className:j},v.createElement(t.Input,b({ref:R,"input-theme":Y?"red":"white","aria-invalid":Y,"aria-required":Z,"aria-describedby":K?Q.map((function(e){return e.id})).join(" "):void 0},m,{id:D,"data-qaid":"input_field_textbox","data-testid":"input_field_textbox",style:{paddingLeft:H?u:void 0,paddingRight:J?l:void 0},className:I,type:L,onFocus:function(e){!x.current&&m.onFocus&&m.onFocus(e),x.current=!1},onBlur:function(e){!P.current&&m.onBlur&&m.onBlur(e),P.current=!1},onChange:function(e){z(N(e.target.value)),k(e.currentTarget,e,m.onChange)}})),H&&v.createElement("div",{className:B,style:{width:u}},i),J&&v.createElement("div",{className:S,style:{width:l}},X)),K&&Q.map((function(e){var t=e.id,n=e.content;return v.createElement(C,{key:t,id:t},n)})))}));P.displayName="InputField",exports.InputField=P,require("./style.production.css");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@prom-ui/core/Input"),n=require("@prom-ui/core/useId"),r=require("@prom-ui/core/Button"),i=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/useBodyTTag"),o=require("@prom-ui/icons/EyeOpen"),u=require("@prom-ui/icons/EyeClose"),c=require("@prom-ui/core/Spinner"),l=require("@prom-ui/icons/Ok"),d=require("@prom-ui/icons/Cancel");function s(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var f=s(e),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)};function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var h,b,m,y=function(e){var t=e.inputType,n=e.onChange,c=a.useBodyTTag().t;return"text"===t?f.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("password")},title:c(h||(h=v(["Скрыть пароль"],["Скрыть пароль"]))),tabIndex:-1,"data-qaid":"input_field_hide_password","data-testid":"input_field_hide_password"},f.createElement(i.Icon,{"icon-as":o.SvgEyeOpen,"icon-color":"black-700","icon-events":"none",style:{width:16,height:16}})):f.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("text")},title:c(b||(b=v(["Показать пароль"],["Показать пароль"]))),tabIndex:-1,"data-qaid":"input_field_show_password","data-testid":"input_field_show_password"},f.createElement(i.Icon,{"icon-as":u.SvgEyeClose,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},g=function(){return f.createElement(c.Spinner,{"spinner-color":"violet-500",width:16,height:16,"data-qaid":"input_field_loading","data-testid":"input_field_loading"})},_=function(){return f.createElement(i.Icon,{"icon-as":l.SvgOk,"icon-color":"green-800","icon-events":"none","data-qaid":"input_field_correct_value","data-testid":"input_field_correct_value",style:{width:16,height:16}})},E=function(e){var t=a.useBodyTTag().t;return f.createElement(r.Button,p({type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",title:t(m||(m=v(["Очистить"],["Очистить"]))),tabIndex:-1,"data-qaid":"input_field_clear_value","data-testid":"input_field_clear_value"},e),f.createElement(i.Icon,{"icon-as":d.SvgCancel,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},q="EVTeN",w="rfpBC",O="GeS6- oqO-V",j="Cl38- oqO-V",B="hSs8w",T="bwxYk",I="bTTTw",C=function(e){var t=e.id,n=e.children;return f.createElement("div",{id:t,className:B,"data-qaid":"input_field_error","data-testid":"input_field_error"},n)};function x(e,t,n,r){if(n){var i=t;if("click"===t.type){var a=e.cloneNode(!0);return i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(i)}if(void 0!==r)return i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,void n(i);n(i)}}function N(e){return function(e){return Number.isInteger(e)||e?"".concat(e):""}(e).length<=0}var S=f.forwardRef((function(e,r){var i=e.addonBefore,a=e.addonAfter,o=e.addonBeforeWidth,u=void 0===o?40:o,c=e.addonAfterWidth,l=void 0===c?40:c,d=e.error,s=void 0!==d&&d,v=e.label,h=e.isLabelRequired,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["addonBefore","addonAfter","addonBeforeWidth","addonAfterWidth","error","label","isLabelRequired"]),m=n.useId(),B=f.useRef(!1),S=f.useRef(!1),k=f.useRef(!1),P=function(e,t){void 0===t&&(t=null);var n=f.useRef(t);return f.useEffect((function(){return e&&("function"==typeof e?e(n.current):e.current=n.current),function(){}}),[e]),n}(r,null),A=f.useState(b.type),R=A[0],F=A[1],V=f.useState(N(b.value||b.defaultValue)),L=V[0],W=V[1];f.useEffect((function(){if(B.current){var e=N(b.value);e!==L&&W(e)}else B.current=!0}),[b.value]);var M=null;M="password"===b.type&&"togglePassword"===a?f.createElement(y,{inputType:R,onChange:function(e){return F(e)}}):"clearValue"===a?L?null:f.createElement(E,{onClick:function(e){var t;N(b.value)||b.onChange?P.current&&(W(!0),P.current.focus(),x(P.current,e,b.onChange),N(b.value)&&(P.current.value="")):null===(t=P.current)||void 0===t||t.focus()},onMouseEnter:function(){S.current=!0,k.current=!0},onTouchStart:function(){S.current=!0,k.current=!0},onMouseLeave:function(){S.current=!1,k.current=!1},onTouchEnd:function(){S.current=!1,k.current=!1}}):"correctValue"===a?f.createElement(_,null):"loading"===a?f.createElement(g,null):a;var z,D=(null==b?void 0:b.id)||m,G=function(e,t){var n=[];return Array.isArray(t)?n=t.filter((function(e){return Boolean(e)})).map((function(t,n){return{id:"".concat(e,"-error-").concat(n),content:t}})):"string"==typeof t&&Boolean(t)&&(n=[{id:"".concat(e,"-error-0"),content:t}]),n}(D,s),Y=!!v,H=!!i,J=!!M,K=(z=G,Array.isArray(z)&&z.length>0),Q=K||!0===s,U=Boolean((null==b?void 0:b.required)||h);return f.createElement("div",{className:b.className,style:b.style,"data-qaid":b["data-qaid"]||"input_field","data-testid":b["data-testid"]||"input_field"},Y&&f.createElement("div",{className:T},f.createElement("label",{"data-qaid":"input_field_label","data-testid":"input_field_label",htmlFor:D},v),U&&f.createElement(f.Fragment,null," ",f.createElement("span",{className:I,"data-qaid":"input_field_label_required","data-testid":"input_field_label_required"},"*"))),f.createElement("div",{className:q},f.createElement(t.Input,p({ref:P,"input-theme":Q?"red":"white","aria-invalid":Q,"aria-required":U,"aria-describedby":K?G.map((function(e){return e.id})).join(" "):void 0},b,{id:D,"data-qaid":"input_field_textbox","data-testid":"input_field_textbox",style:{paddingLeft:H?u:void 0,paddingRight:J?l:void 0},className:w,type:R,onFocus:function(e){!S.current&&b.onFocus&&b.onFocus(e),S.current=!1},onBlur:function(e){!k.current&&b.onBlur&&b.onBlur(e),k.current=!1},onChange:function(e){W(N(e.target.value)),x(e.currentTarget,e,b.onChange)}})),H&&f.createElement("div",{className:O,style:{width:u}},i),J&&f.createElement("div",{className:j,style:{width:l}},M)),K&&G.map((function(e){var t=e.id,n=e.content;return f.createElement(C,{key:t,id:t},n)})))}));S.displayName="InputField",exports.InputField=S,require("./style.production.v2.css");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@prom-ui/core/Input"),n=require("@prom-ui/core/useId"),r=require("@prom-ui/core/Button"),i=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/useBodyTTag"),o=require("@prom-ui/icons/EyeOpen"),u=require("@prom-ui/icons/EyeClose"),c=require("@prom-ui/core/Spinner"),l=require("@prom-ui/icons/Ok"),d=require("@prom-ui/icons/Cancel");function f(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s,p,v=f(e);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,u=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(d){l=!0,i=d}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _,E=function(e){var t=e.inputType,n=e.onChange,c=a.useBodyTTag().t;return"text"===t?v.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("password")},title:c(s||(s=h(["Скрыть пароль"]))),tabIndex:-1,"data-qaid":"input_field_hide_password","data-testid":"input_field_hide_password"},v.createElement(i.Icon,{"icon-as":o.SvgEyeOpen,"icon-color":"black-700","icon-events":"none",style:{width:16,height:16}})):v.createElement(r.Button,{type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",onClick:function(){return n("text")},title:c(p||(p=h(["Показать пароль"]))),tabIndex:-1,"data-qaid":"input_field_show_password","data-testid":"input_field_show_password"},v.createElement(i.Icon,{"icon-as":u.SvgEyeClose,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},O=function(){return v.createElement(c.Spinner,{"spinner-color":"violet-500",width:16,height:16,"data-qaid":"input_field_loading","data-testid":"input_field_loading"})},w=function(){return v.createElement(i.Icon,{"icon-as":l.SvgOk,"icon-color":"green-800","icon-events":"none","data-qaid":"input_field_correct_value","data-testid":"input_field_correct_value",style:{width:16,height:16}})},q=function(e){var t=a.useBodyTTag().t;return v.createElement(r.Button,b({type:"button","button-height":"1-1","button-width":"1-1","button-padding":"none",title:t(_||(_=h(["Очистить"]))),tabIndex:-1,"data-qaid":"input_field_clear_value","data-testid":"input_field_clear_value"},e),v.createElement(i.Icon,{"icon-as":d.SvgCancel,"icon-color":"black-600","icon-events":"none",style:{width:16,height:16}}))},j="EVTeN",I="rfpBC",B="GeS6- oqO-V",S="Cl38- oqO-V",T="hSs8w",C="bwxYk",x="bTTTw",A=function(e){var t=e.id,n=e.children;return v.createElement("div",{id:t,className:T,"data-qaid":"input_field_error","data-testid":"input_field_error"},n)};function k(e,t,n,r){if(n){var i=t;if("click"===t.type){var a=e.cloneNode(!0);return i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(i)}if(void 0!==r)return i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,void n(i);n(i)}}function N(e){return function(e){return Number.isInteger(e)||e?"".concat(e):""}(e).length<=0}var P=["addonBefore","addonAfter","addonBeforeWidth","addonAfterWidth","error","label","isLabelRequired"],R=v.forwardRef((function(e,r){var i=e.addonBefore,a=e.addonAfter,o=e.addonBeforeWidth,u=void 0===o?40:o,c=e.addonAfterWidth,l=void 0===c?40:c,d=e.error,f=void 0!==d&&d,s=e.label,p=e.isLabelRequired,h=y(e,P),g=n.useId(),_=v.useRef(!1),T=v.useRef(!1),R=v.useRef(!1),F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=v.useRef(t);return v.useEffect((function(){return e&&("function"==typeof e?e(n.current):e.current=n.current),function(){}}),[e]),n}(r,null),V=m(v.useState(h.type),2),L=V[0],M=V[1],W=m(v.useState(N(h.value||h.defaultValue)),2),z=W[0],D=W[1];v.useEffect((function(){if(_.current){var e=N(h.value);e!==z&&D(e)}else _.current=!0}),[h.value]);var G=null;G="password"===h.type&&"togglePassword"===a?v.createElement(E,{inputType:L,onChange:function(e){return M(e)}}):"clearValue"===a?z?null:v.createElement(q,{onClick:function(e){var t;N(h.value)||h.onChange?F.current&&(D(!0),F.current.focus(),k(F.current,e,h.onChange),N(h.value)&&(F.current.value="")):null===(t=F.current)||void 0===t||t.focus()},onMouseEnter:function(){T.current=!0,R.current=!0},onTouchStart:function(){T.current=!0,R.current=!0},onMouseLeave:function(){T.current=!1,R.current=!1},onTouchEnd:function(){T.current=!1,R.current=!1}}):"correctValue"===a?v.createElement(w,null):"loading"===a?v.createElement(O,null):a;var U,Y=(null==h?void 0:h.id)||g,$=function(e,t){var n=[];return Array.isArray(t)?n=t.filter((function(e){return Boolean(e)})).map((function(t,n){return{id:"".concat(e,"-error-").concat(n),content:t}})):"string"==typeof t&&Boolean(t)&&(n=[{id:"".concat(e,"-error-0"),content:t}]),n}(Y,f),H=!!s,J=!!i,K=!!G,Q=(U=$,Array.isArray(U)&&U.length>0),X=Q||!0===f,Z=Boolean((null==h?void 0:h.required)||p);return v.createElement("div",{className:h.className,style:h.style,"data-qaid":h["data-qaid"]||"input_field","data-testid":h["data-testid"]||"input_field"},H&&v.createElement("div",{className:C},v.createElement("label",{"data-qaid":"input_field_label","data-testid":"input_field_label",htmlFor:Y},s),Z&&v.createElement(v.Fragment,null," ",v.createElement("span",{className:x,"data-qaid":"input_field_label_required","data-testid":"input_field_label_required"},"*"))),v.createElement("div",{className:j},v.createElement(t.Input,b({ref:F,"input-theme":X?"red":"white","aria-invalid":X,"aria-required":Z,"aria-describedby":Q?$.map((function(e){return e.id})).join(" "):void 0},h,{id:Y,"data-qaid":"input_field_textbox","data-testid":"input_field_textbox",style:{paddingLeft:J?u:void 0,paddingRight:K?l:void 0},className:I,type:L,onFocus:function(e){!T.current&&h.onFocus&&h.onFocus(e),T.current=!1},onBlur:function(e){!R.current&&h.onBlur&&h.onBlur(e),R.current=!1},onChange:function(e){D(N(e.target.value)),k(e.currentTarget,e,h.onChange)}})),J&&v.createElement("div",{className:B,style:{width:u}},i),K&&v.createElement("div",{className:S,style:{width:l}},G)),Q&&$.map((function(e){var t=e.id,n=e.content;return v.createElement(A,{key:t,id:t},n)})))}));R.displayName="InputField",exports.InputField=R,require("./style.production.v2.css");
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import type { CreateBlock } from '@prom-ui/core/base/types';
3
- import type { InputProps } from '@prom-ui/core/Input';
4
- export type InputFieldProps = {
5
- /** Заголовок */
6
- label?: string;
7
- /** Ошибка */
8
- error?: boolean | string | string[];
9
- /** Дополнение слева */
10
- addonBefore?: React.ReactNode;
11
- /** Дополнение справа */
12
- addonAfter?: ('togglePassword' | 'clearValue' | 'correctValue' | 'loading') & React.ReactNode;
13
- addonBeforeWidth?: string | number;
14
- addonAfterWidth?: string | number;
15
- /** Добавляет красную звездочку заголовку */
16
- isLabelRequired?: boolean;
17
- };
18
- export declare const InputField: CreateBlock<'input', 'input', InputProps & InputFieldProps>;
1
+ import * as React from 'react';
2
+ import type { CreateBlock } from '@prom-ui/core/base/types';
3
+ import type { InputProps } from '@prom-ui/core/Input';
4
+ export type InputFieldProps = {
5
+ /** Заголовок */
6
+ label?: string;
7
+ /** Ошибка */
8
+ error?: boolean | string | string[];
9
+ /** Дополнение слева */
10
+ addonBefore?: React.ReactNode;
11
+ /** Дополнение справа */
12
+ addonAfter?: ('togglePassword' | 'clearValue' | 'correctValue' | 'loading') & React.ReactNode;
13
+ addonBeforeWidth?: string | number;
14
+ addonAfterWidth?: string | number;
15
+ /** Добавляет красную звездочку заголовку */
16
+ isLabelRequired?: boolean;
17
+ };
18
+ export declare const InputField: CreateBlock<'input', 'input', InputProps & InputFieldProps>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/InputField",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- export declare function resolveOnChange<E extends HTMLInputElement | HTMLTextAreaElement>(target: E, e: React.ChangeEvent<E> | React.MouseEvent<HTMLElement, MouseEvent> | React.CompositionEvent<HTMLElement>, onChange?: (event: React.ChangeEvent<E>) => void, targetValue?: string): void;
3
- export declare function valueToString<T>(value?: T): string;
4
- export declare function isNotEmptyArray<T>(arr?: T | T[]): boolean;
5
- export declare function getIsValueEmpty<T>(value: T): boolean;
6
- export declare const useForwardRef: <T>(ref: React.ForwardedRef<T>, initialValue?: any) => React.MutableRefObject<T>;
7
- export declare const prepareErrorList: (prefix: string, error: boolean | string | string[]) => {
8
- id: string;
9
- content: string;
10
- }[];
1
+ import * as React from 'react';
2
+ export declare function resolveOnChange<E extends HTMLInputElement | HTMLTextAreaElement>(target: E, e: React.ChangeEvent<E> | React.MouseEvent<HTMLElement, MouseEvent> | React.CompositionEvent<HTMLElement>, onChange?: (event: React.ChangeEvent<E>) => void, targetValue?: string): void;
3
+ export declare function valueToString<T>(value?: T): string;
4
+ export declare function isNotEmptyArray<T>(arr?: T | T[]): boolean;
5
+ export declare function getIsValueEmpty<T>(value: T): boolean;
6
+ export declare const useForwardRef: <T>(ref: React.ForwardedRef<T>, initialValue?: any) => React.MutableRefObject<T>;
7
+ export declare const prepareErrorList: (prefix: string, error: boolean | string | string[]) => {
8
+ id: string;
9
+ content: string;
10
+ }[];
@@ -25,23 +25,23 @@ function _interopNamespaceCompat(e) {
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
27
27
 
28
- var KeyPressApp = function (_a) {
29
- var code = _a.code,
30
- onKeyDown = _a.onKeyDown,
31
- onKeyUp = _a.onKeyUp;
28
+ var KeyPressApp = function KeyPressApp(_ref) {
29
+ var code = _ref.code,
30
+ onKeyDown = _ref.onKeyDown,
31
+ onKeyUp = _ref.onKeyUp;
32
32
  useKeyPress.useKeyPress(code, onKeyDown, onKeyUp);
33
33
  return null;
34
34
  };
35
- var KeyPress = function (_a) {
36
- var _b = _a.isActive,
37
- isActive = _b === void 0 ? true : _b,
38
- code = _a.code,
39
- _c = _a.onKeyDown,
40
- onKeyDown = _c === void 0 ? function () {} : _c,
41
- _d = _a.onKeyUp,
42
- onKeyUp = _d === void 0 ? function () {} : _d;
35
+ var KeyPress = function KeyPress(_ref2) {
36
+ var _ref2$isActive = _ref2.isActive,
37
+ isActive = _ref2$isActive === void 0 ? true : _ref2$isActive,
38
+ code = _ref2.code,
39
+ _ref2$onKeyDown = _ref2.onKeyDown,
40
+ onKeyDown = _ref2$onKeyDown === void 0 ? function () {} : _ref2$onKeyDown,
41
+ _ref2$onKeyUp = _ref2.onKeyUp,
42
+ onKeyUp = _ref2$onKeyUp === void 0 ? function () {} : _ref2$onKeyUp;
43
43
  if (isActive) {
44
- return React__namespace.createElement(KeyPressApp, {
44
+ return /*#__PURE__*/React__namespace.createElement(KeyPressApp, {
45
45
  code: code,
46
46
  onKeyDown: onKeyDown,
47
47
  onKeyUp: onKeyUp
@@ -25,23 +25,23 @@ function _interopNamespaceCompat(e) {
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
27
27
 
28
- var KeyPressApp = function (_a) {
29
- var code = _a.code,
30
- onKeyDown = _a.onKeyDown,
31
- onKeyUp = _a.onKeyUp;
28
+ var KeyPressApp = function KeyPressApp(_ref) {
29
+ var code = _ref.code,
30
+ onKeyDown = _ref.onKeyDown,
31
+ onKeyUp = _ref.onKeyUp;
32
32
  useKeyPress.useKeyPress(code, onKeyDown, onKeyUp);
33
33
  return null;
34
34
  };
35
- var KeyPress = function (_a) {
36
- var _b = _a.isActive,
37
- isActive = _b === void 0 ? true : _b,
38
- code = _a.code,
39
- _c = _a.onKeyDown,
40
- onKeyDown = _c === void 0 ? function () {} : _c,
41
- _d = _a.onKeyUp,
42
- onKeyUp = _d === void 0 ? function () {} : _d;
35
+ var KeyPress = function KeyPress(_ref2) {
36
+ var _ref2$isActive = _ref2.isActive,
37
+ isActive = _ref2$isActive === void 0 ? true : _ref2$isActive,
38
+ code = _ref2.code,
39
+ _ref2$onKeyDown = _ref2.onKeyDown,
40
+ onKeyDown = _ref2$onKeyDown === void 0 ? function () {} : _ref2$onKeyDown,
41
+ _ref2$onKeyUp = _ref2.onKeyUp,
42
+ onKeyUp = _ref2$onKeyUp === void 0 ? function () {} : _ref2$onKeyUp;
43
43
  if (isActive) {
44
- return React__namespace.createElement(KeyPressApp, {
44
+ return /*#__PURE__*/React__namespace.createElement(KeyPressApp, {
45
45
  code: code,
46
46
  onKeyDown: onKeyDown,
47
47
  onKeyUp: onKeyUp
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { useKeyPress } from '@prom-ui/core/useKeyPress';
3
- export type KeyPressProps = {
4
- /** Если передать `false` компонент перестанет работать */
5
- isActive?: boolean;
6
- /** Принимает значение `event.key` клавишы, можно посмотреть здесь https://keycode.info/ */
7
- code: string;
8
- /** Срабатывает при нажатии клавиши */
9
- onKeyDown?: (e: KeyboardEvent) => void;
10
- /** Срабатывает при отпускании клавиши */
11
- onKeyUp?: (e: KeyboardEvent) => void;
12
- };
13
- export declare const KeyPress: React.FC<KeyPressProps>;
14
- export { useKeyPress };
1
+ import * as React from 'react';
2
+ import { useKeyPress } from '@prom-ui/core/useKeyPress';
3
+ export type KeyPressProps = {
4
+ /** Если передать `false` компонент перестанет работать */
5
+ isActive?: boolean;
6
+ /** Принимает значение `event.key` клавишы, можно посмотреть здесь https://keycode.info/ */
7
+ code: string;
8
+ /** Срабатывает при нажатии клавиши */
9
+ onKeyDown?: (e: KeyboardEvent) => void;
10
+ /** Срабатывает при отпускании клавиши */
11
+ onKeyUp?: (e: KeyboardEvent) => void;
12
+ };
13
+ export declare const KeyPress: React.FC<KeyPressProps>;
14
+ export { useKeyPress };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/KeyPress",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Line/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
- type LineDisplay = EvokitMediaSufix<'block' | 'none'>;
3
- type LineIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
4
- type LineStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed'>;
5
- type LineColor = EvokitMediaSufix<'black-200' | 'black-400' | 'black-700'>;
6
- export type LineProps = {
7
- 'line-color'?: EvokitProp<LineColor>;
8
- 'line-display'?: EvokitProp<LineDisplay>;
9
- 'line-indent'?: EvokitProp<LineIndent>;
10
- 'line-style'?: EvokitProp<LineStyle>;
11
- };
12
- export declare const Line: CreateBlock<'hr', 'line', LineProps>;
13
- export {};
1
+ import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
+ type LineDisplay = EvokitMediaSufix<'block' | 'none'>;
3
+ type LineIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
4
+ type LineStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed'>;
5
+ type LineColor = EvokitMediaSufix<'black-200' | 'black-400' | 'black-700'>;
6
+ export type LineProps = {
7
+ 'line-color'?: EvokitProp<LineColor>;
8
+ 'line-display'?: EvokitProp<LineDisplay>;
9
+ 'line-indent'?: EvokitProp<LineIndent>;
10
+ 'line-style'?: EvokitProp<LineStyle>;
11
+ };
12
+ export declare const Line: CreateBlock<'hr', 'line', LineProps>;
13
+ export {};
package/Line/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Line",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -6,17 +6,17 @@ var evokitLink = require('evokit-link');
6
6
 
7
7
  var css = {"ek-link":"Link__ek-link___0cNvO","ek-link_display_inline":"Link__ek-link_display_inline___Yv9uA","ek-link_display_none":"Link__ek-link_display_none___lbhy1","ek-link_size_none":"Link__ek-link_size_none___fFXpr","ek-link_size_inherit":"Link__ek-link_size_inherit___rxZH6","ek-link_size_small":"Link__ek-link_size_small___H-veo","ek-link_size_default":"Link__ek-link_size_default___bD4lv","ek-link_size_big":"Link__ek-link_size_big___pIvBN","ek-link_size_h1":"Link__ek-link_size_h1___s-Uyh","ek-link_size_h2":"Link__ek-link_size_h2___RBf75","ek-link_size_h3":"Link__ek-link_size_h3___i0xgJ","ek-link_size_h4":"Link__ek-link_size_h4___QxZ58","ek-link_size_h5":"Link__ek-link_size_h5___iBrkm","ek-link_size_h6":"Link__ek-link_size_h6___3qitx","ek-link_weight_default":"Link__ek-link_weight_default___0TxxC","ek-link_weight_thin":"Link__ek-link_weight_thin___KnfOB","ek-link_weight_light":"Link__ek-link_weight_light___RHUWR","ek-link_weight_medium":"Link__ek-link_weight_medium___AcTzg","ek-link_weight_bold":"Link__ek-link_weight_bold___jTHPH","ek-link_weight_black":"Link__ek-link_weight_black___Dq6AB","ek-link_valign_baseline":"Link__ek-link_valign_baseline___UtqVX","ek-link_valign_bottom":"Link__ek-link_valign_bottom___-umHz","ek-link_valign_middle":"Link__ek-link_valign_middle___6c-lC","ek-link_valign_sub":"Link__ek-link_valign_sub___0rOow","ek-link_valign_super":"Link__ek-link_valign_super___KzR4d","ek-link_valign_text-bottom":"Link__ek-link_valign_text-bottom___-WzxY","ek-link_valign_text-top":"Link__ek-link_valign_text-top___9YGJk","ek-link_valign_top":"Link__ek-link_valign_top___XCtBJ","ek-link_lheight_default":"Link__ek-link_lheight_default___oF4Zy","ek-link_lheight_medium":"Link__ek-link_lheight_medium___5msGM","ek-link_lheight_large":"Link__ek-link_lheight_large___4c7g8","ek-link_style_solid":"Link__ek-link_style_solid___jmosF","ek-link_style_dotted":"Link__ek-link_style_dotted___WYdiX","ek-link_style_dashed":"Link__ek-link_style_dashed___dCGsx","ek-link_style_multi-line":"Link__ek-link_style_multi-line___mxBXr","ek-link_wrap_normal":"Link__ek-link_wrap_normal___8go-z","ek-link_wrap_nowrap":"Link__ek-link_wrap_nowrap___0YfIB","ek-link_wrap_pre":"Link__ek-link_wrap_pre___KpZte","ek-link_wrap_pre-wrap":"Link__ek-link_wrap_pre-wrap___-jO9e","ek-link_wrap_pre-line":"Link__ek-link_wrap_pre-line___jvKTN","ek-link_wrap_break":"Link__ek-link_wrap_break___CLW3n","ek-link_wrap_ellipsis":"Link__ek-link_wrap_ellipsis___OX5sJ","ek-link_color_black-300":"Link__ek-link_color_black-300___E7zkh","ek-link_color_black-300@small":"Link__ek-link_color_black-300--small___XKfuv","ek-link_color_black-300@medium":"Link__ek-link_color_black-300--medium___0YfmE","ek-link_color_black-300@large":"Link__ek-link_color_black-300--large___qLJN2","ek-link_color_black-300@wide":"Link__ek-link_color_black-300--wide___Ig9Us","ek-link_color_black-300@huge":"Link__ek-link_color_black-300--huge___1u7Mh","ek-link_color_black-400":"Link__ek-link_color_black-400___W4CV3","ek-link_color_black-400@small":"Link__ek-link_color_black-400--small___mnBXF","ek-link_color_black-400@medium":"Link__ek-link_color_black-400--medium___TAeDN","ek-link_color_black-400@large":"Link__ek-link_color_black-400--large___t7R3u","ek-link_color_black-400@wide":"Link__ek-link_color_black-400--wide___EFYsD","ek-link_color_black-400@huge":"Link__ek-link_color_black-400--huge___bfEOv","ek-link_color_black-600":"Link__ek-link_color_black-600___0UUDy","ek-link_color_black-600@small":"Link__ek-link_color_black-600--small___C-6i1","ek-link_color_black-600@medium":"Link__ek-link_color_black-600--medium___dGP4h","ek-link_color_black-600@large":"Link__ek-link_color_black-600--large___defCC","ek-link_color_black-600@wide":"Link__ek-link_color_black-600--wide___dQvJQ","ek-link_color_black-600@huge":"Link__ek-link_color_black-600--huge___zMlmV","ek-link_color_blue-500":"Link__ek-link_color_blue-500___eBhBq","ek-link_color_blue-500@small":"Link__ek-link_color_blue-500--small___HBouq","ek-link_color_blue-500@medium":"Link__ek-link_color_blue-500--medium___xXlKg","ek-link_color_blue-500@large":"Link__ek-link_color_blue-500--large___LmnuG","ek-link_color_blue-500@wide":"Link__ek-link_color_blue-500--wide___cQmJu","ek-link_color_blue-500@huge":"Link__ek-link_color_blue-500--huge___4FaWA","ek-link_color_red-500":"Link__ek-link_color_red-500___Ciq7I","ek-link_color_red-500@small":"Link__ek-link_color_red-500--small___DqlUK","ek-link_color_red-500@medium":"Link__ek-link_color_red-500--medium___ul79J","ek-link_color_red-500@large":"Link__ek-link_color_red-500--large___a1rBa","ek-link_color_red-500@wide":"Link__ek-link_color_red-500--wide___vqJ63","ek-link_color_red-500@huge":"Link__ek-link_color_red-500--huge___R6kUB","ek-link_color_white":"Link__ek-link_color_white___6ITBO","ek-link_color_white@small":"Link__ek-link_color_white--small___Qeh3A","ek-link_color_white@medium":"Link__ek-link_color_white--medium___xHzYO","ek-link_color_white@large":"Link__ek-link_color_white--large___lseSb","ek-link_color_white@wide":"Link__ek-link_color_white--wide___-R2Ym","ek-link_color_white@huge":"Link__ek-link_color_white--huge___IGdeW","ek-link_color_violet-500":"Link__ek-link_color_violet-500___YEovm","ek-link_color_violet-500@small":"Link__ek-link_color_violet-500--small___QbxKL","ek-link_color_violet-500@medium":"Link__ek-link_color_violet-500--medium___-wqMf","ek-link_color_violet-500@large":"Link__ek-link_color_violet-500--large___0WPEv","ek-link_color_violet-500@wide":"Link__ek-link_color_violet-500--wide___00TIl","ek-link_color_violet-500@huge":"Link__ek-link_color_violet-500--huge___m97LC","ek-text_blackhole_ellipsis-inline-block":"Link__ek-text_blackhole_ellipsis-inline-block___Q-NjC","ek-link_blackhole_full-hover":"Link__ek-link_blackhole_full-hover___jwtUM"};
8
8
 
9
- /**
10
- * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
11
- * Он используется для создания ссылок, которые могут быть оформлены с помощью
12
- * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
9
+ /**
10
+ * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
11
+ * Он используется для создания ссылок, которые могут быть оформлены с помощью
12
+ * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
13
13
  */
14
14
  var Link = evokitLink.Link;
15
15
  Link.defaultProps = {
16
16
  'link-preset': {
17
17
  css: css
18
18
  },
19
- onTouchStart: function () {} // force css :active for ios
19
+ onTouchStart: function onTouchStart() {} // force css :active for ios
20
20
  };
21
21
 
22
22
  exports.Link = Link;
@@ -6,17 +6,17 @@ var evokitLink = require('evokit-link');
6
6
 
7
7
  var css = {"ek-link":"Link__ek-link___LfJ2R","ek-link_display_inline":"Link__ek-link_display_inline___Wtjmd","ek-link_display_none":"Link__ek-link_display_none___vXy0v","ek-link_size_none":"Link__ek-link_size_none___rYAdG","ek-link_size_inherit":"Link__ek-link_size_inherit___woRnQ","ek-link_size_small":"Link__ek-link_size_small___ahjfT","ek-link_size_default":"Link__ek-link_size_default___SANAN","ek-link_size_big":"Link__ek-link_size_big___nCJUh","ek-link_size_h1":"Link__ek-link_size_h1___PfLj0","ek-link_size_h2":"Link__ek-link_size_h2___ZwbBR","ek-link_size_h3":"Link__ek-link_size_h3___VQDbV","ek-link_size_h4":"Link__ek-link_size_h4___TKy-Y","ek-link_size_h5":"Link__ek-link_size_h5___5PX1i","ek-link_size_h6":"Link__ek-link_size_h6___w-VX2","ek-link_weight_default":"Link__ek-link_weight_default___RQr-N","ek-link_weight_thin":"Link__ek-link_weight_thin___Ao2BL","ek-link_weight_light":"Link__ek-link_weight_light___aJ5nN","ek-link_weight_medium":"Link__ek-link_weight_medium___guEsa","ek-link_weight_bold":"Link__ek-link_weight_bold___Nbg7W","ek-link_weight_black":"Link__ek-link_weight_black___FHVeZ","ek-link_valign_baseline":"Link__ek-link_valign_baseline___NxwNL","ek-link_valign_bottom":"Link__ek-link_valign_bottom___-E6aR","ek-link_valign_middle":"Link__ek-link_valign_middle___vhHEl","ek-link_valign_sub":"Link__ek-link_valign_sub___pfbyc","ek-link_valign_super":"Link__ek-link_valign_super___B-mQ3","ek-link_valign_text-bottom":"Link__ek-link_valign_text-bottom___xhZeI","ek-link_valign_text-top":"Link__ek-link_valign_text-top___LsiM-","ek-link_valign_top":"Link__ek-link_valign_top___22--V","ek-link_lheight_default":"Link__ek-link_lheight_default___nhcpL","ek-link_lheight_medium":"Link__ek-link_lheight_medium___hJW8j","ek-link_lheight_large":"Link__ek-link_lheight_large___c-qwF","ek-link_style_solid":"Link__ek-link_style_solid___txBlV","ek-link_style_dotted":"Link__ek-link_style_dotted___UHLOg","ek-link_style_dashed":"Link__ek-link_style_dashed___uCFHW","ek-link_style_multi-line":"Link__ek-link_style_multi-line___19Gzs","ek-link_wrap_normal":"Link__ek-link_wrap_normal___Zsqh5","ek-link_wrap_nowrap":"Link__ek-link_wrap_nowrap___PKkgr","ek-link_wrap_pre":"Link__ek-link_wrap_pre___v4TTo","ek-link_wrap_pre-wrap":"Link__ek-link_wrap_pre-wrap___hRnKG","ek-link_wrap_pre-line":"Link__ek-link_wrap_pre-line___kXz8h","ek-link_wrap_break":"Link__ek-link_wrap_break___uBCDy","ek-link_wrap_ellipsis":"Link__ek-link_wrap_ellipsis___SR3tB","ek-link_color_black-300":"Link__ek-link_color_black-300___Z5u8C","ek-link_color_black-300@small":"Link__ek-link_color_black-300--small___pJh2g","ek-link_color_black-300@medium":"Link__ek-link_color_black-300--medium___-wlee","ek-link_color_black-300@large":"Link__ek-link_color_black-300--large___WQFFC","ek-link_color_black-300@wide":"Link__ek-link_color_black-300--wide___d0nWq","ek-link_color_black-300@huge":"Link__ek-link_color_black-300--huge___fGWYX","ek-link_color_black-400":"Link__ek-link_color_black-400___tREmk","ek-link_color_black-400@small":"Link__ek-link_color_black-400--small___SvAAn","ek-link_color_black-400@medium":"Link__ek-link_color_black-400--medium___OhA-J","ek-link_color_black-400@large":"Link__ek-link_color_black-400--large___cUGn3","ek-link_color_black-400@wide":"Link__ek-link_color_black-400--wide___m-bPq","ek-link_color_black-400@huge":"Link__ek-link_color_black-400--huge___lkrkm","ek-link_color_black-600":"Link__ek-link_color_black-600___ICqNy","ek-link_color_black-600@small":"Link__ek-link_color_black-600--small___Z8pdV","ek-link_color_black-600@medium":"Link__ek-link_color_black-600--medium___AiBqs","ek-link_color_black-600@large":"Link__ek-link_color_black-600--large___TcP0c","ek-link_color_black-600@wide":"Link__ek-link_color_black-600--wide___hInmV","ek-link_color_black-600@huge":"Link__ek-link_color_black-600--huge___QouTC","ek-link_color_blue-500":"Link__ek-link_color_blue-500___-Xr4G","ek-link_color_blue-500@small":"Link__ek-link_color_blue-500--small___A-wBW","ek-link_color_blue-500@medium":"Link__ek-link_color_blue-500--medium___HdWUk","ek-link_color_blue-500@large":"Link__ek-link_color_blue-500--large___qFLjW","ek-link_color_blue-500@wide":"Link__ek-link_color_blue-500--wide___ry5GX","ek-link_color_blue-500@huge":"Link__ek-link_color_blue-500--huge___IFxBM","ek-link_color_red-500":"Link__ek-link_color_red-500___VTkFT","ek-link_color_red-500@small":"Link__ek-link_color_red-500--small___-m3M8","ek-link_color_red-500@medium":"Link__ek-link_color_red-500--medium___XCcIp","ek-link_color_red-500@large":"Link__ek-link_color_red-500--large___HtIul","ek-link_color_red-500@wide":"Link__ek-link_color_red-500--wide___Tuzee","ek-link_color_red-500@huge":"Link__ek-link_color_red-500--huge___Ri29j","ek-link_color_white":"Link__ek-link_color_white___8ZIwn","ek-link_color_white@small":"Link__ek-link_color_white--small___V2Llj","ek-link_color_white@medium":"Link__ek-link_color_white--medium___0qv1y","ek-link_color_white@large":"Link__ek-link_color_white--large___EpER-","ek-link_color_white@wide":"Link__ek-link_color_white--wide___w67OK","ek-link_color_white@huge":"Link__ek-link_color_white--huge___k0t4R","ek-link_color_violet-500":"Link__ek-link_color_violet-500___-8UhQ","ek-link_color_violet-500@small":"Link__ek-link_color_violet-500--small___j7sSw","ek-link_color_violet-500@medium":"Link__ek-link_color_violet-500--medium___-Ndz3","ek-link_color_violet-500@large":"Link__ek-link_color_violet-500--large___n2kgC","ek-link_color_violet-500@wide":"Link__ek-link_color_violet-500--wide___7F8-r","ek-link_color_violet-500@huge":"Link__ek-link_color_violet-500--huge___mpedK","ek-text_blackhole_ellipsis-inline-block":"Link__ek-text_blackhole_ellipsis-inline-block___ldQ2D","ek-link_blackhole_full-hover":"Link__ek-link_blackhole_full-hover___FB70C"};
8
8
 
9
- /**
10
- * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
11
- * Он используется для создания ссылок, которые могут быть оформлены с помощью
12
- * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
9
+ /**
10
+ * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
11
+ * Он используется для создания ссылок, которые могут быть оформлены с помощью
12
+ * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
13
13
  */
14
14
  var Link = evokitLink.Link;
15
15
  Link.defaultProps = {
16
16
  'link-preset': {
17
17
  css: css
18
18
  },
19
- onTouchStart: function () {} // force css :active for ios
19
+ onTouchStart: function onTouchStart() {} // force css :active for ios
20
20
  };
21
21
 
22
22
  exports.Link = Link;
package/Link/index.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
- type LinkThemes = EvokitMediaSufix<'black-300' | 'black-400' | 'black-600' | 'blue-500' | 'red-500' | 'white' | 'violet-500'>;
3
- type LinkDisplay = EvokitMediaSufix<'inline' | 'none'>;
4
- type LinkLheight = EvokitMediaSufix<'default' | 'medium' | 'large'>;
5
- type LinkSize = EvokitMediaSufix<'none' | 'inherit' | 'default' | 'small' | 'big' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
6
- type LinkStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed' | 'multi-line'>;
7
- type LinkValign = EvokitMediaSufix<'baseline' | 'bottom' | 'middle' | 'sub' | 'super' | 'text-bottom' | 'text-top' | 'top'>;
8
- type LinkWeight = EvokitMediaSufix<'default' | 'thin' | 'light' | 'medium' | 'bold' | 'black'>;
9
- type LinkWrap = EvokitMediaSufix<'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'break' | 'ellipsis'>;
10
- type LinkBlackhole = 'ellipsis-inline-block' | 'full-hover';
11
- export type LinkProps = {
12
- 'link-color'?: EvokitProp<LinkThemes>;
13
- 'link-display'?: EvokitProp<LinkDisplay>;
14
- 'link-lheight'?: EvokitProp<LinkLheight>;
15
- 'link-size'?: EvokitProp<LinkSize>;
16
- 'link-style'?: EvokitProp<LinkStyle>;
17
- 'link-valign'?: EvokitProp<LinkValign>;
18
- 'link-weight'?: EvokitProp<LinkWeight>;
19
- 'link-wrap'?: EvokitProp<LinkWrap>;
20
- 'link-blackhole'?: EvokitProp<LinkBlackhole>;
21
- };
22
- /**
23
- * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
24
- * Он используется для создания ссылок, которые могут быть оформлены с помощью
25
- * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
26
- */
27
- export declare const Link: CreateBlock<'a', 'link', LinkProps>;
28
- export {};
1
+ import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
+ type LinkThemes = EvokitMediaSufix<'black-300' | 'black-400' | 'black-600' | 'blue-500' | 'red-500' | 'white' | 'violet-500'>;
3
+ type LinkDisplay = EvokitMediaSufix<'inline' | 'none'>;
4
+ type LinkLheight = EvokitMediaSufix<'default' | 'medium' | 'large'>;
5
+ type LinkSize = EvokitMediaSufix<'none' | 'inherit' | 'default' | 'small' | 'big' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
6
+ type LinkStyle = EvokitMediaSufix<'solid' | 'dotted' | 'dashed' | 'multi-line'>;
7
+ type LinkValign = EvokitMediaSufix<'baseline' | 'bottom' | 'middle' | 'sub' | 'super' | 'text-bottom' | 'text-top' | 'top'>;
8
+ type LinkWeight = EvokitMediaSufix<'default' | 'thin' | 'light' | 'medium' | 'bold' | 'black'>;
9
+ type LinkWrap = EvokitMediaSufix<'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'break' | 'ellipsis'>;
10
+ type LinkBlackhole = 'ellipsis-inline-block' | 'full-hover';
11
+ export type LinkProps = {
12
+ 'link-color'?: EvokitProp<LinkThemes>;
13
+ 'link-display'?: EvokitProp<LinkDisplay>;
14
+ 'link-lheight'?: EvokitProp<LinkLheight>;
15
+ 'link-size'?: EvokitProp<LinkSize>;
16
+ 'link-style'?: EvokitProp<LinkStyle>;
17
+ 'link-valign'?: EvokitProp<LinkValign>;
18
+ 'link-weight'?: EvokitProp<LinkWeight>;
19
+ 'link-wrap'?: EvokitProp<LinkWrap>;
20
+ 'link-blackhole'?: EvokitProp<LinkBlackhole>;
21
+ };
22
+ /**
23
+ * Компонент `Link` представляет собой обертку над стандартным HTML-элементом `<a>`.
24
+ * Он используется для создания ссылок, которые могут быть оформлены с помощью
25
+ * стилей и настроек из [evokit-link](https://evokit.net/#/packages/evokit-link/).
26
+ */
27
+ export declare const Link: CreateBlock<'a', 'link', LinkProps>;
28
+ export {};
package/Link/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Link",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/List/index.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
- type ListItemDisplay = EvokitMediaSufix<'block' | 'none'>;
3
- type ListThemes = EvokitMediaSufix<'black-200' | 'black-400' | 'black-700' | 'violet-500'>;
4
- type ListDisplay = EvokitMediaSufix<'block' | 'none'>;
5
- type ListIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
6
- type ListStyle = EvokitMediaSufix<'dash' | 'decimal' | 'disc'>;
7
- export type ListItemProps = {
8
- 'list-item-display'?: EvokitProp<ListItemDisplay>;
9
- };
10
- export type ListProps = {
11
- 'list-color'?: EvokitProp<ListThemes>;
12
- 'list-display'?: EvokitProp<ListDisplay>;
13
- 'list-divider'?: EvokitProp<ListThemes>;
14
- 'list-divider-indent'?: EvokitProp<ListIndent>;
15
- 'list-indent'?: EvokitProp<ListIndent>;
16
- 'list-style'?: EvokitProp<ListStyle>;
17
- 'list-blackhole'?: EvokitProp<'circle'>;
18
- };
19
- declare const ListItem: CreateBlock<'li', 'list-item', ListItemProps>;
20
- export declare const List: CreateBlock<'ul', 'list', ListProps> & {
21
- Item: typeof ListItem;
22
- };
23
- export {};
1
+ import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
+ type ListItemDisplay = EvokitMediaSufix<'block' | 'none'>;
3
+ type ListThemes = EvokitMediaSufix<'black-200' | 'black-400' | 'black-700' | 'violet-500'>;
4
+ type ListDisplay = EvokitMediaSufix<'block' | 'none'>;
5
+ type ListIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
6
+ type ListStyle = EvokitMediaSufix<'dash' | 'decimal' | 'disc'>;
7
+ export type ListItemProps = {
8
+ 'list-item-display'?: EvokitProp<ListItemDisplay>;
9
+ };
10
+ export type ListProps = {
11
+ 'list-color'?: EvokitProp<ListThemes>;
12
+ 'list-display'?: EvokitProp<ListDisplay>;
13
+ 'list-divider'?: EvokitProp<ListThemes>;
14
+ 'list-divider-indent'?: EvokitProp<ListIndent>;
15
+ 'list-indent'?: EvokitProp<ListIndent>;
16
+ 'list-style'?: EvokitProp<ListStyle>;
17
+ 'list-blackhole'?: EvokitProp<'circle'>;
18
+ };
19
+ declare const ListItem: CreateBlock<'li', 'list-item', ListItemProps>;
20
+ export declare const List: CreateBlock<'ul', 'list', ListProps> & {
21
+ Item: typeof ListItem;
22
+ };
23
+ export {};
package/List/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/List",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { SCREEN_BREAKPOINTS } from '@prom-ui/core/useMedia';
3
- export type MediaProviderProps = {
4
- children?: React.ReactNode;
5
- resetOnMount?: boolean;
6
- width?: keyof typeof SCREEN_BREAKPOINTS;
7
- };
8
- export declare const MediaProvider: React.FC<MediaProviderProps>;
1
+ import React from 'react';
2
+ import { SCREEN_BREAKPOINTS } from '@prom-ui/core/useMedia';
3
+ export type MediaProviderProps = {
4
+ children?: React.ReactNode;
5
+ resetOnMount?: boolean;
6
+ width?: keyof typeof SCREEN_BREAKPOINTS;
7
+ };
8
+ export declare const MediaProvider: React.FC<MediaProviderProps>;