@companycam/slab-web 0.0.21 → 0.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/package.json +1 -1
- package/shared/tokens/build/css/base.css +1 -1
- package/shared/tokens/build/css/dark_environment.css +1 -1
- package/shared/tokens/build/css/light_environment.css +1 -1
- package/shared/tokens/build/js/tokens.js +1 -1
- package/shared/tokens/build/scss/tokens.scss +1 -1
- package/shared/styles.js +0 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on
|
|
3
|
+
// Generated on Tue, 23 May 2023 15:10:09 GMT
|
|
4
4
|
|
|
5
5
|
$cc_color_brand_primary: #0967d2; // Our beloved CoCam deep blue. Use only for branding purposes.
|
|
6
6
|
$cc_color_brand_secondary: #142334; // Complements our primary blue. Use only for branding purposes.
|
package/shared/styles.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as tokens from "./tokens/build/js/tokens.js";
|
|
2
|
-
|
|
3
|
-
// Avatar / AvatarExternal
|
|
4
|
-
|
|
5
|
-
const VALID_AVATAR_SIZES = ["tiny", "small", "medium", "large"];
|
|
6
|
-
|
|
7
|
-
export const getFontSize = ({ size = "medium" }) => {
|
|
8
|
-
if (typeof size === "number") {
|
|
9
|
-
return `font-size: ${size / 2.5}px`;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const fontSizes = {
|
|
13
|
-
tiny: `font-size: 8px;`,
|
|
14
|
-
small: `font-size: ${tokens.size_text_xxs}px;`,
|
|
15
|
-
medium: `font-size: ${tokens.size_text_xs}px;`,
|
|
16
|
-
large: `font-size: ${tokens.size_text_m}px;`,
|
|
17
|
-
};
|
|
18
|
-
return fontSizes[size];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const getAvatarSize = ({ size = "medium" }) => {
|
|
22
|
-
if (typeof size === "number" || /^\d+$/.test(size)) {
|
|
23
|
-
return parseInt(size, 10);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const avatarSizes = {
|
|
27
|
-
large: tokens.size_avatar_l,
|
|
28
|
-
medium: tokens.size_avatar_m,
|
|
29
|
-
small: tokens.size_avatar_s,
|
|
30
|
-
tiny: tokens.size_avatar_xs,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
if (!VALID_AVATAR_SIZES.includes(size)) {
|
|
34
|
-
return avatarSizes["medium"];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return avatarSizes[size];
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// End Avatar / AvatarExternal
|