@mirai/core 0.1.131 → 0.1.133
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Booking.skeleton.js","names":["isDesktop","useDevice","alignItems","gap","marginTop","minWidth","alignSelf","height","width","marginLeft"],"sources":["../../../src/components/user/Booking.skeleton.jsx"],"sourcesContent":["import { useDevice } from '@mirai/ui';\nimport { View } from '@mirai/ui';\nimport React from 'react';\n\nimport { Skeleton } from '../__internal__/Skeleton';\n\nexport default () => {\n const { isDesktop } = useDevice();\n\n return (\n <View row style={{ alignItems: 'start' }}>\n <View style={{ gap: '0.5rem', marginTop: '2rem', minWidth: '100%' }}>\n <Skeleton style={{ alignSelf: 'center', height: '5rem', width: '8rem' }} />\n <Skeleton style={{ height: '3.5rem' }} />\n <Skeleton style={{ height: '4.5rem' }} />\n <Skeleton style={{ height: '11rem' }} />\n <Skeleton style={{ height: '7.5rem' }} />\n <Skeleton style={{ height: '30rem' }} />\n <Skeleton style={{ height: '5.5rem' }} />\n </View>\n {isDesktop && (\n <View style={{ marginTop: '7.5rem', marginLeft: '1rem' }}>\n <Skeleton style={{ height: '9.5rem', width: '8rem' }} />\n </View>\n )}\n </View>\n );\n};\n"],"mappings":";;;;;;AAAA;AAEA;AAEA;AAAoD;AAAA,eAErC,MAAM;EACnB,MAAM;IAAEA;EAAU,CAAC,GAAG,IAAAC,aAAS,GAAE;EAEjC,oBACE,6BAAC,QAAI;IAAC,GAAG;IAAC,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAQ;EAAE,
|
|
1
|
+
{"version":3,"file":"Booking.skeleton.js","names":["isDesktop","useDevice","alignItems","maxWidth","gap","marginTop","minWidth","alignSelf","height","width","marginLeft"],"sources":["../../../src/components/user/Booking.skeleton.jsx"],"sourcesContent":["import { useDevice } from '@mirai/ui';\nimport { View } from '@mirai/ui';\nimport React from 'react';\n\nimport { Skeleton } from '../__internal__/Skeleton';\n\nexport default () => {\n const { isDesktop } = useDevice();\n\n return (\n <View row style={{ alignItems: 'start', maxWidth: '960px' }}>\n <View style={{ gap: '0.5rem', marginTop: '2rem', minWidth: '100%' }}>\n <Skeleton style={{ alignSelf: 'center', height: '5rem', width: '8rem' }} />\n <Skeleton style={{ height: '3.5rem' }} />\n <Skeleton style={{ height: '4.5rem' }} />\n <Skeleton style={{ height: '11rem' }} />\n <Skeleton style={{ height: '7.5rem' }} />\n <Skeleton style={{ height: '30rem' }} />\n <Skeleton style={{ height: '5.5rem' }} />\n </View>\n {isDesktop && (\n <View style={{ marginTop: '7.5rem', marginLeft: '1rem' }}>\n <Skeleton style={{ height: '9.5rem', width: '8rem' }} />\n </View>\n )}\n </View>\n );\n};\n"],"mappings":";;;;;;AAAA;AAEA;AAEA;AAAoD;AAAA,eAErC,MAAM;EACnB,MAAM;IAAEA;EAAU,CAAC,GAAG,IAAAC,aAAS,GAAE;EAEjC,oBACE,6BAAC,QAAI;IAAC,GAAG;IAAC,KAAK,EAAE;MAAEC,UAAU,EAAE,OAAO;MAAEC,QAAQ,EAAE;IAAQ;EAAE,gBAC1D,6BAAC,QAAI;IAAC,KAAK,EAAE;MAAEC,GAAG,EAAE,QAAQ;MAAEC,SAAS,EAAE,MAAM;MAAEC,QAAQ,EAAE;IAAO;EAAE,gBAClE,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEC,SAAS,EAAE,QAAQ;MAAEC,MAAM,EAAE,MAAM;MAAEC,KAAK,EAAE;IAAO;EAAE,EAAG,eAC3E,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAED,MAAM,EAAE;IAAS;EAAE,EAAG,eACzC,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEA,MAAM,EAAE;IAAS;EAAE,EAAG,eACzC,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEA,MAAM,EAAE;IAAQ;EAAE,EAAG,eACxC,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEA,MAAM,EAAE;IAAS;EAAE,EAAG,eACzC,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEA,MAAM,EAAE;IAAQ;EAAE,EAAG,eACxC,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEA,MAAM,EAAE;IAAS;EAAE,EAAG,CACpC,EACNR,SAAS,iBACR,6BAAC,QAAI;IAAC,KAAK,EAAE;MAAEK,SAAS,EAAE,QAAQ;MAAEK,UAAU,EAAE;IAAO;EAAE,gBACvD,6BAAC,kBAAQ;IAAC,KAAK,EAAE;MAAEF,MAAM,EAAE,QAAQ;MAAEC,KAAK,EAAE;IAAO;EAAE,EAAG,CAE3D,CACI;AAEX,CAAC;AAAA"}
|
package/build/helpers/theme.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.theme = void 0;
|
|
|
7
7
|
const VARIABLES = {
|
|
8
8
|
'--mirai-ui-accent': '--corporative-color'
|
|
9
9
|
};
|
|
10
|
+
const BROWSER_FONTS = ['"system-ui"', 'serif', '"Times New Roman"'];
|
|
10
11
|
const FONT_FAMILY = 'font-family';
|
|
11
12
|
const theme = () => {
|
|
12
13
|
const processed = [];
|
|
@@ -19,19 +20,19 @@ const theme = () => {
|
|
|
19
20
|
// CSS variables
|
|
20
21
|
Object.entries(VARIABLES).forEach(_ref => {
|
|
21
22
|
let [variable, legacy] = _ref;
|
|
22
|
-
setVariable(variable, `var(${legacy})`);
|
|
23
|
+
if (getComputedStyle(document.documentElement).getPropertyValue(legacy)) setVariable(variable, `var(${legacy})`);
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
// CSS Selectors
|
|
26
27
|
function getFont() {
|
|
27
28
|
let font;
|
|
28
29
|
const bodyFont = window.getComputedStyle(document.body).getPropertyValue(FONT_FAMILY);
|
|
29
|
-
if (bodyFont && bodyFont
|
|
30
|
+
if (bodyFont && !BROWSER_FONTS.includes(bodyFont)) {
|
|
30
31
|
font = bodyFont;
|
|
31
32
|
} else {
|
|
32
33
|
const miBe = document.querySelector('.mi-be');
|
|
33
34
|
const miBeFont = miBe ? window.getComputedStyle(miBe).getPropertyValue(FONT_FAMILY) : undefined;
|
|
34
|
-
if (miBeFont && miBeFont
|
|
35
|
+
if (miBeFont && !BROWSER_FONTS.includes(miBeFont)) font = miBeFont;
|
|
35
36
|
}
|
|
36
37
|
return font;
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":["VARIABLES","FONT_FAMILY","theme","processed","setVariable","key","value","includes","document","documentElement","style","setProperty","trim","push","Object","entries","forEach","variable","legacy","
|
|
1
|
+
{"version":3,"file":"theme.js","names":["VARIABLES","BROWSER_FONTS","FONT_FAMILY","theme","processed","setVariable","key","value","includes","document","documentElement","style","setProperty","trim","push","Object","entries","forEach","variable","legacy","getComputedStyle","getPropertyValue","getFont","font","bodyFont","window","body","miBe","querySelector","miBeFont","undefined"],"sources":["../../src/helpers/theme.js"],"sourcesContent":["const VARIABLES = {\n '--mirai-ui-accent': '--corporative-color',\n};\n\nconst BROWSER_FONTS = ['\"system-ui\"', 'serif', '\"Times New Roman\"'];\nconst FONT_FAMILY = 'font-family';\n\nexport const theme = () => {\n const processed = [];\n\n const setVariable = (key, value) => {\n if (!value || processed.includes(key)) return;\n\n document.documentElement.style.setProperty(key, value.trim());\n processed.push(key);\n };\n\n // CSS variables\n Object.entries(VARIABLES).forEach(([variable, legacy]) => {\n if (getComputedStyle(document.documentElement).getPropertyValue(legacy)) setVariable(variable, `var(${legacy})`);\n });\n\n // CSS Selectors\n function getFont() {\n let font;\n\n const bodyFont = window.getComputedStyle(document.body).getPropertyValue(FONT_FAMILY);\n if (bodyFont && !BROWSER_FONTS.includes(bodyFont)) {\n font = bodyFont;\n } else {\n const miBe = document.querySelector('.mi-be');\n const miBeFont = miBe ? window.getComputedStyle(miBe).getPropertyValue(FONT_FAMILY) : undefined;\n if (miBeFont && !BROWSER_FONTS.includes(miBeFont)) font = miBeFont;\n }\n\n return font;\n }\n\n const font = get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