@skbkontur/react-ui 4.13.3 → 4.13.4-fix-tooltip-focus.0
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 +11 -0
- package/cjs/components/Input/Input.d.ts +8 -4
- package/cjs/components/Input/Input.js +32 -6
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/Input/Input.md +49 -0
- package/cjs/components/Input/Input.styles.js +2 -1
- package/cjs/components/Input/Input.styles.js.map +1 -1
- package/cjs/components/Toast/Toast.md +2 -2
- package/cjs/components/Tooltip/Tooltip.js +3 -3
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/cjs/internal/themes/DarkTheme.d.ts +1 -0
- package/cjs/internal/themes/DarkTheme.js +6 -5
- package/cjs/internal/themes/DarkTheme.js.map +1 -1
- package/cjs/internal/themes/DefaultTheme.d.ts +1 -0
- package/cjs/internal/themes/DefaultTheme.js +4 -3
- package/cjs/internal/themes/DefaultTheme.js.map +1 -1
- package/cjs/lib/ModalStack.js +4 -2
- package/cjs/lib/ModalStack.js.map +1 -1
- package/cjs/lib/net/fetch.js +4 -4
- package/cjs/lib/net/fetch.js.map +1 -1
- package/cjs/typings/global.d.ts +4 -0
- package/components/Input/Input/Input.js +18 -5
- package/components/Input/Input/Input.js.map +1 -1
- package/components/Input/Input.d.ts +8 -4
- package/components/Input/Input.md +49 -0
- package/components/Input/Input.styles/Input.styles.js +1 -1
- package/components/Input/Input.styles/Input.styles.js.map +1 -1
- package/components/Toast/Toast.md +2 -2
- package/components/Tooltip/Tooltip/Tooltip.js +3 -3
- package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
- package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/internal/themes/DarkTheme/DarkTheme.js +2 -3
- package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
- package/internal/themes/DarkTheme.d.ts +1 -0
- package/internal/themes/DefaultTheme/DefaultTheme.js +5 -4
- package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
- package/internal/themes/DefaultTheme.d.ts +1 -0
- package/lib/ModalStack/ModalStack.js +2 -1
- package/lib/ModalStack/ModalStack.js.map +1 -1
- package/lib/net/fetch/fetch.js +2 -3
- package/lib/net/fetch/fetch.js.map +1 -1
- package/package.json +2 -5
- package/typings/global.d.ts +4 -0
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
|
+
## [4.13.4](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.13.3...@skbkontur/react-ui@4.13.4) (2023-04-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Modal,SidePage:** use safety `globalThat` instead of `global` ([#3142](https://github.com/skbkontur/retail-ui/issues/3142)) ([89df16d](https://github.com/skbkontur/retail-ui/commit/89df16db457455ea70c1c9128d17fedb6b503bf8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.13.3](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.13.2...@skbkontur/react-ui@4.13.3) (2023-04-12)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -3,7 +3,7 @@ import { Nullable, Override } from '../../typings/utility-types';
|
|
|
3
3
|
import { CommonProps } from '../../internal/CommonWrapper';
|
|
4
4
|
export declare type InputSize = 'small' | 'medium' | 'large';
|
|
5
5
|
export declare type InputAlign = 'left' | 'center' | 'right';
|
|
6
|
-
export declare type InputType = 'password' | 'text';
|
|
6
|
+
export declare type InputType = 'password' | 'text' | 'number' | 'tel' | 'search' | 'time' | 'date' | 'url' | 'email' | 'hidden';
|
|
7
7
|
export declare type InputIconType = React.ReactNode | (() => React.ReactNode);
|
|
8
8
|
export interface InputProps extends CommonProps, Override<React.InputHTMLAttributes<HTMLInputElement>, {
|
|
9
9
|
/**
|
|
@@ -30,7 +30,7 @@ export interface InputProps extends CommonProps, Override<React.InputHTMLAttribu
|
|
|
30
30
|
borderless?: boolean;
|
|
31
31
|
/** Выравнивание текста */
|
|
32
32
|
align?: InputAlign;
|
|
33
|
-
/** Паттерн
|
|
33
|
+
/** Паттерн маски. Доступен для типов `text`, `password`, `email`, `tel`, `search`, `url` */
|
|
34
34
|
mask?: Nullable<string>;
|
|
35
35
|
/** Символ маски */
|
|
36
36
|
maskChar?: Nullable<string>;
|
|
@@ -51,7 +51,9 @@ export interface InputProps extends CommonProps, Override<React.InputHTMLAttribu
|
|
|
51
51
|
onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;
|
|
52
52
|
/** Вызывается на label */
|
|
53
53
|
onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Тип. Возможные значения: 'password' | 'text' | 'number' | 'tel' | 'search' | 'time' | 'date' | 'url' | 'email' | 'hidden'
|
|
56
|
+
* */
|
|
55
57
|
type?: InputType;
|
|
56
58
|
/** Значение */
|
|
57
59
|
value?: string;
|
|
@@ -66,7 +68,7 @@ export interface InputProps extends CommonProps, Override<React.InputHTMLAttribu
|
|
|
66
68
|
* `ReactNode` после значения, но перед правой иконкой
|
|
67
69
|
*/
|
|
68
70
|
suffix?: React.ReactNode;
|
|
69
|
-
/** Выделять введенное значение при
|
|
71
|
+
/** Выделять введенное значение при фокусе. Работает с типами `text`, `password`, `tel`, `search`, `url`. [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange) */
|
|
70
72
|
selectAllOnFocus?: boolean;
|
|
71
73
|
/**
|
|
72
74
|
* Обработчик неправильного ввода.
|
|
@@ -133,6 +135,8 @@ export declare class Input extends React.Component<InputProps, InputState> {
|
|
|
133
135
|
get isMaskVisible(): boolean;
|
|
134
136
|
render(): JSX.Element;
|
|
135
137
|
/**
|
|
138
|
+
* Работает с типами `text`, `password`, `tel`, `search`, `url`
|
|
139
|
+
* [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)
|
|
136
140
|
* @public
|
|
137
141
|
*/
|
|
138
142
|
selectAll: () => void;
|
|
@@ -101,6 +101,18 @@ var _Input = require("./Input.styles");var _excluded = ["onMouseEnter", "onMouse
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
104
116
|
|
|
105
117
|
|
|
106
118
|
|
|
@@ -237,6 +249,8 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
|
|
|
237
249
|
|
|
238
250
|
|
|
239
251
|
|
|
252
|
+
|
|
253
|
+
|
|
240
254
|
|
|
241
255
|
|
|
242
256
|
|
|
@@ -299,7 +313,7 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
|
|
|
299
313
|
|
|
300
314
|
|
|
301
315
|
|
|
302
|
-
props.onMouseEnter,onMouseLeave = props.onMouseLeave,onMouseOver = props.onMouseOver,onKeyDown = props.onKeyDown,onKeyPress = props.onKeyPress,onValueChange = props.onValueChange,width = props.width,error = props.error,warning = props.warning,leftIcon = props.leftIcon,rightIcon = props.rightIcon,borderless = props.borderless,value = props.value,align = props.align,type = props.type,mask = props.mask,maskChar = props.maskChar,alwaysShowMask = props.alwaysShowMask,size = props.size,placeholder = props.placeholder,selectAllOnFocus = props.selectAllOnFocus,disabled = props.disabled,onUnexpectedInput = props.onUnexpectedInput,prefix = props.prefix,suffix = props.suffix,formatChars = props.formatChars,ariaDescribedby = props['aria-describedby'],rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
316
|
+
props.onMouseEnter,onMouseLeave = props.onMouseLeave,onMouseOver = props.onMouseOver,onKeyDown = props.onKeyDown,onKeyPress = props.onKeyPress,onValueChange = props.onValueChange,width = props.width,error = props.error,warning = props.warning,leftIcon = props.leftIcon,rightIcon = props.rightIcon,borderless = props.borderless,value = props.value,align = props.align,_props$type = props.type,type = _props$type === void 0 ? 'text' : _props$type,mask = props.mask,maskChar = props.maskChar,alwaysShowMask = props.alwaysShowMask,size = props.size,placeholder = props.placeholder,selectAllOnFocus = props.selectAllOnFocus,disabled = props.disabled,onUnexpectedInput = props.onUnexpectedInput,prefix = props.prefix,suffix = props.suffix,formatChars = props.formatChars,ariaDescribedby = props['aria-describedby'],rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
303
317
|
|
|
304
318
|
var _this$state = _this.state,blinking = _this$state.blinking,focused = _this$state.focused;
|
|
305
319
|
|
|
@@ -335,17 +349,21 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
|
|
|
335
349
|
onBlur: _this.handleBlur,
|
|
336
350
|
style: { textAlign: align },
|
|
337
351
|
ref: _this.refInput,
|
|
338
|
-
type:
|
|
352
|
+
type: type,
|
|
339
353
|
placeholder: !_this.isMaskVisible && !_needsPolyfillPlaceholder.needsPolyfillPlaceholder ? placeholder : undefined,
|
|
340
354
|
disabled: disabled,
|
|
341
355
|
'aria-describedby': ariaDescribedby });
|
|
342
356
|
|
|
343
357
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
358
|
+
var typesDisallowedWithMask = ['number', 'date', 'time', 'hidden'];
|
|
359
|
+
var input =
|
|
360
|
+
mask && !typesDisallowedWithMask.includes(type) ?
|
|
361
|
+
_this.renderMaskedInput(inputProps, mask) : /*#__PURE__*/
|
|
362
|
+
_react.default.createElement('input', inputProps);
|
|
347
363
|
|
|
348
|
-
|
|
364
|
+
if (type === 'hidden') {
|
|
365
|
+
return input;
|
|
366
|
+
}
|
|
349
367
|
|
|
350
368
|
return /*#__PURE__*/(
|
|
351
369
|
_react.default.createElement("label", (0, _extends2.default)({ "data-tid": InputDataTids.root }, labelProps), /*#__PURE__*/
|
|
@@ -505,6 +523,12 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
|
|
|
505
523
|
|
|
506
524
|
if (_this.props.selectAllOnFocus) {
|
|
507
525
|
// https://github.com/facebook/react/issues/7769
|
|
526
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
|
527
|
+
var allowedTypes = ['text', 'password', 'tel', 'search', 'url'];
|
|
528
|
+
var canBeSelected = !_this.props.type || _this.props.type && allowedTypes.includes(_this.props.type);
|
|
529
|
+
if (!canBeSelected) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
508
532
|
_this.input && !_client.isIE11 ? _this.selectAll() : _this.delaySelectAll();
|
|
509
533
|
}
|
|
510
534
|
|
|
@@ -594,5 +618,7 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
|
|
|
594
618
|
* @param {number} start
|
|
595
619
|
* @param {number} end
|
|
596
620
|
*/;_proto.setSelectionRange = function setSelectionRange(start, end) {var _this$props$value,_this3 = this;if (!this.input) {throw new Error('Cannot call "setSelectionRange" on unmounted Input');}if (document.activeElement !== this.input) {this.focus();}if (this.props.mask && this.props.value && ((_this$props$value = this.props.value) == null ? void 0 : _this$props$value.length) < this.props.mask.length) {setTimeout(function () {var _this3$input;(_this3$input = _this3.input) == null ? void 0 : _this3$input.setSelectionRange(start, end);}, 150);} else {var _this$input;(_this$input = this.input) == null ? void 0 : _this$input.setSelectionRange(start, end);}};_proto.render = function render() {var _this4 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this4.theme = theme;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: _this4.setRootNode }, _this4.props), _this4.renderMain);});} /**
|
|
621
|
+
* Работает с типами `text`, `password`, `tel`, `search`, `url`
|
|
622
|
+
* [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)
|
|
597
623
|
* @public
|
|
598
624
|
*/;_proto.renderMaskedInput = function renderMaskedInput(inputProps, mask) {return /*#__PURE__*/_react.default.createElement(_MaskedInput.MaskedInput, (0, _extends2.default)({}, inputProps, { mask: mask, maskChar: this.props.maskChar, alwaysShowMask: this.props.alwaysShowMask, formatChars: this.props.formatChars, onChange: this.props.onChange, onValueChange: this.handleMaskedValueChange, onUnexpectedInput: this.handleUnexpectedInput }));};_proto.getIconSizeClassname = function getIconSizeClassname(right) {if (right === void 0) {right = false;}switch (this.getProps().size) {case 'large':return right ? _Input.styles.rightIconLarge(this.theme) : _Input.styles.leftIconLarge(this.theme);case 'medium':return right ? _Input.styles.rightIconMedium(this.theme) : _Input.styles.leftIconMedium(this.theme);case 'small':default:return right ? _Input.styles.rightIconSmall(this.theme) : _Input.styles.leftIconSmall(this.theme);}};_proto.renderLeftIcon = function renderLeftIcon() {return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());};_proto.renderRightIcon = function renderRightIcon() {return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));};_proto.renderIcon = function renderIcon(icon, sizeClassName) {var _cx5;if (!icon) {return null;}var disabled = this.props.disabled;var iconNode = icon instanceof Function ? icon() : icon;return /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_Input.styles.icon(), sizeClassName, _Input.styles.useDefaultColor(this.theme), (_cx5 = {}, _cx5[_Input.styles.iconFocus(this.theme)] = this.state.focused, _cx5[_Input.styles.iconDisabled()] = disabled, _cx5)) }, iconNode);};_proto.renderPlaceholder = function renderPlaceholder() {var disabled = this.props.disabled;var focused = this.state.focused;var placeholder = null;if (this.state.needsPolyfillPlaceholder && this.props.placeholder && !this.isMaskVisible && !this.props.value && !this.props.defaultValue) {var _cx6;placeholder = /*#__PURE__*/_react.default.createElement("div", { className: (0, _Emotion.cx)(_Input.styles.placeholder(this.theme), (_cx6 = {}, _cx6[_Input.styles.placeholderDisabled(this.theme)] = disabled, _cx6[_Input.styles.placeholderFocus(this.theme)] = focused, _cx6)), style: { textAlign: this.props.align || 'inherit' } }, this.props.placeholder);}return placeholder;};_proto.getSizeClassName = function getSizeClassName() {var _cx7, _cx8, _cx9;switch (this.getProps().size) {case 'large':return (0, _Emotion.cx)((_cx7 = {}, _cx7[_Input.styles.sizeLarge(this.theme)] = true, _cx7[_Input.styles.sizeLargeFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx7));case 'medium':return (0, _Emotion.cx)((_cx8 = {}, _cx8[_Input.styles.sizeMedium(this.theme)] = true, _cx8[_Input.styles.sizeMediumFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx8));case 'small':default:return (0, _Emotion.cx)((_cx9 = {}, _cx9[_Input.styles.sizeSmall(this.theme)] = true, _cx9[_Input.styles.sizeSmallFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx9));}};(0, _createClass2.default)(Input, [{ key: "isMaskVisible", get: function get() {var _this$props3 = this.props,mask = _this$props3.mask,alwaysShowMask = _this$props3.alwaysShowMask;var focused = this.state.focused;return Boolean(mask && (focused || alwaysShowMask));} }]);return Input;}(_react.default.Component), _class2.__KONTUR_REACT_UI__ = 'Input', _class2.defaultProps = { size: 'small' }, _temp)) || _class;exports.Input = Input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Input.tsx"],"names":["InputDataTids","root","Input","rootNode","getProps","defaultProps","state","needsPolyfillPlaceholder","blinking","focused","selectAllId","blinkTimeout","input","selectAll","setSelectionRange","value","length","delaySelectAll","cancelDelayedSelectAll","raf","cancel","cancelBlink","callback","clearTimeout","setState","renderMain","props","onMouseEnter","onMouseLeave","onMouseOver","onKeyDown","onKeyPress","onValueChange","width","error","warning","leftIcon","rightIcon","borderless","align","type","mask","maskChar","alwaysShowMask","size","placeholder","selectAllOnFocus","disabled","onUnexpectedInput","prefix","suffix","formatChars","ariaDescribedby","rest","labelProps","className","styles","theme","getSizeClassName","focus","blink","focusFallback","isIE11","isEdge","warningFallback","errorFallback","style","inputProps","inputFocus","inputDisabled","onChange","handleChange","onFocus","handleFocus","handleKeyDown","handleKeyPress","onBlur","handleBlur","textAlign","ref","refInput","isMaskVisible","undefined","renderMaskedInput","React","createElement","sideContainer","renderLeftIcon","renderPrefix","wrapper","renderPlaceholder","rightContainer","renderSuffix","renderRightIcon","element","MaskedInput","event","fieldIsEmpty","target","e","isDeleteKey","isKeyBackspace","isKeyDelete","currentTarget","repeat","handleUnexpectedInput","maxLength","handleMaskedValueChange","prefixDisabled","suffixDisabled","componentWillUnmount","blur","getNode","offsetWidth","window","setTimeout","start","end","Error","document","activeElement","render","setRootNode","getIconSizeClassname","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","renderIcon","icon","sizeClassName","iconNode","Function","useDefaultColor","iconFocus","iconDisabled","defaultValue","placeholderDisabled","placeholderFocus","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","Boolean","Component","__KONTUR_REACT_UI__"],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,IAAI,EAAE,aADqB,EAAtB,C;;;;;AAMP;AACA;AACA;AACA,G;;AAEaC,K,OADZC,kB;;;;;;;AAQSC,IAAAA,Q,GAAW,0CAAkBF,KAAK,CAACG,YAAxB,C;;AAEZC,IAAAA,K,GAAoB;AACzBC,MAAAA,wBAAwB,EAAxBA,kDADyB;AAEzBC,MAAAA,Q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// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport invariant from 'invariant';\nimport React, { AriaAttributes } from 'react';\nimport raf from 'raf';\n\nimport { isIE11, isEdge } from '../../lib/client';\nimport { isKeyBackspace, isKeyDelete, someKeys } from '../../lib/events/keyboard/identifiers';\nimport { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder';\nimport { Nullable, Override } from '../../typings/utility-types';\nimport { MaskedInput } from '../../internal/MaskedInput';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { styles } from './Input.styles';\n\nexport type InputSize = 'small' | 'medium' | 'large';\nexport type InputAlign = 'left' | 'center' | 'right';\nexport type InputType = 'password' | 'text';\nexport type InputIconType = React.ReactNode | (() => React.ReactNode);\n\nexport interface InputProps\n extends CommonProps,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /**\n * Иконка слева\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n leftIcon?: InputIconType;\n /**\n * Иконка справа\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n rightIcon?: InputIconType;\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n /** Режим прозрачной рамки */\n borderless?: boolean;\n /** Выравнивание текста */\n align?: InputAlign;\n /** Паттерн маски */\n mask?: Nullable<string>;\n /** Символ маски */\n maskChar?: Nullable<string>;\n /**\n * Словарь символов-регулярок для задания маски\n * @default { '9': '[0-9]', 'a': '[A-Za-z]', '*': '[A-Za-z0-9]' }\n */\n formatChars?: Record<string, string>;\n /** Показывать символы маски */\n alwaysShowMask?: boolean;\n /** Размер */\n size?: InputSize;\n /** onValueChange */\n onValueChange?: (value: string) => void;\n /** Вызывается на label */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n /** Тип */\n type?: InputType;\n /** Значение */\n value?: string;\n capture?: boolean;\n\n /**\n * Префикс\n * `ReactNode` перед значением, но после иконки\n */\n prefix?: React.ReactNode;\n /**\n * Суффикс\n * `ReactNode` после значения, но перед правой иконкой\n */\n suffix?: React.ReactNode;\n /** Выделять введенное значение при фокусе */\n selectAllOnFocus?: boolean;\n /**\n * Обработчик неправильного ввода.\n * По-умолчанию, инпут вспыхивает синим.\n * Если передан - вызывается переданный обработчик,\n * в таком случае вспыхивание можно вызвать\n * публичным методом инстанса `blink()`.\n *\n * @param value значение инпута.\n */\n onUnexpectedInput?: (value: string) => void;\n /**\n * Атрибут для указания id элемента(-ов), описывающих его\n */\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n }\n > {}\n\nexport interface InputState {\n blinking: boolean;\n focused: boolean;\n needsPolyfillPlaceholder: boolean;\n}\n\nexport const InputDataTids = {\n root: 'Input__root',\n} as const;\n\ntype DefaultProps = Required<Pick<InputProps, 'size'>>;\n\n/**\n * Интерфейс пропсов наследуется от `React.InputHTMLAttributes<HTMLInputElement>`.\n * Все пропсы кроме перечисленных, `className` и `style` передаются в `<input>`\n */\n@rootNode\nexport class Input extends React.Component<InputProps, InputState> {\n public static __KONTUR_REACT_UI__ = 'Input';\n\n public static defaultProps: DefaultProps = {\n size: 'small',\n };\n\n private getProps = createPropsGetter(Input.defaultProps);\n\n public state: InputState = {\n needsPolyfillPlaceholder,\n blinking: false,\n focused: false,\n };\n\n private selectAllId: number | null = null;\n private theme!: Theme;\n private blinkTimeout = 0;\n private input: HTMLInputElement | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n this.cancelDelayedSelectAll();\n }\n\n /**\n * @public\n */\n public focus() {\n invariant(this.input, 'Cannot call \"focus\" because Input is not mounted');\n this.input.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n invariant(this.input, 'Cannot call \"blur\" because Input is not mounted');\n this.input.blur();\n }\n\n /**\n * @public\n */\n public getNode() {\n return this.input;\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.blinkTimeout) {\n this.cancelBlink(() => {\n // trigger reflow to restart animation\n // @see https://css-tricks.com/restart-css-animation/#article-header-id-0\n void (this.input && this.input.offsetWidth);\n this.blink();\n });\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(this.cancelBlink, 150);\n });\n }\n\n /**\n * @public\n * @param {number} start\n * @param {number} end\n */\n public setSelectionRange(start: number, end: number) {\n if (!this.input) {\n throw new Error('Cannot call \"setSelectionRange\" on unmounted Input');\n }\n\n if (document.activeElement !== this.input) {\n this.focus();\n }\n if (this.props.mask && this.props.value && this.props.value?.length < this.props.mask.length) {\n setTimeout(() => {\n this.input?.setSelectionRange(start, end);\n }, 150);\n } else {\n this.input?.setSelectionRange(start, end);\n }\n }\n\n public get isMaskVisible(): boolean {\n const { mask, alwaysShowMask } = this.props;\n const { focused } = this.state;\n return Boolean(mask && (focused || alwaysShowMask));\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /**\n * @public\n */\n public selectAll = (): void => {\n if (this.input) {\n this.setSelectionRange(0, this.input.value.length);\n }\n };\n\n private delaySelectAll = (): number => (this.selectAllId = raf(this.selectAll));\n\n private cancelDelayedSelectAll = (): void => {\n if (this.selectAllId) {\n raf.cancel(this.selectAllId);\n this.selectAllId = null;\n }\n };\n\n private cancelBlink = (callback?: () => void): void => {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n this.blinkTimeout = 0;\n if (this.state.blinking) {\n this.setState({ blinking: false }, callback);\n return;\n }\n }\n if (callback) {\n callback();\n }\n };\n\n private renderMain = (props: CommonWrapperRestProps<InputProps>) => {\n const {\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onKeyDown,\n onKeyPress,\n onValueChange,\n width,\n error,\n warning,\n leftIcon,\n rightIcon,\n borderless,\n value,\n align,\n type,\n mask,\n maskChar,\n alwaysShowMask,\n size,\n placeholder,\n selectAllOnFocus,\n disabled,\n onUnexpectedInput,\n prefix,\n suffix,\n formatChars,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { blinking, focused } = this.state;\n\n const labelProps = {\n className: cx(styles.root(this.theme), this.getSizeClassName(), {\n [styles.focus(this.theme)]: focused,\n [styles.blink(this.theme)]: blinking,\n [styles.borderless()]: borderless && !focused,\n [styles.disabled(this.theme)]: disabled,\n [styles.warning(this.theme)]: warning,\n [styles.error(this.theme)]: error,\n [styles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [styles.warningFallback(this.theme)]: warning && (isIE11 || isEdge),\n [styles.errorFallback(this.theme)]: error && (isIE11 || isEdge),\n }),\n style: { width },\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n };\n\n const inputProps = {\n ...rest,\n className: cx(styles.input(this.theme), {\n [styles.inputFocus(this.theme)]: focused,\n [styles.inputDisabled(this.theme)]: disabled,\n }),\n value,\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n onBlur: this.handleBlur,\n style: { textAlign: align },\n ref: this.refInput,\n type: 'text',\n placeholder: !this.isMaskVisible && !needsPolyfillPlaceholder ? placeholder : undefined,\n disabled,\n 'aria-describedby': ariaDescribedby,\n };\n\n if (type === 'password') {\n inputProps.type = type;\n }\n\n const input = mask ? this.renderMaskedInput(inputProps, mask) : React.createElement('input', inputProps);\n\n return (\n <label data-tid={InputDataTids.root} {...labelProps}>\n <span className={styles.sideContainer()}>\n {this.renderLeftIcon()}\n {this.renderPrefix()}\n </span>\n <span className={styles.wrapper()}>\n {input}\n {this.renderPlaceholder()}\n </span>\n <span className={cx(styles.sideContainer(), styles.rightContainer())}>\n {this.renderSuffix()}\n {this.renderRightIcon()}\n </span>\n </label>\n );\n };\n\n private renderMaskedInput(\n inputProps: React.InputHTMLAttributes<HTMLInputElement> & {\n capture?: boolean;\n },\n mask: string,\n ) {\n return (\n <MaskedInput\n {...inputProps}\n mask={mask}\n maskChar={this.props.maskChar}\n alwaysShowMask={this.props.alwaysShowMask}\n formatChars={this.props.formatChars}\n onChange={this.props.onChange}\n onValueChange={this.handleMaskedValueChange}\n onUnexpectedInput={this.handleUnexpectedInput}\n />\n );\n }\n\n private getIconSizeClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? styles.rightIconLarge(this.theme) : styles.leftIconLarge(this.theme);\n case 'medium':\n return right ? styles.rightIconMedium(this.theme) : styles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? styles.rightIconSmall(this.theme) : styles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon() {\n return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());\n }\n\n private renderRightIcon() {\n return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));\n }\n\n private renderIcon(icon: InputIconType, sizeClassName: string) {\n if (!icon) {\n return null;\n }\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(styles.icon(), sizeClassName, styles.useDefaultColor(this.theme), {\n [styles.iconFocus(this.theme)]: this.state.focused,\n [styles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n }\n\n private renderPlaceholder() {\n const { disabled } = this.props;\n const { focused } = this.state;\n let placeholder = null;\n\n if (\n this.state.needsPolyfillPlaceholder &&\n this.props.placeholder &&\n !this.isMaskVisible &&\n !this.props.value &&\n !this.props.defaultValue\n ) {\n placeholder = (\n <div\n className={cx(styles.placeholder(this.theme), {\n [styles.placeholderDisabled(this.theme)]: disabled,\n [styles.placeholderFocus(this.theme)]: focused,\n })}\n style={{ textAlign: this.props.align || 'inherit' }}\n >\n {this.props.placeholder}\n </div>\n );\n }\n\n return placeholder;\n }\n\n private getSizeClassName() {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [styles.sizeLarge(this.theme)]: true,\n [styles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [styles.sizeMedium(this.theme)]: true,\n [styles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [styles.sizeSmall(this.theme)]: true,\n [styles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n }\n\n private refInput = (element: HTMLInputElement | MaskedInput | null) => {\n if (element instanceof MaskedInput) {\n this.input = element.input;\n } else {\n this.input = element;\n }\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (needsPolyfillPlaceholder) {\n const fieldIsEmpty = event.target.value === '';\n if (this.state.needsPolyfillPlaceholder !== fieldIsEmpty) {\n this.setState({ needsPolyfillPlaceholder: fieldIsEmpty });\n }\n }\n\n if (this.props.onValueChange) {\n this.props.onValueChange(event.target.value);\n }\n\n if (this.props.onChange) {\n this.props.onChange(event);\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({\n focused: true,\n });\n\n if (this.props.selectAllOnFocus) {\n // https://github.com/facebook/react/issues/7769\n this.input && !isIE11 ? this.selectAll() : this.delaySelectAll();\n }\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n\n const isDeleteKey = someKeys(isKeyBackspace, isKeyDelete)(e);\n\n if (!e.currentTarget.value && isDeleteKey && !e.repeat) {\n this.handleUnexpectedInput();\n }\n };\n\n private handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyPress) {\n this.props.onKeyPress(event);\n }\n\n if (this.props.maxLength === event.currentTarget.value.length) {\n this.handleUnexpectedInput(event.currentTarget.value);\n }\n };\n\n private handleMaskedValueChange = (value: string) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(value);\n }\n };\n\n private handleUnexpectedInput = (value: string = this.props.value || '') => {\n if (this.props.onUnexpectedInput) {\n this.props.onUnexpectedInput(value);\n } else {\n this.blink();\n }\n };\n\n private handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n\n private renderPrefix = () => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(styles.prefix(this.theme), { [styles.prefixDisabled(this.theme)]: disabled })}>{prefix}</span>\n );\n };\n\n private renderSuffix = () => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(styles.suffix(this.theme), { [styles.suffixDisabled(this.theme)]: disabled })}>{suffix}</span>\n );\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["Input.tsx"],"names":["InputDataTids","root","Input","rootNode","getProps","defaultProps","state","needsPolyfillPlaceholder","blinking","focused","selectAllId","blinkTimeout","input","selectAll","setSelectionRange","value","length","delaySelectAll","cancelDelayedSelectAll","raf","cancel","cancelBlink","callback","clearTimeout","setState","renderMain","props","onMouseEnter","onMouseLeave","onMouseOver","onKeyDown","onKeyPress","onValueChange","width","error","warning","leftIcon","rightIcon","borderless","align","type","mask","maskChar","alwaysShowMask","size","placeholder","selectAllOnFocus","disabled","onUnexpectedInput","prefix","suffix","formatChars","ariaDescribedby","rest","labelProps","className","styles","theme","getSizeClassName","focus","blink","focusFallback","isIE11","isEdge","warningFallback","errorFallback","style","inputProps","inputFocus","inputDisabled","onChange","handleChange","onFocus","handleFocus","handleKeyDown","handleKeyPress","onBlur","handleBlur","textAlign","ref","refInput","isMaskVisible","undefined","typesDisallowedWithMask","includes","renderMaskedInput","React","createElement","sideContainer","renderLeftIcon","renderPrefix","wrapper","renderPlaceholder","rightContainer","renderSuffix","renderRightIcon","element","MaskedInput","event","fieldIsEmpty","target","allowedTypes","canBeSelected","e","isDeleteKey","isKeyBackspace","isKeyDelete","currentTarget","repeat","handleUnexpectedInput","maxLength","handleMaskedValueChange","prefixDisabled","suffixDisabled","componentWillUnmount","blur","getNode","offsetWidth","window","setTimeout","start","end","Error","document","activeElement","render","setRootNode","getIconSizeClassname","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","renderIcon","icon","sizeClassName","iconNode","Function","useDefaultColor","iconFocus","iconDisabled","defaultValue","placeholderDisabled","placeholderFocus","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","Boolean","Component","__KONTUR_REACT_UI__"],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,IAAI,EAAE,aADqB,EAAtB,C;;;;;AAMP;AACA;AACA;AACA,G;;AAEaC,K,OADZC,kB;;;;;;;AAQSC,IAAAA,Q,GAAW,0CAAkBF,KAAK,CAACG,YAAxB,C;;AAEZC,IAAAA,K,GAAoB;AACzBC,MAAAA,wBAAwB,EAAxBA,kDADyB;AAEzBC,MAAAA,QAAQ,EAAE,KAFe;AAGzBC,MAAAA,OAAO,EAAE,KAH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,KAAK9F,KAA9B,CAFI,IAEmCK,kBAAUC,cAF7C,QAAP,CAbJ,CAkBD,C,iEArQD,eAAoC,CAClC,mBAAiC,KAAKrC,KAAtC,CAAQe,IAAR,gBAAQA,IAAR,CAAcE,cAAd,gBAAcA,cAAd,CACA,IAAQlC,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR,CACA,OAAO+I,OAAO,CAAC/G,IAAI,KAAKhC,OAAO,IAAIkC,cAAhB,CAAL,CAAd,CACD,C,oBA/FwB2C,eAAMmE,S,WACjBC,mB,GAAsB,O,UAEtBrJ,Y,GAA6B,EACzCuC,IAAI,EAAE,OADmC,E","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport invariant from 'invariant';\nimport React, { AriaAttributes } from 'react';\nimport raf from 'raf';\n\nimport { isIE11, isEdge } from '../../lib/client';\nimport { isKeyBackspace, isKeyDelete, someKeys } from '../../lib/events/keyboard/identifiers';\nimport { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder';\nimport { Nullable, Override } from '../../typings/utility-types';\nimport { MaskedInput } from '../../internal/MaskedInput';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { styles } from './Input.styles';\n\nexport type InputSize = 'small' | 'medium' | 'large';\nexport type InputAlign = 'left' | 'center' | 'right';\nexport type InputType =\n | 'password'\n | 'text'\n | 'number'\n | 'tel'\n | 'search'\n | 'time'\n | 'date'\n | 'url'\n | 'email'\n | 'hidden';\nexport type InputIconType = React.ReactNode | (() => React.ReactNode);\n\nexport interface InputProps\n extends CommonProps,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /**\n * Иконка слева\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n leftIcon?: InputIconType;\n /**\n * Иконка справа\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n rightIcon?: InputIconType;\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n /** Режим прозрачной рамки */\n borderless?: boolean;\n /** Выравнивание текста */\n align?: InputAlign;\n /** Паттерн маски. Доступен для типов `text`, `password`, `email`, `tel`, `search`, `url` */\n mask?: Nullable<string>;\n /** Символ маски */\n maskChar?: Nullable<string>;\n /**\n * Словарь символов-регулярок для задания маски\n * @default { '9': '[0-9]', 'a': '[A-Za-z]', '*': '[A-Za-z0-9]' }\n */\n formatChars?: Record<string, string>;\n /** Показывать символы маски */\n alwaysShowMask?: boolean;\n /** Размер */\n size?: InputSize;\n /** onValueChange */\n onValueChange?: (value: string) => void;\n /** Вызывается на label */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n /**\n * Тип. Возможные значения: 'password' | 'text' | 'number' | 'tel' | 'search' | 'time' | 'date' | 'url' | 'email' | 'hidden'\n * */\n type?: InputType;\n /** Значение */\n value?: string;\n capture?: boolean;\n\n /**\n * Префикс\n * `ReactNode` перед значением, но после иконки\n */\n prefix?: React.ReactNode;\n /**\n * Суффикс\n * `ReactNode` после значения, но перед правой иконкой\n */\n suffix?: React.ReactNode;\n /** Выделять введенное значение при фокусе. Работает с типами `text`, `password`, `tel`, `search`, `url`. [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange) */\n selectAllOnFocus?: boolean;\n /**\n * Обработчик неправильного ввода.\n * По-умолчанию, инпут вспыхивает синим.\n * Если передан - вызывается переданный обработчик,\n * в таком случае вспыхивание можно вызвать\n * публичным методом инстанса `blink()`.\n *\n * @param value значение инпута.\n */\n onUnexpectedInput?: (value: string) => void;\n /**\n * Атрибут для указания id элемента(-ов), описывающих его\n */\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n }\n > {}\n\nexport interface InputState {\n blinking: boolean;\n focused: boolean;\n needsPolyfillPlaceholder: boolean;\n}\n\nexport const InputDataTids = {\n root: 'Input__root',\n} as const;\n\ntype DefaultProps = Required<Pick<InputProps, 'size'>>;\n\n/**\n * Интерфейс пропсов наследуется от `React.InputHTMLAttributes<HTMLInputElement>`.\n * Все пропсы кроме перечисленных, `className` и `style` передаются в `<input>`\n */\n@rootNode\nexport class Input extends React.Component<InputProps, InputState> {\n public static __KONTUR_REACT_UI__ = 'Input';\n\n public static defaultProps: DefaultProps = {\n size: 'small',\n };\n\n private getProps = createPropsGetter(Input.defaultProps);\n\n public state: InputState = {\n needsPolyfillPlaceholder,\n blinking: false,\n focused: false,\n };\n\n private selectAllId: number | null = null;\n private theme!: Theme;\n private blinkTimeout = 0;\n private input: HTMLInputElement | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n this.cancelDelayedSelectAll();\n }\n\n /**\n * @public\n */\n public focus() {\n invariant(this.input, 'Cannot call \"focus\" because Input is not mounted');\n this.input.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n invariant(this.input, 'Cannot call \"blur\" because Input is not mounted');\n this.input.blur();\n }\n\n /**\n * @public\n */\n public getNode() {\n return this.input;\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.blinkTimeout) {\n this.cancelBlink(() => {\n // trigger reflow to restart animation\n // @see https://css-tricks.com/restart-css-animation/#article-header-id-0\n void (this.input && this.input.offsetWidth);\n this.blink();\n });\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(this.cancelBlink, 150);\n });\n }\n\n /**\n * @public\n * @param {number} start\n * @param {number} end\n */\n public setSelectionRange(start: number, end: number) {\n if (!this.input) {\n throw new Error('Cannot call \"setSelectionRange\" on unmounted Input');\n }\n\n if (document.activeElement !== this.input) {\n this.focus();\n }\n if (this.props.mask && this.props.value && this.props.value?.length < this.props.mask.length) {\n setTimeout(() => {\n this.input?.setSelectionRange(start, end);\n }, 150);\n } else {\n this.input?.setSelectionRange(start, end);\n }\n }\n\n public get isMaskVisible(): boolean {\n const { mask, alwaysShowMask } = this.props;\n const { focused } = this.state;\n return Boolean(mask && (focused || alwaysShowMask));\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n /**\n * Работает с типами `text`, `password`, `tel`, `search`, `url`\n * [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)\n * @public\n */\n public selectAll = (): void => {\n if (this.input) {\n this.setSelectionRange(0, this.input.value.length);\n }\n };\n\n private delaySelectAll = (): number => (this.selectAllId = raf(this.selectAll));\n\n private cancelDelayedSelectAll = (): void => {\n if (this.selectAllId) {\n raf.cancel(this.selectAllId);\n this.selectAllId = null;\n }\n };\n\n private cancelBlink = (callback?: () => void): void => {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n this.blinkTimeout = 0;\n if (this.state.blinking) {\n this.setState({ blinking: false }, callback);\n return;\n }\n }\n if (callback) {\n callback();\n }\n };\n\n private renderMain = (props: CommonWrapperRestProps<InputProps>) => {\n const {\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onKeyDown,\n onKeyPress,\n onValueChange,\n width,\n error,\n warning,\n leftIcon,\n rightIcon,\n borderless,\n value,\n align,\n type = 'text',\n mask,\n maskChar,\n alwaysShowMask,\n size,\n placeholder,\n selectAllOnFocus,\n disabled,\n onUnexpectedInput,\n prefix,\n suffix,\n formatChars,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { blinking, focused } = this.state;\n\n const labelProps = {\n className: cx(styles.root(this.theme), this.getSizeClassName(), {\n [styles.focus(this.theme)]: focused,\n [styles.blink(this.theme)]: blinking,\n [styles.borderless()]: borderless && !focused,\n [styles.disabled(this.theme)]: disabled,\n [styles.warning(this.theme)]: warning,\n [styles.error(this.theme)]: error,\n [styles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [styles.warningFallback(this.theme)]: warning && (isIE11 || isEdge),\n [styles.errorFallback(this.theme)]: error && (isIE11 || isEdge),\n }),\n style: { width },\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n };\n\n const inputProps = {\n ...rest,\n className: cx(styles.input(this.theme), {\n [styles.inputFocus(this.theme)]: focused,\n [styles.inputDisabled(this.theme)]: disabled,\n }),\n value,\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n onBlur: this.handleBlur,\n style: { textAlign: align },\n ref: this.refInput,\n type,\n placeholder: !this.isMaskVisible && !needsPolyfillPlaceholder ? placeholder : undefined,\n disabled,\n 'aria-describedby': ariaDescribedby,\n };\n\n const typesDisallowedWithMask: InputType[] = ['number', 'date', 'time', 'hidden'];\n const input =\n mask && !typesDisallowedWithMask.includes(type)\n ? this.renderMaskedInput(inputProps, mask)\n : React.createElement('input', inputProps);\n\n if (type === 'hidden') {\n return input;\n }\n\n return (\n <label data-tid={InputDataTids.root} {...labelProps}>\n <span className={styles.sideContainer()}>\n {this.renderLeftIcon()}\n {this.renderPrefix()}\n </span>\n <span className={styles.wrapper()}>\n {input}\n {this.renderPlaceholder()}\n </span>\n <span className={cx(styles.sideContainer(), styles.rightContainer())}>\n {this.renderSuffix()}\n {this.renderRightIcon()}\n </span>\n </label>\n );\n };\n\n private renderMaskedInput(\n inputProps: React.InputHTMLAttributes<HTMLInputElement> & {\n capture?: boolean;\n },\n mask: string,\n ) {\n return (\n <MaskedInput\n {...inputProps}\n mask={mask}\n maskChar={this.props.maskChar}\n alwaysShowMask={this.props.alwaysShowMask}\n formatChars={this.props.formatChars}\n onChange={this.props.onChange}\n onValueChange={this.handleMaskedValueChange}\n onUnexpectedInput={this.handleUnexpectedInput}\n />\n );\n }\n\n private getIconSizeClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? styles.rightIconLarge(this.theme) : styles.leftIconLarge(this.theme);\n case 'medium':\n return right ? styles.rightIconMedium(this.theme) : styles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? styles.rightIconSmall(this.theme) : styles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon() {\n return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());\n }\n\n private renderRightIcon() {\n return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));\n }\n\n private renderIcon(icon: InputIconType, sizeClassName: string) {\n if (!icon) {\n return null;\n }\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(styles.icon(), sizeClassName, styles.useDefaultColor(this.theme), {\n [styles.iconFocus(this.theme)]: this.state.focused,\n [styles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n }\n\n private renderPlaceholder() {\n const { disabled } = this.props;\n const { focused } = this.state;\n let placeholder = null;\n\n if (\n this.state.needsPolyfillPlaceholder &&\n this.props.placeholder &&\n !this.isMaskVisible &&\n !this.props.value &&\n !this.props.defaultValue\n ) {\n placeholder = (\n <div\n className={cx(styles.placeholder(this.theme), {\n [styles.placeholderDisabled(this.theme)]: disabled,\n [styles.placeholderFocus(this.theme)]: focused,\n })}\n style={{ textAlign: this.props.align || 'inherit' }}\n >\n {this.props.placeholder}\n </div>\n );\n }\n\n return placeholder;\n }\n\n private getSizeClassName() {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [styles.sizeLarge(this.theme)]: true,\n [styles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [styles.sizeMedium(this.theme)]: true,\n [styles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [styles.sizeSmall(this.theme)]: true,\n [styles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n }\n\n private refInput = (element: HTMLInputElement | MaskedInput | null) => {\n if (element instanceof MaskedInput) {\n this.input = element.input;\n } else {\n this.input = element;\n }\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (needsPolyfillPlaceholder) {\n const fieldIsEmpty = event.target.value === '';\n if (this.state.needsPolyfillPlaceholder !== fieldIsEmpty) {\n this.setState({ needsPolyfillPlaceholder: fieldIsEmpty });\n }\n }\n\n if (this.props.onValueChange) {\n this.props.onValueChange(event.target.value);\n }\n\n if (this.props.onChange) {\n this.props.onChange(event);\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({\n focused: true,\n });\n\n if (this.props.selectAllOnFocus) {\n // https://github.com/facebook/react/issues/7769\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n const allowedTypes: InputType[] = ['text', 'password', 'tel', 'search', 'url'];\n const canBeSelected = !this.props.type || (this.props.type && allowedTypes.includes(this.props.type));\n if (!canBeSelected) {\n return;\n }\n this.input && !isIE11 ? this.selectAll() : this.delaySelectAll();\n }\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n\n const isDeleteKey = someKeys(isKeyBackspace, isKeyDelete)(e);\n\n if (!e.currentTarget.value && isDeleteKey && !e.repeat) {\n this.handleUnexpectedInput();\n }\n };\n\n private handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyPress) {\n this.props.onKeyPress(event);\n }\n\n if (this.props.maxLength === event.currentTarget.value.length) {\n this.handleUnexpectedInput(event.currentTarget.value);\n }\n };\n\n private handleMaskedValueChange = (value: string) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(value);\n }\n };\n\n private handleUnexpectedInput = (value: string = this.props.value || '') => {\n if (this.props.onUnexpectedInput) {\n this.props.onUnexpectedInput(value);\n } else {\n this.blink();\n }\n };\n\n private handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n\n private renderPrefix = () => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(styles.prefix(this.theme), { [styles.prefixDisabled(this.theme)]: disabled })}>{prefix}</span>\n );\n };\n\n private renderSuffix = () => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(styles.suffix(this.theme), { [styles.suffixDisabled(this.theme)]: disabled })}>{suffix}</span>\n );\n };\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import SearchIcon from '@skbkontur/react-icons/Search';
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
Очистить значение в `Input`'е можно только с помощью пустой строки
|
|
8
|
+
|
|
8
9
|
```jsx harmony
|
|
9
10
|
import { Button, Group } from '@skbkontur/react-ui';
|
|
10
11
|
|
|
@@ -27,3 +28,51 @@ import SearchIcon from '@skbkontur/react-icons/Search';
|
|
|
27
28
|
rightIcon={<SearchIcon />}
|
|
28
29
|
/>;
|
|
29
30
|
```
|
|
31
|
+
|
|
32
|
+
Примеры разных значений `type`:
|
|
33
|
+
|
|
34
|
+
```jsx harmony
|
|
35
|
+
import { Gapped, Input, Tooltip } from '@skbkontur/react-ui';
|
|
36
|
+
|
|
37
|
+
<Gapped vertical gap={20}>
|
|
38
|
+
<Gapped gap={20}>
|
|
39
|
+
<Input type="password" />
|
|
40
|
+
<span>type = "password"</span>
|
|
41
|
+
</Gapped>
|
|
42
|
+
|
|
43
|
+
<Gapped gap={20}>
|
|
44
|
+
<Input type="number" />
|
|
45
|
+
<span>type = "number"</span>
|
|
46
|
+
</Gapped>
|
|
47
|
+
|
|
48
|
+
<Gapped gap={20}>
|
|
49
|
+
<Input type="tel" />
|
|
50
|
+
<span>type = "tel"</span>
|
|
51
|
+
</Gapped>
|
|
52
|
+
|
|
53
|
+
<Gapped gap={20}>
|
|
54
|
+
<Input type="search" />
|
|
55
|
+
<span>type = "search"</span>
|
|
56
|
+
</Gapped>
|
|
57
|
+
|
|
58
|
+
<Gapped gap={20}>
|
|
59
|
+
<Input type="time" />
|
|
60
|
+
<span>type = "time"</span>
|
|
61
|
+
</Gapped>
|
|
62
|
+
|
|
63
|
+
<Gapped gap={20}>
|
|
64
|
+
<Input type="date" />
|
|
65
|
+
<span>type = "date"</span>
|
|
66
|
+
</Gapped>
|
|
67
|
+
|
|
68
|
+
<Gapped gap={20}>
|
|
69
|
+
<Input type="url" />
|
|
70
|
+
<span>type = "url"</span>
|
|
71
|
+
</Gapped>
|
|
72
|
+
|
|
73
|
+
<Gapped gap={20}>
|
|
74
|
+
<Input type="email" />
|
|
75
|
+
<span>type = "email"</span>
|
|
76
|
+
</Gapped>
|
|
77
|
+
</Gapped>
|
|
78
|
+
```
|
|
@@ -112,7 +112,7 @@ var styles = (0, _Emotion.memoizeStyle)({
|
|
|
112
112
|
},
|
|
113
113
|
|
|
114
114
|
input: function input(t) {
|
|
115
|
-
return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ", ";\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ", ";\n }\n &::-moz-placeholder {\n color: ", ";\n }\n &::placeholder {\n color: ", ";\n }\n "])),
|
|
115
|
+
return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ", ";\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n color-scheme: ", ";\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ", ";\n }\n &::-moz-placeholder {\n color: ", ";\n }\n &::placeholder {\n color: ", ";\n }\n "])),
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -125,6 +125,7 @@ var styles = (0, _Emotion.memoizeStyle)({
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
128
|
+
t.inputColorScheme,
|
|
128
129
|
|
|
129
130
|
|
|
130
131
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Input.styles.ts"],"names":["shouldCompensateFontFamily","fontFamilyCompensation","Boolean","parseInt","styles","wrapper","css","root","t","inputBg","inputBorderWidth","inputBorderColor","inputBorderTopColor","inputShadow","inputColor","inputWidth","borderless","useDefaultColor","inputIconColor","focus","inputFocusedBg","inputBorderColorFocus","inputFocusShadow","focusFallback","inputOutlineWidth","inputFocusOutline","placeholder","inputPlaceholderColor","placeholderFocus","inputPlaceholderColorLight","placeholderDisabled","inputPlaceholderColorDisabled","input","inputTextColor","inputFocus","inputDisabled","inputTextColorDisabled","warning","inputBorderColorWarning","warningFallback","error","inputBorderColorError","errorFallback","disabled","inputDisabledBg","inputDisabledBorderColor","blink","blinkAnimation","keyframes","inputBlinkColor","sizeSmall","inputFontSizeSmall","inputLineHeightSmall","inputPaddingYSmall","inputPaddingXSmall","inputHeightSmall","inputBorderRadiusSmall","sizeSmallFallback","fontFamilyCompensationBaseline","sizeMedium","inputFontSizeMedium","inputLineHeightMedium","inputPaddingYMedium","inputPaddingXMedium","inputHeightMedium","inputBorderRadiusMedium","sizeMediumFallback","sizeLarge","inputFontSizeLarge","inputLineHeightLarge","inputHeightLarge","inputPaddingYLarge","inputPaddingXLarge","inputBorderRadiusLarge","sizeLargeFallback","prefix","prefixDisabled","suffix","suffixDisabled","sideContainer","rightContainer","icon","iconFocus","inputFocusedIconColor","iconDisabled","leftIconSmall","inputIconSizeSmall","inputIconGapSmall","rightIconSmall","leftIconMedium","inputIconSizeMedium","inputIconGapMedium","rightIconMedium","leftIconLarge","inputIconSizeLarge","inputIconGapLarge","rightIconLarge","hideBlinkingCursor"],"mappings":"4QAAA;;AAEA;AACA,iD;;AAEA,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,sBAAD;AACjCC,IAAAA,OAAO,CAACC,QAAQ,CAACF,sBAAD,CAAT,CAD0B,GAAnC;;AAGO,IAAMG,MAAM,GAAG,2BAAa;AACjCC,EAAAA,OADiC,qBACvB;AACR,eAAOC,YAAP;;;;;;;;;;;;;;;;;AAiBD,GAnBgC;;AAqBjCC,EAAAA,IArBiC,gBAqB5BC,CArB4B,EAqBlB;AACb,eAAOF,YAAP;AACI,4BADJ;;;;AAKsBE,IAAAA,CAAC,CAACC,OALxB;AAMYD,IAAAA,CAAC,CAACE,gBANd,EAMwCF,CAAC,CAACG,gBAN1C;AAOsBH,IAAAA,CAAC,CAACI,mBAPxB;AAQgBJ,IAAAA,CAAC,CAACK,WARlB;;AAUWL,IAAAA,CAAC,CAACM,UAVb;;;;;AAeWN,IAAAA,CAAC,CAACO,UAfb;;;;;;AAqBD,GA3CgC;;AA6CjCC,EAAAA,UA7CiC,wBA6CpB;AACX,eAAOV,YAAP;;;;AAID,GAlDgC;;AAoDjCW,EAAAA,eApDiC,2BAoDjBT,CApDiB,EAoDP;AACxB,eAAOF,YAAP;AACWE,IAAAA,CAAC,CAACU,cADb;;AAGD,GAxDgC;;AA0D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aAhYiC,yBAgYnB7E,CAhYmB,EAgYT;AACtB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC8E,kBADjB;AAEmB9E,IAAAA,CAAC,CAAC+E,iBAFrB;;AAID,GArYgC;;AAuYjCC,EAAAA,cAvYiC,0BAuYlBhF,CAvYkB,EAuYR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC8E,kBADjB;AAEkB9E,IAAAA,CAAC,CAAC+E,iBAFpB;;AAID,GA5YgC;;AA8YjCE,EAAAA,cA9YiC,0BA8YlBjF,CA9YkB,EA8YR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACkF,mBADjB;AAEmBlF,IAAAA,CAAC,CAACmF,kBAFrB;;AAID,GAnZgC;;AAqZjCC,EAAAA,eArZiC,2BAqZjBpF,CArZiB,EAqZP;AACxB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACkF,mBADjB;AAEkBlF,IAAAA,CAAC,CAACmF,kBAFpB;;AAID,GA1ZgC;;AA4ZjCE,EAAAA,aA5ZiC,yBA4ZnBrF,CA5ZmB,EA4ZT;AACtB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACsF,kBADjB;AAEmBtF,IAAAA,CAAC,CAACuF,iBAFrB;;AAID,GAjagC;;AAmajCC,EAAAA,cAnaiC,0BAmalBxF,CAnakB,EAmaR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACsF,kBADjB;AAEkBtF,IAAAA,CAAC,CAACuF,iBAFpB;;AAID,GAxagC;;AA0ajCE,EAAAA,kBA1aiC,gCA0aZ;AACnB,eAAO3F,YAAP;;;AAGD,GA9agC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { shift } from '../../lib/styles/DimensionFunctions';\nimport { resetText } from '../../lib/styles/Mixins';\n\nconst shouldCompensateFontFamily = (fontFamilyCompensation: string): boolean =>\n Boolean(parseInt(fontFamilyCompensation));\n\nexport const styles = memoizeStyle({\n wrapper() {\n return css`\n align-items: center;\n display: flex;\n margin: 0;\n min-width: 0;\n overflow: hidden;\n position: relative;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &::before {\n content: '\\\\A0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n root(t: Theme) {\n return css`\n ${resetText()};\n\n align-items: center;\n background-clip: padding-box;\n background-color: ${t.inputBg};\n border: ${t.inputBorderWidth} solid ${t.inputBorderColor};\n border-top-color: ${t.inputBorderTopColor};\n box-shadow: ${t.inputShadow};\n box-sizing: border-box;\n color: ${t.inputColor};\n cursor: text;\n display: inline-flex;\n outline: none;\n position: relative;\n width: ${t.inputWidth};\n\n & * {\n box-sizing: border-box;\n }\n `;\n },\n\n borderless() {\n return css`\n box-shadow: none;\n border-color: transparent;\n `;\n },\n\n useDefaultColor(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n background-color: ${t.inputFocusedBg};\n border-color: ${t.inputBorderColorFocus};\n box-shadow: ${t.inputFocusShadow};\n outline: none;\n z-index: 2;\n `;\n },\n\n focusFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputOutlineWidth} solid ${t.inputFocusOutline};\n `;\n },\n\n placeholder(t: Theme) {\n return css`\n -ms-user-select: none;\n color: ${t.inputPlaceholderColor};\n cursor: text;\n font-size: inherit;\n height: 100%;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n top: 0;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n `;\n },\n\n placeholderFocus(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorLight};\n `;\n },\n\n placeholderDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n input(t: Theme) {\n return css`\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ${t.inputTextColor};\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColor};\n }\n `;\n },\n\n inputFocus(t: Theme) {\n return css`\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n `;\n },\n\n inputDisabled(t: Theme) {\n return css`\n color: ${t.inputTextColorDisabled};\n /* fix text color in safari https://bugs.webkit.org/show_bug.cgi?id=115510 */\n -webkit-text-fill-color: ${t.inputTextColorDisabled};\n\n &:-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n `;\n },\n\n warning(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorWarning};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorWarning};\n z-index: 2;\n `;\n },\n\n warningFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorWarning};\n `;\n },\n\n error(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorError};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorError};\n z-index: 2;\n `;\n },\n\n errorFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorError};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n background-color: ${t.inputDisabledBg};\n border-color: ${t.inputDisabledBorderColor};\n box-shadow: none;\n `;\n },\n\n blink(t: Theme) {\n const blinkAnimation = keyframes`\n 0% {\n background-color: ${t.inputBlinkColor};\n }\n `;\n return css`\n animation: ${blinkAnimation} 0.15s ease-in;\n `;\n },\n\n sizeSmall(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeSmall};\n line-height: ${t.inputLineHeightSmall};\n padding-top: ${t.inputPaddingYSmall};\n padding-bottom: ${t.inputPaddingYSmall};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n height: ${t.inputHeightSmall};\n border-radius: ${t.inputBorderRadiusSmall};\n `;\n },\n\n sizeSmallFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n line-height: normal;\n `;\n },\n\n sizeMedium(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeMedium};\n line-height: ${t.inputLineHeightMedium};\n padding-top: ${t.inputPaddingYMedium};\n padding-bottom: ${t.inputPaddingYMedium};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n height: ${t.inputHeightMedium};\n border-radius: ${t.inputBorderRadiusMedium};\n `;\n },\n\n sizeMediumFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n line-height: normal;\n `;\n },\n\n sizeLarge(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeLarge};\n line-height: ${t.inputLineHeightLarge};\n height: ${t.inputHeightLarge};\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n border-radius: ${t.inputBorderRadiusLarge};\n `;\n },\n\n sizeLargeFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-2' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '2' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n line-height: normal;\n `;\n },\n\n prefix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n prefixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n suffix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n suffixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n sideContainer() {\n return css`\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n\n &::before {\n content: '\\\\a0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n rightContainer() {\n return css`\n justify-self: flex-end;\n margin: 0 0 0 auto;\n padding-left: 0;\n `;\n },\n\n icon() {\n return css`\n flex-shrink: 0;\n cursor: text;\n z-index: 2;\n text-align: center;\n box-sizing: content-box !important; // fix possible \"reset.css\" problem\n `;\n },\n\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n\n iconDisabled() {\n return css`\n cursor: default;\n `;\n },\n\n leftIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-right: ${t.inputIconGapSmall};\n `;\n },\n\n rightIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-left: ${t.inputIconGapSmall};\n `;\n },\n\n leftIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-right: ${t.inputIconGapMedium};\n `;\n },\n\n rightIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-left: ${t.inputIconGapMedium};\n `;\n },\n\n leftIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-right: ${t.inputIconGapLarge};\n `;\n },\n\n rightIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-left: ${t.inputIconGapLarge};\n `;\n },\n\n hideBlinkingCursor() {\n return css`\n caret-color: transparent;\n `;\n },\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["Input.styles.ts"],"names":["shouldCompensateFontFamily","fontFamilyCompensation","Boolean","parseInt","styles","wrapper","css","root","t","inputBg","inputBorderWidth","inputBorderColor","inputBorderTopColor","inputShadow","inputColor","inputWidth","borderless","useDefaultColor","inputIconColor","focus","inputFocusedBg","inputBorderColorFocus","inputFocusShadow","focusFallback","inputOutlineWidth","inputFocusOutline","placeholder","inputPlaceholderColor","placeholderFocus","inputPlaceholderColorLight","placeholderDisabled","inputPlaceholderColorDisabled","input","inputTextColor","inputColorScheme","inputFocus","inputDisabled","inputTextColorDisabled","warning","inputBorderColorWarning","warningFallback","error","inputBorderColorError","errorFallback","disabled","inputDisabledBg","inputDisabledBorderColor","blink","blinkAnimation","keyframes","inputBlinkColor","sizeSmall","inputFontSizeSmall","inputLineHeightSmall","inputPaddingYSmall","inputPaddingXSmall","inputHeightSmall","inputBorderRadiusSmall","sizeSmallFallback","fontFamilyCompensationBaseline","sizeMedium","inputFontSizeMedium","inputLineHeightMedium","inputPaddingYMedium","inputPaddingXMedium","inputHeightMedium","inputBorderRadiusMedium","sizeMediumFallback","sizeLarge","inputFontSizeLarge","inputLineHeightLarge","inputHeightLarge","inputPaddingYLarge","inputPaddingXLarge","inputBorderRadiusLarge","sizeLargeFallback","prefix","prefixDisabled","suffix","suffixDisabled","sideContainer","rightContainer","icon","iconFocus","inputFocusedIconColor","iconDisabled","leftIconSmall","inputIconSizeSmall","inputIconGapSmall","rightIconSmall","leftIconMedium","inputIconSizeMedium","inputIconGapMedium","rightIconMedium","leftIconLarge","inputIconSizeLarge","inputIconGapLarge","rightIconLarge","hideBlinkingCursor"],"mappings":"4QAAA;;AAEA;AACA,iD;;AAEA,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,sBAAD;AACjCC,IAAAA,OAAO,CAACC,QAAQ,CAACF,sBAAD,CAAT,CAD0B,GAAnC;;AAGO,IAAMG,MAAM,GAAG,2BAAa;AACjCC,EAAAA,OADiC,qBACvB;AACR,eAAOC,YAAP;;;;;;;;;;;;;;;;;AAiBD,GAnBgC;;AAqBjCC,EAAAA,IArBiC,gBAqB5BC,CArB4B,EAqBlB;AACb,eAAOF,YAAP;AACI,4BADJ;;;;AAKsBE,IAAAA,CAAC,CAACC,OALxB;AAMYD,IAAAA,CAAC,CAACE,gBANd,EAMwCF,CAAC,CAACG,gBAN1C;AAOsBH,IAAAA,CAAC,CAACI,mBAPxB;AAQgBJ,IAAAA,CAAC,CAACK,WARlB;;AAUWL,IAAAA,CAAC,CAACM,UAVb;;;;;AAeWN,IAAAA,CAAC,CAACO,UAfb;;;;;;AAqBD,GA3CgC;;AA6CjCC,EAAAA,UA7CiC,wBA6CpB;AACX,eAAOV,YAAP;;;;AAID,GAlDgC;;AAoDjCW,EAAAA,eApDiC,2BAoDjBT,CApDiB,EAoDP;AACxB,eAAOF,YAAP;AACWE,IAAAA,CAAC,CAACU,cADb;;AAGD,GAxDgC;;AA0DjCC,EAAAA,KA1DiC,iBA0D3BX,CA1D2B,EA0DjB;AACd,eAAOF,YAAP;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EAiYT;AACtB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC+E,kBADjB;AAEmB/E,IAAAA,CAAC,CAACgF,iBAFrB;;AAID,GAtYgC;;AAwYjCC,EAAAA,cAxYiC,0BAwYlBjF,CAxYkB,EAwYR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC+E,kBADjB;AAEkB/E,IAAAA,CAAC,CAACgF,iBAFpB;;AAID,GA7YgC;;AA+YjCE,EAAAA,cA/YiC,0BA+YlBlF,CA/YkB,EA+YR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACmF,mBADjB;AAEmBnF,IAAAA,CAAC,CAACoF,kBAFrB;;AAID,GApZgC;;AAsZjCC,EAAAA,eAtZiC,2BAsZjBrF,CAtZiB,EAsZP;AACxB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACmF,mBADjB;AAEkBnF,IAAAA,CAAC,CAACoF,kBAFpB;;AAID,GA3ZgC;;AA6ZjCE,EAAAA,aA7ZiC,yBA6ZnBtF,CA7ZmB,EA6ZT;AACtB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACuF,kBADjB;AAEmBvF,IAAAA,CAAC,CAACwF,iBAFrB;;AAID,GAlagC;;AAoajCC,EAAAA,cApaiC,0BAoalBzF,CApakB,EAoaR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACuF,kBADjB;AAEkBvF,IAAAA,CAAC,CAACwF,iBAFpB;;AAID,GAzagC;;AA2ajCE,EAAAA,kBA3aiC,gCA2aZ;AACnB,eAAO5F,YAAP;;;AAGD,GA/agC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { shift } from '../../lib/styles/DimensionFunctions';\nimport { resetText } from '../../lib/styles/Mixins';\n\nconst shouldCompensateFontFamily = (fontFamilyCompensation: string): boolean =>\n Boolean(parseInt(fontFamilyCompensation));\n\nexport const styles = memoizeStyle({\n wrapper() {\n return css`\n align-items: center;\n display: flex;\n margin: 0;\n min-width: 0;\n overflow: hidden;\n position: relative;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &::before {\n content: '\\\\A0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n root(t: Theme) {\n return css`\n ${resetText()};\n\n align-items: center;\n background-clip: padding-box;\n background-color: ${t.inputBg};\n border: ${t.inputBorderWidth} solid ${t.inputBorderColor};\n border-top-color: ${t.inputBorderTopColor};\n box-shadow: ${t.inputShadow};\n box-sizing: border-box;\n color: ${t.inputColor};\n cursor: text;\n display: inline-flex;\n outline: none;\n position: relative;\n width: ${t.inputWidth};\n\n & * {\n box-sizing: border-box;\n }\n `;\n },\n\n borderless() {\n return css`\n box-shadow: none;\n border-color: transparent;\n `;\n },\n\n useDefaultColor(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n background-color: ${t.inputFocusedBg};\n border-color: ${t.inputBorderColorFocus};\n box-shadow: ${t.inputFocusShadow};\n outline: none;\n z-index: 2;\n `;\n },\n\n focusFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputOutlineWidth} solid ${t.inputFocusOutline};\n `;\n },\n\n placeholder(t: Theme) {\n return css`\n -ms-user-select: none;\n color: ${t.inputPlaceholderColor};\n cursor: text;\n font-size: inherit;\n height: 100%;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n top: 0;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n `;\n },\n\n placeholderFocus(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorLight};\n `;\n },\n\n placeholderDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n input(t: Theme) {\n return css`\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ${t.inputTextColor};\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n color-scheme: ${t.inputColorScheme};\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColor};\n }\n `;\n },\n\n inputFocus(t: Theme) {\n return css`\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n `;\n },\n\n inputDisabled(t: Theme) {\n return css`\n color: ${t.inputTextColorDisabled};\n /* fix text color in safari https://bugs.webkit.org/show_bug.cgi?id=115510 */\n -webkit-text-fill-color: ${t.inputTextColorDisabled};\n\n &:-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n `;\n },\n\n warning(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorWarning};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorWarning};\n z-index: 2;\n `;\n },\n\n warningFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorWarning};\n `;\n },\n\n error(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorError};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorError};\n z-index: 2;\n `;\n },\n\n errorFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorError};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n background-color: ${t.inputDisabledBg};\n border-color: ${t.inputDisabledBorderColor};\n box-shadow: none;\n `;\n },\n\n blink(t: Theme) {\n const blinkAnimation = keyframes`\n 0% {\n background-color: ${t.inputBlinkColor};\n }\n `;\n return css`\n animation: ${blinkAnimation} 0.15s ease-in;\n `;\n },\n\n sizeSmall(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeSmall};\n line-height: ${t.inputLineHeightSmall};\n padding-top: ${t.inputPaddingYSmall};\n padding-bottom: ${t.inputPaddingYSmall};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n height: ${t.inputHeightSmall};\n border-radius: ${t.inputBorderRadiusSmall};\n `;\n },\n\n sizeSmallFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n line-height: normal;\n `;\n },\n\n sizeMedium(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeMedium};\n line-height: ${t.inputLineHeightMedium};\n padding-top: ${t.inputPaddingYMedium};\n padding-bottom: ${t.inputPaddingYMedium};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n height: ${t.inputHeightMedium};\n border-radius: ${t.inputBorderRadiusMedium};\n `;\n },\n\n sizeMediumFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n line-height: normal;\n `;\n },\n\n sizeLarge(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeLarge};\n line-height: ${t.inputLineHeightLarge};\n height: ${t.inputHeightLarge};\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n border-radius: ${t.inputBorderRadiusLarge};\n `;\n },\n\n sizeLargeFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-2' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '2' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n line-height: normal;\n `;\n },\n\n prefix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n prefixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n suffix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n suffixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n sideContainer() {\n return css`\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n\n &::before {\n content: '\\\\a0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n rightContainer() {\n return css`\n justify-self: flex-end;\n margin: 0 0 0 auto;\n padding-left: 0;\n `;\n },\n\n icon() {\n return css`\n flex-shrink: 0;\n cursor: text;\n z-index: 2;\n text-align: center;\n box-sizing: content-box !important; // fix possible \"reset.css\" problem\n `;\n },\n\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n\n iconDisabled() {\n return css`\n cursor: default;\n `;\n },\n\n leftIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-right: ${t.inputIconGapSmall};\n `;\n },\n\n rightIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-left: ${t.inputIconGapSmall};\n `;\n },\n\n leftIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-right: ${t.inputIconGapMedium};\n `;\n },\n\n rightIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-left: ${t.inputIconGapMedium};\n `;\n },\n\n leftIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-right: ${t.inputIconGapLarge};\n `;\n },\n\n rightIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-left: ${t.inputIconGapLarge};\n `;\n },\n\n hideBlinkingCursor() {\n return css`\n caret-color: transparent;\n `;\n },\n});\n"]}
|
|
@@ -70,10 +70,10 @@ class Toaster extends React.Component {
|
|
|
70
70
|
|
|
71
71
|
### SuperToast
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Вы можете объединить удобство статических методов и кастамизируемость классического способа через `ref`.
|
|
74
74
|
Для этого можно добавить обёртку, которая позволяет Toast работать по примеру GlobalLoader.
|
|
75
75
|
|
|
76
|
-
Т.е. кастомный Toast можно добавить в единственном месте
|
|
76
|
+
Т.е. кастомный Toast можно добавить в единственном месте в проекте, а статические методы будут всегда использовать последний отрендеренный экземпляр Toast:
|
|
77
77
|
|
|
78
78
|
Также в обёртке можно изменить логику появления всплывашки, по рекомендации Гайдов:
|
|
79
79
|
https://guides.kontur.ru/components/toast/#08
|
|
@@ -527,17 +527,17 @@ Tooltip = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/funct
|
|
|
527
527
|
|
|
528
528
|
handleFocus = function () {
|
|
529
529
|
_this.setState({ focused: true });
|
|
530
|
-
_this.open
|
|
530
|
+
window.setTimeout(_this.open);
|
|
531
531
|
};_this.
|
|
532
532
|
|
|
533
533
|
handleBlur = function () {
|
|
534
534
|
var trigger = _this.getProps().trigger;
|
|
535
535
|
if (trigger === 'hover&focus' && _this.clickedOutside) {
|
|
536
|
-
_this.close
|
|
536
|
+
window.setTimeout(_this.close);
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
if (trigger === 'focus') {
|
|
540
|
-
_this.close
|
|
540
|
+
window.setTimeout(_this.close);
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
_this.clickedOutside = true;
|