@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
package/Body/index.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
- import './style.css';
3
- type BodySectionDisplay = EvokitMediaSufix<'block' | 'none'>;
4
- type BodySectionHeight = EvokitMediaSufix<'auto' | 'inherit' | '1-1'>;
5
- export type BodySectionProps = {
6
- 'body-section-display'?: EvokitProp<BodySectionDisplay>;
7
- 'body-section-height'?: EvokitProp<BodySectionHeight>;
8
- };
9
- type BodyThemes = EvokitMediaSufix<'black-100' | 'black-900' | 'white'>;
10
- type BodyDisplay = EvokitMediaSufix<'block' | 'none'>;
11
- type BodyIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
12
- type BodyOverflowAnchor = EvokitMediaSufix<'auto' | 'none'>;
13
- type BodyOverflow = EvokitMediaSufix<'auto' | 'hidden' | 'scroll' | 'visible'>;
14
- type BodyWidth = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
15
- export type BodyProps = {
16
- 'body-background'?: EvokitProp<BodyThemes>;
17
- 'body-color'?: EvokitProp<BodyThemes>;
18
- 'body-display'?: EvokitProp<BodyDisplay>;
19
- 'body-indent'?: EvokitProp<BodyIndent>;
20
- 'body-overflow-anchor'?: EvokitProp<BodyOverflowAnchor>;
21
- 'body-overflow'?: EvokitProp<BodyOverflow | `${BodyOverflow} ${string}`>;
22
- /** @ignore */
23
- 'body-overflow-x'?: EvokitProp<BodyOverflow>;
24
- /** @ignore */
25
- 'body-overflow-y'?: EvokitProp<BodyOverflow>;
26
- 'body-width'?: EvokitProp<BodyWidth | `${BodyWidth} ${string}`>;
27
- /** @ignore */
28
- 'body-width-min'?: EvokitProp<BodyWidth>;
29
- /** @ignore */
30
- 'body-width-max'?: EvokitProp<BodyWidth>;
31
- };
32
- declare const BodySection: CreateBlock<'div', 'body-section', BodySectionProps>;
33
- export declare const Body: CreateBlock<'body', 'body', BodyProps> & {
34
- Section: typeof BodySection;
35
- };
36
- export {};
1
+ import type { CreateBlock, EvokitProp, EvokitMediaSufix } from '@prom-ui/core/base/types';
2
+ import './style.css';
3
+ type BodySectionDisplay = EvokitMediaSufix<'block' | 'none'>;
4
+ type BodySectionHeight = EvokitMediaSufix<'auto' | 'inherit' | '1-1'>;
5
+ export type BodySectionProps = {
6
+ 'body-section-display'?: EvokitProp<BodySectionDisplay>;
7
+ 'body-section-height'?: EvokitProp<BodySectionHeight>;
8
+ };
9
+ type BodyThemes = EvokitMediaSufix<'black-100' | 'black-900' | 'white'>;
10
+ type BodyDisplay = EvokitMediaSufix<'block' | 'none'>;
11
+ type BodyIndent = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
12
+ type BodyOverflowAnchor = EvokitMediaSufix<'auto' | 'none'>;
13
+ type BodyOverflow = EvokitMediaSufix<'auto' | 'hidden' | 'scroll' | 'visible'>;
14
+ type BodyWidth = EvokitMediaSufix<'none' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl'>;
15
+ export type BodyProps = {
16
+ 'body-background'?: EvokitProp<BodyThemes>;
17
+ 'body-color'?: EvokitProp<BodyThemes>;
18
+ 'body-display'?: EvokitProp<BodyDisplay>;
19
+ 'body-indent'?: EvokitProp<BodyIndent>;
20
+ 'body-overflow-anchor'?: EvokitProp<BodyOverflowAnchor>;
21
+ 'body-overflow'?: EvokitProp<BodyOverflow | `${BodyOverflow} ${string}`>;
22
+ /** @ignore */
23
+ 'body-overflow-x'?: EvokitProp<BodyOverflow>;
24
+ /** @ignore */
25
+ 'body-overflow-y'?: EvokitProp<BodyOverflow>;
26
+ 'body-width'?: EvokitProp<BodyWidth | `${BodyWidth} ${string}`>;
27
+ /** @ignore */
28
+ 'body-width-min'?: EvokitProp<BodyWidth>;
29
+ /** @ignore */
30
+ 'body-width-max'?: EvokitProp<BodyWidth>;
31
+ };
32
+ declare const BodySection: CreateBlock<'div', 'body-section', BodySectionProps>;
33
+ export declare const Body: CreateBlock<'body', 'body', BodyProps> & {
34
+ Section: typeof BodySection;
35
+ };
36
+ export {};
package/Body/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Body",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -25,29 +25,28 @@ function _interopNamespaceCompat(e) {
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
27
27
 
28
- var idConstructor = function (prefix) {
29
- if (prefix === void 0) {
30
- prefix = '';
31
- }
28
+ var idConstructor = function idConstructor() {
29
+ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
32
30
  var me = {
33
31
  id: 0,
34
- get: function () {
32
+ get: function get() {
35
33
  return ":".concat(prefix, "p").concat(me.id++, ":");
36
34
  }
37
35
  };
38
36
  return me;
39
37
  };
40
- var useIdGetter = function (prefix) {
38
+ var useIdGetter = function useIdGetter(prefix) {
41
39
  var ref = React__namespace.useRef();
42
40
  if (!ref.current) {
43
41
  ref.current = idConstructor(prefix);
44
42
  }
45
43
  return ref.current.get;
46
44
  };
45
+
47
46
  // default instances of unused BodyProvider
48
47
  var globalTTag = new ttag.TTag();
49
48
  var globalGetUseId = idConstructor().get;
50
- var BodyContext = React__namespace.createContext({
49
+ var BodyContext = /*#__PURE__*/React__namespace.createContext({
51
50
  globalTTag: globalTTag,
52
51
  globalGetUseId: globalGetUseId
53
52
  });
@@ -25,29 +25,28 @@ function _interopNamespaceCompat(e) {
25
25
 
26
26
  var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
27
27
 
28
- var idConstructor = function (prefix) {
29
- if (prefix === void 0) {
30
- prefix = '';
31
- }
28
+ var idConstructor = function idConstructor() {
29
+ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
32
30
  var me = {
33
31
  id: 0,
34
- get: function () {
32
+ get: function get() {
35
33
  return ":".concat(prefix, "p").concat(me.id++, ":");
36
34
  }
37
35
  };
38
36
  return me;
39
37
  };
40
- var useIdGetter = function (prefix) {
38
+ var useIdGetter = function useIdGetter(prefix) {
41
39
  var ref = React__namespace.useRef();
42
40
  if (!ref.current) {
43
41
  ref.current = idConstructor(prefix);
44
42
  }
45
43
  return ref.current.get;
46
44
  };
45
+
47
46
  // default instances of unused BodyProvider
48
47
  var globalTTag = new ttag.TTag();
49
48
  var globalGetUseId = idConstructor().get;
50
- var BodyContext = React__namespace.createContext({
49
+ var BodyContext = /*#__PURE__*/React__namespace.createContext({
51
50
  globalTTag: globalTTag,
52
51
  globalGetUseId: globalGetUseId
53
52
  });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("ttag");function r(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e),o=function(e){void 0===e&&(e="");var t={id:0,get:function(){return":".concat(e,"p").concat(t.id++,":")}};return t},u=new t.TTag,c=o().get,a=n.createContext({globalTTag:u,globalGetUseId:c});a.displayName="BodyContext",exports.BodyContext=a,exports.useIdGetter=function(e){var t=n.useRef();return t.current||(t.current=o(e)),t.current.get};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("ttag");function r(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={id:0,get:function(){return":".concat(e,"p").concat(t.id++,":")}};return t},u=new t.TTag,c=o().get,a=n.createContext({globalTTag:u,globalGetUseId:c});a.displayName="BodyContext",exports.BodyContext=a,exports.useIdGetter=function(e){var t=n.useRef();return t.current||(t.current=o(e)),t.current.get};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("ttag");function r(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e),o=function(e){void 0===e&&(e="");var t={id:0,get:function(){return":".concat(e,"p").concat(t.id++,":")}};return t},u=new t.TTag,c=o().get,a=n.createContext({globalTTag:u,globalGetUseId:c});a.displayName="BodyContext",exports.BodyContext=a,exports.useIdGetter=function(e){var t=n.useRef();return t.current||(t.current=o(e)),t.current.get};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("ttag");function r(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={id:0,get:function(){return":".concat(e,"p").concat(t.id++,":")}};return t},u=new t.TTag,c=o().get,a=n.createContext({globalTTag:u,globalGetUseId:c});a.displayName="BodyContext",exports.BodyContext=a,exports.useIdGetter=function(e){var t=n.useRef();return t.current||(t.current=o(e)),t.current.get};
@@ -1,12 +1,12 @@
1
- import * as React from 'react';
2
- import { TTag } from 'ttag';
3
- declare const idConstructor: (prefix?: string) => {
4
- id: number;
5
- get: () => string;
6
- };
7
- export declare const useIdGetter: (prefix: Parameters<typeof idConstructor>[0]) => () => string;
8
- export declare const BodyContext: React.Context<{
9
- globalTTag: TTag;
10
- globalGetUseId: () => string;
11
- }>;
12
- export {};
1
+ import * as React from 'react';
2
+ import { TTag } from 'ttag';
3
+ declare const idConstructor: (prefix?: string) => {
4
+ id: number;
5
+ get: () => string;
6
+ };
7
+ export declare const useIdGetter: (prefix: Parameters<typeof idConstructor>[0]) => () => string;
8
+ export declare const BodyContext: React.Context<{
9
+ globalTTag: TTag;
10
+ globalGetUseId: () => string;
11
+ }>;
12
+ export {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/BodyContext",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -332,14 +332,15 @@ var localeKk = {
332
332
  translations: translations
333
333
  };
334
334
 
335
- var BodyProvider = function (_a) {
336
- var children = _a.children,
337
- _b = _a.locale,
338
- locale = _b === void 0 ? 'ru' : _b,
339
- identifierPrefix = _a.identifierPrefix;
335
+ var BodyProvider = function BodyProvider(_ref) {
336
+ var children = _ref.children,
337
+ _ref$locale = _ref.locale,
338
+ locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
339
+ identifierPrefix = _ref.identifierPrefix;
340
340
  var globalGetUseId = BodyContext.useIdGetter(identifierPrefix);
341
341
  var globalTTag = React__namespace.useMemo(function () {
342
342
  var newTTag = new ttag.TTag();
343
+
343
344
  // add locales from json file
344
345
  newTTag.addLocale('uk', localeUk);
345
346
  newTTag.addLocale('ro', localeRo);
@@ -347,7 +348,7 @@ var BodyProvider = function (_a) {
347
348
  return newTTag;
348
349
  }, []);
349
350
  globalTTag.useLocale(locale);
350
- return React__namespace.createElement(BodyContext.BodyContext.Provider, {
351
+ return /*#__PURE__*/React__namespace.createElement(BodyContext.BodyContext.Provider, {
351
352
  value: {
352
353
  globalTTag: globalTTag,
353
354
  globalGetUseId: globalGetUseId
@@ -332,14 +332,15 @@ var localeKk = {
332
332
  translations: translations
333
333
  };
334
334
 
335
- var BodyProvider = function (_a) {
336
- var children = _a.children,
337
- _b = _a.locale,
338
- locale = _b === void 0 ? 'ru' : _b,
339
- identifierPrefix = _a.identifierPrefix;
335
+ var BodyProvider = function BodyProvider(_ref) {
336
+ var children = _ref.children,
337
+ _ref$locale = _ref.locale,
338
+ locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
339
+ identifierPrefix = _ref.identifierPrefix;
340
340
  var globalGetUseId = BodyContext.useIdGetter(identifierPrefix);
341
341
  var globalTTag = React__namespace.useMemo(function () {
342
342
  var newTTag = new ttag.TTag();
343
+
343
344
  // add locales from json file
344
345
  newTTag.addLocale('uk', localeUk);
345
346
  newTTag.addLocale('ro', localeRo);
@@ -347,7 +348,7 @@ var BodyProvider = function (_a) {
347
348
  return newTTag;
348
349
  }, []);
349
350
  globalTTag.useLocale(locale);
350
- return React__namespace.createElement(BodyContext.BodyContext.Provider, {
351
+ return /*#__PURE__*/React__namespace.createElement(BodyContext.BodyContext.Provider, {
351
352
  value: {
352
353
  globalTTag: globalTTag,
353
354
  globalGetUseId: globalGetUseId
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- import { useIdGetter } from '@prom-ui/core/BodyContext';
3
- export type BodyProviderProps = {
4
- children?: React.ReactNode;
5
- /** Настройка текста локали */
6
- locale?: 'ru' | 'uk' | 'ro' | 'kk';
7
- /** Префикса для всех сгенерированных идентификаторов с помощю хука [useId](/#/Hooks/useId) */
8
- identifierPrefix?: Parameters<typeof useIdGetter>[0];
9
- };
10
- export declare const BodyProvider: React.FC<BodyProviderProps>;
1
+ import * as React from 'react';
2
+ import { useIdGetter } from '@prom-ui/core/BodyContext';
3
+ export type BodyProviderProps = {
4
+ children?: React.ReactNode;
5
+ /** Настройка текста локали */
6
+ locale?: 'ru' | 'uk' | 'ro' | 'kk';
7
+ /** Префикса для всех сгенерированных идентификаторов с помощю хука [useId](/#/Hooks/useId) */
8
+ identifierPrefix?: Parameters<typeof useIdGetter>[0];
9
+ };
10
+ export declare const BodyProvider: React.FC<BodyProviderProps>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/BodyProvider",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [