@mirai/ui 1.0.218 → 1.1.0-beta
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/Action/Action.js +5 -3
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.module.css +49 -50
- package/build/components/Action/Action.stories.js +8 -5
- package/build/components/Action/Action.stories.js.map +1 -1
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +55 -41
- package/build/components/Button/Button.js +7 -5
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +10 -16
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +45 -34
- package/build/components/Calendar/Calendar.Month.js +6 -4
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +6 -6
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +6 -3
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.js +3 -3
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.module.css +6 -7
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +17618 -17586
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +10 -10
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +49 -49
- package/build/components/InputNumber/InputNumber.js +9 -7
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +153 -138
- package/build/components/InputOption/InputOption.js +7 -4
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +84 -71
- package/build/components/InputPhone/InputPhone.js +11 -11
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +371 -371
- package/build/components/InputSelect/InputSelect.js +7 -7
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +112 -112
- package/build/components/InputText/InputText.js +10 -10
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +3 -7
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +147 -146
- package/build/components/InputText/partials/InputText.Hint.js +5 -2
- package/build/components/InputText/partials/InputText.Hint.js.map +1 -1
- package/build/components/InputText/partials/InputText.IconState.js +5 -2
- package/build/components/InputText/partials/InputText.IconState.js.map +1 -1
- package/build/components/InputText/partials/InputText.Label.js +6 -3
- package/build/components/InputText/partials/InputText.Label.js.map +1 -1
- package/build/components/Menu/Menu.Option.js +8 -5
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.js +6 -3
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.module.css +3 -3
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +80 -67
- package/build/components/Modal/Modal.js +9 -9
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +91 -72
- package/build/components/Notification/Notification.js +8 -5
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.module.css +7 -10
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +149 -148
- package/build/components/Progress/Progress.js +6 -3
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +18 -18
- package/build/components/Slider/Slider.js +11 -11
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +248 -230
- package/build/components/Table/Table.ColumnFilter.js +9 -9
- package/build/components/Table/Table.ColumnFilter.js.map +1 -1
- package/build/components/Table/Table.Filter.js +7 -4
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +7 -8
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +3 -3
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.module.css +2 -6
- package/build/components/Table/Table.stories.js +4 -5
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +258 -228
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +1010 -1090
- package/build/components/Tooltip/Tooltip.js +4 -4
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/Tooltip.module.css +5 -5
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +46 -36
- package/build/primitives/Checkbox/Checkbox.js +7 -3
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.module.css +1 -2
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +16 -16
- package/build/primitives/Icon/Icon.js +5 -3
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +60 -60
- package/build/primitives/Input/Input.js +2 -2
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Layer/Layer.js +4 -3
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.module.css +4 -1
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +48 -42
- package/build/primitives/Pressable/Pressable.constants.js +1 -1
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js +11 -5
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +14 -10
- package/build/primitives/Primitive/Primitive.js +2 -2
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/Primitive.module.css +241 -0
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +7 -7
- package/build/primitives/Primitive/helpers/getTag.js +32 -0
- package/build/primitives/Primitive/helpers/getTag.js.map +1 -0
- package/build/primitives/Primitive/helpers/index.js +11 -0
- package/build/primitives/Primitive/helpers/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +8 -5
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.module.css +2 -2
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +21 -21
- package/build/primitives/ScrollView/ScrollView.js +3 -3
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.stories.js +6 -5
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +20 -20
- package/build/primitives/Select/Select.js +2 -2
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.module.css +1 -5
- package/build/primitives/Switch/Switch.js +8 -5
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/Switch.module.css +1 -5
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +25 -25
- package/build/primitives/Text/Text.js +7 -4
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +4 -8
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +38 -38
- package/build/primitives/View/View.js +5 -3
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +10 -10
- package/package.json +5 -1
|
@@ -11,36 +11,36 @@ exports[`component:<Form> inherit:className 1`] = `
|
|
|
11
11
|
exports[`component:<Form> prop:children 1`] = `
|
|
12
12
|
<DocumentFragment>
|
|
13
13
|
<form>
|
|
14
|
-
<
|
|
14
|
+
<ui_view
|
|
15
15
|
class="view inputContainer"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<ui_view
|
|
18
18
|
class="view row inputBorder"
|
|
19
19
|
>
|
|
20
|
-
<
|
|
20
|
+
<ui_view
|
|
21
21
|
class="view wide content"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
23
|
+
<ui_text
|
|
24
24
|
class="text paragraph text label"
|
|
25
25
|
>
|
|
26
26
|
label
|
|
27
|
-
</
|
|
27
|
+
</ui_text>
|
|
28
28
|
<input
|
|
29
|
-
class="input input withLabel
|
|
29
|
+
class="input input withLabel"
|
|
30
30
|
name="name"
|
|
31
31
|
type="text"
|
|
32
32
|
value=""
|
|
33
33
|
/>
|
|
34
|
-
</
|
|
35
|
-
</
|
|
36
|
-
</
|
|
34
|
+
</ui_view>
|
|
35
|
+
</ui_view>
|
|
36
|
+
</ui_view>
|
|
37
37
|
</form>
|
|
38
38
|
</DocumentFragment>
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
41
|
exports[`component:<Form> prop:tag 1`] = `
|
|
42
42
|
<DocumentFragment>
|
|
43
|
-
<
|
|
43
|
+
<ui_tag />
|
|
44
44
|
</DocumentFragment>
|
|
45
45
|
`;
|
|
46
46
|
|
|
@@ -2,167 +2,167 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`component:<InputDate> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<
|
|
5
|
+
<ui_view
|
|
6
6
|
class="view inputContainer mirai"
|
|
7
7
|
>
|
|
8
|
-
<
|
|
8
|
+
<ui_view
|
|
9
9
|
class="view row inputBorder"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
11
|
+
<ui_view
|
|
12
12
|
class="view wide content"
|
|
13
13
|
>
|
|
14
14
|
<input
|
|
15
|
-
class="input input
|
|
15
|
+
class="input input"
|
|
16
16
|
maxlength="10"
|
|
17
17
|
name="name"
|
|
18
18
|
placeholder="DD/MM/YYYY"
|
|
19
19
|
type="text"
|
|
20
20
|
value=""
|
|
21
21
|
/>
|
|
22
|
-
</
|
|
23
|
-
</
|
|
24
|
-
</
|
|
22
|
+
</ui_view>
|
|
23
|
+
</ui_view>
|
|
24
|
+
</ui_view>
|
|
25
25
|
</DocumentFragment>
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
28
|
exports[`component:<InputDate> prop:format 1`] = `
|
|
29
29
|
<DocumentFragment>
|
|
30
|
-
<
|
|
30
|
+
<ui_view
|
|
31
31
|
class="view inputContainer"
|
|
32
32
|
>
|
|
33
|
-
<
|
|
33
|
+
<ui_view
|
|
34
34
|
class="view row inputBorder"
|
|
35
35
|
>
|
|
36
|
-
<
|
|
36
|
+
<ui_view
|
|
37
37
|
class="view wide content"
|
|
38
38
|
>
|
|
39
39
|
<input
|
|
40
|
-
class="input input
|
|
40
|
+
class="input input"
|
|
41
41
|
maxlength="10"
|
|
42
42
|
name="name"
|
|
43
43
|
placeholder="MM/DD/YYYY"
|
|
44
44
|
type="text"
|
|
45
45
|
value=""
|
|
46
46
|
/>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
49
|
-
</
|
|
47
|
+
</ui_view>
|
|
48
|
+
</ui_view>
|
|
49
|
+
</ui_view>
|
|
50
50
|
</DocumentFragment>
|
|
51
51
|
`;
|
|
52
52
|
|
|
53
53
|
exports[`component:<InputDate> prop:placeholder 1`] = `
|
|
54
54
|
<DocumentFragment>
|
|
55
|
-
<
|
|
55
|
+
<ui_view
|
|
56
56
|
class="view inputContainer"
|
|
57
57
|
>
|
|
58
|
-
<
|
|
58
|
+
<ui_view
|
|
59
59
|
class="view row inputBorder"
|
|
60
60
|
>
|
|
61
|
-
<
|
|
61
|
+
<ui_view
|
|
62
62
|
class="view wide content"
|
|
63
63
|
>
|
|
64
64
|
<input
|
|
65
|
-
class="input input
|
|
65
|
+
class="input input"
|
|
66
66
|
maxlength="10"
|
|
67
67
|
name="name"
|
|
68
68
|
placeholder="placeholder"
|
|
69
69
|
type="text"
|
|
70
70
|
value=""
|
|
71
71
|
/>
|
|
72
|
-
</
|
|
73
|
-
</
|
|
74
|
-
</
|
|
72
|
+
</ui_view>
|
|
73
|
+
</ui_view>
|
|
74
|
+
</ui_view>
|
|
75
75
|
</DocumentFragment>
|
|
76
76
|
`;
|
|
77
77
|
|
|
78
78
|
exports[`component:<InputDate> prop:value & prop:format 1`] = `
|
|
79
79
|
<DocumentFragment>
|
|
80
|
-
<
|
|
80
|
+
<ui_view
|
|
81
81
|
class="view inputContainer"
|
|
82
82
|
>
|
|
83
|
-
<
|
|
83
|
+
<ui_view
|
|
84
84
|
class="view row inputBorder"
|
|
85
85
|
>
|
|
86
|
-
<
|
|
86
|
+
<ui_view
|
|
87
87
|
class="view wide content"
|
|
88
88
|
>
|
|
89
89
|
<input
|
|
90
|
-
class="input input
|
|
90
|
+
class="input input"
|
|
91
91
|
maxlength="5"
|
|
92
92
|
name="name"
|
|
93
93
|
placeholder="MM/YY"
|
|
94
94
|
type="text"
|
|
95
95
|
value="04/80"
|
|
96
96
|
/>
|
|
97
|
-
</
|
|
98
|
-
</
|
|
99
|
-
</
|
|
97
|
+
</ui_view>
|
|
98
|
+
</ui_view>
|
|
99
|
+
</ui_view>
|
|
100
100
|
</DocumentFragment>
|
|
101
101
|
`;
|
|
102
102
|
|
|
103
103
|
exports[`component:<InputDate> prop:value 1`] = `
|
|
104
104
|
<DocumentFragment>
|
|
105
|
-
<
|
|
105
|
+
<ui_view
|
|
106
106
|
class="view inputContainer"
|
|
107
107
|
>
|
|
108
|
-
<
|
|
108
|
+
<ui_view
|
|
109
109
|
class="view row inputBorder"
|
|
110
110
|
>
|
|
111
|
-
<
|
|
111
|
+
<ui_view
|
|
112
112
|
class="view wide content"
|
|
113
113
|
>
|
|
114
114
|
<input
|
|
115
|
-
class="input input
|
|
115
|
+
class="input input"
|
|
116
116
|
maxlength="10"
|
|
117
117
|
name="name"
|
|
118
118
|
placeholder="DD/MM/YYYY"
|
|
119
119
|
type="text"
|
|
120
120
|
value="10/04/1980"
|
|
121
121
|
/>
|
|
122
|
-
</
|
|
123
|
-
</
|
|
124
|
-
</
|
|
122
|
+
</ui_view>
|
|
123
|
+
</ui_view>
|
|
124
|
+
</ui_view>
|
|
125
125
|
</DocumentFragment>
|
|
126
126
|
`;
|
|
127
127
|
|
|
128
128
|
exports[`component:<InputDate> renders 1`] = `
|
|
129
129
|
<DocumentFragment>
|
|
130
|
-
<
|
|
130
|
+
<ui_view
|
|
131
131
|
class="view inputContainer"
|
|
132
132
|
>
|
|
133
|
-
<
|
|
133
|
+
<ui_view
|
|
134
134
|
class="view row inputBorder"
|
|
135
135
|
>
|
|
136
|
-
<
|
|
136
|
+
<ui_view
|
|
137
137
|
class="view wide content"
|
|
138
138
|
>
|
|
139
139
|
<input
|
|
140
|
-
class="input input
|
|
140
|
+
class="input input"
|
|
141
141
|
maxlength="10"
|
|
142
142
|
name="name"
|
|
143
143
|
placeholder="DD/MM/YYYY"
|
|
144
144
|
type="text"
|
|
145
145
|
value=""
|
|
146
146
|
/>
|
|
147
|
-
</
|
|
148
|
-
</
|
|
149
|
-
</
|
|
147
|
+
</ui_view>
|
|
148
|
+
</ui_view>
|
|
149
|
+
</ui_view>
|
|
150
150
|
</DocumentFragment>
|
|
151
151
|
`;
|
|
152
152
|
|
|
153
153
|
exports[`component:<InputDate> testId 1`] = `
|
|
154
154
|
<DocumentFragment>
|
|
155
|
-
<
|
|
155
|
+
<ui_view
|
|
156
156
|
class="view inputContainer"
|
|
157
157
|
>
|
|
158
|
-
<
|
|
158
|
+
<ui_view
|
|
159
159
|
class="view row inputBorder"
|
|
160
160
|
>
|
|
161
|
-
<
|
|
161
|
+
<ui_view
|
|
162
162
|
class="view wide content"
|
|
163
163
|
>
|
|
164
164
|
<input
|
|
165
|
-
class="input input
|
|
165
|
+
class="input input"
|
|
166
166
|
data-testid="mirai"
|
|
167
167
|
maxlength="10"
|
|
168
168
|
name="name"
|
|
@@ -170,8 +170,8 @@ exports[`component:<InputDate> testId 1`] = `
|
|
|
170
170
|
type="text"
|
|
171
171
|
value=""
|
|
172
172
|
/>
|
|
173
|
-
</
|
|
174
|
-
</
|
|
175
|
-
</
|
|
173
|
+
</ui_view>
|
|
174
|
+
</ui_view>
|
|
175
|
+
</ui_view>
|
|
176
176
|
</DocumentFragment>
|
|
177
177
|
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -10,8 +11,10 @@ var _helpers = require("../../helpers");
|
|
|
10
11
|
var _primitives = require("../../primitives");
|
|
11
12
|
var _Button = require("../Button");
|
|
12
13
|
var _partials = require("../InputText/partials");
|
|
13
|
-
var
|
|
14
|
+
var style = _interopRequireWildcard(require("./InputNumber.module.css"));
|
|
14
15
|
var _excluded = ["disabled", "hint", "label", "max", "min", "name", "required", "rounded", "showRequired", "step", "value", "onChange"];
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
19
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -39,18 +42,18 @@ var InputNumber = function InputNumber(_ref) {
|
|
|
39
42
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
40
43
|
role: others.role || 'input-number',
|
|
41
44
|
row: true,
|
|
42
|
-
className: (0, _helpers.styles)(
|
|
45
|
+
className: (0, _helpers.styles)(style.inputNumber, others.className)
|
|
43
46
|
}), /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
44
|
-
className:
|
|
47
|
+
className: style.texts
|
|
45
48
|
}, label && /*#__PURE__*/_react.default.createElement(_partials.Label, {
|
|
46
49
|
disabled: disabled,
|
|
47
50
|
label: label,
|
|
48
51
|
required: showRequired && required,
|
|
49
|
-
className:
|
|
52
|
+
className: style.label
|
|
50
53
|
}), hint && /*#__PURE__*/_react.default.createElement(_partials.Hint, {
|
|
51
54
|
disabled: disabled,
|
|
52
55
|
hint: hint,
|
|
53
|
-
className:
|
|
56
|
+
className: style.hint
|
|
54
57
|
})), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
55
58
|
disabled: disabled || value <= min,
|
|
56
59
|
rounded: rounded,
|
|
@@ -63,8 +66,7 @@ var InputNumber = function InputNumber(_ref) {
|
|
|
63
66
|
value: _primitives.ICON.REMOVE
|
|
64
67
|
})), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
65
68
|
headline: true,
|
|
66
|
-
|
|
67
|
-
className: (0, _helpers.styles)(_InputNumberModule.default.value, disabled && _InputNumberModule.default.disabled)
|
|
69
|
+
className: (0, _helpers.styles)(style.value, disabled && style.disabled)
|
|
68
70
|
}, typeof value === 'number' ? value : min), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
69
71
|
disabled: disabled || value >= max,
|
|
70
72
|
rounded: rounded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.js","names":["InputNumber","disabled","hint","label","max","min","name","required","rounded","showRequired","step","value","onChange","others","role","styles","style","inputNumber","className","texts","ICON","REMOVE","ADD","displayName","propTypes","PropTypes","bool","oneOfType","string","array","number","isRequired","func"],"sources":["../../../src/components/InputNumber/InputNumber.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, Text, View } from '../../primitives';\nimport { Button } from '../Button';\nimport { Hint, Label } from '../InputText/partials';\nimport style from './InputNumber.module.css';\n\nconst InputNumber = ({\n disabled,\n hint,\n label,\n max,\n min = 0,\n name,\n required,\n rounded = true,\n showRequired = false,\n step = 1,\n value = 0,\n onChange = () => {},\n ...others\n}) => (\n <View {...others} role={others.role || 'input-number'} row className={styles(style.inputNumber, others.className)}>\n <View className={style.texts}>\n {label && <Label {...{ disabled, label, required: showRequired && required }} className={style.label} />}\n {hint && <Hint {...{ disabled, hint }} className={style.hint} />}\n </View>\n <Button\n disabled={disabled || value <= min}\n rounded={rounded}\n secondary\n squared\n onPress={() => onChange(value - step, name)}\n >\n <Icon value={ICON.REMOVE} />\n </Button>\n <Text headline
|
|
1
|
+
{"version":3,"file":"InputNumber.js","names":["InputNumber","disabled","hint","label","max","min","name","required","rounded","showRequired","step","value","onChange","others","role","styles","style","inputNumber","className","texts","ICON","REMOVE","ADD","displayName","propTypes","PropTypes","bool","oneOfType","string","array","number","isRequired","func"],"sources":["../../../src/components/InputNumber/InputNumber.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, Text, View } from '../../primitives';\nimport { Button } from '../Button';\nimport { Hint, Label } from '../InputText/partials';\nimport * as style from './InputNumber.module.css';\n\nconst InputNumber = ({\n disabled,\n hint,\n label,\n max,\n min = 0,\n name,\n required,\n rounded = true,\n showRequired = false,\n step = 1,\n value = 0,\n onChange = () => {},\n ...others\n}) => (\n <View {...others} role={others.role || 'input-number'} row className={styles(style.inputNumber, others.className)}>\n <View className={style.texts}>\n {label && <Label {...{ disabled, label, required: showRequired && required }} className={style.label} />}\n {hint && <Hint {...{ disabled, hint }} className={style.hint} />}\n </View>\n <Button\n disabled={disabled || value <= min}\n rounded={rounded}\n secondary\n squared\n onPress={() => onChange(value - step, name)}\n >\n <Icon value={ICON.REMOVE} />\n </Button>\n <Text headline className={styles(style.value, disabled && style.disabled)}>\n {typeof value === 'number' ? value : min}\n </Text>\n <Button\n disabled={disabled || value >= max}\n rounded={rounded}\n secondary\n squared\n onPress={() => onChange(value + step, name)}\n >\n <Icon value={ICON.ADD} />\n </Button>\n </View>\n);\n\nInputNumber.displayName = 'Component:InputOption';\n\nInputNumber.propTypes = {\n disabled: PropTypes.bool,\n hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n label: PropTypes.string,\n max: PropTypes.number,\n min: PropTypes.number,\n name: PropTypes.string.isRequired,\n required: PropTypes.bool,\n rounded: PropTypes.bool,\n showRequired: PropTypes.bool,\n step: PropTypes.number,\n value: PropTypes.number,\n onChange: PropTypes.func,\n};\n\nexport { InputNumber };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAkD;AAAA;AAAA;AAAA;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