@mirai/ui 1.0.63 → 1.0.65
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 +8 -1
- package/build/components/InputDate/InputDate.js +28 -12
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/InputDate.module.css +9 -16
- package/build/components/InputDate/InputDate.stories.js +11 -1
- package/build/components/InputDate/InputDate.stories.js.map +1 -1
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +148 -167
- package/build/components/InputNumber/InputNumber.module.css +6 -2
- package/build/components/InputOption/InputOption.js +1 -0
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +3 -3
- package/build/components/InputSelect/InputSelect.js +17 -7
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +217 -163
- package/build/components/InputText/InputText.js +13 -10
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +11 -11
- 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 +116 -88
- package/build/components/Menu/Menu.js +37 -16
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.module.css +3 -0
- package/build/components/Menu/Menu.stories.js +1 -0
- package/build/components/Menu/Menu.stories.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +35 -19
- package/build/components/Modal/Modal.js +5 -2
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/Modal.module.css +9 -20
- package/build/components/Modal/Modal.stories.js +1 -0
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +24 -12
- package/build/components/Notification/Notification.module.css +0 -13
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +6 -2
- package/build/hooks/useDevice.js +1 -1
- package/build/hooks/useDevice.js.map +1 -1
- package/build/primitives/Icon/Icon.constants.js +2 -2
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +6 -2
- package/build/theme/default.theme.css +20 -20
- package/package.json +1 -1
|
@@ -6,21 +6,7 @@ exports[`component:<Menu> inherit:className 1`] = `
|
|
|
6
6
|
</DocumentFragment>
|
|
7
7
|
`;
|
|
8
8
|
|
|
9
|
-
exports[`component:<Menu>
|
|
10
|
-
<DocumentFragment>
|
|
11
|
-
<span />
|
|
12
|
-
</DocumentFragment>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`component:<Menu> testID 1`] = `
|
|
16
|
-
<DocumentFragment>
|
|
17
|
-
<span
|
|
18
|
-
data-testid="mirai"
|
|
19
|
-
/>
|
|
20
|
-
</DocumentFragment>
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
exports[`component:<Menu> w/ Template 1`] = `
|
|
9
|
+
exports[`component:<Menu> prop:Template 1`] = `
|
|
24
10
|
<DocumentFragment>
|
|
25
11
|
<span>
|
|
26
12
|
<button
|
|
@@ -32,7 +18,7 @@ exports[`component:<Menu> w/ Template 1`] = `
|
|
|
32
18
|
</DocumentFragment>
|
|
33
19
|
`;
|
|
34
20
|
|
|
35
|
-
exports[`component:<Menu>
|
|
21
|
+
exports[`component:<Menu> prop:children 1`] = `
|
|
36
22
|
<DocumentFragment>
|
|
37
23
|
<span>
|
|
38
24
|
<button
|
|
@@ -44,7 +30,7 @@ exports[`component:<Menu> w/ children 1`] = `
|
|
|
44
30
|
</DocumentFragment>
|
|
45
31
|
`;
|
|
46
32
|
|
|
47
|
-
exports[`component:<Menu>
|
|
33
|
+
exports[`component:<Menu> prop:options & visible 1`] = `
|
|
48
34
|
<DocumentFragment>
|
|
49
35
|
<span>
|
|
50
36
|
<button
|
|
@@ -54,7 +40,7 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
54
40
|
</button>
|
|
55
41
|
</span>
|
|
56
42
|
<div
|
|
57
|
-
class="layer menu visible"
|
|
43
|
+
class="layer menu desktop visible"
|
|
58
44
|
style="left: 0px; top: 0px;"
|
|
59
45
|
>
|
|
60
46
|
<div
|
|
@@ -163,7 +149,19 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
163
149
|
</DocumentFragment>
|
|
164
150
|
`;
|
|
165
151
|
|
|
166
|
-
exports[`component:<Menu>
|
|
152
|
+
exports[`component:<Menu> prop:options 1`] = `
|
|
153
|
+
<DocumentFragment>
|
|
154
|
+
<span>
|
|
155
|
+
<button
|
|
156
|
+
class="pressable button"
|
|
157
|
+
>
|
|
158
|
+
Action
|
|
159
|
+
</button>
|
|
160
|
+
</span>
|
|
161
|
+
</DocumentFragment>
|
|
162
|
+
`;
|
|
163
|
+
|
|
164
|
+
exports[`component:<Menu> prop:title 1`] = `
|
|
167
165
|
<DocumentFragment>
|
|
168
166
|
<span>
|
|
169
167
|
<button
|
|
@@ -172,5 +170,23 @@ exports[`component:<Menu> w/ options 1`] = `
|
|
|
172
170
|
Action
|
|
173
171
|
</button>
|
|
174
172
|
</span>
|
|
173
|
+
<div
|
|
174
|
+
class="layer menu desktop visible"
|
|
175
|
+
style="left: 0px; top: 0px;"
|
|
176
|
+
/>
|
|
177
|
+
</DocumentFragment>
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
exports[`component:<Menu> renders 1`] = `
|
|
181
|
+
<DocumentFragment>
|
|
182
|
+
<span />
|
|
183
|
+
</DocumentFragment>
|
|
184
|
+
`;
|
|
185
|
+
|
|
186
|
+
exports[`component:<Menu> testID 1`] = `
|
|
187
|
+
<DocumentFragment>
|
|
188
|
+
<span
|
|
189
|
+
data-testid="mirai"
|
|
190
|
+
/>
|
|
175
191
|
</DocumentFragment>
|
|
176
192
|
`;
|
|
@@ -19,7 +19,7 @@ var _primitives = require("../../primitives");
|
|
|
19
19
|
|
|
20
20
|
var _ModalModule = _interopRequireDefault(require("./Modal.module.css"));
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "overflow", "portal", "title", "visible", "onBack", "onClose"];
|
|
22
|
+
var _excluded = ["children", "fit", "overflow", "portal", "title", "visible", "onBack", "onClose"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -31,6 +31,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
31
31
|
|
|
32
32
|
var Modal = function Modal(_ref) {
|
|
33
33
|
var children = _ref.children,
|
|
34
|
+
_ref$fit = _ref.fit,
|
|
35
|
+
fit = _ref$fit === void 0 ? false : _ref$fit,
|
|
34
36
|
_ref$overflow = _ref.overflow,
|
|
35
37
|
overflow = _ref$overflow === void 0 ? true : _ref$overflow,
|
|
36
38
|
_ref$portal = _ref.portal,
|
|
@@ -53,7 +55,7 @@ var Modal = function Modal(_ref) {
|
|
|
53
55
|
className: (0, _helpers.styles)(_ModalModule.default.container, overflow && _ModalModule.default.overflow, visible && _ModalModule.default.visible)
|
|
54
56
|
}, /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
55
57
|
fit: true,
|
|
56
|
-
className: (0, _helpers.styles)(_ModalModule.default.modal, visible && _ModalModule.default.visible, others.className)
|
|
58
|
+
className: (0, _helpers.styles)(_ModalModule.default.modal, !fit && _ModalModule.default.calcWidth, visible && _ModalModule.default.visible, others.className)
|
|
57
59
|
}), (title || onBack || onClose) && /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
58
60
|
row: true,
|
|
59
61
|
className: _ModalModule.default.header
|
|
@@ -78,6 +80,7 @@ var Modal = function Modal(_ref) {
|
|
|
78
80
|
exports.Modal = Modal;
|
|
79
81
|
Modal.propTypes = {
|
|
80
82
|
children: _propTypes.default.node,
|
|
83
|
+
fit: _propTypes.default.bool,
|
|
81
84
|
portal: _propTypes.default.bool,
|
|
82
85
|
overflow: _propTypes.default.bool,
|
|
83
86
|
title: _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["Modal","children","overflow","portal","title","visible","onBack","onClose","others","isDesktop","renderer","IS_JEST","jsx","ReactDOM","createPortal","testId","style","container","modal","className","header","undefined","ICON","LEFT","icon","left","right","CLOSE","EXPAND_MORE","document","body","propTypes","PropTypes","node","bool","string","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { IS_JEST, styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["Modal","children","fit","overflow","portal","title","visible","onBack","onClose","others","isDesktop","renderer","IS_JEST","jsx","ReactDOM","createPortal","testId","style","container","modal","calcWidth","className","header","undefined","ICON","LEFT","icon","left","right","CLOSE","EXPAND_MORE","document","body","propTypes","PropTypes","node","bool","string","func"],"sources":["../../../src/components/Modal/Modal.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { IS_JEST, styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Modal.module.css';\n\nconst Modal = ({\n children,\n fit = false,\n overflow = true,\n portal = false,\n title,\n visible,\n onBack,\n onClose,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const renderer = IS_JEST || !portal ? (jsx) => jsx : ReactDOM.createPortal;\n\n const { ['data-testid']: testId } = others;\n\n return renderer(\n <View row className={styles(style.container, overflow && style.overflow, visible && style.visible)}>\n <View\n {...others}\n fit\n className={styles(style.modal, !fit && style.calcWidth, visible && style.visible, others.className)}\n >\n {(title || onBack || onClose) && (\n <View row className={style.header}>\n {onBack && (\n <Pressable onPress={onBack} data-testid={testId ? `${testId}-button-back` : undefined}>\n <Icon value={ICON.LEFT} className={style.icon} />\n </Pressable>\n )}\n {title && (\n <Text headline className={styles(style.title, !onBack && style.left, !onClose && style.right)}>\n {title}\n </Text>\n )}\n {onClose && (\n <Pressable onPress={onClose} data-testid={testId ? `${testId}-button-close` : undefined}>\n <Icon value={isDesktop || title !== undefined ? ICON.CLOSE : ICON.EXPAND_MORE} className={style.icon} />\n </Pressable>\n )}\n </View>\n )}\n {children}\n </View>\n </View>,\n document.body,\n );\n};\n\nModal.propTypes = {\n children: PropTypes.node,\n fit: PropTypes.bool,\n portal: PropTypes.bool,\n overflow: PropTypes.bool,\n title: PropTypes.string,\n visible: PropTypes.bool,\n onBack: PropTypes.func,\n onClose: PropTypes.func,\n};\n\nexport { Modal };\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAUR;EAAA,IATJC,QASI,QATJA,QASI;EAAA,oBARJC,GAQI;EAAA,IARJA,GAQI,yBARE,KAQF;EAAA,yBAPJC,QAOI;EAAA,IAPJA,QAOI,8BAPO,IAOP;EAAA,uBANJC,MAMI;EAAA,IANJA,MAMI,4BANK,KAML;EAAA,IALJC,KAKI,QALJA,KAKI;EAAA,IAJJC,OAII,QAJJA,OAII;EAAA,IAHJC,MAGI,QAHJA,MAGI;EAAA,IAFJC,OAEI,QAFJA,OAEI;EAAA,IADDC,MACC;;EACJ,iBAAsB,uBAAtB;EAAA,IAAQC,SAAR,cAAQA,SAAR;;EAEA,IAAMC,QAAQ,GAAGC,oBAAW,CAACR,MAAZ,GAAqB,UAACS,GAAD;IAAA,OAASA,GAAT;EAAA,CAArB,GAAoCC,kBAASC,YAA9D;EAEA,IAAyBC,MAAzB,GAAoCP,MAApC,CAAS,aAAT;EAEA,OAAOE,QAAQ,eACb,6BAAC,gBAAD;IAAM,GAAG,MAAT;IAAU,SAAS,EAAE,qBAAOM,qBAAMC,SAAb,EAAwBf,QAAQ,IAAIc,qBAAMd,QAA1C,EAAoDG,OAAO,IAAIW,qBAAMX,OAArE;EAArB,gBACE,6BAAC,gBAAD,eACMG,MADN;IAEE,GAAG,MAFL;IAGE,SAAS,EAAE,qBAAOQ,qBAAME,KAAb,EAAoB,CAACjB,GAAD,IAAQe,qBAAMG,SAAlC,EAA6Cd,OAAO,IAAIW,qBAAMX,OAA9D,EAAuEG,MAAM,CAACY,SAA9E;EAHb,IAKG,CAAChB,KAAK,IAAIE,MAAT,IAAmBC,OAApB,kBACC,6BAAC,gBAAD;IAAM,GAAG,MAAT;IAAU,SAAS,EAAES,qBAAMK;EAA3B,GACGf,MAAM,iBACL,6BAAC,qBAAD;IAAW,OAAO,EAAEA,MAApB;IAA4B,eAAaS,MAAM,aAAMA,MAAN,oBAA6BO;EAA5E,gBACE,6BAAC,gBAAD;IAAM,KAAK,EAAEC,iBAAKC,IAAlB;IAAwB,SAAS,EAAER,qBAAMS;EAAzC,EADF,CAFJ,EAMGrB,KAAK,iBACJ,6BAAC,gBAAD;IAAM,QAAQ,MAAd;IAAe,SAAS,EAAE,qBAAOY,qBAAMZ,KAAb,EAAoB,CAACE,MAAD,IAAWU,qBAAMU,IAArC,EAA2C,CAACnB,OAAD,IAAYS,qBAAMW,KAA7D;EAA1B,GACGvB,KADH,CAPJ,EAWGG,OAAO,iBACN,6BAAC,qBAAD;IAAW,OAAO,EAAEA,OAApB;IAA6B,eAAaQ,MAAM,aAAMA,MAAN,qBAA8BO;EAA9E,gBACE,6BAAC,gBAAD;IAAM,KAAK,EAAEb,SAAS,IAAIL,KAAK,KAAKkB,SAAvB,GAAmCC,iBAAKK,KAAxC,GAAgDL,iBAAKM,WAAlE;IAA+E,SAAS,EAAEb,qBAAMS;EAAhG,EADF,CAZJ,CANJ,EAwBGzB,QAxBH,CADF,CADa,EA6Bb8B,QAAQ,CAACC,IA7BI,CAAf;AA+BD,CAhDD;;;AAkDAhC,KAAK,CAACiC,SAAN,GAAkB;EAChBhC,QAAQ,EAAEiC,mBAAUC,IADJ;EAEhBjC,GAAG,EAAEgC,mBAAUE,IAFC;EAGhBhC,MAAM,EAAE8B,mBAAUE,IAHF;EAIhBjC,QAAQ,EAAE+B,mBAAUE,IAJJ;EAKhB/B,KAAK,EAAE6B,mBAAUG,MALD;EAMhB/B,OAAO,EAAE4B,mBAAUE,IANH;EAOhB7B,MAAM,EAAE2B,mBAAUI,IAPF;EAQhB9B,OAAO,EAAE0B,mBAAUI;AARH,CAAlB"}
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
opacity: 1;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/* S */
|
|
65
|
+
@media only screen and (max-width: 430px) {
|
|
65
66
|
.container {
|
|
66
67
|
align-items: flex-end;
|
|
67
68
|
align-content: flex-end;
|
|
@@ -89,7 +90,8 @@
|
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
/* M */
|
|
94
|
+
@media only screen and (min-width: 431px) {
|
|
93
95
|
.container {
|
|
94
96
|
align-items: center;
|
|
95
97
|
}
|
|
@@ -99,10 +101,15 @@
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
.modal {
|
|
104
|
+
border-radius: var(--mirai-ui-modal-border-radius);
|
|
102
105
|
opacity: 0;
|
|
103
106
|
transform: scale(1.1);
|
|
104
107
|
}
|
|
105
108
|
|
|
109
|
+
.modal.calcWidth {
|
|
110
|
+
width: calc(var(--mirai-ui-breakpoint-content) / 3);
|
|
111
|
+
}
|
|
112
|
+
|
|
106
113
|
.modal.visible {
|
|
107
114
|
opacity: 1;
|
|
108
115
|
transform: scale(1);
|
|
@@ -112,21 +119,3 @@
|
|
|
112
119
|
align-self: flex-end;
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
|
-
|
|
116
|
-
@media only screen and (min-width: 600px) {
|
|
117
|
-
.modal {
|
|
118
|
-
border-radius: var(--mirai-ui-modal-border-radius);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@media only screen and (min-width: 600px) and (orientation: landscape) {
|
|
123
|
-
.modal {
|
|
124
|
-
min-width: 25vw;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
@media only screen and (min-width: 600px) and (orientation: portrait) {
|
|
129
|
-
.modal {
|
|
130
|
-
min-width: 40vw;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","storyName","args","overflow","portal","visible","argTypes","onBack","action","onClose"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Modal } from './Modal';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Modal {...props}>\n <span className=\"children\">children</span>\n </Modal>\n);\n\nStory.storyName = 'Modal';\n\nStory.args = {\n overflow: true,\n portal: false,\n title: 'title',\n visible: true,\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {\n onBack: { action: 'onBack' },\n onClose: { action: 'onClose' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBACnB,oBAAC,YAAD,EAAWA,KAAX,eACE;IAAM,SAAS,EAAC;EAAhB,cADF,CADmB;AAAA,CAAd;;;AAMPD,KAAK,CAACE,SAAN,GAAkB,OAAlB;AAEAF,KAAK,CAACG,IAAN;EACEC,
|
|
1
|
+
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","storyName","args","fit","overflow","portal","visible","argTypes","onBack","action","onClose"],"sources":["../../../src/components/Modal/Modal.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Modal } from './Modal';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Modal {...props}>\n <span className=\"children\">children</span>\n </Modal>\n);\n\nStory.storyName = 'Modal';\n\nStory.args = {\n fit: false,\n overflow: true,\n portal: false,\n title: 'title',\n visible: true,\n ['data-testid']: 'test-story',\n};\n\nStory.argTypes = {\n onBack: { action: 'onBack' },\n onClose: { action: 'onClose' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBACnB,oBAAC,YAAD,EAAWA,KAAX,eACE;IAAM,SAAS,EAAC;EAAhB,cADF,CADmB;AAAA,CAAd;;;AAMPD,KAAK,CAACE,SAAN,GAAkB,OAAlB;AAEAF,KAAK,CAACG,IAAN;EACEC,GAAG,EAAE,KADP;EAEEC,QAAQ,EAAE,IAFZ;EAGEC,MAAM,EAAE,KAHV;EAIEP,KAAK,EAAE,OAJT;EAKEQ,OAAO,EAAE;AALX,GAMG,aANH,EAMmB,YANnB;AASAP,KAAK,CAACQ,QAAN,GAAiB;EACfC,MAAM,EAAE;IAAEC,MAAM,EAAE;EAAV,CADO;EAEfC,OAAO,EAAE;IAAED,MAAM,EAAE;EAAV;AAFM,CAAjB"}
|
|
@@ -6,7 +6,7 @@ exports[`component:<Modal> Mobile environment prop:onClose 1`] = `
|
|
|
6
6
|
class="view row container overflow visible"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="view fit modal visible"
|
|
9
|
+
class="view fit modal calcWidth visible"
|
|
10
10
|
data-testid="mirai-onClose"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
@@ -51,7 +51,7 @@ exports[`component:<Modal> Mobile environment prop:visible 1`] = `
|
|
|
51
51
|
class="view row container overflow visible"
|
|
52
52
|
>
|
|
53
53
|
<div
|
|
54
|
-
class="view fit modal visible"
|
|
54
|
+
class="view fit modal calcWidth visible"
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
</DocumentFragment>
|
|
@@ -63,7 +63,7 @@ exports[`component:<Modal> inherit:className 1`] = `
|
|
|
63
63
|
class="view row container overflow"
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
66
|
-
class="view fit modal mirai"
|
|
66
|
+
class="view fit modal calcWidth mirai"
|
|
67
67
|
/>
|
|
68
68
|
</div>
|
|
69
69
|
</DocumentFragment>
|
|
@@ -75,7 +75,7 @@ exports[`component:<Modal> prop:children 1`] = `
|
|
|
75
75
|
class="view row container overflow"
|
|
76
76
|
>
|
|
77
77
|
<div
|
|
78
|
-
class="view fit modal"
|
|
78
|
+
class="view fit modal calcWidth"
|
|
79
79
|
>
|
|
80
80
|
<span>
|
|
81
81
|
children
|
|
@@ -85,13 +85,25 @@ exports[`component:<Modal> prop:children 1`] = `
|
|
|
85
85
|
</DocumentFragment>
|
|
86
86
|
`;
|
|
87
87
|
|
|
88
|
+
exports[`component:<Modal> prop:fit 1`] = `
|
|
89
|
+
<DocumentFragment>
|
|
90
|
+
<div
|
|
91
|
+
class="view row container overflow"
|
|
92
|
+
>
|
|
93
|
+
<div
|
|
94
|
+
class="view fit modal"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</DocumentFragment>
|
|
98
|
+
`;
|
|
99
|
+
|
|
88
100
|
exports[`component:<Modal> prop:onBack 1`] = `
|
|
89
101
|
<DocumentFragment>
|
|
90
102
|
<div
|
|
91
103
|
class="view row container overflow visible"
|
|
92
104
|
>
|
|
93
105
|
<div
|
|
94
|
-
class="view fit modal visible"
|
|
106
|
+
class="view fit modal calcWidth visible"
|
|
95
107
|
data-testid="mirai-onBack"
|
|
96
108
|
>
|
|
97
109
|
<div
|
|
@@ -135,7 +147,7 @@ exports[`component:<Modal> prop:onClose 1`] = `
|
|
|
135
147
|
class="view row container overflow visible"
|
|
136
148
|
>
|
|
137
149
|
<div
|
|
138
|
-
class="view fit modal visible"
|
|
150
|
+
class="view fit modal calcWidth visible"
|
|
139
151
|
data-testid="mirai-onClose"
|
|
140
152
|
>
|
|
141
153
|
<div
|
|
@@ -180,7 +192,7 @@ exports[`component:<Modal> prop:portal 1`] = `
|
|
|
180
192
|
class="view row container overflow"
|
|
181
193
|
>
|
|
182
194
|
<div
|
|
183
|
-
class="view fit modal"
|
|
195
|
+
class="view fit modal calcWidth"
|
|
184
196
|
/>
|
|
185
197
|
</div>
|
|
186
198
|
</DocumentFragment>
|
|
@@ -192,7 +204,7 @@ exports[`component:<Modal> prop:title 1`] = `
|
|
|
192
204
|
class="view row container overflow"
|
|
193
205
|
>
|
|
194
206
|
<div
|
|
195
|
-
class="view fit modal"
|
|
207
|
+
class="view fit modal calcWidth"
|
|
196
208
|
>
|
|
197
209
|
<div
|
|
198
210
|
class="view row header"
|
|
@@ -214,7 +226,7 @@ exports[`component:<Modal> prop:visible & prop:overflow (false) 1`] = `
|
|
|
214
226
|
class="view row container visible"
|
|
215
227
|
>
|
|
216
228
|
<div
|
|
217
|
-
class="view fit modal visible"
|
|
229
|
+
class="view fit modal calcWidth visible"
|
|
218
230
|
/>
|
|
219
231
|
</div>
|
|
220
232
|
</DocumentFragment>
|
|
@@ -226,7 +238,7 @@ exports[`component:<Modal> prop:visible 1`] = `
|
|
|
226
238
|
class="view row container overflow visible"
|
|
227
239
|
>
|
|
228
240
|
<div
|
|
229
|
-
class="view fit modal visible"
|
|
241
|
+
class="view fit modal calcWidth visible"
|
|
230
242
|
/>
|
|
231
243
|
</div>
|
|
232
244
|
</DocumentFragment>
|
|
@@ -238,7 +250,7 @@ exports[`component:<Modal> renders 1`] = `
|
|
|
238
250
|
class="view row container overflow"
|
|
239
251
|
>
|
|
240
252
|
<div
|
|
241
|
-
class="view fit modal"
|
|
253
|
+
class="view fit modal calcWidth"
|
|
242
254
|
/>
|
|
243
255
|
</div>
|
|
244
256
|
</DocumentFragment>
|
|
@@ -250,7 +262,7 @@ exports[`component:<Modal> testID 1`] = `
|
|
|
250
262
|
class="view row container overflow"
|
|
251
263
|
>
|
|
252
264
|
<div
|
|
253
|
-
class="view fit modal"
|
|
265
|
+
class="view fit modal calcWidth"
|
|
254
266
|
data-testid="mirai"
|
|
255
267
|
/>
|
|
256
268
|
</div>
|
|
@@ -57,22 +57,9 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.outlined .text {
|
|
60
|
-
color: var(--mirai-ui-info-dark);
|
|
61
60
|
flex: 1;
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
.outlined .text.error {
|
|
65
|
-
color: var(--mirai-ui-error-dark);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.outlined .text.success {
|
|
69
|
-
color: var(--mirai-ui-success-dark);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.outlined .text.warning {
|
|
73
|
-
color: var(--mirai-ui-warning-dark);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
63
|
.notification .icon {
|
|
77
64
|
margin-top: calc(calc(var(--mirai-ui-line-height-headline-3) - var(--mirai-ui-font-size-headline-3)) / 2);
|
|
78
65
|
}
|
|
@@ -53,7 +53,11 @@ exports[`component:<Notification> prop:error 1`] = `
|
|
|
53
53
|
xmlns="http://www.w3.org/2000/svg"
|
|
54
54
|
>
|
|
55
55
|
<path
|
|
56
|
-
d="
|
|
56
|
+
d="M0 0h24v24H0V0z"
|
|
57
|
+
fill="none"
|
|
58
|
+
/>
|
|
59
|
+
<path
|
|
60
|
+
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
57
61
|
/>
|
|
58
62
|
</svg>
|
|
59
63
|
</span>
|
|
@@ -284,7 +288,7 @@ exports[`component:<Notification> prop:warning 1`] = `
|
|
|
284
288
|
xmlns="http://www.w3.org/2000/svg"
|
|
285
289
|
>
|
|
286
290
|
<path
|
|
287
|
-
d="
|
|
291
|
+
d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
|
|
288
292
|
/>
|
|
289
293
|
</svg>
|
|
290
294
|
</span>
|
package/build/hooks/useDevice.js
CHANGED
|
@@ -45,7 +45,7 @@ var useDevice = function useDevice() {
|
|
|
45
45
|
}, []);
|
|
46
46
|
return (0, _react.useMemo)(function () {
|
|
47
47
|
var isLandscape = resolution.width >= resolution.height;
|
|
48
|
-
var isMobile = resolution.width
|
|
48
|
+
var isMobile = resolution.width <= 430;
|
|
49
49
|
var navigator = (0, _helpers.getNavigator)();
|
|
50
50
|
return _objectSpread(_objectSpread(_objectSpread({}, resolution), navigator), {}, {
|
|
51
51
|
isLandscape: isLandscape,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDevice.js","names":["useDevice","resolution","setResolution","handleResize","window","addEventListener","removeEventListener","isLandscape","width","height","isMobile","navigator","isPortrait","isDesktop"],"sources":["../../src/hooks/useDevice.js"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\n\nimport { getResolution, getNavigator } from './helpers';\n\nexport const useDevice = () => {\n const [resolution, setResolution] = useState(getResolution());\n\n useEffect(() => {\n const handleResize = () => setResolution(getResolution());\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n return useMemo(() => {\n const isLandscape = resolution.width >= resolution.height;\n const isMobile = resolution.width
|
|
1
|
+
{"version":3,"file":"useDevice.js","names":["useDevice","resolution","setResolution","handleResize","window","addEventListener","removeEventListener","isLandscape","width","height","isMobile","navigator","isPortrait","isDesktop"],"sources":["../../src/hooks/useDevice.js"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\n\nimport { getResolution, getNavigator } from './helpers';\n\nexport const useDevice = () => {\n const [resolution, setResolution] = useState(getResolution());\n\n useEffect(() => {\n const handleResize = () => setResolution(getResolution());\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n return useMemo(() => {\n const isLandscape = resolution.width >= resolution.height;\n const isMobile = resolution.width <= 430;\n const navigator = getNavigator();\n\n return {\n ...resolution,\n ...navigator,\n isLandscape,\n isPortrait: !isLandscape,\n isMobile,\n isDesktop: !isMobile,\n };\n }, [resolution]);\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EAC7B,gBAAoC,qBAAS,6BAAT,CAApC;EAAA;EAAA,IAAOC,UAAP;EAAA,IAAmBC,aAAnB;;EAEA,sBAAU,YAAM;IACd,IAAMC,YAAY,GAAG,SAAfA,YAAe;MAAA,OAAMD,aAAa,CAAC,6BAAD,CAAnB;IAAA,CAArB;;IAEAE,MAAM,CAACC,gBAAP,CAAwB,QAAxB,EAAkCF,YAAlC;IAEA,OAAO;MAAA,OAAMC,MAAM,CAACE,mBAAP,CAA2B,QAA3B,EAAqCH,YAArC,CAAN;IAAA,CAAP;EACD,CAND,EAMG,EANH;EAQA,OAAO,oBAAQ,YAAM;IACnB,IAAMI,WAAW,GAAGN,UAAU,CAACO,KAAX,IAAoBP,UAAU,CAACQ,MAAnD;IACA,IAAMC,QAAQ,GAAGT,UAAU,CAACO,KAAX,IAAoB,GAArC;IACA,IAAMG,SAAS,GAAG,4BAAlB;IAEA,qDACKV,UADL,GAEKU,SAFL;MAGEJ,WAAW,EAAXA,WAHF;MAIEK,UAAU,EAAE,CAACL,WAJf;MAKEG,QAAQ,EAARA,QALF;MAMEG,SAAS,EAAE,CAACH;IANd;EAQD,CAbM,EAaJ,CAACT,UAAD,CAbI,CAAP;AAcD,CAzBM"}
|
|
@@ -27,10 +27,10 @@ var ICON = {
|
|
|
27
27
|
// <Modal>
|
|
28
28
|
CLOSE: _md.MdOutlineClose,
|
|
29
29
|
// <Notification> & <InputText>
|
|
30
|
-
ERROR: _md.
|
|
30
|
+
ERROR: _md.MdErrorOutline,
|
|
31
31
|
INFO: _md.MdOutlineInfo,
|
|
32
32
|
SUCCESS: _md.MdOutlineCheckCircle,
|
|
33
|
-
WARNING: _md.
|
|
33
|
+
WARNING: _md.MdOutlineWarningAmber
|
|
34
34
|
};
|
|
35
35
|
exports.ICON = ICON;
|
|
36
36
|
//# sourceMappingURL=Icon.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.js","names":["ICON","LEFT","RIGHT","UP","DOWN","CHECK","ADD","REMOVE","EXPAND_LESS","EXPAND_MORE","EYE_OPEN","EYE_CLOSE","CLOSE","ERROR","INFO","SUCCESS","WARNING"],"sources":["../../../src/primitives/Icon/Icon.constants.js"],"sourcesContent":["import {\n // <Calendar>\n MdOutlineArrowBack as LEFT,\n MdOutlineArrowForward as RIGHT,\n MdOutlineArrowUpward as UP,\n MdOutlineArrowDownward as DOWN,\n // <InputOption>\n MdOutlineCheck as CHECK,\n // <InputNumber>\n MdOutlineAdd as ADD,\n MdOutlineRemove as REMOVE,\n // <InputSelect>\n MdOutlineExpandLess as EXPAND_LESS,\n MdOutlineExpandMore as EXPAND_MORE,\n // <InputText>\n MdOutlineVisibility as EYE_OPEN,\n MdOutlineVisibilityOff as EYE_CLOSE,\n // <Modal>\n MdOutlineClose as CLOSE,\n // <Notification> & <InputText>\n
|
|
1
|
+
{"version":3,"file":"Icon.constants.js","names":["ICON","LEFT","RIGHT","UP","DOWN","CHECK","ADD","REMOVE","EXPAND_LESS","EXPAND_MORE","EYE_OPEN","EYE_CLOSE","CLOSE","ERROR","INFO","SUCCESS","WARNING"],"sources":["../../../src/primitives/Icon/Icon.constants.js"],"sourcesContent":["import {\n // <Calendar>\n MdOutlineArrowBack as LEFT,\n MdOutlineArrowForward as RIGHT,\n MdOutlineArrowUpward as UP,\n MdOutlineArrowDownward as DOWN,\n // <InputOption>\n MdOutlineCheck as CHECK,\n // <InputNumber>\n MdOutlineAdd as ADD,\n MdOutlineRemove as REMOVE,\n // <InputSelect>\n MdOutlineExpandLess as EXPAND_LESS,\n MdOutlineExpandMore as EXPAND_MORE,\n // <InputText>\n MdOutlineVisibility as EYE_OPEN,\n MdOutlineVisibilityOff as EYE_CLOSE,\n // <Modal>\n MdOutlineClose as CLOSE,\n // <Notification> & <InputText>\n MdErrorOutline as ERROR,\n MdOutlineInfo as INFO,\n MdOutlineCheckCircle as SUCCESS,\n MdOutlineWarningAmber as WARNING,\n} from 'react-icons/md';\n\nexport const ICON = {\n // <Calendar>\n LEFT,\n RIGHT,\n UP,\n DOWN,\n // <Check>\n CHECK,\n // <InputOption>\n ADD,\n REMOVE,\n // <InputSelect>\n EXPAND_LESS,\n EXPAND_MORE,\n // <InputText>\n EYE_OPEN,\n EYE_CLOSE,\n // <Modal>\n CLOSE,\n // <Notification> & <InputText>\n ERROR,\n INFO,\n SUCCESS,\n WARNING,\n};\n"],"mappings":";;;;;;;AAAA;;AA0BO,IAAMA,IAAI,GAAG;EAClB;EACAC,IAAI,EAAJA,sBAFkB;EAGlBC,KAAK,EAALA,yBAHkB;EAIlBC,EAAE,EAAFA,wBAJkB;EAKlBC,IAAI,EAAJA,0BALkB;EAMlB;EACAC,KAAK,EAALA,kBAPkB;EAQlB;EACAC,GAAG,EAAHA,gBATkB;EAUlBC,MAAM,EAANA,mBAVkB;EAWlB;EACAC,WAAW,EAAXA,uBAZkB;EAalBC,WAAW,EAAXA,uBAbkB;EAclB;EACAC,QAAQ,EAARA,uBAfkB;EAgBlBC,SAAS,EAATA,0BAhBkB;EAiBlB;EACAC,KAAK,EAALA,kBAlBkB;EAmBlB;EACAC,KAAK,EAALA,kBApBkB;EAqBlBC,IAAI,EAAJA,iBArBkB;EAsBlBC,OAAO,EAAPA,wBAtBkB;EAuBlBC,OAAO,EAAPA;AAvBkB,CAAb"}
|
|
@@ -133,7 +133,11 @@ exports[`primitive:<Icon> prop:value prop:value (ERROR) 1`] = `
|
|
|
133
133
|
xmlns="http://www.w3.org/2000/svg"
|
|
134
134
|
>
|
|
135
135
|
<path
|
|
136
|
-
d="
|
|
136
|
+
d="M0 0h24v24H0V0z"
|
|
137
|
+
fill="none"
|
|
138
|
+
/>
|
|
139
|
+
<path
|
|
140
|
+
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
137
141
|
/>
|
|
138
142
|
</svg>
|
|
139
143
|
</span>
|
|
@@ -427,7 +431,7 @@ exports[`primitive:<Icon> prop:value prop:value (WARNING) 1`] = `
|
|
|
427
431
|
xmlns="http://www.w3.org/2000/svg"
|
|
428
432
|
>
|
|
429
433
|
<path
|
|
430
|
-
d="
|
|
434
|
+
d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
|
|
431
435
|
/>
|
|
432
436
|
</svg>
|
|
433
437
|
</span>
|
|
@@ -34,38 +34,38 @@
|
|
|
34
34
|
--mirai-ui-content: #484848;
|
|
35
35
|
--mirai-ui-content-background: #f6f6f6;
|
|
36
36
|
--mirai-ui-content-border: #e4e4e4;
|
|
37
|
-
--mirai-ui-content-dark: #202020;
|
|
38
37
|
--mirai-ui-content-light: #999999;
|
|
38
|
+
--mirai-ui-content-dark: #202020;
|
|
39
39
|
|
|
40
40
|
--mirai-ui-accent: #3978c5;
|
|
41
41
|
--mirai-ui-accent-background: #e9f1fc;
|
|
42
42
|
--mirai-ui-accent-border: #b0c9e8;
|
|
43
|
-
--mirai-ui-accent-dark: #224876;
|
|
44
43
|
--mirai-ui-accent-light: #88aedc;
|
|
44
|
+
--mirai-ui-accent-dark: #224876;
|
|
45
45
|
|
|
46
|
+
--mirai-ui-error: #cc003a;
|
|
46
47
|
--mirai-ui-error-background: #ffece5;
|
|
47
|
-
--mirai-ui-error-border: #
|
|
48
|
-
--mirai-ui-error-light: #
|
|
49
|
-
--mirai-ui-error: #
|
|
50
|
-
--mirai-ui-error-dark: #b71543;
|
|
48
|
+
--mirai-ui-error-border: #ff8a7f;
|
|
49
|
+
--mirai-ui-error-light: #ff5c4c;
|
|
50
|
+
--mirai-ui-error-dark: #99002b;
|
|
51
51
|
|
|
52
|
-
--mirai-ui-warning
|
|
53
|
-
--mirai-ui-warning-
|
|
54
|
-
--mirai-ui-warning-
|
|
55
|
-
--mirai-ui-warning: #
|
|
56
|
-
--mirai-ui-warning-dark: #
|
|
52
|
+
--mirai-ui-warning: #ad5a00;
|
|
53
|
+
--mirai-ui-warning-background: #fff3cc;
|
|
54
|
+
--mirai-ui-warning-border: #ffce66;
|
|
55
|
+
--mirai-ui-warning-light: #ffad00;
|
|
56
|
+
--mirai-ui-warning-dark: #804200;
|
|
57
57
|
|
|
58
|
+
--mirai-ui-success: #067949;
|
|
58
59
|
--mirai-ui-success-background: #e7fde7;
|
|
59
|
-
--mirai-ui-success-border: #
|
|
60
|
-
--mirai-ui-success-light: #
|
|
61
|
-
--mirai-ui-success: #
|
|
62
|
-
--mirai-ui-success-dark: #0e8151;
|
|
60
|
+
--mirai-ui-success-border: #77f18e;
|
|
61
|
+
--mirai-ui-success-light: #14be34;
|
|
62
|
+
--mirai-ui-success-dark: #04492c;
|
|
63
63
|
|
|
64
64
|
--mirai-ui-info-background: #e6f8ff;
|
|
65
|
-
--mirai-ui-info-border: #
|
|
66
|
-
--mirai-ui-info-light: #
|
|
67
|
-
--mirai-ui-info: #
|
|
68
|
-
--mirai-ui-info-dark: #
|
|
65
|
+
--mirai-ui-info-border: #6bc6fe;
|
|
66
|
+
--mirai-ui-info-light: #079ffd;
|
|
67
|
+
--mirai-ui-info: #005cb2;
|
|
68
|
+
--mirai-ui-info-dark: #003566;
|
|
69
69
|
|
|
70
70
|
/* spacing */
|
|
71
71
|
--mirai-ui-space-XS: 8px;
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
/* breakpoints */
|
|
79
79
|
--mirai-ui-breakpoint-S: 430px;
|
|
80
80
|
--mirai-ui-breakpoint-M: 768px;
|
|
81
|
-
|
|
81
|
+
--mirai-ui-breakpoint-content: 1280px;
|
|
82
82
|
|
|
83
83
|
/* motion */
|
|
84
84
|
--mirai-ui-motion-collapse: 200ms;
|