@mirai/ui 1.0.63 → 1.0.64

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.
Files changed (35) hide show
  1. package/README.md +8 -1
  2. package/build/components/InputDate/InputDate.js +28 -12
  3. package/build/components/InputDate/InputDate.js.map +1 -1
  4. package/build/components/InputDate/InputDate.module.css +9 -16
  5. package/build/components/InputDate/InputDate.stories.js +11 -1
  6. package/build/components/InputDate/InputDate.stories.js.map +1 -1
  7. package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +144 -167
  8. package/build/components/InputOption/InputOption.js +1 -0
  9. package/build/components/InputOption/InputOption.js.map +1 -1
  10. package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +3 -3
  11. package/build/components/InputSelect/InputSelect.js +17 -7
  12. package/build/components/InputSelect/InputSelect.js.map +1 -1
  13. package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +217 -163
  14. package/build/components/InputText/InputText.js +13 -10
  15. package/build/components/InputText/InputText.js.map +1 -1
  16. package/build/components/InputText/InputText.module.css +11 -11
  17. package/build/components/InputText/InputText.stories.js +1 -0
  18. package/build/components/InputText/InputText.stories.js.map +1 -1
  19. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +108 -88
  20. package/build/components/Menu/Menu.js +37 -16
  21. package/build/components/Menu/Menu.js.map +1 -1
  22. package/build/components/Menu/Menu.module.css +3 -0
  23. package/build/components/Menu/Menu.stories.js +1 -0
  24. package/build/components/Menu/Menu.stories.js.map +1 -1
  25. package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +35 -19
  26. package/build/components/Modal/Modal.js +5 -2
  27. package/build/components/Modal/Modal.js.map +1 -1
  28. package/build/components/Modal/Modal.module.css +9 -20
  29. package/build/components/Modal/Modal.stories.js +1 -0
  30. package/build/components/Modal/Modal.stories.js.map +1 -1
  31. package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +24 -12
  32. package/build/hooks/useDevice.js +1 -1
  33. package/build/hooks/useDevice.js.map +1 -1
  34. package/build/theme/default.theme.css +1 -1
  35. package/package.json +1 -1
@@ -62,6 +62,7 @@ var InputOption = function InputOption(_ref) {
62
62
  value: checked ? _primitives.ICON.CHECK : _primitives.ICON.REMOVE,
63
63
  className: _InputOptionModule.default.icon
64
64
  }) : undefined), label && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
65
+ action: true,
65
66
  className: (0, _helpers.styles)(_InputOptionModule.default.label, disabled && _InputOptionModule.default.disabled)
66
67
  }, label));
67
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"InputOption.js","names":["InputOption","checked","disabled","indeterminate","label","name","reverse","type","CHECKBOX","value","onChange","others","Primitive","Checkbox","RADIO","Radio","Switch","handleChange","event","SWITCH","includes","style","inputOption","className","ICON","CHECK","REMOVE","icon","undefined","displayName","propTypes","PropTypes","bool","string","isRequired","oneOf","func"],"sources":["../../../src/components/InputOption/InputOption.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Checkbox, Icon, ICON, Pressable, Radio, Switch, Text } from '../../primitives';\nimport { CHECKBOX, RADIO, SWITCH } from './InputOption.constants';\nimport style from './InputOption.module.css';\n\nconst InputOption = ({\n checked,\n disabled,\n indeterminate,\n label,\n name,\n reverse,\n type = CHECKBOX,\n value = '',\n onChange = () => {},\n ...others\n}) => {\n const Primitive = type === CHECKBOX ? Checkbox : type === RADIO ? Radio : Switch;\n\n const handleChange = (event) => {\n onChange([CHECKBOX, SWITCH].includes(type) ? !checked : value, event);\n };\n\n return (\n <Pressable\n {...others}\n type=\"button\"\n className={styles(style.inputOption, reverse && style.reverse, others.className)}\n onPress={handleChange}\n >\n <Primitive\n checked={checked || (type === CHECKBOX && indeterminate)}\n disabled={disabled}\n name={name}\n type={type}\n value={value}\n >\n {type === CHECKBOX && (checked || indeterminate) ? (\n <Icon value={checked ? ICON.CHECK : ICON.REMOVE} className={style.icon} />\n ) : undefined}\n </Primitive>\n {label && <Text className={styles(style.label, disabled && style.disabled)}>{label}</Text>}\n </Pressable>\n );\n};\n\nInputOption.displayName = 'Component:InputOption';\n\nInputOption.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n indeterminate: PropTypes.bool,\n label: PropTypes.string,\n name: PropTypes.string.isRequired,\n reverse: PropTypes.bool,\n type: PropTypes.oneOf([CHECKBOX, RADIO, SWITCH]),\n value: PropTypes.string,\n onChange: PropTypes.func,\n};\n\nexport { InputOption };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OAWd;EAAA,IAVJC,OAUI,QAVJA,OAUI;EAAA,IATJC,QASI,QATJA,QASI;EAAA,IARJC,aAQI,QARJA,aAQI;EAAA,IAPJC,KAOI,QAPJA,KAOI;EAAA,IANJC,IAMI,QANJA,IAMI;EAAA,IALJC,OAKI,QALJA,OAKI;EAAA,qBAJJC,IAII;EAAA,IAJJA,IAII,0BAJGC,qBAIH;EAAA,sBAHJC,KAGI;EAAA,IAHJA,KAGI,2BAHI,EAGJ;EAAA,yBAFJC,QAEI;EAAA,IAFJA,QAEI,8BAFO,YAAM,CAAE,CAEf;EAAA,IADDC,MACC;;EACJ,IAAMC,SAAS,GAAGL,IAAI,KAAKC,qBAAT,GAAoBK,oBAApB,GAA+BN,IAAI,KAAKO,kBAAT,GAAiBC,iBAAjB,GAAyBC,kBAA1E;;EAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAW;IAC9BR,QAAQ,CAAC,CAACF,qBAAD,EAAWW,mBAAX,EAAmBC,QAAnB,CAA4Bb,IAA5B,IAAoC,CAACN,OAArC,GAA+CQ,KAAhD,EAAuDS,KAAvD,CAAR;EACD,CAFD;;EAIA,oBACE,6BAAC,qBAAD,eACMP,MADN;IAEE,IAAI,EAAC,QAFP;IAGE,SAAS,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.js","names":["InputOption","checked","disabled","indeterminate","label","name","reverse","type","CHECKBOX","value","onChange","others","Primitive","Checkbox","RADIO","Radio","Switch","handleChange","event","SWITCH","includes","style","inputOption","className","ICON","CHECK","REMOVE","icon","undefined","displayName","propTypes","PropTypes","bool","string","isRequired","oneOf","func"],"sources":["../../../src/components/InputOption/InputOption.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Checkbox, Icon, ICON, Pressable, Radio, Switch, Text } from '../../primitives';\nimport { CHECKBOX, RADIO, SWITCH } from './InputOption.constants';\nimport style from './InputOption.module.css';\n\nconst InputOption = ({\n checked,\n disabled,\n indeterminate,\n label,\n name,\n reverse,\n type = CHECKBOX,\n value = '',\n onChange = () => {},\n ...others\n}) => {\n const Primitive = type === CHECKBOX ? Checkbox : type === RADIO ? Radio : Switch;\n\n const handleChange = (event) => {\n onChange([CHECKBOX, SWITCH].includes(type) ? !checked : value, event);\n };\n\n return (\n <Pressable\n {...others}\n type=\"button\"\n className={styles(style.inputOption, reverse && style.reverse, others.className)}\n onPress={handleChange}\n >\n <Primitive\n checked={checked || (type === CHECKBOX && indeterminate)}\n disabled={disabled}\n name={name}\n type={type}\n value={value}\n >\n {type === CHECKBOX && (checked || indeterminate) ? (\n <Icon value={checked ? ICON.CHECK : ICON.REMOVE} className={style.icon} />\n ) : undefined}\n </Primitive>\n {label && (\n <Text action className={styles(style.label, disabled && style.disabled)}>\n {label}\n </Text>\n )}\n </Pressable>\n );\n};\n\nInputOption.displayName = 'Component:InputOption';\n\nInputOption.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n indeterminate: PropTypes.bool,\n label: PropTypes.string,\n name: PropTypes.string.isRequired,\n reverse: PropTypes.bool,\n type: PropTypes.oneOf([CHECKBOX, RADIO, SWITCH]),\n value: PropTypes.string,\n onChange: PropTypes.func,\n};\n\nexport { InputOption };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;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AC,gBAAD;IAAM,KAAK,EAAEF,OAAO,GAAGuB,iBAAKC,KAAR,GAAgBD,iBAAKE,MAAzC;IAAiD,SAAS,EAAEL,2BAAMM;EAAlE,EADD,GAEGC,SATN,CANF,EAiBGxB,KAAK,iBACJ,6BAAC,gBAAD;IAAM,MAAM,MAAZ;IAAa,SAAS,EAAE,qBAAOiB,2BAAMjB,KAAb,EAAoBF,QAAQ,IAAImB,2BAAMnB,QAAtC;EAAxB,GACGE,KADH,CAlBJ,CADF;AAyBD,CA3CD;;;AA6CAJ,WAAW,CAAC6B,WAAZ,GAA0B,uBAA1B;AAEA7B,WAAW,CAAC8B,SAAZ,GAAwB;EACtB7B,OAAO,EAAE8B,mBAAUC,IADG;EAEtB9B,QAAQ,EAAE6B,mBAAUC,IAFE;EAGtB7B,aAAa,EAAE4B,mBAAUC,IAHH;EAItB5B,KAAK,EAAE2B,mBAAUE,MAJK;EAKtB5B,IAAI,EAAE0B,mBAAUE,MAAV,CAAiBC,UALD;EAMtB5B,OAAO,EAAEyB,mBAAUC,IANG;EAOtBzB,IAAI,EAAEwB,mBAAUI,KAAV,CAAgB,CAAC3B,qBAAD,EAAWM,kBAAX,EAAkBK,mBAAlB,CAAhB,CAPgB;EAQtBV,KAAK,EAAEsB,mBAAUE,MARK;EAStBvB,QAAQ,EAAEqB,mBAAUK;AATE,CAAxB"}
@@ -228,7 +228,7 @@ exports[`primitive:<InputOption> prop:label 1`] = `
228
228
  />
229
229
  </div>
230
230
  <span
231
- class="text paragraph label"
231
+ class="text action label"
232
232
  >
233
233
  label
234
234
  </span>
@@ -253,7 +253,7 @@ exports[`primitive:<InputOption> prop:reverse + label 1`] = `
253
253
  />
254
254
  </div>
255
255
  <span
256
- class="text paragraph label"
256
+ class="text action label"
257
257
  >
258
258
  label
259
259
  </span>
@@ -280,7 +280,7 @@ exports[`primitive:<InputOption> prop:type 1`] = `
280
280
  />
281
281
  </div>
282
282
  <span
283
- class="text paragraph label"
283
+ class="text action label"
284
284
  >
285
285
  label
286
286
  </span>
@@ -17,7 +17,7 @@ var _primitives = require("../../primitives");
17
17
 
18
18
  var _InputTextModule = _interopRequireDefault(require("../InputText/InputText.module.css"));
19
19
 
20
- var _excluded = ["disabled", "error", "hint", "label", "success", "warning", "onChange", "onEnter", "onLeave"];
20
+ var _excluded = ["disabled", "error", "hint", "label", "showState", "success", "warning", "onChange", "onEnter", "onLeave"];
21
21
 
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
 
@@ -50,6 +50,8 @@ var InputSelect = function InputSelect(_ref) {
50
50
  error = _ref.error,
51
51
  hint = _ref.hint,
52
52
  label = _ref.label,
53
+ _ref$showState = _ref.showState,
54
+ showState = _ref$showState === void 0 ? true : _ref$showState,
53
55
  success = _ref.success,
54
56
  warning = _ref.warning,
55
57
  _ref$onChange = _ref.onChange,
@@ -83,7 +85,8 @@ var InputSelect = function InputSelect(_ref) {
83
85
  };
84
86
 
85
87
  var has = {
86
- value: others.value !== undefined && ((_others$value = others.value) === null || _others$value === void 0 ? void 0 : _others$value.length) > 0
88
+ value: others.value !== undefined && ((_others$value = others.value) === null || _others$value === void 0 ? void 0 : _others$value.length) > 0,
89
+ stateIcon: showState && (error || success || warning)
87
90
  };
88
91
  return /*#__PURE__*/_react.default.createElement(_primitives.View, {
89
92
  className: (0, _helpers.styles)(_InputTextModule.default.inputContainer, others.className),
@@ -101,14 +104,20 @@ var InputSelect = function InputSelect(_ref) {
101
104
  onChange: handleChange,
102
105
  onEnter: handleEnter,
103
106
  onLeave: handleLeave
104
- })), !disabled && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
105
- value: !focus && (error || success || warning) ? (0, _helpers.getIconState)({
107
+ })), (!disabled || has.stateIcon) && /*#__PURE__*/_react.default.createElement(_primitives.View, {
108
+ row: true,
109
+ className: _InputTextModule.default.icons
110
+ }, !disabled && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
111
+ value: _primitives.ICON.EXPAND_MORE,
112
+ className: _InputTextModule.default.icon
113
+ }), has.stateIcon && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
114
+ value: (0, _helpers.getIconState)({
106
115
  error: error,
107
116
  success: success,
108
117
  warning: warning
109
- }) : _primitives.ICON.EXPAND_MORE,
110
- className: (0, _helpers.styles)(_InputTextModule.default.icon, _InputTextModule.default.right, error ? _InputTextModule.default.error : warning ? _InputTextModule.default.warning : success ? _InputTextModule.default.success : undefined)
111
- })), hint && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
118
+ }),
119
+ className: (0, _helpers.styles)(_InputTextModule.default.icon, error ? _InputTextModule.default.error : warning ? _InputTextModule.default.warning : success ? _InputTextModule.default.success : undefined)
120
+ }))), hint && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
112
121
  small: true,
113
122
  className: (0, _helpers.styles)(_InputTextModule.default.text, _InputTextModule.default.hint, disabled && _InputTextModule.default.disabled, error && _InputTextModule.default.error)
114
123
  }, hint));
@@ -122,6 +131,7 @@ InputSelect.propTypes = {
122
131
  hint: _propTypes.default.string,
123
132
  label: _propTypes.default.string,
124
133
  name: _propTypes.default.string.isRequired,
134
+ showState: _propTypes.default.bool,
125
135
  success: _propTypes.default.bool,
126
136
  warning: _propTypes.default.bool,
127
137
  onChange: _propTypes.default.func,
@@ -1 +1 @@
1
- {"version":3,"file":"InputSelect.js","names":["InputSelect","disabled","error","hint","label","success","warning","onChange","onEnter","onLeave","others","focus","setFocus","handleChange","value","event","target","blur","handleEnter","handleLeave","has","undefined","length","style","inputContainer","className","text","inputBorder","input","iconRight","empty","ICON","EXPAND_MORE","icon","right","displayName","propTypes","PropTypes","bool","string","name","isRequired","func"],"sources":["../../../src/components/InputSelect/InputSelect.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Select, Text, View } from '../../primitives';\nimport style from '../InputText/InputText.module.css';\n\nconst InputSelect = ({\n disabled,\n error,\n hint,\n label,\n success,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n\n const handleChange = (value, event) => {\n onChange(value, event);\n event.target?.blur();\n };\n\n const handleEnter = (event) => {\n setFocus(true);\n onEnter(event);\n };\n\n const handleLeave = (event) => {\n setFocus(false);\n onLeave(event);\n };\n\n const has = {\n value: others.value !== undefined && others.value?.length > 0,\n };\n\n return (\n <View className={styles(style.inputContainer, others.className)} style={others.style}>\n {label && (\n <Text\n className={styles(\n style.text,\n style.label,\n disabled && style.disabled,\n error && style.error,\n focus && style.focus,\n (focus || error || has.value) && style.value,\n )}\n >\n {label}\n </Text>\n )}\n\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n focus && !error && style.focus,\n error && style.error,\n )}\n >\n <Select\n {...others}\n disabled={disabled}\n value={others.value || ''}\n className={styles(style.input, style.iconRight, !!label && !(focus || error || has.value) && style.empty)}\n style={undefined}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n {!disabled && (\n <Icon\n value={\n !focus && (error || success || warning) ? getIconState({ error, success, warning }) : ICON.EXPAND_MORE\n }\n className={styles(\n style.icon,\n style.right,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n />\n )}\n </View>\n\n {hint && (\n <Text small className={styles(style.text, style.hint, disabled && style.disabled, error && style.error)}>\n {hint}\n </Text>\n )}\n </View>\n );\n};\n\nInputSelect.displayName = 'Component:InputSelect';\n\nInputSelect.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n label: PropTypes.string,\n name: PropTypes.string.isRequired,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes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A,KAAF;MAASG,OAAO,EAAPA,OAAT;MAAkBC,OAAO,EAAPA;IAAlB,CAAb,CAA1C,GAAsFyB,iBAAKC,WAF/F;IAIE,SAAS,EAAE,qBACTT,yBAAMU,IADG,EAETV,yBAAMW,KAFG,EAGThC,KAAK,GAAGqB,yBAAMrB,KAAT,GAAiBI,OAAO,GAAGiB,yBAAMjB,OAAT,GAAmBD,OAAO,GAAGkB,yBAAMlB,OAAT,GAAmBgB,SAHjE;EAJb,EApBJ,CAhBF,EAiDGlB,IAAI,iBACH,6BAAC,gBAAD;IAAM,KAAK,MAAX;IAAY,SAAS,EAAE,qBAAOoB,yBAAMG,IAAb,EAAmBH,yBAAMpB,IAAzB,EAA+BF,QAAQ,IAAIsB,yBAAMtB,QAAjD,EAA2DC,KAAK,IAAIqB,yBAAMrB,KAA1E;EAAvB,GACGC,IADH,CAlDJ,CADF;AAyDD,CA1FD;;;AA4FAH,WAAW,CAACmC,WAAZ,GAA0B,uBAA1B;AAEAnC,WAAW,CAACoC,SAAZ,GAAwB;EACtBnC,QAAQ,EAAEoC,mBAAUC,IADE;EAEtBpC,KAAK,EAAEmC,mBAAUC,IAFK;EAGtBnC,IAAI,EAAEkC,mBAAUE,MAHM;EAItBnC,KAAK,EAAEiC,mBAAUE,MAJK;EAKtBC,IAAI,EAAEH,mBAAUE,MAAV,CAAiBE,UALD;EAMtBpC,OAAO,EAAEgC,mBAAUC,IANG;EAOtBhC,OAAO,EAAE+B,mBAAUC,IAPG;EAQtB/B,QAAQ,EAAE8B,mBAAUK,IARE;EAStBlC,OAAO,EAAE6B,mBAAUK,IATG;EAUtBjC,OAAO,EAAE4B,mBAAUK;AAVG,CAAxB"}
1
+ {"version":3,"file":"InputSelect.js","names":["InputSelect","disabled","error","hint","label","showState","success","warning","onChange","onEnter","onLeave","others","focus","setFocus","handleChange","value","event","target","blur","handleEnter","handleLeave","has","undefined","length","stateIcon","style","inputContainer","className","text","inputBorder","input","iconRight","empty","icons","ICON","EXPAND_MORE","icon","displayName","propTypes","PropTypes","bool","string","name","isRequired","func"],"sources":["../../../src/components/InputSelect/InputSelect.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Select, Text, View } from '../../primitives';\nimport style from '../InputText/InputText.module.css';\n\nconst InputSelect = ({\n disabled,\n error,\n hint,\n label,\n showState = true,\n success,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n\n const handleChange = (value, event) => {\n onChange(value, event);\n event.target?.blur();\n };\n\n const handleEnter = (event) => {\n setFocus(true);\n onEnter(event);\n };\n\n const handleLeave = (event) => {\n setFocus(false);\n onLeave(event);\n };\n\n const has = {\n value: others.value !== undefined && others.value?.length > 0,\n stateIcon: showState && (error || success || warning),\n };\n\n return (\n <View className={styles(style.inputContainer, others.className)} style={others.style}>\n {label && (\n <Text\n className={styles(\n style.text,\n style.label,\n disabled && style.disabled,\n error && style.error,\n focus && style.focus,\n (focus || error || has.value) && style.value,\n )}\n >\n {label}\n </Text>\n )}\n\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n focus && !error && style.focus,\n error && style.error,\n )}\n >\n <Select\n {...others}\n disabled={disabled}\n value={others.value || ''}\n className={styles(style.input, style.iconRight, !!label && !(focus || error || has.value) && style.empty)}\n style={undefined}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n {(!disabled || has.stateIcon) && (\n <View row className={style.icons}>\n {!disabled && <Icon value={ICON.EXPAND_MORE} className={style.icon} />}\n {has.stateIcon && (\n <Icon\n value={getIconState({ error, success, warning })}\n className={styles(\n style.icon,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n />\n )}\n </View>\n )}\n </View>\n\n {hint && (\n <Text small className={styles(style.text, style.hint, disabled && style.disabled, error && style.error)}>\n {hint}\n </Text>\n )}\n </View>\n );\n};\n\nInputSelect.displayName = 'Component:InputSelect';\n\nInputSelect.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n label: PropTypes.string,\n name: PropTypes.string.isRequired,\n showState: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputSelect };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OAYd;EAAA;;EAAA,IAXJC,QAWI,QAXJA,QAWI;EAAA,IAVJC,KAUI,QAVJA,KAUI;EAAA,IATJC,IASI,QATJA,IASI;EAAA,IARJC,KAQI,QARJA,KAQI;EAAA,0BAPJC,SAOI;EAAA,IAPJA,SAOI,+BAPQ,IAOR;EAAA,IANJC,OAMI,QANJA,OAMI;EAAA,IALJC,OAKI,QALJA,OAKI;EAAA,yBAJJC,QAII;EAAA,IAJJA,QAII,8BAJO,YAAM,CAAE,CAIf;EAAA,wBAHJC,OAGI;EAAA,IAHJA,OAGI,6BAHM,YAAM,CAAE,CAGd;EAAA,wBAFJC,OAEI;EAAA,IAFJA,OAEI,6BAFM,YAAM,CAAE,CAEd;EAAA,IADDC,MACC;;EACJ,gBAA0B,qBAAS,KAAT,CAA1B;EAAA;EAAA,IAAOC,KAAP;EAAA,IAAcC,QAAd;;EAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAQC,KAAR,EAAkB;IAAA;;IACrCR,QAAQ,CAACO,KAAD,EAAQC,KAAR,CAAR;IACA,iBAAAA,KAAK,CAACC,MAAN,gEAAcC,IAAd;EACD,CAHD;;EAKA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACH,KAAD,EAAW;IAC7BH,QAAQ,CAAC,IAAD,CAAR;IACAJ,OAAO,CAACO,KAAD,CAAP;EACD,CAHD;;EAKA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,mBAAUE,MAHM;EAItBrC,KAAK,EAAEmC,mBAAUE,MAJK;EAKtBC,IAAI,EAAEH,mBAAUE,MAAV,CAAiBE,UALD;EAMtBtC,SAAS,EAAEkC,mBAAUC,IANC;EAOtBlC,OAAO,EAAEiC,mBAAUC,IAPG;EAQtBjC,OAAO,EAAEgC,mBAAUC,IARG;EAStBhC,QAAQ,EAAE+B,mBAAUK,IATE;EAUtBnC,OAAO,EAAE8B,mBAAUK,IAVG;EAWtBlC,OAAO,EAAE6B,mBAAUK;AAXG,CAAxB"}
@@ -38,28 +38,32 @@ exports[`component:<InputSelect> inherit:className 1`] = `
38
38
  five
39
39
  </option>
40
40
  </select>
41
- <span
42
- class="icon headline-3 icon right"
41
+ <div
42
+ class="view row icons"
43
43
  >
44
- <svg
45
- fill="currentColor"
46
- height="1em"
47
- stroke="currentColor"
48
- stroke-width="0"
49
- viewBox="0 0 24 24"
50
- width="1em"
51
- xmlns="http://www.w3.org/2000/svg"
52
- >
53
- <path
54
- d="M24 24H0V0h24v24z"
55
- fill="none"
56
- opacity=".87"
57
- />
58
- <path
59
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
60
- />
61
- </svg>
62
- </span>
44
+ <span
45
+ class="icon headline-3 icon"
46
+ >
47
+ <svg
48
+ fill="currentColor"
49
+ height="1em"
50
+ stroke="currentColor"
51
+ stroke-width="0"
52
+ viewBox="0 0 24 24"
53
+ width="1em"
54
+ xmlns="http://www.w3.org/2000/svg"
55
+ >
56
+ <path
57
+ d="M24 24H0V0h24v24z"
58
+ fill="none"
59
+ opacity=".87"
60
+ />
61
+ <path
62
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
63
+ />
64
+ </svg>
65
+ </span>
66
+ </div>
63
67
  </div>
64
68
  </div>
65
69
  </DocumentFragment>
@@ -147,28 +151,32 @@ exports[`component:<InputSelect> prop:error 1`] = `
147
151
  five
148
152
  </option>
149
153
  </select>
150
- <span
151
- class="icon headline-3 icon right"
154
+ <div
155
+ class="view row icons"
152
156
  >
153
- <svg
154
- fill="currentColor"
155
- height="1em"
156
- stroke="currentColor"
157
- stroke-width="0"
158
- viewBox="0 0 24 24"
159
- width="1em"
160
- xmlns="http://www.w3.org/2000/svg"
161
- >
162
- <path
163
- d="M24 24H0V0h24v24z"
164
- fill="none"
165
- opacity=".87"
166
- />
167
- <path
168
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
169
- />
170
- </svg>
171
- </span>
157
+ <span
158
+ class="icon headline-3 icon"
159
+ >
160
+ <svg
161
+ fill="currentColor"
162
+ height="1em"
163
+ stroke="currentColor"
164
+ stroke-width="0"
165
+ viewBox="0 0 24 24"
166
+ width="1em"
167
+ xmlns="http://www.w3.org/2000/svg"
168
+ >
169
+ <path
170
+ d="M24 24H0V0h24v24z"
171
+ fill="none"
172
+ opacity=".87"
173
+ />
174
+ <path
175
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
176
+ />
177
+ </svg>
178
+ </span>
179
+ </div>
172
180
  </div>
173
181
  </div>
174
182
  </DocumentFragment>
@@ -212,28 +220,32 @@ exports[`component:<InputSelect> prop:hint 1`] = `
212
220
  five
213
221
  </option>
214
222
  </select>
215
- <span
216
- class="icon headline-3 icon right"
223
+ <div
224
+ class="view row icons"
217
225
  >
218
- <svg
219
- fill="currentColor"
220
- height="1em"
221
- stroke="currentColor"
222
- stroke-width="0"
223
- viewBox="0 0 24 24"
224
- width="1em"
225
- xmlns="http://www.w3.org/2000/svg"
226
- >
227
- <path
228
- d="M24 24H0V0h24v24z"
229
- fill="none"
230
- opacity=".87"
231
- />
232
- <path
233
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
234
- />
235
- </svg>
236
- </span>
226
+ <span
227
+ class="icon headline-3 icon"
228
+ >
229
+ <svg
230
+ fill="currentColor"
231
+ height="1em"
232
+ stroke="currentColor"
233
+ stroke-width="0"
234
+ viewBox="0 0 24 24"
235
+ width="1em"
236
+ xmlns="http://www.w3.org/2000/svg"
237
+ >
238
+ <path
239
+ d="M24 24H0V0h24v24z"
240
+ fill="none"
241
+ opacity=".87"
242
+ />
243
+ <path
244
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
245
+ />
246
+ </svg>
247
+ </span>
248
+ </div>
237
249
  </div>
238
250
  <span
239
251
  class="text small text hint"
@@ -287,28 +299,32 @@ exports[`component:<InputSelect> prop:label 1`] = `
287
299
  five
288
300
  </option>
289
301
  </select>
290
- <span
291
- class="icon headline-3 icon right"
302
+ <div
303
+ class="view row icons"
292
304
  >
293
- <svg
294
- fill="currentColor"
295
- height="1em"
296
- stroke="currentColor"
297
- stroke-width="0"
298
- viewBox="0 0 24 24"
299
- width="1em"
300
- xmlns="http://www.w3.org/2000/svg"
301
- >
302
- <path
303
- d="M24 24H0V0h24v24z"
304
- fill="none"
305
- opacity=".87"
306
- />
307
- <path
308
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
309
- />
310
- </svg>
311
- </span>
305
+ <span
306
+ class="icon headline-3 icon"
307
+ >
308
+ <svg
309
+ fill="currentColor"
310
+ height="1em"
311
+ stroke="currentColor"
312
+ stroke-width="0"
313
+ viewBox="0 0 24 24"
314
+ width="1em"
315
+ xmlns="http://www.w3.org/2000/svg"
316
+ >
317
+ <path
318
+ d="M24 24H0V0h24v24z"
319
+ fill="none"
320
+ opacity=".87"
321
+ />
322
+ <path
323
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
324
+ />
325
+ </svg>
326
+ </span>
327
+ </div>
312
328
  </div>
313
329
  </div>
314
330
  </DocumentFragment>
@@ -352,28 +368,32 @@ exports[`component:<InputSelect> prop:label 2`] = `
352
368
  five
353
369
  </option>
354
370
  </select>
355
- <span
356
- class="icon headline-3 icon right"
371
+ <div
372
+ class="view row icons"
357
373
  >
358
- <svg
359
- fill="currentColor"
360
- height="1em"
361
- stroke="currentColor"
362
- stroke-width="0"
363
- viewBox="0 0 24 24"
364
- width="1em"
365
- xmlns="http://www.w3.org/2000/svg"
366
- >
367
- <path
368
- d="M24 24H0V0h24v24z"
369
- fill="none"
370
- opacity=".87"
371
- />
372
- <path
373
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
374
- />
375
- </svg>
376
- </span>
374
+ <span
375
+ class="icon headline-3 icon"
376
+ >
377
+ <svg
378
+ fill="currentColor"
379
+ height="1em"
380
+ stroke="currentColor"
381
+ stroke-width="0"
382
+ viewBox="0 0 24 24"
383
+ width="1em"
384
+ xmlns="http://www.w3.org/2000/svg"
385
+ >
386
+ <path
387
+ d="M24 24H0V0h24v24z"
388
+ fill="none"
389
+ opacity=".87"
390
+ />
391
+ <path
392
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
393
+ />
394
+ </svg>
395
+ </span>
396
+ </div>
377
397
  </div>
378
398
  </div>
379
399
  </DocumentFragment>
@@ -461,23 +481,49 @@ exports[`component:<InputSelect> prop:warning 1`] = `
461
481
  five
462
482
  </option>
463
483
  </select>
464
- <span
465
- class="icon headline-3 icon right warning"
484
+ <div
485
+ class="view row icons"
466
486
  >
467
- <svg
468
- fill="currentColor"
469
- height="1em"
470
- stroke="currentColor"
471
- stroke-width="0"
472
- viewBox="0 0 24 24"
473
- width="1em"
474
- xmlns="http://www.w3.org/2000/svg"
475
- >
476
- <path
477
- d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
478
- />
479
- </svg>
480
- </span>
487
+ <span
488
+ class="icon headline-3 icon"
489
+ >
490
+ <svg
491
+ fill="currentColor"
492
+ height="1em"
493
+ stroke="currentColor"
494
+ stroke-width="0"
495
+ viewBox="0 0 24 24"
496
+ width="1em"
497
+ xmlns="http://www.w3.org/2000/svg"
498
+ >
499
+ <path
500
+ d="M24 24H0V0h24v24z"
501
+ fill="none"
502
+ opacity=".87"
503
+ />
504
+ <path
505
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
506
+ />
507
+ </svg>
508
+ </span>
509
+ <span
510
+ class="icon headline-3 icon warning"
511
+ >
512
+ <svg
513
+ fill="currentColor"
514
+ height="1em"
515
+ stroke="currentColor"
516
+ stroke-width="0"
517
+ viewBox="0 0 24 24"
518
+ width="1em"
519
+ xmlns="http://www.w3.org/2000/svg"
520
+ >
521
+ <path
522
+ d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
523
+ />
524
+ </svg>
525
+ </span>
526
+ </div>
481
527
  </div>
482
528
  </div>
483
529
  </DocumentFragment>
@@ -521,28 +567,32 @@ exports[`component:<InputSelect> renders 1`] = `
521
567
  five
522
568
  </option>
523
569
  </select>
524
- <span
525
- class="icon headline-3 icon right"
570
+ <div
571
+ class="view row icons"
526
572
  >
527
- <svg
528
- fill="currentColor"
529
- height="1em"
530
- stroke="currentColor"
531
- stroke-width="0"
532
- viewBox="0 0 24 24"
533
- width="1em"
534
- xmlns="http://www.w3.org/2000/svg"
535
- >
536
- <path
537
- d="M24 24H0V0h24v24z"
538
- fill="none"
539
- opacity=".87"
540
- />
541
- <path
542
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
543
- />
544
- </svg>
545
- </span>
573
+ <span
574
+ class="icon headline-3 icon"
575
+ >
576
+ <svg
577
+ fill="currentColor"
578
+ height="1em"
579
+ stroke="currentColor"
580
+ stroke-width="0"
581
+ viewBox="0 0 24 24"
582
+ width="1em"
583
+ xmlns="http://www.w3.org/2000/svg"
584
+ >
585
+ <path
586
+ d="M24 24H0V0h24v24z"
587
+ fill="none"
588
+ opacity=".87"
589
+ />
590
+ <path
591
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
592
+ />
593
+ </svg>
594
+ </span>
595
+ </div>
546
596
  </div>
547
597
  </div>
548
598
  </DocumentFragment>
@@ -587,28 +637,32 @@ exports[`component:<InputSelect> testID 1`] = `
587
637
  five
588
638
  </option>
589
639
  </select>
590
- <span
591
- class="icon headline-3 icon right"
640
+ <div
641
+ class="view row icons"
592
642
  >
593
- <svg
594
- fill="currentColor"
595
- height="1em"
596
- stroke="currentColor"
597
- stroke-width="0"
598
- viewBox="0 0 24 24"
599
- width="1em"
600
- xmlns="http://www.w3.org/2000/svg"
601
- >
602
- <path
603
- d="M24 24H0V0h24v24z"
604
- fill="none"
605
- opacity=".87"
606
- />
607
- <path
608
- d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
609
- />
610
- </svg>
611
- </span>
643
+ <span
644
+ class="icon headline-3 icon"
645
+ >
646
+ <svg
647
+ fill="currentColor"
648
+ height="1em"
649
+ stroke="currentColor"
650
+ stroke-width="0"
651
+ viewBox="0 0 24 24"
652
+ width="1em"
653
+ xmlns="http://www.w3.org/2000/svg"
654
+ >
655
+ <path
656
+ d="M24 24H0V0h24v24z"
657
+ fill="none"
658
+ opacity=".87"
659
+ />
660
+ <path
661
+ d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
662
+ />
663
+ </svg>
664
+ </span>
665
+ </div>
612
666
  </div>
613
667
  </div>
614
668
  </DocumentFragment>
@@ -115,22 +115,25 @@ var InputText = function InputText(_ref) {
115
115
  onChange: handleChange,
116
116
  onEnter: handleEnter,
117
117
  onLeave: handleLeave
118
- })), has.stateIcon && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
119
- value: (0, _helpers.getIconState)({
120
- error: error,
121
- success: success,
122
- warning: warning
123
- }),
124
- className: (0, _helpers.styles)(_InputTextModule.default.icon, _InputTextModule.default.right, error ? _InputTextModule.default.error : warning ? _InputTextModule.default.warning : success ? _InputTextModule.default.success : undefined)
125
- }), is.password && !disabled && !has.stateIcon && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
118
+ })), (is.password && !disabled || has.stateIcon) && /*#__PURE__*/_react.default.createElement(_primitives.View, {
119
+ row: true,
120
+ className: _InputTextModule.default.icons
121
+ }, is.password && !disabled && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
126
122
  tabIndex: -1,
127
123
  type: "button",
128
- className: _InputTextModule.default.pressable,
129
124
  onPress: function onPress() {
130
125
  return setPassword(!password);
131
126
  }
132
127
  }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
133
- value: password ? _primitives.ICON.EYE_CLOSE : _primitives.ICON.EYE_OPEN
128
+ value: password ? _primitives.ICON.EYE_CLOSE : _primitives.ICON.EYE_OPEN,
129
+ className: _InputTextModule.default.icon
130
+ })), has.stateIcon && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
131
+ value: (0, _helpers.getIconState)({
132
+ error: error,
133
+ success: success,
134
+ warning: warning
135
+ }),
136
+ className: (0, _helpers.styles)(_InputTextModule.default.icon, error ? _InputTextModule.default.error : warning ? _InputTextModule.default.warning : success ? _InputTextModule.default.success : undefined)
134
137
  }))), hint && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
135
138
  small: true,
136
139
  className: (0, _helpers.styles)(_InputTextModule.default.text, _InputTextModule.default.hint, disabled && _InputTextModule.default.disabled, error && _InputTextModule.default.error)