@mirai/ui 1.0.19 → 1.0.22
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/build/components/Button/Button.module.css +17 -24
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +2 -22
- package/build/components/Calendar/Calendar.Week.js +3 -3
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.js +6 -3
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.module.css +17 -19
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +61 -183
- package/build/components/InputNumber/InputNumber.js +3 -1
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/InputNumber.module.css +2 -2
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +29 -29
- package/build/components/InputOption/InputOption.module.css +1 -1
- package/build/components/InputText/InputText.module.css +4 -4
- package/build/components/Notification/Notification.js +69 -0
- package/build/components/Notification/Notification.js.map +1 -0
- package/build/components/Notification/Notification.module.css +73 -0
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +351 -0
- package/build/components/Notification/index.js +19 -0
- package/build/components/Notification/index.js.map +1 -0
- package/build/components/Table/Table.module.css +4 -4
- package/build/components/index.js +13 -0
- package/build/components/index.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.module.css +2 -2
- package/build/primitives/Icon/Icon.constants.js +8 -1
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Input/Input.module.css +1 -1
- package/build/primitives/Radio/Radio.module.css +2 -2
- package/build/primitives/Switch/Switch.module.css +2 -2
- package/build/primitives/Text/Text.js +6 -4
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +8 -0
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +10 -0
- package/build/theme/default.theme.css +39 -20
- package/build/theme/theme.js +1 -1
- package/build/theme/theme.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,42 +1,61 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* typography */
|
|
3
|
-
--mirai-ui-font:
|
|
4
|
-
--mirai-ui-input-font:
|
|
3
|
+
--mirai-ui-font: Arial, Regular;
|
|
4
|
+
--mirai-ui-input-font: Arial, Regular;
|
|
5
5
|
--mirai-ui-font-weight: 400;
|
|
6
|
-
--mirai-ui-font-bold:
|
|
6
|
+
--mirai-ui-font-bold: Arial, Regular;
|
|
7
7
|
--mirai-ui-font-bold-weight: 700;
|
|
8
|
-
--mirai-ui-font-size-headline:
|
|
9
|
-
--mirai-ui-font-size-
|
|
10
|
-
--mirai-ui-font-size-
|
|
11
|
-
--mirai-ui-font-size-
|
|
12
|
-
--mirai-ui-
|
|
8
|
+
--mirai-ui-font-size-headline: 18px;
|
|
9
|
+
--mirai-ui-font-size-subheadline: 16px;
|
|
10
|
+
--mirai-ui-font-size-paragraph: 14px;
|
|
11
|
+
--mirai-ui-font-size-action: 14px;
|
|
12
|
+
--mirai-ui-font-size-small: 12px;
|
|
13
|
+
--mirai-ui-input-font-size: 14px;
|
|
14
|
+
--mirai-ui-line-height: 24px;
|
|
13
15
|
--mirai-ui-text-direction: ltr;
|
|
14
16
|
--mirai-ui-text-align: left;
|
|
15
17
|
|
|
16
18
|
/* palette */
|
|
17
19
|
--mirai-ui-base: #ffffff;
|
|
18
20
|
/* !TODO: Change to -text ------------------------------------------------- */
|
|
19
|
-
--mirai-ui-content: #
|
|
20
|
-
--mirai-ui-content-
|
|
21
|
-
--mirai-ui-content-
|
|
21
|
+
--mirai-ui-content: #484848;
|
|
22
|
+
--mirai-ui-content-background: #f6f6f6;
|
|
23
|
+
--mirai-ui-content-border: #e4e4e4;
|
|
24
|
+
--mirai-ui-content-dark: #202020;
|
|
25
|
+
--mirai-ui-content-light: #999999;
|
|
22
26
|
/* !TODO ------------------------------------------------------------------ */
|
|
23
27
|
|
|
24
28
|
--mirai-ui-accent: #3978c5;
|
|
25
|
-
--mirai-ui-accent-
|
|
26
|
-
--mirai-ui-accent-
|
|
27
|
-
--mirai-ui-accent-
|
|
28
|
-
--mirai-ui-
|
|
29
|
-
|
|
30
|
-
--mirai-ui-
|
|
31
|
-
--mirai-ui-
|
|
29
|
+
--mirai-ui-accent-background: #e9f1fc;
|
|
30
|
+
--mirai-ui-accent-border: #b0c9e8;
|
|
31
|
+
--mirai-ui-accent-dark: #224876;
|
|
32
|
+
--mirai-ui-accent-light: #88aedc;
|
|
33
|
+
|
|
34
|
+
--mirai-ui-error: #d14343;
|
|
35
|
+
--mirai-ui-error-background: #fdf4f4;
|
|
36
|
+
--mirai-ui-error-border: #f4b6b6;
|
|
37
|
+
--mirai-ui-error-dark: #7d2828;
|
|
38
|
+
--mirai-ui-error-light: #ee9191;
|
|
39
|
+
|
|
40
|
+
--mirai-ui-success: #52bd94;
|
|
41
|
+
--mirai-ui-success-background: #f5fbf8;
|
|
42
|
+
--mirai-ui-success-border: #dcf2ea;
|
|
43
|
+
--mirai-ui-success-dark: #317159;
|
|
44
|
+
--mirai-ui-success-light: #a3e6cd;
|
|
45
|
+
|
|
46
|
+
--mirai-ui-warning: #ffb020;
|
|
47
|
+
--mirai-ui-warning-background: #fffaf1;
|
|
48
|
+
--mirai-ui-warning-border: #ffdfa6;
|
|
49
|
+
--mirai-ui-warning-dark: #66460d;
|
|
50
|
+
--mirai-ui-warning-light: #ffd079;
|
|
32
51
|
|
|
33
52
|
/* spacing */
|
|
34
53
|
--mirai-ui-space-XS: 8px;
|
|
35
54
|
--mirai-ui-space-S: 12px;
|
|
36
55
|
--mirai-ui-space-M: 16px;
|
|
37
56
|
--mirai-ui-space-L: 24px;
|
|
38
|
-
--mirai-ui-space-XL:
|
|
39
|
-
--mirai-ui-space-XXL:
|
|
57
|
+
--mirai-ui-space-XL: 48px;
|
|
58
|
+
--mirai-ui-space-XXL: 64px;
|
|
40
59
|
|
|
41
60
|
/* layer */
|
|
42
61
|
--mirai-ui-layer-S: 0;
|
package/build/theme/theme.js
CHANGED
|
@@ -20,7 +20,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
22
|
var VAR_DOMAIN = '--mirai-ui-';
|
|
23
|
-
var COLORS = ['accent'
|
|
23
|
+
var COLORS = ['accent'];
|
|
24
24
|
var MAGNITUDES = [400, 300, 200];
|
|
25
25
|
var Theme = {
|
|
26
26
|
get: function get() {
|
package/build/theme/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":["VAR_DOMAIN","COLORS","MAGNITUDES","Theme","get","domain","style","getComputedStyle","document","querySelector","variables","styleSheets","forEach","stylesheet","cssRules","filter","rule","type","name","includes","replace","getPropertyValue","trim","setVariable","variable","value","setProperty","shadeColors","theme","color","undefined","magnitude"],"sources":["../../src/theme/theme.js"],"sourcesContent":["const VAR_DOMAIN = '--mirai-ui-';\n\nimport { camelcase, colorShade } from './helpers';\n\nconst COLORS = ['accent'
|
|
1
|
+
{"version":3,"file":"theme.js","names":["VAR_DOMAIN","COLORS","MAGNITUDES","Theme","get","domain","style","getComputedStyle","document","querySelector","variables","styleSheets","forEach","stylesheet","cssRules","filter","rule","type","name","includes","replace","getPropertyValue","trim","setVariable","variable","value","setProperty","shadeColors","theme","color","undefined","magnitude"],"sources":["../../src/theme/theme.js"],"sourcesContent":["const VAR_DOMAIN = '--mirai-ui-';\n\nimport { camelcase, colorShade } from './helpers';\n\nconst COLORS = ['accent'];\nconst MAGNITUDES = [400, 300, 200];\n\nexport const Theme = {\n get: (domain = VAR_DOMAIN) => {\n const style = getComputedStyle(document.querySelector(':root'));\n\n const variables = {};\n [...document.styleSheets].forEach((stylesheet) => {\n [...stylesheet.cssRules]\n .filter((rule) => rule.type === 1)\n .forEach((rule) => {\n [...rule.style]\n .filter((name) => name.includes(domain))\n .forEach((name) => (variables[camelcase(name.replace(domain, ''))] = style.getPropertyValue(name).trim()));\n });\n });\n\n return variables;\n },\n\n setVariable: (variable, value, domain = VAR_DOMAIN) => {\n const { style } = document.querySelector(':root');\n\n style.setProperty(`${domain}${variable}`, value);\n\n Theme.shadeColors();\n },\n\n shadeColors: () => {\n const theme = Theme.get();\n\n COLORS.filter((color) => theme[color] !== undefined).forEach((color) =>\n MAGNITUDES.forEach((magnitude) =>\n Theme.setVariable(`${color}-${magnitude}`, colorShade(theme[color], magnitude)),\n ),\n );\n },\n};\n"],"mappings":";;;;;;;AAEA;;;;;;;;;;;;;;AAFA,IAAMA,UAAU,GAAG,aAAnB;AAIA,IAAMC,MAAM,GAAG,CAAC,QAAD,CAAf;AACA,IAAMC,UAAU,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAnB;AAEO,IAAMC,KAAK,GAAG;EACnBC,GAAG,EAAE,eAAyB;IAAA,IAAxBC,MAAwB,uEAAfL,UAAe;IAC5B,IAAMM,KAAK,GAAGC,gBAAgB,CAACC,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CAAD,CAA9B;IAEA,IAAMC,SAAS,GAAG,EAAlB;;IACA,mBAAIF,QAAQ,CAACG,WAAb,EAA0BC,OAA1B,CAAkC,UAACC,UAAD,EAAgB;MAChD,mBAAIA,UAAU,CAACC,QAAf,EACGC,MADH,CACU,UAACC,IAAD;QAAA,OAAUA,IAAI,CAACC,IAAL,KAAc,CAAxB;MAAA,CADV,EAEGL,OAFH,CAEW,UAACI,IAAD,EAAU;QACjB,mBAAIA,IAAI,CAACV,KAAT,EACGS,MADH,CACU,UAACG,IAAD;UAAA,OAAUA,IAAI,CAACC,QAAL,CAAcd,MAAd,CAAV;QAAA,CADV,EAEGO,OAFH,CAEW,UAACM,IAAD;UAAA,OAAWR,SAAS,CAAC,wBAAUQ,IAAI,CAACE,OAAL,CAA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