@neovici/cosmoz-tokens 2.1.0 → 3.1.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/package.json +6 -2
- package/src/skeumorphic.css.d.ts +21 -0
- package/src/skeumorphic.css.ts +36 -0
- package/src/spacing.css +11 -11
- package/src/typography.css +27 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-tokens",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Design tokens for Cosmoz web components based on Untitled UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-tokens",
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
"./typography": "./src/typography.css",
|
|
31
31
|
"./spacing": "./src/spacing.css",
|
|
32
32
|
"./shadows": "./src/shadows.css",
|
|
33
|
-
"./semantic": "./src/semantic.css"
|
|
33
|
+
"./semantic": "./src/semantic.css",
|
|
34
|
+
"./skeumorphic": {
|
|
35
|
+
"types": "./src/skeumorphic.css.d.ts",
|
|
36
|
+
"default": "./src/skeumorphic.css.ts"
|
|
37
|
+
}
|
|
34
38
|
},
|
|
35
39
|
"files": [
|
|
36
40
|
"src/"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeuomorphic inner highlight using ::before pseudo-element.
|
|
3
|
+
* Provides a subtle "lit from above" effect that fades toward the bottom.
|
|
4
|
+
*
|
|
5
|
+
* Apply to elements that need the highlight effect. The target element
|
|
6
|
+
* will have `position: relative` applied automatically.
|
|
7
|
+
*
|
|
8
|
+
* Customization via CSS custom properties:
|
|
9
|
+
* - `--skeumorphic-radius`: Inner border radius (default: calc(var(--cz-radius-md) - 1px))
|
|
10
|
+
* - `--skeumorphic-color`: Border color (default: rgba(255, 255, 255, 0.12))
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { skeumorphicHighlight } from '@neovici/cosmoz-tokens/skeumorphic';
|
|
14
|
+
*
|
|
15
|
+
* export const styles = css`
|
|
16
|
+
* .button {
|
|
17
|
+
* ${skeumorphicHighlight}
|
|
18
|
+
* }
|
|
19
|
+
* `;
|
|
20
|
+
*/
|
|
21
|
+
export const skeumorphicHighlight: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { css } from '@pionjs/pion';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Skeuomorphic inner highlight using ::before pseudo-element.
|
|
5
|
+
* Provides a subtle "lit from above" effect that fades toward the bottom.
|
|
6
|
+
*
|
|
7
|
+
* Apply to elements that need the highlight effect. The target element
|
|
8
|
+
* will have `position: relative` applied automatically.
|
|
9
|
+
*
|
|
10
|
+
* Customization via CSS custom properties:
|
|
11
|
+
* - `--skeumorphic-radius`: Inner border radius (default: calc(var(--cz-radius-md) - 1px))
|
|
12
|
+
* - `--skeumorphic-color`: Border color (default: rgba(255, 255, 255, 0.12))
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { skeumorphicHighlight } from '@neovici/cosmoz-tokens/skeumorphic';
|
|
16
|
+
*
|
|
17
|
+
* export const styles = css`
|
|
18
|
+
* .button {
|
|
19
|
+
* ${skeumorphicHighlight}
|
|
20
|
+
* }
|
|
21
|
+
* `;
|
|
22
|
+
*/
|
|
23
|
+
export const skeumorphicHighlight = css`
|
|
24
|
+
position: relative;
|
|
25
|
+
|
|
26
|
+
&::before {
|
|
27
|
+
content: '';
|
|
28
|
+
position: absolute;
|
|
29
|
+
inset: 1px;
|
|
30
|
+
border: 1px solid var(--skeumorphic-color, rgba(255, 255, 255, 0.12));
|
|
31
|
+
border-radius: var(--skeumorphic-radius, calc(var(--cz-radius-md) - 1px));
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
|
|
34
|
+
-webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
|
|
35
|
+
}
|
|
36
|
+
`;
|
package/src/spacing.css
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
7
|
/* Base spacing unit */
|
|
8
|
-
--cz-spacing:
|
|
8
|
+
--cz-spacing: 0.25rem;
|
|
9
9
|
|
|
10
10
|
/* Border radius scale */
|
|
11
|
-
--cz-radius-none:
|
|
12
|
-
--cz-radius-xxs:
|
|
13
|
-
--cz-radius-xs:
|
|
14
|
-
--cz-radius-sm:
|
|
15
|
-
--cz-radius-md:
|
|
16
|
-
--cz-radius-lg:
|
|
17
|
-
--cz-radius-xl:
|
|
18
|
-
--cz-radius-2xl:
|
|
19
|
-
--cz-radius-3xl:
|
|
20
|
-
--cz-radius-4xl:
|
|
11
|
+
--cz-radius-none: 0;
|
|
12
|
+
--cz-radius-xxs: 0.125rem;
|
|
13
|
+
--cz-radius-xs: 0.25rem;
|
|
14
|
+
--cz-radius-sm: 0.375rem;
|
|
15
|
+
--cz-radius-md: 0.5rem;
|
|
16
|
+
--cz-radius-lg: 0.625rem;
|
|
17
|
+
--cz-radius-xl: 0.75rem;
|
|
18
|
+
--cz-radius-2xl: 1rem;
|
|
19
|
+
--cz-radius-3xl: 1.25rem;
|
|
20
|
+
--cz-radius-4xl: 1.5rem;
|
|
21
21
|
--cz-radius-full: 9999px;
|
|
22
22
|
}
|
package/src/typography.css
CHANGED
|
@@ -14,44 +14,44 @@
|
|
|
14
14
|
ui-monospace, 'Roboto Mono', SFMono-Regular, Menlo, Monaco, Consolas,
|
|
15
15
|
'Liberation Mono', 'Courier New', monospace;
|
|
16
16
|
|
|
17
|
-
/* Text sizes
|
|
18
|
-
--cz-text-xs:
|
|
19
|
-
--cz-text-xs-line-height:
|
|
17
|
+
/* Text sizes */
|
|
18
|
+
--cz-text-xs: 0.75rem;
|
|
19
|
+
--cz-text-xs-line-height: 1.5;
|
|
20
20
|
|
|
21
|
-
--cz-text-sm:
|
|
22
|
-
--cz-text-sm-line-height:
|
|
21
|
+
--cz-text-sm: 0.875rem;
|
|
22
|
+
--cz-text-sm-line-height: 1.5;
|
|
23
23
|
|
|
24
|
-
--cz-text-
|
|
25
|
-
--cz-text-
|
|
24
|
+
--cz-text-base: 1rem;
|
|
25
|
+
--cz-text-base-line-height: 1.5;
|
|
26
26
|
|
|
27
|
-
--cz-text-lg:
|
|
28
|
-
--cz-text-lg-line-height:
|
|
27
|
+
--cz-text-lg: 1.125rem;
|
|
28
|
+
--cz-text-lg-line-height: 1.5;
|
|
29
29
|
|
|
30
|
-
--cz-text-xl:
|
|
31
|
-
--cz-text-xl-line-height:
|
|
30
|
+
--cz-text-xl: 1.25rem;
|
|
31
|
+
--cz-text-xl-line-height: 1.5;
|
|
32
32
|
|
|
33
33
|
/* Display sizes */
|
|
34
|
-
--cz-text-display-xs:
|
|
35
|
-
--cz-text-display-xs-line-height:
|
|
34
|
+
--cz-text-display-xs: 1.5rem;
|
|
35
|
+
--cz-text-display-xs-line-height: 1.25;
|
|
36
36
|
|
|
37
|
-
--cz-text-display-sm:
|
|
38
|
-
--cz-text-display-sm-line-height:
|
|
37
|
+
--cz-text-display-sm: 1.875rem;
|
|
38
|
+
--cz-text-display-sm-line-height: 1.25;
|
|
39
39
|
|
|
40
|
-
--cz-text-display-md:
|
|
41
|
-
--cz-text-display-md-line-height:
|
|
42
|
-
--cz-text-display-md-letter-spacing: -0.
|
|
40
|
+
--cz-text-display-md: 2.25rem;
|
|
41
|
+
--cz-text-display-md-line-height: 1.25;
|
|
42
|
+
--cz-text-display-md-letter-spacing: -0.045rem;
|
|
43
43
|
|
|
44
|
-
--cz-text-display-lg:
|
|
45
|
-
--cz-text-display-lg-line-height:
|
|
46
|
-
--cz-text-display-lg-letter-spacing: -0.
|
|
44
|
+
--cz-text-display-lg: 3rem;
|
|
45
|
+
--cz-text-display-lg-line-height: 1.25;
|
|
46
|
+
--cz-text-display-lg-letter-spacing: -0.06rem;
|
|
47
47
|
|
|
48
|
-
--cz-text-display-xl:
|
|
49
|
-
--cz-text-display-xl-line-height:
|
|
50
|
-
--cz-text-display-xl-letter-spacing: -
|
|
48
|
+
--cz-text-display-xl: 3.75rem;
|
|
49
|
+
--cz-text-display-xl-line-height: 1.25;
|
|
50
|
+
--cz-text-display-xl-letter-spacing: -0.075rem;
|
|
51
51
|
|
|
52
|
-
--cz-text-display-2xl:
|
|
53
|
-
--cz-text-display-2xl-line-height:
|
|
54
|
-
--cz-text-display-2xl-letter-spacing: -
|
|
52
|
+
--cz-text-display-2xl: 4.5rem;
|
|
53
|
+
--cz-text-display-2xl-line-height: 1.25;
|
|
54
|
+
--cz-text-display-2xl-letter-spacing: -0.09rem;
|
|
55
55
|
|
|
56
56
|
/* Font weights */
|
|
57
57
|
--cz-font-weight-regular: 400;
|