@eluan/tokens 0.5.0 → 0.6.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 +30 -7
- package/dist/curves.css +60 -12
- package/dist/fonts-eluan.css +5 -0
- package/dist/fonts.css +3 -3
- package/dist/index.d.ts +58 -1
- package/dist/index.js +24 -7
- package/dist/modes.css +214 -63
- package/dist/primitives.css +3 -0
- package/dist/spacing.css +42 -129
- package/dist/styles.css +117 -0
- package/dist/themes.css +74 -77
- package/dist/tokens.css +2 -1
- package/dist/typeset.css +108 -0
- package/package.json +3 -3
- package/dist/fonts-minimal.css +0 -2
package/dist/styles.css
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
* The Eluan look
|
|
3
|
+
* One way an Eluan app is put together. There is no style to choose: these
|
|
4
|
+
* tokens are the look, and components read them instead of deciding for
|
|
5
|
+
* themselves what is raised, what is sunken and what lies flat.
|
|
6
|
+
*
|
|
7
|
+
* ground The page is paper: a tinted off-white (near-black in dark).
|
|
8
|
+
* Navigation sits straight on it, with no line between it and
|
|
9
|
+
* the content.
|
|
10
|
+
* flat Cards, tables, chips, the sidebar and its items. A surface
|
|
11
|
+
* fill and a hairline border, no shadow. Things you read.
|
|
12
|
+
* raised Buttons, select triggers, the selected segment, thumbs. The
|
|
13
|
+
* surface colour with a soft shadow. Things you press.
|
|
14
|
+
* lit The primary action only. Raised, in the accent, with a light
|
|
15
|
+
* on its top edge and a glow of its own colour underneath.
|
|
16
|
+
* recessed Inputs and the tracks of segmented controls, switches and
|
|
17
|
+
* sliders. Cut into the page. Things you fill or slide.
|
|
18
|
+
* floating Dialogs, menus and toasts use the elevation levels in
|
|
19
|
+
* modes.css; nothing here.
|
|
20
|
+
*
|
|
21
|
+
* Shape is in curves.css: controls are capsules (--control-radius), surfaces
|
|
22
|
+
* take --surface-radius.
|
|
23
|
+
*
|
|
24
|
+
* Nothing here names a colour. Every value is a theme or mode token, so a
|
|
25
|
+
* generated theme carries through, and the accent reaches the lit button's
|
|
26
|
+
* glow and the focus ring without a component knowing it.
|
|
27
|
+
*
|
|
28
|
+
* Declared on :root and on every [data-mode] and [data-theme] element, so a
|
|
29
|
+
* subtree with its own mode or theme resolves the look against its own colours.
|
|
30
|
+
* ============================================ */
|
|
31
|
+
|
|
32
|
+
/* The ground, the raised and recessed fills and the thumb, per mode. In light
|
|
33
|
+
* a raised control is the white surface and a well is a hairline shade. In
|
|
34
|
+
* dark the control rises a step above the card, wells and fields are cut
|
|
35
|
+
* darker than the ground, and the thumb stays light. */
|
|
36
|
+
:root,
|
|
37
|
+
[data-mode="light"],
|
|
38
|
+
[data-mode="Light"],
|
|
39
|
+
[data-mode="dim"],
|
|
40
|
+
[data-mode="Dim"] {
|
|
41
|
+
--shell-ground: var(--backgrounds-secondary);
|
|
42
|
+
--control-bg: var(--backgrounds-primary);
|
|
43
|
+
--control-bg-hover: var(--backgrounds-secondary);
|
|
44
|
+
--control-well-bg: var(--backgrounds-tertiary);
|
|
45
|
+
--control-field-bg: var(--backgrounds-primary);
|
|
46
|
+
--control-thumb-bg: var(--color-neutral-0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-mode="dark"],
|
|
50
|
+
[data-mode="Dark"] {
|
|
51
|
+
--shell-ground: var(--backgrounds-secondary);
|
|
52
|
+
--control-bg: var(--backgrounds-tertiary);
|
|
53
|
+
--control-bg-hover: var(--backgrounds-quaternary);
|
|
54
|
+
--control-well-bg: color-mix(in oklch, var(--backgrounds-secondary) 78%, black);
|
|
55
|
+
--control-field-bg: color-mix(in oklch, var(--backgrounds-secondary) 78%, black);
|
|
56
|
+
--control-thumb-bg: var(--foregrounds-primary);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Labels in a well. Muted text is tuned for the card and the ground; a light
|
|
60
|
+
* well is a shade darker than both, so its labels take the next step of ink. */
|
|
61
|
+
:root,
|
|
62
|
+
[data-mode="light"],
|
|
63
|
+
[data-mode="Light"] {
|
|
64
|
+
--control-well-fg: var(--foregrounds-secondary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-mode="dim"],
|
|
68
|
+
[data-mode="Dim"],
|
|
69
|
+
[data-mode="dark"],
|
|
70
|
+
[data-mode="Dark"] {
|
|
71
|
+
--control-well-fg: var(--interactive-fg-alt);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:root,
|
|
75
|
+
[data-mode],
|
|
76
|
+
[data-theme] {
|
|
77
|
+
/* flat */
|
|
78
|
+
--surface-bg: var(--container-bg);
|
|
79
|
+
--surface-border: var(--container-border);
|
|
80
|
+
--surface-shadow: none;
|
|
81
|
+
--nav-active-bg: var(--surface-border);
|
|
82
|
+
--nav-active-shadow: none;
|
|
83
|
+
/* A chosen row, tree node, page or pressed toggle: a step past hover, in
|
|
84
|
+
* ink. The accent is for switches and checks, not for a row in a list. */
|
|
85
|
+
--item-selected-bg: color-mix(
|
|
86
|
+
in oklch,
|
|
87
|
+
var(--backgrounds-tertiary),
|
|
88
|
+
var(--backgrounds-quaternary)
|
|
89
|
+
);
|
|
90
|
+
--item-selected-fg: var(--foregrounds-primary);
|
|
91
|
+
|
|
92
|
+
/* raised (fills are per mode, above) */
|
|
93
|
+
--control-shadow: var(--elevation-control);
|
|
94
|
+
--control-thumb-shadow: var(--elevation-thumb);
|
|
95
|
+
|
|
96
|
+
/* lit: light on the top edge, a dark lip of the accent, a glow of it below */
|
|
97
|
+
--control-solid-sheen: linear-gradient(
|
|
98
|
+
to bottom,
|
|
99
|
+
color-mix(in oklch, white 14%, transparent),
|
|
100
|
+
transparent
|
|
101
|
+
);
|
|
102
|
+
--control-solid-shadow:
|
|
103
|
+
inset 0 1px 0 color-mix(in oklch, white 35%, transparent),
|
|
104
|
+
0 1px 2px color-mix(in oklch, color-mix(in oklch, var(--action-primary-bg) 50%, black) 30%, transparent),
|
|
105
|
+
0 5px 12px color-mix(in oklch, var(--action-primary-bg) 28%, transparent);
|
|
106
|
+
|
|
107
|
+
/* recessed */
|
|
108
|
+
--control-well-shadow: var(--elevation-well);
|
|
109
|
+
--control-field-border: var(--interactive-border-alt);
|
|
110
|
+
--control-field-shadow: var(--elevation-field);
|
|
111
|
+
|
|
112
|
+
/* focus: the accent. A field takes it on its border with a soft ring; every
|
|
113
|
+
* other control gets it as its focus outline. */
|
|
114
|
+
--control-focus-border: var(--action-primary-bg);
|
|
115
|
+
--control-focus-ring: 0 0 0 3px color-mix(in oklch, var(--action-primary-bg) 18%, transparent);
|
|
116
|
+
--focus-ring: var(--action-primary-bg);
|
|
117
|
+
}
|
package/dist/themes.css
CHANGED
|
@@ -1,122 +1,119 @@
|
|
|
1
1
|
/* ============================================
|
|
2
2
|
* LAYER 3: Themes
|
|
3
3
|
* Component-level tokens that define the visual identity.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
4
|
+
*
|
|
5
|
+
* `eluan` is the built-in theme: concrete greys, a warm tinted ramp, with
|
|
6
|
+
* blaze orange as the accent. It is declared on :root as well, so a page with
|
|
7
|
+
* no data-theme, or an unknown one, still gets a complete theme.
|
|
8
|
+
*
|
|
9
|
+
* Define your own with createTheme() from @eluan/core, or generate one with
|
|
10
|
+
* @eluan/theme-generator: a custom theme inherits this token set and
|
|
11
|
+
* overrides only what it names.
|
|
12
|
+
*
|
|
8
13
|
* Categories: action, container, interactive, destructive,
|
|
9
14
|
* cautionary, important, informative, positive, dataviz
|
|
10
15
|
* ============================================ */
|
|
11
16
|
@import "./modes.css";
|
|
12
|
-
/* ----------------------------------------
|
|
13
|
-
* Neutral ramp — theme-selected alias
|
|
14
|
-
* Each theme points --color-neutral-* at the raw scale that carries its
|
|
15
|
-
* monochrome identity; modes.css derives backgrounds/foregrounds from it,
|
|
16
|
-
* so mode step logic stays shared while the ramp swaps per brand.
|
|
17
|
-
* Custom themes can remap the ramp via createTheme token overrides.
|
|
18
|
-
* The :root default mirrors `minimal` (the sole built-in theme) so unthemed
|
|
19
|
-
* scopes still resolve, and must precede the theme blocks so the attribute
|
|
20
|
-
* selectors win the cascade.
|
|
21
|
-
* ---------------------------------------- */
|
|
22
|
-
:root {
|
|
23
|
-
--color-neutral-0: var(--color-mono-0);
|
|
24
|
-
--color-neutral-50: var(--color-mono-50);
|
|
25
|
-
--color-neutral-100: var(--color-mono-100);
|
|
26
|
-
--color-neutral-200: var(--color-mono-200);
|
|
27
|
-
--color-neutral-300: var(--color-mono-300);
|
|
28
|
-
--color-neutral-400: var(--color-mono-400);
|
|
29
|
-
--color-neutral-500: var(--color-mono-500);
|
|
30
|
-
--color-neutral-600: var(--color-mono-600);
|
|
31
|
-
--color-neutral-700: var(--color-mono-700);
|
|
32
|
-
--color-neutral-800: var(--color-mono-800);
|
|
33
|
-
--color-neutral-900: var(--color-mono-900);
|
|
34
|
-
--color-neutral-950: var(--color-mono-950);
|
|
35
|
-
}
|
|
36
17
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
--color-neutral-
|
|
47
|
-
--color-neutral-
|
|
48
|
-
--color-neutral-
|
|
49
|
-
--color-neutral-
|
|
50
|
-
--color-neutral-
|
|
18
|
+
:root,
|
|
19
|
+
[data-theme="eluan"] {
|
|
20
|
+
/* ----------------------------------------
|
|
21
|
+
* Neutral ramp
|
|
22
|
+
* --color-neutral-* is the grey every mode builds its surfaces, text and
|
|
23
|
+
* borders from (modes.css). A theme chooses the ramp; the mode logic stays
|
|
24
|
+
* shared. Eluan's is concrete: paper at 50, the hairline at 100, a field
|
|
25
|
+
* border at 200, ink at 800, the dark ground at 950.
|
|
26
|
+
* ---------------------------------------- */
|
|
27
|
+
--color-neutral-0: var(--color-concrete-0);
|
|
28
|
+
--color-neutral-50: var(--color-concrete-50);
|
|
29
|
+
--color-neutral-100: var(--color-concrete-100);
|
|
30
|
+
--color-neutral-200: var(--color-concrete-200);
|
|
31
|
+
--color-neutral-300: var(--color-concrete-300);
|
|
32
|
+
--color-neutral-400: var(--color-concrete-400);
|
|
33
|
+
--color-neutral-500: var(--color-concrete-500);
|
|
34
|
+
--color-neutral-600: var(--color-concrete-600);
|
|
35
|
+
--color-neutral-700: var(--color-concrete-700);
|
|
36
|
+
--color-neutral-800: var(--color-concrete-800);
|
|
37
|
+
--color-neutral-900: var(--color-concrete-900);
|
|
38
|
+
--color-neutral-950: var(--color-concrete-950);
|
|
51
39
|
--font-heading: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
52
40
|
--font-body: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
53
41
|
--font-mono: "Paper Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
54
42
|
--container-bg: var(--backgrounds-primary);
|
|
55
|
-
|
|
43
|
+
/* A quiet fill inside a surface: a table foot, an avatar, a skeleton, a
|
|
44
|
+
* neutral chip. The hairline's shade used as a fill, so it reads on the card
|
|
45
|
+
* and on the ground in every mode without rising to a control's step. */
|
|
46
|
+
--container-bg-alt: var(--borders-primary);
|
|
56
47
|
--container-bg-inverse: var(--foregrounds-secondary);
|
|
57
|
-
--container-border: var(--
|
|
58
|
-
--container-border-alt: var(--
|
|
48
|
+
--container-border: var(--borders-primary);
|
|
49
|
+
--container-border-alt: var(--borders-secondary);
|
|
59
50
|
--container-border-inverse: var(--foregrounds-tertiary);
|
|
60
51
|
--container-fg: var(--foregrounds-primary);
|
|
61
52
|
--container-fg-alt: var(--foregrounds-secondary);
|
|
62
53
|
--container-fg-inverse: var(--backgrounds-primary);
|
|
63
54
|
--interactive-bg: var(--backgrounds-primary);
|
|
64
55
|
--interactive-bg-alt: var(--backgrounds-secondary);
|
|
65
|
-
--interactive-bg-alt2: var(--
|
|
56
|
+
--interactive-bg-alt2: var(--borders-primary);
|
|
66
57
|
--interactive-bg-disabled: var(--backgrounds-tertiary);
|
|
67
58
|
--interactive-bg-hover: var(--backgrounds-tertiary);
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
/* Switches, sliders, checks, progress and the chosen day take the accent
|
|
60
|
+
* from the primary action, so a theme that changes one changes them all. A
|
|
61
|
+
* chosen row or item is quiet instead: --item-selected-* in styles.css. */
|
|
62
|
+
--interactive-bg-active: var(--action-primary-bg);
|
|
63
|
+
--interactive-bg-selected: var(--action-primary-bg);
|
|
70
64
|
--interactive-bg-inverse: var(--foregrounds-primary);
|
|
71
|
-
--interactive-border: var(--
|
|
72
|
-
--interactive-border-alt: var(--
|
|
73
|
-
--interactive-border-disabled: var(--
|
|
65
|
+
--interactive-border: var(--borders-primary);
|
|
66
|
+
--interactive-border-alt: var(--borders-secondary);
|
|
67
|
+
--interactive-border-disabled: var(--borders-primary);
|
|
74
68
|
--interactive-fg: var(--foregrounds-primary);
|
|
75
69
|
--interactive-fg-alt: var(--foregrounds-tertiary);
|
|
76
70
|
--interactive-fg-readonly: var(--foregrounds-secondary);
|
|
77
71
|
--interactive-fg-disabled: var(--foregrounds-quinary);
|
|
78
|
-
--interactive-fg-active: var(--
|
|
79
|
-
--interactive-fg-selected: var(--
|
|
72
|
+
--interactive-fg-active: var(--action-primary-fg);
|
|
73
|
+
--interactive-fg-selected: var(--action-primary-fg);
|
|
80
74
|
--interactive-fg-inverse: var(--backgrounds-primary);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
--action-primary-bg
|
|
85
|
-
--action-primary-bg-
|
|
75
|
+
/* The accent as picked, with white on it, in every mode. That is about 3.3:1:
|
|
76
|
+
* below the 4.5:1 text floor, kept on purpose for the look. A theme whose
|
|
77
|
+
* accent is light should set a dark --action-primary-fg. */
|
|
78
|
+
--action-primary-bg: var(--color-blazeorange-500);
|
|
79
|
+
--action-primary-bg-hover: var(--color-blazeorange-600);
|
|
80
|
+
--action-primary-bg-active: var(--color-blazeorange-600);
|
|
81
|
+
--action-primary-bg-selected: var(--color-blazeorange-600);
|
|
82
|
+
--action-primary-bg-disabled: var(--blazeorange-tint);
|
|
86
83
|
--action-primary-bg-inverse: var(--backgrounds-primary);
|
|
87
|
-
--action-primary-fg: var(--
|
|
88
|
-
--action-primary-fg-disabled: var(--
|
|
89
|
-
--action-primary-fg-active: var(--
|
|
90
|
-
--action-primary-fg-selected: var(--
|
|
91
|
-
--action-primary-fg-inverse: var(--
|
|
84
|
+
--action-primary-fg: var(--color-neutral-0);
|
|
85
|
+
--action-primary-fg-disabled: var(--foregrounds-quinary);
|
|
86
|
+
--action-primary-fg-active: var(--color-neutral-0);
|
|
87
|
+
--action-primary-fg-selected: var(--color-neutral-0);
|
|
88
|
+
--action-primary-fg-inverse: var(--blazeorange-foreground);
|
|
92
89
|
--action-secondary-bg-hover: var(--backgrounds-tertiary);
|
|
93
|
-
--action-secondary-bg-active: var(--
|
|
94
|
-
--action-secondary-bg-selected: var(--
|
|
90
|
+
--action-secondary-bg-active: var(--backgrounds-quaternary);
|
|
91
|
+
--action-secondary-bg-selected: var(--backgrounds-quaternary);
|
|
95
92
|
--action-secondary-bg-disabled: var(--backgrounds-tertiary);
|
|
96
|
-
--action-secondary-border: var(--
|
|
97
|
-
--action-secondary-border-alt: var(--
|
|
98
|
-
--action-secondary-border-disabled: var(--
|
|
93
|
+
--action-secondary-border: var(--borders-secondary);
|
|
94
|
+
--action-secondary-border-alt: var(--foregrounds-quaternary);
|
|
95
|
+
--action-secondary-border-disabled: var(--borders-primary);
|
|
99
96
|
--action-secondary-border-inverse: var(--backgrounds-secondary);
|
|
100
97
|
--action-secondary-fg-alt: var(--foregrounds-primary);
|
|
101
98
|
--action-secondary-fg-disabled: var(--foregrounds-quinary);
|
|
102
|
-
--action-secondary-fg-active: var(--
|
|
103
|
-
--action-secondary-fg-selected: var(--
|
|
99
|
+
--action-secondary-fg-active: var(--foregrounds-primary);
|
|
100
|
+
--action-secondary-fg-selected: var(--foregrounds-primary);
|
|
104
101
|
--action-secondary-fg-inverse: var(--foregrounds-primary);
|
|
105
102
|
--action-tertiary-bg: var(--backgrounds-primary);
|
|
106
103
|
--action-tertiary-bg-alt: var(--backgrounds-secondary);
|
|
107
104
|
--action-tertiary-bg-hover: var(--backgrounds-secondary);
|
|
108
|
-
--action-tertiary-bg-active: var(--
|
|
109
|
-
--action-tertiary-bg-selected: var(--
|
|
105
|
+
--action-tertiary-bg-active: var(--backgrounds-tertiary);
|
|
106
|
+
--action-tertiary-bg-selected: var(--backgrounds-tertiary);
|
|
110
107
|
--action-tertiary-bg-disabled: var(--backgrounds-primary);
|
|
111
108
|
--action-tertiary-bg-inverse: var(--backgrounds-primary);
|
|
112
|
-
--action-tertiary-border: var(--
|
|
113
|
-
--action-tertiary-border-alt: var(--
|
|
114
|
-
--action-tertiary-border-disabled: var(--
|
|
109
|
+
--action-tertiary-border: var(--borders-secondary);
|
|
110
|
+
--action-tertiary-border-alt: var(--borders-primary);
|
|
111
|
+
--action-tertiary-border-disabled: var(--borders-primary);
|
|
115
112
|
--action-tertiary-border-inverse: var(--backgrounds-secondary);
|
|
116
113
|
--action-tertiary-fg-alt: var(--foregrounds-primary);
|
|
117
114
|
--action-tertiary-fg-disabled: var(--foregrounds-quinary);
|
|
118
|
-
--action-tertiary-fg-active: var(--
|
|
119
|
-
--action-tertiary-fg-selected: var(--
|
|
115
|
+
--action-tertiary-fg-active: var(--foregrounds-primary);
|
|
116
|
+
--action-tertiary-fg-selected: var(--foregrounds-primary);
|
|
120
117
|
--action-tertiary-fg-inverse: var(--backgrounds-primary);
|
|
121
118
|
--action-neutral-bg: var(--backgrounds-tertiary);
|
|
122
119
|
--action-neutral-bg-hover: var(--backgrounds-quaternary);
|
package/dist/tokens.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Layer 3: Themes → Component-level tokens for different visual identities
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* <html data-mode="light" data-theme="
|
|
10
|
+
* <html data-mode="light" data-theme="eluan">
|
|
11
11
|
* Primitives are always available via :root
|
|
12
12
|
* Mode sets semantic colors (backgrounds, foregrounds, palette tints)
|
|
13
13
|
* Theme sets component tokens (action, container, interactive, etc.)
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
@import "./spacing.css";
|
|
24
24
|
@import "./typeset.css";
|
|
25
25
|
@import "./curves.css";
|
|
26
|
+
@import "./styles.css";
|
|
26
27
|
|
|
27
28
|
/* ============================================
|
|
28
29
|
* Base Styles
|
package/dist/typeset.css
CHANGED
|
@@ -147,3 +147,111 @@
|
|
|
147
147
|
--font-size-step-neg2: 0.72rem; /* 11.52px */
|
|
148
148
|
--font-size-step-neg3: 0.57625rem; /* 9.22px */
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
/* ============================================
|
|
152
|
+
* App typeset
|
|
153
|
+
* <html data-typeset="app"> pins the scale for app screens: dashboards,
|
|
154
|
+
* tables, settings, anything dense that people work in. The fluid scale above
|
|
155
|
+
* is built for reading and grows by a ratio, so its steps land between pixels
|
|
156
|
+
* (11.52px, 14.4px, 28.13px). App UI wants the sizes interfaces are drawn at.
|
|
157
|
+
*
|
|
158
|
+
* - Whole-pixel sizes: 11, 12, 13, 14, 16, 20, 24, 28, 32, 40.
|
|
159
|
+
* - Line heights on a 4px grid, as lengths rather than ratios, so every row
|
|
160
|
+
* of text is a whole number of pixels tall.
|
|
161
|
+
* - Tracking per size: a touch open at 11px, tightening as the size grows.
|
|
162
|
+
*
|
|
163
|
+
* rem units, so the scale still follows the user's browser font size. The
|
|
164
|
+
* size aliases at the end of this file (--font-size-sm and friends) read
|
|
165
|
+
* these steps.
|
|
166
|
+
* ============================================ */
|
|
167
|
+
|
|
168
|
+
:root {
|
|
169
|
+
/* Weight of title, heading and subheading text. */
|
|
170
|
+
--font-weight-heading: 500;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[data-typeset="app"] {
|
|
174
|
+
--font-size-step-6: 2.5rem; /* 40px */
|
|
175
|
+
--font-size-step-5: 2rem; /* 32px */
|
|
176
|
+
--font-size-step-4: 1.75rem; /* 28px */
|
|
177
|
+
--font-size-step-3: 1.5rem; /* 24px */
|
|
178
|
+
--font-size-step-2: 1.25rem; /* 20px */
|
|
179
|
+
--font-size-step-1: 1rem; /* 16px */
|
|
180
|
+
--font-size-step-0: 0.875rem; /* 14px */
|
|
181
|
+
--font-size-step-neg1: 0.8125rem; /* 13px */
|
|
182
|
+
--font-size-step-neg2: 0.75rem; /* 12px */
|
|
183
|
+
--font-size-step-neg3: 0.6875rem; /* 11px */
|
|
184
|
+
|
|
185
|
+
--line-height-step-6: 3rem; /* 48px */
|
|
186
|
+
--line-height-step-5: 2.5rem; /* 40px */
|
|
187
|
+
--line-height-step-4: 2.25rem; /* 36px */
|
|
188
|
+
--line-height-step-3: 2rem; /* 32px */
|
|
189
|
+
--line-height-step-2: 1.75rem; /* 28px */
|
|
190
|
+
--line-height-step-1: 1.5rem; /* 24px */
|
|
191
|
+
--line-height-step-0: 1.25rem; /* 20px */
|
|
192
|
+
--line-height-step-neg1: 1.25rem; /* 20px */
|
|
193
|
+
--line-height-step-neg2: 1rem; /* 16px */
|
|
194
|
+
--line-height-step-neg3: 1rem; /* 16px */
|
|
195
|
+
|
|
196
|
+
--letter-spacing-step-6: -0.022em;
|
|
197
|
+
--letter-spacing-step-5: -0.022em;
|
|
198
|
+
--letter-spacing-step-4: -0.021em;
|
|
199
|
+
--letter-spacing-step-3: -0.019em;
|
|
200
|
+
--letter-spacing-step-2: -0.017em;
|
|
201
|
+
--letter-spacing-step-1: -0.011em;
|
|
202
|
+
--letter-spacing-step-0: 0em;
|
|
203
|
+
--letter-spacing-step-neg1: 0em;
|
|
204
|
+
--letter-spacing-step-neg2: 0em;
|
|
205
|
+
--letter-spacing-step-neg3: 0.005em;
|
|
206
|
+
|
|
207
|
+
--font-weight-heading: 500;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* ============================================
|
|
211
|
+
* Size aliases
|
|
212
|
+
* --font-size-xs … --font-size-5xl are the names components use. Each points
|
|
213
|
+
* at one step of the scale above and brings that step's line height and
|
|
214
|
+
* tracking with it, so a component that takes all three stays in proportion.
|
|
215
|
+
* `base` sits on step-0.
|
|
216
|
+
*
|
|
217
|
+
* The mapping is the same in every density: data-spacing changes the room
|
|
218
|
+
* around text, never the text (see spacing.css). To change text size, pin a
|
|
219
|
+
* typeset.
|
|
220
|
+
*
|
|
221
|
+
* Declared on :root and on every [data-typeset] element, so a subtree that
|
|
222
|
+
* pins its own typeset gets aliases that follow it. Must stay last in this
|
|
223
|
+
* file.
|
|
224
|
+
* ============================================ */
|
|
225
|
+
|
|
226
|
+
:root,
|
|
227
|
+
[data-typeset] {
|
|
228
|
+
--font-size-xs: var(--font-size-step-neg2);
|
|
229
|
+
--font-size-sm: var(--font-size-step-neg1);
|
|
230
|
+
--font-size-base: var(--font-size-step-0);
|
|
231
|
+
--font-size-lg: var(--font-size-step-1);
|
|
232
|
+
--font-size-xl: var(--font-size-step-2);
|
|
233
|
+
--font-size-2xl: var(--font-size-step-3);
|
|
234
|
+
--font-size-3xl: var(--font-size-step-4);
|
|
235
|
+
--font-size-4xl: var(--font-size-step-5);
|
|
236
|
+
--font-size-5xl: var(--font-size-step-6);
|
|
237
|
+
|
|
238
|
+
--line-height-xs: var(--line-height-step-neg2);
|
|
239
|
+
--line-height-sm: var(--line-height-step-neg1);
|
|
240
|
+
--line-height-base: var(--line-height-step-0);
|
|
241
|
+
--line-height-lg: var(--line-height-step-1);
|
|
242
|
+
--line-height-xl: var(--line-height-step-2);
|
|
243
|
+
--line-height-2xl: var(--line-height-step-3);
|
|
244
|
+
--line-height-3xl: var(--line-height-step-4);
|
|
245
|
+
--line-height-4xl: var(--line-height-step-5);
|
|
246
|
+
--line-height-5xl: var(--line-height-step-6);
|
|
247
|
+
|
|
248
|
+
--letter-spacing-xs: var(--letter-spacing-step-neg2);
|
|
249
|
+
--letter-spacing-sm: var(--letter-spacing-step-neg1);
|
|
250
|
+
--letter-spacing-base: var(--letter-spacing-step-0);
|
|
251
|
+
--letter-spacing-lg: var(--letter-spacing-step-1);
|
|
252
|
+
--letter-spacing-xl: var(--letter-spacing-step-2);
|
|
253
|
+
--letter-spacing-2xl: var(--letter-spacing-step-3);
|
|
254
|
+
--letter-spacing-3xl: var(--letter-spacing-step-4);
|
|
255
|
+
--letter-spacing-4xl: var(--letter-spacing-step-5);
|
|
256
|
+
--letter-spacing-5xl: var(--letter-spacing-step-6);
|
|
257
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluan/tokens",
|
|
3
3
|
"description": "Design tokens, CSS variables, themes, and fonts for the Eluan design system",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frolda",
|
|
7
7
|
"homepage": "https://github.com/vasfio/eluan#readme",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"./css": "./dist/tokens.css",
|
|
38
38
|
"./fonts/all": "./dist/fonts.css",
|
|
39
39
|
"./fonts/base": "./dist/fonts-base.css",
|
|
40
|
-
"./fonts/
|
|
40
|
+
"./fonts/eluan": "./dist/fonts-eluan.css"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"dist"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@fontsource-variable/inter": "^5.3.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/tokens.css src/primitives.css src/modes.css src/themes.css src/spacing.css src/typeset.css src/curves.css src/fonts.css src/fonts-base.css src/fonts-
|
|
55
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/tokens.css src/primitives.css src/modes.css src/themes.css src/spacing.css src/typeset.css src/curves.css src/styles.css src/fonts.css src/fonts-base.css src/fonts-eluan.css dist/ && cp -R src/files dist/files",
|
|
56
56
|
"dev": "tsc --watch",
|
|
57
57
|
"lint": "eslint src --report-unused-disable-directives --max-warnings 0"
|
|
58
58
|
}
|
package/dist/fonts-minimal.css
DELETED