@mirai/ui 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Button/Button.js +3 -2
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +8 -4
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +1 -1
- package/build/components/Calendar/Calendar.Week.js +0 -2
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +1218 -1218
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +2 -2
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +2 -2
- package/build/components/InputSelect/InputSelect.js +93 -0
- package/build/components/InputSelect/InputSelect.js.map +1 -0
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +490 -0
- package/build/components/InputSelect/index.js +19 -0
- package/build/components/InputSelect/index.js.map +1 -0
- package/build/components/InputText/InputText.js +13 -5
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +40 -19
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +62 -19
- package/build/components/index.js +13 -0
- package/build/components/index.js.map +1 -1
- package/build/primitives/Input/Input.module.css +0 -5
- package/build/primitives/Pressable/Pressable.js +1 -1
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.module.css +1 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +1 -1
- package/build/primitives/Select/Select.js +70 -0
- package/build/primitives/Select/Select.js.map +1 -0
- package/build/primitives/Select/Select.module.css +24 -0
- package/build/primitives/Select/__tests__/__snapshots__/Select.test.js.snap +178 -0
- package/build/primitives/Select/index.js +19 -0
- package/build/primitives/Select/index.js.map +1 -0
- package/build/primitives/View/View.module.css +1 -0
- package/build/primitives/index.js +13 -0
- package/build/primitives/index.js.map +1 -1
- package/build/theme/default.theme.css +3 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/InputText/InputText.jsx"],"names":["InputText","disabled","error","hint","label","type","onChange","onEnter","onLeave","others","focus","setFocus","password","setPassword","handleChange","value","event","handleEnter","handleLeave","has","undefined","length","is","style","
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InputText/InputText.jsx"],"names":["InputText","disabled","error","hint","icon","label","type","onChange","onEnter","onLeave","others","focus","setFocus","password","setPassword","handleChange","value","event","handleEnter","handleLeave","has","undefined","length","is","style","inputContainer","className","text","inputBorder","left","input","iconLeft","pressable","displayName"],"mappings":"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","sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Input, Pressable, Text, View } from '../../primitives';\nimport style from './InputText.module.css';\n\nconst InputText = ({\n disabled,\n error,\n hint,\n icon,\n label,\n type,\n onChange = () => {},\n onEnter = () => {},\n onLeave = () => {},\n ...others\n}) => {\n const [focus, setFocus] = useState(false);\n const [password, setPassword] = 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 = () => {\n setFocus(false);\n onLeave(event);\n };\n\n const has = {\n value: others.value !== undefined && others.value?.length > 0,\n };\n const is = { password: type === 'password' };\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 focus && style.focus,\n error && style.error,\n (focus || error || has.value) && style.value,\n )}\n >\n {label}\n </Text>\n )}\n\n <View row className={styles(style.inputBorder, focus && !error && style.focus, error && style.error)}>\n {icon && <Icon name={icon} className={[style.icon, style.left]} />}\n <Input\n {...others}\n disabled={disabled}\n type={!is.password || password ? type : 'text'}\n value={others.value || ''}\n className={styles(style.input, icon && style.iconLeft)}\n style={undefined}\n onChange={handleChange}\n onEnter={handleEnter}\n onLeave={handleLeave}\n />\n {is.password && !disabled && (\n <Pressable className={style.pressable} onPress={() => setPassword(!password)}>\n <Icon name={password ? 'EyeClose' : 'EyeOpen'} />\n </Pressable>\n )}\n </View>\n\n {hint && (\n <Text small className={styles(style.text, style.hint, error && style.error)}>\n {hint}\n </Text>\n )}\n </View>\n );\n};\n\nInputText.displayName = 'Component:InputText';\n\nInputText.propTypes = {\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n hint: PropTypes.string,\n icon: PropTypes.string,\n label: PropTypes.string,\n multiLine: PropTypes.bool,\n name: PropTypes.string.isRequired,\n type: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { InputText };\n"],"file":"InputText.js"}
|
|
@@ -2,43 +2,61 @@
|
|
|
2
2
|
--mirai-ui-input-field-border: solid 1px var(--mirai-ui-lighten);
|
|
3
3
|
--mirai-ui-input-field-focus: var(--mirai-ui-accent);
|
|
4
4
|
--mirai-ui-input-field-padding-x: var(--mirai-ui-space-S);
|
|
5
|
-
--mirai-ui-input-field-padding-y: var(--mirai-ui-space-
|
|
5
|
+
--mirai-ui-input-field-padding-y: var(--mirai-ui-space-S);
|
|
6
6
|
--mirai-ui-input-field-radius: var(--mirai-ui-border-radius);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.inputContainer {
|
|
10
10
|
position: relative;
|
|
11
11
|
margin-bottom: var(--mirai-ui-input-field-padding-y);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.inputBorder {
|
|
15
15
|
border: var(--mirai-ui-input-field-border);
|
|
16
16
|
border-radius: var(--mirai-ui-input-field-radius);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.inputBorder.error {
|
|
20
|
+
border-color: var(--mirai-ui-error);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.inputBorder.focus {
|
|
24
|
+
border-color: var(--mirai-ui-input-field-focus);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.input {
|
|
17
28
|
padding: var(--mirai-ui-input-field-padding-y) var(--mirai-ui-input-field-padding-x);
|
|
18
29
|
}
|
|
19
30
|
|
|
31
|
+
.input.iconLeft {
|
|
32
|
+
padding-left: calc(var(--mirai-ui-input-field-padding-x) * 3);
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
.input::placeholder {
|
|
21
36
|
color: var(--mirai-ui-base);
|
|
22
37
|
}
|
|
23
38
|
|
|
24
|
-
.
|
|
25
|
-
|
|
39
|
+
.hint {
|
|
40
|
+
margin: calc(var(--mirai-ui-input-field-padding-x) / 4) var(--mirai-ui-input-field-padding-x);
|
|
26
41
|
}
|
|
27
42
|
|
|
28
|
-
.
|
|
29
|
-
|
|
43
|
+
.icon {
|
|
44
|
+
color: var(--mirai-ui-lighten);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
position: absolute;
|
|
30
47
|
}
|
|
31
48
|
|
|
32
|
-
.
|
|
33
|
-
|
|
49
|
+
.pressable {
|
|
50
|
+
position: absolute;
|
|
51
|
+
right: var(--mirai-ui-input-field-padding-x);
|
|
34
52
|
}
|
|
35
53
|
|
|
36
|
-
.
|
|
37
|
-
|
|
54
|
+
.icon.left {
|
|
55
|
+
left: var(--mirai-ui-input-field-padding-x);
|
|
38
56
|
}
|
|
39
57
|
|
|
40
|
-
.
|
|
41
|
-
|
|
58
|
+
.icon.right {
|
|
59
|
+
right: var(--mirai-ui-input-field-padding-x);
|
|
42
60
|
}
|
|
43
61
|
|
|
44
62
|
.label {
|
|
@@ -50,6 +68,7 @@
|
|
|
50
68
|
position: absolute;
|
|
51
69
|
top: var(--mirai-ui-input-field-padding-y);
|
|
52
70
|
transition: all var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
|
|
71
|
+
z-index: 1;
|
|
53
72
|
}
|
|
54
73
|
|
|
55
74
|
.label.value {
|
|
@@ -57,12 +76,14 @@
|
|
|
57
76
|
top: calc(calc(var(--mirai-ui-input-field-padding-y) * -1) + calc(var(--mirai-ui-input-field-padding-y) / 2));
|
|
58
77
|
}
|
|
59
78
|
|
|
60
|
-
.
|
|
61
|
-
|
|
62
|
-
right: var(--mirai-ui-input-field-padding-x);
|
|
63
|
-
top: var(--mirai-ui-input-field-padding-y);
|
|
79
|
+
.text {
|
|
80
|
+
color: var(--mirai-ui-lighten);
|
|
64
81
|
}
|
|
65
82
|
|
|
66
|
-
.
|
|
67
|
-
|
|
83
|
+
.text.focus {
|
|
84
|
+
color: var(--mirai-ui-input-field-focus);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.text.error {
|
|
88
|
+
color: var(--mirai-ui-error);
|
|
68
89
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
exports[`component:<InputText> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="view
|
|
6
|
+
class="view inputContainer mirai"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="view
|
|
9
|
+
class="view row inputBorder"
|
|
10
10
|
>
|
|
11
11
|
<input
|
|
12
12
|
class="input input"
|
|
@@ -22,10 +22,10 @@ exports[`component:<InputText> inherit:className 1`] = `
|
|
|
22
22
|
exports[`component:<InputText> prop:disabled 1`] = `
|
|
23
23
|
<DocumentFragment>
|
|
24
24
|
<div
|
|
25
|
-
class="view
|
|
25
|
+
class="view inputContainer"
|
|
26
26
|
>
|
|
27
27
|
<div
|
|
28
|
-
class="view
|
|
28
|
+
class="view row inputBorder"
|
|
29
29
|
>
|
|
30
30
|
<input
|
|
31
31
|
class="input input"
|
|
@@ -42,13 +42,13 @@ exports[`component:<InputText> prop:disabled 1`] = `
|
|
|
42
42
|
exports[`component:<InputText> prop:error 1`] = `
|
|
43
43
|
<DocumentFragment>
|
|
44
44
|
<div
|
|
45
|
-
class="view
|
|
45
|
+
class="view inputContainer"
|
|
46
46
|
>
|
|
47
47
|
<div
|
|
48
|
-
class="view
|
|
48
|
+
class="view row inputBorder error"
|
|
49
49
|
>
|
|
50
50
|
<input
|
|
51
|
-
class="input input
|
|
51
|
+
class="input input"
|
|
52
52
|
name="name"
|
|
53
53
|
type="text"
|
|
54
54
|
value=""
|
|
@@ -61,10 +61,10 @@ exports[`component:<InputText> prop:error 1`] = `
|
|
|
61
61
|
exports[`component:<InputText> prop:hint 1`] = `
|
|
62
62
|
<DocumentFragment>
|
|
63
63
|
<div
|
|
64
|
-
class="view
|
|
64
|
+
class="view inputContainer"
|
|
65
65
|
>
|
|
66
66
|
<div
|
|
67
|
-
class="view
|
|
67
|
+
class="view row inputBorder"
|
|
68
68
|
>
|
|
69
69
|
<input
|
|
70
70
|
class="input input"
|
|
@@ -82,10 +82,53 @@ exports[`component:<InputText> prop:hint 1`] = `
|
|
|
82
82
|
</DocumentFragment>
|
|
83
83
|
`;
|
|
84
84
|
|
|
85
|
+
exports[`component:<InputText> prop:icon 1`] = `
|
|
86
|
+
<DocumentFragment>
|
|
87
|
+
<div
|
|
88
|
+
class="view inputContainer"
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
class="view row inputBorder"
|
|
92
|
+
>
|
|
93
|
+
<span
|
|
94
|
+
class="icon icon left"
|
|
95
|
+
>
|
|
96
|
+
<svg
|
|
97
|
+
fill="none"
|
|
98
|
+
height="1em"
|
|
99
|
+
stroke="currentColor"
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round"
|
|
102
|
+
stroke-width="2"
|
|
103
|
+
viewBox="0 0 24 24"
|
|
104
|
+
width="1em"
|
|
105
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
106
|
+
>
|
|
107
|
+
<path
|
|
108
|
+
d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
|
|
109
|
+
/>
|
|
110
|
+
<circle
|
|
111
|
+
cx="12"
|
|
112
|
+
cy="12"
|
|
113
|
+
r="3"
|
|
114
|
+
/>
|
|
115
|
+
</svg>
|
|
116
|
+
</span>
|
|
117
|
+
<input
|
|
118
|
+
class="input input iconLeft"
|
|
119
|
+
name="name"
|
|
120
|
+
type="text"
|
|
121
|
+
value=""
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</DocumentFragment>
|
|
126
|
+
`;
|
|
127
|
+
|
|
85
128
|
exports[`component:<InputText> prop:label 1`] = `
|
|
86
129
|
<DocumentFragment>
|
|
87
130
|
<div
|
|
88
|
-
class="view
|
|
131
|
+
class="view inputContainer"
|
|
89
132
|
>
|
|
90
133
|
<span
|
|
91
134
|
class="text paragraph text label"
|
|
@@ -93,7 +136,7 @@ exports[`component:<InputText> prop:label 1`] = `
|
|
|
93
136
|
label
|
|
94
137
|
</span>
|
|
95
138
|
<div
|
|
96
|
-
class="view
|
|
139
|
+
class="view row inputBorder"
|
|
97
140
|
>
|
|
98
141
|
<input
|
|
99
142
|
class="input input"
|
|
@@ -109,10 +152,10 @@ exports[`component:<InputText> prop:label 1`] = `
|
|
|
109
152
|
exports[`component:<InputText> prop:multiLine 1`] = `
|
|
110
153
|
<DocumentFragment>
|
|
111
154
|
<div
|
|
112
|
-
class="view
|
|
155
|
+
class="view inputContainer"
|
|
113
156
|
>
|
|
114
157
|
<div
|
|
115
|
-
class="view
|
|
158
|
+
class="view row inputBorder"
|
|
116
159
|
>
|
|
117
160
|
<textarea
|
|
118
161
|
class="input input"
|
|
@@ -127,10 +170,10 @@ exports[`component:<InputText> prop:multiLine 1`] = `
|
|
|
127
170
|
exports[`component:<InputText> prop:type 1`] = `
|
|
128
171
|
<DocumentFragment>
|
|
129
172
|
<div
|
|
130
|
-
class="view
|
|
173
|
+
class="view inputContainer"
|
|
131
174
|
>
|
|
132
175
|
<div
|
|
133
|
-
class="view
|
|
176
|
+
class="view row inputBorder"
|
|
134
177
|
>
|
|
135
178
|
<input
|
|
136
179
|
class="input input"
|
|
@@ -175,10 +218,10 @@ exports[`component:<InputText> prop:type 1`] = `
|
|
|
175
218
|
exports[`component:<InputText> renders 1`] = `
|
|
176
219
|
<DocumentFragment>
|
|
177
220
|
<div
|
|
178
|
-
class="view
|
|
221
|
+
class="view inputContainer"
|
|
179
222
|
>
|
|
180
223
|
<div
|
|
181
|
-
class="view
|
|
224
|
+
class="view row inputBorder"
|
|
182
225
|
>
|
|
183
226
|
<input
|
|
184
227
|
class="input input"
|
|
@@ -194,10 +237,10 @@ exports[`component:<InputText> renders 1`] = `
|
|
|
194
237
|
exports[`component:<InputText> testID 1`] = `
|
|
195
238
|
<DocumentFragment>
|
|
196
239
|
<div
|
|
197
|
-
class="view
|
|
240
|
+
class="view inputContainer"
|
|
198
241
|
>
|
|
199
242
|
<div
|
|
200
|
-
class="view
|
|
243
|
+
class="view row inputBorder"
|
|
201
244
|
>
|
|
202
245
|
<input
|
|
203
246
|
class="input input"
|
|
@@ -56,6 +56,19 @@ Object.keys(_InputNumber).forEach(function (key) {
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
+
var _InputSelect = require("./InputSelect");
|
|
60
|
+
|
|
61
|
+
Object.keys(_InputSelect).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _InputSelect[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function get() {
|
|
67
|
+
return _InputSelect[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
59
72
|
var _InputText = require("./InputText");
|
|
60
73
|
|
|
61
74
|
Object.keys(_InputText).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputNumber';\nexport * from './InputText';\nexport * from './Modal';\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/components/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputNumber';\nexport * from './InputSelect';\nexport * from './InputText';\nexport * from './Modal';\n"],"file":"index.js"}
|
|
@@ -33,7 +33,7 @@ var Pressable = function Pressable(_ref) {
|
|
|
33
33
|
others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement(tag, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), {}, {
|
|
35
35
|
disabled: disabled,
|
|
36
|
-
className: (0, _helpers.styles)(_PressableModule.default.pressable,
|
|
36
|
+
className: (0, _helpers.styles)(_PressableModule.default.pressable, others.className)
|
|
37
37
|
}, !disabled ? {
|
|
38
38
|
onClick: onPress,
|
|
39
39
|
onKeyPress: function onKeyPress(_ref2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/Pressable/Pressable.jsx"],"names":["Pressable","children","disabled","tag","onEnter","onLeave","onPress","others","React","createElement","className","style","pressable","onClick","onKeyPress","keyCode","KEY_ENTER","undefined","onMouseEnter","onMouseLeave","displayName"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,QAAH,QAAGA,QAAH;AAAA,MAAaC,QAAb,QAAaA,QAAb;AAAA,sBAAuBC,GAAvB;AAAA,MAAuBA,GAAvB,yBAA6B,QAA7B;AAAA,MAAuCC,OAAvC,QAAuCA,OAAvC;AAAA,MAAgDC,OAAhD,QAAgDA,OAAhD;AAAA,0BAAyDC,OAAzD;AAAA,MAAyDA,OAAzD,6BAAmE,YAAM,CAAE,CAA3E;AAAA,MAAgFC,MAAhF;AAAA,sBAChBC,eAAMC,aAAN,CACEN,GADF,8DAGOI,MAHP;AAIIL,IAAAA,QAAQ,EAARA,QAJJ;AAKIQ,IAAAA,SAAS,EAAE,qBAAOC,yBAAMC,SAAb,
|
|
1
|
+
{"version":3,"sources":["../../../src/primitives/Pressable/Pressable.jsx"],"names":["Pressable","children","disabled","tag","onEnter","onLeave","onPress","others","React","createElement","className","style","pressable","onClick","onKeyPress","keyCode","KEY_ENTER","undefined","onMouseEnter","onMouseLeave","displayName"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,QAAH,QAAGA,QAAH;AAAA,MAAaC,QAAb,QAAaA,QAAb;AAAA,sBAAuBC,GAAvB;AAAA,MAAuBA,GAAvB,yBAA6B,QAA7B;AAAA,MAAuCC,OAAvC,QAAuCA,OAAvC;AAAA,MAAgDC,OAAhD,QAAgDA,OAAhD;AAAA,0BAAyDC,OAAzD;AAAA,MAAyDA,OAAzD,6BAAmE,YAAM,CAAE,CAA3E;AAAA,MAAgFC,MAAhF;AAAA,sBAChBC,eAAMC,aAAN,CACEN,GADF,8DAGOI,MAHP;AAIIL,IAAAA,QAAQ,EAARA,QAJJ;AAKIQ,IAAAA,SAAS,EAAE,qBAAOC,yBAAMC,SAAb,EAAwBL,MAAM,CAACG,SAA/B;AALf,KAMQ,CAACR,QAAD,GACA;AACEW,IAAAA,OAAO,EAAEP,OADX;AAEEQ,IAAAA,UAAU,EAAE;AAAA,UAAGC,OAAH,SAAGA,OAAH;AAAA,aAAkBA,OAAO,KAAKC,oBAAZ,GAAwBV,OAAO,EAA/B,GAAoCW,SAAtD;AAAA,KAFd;AAGEC,IAAAA,YAAY,EAAEd,OAHhB;AAIEe,IAAAA,YAAY,EAAEd;AAJhB,GADA,GAOA,EAbR,GAeEJ,QAfF,CADgB;AAAA,CAAlB;;;AAmBAD,SAAS,CAACoB,WAAV,GAAwB,qBAAxB","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { KEY_ENTER } from './Pressable.constants';\nimport style from './Pressable.module.css';\n\nconst Pressable = ({ children, disabled, tag = 'button', onEnter, onLeave, onPress = () => {}, ...others }) =>\n React.createElement(\n tag,\n {\n ...others,\n disabled,\n className: styles(style.pressable, others.className),\n ...(!disabled\n ? {\n onClick: onPress,\n onKeyPress: ({ keyCode }) => (keyCode === KEY_ENTER ? onPress() : undefined),\n onMouseEnter: onEnter,\n onMouseLeave: onLeave,\n }\n : {}),\n },\n children,\n );\n\nPressable.displayName = 'Primitive:Pressable';\n\nPressable.propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n disabled: PropTypes.bool,\n tag: PropTypes.string,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Pressable };\n"],"file":"Pressable.js"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Select = void 0;
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _helpers = require("../../helpers");
|
|
19
|
+
|
|
20
|
+
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["disabled", "emptyOption", "options", "value", "onChange", "onEnter", "onError", "onLeave"];
|
|
23
|
+
var EMPTY = '';
|
|
24
|
+
|
|
25
|
+
var Select = function Select(_ref) {
|
|
26
|
+
var disabled = _ref.disabled,
|
|
27
|
+
emptyOption = _ref.emptyOption,
|
|
28
|
+
_ref$options = _ref.options,
|
|
29
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
30
|
+
value = _ref.value,
|
|
31
|
+
onChange = _ref.onChange,
|
|
32
|
+
onEnter = _ref.onEnter,
|
|
33
|
+
onError = _ref.onError,
|
|
34
|
+
onLeave = _ref.onLeave,
|
|
35
|
+
others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
|
+
(0, _react.useEffect)(function () {
|
|
37
|
+
var errors = (0, _helpers.getInputErrors)((0, _objectSpread2.default)({}, others));
|
|
38
|
+
if (errors && onError) onError(errors); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
+
}, []);
|
|
40
|
+
|
|
41
|
+
var handleChange = function handleChange(value, event) {
|
|
42
|
+
onError && onError((0, _helpers.getInputErrors)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), {}, {
|
|
43
|
+
value: value
|
|
44
|
+
})));
|
|
45
|
+
onChange && onChange(value, event);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement('select', (0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), {}, {
|
|
49
|
+
disabled: disabled,
|
|
50
|
+
value: value,
|
|
51
|
+
className: (0, _helpers.styles)(_SelectModule.default.select, value === EMPTY && _SelectModule.default.empty, others.className)
|
|
52
|
+
}, !disabled ? {
|
|
53
|
+
onChange: function onChange(event) {
|
|
54
|
+
return handleChange(event.target.value, event);
|
|
55
|
+
},
|
|
56
|
+
onFocus: onEnter,
|
|
57
|
+
onBlur: onLeave
|
|
58
|
+
} : {}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, emptyOption && /*#__PURE__*/_react.default.createElement("option", {
|
|
59
|
+
value: EMPTY
|
|
60
|
+
}, emptyOption), options.map(function (option) {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement("option", {
|
|
62
|
+
svalue: option,
|
|
63
|
+
key: option
|
|
64
|
+
}, option);
|
|
65
|
+
})));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.Select = Select;
|
|
69
|
+
Select.displayName = 'Primitive:Input';
|
|
70
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/primitives/Select/Select.jsx"],"names":["EMPTY","Select","disabled","emptyOption","options","value","onChange","onEnter","onError","onLeave","others","errors","handleChange","event","React","createElement","className","style","select","empty","target","onFocus","onBlur","map","option","displayName"],"mappings":";;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;;AAEA,IAAMA,KAAK,GAAG,EAAd;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,OAAoG;AAAA,MAAjGC,QAAiG,QAAjGA,QAAiG;AAAA,MAAvFC,WAAuF,QAAvFA,WAAuF;AAAA,0BAA1EC,OAA0E;AAAA,MAA1EA,OAA0E,6BAAhE,EAAgE;AAAA,MAA5DC,KAA4D,QAA5DA,KAA4D;AAAA,MAArDC,QAAqD,QAArDA,QAAqD;AAAA,MAA3CC,OAA2C,QAA3CA,OAA2C;AAAA,MAAlCC,OAAkC,QAAlCA,OAAkC;AAAA,MAAzBC,OAAyB,QAAzBA,OAAyB;AAAA,MAAbC,MAAa;AACjH,wBAAU,YAAM;AACd,QAAMC,MAAM,GAAG,6DAAoBD,MAApB,EAAf;AACA,QAAIC,MAAM,IAAIH,OAAd,EAAuBA,OAAO,CAACG,MAAD,CAAP,CAFT,CAGd;AACD,GAJD,EAIG,EAJH;;AAMA,MAAMC,YAAY,GAAG,SAAfA,YAAe,CAACP,KAAD,EAAQQ,KAAR,EAAkB;AACrCL,IAAAA,OAAO,IAAIA,OAAO,CAAC,yFAAoBE,MAApB;AAA4BL,MAAAA,KAAK,EAALA;AAA5B,OAAD,CAAlB;AACAC,IAAAA,QAAQ,IAAIA,QAAQ,CAACD,KAAD,EAAQQ,KAAR,CAApB;AACD,GAHD;;AAKA,sBAAOC,eAAMC,aAAN,CACL,QADK,8DAGAL,MAHA;AAIHR,IAAAA,QAAQ,EAARA,QAJG;AAKHG,IAAAA,KAAK,EAALA,KALG;AAMHW,IAAAA,SAAS,EAAE,qBAAOC,sBAAMC,MAAb,EAAqBb,KAAK,KAAKL,KAAV,IAAmBiB,sBAAME,KAA9C,EAAqDT,MAAM,CAACM,SAA5D;AANR,KAOC,CAACd,QAAD,GACA;AACEI,IAAAA,QAAQ,EAAE,kBAACO,KAAD;AAAA,aAAWD,YAAY,CAACC,KAAK,CAACO,MAAN,CAAaf,KAAd,EAAqBQ,KAArB,CAAvB;AAAA,KADZ;AAEEQ,IAAAA,OAAO,EAAEd,OAFX;AAGEe,IAAAA,MAAM,EAAEb;AAHV,GADA,GAMA,EAbD,gBAeL,4DACGN,WAAW,iBAAI;AAAQ,IAAA,KAAK,EAAEH;AAAf,KAAuBG,WAAvB,CADlB,EAEGC,OAAO,CAACmB,GAAR,CAAY,UAACC,MAAD;AAAA,wBACX;AAAQ,MAAA,MAAM,EAAEA,MAAhB;AAAwB,MAAA,GAAG,EAAEA;AAA7B,OACGA,MADH,CADW;AAAA,GAAZ,CAFH,CAfK,CAAP;AAwBD,CApCD;;;AAsCAvB,MAAM,CAACwB,WAAP,GAAqB,iBAArB","sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect } from 'react';\n\nimport { getInputErrors, styles } from '../../helpers';\nimport style from './Select.module.css';\n\nconst EMPTY = '';\n\nconst Select = ({ disabled, emptyOption, options = [], value, onChange, onEnter, onError, onLeave, ...others }) => {\n useEffect(() => {\n const errors = getInputErrors({ ...others });\n if (errors && onError) onError(errors);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChange = (value, event) => {\n onError && onError(getInputErrors({ ...others, value }));\n onChange && onChange(value, event);\n };\n\n return React.createElement(\n 'select',\n {\n ...others,\n disabled,\n value,\n className: styles(style.select, value === EMPTY && style.empty, others.className),\n ...(!disabled\n ? {\n onChange: (event) => handleChange(event.target.value, event),\n onFocus: onEnter,\n onBlur: onLeave,\n }\n : {}),\n },\n <>\n {emptyOption && <option value={EMPTY}>{emptyOption}</option>}\n {options.map((option) => (\n <option svalue={option} key={option}>\n {option}\n </option>\n ))}\n </>,\n );\n};\n\nSelect.displayName = 'Primitive:Input';\n\nSelect.propTypes = {\n disabled: PropTypes.bool,\n emptyOption: PropTypes.string,\n name: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(PropTypes.string),\n value: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onError: PropTypes.func,\n onLeave: PropTypes.func,\n};\n\nexport { Select };\n"],"file":"Select.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.select {
|
|
2
|
+
background-color: var(--mirai-ui-base);
|
|
3
|
+
border: none;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
color: var(--mirai-ui-content);
|
|
6
|
+
font-family: var(--mirai-ui-input-font);
|
|
7
|
+
font-size: var(--mirai-ui-input-font-size);
|
|
8
|
+
width: 100%;
|
|
9
|
+
margin: 0;
|
|
10
|
+
outline: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
-webkit-appearance: none;
|
|
14
|
+
-moz-appearance: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.select.empty {
|
|
18
|
+
color: var(--mirai-ui-lighten);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.select:disabled {
|
|
22
|
+
/* background-color: transparent; */
|
|
23
|
+
color: var(--mirai-ui-lighten);
|
|
24
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`primitive:<Select> inherit:className 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<select
|
|
6
|
+
class="select mirai"
|
|
7
|
+
name="name"
|
|
8
|
+
>
|
|
9
|
+
<option
|
|
10
|
+
svalue="one"
|
|
11
|
+
>
|
|
12
|
+
one
|
|
13
|
+
</option>
|
|
14
|
+
<option
|
|
15
|
+
svalue="two"
|
|
16
|
+
>
|
|
17
|
+
two
|
|
18
|
+
</option>
|
|
19
|
+
<option
|
|
20
|
+
svalue="three"
|
|
21
|
+
>
|
|
22
|
+
three
|
|
23
|
+
</option>
|
|
24
|
+
<option
|
|
25
|
+
svalue="four"
|
|
26
|
+
>
|
|
27
|
+
four
|
|
28
|
+
</option>
|
|
29
|
+
<option
|
|
30
|
+
svalue="five"
|
|
31
|
+
>
|
|
32
|
+
five
|
|
33
|
+
</option>
|
|
34
|
+
</select>
|
|
35
|
+
</DocumentFragment>
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
exports[`primitive:<Select> prop:disabled 1`] = `
|
|
39
|
+
<DocumentFragment>
|
|
40
|
+
<select
|
|
41
|
+
class="select"
|
|
42
|
+
disabled=""
|
|
43
|
+
name="name"
|
|
44
|
+
>
|
|
45
|
+
<option
|
|
46
|
+
svalue="one"
|
|
47
|
+
>
|
|
48
|
+
one
|
|
49
|
+
</option>
|
|
50
|
+
<option
|
|
51
|
+
svalue="two"
|
|
52
|
+
>
|
|
53
|
+
two
|
|
54
|
+
</option>
|
|
55
|
+
<option
|
|
56
|
+
svalue="three"
|
|
57
|
+
>
|
|
58
|
+
three
|
|
59
|
+
</option>
|
|
60
|
+
<option
|
|
61
|
+
svalue="four"
|
|
62
|
+
>
|
|
63
|
+
four
|
|
64
|
+
</option>
|
|
65
|
+
<option
|
|
66
|
+
svalue="five"
|
|
67
|
+
>
|
|
68
|
+
five
|
|
69
|
+
</option>
|
|
70
|
+
</select>
|
|
71
|
+
</DocumentFragment>
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
exports[`primitive:<Select> prop:value 1`] = `
|
|
75
|
+
<DocumentFragment>
|
|
76
|
+
<select
|
|
77
|
+
class="select"
|
|
78
|
+
name="name"
|
|
79
|
+
>
|
|
80
|
+
<option
|
|
81
|
+
svalue="one"
|
|
82
|
+
>
|
|
83
|
+
one
|
|
84
|
+
</option>
|
|
85
|
+
<option
|
|
86
|
+
svalue="two"
|
|
87
|
+
>
|
|
88
|
+
two
|
|
89
|
+
</option>
|
|
90
|
+
<option
|
|
91
|
+
svalue="three"
|
|
92
|
+
>
|
|
93
|
+
three
|
|
94
|
+
</option>
|
|
95
|
+
<option
|
|
96
|
+
svalue="four"
|
|
97
|
+
>
|
|
98
|
+
four
|
|
99
|
+
</option>
|
|
100
|
+
<option
|
|
101
|
+
svalue="five"
|
|
102
|
+
>
|
|
103
|
+
five
|
|
104
|
+
</option>
|
|
105
|
+
</select>
|
|
106
|
+
</DocumentFragment>
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
exports[`primitive:<Select> renders 1`] = `
|
|
110
|
+
<DocumentFragment>
|
|
111
|
+
<select
|
|
112
|
+
class="select"
|
|
113
|
+
name="name"
|
|
114
|
+
>
|
|
115
|
+
<option
|
|
116
|
+
svalue="one"
|
|
117
|
+
>
|
|
118
|
+
one
|
|
119
|
+
</option>
|
|
120
|
+
<option
|
|
121
|
+
svalue="two"
|
|
122
|
+
>
|
|
123
|
+
two
|
|
124
|
+
</option>
|
|
125
|
+
<option
|
|
126
|
+
svalue="three"
|
|
127
|
+
>
|
|
128
|
+
three
|
|
129
|
+
</option>
|
|
130
|
+
<option
|
|
131
|
+
svalue="four"
|
|
132
|
+
>
|
|
133
|
+
four
|
|
134
|
+
</option>
|
|
135
|
+
<option
|
|
136
|
+
svalue="five"
|
|
137
|
+
>
|
|
138
|
+
five
|
|
139
|
+
</option>
|
|
140
|
+
</select>
|
|
141
|
+
</DocumentFragment>
|
|
142
|
+
`;
|
|
143
|
+
|
|
144
|
+
exports[`primitive:<Select> testID 1`] = `
|
|
145
|
+
<DocumentFragment>
|
|
146
|
+
<select
|
|
147
|
+
class="select"
|
|
148
|
+
data-testid="mirai"
|
|
149
|
+
name="name"
|
|
150
|
+
>
|
|
151
|
+
<option
|
|
152
|
+
svalue="one"
|
|
153
|
+
>
|
|
154
|
+
one
|
|
155
|
+
</option>
|
|
156
|
+
<option
|
|
157
|
+
svalue="two"
|
|
158
|
+
>
|
|
159
|
+
two
|
|
160
|
+
</option>
|
|
161
|
+
<option
|
|
162
|
+
svalue="three"
|
|
163
|
+
>
|
|
164
|
+
three
|
|
165
|
+
</option>
|
|
166
|
+
<option
|
|
167
|
+
svalue="four"
|
|
168
|
+
>
|
|
169
|
+
four
|
|
170
|
+
</option>
|
|
171
|
+
<option
|
|
172
|
+
svalue="five"
|
|
173
|
+
>
|
|
174
|
+
five
|
|
175
|
+
</option>
|
|
176
|
+
</select>
|
|
177
|
+
</DocumentFragment>
|
|
178
|
+
`;
|