@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,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,14 +15,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Select = exports.renderDefaultArrow = 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 dropdown_1 = require("../dropdown");
43
21
  const dropdown_item_1 = require("../dropdown-item");
44
22
  const text_field_1 = require("../text-field");
45
23
  const dropdown_2 = require("../_internal/utils/dropdown");
46
24
  const bind_1 = __importDefault(require("classnames/bind"));
47
- const down_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Arrows/down"));
48
- const up_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Arrows/up"));
25
+ const Down_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Arrows/Down"));
26
+ const Up_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Arrows/Up"));
49
27
  const select_module_scss_1 = __importDefault(require("./select.module.scss"));
50
28
  const colors_1 = require("../colors");
51
29
  const dropdown_loading_1 = require("../_internal/dropdown-loading");
@@ -57,8 +35,8 @@ const cx = bind_1.default.bind(select_module_scss_1.default);
57
35
  * @return Элемент.
58
36
  */
59
37
  const renderDefaultArrow = (opened) => {
60
- const ArrowSVG = opened ? up_1.default : down_1.default;
61
- return react_1.default.createElement(ArrowSVG, { fill: colors_1.COLORS.get('basic-gray38') });
38
+ const ArrowSVG = opened ? Up_1.default : Down_1.default;
39
+ return (0, jsx_runtime_1.jsx)(ArrowSVG, { fill: colors_1.COLORS.get('basic-gray38') });
62
40
  };
63
41
  exports.renderDefaultArrow = renderDefaultArrow;
64
42
  /**
@@ -78,35 +56,33 @@ const Select = (_a) => {
78
56
  onMenuToggle && onMenuToggle(opened);
79
57
  }, [opened]);
80
58
  (0, hooks_1.useOutsideClick)(rootRef, toggleMenu.bind(null, false));
81
- return (react_1.default.createElement("div", { ref: rootRef, style: style, className: cx('root', className), "data-testid": dataTestId },
82
- react_1.default.createElement(text_field_1.TextField, Object.assign({}, restProps, { size: size, blockProps: {
83
- ref: fieldRef,
84
- tabIndex: 0,
85
- onMouseDown: () => {
86
- toggleMenu(a => !a);
87
- },
88
- onKeyDown: e => {
89
- e.key === 'Enter' && toggleMenu(true);
90
- },
91
- }, onClick: e => {
92
- e.preventDefault();
93
- onClick && onClick(e);
94
- }, className: select_module_scss_1.default.field, "data-testid": 'select:field', label: label, focused: opened, baseInputProps: {
95
- // чтобы не ловить фокус на поле
96
- style: { pointerEvents: 'none' },
97
- tabIndex: -1,
98
- }, value: value, multiline: false, variant: 'desktop', readOnly: true, endAdornment: typeof endAdornment === 'function' ? endAdornment(opened) : endAdornment })),
99
- opened && (loading || options.length > 0) && (react_1.default.createElement(dropdown_1.Dropdown, Object.assign({}, (0, dropdown_2.placeDropdown)(size), { ref: menuRef, "data-testid": 'select:menu', role: 'menu', tabIndex: -1, className: cx('menu'), onKeyDown: event => {
100
- if (event.key === 'Enter') {
59
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: rootRef, style: style, className: cx('root', className), "data-testid": dataTestId }, { children: [(0, jsx_runtime_1.jsx)(text_field_1.TextField, Object.assign({}, restProps, { size: size, blockProps: {
60
+ ref: fieldRef,
61
+ tabIndex: 0,
62
+ onMouseDown: () => {
63
+ toggleMenu(a => !a);
64
+ },
65
+ onKeyDown: e => {
66
+ e.key === 'Enter' && toggleMenu(true);
67
+ },
68
+ }, onClick: e => {
69
+ e.preventDefault();
70
+ onClick && onClick(e);
71
+ }, className: select_module_scss_1.default.field, "data-testid": 'select:field', label: label, focused: opened, baseInputProps: {
72
+ // чтобы не ловить фокус на поле
73
+ style: { pointerEvents: 'none' },
74
+ tabIndex: -1,
75
+ }, value: value, multiline: false, variant: 'desktop', readOnly: true, endAdornment: typeof endAdornment === 'function' ? endAdornment(opened) : endAdornment })), opened && (loading || options.length > 0) && ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, Object.assign({}, (0, dropdown_2.placeDropdown)(size), { ref: menuRef, "data-testid": 'select:menu', role: 'menu', tabIndex: -1, className: cx('menu'), onKeyDown: event => {
76
+ if (event.key === 'Enter') {
77
+ toggleMenu(false);
78
+ fieldRef.current && fieldRef.current.focus();
79
+ }
80
+ }, onBlur: () => {
101
81
  toggleMenu(false);
102
82
  fieldRef.current && fieldRef.current.focus();
103
- }
104
- }, onBlur: () => {
105
- toggleMenu(false);
106
- fieldRef.current && fieldRef.current.focus();
107
- } }), loading ? (react_1.default.createElement(dropdown_loading_1.DropdownLoading, { "data-testid": 'select:loading-area' })) : (options.map((option, index) => (react_1.default.createElement(dropdown_item_1.DropdownItem, { size: optionSize, key: index, role: 'menuitem', onClick: () => {
108
- toggleMenu(false);
109
- onSelect && onSelect(option);
110
- } }, renderOption(option)))))))));
83
+ } }, { children: loading ? ((0, jsx_runtime_1.jsx)(dropdown_loading_1.DropdownLoading, { "data-testid": 'select:loading-area' })) : (options.map((option, index) => ((0, jsx_runtime_1.jsx)(dropdown_item_1.DropdownItem, Object.assign({ size: optionSize, role: 'menuitem', onClick: () => {
84
+ toggleMenu(false);
85
+ onSelect && onSelect(option);
86
+ } }, { children: renderOption(option) }), index)))) })))] })));
111
87
  };
112
88
  exports.Select = Select;
@@ -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.SidePage = 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 define_slots_1 = require("../helpers/define-slots");
43
21
  const page_scroll_lock_1 = require("../_internal/page-scroll-lock");
44
22
  const slots_1 = require("./slots");
@@ -62,7 +40,7 @@ const transitionClasses = {
62
40
  function SidePage(_a) {
63
41
  var { shown, withTransitions, onEnter, onEntering, onEntered, onExit, onExiting, onExited } = _a, restProps = __rest(_a, ["shown", "withTransitions", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited"]);
64
42
  const transitionDuration = withTransitions ? 300 : 0;
65
- return (react_1.default.createElement(CSSTransition_1.default, { in: shown, timeout: transitionDuration, classNames: transitionClasses, unmountOnExit: true, onEntering: onEntering, onEnter: onEnter, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited }, transitionStatus => (react_1.default.createElement(SidePageInner, Object.assign({}, restProps, { transitionStatus, transitionDuration })))));
43
+ return ((0, jsx_runtime_1.jsx)(CSSTransition_1.default, Object.assign({ in: shown, timeout: transitionDuration, classNames: transitionClasses, unmountOnExit: true, onEntering: onEntering, onEnter: onEnter, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited }, { children: transitionStatus => ((0, jsx_runtime_1.jsx)(SidePageInner, Object.assign({}, restProps, { transitionStatus, transitionDuration }))) })));
66
44
  }
67
45
  exports.SidePage = SidePage;
68
46
  /**
@@ -80,11 +58,7 @@ function SidePageInner({ size = 'm', children, onClose, withScrollDisable = fals
80
58
  footer: SidePage.Footer,
81
59
  });
82
60
  const overlayProps = Object.assign({ style: { '--transition-duration': `${transitionDuration}ms` } }, (transitionStatus !== 'entering' && overlayClickBind));
83
- return (react_1.default.createElement(modal_overlay_1.ModalOverlay, Object.assign({}, overlayProps),
84
- react_1.default.createElement("div", { className: cx('side-page', `size-${size}`) },
85
- header,
86
- react_1.default.createElement("div", { ref: ref, className: cx('body') }, body),
87
- footer)));
61
+ return ((0, jsx_runtime_1.jsx)(modal_overlay_1.ModalOverlay, Object.assign({}, overlayProps, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('side-page', `size-${size}`) }, { children: [header, (0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: cx('body') }, { children: body })), footer] })) })));
88
62
  }
89
63
  SidePage.Header = slots_1.SidePageHeader;
90
64
  SidePage.Body = slots_1.SidePageBody;
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.SidePageFooter = exports.SidePageBody = exports.SidePageHeader = void 0;
18
- const react_1 = __importDefault(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const top_bar_1 = require("../top-bar");
20
20
  const bottom_bar_1 = require("../bottom-bar");
21
21
  const utils_1 = require("../top-bar/utils");
@@ -28,7 +28,7 @@ const side_page_module_scss_1 = __importDefault(require("./side-page.module.scss
28
28
  */
29
29
  function SidePageHeader(_a) {
30
30
  var { onBack, onClose, buttons } = _a, topBarProps = __rest(_a, ["onBack", "onClose", "buttons"]);
31
- return (react_1.default.createElement(top_bar_1.TopBar, Object.assign({}, topBarProps, { size: 'unset', className: side_page_module_scss_1.default.header, buttons: (0, utils_1.navigationButtons)({ buttons, onBack, onClose }) })));
31
+ return ((0, jsx_runtime_1.jsx)(top_bar_1.TopBar, Object.assign({}, topBarProps, { size: 'unset', className: side_page_module_scss_1.default.header, buttons: (0, utils_1.navigationButtons)({ buttons, onBack, onClose }) })));
32
32
  }
33
33
  exports.SidePageHeader = SidePageHeader;
34
34
  /**
@@ -37,7 +37,7 @@ exports.SidePageHeader = SidePageHeader;
37
37
  * @return Элемент.
38
38
  */
39
39
  function SidePageBody({ children }) {
40
- return react_1.default.createElement(react_1.default.Fragment, null, children);
40
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
41
41
  }
42
42
  exports.SidePageBody = SidePageBody;
43
43
  /**
@@ -47,6 +47,6 @@ exports.SidePageBody = SidePageBody;
47
47
  */
48
48
  function SidePageFooter(_a) {
49
49
  var props = __rest(_a, []);
50
- return react_1.default.createElement(bottom_bar_1.BottomBar, Object.assign({}, props, { size: 'unset', className: (0, classnames_1.default)(side_page_module_scss_1.default.footer) }));
50
+ return (0, jsx_runtime_1.jsx)(bottom_bar_1.BottomBar, Object.assign({}, props, { size: 'unset', className: (0, classnames_1.default)(side_page_module_scss_1.default.footer) }));
51
51
  }
52
52
  exports.SidePageFooter = SidePageFooter;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Token } from '../colors';
3
3
  /**
4
4
  * @deprecated Следует использовать 's' | 'm' | 'l'.
package/spinner/index.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SpinnerSVG = exports.Spinner = exports.DIAMETERS = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const lodash_1 = require("lodash");
9
9
  const colors_1 = require("../colors");
10
10
  const bind_1 = __importDefault(require("classnames/bind"));
@@ -28,8 +28,7 @@ const DEFAULT_COLOR = 'basic-blue';
28
28
  function Spinner({ size = 'm', color = DEFAULT_COLOR, className, style, 'data-testid': testId = 'spinner', }) {
29
29
  const readySize = (0, lodash_1.has)(exports.DIAMETERS, size) ? size : 'm';
30
30
  const readyColor = colors_1.COLORS.has(color) ? color : DEFAULT_COLOR;
31
- return (react_1.default.createElement("div", { className: className, style: style, "data-testid": testId },
32
- react_1.default.createElement(SpinnerSVG, { size: readySize, color: readyColor, "data-testid": null })));
31
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: className, style: style, "data-testid": testId }, { children: (0, jsx_runtime_1.jsx)(SpinnerSVG, { size: readySize, color: readyColor, "data-testid": null }) })));
33
32
  }
34
33
  exports.Spinner = Spinner;
35
34
  /**
@@ -41,7 +40,6 @@ exports.Spinner = Spinner;
41
40
  function SpinnerSVG({ size = 'm', color = DEFAULT_COLOR, className, style, 'data-testid': testId = 'spinner', }) {
42
41
  const diameter = exports.DIAMETERS[size];
43
42
  const radius = diameter / 2;
44
- return (react_1.default.createElement("svg", { style: style, className: cx('spinner', `size-${size}`, className), viewBox: `0 0 ${diameter} ${diameter}`, width: diameter, height: diameter, stroke: colors_1.COLORS.get(color), "data-testid": testId },
45
- react_1.default.createElement("circle", { className: cx('circle'), cx: radius, cy: radius, r: radius - 1 })));
43
+ return ((0, jsx_runtime_1.jsx)("svg", Object.assign({ style: style, className: cx('spinner', `size-${size}`, className), viewBox: `0 0 ${diameter} ${diameter}`, width: diameter, height: diameter, stroke: colors_1.COLORS.get(color), "data-testid": testId }, { children: (0, jsx_runtime_1.jsx)("circle", { className: cx('circle'), cx: radius, cy: radius, r: radius - 1 }) })));
46
44
  }
47
45
  exports.SpinnerSVG = SpinnerSVG;
@@ -1,3 +1,5 @@
1
+ @use 'sass:map';
2
+
1
3
  $pi: 3.141592653589793;
2
4
  $sizes: (
3
5
  s: 20,
@@ -32,7 +34,7 @@ $durations: (
32
34
  width: #{$diameter}px;
33
35
  height: #{$diameter}px;
34
36
  .circle {
35
- animation: dash-#{$sizeKey} map-get($durations, $sizeKey) linear infinite;
37
+ animation: dash-#{$sizeKey} map.get($durations, $sizeKey) linear infinite;
36
38
  }
37
39
  @keyframes dash-#{$sizeKey} {
38
40
  0% {
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, InputHTMLAttributes, MouseEventHandler } from 'react';
1
+ import { CSSProperties, InputHTMLAttributes, MouseEventHandler } from 'react';
2
2
  /** Размер Stepper (влияет на высоту и минимальную ширину). */
3
3
  export type StepperSize = 's' | 'm';
4
4
  /** Стили Stepper. */
@@ -35,4 +35,4 @@ export interface StepperProps extends Omit<InputHTMLAttributes<HTMLInputElement>
35
35
  * @param props Свойства.
36
36
  * @return Элемент.
37
37
  */
38
- export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLInputElement>>;
38
+ export declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<HTMLInputElement>>;
package/stepper/index.js CHANGED
@@ -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,9 +15,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Stepper = void 0;
41
- const react_1 = __importStar(require("react"));
42
- const plus_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/plus"));
43
- const minus_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/minus"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
20
+ const Plus_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Plus"));
21
+ const Minus_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Minus"));
44
22
  const stepper_module_scss_1 = __importDefault(require("./stepper.module.scss"));
45
23
  const bind_1 = __importDefault(require("classnames/bind"));
46
24
  const cx = bind_1.default.bind(stepper_module_scss_1.default);
@@ -61,16 +39,11 @@ exports.Stepper = (0, react_1.forwardRef)(function Stepper(_a, forwardedRef) {
61
39
  }
62
40
  }, [focused, buttonClickBehavior]);
63
41
  const rootClassName = cx('root', `size-${size}`, { disabled, focused, failed }, className);
64
- return (react_1.default.createElement("div", { "data-testid": testId, style: style, className: rootClassName, onMouseDown: noBlurOnMousedown },
65
- react_1.default.createElement("button", { tabIndex: -1, hidden: !canSubtract, disabled: (_b = minusDisabled !== null && minusDisabled !== void 0 ? minusDisabled : disabled) !== null && _b !== void 0 ? _b : readOnly, className: cx('button'), "data-testid": 'stepper:minus', "aria-label": '\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C', onMouseDown: noBlurOnMousedown, onClick: canSubtract && !minusDisabled && !disabled && !readOnly ? onSubtract : undefined },
66
- react_1.default.createElement(minus_1.default, { className: stepper_module_scss_1.default.svg })),
67
- react_1.default.createElement("input", Object.assign({}, inputProps, { ref: ref, readOnly: readOnly, "data-testid": 'stepper:input', className: cx('input'), value: value, disabled: disabled, onChange: onChange, onFocus: e => {
68
- setFocused(true);
69
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
70
- }, onBlur: e => {
71
- setFocused(false);
72
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
73
- } })),
74
- react_1.default.createElement("button", { tabIndex: -1, hidden: !canAdd, disabled: (_c = plusDisabled !== null && plusDisabled !== void 0 ? plusDisabled : disabled) !== null && _c !== void 0 ? _c : readOnly, className: cx('button'), "data-testid": 'stepper:plus', "aria-label": '\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C', onMouseDown: noBlurOnMousedown, onClick: canAdd && !plusDisabled && !disabled && !readOnly ? onAdd : undefined },
75
- react_1.default.createElement(plus_1.default, { className: stepper_module_scss_1.default.svg }))));
42
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ "data-testid": testId, style: style, className: rootClassName, onMouseDown: noBlurOnMousedown }, { children: [(0, jsx_runtime_1.jsx)("button", Object.assign({ tabIndex: -1, hidden: !canSubtract, disabled: (_b = minusDisabled !== null && minusDisabled !== void 0 ? minusDisabled : disabled) !== null && _b !== void 0 ? _b : readOnly, className: cx('button'), "data-testid": 'stepper:minus', "aria-label": '\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C', onMouseDown: noBlurOnMousedown, onClick: canSubtract && !minusDisabled && !disabled && !readOnly ? onSubtract : undefined }, { children: (0, jsx_runtime_1.jsx)(Minus_1.default, { className: stepper_module_scss_1.default.svg }) })), (0, jsx_runtime_1.jsx)("input", Object.assign({}, inputProps, { ref: ref, readOnly: readOnly, "data-testid": 'stepper:input', className: cx('input'), value: value, disabled: disabled, onChange: onChange, onFocus: e => {
43
+ setFocused(true);
44
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
45
+ }, onBlur: e => {
46
+ setFocused(false);
47
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
48
+ } })), (0, jsx_runtime_1.jsx)("button", Object.assign({ tabIndex: -1, hidden: !canAdd, disabled: (_c = plusDisabled !== null && plusDisabled !== void 0 ? plusDisabled : disabled) !== null && _c !== void 0 ? _c : readOnly, className: cx('button'), "data-testid": 'stepper:plus', "aria-label": '\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C', onMouseDown: noBlurOnMousedown, onClick: canAdd && !plusDisabled && !disabled && !readOnly ? onAdd : undefined }, { children: (0, jsx_runtime_1.jsx)(Plus_1.default, { className: stepper_module_scss_1.default.svg }) }))] })));
76
49
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface StrokedSVGProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
3
3
  /** Компонент, выводящий svg-элемент. */
4
4
  component: React.ComponentType<React.SVGAttributes<SVGSVGElement>>;
@@ -14,4 +14,4 @@ export interface StrokedSVGProps extends Omit<React.HTMLAttributes<HTMLDivElemen
14
14
  * @param props Свойства.
15
15
  * @return Элемент.
16
16
  */
17
- export declare const StrokedSVG: React.ForwardRefExoticComponent<StrokedSVGProps & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const StrokedSVG: import("react").ForwardRefExoticComponent<StrokedSVGProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -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.StrokedSVG = 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 colors_1 = require("../colors");
43
21
  const classnames_1 = __importDefault(require("classnames"));
44
22
  const index_module_scss_1 = __importDefault(require("./index.module.scss"));
@@ -49,8 +27,6 @@ const index_module_scss_1 = __importDefault(require("./index.module.scss"));
49
27
  */
50
28
  exports.StrokedSVG = (0, react_1.forwardRef)((_a, ref) => {
51
29
  var { component: Tag, fill, stroke = colors_1.COLORS.get('basic-gray4'), strokeWidth = 1, className } = _a, restProps = __rest(_a, ["component", "fill", "stroke", "strokeWidth", "className"]);
52
- return (react_1.default.createElement("div", Object.assign({ ref: ref, className: (0, classnames_1.default)(index_module_scss_1.default.root, className) }, restProps),
53
- react_1.default.createElement(Tag, { stroke: stroke, strokeWidth: `${strokeWidth * 2}px`, className: index_module_scss_1.default.stroke }),
54
- react_1.default.createElement(Tag, { fill: fill, className: index_module_scss_1.default.svg })));
30
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: ref, className: (0, classnames_1.default)(index_module_scss_1.default.root, className) }, restProps, { children: [(0, jsx_runtime_1.jsx)(Tag, { stroke: stroke, strokeWidth: `${strokeWidth * 2}px`, className: index_module_scss_1.default.stroke }), (0, jsx_runtime_1.jsx)(Tag, { fill: fill, className: index_module_scss_1.default.svg })] })));
55
31
  });
56
32
  exports.StrokedSVG.displayName = 'StrokedSVG';
@@ -1,3 +1,5 @@
1
+ @use 'sass:string';
2
+
1
3
  $step: 4px;
2
4
 
3
5
  $directions: 'top', 'right', 'bottom', 'left';
@@ -6,7 +8,7 @@ $directions: 'top', 'right', 'bottom', 'left';
6
8
  @for $index from -8 through 32 {
7
9
  @each $direction in $directions {
8
10
  // ключи классов попадают в JS - сокращаем до одной буквы для экономии
9
- $short: str-slice($direction, 0, 1);
11
+ $short: string.slice($direction, 0, 1);
10
12
 
11
13
  // внешние отступы
12
14
  .M-#{$short}__#{$index} {
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.SuperEllipseClipPath = void 0;
7
- const react_1 = __importDefault(require("react"));
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
5
  /**
9
6
  * Выводит svg-элемент, содержащий clipPath в форме "супер-эллипса".
10
7
  * @param props Свойства.
11
8
  * @return Элемент.
12
9
  */
13
- const SuperEllipseClipPath = ({ id }) => (react_1.default.createElement("svg", { width: 0, height: 0, style: { position: 'absolute' } },
14
- react_1.default.createElement("defs", null,
15
- react_1.default.createElement("clipPath", { id: id, clipPathUnits: 'objectBoundingBox' },
16
- react_1.default.createElement("path", { d: 'M1 0.5 C 1 0.856, 0.856 1, 0.5 1 S 0 0.856, 0 0.5 S 0.143 0, 0.5 0 S 1 0.143 1 0.5 Z' })))));
10
+ const SuperEllipseClipPath = ({ id }) => ((0, jsx_runtime_1.jsx)("svg", Object.assign({ width: 0, height: 0, style: { position: 'absolute' } }, { children: (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", Object.assign({ id: id, clipPathUnits: 'objectBoundingBox' }, { children: (0, jsx_runtime_1.jsx)("path", { d: 'M1 0.5 C 1 0.856, 0.856 1, 0.5 1 S 0 0.856, 0 0.5 S 0.143 0, 0.5 0 S 1 0.143 1 0.5 Z' }) })) }) })));
17
11
  exports.SuperEllipseClipPath = SuperEllipseClipPath;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SwitcherRow = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const checkbox_1 = require("../checkbox");
9
9
  const define_slots_1 = require("../helpers/define-slots");
10
10
  const radio_button_1 = require("../radio-button");
@@ -31,13 +31,8 @@ function SwitcherRow({ children, className, style, textAlign = 'left', fieldPosi
31
31
  const disabled = input === null || input === void 0 ? void 0 : input.props.disabled;
32
32
  const fieldId = input === null || input === void 0 ? void 0 : input.props.id;
33
33
  // @todo в Safari position: relative ломает vertical-align
34
- const fieldColumn = input && (react_1.default.createElement("div", { className: cx('col', 'field-col', { 'toggle-col': toggle }) }, input));
35
- return (react_1.default.createElement("div", { className: cx('root', `text-align-${textAlign}`, { failed, disabled }, className), style: style, "data-testid": testId },
36
- fieldPosition === 'start' && fieldColumn,
37
- react_1.default.createElement("label", { className: cx('col', 'main-col'), htmlFor: fieldId },
38
- label && (react_1.default.createElement("span", { className: cx('label', { 'for-toggle': toggle }), "data-testid": 'switcher-row:label' }, label)),
39
- comment && (react_1.default.createElement("span", { className: cx('comment'), "data-testid": 'switcher-row:comment' }, comment))),
40
- fieldPosition === 'end' && fieldColumn));
34
+ const fieldColumn = input && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('col', 'field-col', { 'toggle-col': toggle }) }, { children: input })));
35
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('root', `text-align-${textAlign}`, { failed, disabled }, className), style: style, "data-testid": testId }, { children: [fieldPosition === 'start' && fieldColumn, (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: cx('col', 'main-col'), htmlFor: fieldId }, { children: [label && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: cx('label', { 'for-toggle': toggle }), "data-testid": 'switcher-row:label' }, { children: label }))), comment && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: cx('comment'), "data-testid": 'switcher-row:comment' }, { children: comment })))] })), fieldPosition === 'end' && fieldColumn] })));
41
36
  }
42
37
  exports.SwitcherRow = SwitcherRow;
43
38
  /**
@@ -46,7 +41,7 @@ exports.SwitcherRow = SwitcherRow;
46
41
  * @return Элемент.
47
42
  */
48
43
  function SwitcherRowLabel({ children }) {
49
- return react_1.default.createElement(react_1.default.Fragment, null, children);
44
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
50
45
  }
51
46
  /**
52
47
  * Слот комментария.
@@ -54,7 +49,7 @@ function SwitcherRowLabel({ children }) {
54
49
  * @return Элемент.
55
50
  */
56
51
  function SwitcherRowComment({ children }) {
57
- return react_1.default.createElement(react_1.default.Fragment, null, children);
52
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
58
53
  }
59
54
  SwitcherRow.Label = SwitcherRowLabel;
60
55
  SwitcherRow.Comment = SwitcherRowComment;
package/tabs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface TabsProps {
3
3
  /** Визуальный вариант вкладок. */
4
4
  view?: 'clean' | 'clean-underline' | 'round';
package/tabs/index.js CHANGED
@@ -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.Tabs = 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 tabs_module_scss_1 = __importDefault(require("./tabs.module.scss"));
33
11
  const cx = bind_1.default.bind(tabs_module_scss_1.default);
@@ -36,12 +14,12 @@ const cx = bind_1.default.bind(tabs_module_scss_1.default);
36
14
  * @param props Свойства.
37
15
  * @return Элемент.
38
16
  */
39
- const Tab = ({ name, selected, disabled, 'data-testid': testId = 'tab', onClick, }) => (react_1.default.createElement("li", { className: cx('item', { selected, disabled }), "data-testid": testId, onClick: disabled ? undefined : onClick }, String(name)));
17
+ const Tab = ({ name, selected, disabled, 'data-testid': testId = 'tab', onClick, }) => ((0, jsx_runtime_1.jsx)("li", Object.assign({ className: cx('item', { selected, disabled }), "data-testid": testId, onClick: disabled ? undefined : onClick }, { children: String(name) })));
40
18
  /**
41
19
  * Компонент строки вкладок.
42
20
  * @param props Свойства.
43
21
  * @return Элемент.
44
22
  */
45
- const Tabs = ({ children, view = 'clean', stretch = false, gapSize = 'm', className, 'data-testid': testId = 'tabs', }) => (react_1.default.createElement("ul", { "data-testid": testId, className: cx('root', `view-${view}`, `gap-${gapSize}`, { stretch }, className) }, react_1.Children.toArray(children).filter(child => (0, react_1.isValidElement)(child) && child.type === Tab)));
23
+ const Tabs = ({ children, view = 'clean', stretch = false, gapSize = 'm', className, 'data-testid': testId = 'tabs', }) => ((0, jsx_runtime_1.jsx)("ul", Object.assign({ "data-testid": testId, className: cx('root', `view-${view}`, `gap-${gapSize}`, { stretch }, className) }, { children: react_1.Children.toArray(children).filter(child => (0, react_1.isValidElement)(child) && child.type === Tab) })));
46
24
  exports.Tabs = Tabs;
47
25
  exports.Tabs.Item = Tab;
package/text/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Size, LineHeight, Weight } from '../styling/fonts';
3
3
  import { Token } from '../colors';
4
4
  type Align = 'left' | 'center' | 'right' | 'justify';
@@ -33,5 +33,5 @@ export declare const ALIGNS: Set<Align>;
33
33
  * @param props Свойства.
34
34
  * @return Элемент.
35
35
  */
36
- export declare const Text: React.MemoExoticComponent<React.ForwardRefExoticComponent<TextProps & React.RefAttributes<any>>>;
36
+ export declare const Text: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<any>>>;
37
37
  export {};
package/text/index.js CHANGED
@@ -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.Text = exports.ALIGNS = exports.defaultHeights = 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 text_module_scss_1 = __importDefault(require("./text.module.scss"));
33
11
  const colors_1 = require("../styling/colors");
@@ -55,7 +33,7 @@ lineHeight = size ? exports.defaultHeights[size] : undefined,
55
33
  // не устанавливаем значения по умолчанию, чтобы компонент вел себя предсказуемо
56
34
  align, color, nowrap, truncate, weight, }, ref) {
57
35
  const needLineClamp = typeof truncate === 'number' && truncate > 0;
58
- return (react_1.default.createElement(Container, { ref: ref, className: cx([
36
+ return ((0, jsx_runtime_1.jsx)(Container, { ref: ref, className: cx([
59
37
  // styling
60
38
  size && (0, fonts_1.size)(size),
61
39
  lineHeight && (0, fonts_1.lineHeight)(lineHeight),