@mirai/ui 1.0.134 → 1.0.136
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 +38 -4
- package/build/components/InputDate/InputDate.js +1 -11
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/InputDate.stories.js +1 -0
- package/build/components/InputDate/InputDate.stories.js.map +1 -1
- package/build/components/InputNumber/InputNumber.js +5 -2
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/InputNumber.stories.js +1 -0
- package/build/components/InputNumber/InputNumber.stories.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +67 -0
- package/build/components/InputOption/InputOption.js +16 -6
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.stories.js +2 -0
- package/build/components/InputOption/InputOption.stories.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +60 -11
- package/build/components/InputPhone/InputPhone.js +6 -3
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/InputPhone.stories.js +1 -0
- package/build/components/InputPhone/InputPhone.stories.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +93 -1
- package/build/components/InputSelect/InputSelect.js +5 -2
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +1 -0
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +76 -1
- package/build/components/InputText/InputText.js +5 -2
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.stories.js +1 -0
- package/build/components/InputText/InputText.stories.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +30 -1
- package/build/components/Progress/Progress.js +40 -0
- package/build/components/Progress/Progress.js.map +1 -0
- package/build/components/Progress/Progress.module.css +37 -0
- package/build/components/Progress/Progress.stories.js +32 -0
- package/build/components/Progress/Progress.stories.js.map +1 -0
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +79 -0
- package/build/components/Progress/index.js +17 -0
- package/build/components/Progress/index.js.map +1 -0
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +8 -8
- package/build/primitives/Checkbox/Checkbox.js +1 -1
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.module.css +6 -0
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +8 -8
- package/build/primitives/Radio/Radio.js +2 -1
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.module.css +6 -0
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +7 -0
- package/build/theme/default.theme.css +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.progress {
|
|
2
|
+
background-color: var(--mirai-ui-progress-background);
|
|
3
|
+
height: 0;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
transition: height var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.progress.visible {
|
|
10
|
+
height: var(--mirai-ui-progress-height);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.value {
|
|
14
|
+
background-color: var(--mirai-ui-progress-color);
|
|
15
|
+
height: 100%;
|
|
16
|
+
transition: all var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
|
|
17
|
+
width: 0%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.value.indeterminate {
|
|
21
|
+
animation: mirai-progress-indeterminate var(--mirai-ui-progress-motion) infinite var(--mirai-ui-motion-easing)
|
|
22
|
+
alternate;
|
|
23
|
+
transform-origin: 0% 50%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes mirai-progress-indeterminate {
|
|
28
|
+
0% {
|
|
29
|
+
transform: translateX(0) scaleX(0);
|
|
30
|
+
}
|
|
31
|
+
50% {
|
|
32
|
+
transform: translateX(0) scaleX(1);
|
|
33
|
+
}
|
|
34
|
+
100% {
|
|
35
|
+
transform: translateX(100%) scaleX(0.5);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Story = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _ = require("../..");
|
|
9
|
+
var _Progress = require("./Progress");
|
|
10
|
+
var _Story$args;
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Components'
|
|
18
|
+
};
|
|
19
|
+
exports.default = _default;
|
|
20
|
+
var INSTANCES = Array.from(Array(3).keys());
|
|
21
|
+
var Story = function Story(props) {
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_Progress.Progress, props);
|
|
23
|
+
};
|
|
24
|
+
exports.Story = Story;
|
|
25
|
+
Story.storyName = 'Progress';
|
|
26
|
+
Story.args = (_Story$args = {
|
|
27
|
+
indeterminate: false,
|
|
28
|
+
value: 25,
|
|
29
|
+
visible: true
|
|
30
|
+
}, _defineProperty(_Story$args, 'data-testid', 'test-story'), _defineProperty(_Story$args, "style", {}), _Story$args);
|
|
31
|
+
Story.argTypes = {};
|
|
32
|
+
//# sourceMappingURL=Progress.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.stories.js","names":["title","INSTANCES","Array","from","keys","Story","props","storyName","args","indeterminate","value","visible","argTypes"],"sources":["../../../src/components/Progress/Progress.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Text, View } from '../..';\nimport { Progress } from './Progress';\n\nexport default { title: 'Components' };\n\nconst INSTANCES = Array.from(Array(3).keys());\n\nexport const Story = (props) => <Progress {...props} />;\n\nStory.storyName = 'Progress';\n\nStory.args = {\n indeterminate: false,\n value: 25,\n visible: true,\n // inherited properties\n ['data-testid']: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAEvB;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAEtC,IAAMC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACD,KAAK,CAAC,CAAC,CAAC,CAACE,IAAI,EAAE,CAAC;AAEtC,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBAAK,6BAAC,kBAAQ,EAAKA,KAAK,CAAI;AAAA;AAAC;AAExDD,KAAK,CAACE,SAAS,GAAG,UAAU;AAE5BF,KAAK,CAACG,IAAI;EACRC,aAAa,EAAE,KAAK;EACpBC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE;AAAI,gCAEZ,aAAa,EAAG,YAAY,yCACtB,CAAC,CAAC,eACV;AAEDN,KAAK,CAACO,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`component:<Progress> inherit:className 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="view progress mirai"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="view value"
|
|
10
|
+
style="width: 0%;"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</DocumentFragment>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
exports[`component:<Progress> prop:indeterminate 1`] = `
|
|
17
|
+
<DocumentFragment>
|
|
18
|
+
<div
|
|
19
|
+
class="view progress"
|
|
20
|
+
>
|
|
21
|
+
<div
|
|
22
|
+
class="view value indeterminate"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</DocumentFragment>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
exports[`component:<Progress> prop:value 1`] = `
|
|
29
|
+
<DocumentFragment>
|
|
30
|
+
<div
|
|
31
|
+
class="view progress"
|
|
32
|
+
>
|
|
33
|
+
<div
|
|
34
|
+
class="view value"
|
|
35
|
+
style="width: 50%;"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</DocumentFragment>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`component:<Progress> prop:visible 1`] = `
|
|
42
|
+
<DocumentFragment>
|
|
43
|
+
<div
|
|
44
|
+
class="view progress visible"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
class="view value"
|
|
48
|
+
style="width: 50%;"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</DocumentFragment>
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
exports[`component:<Progress> renders 1`] = `
|
|
55
|
+
<DocumentFragment>
|
|
56
|
+
<div
|
|
57
|
+
class="view progress"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
class="view value"
|
|
61
|
+
style="width: 0%;"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</DocumentFragment>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`component:<Progress> testID 1`] = `
|
|
68
|
+
<DocumentFragment>
|
|
69
|
+
<div
|
|
70
|
+
class="view progress"
|
|
71
|
+
data-testid="mirai"
|
|
72
|
+
>
|
|
73
|
+
<div
|
|
74
|
+
class="view value"
|
|
75
|
+
style="width: 0%;"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
</DocumentFragment>
|
|
79
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Progress = require("./Progress");
|
|
7
|
+
Object.keys(_Progress).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Progress[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _Progress[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Progress/index.js"],"sourcesContent":["export * from './Progress';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -2445,7 +2445,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
2445
2445
|
class="checkbox"
|
|
2446
2446
|
>
|
|
2447
2447
|
<input
|
|
2448
|
-
class=""
|
|
2448
|
+
class="input"
|
|
2449
2449
|
name="checkbox"
|
|
2450
2450
|
type="checkbox"
|
|
2451
2451
|
value=""
|
|
@@ -2778,7 +2778,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
2778
2778
|
class="checkbox"
|
|
2779
2779
|
>
|
|
2780
2780
|
<input
|
|
2781
|
-
class=""
|
|
2781
|
+
class="input"
|
|
2782
2782
|
name="checkbox"
|
|
2783
2783
|
type="checkbox"
|
|
2784
2784
|
value=""
|
|
@@ -2840,7 +2840,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
2840
2840
|
class="checkbox"
|
|
2841
2841
|
>
|
|
2842
2842
|
<input
|
|
2843
|
-
class=""
|
|
2843
|
+
class="input"
|
|
2844
2844
|
name="checkbox"
|
|
2845
2845
|
type="checkbox"
|
|
2846
2846
|
value=""
|
|
@@ -2902,7 +2902,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
2902
2902
|
class="checkbox"
|
|
2903
2903
|
>
|
|
2904
2904
|
<input
|
|
2905
|
-
class=""
|
|
2905
|
+
class="input"
|
|
2906
2906
|
name="checkbox"
|
|
2907
2907
|
type="checkbox"
|
|
2908
2908
|
value=""
|
|
@@ -2964,7 +2964,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
2964
2964
|
class="checkbox"
|
|
2965
2965
|
>
|
|
2966
2966
|
<input
|
|
2967
|
-
class=""
|
|
2967
|
+
class="input"
|
|
2968
2968
|
name="checkbox"
|
|
2969
2969
|
type="checkbox"
|
|
2970
2970
|
value=""
|
|
@@ -3030,7 +3030,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
3030
3030
|
class="checkbox"
|
|
3031
3031
|
>
|
|
3032
3032
|
<input
|
|
3033
|
-
class=""
|
|
3033
|
+
class="input"
|
|
3034
3034
|
name="checkbox"
|
|
3035
3035
|
type="checkbox"
|
|
3036
3036
|
value=""
|
|
@@ -3094,7 +3094,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
3094
3094
|
class="checkbox"
|
|
3095
3095
|
>
|
|
3096
3096
|
<input
|
|
3097
|
-
class=""
|
|
3097
|
+
class="input"
|
|
3098
3098
|
name="checkbox"
|
|
3099
3099
|
type="checkbox"
|
|
3100
3100
|
value=""
|
|
@@ -3156,7 +3156,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
3156
3156
|
class="checkbox"
|
|
3157
3157
|
>
|
|
3158
3158
|
<input
|
|
3159
|
-
class=""
|
|
3159
|
+
class="input"
|
|
3160
3160
|
name="checkbox"
|
|
3161
3161
|
type="checkbox"
|
|
3162
3162
|
value=""
|
|
@@ -38,7 +38,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
38
38
|
name: name,
|
|
39
39
|
type: "checkbox",
|
|
40
40
|
value: value,
|
|
41
|
-
className: (0, _helpers.styles)(checked && _CheckboxModule.default.checked),
|
|
41
|
+
className: (0, _helpers.styles)(checked && _CheckboxModule.default.checked, _CheckboxModule.default.input),
|
|
42
42
|
onChange: handleChange
|
|
43
43
|
}), children);
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["Checkbox","checked","children","disabled","name","value","onChange","others","handleChange","event","target","styles","style","checkbox","className","displayName","propTypes","PropTypes","bool","node","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Checkbox/Checkbox.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Checkbox.module.css';\n\nconst Checkbox = ({ checked = false, children, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n const {\n target: { checked },\n } = event;\n onChange(checked, event);\n };\n\n return (\n <div className={styles(style.checkbox, others.className)} style={others.style}>\n <input\n checked={checked}\n data-testid={others['data-testid']}\n disabled={disabled}\n name={name}\n type=\"checkbox\"\n value={value}\n className={styles(checked && style.checked)}\n onChange={handleChange}\n />\n {children}\n </div>\n );\n};\n\nCheckbox.displayName = 'Primitive:Checkbox';\n\nCheckbox.propTypes = {\n checked: PropTypes.bool,\n children: PropTypes.node,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Checkbox };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAA0C;AAAA;AAAA;AAAA;AAE1C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,OAAkG;EAAA,wBAA5FC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,IAAI,QAAJA,IAAI;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,EAAE;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAKC,MAAM;EACvG,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,KAAK,EAAK;IAC9B,IAAIN,QAAQ,EAAE;IAEd,IACYF,OAAO,GACfQ,KAAK,CADPC,MAAM,CAAIT,OAAO;IAEnBK,QAAQ,CAACL,OAAO,EAAEQ,KAAK,CAAC;EAC1B,CAAC;EAED,oBACE;IAAK,SAAS,EAAE,IAAAE,eAAM,EAACC,uBAAK,CAACC,QAAQ,EAAEN,MAAM,CAACO,SAAS,CAAE;IAAC,KAAK,EAAEP,MAAM,CAACK;EAAM,gBAC5E;IACE,OAAO,EAAEX,OAAQ;IACjB,eAAaM,MAAM,CAAC,aAAa,CAAE;IACnC,QAAQ,EAAEJ,QAAS;IACnB,IAAI,EAAEC,IAAK;IACX,IAAI,EAAC,UAAU;IACf,KAAK,EAAEC,KAAM;IACb,SAAS,EAAE,IAAAM,eAAM,EAACV,OAAO,IAAIW,uBAAK,CAACX,OAAO,CAAE;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["Checkbox","checked","children","disabled","name","value","onChange","others","handleChange","event","target","styles","style","checkbox","className","input","displayName","propTypes","PropTypes","bool","node","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Checkbox/Checkbox.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Checkbox.module.css';\n\nconst Checkbox = ({ checked = false, children, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n const {\n target: { checked },\n } = event;\n onChange(checked, event);\n };\n\n return (\n <div className={styles(style.checkbox, others.className)} style={others.style}>\n <input\n checked={checked}\n data-testid={others['data-testid']}\n disabled={disabled}\n name={name}\n type=\"checkbox\"\n value={value}\n className={styles(checked && style.checked, style.input)}\n onChange={handleChange}\n />\n {children}\n </div>\n );\n};\n\nCheckbox.displayName = 'Primitive:Checkbox';\n\nCheckbox.propTypes = {\n checked: PropTypes.bool,\n children: PropTypes.node,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Checkbox };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAA0C;AAAA;AAAA;AAAA;AAE1C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,OAAkG;EAAA,wBAA5FC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,IAAI,QAAJA,IAAI;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,EAAE;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAKC,MAAM;EACvG,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,KAAK,EAAK;IAC9B,IAAIN,QAAQ,EAAE;IAEd,IACYF,OAAO,GACfQ,KAAK,CADPC,MAAM,CAAIT,OAAO;IAEnBK,QAAQ,CAACL,OAAO,EAAEQ,KAAK,CAAC;EAC1B,CAAC;EAED,oBACE;IAAK,SAAS,EAAE,IAAAE,eAAM,EAACC,uBAAK,CAACC,QAAQ,EAAEN,MAAM,CAACO,SAAS,CAAE;IAAC,KAAK,EAAEP,MAAM,CAACK;EAAM,gBAC5E;IACE,OAAO,EAAEX,OAAQ;IACjB,eAAaM,MAAM,CAAC,aAAa,CAAE;IACnC,QAAQ,EAAEJ,QAAS;IACnB,IAAI,EAAEC,IAAK;IACX,IAAI,EAAC,UAAU;IACf,KAAK,EAAEC,KAAM;IACb,SAAS,EAAE,IAAAM,eAAM,EAACV,OAAO,IAAIW,uBAAK,CAACX,OAAO,EAAEW,uBAAK,CAACG,KAAK,CAAE;IACzD,QAAQ,EAAEP;EAAa,EACvB,EACDN,QAAQ,CACL;AAEV,CAAC;AAAC;AAEFF,QAAQ,CAACgB,WAAW,GAAG,oBAAoB;AAE3ChB,QAAQ,CAACiB,SAAS,GAAG;EACnBhB,OAAO,EAAEiB,kBAAS,CAACC,IAAI;EACvBjB,QAAQ,EAAEgB,kBAAS,CAACE,IAAI;EACxBjB,QAAQ,EAAEe,kBAAS,CAACC,IAAI;EACxBf,IAAI,EAAEc,kBAAS,CAACG,MAAM,CAACC,UAAU;EACjCjB,KAAK,EAAEa,kBAAS,CAACK,SAAS,CAAC,CAACL,kBAAS,CAACG,MAAM,EAAEH,kBAAS,CAACC,IAAI,CAAC,CAAC;EAC9Db,QAAQ,EAAEY,kBAAS,CAACM;AACtB,CAAC"}
|
|
@@ -6,7 +6,7 @@ exports[`primitive:<Checkbox> inherit:className 1`] = `
|
|
|
6
6
|
class="checkbox mirai"
|
|
7
7
|
>
|
|
8
8
|
<input
|
|
9
|
-
class=""
|
|
9
|
+
class="input"
|
|
10
10
|
name="name"
|
|
11
11
|
type="checkbox"
|
|
12
12
|
value=""
|
|
@@ -22,7 +22,7 @@ exports[`primitive:<Checkbox> prop:checked && disabled 1`] = `
|
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
checked=""
|
|
25
|
-
class="checked"
|
|
25
|
+
class="checked input"
|
|
26
26
|
disabled=""
|
|
27
27
|
name="name"
|
|
28
28
|
type="checkbox"
|
|
@@ -39,7 +39,7 @@ exports[`primitive:<Checkbox> prop:checked 1`] = `
|
|
|
39
39
|
>
|
|
40
40
|
<input
|
|
41
41
|
checked=""
|
|
42
|
-
class="checked"
|
|
42
|
+
class="checked input"
|
|
43
43
|
name="name"
|
|
44
44
|
type="checkbox"
|
|
45
45
|
value=""
|
|
@@ -54,7 +54,7 @@ exports[`primitive:<Checkbox> prop:children 1`] = `
|
|
|
54
54
|
class="checkbox"
|
|
55
55
|
>
|
|
56
56
|
<input
|
|
57
|
-
class=""
|
|
57
|
+
class="input"
|
|
58
58
|
name="name"
|
|
59
59
|
type="checkbox"
|
|
60
60
|
value=""
|
|
@@ -70,7 +70,7 @@ exports[`primitive:<Checkbox> prop:disabled 1`] = `
|
|
|
70
70
|
class="checkbox"
|
|
71
71
|
>
|
|
72
72
|
<input
|
|
73
|
-
class=""
|
|
73
|
+
class="input"
|
|
74
74
|
disabled=""
|
|
75
75
|
name="name"
|
|
76
76
|
type="checkbox"
|
|
@@ -86,7 +86,7 @@ exports[`primitive:<Checkbox> prop:value 1`] = `
|
|
|
86
86
|
class="checkbox"
|
|
87
87
|
>
|
|
88
88
|
<input
|
|
89
|
-
class=""
|
|
89
|
+
class="input"
|
|
90
90
|
name="name"
|
|
91
91
|
type="checkbox"
|
|
92
92
|
value="value"
|
|
@@ -101,7 +101,7 @@ exports[`primitive:<Checkbox> render 1`] = `
|
|
|
101
101
|
class="checkbox"
|
|
102
102
|
>
|
|
103
103
|
<input
|
|
104
|
-
class=""
|
|
104
|
+
class="input"
|
|
105
105
|
name="name"
|
|
106
106
|
type="checkbox"
|
|
107
107
|
value=""
|
|
@@ -116,7 +116,7 @@ exports[`primitive:<Checkbox> testID 1`] = `
|
|
|
116
116
|
class="checkbox"
|
|
117
117
|
>
|
|
118
118
|
<input
|
|
119
|
-
class=""
|
|
119
|
+
class="input"
|
|
120
120
|
data-testid="mirai"
|
|
121
121
|
name="name"
|
|
122
122
|
type="checkbox"
|
|
@@ -36,7 +36,8 @@ var Radio = function Radio(_ref) {
|
|
|
36
36
|
name: name,
|
|
37
37
|
type: "radio",
|
|
38
38
|
value: value,
|
|
39
|
-
onChange: handleChange
|
|
39
|
+
onChange: handleChange,
|
|
40
|
+
className: _RadioModule.default.input
|
|
40
41
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
41
42
|
className: _RadioModule.default.checkmark
|
|
42
43
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":["Radio","checked","disabled","name","value","onChange","others","handleChange","event","styles","style","radio","className","checkmark","displayName","propTypes","PropTypes","bool","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Radio/Radio.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Radio.module.css';\n\nconst Radio = ({ checked = false, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n onChange(value, event);\n };\n\n return (\n <div className={styles(style.radio, others.className)} style={others.style}>\n <input\n checked={checked}\n data-testid={others['data-testid']}\n disabled={disabled}\n name={name}\n type=\"radio\"\n value={value}\n onChange={handleChange}\n />\n <span className={style.checkmark} />\n </div>\n );\n};\n\nRadio.displayName = 'Primitive:Radio';\n\nRadio.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Radio };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAAuC;AAAA;AAAA;AAAA;AAEvC,IAAMA,KAAK,GAAG,SAARA,KAAK,OAAwF;EAAA,wBAAlFC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,IAAI,QAAJA,IAAI;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,EAAE;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAKC,MAAM;EAC1F,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,KAAK,EAAK;IAC9B,IAAIN,QAAQ,EAAE;IAEdG,QAAQ,CAACD,KAAK,EAAEI,KAAK,CAAC;EACxB,CAAC;EAED,oBACE;IAAK,SAAS,EAAE,IAAAC,eAAM,EAACC,oBAAK,CAACC,KAAK,EAAEL,MAAM,CAACM,SAAS,CAAE;IAAC,KAAK,EAAEN,MAAM,CAACI;EAAM,gBACzE;IACE,OAAO,EAAET,OAAQ;IACjB,eAAaK,MAAM,CAAC,aAAa,CAAE;IACnC,QAAQ,EAAEJ,QAAS;IACnB,IAAI,EAAEC,IAAK;IACX,IAAI,EAAC,OAAO;IACZ,KAAK,EAAEC,KAAM;IACb,QAAQ,EAAEG;
|
|
1
|
+
{"version":3,"file":"Radio.js","names":["Radio","checked","disabled","name","value","onChange","others","handleChange","event","styles","style","radio","className","input","checkmark","displayName","propTypes","PropTypes","bool","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Radio/Radio.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Radio.module.css';\n\nconst Radio = ({ checked = false, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n onChange(value, event);\n };\n\n return (\n <div className={styles(style.radio, others.className)} style={others.style}>\n <input\n checked={checked}\n data-testid={others['data-testid']}\n disabled={disabled}\n name={name}\n type=\"radio\"\n value={value}\n onChange={handleChange}\n className={style.input}\n />\n <span className={style.checkmark} />\n </div>\n );\n};\n\nRadio.displayName = 'Primitive:Radio';\n\nRadio.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Radio };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAAuC;AAAA;AAAA;AAAA;AAEvC,IAAMA,KAAK,GAAG,SAARA,KAAK,OAAwF;EAAA,wBAAlFC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,IAAI,QAAJA,IAAI;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,EAAE;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,YAAM,CAAC,CAAC;IAAKC,MAAM;EAC1F,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,KAAK,EAAK;IAC9B,IAAIN,QAAQ,EAAE;IAEdG,QAAQ,CAACD,KAAK,EAAEI,KAAK,CAAC;EACxB,CAAC;EAED,oBACE;IAAK,SAAS,EAAE,IAAAC,eAAM,EAACC,oBAAK,CAACC,KAAK,EAAEL,MAAM,CAACM,SAAS,CAAE;IAAC,KAAK,EAAEN,MAAM,CAACI;EAAM,gBACzE;IACE,OAAO,EAAET,OAAQ;IACjB,eAAaK,MAAM,CAAC,aAAa,CAAE;IACnC,QAAQ,EAAEJ,QAAS;IACnB,IAAI,EAAEC,IAAK;IACX,IAAI,EAAC,OAAO;IACZ,KAAK,EAAEC,KAAM;IACb,QAAQ,EAAEG,YAAa;IACvB,SAAS,EAAEG,oBAAK,CAACG;EAAM,EACvB,eACF;IAAM,SAAS,EAAEH,oBAAK,CAACI;EAAU,EAAG,CAChC;AAEV,CAAC;AAAC;AAEFd,KAAK,CAACe,WAAW,GAAG,iBAAiB;AAErCf,KAAK,CAACgB,SAAS,GAAG;EAChBf,OAAO,EAAEgB,kBAAS,CAACC,IAAI;EACvBhB,QAAQ,EAAEe,kBAAS,CAACC,IAAI;EACxBf,IAAI,EAAEc,kBAAS,CAACE,MAAM,CAACC,UAAU;EACjChB,KAAK,EAAEa,kBAAS,CAACI,SAAS,CAAC,CAACJ,kBAAS,CAACE,MAAM,EAAEF,kBAAS,CAACC,IAAI,CAAC,CAAC;EAC9Db,QAAQ,EAAEY,kBAAS,CAACK;AACtB,CAAC"}
|
|
@@ -6,6 +6,7 @@ exports[`primitive:<Radio> inherit:className 1`] = `
|
|
|
6
6
|
class="radio mirai"
|
|
7
7
|
>
|
|
8
8
|
<input
|
|
9
|
+
class="input"
|
|
9
10
|
name="name"
|
|
10
11
|
type="radio"
|
|
11
12
|
value=""
|
|
@@ -24,6 +25,7 @@ exports[`primitive:<Radio> prop:checked && disabled 1`] = `
|
|
|
24
25
|
>
|
|
25
26
|
<input
|
|
26
27
|
checked=""
|
|
28
|
+
class="input"
|
|
27
29
|
disabled=""
|
|
28
30
|
name="name"
|
|
29
31
|
type="radio"
|
|
@@ -43,6 +45,7 @@ exports[`primitive:<Radio> prop:checked 1`] = `
|
|
|
43
45
|
>
|
|
44
46
|
<input
|
|
45
47
|
checked=""
|
|
48
|
+
class="input"
|
|
46
49
|
name="name"
|
|
47
50
|
type="radio"
|
|
48
51
|
value=""
|
|
@@ -60,6 +63,7 @@ exports[`primitive:<Radio> prop:disabled 1`] = `
|
|
|
60
63
|
class="radio"
|
|
61
64
|
>
|
|
62
65
|
<input
|
|
66
|
+
class="input"
|
|
63
67
|
disabled=""
|
|
64
68
|
name="name"
|
|
65
69
|
type="radio"
|
|
@@ -78,6 +82,7 @@ exports[`primitive:<Radio> prop:value 1`] = `
|
|
|
78
82
|
class="radio"
|
|
79
83
|
>
|
|
80
84
|
<input
|
|
85
|
+
class="input"
|
|
81
86
|
name="name"
|
|
82
87
|
type="radio"
|
|
83
88
|
value="value"
|
|
@@ -95,6 +100,7 @@ exports[`primitive:<Radio> render 1`] = `
|
|
|
95
100
|
class="radio"
|
|
96
101
|
>
|
|
97
102
|
<input
|
|
103
|
+
class="input"
|
|
98
104
|
name="name"
|
|
99
105
|
type="radio"
|
|
100
106
|
value=""
|
|
@@ -112,6 +118,7 @@ exports[`primitive:<Radio> testID 1`] = `
|
|
|
112
118
|
class="radio"
|
|
113
119
|
>
|
|
114
120
|
<input
|
|
121
|
+
class="input"
|
|
115
122
|
data-testid="mirai"
|
|
116
123
|
name="name"
|
|
117
124
|
type="radio"
|
|
@@ -243,6 +243,12 @@
|
|
|
243
243
|
--mirai-ui-notification-padding-large: var(--mirai-ui-space-M);
|
|
244
244
|
--mirai-ui-notification-padding-small: var(--mirai-ui-space-XS);
|
|
245
245
|
|
|
246
|
+
/* Progress */
|
|
247
|
+
--mirai-ui-progress-background: var(--mirai-ui-content-background);
|
|
248
|
+
--mirai-ui-progress-color: var(--mirai-ui-accent);
|
|
249
|
+
--mirai-ui-progress-height: var(--mirai-ui-space-XS);
|
|
250
|
+
--mirai-ui-progress-motion: calc(var(--mirai-ui-motion-expand) * 3);
|
|
251
|
+
|
|
246
252
|
/* Table */
|
|
247
253
|
--mirai-ui-table-background: var(--mirai-ui-base);
|
|
248
254
|
--mirai-ui-table-border-color: var(--mirai-ui-content-border);
|