@hi-ui/tree-select 4.0.0-alpha.9 → 4.0.0-beta.10
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/README.md +87 -7
- package/lib/cjs/TreeSelect.js +37 -24
- package/lib/cjs/TreeSelect.js.map +1 -1
- package/lib/cjs/ui/input/lib/esm/Input.js +35 -21
- package/lib/cjs/ui/input/lib/esm/Input.js.map +1 -1
- package/lib/cjs/ui/input/lib/esm/MockInput.js +9 -6
- package/lib/cjs/ui/input/lib/esm/MockInput.js.map +1 -1
- package/lib/cjs/ui/input/lib/esm/styles/index.scss.js +1 -1
- package/lib/cjs/ui/input/lib/esm/use-input.js +47 -16
- package/lib/cjs/ui/input/lib/esm/use-input.js.map +1 -1
- package/lib/cjs/ui/input/lib/esm/utils/index.js +202 -0
- package/lib/cjs/ui/input/lib/esm/utils/index.js.map +1 -0
- package/lib/esm/TreeSelect.js +35 -23
- package/lib/esm/TreeSelect.js.map +1 -1
- package/lib/esm/ui/input/lib/esm/Input.js +35 -21
- package/lib/esm/ui/input/lib/esm/Input.js.map +1 -1
- package/lib/esm/ui/input/lib/esm/MockInput.js +9 -6
- package/lib/esm/ui/input/lib/esm/MockInput.js.map +1 -1
- package/lib/esm/ui/input/lib/esm/styles/index.scss.js +1 -1
- package/lib/esm/ui/input/lib/esm/use-input.js +41 -11
- package/lib/esm/ui/input/lib/esm/use-input.js.map +1 -1
- package/lib/esm/ui/input/lib/esm/utils/index.js +186 -0
- package/lib/esm/ui/input/lib/esm/utils/index.js.map +1 -0
- package/lib/types/TreeSelect.d.ts +6 -18
- package/package.json +23 -21
- package/lib/cjs/ui/input/lib/esm/TextArea.js +0 -112
- package/lib/cjs/ui/input/lib/esm/TextArea.js.map +0 -1
- package/lib/esm/ui/input/lib/esm/TextArea.js +0 -90
- package/lib/esm/ui/input/lib/esm/TextArea.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MockInput.js","sources":["../../../../../../../input/lib/esm/MockInput.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { __rest } from 'tslib';\nimport React, { forwardRef, useMemo, useCallback, useState } from 'react';\nimport { getPrefixCls, cx } from '@hi-ui/classname';\nimport { __DEV__ } from '@hi-ui/env';\nimport { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';\nimport { CloseCircleFilled } from '@hi-ui/icons';\nvar _role = 'mock-input';\n\nvar _prefix = getPrefixCls(_role);\n\nvar NOOP_VALUE = '';\nvar NOOP_ARRAY = [];\n/**\n * 支持自定义渲染输入框内容,暂时仅供内部 Picker 类组件使用,不对外提供\n */\n\nvar MockInput = /*#__PURE__*/forwardRef(function (_a, ref) {\n var _a$prefixCls = _a.prefixCls,\n prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,\n _a$role = _a.role,\n role = _a$role === void 0 ? _role : _a$role,\n className = _a.className,\n _a$data = _a.data,\n data = _a$data === void 0 ? NOOP_ARRAY : _a$data,\n _a$defaultValue = _a.defaultValue,\n defaultValue = _a$defaultValue === void 0 ? NOOP_VALUE : _a$defaultValue,\n valueProp = _a.value,\n onChange = _a.onChange,\n placeholder = _a.placeholder,\n _a$disabled = _a.disabled,\n disabled = _a$disabled === void 0 ? false : _a$disabled,\n _a$clearable = _a.clearable,\n clearable = _a$clearable === void 0 ? false : _a$clearable,\n _a$focused = _a.focused,\n focused = _a$focused === void 0 ? false : _a$focused,\n _a$invalid = _a.invalid,\n invalid = _a$invalid === void 0 ? false : _a$invalid,\n _a$readOnly = _a.readOnly,\n readOnly = _a$readOnly === void 0 ? false : _a$readOnly,\n _a$size = _a.size,\n size = _a$size === void 0 ? 'md' : _a$size,\n _a$appearance = _a.appearance,\n appearance = _a$appearance === void 0 ? 'outline' : _a$appearance,\n _a$clearableTrigger = _a.clearableTrigger,\n clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,\n displayRender = _a.displayRender,\n suffix = _a.suffix,\n _onMouseOver = _a.onMouseOver,\n _onMouseLeave = _a.onMouseLeave,\n rest = __rest(_a, [\"prefixCls\", \"role\", \"className\", \"data\", \"defaultValue\", \"value\", \"onChange\", \"placeholder\", \"disabled\", \"clearable\", \"focused\", \"invalid\", \"readOnly\", \"size\", \"appearance\", \"clearableTrigger\", \"displayRender\", \"suffix\", \"onMouseOver\", \"onMouseLeave\"]);\n\n var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),\n value = _useUncontrolledState[0],\n tryChangeValue = _useUncontrolledState[1];\n\n var displayValue = useMemo(function () {\n if (value === '') return null;\n var displayItem = data.find(function (item) {\n return item.id === value;\n });\n if (!displayItem) return null;\n\n if (displayRender) {\n return displayRender(displayItem);\n }\n\n return displayItem.title;\n }, [data, value, displayRender]);\n var handleClear = useCallback(function (evt) {\n if (disabled) return;\n evt.stopPropagation();\n tryChangeValue(NOOP_VALUE);\n }, [tryChangeValue, disabled]);\n\n var _useState = useState(false),\n hover = _useState[0],\n setHover = _useState[1];\n\n var trySetHover = useCallback(function (hovered) {\n if (disabled) return;\n setHover(hovered);\n }, [disabled]);\n var hasValue = !!displayValue; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清除\n\n var showClearableIcon = useMemo(function () {\n return clearable && hasValue && !disabled && (clearableTrigger === 'always' || hover);\n }, [clearable, hasValue, disabled, clearableTrigger, hover]);\n var cls = cx(prefixCls, className, prefixCls + \"--appearance-\" + appearance, prefixCls + \"--size-\" + size, focused && \"focused\", disabled && 'disabled', readOnly && 'readonly', invalid && 'invalid');\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref,\n role: role,\n className: cls,\n onMouseOver: function onMouseOver(evt) {\n trySetHover(true);\n _onMouseOver === null || _onMouseOver === void 0 ? void 0 : _onMouseOver(evt);\n },\n onMouseLeave: function onMouseLeave(evt) {\n trySetHover(false);\n _onMouseLeave === null || _onMouseLeave === void 0 ? void 0 : _onMouseLeave(evt);\n }\n }, rest), hasValue ? /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__value\"\n }, displayValue) : /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__placeholder\"\n }, placeholder), suffix || showClearableIcon ? /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__suffix\"\n }, showClearableIcon ? /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: cx(prefixCls + \"__clear\", 'active'),\n onClick: handleClear\n }, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : suffix) : null);\n});\n\nif (__DEV__) {\n MockInput.displayName = 'MockInput';\n}\n\nexport { MockInput };\n//# sourceMappingURL=MockInput.js.map\n"],"names":["_role","_prefix","getPrefixCls","NOOP_VALUE","NOOP_ARRAY","MockInput","forwardRef","_a","ref","prefixCls","role","className","data","defaultValue","valueProp","value","onChange","placeholder","disabled","_a$disabled","clearable","_a$clearable","focused","_a$focused","invalid","_a$invalid","readOnly","_a$readOnly","size","_a$size","appearance","_a$appearance","clearableTrigger","_a$clearableTrigger","displayRender","suffix","onMouseOver","onMouseLeave","rest","useUncontrolledState","_useUncontrolledState","tryChangeValue","displayValue","useMemo","displayItem","find","item","title","handleClear","useCallback","evt","useState","hover","_useState","setHover","trySetHover","hovered","hasValue","showClearableIcon","cls","cx","React","tabIndex","onClick","__DEV__"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,KAAK,GAAX,YAAA;;AACA,IAAMC,OAAO,GAAGC,sBAAAA,CAAhBF,KAAgBE,CAAhB;;AAEA,IAAMC,UAAU,GAAhB,EAAA;AACA,IAAMC,UAAU,GAAhB,EAAA;AAEA;;;;IAGaC,SAAS,gBAAGC,gBAAAA,CACvB,UAAAC,EAAA,EA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,KAAAA,CAAAA,GAAAA,aAAY,CAAZA,GAAY,CAAZA;;AAVJwB,GAAAA,EAAAA,IAAAA,CAAAA,EAcGJ,QAAQ,gBACPI,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EADOnB,YACPmB,CADO,gBAGPA,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EAjBJA,WAiBIA,CAjBJA,EAmBG1B,MAAM,IAANA,iBAAAA,gBACC0B,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EACGH,iBAAiB,gBAChBG,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AACEnD,IAAAA,IAAI,EAAC,QADPmD;AAEEC,IAAAA,QAAQ,EAAE,CAAC,CAFbD;AAGElD,IAAAA,SAAS,EAAEiD,YAAAA,CAAMnD,SAAJ,GAAA,SAAFmD,EAAE,QAAFA,CAHbC;AAIEE,IAAAA,OAAO,EAAEf;AAJXa,GAAAA,eAMEA,yBAAAA,CAAAA,aAAAA,CAAAA,uBAAAA,EAPc,IAOdA,CANFA,CADgB,GAFrB1B,MACC0B,CADD1B,GAnBH0B,IAAAA;AAhF6B,CAAVvD;;AA0LzB,IAAA0D,WAAA,EAAa;AACX3D,EAAAA,SAAS,CAATA,WAAAA,GAAAA,WAAAA;;;"}
|
1
|
+
{"version":3,"file":"MockInput.js","sources":["../../../../../../../input/lib/esm/MockInput.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { __rest } from 'tslib';\nimport React, { forwardRef, useMemo, useCallback, useState } from 'react';\nimport { getPrefixCls, cx } from '@hi-ui/classname';\nimport { __DEV__ } from '@hi-ui/env';\nimport { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';\nimport { CloseCircleFilled } from '@hi-ui/icons';\nvar _role = 'mock-input';\n\nvar _prefix = getPrefixCls(_role);\n\nvar NOOP_VALUE = '';\nvar NOOP_ARRAY = [];\n/**\n * 支持自定义渲染输入框内容,暂时仅供内部 Picker 类组件使用,不对外提供\n */\n\nvar MockInput = /*#__PURE__*/forwardRef(function (_a, ref) {\n var _a$prefixCls = _a.prefixCls,\n prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls,\n _a$role = _a.role,\n role = _a$role === void 0 ? _role : _a$role,\n className = _a.className,\n _a$data = _a.data,\n data = _a$data === void 0 ? NOOP_ARRAY : _a$data,\n _a$defaultValue = _a.defaultValue,\n defaultValue = _a$defaultValue === void 0 ? NOOP_VALUE : _a$defaultValue,\n valueProp = _a.value,\n onChange = _a.onChange,\n placeholder = _a.placeholder,\n _a$disabled = _a.disabled,\n disabled = _a$disabled === void 0 ? false : _a$disabled,\n _a$clearable = _a.clearable,\n clearable = _a$clearable === void 0 ? false : _a$clearable,\n _a$focused = _a.focused,\n focused = _a$focused === void 0 ? false : _a$focused,\n _a$invalid = _a.invalid,\n invalid = _a$invalid === void 0 ? false : _a$invalid,\n _a$readOnly = _a.readOnly,\n readOnly = _a$readOnly === void 0 ? false : _a$readOnly,\n _a$size = _a.size,\n size = _a$size === void 0 ? 'md' : _a$size,\n _a$appearance = _a.appearance,\n appearance = _a$appearance === void 0 ? 'line' : _a$appearance,\n _a$clearableTrigger = _a.clearableTrigger,\n clearableTrigger = _a$clearableTrigger === void 0 ? 'hover' : _a$clearableTrigger,\n displayRender = _a.displayRender,\n suffix = _a.suffix,\n _onMouseOver = _a.onMouseOver,\n _onMouseLeave = _a.onMouseLeave,\n rest = __rest(_a, [\"prefixCls\", \"role\", \"className\", \"data\", \"defaultValue\", \"value\", \"onChange\", \"placeholder\", \"disabled\", \"clearable\", \"focused\", \"invalid\", \"readOnly\", \"size\", \"appearance\", \"clearableTrigger\", \"displayRender\", \"suffix\", \"onMouseOver\", \"onMouseLeave\"]);\n\n var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),\n value = _useUncontrolledState[0],\n tryChangeValue = _useUncontrolledState[1];\n\n var displayItem = useMemo(function () {\n if (value === '') return null;\n var displayItem = data.find(function (item) {\n return item.id === value;\n });\n return displayItem || null;\n }, [value, data]);\n var displayValue = useMemo(function () {\n if (!displayItem) return '';\n\n if (displayRender) {\n return displayRender(displayItem);\n }\n\n return displayItem.title;\n }, [displayItem, displayRender]);\n var handleClear = useCallback(function (evt) {\n if (disabled) return;\n evt.stopPropagation();\n tryChangeValue(NOOP_VALUE, displayItem);\n }, [tryChangeValue, disabled, displayItem]);\n\n var _useState = useState(false),\n hover = _useState[0],\n setHover = _useState[1];\n\n var trySetHover = useCallback(function (hovered) {\n if (disabled) return;\n setHover(hovered);\n }, [disabled]);\n var hasValue = !!displayValue; // 在开启 clearable 下展示 清除内容按钮,可点击进行内容清除\n\n var showClearableIcon = useMemo(function () {\n return clearable && hasValue && !disabled && (clearableTrigger === 'always' || hover);\n }, [clearable, hasValue, disabled, clearableTrigger, hover]);\n var cls = cx(prefixCls, className, prefixCls + \"--appearance-\" + appearance, prefixCls + \"--size-\" + size, focused && \"focused\", disabled && 'disabled', readOnly && 'readonly', invalid && 'invalid');\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref,\n role: role,\n className: cls,\n onMouseOver: function onMouseOver(evt) {\n trySetHover(true);\n _onMouseOver === null || _onMouseOver === void 0 ? void 0 : _onMouseOver(evt);\n },\n onMouseLeave: function onMouseLeave(evt) {\n trySetHover(false);\n _onMouseLeave === null || _onMouseLeave === void 0 ? void 0 : _onMouseLeave(evt);\n }\n }, rest), hasValue ? /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__value\"\n }, displayValue) : /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__placeholder\"\n }, placeholder), suffix || showClearableIcon ? /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"__suffix\"\n }, showClearableIcon ? /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: cx(prefixCls + \"__clear\", 'active'),\n onClick: handleClear\n }, /*#__PURE__*/React.createElement(CloseCircleFilled, null)) : suffix) : null);\n});\n\nif (__DEV__) {\n MockInput.displayName = 'MockInput';\n}\n\nexport { MockInput };\n//# sourceMappingURL=MockInput.js.map\n"],"names":["_role","_prefix","getPrefixCls","NOOP_VALUE","NOOP_ARRAY","MockInput","forwardRef","_a","ref","prefixCls","role","className","data","defaultValue","valueProp","value","onChange","placeholder","disabled","_a$disabled","clearable","_a$clearable","focused","_a$focused","invalid","_a$invalid","readOnly","_a$readOnly","size","_a$size","appearance","_a$appearance","clearableTrigger","_a$clearableTrigger","displayRender","suffix","onMouseOver","onMouseLeave","rest","useUncontrolledState","_useUncontrolledState","tryChangeValue","displayItem","useMemo","find","item","displayValue","title","handleClear","useCallback","evt","useState","hover","_useState","setHover","trySetHover","hovered","hasValue","showClearableIcon","cls","cx","React","tabIndex","onClick","__DEV__"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,KAAK,GAAX,YAAA;;AACA,IAAMC,OAAO,GAAGC,sBAAAA,CAAhBF,KAAgBE,CAAhB;;AAEA,IAAMC,UAAU,GAAhB,EAAA;AACA,IAAMC,UAAU,GAAhB,EAAA;AAEA;;;;IAGaC,SAAS,gBAAGC,gBAAAA,CACvB,UAAAC,EAAA,EAAAC,GAAA,EAAA;wBAEIC;MAAAA,SAAAA,GAAAA,YAAAA,KAAAA,KAAAA,CAAAA,GAAYR,OAAZQ,GAAYR;mBACZS;MAAAA,IAAAA,GAAAA,OAAAA,KAAAA,KAAAA,CAAA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Y,CAAZA,GAAY,CAAZA;;AAVJwB,GAAAA,EAAAA,IAAAA,CAAAA,EAcGJ,QAAQ,gBACPI,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EADOf,YACPe,CADO,gBAGPA,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EAjBJA,WAiBIA,CAjBJA,EAmBG1B,MAAM,IAANA,iBAAAA,gBACC0B,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AAAMlD,IAAAA,SAAS,EAAKF,SAAL,GAAA;AAAfoD,GAAAA,EACGH,iBAAiB,gBAChBG,yBAAAA,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA;AACEnD,IAAAA,IAAI,EAAC,QADPmD;AAEEC,IAAAA,QAAQ,EAAE,CAAC,CAFbD;AAGElD,IAAAA,SAAS,EAAEiD,YAAAA,CAAMnD,SAAJ,GAAA,SAAFmD,EAAE,QAAFA,CAHbC;AAIEE,IAAAA,OAAO,EAAEf;AAJXa,GAAAA,eAMEA,yBAAAA,CAAAA,aAAAA,CAAAA,uBAAAA,EAPc,IAOdA,CANFA,CADgB,GAFrB1B,MACC0B,CADD1B,GAnBH0B,IAAAA;AAtF6B,CAAVvD;;AAgMzB,IAAA0D,WAAA,EAAa;AACX3D,EAAAA,SAAS,CAATA,WAAAA,GAAAA,WAAAA;;;"}
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
23
23
|
*/
|
24
24
|
|
25
|
-
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 {\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 {\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 {\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-outline {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-mock-input--appearance-outline:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-outline: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-outline:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-outline:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-outline: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 {\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:not(.disabled):hover {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-unset: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:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-unset: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: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 {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-filled: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: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:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-filled: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: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-outline.disabled, .hi-v4-mock-input--appearance-unset.disabled, .hi-v4-mock-input--appearance-filled.disabled {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-mock-input--appearance-outline.disabled, .hi-v4-mock-input--appearance-filled.disabled {\n background-color: #ebedf0;\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@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 -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::-webkit-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::-moz-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input:-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\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 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(.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(.disabled).focused {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-input__outer {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-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 vertical-align: middle; }\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.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 {\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 {\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 {\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-outline .hi-v4-input__inner {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner: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-input--appearance-outline .hi-v4-input__inner:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner: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-input--appearance-outline .hi-v4-input__prepend,\n .hi-v4-input--appearance-outline .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 {\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: 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,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--suffix .hi-v4-input {\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(.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(.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-input--appearance-filled .hi-v4-input__inner:not(.disabled).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(.disabled).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(.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-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: 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,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--suffix .hi-v4-input {\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(.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(.disabled).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(.disabled).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(.disabled).invalid.hover::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner.disabled, .hi-v4-input--appearance-unset .hi-v4-input__inner.disabled, .hi-v4-input--appearance-filled .hi-v4-input__inner.disabled, .hi-v4-input--appearance-underline .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__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; }\ntextarea.hi-v4-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 display: block;\n resize: vertical;\n overflow: auto;\n position: relative;\n width: 100%;\n z-index: auto;\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 color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733); }\ntextarea.hi-v4-input::-webkit-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::-moz-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input:-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input:disabled {\n cursor: not-allowed; }\ntextarea.hi-v4-input:not(.disabled):hover {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\ntextarea.hi-v4-input:not(.disabled).focused {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\ntextarea.hi-v4-input--size-sm {\n height: auto;\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem;\n padding: 1px calc(12px - 1px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--size-md {\n height: auto;\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem;\n padding: 4px calc(12px - 1px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--size-lg {\n height: auto;\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem;\n padding: 7px calc(12px - 1px);\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--appearance-outline {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-outline: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); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline: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); }\ntextarea.hi-v4-input--appearance-unset {\n border-radius: 0; }\ntextarea.hi-v4-input--appearance-unset .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\ntextarea.hi-v4-input--appearance-filled {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\ntextarea.hi-v4-input--appearance-filled: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); }\ntextarea.hi-v4-input--appearance-filled: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); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-filled: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); }\ntextarea.hi-v4-input--appearance-underline {\n padding-left: 0;\n padding-right: 0;\n border-radius: 0; }\ntextarea.hi-v4-input--appearance-underline::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; }\ntextarea.hi-v4-input--appearance-underline:not(.disabled):hover::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).focused::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).invalid::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).invalid.hover::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline.disabled, textarea.hi-v4-input--appearance-unset.disabled, textarea.hi-v4-input--appearance-filled.disabled, textarea.hi-v4-input--appearance-underline.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";
|
25
|
+
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-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: 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-normal, 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-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: 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-sm, 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-normal, 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-normal, 32px);\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: var(--hi-v4-text-lineheight-normal, 1.375rem);\n border-radius: var(--hi-v4-border-radius-normal, 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-lg, 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-normal, 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-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: 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-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(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-normal, 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-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: 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-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: 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-sm, 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-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: var(--hi-v4-height-normal, 32px);\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: var(--hi-v4-text-lineheight-normal, 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-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: var(--hi-v4-height-lg, 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-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: 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-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__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";
|
26
26
|
|
27
27
|
var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
|
28
28
|
|
@@ -17,9 +17,11 @@ var React = require('react');
|
|
17
17
|
|
18
18
|
var useUncontrolledState = require('@hi-ui/use-uncontrolled-state');
|
19
19
|
|
20
|
-
var index = require('../../../../hooks/use-latest/lib/esm/index.js');
|
20
|
+
var index$1 = require('../../../../hooks/use-latest/lib/esm/index.js');
|
21
21
|
|
22
|
-
var index$
|
22
|
+
var index$2 = require('../../../../utils/dom-utils/lib/esm/index.js');
|
23
|
+
|
24
|
+
var index = require('./utils/index.js');
|
23
25
|
/** @LICENSE
|
24
26
|
* @hi-ui/input
|
25
27
|
* https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
|
@@ -48,31 +50,60 @@ var useInput = function useInput(_ref) {
|
|
48
50
|
onFocus = _ref.onFocus,
|
49
51
|
onBlur = _ref.onBlur,
|
50
52
|
_ref$trimValueOnBlur = _ref.trimValueOnBlur,
|
51
|
-
trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur
|
53
|
+
trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur,
|
54
|
+
_ref$type = _ref.type,
|
55
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
56
|
+
clearElementRef = _ref.clearElementRef; // Object.is 避免 trimValueOnBlur 和 点击 clearIcon 触发 2 次相同的 onCHange
|
52
57
|
|
53
|
-
var _useUncontrolledState = useUncontrolledState.useUncontrolledState(defaultValue, valueProp, onChange),
|
58
|
+
var _useUncontrolledState = useUncontrolledState.useUncontrolledState(defaultValue, valueProp, onChange, Object.is),
|
54
59
|
value = _useUncontrolledState[0],
|
55
60
|
tryChangeValue = _useUncontrolledState[1];
|
56
61
|
|
57
|
-
var handleChange = React.useCallback(function (evt) {
|
62
|
+
var handleChange = React.useCallback(function (evt, trim) {
|
63
|
+
if (trim === void 0) {
|
64
|
+
trim = false;
|
65
|
+
}
|
66
|
+
|
67
|
+
evt.persist();
|
58
68
|
var nextValue = evt.target.value;
|
59
|
-
|
60
|
-
|
69
|
+
var valueTrue = index.pure(nextValue, type); // 防溢出,保证 onChange 拿到的是值是最新的 formatted value
|
70
|
+
|
71
|
+
var value = index.format(nextValue, type);
|
72
|
+
|
73
|
+
if (trim) {
|
74
|
+
valueTrue = valueTrue.trim();
|
75
|
+
value = value.trim();
|
76
|
+
}
|
77
|
+
|
78
|
+
var event = Object.create(evt);
|
79
|
+
event.target = Object.assign(Object.assign({}, evt.target), {
|
80
|
+
value: value
|
81
|
+
});
|
82
|
+
tryChangeValue(valueTrue, event);
|
83
|
+
}, [tryChangeValue, type]);
|
61
84
|
|
62
85
|
var _useState = React.useState(autoFocus),
|
63
86
|
focused = _useState[0],
|
64
87
|
setFocused = _useState[1];
|
65
88
|
|
66
|
-
var handleFocus = index.useLatestCallback(function (evt) {
|
89
|
+
var handleFocus = index$1.useLatestCallback(function (evt) {
|
67
90
|
setFocused(true);
|
68
91
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);
|
69
92
|
});
|
70
|
-
var handleBlur = index.useLatestCallback(function (event) {
|
71
|
-
|
93
|
+
var handleBlur = index$1.useLatestCallback(function (event) {
|
94
|
+
var relatedTarget = event.relatedTarget; // 拦截 clearIcon 点击清空,阻止其触发 input 失焦
|
95
|
+
|
96
|
+
if (clearElementRef && clearElementRef.current && clearElementRef.current === relatedTarget) {
|
97
|
+
return;
|
98
|
+
}
|
99
|
+
|
100
|
+
setFocused(false); // amount 自动添加小数
|
72
101
|
|
73
|
-
if (
|
74
|
-
|
75
|
-
|
102
|
+
if (type === 'amount') {
|
103
|
+
event.target.value = index.formatAmount(value, true);
|
104
|
+
handleChange(event, trimValueOnBlur);
|
105
|
+
} else if (trimValueOnBlur) {
|
106
|
+
handleChange(event, true);
|
76
107
|
}
|
77
108
|
|
78
109
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
@@ -85,17 +116,17 @@ var useInput = function useInput(_ref) {
|
|
85
116
|
autoFocus: autoFocus,
|
86
117
|
placeholder: placeholder,
|
87
118
|
maxLength: maxLength,
|
88
|
-
'data-focused': index$
|
119
|
+
'data-focused': index$2.setAttrStatus(focused)
|
89
120
|
};
|
90
121
|
}, [disabled, readOnly, autoFocus, placeholder, maxLength, name, focused]);
|
91
122
|
var getInputProps = React.useCallback(function () {
|
92
123
|
return Object.assign(Object.assign({}, nativeInputProps), {
|
93
|
-
value: value,
|
124
|
+
value: index.format(value, type),
|
94
125
|
onChange: handleChange,
|
95
126
|
onFocus: handleFocus,
|
96
127
|
onBlur: handleBlur
|
97
128
|
});
|
98
|
-
}, [value, handleChange, handleFocus, handleBlur, nativeInputProps]);
|
129
|
+
}, [value, type, handleChange, handleFocus, handleBlur, nativeInputProps]);
|
99
130
|
return {
|
100
131
|
focused: focused,
|
101
132
|
value: value,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-input.js","sources":["../../../../../../../input/lib/esm/use-input.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { useCallback, useState, useMemo } from 'react';\nimport { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';\nimport { useLatestCallback } from '@hi-ui/use-latest';\nimport { setAttrStatus } from '@hi-ui/dom-utils';\n\nvar useInput = function useInput(_ref) {\n var name = _ref.name,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$readOnly = _ref.readOnly,\n readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,\n maxLength = _ref.maxLength,\n placeholder = _ref.placeholder,\n _ref$defaultValue = _ref.defaultValue,\n defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,\n valueProp = _ref.value,\n onChange = _ref.onChange,\n onFocus = _ref.onFocus,\n onBlur = _ref.onBlur,\n _ref$trimValueOnBlur = _ref.trimValueOnBlur,\n trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur
|
1
|
+
{"version":3,"file":"use-input.js","sources":["../../../../../../../input/lib/esm/use-input.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { useCallback, useState, useMemo } from 'react';\nimport { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';\nimport { useLatestCallback } from '@hi-ui/use-latest';\nimport { setAttrStatus } from '@hi-ui/dom-utils';\nimport { pure, format, formatAmount } from './utils/index.js';\n\nvar useInput = function useInput(_ref) {\n var name = _ref.name,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$readOnly = _ref.readOnly,\n readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,\n maxLength = _ref.maxLength,\n placeholder = _ref.placeholder,\n _ref$defaultValue = _ref.defaultValue,\n defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,\n valueProp = _ref.value,\n onChange = _ref.onChange,\n onFocus = _ref.onFocus,\n onBlur = _ref.onBlur,\n _ref$trimValueOnBlur = _ref.trimValueOnBlur,\n trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'text' : _ref$type,\n clearElementRef = _ref.clearElementRef; // Object.is 避免 trimValueOnBlur 和 点击 clearIcon 触发 2 次相同的 onCHange\n\n var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange, Object.is),\n value = _useUncontrolledState[0],\n tryChangeValue = _useUncontrolledState[1];\n\n var handleChange = useCallback(function (evt, trim) {\n if (trim === void 0) {\n trim = false;\n }\n\n evt.persist();\n var nextValue = evt.target.value;\n var valueTrue = pure(nextValue, type); // 防溢出,保证 onChange 拿到的是值是最新的 formatted value\n\n var value = format(nextValue, type);\n\n if (trim) {\n valueTrue = valueTrue.trim();\n value = value.trim();\n }\n\n var event = Object.create(evt);\n event.target = Object.assign(Object.assign({}, evt.target), {\n value: value\n });\n tryChangeValue(valueTrue, event);\n }, [tryChangeValue, type]);\n\n var _useState = useState(autoFocus),\n focused = _useState[0],\n setFocused = _useState[1];\n\n var handleFocus = useLatestCallback(function (evt) {\n setFocused(true);\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);\n });\n var handleBlur = useLatestCallback(function (event) {\n var relatedTarget = event.relatedTarget; // 拦截 clearIcon 点击清空,阻止其触发 input 失焦\n\n if (clearElementRef && clearElementRef.current && clearElementRef.current === relatedTarget) {\n return;\n }\n\n setFocused(false); // amount 自动添加小数\n\n if (type === 'amount') {\n event.target.value = formatAmount(value, true);\n handleChange(event, trimValueOnBlur);\n } else if (trimValueOnBlur) {\n handleChange(event, true);\n }\n\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);\n });\n var nativeInputProps = useMemo(function () {\n return {\n name: name,\n disabled: disabled,\n readOnly: readOnly,\n autoFocus: autoFocus,\n placeholder: placeholder,\n maxLength: maxLength,\n 'data-focused': setAttrStatus(focused)\n };\n }, [disabled, readOnly, autoFocus, placeholder, maxLength, name, focused]);\n var getInputProps = useCallback(function () {\n return Object.assign(Object.assign({}, nativeInputProps), {\n value: format(value, type),\n onChange: handleChange,\n onFocus: handleFocus,\n onBlur: handleBlur\n });\n }, [value, type, handleChange, handleFocus, handleBlur, nativeInputProps]);\n return {\n focused: focused,\n value: value,\n tryChangeValue: tryChangeValue,\n getInputProps: getInputProps\n };\n};\n\nexport { useInput };\n//# sourceMappingURL=use-input.js.map\n"],"names":["useInput","_ref","name","autoFocus","_ref$autoFocus","disabled","_ref$disabled","readOnly","_ref$readOnly","maxLength","placeholder","defaultValue","_ref$defaultValue","valueProp","value","onChange","onFocus","onBlur","trimValueOnBlur","_ref$trimValueOnBlur","type","_ref$type","clearElementRef","useUncontrolledState","Object","is","_useUncontrolledState","tryChangeValue","handleChange","useCallback","evt","trim","nextValue","valueTrue","pure","format","event","target","useState","focused","_useState","setFocused","handleFocus","useLatestCallback","handleBlur","relatedTarget","formatAmount","nativeInputProps","useMemo","setAttrStatus","getInputProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMaA,QAAQ,GAAG,SAAXA,QAAW,CAAAC,IAAA,EAAA;MACtBC,IAAAA,GAAAA,IAAAA,CAAAA;4BACAC;MAAAA,SAAAA,GAAAA,cAAAA,KAAAA,KAAAA,CAAAA,GAAY,KAAZA,GAAYC;2BACZC;MAAAA,QAAAA,GAAAA,aAAAA,KAAAA,KAAAA,CAAAA,GAAW,KAAXA,GAAWC;2BACXC;MAAAA,QAAAA,GAAAA,aAAAA,KAAAA,KAAAA,CAAAA,GAAW,KA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AA,CAAAA,GAAAA,MAAM,CAANA,KAAM,CAANA;AAnBgC,GAAjB0B;MAuBbI,gBAAgB,GAAGC,aAAAA,CACvB,YAAA;WAAO;AACL9C,MAAAA,IAAI,EADCA,IAAA;AAELG,MAAAA,QAAQ,EAFHA,QAAA;AAGLE,MAAAA,QAAQ,EAHHA,QAAA;AAILJ,MAAAA,SAAS,EAJJA,SAAA;AAKLO,MAAAA,WAAW,EALNA,WAAA;AAMLD,MAAAA,SAAS,EANJA,SAAA;sBAOWwC,qBAAAA,CAAaV,OAAbU;AAPX;AADuB,GAAPD,EAUvB,CAAA3C,QAAA,EAAAE,QAAA,EAAAJ,SAAA,EAAAO,WAAA,EAAAD,SAAA,EAAAP,IAAA,EAV8BqC,OAU9B,CAVuBS;MAanBE,aAAa,GAAGrB,iBAAAA,CAAY,YAAA;2CAE3BkB,mBAAAA;AACHjC,MAAAA,KAAK,EAAEqB,YAAAA,CAAMrB,KAANqB,EAAMf,IAANe,CADJY;AAEHhC,MAAAA,QAAQ,EAAEa,YAFPmB;AAGH/B,MAAAA,OAAO,EAAE0B,WAHNK;AAIH9B,MAAAA,MAAM,EAAE2B;AAJLG;AAF0B,GAAXlB,EAQnB,CAAAf,KAAA,EAAAM,IAAA,EAAAQ,YAAA,EAAAc,WAAA,EAAAE,UAAA,EAR8BG,gBAQ9B,CARmBlB;SAUf;AACLU,IAAAA,OAAO,EADFA,OAAA;AAELzB,IAAAA,KAAK,EAFAA,KAAA;AAGLa,IAAAA,cAAc,EAHTA,cAAA;AAILuB,IAAAA,aAAa,EAAbA;AAJK;;;"}
|
@@ -0,0 +1,202 @@
|
|
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
|
+
'use strict';
|
11
|
+
|
12
|
+
Object.defineProperty(exports, '__esModule', {
|
13
|
+
value: true
|
14
|
+
});
|
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
|
+
/**
|
26
|
+
* 格式化身份证
|
27
|
+
*/
|
28
|
+
|
29
|
+
var formatId = function formatId(val) {
|
30
|
+
val = val.replace(/[^a-zA-Z0-9]/g, '');
|
31
|
+
var len = val.length;
|
32
|
+
|
33
|
+
if (val === '' || len < 7) {
|
34
|
+
return val;
|
35
|
+
}
|
36
|
+
|
37
|
+
if (len < 11) {
|
38
|
+
return val.slice(0, 6) + ' ' + val.slice(6, 10);
|
39
|
+
} else if (len < 15) {
|
40
|
+
return val.slice(0, 6) + ' ' + val.slice(6, 10) + ' ' + val.slice(10, 14);
|
41
|
+
} else {
|
42
|
+
return val.slice(0, 6) + ' ' + val.slice(6, 10) + ' ' + val.slice(10, 14) + ' ' + val.slice(14, 18);
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
var pureId = function pureId(val) {
|
47
|
+
var tmp = val.replace(/[^\d|.]/g, '');
|
48
|
+
return tmp.slice(0, 18);
|
49
|
+
};
|
50
|
+
/**
|
51
|
+
* 格式化手机号
|
52
|
+
*/
|
53
|
+
|
54
|
+
|
55
|
+
var formatTel = function formatTel(val) {
|
56
|
+
val = val.replace(/\D/g, '');
|
57
|
+
var len = val.length;
|
58
|
+
|
59
|
+
if (val === '' || len < 4) {
|
60
|
+
return val;
|
61
|
+
}
|
62
|
+
|
63
|
+
if (len < 8) {
|
64
|
+
return val.slice(0, 3) + ' ' + val.slice(3, 7);
|
65
|
+
} else {
|
66
|
+
return val.slice(0, 3) + ' ' + val.slice(3, 7) + ' ' + val.slice(7, 11);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
|
70
|
+
var pureTel = function pureTel(val) {
|
71
|
+
var tmp = val.replace(/[^\d|.]/g, '');
|
72
|
+
return tmp.slice(0, 11);
|
73
|
+
};
|
74
|
+
/**
|
75
|
+
* 格式化银行卡号
|
76
|
+
*/
|
77
|
+
|
78
|
+
|
79
|
+
var formatCard = function formatCard(val) {
|
80
|
+
val = val.replace(/\D/g, '');
|
81
|
+
var len = val.length;
|
82
|
+
|
83
|
+
if (val === '' || val.length < 5) {
|
84
|
+
return val;
|
85
|
+
}
|
86
|
+
|
87
|
+
if (len < 9) {
|
88
|
+
return val.slice(0, 4) + ' ' + val.slice(4, 8);
|
89
|
+
} else if (len < 13) {
|
90
|
+
return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12);
|
91
|
+
} else if (len < 17) {
|
92
|
+
return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12) + ' ' + val.slice(12, 16);
|
93
|
+
} else {
|
94
|
+
return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12) + ' ' + val.slice(12, 16) + ' ' + val.slice(16, 19);
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
98
|
+
var pureCard = function pureCard(val) {
|
99
|
+
var tmp = val.replace(/[^\d|.]/g, '');
|
100
|
+
return tmp.slice(0, 19);
|
101
|
+
};
|
102
|
+
/**
|
103
|
+
* 金额自动生成小数
|
104
|
+
* @param {string} val 需要处理的值
|
105
|
+
*/
|
106
|
+
|
107
|
+
|
108
|
+
var formatAmount = function formatAmount(val, fill) {
|
109
|
+
if (fill === void 0) {
|
110
|
+
fill = false;
|
111
|
+
}
|
112
|
+
|
113
|
+
val = val.replace(/[^\d|.|,]/g, '').replace(/(\.\d*?)(\.|,).*/, function (_, $1) {
|
114
|
+
return $1;
|
115
|
+
});
|
116
|
+
|
117
|
+
if (fill) {
|
118
|
+
if (!val) return val;
|
119
|
+
return val.indexOf('.') > -1 ? val : val + '.00';
|
120
|
+
}
|
121
|
+
|
122
|
+
return val;
|
123
|
+
};
|
124
|
+
|
125
|
+
var pureAmount = function pureAmount(val) {
|
126
|
+
var tmp = val.replace(/[^\d|.]/g, '');
|
127
|
+
return tmp;
|
128
|
+
};
|
129
|
+
|
130
|
+
var formatEmail = function formatEmail(val) {
|
131
|
+
return val.replace(/\W/g, '');
|
132
|
+
};
|
133
|
+
|
134
|
+
var pureEmail = function pureEmail(val) {
|
135
|
+
return val;
|
136
|
+
};
|
137
|
+
/**
|
138
|
+
* 输入规则
|
139
|
+
*/
|
140
|
+
|
141
|
+
|
142
|
+
var format = function format(val, type) {
|
143
|
+
switch (type) {
|
144
|
+
case 'id':
|
145
|
+
return formatId(val);
|
146
|
+
|
147
|
+
case 'tel':
|
148
|
+
return formatTel(val);
|
149
|
+
|
150
|
+
case 'card':
|
151
|
+
return formatCard(val);
|
152
|
+
|
153
|
+
case 'email':
|
154
|
+
return formatEmail(val);
|
155
|
+
|
156
|
+
case 'amount':
|
157
|
+
return formatAmount(val);
|
158
|
+
|
159
|
+
default:
|
160
|
+
return val;
|
161
|
+
}
|
162
|
+
};
|
163
|
+
/**
|
164
|
+
* 净化规则
|
165
|
+
*/
|
166
|
+
|
167
|
+
|
168
|
+
var pure = function pure(val, type) {
|
169
|
+
switch (type) {
|
170
|
+
case 'id':
|
171
|
+
return pureId(val);
|
172
|
+
|
173
|
+
case 'tel':
|
174
|
+
return pureTel(val);
|
175
|
+
|
176
|
+
case 'card':
|
177
|
+
return pureCard(val);
|
178
|
+
|
179
|
+
case 'email':
|
180
|
+
return pureEmail(val);
|
181
|
+
|
182
|
+
case 'amount':
|
183
|
+
return pureAmount(val);
|
184
|
+
|
185
|
+
default:
|
186
|
+
return val;
|
187
|
+
}
|
188
|
+
};
|
189
|
+
|
190
|
+
exports.format = format;
|
191
|
+
exports.formatAmount = formatAmount;
|
192
|
+
exports.formatCard = formatCard;
|
193
|
+
exports.formatEmail = formatEmail;
|
194
|
+
exports.formatId = formatId;
|
195
|
+
exports.formatTel = formatTel;
|
196
|
+
exports.pure = pure;
|
197
|
+
exports.pureAmount = pureAmount;
|
198
|
+
exports.pureCard = pureCard;
|
199
|
+
exports.pureEmail = pureEmail;
|
200
|
+
exports.pureId = pureId;
|
201
|
+
exports.pureTel = pureTel;
|
202
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../input/lib/esm/utils/index.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * 格式化身份证\n */\nvar formatId = function formatId(val) {\n val = val.replace(/[^a-zA-Z0-9]/g, '');\n var len = val.length;\n\n if (val === '' || len < 7) {\n return val;\n }\n\n if (len < 11) {\n return val.slice(0, 6) + ' ' + val.slice(6, 10);\n } else if (len < 15) {\n return val.slice(0, 6) + ' ' + val.slice(6, 10) + ' ' + val.slice(10, 14);\n } else {\n return val.slice(0, 6) + ' ' + val.slice(6, 10) + ' ' + val.slice(10, 14) + ' ' + val.slice(14, 18);\n }\n};\n\nvar pureId = function pureId(val) {\n var tmp = val.replace(/[^\\d|.]/g, '');\n return tmp.slice(0, 18);\n};\n/**\n * 格式化手机号\n */\n\n\nvar formatTel = function formatTel(val) {\n val = val.replace(/\\D/g, '');\n var len = val.length;\n\n if (val === '' || len < 4) {\n return val;\n }\n\n if (len < 8) {\n return val.slice(0, 3) + ' ' + val.slice(3, 7);\n } else {\n return val.slice(0, 3) + ' ' + val.slice(3, 7) + ' ' + val.slice(7, 11);\n }\n};\n\nvar pureTel = function pureTel(val) {\n var tmp = val.replace(/[^\\d|.]/g, '');\n return tmp.slice(0, 11);\n};\n/**\n * 格式化银行卡号\n */\n\n\nvar formatCard = function formatCard(val) {\n val = val.replace(/\\D/g, '');\n var len = val.length;\n\n if (val === '' || val.length < 5) {\n return val;\n }\n\n if (len < 9) {\n return val.slice(0, 4) + ' ' + val.slice(4, 8);\n } else if (len < 13) {\n return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12);\n } else if (len < 17) {\n return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12) + ' ' + val.slice(12, 16);\n } else {\n return val.slice(0, 4) + ' ' + val.slice(4, 8) + ' ' + val.slice(8, 12) + ' ' + val.slice(12, 16) + ' ' + val.slice(16, 19);\n }\n};\n\nvar pureCard = function pureCard(val) {\n var tmp = val.replace(/[^\\d|.]/g, '');\n return tmp.slice(0, 19);\n};\n/**\n * 金额自动生成小数\n * @param {string} val 需要处理的值\n */\n\n\nvar formatAmount = function formatAmount(val, fill) {\n if (fill === void 0) {\n fill = false;\n }\n\n val = val.replace(/[^\\d|.|,]/g, '').replace(/(\\.\\d*?)(\\.|,).*/, function (_, $1) {\n return $1;\n });\n\n if (fill) {\n if (!val) return val;\n return val.indexOf('.') > -1 ? val : val + '.00';\n }\n\n return val;\n};\n\nvar pureAmount = function pureAmount(val) {\n var tmp = val.replace(/[^\\d|.]/g, '');\n return tmp;\n};\n\nvar formatEmail = function formatEmail(val) {\n return val.replace(/\\W/g, '');\n};\n\nvar pureEmail = function pureEmail(val) {\n return val;\n};\n/**\n * 输入规则\n */\n\n\nvar format = function format(val, type) {\n switch (type) {\n case 'id':\n return formatId(val);\n\n case 'tel':\n return formatTel(val);\n\n case 'card':\n return formatCard(val);\n\n case 'email':\n return formatEmail(val);\n\n case 'amount':\n return formatAmount(val);\n\n default:\n return val;\n }\n};\n/**\n * 净化规则\n */\n\n\nvar pure = function pure(val, type) {\n switch (type) {\n case 'id':\n return pureId(val);\n\n case 'tel':\n return pureTel(val);\n\n case 'card':\n return pureCard(val);\n\n case 'email':\n return pureEmail(val);\n\n case 'amount':\n return pureAmount(val);\n\n default:\n return val;\n }\n};\n\nexport { format, formatAmount, formatCard, formatEmail, formatId, formatTel, pure, pureAmount, pureCard, pureEmail, pureId, pureTel };\n//# sourceMappingURL=index.js.map\n"],"names":["formatId","val","len","length","pureId","tmp","formatTel","pureTel","formatCard","pureCard","formatAmount","fill","replace","_","$1","pureAmount","formatEmail","pureEmail","format","type","pure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;IAGaA,QAAQ,GAAG,SAAXA,QAAW,CAAAC,GAAA,EAAA;AACtBA,EAAAA,GAAG,GAAGA,GAAG,CAAHA,OAAAA,CAAAA,eAAAA,EAANA,EAAMA,CAANA;MACMC,GAAG,GAAGD,GAAG,CAACE;;MAEZF,GAAG,KAAHA,EAAAA,IAAcC,GAAG,GAAG,GAAG;WAClBD;;;MAGLC,GAAG,GAAG,IAAI;WACLD,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAAA,CAAAA,IAAAA,GAAAA,GAAwBA,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAAA,EAAAA;SAC1B,IAAIC,GAAG,GAAP,EAAA,EAAc;WACZD,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAAA,CAAAA,IAAAA,GAAAA,GAAwBA,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAxBA,EAAwBA,CAAxBA,GAAAA,GAAAA,GAAiDA,GAAG,CAAHA,KAAAA,CAAAA,EAAAA,EAAAA,EAAAA;AADnD,GAAA,MAEA;WAEHA,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAAA,CAAAA,IAAAA,GAAAA,GAAwBA,GAAG,CAAHA,KAAAA,CAAAA,CAAAA,EAAxBA,EAAwBA,CAAxBA,GAAAA,GAAAA,GAAiDA,GAAG,CAAHA,KAAAA,CAAAA,EAAAA,EAAjDA,EAAiDA,CAAjDA,GAAAA,GAAAA,GAA2EA,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