@mirai/ui 1.0.55 → 1.0.57
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.js +1 -0
- package/build/components/InputDate/InputDate.js.map +1 -1
- 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.js +11 -3
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +66 -0
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -0
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +108 -0
- package/build/components/InputText/InputText.js +19 -4
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +9 -11
- package/build/components/InputText/InputText.stories.js +100 -0
- package/build/components/InputText/InputText.stories.js.map +1 -0
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +141 -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.js +5 -1
- package/build/components/Notification/Notification.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/helpers/getIconName.js +18 -0
- package/build/helpers/getIconName.js.map +1 -0
- package/build/helpers/index.js +13 -0
- package/build/helpers/index.js.map +1 -1
- 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 +164 -16
- package/package.json +4 -3
|
@@ -53,6 +53,27 @@ exports[`component:<InputText> prop:error 1`] = `
|
|
|
53
53
|
type="text"
|
|
54
54
|
value=""
|
|
55
55
|
/>
|
|
56
|
+
<span
|
|
57
|
+
class="icon paragraph icon right error"
|
|
58
|
+
>
|
|
59
|
+
<svg
|
|
60
|
+
fill="currentColor"
|
|
61
|
+
height="1em"
|
|
62
|
+
stroke="currentColor"
|
|
63
|
+
stroke-width="0"
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
width="1em"
|
|
66
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
+
>
|
|
68
|
+
<path
|
|
69
|
+
d="M0 0h24v24H0z"
|
|
70
|
+
fill="none"
|
|
71
|
+
/>
|
|
72
|
+
<path
|
|
73
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
</span>
|
|
56
77
|
</div>
|
|
57
78
|
</div>
|
|
58
79
|
</DocumentFragment>
|
|
@@ -167,6 +188,86 @@ exports[`component:<InputText> prop:multiLine 1`] = `
|
|
|
167
188
|
</DocumentFragment>
|
|
168
189
|
`;
|
|
169
190
|
|
|
191
|
+
exports[`component:<InputText> prop:showState (false) 1`] = `
|
|
192
|
+
<DocumentFragment>
|
|
193
|
+
<div
|
|
194
|
+
class="view inputContainer"
|
|
195
|
+
>
|
|
196
|
+
<div
|
|
197
|
+
class="view row inputBorder error"
|
|
198
|
+
>
|
|
199
|
+
<input
|
|
200
|
+
class="input input"
|
|
201
|
+
name="name"
|
|
202
|
+
type="text"
|
|
203
|
+
value=""
|
|
204
|
+
/>
|
|
205
|
+
<span
|
|
206
|
+
class="icon paragraph icon right error"
|
|
207
|
+
>
|
|
208
|
+
<svg
|
|
209
|
+
fill="currentColor"
|
|
210
|
+
height="1em"
|
|
211
|
+
stroke="currentColor"
|
|
212
|
+
stroke-width="0"
|
|
213
|
+
viewBox="0 0 24 24"
|
|
214
|
+
width="1em"
|
|
215
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
216
|
+
>
|
|
217
|
+
<path
|
|
218
|
+
d="M0 0h24v24H0z"
|
|
219
|
+
fill="none"
|
|
220
|
+
/>
|
|
221
|
+
<path
|
|
222
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
223
|
+
/>
|
|
224
|
+
</svg>
|
|
225
|
+
</span>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</DocumentFragment>
|
|
229
|
+
`;
|
|
230
|
+
|
|
231
|
+
exports[`component:<InputText> prop:success 1`] = `
|
|
232
|
+
<DocumentFragment>
|
|
233
|
+
<div
|
|
234
|
+
class="view inputContainer"
|
|
235
|
+
>
|
|
236
|
+
<div
|
|
237
|
+
class="view row inputBorder"
|
|
238
|
+
>
|
|
239
|
+
<input
|
|
240
|
+
class="input input"
|
|
241
|
+
name="name"
|
|
242
|
+
type="text"
|
|
243
|
+
value=""
|
|
244
|
+
/>
|
|
245
|
+
<span
|
|
246
|
+
class="icon paragraph icon right success"
|
|
247
|
+
>
|
|
248
|
+
<svg
|
|
249
|
+
fill="currentColor"
|
|
250
|
+
height="1em"
|
|
251
|
+
stroke="currentColor"
|
|
252
|
+
stroke-width="0"
|
|
253
|
+
viewBox="0 0 24 24"
|
|
254
|
+
width="1em"
|
|
255
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
256
|
+
>
|
|
257
|
+
<path
|
|
258
|
+
d="M0 0h24v24H0z"
|
|
259
|
+
fill="none"
|
|
260
|
+
/>
|
|
261
|
+
<path
|
|
262
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
263
|
+
/>
|
|
264
|
+
</svg>
|
|
265
|
+
</span>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</DocumentFragment>
|
|
269
|
+
`;
|
|
270
|
+
|
|
170
271
|
exports[`component:<InputText> prop:type 1`] = `
|
|
171
272
|
<DocumentFragment>
|
|
172
273
|
<div
|
|
@@ -217,6 +318,46 @@ exports[`component:<InputText> prop:type 1`] = `
|
|
|
217
318
|
</DocumentFragment>
|
|
218
319
|
`;
|
|
219
320
|
|
|
321
|
+
exports[`component:<InputText> prop:warning 1`] = `
|
|
322
|
+
<DocumentFragment>
|
|
323
|
+
<div
|
|
324
|
+
class="view inputContainer"
|
|
325
|
+
>
|
|
326
|
+
<div
|
|
327
|
+
class="view row inputBorder"
|
|
328
|
+
>
|
|
329
|
+
<input
|
|
330
|
+
class="input input"
|
|
331
|
+
name="name"
|
|
332
|
+
type="text"
|
|
333
|
+
value=""
|
|
334
|
+
/>
|
|
335
|
+
<span
|
|
336
|
+
class="icon paragraph icon right warning"
|
|
337
|
+
>
|
|
338
|
+
<svg
|
|
339
|
+
fill="currentColor"
|
|
340
|
+
height="1em"
|
|
341
|
+
stroke="currentColor"
|
|
342
|
+
stroke-width="0"
|
|
343
|
+
viewBox="0 0 24 24"
|
|
344
|
+
width="1em"
|
|
345
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
346
|
+
>
|
|
347
|
+
<path
|
|
348
|
+
d="M0 0h24v24H0z"
|
|
349
|
+
fill="none"
|
|
350
|
+
/>
|
|
351
|
+
<path
|
|
352
|
+
d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
353
|
+
/>
|
|
354
|
+
</svg>
|
|
355
|
+
</span>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
</DocumentFragment>
|
|
359
|
+
`;
|
|
360
|
+
|
|
220
361
|
exports[`component:<InputText> renders 1`] = `
|
|
221
362
|
<DocumentFragment>
|
|
222
363
|
<div
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-menu-base: var(--mirai-ui-base);
|
|
3
|
-
--mirai-ui-menu-border-radius: var(--mirai-ui-border-radius);
|
|
4
|
-
--mirai-ui-menu-min-width: 192px;
|
|
5
|
-
--mirai-ui-menu-shadow: var(--mirai-ui-shadow);
|
|
6
|
-
--mirai-ui-menu-option-disabled: var(--mirai-ui-content-border);
|
|
7
|
-
--mirai-ui-menu-option-hover-background: var(--mirai-ui-accent);
|
|
8
|
-
--mirai-ui-menu-option-hover-color: var(--mirai-ui-base);
|
|
9
|
-
--mirai-ui-menu-option-padding: var(--mirai-ui-space-M);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
.menu {
|
|
13
2
|
background-color: var(--mirai-ui-menu-base);
|
|
14
3
|
border-radius: var(--mirai-ui-menu-border-radius);
|
|
@@ -0,0 +1,77 @@
|
|
|
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 _primitives = require("../../primitives");
|
|
15
|
+
|
|
16
|
+
var _Menu = require("./Menu");
|
|
17
|
+
|
|
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); }
|
|
19
|
+
|
|
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; }
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: 'Components'
|
|
24
|
+
};
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
|
|
27
|
+
var Story = function Story(props) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(_Menu.Menu, props, /*#__PURE__*/React.createElement("span", {
|
|
29
|
+
className: "children"
|
|
30
|
+
}, "children"));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.Story = Story;
|
|
34
|
+
Story.storyName = 'Menu';
|
|
35
|
+
Story.args = {
|
|
36
|
+
options: [{
|
|
37
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_primitives.Text, {
|
|
38
|
+
bold: true
|
|
39
|
+
}, "Lorem"), /*#__PURE__*/React.createElement(_primitives.Text, null, "Ipsum is simply dummy text...")),
|
|
40
|
+
divider: true
|
|
41
|
+
}, {
|
|
42
|
+
label: 'Lorem Ipsum is simply dummy text...',
|
|
43
|
+
divider: true
|
|
44
|
+
}, {
|
|
45
|
+
icon: 'Plus',
|
|
46
|
+
label: 'Item 1',
|
|
47
|
+
value: 'one'
|
|
48
|
+
}, {
|
|
49
|
+
icon: 'Plus',
|
|
50
|
+
label: 'Item 2',
|
|
51
|
+
disabled: true,
|
|
52
|
+
value: 'two'
|
|
53
|
+
}, {
|
|
54
|
+
icon: 'Empty',
|
|
55
|
+
label: 'Item 3',
|
|
56
|
+
divider: true,
|
|
57
|
+
value: 'three'
|
|
58
|
+
}, {
|
|
59
|
+
label: 'Item 4',
|
|
60
|
+
children: /*#__PURE__*/React.createElement(_.Button, {
|
|
61
|
+
small: true
|
|
62
|
+
}, "Add"),
|
|
63
|
+
value: 'four'
|
|
64
|
+
}, {
|
|
65
|
+
children: /*#__PURE__*/React.createElement(_.Button, {
|
|
66
|
+
secondary: true,
|
|
67
|
+
wide: true
|
|
68
|
+
}, "Logout")
|
|
69
|
+
}],
|
|
70
|
+
visible: true
|
|
71
|
+
};
|
|
72
|
+
Story.argTypes = {
|
|
73
|
+
onPress: {
|
|
74
|
+
action: 'onPress'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=Menu.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.stories.js","names":["title","Story","props","storyName","args","options","children","divider","label","icon","value","disabled","visible","argTypes","onPress","action"],"sources":["../../../src/components/Menu/Menu.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Button } from '../';\nimport { Text } from '../../primitives';\nimport { Menu } from './Menu';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Menu {...props}>\n <span className=\"children\">children</span>\n </Menu>\n);\n\nStory.storyName = 'Menu';\n\nStory.args = {\n options: [\n {\n children: (\n <>\n <Text bold>Lorem</Text>\n <Text>Ipsum is simply dummy text...</Text>\n </>\n ),\n divider: true,\n },\n { label: 'Lorem Ipsum is simply dummy text...', divider: true },\n { icon: 'Plus', label: 'Item 1', value: 'one' },\n { icon: 'Plus', label: 'Item 2', disabled: true, value: 'two' },\n { icon: 'Empty', label: 'Item 3', divider: true, value: 'three' },\n { label: 'Item 4', children: <Button small>Add</Button>, value: 'four' },\n {\n children: (\n <Button secondary wide>\n Logout\n </Button>\n ),\n },\n ],\n visible: true,\n};\n\nStory.argTypes = {\n onPress: { action: 'onPress' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBACnB,oBAAC,UAAD,EAAUA,KAAV,eACE;IAAM,SAAS,EAAC;EAAhB,cADF,CADmB;AAAA,CAAd;;;AAMPD,KAAK,CAACE,SAAN,GAAkB,MAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,OAAO,EAAE,CACP;IACEC,QAAQ,eACN,uDACE,oBAAC,gBAAD;MAAM,IAAI;IAAV,WADF,eAEE,oBAAC,gBAAD,wCAFF,CAFJ;IAOEC,OAAO,EAAE;EAPX,CADO,EAUP;IAAEC,KAAK,EAAE,qCAAT;IAAgDD,OAAO,EAAE;EAAzD,CAVO,EAWP;IAAEE,IAAI,EAAE,MAAR;IAAgBD,KAAK,EAAE,QAAvB;IAAiCE,KAAK,EAAE;EAAxC,CAXO,EAYP;IAAED,IAAI,EAAE,MAAR;IAAgBD,KAAK,EAAE,QAAvB;IAAiCG,QAAQ,EAAE,IAA3C;IAAiDD,KAAK,EAAE;EAAxD,CAZO,EAaP;IAAED,IAAI,EAAE,OAAR;IAAiBD,KAAK,EAAE,QAAxB;IAAkCD,OAAO,EAAE,IAA3C;IAAiDG,KAAK,EAAE;EAAxD,CAbO,EAcP;IAAEF,KAAK,EAAE,QAAT;IAAmBF,QAAQ,eAAE,oBAAC,QAAD;MAAQ,KAAK;IAAb,SAA7B;IAAyDI,KAAK,EAAE;EAAhE,CAdO,EAeP;IACEJ,QAAQ,eACN,oBAAC,QAAD;MAAQ,SAAS,MAAjB;MAAkB,IAAI;IAAtB;EAFJ,CAfO,CADE;EAwBXM,OAAO,EAAE;AAxBE,CAAb;AA2BAX,KAAK,CAACY,QAAN,GAAiB;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAV;AADM,CAAjB"}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-modal-background: var(--mirai-ui-base);
|
|
3
|
-
--mirai-ui-modal-border-radius: var(--mirai-ui-border-radius);
|
|
4
|
-
--mirai-ui-modal-header-padding: var(--mirai-ui-space-M);
|
|
5
|
-
--mirai-ui-modal-icon: var(--mirai-ui-font-size-headline-2);
|
|
6
|
-
--mirai-ui-modal-layer: var(--mirai-ui-layer-L);
|
|
7
|
-
--mirai-ui-modal-overflow: rgba(72, 72, 72, 0.15);
|
|
8
|
-
--mirai-ui-modal-shadow: var(--mirai-ui-shadow);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
.container {
|
|
12
2
|
height: 100vh;
|
|
13
3
|
justify-content: center;
|
|
@@ -21,13 +21,14 @@ var _default = {
|
|
|
21
21
|
exports.default = _default;
|
|
22
22
|
|
|
23
23
|
var Story = function Story(props) {
|
|
24
|
-
return /*#__PURE__*/React.createElement(_Modal.Modal, props
|
|
24
|
+
return /*#__PURE__*/React.createElement(_Modal.Modal, props, /*#__PURE__*/React.createElement("span", {
|
|
25
|
+
className: "children"
|
|
26
|
+
}, "children"));
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
exports.Story = Story;
|
|
28
30
|
Story.storyName = 'Modal';
|
|
29
31
|
Story.args = {
|
|
30
|
-
children: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit.',
|
|
31
32
|
overflow: true,
|
|
32
33
|
portal: false,
|
|
33
34
|
title: 'title',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.js","names":["title","Story","props","storyName","args","
|
|
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};\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,GAAa;EACXC,QAAQ,EAAE,IADC;EAEXC,MAAM,EAAE,KAFG;EAGXN,KAAK,EAAE,OAHI;EAIXO,OAAO,EAAE;AAJE,CAAb;AAOAN,KAAK,CAACO,QAAN,GAAiB;EACfC,MAAM,EAAE;IAAEC,MAAM,EAAE;EAAV,CADO;EAEfC,OAAO,EAAE;IAAED,MAAM,EAAE;EAAV;AAFM,CAAjB"}
|
|
@@ -46,7 +46,11 @@ var Notification = function Notification(_ref) {
|
|
|
46
46
|
row: true,
|
|
47
47
|
className: (0, _helpers.styles)(_NotificationModule.default.notification, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : undefined, inline ? _NotificationModule.default.inline : _NotificationModule.default.outlined, inline && _NotificationModule.default.inline, small && _NotificationModule.default.small, others.className)
|
|
48
48
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Icon, _extends({
|
|
49
|
-
name:
|
|
49
|
+
name: (0, _helpers.getIconName)({
|
|
50
|
+
error: error,
|
|
51
|
+
success: success,
|
|
52
|
+
warning: warning
|
|
53
|
+
})
|
|
50
54
|
}, textStyle)), /*#__PURE__*/_react.default.createElement(_primitives.Text, _extends({}, textStyle, {
|
|
51
55
|
className: (0, _helpers.styles)(_NotificationModule.default.text, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : undefined)
|
|
52
56
|
}), children), onClose && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","names":["Notification","children","error","inline","small","success","warning","onClose","others","textStyle","headline","level","style","notification","undefined","outlined","className","text","pressable","displayName","propTypes","PropTypes","string","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({ children, error, inline = false, small, success, warning, onClose, ...others }) => {\n const textStyle = small ? { small: true } : { headline: true, level: 4 };\n\n return (\n <View\n {...others}\n row\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n inline ? style.inline : style.outlined,\n inline && style.inline,\n small && style.small,\n others.className,\n )}\n >\n <Icon name={error
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["Notification","children","error","inline","small","success","warning","onClose","others","textStyle","headline","level","style","notification","undefined","outlined","className","text","pressable","displayName","propTypes","PropTypes","string","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconName, styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({ children, error, inline = false, small, success, warning, onClose, ...others }) => {\n const textStyle = small ? { small: true } : { headline: true, level: 4 };\n\n return (\n <View\n {...others}\n row\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n inline ? style.inline : style.outlined,\n inline && style.inline,\n small && style.small,\n others.className,\n )}\n >\n <Icon name={getIconName({ error, success, warning })} {...textStyle} />\n <Text\n {...textStyle}\n className={styles(\n style.text,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n >\n {children}\n </Text>\n {onClose && (\n <Pressable className={style.pressable} onPress={onClose}>\n <Icon name=\"Close\" {...textStyle} />\n </Pressable>\n )}\n </View>\n );\n};\n\nNotification.displayName = 'Component:Notification';\n\nNotification.propTypes = {\n children: PropTypes.string.isRequired,\n error: PropTypes.bool,\n inline: PropTypes.bool,\n small: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Notification };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAAsF;EAAA,IAAnFC,QAAmF,QAAnFA,QAAmF;EAAA,IAAzEC,KAAyE,QAAzEA,KAAyE;EAAA,uBAAlEC,MAAkE;EAAA,IAAlEA,MAAkE,4BAAzD,KAAyD;EAAA,IAAlDC,KAAkD,QAAlDA,KAAkD;EAAA,IAA3CC,OAA2C,QAA3CA,OAA2C;EAAA,IAAlCC,OAAkC,QAAlCA,OAAkC;EAAA,IAAzBC,OAAyB,QAAzBA,OAAyB;EAAA,IAAbC,MAAa;;EACzG,IAAMC,SAAS,GAAGL,KAAK,GAAG;IAAEA,KAAK,EAAE;EAAT,CAAH,GAAqB;IAAEM,QAAQ,EAAE,IAAZ;IAAkBC,KAAK,EAAE;EAAzB,CAA5C;EAEA,oBACE,6BAAC,gBAAD,eACMH,MADN;IAEE,GAAG,MAFL;IAGE,SAAS,EAAE,qBACTI,4BAAMC,YADG,EAETX,KAAK,GAAGU,4BAAMV,KAAT,GAAiBI,OAAO,GAAGM,4BAAMN,OAAT,GAAmBD,OAAO,GAAGO,4BAAMP,OAAT,GAAmBS,SAFjE,EAGTX,MAAM,GAAGS,4BAAMT,MAAT,GAAkBS,4BAAMG,QAHrB,EAITZ,MAAM,IAAIS,4BAAMT,MAJP,EAKTC,KAAK,IAAIQ,4BAAMR,KALN,EAMTI,MAAM,CAACQ,SANE;EAHb,iBAYE,6BAAC,gBAAD;IAAM,IAAI,EAAE,0BAAY;MAAEd,KAAK,EAALA,KAAF;MAASG,OAAO,EAAPA,OAAT;MAAkBC,OAAO,EAAPA;IAAlB,CAAZ;EAAZ,GAA0DG,SAA1D,EAZF,eAaE,6BAAC,gBAAD,eACMA,SADN;IAEE,SAAS,EAAE,qBACTG,4BAAMK,IADG,EAETf,KAAK,GAAGU,4BAAMV,KAAT,GAAiBI,OAAO,GAAGM,4BAAMN,OAAT,GAAmBD,OAAO,GAAGO,4BAAMP,OAAT,GAAmBS,SAFjE;EAFb,IAOGb,QAPH,CAbF,EAsBGM,OAAO,iBACN,6BAAC,qBAAD;IAAW,SAAS,EAAEK,4BAAMM,SAA5B;IAAuC,OAAO,EAAEX;EAAhD,gBACE,6BAAC,gBAAD;IAAM,IAAI,EAAC;EAAX,GAAuBE,SAAvB,EADF,CAvBJ,CADF;AA8BD,CAjCD;;;AAmCAT,YAAY,CAACmB,WAAb,GAA2B,wBAA3B;AAEAnB,YAAY,CAACoB,SAAb,GAAyB;EACvBnB,QAAQ,EAAEoB,mBAAUC,MAAV,CAAiBC,UADJ;EAEvBrB,KAAK,EAAEmB,mBAAUG,IAFM;EAGvBrB,MAAM,EAAEkB,mBAAUG,IAHK;EAIvBpB,KAAK,EAAEiB,mBAAUG,IAJM;EAKvBnB,OAAO,EAAEgB,mBAAUG,IALI;EAMvBlB,OAAO,EAAEe,mBAAUG,IANI;EAOvBjB,OAAO,EAAEc,mBAAUI;AAPI,CAAzB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 _Notification = require("./Notification");
|
|
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(_Notification.Notification, props);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Story = Story;
|
|
28
|
+
Story.storyName = 'Notification';
|
|
29
|
+
Story.args = {
|
|
30
|
+
children: 'children',
|
|
31
|
+
error: false,
|
|
32
|
+
inline: false,
|
|
33
|
+
small: false,
|
|
34
|
+
success: false,
|
|
35
|
+
warning: false
|
|
36
|
+
};
|
|
37
|
+
Story.argTypes = {
|
|
38
|
+
onClose: {
|
|
39
|
+
action: 'onClose'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=Notification.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notification.stories.js","names":["title","Story","props","storyName","args","children","error","inline","small","success","warning","argTypes","onClose","action"],"sources":["../../../src/components/Notification/Notification.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Notification } from './Notification';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Notification {...props} />;\n\nStory.storyName = 'Notification';\n\nStory.args = {\n children: 'children',\n error: false,\n inline: false,\n small: false,\n success: false,\n warning: false,\n};\n\nStory.argTypes = {\n onClose: { action: 'onClose' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,0BAAD,EAAkBA,KAAlB,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,cAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,QAAQ,EAAE,UADC;EAEXC,KAAK,EAAE,KAFI;EAGXC,MAAM,EAAE,KAHG;EAIXC,KAAK,EAAE,KAJI;EAKXC,OAAO,EAAE,KALE;EAMXC,OAAO,EAAE;AANE,CAAb;AASAT,KAAK,CAACU,QAAN,GAAiB;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAV;AADM,CAAjB"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-table-base: var(--mirai-ui-base);
|
|
3
|
-
--mirai-ui-table-border-color: var(--mirai-ui-content-border);
|
|
4
|
-
--mirai-ui-table-content: var(--mirai-ui-content);
|
|
5
|
-
--mirai-ui-table-hover-background: var(--mirai-ui-accent-background);
|
|
6
|
-
--mirai-ui-table-head-color: var(--mirai-ui-content-light);
|
|
7
|
-
--mirai-ui-table-padding-x: var(--mirai-ui-space-M);
|
|
8
|
-
--mirai-ui-table-padding-y: var(--mirai-ui-space-M);
|
|
9
|
-
--mirai-ui-table-selected-background: var(--mirai-ui-accent-background);
|
|
10
|
-
--mirai-ui-table-selected-color: var(--mirai-ui-accent);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
1
|
.table {
|
|
14
2
|
background-color: var(--mirai-ui-table-base);
|
|
15
3
|
border-collapse: collapse;
|
|
@@ -0,0 +1,95 @@
|
|
|
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 _Table = require("./Table");
|
|
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(_Table.Table, props);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.Story = Story;
|
|
30
|
+
Story.storyName = 'Table';
|
|
31
|
+
Story.args = {
|
|
32
|
+
dataSource: [{
|
|
33
|
+
username: 'jose',
|
|
34
|
+
email: 'jose@mirai.com',
|
|
35
|
+
year: 2012
|
|
36
|
+
}, {
|
|
37
|
+
username: 'mario/1',
|
|
38
|
+
email: 'mario.1@mirai.com',
|
|
39
|
+
year: 2005
|
|
40
|
+
}, {
|
|
41
|
+
username: 'carlos',
|
|
42
|
+
email: 'carlos@mirai.com',
|
|
43
|
+
year: 2012
|
|
44
|
+
}, {
|
|
45
|
+
username: 'svet',
|
|
46
|
+
email: 'svet@mirai.com',
|
|
47
|
+
year: 2021,
|
|
48
|
+
twitter: undefined,
|
|
49
|
+
action: /*#__PURE__*/React.createElement(_.Button, {
|
|
50
|
+
small: true
|
|
51
|
+
}, "Click Me")
|
|
52
|
+
}, {
|
|
53
|
+
username: 'javi',
|
|
54
|
+
email: 'hi@soyjavi.com',
|
|
55
|
+
year: 2022,
|
|
56
|
+
twitter: 'soyjavi'
|
|
57
|
+
}, {
|
|
58
|
+
username: 'victor',
|
|
59
|
+
email: 'victor@mirai.com',
|
|
60
|
+
year: 2021
|
|
61
|
+
}, {
|
|
62
|
+
username: 'mario/2',
|
|
63
|
+
email: 'mario.2@mirai.com',
|
|
64
|
+
year: 2022
|
|
65
|
+
}],
|
|
66
|
+
schema: {
|
|
67
|
+
username: {
|
|
68
|
+
label: 'User Name',
|
|
69
|
+
type: 'text'
|
|
70
|
+
},
|
|
71
|
+
email: {
|
|
72
|
+
label: 'Email'
|
|
73
|
+
},
|
|
74
|
+
year: {
|
|
75
|
+
label: 'Year',
|
|
76
|
+
type: 'number'
|
|
77
|
+
},
|
|
78
|
+
twitter: {
|
|
79
|
+
label: 'Twitter'
|
|
80
|
+
},
|
|
81
|
+
action: {
|
|
82
|
+
label: 'Action'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
search: ''
|
|
86
|
+
};
|
|
87
|
+
Story.argTypes = {
|
|
88
|
+
onPress: {
|
|
89
|
+
action: 'onPress'
|
|
90
|
+
},
|
|
91
|
+
onSelect: {
|
|
92
|
+
action: 'onSelect'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=Table.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.stories.js","names":["title","Story","props","storyName","args","dataSource","username","email","year","twitter","undefined","action","schema","label","type","search","argTypes","onPress","onSelect"],"sources":["../../../src/components/Table/Table.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Button } from '../';\nimport { Table } from './Table';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Table {...props} />;\n\nStory.storyName = 'Table';\n\nStory.args = {\n dataSource: [\n { username: 'jose', email: 'jose@mirai.com', year: 2012 },\n { username: 'mario/1', email: 'mario.1@mirai.com', year: 2005 },\n { username: 'carlos', email: 'carlos@mirai.com', year: 2012 },\n {\n username: 'svet',\n email: 'svet@mirai.com',\n year: 2021,\n twitter: undefined,\n action: <Button small>Click Me</Button>,\n },\n { username: 'javi', email: 'hi@soyjavi.com', year: 2022, twitter: 'soyjavi' },\n { username: 'victor', email: 'victor@mirai.com', year: 2021 },\n { username: 'mario/2', email: 'mario.2@mirai.com', year: 2022 },\n ],\n schema: {\n username: { label: 'User Name', type: 'text' },\n email: { label: 'Email' },\n year: { label: 'Year', type: 'number' },\n twitter: { label: 'Twitter' },\n action: { label: 'Action' },\n },\n search: '',\n};\n\nStory.argTypes = {\n onPress: { action: 'onPress' },\n onSelect: { action: 'onSelect' },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,YAAD,EAAWA,KAAX,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,OAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,UAAU,EAAE,CACV;IAAEC,QAAQ,EAAE,MAAZ;IAAoBC,KAAK,EAAE,gBAA3B;IAA6CC,IAAI,EAAE;EAAnD,CADU,EAEV;IAAEF,QAAQ,EAAE,SAAZ;IAAuBC,KAAK,EAAE,mBAA9B;IAAmDC,IAAI,EAAE;EAAzD,CAFU,EAGV;IAAEF,QAAQ,EAAE,QAAZ;IAAsBC,KAAK,EAAE,kBAA7B;IAAiDC,IAAI,EAAE;EAAvD,CAHU,EAIV;IACEF,QAAQ,EAAE,MADZ;IAEEC,KAAK,EAAE,gBAFT;IAGEC,IAAI,EAAE,IAHR;IAIEC,OAAO,EAAEC,SAJX;IAKEC,MAAM,eAAE,oBAAC,QAAD;MAAQ,KAAK;IAAb;EALV,CAJU,EAWV;IAAEL,QAAQ,EAAE,MAAZ;IAAoBC,KAAK,EAAE,gBAA3B;IAA6CC,IAAI,EAAE,IAAnD;IAAyDC,OAAO,EAAE;EAAlE,CAXU,EAYV;IAAEH,QAAQ,EAAE,QAAZ;IAAsBC,KAAK,EAAE,kBAA7B;IAAiDC,IAAI,EAAE;EAAvD,CAZU,EAaV;IAAEF,QAAQ,EAAE,SAAZ;IAAuBC,KAAK,EAAE,mBAA9B;IAAmDC,IAAI,EAAE;EAAzD,CAbU,CADD;EAgBXI,MAAM,EAAE;IACNN,QAAQ,EAAE;MAAEO,KAAK,EAAE,WAAT;MAAsBC,IAAI,EAAE;IAA5B,CADJ;IAENP,KAAK,EAAE;MAAEM,KAAK,EAAE;IAAT,CAFD;IAGNL,IAAI,EAAE;MAAEK,KAAK,EAAE,MAAT;MAAiBC,IAAI,EAAE;IAAvB,CAHA;IAINL,OAAO,EAAE;MAAEI,KAAK,EAAE;IAAT,CAJH;IAKNF,MAAM,EAAE;MAAEE,KAAK,EAAE;IAAT;EALF,CAhBG;EAuBXE,MAAM,EAAE;AAvBG,CAAb;AA0BAd,KAAK,CAACe,QAAN,GAAiB;EACfC,OAAO,EAAE;IAAEN,MAAM,EAAE;EAAV,CADM;EAEfO,QAAQ,EAAE;IAAEP,MAAM,EAAE;EAAV;AAFK,CAAjB"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-tooltip-background: rgba(0, 0, 0, 0.8);
|
|
3
|
-
--mirai-ui-tooltip-border-radius: var(--mirai-ui-border-radius);
|
|
4
|
-
--mirai-ui-tooltip-color: var(--mirai-ui-base);
|
|
5
|
-
--mirai-ui-tooltip-space: var(--mirai-ui-space-XS);
|
|
6
|
-
--mirai-ui-tooltip-max-width: calc(var(--mirai-ui-space-XXL) * 4);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
.dispatcher {
|
|
10
2
|
cursor: pointer;
|
|
11
3
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 _Tooltip = require("./Tooltip");
|
|
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(_Tooltip.Tooltip, props, /*#__PURE__*/React.createElement("span", null, "hover me (prop:text)"));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Story = Story;
|
|
28
|
+
Story.storyName = 'Tooltip';
|
|
29
|
+
Story.args = {
|
|
30
|
+
text: 'children',
|
|
31
|
+
visible: false
|
|
32
|
+
};
|
|
33
|
+
Story.argTypes = {
|
|
34
|
+
onClose: {
|
|
35
|
+
action: 'onClose'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Tooltip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.js","names":["title","Story","props","storyName","args","text","visible","argTypes","onClose","action"],"sources":["../../../src/components/Tooltip/Tooltip.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Tooltip } from './Tooltip';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Tooltip {...props}>\n <span>hover me (prop:text)</span>\n </Tooltip>\n);\n\nStory.storyName = 'Tooltip';\n\nStory.args = {\n text: 'children',\n visible: false,\n};\n\nStory.argTypes = {\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,gBAAD,EAAaA,KAAb,eACE,yDADF,CADmB;AAAA,CAAd;;;AAMPD,KAAK,CAACE,SAAN,GAAkB,SAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,IAAI,EAAE,UADK;EAEXC,OAAO,EAAE;AAFE,CAAb;AAKAL,KAAK,CAACM,QAAN,GAAiB;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAV;AADM,CAAjB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getIconName = void 0;
|
|
7
|
+
|
|
8
|
+
var getIconName = function getIconName() {
|
|
9
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
10
|
+
error = _ref.error,
|
|
11
|
+
success = _ref.success,
|
|
12
|
+
warning = _ref.warning;
|
|
13
|
+
|
|
14
|
+
return error ? 'Error' : warning ? 'Warning' : success ? 'Success' : 'Info';
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.getIconName = getIconName;
|
|
18
|
+
//# sourceMappingURL=getIconName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIconName.js","names":["getIconName","error","success","warning"],"sources":["../../src/helpers/getIconName.js"],"sourcesContent":["export const getIconName = ({ error, success, warning } = {}) =>\n error ? 'Error' : warning ? 'Warning' : success ? 'Success' : 'Info';\n"],"mappings":";;;;;;;AAAO,IAAMA,WAAW,GAAG,SAAdA,WAAc;EAAA,+EAA+B,EAA/B;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,IAAUC,OAAV,QAAUA,OAAV;EAAA,IAAmBC,OAAnB,QAAmBA,OAAnB;;EAAA,OACzBF,KAAK,GAAG,OAAH,GAAaE,OAAO,GAAG,SAAH,GAAeD,OAAO,GAAG,SAAH,GAAe,MADrC;AAAA,CAApB"}
|
package/build/helpers/index.js
CHANGED
|
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _getIconName = require("./getIconName");
|
|
8
|
+
|
|
9
|
+
Object.keys(_getIconName).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _getIconName[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _getIconName[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
7
20
|
var _getInputDateErrors = require("./getInputDateErrors");
|
|
8
21
|
|
|
9
22
|
Object.keys(_getInputDateErrors).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './getInputDateErrors';\nexport * from './getInputErrors';\nexport * from './isJest';\nexport * from './styles';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './getIconName';\nexport * from './getInputDateErrors';\nexport * from './getInputErrors';\nexport * from './isJest';\nexport * from './styles';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|