@autofleet/theme 0.0.0
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 +9 -0
- package/package.json +8 -0
- package/src/colors/atomic-colors.d.ts +132 -0
- package/src/colors/atomic-colors.js +150 -0
- package/src/colors/atomic-colors.js.map +1 -0
- package/src/colors/index.d.ts +12 -0
- package/src/colors/index.js +12 -0
- package/src/colors/index.js.map +1 -0
- package/src/colors/tokens/color-token-mapping.d.ts +8 -0
- package/src/colors/tokens/color-token-mapping.js +885 -0
- package/src/colors/tokens/color-token-mapping.js.map +1 -0
- package/src/colors/tokens/color-tokens.d.ts +17 -0
- package/src/colors/tokens/color-tokens.js +97 -0
- package/src/colors/tokens/color-tokens.js.map +1 -0
- package/src/colors-utils.d.ts +57 -0
- package/src/colors-utils.js +104 -0
- package/src/colors-utils.js.map +1 -0
- package/src/const.d.ts +4 -0
- package/src/const.js +5 -0
- package/src/const.js.map +1 -0
- package/src/fonts/atomic-fonts.d.ts +13 -0
- package/src/fonts/atomic-fonts.js +75 -0
- package/src/fonts/atomic-fonts.js.map +1 -0
- package/src/fonts/index.d.ts +20 -0
- package/src/fonts/index.js +22 -0
- package/src/fonts/index.js.map +1 -0
- package/src/index.d.ts +76 -0
- package/src/index.js +15 -0
- package/src/index.js.map +1 -0
- package/src/shadow/index.d.ts +19 -0
- package/src/shadow/index.js +33 -0
- package/src/shadow/index.js.map +1 -0
- package/src/spacing/border-radius.d.ts +8 -0
- package/src/spacing/border-radius.js +9 -0
- package/src/spacing/border-radius.js.map +1 -0
- package/src/spacing/index.d.ts +25 -0
- package/src/spacing/index.js +7 -0
- package/src/spacing/index.js.map +1 -0
- package/src/spacing/spacing.d.ts +15 -0
- package/src/spacing/spacing.js +16 -0
- package/src/spacing/spacing.js.map +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SPACING } from '../spacing/spacing';
|
|
2
|
+
const changeColorAlpha = (color, newAlpha) => {
|
|
3
|
+
if (!color.startsWith('rgba('))
|
|
4
|
+
return color;
|
|
5
|
+
return color.replace(/(rgba\(\d{1,3},\s?\d{1,3},\s?\d{1,3}(?:,|\s?\/)\s?)((?:\d\.)?\d)(\))/, `$1${newAlpha}$3`);
|
|
6
|
+
};
|
|
7
|
+
const getLowShadow = (color, opacity = 12) => `${SPACING.NONE} ${SPACING.XS} ${SPACING.SM} ${changeColorAlpha(color, opacity / 100)}`;
|
|
8
|
+
const getMedShadow = (color, opacity = 12) => `${SPACING.NONE} ${SPACING.SM} ${SPACING.LG} ${changeColorAlpha(color, opacity / 100)}`;
|
|
9
|
+
const getHighShadow = (color, opacity = 16) => `${SPACING.NONE} ${SPACING.LG} ${SPACING['5XL']} ${changeColorAlpha(color, opacity / 100)}`;
|
|
10
|
+
export const getThemeShadows = (colors) => ({
|
|
11
|
+
'shadow-map-element': `${SPACING.NONE} 3px ${SPACING.LG} ${changeColorAlpha(colors['neutral-dark'], 0.32)}`,
|
|
12
|
+
// Neutral
|
|
13
|
+
'shadow-neutral-low': getLowShadow(colors['neutral-dark'], 8),
|
|
14
|
+
'shadow-neutral-medium': getMedShadow(colors['neutral-dark'], 8),
|
|
15
|
+
'shadow-neutral-high': getHighShadow(colors['neutral-dark']),
|
|
16
|
+
// Info
|
|
17
|
+
'shadow-info-low': getLowShadow(colors.info),
|
|
18
|
+
'shadow-info-medium': getMedShadow(colors.info),
|
|
19
|
+
'shadow-info-high': getHighShadow(colors.info),
|
|
20
|
+
// Success
|
|
21
|
+
'shadow-success-low': getLowShadow(colors.success),
|
|
22
|
+
'shadow-success-medium': getMedShadow(colors.success),
|
|
23
|
+
'shadow-success-high': getHighShadow(colors.success),
|
|
24
|
+
// Warning
|
|
25
|
+
'shadow-warning-low': getLowShadow(colors.warning),
|
|
26
|
+
'shadow-warning-medium': getMedShadow(colors.warning),
|
|
27
|
+
'shadow-warning-high': getHighShadow(colors.warning),
|
|
28
|
+
// Error
|
|
29
|
+
'shadow-error-low': getLowShadow(colors.error),
|
|
30
|
+
'shadow-error-medium': getMedShadow(colors.error),
|
|
31
|
+
'shadow-error-high': getHighShadow(colors.error),
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/theme/src/shadow/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAE,EAAE;IAC3D,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,OAAO,KAAK,CAAC,OAAO,CAClB,sEAAsE,EACtE,KAAK,QAAQ,IAAI,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CACnD,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,IAAI,OAAO,CAAC,EAAE,IAAI,gBAAgB,CAC7D,KAAK,EACL,OAAO,GAAG,GAAG,CACd,EAAW,CAAC;AACf,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CACnD,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,IAAI,OAAO,CAAC,EAAE,IAAI,gBAAgB,CAC7D,KAAK,EACL,OAAO,GAAG,GAAG,CACd,EAAW,CAAC;AACf,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CACpD,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,gBAAgB,CACjE,KAAK,EACL,OAAO,GAAG,GAAG,CACd,EAAW,CAAC;AAEf,MAAM,CAAC,MAAM,eAAe,GAAG,C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src/spacing/border-radius.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const getThemeSpacings: () => {
|
|
2
|
+
borderRadius: {
|
|
3
|
+
readonly NONE: "0px";
|
|
4
|
+
readonly XS: "2px";
|
|
5
|
+
readonly SM: "4px";
|
|
6
|
+
readonly MD: "6px";
|
|
7
|
+
readonly LG: "8px";
|
|
8
|
+
readonly XL: "16px";
|
|
9
|
+
};
|
|
10
|
+
spacings: {
|
|
11
|
+
readonly NONE: "0px";
|
|
12
|
+
readonly XS: "2px";
|
|
13
|
+
readonly SM: "4px";
|
|
14
|
+
readonly MD: "6px";
|
|
15
|
+
readonly LG: "8px";
|
|
16
|
+
readonly XL: "12px";
|
|
17
|
+
readonly '2XL': "16px";
|
|
18
|
+
readonly '3XL': "24px";
|
|
19
|
+
readonly '4XL': "32px";
|
|
20
|
+
readonly '5XL': "40px";
|
|
21
|
+
readonly '6XL': "48px";
|
|
22
|
+
readonly '7XL': "56px";
|
|
23
|
+
readonly '8XL': "64px";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/theme/src/spacing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC;IACrC,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,OAAO;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const SPACING: {
|
|
2
|
+
readonly NONE: "0px";
|
|
3
|
+
readonly XS: "2px";
|
|
4
|
+
readonly SM: "4px";
|
|
5
|
+
readonly MD: "6px";
|
|
6
|
+
readonly LG: "8px";
|
|
7
|
+
readonly XL: "12px";
|
|
8
|
+
readonly '2XL': "16px";
|
|
9
|
+
readonly '3XL': "24px";
|
|
10
|
+
readonly '4XL': "32px";
|
|
11
|
+
readonly '5XL': "40px";
|
|
12
|
+
readonly '6XL': "48px";
|
|
13
|
+
readonly '7XL': "56px";
|
|
14
|
+
readonly '8XL': "64px";
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const SPACING = {
|
|
2
|
+
NONE: '0px',
|
|
3
|
+
XS: '2px',
|
|
4
|
+
SM: '4px',
|
|
5
|
+
MD: '6px',
|
|
6
|
+
LG: '8px',
|
|
7
|
+
XL: '12px',
|
|
8
|
+
'2XL': '16px',
|
|
9
|
+
'3XL': '24px',
|
|
10
|
+
'4XL': '32px',
|
|
11
|
+
'5XL': '40px',
|
|
12
|
+
'6XL': '48px',
|
|
13
|
+
'7XL': '56px',
|
|
14
|
+
'8XL': '64px',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../../../../packages/theme/src/spacing/spacing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACL,CAAC"}
|