@skbkontur/react-ui 6.5.2 → 6.5.3

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.5.3](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@6.5.2...@skbkontur/react-ui@6.5.3) (2026-11-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Loader:** fallback for tabbable selector in old browsers ([32b3b58](https://github.com/skbkontur/retail-ui/commit/32b3b587acfb3ca580ad8df3d1603e6f6e1ac053))
12
+ * **Toast:** keep height for notification without text ([539f493](https://github.com/skbkontur/retail-ui/commit/539f49321221f29e7dffbd4cb4791504d7223b93))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [6.5.2](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@6.5.1...@skbkontur/react-ui@6.5.2) (2026-11-10)
7
19
 
8
20
 
@@ -72,7 +72,7 @@ var ToastView = /** @class */ (function (_super) {
72
72
  : { side: 40, size: parseInt(_this.theme.toastCloseSize) };
73
73
  var close = action || showCloseIcon ? (React.createElement("span", { className: _this.cx(_this.styles.closeWrapper(_this.theme), isTheme6_1 && _this.styles.closeWrapper6_1()) },
74
74
  React.createElement(CloseButtonIcon, __assign({ "aria-label": _this.locale.closeButtonAriaLabel, "data-tid": ToastDataTids.close, onClick: onClose }, themeDependantProps, { color: toastCloseColors.default, colorHover: toastCloseColors.hover, tabbable: false })))) : null;
75
- var rootClassName = _this.cx(_this.styles.root(_this.theme), isTheme6_1 && _this.styles.root6_1(), isTheme6_1 && _this.isMobileLayout && _this.styles.rootMobile(_this.theme), _this.styles[use !== null && use !== void 0 ? use : 'default'](_this.theme));
75
+ var rootClassName = _this.cx(_this.styles.root(_this.theme), isTheme6_1 && _this.styles.root6_1(_this.theme), isTheme6_1 && _this.isMobileLayout && _this.styles.rootMobile(_this.theme), _this.styles[use !== null && use !== void 0 ? use : 'default'](_this.theme));
76
76
  var wrapperClassName = _this.cx(_this.styles.wrapper(_this.theme), isTheme6_1 && _this.styles.wrapper6_1(_this.theme));
77
77
  return (React.createElement(CommonWrapper, __assign({}, _this.props),
78
78
  React.createElement(ZIndex, { priority: "Toast", className: wrapperClassName },
@@ -1 +1 @@
1
- {"version":3,"file":"ToastView.js","sourceRoot":"","sources":["ToastView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAuBlD;IAA+B,6BAA+B;IAA9D;;QAuBU,gBAAU,GAAG;YACb,IAAA,KAAsE,KAAI,CAAC,KAAK,EAA9E,MAAM,YAAA,EAAE,aAAa,mBAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA,EAAE,YAAY,kBAAA,EAAE,GAAG,SAAe,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riaAttributes } from 'react';\nimport React from 'react';\n\nimport { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { ZIndex } from '../../internal/ZIndex/index.js';\nimport { locale } from '../../lib/locale/decorators.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport { isThemeGTE } from '../../lib/theming/ThemeHelpers.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { responsiveLayout } from '../ResponsiveLayout/decorator.js';\nimport type { ToastLocale } from './locale/index.js';\nimport { ToastLocaleHelper } from './locale/index.js';\nimport type { Action, ToastUse } from './Toast.js';\nimport { ToastDataTids } from './Toast.js';\nimport { getStyles } from './ToastView.styles.js';\n\nexport interface ToastViewProps extends Pick<AriaAttributes, 'aria-label'>, CommonProps {\n /** Отображает контент уведомления. */\n children?: React.ReactNode;\n /** Добавляет кнопку действия в тост. */\n action?: Nullable<Action>;\n /** Показывает кнопку закрытия рядом с текстом. */\n showCloseIcon?: boolean;\n /** Вызывается при закрытии тоста из разметки. */\n onClose?: () => void;\n /** Вызывается при наведении курсора на тост. */\n onMouseEnter?: () => void;\n /** Вызывается при уходе курсора с тоста. */\n onMouseLeave?: () => void;\n /** Выбирает стиль оформления: обычный или ошибка (`error`). */\n use?: ToastUse;\n}\n\n@responsiveLayout\n@withRenderEnvironment\n@rootNode\n@locale('Toast', ToastLocaleHelper)\nexport class ToastView extends React.Component<ToastViewProps> {\n private styles!: ReturnType<typeof getStyles>;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private theme!: Theme;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private readonly locale!: ToastLocale;\n private isMobileLayout!: boolean;\n\n public render(): React.JSX.Element {\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = () => {\n const { action, showCloseIcon, onClose, onMouseEnter, onMouseLeave, use } = this.props;\n\n const isTheme6_1 = isThemeGTE(this.theme, '6.1');\n\n const toastCloseColors =\n use === 'error'\n ? {\n hover: this.theme.toastCloseHoverColorError,\n default: this.theme.toastCloseColorError,\n }\n : {\n hover: this.theme.toastCloseHoverColor,\n default: this.theme.toastCloseColor,\n };\n\n const toastActionColorsClassName =\n use === 'error' ? this.styles.toastActionErrorColor(this.theme) : this.styles.toastActionDefaultColor(this.theme);\n const toastActionClassNames = this.cx(\n this.styles.link(this.theme),\n isTheme6_1 && this.styles.link6_1(this.theme),\n\n toastActionColorsClassName,\n );\n\n const link = action ? (\n <button\n aria-label={action['aria-label']}\n data-tid={ToastDataTids.action}\n className={toastActionClassNames}\n onClick={action.handler}\n >\n {action.label}\n </button>\n ) : null;\n\n const themeDependantProps = isTheme6_1\n ? {\n style: {\n height: '100%',\n },\n side: parseInt(this.theme.toastCloseBtnSide),\n }\n : { side: 40, size: parseInt(this.theme.toastCloseSize) };\n\n const close =\n action || showCloseIcon ? (\n <span className={this.cx(this.styles.closeWrapper(this.theme), isTheme6_1 && this.styles.closeWrapper6_1())}>\n <CloseButtonIcon\n aria-label={this.locale.closeButtonAriaLabel}\n data-tid={ToastDataTids.close}\n onClick={onClose}\n {...themeDependantProps}\n color={toastCloseColors.default}\n colorHover={toastCloseColors.hover}\n tabbable={false}\n />\n </span>\n ) : null;\n\n const rootClassName = this.cx(\n this.styles.root(this.theme),\n isTheme6_1 && this.styles.root6_1(),\n isTheme6_1 && this.isMobileLayout && this.styles.rootMobile(this.theme),\n this.styles[use ?? 'default'](this.theme),\n );\n\n const wrapperClassName = this.cx(this.styles.wrapper(this.theme), isTheme6_1 && this.styles.wrapper6_1(this.theme));\n\n return (\n <CommonWrapper {...this.props}>\n <ZIndex priority=\"Toast\" className={wrapperClassName}>\n <div\n data-tid={ToastDataTids.toastView}\n className={rootClassName}\n ref={this.setRootNode}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {isTheme6_1 ? (\n <span className={this.styles.content(this.theme)}>\n <span className={this.cx(this.isMobileLayout && this.styles.ellipsisContent())}>\n {this.props.children}\n </span>\n </span>\n ) : (\n <span>{this.props.children}</span>\n )}\n {link}\n {close}\n </div>\n </ZIndex>\n </CommonWrapper>\n );\n };\n}\n"]}
1
+ {"version":3,"file":"ToastView.js","sourceRoot":"","sources":["ToastView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAuBlD;IAA+B,6BAA+B;IAA9D;;QAuBU,gBAAU,GAAG;YACb,IAAA,KAAsE,KAAI,CA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iB,CAAC;OACtB,SAAS,CAsHrB;IAAD,gBAAC;CAAA,AAtHD,CAA+B,KAAK,CAAC,SAAS,GAsH7C;SAtHY,SAAS","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\nimport type { AriaAttributes } from 'react';\nimport React from 'react';\n\nimport { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { ZIndex } from '../../internal/ZIndex/index.js';\nimport { locale } from '../../lib/locale/decorators.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport { isThemeGTE } from '../../lib/theming/ThemeHelpers.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { responsiveLayout } from '../ResponsiveLayout/decorator.js';\nimport type { ToastLocale } from './locale/index.js';\nimport { ToastLocaleHelper } from './locale/index.js';\nimport type { Action, ToastUse } from './Toast.js';\nimport { ToastDataTids } from './Toast.js';\nimport { getStyles } from './ToastView.styles.js';\n\nexport interface ToastViewProps extends Pick<AriaAttributes, 'aria-label'>, CommonProps {\n /** Отображает контент уведомления. */\n children?: React.ReactNode;\n /** Добавляет кнопку действия в тост. */\n action?: Nullable<Action>;\n /** Показывает кнопку закрытия рядом с текстом. */\n showCloseIcon?: boolean;\n /** Вызывается при закрытии тоста из разметки. */\n onClose?: () => void;\n /** Вызывается при наведении курсора на тост. */\n onMouseEnter?: () => void;\n /** Вызывается при уходе курсора с тоста. */\n onMouseLeave?: () => void;\n /** Выбирает стиль оформления: обычный или ошибка (`error`). */\n use?: ToastUse;\n}\n\n@responsiveLayout\n@withRenderEnvironment\n@rootNode\n@locale('Toast', ToastLocaleHelper)\nexport class ToastView extends React.Component<ToastViewProps> {\n private styles!: ReturnType<typeof getStyles>;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private theme!: Theme;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private readonly locale!: ToastLocale;\n private isMobileLayout!: boolean;\n\n public render(): React.JSX.Element {\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = () => {\n const { action, showCloseIcon, onClose, onMouseEnter, onMouseLeave, use } = this.props;\n\n const isTheme6_1 = isThemeGTE(this.theme, '6.1');\n\n const toastCloseColors =\n use === 'error'\n ? {\n hover: this.theme.toastCloseHoverColorError,\n default: this.theme.toastCloseColorError,\n }\n : {\n hover: this.theme.toastCloseHoverColor,\n default: this.theme.toastCloseColor,\n };\n\n const toastActionColorsClassName =\n use === 'error' ? this.styles.toastActionErrorColor(this.theme) : this.styles.toastActionDefaultColor(this.theme);\n const toastActionClassNames = this.cx(\n this.styles.link(this.theme),\n isTheme6_1 && this.styles.link6_1(this.theme),\n\n toastActionColorsClassName,\n );\n\n const link = action ? (\n <button\n aria-label={action['aria-label']}\n data-tid={ToastDataTids.action}\n className={toastActionClassNames}\n onClick={action.handler}\n >\n {action.label}\n </button>\n ) : null;\n\n const themeDependantProps = isTheme6_1\n ? {\n style: {\n height: '100%',\n },\n side: parseInt(this.theme.toastCloseBtnSide),\n }\n : { side: 40, size: parseInt(this.theme.toastCloseSize) };\n\n const close =\n action || showCloseIcon ? (\n <span className={this.cx(this.styles.closeWrapper(this.theme), isTheme6_1 && this.styles.closeWrapper6_1())}>\n <CloseButtonIcon\n aria-label={this.locale.closeButtonAriaLabel}\n data-tid={ToastDataTids.close}\n onClick={onClose}\n {...themeDependantProps}\n color={toastCloseColors.default}\n colorHover={toastCloseColors.hover}\n tabbable={false}\n />\n </span>\n ) : null;\n\n const rootClassName = this.cx(\n this.styles.root(this.theme),\n isTheme6_1 && this.styles.root6_1(this.theme),\n isTheme6_1 && this.isMobileLayout && this.styles.rootMobile(this.theme),\n this.styles[use ?? 'default'](this.theme),\n );\n\n const wrapperClassName = this.cx(this.styles.wrapper(this.theme), isTheme6_1 && this.styles.wrapper6_1(this.theme));\n\n return (\n <CommonWrapper {...this.props}>\n <ZIndex priority=\"Toast\" className={wrapperClassName}>\n <div\n data-tid={ToastDataTids.toastView}\n className={rootClassName}\n ref={this.setRootNode}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {isTheme6_1 ? (\n <span className={this.styles.content(this.theme)}>\n <span className={this.cx(this.isMobileLayout && this.styles.ellipsisContent())}>\n {this.props.children}\n </span>\n </span>\n ) : (\n <span>{this.props.children}</span>\n )}\n {link}\n {close}\n </div>\n </ZIndex>\n </CommonWrapper>\n );\n };\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { Theme } from '../../lib/theming/Theme.js';
2
2
  export declare const getStyles: import("../../lib/theming/Emotion.js").StylesGetter<{
3
3
  root(t: Theme): string;
4
- root6_1(): string;
4
+ root6_1(t: Theme): string;
5
5
  rootMobile(t: Theme): string;
6
6
  default(t: Theme): string;
7
7
  error(t: Theme): string;
@@ -15,8 +15,10 @@ export var getStyles = memoizeGetStyles(function (_a) {
15
15
  var _a = getVerticalPaddings(t), paddingTop = _a[0], paddingBottom = _a[1];
16
16
  return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: ", ";\n border: ", ";\n display: inline-flex;\n font-size: ", ";\n line-height: ", ";\n opacity: 1;\n padding: ", " ", " ", ";\n position: relative;\n top: ", ";\n "], ["\n border-radius: ", ";\n border: ", ";\n display: inline-flex;\n font-size: ", ";\n line-height: ", ";\n opacity: 1;\n padding: ", " ", " ", ";\n position: relative;\n top: ", ";\n "])), t.toastBorderRadius, t.toastBorder, t.toastFontSize, t.toastLineHeight, paddingTop, t.toastPaddingX, paddingBottom, t.toastTop);
17
17
  },
18
- root6_1: function () {
19
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0;\n "], ["\n padding: 0;\n "])));
18
+ root6_1: function (t) {
19
+ var _a = getVerticalPaddings(t), paddingTop = _a[0], paddingBottom = _a[1];
20
+ var minHeight = parseInt(paddingTop) + parseInt(paddingBottom) + parseInt(t.toastLineHeight);
21
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /*\n * \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 6.1 \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0434\u0434\u0438\u043D\u0433\u0438 \u043F\u0435\u0440\u0435\u0435\u0445\u0430\u043B\u0438 \u043D\u0430 \u043A\u043E\u043D\u0442\u0435\u043D\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0432\u044B\u0441\u043E\u0442\u0430 \u0442\u043E\u0441\u0442\u0430 \u0441\u0442\u0430\u043B\u0430\n * \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044C \u043E\u0442 \u043D\u0430\u043B\u0438\u0447\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043D\u0451\u043C. \u041A\u043E\u043D\u0442\u0435\u043D\u0442 \u0431\u0435\u0437 \u0441\u0442\u0440\u043E\u043A\u0438 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u0440\u043E\u0431\u0435\u043B) \u0441\u0445\u043B\u043E\u043F\u044B\u0432\u0430\u043B \u0442\u043E\u0441\u0442.\n */\n min-height: ", "px;\n padding: 0;\n "], ["\n /*\n * \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 6.1 \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0434\u0434\u0438\u043D\u0433\u0438 \u043F\u0435\u0440\u0435\u0435\u0445\u0430\u043B\u0438 \u043D\u0430 \u043A\u043E\u043D\u0442\u0435\u043D\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0432\u044B\u0441\u043E\u0442\u0430 \u0442\u043E\u0441\u0442\u0430 \u0441\u0442\u0430\u043B\u0430\n * \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044C \u043E\u0442 \u043D\u0430\u043B\u0438\u0447\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043D\u0451\u043C. \u041A\u043E\u043D\u0442\u0435\u043D\u0442 \u0431\u0435\u0437 \u0441\u0442\u0440\u043E\u043A\u0438 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u0440\u043E\u0431\u0435\u043B) \u0441\u0445\u043B\u043E\u043F\u044B\u0432\u0430\u043B \u0442\u043E\u0441\u0442.\n */\n min-height: ", "px;\n padding: 0;\n "])), minHeight);
20
22
  },
21
23
  rootMobile: function (t) {
22
24
  return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n top: ", ";\n font-size: ", ";\n "], ["\n top: ", ";\n font-size: ", ";\n "])), t.mobileToastTop, t.mobileToastFontSize);
@@ -1 +1 @@
1
- {"version":3,"file":"ToastView.styles.js","sourceRoot":"","sources":["ToastView.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,IAAM,mBAAmB,GAAG,UAAC,KAAY;IAC/B,IAAA,aAAa,GAAK,KAAK,cAAV,CAAW;IAChC,IAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEzC,OAAO,CAAC,UAAG,QAAQ,OAAI,EAAE,UAAG,QAAQ,OAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QAC/D,IAAI,YAAC,CAAQ;YACL,IAAA,KAA8B,mBAAmB,CAAC,CAAC,CAAC,EAAnD,UAAU,QA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CAAC;QAED,qBAAqB,YAAC,CAAQ;YAC5B,OAAO,GAAG,sQAAA,iBACC,EAAqB,4CAGd,EAAuB,8BAClB,EAA8B,sDAInC,EAAwB,oBAC7B,EAA2B,kBAEvC,KAXU,CAAC,CAAC,mBAAmB,EAGd,CAAC,CAAC,qBAAqB,EAClB,CAAC,CAAC,4BAA4B,EAInC,CAAC,CAAC,sBAAsB,EAC7B,CAAC,CAAC,yBAAyB,EAEtC;QACJ,CAAC;QAED,uBAAuB,YAAC,CAAQ;YAC9B,OAAO,GAAG,gPAAA,iBACC,EAAgB,4CAGT,EAAkB,8BACb,EAA8B,sDAInC,EAAmB,kBAEpC,KAVU,CAAC,CAAC,cAAc,EAGT,CAAC,CAAC,gBAAgB,EACb,CAAC,CAAC,4BAA4B,EAInC,CAAC,CAAC,iBAAiB,EAEnC;QACJ,CAAC;KACF,CAAC;AA5J8D,CA4J9D,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\n\nconst getVerticalPaddings = (theme: Theme) => {\n const { toastPaddingY } = theme;\n const paddingY = parseInt(toastPaddingY);\n\n return [`${paddingY}px`, `${paddingY}px`];\n};\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n border-radius: ${t.toastBorderRadius};\n border: ${t.toastBorder};\n display: inline-flex;\n font-size: ${t.toastFontSize};\n line-height: ${t.toastLineHeight};\n opacity: 1;\n padding: ${paddingTop} ${t.toastPaddingX} ${paddingBottom};\n position: relative;\n top: ${t.toastTop};\n `;\n },\n\n root6_1() {\n return css`\n padding: 0;\n `;\n },\n\n rootMobile(t: Theme) {\n return css`\n top: ${t.mobileToastTop};\n font-size: ${t.mobileToastFontSize};\n `;\n },\n\n default(t: Theme) {\n return css`\n background: ${t.toastBg};\n color: ${t.toastColor};\n `;\n },\n\n error(t: Theme) {\n return css`\n background: ${t.toastErrorBg};\n color: ${t.toastColorError};\n `;\n },\n\n wrapper(t: Theme) {\n return css`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n text-align: center;\n border-radius: ${t.toastBorderRadius};\n `;\n },\n\n wrapper6_1(t: Theme) {\n return css`\n padding: 0 ${t.toastPaddingX};\n `;\n },\n\n content(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n padding: ${paddingTop} ${t.toastPaddingX} ${paddingBottom};\n `;\n },\n\n ellipsisContent() {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: start;\n `;\n },\n\n closeWrapper(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n display: flex;\n margin: -${paddingTop} -${t.toastPaddingX} -${paddingBottom} 0;\n `;\n },\n\n closeWrapper6_1() {\n return css`\n margin: 0;\n `;\n },\n\n link(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n const padding = `${paddingTop} ${t.toastLinkPadding}`;\n\n return css`\n border: none;\n font: inherit;\n color: ${t.toastLinkColor};\n cursor: pointer;\n display: inline-block;\n font-weight: 600;\n background-color: transparent;\n\n margin: -${paddingTop} 0 -${paddingBottom} ${t.toastPaddingX};\n\n padding: ${padding};\n transition: background ${t.transitionDuration} ${t.transitionTimingFunction};\n &:hover {\n background: ${t.toastLinkBgHover};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n padding: ${padding};\n transition: background ${t.transitionDuration} ${t.transitionTimingFunction};\n `;\n },\n\n link6_1(t: Theme) {\n return css`\n margin: 0;\n padding: 0 ${t.toastLinkPadding};\n `;\n },\n\n toastActionErrorColor(t: Theme) {\n return css`\n color: ${t.toastLinkColorError};\n\n &:hover {\n background: ${t.toastLinkBgHoverError};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n\n &:active {\n background: ${t.toastLinkBgActiveError};\n color: ${t.toastLinkColorActiveError};\n }\n `;\n },\n\n toastActionDefaultColor(t: Theme) {\n return css`\n color: ${t.toastLinkColor};\n\n &:hover {\n background: ${t.toastLinkBgHover};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n\n &:active {\n background: ${t.toastLinkBgActive};\n }\n `;\n },\n}));\n"]}
1
+ {"version":3,"file":"ToastView.styles.js","sourceRoot":"","sources":["ToastView.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,IAAM,mBAAmB,GAAG,UAAC,KAAY;IAC/B,IAAA,aAAa,GAAK,KAAK,cAAV,CAAW;IAChC,IAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEzC,OAAO,CAAC,UAAG,QAAQ,OAAI,EAAE,UAAG,QAAQ,OAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QAC/D,IAAI,YAAC,CAAQ;YACL,IAAA,KAA8B,mBAAmB,CAAC,CAAC,CAAC,EAAnD,UAAU,QAAA,EAAE,aAAa,QAA0B,CAAC;YAC3D,OAAO,GAAG,2SAAA,yBACS,EAAmB,mBAC1B,EAAa,mDAEV,EAAe,wBACb,EAAiB,uCAErB,EAAU,GAAI,EAAe,GAAI,EAAa,2CAElD,EAAU,SAClB,KATkB,CAAC,CAAC,iBAAiB,EAC1B,CAAC,CAAC,WAAW,EAEV,CAAC,CAAC,aAAa,EACb,CAAC,CAAC,eAAe,EAErB,UAAU,EAAI,CAAC,CAAC,aAAa,EAAI,aAAa,EAElD,CAAC,CAAC,QAAQ,EACjB;QACJ,CAAC;QAED,OAAO,YAAC,CAAQ;YACR,IAAA,KAA8B,mBAAmB,CAAC,CAAC,CAAC,EAAnD,UAAU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CAAC,CAAC,qBAAqB,EAClB,CAAC,CAAC,4BAA4B,EAInC,CAAC,CAAC,sBAAsB,EAC7B,CAAC,CAAC,yBAAyB,EAEtC;QACJ,CAAC;QAED,uBAAuB,YAAC,CAAQ;YAC9B,OAAO,GAAG,gPAAA,iBACC,EAAgB,4CAGT,EAAkB,8BACb,EAA8B,sDAInC,EAAmB,kBAEpC,KAVU,CAAC,CAAC,cAAc,EAGT,CAAC,CAAC,gBAAgB,EACb,CAAC,CAAC,4BAA4B,EAInC,CAAC,CAAC,iBAAiB,EAEnC;QACJ,CAAC;KACF,CAAC;AApK8D,CAoK9D,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\n\nconst getVerticalPaddings = (theme: Theme) => {\n const { toastPaddingY } = theme;\n const paddingY = parseInt(toastPaddingY);\n\n return [`${paddingY}px`, `${paddingY}px`];\n};\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n border-radius: ${t.toastBorderRadius};\n border: ${t.toastBorder};\n display: inline-flex;\n font-size: ${t.toastFontSize};\n line-height: ${t.toastLineHeight};\n opacity: 1;\n padding: ${paddingTop} ${t.toastPaddingX} ${paddingBottom};\n position: relative;\n top: ${t.toastTop};\n `;\n },\n\n root6_1(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n const minHeight = parseInt(paddingTop) + parseInt(paddingBottom) + parseInt(t.toastLineHeight);\n\n return css`\n /*\n * В версии 6.1 вертикальные паддинги переехали на контент, поэтому высота тоста стала\n * зависеть от наличия строки в нём. Контент без строки (например, пробел) схлопывал тост.\n */\n min-height: ${minHeight}px;\n padding: 0;\n `;\n },\n\n rootMobile(t: Theme) {\n return css`\n top: ${t.mobileToastTop};\n font-size: ${t.mobileToastFontSize};\n `;\n },\n\n default(t: Theme) {\n return css`\n background: ${t.toastBg};\n color: ${t.toastColor};\n `;\n },\n\n error(t: Theme) {\n return css`\n background: ${t.toastErrorBg};\n color: ${t.toastColorError};\n `;\n },\n\n wrapper(t: Theme) {\n return css`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n text-align: center;\n border-radius: ${t.toastBorderRadius};\n `;\n },\n\n wrapper6_1(t: Theme) {\n return css`\n padding: 0 ${t.toastPaddingX};\n `;\n },\n\n content(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n padding: ${paddingTop} ${t.toastPaddingX} ${paddingBottom};\n `;\n },\n\n ellipsisContent() {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: start;\n `;\n },\n\n closeWrapper(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n return css`\n display: flex;\n margin: -${paddingTop} -${t.toastPaddingX} -${paddingBottom} 0;\n `;\n },\n\n closeWrapper6_1() {\n return css`\n margin: 0;\n `;\n },\n\n link(t: Theme) {\n const [paddingTop, paddingBottom] = getVerticalPaddings(t);\n const padding = `${paddingTop} ${t.toastLinkPadding}`;\n\n return css`\n border: none;\n font: inherit;\n color: ${t.toastLinkColor};\n cursor: pointer;\n display: inline-block;\n font-weight: 600;\n background-color: transparent;\n\n margin: -${paddingTop} 0 -${paddingBottom} ${t.toastPaddingX};\n\n padding: ${padding};\n transition: background ${t.transitionDuration} ${t.transitionTimingFunction};\n &:hover {\n background: ${t.toastLinkBgHover};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n padding: ${padding};\n transition: background ${t.transitionDuration} ${t.transitionTimingFunction};\n `;\n },\n\n link6_1(t: Theme) {\n return css`\n margin: 0;\n padding: 0 ${t.toastLinkPadding};\n `;\n },\n\n toastActionErrorColor(t: Theme) {\n return css`\n color: ${t.toastLinkColorError};\n\n &:hover {\n background: ${t.toastLinkBgHoverError};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n\n &:active {\n background: ${t.toastLinkBgActiveError};\n color: ${t.toastLinkColorActiveError};\n }\n `;\n },\n\n toastActionDefaultColor(t: Theme) {\n return css`\n color: ${t.toastLinkColor};\n\n &:hover {\n background: ${t.toastLinkBgHover};\n text-decoration: ${t.toastLinkTextDecorationHover};\n }\n\n &:active {\n background: ${t.toastLinkBgActive};\n }\n `;\n },\n}));\n"]}
@@ -2,6 +2,22 @@ import { isFocusable, tabbable } from 'tabbable';
2
2
  import { getOwnerGlobalObject } from '../../lib/globalObject.js';
3
3
  import { isInstanceOf } from '../../lib/isInstanceOf.js';
4
4
  import { isElement } from '../../lib/utils.js';
5
+ // `tabbable` >= 6.4.0 throws in old browsers (Chrome < 88, Firefox < 84) on the `:not([inert] *)` selector.
6
+ // Fallback list is `candidateSelectors` from tabbable 6.0.1 (no `:not([inert])` parts yet):
7
+ // https://github.com/focus-trap/tabbable/blob/v6.0.1/src/index.js
8
+ var FALLBACK_CANDIDATE_SELECTOR = [
9
+ 'input',
10
+ 'select',
11
+ 'textarea',
12
+ 'a[href]',
13
+ 'button',
14
+ '[tabindex]:not(slot)',
15
+ 'audio[controls]',
16
+ 'video[controls]',
17
+ '[contenteditable]:not([contenteditable="false"])',
18
+ 'details>summary:first-of-type',
19
+ 'details',
20
+ ].join(',');
5
21
  /**
6
22
  * Поиск всех элементов, у которых tabindex > -1, в переданном родителе
7
23
  * или на всей странице
@@ -16,7 +32,13 @@ export var getTabbableElements = function (parent) {
16
32
  if (!parent || !parent.children.length || !isInstanceOf(parent, getOwnerGlobalObject(parent).Element)) {
17
33
  return [];
18
34
  }
19
- return tabbable(parent);
35
+ try {
36
+ return tabbable(parent);
37
+ }
38
+ catch (_a) {
39
+ // `tabIndex >= 0` matches the value `disableChildrenFocus` saves and restores.
40
+ return Array.from(parent.querySelectorAll(FALLBACK_CANDIDATE_SELECTOR)).filter(function (element) { return element.tabIndex >= 0; });
41
+ }
20
42
  };
21
43
  /**
22
44
  * Поиск ближайшего фокусируемого элемента среди переданного и его родителей
@@ -1 +1 @@
1
- {"version":3,"file":"tabbableHelpers.js","sourceRoot":"","sources":["tabbableHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;;;;;GAMG;AAEH,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,MAAoC;IACtE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACtG,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF;;;;;GAKG;AAEH,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAC,OAA2B;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC,CAAC","sourcesContent":["import { isFocusable, tabbable } from 'tabbable';\nimport type { FocusableElement } from 'tabbable';\n\nimport { getOwnerGlobalObject } from '../../lib/globalObject.js';\nimport { isInstanceOf } from '../../lib/isInstanceOf.js';\nimport { isElement } from '../../lib/utils.js';\nimport type { Nullable } from '../../typings/utility-types.js';\n\n/**\n * Поиск всех элементов, у которых tabindex > -1, в переданном родителе\n * или на всей странице\n * @param {Element|Document|null} [parent=document] - Родительский элемент,\n * внутри которого осуществляется поиск.\n * @return {FocusableElement[]} - Массив найденных элементов\n */\n\nexport const getTabbableElements = (parent: Nullable<Element | Document>): FocusableElement[] => {\n if (!isElement(parent)) {\n return [];\n }\n\n if (!parent || !parent.children.length || !isInstanceOf(parent, getOwnerGlobalObject(parent).Element)) {\n return [];\n }\n return tabbable(parent);\n};\n\n/**\n * Поиск ближайшего фокусируемого элемента среди переданного и его родителей\n * @param {HTMLElement} current - Текущий элемент\n * @return {HTMLElement|null} - Найденный элемент или null\n *\n */\n\nexport const getClosestFocusableElement = (current: HTMLElement | null): HTMLElement | null => {\n if (!current) {\n return null;\n }\n\n return isFocusable(current) ? current : getClosestFocusableElement(current.parentElement);\n};\n"]}
1
+ {"version":3,"file":"tabbableHelpers.js","sourceRoot":"","sources":["tabbableHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,4GAA4G;AAC5G,4FAA4F;AAC5F,kEAAkE;AAClE,IAAM,2BAA2B,GAAG;IAClC,OAAO;IACP,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;IACR,sBAAsB;IACtB,iBAAiB;IACjB,iBAAiB;IACjB,kDAAkD;IAClD,+BAA+B;IAC/B,SAAS;CACV,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ;;;;;;GAMG;AAEH,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,MAAoC;IACtE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACtG,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAAC,WAAM,CAAC;QACP,+EAA+E;QAC/E,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CAAC,CAAC,MAAM,CAC5E,UAAC,OAAO,IAAkC,OAAC,OAAuB,CAAC,QAAQ,IAAI,CAAC,EAAtC,CAAsC,CACjF,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF;;;;;GAKG;AAEH,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAC,OAA2B;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC,CAAC","sourcesContent":["import { isFocusable, tabbable } from 'tabbable';\nimport type { FocusableElement } from 'tabbable';\n\nimport { getOwnerGlobalObject } from '../../lib/globalObject.js';\nimport { isInstanceOf } from '../../lib/isInstanceOf.js';\nimport { isElement } from '../../lib/utils.js';\nimport type { Nullable } from '../../typings/utility-types.js';\n\n// `tabbable` >= 6.4.0 throws in old browsers (Chrome < 88, Firefox < 84) on the `:not([inert] *)` selector.\n// Fallback list is `candidateSelectors` from tabbable 6.0.1 (no `:not([inert])` parts yet):\n// https://github.com/focus-trap/tabbable/blob/v6.0.1/src/index.js\nconst FALLBACK_CANDIDATE_SELECTOR = [\n 'input',\n 'select',\n 'textarea',\n 'a[href]',\n 'button',\n '[tabindex]:not(slot)',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n 'details>summary:first-of-type',\n 'details',\n].join(',');\n\n/**\n * Поиск всех элементов, у которых tabindex > -1, в переданном родителе\n * или на всей странице\n * @param {Element|Document|null} [parent=document] - Родительский элемент,\n * внутри которого осуществляется поиск.\n * @return {FocusableElement[]} - Массив найденных элементов\n */\n\nexport const getTabbableElements = (parent: Nullable<Element | Document>): FocusableElement[] => {\n if (!isElement(parent)) {\n return [];\n }\n\n if (!parent || !parent.children.length || !isInstanceOf(parent, getOwnerGlobalObject(parent).Element)) {\n return [];\n }\n\n try {\n return tabbable(parent);\n } catch {\n // `tabIndex >= 0` matches the value `disableChildrenFocus` saves and restores.\n return Array.from(parent.querySelectorAll(FALLBACK_CANDIDATE_SELECTOR)).filter(\n (element): element is FocusableElement => (element as HTMLElement).tabIndex >= 0,\n );\n }\n};\n\n/**\n * Поиск ближайшего фокусируемого элемента среди переданного и его родителей\n * @param {HTMLElement} current - Текущий элемент\n * @return {HTMLElement|null} - Найденный элемент или null\n *\n */\n\nexport const getClosestFocusableElement = (current: HTMLElement | null): HTMLElement | null => {\n if (!current) {\n return null;\n }\n\n return isFocusable(current) ? current : getClosestFocusableElement(current.parentElement);\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skbkontur/react-ui",
3
- "version": "6.5.2",
3
+ "version": "6.5.3",
4
4
  "description": "UI Components",
5
5
  "homepage": "https://tech.skbkontur.ru/kontur-ui",
6
6
  "bugs": {
@@ -251,7 +251,7 @@
251
251
  "release:unstable": "yarn release --tag=unstable",
252
252
  "storybook": "storybook dev -p 6060",
253
253
  "storybook:build": "cross-env STORYBOOK_REACT_UI_TEST=true storybook build -o .storybook/build --quiet",
254
- "storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true NODE_OPTIONS=--max-old-space-size=4096 storybook build --docs -c .storybook-docs -o .storybook/build --quiet && yarn docs:generate-ai",
254
+ "storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true NODE_OPTIONS=--max-old-space-size=2048 storybook build --docs -c .storybook-docs -o .storybook/build --quiet && yarn docs:generate-ai",
255
255
  "docs:generate-ai": "node scripts/generate-ai-docs.mts --strict",
256
256
  "storybook:test": "cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060",
257
257
  "storybook:docs": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs",