@mirai/ui 1.0.55 → 1.0.56
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/README.md +21 -11
- package/build/components/Button/Button.module.css +0 -18
- package/build/components/Calendar/Calendar.module.css +0 -12
- package/build/components/Calendar/Calendar.stories.js +89 -18
- package/build/components/Calendar/Calendar.stories.js.map +1 -1
- package/build/components/Form/Form.stories.js +63 -0
- package/build/components/Form/Form.stories.js.map +1 -0
- package/build/components/InputDate/InputDate.module.css +0 -3
- package/build/components/InputDate/InputDate.stories.js +78 -0
- package/build/components/InputDate/InputDate.stories.js.map +1 -0
- package/build/components/InputNumber/InputNumber.module.css +0 -4
- package/build/components/InputNumber/InputNumber.stories.js +50 -0
- package/build/components/InputNumber/InputNumber.stories.js.map +1 -0
- package/build/components/InputOption/InputOption.module.css +0 -6
- package/build/components/InputOption/InputOption.stories.js +58 -0
- package/build/components/InputOption/InputOption.stories.js.map +1 -0
- package/build/components/InputSelect/InputSelect.stories.js +66 -0
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -0
- package/build/components/InputText/InputText.module.css +0 -11
- package/build/components/InputText/InputText.stories.js +97 -0
- package/build/components/InputText/InputText.stories.js.map +1 -0
- package/build/components/Menu/Menu.module.css +0 -11
- package/build/components/Menu/Menu.stories.js +77 -0
- package/build/components/Menu/Menu.stories.js.map +1 -0
- package/build/components/Modal/Modal.module.css +0 -10
- package/build/components/Modal/Modal.stories.js +3 -2
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Notification/Notification.module.css +0 -6
- package/build/components/Notification/Notification.stories.js +42 -0
- package/build/components/Notification/Notification.stories.js.map +1 -0
- package/build/components/Table/Table.module.css +0 -12
- package/build/components/Table/Table.stories.js +95 -0
- package/build/components/Table/Table.stories.js.map +1 -0
- package/build/components/Tooltip/Tooltip.module.css +0 -8
- package/build/components/Tooltip/Tooltip.stories.js +38 -0
- package/build/components/Tooltip/Tooltip.stories.js.map +1 -0
- package/build/hooks/useDevice.stories.js +57 -0
- package/build/hooks/useDevice.stories.js.map +1 -0
- package/build/primitives/Checkbox/Checkbox.module.css +0 -9
- package/build/primitives/Icon/Icon.stories.js +5 -1
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Input/Input.module.css +0 -6
- package/build/primitives/Input/Input.stories.js +8 -1
- package/build/primitives/Input/Input.stories.js.map +1 -1
- package/build/primitives/Layer/Layer.module.css +0 -4
- package/build/primitives/Layer/Layer.stories.js +44 -0
- package/build/primitives/Layer/Layer.stories.js.map +1 -0
- package/build/primitives/Pressable/Pressable.stories.js +47 -0
- package/build/primitives/Pressable/Pressable.stories.js.map +1 -0
- package/build/primitives/Radio/Radio.module.css +0 -8
- package/build/primitives/Radio/Radio.stories.js +41 -0
- package/build/primitives/Radio/Radio.stories.js.map +1 -0
- package/build/primitives/ScrollView/ScrollView.stories.js +87 -0
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -0
- package/build/primitives/Select/Select.stories.js +73 -0
- package/build/primitives/Select/Select.stories.js.map +1 -0
- package/build/primitives/Switch/Switch.module.css +0 -10
- package/build/primitives/Switch/Switch.stories.js +39 -0
- package/build/primitives/Switch/Switch.stories.js.map +1 -0
- package/build/primitives/Text/Text.stories.js +40 -0
- package/build/primitives/Text/Text.stories.js.map +1 -0
- package/build/primitives/View/View.stories.js +39 -0
- package/build/primitives/View/View.stories.js.map +1 -0
- package/build/theme/default.theme.css +161 -17
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -131,6 +131,11 @@ const MyComponent = () => {
|
|
|
131
131
|
|
|
132
132
|
```css
|
|
133
133
|
--mirai-ui-layer-content: var(--mirai-ui-layer-XL);
|
|
134
|
+
/* position (z-index) */
|
|
135
|
+
--mirai-ui-layer-S: 0;
|
|
136
|
+
--mirai-ui-layer-M: 1;
|
|
137
|
+
--mirai-ui-layer-L: 10;
|
|
138
|
+
--mirai-ui-layer-XL: 100;
|
|
134
139
|
```
|
|
135
140
|
|
|
136
141
|
### Pressable
|
|
@@ -707,23 +712,31 @@ Theme.shadeColors()
|
|
|
707
712
|
--mirai-ui-font-weight: 400;
|
|
708
713
|
--mirai-ui-font-bold: Arial, Regular;
|
|
709
714
|
--mirai-ui-font-bold-weight: 700;
|
|
710
|
-
--mirai-ui-font-size-headline:
|
|
715
|
+
--mirai-ui-font-size-headline-1: 32px;
|
|
716
|
+
--mirai-ui-line-height-headline-1: 38px;
|
|
717
|
+
--mirai-ui-font-size-headline-2: 24px;
|
|
718
|
+
--mirai-ui-line-height-headline-2: 25px;
|
|
719
|
+
--mirai-ui-font-size-headline-3: 18px;
|
|
720
|
+
--mirai-ui-line-height-headline-3: 22px;
|
|
721
|
+
--mirai-ui-font-size-headline-4: 16px;
|
|
722
|
+
--mirai-ui-line-height-headline-4: 19px;
|
|
711
723
|
--mirai-ui-font-size-paragraph: 14px;
|
|
724
|
+
--mirai-ui-line-height-paragraph: 22px;
|
|
712
725
|
--mirai-ui-font-size-action: 14px;
|
|
726
|
+
--mirai-ui-line-height-action: 20px;
|
|
713
727
|
--mirai-ui-font-size-small: 12px;
|
|
714
|
-
--mirai-ui-line-height:
|
|
728
|
+
--mirai-ui-line-height-small: 18px;
|
|
715
729
|
--mirai-ui-text-direction: ltr;
|
|
716
730
|
--mirai-ui-text-align: left;
|
|
717
731
|
|
|
718
732
|
/* palette */
|
|
719
733
|
--mirai-ui-base: #ffffff;
|
|
720
|
-
|
|
734
|
+
|
|
721
735
|
--mirai-ui-content: #484848;
|
|
722
736
|
--mirai-ui-content-background: #f6f6f6;
|
|
723
737
|
--mirai-ui-content-border: #e4e4e4;
|
|
724
738
|
--mirai-ui-content-dark: #202020;
|
|
725
739
|
--mirai-ui-content-light: #999999;
|
|
726
|
-
/* !TODO ------------------------------------------------------------------ */
|
|
727
740
|
|
|
728
741
|
--mirai-ui-accent: #3978c5;
|
|
729
742
|
--mirai-ui-accent-background: #e9f1fc;
|
|
@@ -757,12 +770,6 @@ Theme.shadeColors()
|
|
|
757
770
|
--mirai-ui-space-XL: 48px;
|
|
758
771
|
--mirai-ui-space-XXL: 64px;
|
|
759
772
|
|
|
760
|
-
/* layer */
|
|
761
|
-
--mirai-ui-layer-S: 0;
|
|
762
|
-
--mirai-ui-layer-M: 1;
|
|
763
|
-
--mirai-ui-layer-L: 10;
|
|
764
|
-
--mirai-ui-layer-XL: 100;
|
|
765
|
-
|
|
766
773
|
/* motion */
|
|
767
774
|
--mirai-ui-motion-collapse: 200ms;
|
|
768
775
|
--mirai-ui-motion-expand: 300ms;
|
|
@@ -772,8 +779,11 @@ Theme.shadeColors()
|
|
|
772
779
|
--mirai-ui-input-font-size: var(--mirai-ui-font-size-paragraph);
|
|
773
780
|
--mirai-ui-input-min-height: var(--mirai-ui-space-XL);
|
|
774
781
|
|
|
775
|
-
/*
|
|
782
|
+
/* border */
|
|
776
783
|
--mirai-ui-border-radius: 4px;
|
|
784
|
+
--mirai-ui-border-width: 1px;
|
|
785
|
+
|
|
786
|
+
/* shadow */
|
|
777
787
|
--mirai-ui-shadow: 0 0 var(--mirai-ui-space-XS) var(--mirai-ui-content-border);
|
|
778
788
|
```
|
|
779
789
|
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-button-background: var(--mirai-ui-accent);
|
|
3
|
-
--mirai-ui-button-busy-width: 0%;
|
|
4
|
-
--mirai-ui-button-busy-motion: calc(var(--mirai-ui-motion-expand) * 10);
|
|
5
|
-
--mirai-ui-button-color: var(--mirai-ui-base);
|
|
6
|
-
--mirai-ui-button-color-active: rgba(255, 255, 255, 0.2);
|
|
7
|
-
--mirai-ui-button-color-focus: var(--mirai-ui-content);
|
|
8
|
-
--mirai-ui-button-disabled-background: var(--mirai-ui-content-border);
|
|
9
|
-
--mirai-ui-button-disabled-color: var(--mirai-ui-content-light);
|
|
10
|
-
--mirai-ui-button-font: var(--mirai-ui-font);
|
|
11
|
-
--mirai-ui-button-font-weight: var(--mirai-ui-font-weight);
|
|
12
|
-
--mirai-ui-button-padding-y: var(--mirai-ui-space-S);
|
|
13
|
-
--mirai-ui-button-padding-x: var(--mirai-ui-space-L);
|
|
14
|
-
--mirai-ui-button-radius: var(--mirai-ui-border-radius);
|
|
15
|
-
--mirai-ui-button-secondary-background: var(--mirai-ui-base);
|
|
16
|
-
--mirai-ui-button-squared: calc(var(--mirai-ui-space-M) * 2);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
1
|
.button {
|
|
20
2
|
align-items: center;
|
|
21
3
|
background-color: var(--mirai-ui-button-background);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-calendar-caption-color: var(--mirai-ui-content-light);
|
|
3
|
-
--mirai-ui-calendar-cell: var(--mirai-ui-space-XL);
|
|
4
|
-
--mirai-ui-calendar-highlight-color: var(--mirai-ui-accent);
|
|
5
|
-
--mirai-ui-calendar-padding: var(--mirai-ui-space-XS);
|
|
6
|
-
--mirai-ui-calendar-range-background: var(--mirai-ui-content-background);
|
|
7
|
-
--mirai-ui-calendar-selected-background: var(--mirai-ui-accent);
|
|
8
|
-
--mirai-ui-calendar-selected-color: var(--mirai-ui-base);
|
|
9
|
-
--mirai-ui-calendar-weekday-color: var(--mirai-ui-content-light);
|
|
10
|
-
--mirai-ui-calendar-week-margin: 2px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
1
|
.month {
|
|
14
2
|
justify-content: flex-start;
|
|
15
3
|
padding: var(--mirai-ui-calendar-padding);
|
|
@@ -7,14 +7,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Story = void 0;
|
|
9
9
|
|
|
10
|
+
var _locale = require("@mirai/locale");
|
|
11
|
+
|
|
10
12
|
var React = _interopRequireWildcard(require("react"));
|
|
11
13
|
|
|
12
14
|
var _Calendar = require("./Calendar");
|
|
13
15
|
|
|
16
|
+
var _captions;
|
|
17
|
+
|
|
14
18
|
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); }
|
|
15
19
|
|
|
16
20
|
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; }
|
|
17
21
|
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
18
24
|
var _default = {
|
|
19
25
|
title: 'Components'
|
|
20
26
|
};
|
|
@@ -25,30 +31,95 @@ var Story = function Story(props) {
|
|
|
25
31
|
};
|
|
26
32
|
|
|
27
33
|
exports.Story = Story;
|
|
34
|
+
var format = 'DD/MM/YYYY';
|
|
35
|
+
var today = new Date();
|
|
28
36
|
Story.storyName = 'Calendar';
|
|
29
37
|
Story.args = {
|
|
30
|
-
captions: {},
|
|
31
|
-
|
|
38
|
+
captions: (_captions = {}, _defineProperty(_captions, (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 6, 'days'), {
|
|
39
|
+
format: format
|
|
40
|
+
}), '10.95$'), _defineProperty(_captions, (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 8, 'days'), {
|
|
41
|
+
format: format
|
|
42
|
+
}), '129510.95$'), _defineProperty(_captions, (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 16, 'days'), {
|
|
43
|
+
format: format
|
|
44
|
+
}), '10.95$'), _defineProperty(_captions, (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 18, 'days'), {
|
|
45
|
+
format: format
|
|
46
|
+
}), '9.95$'), _captions),
|
|
47
|
+
disabledDates: [(0, _locale.dateFormat)((0, _locale.dateCalc)(today, 20, 'days'), {
|
|
48
|
+
format: format
|
|
49
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 21, 'days'), {
|
|
50
|
+
format: format
|
|
51
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 22, 'days'), {
|
|
52
|
+
format: format
|
|
53
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 23, 'days'), {
|
|
54
|
+
format: format
|
|
55
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 24, 'days'), {
|
|
56
|
+
format: format
|
|
57
|
+
})],
|
|
32
58
|
disabledPast: true,
|
|
33
|
-
format:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
format: format,
|
|
60
|
+
from: '',
|
|
61
|
+
highlights: [(0, _locale.dateFormat)((0, _locale.dateCalc)(today, 6, 'days'), {
|
|
62
|
+
format: format
|
|
63
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 10, 'days'), {
|
|
64
|
+
format: format
|
|
65
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 12, 'days'), {
|
|
66
|
+
format: format
|
|
67
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 14, 'days'), {
|
|
68
|
+
format: format
|
|
69
|
+
}), (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 16, 'days'), {
|
|
70
|
+
format: format
|
|
71
|
+
})],
|
|
72
|
+
locale: 'es-ES',
|
|
73
|
+
months: 2,
|
|
39
74
|
range: true,
|
|
40
75
|
rangeMaxDays: 7,
|
|
41
|
-
rangeMinDays: 3
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
76
|
+
rangeMinDays: 3,
|
|
77
|
+
to: (0, _locale.dateFormat)((0, _locale.dateCalc)(today, 6, 'months')),
|
|
78
|
+
value: [],
|
|
79
|
+
onChange: function onChange() {
|
|
80
|
+
var _console;
|
|
81
|
+
|
|
82
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83
|
+
props[_key] = arguments[_key];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return (_console = console).log.apply(_console, ['<Calendar>::onChange'].concat(props));
|
|
87
|
+
},
|
|
88
|
+
onFocus: function onFocus() {
|
|
89
|
+
var _console2;
|
|
90
|
+
|
|
91
|
+
for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
92
|
+
props[_key2] = arguments[_key2];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return (_console2 = console).log.apply(_console2, ['<Calendar>::onFocus'].concat(props));
|
|
96
|
+
},
|
|
97
|
+
onNavigation: function onNavigation() {
|
|
98
|
+
var _console3;
|
|
99
|
+
|
|
100
|
+
for (var _len3 = arguments.length, props = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
101
|
+
props[_key3] = arguments[_key3];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return (_console3 = console).log.apply(_console3, ['<Calendar>::onNavigation'].concat(props));
|
|
105
|
+
},
|
|
106
|
+
onScroll: function onScroll() {
|
|
107
|
+
var _console4;
|
|
108
|
+
|
|
109
|
+
for (var _len4 = arguments.length, props = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
110
|
+
props[_key4] = arguments[_key4];
|
|
111
|
+
}
|
|
47
112
|
|
|
113
|
+
return (_console4 = console).log.apply(_console4, ['<Calendar>::onScroll'].concat(props));
|
|
114
|
+
}
|
|
48
115
|
};
|
|
49
|
-
Story.argTypes = {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
116
|
+
Story.argTypes = {
|
|
117
|
+
locale: {
|
|
118
|
+
options: ['es-ES', 'en-GB', 'ja-JP', 'it-IT', 'pt-PT'],
|
|
119
|
+
control: {
|
|
120
|
+
type: 'select'
|
|
121
|
+
},
|
|
122
|
+
defaultValue: 'es-ES'
|
|
123
|
+
}
|
|
53
124
|
};
|
|
54
125
|
//# sourceMappingURL=Calendar.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.stories.js","names":["title","Story","props","storyName","args","captions","disabledDates","disabledPast","
|
|
1
|
+
{"version":3,"file":"Calendar.stories.js","names":["title","Story","props","format","today","Date","storyName","args","captions","disabledDates","disabledPast","from","highlights","locale","months","range","rangeMaxDays","rangeMinDays","to","value","onChange","console","log","onFocus","onNavigation","onScroll","argTypes","options","control","type","defaultValue"],"sources":["../../../src/components/Calendar/Calendar.stories.jsx"],"sourcesContent":["import { dateCalc, dateFormat } from '@mirai/locale';\nimport * as React from 'react';\n\nimport { Calendar } from './Calendar';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Calendar {...props} />;\n\nconst format = 'DD/MM/YYYY';\nconst today = new Date();\n\nStory.storyName = 'Calendar';\n\nStory.args = {\n captions: {\n [dateFormat(dateCalc(today, 6, 'days'), { format })]: '10.95$',\n [dateFormat(dateCalc(today, 8, 'days'), { format })]: '129510.95$',\n [dateFormat(dateCalc(today, 16, 'days'), { format })]: '10.95$',\n [dateFormat(dateCalc(today, 18, 'days'), { format })]: '9.95$',\n },\n disabledDates: [\n dateFormat(dateCalc(today, 20, 'days'), { format }),\n dateFormat(dateCalc(today, 21, 'days'), { format }),\n dateFormat(dateCalc(today, 22, 'days'), { format }),\n dateFormat(dateCalc(today, 23, 'days'), { format }),\n dateFormat(dateCalc(today, 24, 'days'), { format }),\n ],\n disabledPast: true,\n format,\n from: '',\n highlights: [\n dateFormat(dateCalc(today, 6, 'days'), { format }),\n dateFormat(dateCalc(today, 10, 'days'), { format }),\n dateFormat(dateCalc(today, 12, 'days'), { format }),\n dateFormat(dateCalc(today, 14, 'days'), { format }),\n dateFormat(dateCalc(today, 16, 'days'), { format }),\n ],\n locale: 'es-ES',\n months: 2,\n range: true,\n rangeMaxDays: 7,\n rangeMinDays: 3,\n to: dateFormat(dateCalc(today, 6, 'months')),\n value: [],\n onChange: (...props) => console.log('<Calendar>::onChange', ...props),\n onFocus: (...props) => console.log('<Calendar>::onFocus', ...props),\n onNavigation: (...props) => console.log('<Calendar>::onNavigation', ...props),\n onScroll: (...props) => console.log('<Calendar>::onScroll', ...props),\n};\n\nStory.argTypes = {\n locale: {\n options: ['es-ES', 'en-GB', 'ja-JP', 'it-IT', 'pt-PT'],\n control: { type: 'select' },\n defaultValue: 'es-ES',\n },\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Story = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _ = require("../");
|
|
13
|
+
|
|
14
|
+
var _Form = require("./Form");
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components'
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
|
|
25
|
+
var Story = function Story(props) {
|
|
26
|
+
return /*#__PURE__*/React.createElement(_Form.Form, props, /*#__PURE__*/React.createElement(_.InputText, {
|
|
27
|
+
name: "username",
|
|
28
|
+
label: "username"
|
|
29
|
+
}), /*#__PURE__*/React.createElement(_.InputText, {
|
|
30
|
+
name: "password",
|
|
31
|
+
label: "password",
|
|
32
|
+
type: "password"
|
|
33
|
+
}), /*#__PURE__*/React.createElement(_.Button, {
|
|
34
|
+
wide: true
|
|
35
|
+
}, "Submit"));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.Story = Story;
|
|
39
|
+
Story.storyName = 'Form';
|
|
40
|
+
Story.args = {
|
|
41
|
+
debounce: 0,
|
|
42
|
+
schema: {},
|
|
43
|
+
showErrors: false,
|
|
44
|
+
validateOnMount: false
|
|
45
|
+
};
|
|
46
|
+
Story.argTypes = {
|
|
47
|
+
onBlur: {
|
|
48
|
+
action: 'onBlur'
|
|
49
|
+
},
|
|
50
|
+
onChange: {
|
|
51
|
+
action: 'onBlur'
|
|
52
|
+
},
|
|
53
|
+
onError: {
|
|
54
|
+
action: 'onError'
|
|
55
|
+
},
|
|
56
|
+
onFocus: {
|
|
57
|
+
action: 'onFocus'
|
|
58
|
+
},
|
|
59
|
+
onSubmit: {
|
|
60
|
+
action: 'onSubmit'
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=Form.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.stories.js","names":["title","Story","props","storyName","args","debounce","schema","showErrors","validateOnMount","argTypes","onBlur","action","onChange","onError","onFocus","onSubmit"],"sources":["../../../src/components/Form/Form.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Button, InputText } from '../';\nimport { Form } from './Form';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Form {...props}>\n <InputText name=\"username\" label=\"username\" />\n <InputText name=\"password\" label=\"password\" type=\"password\" />\n <Button wide>Submit</Button>\n </Form>\n);\n\nStory.storyName = 'Form';\n\nStory.args = {\n debounce: 0,\n schema: {},\n showErrors: false,\n validateOnMount: false,\n};\n\nStory.argTypes = {\n onBlur: { action: 'onBlur' },\n onChange: { action: 'onBlur' },\n onError: { action: 'onError' },\n onFocus: { action: 'onFocus' },\n onSubmit: { action: 'onSubmit' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBACnB,oBAAC,UAAD,EAAUA,KAAV,eACE,oBAAC,WAAD;IAAW,IAAI,EAAC,UAAhB;IAA2B,KAAK,EAAC;EAAjC,EADF,eAEE,oBAAC,WAAD;IAAW,IAAI,EAAC,UAAhB;IAA2B,KAAK,EAAC,UAAjC;IAA4C,IAAI,EAAC;EAAjD,EAFF,eAGE,oBAAC,QAAD;IAAQ,IAAI;EAAZ,YAHF,CADmB;AAAA,CAAd;;;AAQPD,KAAK,CAACE,SAAN,GAAkB,MAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,QAAQ,EAAE,CADC;EAEXC,MAAM,EAAE,EAFG;EAGXC,UAAU,EAAE,KAHD;EAIXC,eAAe,EAAE;AAJN,CAAb;AAOAP,KAAK,CAACQ,QAAN,GAAiB;EACfC,MAAM,EAAE;IAAEC,MAAM,EAAE;EAAV,CADO;EAEfC,QAAQ,EAAE;IAAED,MAAM,EAAE;EAAV,CAFK;EAGfE,OAAO,EAAE;IAAEF,MAAM,EAAE;EAAV,CAHM;EAIfG,OAAO,EAAE;IAAEH,MAAM,EAAE;EAAV,CAJM;EAKfI,QAAQ,EAAE;IAAEJ,MAAM,EAAE;EAAV;AALK,CAAjB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Story = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _InputDate = require("./InputDate");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var _default = {
|
|
19
|
+
title: 'Components'
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
|
|
23
|
+
var Story = function Story(props) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(_InputDate.InputDate, props);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Story = Story;
|
|
28
|
+
Story.storyName = 'InputDate';
|
|
29
|
+
Story.args = {
|
|
30
|
+
disabled: false,
|
|
31
|
+
error: false,
|
|
32
|
+
format: 'DD/MM/YYYY',
|
|
33
|
+
hint: 'hint',
|
|
34
|
+
label: 'label',
|
|
35
|
+
max: '10/04/2080',
|
|
36
|
+
min: '10/04/1980',
|
|
37
|
+
name: 'name',
|
|
38
|
+
required: false,
|
|
39
|
+
value: '06/05/2020',
|
|
40
|
+
onChange: function onChange() {
|
|
41
|
+
var _console;
|
|
42
|
+
|
|
43
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
+
props[_key] = arguments[_key];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return (_console = console).log.apply(_console, ['<InputDate>::onBlur'].concat(props));
|
|
48
|
+
},
|
|
49
|
+
onError: function onError() {
|
|
50
|
+
var _console2;
|
|
51
|
+
|
|
52
|
+
for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
53
|
+
props[_key2] = arguments[_key2];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (_console2 = console).log.apply(_console2, ['<InputDate>::onError'].concat(props));
|
|
57
|
+
},
|
|
58
|
+
onEnter: function onEnter() {
|
|
59
|
+
var _console3;
|
|
60
|
+
|
|
61
|
+
for (var _len3 = arguments.length, props = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
62
|
+
props[_key3] = arguments[_key3];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return (_console3 = console).log.apply(_console3, ['<InputDate>::onEnter'].concat(props));
|
|
66
|
+
},
|
|
67
|
+
onLeave: function onLeave() {
|
|
68
|
+
var _console4;
|
|
69
|
+
|
|
70
|
+
for (var _len4 = arguments.length, props = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
71
|
+
props[_key4] = arguments[_key4];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return (_console4 = console).log.apply(_console4, ['<InputDate>::onLeave'].concat(props));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
Story.argTypes = {};
|
|
78
|
+
//# sourceMappingURL=InputDate.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputDate.stories.js","names":["title","Story","props","storyName","args","disabled","error","format","hint","label","max","min","name","required","value","onChange","console","log","onError","onEnter","onLeave","argTypes"],"sources":["../../../src/components/InputDate/InputDate.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { InputDate } from './InputDate';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputDate {...props} />;\n\nStory.storyName = 'InputDate';\n\nStory.args = {\n disabled: false,\n error: false,\n format: 'DD/MM/YYYY',\n hint: 'hint',\n label: 'label',\n max: '10/04/2080',\n min: '10/04/1980',\n name: 'name',\n required: false,\n value: '06/05/2020',\n onChange: (...props) => console.log('<InputDate>::onBlur', ...props),\n onError: (...props) => console.log('<InputDate>::onError', ...props),\n onEnter: (...props) => console.log('<InputDate>::onEnter', ...props),\n onLeave: (...props) => console.log('<InputDate>::onLeave', ...props),\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,oBAAD,EAAeA,KAAf,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,WAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,QAAQ,EAAE,KADC;EAEXC,KAAK,EAAE,KAFI;EAGXC,MAAM,EAAE,YAHG;EAIXC,IAAI,EAAE,MAJK;EAKXC,KAAK,EAAE,OALI;EAMXC,GAAG,EAAE,YANM;EAOXC,GAAG,EAAE,YAPM;EAQXC,IAAI,EAAE,MARK;EASXC,QAAQ,EAAE,KATC;EAUXC,KAAK,EAAE,YAVI;EAWXC,QAAQ,EAAE;IAAA;;IAAA,kCAAIb,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,YAAAc,OAAO,EAACC,GAAR,kBAAY,qBAAZ,SAAsCf,KAAtC,EAAd;EAAA,CAXC;EAYXgB,OAAO,EAAE;IAAA;;IAAA,mCAAIhB,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,aAAAc,OAAO,EAACC,GAAR,mBAAY,sBAAZ,SAAuCf,KAAvC,EAAd;EAAA,CAZE;EAaXiB,OAAO,EAAE;IAAA;;IAAA,mCAAIjB,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,aAAAc,OAAO,EAACC,GAAR,mBAAY,sBAAZ,SAAuCf,KAAvC,EAAd;EAAA,CAbE;EAcXkB,OAAO,EAAE;IAAA;;IAAA,mCAAIlB,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,aAAAc,OAAO,EAACC,GAAR,mBAAY,sBAAZ,SAAuCf,KAAvC,EAAd;EAAA;AAdE,CAAb;AAiBAD,KAAK,CAACoB,QAAN,GAAiB,EAAjB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Story = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _InputNumber = require("./InputNumber");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var _default = {
|
|
19
|
+
title: 'Components'
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
|
|
23
|
+
var Story = function Story(props) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(_InputNumber.InputNumber, props);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Story = Story;
|
|
28
|
+
Story.storyName = 'InputNumber';
|
|
29
|
+
Story.args = {
|
|
30
|
+
disabled: false,
|
|
31
|
+
hint: 'hint',
|
|
32
|
+
label: 'label',
|
|
33
|
+
max: 8,
|
|
34
|
+
min: 1,
|
|
35
|
+
name: 'name',
|
|
36
|
+
rounded: false,
|
|
37
|
+
step: 1,
|
|
38
|
+
value: 1,
|
|
39
|
+
onChange: function onChange() {
|
|
40
|
+
var _console;
|
|
41
|
+
|
|
42
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
+
props[_key] = arguments[_key];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (_console = console).log.apply(_console, ['<InputNumber>::onChange'].concat(props));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Story.argTypes = {};
|
|
50
|
+
//# sourceMappingURL=InputNumber.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputNumber.stories.js","names":["title","Story","props","storyName","args","disabled","hint","label","max","min","name","rounded","step","value","onChange","console","log","argTypes"],"sources":["../../../src/components/InputNumber/InputNumber.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { InputNumber } from './InputNumber';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputNumber {...props} />;\n\nStory.storyName = 'InputNumber';\n\nStory.args = {\n disabled: false,\n hint: 'hint',\n label: 'label',\n max: 8,\n min: 1,\n name: 'name',\n rounded: false,\n step: 1,\n value: 1,\n onChange: (...props) => console.log('<InputNumber>::onChange', ...props),\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,wBAAD,EAAiBA,KAAjB,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,aAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,QAAQ,EAAE,KADC;EAEXC,IAAI,EAAE,MAFK;EAGXC,KAAK,EAAE,OAHI;EAIXC,GAAG,EAAE,CAJM;EAKXC,GAAG,EAAE,CALM;EAMXC,IAAI,EAAE,MANK;EAOXC,OAAO,EAAE,KAPE;EAQXC,IAAI,EAAE,CARK;EASXC,KAAK,EAAE,CATI;EAUXC,QAAQ,EAAE;IAAA;;IAAA,kCAAIZ,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,YAAAa,OAAO,EAACC,GAAR,kBAAY,yBAAZ,SAA0Cd,KAA1C,EAAd;EAAA;AAVC,CAAb;AAaAD,KAAK,CAACgB,QAAN,GAAiB,EAAjB"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-input-option-disabled: var(--mirai-ui-content-light);
|
|
3
|
-
--mirai-ui-input-option-label-margin: var(--mirai-ui-space-S);
|
|
4
|
-
--mirai-ui-input-option-padding-y: var(--mirai-ui-space-S);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
.inputOption {
|
|
8
2
|
align-items: center;
|
|
9
3
|
display: flex;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Story = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _InputOption = require("./InputOption");
|
|
13
|
+
|
|
14
|
+
var _InputOption2 = require("./InputOption.constants");
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components'
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
|
|
25
|
+
var Story = function Story(props) {
|
|
26
|
+
return /*#__PURE__*/React.createElement(_InputOption.InputOption, props);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.Story = Story;
|
|
30
|
+
Story.storyName = 'InputOption';
|
|
31
|
+
Story.args = {
|
|
32
|
+
checked: true,
|
|
33
|
+
disabled: false,
|
|
34
|
+
label: 'label',
|
|
35
|
+
name: 'name',
|
|
36
|
+
reverse: false,
|
|
37
|
+
type: 'checkbox',
|
|
38
|
+
value: 'value',
|
|
39
|
+
onChange: function onChange() {
|
|
40
|
+
var _console;
|
|
41
|
+
|
|
42
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
+
props[_key] = arguments[_key];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (_console = console).log.apply(_console, ['<InputOption>::onChange'].concat(props));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Story.argTypes = {
|
|
50
|
+
type: {
|
|
51
|
+
options: [_InputOption2.CHECKBOX, _InputOption2.RADIO, _InputOption2.SWITCH],
|
|
52
|
+
control: {
|
|
53
|
+
type: 'select'
|
|
54
|
+
},
|
|
55
|
+
defaultValue: _InputOption2.CHECKBOX
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=InputOption.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputOption.stories.js","names":["title","Story","props","storyName","args","checked","disabled","label","name","reverse","type","value","onChange","console","log","argTypes","options","CHECKBOX","RADIO","SWITCH","control","defaultValue"],"sources":["../../../src/components/InputOption/InputOption.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { InputOption } from './InputOption';\nimport { CHECKBOX, RADIO, SWITCH } from './InputOption.constants';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <InputOption {...props} />;\n\nStory.storyName = 'InputOption';\n\nStory.args = {\n checked: true,\n disabled: false,\n label: 'label',\n name: 'name',\n reverse: false,\n type: 'checkbox',\n value: 'value',\n onChange: (...props) => console.log('<InputOption>::onChange', ...props),\n};\n\nStory.argTypes = {\n type: {\n options: [CHECKBOX, RADIO, SWITCH],\n control: { type: 'select' },\n defaultValue: CHECKBOX,\n },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,wBAAD,EAAiBA,KAAjB,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,aAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,OAAO,EAAE,IADE;EAEXC,QAAQ,EAAE,KAFC;EAGXC,KAAK,EAAE,OAHI;EAIXC,IAAI,EAAE,MAJK;EAKXC,OAAO,EAAE,KALE;EAMXC,IAAI,EAAE,UANK;EAOXC,KAAK,EAAE,OAPI;EAQXC,QAAQ,EAAE;IAAA;;IAAA,kCAAIV,KAAJ;MAAIA,KAAJ;IAAA;;IAAA,OAAc,YAAAW,OAAO,EAACC,GAAR,kBAAY,yBAAZ,SAA0CZ,KAA1C,EAAd;EAAA;AARC,CAAb;AAWAD,KAAK,CAACc,QAAN,GAAiB;EACfL,IAAI,EAAE;IACJM,OAAO,EAAE,CAACC,sBAAD,EAAWC,mBAAX,EAAkBC,oBAAlB,CADL;IAEJC,OAAO,EAAE;MAAEV,IAAI,EAAE;IAAR,CAFL;IAGJW,YAAY,EAAEJ;EAHV;AADS,CAAjB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.Story = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _InputSelect = require("./InputSelect");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var _default = {
|
|
19
|
+
title: 'Components'
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
|
|
23
|
+
var Story = function Story(props) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(_InputSelect.InputSelect, props);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Story = Story;
|
|
28
|
+
Story.storyName = 'InputSelect';
|
|
29
|
+
Story.args = {
|
|
30
|
+
disabled: false,
|
|
31
|
+
error: false,
|
|
32
|
+
hint: 'hint',
|
|
33
|
+
label: 'label',
|
|
34
|
+
name: 'name',
|
|
35
|
+
options: ['one', 'two', 'three', 'four', 'five'],
|
|
36
|
+
value: 'two',
|
|
37
|
+
onChange: function onChange() {
|
|
38
|
+
var _console;
|
|
39
|
+
|
|
40
|
+
for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
|
+
props[_key] = arguments[_key];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (_console = console).log.apply(_console, ['<InputSelect>::onChange'].concat(props));
|
|
45
|
+
},
|
|
46
|
+
onEnter: function onEnter() {
|
|
47
|
+
var _console2;
|
|
48
|
+
|
|
49
|
+
for (var _len2 = arguments.length, props = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
50
|
+
props[_key2] = arguments[_key2];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (_console2 = console).log.apply(_console2, ['<InputSelect>::onEnter'].concat(props));
|
|
54
|
+
},
|
|
55
|
+
onLeave: function onLeave() {
|
|
56
|
+
var _console3;
|
|
57
|
+
|
|
58
|
+
for (var _len3 = arguments.length, props = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
59
|
+
props[_key3] = arguments[_key3];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return (_console3 = console).log.apply(_console3, ['<InputSelect>::onLeave'].concat(props));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
Story.argTypes = {};
|
|
66
|
+
//# sourceMappingURL=InputSelect.stories.js.map
|