@mirai/ui 1.1.9 → 1.1.11
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 +20 -8
- package/build/components/Button/Button.module.css +7 -7
- package/build/components/InputSelect/InputSelect.js +1 -1
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +1 -1
- package/build/components/InputText/InputText.js +1 -1
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +1 -1
- package/build/components/Table/Table.Filter.js +1 -1
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +4 -4
- package/build/primitives/Icon/Icon.js +23 -4
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.module.css +0 -20
- 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 +154 -50
- package/build/primitives/Text/Text.js +22 -4
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +33 -20
- package/build/primitives/Text/Text.stories.js +5 -1
- package/build/primitives/Text/Text.stories.js.map +1 -1
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +82 -42
- package/build/primitives/Text/helpers/color.js +23 -0
- package/build/primitives/Text/helpers/color.js.map +1 -0
- package/build/primitives/Text/helpers/index.js +11 -0
- package/build/primitives/Text/helpers/index.js.map +1 -1
- package/build/theme/default.theme.css +19 -14
- package/package.json +1 -1
|
@@ -1,59 +1,129 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`primitive:<Text>
|
|
3
|
+
exports[`primitive:<Text> color prop:accent 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<span
|
|
6
|
-
class="text paragraph
|
|
6
|
+
class="text accent paragraph"
|
|
7
7
|
>
|
|
8
8
|
Lorem Ipsum
|
|
9
9
|
</span>
|
|
10
10
|
</DocumentFragment>
|
|
11
11
|
`;
|
|
12
12
|
|
|
13
|
-
exports[`primitive:<Text> prop:
|
|
13
|
+
exports[`primitive:<Text> color prop:accentDark 1`] = `
|
|
14
14
|
<DocumentFragment>
|
|
15
15
|
<span
|
|
16
|
-
class="text
|
|
16
|
+
class="text accentDark paragraph"
|
|
17
17
|
>
|
|
18
18
|
Lorem Ipsum
|
|
19
19
|
</span>
|
|
20
20
|
</DocumentFragment>
|
|
21
21
|
`;
|
|
22
22
|
|
|
23
|
-
exports[`primitive:<Text> prop:
|
|
23
|
+
exports[`primitive:<Text> color prop:accentLight 1`] = `
|
|
24
24
|
<DocumentFragment>
|
|
25
25
|
<span
|
|
26
|
-
class="text
|
|
26
|
+
class="text accentLight paragraph"
|
|
27
27
|
>
|
|
28
28
|
Lorem Ipsum
|
|
29
29
|
</span>
|
|
30
30
|
</DocumentFragment>
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
|
-
exports[`primitive:<Text> prop:
|
|
33
|
+
exports[`primitive:<Text> color prop:dark 1`] = `
|
|
34
34
|
<DocumentFragment>
|
|
35
35
|
<span
|
|
36
|
-
class="text
|
|
36
|
+
class="text dark paragraph"
|
|
37
37
|
>
|
|
38
38
|
Lorem Ipsum
|
|
39
39
|
</span>
|
|
40
40
|
</DocumentFragment>
|
|
41
41
|
`;
|
|
42
42
|
|
|
43
|
-
exports[`primitive:<Text> prop:
|
|
43
|
+
exports[`primitive:<Text> color prop:error 1`] = `
|
|
44
44
|
<DocumentFragment>
|
|
45
45
|
<span
|
|
46
|
-
class="text
|
|
46
|
+
class="text error paragraph"
|
|
47
47
|
>
|
|
48
48
|
Lorem Ipsum
|
|
49
49
|
</span>
|
|
50
50
|
</DocumentFragment>
|
|
51
51
|
`;
|
|
52
52
|
|
|
53
|
-
exports[`primitive:<Text> prop:
|
|
53
|
+
exports[`primitive:<Text> color prop:info 1`] = `
|
|
54
54
|
<DocumentFragment>
|
|
55
55
|
<span
|
|
56
|
-
class="text
|
|
56
|
+
class="text info paragraph"
|
|
57
|
+
>
|
|
58
|
+
Lorem Ipsum
|
|
59
|
+
</span>
|
|
60
|
+
</DocumentFragment>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`primitive:<Text> color prop:light 1`] = `
|
|
64
|
+
<DocumentFragment>
|
|
65
|
+
<span
|
|
66
|
+
class="text light paragraph"
|
|
67
|
+
>
|
|
68
|
+
Lorem Ipsum
|
|
69
|
+
</span>
|
|
70
|
+
</DocumentFragment>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
exports[`primitive:<Text> color prop:success 1`] = `
|
|
74
|
+
<DocumentFragment>
|
|
75
|
+
<span
|
|
76
|
+
class="text success paragraph"
|
|
77
|
+
>
|
|
78
|
+
Lorem Ipsum
|
|
79
|
+
</span>
|
|
80
|
+
</DocumentFragment>
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
exports[`primitive:<Text> color prop:warning 1`] = `
|
|
84
|
+
<DocumentFragment>
|
|
85
|
+
<span
|
|
86
|
+
class="text warning paragraph"
|
|
87
|
+
>
|
|
88
|
+
Lorem Ipsum
|
|
89
|
+
</span>
|
|
90
|
+
</DocumentFragment>
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
exports[`primitive:<Text> inherit:className 1`] = `
|
|
94
|
+
<DocumentFragment>
|
|
95
|
+
<span
|
|
96
|
+
class="text paragraph mirai"
|
|
97
|
+
>
|
|
98
|
+
Lorem Ipsum
|
|
99
|
+
</span>
|
|
100
|
+
</DocumentFragment>
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
exports[`primitive:<Text> prop:action 1`] = `
|
|
104
|
+
<DocumentFragment>
|
|
105
|
+
<span
|
|
106
|
+
class="text action"
|
|
107
|
+
>
|
|
108
|
+
Lorem Ipsum
|
|
109
|
+
</span>
|
|
110
|
+
</DocumentFragment>
|
|
111
|
+
`;
|
|
112
|
+
|
|
113
|
+
exports[`primitive:<Text> prop:bold 1`] = `
|
|
114
|
+
<DocumentFragment>
|
|
115
|
+
<span
|
|
116
|
+
class="text bold paragraph"
|
|
117
|
+
>
|
|
118
|
+
Lorem Ipsum
|
|
119
|
+
</span>
|
|
120
|
+
</DocumentFragment>
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
exports[`primitive:<Text> prop:capitalize 1`] = `
|
|
124
|
+
<DocumentFragment>
|
|
125
|
+
<span
|
|
126
|
+
class="text capitalize paragraph"
|
|
57
127
|
>
|
|
58
128
|
Lorem Ipsum
|
|
59
129
|
</span>
|
|
@@ -110,16 +180,6 @@ exports[`primitive:<Text> prop:headline 1`] = `
|
|
|
110
180
|
</DocumentFragment>
|
|
111
181
|
`;
|
|
112
182
|
|
|
113
|
-
exports[`primitive:<Text> prop:lighten 1`] = `
|
|
114
|
-
<DocumentFragment>
|
|
115
|
-
<span
|
|
116
|
-
class="text paragraph lighten"
|
|
117
|
-
>
|
|
118
|
-
Lorem Ipsum
|
|
119
|
-
</span>
|
|
120
|
-
</DocumentFragment>
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
183
|
exports[`primitive:<Text> prop:markdown 1`] = `
|
|
124
184
|
<DocumentFragment>
|
|
125
185
|
<span
|
|
@@ -150,16 +210,6 @@ exports[`primitive:<Text> prop:small 1`] = `
|
|
|
150
210
|
</DocumentFragment>
|
|
151
211
|
`;
|
|
152
212
|
|
|
153
|
-
exports[`primitive:<Text> prop:success 1`] = `
|
|
154
|
-
<DocumentFragment>
|
|
155
|
-
<span
|
|
156
|
-
class="text paragraph success"
|
|
157
|
-
>
|
|
158
|
-
Lorem Ipsum
|
|
159
|
-
</span>
|
|
160
|
-
</DocumentFragment>
|
|
161
|
-
`;
|
|
162
|
-
|
|
163
213
|
exports[`primitive:<Text> prop:tag 1`] = `
|
|
164
214
|
<DocumentFragment>
|
|
165
215
|
<p
|
|
@@ -200,16 +250,6 @@ exports[`primitive:<Text> prop:upperCase 1`] = `
|
|
|
200
250
|
</DocumentFragment>
|
|
201
251
|
`;
|
|
202
252
|
|
|
203
|
-
exports[`primitive:<Text> prop:warning 1`] = `
|
|
204
|
-
<DocumentFragment>
|
|
205
|
-
<span
|
|
206
|
-
class="text paragraph warning"
|
|
207
|
-
>
|
|
208
|
-
Lorem Ipsum
|
|
209
|
-
</span>
|
|
210
|
-
</DocumentFragment>
|
|
211
|
-
`;
|
|
212
|
-
|
|
213
253
|
exports[`primitive:<Text> prop:wide 1`] = `
|
|
214
254
|
<DocumentFragment>
|
|
215
255
|
<span
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.color = void 0;
|
|
7
|
+
var _TextModule = _interopRequireDefault(require("../Text.module.css"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
var color = function color() {
|
|
10
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
11
|
+
accent = _ref.accent,
|
|
12
|
+
accentDark = _ref.accentDark,
|
|
13
|
+
accentLight = _ref.accentLight,
|
|
14
|
+
dark = _ref.dark,
|
|
15
|
+
error = _ref.error,
|
|
16
|
+
info = _ref.info,
|
|
17
|
+
light = _ref.light,
|
|
18
|
+
success = _ref.success,
|
|
19
|
+
warning = _ref.warning;
|
|
20
|
+
return accent ? _TextModule.default.accent : accentDark ? _TextModule.default.accentDark : accentLight ? _TextModule.default.accentLight : dark ? _TextModule.default.dark : error ? _TextModule.default.error : info ? _TextModule.default.info : light ? _TextModule.default.light : success ? _TextModule.default.success : warning ? _TextModule.default.warning : undefined;
|
|
21
|
+
};
|
|
22
|
+
exports.color = color;
|
|
23
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.js","names":["color","accent","accentDark","accentLight","dark","error","info","light","success","warning","style","undefined"],"sources":["../../../../src/primitives/Text/helpers/color.js"],"sourcesContent":["import style from '../Text.module.css';\n\nexport const color = ({ accent, accentDark, accentLight, dark, error, info, light, success, warning } = {}) =>\n accent\n ? style.accent\n : accentDark\n ? style.accentDark\n : accentLight\n ? style.accentLight\n : dark\n ? style.dark\n : error\n ? style.error\n : info\n ? style.info\n : light\n ? style.light\n : success\n ? style.success\n : warning\n ? style.warning\n : undefined;\n"],"mappings":";;;;;;AAAA;AAAuC;AAEhC,IAAMA,KAAK,GAAG,SAARA,KAAK;EAAA,+EAAsF,CAAC,CAAC;IAAlFC,MAAM,QAANA,MAAM;IAAEC,UAAU,QAAVA,UAAU;IAAEC,WAAW,QAAXA,WAAW;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAEC,OAAO,QAAPA,OAAO;EAAA,OACjGR,MAAM,GACFS,mBAAK,CAACT,MAAM,GACZC,UAAU,GACVQ,mBAAK,CAACR,UAAU,GAChBC,WAAW,GACXO,mBAAK,CAACP,WAAW,GACjBC,IAAI,GACJM,mBAAK,CAACN,IAAI,GACVC,KAAK,GACLK,mBAAK,CAACL,KAAK,GACXC,IAAI,GACJI,mBAAK,CAACJ,IAAI,GACVC,KAAK,GACLG,mBAAK,CAACH,KAAK,GACXC,OAAO,GACPE,mBAAK,CAACF,OAAO,GACbC,OAAO,GACPC,mBAAK,CAACD,OAAO,GACbE,SAAS;AAAA;AAAC"}
|
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _color = require("./color");
|
|
7
|
+
Object.keys(_color).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _color[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _color[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _parseMarkdown = require("./parseMarkdown");
|
|
7
18
|
Object.keys(_parseMarkdown).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/primitives/Text/helpers/index.js"],"sourcesContent":["export * from './parseMarkdown';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/primitives/Text/helpers/index.js"],"sourcesContent":["export * from './color';\nexport * from './parseMarkdown';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
! TODO: Review state: {namespace}-{subject}-{property}-{state}
|
|
3
|
-
EX: --mirai-ui-button-background-hover:
|
|
4
|
-
--mirai-ui-button-secondary-background-hover
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
1
|
:root {
|
|
8
2
|
/* typography */
|
|
9
3
|
--mirai-ui-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
|
@@ -47,18 +41,26 @@
|
|
|
47
41
|
--mirai-ui-error: #d32f2f;
|
|
48
42
|
--mirai-ui-error-background: #fdeded;
|
|
49
43
|
--mirai-ui-error-border: #fad6d6;
|
|
44
|
+
--mirai-ui-error-light: #e58282;
|
|
45
|
+
--mirai-ui-error-dark: #7f1c1c;
|
|
50
46
|
|
|
51
47
|
--mirai-ui-warning: #663c00;
|
|
52
48
|
--mirai-ui-warning-background: #fff4e5;
|
|
53
49
|
--mirai-ui-warning-border: #ffe5c2;
|
|
50
|
+
--mirai-ui-warning-light: #a38a66;
|
|
51
|
+
--mirai-ui-warning-dark: #3d2400;
|
|
54
52
|
|
|
55
53
|
--mirai-ui-success: #1e4620;
|
|
56
54
|
--mirai-ui-success-background: #edf7ed;
|
|
57
55
|
--mirai-ui-success-border: #d5ecd5;
|
|
56
|
+
--mirai-ui-success-light: #789079;
|
|
57
|
+
--mirai-ui-success-dark: #122a13;
|
|
58
58
|
|
|
59
59
|
--mirai-ui-info: #014361;
|
|
60
60
|
--mirai-ui-info-background: #e6f5fd;
|
|
61
61
|
--mirai-ui-info-border: #c6e8fa;
|
|
62
|
+
--mirai-ui-info-light: #678ea0;
|
|
63
|
+
--mirai-ui-info-dark: #01283a;
|
|
62
64
|
|
|
63
65
|
/* spacing */
|
|
64
66
|
--mirai-ui-space-XXS: 4px;
|
|
@@ -92,8 +94,10 @@
|
|
|
92
94
|
|
|
93
95
|
/* focus */
|
|
94
96
|
--mirai-ui-focus-color: var(--mirai-ui-accent-dark);
|
|
95
|
-
--mirai-ui-focus-shadow:
|
|
96
|
-
--mirai-ui-focus-
|
|
97
|
+
--mirai-ui-focus-color-shadow: var(--mirai-ui-accent-border);
|
|
98
|
+
--mirai-ui-focus-width: var(--mirai-ui-space-XXS);
|
|
99
|
+
--mirai-ui-focus-shadow: 0 0 0 var(--mirai-ui-focus-width) var(--mirai-ui-focus-color-shadow);
|
|
100
|
+
--mirai-ui-focus-shadow-error: 0 0 0 var(--mirai-ui-focus-width) var(--mirai-ui-error-border);
|
|
97
101
|
|
|
98
102
|
/* locale */
|
|
99
103
|
--mirai-ui-row-direction: row;
|
|
@@ -173,14 +177,16 @@
|
|
|
173
177
|
--mirai-ui-button-color-active: rgba(255, 255, 255, 0.2);
|
|
174
178
|
--mirai-ui-button-disabled-background: var(--mirai-ui-content-border);
|
|
175
179
|
--mirai-ui-button-disabled-color: var(--mirai-ui-content-light);
|
|
176
|
-
--mirai-ui-button-focus-color: var(--mirai-ui-
|
|
177
|
-
--mirai-ui-button-focus-shadow:
|
|
180
|
+
--mirai-ui-button-focus-color: var(--mirai-ui-focus-color);
|
|
181
|
+
--mirai-ui-button-focus-color-shadow: var(--mirai-ui-focus-color-shadow);
|
|
178
182
|
--mirai-ui-button-font-weight: var(--mirai-ui-font-weight);
|
|
179
183
|
--mirai-ui-button-padding-x: var(--mirai-ui-space-L);
|
|
180
184
|
--mirai-ui-button-padding-y: var(--mirai-ui-space-S);
|
|
181
185
|
--mirai-ui-button-radius: var(--mirai-ui-border-radius);
|
|
182
186
|
--mirai-ui-button-secondary-background: var(--mirai-ui-base);
|
|
183
|
-
--mirai-ui-button-secondary-color
|
|
187
|
+
--mirai-ui-button-secondary-color: var(--mirai-ui-button-background);
|
|
188
|
+
--mirai-ui-button-secondary-focus-color: var(--mirai-ui-button-focus-color);
|
|
189
|
+
--mirai-ui-button-secondary-focus-color-shadow: var(--mirai-ui-focus-color-shadow);
|
|
184
190
|
--mirai-ui-button-squared: calc(var(--mirai-ui-space-M) * 2);
|
|
185
191
|
--mirai-ui-button-transparent-background-active: var(--mirai-ui-accent-background);
|
|
186
192
|
--mirai-ui-button-transparent-color: var(--mirai-ui-content);
|
|
@@ -286,17 +292,16 @@
|
|
|
286
292
|
50%,
|
|
287
293
|
100% {
|
|
288
294
|
background-color: var(--mirai-ui-button-color-active);
|
|
289
|
-
background-color: var();
|
|
290
295
|
}
|
|
291
296
|
}
|
|
292
297
|
|
|
293
298
|
@keyframes mirai-button-secondary-busy {
|
|
294
299
|
0% {
|
|
295
|
-
background-color: var(--mirai-ui-button-background);
|
|
300
|
+
background-color: var(--mirai-ui-button-secondary-background);
|
|
296
301
|
}
|
|
297
302
|
50%,
|
|
298
303
|
100% {
|
|
299
|
-
background-color: var(--mirai-ui-button-secondary-color
|
|
304
|
+
background-color: var(--mirai-ui-button-secondary-color);
|
|
300
305
|
}
|
|
301
306
|
}
|
|
302
307
|
|