@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, { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentType, Ref, SVGAttributes } from 'react';
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentType, ReactElement, Ref, SVGAttributes } from 'react';
2
2
  import { LinkColor } from '../link';
3
3
  export type TextButtonSize = 's' | 'm';
4
4
  export type TextButtonColor = LinkColor;
@@ -38,5 +38,5 @@ export type TextButtonProps = TextButtonAsButtonProps | TextButtonAsAnchorProps;
38
38
  * @param props Свойства.
39
39
  * @return Элемент.
40
40
  */
41
- export declare function TextButton({ size, color, children, className, startIcon: StartIcon, endIcon: EndIcon, buttonRef, anchorRef, underline, disabled, iconGutter, 'data-testid': testId, ...restProps }: TextButtonProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
41
+ export declare function TextButton({ size, color, children, className, startIcon: StartIcon, endIcon: EndIcon, buttonRef, anchorRef, underline, disabled, iconGutter, 'data-testid': testId, ...restProps }: TextButtonProps): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
42
42
  export {};
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.TextButton = 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 text_button_module_scss_1 = __importDefault(require("./text-button.module.scss"));
21
21
  const cx = bind_1.default.bind(text_button_module_scss_1.default);
@@ -27,18 +27,15 @@ const cx = bind_1.default.bind(text_button_module_scss_1.default);
27
27
  function TextButton(_a) {
28
28
  var { size = 'm', color = 'basic-blue', children, className, startIcon: StartIcon, endIcon: EndIcon, buttonRef, anchorRef, underline, disabled, iconGutter = 8, 'data-testid': testId = 'text-button' } = _a, restProps = __rest(_a, ["size", "color", "children", "className", "startIcon", "endIcon", "buttonRef", "anchorRef", "underline", "disabled", "iconGutter", 'data-testid']);
29
29
  const rooClassName = cx('root', `color-${color}`, `size-${size}`, `icon-gutter-${iconGutter}`, underline && 'underline', disabled && 'disabled', className);
30
- const content = (react_1.default.createElement(react_1.default.Fragment, null,
31
- StartIcon && react_1.default.createElement(StartIcon, { className: cx('icon-start') }),
32
- children,
33
- EndIcon && react_1.default.createElement(EndIcon, { className: cx('icon-end') })));
30
+ const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [StartIcon && (0, jsx_runtime_1.jsx)(StartIcon, { className: cx('icon-start') }), children, EndIcon && (0, jsx_runtime_1.jsx)(EndIcon, { className: cx('icon-end') })] }));
34
31
  let result;
35
32
  switch (restProps.as) {
36
33
  case 'anchor':
37
- result = (react_1.default.createElement("a", Object.assign({}, restProps, { ref: anchorRef, className: rooClassName, "data-testid": testId }), content));
34
+ result = ((0, jsx_runtime_1.jsx)("a", Object.assign({}, restProps, { ref: anchorRef, className: rooClassName, "data-testid": testId }, { children: content })));
38
35
  break;
39
36
  case 'button':
40
37
  default:
41
- result = (react_1.default.createElement("button", Object.assign({}, restProps, { ref: buttonRef, className: rooClassName, disabled: disabled, "data-testid": testId }), content));
38
+ result = ((0, jsx_runtime_1.jsx)("button", Object.assign({}, restProps, { ref: buttonRef, className: rooClassName, disabled: disabled, "data-testid": testId }, { children: content })));
42
39
  break;
43
40
  }
44
41
  return result;
@@ -11,8 +11,8 @@
11
11
  white-space: nowrap;
12
12
  background: transparent;
13
13
  padding: 0;
14
- margin: 0;
15
14
  border: 0;
15
+ // ВАЖНО: не надо указывать здесь сброс margin так как его сложно перебить при сборке стилей
16
16
  }
17
17
 
18
18
  .root,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { BaseInputProps } from '../base-input-deprecated';
3
3
  import { SmallRounds } from '../styling/shapes';
4
4
  type Variant = 'desktop' | 'mobile';
@@ -65,5 +65,5 @@ export declare const DEFAULTS: {
65
65
  * @param props Свойства.
66
66
  * @return Элемент.
67
67
  */
68
- export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | undefined>>;
68
+ export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement | HTMLTextAreaElement | undefined>>;
69
69
  export {};
@@ -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.TextField = exports.DEFAULTS = exports.HEIGHTS = 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 lodash_1 = require("lodash");
32
10
  const box_1 = require("../box");
33
11
  const base_input_deprecated_1 = require("../base-input-deprecated");
@@ -74,35 +52,27 @@ exports.TextField = (0, react_1.forwardRef)(function TextField({ autoFocus, capt
74
52
  });
75
53
  (0, react_1.useImperativeHandle)(ref, () => baseInputRef.current);
76
54
  (0, react_1.useEffect)(() => { var _a; return toggleHasValue(Boolean((_a = baseInputRef.current) === null || _a === void 0 ? void 0 : _a.value)); });
77
- return (react_1.default.createElement("div", { "data-testid": dataTestId, className: cx('root', className, classes.root), style: style },
78
- react_1.default.createElement("div", Object.assign({}, blockProps, { "data-testid": 'text-field:block', className: cx('reset', 'input-block', commonModifyClasses, size && `size-${size}`, focused && classes.blockFocused, multiline && 'multiline', withLabel && 'with-label', variant === 'desktop' && rounds !== 'none' && shapes_1.SmallRounds[rounds], blockProps === null || blockProps === void 0 ? void 0 : blockProps.className), onClick: event => {
79
- const input = baseInputRef.current;
80
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
81
- input &&
82
- !disabled &&
83
- !event.defaultPrevented &&
84
- input !== document.activeElement &&
85
- input.focus();
86
- } }),
87
- !multiline && Boolean(startAdornment) && (react_1.default.createElement(box_1.Box, { display: 'flex', alignItems: 'center', marginRight: 4 }, startAdornment)),
88
- react_1.default.createElement("div", { className: cx('main-column') },
89
- withLabel && (react_1.default.createElement("label", { className: cx('label', commonModifyClasses, hasValue && 'filled', labelAsPlaceholder && 'as-placeholder'), htmlFor: id, children: label, "data-testid": 'text-field:label' })),
90
- react_1.default.createElement("div", { className: cx('input-wrapper') },
91
- react_1.default.createElement(base_input_deprecated_1.BaseInput, Object.assign({}, baseInputProps, { type: type, id: id, name: name, autoComplete: autoComplete, "data-testid": 'text-field:field', multiline: multiline, ref: baseInputRef, placeholder: withLabel && labelAsPlaceholder ? undefined : placeholder, restPlaceholder: withLabel && labelAsPlaceholder ? undefined : restPlaceholder, autoFocus: autoFocus, className: cx('base-input', commonModifyClasses, classes.baseInput, size && `size-${size}`), defaultValue: defaultValue, value: value, readOnly: readOnly, disabled: disabled, onFocus: (event) => {
92
- onFocus && onFocus(event);
93
- toggleHasValue(Boolean(event.target.value));
94
- toggleFocused(true);
95
- }, onBlur: (event) => {
96
- onBlur && onBlur(event);
97
- toggleHasValue(Boolean(event.target.value));
98
- toggleFocused(false);
99
- }, onInput: (event) => {
100
- onInput === null || onInput === void 0 ? void 0 : onInput(event);
101
- toggleHasValue(Boolean(event.target.value));
102
- }, onChange: (event) => {
103
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
104
- toggleHasValue(Boolean(event.target.value));
105
- }, onKeyDown: onKeyDown, onKeyUp: onKeyUp })))),
106
- !multiline && Boolean(endAdornment) && (react_1.default.createElement(box_1.Box, { display: 'flex', alignItems: 'center', marginLeft: 4 }, endAdornment))),
107
- Boolean(caption) && (react_1.default.createElement("div", { className: cx('caption', (0, sizes_1.marginTop)(isMobile ? 1 : 2), failed && 'failed'), children: caption }))));
55
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ "data-testid": dataTestId, className: cx('root', className, classes.root), style: style }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({}, blockProps, { "data-testid": 'text-field:block', className: cx('reset', 'input-block', commonModifyClasses, size && `size-${size}`, focused && classes.blockFocused, multiline && 'multiline', withLabel && 'with-label', variant === 'desktop' && rounds !== 'none' && shapes_1.SmallRounds[rounds], blockProps === null || blockProps === void 0 ? void 0 : blockProps.className), onClick: event => {
56
+ const input = baseInputRef.current;
57
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
58
+ input &&
59
+ !disabled &&
60
+ !event.defaultPrevented &&
61
+ input !== document.activeElement &&
62
+ input.focus();
63
+ } }, { children: [!multiline && Boolean(startAdornment) && ((0, jsx_runtime_1.jsx)(box_1.Box, Object.assign({ display: 'flex', alignItems: 'center', marginRight: 4 }, { children: startAdornment }))), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('main-column') }, { children: [withLabel && ((0, jsx_runtime_1.jsx)("label", { className: cx('label', commonModifyClasses, hasValue && 'filled', labelAsPlaceholder && 'as-placeholder'), htmlFor: id, children: label, "data-testid": 'text-field:label' })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('input-wrapper') }, { children: (0, jsx_runtime_1.jsx)(base_input_deprecated_1.BaseInput, Object.assign({}, baseInputProps, { type: type, id: id, name: name, autoComplete: autoComplete, "data-testid": 'text-field:field', multiline: multiline, ref: baseInputRef, placeholder: withLabel && labelAsPlaceholder ? undefined : placeholder, restPlaceholder: withLabel && labelAsPlaceholder ? undefined : restPlaceholder, autoFocus: autoFocus, className: cx('base-input', commonModifyClasses, classes.baseInput, size && `size-${size}`), defaultValue: defaultValue, value: value, readOnly: readOnly, disabled: disabled, onFocus: (event) => {
64
+ onFocus && onFocus(event);
65
+ toggleHasValue(Boolean(event.target.value));
66
+ toggleFocused(true);
67
+ }, onBlur: (event) => {
68
+ onBlur && onBlur(event);
69
+ toggleHasValue(Boolean(event.target.value));
70
+ toggleFocused(false);
71
+ }, onInput: (event) => {
72
+ onInput === null || onInput === void 0 ? void 0 : onInput(event);
73
+ toggleHasValue(Boolean(event.target.value));
74
+ }, onChange: (event) => {
75
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
76
+ toggleHasValue(Boolean(event.target.value));
77
+ }, onKeyDown: onKeyDown, onKeyUp: onKeyUp })) }))] })), !multiline && Boolean(endAdornment) && ((0, jsx_runtime_1.jsx)(box_1.Box, Object.assign({ display: 'flex', alignItems: 'center', marginLeft: 4 }, { children: endAdornment })))] })), Boolean(caption) && ((0, jsx_runtime_1.jsx)("div", { className: cx('caption', (0, sizes_1.marginTop)(isMobile ? 1 : 2), failed && 'failed'), children: caption }))] })));
108
78
  });
package/textarea/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,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Textarea = 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 base_input_1 = require("../base-input");
43
21
  const field_block_1 = require("../field-block");
44
22
  const utils_1 = require("../input/utils");
@@ -65,8 +43,8 @@ function Textarea(_a) {
65
43
  const [focused, setFocused] = (0, react_1.useState)(false);
66
44
  const handleMouseDown = (0, utils_1.useFieldMouseDown)(ref, blockProps === null || blockProps === void 0 ? void 0 : blockProps.onMouseDown);
67
45
  (0, react_1.useImperativeHandle)(textareaRef, () => ref.current);
68
- return (react_1.default.createElement(field_block_1.FieldBlock, Object.assign({}, restProps, { rootProps: Object.assign(Object.assign({}, restProps.rootProps), { style,
69
- className }), "data-testid": testId, caption: caption, disabled: disabled, failed: failed, fixedHeight: false, focused: focused, label: label, labelAsPlaceholder: !focused && !filled, labelProps: { htmlFor: id }, size: 'l', blockProps: Object.assign(Object.assign({}, blockProps), { onMouseDown: handleMouseDown }), main: react_1.default.createElement(base_input_1.BaseInput, Object.assign({}, baseInputProps, { textareaRef: ref, multiline: true, className: cx('textarea', baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.className), style: Object.assign(Object.assign({}, baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.style), { '--placeholder-color': (0, utils_1.definePlaceholderColor)({ failed, disabled }) }), autoComplete: autoComplete, autoFocus: autoFocus, defaultValue: defaultValue, disabled: disabled, id: id, name: name, placeholder: placeholder, readOnly: readOnly, required: required, rows: rows, value: value, onFocus: (event) => {
46
+ return ((0, jsx_runtime_1.jsx)(field_block_1.FieldBlock, Object.assign({}, restProps, { rootProps: Object.assign(Object.assign({}, restProps.rootProps), { style,
47
+ className }), "data-testid": testId, caption: caption, disabled: disabled, failed: failed, fixedHeight: false, focused: focused, label: label, labelAsPlaceholder: !focused && !filled, labelProps: { htmlFor: id }, size: 'l', blockProps: Object.assign(Object.assign({}, blockProps), { onMouseDown: handleMouseDown }), main: (0, jsx_runtime_1.jsx)(base_input_1.BaseInput, Object.assign({}, baseInputProps, { textareaRef: ref, multiline: true, className: cx('textarea', baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.className), style: Object.assign(Object.assign({}, baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.style), { '--placeholder-color': (0, utils_1.definePlaceholderColor)({ failed, disabled }) }), autoComplete: autoComplete, autoFocus: autoFocus, defaultValue: defaultValue, disabled: disabled, id: id, name: name, placeholder: placeholder, readOnly: readOnly, required: required, rows: rows, value: value, onFocus: (event) => {
70
48
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
71
49
  updateFilled(event);
72
50
  setFocused(true);
package/timer/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Distance } from './types';
3
3
  export interface TimerProps {
4
4
  /** Дата и время события. */
package/timer/index.js CHANGED
@@ -1,30 +1,8 @@
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
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.Timer = void 0;
27
- const react_1 = __importStar(require("react"));
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
28
6
  const utils_1 = require("./utils");
29
7
  /**
30
8
  * Компонент для вывода оставшегося времени до целевой временной отметки.
@@ -40,6 +18,6 @@ const Timer = ({ date, format = utils_1.formatDistance, timeout = 1000 }) => {
40
18
  setDistance((0, utils_1.getDistanceToNow)(date));
41
19
  return () => clearInterval(timerId);
42
20
  }, [timeout]);
43
- return react_1.default.createElement(react_1.default.Fragment, null, format(distance));
21
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: format(distance) });
44
22
  };
45
23
  exports.Timer = Timer;
package/toggle/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { CheckboxInputProps } from '../types';
3
3
  export type ToggleProps = CheckboxInputProps;
4
4
  /**
5
5
  * Компонент стилизованного переключателя (input[type=checkbox]).
6
6
  */
7
- export declare const Toggle: React.ForwardRefExoticComponent<CheckboxInputProps & React.RefAttributes<HTMLInputElement>>;
7
+ export declare const Toggle: import("react").ForwardRefExoticComponent<CheckboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
package/toggle/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,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Toggle = 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 bind_1 = __importDefault(require("classnames/bind"));
43
21
  const toggle_module_scss_1 = __importDefault(require("./toggle.module.scss"));
44
22
  const cx = bind_1.default.bind(toggle_module_scss_1.default);
@@ -49,8 +27,6 @@ exports.Toggle = (0, react_1.forwardRef)((_a, ref) => {
49
27
  var { className, style, 'data-testid': testId = 'toggle' } = _a,
50
28
  // input props
51
29
  restProps = __rest(_a, ["className", "style", 'data-testid']);
52
- return (react_1.default.createElement("label", { className: cx('root', className), style: style },
53
- react_1.default.createElement("input", Object.assign({}, restProps, { className: cx('input'), ref: ref, type: 'checkbox', "data-testid": testId })),
54
- react_1.default.createElement("span", { className: cx('switch') })));
30
+ return ((0, jsx_runtime_1.jsxs)("label", Object.assign({ className: cx('root', className), style: style }, { children: [(0, jsx_runtime_1.jsx)("input", Object.assign({}, restProps, { className: cx('input'), ref: ref, type: 'checkbox', "data-testid": testId })), (0, jsx_runtime_1.jsx)("span", { className: cx('switch') })] })));
55
31
  });
56
32
  exports.Toggle.displayName = 'Toggle';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface TooltipProps {
3
3
  /** Содержимое. */
4
4
  children?: React.ReactNode;
@@ -15,4 +15,4 @@ export interface TooltipProps {
15
15
  * @param props Свойства.
16
16
  * @return Элемент.
17
17
  */
18
- export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement | null>>;
18
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement | null>>;
package/tooltip/index.js CHANGED
@@ -1,34 +1,12 @@
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.Tooltip = void 0;
30
- const react_1 = __importStar(require("react"));
31
- const cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/cross"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const Cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Cross"));
32
10
  const bind_1 = __importDefault(require("classnames/bind"));
33
11
  const tooltip_module_scss_1 = __importDefault(require("./tooltip.module.scss"));
34
12
  const cx = bind_1.default.bind(tooltip_module_scss_1.default);
@@ -38,6 +16,4 @@ const cx = bind_1.default.bind(tooltip_module_scss_1.default);
38
16
  * @param props Свойства.
39
17
  * @return Элемент.
40
18
  */
41
- exports.Tooltip = (0, react_1.forwardRef)(({ children, onClose, style, className }, ref) => (react_1.default.createElement("div", { ref: ref, style: style, className: cx('root', className), "data-testid": 'tooltip' },
42
- react_1.default.createElement(cross_1.default, { className: cx('cross'), onClick: onClose, "data-testid": 'tooltip:cross' }),
43
- react_1.default.createElement("div", { className: cx('content') }, children))));
19
+ exports.Tooltip = (0, react_1.forwardRef)(({ children, onClose, style, className }, ref) => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: ref, style: style, className: cx('root', className), "data-testid": 'tooltip' }, { children: [(0, jsx_runtime_1.jsx)(Cross_1.default, { className: cx('cross'), onClick: onClose, "data-testid": 'tooltip:cross' }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('content') }, { children: children }))] }))));
@@ -1,3 +1,3 @@
1
1
  export type { TopBarProps, TopBarSize } from './types';
2
- export type { navigationButtons } from './utils';
2
+ export { navigationButtons } from './utils';
3
3
  export { TopBar, TOP_BAR_HEIGHT } from './top-bar';
package/top-bar/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOP_BAR_HEIGHT = exports.TopBar = void 0;
3
+ exports.TOP_BAR_HEIGHT = exports.TopBar = exports.navigationButtons = void 0;
4
+ var utils_1 = require("./utils");
5
+ Object.defineProperty(exports, "navigationButtons", { enumerable: true, get: function () { return utils_1.navigationButtons; } });
4
6
  var top_bar_1 = require("./top-bar");
5
7
  Object.defineProperty(exports, "TopBar", { enumerable: true, get: function () { return top_bar_1.TopBar; } });
6
8
  Object.defineProperty(exports, "TOP_BAR_HEIGHT", { enumerable: true, get: function () { return top_bar_1.TOP_BAR_HEIGHT; } });
@@ -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.TopBar = exports.TOP_BAR_HEIGHT = 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 borders_1 = require("../styling/borders");
44
22
  const bind_1 = __importDefault(require("classnames/bind"));
@@ -60,24 +38,7 @@ function TopBar({ divided, size = 'm', title, subtitle, buttons: { start, startS
60
38
  const hasEndButtons = end || endSecondary;
61
39
  const hasButtons = hasStartButtons || hasEndButtons;
62
40
  const rootClasses = cx('root', `size-${size}`, className, divided && borders_1.InnerBorder.bottom, !subtitle && 'no-subtitle');
63
- return (react_1.default.createElement("div", { className: rootClasses, "data-testid": testId },
64
- hasButtons && (react_1.default.createElement("div", { className: cx('side') },
65
- hasStartButtons && (react_1.default.createElement(TopBarButtonGroup, null,
66
- start && react_1.default.createElement(TopBarButton, Object.assign({}, start)),
67
- startSecondary && react_1.default.createElement(TopBarButton, Object.assign({}, startSecondary)))),
68
- hasEndButtons && (react_1.default.createElement(TopBarButtonGroup, { stub: true, end: true },
69
- endSecondary && react_1.default.createElement(TopBarButton, Object.assign({}, endSecondary)),
70
- end && react_1.default.createElement(TopBarButton, Object.assign({}, end)))))),
71
- react_1.default.createElement("div", { className: cx('main') },
72
- title && react_1.default.createElement("div", { className: cx('title') }, title),
73
- subtitle && react_1.default.createElement("div", { className: cx('subtitle') }, subtitle)),
74
- hasButtons && (react_1.default.createElement("div", { className: cx('side') },
75
- hasEndButtons && (react_1.default.createElement(TopBarButtonGroup, { end: true },
76
- endSecondary && react_1.default.createElement(TopBarButton, Object.assign({}, endSecondary)),
77
- end && react_1.default.createElement(TopBarButton, Object.assign({}, end)))),
78
- hasStartButtons && (react_1.default.createElement(TopBarButtonGroup, { stub: true },
79
- start && react_1.default.createElement(TopBarButton, Object.assign({}, start)),
80
- startSecondary && react_1.default.createElement(TopBarButton, Object.assign({}, startSecondary))))))));
41
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: rootClasses, "data-testid": testId }, { children: [hasButtons && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('side') }, { children: [hasStartButtons && ((0, jsx_runtime_1.jsxs)(TopBarButtonGroup, { children: [start && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, start)), startSecondary && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, startSecondary))] })), hasEndButtons && ((0, jsx_runtime_1.jsxs)(TopBarButtonGroup, Object.assign({ stub: true, end: true }, { children: [endSecondary && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, endSecondary)), end && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, end))] })))] }))), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('main') }, { children: [title && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('title') }, { children: title })), subtitle && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('subtitle') }, { children: subtitle }))] })), hasButtons && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('side') }, { children: [hasEndButtons && ((0, jsx_runtime_1.jsxs)(TopBarButtonGroup, Object.assign({ end: true }, { children: [endSecondary && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, endSecondary)), end && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, end))] }))), hasStartButtons && ((0, jsx_runtime_1.jsxs)(TopBarButtonGroup, Object.assign({ stub: true }, { children: [start && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, start)), startSecondary && (0, jsx_runtime_1.jsx)(TopBarButton, Object.assign({}, startSecondary))] })))] })))] })));
81
42
  }
82
43
  exports.TopBar = TopBar;
83
44
  /**
@@ -86,8 +47,7 @@ exports.TopBar = TopBar;
86
47
  * @return Элемент.
87
48
  */
88
49
  function TopBarButtonGroup({ children, stub, end, }) {
89
- return (react_1.default.createElement(utils_1.TopBarButtonGroupContext.Provider, { value: { stub } },
90
- react_1.default.createElement("div", { className: cx('button-group', { stub, end }) }, children)));
50
+ return ((0, jsx_runtime_1.jsx)(utils_1.TopBarButtonGroupContext.Provider, Object.assign({ value: { stub } }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('button-group', { stub, end }) }, { children: children })) })));
91
51
  }
92
52
  /**
93
53
  * Компонент кнопки-иконки.
@@ -97,5 +57,5 @@ function TopBarButtonGroup({ children, stub, end, }) {
97
57
  function TopBarButton(_a) {
98
58
  var { text, icon, className, 'data-testid': testId = 'top-bar:button' } = _a, buttonProps = __rest(_a, ["text", "icon", "className", 'data-testid']);
99
59
  const { stub } = (0, react_1.useContext)(utils_1.TopBarButtonGroupContext);
100
- return (react_1.default.createElement("button", Object.assign({}, (!stub && Object.assign(Object.assign({}, buttonProps), { 'data-testid': testId })), { type: 'button', className: cx('button', icon && 'iconic', stub && 'stub', className), "aria-hidden": stub }), icon && !stub ? icon : text));
60
+ return ((0, jsx_runtime_1.jsx)("button", Object.assign({}, (!stub && Object.assign(Object.assign({}, buttonProps), { 'data-testid': testId })), { type: 'button', className: cx('button', icon && 'iconic', stub && 'stub', className), "aria-hidden": stub }, { children: icon && !stub ? icon : text })));
101
61
  }
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TopBarProps } from './types';
3
- export declare const TopBarButtonGroupContext: React.Context<{
3
+ export declare const TopBarButtonGroupContext: import("react").Context<{
4
4
  stub?: boolean | undefined;
5
5
  }>;
6
6
  /**
package/top-bar/utils.js CHANGED
@@ -1,35 +1,13 @@
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.navigationButtons = exports.TopBarButtonGroupContext = void 0;
30
- const react_1 = __importStar(require("react"));
31
- const cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/cross"));
32
- const arrow_left_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/arrow-left"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const Cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/Cross"));
10
+ const ArrowLeft_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/ArrowLeft"));
33
11
  exports.TopBarButtonGroupContext = (0, react_1.createContext)({
34
12
  stub: false,
35
13
  });
@@ -43,13 +21,13 @@ function navigationButtons({ buttons, onBack, onClose, }) {
43
21
  start: {
44
22
  'data-testid': 'top-bar:back',
45
23
  onClick: onBack,
46
- icon: react_1.default.createElement(arrow_left_1.default, null),
24
+ icon: (0, jsx_runtime_1.jsx)(ArrowLeft_1.default, {}),
47
25
  },
48
26
  })), (onClose && {
49
27
  end: {
50
28
  'data-testid': 'top-bar:close',
51
29
  onClick: onClose,
52
- icon: react_1.default.createElement(cross_1.default, null),
30
+ icon: (0, jsx_runtime_1.jsx)(Cross_1.default, {}),
53
31
  },
54
32
  }));
55
33
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface TouchSliderProps {
3
3
  /** Прокручиваемое содержимое. */
4
4
  children?: React.ReactNode;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TouchSlider = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const layout_1 = require("../layout");
9
9
  const page_scroll_lock_1 = require("../_internal/page-scroll-lock");
10
10
  const touch_slider_module_scss_1 = __importDefault(require("./touch-slider.module.scss"));
@@ -15,7 +15,5 @@ const touch_slider_module_scss_1 = __importDefault(require("./touch-slider.modul
15
15
  * @param props Свойства.
16
16
  * @return Элемент.
17
17
  */
18
- const TouchSlider = ({ children }) => (react_1.default.createElement(layout_1.MobileLayout, null,
19
- react_1.default.createElement("div", Object.assign({ className: touch_slider_module_scss_1.default.outer }, { [page_scroll_lock_1.BSL_IGNORE_ATTR]: true }),
20
- react_1.default.createElement("div", { className: touch_slider_module_scss_1.default.inner }, children))));
18
+ const TouchSlider = ({ children }) => ((0, jsx_runtime_1.jsx)(layout_1.MobileLayout, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: touch_slider_module_scss_1.default.outer }, { [page_scroll_lock_1.BSL_IGNORE_ATTR]: true }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: touch_slider_module_scss_1.default.inner }, { children: children })) })) }));
21
19
  exports.TouchSlider = TouchSlider;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export interface UnknownContentProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  /** Строка с html-версткой. */
4
4
  markup?: string;