@hi-ui/input 4.0.0-alpha.5 → 4.0.0-beta.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/lib/esm/Input.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** @LICENSE
2
- * @hi-ui/input v4.0.0-alpha.4
2
+ * @hi-ui/input
3
3
  * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
4
4
  *
5
5
  * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
@@ -8,17 +8,23 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import { __rest } from 'tslib';
11
- import React, { forwardRef, useRef, useCallback, useState, useMemo } from 'react';
11
+ import React, { forwardRef, useMemo, isValidElement, useRef, useCallback, useState } from 'react';
12
12
  import { getPrefixCls, cx } from '@hi-ui/classname';
13
13
  import { __DEV__ } from '@hi-ui/env';
14
- import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
15
14
  import { useMergeRefs } from '@hi-ui/use-merge-refs';
16
15
  import { CloseCircleFilled } from '@hi-ui/icons';
17
- var _role = 'input';
16
+ import { useInput } from './use-input.js';
18
17
 
19
- var _prefix = getPrefixCls(_role);
18
+ var _prefix = getPrefixCls('input');
20
19
  /**
21
- * TODO: What is Input
20
+ * 输入框
21
+ *
22
+ * @TODO:
23
+ * 1. size api 确认
24
+ * 2. 修改类名结构
25
+ * 3. 支持带数字展示
26
+ * 4. InputGroup 模式支持
27
+ * 5. 手动聚焦支持额外配置
22
28
  */
23
29
 
24
30
 
@@ -26,102 +32,115 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
26
32
  var _a$prefixCls = _a.prefixCls,
27
33
  prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,
28
34
  _a$role = _a.role,
29
- role = _a$role === void 0 ? _role : _a$role,
35
+ role = _a$role === void 0 ? 'input' : _a$role,
30
36
  className = _a.className,
31
37
  style = _a.style,
32
- _a$autoFocus = _a.autoFocus,
33
- autoFocus = _a$autoFocus === void 0 ? false : _a$autoFocus,
34
- _a$disabled = _a.disabled,
35
- disabled = _a$disabled === void 0 ? false : _a$disabled,
36
- _a$readOnly = _a.readOnly,
37
- readOnly = _a$readOnly === void 0 ? false : _a$readOnly,
38
- name = _a.name,
39
- maxLength = _a.maxLength,
40
- _a$type = _a.type,
41
- type = _a$type === void 0 ? 'text' : _a$type,
42
38
  _a$size = _a.size,
43
- size = _a$size === void 0 ? 'sm' : _a$size,
39
+ size = _a$size === void 0 ? 'md' : _a$size,
44
40
  _a$appearance = _a.appearance,
45
- appearance = _a$appearance === void 0 ? 'outline' : _a$appearance,
46
- placeholder = _a.placeholder,
41
+ appearance = _a$appearance === void 0 ? 'line' : _a$appearance,
47
42
  prepend = _a.prepend,
48
43
  append = _a.append,
49
44
  prefix = _a.prefix,
50
45
  suffix = _a.suffix,
51
- _a$defaultValue = _a.defaultValue,
52
- defaultValue = _a$defaultValue === void 0 ? '' : _a$defaultValue,
53
- valueProp = _a.value,
54
- onChange = _a.onChange,
55
- onFocus = _a.onFocus,
56
- onBlur = _a.onBlur,
57
46
  _a$clearableTrigger = _a.clearableTrigger,
58
47
  clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,
59
48
  _a$clearable = _a.clearable,
60
49
  clearable = _a$clearable === void 0 ? false : _a$clearable,
61
- rest = __rest(_a, ["prefixCls", "role", "className", "style", "autoFocus", "disabled", "readOnly", "name", "maxLength", "type", "size", "appearance", "floatLabel", "placeholder", "prepend", "append", "prefix", "suffix", "defaultValue", "value", "onChange", "onFocus", "onBlur", "clearableTrigger", "clearable"]);
50
+ _a$invalid = _a.invalid,
51
+ invalid = _a$invalid === void 0 ? false : _a$invalid,
52
+ name = _a.name,
53
+ autoFocus = _a.autoFocus,
54
+ disabled = _a.disabled,
55
+ readOnly = _a.readOnly,
56
+ maxLength = _a.maxLength,
57
+ placeholder = _a.placeholder,
58
+ defaultValue = _a.defaultValue,
59
+ valueProp = _a.value,
60
+ onChange = _a.onChange,
61
+ onFocus = _a.onFocus,
62
+ onBlur = _a.onBlur,
63
+ trimValueOnBlur = _a.trimValueOnBlur,
64
+ type = _a.type,
65
+ 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", "type"]); // @TODO: 临时方案,后面迁移至 InputGroup
66
+
67
+
68
+ var _useMemo = useMemo(function () {
69
+ var shouldUnset = [false, false]; // @ts-ignore
70
+ // @ts-ignore
71
+
72
+ if ( /*#__PURE__*/isValidElement(prepend) && ['Select', 'Button'].includes(prepend.type.HiName)) {
73
+ shouldUnset[0] = true;
74
+ } // @ts-ignore
75
+ // @ts-ignore
62
76
 
63
- var inputRef = useRef(null);
77
+
78
+ if ( /*#__PURE__*/isValidElement(append) && ['Select', 'Button'].includes(append.type.HiName)) {
79
+ shouldUnset[1] = true;
80
+ }
81
+
82
+ return shouldUnset;
83
+ }, [prepend, append]),
84
+ unsetPrepend = _useMemo[0],
85
+ unsetAppend = _useMemo[1];
86
+
87
+ var inputElementRef = useRef(null);
64
88
  var proxyOnChange = useCallback(function (value, evt) {
65
89
  if (!onChange) return;
66
- onChangeMock(onChange, evt, inputRef.current, value);
90
+ onChangeMock(onChange, evt, inputElementRef.current, value);
67
91
  }, [onChange]);
92
+ var clearElementRef = useRef(null);
93
+
94
+ var _useInput = useInput({
95
+ clearElementRef: clearElementRef,
96
+ name: name,
97
+ autoFocus: autoFocus,
98
+ disabled: disabled,
99
+ readOnly: readOnly,
100
+ maxLength: maxLength,
101
+ placeholder: placeholder,
102
+ defaultValue: defaultValue,
103
+ value: valueProp,
104
+ onChange: proxyOnChange,
105
+ onFocus: onFocus,
106
+ onBlur: onBlur,
107
+ trimValueOnBlur: trimValueOnBlur,
108
+ type: type
109
+ }),
110
+ tryChangeValue = _useInput.tryChangeValue,
111
+ focused = _useInput.focused,
112
+ value = _useInput.value,
113
+ getInputProps = _useInput.getInputProps;
68
114
 
69
- var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, proxyOnChange),
70
- value = _useUncontrolledState[0],
71
- tryChangeValue = _useUncontrolledState[1];
72
-
73
- var handleChange = useCallback(function (evt) {
74
- var nextValue = evt.target.value;
75
- tryChangeValue(nextValue, evt);
76
- }, [tryChangeValue]);
77
-
78
- var _useState = useState(autoFocus),
79
- focused = _useState[0],
80
- setFocused = _useState[1];
81
-
82
- var handleFocus = useCallback(function (evt) {
83
- setFocused(true);
84
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);
85
- }, [onFocus]);
86
- var handleBlur = useCallback(function (event) {
87
- setFocused(false);
88
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
89
- }, [onBlur]);
90
115
  var focus = useCallback(function () {
91
116
  var _a;
92
117
 
93
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
118
+ (_a = inputElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
94
119
  }, []);
95
120
  var handleReset = useCallback(function (evt) {
96
121
  tryChangeValue('', evt);
97
122
  focus();
98
123
  }, [tryChangeValue, focus]);
99
- var nativeInputProps = useMemo(function () {
100
- return {
101
- name: name,
102
- disabled: disabled,
103
- readOnly: readOnly,
104
- autoFocus: autoFocus,
105
- placeholder: placeholder,
106
- maxLength: maxLength
107
- };
108
- }, [disabled, readOnly, autoFocus, placeholder, maxLength, name]);
109
-
110
- var _useState2 = useState(false),
111
- hover = _useState2[0],
112
- setHover = _useState2[1]; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清楚
124
+
125
+ var _useState = useState(false),
126
+ hover = _useState[0],
127
+ setHover = _useState[1]; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清楚
113
128
 
114
129
 
115
130
  var showClearableIcon = clearable && !!value && !disabled;
116
- var cls = cx(className, prefixCls + "__outer", prepend && prefixCls + "__outer--prepend", append && prefixCls + "__outer--append", prefixCls + "--appearance-" + appearance, prefixCls + "--size-" + size);
131
+ var mergedRef = useMergeRefs(ref, inputElementRef);
132
+ var cls = cx(prefixCls, className, prefixCls + "--size-" + size, prefixCls + "--appearance-" + appearance);
133
+ 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");
117
134
  return /*#__PURE__*/React.createElement("div", {
118
135
  role: role,
119
136
  className: cls,
120
137
  style: style
138
+ }, /*#__PURE__*/React.createElement("div", {
139
+ className: outerCls
121
140
  }, prepend ? /*#__PURE__*/React.createElement("div", {
122
141
  className: prefixCls + "__prepend"
123
142
  }, prepend) : null, /*#__PURE__*/React.createElement("div", {
124
- className: cx(prefixCls + "__inner", prefix && prefixCls + "__inner--prefix", suffix && prefixCls + "__inner--suffix", focused && "focused", disabled && 'disabled', readOnly && 'readonly'),
143
+ 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"),
125
144
  onMouseOver: function onMouseOver(e) {
126
145
  setHover(true);
127
146
  },
@@ -131,30 +150,26 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
131
150
  }, prefix ? /*#__PURE__*/React.createElement("span", {
132
151
  className: prefixCls + "__prefix"
133
152
  }, prefix) : null, /*#__PURE__*/React.createElement("input", Object.assign({
134
- ref: useMergeRefs(ref, inputRef),
135
- className: cx(prefixCls, focused && "focused", disabled && 'disabled', readOnly && 'readonly'),
136
- type: type,
137
- value: value,
138
- onChange: handleChange,
139
- onFocus: handleFocus,
140
- onBlur: handleBlur
141
- }, rest, nativeInputProps)), suffix || showClearableIcon ? /*#__PURE__*/React.createElement("span", {
153
+ ref: mergedRef,
154
+ className: prefixCls + "__text"
155
+ }, getInputProps(), rest)), suffix || showClearableIcon ? /*#__PURE__*/React.createElement("span", {
142
156
  className: prefixCls + "__suffix"
143
157
  }, showClearableIcon ? /*#__PURE__*/React.createElement("span", {
144
- className: cx(prefixCls + "__clear", (clearableTrigger === 'always' || hover) && 'active'),
158
+ ref: clearElementRef,
159
+ className: cx(prefixCls + "__clear", (clearableTrigger === 'always' || hover) && prefixCls + "__clear--active"),
145
160
  role: "button",
146
161
  tabIndex: -1,
147
162
  onClick: handleReset
148
163
  }, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : null, suffix) : null), append ? /*#__PURE__*/React.createElement("div", {
149
164
  className: prefixCls + "__append"
150
- }, append) : null);
165
+ }, append) : null));
151
166
  });
152
167
 
153
168
  if (__DEV__) {
154
169
  Input.displayName = 'Input';
155
170
  }
156
171
  /**
157
- * 伪造目标事件 target
172
+ * 模拟伪装目标事件 target
158
173
  *
159
174
  * @param target
160
175
  * @param evt
@@ -165,22 +180,22 @@ if (__DEV__) {
165
180
 
166
181
 
167
182
  function onChangeMock(onChange, evt, target, targetValue) {
168
- var event = evt; // 点击 clearIcon 时,代理 onChange 的事件对象 target 指向 input.target
183
+ var event = evt; // 点击 clearIcon 或者 失焦 trim 时,都会代理 onChange 的事件对象 target 指向 input.target
169
184
 
170
- if (evt.type === 'click') {
185
+ if (evt.type !== 'change') {
171
186
  if (!target) return;
172
187
  var originalTargetValue = target.value;
173
188
  event = Object.create(evt);
174
189
  event.target = target;
175
190
  event.currentTarget = target;
176
191
  target.value = targetValue;
177
- onChange(event); // 重置为之前值
192
+ onChange(event, targetValue); // 重置为之前值
178
193
 
179
194
  target.value = originalTargetValue;
180
195
  return;
181
196
  }
182
197
 
183
- onChange(event);
198
+ onChange(event, targetValue);
184
199
  }
185
200
 
186
201
  export { Input, onChangeMock };
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../src/Input.tsx"],"sourcesContent":[null],"names":["_role","_prefix","getPrefixCls","Input","forwardRef","_a","ref","prefixCls","role","className","style","autoFocus","disabled","readOnly","name","maxLength","type","size","appearance","placeholder","prepend","append","prefix","suffix","defaultValue","valueProp","value","onChange","onFocus","onBlur","clearableTrigger","clearable","rest","inputRef","useRef","proxyOnChange","useCallback","evt","onChangeMock","current","useUncontrolledState","tryChangeValue","handleChange","nextValue","target","useState","focused","setFocused","handleFocus","handleBlur","event","focus","handleReset","nativeInputProps","useMemo","hover","setHover","showClearableIcon","cls","cx","React","onMouseOver","e","onMouseLeave","useMergeRefs","tabIndex","onClick","CloseCircleFilled","__DEV__","displayName","targetValue","originalTargetValue","Object","create","currentTarget"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAMA,KAAK,GAAG,OAAd;;AACA,IAAMC,OAAO,GAAGC,YAAY,CAACF,KAAD,CAA5B;AAEA;;;;;IAGaG,KAAK,gBAAGC,UAAU,CAC7B,UACEC,EADF,EA6BEC,GA7BF;wBAEIC;MAAAA,sCAAYN;mBACZO;MAAAA,4BAAOR;MACPS,eAAAA;MACAC,WAAAA;wBACAC;MAAAA,sCAAY;uBACZC;MAAAA,oCAAW;uBACXC;MAAAA,oCAAW;MACXC,UAAAA;MACAC,eAAAA;mBACAC;MAAAA,4BAAO;mBACPC;MAAAA,4BAAO;yBACPC;MAAAA,wCAAa;MAEbC,iBAAAA;MACAC,aAAAA;MACAC,YAAAA;MACAC,YAAAA;MACAC,YAAAA;2BACAC;MAAAA,4CAAe;MACRC,eAAPC;MACAC,cAAAA;MACAC,aAAAA;MACAC,YAAAA;+BACAC;MAAAA,oDAAmB;wBACnBC;MAAAA,sCAAY;MACTC,kBA1BL,YAAA,QAAA,aAAA,SAAA,aAAA,YAAA,YAAA,QAAA,aAAA,QAAA,QAAA,cAAA,cAAA,eAAA,WAAA,UAAA,UAAA,UAAA,gBAAA,SAAA,YAAA,WAAA,UAAA,oBAAA,aAAA;;MA8BMC,QAAQ,GAAGC,MAAM,CAAmB,IAAnB;MAEjBC,aA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a;AACXjE,EAAAA,KAAK,CAACkE,WAANlE,GAAoB,OAApBA;;AAGF;;;;;;;;;;;SASgBmC,aACdX,UACAU,KACAO,QACA0B;MAEIpB,KAAK,GAAGb;;MAGRA,GAAG,CAACrB,IAAJqB,KAAa,SAAS;QACpB,CAACO,QAAQ;QAEP2B,mBAAmB,GAAG3B,MAAM,CAAClB;AACnCwB,IAAAA,KAAK,GAAGsB,MAAM,CAACC,MAAPD,CAAcnC,GAAdmC,CAARtB;AAEAA,IAAAA,KAAK,CAACN,MAANM,GAAeN,MAAfM;AACAA,IAAAA,KAAK,CAACwB,aAANxB,GAAsBN,MAAtBM;AACAN,IAAAA,MAAM,CAAClB,KAAPkB,GAAe0B,WAAf1B;AACAjB,IAAAA,QAAQ,CAACuB,KAAD,CAARvB,CATwB;;AAWxBiB,IAAAA,MAAM,CAAClB,KAAPkB,GAAe2B,mBAAf3B;;;;AAIFjB,EAAAA,QAAQ,CAACuB,KAAD,CAARvB;;;"}
1
+ {"version":3,"file":"Input.js","sources":["../../src/Input.tsx"],"sourcesContent":[null],"names":["_prefix","getPrefixCls","Input","forwardRef","_a","ref","prefixCls","role","className","style","size","appearance","prepend","append","prefix","suffix","clearableTrigger","clearable","invalid","name","autoFocus","disabled","readOnly","maxLength","placeholder","defaultValue","valueProp","value","onChange","onFocus","onBlur","trimValueOnBlur","type","rest","useMemo","shouldUnset","isValidElement","includes","HiName","unsetPrepend","unsetAppend","inputElementRef","useRef","proxyOnChange","useCallback","evt","onChangeMock","current","clearElementRef","useInput","tryChangeValue","focused","getInputProps","focus","handleReset","useState","hover","setHover","showClearableIcon","mergedRef","useMergeRefs","cls","cx","outerCls","React","onMouseOver","e","onMouseLeave","tabIndex","onClick","CloseCircleFilled","__DEV__","displayName","target","targetValue","event","originalTargetValue","Object","create","currentTarget"],"mappings":";;;;;;;;;;;;;;;;;AAQA,IAAMA,OAAO,GAAGC,YAAY,CAAC,OAAD,CAA5B;AAEA;;;;;;;;;;;;IAUaC,KAAK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ANE,GAAeF,MAAfE;AACAA,IAAAA,KAAK,CAACI,aAANJ,GAAsBF,MAAtBE;AACAF,IAAAA,MAAM,CAAC9C,KAAP8C,GAAeC,WAAfD;AACA7C,IAAAA,QAAQ,CAAC+C,KAAD,EAA+CD,WAA/C,CAAR9C,CATyB;;AAWzB6C,IAAAA,MAAM,CAAC9C,KAAP8C,GAAeG,mBAAfH;;;;AAIF7C,EAAAA,QAAQ,CAAC+C,KAAD,EAA+CD,WAA/C,CAAR9C;;;"}
@@ -0,0 +1,132 @@
1
+ /** @LICENSE
2
+ * @hi-ui/input
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#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
+ var _role = 'mock-input';
17
+
18
+ var _prefix = getPrefixCls(_role);
19
+
20
+ var NOOP_VALUE = '';
21
+ var NOOP_ARRAY = [];
22
+ /**
23
+ * 支持自定义渲染输入框内容,暂时仅供内部 Picker 类组件使用,不对外提供
24
+ */
25
+
26
+ var MockInput = /*#__PURE__*/forwardRef(function (_a, ref) {
27
+ var _a$prefixCls = _a.prefixCls,
28
+ prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,
29
+ _a$role = _a.role,
30
+ role = _a$role === void 0 ? _role : _a$role,
31
+ className = _a.className,
32
+ _a$data = _a.data,
33
+ data = _a$data === void 0 ? NOOP_ARRAY : _a$data,
34
+ _a$defaultValue = _a.defaultValue,
35
+ defaultValue = _a$defaultValue === void 0 ? NOOP_VALUE : _a$defaultValue,
36
+ valueProp = _a.value,
37
+ onChange = _a.onChange,
38
+ placeholder = _a.placeholder,
39
+ _a$disabled = _a.disabled,
40
+ disabled = _a$disabled === void 0 ? false : _a$disabled,
41
+ _a$clearable = _a.clearable,
42
+ clearable = _a$clearable === void 0 ? false : _a$clearable,
43
+ _a$focused = _a.focused,
44
+ focused = _a$focused === void 0 ? false : _a$focused,
45
+ _a$invalid = _a.invalid,
46
+ invalid = _a$invalid === void 0 ? false : _a$invalid,
47
+ _a$readOnly = _a.readOnly,
48
+ readOnly = _a$readOnly === void 0 ? false : _a$readOnly,
49
+ _a$size = _a.size,
50
+ size = _a$size === void 0 ? 'md' : _a$size,
51
+ _a$appearance = _a.appearance,
52
+ appearance = _a$appearance === void 0 ? 'line' : _a$appearance,
53
+ _a$clearableTrigger = _a.clearableTrigger,
54
+ clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,
55
+ displayRender = _a.displayRender,
56
+ suffix = _a.suffix,
57
+ _onMouseOver = _a.onMouseOver,
58
+ _onMouseLeave = _a.onMouseLeave,
59
+ rest = __rest(_a, ["prefixCls", "role", "className", "data", "defaultValue", "value", "onChange", "placeholder", "disabled", "clearable", "focused", "invalid", "readOnly", "size", "appearance", "clearableTrigger", "displayRender", "suffix", "onMouseOver", "onMouseLeave"]);
60
+
61
+ var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),
62
+ value = _useUncontrolledState[0],
63
+ tryChangeValue = _useUncontrolledState[1];
64
+
65
+ var displayItem = useMemo(function () {
66
+ if (value === '') return null;
67
+ var displayItem = data.find(function (item) {
68
+ return item.id === value;
69
+ });
70
+ return displayItem || null;
71
+ }, [value, data]);
72
+ var displayValue = useMemo(function () {
73
+ if (!displayItem) return '';
74
+
75
+ if (displayRender) {
76
+ return displayRender(displayItem);
77
+ }
78
+
79
+ return displayItem.title;
80
+ }, [displayItem, displayRender]);
81
+ var handleClear = useCallback(function (evt) {
82
+ if (disabled) return;
83
+ evt.stopPropagation();
84
+ tryChangeValue(NOOP_VALUE, displayItem);
85
+ }, [tryChangeValue, disabled, displayItem]);
86
+
87
+ var _useState = useState(false),
88
+ hover = _useState[0],
89
+ setHover = _useState[1];
90
+
91
+ var trySetHover = useCallback(function (hovered) {
92
+ if (disabled) return;
93
+ setHover(hovered);
94
+ }, [disabled]);
95
+ var hasValue = !!displayValue; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清除
96
+
97
+ var showClearableIcon = useMemo(function () {
98
+ return clearable && hasValue && !disabled && (clearableTrigger === 'always' || hover);
99
+ }, [clearable, hasValue, disabled, clearableTrigger, hover]);
100
+ var cls = cx(prefixCls, className, prefixCls + "--appearance-" + appearance, prefixCls + "--size-" + size, focused && "focused", disabled && 'disabled', readOnly && 'readonly', invalid && 'invalid');
101
+ return /*#__PURE__*/React.createElement("div", Object.assign({
102
+ ref: ref,
103
+ role: role,
104
+ className: cls,
105
+ onMouseOver: function onMouseOver(evt) {
106
+ trySetHover(true);
107
+ _onMouseOver === null || _onMouseOver === void 0 ? void 0 : _onMouseOver(evt);
108
+ },
109
+ onMouseLeave: function onMouseLeave(evt) {
110
+ trySetHover(false);
111
+ _onMouseLeave === null || _onMouseLeave === void 0 ? void 0 : _onMouseLeave(evt);
112
+ }
113
+ }, rest), hasValue ? /*#__PURE__*/React.createElement("span", {
114
+ className: prefixCls + "__value"
115
+ }, displayValue) : /*#__PURE__*/React.createElement("span", {
116
+ className: prefixCls + "__placeholder"
117
+ }, placeholder), suffix || showClearableIcon ? /*#__PURE__*/React.createElement("span", {
118
+ className: prefixCls + "__suffix"
119
+ }, showClearableIcon ? /*#__PURE__*/React.createElement("span", {
120
+ role: "button",
121
+ tabIndex: -1,
122
+ className: cx(prefixCls + "__clear", 'active'),
123
+ onClick: handleClear
124
+ }, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : suffix) : null);
125
+ });
126
+
127
+ if (__DEV__) {
128
+ MockInput.displayName = 'MockInput';
129
+ }
130
+
131
+ export { MockInput };
132
+ //# sourceMappingURL=MockInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockInput.js","sources":["../../src/MockInput.tsx"],"sourcesContent":[null],"names":["_role","_prefix","getPrefixCls","NOOP_VALUE","NOOP_ARRAY","MockInput","forwardRef","_a","ref","prefixCls","role","className","data","defaultValue","valueProp","value","onChange","placeholder","disabled","clearable","focused","invalid","readOnly","size","appearance","clearableTrigger","displayRender","suffix","onMouseOver","onMouseLeave","rest","useUncontrolledState","tryChangeValue","displayItem","useMemo","find","item","id","displayValue","title","handleClear","useCallback","evt","stopPropagation","useState","hover","setHover","trySetHover","hovered","hasValue","showClearableIcon","cls","cx","React","tabIndex","onClick","CloseCircleFilled","__DEV__","displayName"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAMA,KAAK,GAAG,YAAd;;AACA,IAAMC,OAAO,GAAGC,YAAY,CAACF,KAAD,CAA5B;;AAEA,IAAMG,UAAU,GAAG,EAAnB;AACA,IAAMC,UAAU,GAAG,EAAnB;AAEA;;;;IAGaC,SAAS,gBAAGC,UAAU,CACjC,UACEC,EADF,EAwBEC,GAxBF;wBAEIC;MAAAA,sCAAYR;mBACZS;MAAAA,4BAAOV;MACPW,eAAAA;mBACAC;MAAAA,4BAAOR;2BACPS;MAAAA,4CAAeV;MACRW,eAAPC;MACAC,cAAAA;MACAC,iBAAAA;uBACAC;MAAAA,oCAAW;wBACXC;MAAAA,sCAAY;sBACZC;MAAAA,kCAAU;sBACVC;MAAAA,kCAAU;uBACVC;MAAAA,oCAAW;mBACXC;MAAAA,4BAAO;yBACPC;MAAAA,wCAAa;+BACbC;MAAAA,oDAAmB;MACnBC,mBAAAA;MACAC,YAAAA;MACAC,kBAAAA;MACAC,mBAAAA;MACGC,kBArBL,YAAA,QAAA,aAAA,QAAA,gBAAA,SAAA,YAAA,eAAA,YAAA,aAAA,WAAA,WAAA,YAAA,QAAA,cAAA,oBAAA,iBAAA,UAAA,eAAA,gBAAA;;8BAyBgCC,oBAAoB,CAAClB,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G,IAlCN0B;AAtF6B,CAAA;;AAgMnC,IAAII,OAAJ,EAAa;AACXpD,EAAAA,SAAS,CAACqD,WAAVrD,GAAwB,WAAxBA;;;"}
package/lib/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** @LICENSE
2
- * @hi-ui/input v4.0.0-alpha.4
2
+ * @hi-ui/input
3
3
  * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
4
4
  *
5
5
  * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
@@ -9,4 +9,6 @@
9
9
  */
10
10
  import './styles/index.scss.js';
11
11
  export { Input, Input as default, onChangeMock } from './Input.js';
12
+ export { useInput } from './use-input.js';
13
+ export { MockInput } from './MockInput.js';
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  /** @LICENSE
2
- * @hi-ui/input v4.0.0-alpha.4
2
+ * @hi-ui/input
3
3
  * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
4
4
  *
5
5
  * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
@@ -7,7 +7,7 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- var css_248z = ".hi-v4-input {\n margin: 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 height: inherit;\n background-color: transparent;\n cursor: text;\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n display: inline-block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transition: all .3s;\n transition: all .3s;\n width: 100%;\n font-size: inherit;\n color: var(--color-black);\n line-height: 22px; }\n .hi-v4-input::-webkit-input-placeholder {\n color: var(--color-gray-50); }\n .hi-v4-input::-moz-placeholder {\n color: var(--color-gray-50); }\n .hi-v4-input::-ms-input-placeholder {\n color: var(--color-gray-50); }\n .hi-v4-input:-ms-input-placeholder {\n color: var(--color-gray-50); }\n .hi-v4-input::placeholder {\n color: var(--color-gray-50); }\n .hi-v4-input: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: 1px solid transparent;\n background-color: var(--color-white);\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n outline: 2px solid transparent; }\n .hi-v4-input__inner:not(.disabled):hover {\n z-index: 1; }\n .hi-v4-input__inner:not(.disabled).focused {\n z-index: 1; }\n .hi-v4-input__outer {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n margin: 0;\n padding: 0;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n height: auto;\n width: 100%; }\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 font-size: 14px;\n text-align: center;\n color: var(--color-gray-50);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n cursor: pointer;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n visibility: hidden;\n opacity: 0; }\n .hi-v4-input__clear:hover {\n color: var(--color-black); }\n .hi-v4-input__clear.active {\n visibility: visible;\n opacity: 1; }\n .hi-v4-input__inner--suffix .hi-v4-input__clear {\n margin-right: 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(--color-black);\n font-size: inherit;\n text-align: center; }\n .hi-v4-input__prefix {\n padding-left: 11px; }\n .hi-v4-input__suffix {\n padding-right: 11px; }\n .hi-v4-input__prepend, .hi-v4-input__append {\n position: relative;\n color: var(--color-black);\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 -webkit-transition: all .3s;\n transition: all .3s;\n padding: 0 11px;\n border: 1px solid transparent;\n white-space: nowrap; }\n .hi-v4-input__prepend, .hi-v4-input__append {\n background-color: #f8f8f8; }\n .hi-v4-input__prepend {\n border-right-width: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .hi-v4-input__append {\n border-left-width: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .hi-v4-input--size-sm {\n font-size: 14px; }\n .hi-v4-input--size-sm .hi-v4-input {\n padding: 4px 11px; }\n .hi-v4-input--size-sm .hi-v4-input__inner {\n border-radius: 4px; }\n .hi-v4-input--size-sm .hi-v4-input__prepend {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px; }\n .hi-v4-input--size-sm .hi-v4-input__append {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px; }\n .hi-v4-input--size-md {\n font-size: 16px; }\n .hi-v4-input--size-md .hi-v4-input {\n padding: 8px 11px; }\n .hi-v4-input--size-md .hi-v4-input__inner {\n border-radius: 6px; }\n .hi-v4-input--size-md .hi-v4-input__prepend {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px; }\n .hi-v4-input--size-md .hi-v4-input__append {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px; }\n .hi-v4-input--size-lg {\n font-size: 18px; }\n .hi-v4-input--size-lg .hi-v4-input {\n padding: 12px 11px; }\n .hi-v4-input--size-lg .hi-v4-input__inner {\n border-radius: 8px; }\n .hi-v4-input--size-lg .hi-v4-input__prepend {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px; }\n .hi-v4-input--size-lg .hi-v4-input__append {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px; }\n .hi-v4-input--appearance-outline .hi-v4-input__inner {\n border-color: var(--color-gray-30); }\n .hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled):hover {\n border-color: var(--color-primary); }\n .hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 1px var(--color-primary);\n box-shadow: 0 0 0 1px var(--color-primary);\n border-color: var(--color-primary); }\n .hi-v4-input--appearance-outline .hi-v4-input__inner.disabled {\n color: var(--color-gray-50);\n background-color: var(--color-gray-10); }\n .hi-v4-input--appearance-outline .hi-v4-input__prepend,\n .hi-v4-input--appearance-outline .hi-v4-input__append {\n border-color: var(--color-gray-30); }\n .hi-v4-input--appearance-unset .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\n .hi-v4-input--appearance-unset.hi-v4-input__outer--prepend .hi-v4-input,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--prefix .hi-v4-input {\n padding-left: 11px; }\n .hi-v4-input--appearance-unset.hi-v4-input__outer--append .hi-v4-input,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--suffix .hi-v4-input {\n padding-right: 11px; }\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: #f8f8f8; }\n .hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled):hover {\n -webkit-box-shadow: 0 0 0 1px var(--color-primary);\n box-shadow: 0 0 0 1px var(--color-primary);\n border-color: var(--color-primary); }\n .hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 1px var(--color-primary);\n box-shadow: 0 0 0 1px var(--color-primary);\n border-color: var(--color-primary);\n background-color: var(--color-white); }\n .hi-v4-input--appearance-underline .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\n .hi-v4-input--appearance-underline.hi-v4-input__outer--prepend .hi-v4-input,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--prefix .hi-v4-input {\n padding-left: 11px; }\n .hi-v4-input--appearance-underline.hi-v4-input__outer--append .hi-v4-input,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--suffix .hi-v4-input {\n padding-right: 11px; }\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(--color-gray-30);\n -webkit-transition: all .3s;\n transition: all .3s; }\n .hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled):hover::after {\n border-bottom-color: var(--color-primary); }\n .hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled).focused::after {\n border-bottom-color: var(--color-primary);\n -webkit-box-shadow: 0 1px 0 0 var(--color-primary);\n box-shadow: 0 1px 0 0 var(--color-primary); }\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--append .hi-v4-input__inner {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n";
10
+ 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: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, 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: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733);\n border: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-mock-input:not(.disabled):hover {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-mock-input:not(.disabled).focused {\n z-index: calc(1 + 1);\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: #c9ced6;\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: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n text-align: center;\n color: #929aa6;\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: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1)); }\n.hi-v4-mock-input__clear:hover {\n color: #000;\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: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n padding-left: 8px;\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: 24px;\n height: var(--hi-v4-height-xs, 24px);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 1px calc(12px - 1px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-md.hi-v4-mock-input {\n height: 32px;\n height: var(--hi-v4-height-normal, 32px);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 4px calc(12px - 1px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-lg.hi-v4-mock-input {\n height: 40px;\n height: var(--hi-v4-height-xl, 40px);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 7px calc(12px - 1px);\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: #dfe2e8;\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: #237ffa;\n border-color: 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 #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-line.hi-v4-mock-input:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: 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: #ff5959;\n border-color: 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 #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px 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: #f2f4f7;\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 #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-unset.hi-v4-mock-input:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: 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: #ff5959;\n border-color: 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 #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-mock-input--appearance-filled.hi-v4-mock-input {\n background-color: #f2f4f7;\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: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: 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 #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa);\n background-color: #fff;\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: #ff5959;\n border-color: 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: #ff5959;\n border-color: 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 #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px 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: #c9ced6;\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: #f2f4f7;\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: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n width: 100%;\n font-size: inherit;\n line-height: inherit;\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-input__text::-webkit-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::-moz-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text:-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input__text::placeholder {\n color: #c9ced6;\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: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, 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(1 + 1);\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(1 + 1);\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: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n color: #929aa6;\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: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n visibility: hidden;\n opacity: 0; }\n.hi-v4-input__clear:hover {\n color: #1f2733;\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: 4px;\n margin-inline-end: 4px;\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: #1f2733;\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(12px - 1px);\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input__suffix {\n padding-right: calc(12px - 1px);\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: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733);\n background-color: #f5f7fa;\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(12px - 1px);\n padding: 0 calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border: 1px solid transparent;\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: 200ms;\n transition-duration: 200ms;\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: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n z-index: 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: 24px;\n height: var(--hi-v4-height-xs, 24px);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem; }\n.hi-v4-input--size-sm .hi-v4-input__text {\n padding: 1px calc(12px - 1px);\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: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 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: 32px;\n height: var(--hi-v4-height-normal, 32px);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem; }\n.hi-v4-input--size-md .hi-v4-input__text {\n padding: 4px calc(12px - 1px);\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: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 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: 40px;\n height: var(--hi-v4-height-xl, 40px);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem; }\n.hi-v4-input--size-lg .hi-v4-input__text {\n padding: 7px calc(12px - 1px);\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: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 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: #dfe2e8;\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: #237ffa;\n border-color: 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 #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: 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: #ff5959;\n border-color: 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: #ff5959;\n border-color: 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 #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px 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: #dfe2e8;\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(12px - 1px);\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(12px - 1px);\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: #f2f4f7;\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: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: 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 #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa);\n background-color: #fff;\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: #ff5959;\n border-color: 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: #ff5959;\n border-color: 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 #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px 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(12px - 1px);\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(12px - 1px);\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 #dfe2e8;\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: #237ffa;\n border-bottom-color: 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: #237ffa;\n border-bottom-color: 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: #ff5959;\n border-bottom-color: 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: #ff5959;\n border-bottom-color: 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: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: #ebedf0;\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\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: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: transparent; }\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";
11
11
 
12
12
  var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
13
13