@mirai/ui 1.0.215 → 1.0.216

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 (46) hide show
  1. package/build/components/Action/Action.js +1 -1
  2. package/build/components/Action/Action.js.map +1 -1
  3. package/build/components/Action/Action.module.css +5 -5
  4. package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +15 -15
  5. package/build/components/Button/Button.js +1 -1
  6. package/build/components/Button/Button.js.map +1 -1
  7. package/build/components/Button/Button.module.css +16 -10
  8. package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +15 -15
  9. package/build/components/Calendar/Calendar.Week.js +1 -1
  10. package/build/components/Calendar/Calendar.Week.js.map +1 -1
  11. package/build/components/Calendar/Calendar.js +1 -1
  12. package/build/components/Calendar/Calendar.js.map +1 -1
  13. package/build/components/Calendar/Calendar.module.css +7 -6
  14. package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +2010 -2010
  15. package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +1 -1
  16. package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +7 -7
  17. package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +24 -24
  18. package/build/components/InputText/InputText.js +2 -2
  19. package/build/components/InputText/InputText.js.map +1 -1
  20. package/build/components/InputText/InputText.module.css +7 -3
  21. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +16 -16
  22. package/build/components/Menu/Menu.Option.js +1 -1
  23. package/build/components/Menu/Menu.Option.js.map +1 -1
  24. package/build/components/Menu/Menu.module.css +3 -3
  25. package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +12 -12
  26. package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +3 -3
  27. package/build/components/Notification/Notification.js +1 -1
  28. package/build/components/Notification/Notification.js.map +1 -1
  29. package/build/components/Notification/Notification.module.css +10 -7
  30. package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +6 -6
  31. package/build/components/Table/Table.Row.js +1 -1
  32. package/build/components/Table/Table.Row.js.map +1 -1
  33. package/build/components/Table/Table.module.css +6 -2
  34. package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +36 -36
  35. package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +141 -39
  36. package/build/components/Tooltip/Tooltip.js +1 -1
  37. package/build/components/Tooltip/Tooltip.js.map +1 -1
  38. package/build/components/Tooltip/Tooltip.module.css +5 -5
  39. package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +12 -12
  40. package/build/primitives/Checkbox/Checkbox.module.css +2 -1
  41. package/build/primitives/Layer/Layer.module.css +1 -4
  42. package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +6 -6
  43. package/build/primitives/Radio/Radio.module.css +2 -2
  44. package/build/primitives/Select/Select.module.css +5 -1
  45. package/build/primitives/Switch/Switch.module.css +5 -1
  46. package/package.json +1 -1
@@ -26,7 +26,7 @@ exports[`component:<Form> prop:children 1`] = `
26
26
  label
27
27
  </span>
28
28
  <input
29
- class="input input withLabel"
29
+ class="input input withLabel singleLine"
30
30
  name="name"
31
31
  type="text"
32
32
  value=""
@@ -12,7 +12,7 @@ exports[`component:<InputDate> inherit:className 1`] = `
12
12
  class="view wide content"
13
13
  >
14
14
  <input
15
- class="input input"
15
+ class="input input singleLine"
16
16
  maxlength="10"
17
17
  name="name"
18
18
  placeholder="DD/MM/YYYY"
@@ -37,7 +37,7 @@ exports[`component:<InputDate> prop:format 1`] = `
37
37
  class="view wide content"
38
38
  >
39
39
  <input
40
- class="input input"
40
+ class="input input singleLine"
41
41
  maxlength="10"
42
42
  name="name"
43
43
  placeholder="MM/DD/YYYY"
@@ -62,7 +62,7 @@ exports[`component:<InputDate> prop:placeholder 1`] = `
62
62
  class="view wide content"
63
63
  >
64
64
  <input
65
- class="input input"
65
+ class="input input singleLine"
66
66
  maxlength="10"
67
67
  name="name"
68
68
  placeholder="placeholder"
@@ -87,7 +87,7 @@ exports[`component:<InputDate> prop:value & prop:format 1`] = `
87
87
  class="view wide content"
88
88
  >
89
89
  <input
90
- class="input input"
90
+ class="input input singleLine"
91
91
  maxlength="5"
92
92
  name="name"
93
93
  placeholder="MM/YY"
@@ -112,7 +112,7 @@ exports[`component:<InputDate> prop:value 1`] = `
112
112
  class="view wide content"
113
113
  >
114
114
  <input
115
- class="input input"
115
+ class="input input singleLine"
116
116
  maxlength="10"
117
117
  name="name"
118
118
  placeholder="DD/MM/YYYY"
@@ -137,7 +137,7 @@ exports[`component:<InputDate> renders 1`] = `
137
137
  class="view wide content"
138
138
  >
139
139
  <input
140
- class="input input"
140
+ class="input input singleLine"
141
141
  maxlength="10"
142
142
  name="name"
143
143
  placeholder="DD/MM/YYYY"
@@ -162,7 +162,7 @@ exports[`component:<InputDate> testId 1`] = `
162
162
  class="view wide content"
163
163
  >
164
164
  <input
165
- class="input input"
165
+ class="input input singleLine"
166
166
  data-testid="mirai"
167
167
  maxlength="10"
168
168
  name="name"
@@ -9,7 +9,7 @@ exports[`component:<InputNumber> inherit:className 1`] = `
9
9
  class="view texts"
10
10
  />
11
11
  <button
12
- class="pressable disabled button rounded squared disabled"
12
+ class="pressable disabled button active rounded squared primary solid disabled"
13
13
  disabled=""
14
14
  >
15
15
  <span
@@ -40,7 +40,7 @@ exports[`component:<InputNumber> inherit:className 1`] = `
40
40
  0
41
41
  </span>
42
42
  <button
43
- class="pressable button rounded squared secondary"
43
+ class="pressable button active rounded squared secondary solid enabled"
44
44
  >
45
45
  <span
46
46
  class="icon headline-3"
@@ -77,7 +77,7 @@ exports[`component:<InputNumber> prop:disabled 1`] = `
77
77
  class="view texts"
78
78
  />
79
79
  <button
80
- class="pressable disabled button rounded squared disabled"
80
+ class="pressable disabled button active rounded squared primary solid disabled"
81
81
  disabled=""
82
82
  >
83
83
  <span
@@ -108,7 +108,7 @@ exports[`component:<InputNumber> prop:disabled 1`] = `
108
108
  0
109
109
  </span>
110
110
  <button
111
- class="pressable disabled button rounded squared disabled"
111
+ class="pressable disabled button active rounded squared primary solid disabled"
112
112
  disabled=""
113
113
  >
114
114
  <span
@@ -152,7 +152,7 @@ exports[`component:<InputNumber> prop:hint 1`] = `
152
152
  </span>
153
153
  </div>
154
154
  <button
155
- class="pressable disabled button rounded squared disabled"
155
+ class="pressable disabled button active rounded squared primary solid disabled"
156
156
  disabled=""
157
157
  >
158
158
  <span
@@ -183,7 +183,7 @@ exports[`component:<InputNumber> prop:hint 1`] = `
183
183
  0
184
184
  </span>
185
185
  <button
186
- class="pressable button rounded squared secondary"
186
+ class="pressable button active rounded squared secondary solid enabled"
187
187
  >
188
188
  <span
189
189
  class="icon headline-3"
@@ -226,7 +226,7 @@ exports[`component:<InputNumber> prop:label 1`] = `
226
226
  </span>
227
227
  </div>
228
228
  <button
229
- class="pressable disabled button rounded squared disabled"
229
+ class="pressable disabled button active rounded squared primary solid disabled"
230
230
  disabled=""
231
231
  >
232
232
  <span
@@ -257,7 +257,7 @@ exports[`component:<InputNumber> prop:label 1`] = `
257
257
  0
258
258
  </span>
259
259
  <button
260
- class="pressable button rounded squared secondary"
260
+ class="pressable button active rounded squared secondary solid enabled"
261
261
  >
262
262
  <span
263
263
  class="icon headline-3"
@@ -294,7 +294,7 @@ exports[`component:<InputNumber> prop:max 1`] = `
294
294
  class="view texts"
295
295
  />
296
296
  <button
297
- class="pressable button rounded squared secondary"
297
+ class="pressable button active rounded squared secondary solid enabled"
298
298
  >
299
299
  <span
300
300
  class="icon headline-3"
@@ -324,7 +324,7 @@ exports[`component:<InputNumber> prop:max 1`] = `
324
324
  10
325
325
  </span>
326
326
  <button
327
- class="pressable disabled button rounded squared disabled"
327
+ class="pressable disabled button active rounded squared primary solid disabled"
328
328
  disabled=""
329
329
  >
330
330
  <span
@@ -362,7 +362,7 @@ exports[`component:<InputNumber> prop:min 1`] = `
362
362
  class="view texts"
363
363
  />
364
364
  <button
365
- class="pressable disabled button rounded squared disabled"
365
+ class="pressable disabled button active rounded squared primary solid disabled"
366
366
  disabled=""
367
367
  >
368
368
  <span
@@ -393,7 +393,7 @@ exports[`component:<InputNumber> prop:min 1`] = `
393
393
  10
394
394
  </span>
395
395
  <button
396
- class="pressable button rounded squared secondary"
396
+ class="pressable button active rounded squared secondary solid enabled"
397
397
  >
398
398
  <span
399
399
  class="icon headline-3"
@@ -430,7 +430,7 @@ exports[`component:<InputNumber> prop:required & prop:showRequired (true) 1`] =
430
430
  class="view texts"
431
431
  />
432
432
  <button
433
- class="pressable button rounded squared secondary"
433
+ class="pressable button active rounded squared secondary solid enabled"
434
434
  >
435
435
  <span
436
436
  class="icon headline-3"
@@ -460,7 +460,7 @@ exports[`component:<InputNumber> prop:required & prop:showRequired (true) 1`] =
460
460
  10
461
461
  </span>
462
462
  <button
463
- class="pressable button rounded squared secondary"
463
+ class="pressable button active rounded squared secondary solid enabled"
464
464
  >
465
465
  <span
466
466
  class="icon headline-3"
@@ -497,7 +497,7 @@ exports[`component:<InputNumber> prop:required 1`] = `
497
497
  class="view texts"
498
498
  />
499
499
  <button
500
- class="pressable button rounded squared secondary"
500
+ class="pressable button active rounded squared secondary solid enabled"
501
501
  >
502
502
  <span
503
503
  class="icon headline-3"
@@ -527,7 +527,7 @@ exports[`component:<InputNumber> prop:required 1`] = `
527
527
  10
528
528
  </span>
529
529
  <button
530
- class="pressable button rounded squared secondary"
530
+ class="pressable button active rounded squared secondary solid enabled"
531
531
  >
532
532
  <span
533
533
  class="icon headline-3"
@@ -564,7 +564,7 @@ exports[`component:<InputNumber> prop:rounded 1`] = `
564
564
  class="view texts"
565
565
  />
566
566
  <button
567
- class="pressable button rounded squared secondary"
567
+ class="pressable button active rounded squared secondary solid enabled"
568
568
  >
569
569
  <span
570
570
  class="icon headline-3"
@@ -594,7 +594,7 @@ exports[`component:<InputNumber> prop:rounded 1`] = `
594
594
  10
595
595
  </span>
596
596
  <button
597
- class="pressable button rounded squared secondary"
597
+ class="pressable button active rounded squared secondary solid enabled"
598
598
  >
599
599
  <span
600
600
  class="icon headline-3"
@@ -631,7 +631,7 @@ exports[`component:<InputNumber> prop:value 1`] = `
631
631
  class="view texts"
632
632
  />
633
633
  <button
634
- class="pressable button rounded squared secondary"
634
+ class="pressable button active rounded squared secondary solid enabled"
635
635
  >
636
636
  <span
637
637
  class="icon headline-3"
@@ -661,7 +661,7 @@ exports[`component:<InputNumber> prop:value 1`] = `
661
661
  10
662
662
  </span>
663
663
  <button
664
- class="pressable button rounded squared secondary"
664
+ class="pressable button active rounded squared secondary solid enabled"
665
665
  >
666
666
  <span
667
667
  class="icon headline-3"
@@ -698,7 +698,7 @@ exports[`component:<InputNumber> renders 1`] = `
698
698
  class="view texts"
699
699
  />
700
700
  <button
701
- class="pressable disabled button rounded squared disabled"
701
+ class="pressable disabled button active rounded squared primary solid disabled"
702
702
  disabled=""
703
703
  >
704
704
  <span
@@ -729,7 +729,7 @@ exports[`component:<InputNumber> renders 1`] = `
729
729
  0
730
730
  </span>
731
731
  <button
732
- class="pressable button rounded squared secondary"
732
+ class="pressable button active rounded squared secondary solid enabled"
733
733
  >
734
734
  <span
735
735
  class="icon headline-3"
@@ -767,7 +767,7 @@ exports[`component:<InputNumber> testId 1`] = `
767
767
  class="view texts"
768
768
  />
769
769
  <button
770
- class="pressable disabled button rounded squared disabled"
770
+ class="pressable disabled button active rounded squared primary solid disabled"
771
771
  disabled=""
772
772
  >
773
773
  <span
@@ -798,7 +798,7 @@ exports[`component:<InputNumber> testId 1`] = `
798
798
  0
799
799
  </span>
800
800
  <button
801
- class="pressable button rounded squared secondary"
801
+ class="pressable button active rounded squared secondary solid enabled"
802
802
  >
803
803
  <span
804
804
  class="icon headline-3"
@@ -119,7 +119,7 @@ var InputText = function InputText(_ref) {
119
119
  }, others), {
120
120
  type: !is.password || password ? type : 'text',
121
121
  value: others.value || '',
122
- className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine && _InputTextModule.default.multiLine),
122
+ className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine ? _InputTextModule.default.multiLine : _InputTextModule.default.singleLine),
123
123
  onChange: handleChange,
124
124
  onEnter: handleEnter,
125
125
  onLeave: handleLeave
@@ -128,7 +128,7 @@ var InputText = function InputText(_ref) {
128
128
  onClick: function onClick() {
129
129
  return setInputMode(true);
130
130
  },
131
- className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine && _InputTextModule.default.multiLine)
131
+ className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine ? _InputTextModule.default.multiLine : _InputTextModule.default.singleLine)
132
132
  }, others.value)), markdown && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
133
133
  onPress: function onPress() {
134
134
  return setInputMode(!inputMode);
@@ -1 +1 @@
1
- {"version":3,"file":"InputText.js","names":["InputText","caption","disabled","error","hint","icon","label","markdown","multiLine","showRequired","showState","success","type","warning","onChange","onEnter","onLeave","others","useState","focus","setFocus","password","setPassword","inputMode","setInputMode","handleChange","value","event","handleEnter","handleLeave","handlePress","is","search","undefined","has","length","stateIcon","role","styles","style","inputContainer","className","inputBorder","ICON","SEARCH","left","content","required","input","withLabel","MARKDOWN","EYE_CLOSE","EYE_OPEN","CLOSE","displayName","propTypes","PropTypes","string","bool","func","name","isRequired"],"sources":["../../../src/components/InputText/InputText.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { ICON, Icon, Input, Pressable, Text, View } from '../../primitives';\nimport style from './InputText.module.css';\nimport { Hint, IconState, Label } from './partials';\n\nconst InputText = ({\n caption,\n disabled,\n error,\n hint,\n icon,\n label,\n markdown,\n multiLine,\n showRequired = false,\n showState = true,\n success,\n type,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n const [password, setPassword] = useState(true);\n const [inputMode, setInputMode] = useState(true);\n\n const handleChange = (value, event) => {\n onChange(value, event);\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 handlePress = (event) => {\n if (is.password) setPassword(!password);\n else if (is.search) onChange(undefined, event);\n };\n\n const is = {\n password: type === 'password',\n search: type === 'search',\n };\n\n const has = {\n icon: !!icon || is.search,\n label: !!label,\n value: others.value !== undefined && (others.value?.length > 0 || typeof others.value === 'number'),\n stateIcon: showState && (error || success || warning),\n };\n\n return (\n <View\n role={others.role || 'input-text'}\n className={styles(style.inputContainer, others.className)}\n style={others.style}\n >\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n error && style.error,\n focus && !error && style.focus,\n )}\n >\n {has.icon && (\n <Icon\n value={icon || ICON.SEARCH}\n className={styles(style.icon, style.left, disabled && style.disabled, error && style.error)}\n />\n )}\n\n {caption && (\n <Text action lighten className={style.caption}>\n {caption}\n </Text>\n )}\n\n <View wide className={style.content}>\n {label && (\n <Label\n {...{ disabled, error, focus, label, required: showRequired && others.required, value: others.value }}\n />\n )}\n\n {inputMode && (\n <Input\n {...{ disabled, multiLine, ...others }}\n type={!is.password || password ? type : 'text'}\n value={others.value || ''}\n className={styles(style.input, has.label && style.withLabel, multiLine && style.multiLine)}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n )}\n {markdown && !inputMode && (\n <Text\n markdown\n onClick={() => setInputMode(true)}\n className={styles(style.input, has.label && style.withLabel, multiLine && style.multiLine)}\n >\n {others.value}\n </Text>\n )}\n </View>\n\n {markdown && (\n <Pressable onPress={() => setInputMode(!inputMode)}>\n <Icon value={ICON.MARKDOWN} className={styles(style.icon, inputMode && style.disabled)} />\n </Pressable>\n )}\n\n {(is.password || (is.search && has.value)) && !disabled && (\n <Pressable tabIndex={-1} onPress={handlePress}>\n <Icon\n value={is.password ? (password ? ICON.EYE_CLOSE : ICON.EYE_OPEN) : ICON.CLOSE}\n className={styles(style.icon, style.password)}\n />\n </Pressable>\n )}\n\n {has.stateIcon && <IconState {...{ error, success, warning }} />}\n </View>\n\n {hint && <Hint {...{ disabled, error, hint }} />}\n </View>\n );\n};\n\nInputText.displayName = 'Component:InputText';\n\nInputText.propTypes = {\n caption: PropTypes.string,\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n icon: PropTypes.func,\n label: PropTypes.string,\n markdown: PropTypes.bool,\n multiLine: PropTypes.bool,\n name: PropTypes.string.isRequired,\n showRequired: PropTypes.bool,\n showState: PropTypes.bool,\n success: PropTypes.bool,\n type: PropTypes.string,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputText };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEpD,IAAMA,SAAS,GAAG,SAAZA,SAAS,OAkBT;EAAA;EAAA,IAjBJC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,IAAI,QAAJA,IAAI;IACJC,IAAI,QAAJA,IAAI;IACJC,KAAK,QAALA,KAAK;IACLC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,yBACTC,YAAY;IAAZA,YAAY,kCAAG,KAAK;IAAA,sBACpBC,SAAS;IAATA,SAAS,+BAAG,IAAI;IAChBC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IAAA,qBACPC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAA,oBACnBC,OAAO;IAAPA,OAAO,6BAAG,YAAM,CAAC,CAAC;IAAA,oBAClBC,OAAO;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AI;EAC5BhD,SAAS,EAAE8C,kBAAS,CAACE,IAAI;EACzB/C,OAAO,EAAE6C,kBAAS,CAACE,IAAI;EACvB9C,IAAI,EAAE4C,kBAAS,CAACC,MAAM;EACtB5C,OAAO,EAAE2C,kBAAS,CAACE,IAAI;EACvB5C,QAAQ,EAAE0C,kBAAS,CAACG,IAAI;EACxB5C,OAAO,EAAEyC,kBAAS,CAACG,IAAI;EACvB3C,OAAO,EAAEwC,kBAAS,CAACG;AACrB,CAAC"}
1
+ {"version":3,"file":"InputText.js","names":["InputText","caption","disabled","error","hint","icon","label","markdown","multiLine","showRequired","showState","success","type","warning","onChange","onEnter","onLeave","others","useState","focus","setFocus","password","setPassword","inputMode","setInputMode","handleChange","value","event","handleEnter","handleLeave","handlePress","is","search","undefined","has","length","stateIcon","role","styles","style","inputContainer","className","inputBorder","ICON","SEARCH","left","content","required","input","withLabel","singleLine","MARKDOWN","EYE_CLOSE","EYE_OPEN","CLOSE","displayName","propTypes","PropTypes","string","bool","func","name","isRequired"],"sources":["../../../src/components/InputText/InputText.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { ICON, Icon, Input, Pressable, Text, View } from '../../primitives';\nimport style from './InputText.module.css';\nimport { Hint, IconState, Label } from './partials';\n\nconst InputText = ({\n caption,\n disabled,\n error,\n hint,\n icon,\n label,\n markdown,\n multiLine,\n showRequired = false,\n showState = true,\n success,\n type,\n warning,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n const [password, setPassword] = useState(true);\n const [inputMode, setInputMode] = useState(true);\n\n const handleChange = (value, event) => {\n onChange(value, event);\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 handlePress = (event) => {\n if (is.password) setPassword(!password);\n else if (is.search) onChange(undefined, event);\n };\n\n const is = {\n password: type === 'password',\n search: type === 'search',\n };\n\n const has = {\n icon: !!icon || is.search,\n label: !!label,\n value: others.value !== undefined && (others.value?.length > 0 || typeof others.value === 'number'),\n stateIcon: showState && (error || success || warning),\n };\n\n return (\n <View\n role={others.role || 'input-text'}\n className={styles(style.inputContainer, others.className)}\n style={others.style}\n >\n <View\n row\n className={styles(\n style.inputBorder,\n disabled && style.disabled,\n error && style.error,\n focus && !error && style.focus,\n )}\n >\n {has.icon && (\n <Icon\n value={icon || ICON.SEARCH}\n className={styles(style.icon, style.left, disabled && style.disabled, error && style.error)}\n />\n )}\n\n {caption && (\n <Text action lighten className={style.caption}>\n {caption}\n </Text>\n )}\n\n <View wide className={style.content}>\n {label && (\n <Label\n {...{ disabled, error, focus, label, required: showRequired && others.required, value: others.value }}\n />\n )}\n\n {inputMode && (\n <Input\n {...{ disabled, multiLine, ...others }}\n type={!is.password || password ? type : 'text'}\n value={others.value || ''}\n className={styles(\n style.input,\n has.label && style.withLabel,\n multiLine ? style.multiLine : style.singleLine,\n )}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n )}\n {markdown && !inputMode && (\n <Text\n markdown\n onClick={() => setInputMode(true)}\n className={styles(\n style.input,\n has.label && style.withLabel,\n multiLine ? style.multiLine : style.singleLine,\n )}\n >\n {others.value}\n </Text>\n )}\n </View>\n\n {markdown && (\n <Pressable onPress={() => setInputMode(!inputMode)}>\n <Icon value={ICON.MARKDOWN} className={styles(style.icon, inputMode && style.disabled)} />\n </Pressable>\n )}\n\n {(is.password || (is.search && has.value)) && !disabled && (\n <Pressable tabIndex={-1} onPress={handlePress}>\n <Icon\n value={is.password ? (password ? ICON.EYE_CLOSE : ICON.EYE_OPEN) : ICON.CLOSE}\n className={styles(style.icon, style.password)}\n />\n </Pressable>\n )}\n\n {has.stateIcon && <IconState {...{ error, success, warning }} />}\n </View>\n\n {hint && <Hint {...{ disabled, error, hint }} />}\n </View>\n );\n};\n\nInputText.displayName = 'Component:InputText';\n\nInputText.propTypes = {\n caption: PropTypes.string,\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n icon: PropTypes.func,\n label: PropTypes.string,\n markdown: PropTypes.bool,\n multiLine: PropTypes.bool,\n name: PropTypes.string.isRequired,\n showRequired: PropTypes.bool,\n showState: PropTypes.bool,\n success: PropTypes.bool,\n type: PropTypes.string,\n warning: PropTypes.bool,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputText };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEpD,IAAMA,SAAS,GAAG,SAAZA,SAAS,OAkBT;EAAA;EAAA,IAjBJC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,IAAI,QAAJA,IAAI;IACJC,IAAI,QAAJA,IAAI;IACJC,KAAK,QAALA,KAAK;IACLC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,yBACTC,YAAY;IAAZA,YAAY,kCAAG,KAAK;IAAA,sBACpBC,SAAS;IAATA,SAAS,+BAAG,IAAI;IAChBC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IAAA,qBACPC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAA,oBACnBC,OAAO;IAAPA,OAAO,6BAAG,YAAM,CAAC,CAAC;IAAA,oBAClBC,OAAO;IAAPA,OAAO,6BAAG,YAAM,CAAC,CAAC;IACfC,MAAM;EAET,gBAA0B,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAlCC,KAAK;IAAEC,QAAQ;EACtB,iBAAgC,IAAAF,eAAQ,EAAC,IAAI,CAAC;IA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MAAM;EACtB7C,OAAO,EAAE4C,kBAAS,CAACE,IAAI;EACvB7C,QAAQ,EAAE2C,kBAAS,CAACG,IAAI;EACxB7C,OAAO,EAAE0C,kBAAS,CAACG,IAAI;EACvB5C,OAAO,EAAEyC,kBAAS,CAACG;AACrB,CAAC"}
@@ -55,7 +55,7 @@
55
55
  color: var(--mirai-ui-content);
56
56
  }
57
57
 
58
- .input:not(.multiLine) {
58
+ .input.singleLine {
59
59
  padding: var(--mirai-ui-input-text-padding-y) calc(var(--mirai-ui-input-text-padding-x) / 2);
60
60
  }
61
61
 
@@ -64,7 +64,7 @@
64
64
  padding: 0 calc(var(--mirai-ui-input-text-padding-x) / 2);
65
65
  }
66
66
 
67
- .input.withLabel:not(.multiLine) {
67
+ .input.withLabel.singleLine {
68
68
  padding-top: calc(var(--mirai-ui-input-text-padding-y) + var(--mirai-ui-space-S));
69
69
  }
70
70
 
@@ -72,7 +72,11 @@
72
72
  margin-top: calc(var(--mirai-ui-input-text-padding-y) + var(--mirai-ui-space-M));
73
73
  }
74
74
 
75
- .input.empty:not(:focus) {
75
+ .input.empty:focus {
76
+ color: var(--mirai-ui-input-disabled);
77
+ }
78
+
79
+ .input.empty {
76
80
  color: var(--mirai-ui-base);
77
81
  }
78
82
 
@@ -12,7 +12,7 @@ exports[`component:<InputText> inherit:className 1`] = `
12
12
  class="view wide content"
13
13
  >
14
14
  <input
15
- class="input input"
15
+ class="input input singleLine"
16
16
  name="name"
17
17
  type="text"
18
18
  value=""
@@ -40,7 +40,7 @@ exports[`component:<InputText> prop:caption 1`] = `
40
40
  class="view wide content"
41
41
  >
42
42
  <input
43
- class="input input"
43
+ class="input input singleLine"
44
44
  name="name"
45
45
  type="text"
46
46
  value=""
@@ -63,7 +63,7 @@ exports[`component:<InputText> prop:disabled 1`] = `
63
63
  class="view wide content"
64
64
  >
65
65
  <input
66
- class="input input"
66
+ class="input input singleLine"
67
67
  disabled=""
68
68
  name="name"
69
69
  type="text"
@@ -87,7 +87,7 @@ exports[`component:<InputText> prop:error 1`] = `
87
87
  class="view wide content"
88
88
  >
89
89
  <input
90
- class="input input"
90
+ class="input input singleLine"
91
91
  name="name"
92
92
  type="text"
93
93
  value=""
@@ -131,7 +131,7 @@ exports[`component:<InputText> prop:hint 1`] = `
131
131
  class="view wide content"
132
132
  >
133
133
  <input
134
- class="input input"
134
+ class="input input singleLine"
135
135
  name="name"
136
136
  type="text"
137
137
  value=""
@@ -180,7 +180,7 @@ exports[`component:<InputText> prop:icon 1`] = `
180
180
  class="view wide content"
181
181
  >
182
182
  <input
183
- class="input input"
183
+ class="input input singleLine"
184
184
  name="name"
185
185
  type="text"
186
186
  value=""
@@ -208,7 +208,7 @@ exports[`component:<InputText> prop:label 1`] = `
208
208
  label
209
209
  </span>
210
210
  <input
211
- class="input input withLabel"
211
+ class="input input withLabel singleLine"
212
212
  name="name"
213
213
  type="text"
214
214
  value=""
@@ -231,7 +231,7 @@ exports[`component:<InputText> prop:markdown 1`] = `
231
231
  class="view wide content"
232
232
  >
233
233
  <input
234
- class="input input"
234
+ class="input input singleLine"
235
235
  name="name"
236
236
  type="text"
237
237
  value=""
@@ -306,7 +306,7 @@ exports[`component:<InputText> prop:required & prop:showRequired (true) 1`] = `
306
306
  </span>
307
307
  </span>
308
308
  <input
309
- class="input input withLabel"
309
+ class="input input withLabel singleLine"
310
310
  name="name"
311
311
  required=""
312
312
  type="text"
@@ -335,7 +335,7 @@ exports[`component:<InputText> prop:required 1`] = `
335
335
  label
336
336
  </span>
337
337
  <input
338
- class="input input withLabel"
338
+ class="input input withLabel singleLine"
339
339
  name="name"
340
340
  required=""
341
341
  type="text"
@@ -359,7 +359,7 @@ exports[`component:<InputText> prop:showState (false) 1`] = `
359
359
  class="view wide content"
360
360
  >
361
361
  <input
362
- class="input input"
362
+ class="input input singleLine"
363
363
  name="name"
364
364
  type="text"
365
365
  value=""
@@ -403,7 +403,7 @@ exports[`component:<InputText> prop:success 1`] = `
403
403
  class="view wide content"
404
404
  >
405
405
  <input
406
- class="input input"
406
+ class="input input singleLine"
407
407
  name="name"
408
408
  type="text"
409
409
  value=""
@@ -447,7 +447,7 @@ exports[`component:<InputText> prop:type 1`] = `
447
447
  class="view wide content"
448
448
  >
449
449
  <input
450
- class="input input"
450
+ class="input input singleLine"
451
451
  name="name"
452
452
  type="password"
453
453
  value=""
@@ -496,7 +496,7 @@ exports[`component:<InputText> prop:warning 1`] = `
496
496
  class="view wide content"
497
497
  >
498
498
  <input
499
- class="input input"
499
+ class="input input singleLine"
500
500
  name="name"
501
501
  type="text"
502
502
  value=""
@@ -536,7 +536,7 @@ exports[`component:<InputText> renders 1`] = `
536
536
  class="view wide content"
537
537
  >
538
538
  <input
539
- class="input input"
539
+ class="input input singleLine"
540
540
  name="name"
541
541
  type="text"
542
542
  value=""
@@ -559,7 +559,7 @@ exports[`component:<InputText> testId 1`] = `
559
559
  class="view wide content"
560
560
  >
561
561
  <input
562
- class="input input"
562
+ class="input input singleLine"
563
563
  data-testid="mirai"
564
564
  name="name"
565
565
  type="text"
@@ -24,7 +24,7 @@ var Option = function Option(_ref) {
24
24
  onPress = _ref.onPress,
25
25
  others = _objectWithoutProperties(_ref, _excluded);
26
26
  return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _extends({}, others, {
27
- className: (0, _helpers.styles)(_MenuModule.default.option, value && _MenuModule.default.value, divider && _MenuModule.default.divider, disabled && _MenuModule.default.disabled),
27
+ className: (0, _helpers.styles)(_MenuModule.default.option, value && _MenuModule.default.value, divider && _MenuModule.default.divider, disabled ? _MenuModule.default.disabled : _MenuModule.default.enabled),
28
28
  onPress: !disabled && value ? onPress : undefined
29
29
  }), /*#__PURE__*/_react.default.createElement(_primitives.View, {
30
30
  row: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.Option.js","names":["Option","children","disabled","divider","icon","label","value","onPress","others","styles","style","option","undefined","content","displayName","propTypes","PropTypes","node","bool","func","string","oneOfType","number"],"sources":["../../../src/components/Menu/Menu.Option.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Menu.module.css';\n\nconst Option = ({ children, disabled, divider, icon, label, value, onPress, ...others }) => (\n <Pressable\n {...others}\n className={styles(style.option, value && style.value, divider && style.divider, disabled && style.disabled)}\n onPress={!disabled && value ? onPress : undefined}\n >\n <View row wide className={style.content}>\n {icon && <Icon value={icon} className={style.icon} />}\n {label && <Text className={style.label}>{label}</Text>}\n {children}\n </View>\n </Pressable>\n);\n\nOption.displayName = 'Component:Menu:Option';\n\nOption.propTypes = {\n children: PropTypes.node,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n icon: PropTypes.func,\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onPress: PropTypes.func,\n};\n\nexport { Option };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAAsC;AAAA;AAAA;AAAA;AAAA;AAEtC,IAAMA,MAAM,GAAG,SAATA,MAAM;EAAA,IAAMC,QAAQ,QAARA,QAAQ;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAKC,MAAM;EAAA,oBACnF,6BAAC,qBAAS,eACJA,MAAM;IACV,SAAS,EAAE,IAAAC,eAAM,EAACC,mBAAK,CAACC,MAAM,EAAEL,KAAK,IAAII,mBAAK,CAACJ,KAAK,EAAEH,OAAO,IAAIO,mBAAK,CAACP,OAAO,EAAED,QAAQ,IAAIQ,mBAAK,CAACR,QAAQ,CAAE;IAC5G,OAAO,EAAE,CAACA,QAAQ,IAAII,KAAK,GAAGC,OAAO,GAAGK;EAAU,iBAElD,6BAAC,gBAAI;IAAC,GAAG;IAAC,IAAI;IAAC,SAAS,EAAEF,mBAAK,CAACG;EAAQ,GACrCT,IAAI,iBAAI,6BAAC,gBAAI;IAAC,KAAK,EAAEA,IAAK;IAAC,SAAS,EAAEM,mBAAK,CAACN;EAAK,EAAG,EACpDC,KAAK,iBAAI,6BAAC,gBAAI;IAAC,SAAS,EAAEK,mBAAK,CAACL;EAAM,GAAEA,KAAK,CAAQ,EACrDJ,QAAQ,CACJ,CACG;AAAA,CACb;AAAC;AAEFD,MAAM,CAACc,WAAW,GAAG,uBAAuB;AAE5Cd,MAAM,CAACe,SAAS,GAAG;EACjBd,QAAQ,EAAEe,kBAAS,CAACC,IAAI;EACxBf,QAAQ,EAAEc,kBAAS,CAACE,IAAI;EACxBf,OAAO,EAAEa,kBAAS,CAACE,IAAI;EACvBd,IAAI,EAAEY,kBAAS,CAACG,IAAI;EACpBd,KAAK,EAAEW,kBAAS,CAACI,MAAM;EACvBd,KAAK,EAAEU,kBAAS,CAACK,SAAS,CAAC,CAACL,kBAAS,CAACI,MAAM,EAAEJ,kBAAS,CAACM,MAAM,CAAC,CAAC;EAChEf,OAAO,EAAES,kBAAS,CAACG;AACrB,CAAC"}
1
+ {"version":3,"file":"Menu.Option.js","names":["Option","children","disabled","divider","icon","label","value","onPress","others","styles","style","option","enabled","undefined","content","displayName","propTypes","PropTypes","node","bool","func","string","oneOfType","number"],"sources":["../../../src/components/Menu/Menu.Option.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Menu.module.css';\n\nconst Option = ({ children, disabled, divider, icon, label, value, onPress, ...others }) => (\n <Pressable\n {...others}\n className={styles(\n style.option,\n value && style.value,\n divider && style.divider,\n disabled ? style.disabled : style.enabled,\n )}\n onPress={!disabled && value ? onPress : undefined}\n >\n <View row wide className={style.content}>\n {icon && <Icon value={icon} className={style.icon} />}\n {label && <Text className={style.label}>{label}</Text>}\n {children}\n </View>\n </Pressable>\n);\n\nOption.displayName = 'Component:Menu:Option';\n\nOption.propTypes = {\n children: PropTypes.node,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n icon: PropTypes.func,\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onPress: PropTypes.func,\n};\n\nexport { Option };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAAsC;AAAA;AAAA;AAAA;AAAA;AAEtC,IAAMA,MAAM,GAAG,SAATA,MAAM;EAAA,IAAMC,QAAQ,QAARA,QAAQ;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAKC,MAAM;EAAA,oBACnF,6BAAC,qBAAS,eACJA,MAAM;IACV,SAAS,EAAE,IAAAC,eAAM,EACfC,mBAAK,CAACC,MAAM,EACZL,KAAK,IAAII,mBAAK,CAACJ,KAAK,EACpBH,OAAO,IAAIO,mBAAK,CAACP,OAAO,EACxBD,QAAQ,GAAGQ,mBAAK,CAACR,QAAQ,GAAGQ,mBAAK,CAACE,OAAO,CACzC;IACF,OAAO,EAAE,CAACV,QAAQ,IAAII,KAAK,GAAGC,OAAO,GAAGM;EAAU,iBAElD,6BAAC,gBAAI;IAAC,GAAG;IAAC,IAAI;IAAC,SAAS,EAAEH,mBAAK,CAACI;EAAQ,GACrCV,IAAI,iBAAI,6BAAC,gBAAI;IAAC,KAAK,EAAEA,IAAK;IAAC,SAAS,EAAEM,mBAAK,CAACN;EAAK,EAAG,EACpDC,KAAK,iBAAI,6BAAC,gBAAI;IAAC,SAAS,EAAEK,mBAAK,CAACL;EAAM,GAAEA,KAAK,CAAQ,EACrDJ,QAAQ,CACJ,CACG;AAAA,CACb;AAAC;AAEFD,MAAM,CAACe,WAAW,GAAG,uBAAuB;AAE5Cf,MAAM,CAACgB,SAAS,GAAG;EACjBf,QAAQ,EAAEgB,kBAAS,CAACC,IAAI;EACxBhB,QAAQ,EAAEe,kBAAS,CAACE,IAAI;EACxBhB,OAAO,EAAEc,kBAAS,CAACE,IAAI;EACvBf,IAAI,EAAEa,kBAAS,CAACG,IAAI;EACpBf,KAAK,EAAEY,kBAAS,CAACI,MAAM;EACvBf,KAAK,EAAEW,kBAAS,CAACK,SAAS,CAAC,CAACL,kBAAS,CAACI,MAAM,EAAEJ,kBAAS,CAACM,MAAM,CAAC,CAAC;EAChEhB,OAAO,EAAEU,kBAAS,CAACG;AACrB,CAAC"}
@@ -20,13 +20,13 @@
20
20
  width: 100%;
21
21
  }
22
22
 
23
- .menu .option.value:hover:not(.disabled) {
23
+ .menu .option.value.enabled:hover {
24
24
  background-color: var(--mirai-ui-menu-option-hover-background);
25
25
  cursor: pointer;
26
26
  }
27
27
 
28
- .menu .option.value:hover:not(.disabled) .icon,
29
- .menu .option.value:hover:not(.disabled) .label {
28
+ .menu .option.value.enabled:hover .icon,
29
+ .menu .option.value.enabled:hover .label {
30
30
  color: var(--mirai-ui-menu-option-hover-color);
31
31
  cursor: pointer;
32
32
  }