@mirai/ui 1.0.54 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -18
- package/build/components/Button/Button.js +4 -4
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +16 -28
- package/build/components/Button/Button.stories.js +1 -1
- package/build/components/Button/Button.stories.js.map +1 -1
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +4 -4
- package/build/components/Calendar/Calendar.Month.js +6 -1
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.module.css +0 -12
- package/build/components/Calendar/Calendar.stories.js +125 -0
- package/build/components/Calendar/Calendar.stories.js.map +1 -0
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +216 -216
- package/build/components/Form/Form.stories.js +63 -0
- package/build/components/Form/Form.stories.js.map +1 -0
- package/build/components/InputDate/InputDate.module.css +0 -3
- package/build/components/InputDate/InputDate.stories.js +78 -0
- package/build/components/InputDate/InputDate.stories.js.map +1 -0
- package/build/components/InputNumber/InputNumber.js +4 -3
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- 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/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +73 -73
- package/build/components/InputOption/InputOption.js +1 -1
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.module.css +1 -7
- package/build/components/InputOption/InputOption.stories.js +58 -0
- package/build/components/InputOption/InputOption.stories.js.map +1 -0
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +2 -2
- 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 +7 -7
- package/build/components/InputText/InputText.js +1 -1
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +5 -16
- package/build/components/InputText/InputText.stories.js +97 -0
- package/build/components/InputText/InputText.stories.js.map +1 -0
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +2 -2
- 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/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +3 -3
- package/build/components/Modal/Modal.module.css +1 -11
- package/build/components/Modal/Modal.stories.js +3 -2
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +6 -6
- package/build/components/Notification/Notification.js +19 -23
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.module.css +22 -33
- package/build/components/Notification/Notification.stories.js +42 -0
- package/build/components/Notification/Notification.stories.js.map +1 -0
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +82 -127
- 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/Table/__tests__/__snapshots__/Table.test.js.snap +25 -25
- package/build/components/Tooltip/Tooltip.module.css +0 -8
- package/build/components/Tooltip/Tooltip.stories.js +38 -0
- package/build/components/Tooltip/Tooltip.stories.js.map +1 -0
- package/build/hooks/useDevice.stories.js +57 -0
- package/build/hooks/useDevice.stories.js.map +1 -0
- package/build/primitives/Checkbox/Checkbox.module.css +0 -9
- package/build/primitives/Icon/Icon.js +13 -4
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.module.css +49 -8
- package/build/primitives/Icon/Icon.stories.js +5 -1
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +5 -5
- 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.js +6 -5
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +21 -8
- package/build/primitives/Text/Text.stories.js +40 -0
- package/build/primitives/Text/Text.stories.js.map +1 -0
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +40 -10
- 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 +172 -12
- package/package.json +4 -3
|
@@ -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"}
|
|
@@ -16,7 +16,7 @@ exports[`component:<Table> inherit:className 1`] = `
|
|
|
16
16
|
>
|
|
17
17
|
User Name
|
|
18
18
|
<span
|
|
19
|
-
class="icon hideIcon"
|
|
19
|
+
class="icon paragraph hideIcon"
|
|
20
20
|
>
|
|
21
21
|
<svg
|
|
22
22
|
fill="none"
|
|
@@ -48,7 +48,7 @@ exports[`component:<Table> inherit:className 1`] = `
|
|
|
48
48
|
>
|
|
49
49
|
Email
|
|
50
50
|
<span
|
|
51
|
-
class="icon hideIcon"
|
|
51
|
+
class="icon paragraph hideIcon"
|
|
52
52
|
>
|
|
53
53
|
<svg
|
|
54
54
|
fill="none"
|
|
@@ -80,7 +80,7 @@ exports[`component:<Table> inherit:className 1`] = `
|
|
|
80
80
|
>
|
|
81
81
|
Year
|
|
82
82
|
<span
|
|
83
|
-
class="icon hideIcon"
|
|
83
|
+
class="icon paragraph hideIcon"
|
|
84
84
|
>
|
|
85
85
|
<svg
|
|
86
86
|
fill="none"
|
|
@@ -112,7 +112,7 @@ exports[`component:<Table> inherit:className 1`] = `
|
|
|
112
112
|
>
|
|
113
113
|
Twitter
|
|
114
114
|
<span
|
|
115
|
-
class="icon hideIcon"
|
|
115
|
+
class="icon paragraph hideIcon"
|
|
116
116
|
>
|
|
117
117
|
<svg
|
|
118
118
|
fill="none"
|
|
@@ -144,7 +144,7 @@ exports[`component:<Table> inherit:className 1`] = `
|
|
|
144
144
|
>
|
|
145
145
|
Action
|
|
146
146
|
<span
|
|
147
|
-
class="icon hideIcon"
|
|
147
|
+
class="icon paragraph hideIcon"
|
|
148
148
|
>
|
|
149
149
|
<svg
|
|
150
150
|
fill="none"
|
|
@@ -460,7 +460,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
460
460
|
>
|
|
461
461
|
User Name
|
|
462
462
|
<span
|
|
463
|
-
class="icon hideIcon"
|
|
463
|
+
class="icon paragraph hideIcon"
|
|
464
464
|
>
|
|
465
465
|
<svg
|
|
466
466
|
fill="none"
|
|
@@ -492,7 +492,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
492
492
|
>
|
|
493
493
|
Email
|
|
494
494
|
<span
|
|
495
|
-
class="icon hideIcon"
|
|
495
|
+
class="icon paragraph hideIcon"
|
|
496
496
|
>
|
|
497
497
|
<svg
|
|
498
498
|
fill="none"
|
|
@@ -524,7 +524,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
524
524
|
>
|
|
525
525
|
Year
|
|
526
526
|
<span
|
|
527
|
-
class="icon hideIcon"
|
|
527
|
+
class="icon paragraph hideIcon"
|
|
528
528
|
>
|
|
529
529
|
<svg
|
|
530
530
|
fill="none"
|
|
@@ -556,7 +556,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
556
556
|
>
|
|
557
557
|
Twitter
|
|
558
558
|
<span
|
|
559
|
-
class="icon hideIcon"
|
|
559
|
+
class="icon paragraph hideIcon"
|
|
560
560
|
>
|
|
561
561
|
<svg
|
|
562
562
|
fill="none"
|
|
@@ -588,7 +588,7 @@ exports[`component:<Table> prop:onSelect 1`] = `
|
|
|
588
588
|
>
|
|
589
589
|
Action
|
|
590
590
|
<span
|
|
591
|
-
class="icon hideIcon"
|
|
591
|
+
class="icon paragraph hideIcon"
|
|
592
592
|
>
|
|
593
593
|
<svg
|
|
594
594
|
fill="none"
|
|
@@ -1141,7 +1141,7 @@ exports[`component:<Table> prop:search 1`] = `
|
|
|
1141
1141
|
>
|
|
1142
1142
|
User Name
|
|
1143
1143
|
<span
|
|
1144
|
-
class="icon hideIcon"
|
|
1144
|
+
class="icon paragraph hideIcon"
|
|
1145
1145
|
>
|
|
1146
1146
|
<svg
|
|
1147
1147
|
fill="none"
|
|
@@ -1173,7 +1173,7 @@ exports[`component:<Table> prop:search 1`] = `
|
|
|
1173
1173
|
>
|
|
1174
1174
|
Email
|
|
1175
1175
|
<span
|
|
1176
|
-
class="icon hideIcon"
|
|
1176
|
+
class="icon paragraph hideIcon"
|
|
1177
1177
|
>
|
|
1178
1178
|
<svg
|
|
1179
1179
|
fill="none"
|
|
@@ -1205,7 +1205,7 @@ exports[`component:<Table> prop:search 1`] = `
|
|
|
1205
1205
|
>
|
|
1206
1206
|
Year
|
|
1207
1207
|
<span
|
|
1208
|
-
class="icon hideIcon"
|
|
1208
|
+
class="icon paragraph hideIcon"
|
|
1209
1209
|
>
|
|
1210
1210
|
<svg
|
|
1211
1211
|
fill="none"
|
|
@@ -1237,7 +1237,7 @@ exports[`component:<Table> prop:search 1`] = `
|
|
|
1237
1237
|
>
|
|
1238
1238
|
Twitter
|
|
1239
1239
|
<span
|
|
1240
|
-
class="icon hideIcon"
|
|
1240
|
+
class="icon paragraph hideIcon"
|
|
1241
1241
|
>
|
|
1242
1242
|
<svg
|
|
1243
1243
|
fill="none"
|
|
@@ -1269,7 +1269,7 @@ exports[`component:<Table> prop:search 1`] = `
|
|
|
1269
1269
|
>
|
|
1270
1270
|
Action
|
|
1271
1271
|
<span
|
|
1272
|
-
class="icon hideIcon"
|
|
1272
|
+
class="icon paragraph hideIcon"
|
|
1273
1273
|
>
|
|
1274
1274
|
<svg
|
|
1275
1275
|
fill="none"
|
|
@@ -1357,7 +1357,7 @@ exports[`component:<Table> renders 1`] = `
|
|
|
1357
1357
|
>
|
|
1358
1358
|
User Name
|
|
1359
1359
|
<span
|
|
1360
|
-
class="icon hideIcon"
|
|
1360
|
+
class="icon paragraph hideIcon"
|
|
1361
1361
|
>
|
|
1362
1362
|
<svg
|
|
1363
1363
|
fill="none"
|
|
@@ -1389,7 +1389,7 @@ exports[`component:<Table> renders 1`] = `
|
|
|
1389
1389
|
>
|
|
1390
1390
|
Email
|
|
1391
1391
|
<span
|
|
1392
|
-
class="icon hideIcon"
|
|
1392
|
+
class="icon paragraph hideIcon"
|
|
1393
1393
|
>
|
|
1394
1394
|
<svg
|
|
1395
1395
|
fill="none"
|
|
@@ -1421,7 +1421,7 @@ exports[`component:<Table> renders 1`] = `
|
|
|
1421
1421
|
>
|
|
1422
1422
|
Year
|
|
1423
1423
|
<span
|
|
1424
|
-
class="icon hideIcon"
|
|
1424
|
+
class="icon paragraph hideIcon"
|
|
1425
1425
|
>
|
|
1426
1426
|
<svg
|
|
1427
1427
|
fill="none"
|
|
@@ -1453,7 +1453,7 @@ exports[`component:<Table> renders 1`] = `
|
|
|
1453
1453
|
>
|
|
1454
1454
|
Twitter
|
|
1455
1455
|
<span
|
|
1456
|
-
class="icon hideIcon"
|
|
1456
|
+
class="icon paragraph hideIcon"
|
|
1457
1457
|
>
|
|
1458
1458
|
<svg
|
|
1459
1459
|
fill="none"
|
|
@@ -1485,7 +1485,7 @@ exports[`component:<Table> renders 1`] = `
|
|
|
1485
1485
|
>
|
|
1486
1486
|
Action
|
|
1487
1487
|
<span
|
|
1488
|
-
class="icon hideIcon"
|
|
1488
|
+
class="icon paragraph hideIcon"
|
|
1489
1489
|
>
|
|
1490
1490
|
<svg
|
|
1491
1491
|
fill="none"
|
|
@@ -1794,7 +1794,7 @@ exports[`component:<Table> testID 1`] = `
|
|
|
1794
1794
|
>
|
|
1795
1795
|
User Name
|
|
1796
1796
|
<span
|
|
1797
|
-
class="icon hideIcon"
|
|
1797
|
+
class="icon paragraph hideIcon"
|
|
1798
1798
|
>
|
|
1799
1799
|
<svg
|
|
1800
1800
|
fill="none"
|
|
@@ -1826,7 +1826,7 @@ exports[`component:<Table> testID 1`] = `
|
|
|
1826
1826
|
>
|
|
1827
1827
|
Email
|
|
1828
1828
|
<span
|
|
1829
|
-
class="icon hideIcon"
|
|
1829
|
+
class="icon paragraph hideIcon"
|
|
1830
1830
|
>
|
|
1831
1831
|
<svg
|
|
1832
1832
|
fill="none"
|
|
@@ -1858,7 +1858,7 @@ exports[`component:<Table> testID 1`] = `
|
|
|
1858
1858
|
>
|
|
1859
1859
|
Year
|
|
1860
1860
|
<span
|
|
1861
|
-
class="icon hideIcon"
|
|
1861
|
+
class="icon paragraph hideIcon"
|
|
1862
1862
|
>
|
|
1863
1863
|
<svg
|
|
1864
1864
|
fill="none"
|
|
@@ -1890,7 +1890,7 @@ exports[`component:<Table> testID 1`] = `
|
|
|
1890
1890
|
>
|
|
1891
1891
|
Twitter
|
|
1892
1892
|
<span
|
|
1893
|
-
class="icon hideIcon"
|
|
1893
|
+
class="icon paragraph hideIcon"
|
|
1894
1894
|
>
|
|
1895
1895
|
<svg
|
|
1896
1896
|
fill="none"
|
|
@@ -1922,7 +1922,7 @@ exports[`component:<Table> testID 1`] = `
|
|
|
1922
1922
|
>
|
|
1923
1923
|
Action
|
|
1924
1924
|
<span
|
|
1925
|
-
class="icon hideIcon"
|
|
1925
|
+
class="icon paragraph hideIcon"
|
|
1926
1926
|
>
|
|
1927
1927
|
<svg
|
|
1928
1928
|
fill="none"
|
|
@@ -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,57 @@
|
|
|
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 _useDevice = require("./useDevice");
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
|
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
+
|
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
+
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
|
|
32
|
+
var _default = {
|
|
33
|
+
title: 'Hooks'
|
|
34
|
+
};
|
|
35
|
+
exports.default = _default;
|
|
36
|
+
|
|
37
|
+
var Story = function Story() {
|
|
38
|
+
var device = (0, _useDevice.useDevice)();
|
|
39
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, Object.entries(device).map(function (_ref) {
|
|
40
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
41
|
+
key = _ref2[0],
|
|
42
|
+
value = _ref2[1];
|
|
43
|
+
|
|
44
|
+
return /*#__PURE__*/React.createElement(_.View, {
|
|
45
|
+
row: true,
|
|
46
|
+
key: key
|
|
47
|
+
}, /*#__PURE__*/React.createElement(_.Text, null, key, ":"), /*#__PURE__*/React.createElement(_.Text, {
|
|
48
|
+
bold: true
|
|
49
|
+
}, value.toString()));
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.Story = Story;
|
|
54
|
+
Story.storyName = 'useDevice';
|
|
55
|
+
Story.args = {};
|
|
56
|
+
Story.argTypes = {};
|
|
57
|
+
//# sourceMappingURL=useDevice.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDevice.stories.js","names":["title","Story","device","Object","entries","map","key","value","toString","storyName","args","argTypes"],"sources":["../../src/hooks/useDevice.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Text, View } from '..';\nimport { useDevice } from './useDevice';\n\nexport default { title: 'Hooks' };\n\nexport const Story = () => {\n const device = useDevice();\n\n return (\n <>\n {Object.entries(device).map(([key, value]) => (\n <View row key={key}>\n <Text>{key}:</Text>\n <Text bold>{value.toString()}</Text>\n </View>\n ))}\n </>\n );\n};\n\nStory.storyName = 'useDevice';\n\nStory.args = {};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,GAAM;EACzB,IAAMC,MAAM,GAAG,2BAAf;EAEA,oBACE,0CACGC,MAAM,CAACC,OAAP,CAAeF,MAAf,EAAuBG,GAAvB,CAA2B;IAAA;IAAA,IAAEC,GAAF;IAAA,IAAOC,KAAP;;IAAA,oBAC1B,oBAAC,MAAD;MAAM,GAAG,MAAT;MAAU,GAAG,EAAED;IAAf,gBACE,oBAAC,MAAD,QAAOA,GAAP,MADF,eAEE,oBAAC,MAAD;MAAM,IAAI;IAAV,GAAYC,KAAK,CAACC,QAAN,EAAZ,CAFF,CAD0B;EAAA,CAA3B,CADH,CADF;AAUD,CAbM;;;AAePP,KAAK,CAACQ,SAAN,GAAkB,WAAlB;AAEAR,KAAK,CAACS,IAAN,GAAa,EAAb;AAEAT,KAAK,CAACU,QAAN,GAAiB,EAAjB"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-checkbox-base: var(--mirai-ui-base);
|
|
3
|
-
--mirai-ui-checkbox-border-color: var(--mirai-ui-content-light);
|
|
4
|
-
--mirai-ui-checkbox-border-radius: var(--mirai-ui-border-radius);
|
|
5
|
-
--mirai-ui-checkbox-checked: var(--mirai-ui-accent);
|
|
6
|
-
--mirai-ui-checkbox-disabled: var(--mirai-ui-content-border);
|
|
7
|
-
--mirai-ui-checkbox-size: var(--mirai-ui-space-L);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
1
|
.checkbox {
|
|
11
2
|
cursor: pointer;
|
|
12
3
|
height: var(--mirai-ui-checkbox-size);
|
|
@@ -15,7 +15,7 @@ var _Icon = require("./Icon.constants");
|
|
|
15
15
|
|
|
16
16
|
var _IconModule = _interopRequireDefault(require("./Icon.module.css"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["name"];
|
|
18
|
+
var _excluded = ["action", "headline", "level", "name", "small"];
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -30,17 +30,26 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
30
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
31
|
|
|
32
32
|
var Icon = function Icon(_ref) {
|
|
33
|
-
var
|
|
33
|
+
var action = _ref.action,
|
|
34
|
+
headline = _ref.headline,
|
|
35
|
+
_ref$level = _ref.level,
|
|
36
|
+
level = _ref$level === void 0 ? 3 : _ref$level,
|
|
37
|
+
name = _ref.name,
|
|
38
|
+
small = _ref.small,
|
|
34
39
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
35
40
|
|
|
36
41
|
return /*#__PURE__*/_react.default.createElement('span', _objectSpread(_objectSpread({}, others), {}, {
|
|
37
|
-
className: (0, _helpers.styles)(_IconModule.default.icon, others.className)
|
|
42
|
+
className: (0, _helpers.styles)(_IconModule.default.icon, headline ? _IconModule.default["headline-".concat(level)] : action ? _IconModule.default.action : small ? _IconModule.default.small : _IconModule.default.paragraph, others.className)
|
|
38
43
|
}), _Icon.ICONS[name] ? /*#__PURE__*/_react.default.createElement(_Icon.ICONS[name]) : undefined);
|
|
39
44
|
};
|
|
40
45
|
|
|
41
46
|
exports.Icon = Icon;
|
|
42
47
|
Icon.displayName = 'Primitive:Icon';
|
|
43
48
|
Icon.propTypes = {
|
|
44
|
-
|
|
49
|
+
action: _propTypes.default.bool,
|
|
50
|
+
headline: _propTypes.default.bool,
|
|
51
|
+
level: _propTypes.default.number,
|
|
52
|
+
name: _propTypes.default.oneOf(Object.keys(_Icon.ICONS)).isRequired,
|
|
53
|
+
small: _propTypes.default.bool
|
|
45
54
|
};
|
|
46
55
|
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":["Icon","name","others","React","createElement","className","style","icon","ICONS","undefined","displayName","propTypes","PropTypes","oneOf","Object","keys","isRequired"],"sources":["../../../src/primitives/Icon/Icon.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { ICONS } from './Icon.constants';\nimport style from './Icon.module.css';\n\nconst Icon = ({ name, ...others }) =>\n React.createElement(\n 'span',\n {\n ...others,\n className: styles(style.icon
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["Icon","action","headline","level","name","small","others","React","createElement","className","style","icon","paragraph","ICONS","undefined","displayName","propTypes","PropTypes","bool","number","oneOf","Object","keys","isRequired"],"sources":["../../../src/primitives/Icon/Icon.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { ICONS } from './Icon.constants';\nimport style from './Icon.module.css';\n\nconst Icon = ({ action, headline, level = 3, name, small, ...others }) =>\n React.createElement(\n 'span',\n {\n ...others,\n className: styles(\n style.icon,\n headline ? style[`headline-${level}`] : action ? style.action : small ? style.small : style.paragraph,\n others.className,\n ),\n },\n ICONS[name] ? React.createElement(ICONS[name]) : undefined,\n );\n\nIcon.displayName = 'Primitive:Icon';\n\nIcon.propTypes = {\n action: PropTypes.bool,\n headline: PropTypes.bool,\n level: PropTypes.number,\n name: PropTypes.oneOf(Object.keys(ICONS)).isRequired,\n small: PropTypes.bool,\n};\n\nexport { Icon };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,IAAGC,MAAH,QAAGA,MAAH;EAAA,IAAWC,QAAX,QAAWA,QAAX;EAAA,sBAAqBC,KAArB;EAAA,IAAqBA,KAArB,2BAA6B,CAA7B;EAAA,IAAgCC,IAAhC,QAAgCA,IAAhC;EAAA,IAAsCC,KAAtC,QAAsCA,KAAtC;EAAA,IAAgDC,MAAhD;;EAAA,oBACXC,eAAMC,aAAN,CACE,MADF,kCAGOF,MAHP;IAIIG,SAAS,EAAE,qBACTC,oBAAMC,IADG,EAETT,QAAQ,GAAGQ,uCAAkBP,KAAlB,EAAH,GAAgCF,MAAM,GAAGS,oBAAMT,MAAT,GAAkBI,KAAK,GAAGK,oBAAML,KAAT,GAAiBK,oBAAME,SAFnF,EAGTN,MAAM,CAACG,SAHE;EAJf,IAUEI,YAAMT,IAAN,iBAAcG,eAAMC,aAAN,CAAoBK,YAAMT,IAAN,CAApB,CAAd,GAAiDU,SAVnD,CADW;AAAA,CAAb;;;AAcAd,IAAI,CAACe,WAAL,GAAmB,gBAAnB;AAEAf,IAAI,CAACgB,SAAL,GAAiB;EACff,MAAM,EAAEgB,mBAAUC,IADH;EAEfhB,QAAQ,EAAEe,mBAAUC,IAFL;EAGff,KAAK,EAAEc,mBAAUE,MAHF;EAIff,IAAI,EAAEa,mBAAUG,KAAV,CAAgBC,MAAM,CAACC,IAAP,CAAYT,WAAZ,CAAhB,EAAoCU,UAJ3B;EAKflB,KAAK,EAAEY,mBAAUC;AALF,CAAjB"}
|
|
@@ -1,11 +1,52 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--mirai-ui-icon: var(--mirai-ui-font-size-subheadline);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.icon {
|
|
6
2
|
display: block;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
font-size: var(--mirai-ui-
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.headline-1 {
|
|
6
|
+
font-size: var(--mirai-ui-font-size-headline-1);
|
|
7
|
+
height: var(--mirai-ui-font-size-headline-1);
|
|
8
|
+
line-height: var(--mirai-ui-font-size-headline-1);
|
|
9
|
+
width: var(--mirai-ui-font-size-headline-1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.headline-2 {
|
|
13
|
+
font-size: var(--mirai-ui-font-size-headline-2);
|
|
14
|
+
height: var(--mirai-ui-font-size-headline-2);
|
|
15
|
+
line-height: var(--mirai-ui-font-size-headline-2);
|
|
16
|
+
width: var(--mirai-ui-font-size-headline-2);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.headline-3 {
|
|
20
|
+
font-size: var(--mirai-ui-font-size-headline-3);
|
|
21
|
+
height: var(--mirai-ui-font-size-headline-3);
|
|
22
|
+
line-height: var(--mirai-ui-font-size-headline-3);
|
|
23
|
+
width: var(--mirai-ui-font-size-headline-3);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.headline-4 {
|
|
27
|
+
font-size: var(--mirai-ui-font-size-headline-4);
|
|
28
|
+
height: var(--mirai-ui-font-size-headline-4);
|
|
29
|
+
line-height: var(--mirai-ui-font-size-headline-4);
|
|
30
|
+
width: var(--mirai-ui-font-size-headline-4);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.paragraph {
|
|
34
|
+
font-size: var(--mirai-ui-font-size-paragraph);
|
|
35
|
+
height: var(--mirai-ui-font-size-paragraph);
|
|
36
|
+
line-height: var(--mirai-ui-font-size-paragraph);
|
|
37
|
+
width: var(--mirai-ui-font-size-paragraph);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.action {
|
|
41
|
+
font-size: var(--mirai-ui-font-size-action);
|
|
42
|
+
height: var(--mirai-ui-font-size-action);
|
|
43
|
+
line-height: var(--mirai-ui-font-size-action);
|
|
44
|
+
width: var(--mirai-ui-font-size-action);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.small {
|
|
48
|
+
font-size: var(--mirai-ui-font-size-small);
|
|
49
|
+
height: var(--mirai-ui-font-size-small);
|
|
50
|
+
line-height: var(--mirai-ui-font-size-small);
|
|
51
|
+
width: var(--mirai-ui-font-size-small);
|
|
11
52
|
}
|
|
@@ -27,7 +27,11 @@ var Story = function Story(props) {
|
|
|
27
27
|
exports.Story = Story;
|
|
28
28
|
Story.storyName = 'Icon';
|
|
29
29
|
Story.args = {
|
|
30
|
-
|
|
30
|
+
action: false,
|
|
31
|
+
headline: false,
|
|
32
|
+
level: 3,
|
|
33
|
+
name: 'EyeOpen',
|
|
34
|
+
small: false
|
|
31
35
|
};
|
|
32
36
|
Story.argTypes = {
|
|
33
37
|
name: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.js","names":["title","Story","props","storyName","args","name","argTypes","options","Object","keys","ICONS","control","type","defaultValue"],"sources":["../../../src/primitives/Icon/Icon.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon, ICONS } from './';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => <Icon {...props} />;\n\nStory.storyName = 'Icon';\n\nStory.args = {\n name: 'EyeOpen',\n};\n\nStory.argTypes = {\n name: {\n options: Object.keys(ICONS),\n control: { type: 'select' },\n defaultValue: 'EyeOpen',\n },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,MAAD,EAAUA,KAAV,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,MAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"Icon.stories.js","names":["title","Story","props","storyName","args","action","headline","level","name","small","argTypes","options","Object","keys","ICONS","control","type","defaultValue"],"sources":["../../../src/primitives/Icon/Icon.stories.jsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon, ICONS } from './';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => <Icon {...props} />;\n\nStory.storyName = 'Icon';\n\nStory.args = {\n action: false,\n headline: false,\n level: 3,\n name: 'EyeOpen',\n small: false,\n};\n\nStory.argTypes = {\n name: {\n options: Object.keys(ICONS),\n control: { type: 'select' },\n defaultValue: 'EyeOpen',\n },\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;eAEe;EAAEA,KAAK,EAAE;AAAT,C;;;AAER,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;EAAA,oBAAW,oBAAC,MAAD,EAAUA,KAAV,CAAX;AAAA,CAAd;;;AAEPD,KAAK,CAACE,SAAN,GAAkB,MAAlB;AAEAF,KAAK,CAACG,IAAN,GAAa;EACXC,MAAM,EAAE,KADG;EAEXC,QAAQ,EAAE,KAFC;EAGXC,KAAK,EAAE,CAHI;EAIXC,IAAI,EAAE,SAJK;EAKXC,KAAK,EAAE;AALI,CAAb;AAQAR,KAAK,CAACS,QAAN,GAAiB;EACfF,IAAI,EAAE;IACJG,OAAO,EAAEC,MAAM,CAACC,IAAP,CAAYC,OAAZ,CADL;IAEJC,OAAO,EAAE;MAAEC,IAAI,EAAE;IAAR,CAFL;IAGJC,YAAY,EAAE;EAHV;AADS,CAAjB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`primitive:<Icon> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<span
|
|
6
|
-
class="icon mirai"
|
|
6
|
+
class="icon paragraph mirai"
|
|
7
7
|
>
|
|
8
8
|
<svg
|
|
9
9
|
fill="none"
|
|
@@ -33,7 +33,7 @@ exports[`primitive:<Icon> inherit:className 1`] = `
|
|
|
33
33
|
exports[`primitive:<Icon> prop:name (invalid) 1`] = `
|
|
34
34
|
<DocumentFragment>
|
|
35
35
|
<span
|
|
36
|
-
class="icon"
|
|
36
|
+
class="icon paragraph"
|
|
37
37
|
/>
|
|
38
38
|
</DocumentFragment>
|
|
39
39
|
`;
|
|
@@ -41,7 +41,7 @@ exports[`primitive:<Icon> prop:name (invalid) 1`] = `
|
|
|
41
41
|
exports[`primitive:<Icon> prop:name 1`] = `
|
|
42
42
|
<DocumentFragment>
|
|
43
43
|
<span
|
|
44
|
-
class="icon"
|
|
44
|
+
class="icon paragraph"
|
|
45
45
|
>
|
|
46
46
|
<svg
|
|
47
47
|
fill="none"
|
|
@@ -74,7 +74,7 @@ exports[`primitive:<Icon> prop:name 1`] = `
|
|
|
74
74
|
exports[`primitive:<Icon> renders 1`] = `
|
|
75
75
|
<DocumentFragment>
|
|
76
76
|
<span
|
|
77
|
-
class="icon"
|
|
77
|
+
class="icon paragraph"
|
|
78
78
|
>
|
|
79
79
|
<svg
|
|
80
80
|
fill="none"
|
|
@@ -104,7 +104,7 @@ exports[`primitive:<Icon> renders 1`] = `
|
|
|
104
104
|
exports[`primitive:<Icon> testID 1`] = `
|
|
105
105
|
<DocumentFragment>
|
|
106
106
|
<span
|
|
107
|
-
class="icon"
|
|
107
|
+
class="icon paragraph"
|
|
108
108
|
data-testid="mirai"
|
|
109
109
|
>
|
|
110
110
|
<svg
|