@mirai/ui 1.0.218 → 1.0.222

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 (61) hide show
  1. package/README.md +1 -0
  2. package/build/components/Action/Action.js +1 -1
  3. package/build/components/Action/Action.js.map +1 -1
  4. package/build/components/Action/Action.module.css +5 -5
  5. package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +15 -15
  6. package/build/components/Button/Button.js +1 -1
  7. package/build/components/Button/Button.js.map +1 -1
  8. package/build/components/Button/Button.module.css +10 -16
  9. package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +15 -15
  10. package/build/components/Calendar/Calendar.Week.js +1 -1
  11. package/build/components/Calendar/Calendar.Week.js.map +1 -1
  12. package/build/components/Calendar/Calendar.js +1 -1
  13. package/build/components/Calendar/Calendar.js.map +1 -1
  14. package/build/components/Calendar/Calendar.module.css +6 -7
  15. package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +2010 -2010
  16. package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +1 -1
  17. package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +7 -7
  18. package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +24 -24
  19. package/build/components/InputPhone/InputPhone.js +2 -2
  20. package/build/components/InputPhone/InputPhone.js.map +1 -1
  21. package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +40 -40
  22. package/build/components/InputText/InputText.js +2 -2
  23. package/build/components/InputText/InputText.js.map +1 -1
  24. package/build/components/InputText/InputText.module.css +3 -7
  25. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +16 -16
  26. package/build/components/Menu/Menu.Option.js +1 -1
  27. package/build/components/Menu/Menu.Option.js.map +1 -1
  28. package/build/components/Menu/Menu.module.css +3 -3
  29. package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +12 -12
  30. package/build/components/Modal/Modal.js +1 -1
  31. package/build/components/Modal/Modal.js.map +1 -1
  32. package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +3 -3
  33. package/build/components/Notification/Notification.js +1 -1
  34. package/build/components/Notification/Notification.js.map +1 -1
  35. package/build/components/Notification/Notification.module.css +7 -10
  36. package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +6 -6
  37. package/build/components/Table/Table.Row.js +1 -1
  38. package/build/components/Table/Table.Row.js.map +1 -1
  39. package/build/components/Table/Table.constants.js +3 -1
  40. package/build/components/Table/Table.constants.js.map +1 -1
  41. package/build/components/Table/Table.js +19 -7
  42. package/build/components/Table/Table.js.map +1 -1
  43. package/build/components/Table/Table.module.css +2 -6
  44. package/build/components/Table/Table.stories.js +21 -3
  45. package/build/components/Table/Table.stories.js.map +1 -1
  46. package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +36 -36
  47. package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +360 -141
  48. package/build/components/Table/helpers/select.js +22 -14
  49. package/build/components/Table/helpers/select.js.map +1 -1
  50. package/build/components/Tooltip/Tooltip.js +1 -1
  51. package/build/components/Tooltip/Tooltip.js.map +1 -1
  52. package/build/components/Tooltip/Tooltip.module.css +5 -5
  53. package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +12 -12
  54. package/build/primitives/Checkbox/Checkbox.module.css +1 -2
  55. package/build/primitives/Layer/Layer.module.css +4 -1
  56. package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +6 -6
  57. package/build/primitives/Radio/Radio.module.css +2 -2
  58. package/build/primitives/Select/Select.module.css +1 -5
  59. package/build/primitives/Switch/Switch.module.css +1 -5
  60. package/build/primitives/Text/Text.module.css +4 -8
  61. package/package.json +1 -1
@@ -15,7 +15,7 @@ exports[`component:<InputPhone> inherit:className 1`] = `
15
15
  class="view content"
16
16
  >
17
17
  <select
18
- class="select empty input singleLine prefix"
18
+ class="select empty input prefix"
19
19
  name="name-prefix"
20
20
  >
21
21
  <option
@@ -68,7 +68,7 @@ exports[`component:<InputPhone> inherit:className 1`] = `
68
68
  class="view wide content"
69
69
  >
70
70
  <input
71
- class="input input singleLine"
71
+ class="input input"
72
72
  maxlength="12"
73
73
  name="name-phone"
74
74
  type="tel"
@@ -96,7 +96,7 @@ exports[`component:<InputPhone> prop:disabled 1`] = `
96
96
  class="view content"
97
97
  >
98
98
  <select
99
- class="select empty input singleLine prefix"
99
+ class="select empty input prefix"
100
100
  disabled=""
101
101
  name="name-prefix"
102
102
  >
@@ -128,7 +128,7 @@ exports[`component:<InputPhone> prop:disabled 1`] = `
128
128
  class="view wide content"
129
129
  >
130
130
  <input
131
- class="input input singleLine"
131
+ class="input input"
132
132
  disabled=""
133
133
  maxlength="12"
134
134
  name="name-phone"
@@ -157,7 +157,7 @@ exports[`component:<InputPhone> prop:error 1`] = `
157
157
  class="view content"
158
158
  >
159
159
  <select
160
- class="select empty input singleLine prefix"
160
+ class="select empty input prefix"
161
161
  name="name-prefix"
162
162
  >
163
163
  <option
@@ -210,7 +210,7 @@ exports[`component:<InputPhone> prop:error 1`] = `
210
210
  class="view wide content"
211
211
  >
212
212
  <input
213
- class="input input singleLine"
213
+ class="input input"
214
214
  maxlength="12"
215
215
  name="name-phone"
216
216
  type="tel"
@@ -259,7 +259,7 @@ exports[`component:<InputPhone> prop:hint 1`] = `
259
259
  class="view content"
260
260
  >
261
261
  <select
262
- class="select empty input singleLine prefix"
262
+ class="select empty input prefix"
263
263
  name="name-prefix"
264
264
  >
265
265
  <option
@@ -312,7 +312,7 @@ exports[`component:<InputPhone> prop:hint 1`] = `
312
312
  class="view wide content"
313
313
  >
314
314
  <input
315
- class="input input singleLine"
315
+ class="input input"
316
316
  maxlength="12"
317
317
  name="name-phone"
318
318
  type="tel"
@@ -345,7 +345,7 @@ exports[`component:<InputPhone> prop:icon & disabled 1`] = `
345
345
  class="view content"
346
346
  >
347
347
  <select
348
- class="select empty input singleLine prefix"
348
+ class="select empty input prefix"
349
349
  disabled=""
350
350
  name="name-prefix"
351
351
  >
@@ -398,7 +398,7 @@ exports[`component:<InputPhone> prop:icon & disabled 1`] = `
398
398
  class="view wide content"
399
399
  >
400
400
  <input
401
- class="input input singleLine"
401
+ class="input input"
402
402
  disabled=""
403
403
  maxlength="12"
404
404
  name="name-phone"
@@ -427,7 +427,7 @@ exports[`component:<InputPhone> prop:icon & error 1`] = `
427
427
  class="view content"
428
428
  >
429
429
  <select
430
- class="select empty input singleLine prefix"
430
+ class="select empty input prefix"
431
431
  name="name-prefix"
432
432
  >
433
433
  <option
@@ -501,7 +501,7 @@ exports[`component:<InputPhone> prop:icon & error 1`] = `
501
501
  class="view wide content"
502
502
  >
503
503
  <input
504
- class="input input singleLine"
504
+ class="input input"
505
505
  maxlength="12"
506
506
  name="name-phone"
507
507
  type="tel"
@@ -550,7 +550,7 @@ exports[`component:<InputPhone> prop:icon 1`] = `
550
550
  class="view content"
551
551
  >
552
552
  <select
553
- class="select empty input singleLine prefix"
553
+ class="select empty input prefix"
554
554
  name="name-prefix"
555
555
  >
556
556
  <option
@@ -624,7 +624,7 @@ exports[`component:<InputPhone> prop:icon 1`] = `
624
624
  class="view wide content"
625
625
  >
626
626
  <input
627
- class="input input singleLine"
627
+ class="input input"
628
628
  maxlength="12"
629
629
  name="name-phone"
630
630
  type="tel"
@@ -652,7 +652,7 @@ exports[`component:<InputPhone> prop:label 1`] = `
652
652
  class="view content"
653
653
  >
654
654
  <select
655
- class="select empty input singleLine prefix"
655
+ class="select empty input prefix"
656
656
  name="name-prefix"
657
657
  >
658
658
  <option
@@ -710,7 +710,7 @@ exports[`component:<InputPhone> prop:label 1`] = `
710
710
  label
711
711
  </span>
712
712
  <input
713
- class="input input singleLine withLabel"
713
+ class="input input withLabel"
714
714
  maxlength="12"
715
715
  name="name-phone"
716
716
  type="tel"
@@ -743,7 +743,7 @@ exports[`component:<InputPhone> prop:labelPrefix 1`] = `
743
743
  labelPrefix
744
744
  </span>
745
745
  <select
746
- class="select empty input singleLine prefix withLabel empty"
746
+ class="select empty input prefix withLabel empty"
747
747
  name="name-prefix"
748
748
  >
749
749
  <option
@@ -796,7 +796,7 @@ exports[`component:<InputPhone> prop:labelPrefix 1`] = `
796
796
  class="view wide content"
797
797
  >
798
798
  <input
799
- class="input input singleLine"
799
+ class="input input"
800
800
  maxlength="12"
801
801
  name="name-phone"
802
802
  type="tel"
@@ -834,7 +834,7 @@ exports[`component:<InputPhone> prop:required & prop:showRequired (true) 1`] = `
834
834
  </span>
835
835
  </span>
836
836
  <select
837
- class="select empty input singleLine prefix withLabel empty"
837
+ class="select empty input prefix withLabel empty"
838
838
  name="name-prefix"
839
839
  required=""
840
840
  >
@@ -898,7 +898,7 @@ exports[`component:<InputPhone> prop:required & prop:showRequired (true) 1`] = `
898
898
  </span>
899
899
  </span>
900
900
  <input
901
- class="input input singleLine withLabel"
901
+ class="input input withLabel"
902
902
  maxlength="12"
903
903
  name="name-phone"
904
904
  required=""
@@ -932,7 +932,7 @@ exports[`component:<InputPhone> prop:required 1`] = `
932
932
  labelPrefix
933
933
  </span>
934
934
  <select
935
- class="select empty input singleLine prefix withLabel empty"
935
+ class="select empty input prefix withLabel empty"
936
936
  name="name-prefix"
937
937
  required=""
938
938
  >
@@ -991,7 +991,7 @@ exports[`component:<InputPhone> prop:required 1`] = `
991
991
  label
992
992
  </span>
993
993
  <input
994
- class="input input singleLine withLabel"
994
+ class="input input withLabel"
995
995
  maxlength="12"
996
996
  name="name-phone"
997
997
  required=""
@@ -1020,7 +1020,7 @@ exports[`component:<InputPhone> prop:showState (false) & error 1`] = `
1020
1020
  class="view content"
1021
1021
  >
1022
1022
  <select
1023
- class="select empty input singleLine prefix"
1023
+ class="select empty input prefix"
1024
1024
  name="name-prefix"
1025
1025
  >
1026
1026
  <option
@@ -1073,7 +1073,7 @@ exports[`component:<InputPhone> prop:showState (false) & error 1`] = `
1073
1073
  class="view wide content"
1074
1074
  >
1075
1075
  <input
1076
- class="input input singleLine"
1076
+ class="input input"
1077
1077
  maxlength="12"
1078
1078
  name="name-phone"
1079
1079
  type="tel"
@@ -1122,7 +1122,7 @@ exports[`component:<InputPhone> prop:showState (false) & success 1`] = `
1122
1122
  class="view content"
1123
1123
  >
1124
1124
  <select
1125
- class="select empty input singleLine prefix"
1125
+ class="select empty input prefix"
1126
1126
  name="name-prefix"
1127
1127
  >
1128
1128
  <option
@@ -1175,7 +1175,7 @@ exports[`component:<InputPhone> prop:showState (false) & success 1`] = `
1175
1175
  class="view wide content"
1176
1176
  >
1177
1177
  <input
1178
- class="input input singleLine"
1178
+ class="input input"
1179
1179
  maxlength="12"
1180
1180
  name="name-phone"
1181
1181
  type="tel"
@@ -1224,7 +1224,7 @@ exports[`component:<InputPhone> prop:showState (false) & warning 1`] = `
1224
1224
  class="view content"
1225
1225
  >
1226
1226
  <select
1227
- class="select empty input singleLine prefix"
1227
+ class="select empty input prefix"
1228
1228
  name="name-prefix"
1229
1229
  >
1230
1230
  <option
@@ -1277,7 +1277,7 @@ exports[`component:<InputPhone> prop:showState (false) & warning 1`] = `
1277
1277
  class="view wide content"
1278
1278
  >
1279
1279
  <input
1280
- class="input input singleLine"
1280
+ class="input input"
1281
1281
  maxlength="12"
1282
1282
  name="name-phone"
1283
1283
  type="tel"
@@ -1322,7 +1322,7 @@ exports[`component:<InputPhone> prop:success 1`] = `
1322
1322
  class="view content"
1323
1323
  >
1324
1324
  <select
1325
- class="select empty input singleLine prefix"
1325
+ class="select empty input prefix"
1326
1326
  name="name-prefix"
1327
1327
  >
1328
1328
  <option
@@ -1375,7 +1375,7 @@ exports[`component:<InputPhone> prop:success 1`] = `
1375
1375
  class="view wide content"
1376
1376
  >
1377
1377
  <input
1378
- class="input input singleLine"
1378
+ class="input input"
1379
1379
  maxlength="12"
1380
1380
  name="name-phone"
1381
1381
  type="tel"
@@ -1424,7 +1424,7 @@ exports[`component:<InputPhone> prop:value 1`] = `
1424
1424
  class="view content"
1425
1425
  >
1426
1426
  <select
1427
- class="select input singleLine prefix"
1427
+ class="select input prefix"
1428
1428
  name="name-prefix"
1429
1429
  >
1430
1430
  <option
@@ -1477,7 +1477,7 @@ exports[`component:<InputPhone> prop:value 1`] = `
1477
1477
  class="view wide content"
1478
1478
  >
1479
1479
  <input
1480
- class="input input singleLine"
1480
+ class="input input"
1481
1481
  maxlength="12"
1482
1482
  name="name-phone"
1483
1483
  type="tel"
@@ -1505,7 +1505,7 @@ exports[`component:<InputPhone> prop:value:without prefixes 1`] = `
1505
1505
  class="view wide content"
1506
1506
  >
1507
1507
  <input
1508
- class="input input singleLine"
1508
+ class="input input"
1509
1509
  maxlength="12"
1510
1510
  name="name-phone"
1511
1511
  type="tel"
@@ -1533,7 +1533,7 @@ exports[`component:<InputPhone> prop:warning 1`] = `
1533
1533
  class="view content"
1534
1534
  >
1535
1535
  <select
1536
- class="select empty input singleLine prefix"
1536
+ class="select empty input prefix"
1537
1537
  name="name-prefix"
1538
1538
  >
1539
1539
  <option
@@ -1586,7 +1586,7 @@ exports[`component:<InputPhone> prop:warning 1`] = `
1586
1586
  class="view wide content"
1587
1587
  >
1588
1588
  <input
1589
- class="input input singleLine"
1589
+ class="input input"
1590
1590
  maxlength="12"
1591
1591
  name="name-phone"
1592
1592
  type="tel"
@@ -1631,7 +1631,7 @@ exports[`component:<InputPhone> renders 1`] = `
1631
1631
  class="view content"
1632
1632
  >
1633
1633
  <select
1634
- class="select empty input singleLine prefix"
1634
+ class="select empty input prefix"
1635
1635
  name="name-prefix"
1636
1636
  >
1637
1637
  <option
@@ -1684,7 +1684,7 @@ exports[`component:<InputPhone> renders 1`] = `
1684
1684
  class="view wide content"
1685
1685
  >
1686
1686
  <input
1687
- class="input input singleLine"
1687
+ class="input input"
1688
1688
  maxlength="12"
1689
1689
  name="name-phone"
1690
1690
  type="tel"
@@ -1712,7 +1712,7 @@ exports[`component:<InputPhone> testId 1`] = `
1712
1712
  class="view content"
1713
1713
  >
1714
1714
  <select
1715
- class="select empty input singleLine prefix"
1715
+ class="select empty input prefix"
1716
1716
  data-testid="mirai-select"
1717
1717
  name="name-prefix"
1718
1718
  >
@@ -1766,7 +1766,7 @@ exports[`component:<InputPhone> testId 1`] = `
1766
1766
  class="view wide content"
1767
1767
  >
1768
1768
  <input
1769
- class="input input singleLine"
1769
+ class="input input"
1770
1770
  data-testid="mirai-input"
1771
1771
  maxlength="12"
1772
1772
  name="name-phone"
@@ -1795,7 +1795,7 @@ exports[`component:<InputPhone> testId:without prefixes 1`] = `
1795
1795
  class="view wide content"
1796
1796
  >
1797
1797
  <input
1798
- class="input input singleLine"
1798
+ class="input input"
1799
1799
  data-testid="mirai-input"
1800
1800
  maxlength="12"
1801
1801
  name="name-phone"
@@ -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 : _InputTextModule.default.singleLine),
122
+ className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine && _InputTextModule.default.multiLine),
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 : _InputTextModule.default.singleLine)
131
+ className: (0, _helpers.styles)(_InputTextModule.default.input, has.label && _InputTextModule.default.withLabel, multiLine && _InputTextModule.default.multiLine)
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","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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EAAPA,OAAO;IAAEE,OAAO,EAAPA;EAAO,EAAM,CAC3D,EAENT,IAAI,iBAAI,6BAAC,cAAI;IAAOF,QAAQ,EAARA,QAAQ;IAAEC,KAAK,EAALA,KAAK;IAAEC,IAAI,EAAJA;EAAI,EAAM,CAC3C;AAEX,CAAC;AAAC;AAEFJ,SAAS,CAACuD,WAAW,GAAG,qBAAqB;AAE7CvD,SAAS,CAACwD,SAAS,GAAG;EACpBvD,OAAO,EAAEwD,kBAAS,CAACC,MAAM;EACzBxD,QAAQ,EAAEuD,kBAAS,CAACE,IAAI;EACxBxD,KAAK,EAAEsD,kBAAS,CAACE,IAAI;EACrBvD,IAAI,EAAEqD,kBAAS,CAACC,MAAM;EACtBrD,IAAI,EAAEoD,kBAAS,CAACG,IAAI;EACpBtD,KAAK,EAAEmD,kBAAS,CAACC,MAAM;EACvBnD,QAAQ,EAAEkD,kBAAS,CAACE,IAAI;EACxBnD,SAAS,EAAEiD,kBAAS,CAACE,IAAI;EACzBE,IAAI,EAAEJ,kBAAS,CAACC,MAAM,CAACI,UAAU;EACjCrD,YAAY,EAAEgD,kBAAS,CAACE,IAAI;EAC5BjD,SAAS,EAAE+C,kBAAS,CAACE,IAAI;EACzBhD,OAAO,EAAE8C,kBAAS,CAACE,IAAI;EACvB/C,IAAI,EAAE6C,kBAAS,CAACC,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"}
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,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G,qBAAqB;AAE7CtD,SAAS,CAACuD,SAAS,GAAG;EACpBtD,OAAO,EAAEuD,kBAAS,CAACC,MAAM;EACzBvD,QAAQ,EAAEsD,kBAAS,CAACE,IAAI;EACxBvD,KAAK,EAAEqD,kBAAS,CAACE,IAAI;EACrBtD,IAAI,EAAEoD,kBAAS,CAACC,MAAM;EACtBpD,IAAI,EAAEmD,kBAAS,CAACG,IAAI;EACpBrD,KAAK,EAAEkD,kBAAS,CAACC,MAAM;EACvBlD,QAAQ,EAAEiD,kBAAS,CAACE,IAAI;EACxBlD,SAAS,EAAEgD,kBAAS,CAACE,IAAI;EACzBE,IAAI,EAAEJ,kBAAS,CAACC,MAAM,CAACI,UAAU;EACjCpD,YAAY,EAAE+C,kBAAS,CAACE,IAAI;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"}
@@ -55,7 +55,7 @@
55
55
  color: var(--mirai-ui-content);
56
56
  }
57
57
 
58
- .input.singleLine {
58
+ .input:not(.multiLine) {
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.singleLine {
67
+ .input.withLabel:not(.multiLine) {
68
68
  padding-top: calc(var(--mirai-ui-input-text-padding-y) + var(--mirai-ui-space-S));
69
69
  }
70
70
 
@@ -72,11 +72,7 @@
72
72
  margin-top: calc(var(--mirai-ui-input-text-padding-y) + var(--mirai-ui-space-M));
73
73
  }
74
74
 
75
- .input.empty:focus {
76
- color: var(--mirai-ui-input-disabled);
77
- }
78
-
79
- .input.empty {
75
+ .input.empty:not(:focus) {
80
76
  color: var(--mirai-ui-base);
81
77
  }
82
78
 
@@ -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 singleLine"
15
+ class="input input"
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 singleLine"
43
+ class="input input"
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 singleLine"
66
+ class="input input"
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 singleLine"
90
+ class="input input"
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 singleLine"
134
+ class="input input"
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 singleLine"
183
+ class="input input"
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 singleLine"
211
+ class="input input withLabel"
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 singleLine"
234
+ class="input input"
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 singleLine"
309
+ class="input input withLabel"
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 singleLine"
338
+ class="input input withLabel"
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 singleLine"
362
+ class="input input"
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 singleLine"
406
+ class="input input"
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 singleLine"
450
+ class="input input"
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 singleLine"
499
+ class="input input"
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 singleLine"
539
+ class="input input"
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 singleLine"
562
+ class="input input"
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 : _MenuModule.default.enabled),
27
+ className: (0, _helpers.styles)(_MenuModule.default.option, value && _MenuModule.default.value, divider && _MenuModule.default.divider, disabled && _MenuModule.default.disabled),
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","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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S,CAACI,MAAM,EAAEJ,kBAAS,CAACM,MAAM,CAAC,CAAC;EAChEhB,OAAO,EAAEU,kBAAS,CAACG;AACrB,CAAC"}
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"}
@@ -20,13 +20,13 @@
20
20
  width: 100%;
21
21
  }
22
22
 
23
- .menu .option.value.enabled:hover {
23
+ .menu .option.value:hover:not(.disabled) {
24
24
  background-color: var(--mirai-ui-menu-option-hover-background);
25
25
  cursor: pointer;
26
26
  }
27
27
 
28
- .menu .option.value.enabled:hover .icon,
29
- .menu .option.value.enabled:hover .label {
28
+ .menu .option.value:hover:not(.disabled) .icon,
29
+ .menu .option.value:hover:not(.disabled) .label {
30
30
  color: var(--mirai-ui-menu-option-hover-color);
31
31
  cursor: pointer;
32
32
  }