@hi-ui/tree-select 4.0.0-beta.23 → 4.0.0-beta.26
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/lib/cjs/TreeSelect.js +2 -6
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/esm/TreeSelect.js +1 -3
- package/lib/esm/styles/index.scss.js +2 -3
- package/package.json +20 -20
- package/lib/cjs/hooks/use-latest/lib/esm/index.js +0 -64
- package/lib/cjs/hooks/use-merge-refs/lib/esm/index.js +0 -76
- package/lib/cjs/ui/input/lib/esm/Input.js +0 -245
- package/lib/cjs/ui/input/lib/esm/MockInput.js +0 -163
- package/lib/cjs/ui/input/lib/esm/styles/index.scss.js +0 -31
- package/lib/cjs/ui/input/lib/esm/use-input.js +0 -138
- package/lib/cjs/ui/input/lib/esm/utils/index.js +0 -201
- package/lib/cjs/utils/dom-utils/lib/esm/index.js +0 -36
- package/lib/esm/hooks/use-latest/lib/esm/index.js +0 -56
- package/lib/esm/hooks/use-merge-refs/lib/esm/index.js +0 -68
- package/lib/esm/ui/input/lib/esm/Input.js +0 -221
- package/lib/esm/ui/input/lib/esm/MockInput.js +0 -141
- package/lib/esm/ui/input/lib/esm/styles/index.scss.js +0 -26
- package/lib/esm/ui/input/lib/esm/use-input.js +0 -127
- package/lib/esm/ui/input/lib/esm/utils/index.js +0 -185
- package/lib/esm/utils/dom-utils/lib/esm/index.js +0 -29
@@ -1,221 +0,0 @@
|
|
1
|
-
/** @LICENSE
|
2
|
-
* @hi-ui/tree-select
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
|
4
|
-
*
|
5
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
6
|
-
*
|
7
|
-
* This source code is licensed under the MIT license found in the
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/
|
10
|
-
import { __rest } from 'tslib';
|
11
|
-
import React, { forwardRef, useMemo, isValidElement, useRef, useCallback, useState } from 'react';
|
12
|
-
import { getPrefixCls, cx } from '@hi-ui/classname';
|
13
|
-
import { __DEV__ } from '@hi-ui/env';
|
14
|
-
import { useMergeRefs } from '../../../../hooks/use-merge-refs/lib/esm/index.js';
|
15
|
-
import { CloseCircleFilled } from '@hi-ui/icons';
|
16
|
-
import { useInput } from './use-input.js';
|
17
|
-
/** @LICENSE
|
18
|
-
* @hi-ui/input
|
19
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
|
20
|
-
*
|
21
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
22
|
-
*
|
23
|
-
* This source code is licensed under the MIT license found in the
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
25
|
-
*/
|
26
|
-
|
27
|
-
var _prefix = getPrefixCls('input');
|
28
|
-
/**
|
29
|
-
* 输入框
|
30
|
-
*
|
31
|
-
* @TODO:
|
32
|
-
* 1. size api 确认
|
33
|
-
* 2. 修改类名结构
|
34
|
-
* 3. 支持带数字展示
|
35
|
-
* 4. InputGroup 模式支持
|
36
|
-
* 5. 手动聚焦支持额外配置
|
37
|
-
*/
|
38
|
-
|
39
|
-
|
40
|
-
var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
|
41
|
-
var _a$prefixCls = _a.prefixCls,
|
42
|
-
prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,
|
43
|
-
_a$role = _a.role,
|
44
|
-
role = _a$role === void 0 ? 'input' : _a$role,
|
45
|
-
className = _a.className,
|
46
|
-
style = _a.style,
|
47
|
-
_a$size = _a.size,
|
48
|
-
size = _a$size === void 0 ? 'md' : _a$size,
|
49
|
-
_a$appearance = _a.appearance,
|
50
|
-
appearance = _a$appearance === void 0 ? 'line' : _a$appearance,
|
51
|
-
prepend = _a.prepend,
|
52
|
-
append = _a.append,
|
53
|
-
prefix = _a.prefix,
|
54
|
-
suffix = _a.suffix,
|
55
|
-
_a$clearableTrigger = _a.clearableTrigger,
|
56
|
-
clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,
|
57
|
-
_a$clearable = _a.clearable,
|
58
|
-
clearable = _a$clearable === void 0 ? false : _a$clearable,
|
59
|
-
_a$invalid = _a.invalid,
|
60
|
-
invalid = _a$invalid === void 0 ? false : _a$invalid,
|
61
|
-
name = _a.name,
|
62
|
-
autoFocus = _a.autoFocus,
|
63
|
-
disabled = _a.disabled,
|
64
|
-
readOnly = _a.readOnly,
|
65
|
-
maxLength = _a.maxLength,
|
66
|
-
placeholder = _a.placeholder,
|
67
|
-
defaultValue = _a.defaultValue,
|
68
|
-
valueProp = _a.value,
|
69
|
-
onChange = _a.onChange,
|
70
|
-
onFocus = _a.onFocus,
|
71
|
-
onBlur = _a.onBlur,
|
72
|
-
trimValueOnBlur = _a.trimValueOnBlur,
|
73
|
-
onClear = _a.onClear,
|
74
|
-
type = _a.type,
|
75
|
-
containerRef = _a.containerRef,
|
76
|
-
rest = __rest(_a, ["prefixCls", "role", "className", "style", "size", "appearance", "prepend", "append", "prefix", "suffix", "clearableTrigger", "clearable", "invalid", "name", "autoFocus", "disabled", "readOnly", "maxLength", "placeholder", "defaultValue", "value", "onChange", "onFocus", "onBlur", "trimValueOnBlur", "onClear", "type", "containerRef"]); // @TODO: 临时方案,后面迁移至 InputGroup
|
77
|
-
|
78
|
-
|
79
|
-
var _useMemo = useMemo(function () {
|
80
|
-
var shouldUnset = [false, false]; // @ts-ignore
|
81
|
-
// @ts-ignore
|
82
|
-
|
83
|
-
if (
|
84
|
-
/*#__PURE__*/
|
85
|
-
|
86
|
-
/*#__PURE__*/
|
87
|
-
isValidElement(prepend) && ['Select', 'Button'].includes(prepend.type.HiName)) {
|
88
|
-
shouldUnset[0] = true;
|
89
|
-
} // @ts-ignore
|
90
|
-
// @ts-ignore
|
91
|
-
|
92
|
-
|
93
|
-
if (
|
94
|
-
/*#__PURE__*/
|
95
|
-
|
96
|
-
/*#__PURE__*/
|
97
|
-
isValidElement(append) && ['Select', 'Button'].includes(append.type.HiName)) {
|
98
|
-
shouldUnset[1] = true;
|
99
|
-
}
|
100
|
-
|
101
|
-
return shouldUnset;
|
102
|
-
}, [prepend, append]),
|
103
|
-
unsetPrepend = _useMemo[0],
|
104
|
-
unsetAppend = _useMemo[1];
|
105
|
-
|
106
|
-
var inputElementRef = useRef(null);
|
107
|
-
var proxyOnChange = useCallback(function (value, evt) {
|
108
|
-
if (!onChange) return;
|
109
|
-
onChangeMock(onChange, evt, inputElementRef.current, value);
|
110
|
-
}, [onChange]);
|
111
|
-
var clearElementRef = useRef(null);
|
112
|
-
|
113
|
-
var _useInput = useInput({
|
114
|
-
clearElementRef: clearElementRef,
|
115
|
-
name: name,
|
116
|
-
autoFocus: autoFocus,
|
117
|
-
disabled: disabled,
|
118
|
-
readOnly: readOnly,
|
119
|
-
maxLength: maxLength,
|
120
|
-
placeholder: placeholder,
|
121
|
-
defaultValue: defaultValue,
|
122
|
-
value: valueProp,
|
123
|
-
onChange: proxyOnChange,
|
124
|
-
onFocus: onFocus,
|
125
|
-
onBlur: onBlur,
|
126
|
-
trimValueOnBlur: trimValueOnBlur,
|
127
|
-
type: type
|
128
|
-
}),
|
129
|
-
tryChangeValue = _useInput.tryChangeValue,
|
130
|
-
focused = _useInput.focused,
|
131
|
-
value = _useInput.value,
|
132
|
-
getInputProps = _useInput.getInputProps;
|
133
|
-
|
134
|
-
var focus = useCallback(function () {
|
135
|
-
var _a;
|
136
|
-
|
137
|
-
(_a = inputElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
138
|
-
}, []);
|
139
|
-
|
140
|
-
var _useState = useState(false),
|
141
|
-
hover = _useState[0],
|
142
|
-
setHover = _useState[1]; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清楚
|
143
|
-
|
144
|
-
|
145
|
-
var showClearableIcon = clearable && !!value && !disabled;
|
146
|
-
var mergedRef = useMergeRefs(ref, inputElementRef);
|
147
|
-
var cls = cx(prefixCls, className, prefixCls + "--size-" + size, prefixCls + "--appearance-" + appearance);
|
148
|
-
var outerCls = cx(prefixCls + "__outer", prepend && prefixCls + "__outer--prepend", prepend && unsetPrepend && prefixCls + "__outer--prepend-unset", append && prefixCls + "__outer--append", append && unsetAppend && prefixCls + "__outer--append-unset");
|
149
|
-
return /*#__PURE__*/React.createElement("div", {
|
150
|
-
role: role,
|
151
|
-
className: cls,
|
152
|
-
style: style,
|
153
|
-
ref: containerRef
|
154
|
-
}, /*#__PURE__*/React.createElement("div", {
|
155
|
-
className: outerCls
|
156
|
-
}, prepend ? /*#__PURE__*/React.createElement("div", {
|
157
|
-
className: prefixCls + "__prepend"
|
158
|
-
}, prepend) : null, /*#__PURE__*/React.createElement("div", {
|
159
|
-
className: cx(prefixCls + "__inner", prefix && prefixCls + "__inner--prefix", suffix && prefixCls + "__inner--suffix", focused && prefixCls + "__inner--focused", disabled && prefixCls + "__inner--disabled", readOnly && prefixCls + "__inner--readonly", invalid && prefixCls + "__inner--invalid"),
|
160
|
-
onMouseOver: function onMouseOver(e) {
|
161
|
-
setHover(true);
|
162
|
-
},
|
163
|
-
onMouseLeave: function onMouseLeave(e) {
|
164
|
-
setHover(false);
|
165
|
-
}
|
166
|
-
}, prefix ? /*#__PURE__*/React.createElement("span", {
|
167
|
-
className: prefixCls + "__prefix"
|
168
|
-
}, prefix) : null, /*#__PURE__*/React.createElement("input", Object.assign({
|
169
|
-
ref: mergedRef,
|
170
|
-
className: prefixCls + "__text"
|
171
|
-
}, getInputProps(), rest)), suffix || showClearableIcon ? /*#__PURE__*/React.createElement("span", {
|
172
|
-
className: prefixCls + "__suffix"
|
173
|
-
}, showClearableIcon ? /*#__PURE__*/React.createElement("span", {
|
174
|
-
ref: clearElementRef,
|
175
|
-
className: cx(prefixCls + "__clear", (clearableTrigger === 'always' || hover) && prefixCls + "__clear--active"),
|
176
|
-
role: "button",
|
177
|
-
tabIndex: -1,
|
178
|
-
onClick: function onClick(evt) {
|
179
|
-
tryChangeValue('', evt);
|
180
|
-
onClear === null || onClear === void 0 ? void 0 : onClear();
|
181
|
-
focus();
|
182
|
-
}
|
183
|
-
}, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : null, suffix) : null), append ? /*#__PURE__*/React.createElement("div", {
|
184
|
-
className: prefixCls + "__append"
|
185
|
-
}, append) : null));
|
186
|
-
});
|
187
|
-
|
188
|
-
if (__DEV__) {
|
189
|
-
Input.displayName = 'Input';
|
190
|
-
}
|
191
|
-
/**
|
192
|
-
* 模拟伪装目标事件 target
|
193
|
-
*
|
194
|
-
* @param target
|
195
|
-
* @param evt
|
196
|
-
* @param onChange
|
197
|
-
* @param targetValue
|
198
|
-
* @returns
|
199
|
-
*/
|
200
|
-
|
201
|
-
|
202
|
-
function onChangeMock(onChange, evt, target, targetValue) {
|
203
|
-
var event = evt; // 点击 clearIcon 或者 失焦 trim 时,都会代理 onChange 的事件对象 target 指向 input.target
|
204
|
-
|
205
|
-
if (evt.type !== 'change') {
|
206
|
-
if (!target) return;
|
207
|
-
var originalTargetValue = target.value;
|
208
|
-
event = Object.create(evt);
|
209
|
-
event.target = target;
|
210
|
-
event.currentTarget = target;
|
211
|
-
target.value = targetValue;
|
212
|
-
onChange(event, targetValue); // 重置为之前值
|
213
|
-
|
214
|
-
target.value = originalTargetValue;
|
215
|
-
return;
|
216
|
-
}
|
217
|
-
|
218
|
-
onChange(event, targetValue);
|
219
|
-
}
|
220
|
-
|
221
|
-
export { Input, onChangeMock };
|
@@ -1,141 +0,0 @@
|
|
1
|
-
/** @LICENSE
|
2
|
-
* @hi-ui/tree-select
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
|
4
|
-
*
|
5
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
6
|
-
*
|
7
|
-
* This source code is licensed under the MIT license found in the
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/
|
10
|
-
import { __rest } from 'tslib';
|
11
|
-
import React, { forwardRef, useMemo, useCallback, useState } from 'react';
|
12
|
-
import { getPrefixCls, cx } from '@hi-ui/classname';
|
13
|
-
import { __DEV__ } from '@hi-ui/env';
|
14
|
-
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
15
|
-
import { CloseCircleFilled } from '@hi-ui/icons';
|
16
|
-
/** @LICENSE
|
17
|
-
* @hi-ui/input
|
18
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
|
19
|
-
*
|
20
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
21
|
-
*
|
22
|
-
* This source code is licensed under the MIT license found in the
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
24
|
-
*/
|
25
|
-
|
26
|
-
var _role = 'mock-input';
|
27
|
-
|
28
|
-
var _prefix = getPrefixCls(_role);
|
29
|
-
|
30
|
-
var NOOP_VALUE = '';
|
31
|
-
var NOOP_ARRAY = [];
|
32
|
-
/**
|
33
|
-
* 支持自定义渲染输入框内容,暂时仅供内部 Picker 类组件使用,不对外提供
|
34
|
-
*/
|
35
|
-
|
36
|
-
var MockInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
37
|
-
var _a$prefixCls = _a.prefixCls,
|
38
|
-
prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,
|
39
|
-
_a$role = _a.role,
|
40
|
-
role = _a$role === void 0 ? _role : _a$role,
|
41
|
-
className = _a.className,
|
42
|
-
_a$data = _a.data,
|
43
|
-
data = _a$data === void 0 ? NOOP_ARRAY : _a$data,
|
44
|
-
_a$defaultValue = _a.defaultValue,
|
45
|
-
defaultValue = _a$defaultValue === void 0 ? NOOP_VALUE : _a$defaultValue,
|
46
|
-
valueProp = _a.value,
|
47
|
-
onChange = _a.onChange,
|
48
|
-
placeholder = _a.placeholder,
|
49
|
-
_a$disabled = _a.disabled,
|
50
|
-
disabled = _a$disabled === void 0 ? false : _a$disabled,
|
51
|
-
_a$clearable = _a.clearable,
|
52
|
-
clearable = _a$clearable === void 0 ? false : _a$clearable,
|
53
|
-
_a$focused = _a.focused,
|
54
|
-
focused = _a$focused === void 0 ? false : _a$focused,
|
55
|
-
_a$invalid = _a.invalid,
|
56
|
-
invalid = _a$invalid === void 0 ? false : _a$invalid,
|
57
|
-
_a$readOnly = _a.readOnly,
|
58
|
-
readOnly = _a$readOnly === void 0 ? false : _a$readOnly,
|
59
|
-
_a$size = _a.size,
|
60
|
-
size = _a$size === void 0 ? 'md' : _a$size,
|
61
|
-
_a$appearance = _a.appearance,
|
62
|
-
appearance = _a$appearance === void 0 ? 'line' : _a$appearance,
|
63
|
-
_a$clearableTrigger = _a.clearableTrigger,
|
64
|
-
clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,
|
65
|
-
displayRender = _a.displayRender,
|
66
|
-
suffix = _a.suffix,
|
67
|
-
_onMouseOver = _a.onMouseOver,
|
68
|
-
_onMouseLeave = _a.onMouseLeave,
|
69
|
-
rest = __rest(_a, ["prefixCls", "role", "className", "data", "defaultValue", "value", "onChange", "placeholder", "disabled", "clearable", "focused", "invalid", "readOnly", "size", "appearance", "clearableTrigger", "displayRender", "suffix", "onMouseOver", "onMouseLeave"]);
|
70
|
-
|
71
|
-
var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),
|
72
|
-
value = _useUncontrolledState[0],
|
73
|
-
tryChangeValue = _useUncontrolledState[1];
|
74
|
-
|
75
|
-
var displayItem = useMemo(function () {
|
76
|
-
if (value === '') return null;
|
77
|
-
var displayItem = data.find(function (item) {
|
78
|
-
return item.id === value;
|
79
|
-
});
|
80
|
-
return displayItem || null;
|
81
|
-
}, [value, data]);
|
82
|
-
var displayValue = useMemo(function () {
|
83
|
-
if (!displayItem) return '';
|
84
|
-
|
85
|
-
if (displayRender) {
|
86
|
-
return displayRender(displayItem);
|
87
|
-
}
|
88
|
-
|
89
|
-
return displayItem.title;
|
90
|
-
}, [displayItem, displayRender]);
|
91
|
-
var handleClear = useCallback(function (evt) {
|
92
|
-
if (disabled) return;
|
93
|
-
evt.stopPropagation();
|
94
|
-
tryChangeValue(NOOP_VALUE, displayItem);
|
95
|
-
}, [tryChangeValue, disabled, displayItem]);
|
96
|
-
|
97
|
-
var _useState = useState(false),
|
98
|
-
hover = _useState[0],
|
99
|
-
setHover = _useState[1];
|
100
|
-
|
101
|
-
var trySetHover = useCallback(function (hovered) {
|
102
|
-
if (disabled) return;
|
103
|
-
setHover(hovered);
|
104
|
-
}, [disabled]);
|
105
|
-
var hasValue = !!displayValue; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清除
|
106
|
-
|
107
|
-
var showClearableIcon = useMemo(function () {
|
108
|
-
return clearable && hasValue && !disabled && (clearableTrigger === 'always' || hover);
|
109
|
-
}, [clearable, hasValue, disabled, clearableTrigger, hover]);
|
110
|
-
var cls = cx(prefixCls, className, prefixCls + "--appearance-" + appearance, prefixCls + "--size-" + size, focused && "focused", disabled && 'disabled', readOnly && 'readonly', invalid && 'invalid');
|
111
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({
|
112
|
-
ref: ref,
|
113
|
-
role: role,
|
114
|
-
className: cls,
|
115
|
-
onMouseOver: function onMouseOver(evt) {
|
116
|
-
trySetHover(true);
|
117
|
-
_onMouseOver === null || _onMouseOver === void 0 ? void 0 : _onMouseOver(evt);
|
118
|
-
},
|
119
|
-
onMouseLeave: function onMouseLeave(evt) {
|
120
|
-
trySetHover(false);
|
121
|
-
_onMouseLeave === null || _onMouseLeave === void 0 ? void 0 : _onMouseLeave(evt);
|
122
|
-
}
|
123
|
-
}, rest), hasValue ? /*#__PURE__*/React.createElement("span", {
|
124
|
-
className: prefixCls + "__value"
|
125
|
-
}, displayValue) : /*#__PURE__*/React.createElement("span", {
|
126
|
-
className: prefixCls + "__placeholder"
|
127
|
-
}, placeholder), suffix || showClearableIcon ? /*#__PURE__*/React.createElement("span", {
|
128
|
-
className: prefixCls + "__suffix"
|
129
|
-
}, showClearableIcon ? /*#__PURE__*/React.createElement("span", {
|
130
|
-
role: "button",
|
131
|
-
tabIndex: -1,
|
132
|
-
className: cx(prefixCls + "__clear", 'active'),
|
133
|
-
onClick: handleClear
|
134
|
-
}, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : suffix) : null);
|
135
|
-
});
|
136
|
-
|
137
|
-
if (__DEV__) {
|
138
|
-
MockInput.displayName = 'MockInput';
|
139
|
-
}
|
140
|
-
|
141
|
-
export { MockInput };
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/** @LICENSE
|
2
|
-
* @hi-ui/tree-select
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
|
4
|
-
*
|
5
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
6
|
-
*
|
7
|
-
* This source code is licensed under the MIT license found in the
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/
|
10
|
-
|
11
|
-
/** @LICENSE
|
12
|
-
* @hi-ui/input
|
13
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
|
14
|
-
*
|
15
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
16
|
-
*
|
17
|
-
* This source code is licensed under the MIT license found in the
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
19
|
-
*/
|
20
|
-
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-mock-input {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: text;\n background-color: transparent;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n overflow: hidden;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n width: 100%;\n height: auto;\n z-index: auto;\n font-size: inherit;\n line-height: inherit;\n color: var(--hi-v4-color-gray-700, #1f2733);\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-mock-input:not(.disabled):hover {\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-mock-input:not(.disabled).focused {\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-mock-input.disabled {\n cursor: not-allowed; }\n.hi-v4-mock-input__suffix, .hi-v4-mock-input__placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-mock-input__clear {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 16px;\n height: 16px;\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n text-align: center;\n color: var(--hi-v4-color-gray-500, #929aa6);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n cursor: pointer;\n visibility: hidden;\n opacity: 0;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)); }\n.hi-v4-mock-input__clear:hover {\n color: var(--hi-v4-color-static-black, #000); }\n.hi-v4-mock-input__clear.active {\n visibility: visible;\n opacity: 1; }\n.hi-v4-mock-input__suffix {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n font-size: var(--hi-v4-text-size-lg, 1rem);\n padding-left: var(--hi-v4-spacing-4, 8px);\n text-align: center; }\n.hi-v4-mock-input__value {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n.hi-v4-mock-input--size-sm.hi-v4-mock-input {\n height: var(--hi-v4-height-6, 24px);\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);\n border-radius: var(--hi-v4-border-radius-md, 4px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-md.hi-v4-mock-input {\n height: var(--hi-v4-height-8, 32px);\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n line-height: var(--hi-v4-text-lineheight-md, 1.375rem);\n border-radius: var(--hi-v4-border-radius-md, 4px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-lg.hi-v4-mock-input {\n height: var(--hi-v4-height-10, 40px);\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: var(--hi-v4-text-lineheight-lg, 1.5rem);\n border-radius: var(--hi-v4-border-radius-md, 4px);\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input {\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled):hover {\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled).invalid {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled).invalid.hover {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9));\n box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9)); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input {\n width: auto;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n border-color: transparent; }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled):hover {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled).invalid {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled).invalid.hover {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9));\n box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9)); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input:not(.disabled):hover {\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input:not(.disabled).invalid {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input:not(.disabled).invalid.hover {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9));\n box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9)); }\n.hi-v4-mock-input--appearance-line.disabled.hi-v4-mock-input, .hi-v4-mock-input--appearance-unset.disabled.hi-v4-mock-input, .hi-v4-mock-input--appearance-filled.disabled.hi-v4-mock-input {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-mock-input--appearance-line.disabled.hi-v4-mock-input, .hi-v4-mock-input--appearance-filled.disabled.hi-v4-mock-input {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-input {\n position: relative;\n display: inline-block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%; }\n.hi-v4-input__outer {\n margin: 0;\n padding: 0;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n height: 100%;\n width: 100%; }\n.hi-v4-input__text {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: text;\n background-color: transparent;\n -webkit-tap-highlight-color: transparent;\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n display: inline-block;\n box-sizing: border-box;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n width: 100%;\n font-size: inherit;\n line-height: inherit;\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-input__text::-webkit-input-placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::-moz-placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::-ms-input-placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text:-ms-input-placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::placeholder {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text:disabled {\n cursor: not-allowed; }\n.hi-v4-input__inner {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n height: auto;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: inherit;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: var(--hi-v4-color-static-white, #fff);\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n outline: none;\n z-index: auto; }\n.hi-v4-input__inner:not(.hi-v4-input__inner--disabled):hover {\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--focused {\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-input__clear {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: auto;\n text-align: center;\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n color: var(--hi-v4-color-gray-500, #929aa6);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n cursor: pointer;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n visibility: hidden;\n opacity: 0; }\n.hi-v4-input__clear:hover {\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-input__clear.hi-v4-input__clear--active {\n visibility: visible;\n opacity: 1; }\n.hi-v4-input__inner--suffix .hi-v4-input__clear {\n -webkit-margin-end: var(--hi-v4-spacing-2, 4px);\n margin-inline-end: var(--hi-v4-spacing-2, 4px); }\n.hi-v4-input__prefix, .hi-v4-input__suffix {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: inherit;\n text-align: center; }\n.hi-v4-input__prefix {\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input__suffix {\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input__prepend, .hi-v4-input__append {\n position: relative;\n color: var(--hi-v4-color-gray-700, #1f2733);\n background-color: var(--hi-v4-color-gray-50, #f5f7fa);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n font-size: inherit;\n text-align: center;\n padding: 0 calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n white-space: nowrap;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));\n z-index: var(--hi-v4-zindex-absolute, 1); }\n.hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n margin-right: -1px; }\n.hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px; }\n.hi-v4-input--size-sm {\n height: var(--hi-v4-height-6, 24px);\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: var(--hi-v4-text-lineheight-sm, 1.25rem); }\n.hi-v4-input--size-sm .hi-v4-input__text {\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-sm .hi-v4-input__inner,\n .hi-v4-input--size-sm .hi-v4-input__prepend,\n .hi-v4-input--size-sm .hi-v4-input__append {\n border-radius: var(--hi-v4-border-radius-md, 4px); }\n.hi-v4-input--size-sm .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-sm .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--size-md {\n height: var(--hi-v4-height-8, 32px);\n font-size: var(--hi-v4-text-size-md, 0.875rem);\n line-height: var(--hi-v4-text-lineheight-md, 1.375rem); }\n.hi-v4-input--size-md .hi-v4-input__text {\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-md .hi-v4-input__inner,\n .hi-v4-input--size-md .hi-v4-input__prepend,\n .hi-v4-input--size-md .hi-v4-input__append {\n border-radius: var(--hi-v4-border-radius-md, 4px); }\n.hi-v4-input--size-md .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-md .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--size-lg {\n height: var(--hi-v4-height-10, 40px);\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: var(--hi-v4-text-lineheight-lg, 1.5rem); }\n.hi-v4-input--size-lg .hi-v4-input__text {\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-lg .hi-v4-input__inner,\n .hi-v4-input--size-lg .hi-v4-input__prepend,\n .hi-v4-input--size-lg .hi-v4-input__append {\n border-radius: var(--hi-v4-border-radius-md, 4px); }\n.hi-v4-input--size-lg .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-lg .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--appearance-line .hi-v4-input__inner {\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-input--appearance-line .hi-v4-input__inner:not(.hi-v4-input__inner--disabled):hover {\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-input--appearance-line .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-input--appearance-line .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-line .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid:hover {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-line .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid.hi-v4-input__inner--focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9));\n box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9)); }\n.hi-v4-input--appearance-line .hi-v4-input__prepend,\n .hi-v4-input--appearance-line .hi-v4-input__append {\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-input--appearance-unset .hi-v4-input__text {\n padding-left: 0;\n padding-right: 0; }\n.hi-v4-input--appearance-unset.hi-v4-input__outer--prepend .hi-v4-input__text,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--prefix .hi-v4-input__text {\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-unset.hi-v4-input__outer--append .hi-v4-input__text,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--suffix .hi-v4-input__text {\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-unset .hi-v4-input__inner {\n border-radius: 0; }\n.hi-v4-input--appearance-filled .hi-v4-input__inner {\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.hi-v4-input__inner--disabled):hover {\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n box-shadow: 0 0 0 2px var(--hi-v4-color-primary-100, var(--hi-v4-color-brandblue-100, #bde2ff));\n border-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid:hover {\n border-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid.hi-v4-input__inner--focused {\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9));\n box-shadow: 0 0 0 2px var(--hi-v4-color-danger-100, var(--hi-v4-color-red-100, #ffd1c9)); }\n.hi-v4-input--appearance-underline .hi-v4-input__text {\n padding-left: 0;\n padding-right: 0; }\n.hi-v4-input--appearance-underline.hi-v4-input__outer--prepend .hi-v4-input__text,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--prefix .hi-v4-input__text {\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-underline.hi-v4-input__outer--append .hi-v4-input__text,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--suffix .hi-v4-input__text {\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner {\n border-radius: 0; }\n.hi-v4-input--appearance-underline .hi-v4-input__inner::after {\n content: '';\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: block;\n position: absolute;\n bottom: 0;\n left: -1px;\n right: -1px;\n border-bottom: 1px solid var(--hi-v4-color-gray-300, #dfe2e8);\n -webkit-transition: all 0.3s;\n transition: all 0.3s; }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.hi-v4-input__inner--disabled):hover::after {\n border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--focused::after {\n border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa)); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid::after {\n border-bottom-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.hi-v4-input__inner--disabled).hi-v4-input__inner--invalid.hover::after {\n border-bottom-color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959)); }\n.hi-v4-input--appearance-line .hi-v4-input__inner.hi-v4-input__inner--disabled, .hi-v4-input--appearance-filled .hi-v4-input__inner.hi-v4-input__inner--disabled {\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-input--appearance-line .hi-v4-input__inner.hi-v4-input__inner--disabled .hi-v4-input__text, .hi-v4-input--appearance-filled .hi-v4-input__inner.hi-v4-input__inner--disabled .hi-v4-input__text {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input--appearance-unset .hi-v4-input__inner.hi-v4-input__inner--disabled, .hi-v4-input--appearance-underline .hi-v4-input__inner.hi-v4-input__inner--disabled {\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: transparent; }\n.hi-v4-input--appearance-unset .hi-v4-input__inner.hi-v4-input__inner--disabled .hi-v4-input__text, .hi-v4-input--appearance-underline .hi-v4-input__inner.hi-v4-input__inner--disabled .hi-v4-input__text {\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__outer--prepend .hi-v4-input__inner {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend {\n border: none;\n padding: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend .hi-v4-mock-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend .hi-v4-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--append .hi-v4-input__inner {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append {\n border: none;\n padding: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append .hi-v4-mock-input {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append .hi-v4-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n";
|
21
|
-
|
22
|
-
var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
|
23
|
-
|
24
|
-
__styleInject__(css_248z);
|
25
|
-
|
26
|
-
export { css_248z as default };
|
@@ -1,127 +0,0 @@
|
|
1
|
-
/** @LICENSE
|
2
|
-
* @hi-ui/tree-select
|
3
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
|
4
|
-
*
|
5
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
6
|
-
*
|
7
|
-
* This source code is licensed under the MIT license found in the
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/
|
10
|
-
import { useCallback, useState, useMemo } from 'react';
|
11
|
-
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
12
|
-
import { useLatestCallback } from '../../../../hooks/use-latest/lib/esm/index.js';
|
13
|
-
import { setAttrStatus } from '../../../../utils/dom-utils/lib/esm/index.js';
|
14
|
-
import { pure, format, formatAmount } from './utils/index.js';
|
15
|
-
/** @LICENSE
|
16
|
-
* @hi-ui/input
|
17
|
-
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
|
18
|
-
*
|
19
|
-
* Copyright (c) HIUI <mi-hiui@xiaomi.com>.
|
20
|
-
*
|
21
|
-
* This source code is licensed under the MIT license found in the
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
23
|
-
*/
|
24
|
-
|
25
|
-
var useInput = function useInput(_ref) {
|
26
|
-
var name = _ref.name,
|
27
|
-
_ref$autoFocus = _ref.autoFocus,
|
28
|
-
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
|
29
|
-
_ref$disabled = _ref.disabled,
|
30
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
31
|
-
_ref$readOnly = _ref.readOnly,
|
32
|
-
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
33
|
-
maxLength = _ref.maxLength,
|
34
|
-
placeholder = _ref.placeholder,
|
35
|
-
_ref$defaultValue = _ref.defaultValue,
|
36
|
-
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
|
37
|
-
valueProp = _ref.value,
|
38
|
-
onChange = _ref.onChange,
|
39
|
-
onFocus = _ref.onFocus,
|
40
|
-
onBlur = _ref.onBlur,
|
41
|
-
_ref$trimValueOnBlur = _ref.trimValueOnBlur,
|
42
|
-
trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur,
|
43
|
-
_ref$type = _ref.type,
|
44
|
-
type = _ref$type === void 0 ? 'text' : _ref$type,
|
45
|
-
clearElementRef = _ref.clearElementRef; // Object.is 避免 trimValueOnBlur 和 点击 clearIcon 触发 2 次相同的 onCHange
|
46
|
-
|
47
|
-
var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange, Object.is),
|
48
|
-
value = _useUncontrolledState[0],
|
49
|
-
tryChangeValue = _useUncontrolledState[1];
|
50
|
-
|
51
|
-
var handleChange = useCallback(function (evt, trim) {
|
52
|
-
if (trim === void 0) {
|
53
|
-
trim = false;
|
54
|
-
}
|
55
|
-
|
56
|
-
evt.persist();
|
57
|
-
var nextValue = evt.target.value;
|
58
|
-
var valueTrue = pure(nextValue, type); // 防溢出,保证 onChange 拿到的是值是最新的 formatted value
|
59
|
-
|
60
|
-
var value = format(nextValue, type);
|
61
|
-
|
62
|
-
if (trim) {
|
63
|
-
valueTrue = valueTrue.trim();
|
64
|
-
value = value.trim();
|
65
|
-
}
|
66
|
-
|
67
|
-
var event = Object.create(evt);
|
68
|
-
event.target = Object.assign(Object.assign({}, evt.target), {
|
69
|
-
value: value
|
70
|
-
});
|
71
|
-
tryChangeValue(valueTrue, event);
|
72
|
-
}, [tryChangeValue, type]);
|
73
|
-
|
74
|
-
var _useState = useState(autoFocus),
|
75
|
-
focused = _useState[0],
|
76
|
-
setFocused = _useState[1];
|
77
|
-
|
78
|
-
var handleFocus = useLatestCallback(function (evt) {
|
79
|
-
setFocused(true);
|
80
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);
|
81
|
-
});
|
82
|
-
var handleBlur = useLatestCallback(function (event) {
|
83
|
-
var relatedTarget = event.relatedTarget; // 拦截 clearIcon 点击清空,阻止其触发 input 失焦
|
84
|
-
|
85
|
-
if (clearElementRef && clearElementRef.current && clearElementRef.current === relatedTarget) {
|
86
|
-
return;
|
87
|
-
}
|
88
|
-
|
89
|
-
setFocused(false); // amount 自动添加小数
|
90
|
-
|
91
|
-
if (type === 'amount') {
|
92
|
-
event.target.value = formatAmount(value, true);
|
93
|
-
handleChange(event, trimValueOnBlur);
|
94
|
-
} else if (trimValueOnBlur) {
|
95
|
-
handleChange(event, true);
|
96
|
-
}
|
97
|
-
|
98
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
99
|
-
});
|
100
|
-
var nativeInputProps = useMemo(function () {
|
101
|
-
return {
|
102
|
-
name: name,
|
103
|
-
disabled: disabled,
|
104
|
-
readOnly: readOnly,
|
105
|
-
autoFocus: autoFocus,
|
106
|
-
placeholder: placeholder,
|
107
|
-
maxLength: maxLength,
|
108
|
-
'data-focused': setAttrStatus(focused)
|
109
|
-
};
|
110
|
-
}, [disabled, readOnly, autoFocus, placeholder, maxLength, name, focused]);
|
111
|
-
var getInputProps = useCallback(function () {
|
112
|
-
return Object.assign(Object.assign({}, nativeInputProps), {
|
113
|
-
value: format(value, type),
|
114
|
-
onChange: handleChange,
|
115
|
-
onFocus: handleFocus,
|
116
|
-
onBlur: handleBlur
|
117
|
-
});
|
118
|
-
}, [value, type, handleChange, handleFocus, handleBlur, nativeInputProps]);
|
119
|
-
return {
|
120
|
-
focused: focused,
|
121
|
-
value: value,
|
122
|
-
tryChangeValue: tryChangeValue,
|
123
|
-
getInputProps: getInputProps
|
124
|
-
};
|
125
|
-
};
|
126
|
-
|
127
|
-
export { useInput };
|