@skbkontur/react-ui 6.0.0-beta.0 → 6.0.0-beta.2

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,17 @@
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
+ ## [5.6.5](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.6.4...@skbkontur/react-ui@5.6.5) (2026-02-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Modal:** double scroll bars in mobile with panel footer ([a92b8ef](https://github.com/skbkontur/retail-ui/commit/a92b8ef35788f19b61b07522e20673a4c4cf1373))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [5.6.4](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.6.3...@skbkontur/react-ui@5.6.4) (2026-02-06)
7
18
 
8
19
 
@@ -24,9 +24,6 @@ export interface CheckboxProps extends CommonProps, Pick<AriaAttributes, 'aria-d
24
24
  onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;
25
25
  /** Задает функцию, вызывающуюся при изменении value. */
26
26
  onValueChange?: (value: boolean) => void;
27
- /** Задает HTML-событие `onclick`.
28
- * @ignore */
29
- onClick?: React.MouseEventHandler<HTMLLabelElement>;
30
27
  /** Задает HTML-событие `onblur`.
31
28
  * @ignore */
32
29
  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
@@ -101,5 +98,6 @@ export declare class Checkbox extends React.PureComponent<CheckboxProps, Checkbo
101
98
  private resetFocus;
102
99
  private handleBlur;
103
100
  private handleChange;
104
- private handleClick;
101
+ private handleLabelClick;
102
+ private handleInputClick;
105
103
  }
@@ -142,7 +142,7 @@ var Checkbox = /** @class */ (function (_super) {
142
142
  _a[_this.styles.rootDisableTextSelect()] = _this.state.isShiftPressed,
143
143
  _a[_this.styles.disabled(_this.theme)] = Boolean(_this.props.disabled),
144
144
  _a));
145
- var inputProps = __assign(__assign({}, rest), { type: 'checkbox', className: _this.styles.input(), onChange: _this.handleChange, onFocus: _this.handleFocus, onBlur: _this.handleBlur, ref: _this.input });
145
+ var inputProps = __assign(__assign({}, rest), { type: 'checkbox', className: _this.styles.input(), onChange: _this.handleChange, onFocus: _this.handleFocus, onBlur: _this.handleBlur, onClick: _this.handleInputClick, ref: _this.input });
146
146
  var caption = null;
147
147
  if (_this.props.children) {
148
148
  var captionClass = _this.cx((_b = {},
@@ -161,7 +161,7 @@ var Checkbox = /** @class */ (function (_super) {
161
161
  _d[_this.styles.boxWarning(_this.theme)] = _this.props.warning,
162
162
  _d[_this.styles.boxDisabled(_this.theme)] = _this.props.disabled,
163
163
  _d)) }, (isIndeterminate && IconSquare) || IconCheck)));
164
- return (React.createElement("label", { "data-tid": CheckboxDataTids.root, className: rootClass, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onClick: _this.handleClick },
164
+ return (React.createElement("label", { "data-tid": CheckboxDataTids.root, className: rootClass, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onClick: _this.handleLabelClick },
165
165
  React.createElement(FocusControlWrapper, { onBlurWhenDisabled: _this.resetFocus },
166
166
  React.createElement("input", __assign({}, inputProps, { "aria-label": ariaLabel, "aria-describedby": ariaDescribedby }))),
167
167
  box,
@@ -195,10 +195,15 @@ var Checkbox = /** @class */ (function (_super) {
195
195
  _this.resetIndeterminate();
196
196
  (_d = (_c = _this.props).onChange) === null || _d === void 0 ? void 0 : _d.call(_c, event);
197
197
  };
198
- _this.handleClick = function (e) {
199
- var _a, _b;
198
+ _this.handleLabelClick = function (e) {
200
199
  var handleModifierClickInFirefox = fixFirefoxModifiedClickOnLabel(_this.input);
201
200
  handleModifierClickInFirefox(e);
201
+ if (_this.props.onClick && e.target !== _this.input.current) {
202
+ e.stopPropagation();
203
+ }
204
+ };
205
+ _this.handleInputClick = function (e) {
206
+ var _a, _b;
202
207
  (_b = (_a = _this.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
203
208
  };
204
209
  return _this;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../components/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAsD3D,MAAM,CAAC,IAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,gBAAgB;CACd,CAAC;AAEX;;;;;GAKG;AAIH;IAA8B,4BAAiD;IAA/E;;QAwCS,WAAK,GAAG;YACb,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,KAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,KAAK;YACvD,cAAc,EAAE,KAAK;SACtB,CAAC;QAQM,WAAK,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;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,CAAC;IA/Ha,4BAAmB,GAAG,UAAU,AAAb,CAAc;IACjC,oBAAW,GAAG,UAAU,AAAb,CAAc;IAF5B,QAAQ;QAHpB,qBAAqB;QACrB,QAAQ;QACR,QAAQ;OACI,QAAQ,CAoSpB;IAAD,eAAC;CAAA,AApSD,CAA8B,KAAK,CAAC,aAAa,GAoShD;SApSY,QAAQ","sourcesContent":["import type { AriaAttributes } from 'react';\nimport React from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\n\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport type { Override } from '../../typings/utility-types.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { fixFirefoxModifiedClickOnLabel } from '../../lib/events/fixFirefoxModifiedClickOnLabel.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\n\nimport { getStyles, globalClasses } from './Checkbox.styles.js';\nimport { CheckedIcon } from './CheckedIcon.js';\nimport { IndeterminateIcon } from './IndeterminateIcon.js';\n\nexport interface CheckboxProps\n extends CommonProps,\n Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /** @ignore */\n children?: React.ReactNode;\n\n /** Переводит контрол в состояние валидации \"ошибка\". */\n error?: boolean;\n\n /** Переводит контрол в состояние валидации \"предупреждение\". */\n warning?: boolean;\n\n /** Задает размер. */\n size?: SizeProp;\n\n /** Задает HTML-событие `onmouseenter`.\n * @ignore */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает HTML-событие `onmouseleave`.\n * @ignore */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает HTML-событие `onmouseover`.\n * @ignore */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает функцию, вызывающуюся при изменении value. */\n onValueChange?: (value: boolean) => void;\n\n /** Задает HTML-событие `onclick`.\n * @ignore */\n onClick?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает HTML-событие `onblur`.\n * @ignore */\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\n /** Устанавливает начальное [неопределенное состояние чекбокса](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#attr-indeterminate). */\n initialIndeterminate?: boolean;\n }\n > {}\n\nexport interface CheckboxState {\n focusedByTab: boolean;\n indeterminate: boolean;\n isShiftPressed: boolean;\n}\n\nexport const CheckboxDataTids = {\n root: 'Checkbox__root',\n} as const;\n\n/**\n * `Checkbox` используется для управления параметром с двумя состояниями.\n *\n * Чекбокс не запускает действие немедленно. Как правило, для этого нужно нажать подтверждающую кнопку.\n * Для немедленного включения какого-то режима в интерфейсе лучше подходит Toggle.\n */\n@withRenderEnvironment\n@rootNode\n@withSize\nexport class Checkbox extends React.PureComponent<CheckboxProps, CheckboxState> {\n public static __KONTUR_REACT_UI__ = 'Checkbox';\n public static displayName = 'Checkbox';\n\n private getRootSizeClassName() {\n switch (this.size) {\n case 'large':\n return this.styles.rootLarge(this.theme);\n case 'medium':\n return this.styles.rootMedium(this.theme);\n case 'small':\n default:\n return this.styles.rootSmall(this.theme);\n }\n }\n\n private getBoxWrapperSizeClassName() {\n switch (this.size) {\n case 'large':\n return this.styles.boxWrapperLarge(this.theme);\n case 'medium':\n return this.styles.boxWrapperMedium(this.theme);\n case 'small':\n default:\n return this.styles.boxWrapperSmall(this.theme);\n }\n }\n\n private getCheckboxBoxSize() {\n switch (this.size) {\n case 'large':\n return this.theme.checkboxBoxSizeLarge;\n case 'medium':\n return this.theme.checkboxBoxSizeMedium;\n case 'small':\n default:\n return this.theme.checkboxBoxSizeSmall;\n }\n }\n\n public state = {\n focusedByTab: false,\n indeterminate: this.props.initialIndeterminate || false,\n isShiftPressed: false,\n };\n private size!: SizeProp;\n\n private globalObject!: GlobalObject;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private input = React.createRef<HTMLInputElement>();\n private getProps = createPropsGetter({});\n private keyListener!: KeyListener;\n\n private handleShiftPress = (e: KeyboardEvent) => {\n if (e.key === 'Shift') {\n this.setState(() => ({\n isShiftPressed: true,\n }));\n }\n };\n\n private handleShiftRelease = (e: KeyboardEvent) => {\n if (e.key === 'Shift') {\n this.setState({\n isShiftPressed: false,\n });\n }\n };\n\n public componentDidMount = () => {\n this.keyListener = new KeyListener(this.globalObject);\n if (this.state.indeterminate && this.input.current) {\n this.input.current.indeterminate = true;\n }\n\n this.globalObject.document?.addEventListener('keydown', this.handleShiftPress);\n this.globalObject.document?.addEventListener('keyup', this.handleShiftRelease);\n };\n\n public componentWillUnmount = () => {\n this.globalObject.document?.removeEventListener('keydown', this.handleShiftPress);\n this.globalObject.document?.removeEventListener('keyup', this.handleShiftRelease);\n };\n\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n public componentDidUpdate(prevProps: CheckboxProps) {\n if (prevProps.checked !== this.props.checked) {\n this.resetIndeterminate();\n }\n }\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 (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /**\n * Программная установка фокуса чекбоксу.\n * @public\n */\n public focus(): void {\n this.keyListener.isTabPressed = true;\n this.input.current?.focus();\n }\n\n /**\n * Программное снятие фокуса с чекбокса.\n * @public\n */\n public blur(): void {\n this.input.current?.blur();\n }\n\n /**\n * Устанавливает чекбокс в HTML-состояние `indeterminate`.\n * @public\n */\n public setIndeterminate = (): void => {\n this.setState({\n indeterminate: true,\n });\n if (this.input.current) {\n this.input.current.indeterminate = true;\n }\n };\n\n /**\n * Снимает с чекбокса HTML-состояние `indeterminate`.\n * @public\n */\n public resetIndeterminate = (): void => {\n this.setState({\n indeterminate: false,\n });\n if (this.input.current) {\n this.input.current.indeterminate = false;\n }\n };\n\n private renderMain = (props: CommonWrapperRestProps<CheckboxProps>) => {\n const {\n error,\n warning,\n size,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onValueChange,\n onClick,\n type,\n initialIndeterminate,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n ...rest\n } = props;\n const isIndeterminate = this.state.indeterminate;\n\n const iconClass = this.cx(\n this.styles.icon(),\n !this.props.checked && !isIndeterminate && this.styles.iconUnchecked(),\n );\n\n const iconSize = parseInt(this.getCheckboxBoxSize());\n const IconCheck = (\n <span className={iconClass}>\n <CheckedIcon size={iconSize} />\n </span>\n );\n const IconSquare = (\n <span className={iconClass}>\n <IndeterminateIcon size={iconSize} />\n </span>\n );\n\n const rootClass = this.cx(this.getRootSizeClassName(), {\n [this.styles.root(this.theme)]: true,\n [this.styles.rootChecked(this.theme)]: props.checked || isIndeterminate,\n [this.styles.rootDisableTextSelect()]: this.state.isShiftPressed,\n [this.styles.disabled(this.theme)]: Boolean(this.props.disabled),\n });\n\n const inputProps = {\n ...rest,\n type: 'checkbox',\n className: this.styles.input(),\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n ref: this.input,\n };\n\n let caption = null;\n if (this.props.children) {\n const captionClass = this.cx({\n [this.styles.caption(this.theme)]: true,\n [this.styles.disabled(this.theme)]: Boolean(props.disabled),\n });\n caption = <span className={captionClass}>{this.props.children}</span>;\n }\n\n const box = (\n <div\n className={this.cx(this.getBoxWrapperSizeClassName(), {\n [this.styles.boxWrapper(this.theme)]: true,\n })}\n >\n <div\n className={this.cx(this.styles.box(this.theme), globalClasses.box, {\n [this.styles.boxChecked(this.theme)]: this.props.checked || isIndeterminate,\n [this.styles.boxFocus(this.theme)]: this.state.focusedByTab,\n [this.styles.boxError(this.theme)]: this.props.error,\n [this.styles.boxWarning(this.theme)]: this.props.warning,\n [this.styles.boxDisabled(this.theme)]: this.props.disabled,\n })}\n >\n {(isIndeterminate && IconSquare) || IconCheck}\n </div>\n </div>\n );\n\n return (\n <label\n data-tid={CheckboxDataTids.root}\n className={rootClass}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n onClick={this.handleClick}\n >\n <FocusControlWrapper onBlurWhenDisabled={this.resetFocus}>\n <input {...inputProps} aria-label={ariaLabel} aria-describedby={ariaDescribedby} />\n </FocusControlWrapper>\n {box}\n {caption}\n </label>\n );\n };\n\n private handleFocus = (e: React.FocusEvent<any>) => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n }\n };\n\n private resetFocus = () => this.setState({ focusedByTab: false });\n\n private handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n this.resetFocus();\n this.props.onBlur?.(e);\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const checked = event.currentTarget.checked;\n this.props.onValueChange?.(checked);\n\n this.resetIndeterminate();\n\n this.props.onChange?.(event);\n };\n\n private handleClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n const handleModifierClickInFirefox = fixFirefoxModifiedClickOnLabel(this.input);\n handleModifierClickInFirefox(e);\n this.props.onClick?.(e);\n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AAC,KAAK,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,uBAAI,GAAX;;QACE,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,IAAI,EAAE,CAAC;IAC7B,CAAC;IA/Ha,4BAAmB,GAAG,UAAU,AAAb,CAAc;IACjC,oBAAW,GAAG,UAAU,AAAb,CAAc;IAF5B,QAAQ;QAHpB,qBAAqB;QACrB,QAAQ;QACR,QAAQ;OACI,QAAQ,CA2SpB;IAAD,eAAC;CAAA,AA3SD,CAA8B,KAAK,CAAC,aAAa,GA2ShD;SA3SY,QAAQ","sourcesContent":["import type { AriaAttributes } from 'react';\nimport React from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\n\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport type { Override } from '../../typings/utility-types.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { fixFirefoxModifiedClickOnLabel } from '../../lib/events/fixFirefoxModifiedClickOnLabel.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\n\nimport { getStyles, globalClasses } from './Checkbox.styles.js';\nimport { CheckedIcon } from './CheckedIcon.js';\nimport { IndeterminateIcon } from './IndeterminateIcon.js';\n\nexport interface CheckboxProps\n extends CommonProps,\n Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /** @ignore */\n children?: React.ReactNode;\n\n /** Переводит контрол в состояние валидации \"ошибка\". */\n error?: boolean;\n\n /** Переводит контрол в состояние валидации \"предупреждение\". */\n warning?: boolean;\n\n /** Задает размер. */\n size?: SizeProp;\n\n /** Задает HTML-событие `onmouseenter`.\n * @ignore */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает HTML-событие `onmouseleave`.\n * @ignore */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает HTML-событие `onmouseover`.\n * @ignore */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n\n /** Задает функцию, вызывающуюся при изменении value. */\n onValueChange?: (value: boolean) => void;\n\n /** Задает HTML-событие `onblur`.\n * @ignore */\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\n /** Устанавливает начальное [неопределенное состояние чекбокса](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#attr-indeterminate). */\n initialIndeterminate?: boolean;\n }\n > {}\n\nexport interface CheckboxState {\n focusedByTab: boolean;\n indeterminate: boolean;\n isShiftPressed: boolean;\n}\n\nexport const CheckboxDataTids = {\n root: 'Checkbox__root',\n} as const;\n\n/**\n * `Checkbox` используется для управления параметром с двумя состояниями.\n *\n * Чекбокс не запускает действие немедленно. Как правило, для этого нужно нажать подтверждающую кнопку.\n * Для немедленного включения какого-то режима в интерфейсе лучше подходит Toggle.\n */\n@withRenderEnvironment\n@rootNode\n@withSize\nexport class Checkbox extends React.PureComponent<CheckboxProps, CheckboxState> {\n public static __KONTUR_REACT_UI__ = 'Checkbox';\n public static displayName = 'Checkbox';\n\n private getRootSizeClassName() {\n switch (this.size) {\n case 'large':\n return this.styles.rootLarge(this.theme);\n case 'medium':\n return this.styles.rootMedium(this.theme);\n case 'small':\n default:\n return this.styles.rootSmall(this.theme);\n }\n }\n\n private getBoxWrapperSizeClassName() {\n switch (this.size) {\n case 'large':\n return this.styles.boxWrapperLarge(this.theme);\n case 'medium':\n return this.styles.boxWrapperMedium(this.theme);\n case 'small':\n default:\n return this.styles.boxWrapperSmall(this.theme);\n }\n }\n\n private getCheckboxBoxSize() {\n switch (this.size) {\n case 'large':\n return this.theme.checkboxBoxSizeLarge;\n case 'medium':\n return this.theme.checkboxBoxSizeMedium;\n case 'small':\n default:\n return this.theme.checkboxBoxSizeSmall;\n }\n }\n\n public state = {\n focusedByTab: false,\n indeterminate: this.props.initialIndeterminate || false,\n isShiftPressed: false,\n };\n private size!: SizeProp;\n\n private globalObject!: GlobalObject;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private input = React.createRef<HTMLInputElement>();\n private getProps = createPropsGetter({});\n private keyListener!: KeyListener;\n\n private handleShiftPress = (e: KeyboardEvent) => {\n if (e.key === 'Shift') {\n this.setState(() => ({\n isShiftPressed: true,\n }));\n }\n };\n\n private handleShiftRelease = (e: KeyboardEvent) => {\n if (e.key === 'Shift') {\n this.setState({\n isShiftPressed: false,\n });\n }\n };\n\n public componentDidMount = () => {\n this.keyListener = new KeyListener(this.globalObject);\n if (this.state.indeterminate && this.input.current) {\n this.input.current.indeterminate = true;\n }\n\n this.globalObject.document?.addEventListener('keydown', this.handleShiftPress);\n this.globalObject.document?.addEventListener('keyup', this.handleShiftRelease);\n };\n\n public componentWillUnmount = () => {\n this.globalObject.document?.removeEventListener('keydown', this.handleShiftPress);\n this.globalObject.document?.removeEventListener('keyup', this.handleShiftRelease);\n };\n\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n public componentDidUpdate(prevProps: CheckboxProps) {\n if (prevProps.checked !== this.props.checked) {\n this.resetIndeterminate();\n }\n }\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 (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /**\n * Программная установка фокуса чекбоксу.\n * @public\n */\n public focus(): void {\n this.keyListener.isTabPressed = true;\n this.input.current?.focus();\n }\n\n /**\n * Программное снятие фокуса с чекбокса.\n * @public\n */\n public blur(): void {\n this.input.current?.blur();\n }\n\n /**\n * Устанавливает чекбокс в HTML-состояние `indeterminate`.\n * @public\n */\n public setIndeterminate = (): void => {\n this.setState({\n indeterminate: true,\n });\n if (this.input.current) {\n this.input.current.indeterminate = true;\n }\n };\n\n /**\n * Снимает с чекбокса HTML-состояние `indeterminate`.\n * @public\n */\n public resetIndeterminate = (): void => {\n this.setState({\n indeterminate: false,\n });\n if (this.input.current) {\n this.input.current.indeterminate = false;\n }\n };\n\n private renderMain = (props: CommonWrapperRestProps<CheckboxProps>) => {\n const {\n error,\n warning,\n size,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onValueChange,\n onClick,\n type,\n initialIndeterminate,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n ...rest\n } = props;\n const isIndeterminate = this.state.indeterminate;\n\n const iconClass = this.cx(\n this.styles.icon(),\n !this.props.checked && !isIndeterminate && this.styles.iconUnchecked(),\n );\n\n const iconSize = parseInt(this.getCheckboxBoxSize());\n const IconCheck = (\n <span className={iconClass}>\n <CheckedIcon size={iconSize} />\n </span>\n );\n const IconSquare = (\n <span className={iconClass}>\n <IndeterminateIcon size={iconSize} />\n </span>\n );\n\n const rootClass = this.cx(this.getRootSizeClassName(), {\n [this.styles.root(this.theme)]: true,\n [this.styles.rootChecked(this.theme)]: props.checked || isIndeterminate,\n [this.styles.rootDisableTextSelect()]: this.state.isShiftPressed,\n [this.styles.disabled(this.theme)]: Boolean(this.props.disabled),\n });\n\n const inputProps = {\n ...rest,\n type: 'checkbox',\n className: this.styles.input(),\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n onClick: this.handleInputClick,\n ref: this.input,\n };\n\n let caption = null;\n if (this.props.children) {\n const captionClass = this.cx({\n [this.styles.caption(this.theme)]: true,\n [this.styles.disabled(this.theme)]: Boolean(props.disabled),\n });\n caption = <span className={captionClass}>{this.props.children}</span>;\n }\n\n const box = (\n <div\n className={this.cx(this.getBoxWrapperSizeClassName(), {\n [this.styles.boxWrapper(this.theme)]: true,\n })}\n >\n <div\n className={this.cx(this.styles.box(this.theme), globalClasses.box, {\n [this.styles.boxChecked(this.theme)]: this.props.checked || isIndeterminate,\n [this.styles.boxFocus(this.theme)]: this.state.focusedByTab,\n [this.styles.boxError(this.theme)]: this.props.error,\n [this.styles.boxWarning(this.theme)]: this.props.warning,\n [this.styles.boxDisabled(this.theme)]: this.props.disabled,\n })}\n >\n {(isIndeterminate && IconSquare) || IconCheck}\n </div>\n </div>\n );\n\n return (\n <label\n data-tid={CheckboxDataTids.root}\n className={rootClass}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n onClick={this.handleLabelClick}\n >\n <FocusControlWrapper onBlurWhenDisabled={this.resetFocus}>\n <input {...inputProps} aria-label={ariaLabel} aria-describedby={ariaDescribedby} />\n </FocusControlWrapper>\n {box}\n {caption}\n </label>\n );\n };\n\n private handleFocus = (e: React.FocusEvent<any>) => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n }\n };\n\n private resetFocus = () => this.setState({ focusedByTab: false });\n\n private handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n this.resetFocus();\n this.props.onBlur?.(e);\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const checked = event.currentTarget.checked;\n this.props.onValueChange?.(checked);\n\n this.resetIndeterminate();\n\n this.props.onChange?.(event);\n };\n\n private handleLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n const handleModifierClickInFirefox = fixFirefoxModifiedClickOnLabel(this.input);\n handleModifierClickInFirefox(e);\n if (this.props.onClick && e.target !== this.input.current) {\n e.stopPropagation();\n }\n };\n\n private handleInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\n this.props.onClick?.(e);\n };\n}\n"]}
@@ -39,7 +39,7 @@ export var getStyles = memoizeGetStyles(function (_a) {
39
39
  return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: relative;\n white-space: normal;\n margin: auto;\n box-shadow: ", ";\n background: ", ";\n border-radius: ", ";\n "], ["\n position: relative;\n white-space: normal;\n margin: auto;\n box-shadow: ", ";\n background: ", ";\n border-radius: ", ";\n "])), t.modalWindowShadow, t.modalBg, t.modalBorderRadius);
40
40
  },
41
41
  mobileWindow: function () {
42
- return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n overflow: auto;\n "], ["\n width: 100%;\n height: 100%;\n overflow: auto;\n "])));
42
+ return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n overflow: hidden;\n "], ["\n width: 100%;\n height: 100%;\n overflow: hidden;\n "])));
43
43
  },
44
44
  mobileWindowFullscreen: function () {
45
45
  return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n border-radius: 0;\n "], ["\n border-radius: 0;\n "])));
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../components/Modal/Modal.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,CAAC,IAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;CACvB,CAAC,CAAC;AA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'@emotion/css/create-instance';\n\nimport { memoizeGetStyles, prefix } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { resetButton } from '../../lib/styles/Mixins.js';\n\nexport const modalGlobalClasses = prefix('modal')({\n root: 'root',\n container: 'container',\n});\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root() {\n return css`\n height: 100%;\n left: 0;\n position: fixed;\n top: 0;\n width: 100%;\n `;\n },\n\n bg(t: Theme) {\n return css`\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n background: ${t.modalBackBg};\n opacity: ${t.modalBackOpacity};\n `;\n },\n\n container() {\n return css`\n position: relative;\n white-space: nowrap;\n text-align: center;\n height: 100%;\n min-height: 64px;\n overflow-y: auto;\n outline: none;\n `;\n },\n\n containerDesktop() {\n return css`\n &::before {\n content: '';\n display: inline-block;\n vertical-align: middle;\n height: 80%; /* to vertical align modal 40%/60% of screen height */\n }\n `;\n },\n\n mobileContainerFullscreen5_2() {\n return css`\n margin: 0;\n `;\n },\n\n mobileContainerSmall5_2() {\n return css`\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n `;\n },\n mobileContainerSmallTop5_2() {\n return css`\n align-content: start;\n `;\n },\n mobileContainerSmallBottom5_2() {\n return css`\n align-content: end;\n `;\n },\n\n window(t: Theme) {\n return css`\n position: relative;\n white-space: normal;\n margin: auto;\n box-shadow: ${t.modalWindowShadow};\n background: ${t.modalBg};\n border-radius: ${t.modalBorderRadius};\n `;\n },\n\n mobileWindow() {\n return css`\n width: 100%;\n height: 100%;\n overflow: auto;\n `;\n },\n\n mobileWindowFullscreen() {\n return css`\n border-radius: 0;\n `;\n },\n\n centerContainer() {\n return css`\n position: relative;\n display: inline-block;\n text-align: left;\n vertical-align: middle;\n box-sizing: border-box;\n z-index: 10;\n margin: 40px 20px;\n `;\n },\n\n mobileCenterContainer(t: Theme) {\n return css`\n padding: 0;\n width: calc(100% - ${t.mobileModalContainerMarginLeft} - ${t.mobileModalContainerMarginRight});\n display: inline-flex;\n margin: ${t.mobileModalContainerMarginTop} ${t.mobileModalContainerMarginRight}\n ${t.mobileModalContainerMarginBottom} ${t.mobileModalContainerMarginLeft};\n max-height: calc(100% - ${t.mobileModalContainerMarginTop} - ${t.mobileModalContainerMarginBottom});\n `;\n },\n\n mobileCenterContainerBig(t: Theme) {\n return css`\n height: calc(100% - ${t.mobileModalContainerMarginTop} - ${t.mobileModalContainerMarginBottom});\n `;\n },\n\n mobileCenterContainerFullscreen() {\n return css`\n margin: 0;\n width: 100%;\n height: 100%;\n max-height: 100%;\n `;\n },\n\n alignTop() {\n return css`\n vertical-align: top;\n `;\n },\n\n close(t: Theme) {\n return css`\n ${resetButton()};\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n right: ${t.modalCloseButtonClickAreaRight};\n top: ${t.modalCloseButtonClickAreaTop};\n background: transparent;\n cursor: pointer;\n color: ${t.modalCloseButtonColor};\n text-align: center;\n vertical-align: middle;\n padding-top: ${t.modalCloseButtonClickAreaTop};\n margin-top: -${t.modalCloseButtonClickAreaTop};\n padding-right: ${t.modalCloseButtonClickAreaRight};\n margin-right: -${t.modalCloseButtonClickAreaRight};\n padding-bottom: ${t.modalCloseButtonClickAreaBottom};\n margin-bottom: -${t.modalCloseButtonClickAreaBottom};\n padding-left: ${t.modalCloseButtonClickAreaLeft};\n margin-left: -${t.modalCloseButtonClickAreaLeft};\n\n &:hover {\n color: ${t.modalCloseButtonHoverColor};\n }\n\n & > svg {\n width: ${t.modalCloseIconSize};\n height: ${t.modalCloseIconSize};\n box-sizing: content-box;\n }\n `;\n },\n\n closeMobile(t: Theme) {\n return css`\n right: ${t.mobileModalCloseButtonRightPadding};\n top: ${t.mobileModalCloseButtonTopPadding};\n padding: ${t.mobileModalCloseButtonClickArea};\n margin: -${t.mobileModalCloseButtonClickArea};\n\n & > svg {\n width: ${t.mobileModalCloseIconSize};\n height: ${t.mobileModalCloseIconSize};\n }\n `;\n },\n\n mobileCloseWithoutHeader(t: Theme) {\n return css`\n position: absolute;\n padding: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n margin: -${t.mobileModalWithoutHeaderCloseButtonPadding};\n top: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n right: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n `;\n },\n\n closeWrapper(t: Theme) {\n const padding = parseInt(t.modalCloseButtonPadding);\n const paddingBottom = parseInt(t.modalCloseButtonBottomPadding);\n\n const blockSizeX = parseInt(t.modalCloseIconSize) + 2 * padding;\n const blockSizeY = parseInt(t.modalCloseIconSize) + padding + paddingBottom;\n return css`\n position: relative;\n float: right;\n width: ${blockSizeX}px;\n height: ${blockSizeY}px;\n `;\n },\n\n mobileCloseWrapper(t: Theme) {\n const size = parseInt(t.mobileModalCloseIconSize) + parseInt(t.mobileModalCloseButtonClickArea) * 2;\n\n return css`\n position: sticky;\n right: 0;\n top: 0;\n padding: 0;\n margin: 0;\n margin-left: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n width: ${t.mobileModalWithoutHeaderCloseButtonWidth};\n height: 0;\n background: radial-gradient(50% 50% at 50% 50%, ${t.bgDefault} 60%, rgba(255, 255, 255, 0) 100%);\n border-radius: ${size}px;\n `;\n },\n\n disabled(t: Theme) {\n return css`\n pointer-events: none;\n cursor: default;\n color: ${t.modalCloseButtonDisabledColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n &:before {\n content: '';\n position: absolute;\n width: calc(${t.modalCloseIconSize} * 2);\n height: calc(${t.modalCloseIconSize} * 2);\n box-shadow: inset 0 0 0 2px ${t.borderColorFocus};\n border-radius: 4px;\n }\n `;\n },\n\n header(t: Theme) {\n return css`\n font-size: ${t.modalHeaderFontSize};\n line-height: ${t.modalHeaderLineHeight};\n padding: ${t.modalHeaderPaddingTop} ${t.modalPaddingRight} ${t.modalHeaderPaddingBottom} ${t.modalPaddingLeft};\n overflow-wrap: break-word;\n word-wrap: break-word;\n color: ${t.modalHeaderTextColor};\n font-weight: ${t.modalHeaderFontWeight};\n border-radius: ${t.modalBorderRadius} ${t.modalBorderRadius} 0 0;\n `;\n },\n\n mobileHeader(t: Theme) {\n return css`\n position: relative;\n font-size: ${t.mobileModalHeaderFontSize};\n line-height: ${t.mobileModalHeaderLineHeight};\n padding: ${t.mobileModalHeaderPadding};\n `;\n },\n\n titleCut() {\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `;\n },\n\n body(t: Theme) {\n return css`\n border-radius: ${t.modalBodyBorderRadius};\n padding-top: ${t.modalBodyPaddingTop};\n padding-right: ${t.modalPaddingRight};\n padding-bottom: ${t.modalBodyPaddingBottom};\n padding-left: ${t.modalPaddingLeft};\n color: ${t.modalBodyTextColor};\n `;\n },\n\n mobileBody(t: Theme) {\n return css`\n padding: ${t.mobileModalBodyPadding};\n display: flex;\n flex-flow: column;\n flex: 1;\n font-size: ${t.mobileModalBodyFontSize};\n `;\n },\n\n headerWithClose(t: Theme) {\n const rightPadding = 2 * parseInt(t.modalCloseButtonPadding) + parseInt(t.modalCloseIconSize);\n\n return css`\n padding-right: ${rightPadding}px;\n `;\n },\n\n mobileHeaderWithClose(t: Theme) {\n return css`\n padding-right: ${2 * parseInt(t.mobileModalCloseButtonRightPadding) + parseInt(t.mobileModalCloseIconSize)}px;\n `;\n },\n\n footer(t: Theme) {\n return css`\n padding: ${t.modalFooterPaddingTop} ${t.modalPaddingRight} ${t.modalFooterPaddingBottom} ${t.modalPaddingLeft};\n color: ${t.modalFooterTextColor};\n border-radius: 0 0 ${t.modalBorderRadius} ${t.modalBorderRadius};\n `;\n },\n\n mobileFooter(t: Theme) {\n return css`\n padding: ${t.mobileModalFooterPadding};\n `;\n },\n\n panel(t: Theme) {\n return css`\n padding-top: ${t.modalFooterPanelPaddingTop};\n padding-bottom: ${t.modalFooterPanelPaddingBottom};\n background: ${t.modalFooterBg};\n `;\n },\n\n fixedHeader(t: Theme) {\n return css`\n margin-bottom: ${t.modalFixedHeaderMarginBottom};\n padding-bottom: ${t.modalFixedHeaderPaddingBottom};\n background: ${t.modalFixedHeaderBg};\n border-bottom: ${t.modalFixedHeaderBorder};\n border-radius: 0;\n\n &:after {\n bottom: 11px;\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n left: 0;\n z-index: -1;\n box-shadow: ${t.modalFixedHeaderShadow};\n }\n `;\n },\n\n mobileFixedHeader(t: Theme) {\n return css`\n padding-bottom: ${t.mobileModalHeaderPadding};\n border-radius: ${t.modalBorderRadius} ${t.modalBorderRadius} 0 0;\n `;\n },\n\n fixedFooter(t: Theme) {\n return css`\n padding-top: ${t.modalFixedFooterPaddingTop};\n margin-top: ${t.modalFixedFooterMarginTop};\n background: ${t.modalFixedHeaderBg};\n border-top: ${t.modalFixedFooterBorder};\n border-radius: 0;\n\n &:before {\n top: 11px;\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n left: 0;\n z-index: -1;\n box-shadow: ${t.modalFixedFooterShadow};\n }\n `;\n },\n\n mobileFixedFooter(t: Theme) {\n return css`\n border-radius: 0 0 ${t.modalBorderRadius} ${t.modalBorderRadius};\n `;\n },\n\n fixedPanel(t: Theme) {\n return css`\n &:before {\n box-shadow: ${t.modalFixedPanelShadow};\n }\n `;\n },\n\n headerAddPadding(t: Theme) {\n return css`\n padding-bottom: ${t.modalHeaderAdditionalPaddingBottom};\n `;\n },\n\n bodyWithoutHeader(t: Theme) {\n return css`\n padding-top: ${t.modalPaddingTop};\n `;\n },\n\n mobileBodyWithoutHeader(t: Theme) {\n return css`\n padding-top: ${t.mobileModalBodyPaddingTop};\n padding-right: ${t.mobileModalWithoutHeaderCloseButtonWidth};\n `;\n },\n\n bodyWithoutPadding() {\n return css`\n padding: 0;\n `;\n },\n\n bodyAddPaddingForPanel(t: Theme) {\n return css`\n padding-bottom: ${t.modalPaddingBottom};\n `;\n },\n\n mobileBodyAddPaddingForPanel(t: Theme) {\n return css`\n padding: ${t.mobileModalBodyPadding};\n padding-bottom: ${t.mobileModalBodyPaddingBottom};\n `;\n },\n\n columnFlexContainer() {\n return css`\n height: 100%;\n display: flex;\n flex-flow: column;\n overflow-y: auto;\n `;\n },\n\n modalSeparatorWrapper() {\n return css`\n position: absolute;\n width: 100%;\n `;\n },\n\n modalSeparator(t: Theme) {\n return css`\n border-bottom: ${t.modalSeparatorBorderBottom};\n margin: ${t.modalSeparatorMargin};\n transition: margin 0.3s;\n `;\n },\n\n modalSeparatorFixed(t: Theme) {\n return css`\n margin: ${t.modalSeparatorFixedMargin};\n `;\n },\n}));\n"]}
1
+ {"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../components/Modal/Modal.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,CAAC,IAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,SAAS,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QAC/D,IAAI;YACF,OAAO,GAAG,2KAAA,wGAMT,KAAC;QACJ,CAAC;QAED,EAAE,YAAC,CAAQ;YACT,OAAO,GAAG,uNAAA,mHAMM,EAAa,oBAChB,EAAkB,SAC9B,KAFe,CAAC,CAAC,WAAW,EAChB,CAAC,CAAC,gBAAgB,EAC7B;QACJ,CAAC;QAED,SAAS;YACP,OAAO,GAAG,0PAAA,uLAQT,KAAC;QACJ,CAAC;QAED,gBAAgB;YACd,OAAO,GAAG,2QAAA,wMAOT,KAAC;QACJ,CAAC;QAED,4BAA4B;YAC1B,OAAO,GAAG,6FAAA,0BAET,KAAC;QACJ,CAAC;QAED,uBAAuB;YACrB,OAAO,GAAG,yKAAA,sGAKT,KAAC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0BACU,EAAoB,SACvC,KADmB,CAAC,CAAC,kBAAkB,EACtC;QACJ,CAAC;QAED,4BAA4B,YAAC,CAAQ;YACnC,OAAO,GAAG,gIAAA,mBACG,EAAwB,2BACjB,EAA8B,SACjD,KAFY,CAAC,CAAC,sBAAsB,EACjB,CAAC,CAAC,4BAA4B,EAChD;QACJ,CAAC;QAED,mBAAmB;YACjB,OAAO,GAAG,2KAAA,sGAKT,KAAC;QACJ,CAAC;QAED,qBAAqB;YACnB,OAAO,GAAG,4HAAA,uDAGT,KAAC;QACJ,CAAC;QAED,cAAc,YAAC,CAAQ;YACrB,OAAO,GAAG,8JAAA,yBACS,EAA4B,mBACnC,EAAsB,yCAEjC,KAHkB,CAAC,CAAC,0BAA0B,EACnC,CAAC,CAAC,oBAAoB,EAEhC;QACJ,CAAC;QAED,mBAAmB,YAAC,CAAQ;YAC1B,OAAO,GAAG,kGAAA,kBACE,EAA2B,SACtC,KADW,CAAC,CAAC,yBAAyB,EACrC;QACJ,CAAC;KACF,CAAC;AAvd8D,CAud9D,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles, prefix } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { resetButton } from '../../lib/styles/Mixins.js';\n\nexport const modalGlobalClasses = prefix('modal')({\n root: 'root',\n container: 'container',\n});\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root() {\n return css`\n height: 100%;\n left: 0;\n position: fixed;\n top: 0;\n width: 100%;\n `;\n },\n\n bg(t: Theme) {\n return css`\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n background: ${t.modalBackBg};\n opacity: ${t.modalBackOpacity};\n `;\n },\n\n container() {\n return css`\n position: relative;\n white-space: nowrap;\n text-align: center;\n height: 100%;\n min-height: 64px;\n overflow-y: auto;\n outline: none;\n `;\n },\n\n containerDesktop() {\n return css`\n &::before {\n content: '';\n display: inline-block;\n vertical-align: middle;\n height: 80%; /* to vertical align modal 40%/60% of screen height */\n }\n `;\n },\n\n mobileContainerFullscreen5_2() {\n return css`\n margin: 0;\n `;\n },\n\n mobileContainerSmall5_2() {\n return css`\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n `;\n },\n mobileContainerSmallTop5_2() {\n return css`\n align-content: start;\n `;\n },\n mobileContainerSmallBottom5_2() {\n return css`\n align-content: end;\n `;\n },\n\n window(t: Theme) {\n return css`\n position: relative;\n white-space: normal;\n margin: auto;\n box-shadow: ${t.modalWindowShadow};\n background: ${t.modalBg};\n border-radius: ${t.modalBorderRadius};\n `;\n },\n\n mobileWindow() {\n return css`\n width: 100%;\n height: 100%;\n overflow: hidden;\n `;\n },\n\n mobileWindowFullscreen() {\n return css`\n border-radius: 0;\n `;\n },\n\n centerContainer() {\n return css`\n position: relative;\n display: inline-block;\n text-align: left;\n vertical-align: middle;\n box-sizing: border-box;\n z-index: 10;\n margin: 40px 20px;\n `;\n },\n\n mobileCenterContainer(t: Theme) {\n return css`\n padding: 0;\n width: calc(100% - ${t.mobileModalContainerMarginLeft} - ${t.mobileModalContainerMarginRight});\n display: inline-flex;\n margin: ${t.mobileModalContainerMarginTop} ${t.mobileModalContainerMarginRight}\n ${t.mobileModalContainerMarginBottom} ${t.mobileModalContainerMarginLeft};\n max-height: calc(100% - ${t.mobileModalContainerMarginTop} - ${t.mobileModalContainerMarginBottom});\n `;\n },\n\n mobileCenterContainerBig(t: Theme) {\n return css`\n height: calc(100% - ${t.mobileModalContainerMarginTop} - ${t.mobileModalContainerMarginBottom});\n `;\n },\n\n mobileCenterContainerFullscreen() {\n return css`\n margin: 0;\n width: 100%;\n height: 100%;\n max-height: 100%;\n `;\n },\n\n alignTop() {\n return css`\n vertical-align: top;\n `;\n },\n\n close(t: Theme) {\n return css`\n ${resetButton()};\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n right: ${t.modalCloseButtonClickAreaRight};\n top: ${t.modalCloseButtonClickAreaTop};\n background: transparent;\n cursor: pointer;\n color: ${t.modalCloseButtonColor};\n text-align: center;\n vertical-align: middle;\n padding-top: ${t.modalCloseButtonClickAreaTop};\n margin-top: -${t.modalCloseButtonClickAreaTop};\n padding-right: ${t.modalCloseButtonClickAreaRight};\n margin-right: -${t.modalCloseButtonClickAreaRight};\n padding-bottom: ${t.modalCloseButtonClickAreaBottom};\n margin-bottom: -${t.modalCloseButtonClickAreaBottom};\n padding-left: ${t.modalCloseButtonClickAreaLeft};\n margin-left: -${t.modalCloseButtonClickAreaLeft};\n\n &:hover {\n color: ${t.modalCloseButtonHoverColor};\n }\n\n & > svg {\n width: ${t.modalCloseIconSize};\n height: ${t.modalCloseIconSize};\n box-sizing: content-box;\n }\n `;\n },\n\n closeMobile(t: Theme) {\n return css`\n right: ${t.mobileModalCloseButtonRightPadding};\n top: ${t.mobileModalCloseButtonTopPadding};\n padding: ${t.mobileModalCloseButtonClickArea};\n margin: -${t.mobileModalCloseButtonClickArea};\n\n & > svg {\n width: ${t.mobileModalCloseIconSize};\n height: ${t.mobileModalCloseIconSize};\n }\n `;\n },\n\n mobileCloseWithoutHeader(t: Theme) {\n return css`\n position: absolute;\n padding: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n margin: -${t.mobileModalWithoutHeaderCloseButtonPadding};\n top: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n right: ${t.mobileModalWithoutHeaderCloseButtonPadding};\n `;\n },\n\n closeWrapper(t: Theme) {\n const padding = parseInt(t.modalCloseButtonPadding);\n const paddingBottom = parseInt(t.modalCloseButtonBottomPadding);\n\n const blockSizeX = parseInt(t.modalCloseIconSize) + 2 * padding;\n const blockSizeY = parseInt(t.modalCloseIconSize) + padding + paddingBottom;\n return css`\n position: relative;\n float: right;\n width: ${blockSizeX}px;\n height: ${blockSizeY}px;\n `;\n },\n\n mobileCloseWrapper(t: Theme) {\n const size = parseInt(t.mobileModalCloseIconSize) + parseInt(t.mobileModalCloseButtonClickArea) * 2;\n\n return css`\n position: sticky;\n right: 0;\n top: 0;\n padding: 0;\n margin: 0;\n margin-left: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n width: ${t.mobileModalWithoutHeaderCloseButtonWidth};\n height: 0;\n background: radial-gradient(50% 50% at 50% 50%, ${t.bgDefault} 60%, rgba(255, 255, 255, 0) 100%);\n border-radius: ${size}px;\n `;\n },\n\n disabled(t: Theme) {\n return css`\n pointer-events: none;\n cursor: default;\n color: ${t.modalCloseButtonDisabledColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n &:before {\n content: '';\n position: absolute;\n width: calc(${t.modalCloseIconSize} * 2);\n height: calc(${t.modalCloseIconSize} * 2);\n box-shadow: inset 0 0 0 2px ${t.borderColorFocus};\n border-radius: 4px;\n }\n `;\n },\n\n header(t: Theme) {\n return css`\n font-size: ${t.modalHeaderFontSize};\n line-height: ${t.modalHeaderLineHeight};\n padding: ${t.modalHeaderPaddingTop} ${t.modalPaddingRight} ${t.modalHeaderPaddingBottom} ${t.modalPaddingLeft};\n overflow-wrap: break-word;\n word-wrap: break-word;\n color: ${t.modalHeaderTextColor};\n font-weight: ${t.modalHeaderFontWeight};\n border-radius: ${t.modalBorderRadius} ${t.modalBorderRadius} 0 0;\n `;\n },\n\n mobileHeader(t: Theme) {\n return css`\n position: relative;\n font-size: ${t.mobileModalHeaderFontSize};\n line-height: ${t.mobileModalHeaderLineHeight};\n padding: ${t.mobileModalHeaderPadding};\n `;\n },\n\n titleCut() {\n return css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `;\n },\n\n body(t: Theme) {\n return css`\n border-radius: ${t.modalBodyBorderRadius};\n padding-top: ${t.modalBodyPaddingTop};\n padding-right: ${t.modalPaddingRight};\n padding-bottom: ${t.modalBodyPaddingBottom};\n padding-left: ${t.modalPaddingLeft};\n color: ${t.modalBodyTextColor};\n `;\n },\n\n mobileBody(t: Theme) {\n return css`\n padding: ${t.mobileModalBodyPadding};\n display: flex;\n flex-flow: column;\n flex: 1;\n font-size: ${t.mobileModalBodyFontSize};\n `;\n },\n\n headerWithClose(t: Theme) {\n const rightPadding = 2 * parseInt(t.modalCloseButtonPadding) + parseInt(t.modalCloseIconSize);\n\n return css`\n padding-right: ${rightPadding}px;\n `;\n },\n\n mobileHeaderWithClose(t: Theme) {\n return css`\n padding-right: ${2 * parseInt(t.mobileModalCloseButtonRightPadding) + parseInt(t.mobileModalCloseIconSize)}px;\n `;\n },\n\n footer(t: Theme) {\n return css`\n padding: ${t.modalFooterPaddingTop} ${t.modalPaddingRight} ${t.modalFooterPaddingBottom} ${t.modalPaddingLeft};\n color: ${t.modalFooterTextColor};\n border-radius: 0 0 ${t.modalBorderRadius} ${t.modalBorderRadius};\n `;\n },\n\n mobileFooter(t: Theme) {\n return css`\n padding: ${t.mobileModalFooterPadding};\n `;\n },\n\n panel(t: Theme) {\n return css`\n padding-top: ${t.modalFooterPanelPaddingTop};\n padding-bottom: ${t.modalFooterPanelPaddingBottom};\n background: ${t.modalFooterBg};\n `;\n },\n\n fixedHeader(t: Theme) {\n return css`\n margin-bottom: ${t.modalFixedHeaderMarginBottom};\n padding-bottom: ${t.modalFixedHeaderPaddingBottom};\n background: ${t.modalFixedHeaderBg};\n border-bottom: ${t.modalFixedHeaderBorder};\n border-radius: 0;\n\n &:after {\n bottom: 11px;\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n left: 0;\n z-index: -1;\n box-shadow: ${t.modalFixedHeaderShadow};\n }\n `;\n },\n\n mobileFixedHeader(t: Theme) {\n return css`\n padding-bottom: ${t.mobileModalHeaderPadding};\n border-radius: ${t.modalBorderRadius} ${t.modalBorderRadius} 0 0;\n `;\n },\n\n fixedFooter(t: Theme) {\n return css`\n padding-top: ${t.modalFixedFooterPaddingTop};\n margin-top: ${t.modalFixedFooterMarginTop};\n background: ${t.modalFixedHeaderBg};\n border-top: ${t.modalFixedFooterBorder};\n border-radius: 0;\n\n &:before {\n top: 11px;\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n left: 0;\n z-index: -1;\n box-shadow: ${t.modalFixedFooterShadow};\n }\n `;\n },\n\n mobileFixedFooter(t: Theme) {\n return css`\n border-radius: 0 0 ${t.modalBorderRadius} ${t.modalBorderRadius};\n `;\n },\n\n fixedPanel(t: Theme) {\n return css`\n &:before {\n box-shadow: ${t.modalFixedPanelShadow};\n }\n `;\n },\n\n headerAddPadding(t: Theme) {\n return css`\n padding-bottom: ${t.modalHeaderAdditionalPaddingBottom};\n `;\n },\n\n bodyWithoutHeader(t: Theme) {\n return css`\n padding-top: ${t.modalPaddingTop};\n `;\n },\n\n mobileBodyWithoutHeader(t: Theme) {\n return css`\n padding-top: ${t.mobileModalBodyPaddingTop};\n padding-right: ${t.mobileModalWithoutHeaderCloseButtonWidth};\n `;\n },\n\n bodyWithoutPadding() {\n return css`\n padding: 0;\n `;\n },\n\n bodyAddPaddingForPanel(t: Theme) {\n return css`\n padding-bottom: ${t.modalPaddingBottom};\n `;\n },\n\n mobileBodyAddPaddingForPanel(t: Theme) {\n return css`\n padding: ${t.mobileModalBodyPadding};\n padding-bottom: ${t.mobileModalBodyPaddingBottom};\n `;\n },\n\n columnFlexContainer() {\n return css`\n height: 100%;\n display: flex;\n flex-flow: column;\n overflow-y: auto;\n `;\n },\n\n modalSeparatorWrapper() {\n return css`\n position: absolute;\n width: 100%;\n `;\n },\n\n modalSeparator(t: Theme) {\n return css`\n border-bottom: ${t.modalSeparatorBorderBottom};\n margin: ${t.modalSeparatorMargin};\n transition: margin 0.3s;\n `;\n },\n\n modalSeparatorFixed(t: Theme) {\n return css`\n margin: ${t.modalSeparatorFixedMargin};\n `;\n },\n}));\n"]}
@@ -27,8 +27,7 @@ export interface PagingProps extends CommonProps {
27
27
  /** Задает общее количество страниц. */
28
28
  pagesCount: number;
29
29
  /** Задает размер контрола.
30
- * @default 'small'
31
- */
30
+ * @default 'small'. Проп поддерживается начиная с версии темы 5.3. */
32
31
  size?: SizeProp;
33
32
  /** Делает компонент недоступным. */
34
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;QACrB,QAAQ;QACR,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC;OACxB,MAAM,CAmdlB;IAAD,aAAC;CAAA,AAndD,CAA4B,KAAK,CAAC,aAAa,GAmd9C;SAndY,MAAM","sourcesContent":["import React, { type JSX } from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\nimport warning from 'warning';\n\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport { isInstanceOf } from '../../lib/isInstanceOf.js';\nimport { isKeyArrowLeft, isKeyArrowRight, isKeyEnter } from '../../lib/events/keyboard/identifiers.js';\nimport { locale } from '../../lib/locale/decorators.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport { emptyHandler } from '../../lib/utils.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes.js';\nimport { ResponsiveLayout } from '../ResponsiveLayout/index.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\n\nimport { getStyles } from './Paging.styles.js';\nimport * as NavigationHelper from './NavigationHelper.js';\nimport { getItems } from './PagingHelper.js';\nimport type { PagingLocale } from './locale/index.js';\nimport { PagingLocaleHelper } from './locale/index.js';\nimport { PagingDefaultComponent } from './PagingDefaultComponent.js';\nimport { ForwardIcon, ForwardIconMobile } from './ForwardIcon.js';\nimport { DotsIcon } from './DotsIcon.js';\n\nconst IGNORE_EVENT_TAGS = ['input', 'textarea'];\n\nexport interface ItemComponentProps {\n /** Определяет, является ли страница текущей. */\n active: boolean;\n\n /** @ignore */\n children?: React.ReactNode;\n\n /** Задает HTML-атрибут class. */\n className: string;\n\n /** Задает функцию, которая вызывается при клике на элемент. */\n onClick: () => void;\n\n /** Задает номер текущей страницы. */\n pageNumber: number | 'forward';\n\n /** Задает HTML-атрибут `tabindex`. */\n tabIndex: number;\n}\n\nexport interface PagingProps extends CommonProps {\n activePage: number;\n\n /** Компонент обертки по умолчанию.\n * @default <span/> */\n component?: React.ComponentType<ItemComponentProps>;\n\n /** Задает функцию, которая вызывается при переключении страницы. */\n onPageChange: (pageNumber: number) => void;\n\n /** Задает общее количество страниц. */\n pagesCount: number;\n\n /** Задает размер контрола.\n * @default 'small'\n */\n size?: SizeProp;\n\n /** Делает компонент недоступным. */\n disabled?: boolean;\n\n /** Отключает навигационные подсказки.\n * По-умолчанию подсказки появляются, когда доступно управление с клавиатуры (либо элемент в фокусе, либо globalListeners === true). */\n withoutNavigationHint?: boolean;\n\n /** Задает подпить у пейджинга. */\n caption?: string;\n\n /** Глобальный слушатель **keyDown**, для навигации клавишами без фокуса на компоненте.\n * Если на странице используется несколько элементов **Paging** с useGlobalListener === true,\n * то обработчик keyDown будет вызываться на каждом из них. Такие случаи лучше обрабатывать отдельно. */\n useGlobalListener?: boolean;\n}\n\nexport interface PagingState {\n focusedByTab: boolean;\n focusedItem: Nullable<ItemType>;\n keyboardControl: boolean;\n}\n\nexport type ItemType = number | '.' | 'forward';\n\nexport const PagingDataTids = {\n root: 'Paging__root',\n dots: 'Paging__dots',\n forwardLink: 'Paging__forwardLink',\n pageLinkWrapper: 'Paging__pageLinkWrapper',\n pageLink: 'Paging__pageLink',\n} as const;\n\ntype DefaultProps = Required<Pick<PagingProps, 'component' | 'useGlobalListener'>>;\n\ninterface PagingSizeClassNames {\n root: string;\n dots: string;\n forwardLink: string;\n pageLink: string;\n}\n\n/**\n * Постраничная навигация `Paging` (пейджинг или пагинация) — способ представления большого количества однородной информации, когда контент разбивается на страницы.\n */\n@withRenderEnvironment\n@rootNode\n@locale('Paging', PagingLocaleHelper)\nexport class Paging extends React.PureComponent<PagingProps, PagingState> {\n public static __KONTUR_REACT_UI__ = 'Paging';\n public static displayName = 'Paging';\n\n public static defaultProps: DefaultProps = {\n component: PagingDefaultComponent,\n useGlobalListener: false,\n };\n\n private getProps = createPropsGetter(Paging.defaultProps);\n\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n public static isForward(pageNumber: number | 'forward'): boolean {\n return pageNumber === 'forward';\n }\n\n public state: PagingState = {\n focusedByTab: false,\n focusedItem: null,\n keyboardControl: this.getProps().useGlobalListener,\n };\n\n private globalObject!: GlobalObject;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private readonly locale!: PagingLocale;\n private isMobile!: boolean;\n private sizeClassNames!: PagingSizeClassNames;\n private addedGlobalListener = false;\n private container: HTMLSpanElement | null = null;\n private keyListener!: KeyListener;\n\n public componentDidMount() {\n this.keyListener = new KeyListener(this.globalObject);\n const useGlobalListener = this.getProps().useGlobalListener;\n if (useGlobalListener) {\n this.addGlobalListener();\n }\n }\n\n public componentDidUpdate(prevProps: PagingProps) {\n const useGlobalListener = this.getProps().useGlobalListener;\n if (!prevProps.useGlobalListener && useGlobalListener) {\n this.addGlobalListener();\n }\n\n if (prevProps.useGlobalListener && !useGlobalListener) {\n this.removeGlobalListener();\n }\n\n if (prevProps.useGlobalListener !== useGlobalListener) {\n this.setState({\n keyboardControl: useGlobalListener,\n });\n }\n }\n\n public componentWillUnmount() {\n this.removeGlobalListener();\n }\n\n public render(): React.JSX.Element | null {\n if (this.props.pagesCount < 2) {\n return null;\n }\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <ResponsiveLayout>\n {({ isMobile }) => {\n this.isMobile = isMobile;\n this.sizeClassNames = this.getPagingSizeClassNames();\n return this.renderMain();\n }}\n </ResponsiveLayout>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { useGlobalListener } = this.getProps();\n return (\n <CommonWrapper\n rootNodeRef={this.setRootNode}\n {...this.props}\n {...getVisualStateDataAttributes({ disabled: this.props.disabled })}\n >\n <span\n tabIndex={this.props.disabled ? -1 : 0}\n data-tid={PagingDataTids.root}\n className={this.cx(this.styles.paging(), this.sizeClassNames.root, {\n [this.styles.pagingMobile()]: this.isMobile,\n [this.styles.pagingDisabled()]: this.props.disabled,\n })}\n onKeyDown={useGlobalListener ? undefined : this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseDown={this.handleMouseDown}\n ref={this.refContainer}\n >\n {this.getItems().map((item, index) => this.renderItem(item, index))}\n </span>\n </CommonWrapper>\n );\n }\n\n private renderItem = (item: ItemType, index: number) => {\n const focused = this.getFocusedItem() === item;\n switch (item) {\n case '.': {\n const key = `dots${index < 5 ? 'Left' : 'Right'}`;\n return this.renderDots(key);\n }\n case 'forward': {\n const disabled = this.isItemDisabled(item);\n return this.renderForwardLink(disabled, focused);\n }\n default: {\n const active = this.props.activePage === item;\n return this.renderPageLink(item, active, focused);\n }\n }\n };\n\n private renderDots = (key: string) => {\n return (\n <span\n data-tid={PagingDataTids.dots}\n key={key}\n className={this.cx(this.styles.dots(this.theme), this.sizeClassNames.dots, {\n [this.styles.dotsDisabled(this.theme)]: this.props.disabled,\n })}\n >\n {this.getDotsIcon()}\n </span>\n );\n };\n\n private renderForwardLink = (disabled: boolean, focused: boolean): JSX.Element => {\n const classNames = this.cx(\n this.styles.pageLink(this.theme),\n this.sizeClassNames.pageLink,\n this.styles.forwardLink(this.theme),\n this.sizeClassNames.forwardLink,\n {\n [this.styles.pageLinkFocused(this.theme)]: focused,\n [this.styles.forwardLinkDisabled(this.theme)]: disabled || this.props.disabled,\n },\n );\n const Component = this.getProps().component;\n const { forward } = this.locale;\n\n const forwardIcon = this.getForwardIcon();\n\n return (\n <Component\n key={'forward'}\n data-tid={PagingDataTids.forwardLink}\n active={false}\n className={classNames}\n onClick={disabled ? emptyHandler : this.goForward}\n tabIndex={-1}\n pageNumber={'forward' as const}\n {...getVisualStateDataAttributes({ disabled })}\n >\n {!this.isMobile && (this.props.caption || forward)}\n {forwardIcon}\n </Component>\n );\n };\n\n private renderPageLink = (pageNumber: number, active: boolean, focused: boolean): JSX.Element => {\n const disabled = this.props.disabled;\n const classNames = this.cx(this.styles.pageLink(this.theme), this.sizeClassNames.pageLink, {\n [this.styles.pageLinkFocused(this.theme)]: focused,\n [this.styles.pageLinkDisabled(this.theme)]: disabled,\n [this.styles.pageLinkCurrent(this.theme)]: active,\n [this.styles.pageLinkCurrentDisabled(this.theme)]: active && disabled,\n });\n const Component = this.getProps().component;\n const handleClick = () => this.goToPage(pageNumber);\n\n return (\n <span\n data-tid={PagingDataTids.pageLinkWrapper}\n key={pageNumber}\n className={this.styles.pageLinkWrapper()}\n {...getVisualStateDataAttributes({ active, disabled })}\n >\n <Component\n data-tid={PagingDataTids.pageLink}\n active={active}\n className={classNames}\n onClick={handleClick}\n tabIndex={-1}\n pageNumber={pageNumber}\n >\n {pageNumber}\n </Component>\n {active && !this.isMobile && this.renderNavigationHint()}\n </span>\n );\n };\n\n private renderNavigationHint = () => {\n if (this.props.withoutNavigationHint) {\n return null;\n }\n\n const { keyboardControl } = this.state;\n const canGoBackward = this.canGoBackward();\n const canGoForward = this.canGoForward();\n\n let hint = null;\n if (keyboardControl && (canGoBackward || canGoForward)) {\n hint = (\n <>\n <span className={canGoBackward ? '' : this.styles.transparent()}>{'←'}</span>\n <span>{NavigationHelper.getKeyName()}</span>\n <span className={canGoForward ? '' : this.styles.transparent()}>{'→'}</span>\n </>\n );\n }\n return <div className={this.styles.pageLinkHint(this.theme)}>{hint}</div>;\n };\n\n private handleMouseDown = () => {\n this.setState({ focusedByTab: false, focusedItem: null });\n };\n\n private handleKeyDown = (e: KeyboardEvent | React.KeyboardEvent<HTMLElement>) => {\n if (e.shiftKey) {\n return;\n }\n\n const target = e.target;\n\n const isArrowLeft = isKeyArrowLeft(e);\n const isArrowRight = isKeyArrowRight(e);\n\n if (\n isInstanceOf(target, this.globalObject.Element) &&\n (IGNORE_EVENT_TAGS.includes(target.tagName.toLowerCase()) || (target as HTMLElement).isContentEditable)\n ) {\n return;\n }\n\n if (NavigationHelper.checkKeyPressed(e) && isArrowLeft) {\n this.setState({ focusedItem: null }, this.goBackward);\n return;\n }\n if (NavigationHelper.checkKeyPressed(e) && isArrowRight) {\n this.setState({ focusedItem: null }, this.goForward);\n return;\n }\n\n if (this.container && this.container === e.target) {\n if (isArrowLeft) {\n this.setState({ focusedByTab: true }, this.moveFocusLeft);\n return;\n }\n if (isArrowRight) {\n this.setState({ focusedByTab: true }, this.moveFocusRight);\n return;\n }\n if (isKeyEnter(e)) {\n this.executeItemAction(this.getFocusedItem());\n return;\n }\n }\n };\n\n private handleFocus = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ keyboardControl: true });\n\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n };\n\n private handleBlur = () => {\n this.setState({\n focusedByTab: false,\n keyboardControl: this.getProps().useGlobalListener || false,\n });\n };\n\n private getItems = (): ItemType[] => {\n return getItems(this.props.activePage, this.props.pagesCount, this.isMobile).concat('forward');\n };\n\n private getFocusedItem = (): Nullable<ItemType> => {\n if (!this.state.focusedByTab) {\n return null;\n }\n\n const { focusedItem } = this.state;\n if (focusedItem && this.getItems().includes(focusedItem) && this.isItemFocusable(focusedItem)) {\n return focusedItem;\n }\n\n return this.props.activePage;\n };\n\n private isItemFocusable = (item: ItemType) => {\n return !this.isItemDisabled(item);\n };\n\n private isItemDisabled = (item: ItemType) => {\n switch (item) {\n case '.':\n return true;\n case 'forward':\n return !this.canGoForward();\n default:\n return false;\n }\n };\n\n private executeItemAction = (item: Nullable<ItemType>) => {\n if (item === 'forward') {\n this.goForward();\n }\n if (typeof item === 'number') {\n this.goToPage(item);\n }\n };\n\n private moveFocusLeft = () => {\n this.moveFocus(-1);\n };\n\n private moveFocusRight = () => {\n this.moveFocus(1);\n };\n\n private moveFocus = (step: number) => {\n const focusedItem = this.getFocusedItem();\n const items = this.getItems();\n let index = items.findIndex((x) => x === focusedItem);\n do {\n index = (index + step + items.length) % items.length;\n } while (!this.isItemFocusable(items[index]));\n this.setState({ focusedItem: items[index] });\n };\n\n private canGoBackward = (): boolean => {\n return this.props.activePage > 1;\n };\n\n private canGoForward = (): boolean => {\n return this.props.activePage < this.props.pagesCount;\n };\n\n private goBackward = () => {\n this.goToPage(this.props.activePage - 1);\n };\n\n private goForward = () => {\n this.goToPage(this.props.activePage + 1);\n };\n\n private goToPage = (pageNumber: number) => {\n if (pageNumber >= 1 && pageNumber !== this.props.activePage && pageNumber <= this.props.pagesCount) {\n this.props.onPageChange(pageNumber);\n }\n };\n\n private addGlobalListener = () => {\n if (this.addedGlobalListener) {\n return;\n }\n\n this.globalObject.document?.addEventListener('keydown', this.handleKeyDown);\n this.addedGlobalListener = true;\n };\n\n private removeGlobalListener = () => {\n if (this.addedGlobalListener) {\n this.globalObject.document?.removeEventListener('keydown', this.handleKeyDown);\n\n this.addedGlobalListener = false;\n }\n };\n\n private refContainer = (element: HTMLSpanElement | null) => {\n this.container = element;\n };\n\n private getPagingSizeClassNames = (): PagingSizeClassNames => {\n const size = this.getSize();\n\n const defaultClassNames = {\n root: this.styles.pagingSmall(this.theme),\n dots: this.styles.dotsSmall(this.theme),\n forwardLink: this.styles.forwardLinkSmall(this.theme),\n pageLink: this.styles.pageLinkSmall(this.theme),\n };\n\n switch (size) {\n case 'small':\n return defaultClassNames;\n case 'medium':\n return {\n root: this.styles.pagingMedium(this.theme),\n dots: this.styles.dotsMedium(this.theme),\n forwardLink: this.isMobile\n ? this.styles.forwardLinkMediumMobile(this.theme)\n : this.styles.forwardLinkMedium(this.theme),\n pageLink: this.styles.pageLinkMedium(this.theme),\n };\n case 'large':\n return {\n root: this.styles.pagingLarge(this.theme),\n dots: this.styles.dotsLarge(this.theme),\n forwardLink: this.isMobile\n ? this.styles.forwardLinkLargeMobile(this.theme)\n : this.styles.forwardLinkLarge(this.theme),\n pageLink: this.styles.pageLinkLarge(this.theme),\n };\n default:\n warning(false, `Invalid size prop: '${this.props.size}'`);\n return defaultClassNames;\n }\n };\n\n private getDotsIcon = () => {\n const size = this.getSize();\n return <DotsIcon size={size} />;\n };\n\n private getForwardIcon = () => {\n const size = this.getSize();\n const iconSize = size;\n return this.isMobile ? (\n <ForwardIconMobile size={iconSize} />\n ) : (\n <ForwardIcon size={iconSize} style={{ marginLeft: 4 }} />\n );\n };\n\n private getSize = () => {\n if (this.props.size) {\n return this.isMobile && this.props.size === 'small' ? 'medium' : this.props.size;\n }\n\n const defaultSize = 'small';\n return this.isMobile ? 'medium' : defaultSize;\n };\n}\n"]}
1
+ {"version":3,"file":"Paging.js","sourceRoot":"","sources":["../../../components/Paging/Paging.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACvG,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGjE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,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CAAC,aAAa,EAC7D,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,WAAW,EAAE,IAAI,CAAC,eAAe,EACjC,GAAG,EAAE,IAAI,CAAC,YAAY,IAErB,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK,IAAK,OAAA,KAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,EAA5B,CAA4B,CAAC,CAC9D,CACO,CACjB,CAAC;IACJ,CAAC;;IAjHa,0BAAmB,GAAG,QAAQ,AAAX,CAAY;IAC/B,kBAAW,GAAG,QAAQ,AAAX,CAAY;IAEvB,mBAAY,GAAiB;QACzC,SAAS,EAAE,sBAAsB;QACjC,iBAAiB,EAAE,KAAK;KACzB,AAHyB,CAGxB;IAPS,MAAM;QAHlB,qBAAqB;QACrB,QAAQ;QACR,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC;OACxB,MAAM,CAmdlB;IAAD,aAAC;CAAA,AAndD,CAA4B,KAAK,CAAC,aAAa,GAmd9C;SAndY,MAAM","sourcesContent":["import React, { type JSX } from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\nimport warning from 'warning';\n\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport { isInstanceOf } from '../../lib/isInstanceOf.js';\nimport { isKeyArrowLeft, isKeyArrowRight, isKeyEnter } from '../../lib/events/keyboard/identifiers.js';\nimport { locale } from '../../lib/locale/decorators.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport { emptyHandler } from '../../lib/utils.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes.js';\nimport { ResponsiveLayout } from '../ResponsiveLayout/index.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\n\nimport { getStyles } from './Paging.styles.js';\nimport * as NavigationHelper from './NavigationHelper.js';\nimport { getItems } from './PagingHelper.js';\nimport type { PagingLocale } from './locale/index.js';\nimport { PagingLocaleHelper } from './locale/index.js';\nimport { PagingDefaultComponent } from './PagingDefaultComponent.js';\nimport { ForwardIcon, ForwardIconMobile } from './ForwardIcon.js';\nimport { DotsIcon } from './DotsIcon.js';\n\nconst IGNORE_EVENT_TAGS = ['input', 'textarea'];\n\nexport interface ItemComponentProps {\n /** Определяет, является ли страница текущей. */\n active: boolean;\n\n /** @ignore */\n children?: React.ReactNode;\n\n /** Задает HTML-атрибут class. */\n className: string;\n\n /** Задает функцию, которая вызывается при клике на элемент. */\n onClick: () => void;\n\n /** Задает номер текущей страницы. */\n pageNumber: number | 'forward';\n\n /** Задает HTML-атрибут `tabindex`. */\n tabIndex: number;\n}\n\nexport interface PagingProps extends CommonProps {\n activePage: number;\n\n /** Компонент обертки по умолчанию.\n * @default <span/> */\n component?: React.ComponentType<ItemComponentProps>;\n\n /** Задает функцию, которая вызывается при переключении страницы. */\n onPageChange: (pageNumber: number) => void;\n\n /** Задает общее количество страниц. */\n pagesCount: number;\n\n /** Задает размер контрола.\n * @default 'small'. Проп поддерживается начиная с версии темы 5.3. */\n size?: SizeProp;\n\n /** Делает компонент недоступным. */\n disabled?: boolean;\n\n /** Отключает навигационные подсказки.\n * По-умолчанию подсказки появляются, когда доступно управление с клавиатуры (либо элемент в фокусе, либо globalListeners === true). */\n withoutNavigationHint?: boolean;\n\n /** Задает подпить у пейджинга. */\n caption?: string;\n\n /** Глобальный слушатель **keyDown**, для навигации клавишами без фокуса на компоненте.\n * Если на странице используется несколько элементов **Paging** с useGlobalListener === true,\n * то обработчик keyDown будет вызываться на каждом из них. Такие случаи лучше обрабатывать отдельно. */\n useGlobalListener?: boolean;\n}\n\nexport interface PagingState {\n focusedByTab: boolean;\n focusedItem: Nullable<ItemType>;\n keyboardControl: boolean;\n}\n\nexport type ItemType = number | '.' | 'forward';\n\nexport const PagingDataTids = {\n root: 'Paging__root',\n dots: 'Paging__dots',\n forwardLink: 'Paging__forwardLink',\n pageLinkWrapper: 'Paging__pageLinkWrapper',\n pageLink: 'Paging__pageLink',\n} as const;\n\ntype DefaultProps = Required<Pick<PagingProps, 'component' | 'useGlobalListener'>>;\n\ninterface PagingSizeClassNames {\n root: string;\n dots: string;\n forwardLink: string;\n pageLink: string;\n}\n\n/**\n * Постраничная навигация `Paging` (пейджинг или пагинация) — способ представления большого количества однородной информации, когда контент разбивается на страницы.\n */\n@withRenderEnvironment\n@rootNode\n@locale('Paging', PagingLocaleHelper)\nexport class Paging extends React.PureComponent<PagingProps, PagingState> {\n public static __KONTUR_REACT_UI__ = 'Paging';\n public static displayName = 'Paging';\n\n public static defaultProps: DefaultProps = {\n component: PagingDefaultComponent,\n useGlobalListener: false,\n };\n\n private getProps = createPropsGetter(Paging.defaultProps);\n\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n\n public static isForward(pageNumber: number | 'forward'): boolean {\n return pageNumber === 'forward';\n }\n\n public state: PagingState = {\n focusedByTab: false,\n focusedItem: null,\n keyboardControl: this.getProps().useGlobalListener,\n };\n\n private globalObject!: GlobalObject;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private readonly locale!: PagingLocale;\n private isMobile!: boolean;\n private sizeClassNames!: PagingSizeClassNames;\n private addedGlobalListener = false;\n private container: HTMLSpanElement | null = null;\n private keyListener!: KeyListener;\n\n public componentDidMount() {\n this.keyListener = new KeyListener(this.globalObject);\n const useGlobalListener = this.getProps().useGlobalListener;\n if (useGlobalListener) {\n this.addGlobalListener();\n }\n }\n\n public componentDidUpdate(prevProps: PagingProps) {\n const useGlobalListener = this.getProps().useGlobalListener;\n if (!prevProps.useGlobalListener && useGlobalListener) {\n this.addGlobalListener();\n }\n\n if (prevProps.useGlobalListener && !useGlobalListener) {\n this.removeGlobalListener();\n }\n\n if (prevProps.useGlobalListener !== useGlobalListener) {\n this.setState({\n keyboardControl: useGlobalListener,\n });\n }\n }\n\n public componentWillUnmount() {\n this.removeGlobalListener();\n }\n\n public render(): React.JSX.Element | null {\n if (this.props.pagesCount < 2) {\n return null;\n }\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <ResponsiveLayout>\n {({ isMobile }) => {\n this.isMobile = isMobile;\n this.sizeClassNames = this.getPagingSizeClassNames();\n return this.renderMain();\n }}\n </ResponsiveLayout>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { useGlobalListener } = this.getProps();\n return (\n <CommonWrapper\n rootNodeRef={this.setRootNode}\n {...this.props}\n {...getVisualStateDataAttributes({ disabled: this.props.disabled })}\n >\n <span\n tabIndex={this.props.disabled ? -1 : 0}\n data-tid={PagingDataTids.root}\n className={this.cx(this.styles.paging(), this.sizeClassNames.root, {\n [this.styles.pagingMobile()]: this.isMobile,\n [this.styles.pagingDisabled()]: this.props.disabled,\n })}\n onKeyDown={useGlobalListener ? undefined : this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseDown={this.handleMouseDown}\n ref={this.refContainer}\n >\n {this.getItems().map((item, index) => this.renderItem(item, index))}\n </span>\n </CommonWrapper>\n );\n }\n\n private renderItem = (item: ItemType, index: number) => {\n const focused = this.getFocusedItem() === item;\n switch (item) {\n case '.': {\n const key = `dots${index < 5 ? 'Left' : 'Right'}`;\n return this.renderDots(key);\n }\n case 'forward': {\n const disabled = this.isItemDisabled(item);\n return this.renderForwardLink(disabled, focused);\n }\n default: {\n const active = this.props.activePage === item;\n return this.renderPageLink(item, active, focused);\n }\n }\n };\n\n private renderDots = (key: string) => {\n return (\n <span\n data-tid={PagingDataTids.dots}\n key={key}\n className={this.cx(this.styles.dots(this.theme), this.sizeClassNames.dots, {\n [this.styles.dotsDisabled(this.theme)]: this.props.disabled,\n })}\n >\n {this.getDotsIcon()}\n </span>\n );\n };\n\n private renderForwardLink = (disabled: boolean, focused: boolean): JSX.Element => {\n const classNames = this.cx(\n this.styles.pageLink(this.theme),\n this.sizeClassNames.pageLink,\n this.styles.forwardLink(this.theme),\n this.sizeClassNames.forwardLink,\n {\n [this.styles.pageLinkFocused(this.theme)]: focused,\n [this.styles.forwardLinkDisabled(this.theme)]: disabled || this.props.disabled,\n },\n );\n const Component = this.getProps().component;\n const { forward } = this.locale;\n\n const forwardIcon = this.getForwardIcon();\n\n return (\n <Component\n key={'forward'}\n data-tid={PagingDataTids.forwardLink}\n active={false}\n className={classNames}\n onClick={disabled ? emptyHandler : this.goForward}\n tabIndex={-1}\n pageNumber={'forward' as const}\n {...getVisualStateDataAttributes({ disabled })}\n >\n {!this.isMobile && (this.props.caption || forward)}\n {forwardIcon}\n </Component>\n );\n };\n\n private renderPageLink = (pageNumber: number, active: boolean, focused: boolean): JSX.Element => {\n const disabled = this.props.disabled;\n const classNames = this.cx(this.styles.pageLink(this.theme), this.sizeClassNames.pageLink, {\n [this.styles.pageLinkFocused(this.theme)]: focused,\n [this.styles.pageLinkDisabled(this.theme)]: disabled,\n [this.styles.pageLinkCurrent(this.theme)]: active,\n [this.styles.pageLinkCurrentDisabled(this.theme)]: active && disabled,\n });\n const Component = this.getProps().component;\n const handleClick = () => this.goToPage(pageNumber);\n\n return (\n <span\n data-tid={PagingDataTids.pageLinkWrapper}\n key={pageNumber}\n className={this.styles.pageLinkWrapper()}\n {...getVisualStateDataAttributes({ active, disabled })}\n >\n <Component\n data-tid={PagingDataTids.pageLink}\n active={active}\n className={classNames}\n onClick={handleClick}\n tabIndex={-1}\n pageNumber={pageNumber}\n >\n {pageNumber}\n </Component>\n {active && !this.isMobile && this.renderNavigationHint()}\n </span>\n );\n };\n\n private renderNavigationHint = () => {\n if (this.props.withoutNavigationHint) {\n return null;\n }\n\n const { keyboardControl } = this.state;\n const canGoBackward = this.canGoBackward();\n const canGoForward = this.canGoForward();\n\n let hint = null;\n if (keyboardControl && (canGoBackward || canGoForward)) {\n hint = (\n <>\n <span className={canGoBackward ? '' : this.styles.transparent()}>{'←'}</span>\n <span>{NavigationHelper.getKeyName()}</span>\n <span className={canGoForward ? '' : this.styles.transparent()}>{'→'}</span>\n </>\n );\n }\n return <div className={this.styles.pageLinkHint(this.theme)}>{hint}</div>;\n };\n\n private handleMouseDown = () => {\n this.setState({ focusedByTab: false, focusedItem: null });\n };\n\n private handleKeyDown = (e: KeyboardEvent | React.KeyboardEvent<HTMLElement>) => {\n if (e.shiftKey) {\n return;\n }\n\n const target = e.target;\n\n const isArrowLeft = isKeyArrowLeft(e);\n const isArrowRight = isKeyArrowRight(e);\n\n if (\n isInstanceOf(target, this.globalObject.Element) &&\n (IGNORE_EVENT_TAGS.includes(target.tagName.toLowerCase()) || (target as HTMLElement).isContentEditable)\n ) {\n return;\n }\n\n if (NavigationHelper.checkKeyPressed(e) && isArrowLeft) {\n this.setState({ focusedItem: null }, this.goBackward);\n return;\n }\n if (NavigationHelper.checkKeyPressed(e) && isArrowRight) {\n this.setState({ focusedItem: null }, this.goForward);\n return;\n }\n\n if (this.container && this.container === e.target) {\n if (isArrowLeft) {\n this.setState({ focusedByTab: true }, this.moveFocusLeft);\n return;\n }\n if (isArrowRight) {\n this.setState({ focusedByTab: true }, this.moveFocusRight);\n return;\n }\n if (isKeyEnter(e)) {\n this.executeItemAction(this.getFocusedItem());\n return;\n }\n }\n };\n\n private handleFocus = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.setState({ keyboardControl: true });\n\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n };\n\n private handleBlur = () => {\n this.setState({\n focusedByTab: false,\n keyboardControl: this.getProps().useGlobalListener || false,\n });\n };\n\n private getItems = (): ItemType[] => {\n return getItems(this.props.activePage, this.props.pagesCount, this.isMobile).concat('forward');\n };\n\n private getFocusedItem = (): Nullable<ItemType> => {\n if (!this.state.focusedByTab) {\n return null;\n }\n\n const { focusedItem } = this.state;\n if (focusedItem && this.getItems().includes(focusedItem) && this.isItemFocusable(focusedItem)) {\n return focusedItem;\n }\n\n return this.props.activePage;\n };\n\n private isItemFocusable = (item: ItemType) => {\n return !this.isItemDisabled(item);\n };\n\n private isItemDisabled = (item: ItemType) => {\n switch (item) {\n case '.':\n return true;\n case 'forward':\n return !this.canGoForward();\n default:\n return false;\n }\n };\n\n private executeItemAction = (item: Nullable<ItemType>) => {\n if (item === 'forward') {\n this.goForward();\n }\n if (typeof item === 'number') {\n this.goToPage(item);\n }\n };\n\n private moveFocusLeft = () => {\n this.moveFocus(-1);\n };\n\n private moveFocusRight = () => {\n this.moveFocus(1);\n };\n\n private moveFocus = (step: number) => {\n const focusedItem = this.getFocusedItem();\n const items = this.getItems();\n let index = items.findIndex((x) => x === focusedItem);\n do {\n index = (index + step + items.length) % items.length;\n } while (!this.isItemFocusable(items[index]));\n this.setState({ focusedItem: items[index] });\n };\n\n private canGoBackward = (): boolean => {\n return this.props.activePage > 1;\n };\n\n private canGoForward = (): boolean => {\n return this.props.activePage < this.props.pagesCount;\n };\n\n private goBackward = () => {\n this.goToPage(this.props.activePage - 1);\n };\n\n private goForward = () => {\n this.goToPage(this.props.activePage + 1);\n };\n\n private goToPage = (pageNumber: number) => {\n if (pageNumber >= 1 && pageNumber !== this.props.activePage && pageNumber <= this.props.pagesCount) {\n this.props.onPageChange(pageNumber);\n }\n };\n\n private addGlobalListener = () => {\n if (this.addedGlobalListener) {\n return;\n }\n\n this.globalObject.document?.addEventListener('keydown', this.handleKeyDown);\n this.addedGlobalListener = true;\n };\n\n private removeGlobalListener = () => {\n if (this.addedGlobalListener) {\n this.globalObject.document?.removeEventListener('keydown', this.handleKeyDown);\n\n this.addedGlobalListener = false;\n }\n };\n\n private refContainer = (element: HTMLSpanElement | null) => {\n this.container = element;\n };\n\n private getPagingSizeClassNames = (): PagingSizeClassNames => {\n const size = this.getSize();\n\n const defaultClassNames = {\n root: this.styles.pagingSmall(this.theme),\n dots: this.styles.dotsSmall(this.theme),\n forwardLink: this.styles.forwardLinkSmall(this.theme),\n pageLink: this.styles.pageLinkSmall(this.theme),\n };\n\n switch (size) {\n case 'small':\n return defaultClassNames;\n case 'medium':\n return {\n root: this.styles.pagingMedium(this.theme),\n dots: this.styles.dotsMedium(this.theme),\n forwardLink: this.isMobile\n ? this.styles.forwardLinkMediumMobile(this.theme)\n : this.styles.forwardLinkMedium(this.theme),\n pageLink: this.styles.pageLinkMedium(this.theme),\n };\n case 'large':\n return {\n root: this.styles.pagingLarge(this.theme),\n dots: this.styles.dotsLarge(this.theme),\n forwardLink: this.isMobile\n ? this.styles.forwardLinkLargeMobile(this.theme)\n : this.styles.forwardLinkLarge(this.theme),\n pageLink: this.styles.pageLinkLarge(this.theme),\n };\n default:\n warning(false, `Invalid size prop: '${this.props.size}'`);\n return defaultClassNames;\n }\n };\n\n private getDotsIcon = () => {\n const size = this.getSize();\n return <DotsIcon size={size} />;\n };\n\n private getForwardIcon = () => {\n const size = this.getSize();\n const iconSize = size;\n return this.isMobile ? (\n <ForwardIconMobile size={iconSize} />\n ) : (\n <ForwardIcon size={iconSize} style={{ marginLeft: 4 }} />\n );\n };\n\n private getSize = () => {\n if (this.props.size) {\n return this.isMobile && this.props.size === 'small' ? 'medium' : this.props.size;\n }\n\n const defaultSize = 'small';\n return this.isMobile ? 'medium' : defaultSize;\n };\n}\n"]}
@@ -42,7 +42,7 @@ import { ThemeContext } from '../../lib/theming/ThemeContext.js';
42
42
  import { rootNode } from '../../lib/rootNode/index.js';
43
43
  import { withSize } from '../../lib/size/SizeDecorator.js';
44
44
  import { createPropsGetter } from '../../lib/createPropsGetter.js';
45
- import { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';
45
+ import { withRenderEnvironment } from '../../lib/renderEnvironment/RenderEnvironmentDecorator.js';
46
46
  import { getStyles } from './PasswordInput.styles.js';
47
47
  import { PasswordInputIcon } from './PasswordInputIcon.js';
48
48
  import { PasswordInputLocaleHelper } from './locale/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInput.js","sourceRoot":"","sources":["../../../components/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,kBAAkB,IAAI,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAE9F,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,yBAA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AC,CACqB,CACzB,CAAC;IACJ,CAAC;IAsFO,8CAAsB,GAA9B;QACE,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACjD,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClD,KAAK,OAAO,CAAC;YACb;gBACE,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAnJa,iCAAmB,GAAG,eAAe,AAAlB,CAAmB;IACtC,yBAAW,GAAG,eAAe,AAAlB,CAAmB;IAFjC,aAAa;QAJzB,qBAAqB;QACrB,QAAQ;QACR,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC;QAClD,QAAQ;OACI,aAAa,CA4MzB;IAAD,oBAAC;CAAA,AA5MD,CAAmC,KAAK,CAAC,aAAa,GA4MrD;SA5MY,aAAa","sourcesContent":["import type { AriaAttributes, JSX } from 'react';\nimport React from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\n\nimport { locale } from '../../lib/locale/decorators.js';\nimport { RenderLayer } from '../../internal/RenderLayer/index.js';\nimport { isNonNullable } from '../../lib/utils.js';\nimport { isKeyCapsLock } from '../../lib/events/keyboard/identifiers.js';\nimport { KeyboardEventCodes as Codes } from '../../lib/events/keyboard/KeyboardEventCodes.js';\nimport type { InputProps } from '../Input/index.js';\nimport { Input } from '../Input/index.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\n\nimport { getStyles } from './PasswordInput.styles.js';\nimport { PasswordInputIcon } from './PasswordInputIcon.js';\nimport type { PasswordInputLocale } from './locale/index.js';\nimport { PasswordInputLocaleHelper } from './locale/index.js';\n\nexport interface PasswordInputProps\n extends Pick<AriaAttributes, 'aria-label'>,\n CommonProps,\n Omit<InputProps, 'showClearIcon'> {\n /** Визуально показывает, что активен CapsLock. */\n detectCapsLock?: boolean;\n}\n\nexport interface PasswordInputState {\n visible: boolean;\n focused: boolean;\n capsLockEnabled?: boolean | null;\n}\n\nexport const PasswordInputDataTids = {\n root: 'PasswordInput',\n capsLockDetector: 'PasswordInputCapsLockDetector',\n eyeIcon: 'PasswordInputEyeIcon',\n} as const;\n\n/**\n * Однострочное поле для ввода пароля, в котором символы заменяются на точки.\n */\n@withRenderEnvironment\n@rootNode\n@locale('PasswordInput', PasswordInputLocaleHelper)\n@withSize\nexport class PasswordInput extends React.PureComponent<PasswordInputProps, PasswordInputState> {\n public static __KONTUR_REACT_UI__ = 'PasswordInput';\n public static displayName = 'PasswordInput';\n\n public state: PasswordInputState = {\n visible: false,\n focused: false,\n capsLockEnabled: false,\n };\n private size!: SizeProp;\n\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n\n private input: Nullable<Input>;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private readonly locale!: PasswordInputLocale;\n\n private getProps = createPropsGetter({});\n\n public componentDidMount() {\n if (this.props.detectCapsLock) {\n this.setState({ capsLockEnabled: null });\n }\n }\n\n public static getDerivedStateFromProps(props: PasswordInputProps, state: PasswordInputState) {\n if (props.disabled) {\n return { visible: false };\n }\n\n return state;\n }\n\n public render(): JSX.Element {\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /** Программно устанавливает фокус на поле.\n * Появляется фокусная рамка, элемент получает клавиатурные события и воспринимается как текущий элемент для чтения скринридерами.\n * @public\n */\n public focus = (): void => {\n if (this.input) {\n this.input.focus();\n }\n };\n\n /** Программно снимает фокус с кнопки.\n * @public\n */\n public blur = (): void => {\n if (this.input) {\n this.input.blur();\n }\n };\n\n private handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const { onKeyPress, detectCapsLock } = this.props;\n\n if (onKeyPress) {\n onKeyPress(e);\n }\n\n if (!detectCapsLock) {\n return;\n }\n\n const capsLockEnabled = e.getModifierState(Codes.CapsLock);\n\n this.setState({ capsLockEnabled });\n };\n\n private handleKeydown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const {\n props: { detectCapsLock, onKeyDown },\n state: { capsLockEnabled },\n } = this;\n\n if (onKeyDown) {\n onKeyDown(e);\n }\n\n if (!detectCapsLock) {\n return;\n }\n\n if (isKeyCapsLock(e) && isNonNullable(capsLockEnabled)) {\n this.setState({ capsLockEnabled: !capsLockEnabled });\n }\n };\n\n private handleToggleVisibility = () => {\n this.setState((prevState) => ({ visible: !prevState.visible }), this.focusOnInput);\n };\n\n private focusOnInput = () => {\n if (this.input) {\n this.input.focus();\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n if (this.state.focused) {\n return;\n }\n\n this.setState({ focused: true });\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleFocusOutside = () => {\n this.hideSymbols();\n\n if (this.state.focused) {\n this.setState({ focused: false });\n }\n };\n\n private getEyeWrapperClassname() {\n switch (this.size) {\n case 'large':\n return this.styles.eyeWrapperLarge(this.theme);\n case 'medium':\n return this.styles.eyeWrapperMedium(this.theme);\n case 'small':\n default:\n return this.styles.eyeWrapperSmall(this.theme);\n }\n }\n\n private renderEye = () => {\n const { capsLockEnabled } = this.state;\n\n return (\n <span className={this.styles.iconWrapper()}>\n {capsLockEnabled && (\n <span className={this.styles.capsLockDetector()} data-tid={PasswordInputDataTids.capsLockDetector} />\n )}\n <span className={this.cx(this.styles.toggleVisibility(this.theme), this.getEyeWrapperClassname())}>\n {!this.props.disabled && (\n <button\n type=\"button\"\n aria-label={this.state.visible ? this.locale.eyeClosedAriaLabel : this.locale.eyeOpenedAriaLabel}\n onClick={this.handleToggleVisibility}\n className={this.styles.icon()}\n data-tid={PasswordInputDataTids.eyeIcon}\n >\n <PasswordInputIcon size={this.size} visible={this.state.visible} />\n </button>\n )}\n </span>\n </span>\n );\n };\n\n private refInput = (element: Input) => {\n this.input = element;\n };\n\n private hideSymbols = () => {\n this.setState({ visible: false });\n };\n\n private renderMain = (props: CommonWrapperRestProps<PasswordInputProps>) => {\n return (\n <RenderLayer\n active={this.state.focused}\n onFocusOutside={this.handleFocusOutside}\n onClickOutside={this.handleFocusOutside}\n >\n <div data-tid={PasswordInputDataTids.root} className={this.styles.root()}>\n <Input\n ref={this.refInput}\n type={this.state.visible ? 'text' : 'password'}\n onKeyDown={this.handleKeydown}\n onKeyPress={this.handleKeyPress}\n rightIcon={this.renderEye()}\n onFocus={this.handleFocus}\n {...props}\n />\n </div>\n </RenderLayer>\n );\n };\n}\n"]}
1
+ {"version":3,"file":"PasswordInput.js","sourceRoot":"","sources":["../../../components/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,a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;QAClD,QAAQ;OACI,aAAa,CA4MzB;IAAD,oBAAC;CAAA,AA5MD,CAAmC,KAAK,CAAC,aAAa,GA4MrD;SA5MY,aAAa","sourcesContent":["import type { AriaAttributes, JSX } from 'react';\nimport React from 'react';\nimport type { Emotion } from '@emotion/css/create-instance';\n\nimport { locale } from '../../lib/locale/decorators.js';\nimport { RenderLayer } from '../../internal/RenderLayer/index.js';\nimport { isNonNullable } from '../../lib/utils.js';\nimport { isKeyCapsLock } from '../../lib/events/keyboard/identifiers.js';\nimport { KeyboardEventCodes as Codes } from '../../lib/events/keyboard/KeyboardEventCodes.js';\nimport type { InputProps } from '../Input/index.js';\nimport { Input } from '../Input/index.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/RenderEnvironmentDecorator.js';\n\nimport { getStyles } from './PasswordInput.styles.js';\nimport { PasswordInputIcon } from './PasswordInputIcon.js';\nimport type { PasswordInputLocale } from './locale/index.js';\nimport { PasswordInputLocaleHelper } from './locale/index.js';\n\nexport interface PasswordInputProps\n extends Pick<AriaAttributes, 'aria-label'>,\n CommonProps,\n Omit<InputProps, 'showClearIcon'> {\n /** Визуально показывает, что активен CapsLock. */\n detectCapsLock?: boolean;\n}\n\nexport interface PasswordInputState {\n visible: boolean;\n focused: boolean;\n capsLockEnabled?: boolean | null;\n}\n\nexport const PasswordInputDataTids = {\n root: 'PasswordInput',\n capsLockDetector: 'PasswordInputCapsLockDetector',\n eyeIcon: 'PasswordInputEyeIcon',\n} as const;\n\n/**\n * Однострочное поле для ввода пароля, в котором символы заменяются на точки.\n */\n@withRenderEnvironment\n@rootNode\n@locale('PasswordInput', PasswordInputLocaleHelper)\n@withSize\nexport class PasswordInput extends React.PureComponent<PasswordInputProps, PasswordInputState> {\n public static __KONTUR_REACT_UI__ = 'PasswordInput';\n public static displayName = 'PasswordInput';\n\n public state: PasswordInputState = {\n visible: false,\n focused: false,\n capsLockEnabled: false,\n };\n private size!: SizeProp;\n\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n\n private input: Nullable<Input>;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private readonly locale!: PasswordInputLocale;\n\n private getProps = createPropsGetter({});\n\n public componentDidMount() {\n if (this.props.detectCapsLock) {\n this.setState({ capsLockEnabled: null });\n }\n }\n\n public static getDerivedStateFromProps(props: PasswordInputProps, state: PasswordInputState) {\n if (props.disabled) {\n return { visible: false };\n }\n\n return state;\n }\n\n public render(): JSX.Element {\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /** Программно устанавливает фокус на поле.\n * Появляется фокусная рамка, элемент получает клавиатурные события и воспринимается как текущий элемент для чтения скринридерами.\n * @public\n */\n public focus = (): void => {\n if (this.input) {\n this.input.focus();\n }\n };\n\n /** Программно снимает фокус с кнопки.\n * @public\n */\n public blur = (): void => {\n if (this.input) {\n this.input.blur();\n }\n };\n\n private handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const { onKeyPress, detectCapsLock } = this.props;\n\n if (onKeyPress) {\n onKeyPress(e);\n }\n\n if (!detectCapsLock) {\n return;\n }\n\n const capsLockEnabled = e.getModifierState(Codes.CapsLock);\n\n this.setState({ capsLockEnabled });\n };\n\n private handleKeydown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const {\n props: { detectCapsLock, onKeyDown },\n state: { capsLockEnabled },\n } = this;\n\n if (onKeyDown) {\n onKeyDown(e);\n }\n\n if (!detectCapsLock) {\n return;\n }\n\n if (isKeyCapsLock(e) && isNonNullable(capsLockEnabled)) {\n this.setState({ capsLockEnabled: !capsLockEnabled });\n }\n };\n\n private handleToggleVisibility = () => {\n this.setState((prevState) => ({ visible: !prevState.visible }), this.focusOnInput);\n };\n\n private focusOnInput = () => {\n if (this.input) {\n this.input.focus();\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n if (this.state.focused) {\n return;\n }\n\n this.setState({ focused: true });\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleFocusOutside = () => {\n this.hideSymbols();\n\n if (this.state.focused) {\n this.setState({ focused: false });\n }\n };\n\n private getEyeWrapperClassname() {\n switch (this.size) {\n case 'large':\n return this.styles.eyeWrapperLarge(this.theme);\n case 'medium':\n return this.styles.eyeWrapperMedium(this.theme);\n case 'small':\n default:\n return this.styles.eyeWrapperSmall(this.theme);\n }\n }\n\n private renderEye = () => {\n const { capsLockEnabled } = this.state;\n\n return (\n <span className={this.styles.iconWrapper()}>\n {capsLockEnabled && (\n <span className={this.styles.capsLockDetector()} data-tid={PasswordInputDataTids.capsLockDetector} />\n )}\n <span className={this.cx(this.styles.toggleVisibility(this.theme), this.getEyeWrapperClassname())}>\n {!this.props.disabled && (\n <button\n type=\"button\"\n aria-label={this.state.visible ? this.locale.eyeClosedAriaLabel : this.locale.eyeOpenedAriaLabel}\n onClick={this.handleToggleVisibility}\n className={this.styles.icon()}\n data-tid={PasswordInputDataTids.eyeIcon}\n >\n <PasswordInputIcon size={this.size} visible={this.state.visible} />\n </button>\n )}\n </span>\n </span>\n );\n };\n\n private refInput = (element: Input) => {\n this.input = element;\n };\n\n private hideSymbols = () => {\n this.setState({ visible: false });\n };\n\n private renderMain = (props: CommonWrapperRestProps<PasswordInputProps>) => {\n return (\n <RenderLayer\n active={this.state.focused}\n onFocusOutside={this.handleFocusOutside}\n onClickOutside={this.handleFocusOutside}\n >\n <div data-tid={PasswordInputDataTids.root} className={this.styles.root()}>\n <Input\n ref={this.refInput}\n type={this.state.visible ? 'text' : 'password'}\n onKeyDown={this.handleKeydown}\n onKeyPress={this.handleKeyPress}\n rightIcon={this.renderEye()}\n onFocus={this.handleFocus}\n {...props}\n />\n </div>\n </RenderLayer>\n );\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/CommonWrapper/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './CommonWrapper.js';\nexport type { CommonWrapperRestProps } from './types.js';\nexport type { CommonProps } from './types.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/CommonWrapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './CommonWrapper.js';\nexport type { CommonWrapperRestProps } from './types.js';\nexport type { CommonProps } from './types.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/CustomComboBox/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './CustomComboBox.js';\nexport * from './ComboBoxMenu.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/CustomComboBox/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './CustomComboBox.js';\nexport * from './ComboBoxMenu.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/DateSelect/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './DateSelect.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/DateSelect/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './DateSelect.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/FocusControlWrapper/index.tsx"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './FocusControlWrapper.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/FocusControlWrapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './FocusControlWrapper.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/FocusTrap/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './FocusTrap.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/FocusTrap/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './FocusTrap.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/HideBodyVerticalScroll/index.tsx"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './HideBodyVerticalScroll.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/HideBodyVerticalScroll/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './HideBodyVerticalScroll.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/InputLikeText/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './InputLikeText.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/InputLikeText/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './InputLikeText.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/MaskCharLowLine/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './MaskCharLowLine.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/MaskCharLowLine/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './MaskCharLowLine.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/Popup/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC","sourcesContent":["export * from './Popup.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/Popup/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC","sourcesContent":["export * from './Popup.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/PopupMenu/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './PopupMenu.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/PopupMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './PopupMenu.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/RenderContainer/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './RenderContainer.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/RenderContainer/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './RenderContainer.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/ResizeDetector/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './ResizeDetector.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../internal/ResizeDetector/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './ResizeDetector.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skbkontur/react-ui",
3
- "version": "6.0.0-beta.0",
3
+ "version": "6.0.0-beta.2",
4
4
  "description": "UI Components",
5
5
  "sideEffects": false,
6
6
  "homepage": "https://tech.skbkontur.ru/kontur-ui",
@@ -12,154 +12,13 @@
12
12
  "url": "https://github.com/skbkontur/retail-ui/issues"
13
13
  },
14
14
  "type": "module",
15
- "scripts": {
16
- "clean": "git clean -fdxqe node_modules",
17
- "prebuild": "yarn rimraf build",
18
- "build": "run-s build:* build:lint:*",
19
- "build:tsc": "tsc --outDir build -p prod.tsconfig.json",
20
- "build:copy-files": "copyfiles package.json README.md CHANGELOG.md LICENSE typings/* build",
21
- "build:lint:publint": "publint --pack npm ./build",
22
- "build:lint:attw": "attw --ignore-rules cjs-resolves-to-esm --quiet --pack ./build",
23
- "build:exports": "node ./scripts/exports.ts",
24
- "prerelease": "yarn build",
25
- "release": "npm publish ./build --workspaces=false",
26
- "release:unstable": "yarn release --tag=unstable",
27
- "storybook": "storybook dev -p 6060",
28
- "storybook:build": "cross-env STORYBOOK_REACT_UI_TEST=true storybook build -o .storybook/build --quiet",
29
- "storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook build --docs -c .storybook-docs -o .storybook/build --quiet",
30
- "storybook:test": "cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060",
31
- "storybook:docs": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs",
32
- "storybook:serve": "yarn serve -l 6060 .storybook/build",
33
- "lint": "run-p -c lint:*",
34
- "lint:eslint": "cross-env TIMING=1 yarn eslint ./",
35
- "lint:tsc": "tsc --noEmit --diagnostics",
36
- "lint:prettier": "prettier --check .",
37
- "fix": "run-s -c fix:*",
38
- "fix:eslint": "yarn lint:eslint --fix",
39
- "fix:prettier": "yarn prettier --write .",
40
- "test": "vitest run",
41
- "test:watch": "vitest",
42
- "creevey": "cross-env BABEL_ENV=cjs creevey test -c .creevey/config.mts --storybook-port=6060",
43
- "creevey:ci": "start-server-and-test storybook:serve http://localhost:6060 creevey",
44
- "creevey:update": "cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts --update",
45
- "creevey:ui": "yarn creevey --ui",
46
- "report:eslint": "yarn eslint -f eslint-html-reporter/reporter.js -o reports/eslint/index.html"
47
- },
48
- "license": "MIT",
49
- "dependencies": {
50
- "@babel/runtime": "^7.24.6",
51
- "@emotion/css": "^11.11.2",
52
- "@skbkontur/colors": "^2.1.1",
53
- "@skbkontur/react-imask": "^7.6.5",
54
- "eventemitter3": "^5.0.1",
55
- "find-dom-node-polyfill": "^1.0.3",
56
- "invariant": "^2.2.4",
57
- "focus-lock": "^1.3.5",
58
- "lodash.debounce": "^4.0.8",
59
- "lodash.isequal": "^4.5.0",
60
- "lodash.throttle": "^4.1.1",
61
- "normalize-wheel": "^1.0.1",
62
- "react-clientside-effect": "^1.2.6",
63
- "react-docgen": "7.0.0",
64
- "react-is": ">=17.0.2",
65
- "react-transition-group": "^4.4.5",
66
- "shallowequal": "^1.1.0",
67
- "stylis-plugin-extra-scope": "^0.3.0",
68
- "tabbable": "^6.2.0",
69
- "use-callback-ref": "^1.3.2",
70
- "use-sidecar": "^1.1.2",
71
- "warning": "^4.0.3"
72
- },
73
- "devDependencies": {
74
- "@babel/core": "^7.24.6",
75
- "@babel/plugin-proposal-class-properties": "^7.18.6",
76
- "@babel/plugin-proposal-decorators": "^7.24.6",
77
- "@babel/plugin-transform-runtime": "^7.24.6",
78
- "@babel/preset-env": "^7.24.6",
79
- "@babel/preset-react": "^7.24.6",
80
- "@babel/preset-typescript": "^7.24.6",
81
- "@babel/register": "^7.24.6",
82
- "@hukopo/eslint-plugin-nodenext-extensions": "^1.0.0",
83
- "@playwright/test": "1.57.0",
84
- "@skbkontur/icons": "1.10.0",
85
- "@skbkontur/storybook-addon-live-examples": "1.0.0-beta.1",
86
- "@storybook/addon-docs": "8.6.14",
87
- "@storybook/addon-essentials": "8.6.14",
88
- "@storybook/addon-links": "8.6.14",
89
- "@storybook/blocks": "8.6.14",
90
- "@storybook/node-logger": "^8.6.14",
91
- "@storybook/react": "8.6.14",
92
- "@storybook/react-webpack5": "8.6.14",
93
- "@testing-library/jest-dom": "6.9.1",
94
- "@testing-library/react": "15.0.7",
95
- "@testing-library/react-hooks": "^8.0.1",
96
- "@testing-library/user-event": "14.5.2",
97
- "@types/invariant": "^2.2.35",
98
- "@types/lodash.debounce": "^4.0.6",
99
- "@types/lodash.isequal": "^4.5.5",
100
- "@types/lodash.throttle": "^4.1.6",
101
- "@types/react": "19.2.7",
102
- "@types/react-dom": "19.2.3",
103
- "@types/react-is": "^19.2.0",
104
- "@types/react-transition-group": "^4.4.4",
105
- "@types/shallowequal": "^1.1.1",
106
- "@types/warning": "^3.0.0",
107
- "axios": "^1.7.2",
108
- "babel-loader": "^9.1.3",
109
- "chalk": "4.1.0",
110
- "copyfiles": "^2.4.1",
111
- "core-js": "^3.37.1",
112
- "creevey": "0.10.34",
113
- "cross-env": "^7.0.3",
114
- "css-loader": "^7.1.2",
115
- "dotenv": "^16.4.5",
116
- "dts-css-modules-loader": "^2.0.1",
117
- "eslint-plugin-jest-dom": "^5.4.0",
118
- "eslint-plugin-react-hooks": "^4.6.2",
119
- "eslint-plugin-storybook": "^0.8.0",
120
- "eslint-plugin-testing-library": "^6.2.2",
121
- "eslint-plugin-vitest": "^0.5.4",
122
- "file-loader": "^6.2.0",
123
- "fork-ts-checker-webpack-plugin": "^9.0.2",
124
- "fs-extra": "^11.2.0",
125
- "fs-readdir-recursive": "^1.1.0",
126
- "gh-pages": "^6.1.1",
127
- "identity-obj-proxy": "^3.0.0",
128
- "jsdom": "^26.1.0",
129
- "npm-run-all": "^4.1.5",
130
- "output-file-sync": "^2.0.1",
131
- "react": "19.2.1",
132
- "react-dom": "19.2.1",
133
- "playwright-core": "1.57.0",
134
- "react-docgen-typescript": "^2.2.2",
135
- "rimraf": "^5.0.7",
136
- "selenium-webdriver": "^4.27.0",
137
- "semver": "^7.6.2",
138
- "serve": "^13.0.2",
139
- "start-server-and-test": "1.14.0",
140
- "storybook": "8.6.14",
141
- "string-replace-loader": "3.1.0",
142
- "style-loader": "^4.0.0",
143
- "stylelint": "^16.6.0",
144
- "stylelint-config-standard": "^36.0.0",
145
- "typescript": "5.9.3",
146
- "upath": "^2.0.1",
147
- "url-loader": "^4.1.1",
148
- "vitest": "^3.2.4",
149
- "wait-on": "^7.2.0",
150
- "webpack": "^5.91.0"
151
- },
152
- "peerDependencies": {
153
- "react": ">=16.9 <=19",
154
- "react-dom": ">=16.9 <=19"
155
- },
156
15
  "exports": {
157
16
  ".": "./index.js",
158
- "./package.json": "./package.json",
159
17
  "./components/*": "./components/*.js",
160
18
  "./lib/*": "./lib/*.js",
161
19
  "./hooks/*": "./hooks/*.js",
162
20
  "./internal/*": "./internal/*.js",
21
+ "./package.json": "./package.json",
163
22
  "./components/Autocomplete": "./components/Autocomplete/index.js",
164
23
  "./components/Autocomplete/Autocomplete": "./components/Autocomplete/Autocomplete.js",
165
24
  "./components/Autocomplete/locale": "./components/Autocomplete/locale/index.js",
@@ -365,5 +224,146 @@
365
224
  "./lib/rootNode/rootNodeDecorator": "./lib/rootNode/rootNodeDecorator.js",
366
225
  "./lib/size": "./lib/size/index.js",
367
226
  "./lib/size/SizeControlContext": "./lib/size/SizeControlContext.js"
227
+ },
228
+ "scripts": {
229
+ "clean": "git clean -fdxqe node_modules",
230
+ "prebuild": "yarn rimraf build",
231
+ "build": "run-s build:* build:lint:*",
232
+ "build:tsc": "tsc --outDir build -p prod.tsconfig.json",
233
+ "build:copy-files": "copyfiles package.json README.md CHANGELOG.md LICENSE typings/* build",
234
+ "build:lint:publint": "publint --pack npm ./build",
235
+ "build:lint:attw": "attw --ignore-rules cjs-resolves-to-esm --quiet --pack ./build",
236
+ "build:exports": "node ./scripts/exports.ts",
237
+ "prerelease": "yarn build",
238
+ "release": "npm publish ./build --workspaces=false",
239
+ "release:unstable": "yarn release --tag=unstable",
240
+ "storybook": "storybook dev -p 6060",
241
+ "storybook:build": "cross-env STORYBOOK_REACT_UI_TEST=true storybook build -o .storybook/build --quiet",
242
+ "storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook build --docs -c .storybook-docs -o .storybook/build --quiet",
243
+ "storybook:test": "cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060",
244
+ "storybook:docs": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs",
245
+ "storybook:serve": "yarn serve -l 6060 .storybook/build",
246
+ "lint": "run-p -c lint:*",
247
+ "lint:eslint": "cross-env TIMING=1 yarn eslint ./",
248
+ "lint:tsc": "tsc --noEmit --diagnostics",
249
+ "lint:prettier": "prettier --check .",
250
+ "fix": "run-s -c fix:*",
251
+ "fix:eslint": "yarn lint:eslint --fix",
252
+ "fix:prettier": "yarn prettier --write .",
253
+ "test": "vitest run",
254
+ "test:watch": "vitest",
255
+ "creevey": "cross-env BABEL_ENV=cjs creevey test -c .creevey/config.mts --storybook-port=6060",
256
+ "creevey:ci": "start-server-and-test storybook:serve http://localhost:6060 creevey",
257
+ "creevey:update": "cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts --update",
258
+ "creevey:ui": "yarn creevey --ui",
259
+ "report:eslint": "yarn eslint -f eslint-html-reporter/reporter.js -o reports/eslint/index.html"
260
+ },
261
+ "license": "MIT",
262
+ "dependencies": {
263
+ "@babel/runtime": "^7.24.6",
264
+ "@emotion/css": "^11.11.2",
265
+ "@skbkontur/colors": "^2.1.1",
266
+ "@skbkontur/react-imask": "^7.6.5",
267
+ "eventemitter3": "^5.0.1",
268
+ "find-dom-node-polyfill": "^1.0.3",
269
+ "invariant": "^2.2.4",
270
+ "focus-lock": "^1.3.5",
271
+ "lodash.debounce": "^4.0.8",
272
+ "lodash.isequal": "^4.5.0",
273
+ "lodash.throttle": "^4.1.1",
274
+ "normalize-wheel": "^1.0.1",
275
+ "react-clientside-effect": "^1.2.6",
276
+ "react-docgen": "7.0.0",
277
+ "react-is": ">=17.0.2",
278
+ "react-transition-group": "^4.4.5",
279
+ "shallowequal": "^1.1.0",
280
+ "stylis-plugin-extra-scope": "^0.3.0",
281
+ "tabbable": "^6.2.0",
282
+ "use-callback-ref": "^1.3.2",
283
+ "use-sidecar": "^1.1.2",
284
+ "warning": "^4.0.3"
285
+ },
286
+ "devDependencies": {
287
+ "@babel/core": "^7.24.6",
288
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
289
+ "@babel/plugin-proposal-decorators": "^7.24.6",
290
+ "@babel/plugin-transform-runtime": "^7.24.6",
291
+ "@babel/preset-env": "^7.24.6",
292
+ "@babel/preset-react": "^7.24.6",
293
+ "@babel/preset-typescript": "^7.24.6",
294
+ "@babel/register": "^7.24.6",
295
+ "@hukopo/eslint-plugin-nodenext-extensions": "^1.0.0",
296
+ "@playwright/test": "1.57.0",
297
+ "@skbkontur/icons": "1.10.0",
298
+ "@skbkontur/storybook-addon-live-examples": "1.0.0-beta.1",
299
+ "@storybook/addon-docs": "8.6.14",
300
+ "@storybook/addon-essentials": "8.6.14",
301
+ "@storybook/addon-links": "8.6.14",
302
+ "@storybook/blocks": "8.6.14",
303
+ "@storybook/node-logger": "^8.6.14",
304
+ "@storybook/react": "8.6.14",
305
+ "@storybook/react-webpack5": "8.6.14",
306
+ "@testing-library/jest-dom": "6.9.1",
307
+ "@testing-library/react": "15.0.7",
308
+ "@testing-library/react-hooks": "^8.0.1",
309
+ "@testing-library/user-event": "14.5.2",
310
+ "@types/invariant": "^2.2.35",
311
+ "@types/lodash.debounce": "^4.0.6",
312
+ "@types/lodash.isequal": "^4.5.5",
313
+ "@types/lodash.throttle": "^4.1.6",
314
+ "@types/react": "19.2.7",
315
+ "@types/react-dom": "19.2.3",
316
+ "@types/react-is": "^19.2.0",
317
+ "@types/react-transition-group": "^4.4.4",
318
+ "@types/shallowequal": "^1.1.1",
319
+ "@types/warning": "^3.0.0",
320
+ "axios": "^1.7.2",
321
+ "babel-loader": "^9.1.3",
322
+ "chalk": "4.1.0",
323
+ "copyfiles": "^2.4.1",
324
+ "core-js": "^3.37.1",
325
+ "creevey": "0.10.34",
326
+ "cross-env": "^7.0.3",
327
+ "css-loader": "^7.1.2",
328
+ "dotenv": "^16.4.5",
329
+ "dts-css-modules-loader": "^2.0.1",
330
+ "eslint-plugin-jest-dom": "^5.4.0",
331
+ "eslint-plugin-react-hooks": "^4.6.2",
332
+ "eslint-plugin-storybook": "^0.8.0",
333
+ "eslint-plugin-testing-library": "^6.2.2",
334
+ "eslint-plugin-vitest": "^0.5.4",
335
+ "file-loader": "^6.2.0",
336
+ "fork-ts-checker-webpack-plugin": "^9.0.2",
337
+ "fs-extra": "^11.2.0",
338
+ "fs-readdir-recursive": "^1.1.0",
339
+ "gh-pages": "^6.1.1",
340
+ "identity-obj-proxy": "^3.0.0",
341
+ "jsdom": "^26.1.0",
342
+ "npm-run-all": "^4.1.5",
343
+ "output-file-sync": "^2.0.1",
344
+ "react": "19.2.1",
345
+ "react-dom": "19.2.1",
346
+ "playwright-core": "1.57.0",
347
+ "react-docgen-typescript": "^2.2.2",
348
+ "rimraf": "^5.0.7",
349
+ "selenium-webdriver": "^4.27.0",
350
+ "semver": "^7.6.2",
351
+ "serve": "^13.0.2",
352
+ "start-server-and-test": "1.14.0",
353
+ "storybook": "8.6.14",
354
+ "string-replace-loader": "3.1.0",
355
+ "style-loader": "^4.0.0",
356
+ "stylelint": "^16.6.0",
357
+ "stylelint-config-standard": "^36.0.0",
358
+ "typescript": "5.9.3",
359
+ "upath": "^2.0.1",
360
+ "url-loader": "^4.1.1",
361
+ "vitest": "^3.2.4",
362
+ "wait-on": "^7.2.0",
363
+ "webpack": "^5.91.0"
364
+ },
365
+ "peerDependencies": {
366
+ "react": ">=16.9 <=19",
367
+ "react-dom": ">=16.9 <=19"
368
368
  }
369
369
  }