@mirai/ui 1.0.18 → 1.0.21
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.module.css +6 -6
- 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 -15
- package/build/theme/theme.js +1 -2
- package/build/theme/theme.js.map +1 -1
- package/package.json +1 -1
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() {
|
|
@@ -63,5 +63,4 @@ var Theme = {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
exports.Theme = Theme;
|
|
66
|
-
Theme.shadeColors();
|
|
67
66
|
//# sourceMappingURL=theme.js.map
|
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,CAAaf,MAAb,EA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