@sima-land/ui-nucleons 45.0.0-alpha.3 → 45.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/_internal/custom-scrollbar/index.d.ts +2 -2
  2. package/_internal/custom-scrollbar/index.js +17 -14
  3. package/_internal/dropdown-loading/index.js +2 -3
  4. package/_internal/page-scroll-lock/context.js +3 -25
  5. package/alert/index.d.ts +2 -2
  6. package/alert/index.js +4 -30
  7. package/arrow-button/arrow-button.module.scss +5 -5
  8. package/arrow-button/index.js +18 -19
  9. package/autocomplete/autocomplete.js +49 -76
  10. package/autocomplete-deprecated/index.d.ts +1 -1
  11. package/autocomplete-deprecated/index.js +43 -67
  12. package/avatar/avatar.module.scss +3 -1
  13. package/avatar/index.d.ts +1 -1
  14. package/avatar/index.js +10 -36
  15. package/avatar/user.d.ts +1 -1
  16. package/avatar/user.js +8 -29
  17. package/avatar/utils.d.ts +1 -1
  18. package/avatar/utils.js +12 -10
  19. package/base-input/base-input.js +5 -31
  20. package/base-input-deprecated/index.d.ts +2 -2
  21. package/base-input-deprecated/index.js +8 -34
  22. package/bordered-layout/index.d.ts +1 -1
  23. package/bordered-layout/index.js +2 -3
  24. package/bottom-bar/bottom-bar.js +2 -3
  25. package/box/index.d.ts +1 -1
  26. package/box/index.js +2 -2
  27. package/button/index.d.ts +2 -2
  28. package/button/index.js +6 -32
  29. package/card/index.js +2 -8
  30. package/card/slots.d.ts +1 -1
  31. package/card/slots.js +9 -31
  32. package/carousel/draggable.d.ts +1 -1
  33. package/carousel/draggable.js +5 -28
  34. package/carousel/index.d.ts +1 -1
  35. package/carousel/index.js +17 -43
  36. package/checkbox/index.d.ts +2 -2
  37. package/checkbox/index.js +3 -29
  38. package/checkbox-field/index.d.ts +2 -2
  39. package/checkbox-field/index.js +3 -31
  40. package/chips/index.d.ts +1 -1
  41. package/chips/index.js +3 -25
  42. package/chips/item.d.ts +1 -1
  43. package/chips/item.js +3 -5
  44. package/clean-buttons/index.js +6 -28
  45. package/dot-nav/index.d.ts +1 -1
  46. package/dot-nav/index.js +12 -34
  47. package/dropdown/index.d.ts +2 -2
  48. package/dropdown/index.js +3 -26
  49. package/dropdown-item/index.d.ts +1 -1
  50. package/dropdown-item/index.js +4 -9
  51. package/expandable/index.d.ts +2 -2
  52. package/expandable/index.js +8 -36
  53. package/field-block/index.js +2 -9
  54. package/field-grid/index.d.ts +1 -1
  55. package/field-grid/index.js +43 -65
  56. package/file-icon/index.d.ts +1 -1
  57. package/file-icon/index.js +5 -10
  58. package/group-overflow/index.js +7 -29
  59. package/helpers/define-slots.d.ts +1 -1
  60. package/helpers/events.d.ts +1 -1
  61. package/helpers/on.d.ts +1 -1
  62. package/hint/hint-view.js +3 -3
  63. package/hint/hint.js +3 -8
  64. package/hint/utils.d.ts +4 -1
  65. package/hint/utils.js +4 -3
  66. package/hint-deprecated/index.d.ts +2 -2
  67. package/hint-deprecated/index.js +3 -26
  68. package/hooks/breakpoint/index.js +3 -25
  69. package/info-text/index.js +15 -42
  70. package/input/index.js +8 -30
  71. package/layout/layout.js +2 -2
  72. package/layout/legacy.d.ts +5 -5
  73. package/layout/legacy.js +3 -25
  74. package/link/index.d.ts +6 -3
  75. package/link/index.js +3 -25
  76. package/loading-overlay/index.d.ts +1 -1
  77. package/loading-overlay/index.js +2 -3
  78. package/masked-field/index.d.ts +2 -2
  79. package/masked-field/index.js +3 -25
  80. package/masked-input/masked-input.js +3 -25
  81. package/modal/index.d.ts +1 -1
  82. package/modal/index.js +3 -10
  83. package/modal/slots.js +6 -29
  84. package/modal-overlay/index.js +3 -26
  85. package/no-index/index.d.ts +3 -3
  86. package/no-index/index.js +4 -8
  87. package/no-index-mark/index.d.ts +2 -2
  88. package/no-index-mark/index.js +7 -6
  89. package/package.json +6 -11
  90. package/pagination/index.d.ts +4 -20
  91. package/pagination/index.js +8 -15
  92. package/pagination/pagination-item.d.ts +8 -0
  93. package/pagination/pagination-item.js +31 -0
  94. package/pagination/pagination-item.module.scss +49 -0
  95. package/pagination/pagination.d.ts +8 -0
  96. package/pagination/pagination.js +78 -0
  97. package/pagination/pagination.module.scss +14 -70
  98. package/pagination/types.d.ts +28 -0
  99. package/pagination/types.js +2 -0
  100. package/pagination/utils.d.ts +15 -43
  101. package/pagination/utils.js +38 -87
  102. package/{pagination → pagination-deprecated}/base-pagination.d.ts +6 -1
  103. package/{pagination → pagination-deprecated}/base-pagination.js +33 -33
  104. package/pagination-deprecated/index.d.ts +22 -0
  105. package/pagination-deprecated/index.js +15 -0
  106. package/{pagination → pagination-deprecated}/page-button.d.ts +2 -1
  107. package/{pagination → pagination-deprecated}/page-button.js +3 -5
  108. package/pagination-deprecated/pagination.module.scss +76 -0
  109. package/pagination-deprecated/utils.d.ts +58 -0
  110. package/pagination-deprecated/utils.js +124 -0
  111. package/panel/index.js +3 -6
  112. package/phone-input/images/armenia.png +0 -0
  113. package/phone-input/images/azerbaijan.png +0 -0
  114. package/phone-input/images/belarus.png +0 -0
  115. package/phone-input/images/georgia.png +0 -0
  116. package/phone-input/images/kazakhstan.png +0 -0
  117. package/phone-input/images/kyrgyzstan.png +0 -0
  118. package/phone-input/images/moldova.png +0 -0
  119. package/phone-input/images/other.png +0 -0
  120. package/phone-input/images/russia.png +0 -0
  121. package/phone-input/images/tajikistan.png +0 -0
  122. package/phone-input/images/turkmenistan.png +0 -0
  123. package/phone-input/images/ukraine.png +0 -0
  124. package/phone-input/images/uzbekistan.png +0 -0
  125. package/phone-input/phone-input.js +13 -37
  126. package/phone-input/presets.js +2 -0
  127. package/phone-input-deprecated/index.d.ts +1 -1
  128. package/phone-input-deprecated/index.js +31 -57
  129. package/plate/index.d.ts +2 -2
  130. package/plate/index.js +3 -25
  131. package/popup/popup-view.js +3 -6
  132. package/popup/popup.js +4 -26
  133. package/portal/index.d.ts +1 -1
  134. package/price/index.js +2 -2
  135. package/radio-button/index.js +2 -4
  136. package/range/index.d.ts +1 -1
  137. package/range/index.js +6 -33
  138. package/rating/index.d.ts +1 -1
  139. package/rating/index.js +4 -9
  140. package/readme.md +4 -67
  141. package/screen/index.d.ts +5 -5
  142. package/screen/index.js +11 -37
  143. package/screen/slots.d.ts +3 -3
  144. package/screen/slots.js +9 -31
  145. package/select/parts/block.js +6 -28
  146. package/select/parts/button.js +7 -29
  147. package/select/parts/menu.js +12 -33
  148. package/select/select.js +4 -28
  149. package/select-deprecated/index.d.ts +1 -1
  150. package/select-deprecated/index.js +32 -56
  151. package/side-page/index.js +4 -30
  152. package/side-page/slots.js +4 -4
  153. package/spinner/index.d.ts +1 -1
  154. package/spinner/index.js +3 -5
  155. package/spinner/spinner.module.scss +3 -1
  156. package/stepper/index.d.ts +2 -2
  157. package/stepper/index.js +11 -38
  158. package/stroked-svg/index.d.ts +2 -2
  159. package/stroked-svg/index.js +3 -27
  160. package/styling/sizes.module.scss +3 -1
  161. package/super-ellipse-clip-path/index.js +2 -8
  162. package/switcher-row/index.js +5 -10
  163. package/tabs/index.d.ts +1 -1
  164. package/tabs/index.js +4 -26
  165. package/text/index.d.ts +2 -2
  166. package/text/index.js +3 -25
  167. package/text-button/index.d.ts +2 -2
  168. package/text-button/index.js +4 -7
  169. package/text-button/text-button.module.scss +1 -1
  170. package/text-field/index.d.ts +2 -2
  171. package/text-field/index.js +25 -55
  172. package/textarea/index.js +4 -26
  173. package/timer/index.d.ts +1 -1
  174. package/timer/index.js +3 -25
  175. package/toggle/index.d.ts +2 -2
  176. package/toggle/index.js +3 -27
  177. package/tooltip/index.d.ts +2 -2
  178. package/tooltip/index.js +4 -28
  179. package/top-bar/index.d.ts +1 -1
  180. package/top-bar/index.js +3 -1
  181. package/top-bar/top-bar.js +5 -45
  182. package/top-bar/utils.d.ts +2 -2
  183. package/top-bar/utils.js +6 -28
  184. package/touch-slider/index.d.ts +1 -1
  185. package/touch-slider/index.js +2 -4
  186. package/unknown-content/index.d.ts +1 -1
  187. package/unknown-content/index.js +3 -25
  188. package/upload-area/upload-area.js +8 -38
  189. package/with-hint/index.d.ts +1 -1
  190. package/with-hint/index.js +3 -28
  191. package/with-hint/positioning-hint.d.ts +1 -1
  192. package/with-hint/positioning-hint.js +3 -25
  193. package/with-tooltip/index.d.ts +1 -1
  194. package/with-tooltip/index.js +6 -31
  195. package/with-tooltip/positioning-tooltip.d.ts +1 -1
  196. package/with-tooltip/positioning-tooltip.js +4 -26
  197. package/file-icon/unknown.svg +0 -9
  198. package/rating/star.svg +0 -3
  199. package/upload-area/upload.svg +0 -6
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, MouseEventHandler, CSSProperties } from 'react';
1
+ import { ReactNode, MouseEventHandler, CSSProperties } from 'react';
2
2
  export interface ExpandableGroupProps {
3
3
  /** Расстояние между элементами группы в пикселях. */
4
4
  gap?: number;
@@ -38,5 +38,5 @@ export interface GroupItemProps {
38
38
  export declare function ExpandableGroup({ gap, itemHeight, lineLimit, defaultExpanded, children, onExpand, opener, className, style, expanded: expandedProp, openerWidth, }: ExpandableGroupProps): JSX.Element;
39
39
  export declare const Expandable: {
40
40
  readonly Group: typeof ExpandableGroup;
41
- readonly Item: React.ForwardRefExoticComponent<GroupItemProps & React.RefAttributes<HTMLLIElement>>;
41
+ readonly Item: import("react").ForwardRefExoticComponent<GroupItemProps & import("react").RefAttributes<HTMLLIElement>>;
42
42
  };
@@ -1,33 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.Expandable = exports.ExpandableGroup = void 0;
30
- const react_1 = __importStar(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
31
9
  const utils_1 = require("./utils");
32
10
  const bind_1 = __importDefault(require("classnames/bind"));
33
11
  const expandable_group_module_scss_1 = __importDefault(require("./expandable-group.module.scss"));
@@ -38,9 +16,7 @@ const ItemContext = (0, react_1.createContext)({});
38
16
  * @param props Свойства.
39
17
  * @return Элемент.
40
18
  */
41
- function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpanded = false, children, onExpand, opener = data => react_1.default.createElement(react_1.default.Fragment, null,
42
- "\u0415\u0449\u0451 ",
43
- data.hiddenCount), className, style, expanded: expandedProp, openerWidth = 72, }) {
19
+ function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpanded = false, children, onExpand, opener = data => (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["\u0415\u0449\u0451 ", data.hiddenCount] }), className, style, expanded: expandedProp, openerWidth = 72, }) {
44
20
  const wrapperRef = (0, react_1.useRef)(null);
45
21
  const containerRef = (0, react_1.useRef)(null);
46
22
  const openerRef = (0, react_1.useRef)(null);
@@ -65,19 +41,15 @@ function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpan
65
41
  openerRef,
66
42
  gap,
67
43
  });
68
- return (react_1.default.createElement("div", { ref: wrapperRef, className: cx('root', className), style: Object.assign(Object.assign({}, style), { maxHeight: expanded ? undefined : `${itemHeight * lineLimit + gap * (lineLimit - 1)}px`, '--expandable-item-height': `${itemHeight}px`, '--expandable-opener-width': `${openerWidth}px`, '--expandable-gap': `${gap}px` }) },
69
- react_1.default.createElement("ul", { ref: containerRef, className: expandable_group_module_scss_1.default.inner },
70
- items,
71
- mounted && !expanded && (react_1.default.createElement(ItemContext.Provider, { value: { invisible: hiddenCount === 0, opener: true } },
72
- react_1.default.createElement(ExpandableItem, { ref: openerRef, onClick: () => {
73
- setExpanded(true);
74
- onExpand === null || onExpand === void 0 ? void 0 : onExpand();
75
- }, "data-testid": 'expandable:opener' }, opener({ hiddenCount })))))));
44
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: wrapperRef, className: cx('root', className), style: Object.assign(Object.assign({}, style), { maxHeight: expanded ? undefined : `${itemHeight * lineLimit + gap * (lineLimit - 1)}px`, '--expandable-item-height': `${itemHeight}px`, '--expandable-opener-width': `${openerWidth}px`, '--expandable-gap': `${gap}px` }) }, { children: (0, jsx_runtime_1.jsxs)("ul", Object.assign({ ref: containerRef, className: expandable_group_module_scss_1.default.inner }, { children: [items, mounted && !expanded && ((0, jsx_runtime_1.jsx)(ItemContext.Provider, Object.assign({ value: { invisible: hiddenCount === 0, opener: true } }, { children: (0, jsx_runtime_1.jsx)(ExpandableItem, Object.assign({ ref: openerRef, onClick: () => {
45
+ setExpanded(true);
46
+ onExpand === null || onExpand === void 0 ? void 0 : onExpand();
47
+ }, "data-testid": 'expandable:opener' }, { children: opener({ hiddenCount }) })) })))] })) })));
76
48
  }
77
49
  exports.ExpandableGroup = ExpandableGroup;
78
50
  const ExpandableItem = (0, react_1.forwardRef)(({ children, onClick, 'data-testid': testId = 'expandable:item' }, ref) => {
79
51
  const context = (0, react_1.useContext)(ItemContext);
80
- return (react_1.default.createElement("li", { ref: ref, className: cx('item', context), "data-testid": testId, onClick: onClick }, children));
52
+ return ((0, jsx_runtime_1.jsx)("li", Object.assign({ ref: ref, className: cx('item', context), "data-testid": testId, onClick: onClick }, { children: children })));
81
53
  });
82
54
  exports.Expandable = {
83
55
  Group: ExpandableGroup,
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FieldBlock = exports.FIELD_BLOCK_DEFAULTS = exports.FIELD_BLOCK_HEIGHT = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const bind_1 = __importDefault(require("classnames/bind"));
9
9
  const field_block_module_scss_1 = __importDefault(require("./field-block.module.scss"));
10
10
  const cx = bind_1.default.bind(field_block_module_scss_1.default);
@@ -31,13 +31,6 @@ function FieldBlock({ size = exports.FIELD_BLOCK_DEFAULTS.size, main, mainProps,
31
31
  'no-label': !needLabel,
32
32
  }, rootProps === null || rootProps === void 0 ? void 0 : rootProps.className);
33
33
  const blockClassName = cx('block', fixedHeight && 'fixed-height', blockProps === null || blockProps === void 0 ? void 0 : blockProps.className);
34
- return (react_1.default.createElement("div", Object.assign({}, rootProps, { ref: rootRef, className: rootClassName, "data-testid": testId }),
35
- react_1.default.createElement("div", Object.assign({}, blockProps, { ref: blockRef, className: blockClassName, "data-testid": 'field-block:block' }),
36
- adornmentStart && (react_1.default.createElement("div", { className: cx('col', 'adornment-col', 'start'), "data-testid": 'field-block:adornment-start' }, adornmentStart)),
37
- react_1.default.createElement("div", { className: cx('col', 'main-col') },
38
- needLabel && (react_1.default.createElement("label", Object.assign({}, labelProps, { className: cx('label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), "data-testid": 'field-block:label' }), label)),
39
- react_1.default.createElement("div", Object.assign({}, mainProps, { className: cx('main', mainProps === null || mainProps === void 0 ? void 0 : mainProps.className), "data-testid": 'field-block:main' }), main)),
40
- adornmentEnd && (react_1.default.createElement("div", { className: cx('col', 'adornment-col', 'end'), "data-testid": 'field-block:adornment-end' }, adornmentEnd))),
41
- caption && (react_1.default.createElement("div", { className: cx('caption'), "data-testid": 'field-block:caption' }, caption))));
34
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rootProps, { ref: rootRef, className: rootClassName, "data-testid": testId }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({}, blockProps, { ref: blockRef, className: blockClassName, "data-testid": 'field-block:block' }, { children: [adornmentStart && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('col', 'adornment-col', 'start'), "data-testid": 'field-block:adornment-start' }, { children: adornmentStart }))), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('col', 'main-col') }, { children: [needLabel && ((0, jsx_runtime_1.jsx)("label", Object.assign({}, labelProps, { className: cx('label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), "data-testid": 'field-block:label' }, { children: label }))), (0, jsx_runtime_1.jsx)("div", Object.assign({}, mainProps, { className: cx('main', mainProps === null || mainProps === void 0 ? void 0 : mainProps.className), "data-testid": 'field-block:main' }, { children: main }))] })), adornmentEnd && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('col', 'adornment-col', 'end'), "data-testid": 'field-block:adornment-end' }, { children: adornmentEnd })))] })), caption && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('caption'), "data-testid": 'field-block:caption' }, { children: caption })))] })));
42
35
  }
43
36
  exports.FieldBlock = FieldBlock;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TextFieldProps } from '../text-field';
3
3
  type ItOrArray<T> = T[] | T;
4
4
  type CellSize = 'full' | 'half' | 'third';
@@ -1,33 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.FieldGrid = void 0;
30
- const react_1 = __importStar(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
31
9
  const bind_1 = __importDefault(require("classnames/bind"));
32
10
  const field_grid_module_scss_1 = __importDefault(require("./field-grid.module.scss"));
33
11
  const cx = bind_1.default.bind(field_grid_module_scss_1.default);
@@ -50,10 +28,10 @@ const TypeCheck = {
50
28
  */
51
29
  const FieldGrid = ({ children, rootProps }) => {
52
30
  const rows = react_1.Children.toArray(children).filter(TypeCheck.isRow);
53
- return (react_1.default.createElement("div", Object.assign({}, rootProps, { className: cx('container', rootProps === null || rootProps === void 0 ? void 0 : rootProps.className) }), rows.map((row, index) => (0, react_1.cloneElement)(row, {
54
- isFirst: index === 0,
55
- isLast: index === rows.length - 1,
56
- }))));
31
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rootProps, { className: cx('container', rootProps === null || rootProps === void 0 ? void 0 : rootProps.className) }, { children: rows.map((row, index) => (0, react_1.cloneElement)(row, {
32
+ isFirst: index === 0,
33
+ isLast: index === rows.length - 1,
34
+ })) })));
57
35
  };
58
36
  exports.FieldGrid = FieldGrid;
59
37
  /**
@@ -69,45 +47,45 @@ const Row = ({ isFirst: isFirstRow, isLast: isLastRow, children }) => {
69
47
  .filter(TypeCheck.isCell)
70
48
  .slice(0, 3);
71
49
  const cellSize = cellSizeByCount[cells.length];
72
- return (react_1.default.createElement(react_1.default.Fragment, null, cells.map((cell, index) => {
73
- const isFirstCell = index === 0;
74
- const isLastCell = index === cells.length - 1;
75
- let rounds = 'none';
76
- if (isFirstRow && isLastRow) {
77
- if (isFirstCell && isLastCell) {
78
- rounds = 'all';
79
- }
80
- else if (isFirstCell) {
81
- rounds = 'left';
82
- }
83
- else if (isLastCell) {
84
- rounds = 'right';
85
- }
86
- }
87
- else if (isFirstRow) {
88
- if (isFirstCell && isLastCell) {
89
- rounds = 'top';
90
- }
91
- else if (isFirstCell) {
92
- rounds = 'topLeft';
93
- }
94
- else if (isLastCell) {
95
- rounds = 'topRight';
96
- }
97
- }
98
- else if (isLastRow) {
99
- if (isFirstCell && isLastCell) {
100
- rounds = 'bottom';
50
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: cells.map((cell, index) => {
51
+ const isFirstCell = index === 0;
52
+ const isLastCell = index === cells.length - 1;
53
+ let rounds = 'none';
54
+ if (isFirstRow && isLastRow) {
55
+ if (isFirstCell && isLastCell) {
56
+ rounds = 'all';
57
+ }
58
+ else if (isFirstCell) {
59
+ rounds = 'left';
60
+ }
61
+ else if (isLastCell) {
62
+ rounds = 'right';
63
+ }
101
64
  }
102
- else if (isFirstCell) {
103
- rounds = 'bottomLeft';
65
+ else if (isFirstRow) {
66
+ if (isFirstCell && isLastCell) {
67
+ rounds = 'top';
68
+ }
69
+ else if (isFirstCell) {
70
+ rounds = 'topLeft';
71
+ }
72
+ else if (isLastCell) {
73
+ rounds = 'topRight';
74
+ }
104
75
  }
105
- else if (isLastCell) {
106
- rounds = 'bottomRight';
76
+ else if (isLastRow) {
77
+ if (isFirstCell && isLastCell) {
78
+ rounds = 'bottom';
79
+ }
80
+ else if (isFirstCell) {
81
+ rounds = 'bottomLeft';
82
+ }
83
+ else if (isLastCell) {
84
+ rounds = 'bottomRight';
85
+ }
107
86
  }
108
- }
109
- return (0, react_1.cloneElement)(cell, { size: cellSize, rounds });
110
- })));
87
+ return (0, react_1.cloneElement)(cell, { size: cellSize, rounds });
88
+ }) }));
111
89
  };
112
90
  /**
113
91
  * Компонент элемента для сетки полей. Может быть использован только как дочерний для FieldGrid.Row.
@@ -132,7 +110,7 @@ const Cell = ({ size, rounds, field, renderField }) => {
132
110
  className: cx(field.props.className, 'size-full'),
133
111
  });
134
112
  }
135
- return react_1.default.createElement("div", { className: cx('cell', `size-${size}`) }, content);
113
+ return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('cell', `size-${size}`) }, { children: content }));
136
114
  };
137
115
  exports.FieldGrid.Row = Row;
138
116
  exports.FieldGrid.Cell = Cell;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface FileIconProps extends Omit<React.SVGAttributes<SVGSVGElement>, 'type'> {
3
3
  /** Тип файла. */
4
4
  type?: string;
@@ -10,14 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.FileIcon = void 0;
18
- const react_1 = __importDefault(require("react"));
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
16
  const colors_1 = require("../colors");
20
- const unknown_svg_1 = __importDefault(require("./unknown.svg"));
21
17
  const VARIANTS = {
22
18
  doc: { fill: colors_1.COLORS.get('additional-electric-blue') },
23
19
  xls: { fill: colors_1.COLORS.get('additional-light-green') },
@@ -25,6 +21,9 @@ const VARIANTS = {
25
21
  jpg: { fill: colors_1.COLORS.get('additional-deep-orange') },
26
22
  xml: { fill: colors_1.COLORS.get('additional-deep-purple') },
27
23
  zip: { fill: colors_1.COLORS.get('additional-teal') },
24
+ png: { fill: colors_1.COLORS.get('additional-purple') },
25
+ mov: { fill: colors_1.COLORS.get('additional-blue-gray') },
26
+ mp4: { fill: colors_1.COLORS.get('additional-blue-gray') },
28
27
  };
29
28
  /**
30
29
  * Компонент иконки файла.
@@ -34,10 +33,6 @@ const VARIANTS = {
34
33
  const FileIcon = (_a) => {
35
34
  var { type } = _a, svgProps = __rest(_a, ["type"]);
36
35
  const typeProps = VARIANTS[type];
37
- return type && typeProps ? (react_1.default.createElement("svg", Object.assign({ width: '32', height: '32', viewBox: '0 0 32 32' }, svgProps),
38
- react_1.default.createElement("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: typeProps.fill }),
39
- react_1.default.createElement("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }),
40
- react_1.default.createElement("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }),
41
- react_1.default.createElement("text", { x: '16', y: '23', textAnchor: 'middle', fontSize: '6.5', fontWeight: '700', fill: '#fff' }, type.toUpperCase()))) : (react_1.default.createElement(unknown_svg_1.default, Object.assign({}, svgProps)));
36
+ return type && typeProps ? ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: '32', height: '32', viewBox: '0 0 32 32' }, svgProps, { children: [(0, jsx_runtime_1.jsx)("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: typeProps.fill }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }), (0, jsx_runtime_1.jsx)("text", Object.assign({ x: '16', y: '23', textAnchor: 'middle', fontSize: '6.5', fontWeight: '700', fill: '#fff' }, { children: type.toUpperCase() }))] }))) : ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: '32', height: '32', viewBox: '0 0 32 32', fill: 'none' }, svgProps, { children: [(0, jsx_runtime_1.jsx)("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: '#C2C2C2' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }), (0, jsx_runtime_1.jsxs)("g", Object.assign({ opacity: '0.8' }, { children: [(0, jsx_runtime_1.jsx)("path", { d: 'M9 22H23V24H9V22Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { d: 'M9 18H19V20H9V18Z', fill: 'white' })] }))] })));
42
37
  };
43
38
  exports.FileIcon = FileIcon;
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.GroupOverflow = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const utils_1 = require("./utils");
43
21
  const classnames_1 = __importDefault(require("classnames"));
44
22
  const group_overflow_module_scss_1 = __importDefault(require("./group-overflow.module.scss"));
@@ -52,10 +30,10 @@ function GroupOverflow(_a) {
52
30
  const ref = (0, react_1.useRef)(null);
53
31
  const { state, start } = (0, utils_1.useItemsHide)(ref, el => { var _a; return (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; });
54
32
  const total = react_1.Children.count(children);
55
- return (react_1.default.createElement("div", Object.assign({ className: (0, classnames_1.default)(group_overflow_module_scss_1.default.root, className), style: gap ? Object.assign(Object.assign({}, style), { '--group-overflow-gap': `${gap}px` }) : style }, restProps),
56
- react_1.default.createElement("div", { ref: ref, className: group_overflow_module_scss_1.default.items }, state === 'initial'
57
- ? react_1.Children.toArray(children)
58
- : react_1.Children.toArray(children).slice(0, start)),
59
- state !== 'initial' && start < total && tail && (react_1.default.createElement("div", { className: group_overflow_module_scss_1.default.more }, tail({ hiddenCount: total - start })))));
33
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(group_overflow_module_scss_1.default.root, className), style: typeof gap === 'number'
34
+ ? Object.assign(Object.assign({}, style), { '--group-overflow-gap': `${gap}px` })
35
+ : style }, restProps, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: group_overflow_module_scss_1.default.items }, { children: state === 'initial'
36
+ ? react_1.Children.toArray(children)
37
+ : react_1.Children.toArray(children).slice(0, start) })), state !== 'initial' && start < total && tail && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: group_overflow_module_scss_1.default.more }, { children: tail({ hiddenCount: total - start }) })))] })));
60
38
  }
61
39
  exports.GroupOverflow = GroupOverflow;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export type SlotsDict = Record<string, React.ElementType>;
3
3
  export type Slots<M extends SlotsDict> = {
4
4
  [key in keyof M]: React.ReactElement<React.ComponentProps<M[key]>, M[key]> | undefined;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export type EventWithPosition<T extends HTMLElement = HTMLElement> = MouseEvent | TouchEvent | React.MouseEvent<T> | React.TouchEvent<T>;
3
3
  /**
4
4
  * Проверяет, является ли событие событием нажатия основной кнопки мыши.
package/helpers/on.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  /**
3
3
  * Выполняет подписку на событие целевого объекта.
4
4
  * @param target Целевой объект.
package/hint/hint-view.js CHANGED
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.HintView = exports.arrowSquareSize = void 0;
18
- const react_1 = __importDefault(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const bind_1 = __importDefault(require("classnames/bind"));
20
20
  const hint_view_module_scss_1 = __importDefault(require("./hint-view.module.scss"));
21
21
  const cx = bind_1.default.bind(hint_view_module_scss_1.default);
@@ -28,7 +28,7 @@ exports.arrowSquareSize = Math.sqrt(4 * 4 + 4 * 4);
28
28
  */
29
29
  function HintView(_a) {
30
30
  var { hintRef, className, children, 'data-testid': testId = 'hint' } = _a, rest = __rest(_a, ["hintRef", "className", "children", 'data-testid']);
31
- return (react_1.default.createElement("div", Object.assign({ ref: hintRef, className: cx('root', className), "data-testid": testId }, rest), children));
31
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: hintRef, className: cx('root', className), "data-testid": testId }, rest, { children: children })));
32
32
  }
33
33
  exports.HintView = HintView;
34
34
  /**
@@ -38,6 +38,6 @@ exports.HintView = HintView;
38
38
  */
39
39
  function HintArrow(_a) {
40
40
  var { arrowRef, className } = _a, rest = __rest(_a, ["arrowRef", "className"]);
41
- return react_1.default.createElement("div", Object.assign({ ref: arrowRef, className: cx('arrow', className) }, rest));
41
+ return (0, jsx_runtime_1.jsx)("div", Object.assign({ ref: arrowRef, className: cx('arrow', className) }, rest));
42
42
  }
43
43
  HintView.Arrow = HintArrow;
package/hint/hint.js CHANGED
@@ -10,12 +10,9 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.Hint = void 0;
18
- const react_1 = __importDefault(require("react"));
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
16
  const portal_1 = require("../portal");
20
17
  const hint_view_1 = require("./hint-view");
21
18
  /**
@@ -25,7 +22,7 @@ const hint_view_1 = require("./hint-view");
25
22
  */
26
23
  function Hint(_a) {
27
24
  var { open } = _a, rest = __rest(_a, ["open"]);
28
- return react_1.default.createElement(portal_1.Portal, null, open && react_1.default.createElement(HintInner, Object.assign({}, rest)));
25
+ return (0, jsx_runtime_1.jsx)(portal_1.Portal, { children: open && (0, jsx_runtime_1.jsx)(HintInner, Object.assign({}, rest)) });
29
26
  }
30
27
  exports.Hint = Hint;
31
28
  /**
@@ -35,7 +32,5 @@ exports.Hint = Hint;
35
32
  */
36
33
  function HintInner(_a) {
37
34
  var { arrowRef, children } = _a, rest = __rest(_a, ["arrowRef", "children"]);
38
- return (react_1.default.createElement(hint_view_1.HintView, Object.assign({}, rest),
39
- children,
40
- react_1.default.createElement(hint_view_1.HintView.Arrow, { arrowRef: arrowRef })));
35
+ return ((0, jsx_runtime_1.jsxs)(hint_view_1.HintView, Object.assign({}, rest, { children: [children, (0, jsx_runtime_1.jsx)(hint_view_1.HintView.Arrow, { arrowRef: arrowRef })] })));
41
36
  }
package/hint/utils.d.ts CHANGED
@@ -56,7 +56,10 @@ export declare function useHintOnClick(floating: Pick<UseFloatingReturn, 'contex
56
56
  /**
57
57
  * Состояние хинта с автоматическим скрытием по таймауту.
58
58
  * @param initialState Начальное состояние.
59
+ * @param options Опции.
59
60
  * @return Результат вызова `useState`.
60
61
  */
61
- export declare function useTempHintState(initialState: boolean): readonly [boolean, Dispatch<SetStateAction<boolean>>];
62
+ export declare function useTempHintState(initialState: boolean, { timeout }?: {
63
+ timeout?: number;
64
+ }): readonly [boolean, Dispatch<SetStateAction<boolean>>];
62
65
  export {};
package/hint/utils.js CHANGED
@@ -134,9 +134,10 @@ exports.useHintOnClick = useHintOnClick;
134
134
  /**
135
135
  * Состояние хинта с автоматическим скрытием по таймауту.
136
136
  * @param initialState Начальное состояние.
137
+ * @param options Опции.
137
138
  * @return Результат вызова `useState`.
138
139
  */
139
- function useTempHintState(initialState) {
140
+ function useTempHintState(initialState, { timeout = 3000 } = {}) {
140
141
  const [open, setOpen] = (0, react_1.useState)(initialState);
141
142
  const timerRef = (0, react_1.useRef)(null);
142
143
  const updateTimer = (0, react_1.useCallback)((value) => {
@@ -146,9 +147,9 @@ function useTempHintState(initialState) {
146
147
  }
147
148
  // запускаем новый таймер если надо
148
149
  if (value) {
149
- timerRef.current = window.setTimeout(() => setOpen(false), 2000);
150
+ timerRef.current = window.setTimeout(() => setOpen(false), timeout);
150
151
  }
151
- }, []);
152
+ }, [timeout]);
152
153
  (0, react_1.useEffect)(() => {
153
154
  updateTimer(open);
154
155
  }, []);
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  type Direction = 'top' | 'left' | 'bottom' | 'right';
3
3
  export interface HintProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /** С какой стороны появляется хинт. */
@@ -7,5 +7,5 @@ export interface HintProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  /**
8
8
  * @deprecated Теперь нужно использовать `hint`.
9
9
  */
10
- export declare const Hint: React.ForwardRefExoticComponent<HintProps & React.RefAttributes<HTMLDivElement | null>>;
10
+ export declare const Hint: import("react").ForwardRefExoticComponent<HintProps & import("react").RefAttributes<HTMLDivElement | null>>;
11
11
  export {};
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Hint = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const shadows_1 = require("../styling/shadows");
43
21
  const bind_1 = __importDefault(require("classnames/bind"));
44
22
  const hint_module_scss_1 = __importDefault(require("./hint.module.scss"));
@@ -48,6 +26,5 @@ const cx = bind_1.default.bind(hint_module_scss_1.default);
48
26
  */
49
27
  exports.Hint = (0, react_1.forwardRef)((_a, ref) => {
50
28
  var { children, className, direction } = _a, restProps = __rest(_a, ["children", "className", "direction"]);
51
- return (react_1.default.createElement("div", Object.assign({}, restProps, { ref: ref, className: cx('root', className, direction), "data-testid": 'hint' }),
52
- react_1.default.createElement("div", { className: cx('body', shadows_1.BoxShadow.z4) }, children)));
29
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, restProps, { ref: ref, className: cx('root', className, direction), "data-testid": 'hint' }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('body', shadows_1.BoxShadow.z4) }, { children: children })) })));
53
30
  });
@@ -1,33 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.useBreakpoint = exports.BreakpointProvider = void 0;
30
- const react_1 = __importStar(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
31
9
  const __1 = require("..");
32
10
  const is_browser_1 = __importDefault(require("../../helpers/is-browser"));
33
11
  const utils_1 = require("./utils");
@@ -43,7 +21,7 @@ function BreakpointProvider({ children }) {
43
21
  (0, __1.useIsomorphicLayoutEffect)(() => {
44
22
  (0, is_browser_1.default)() && setRegistry((0, utils_1.createRegistry)());
45
23
  }, []);
46
- return react_1.default.createElement(Context.Provider, { value: contextValue }, children);
24
+ return (0, jsx_runtime_1.jsx)(Context.Provider, Object.assign({ value: contextValue }, { children: children }));
47
25
  }
48
26
  exports.BreakpointProvider = BreakpointProvider;
49
27
  /**