@eagami/ui 2.4.0 → 2.5.1
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/fesm2022/eagami-ui.mjs +922 -704
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/_reset.scss +0 -5
- package/src/styles/_tooltip.scss +3 -8
- package/src/styles/eagami-ui.scss +2 -13
- package/src/styles/tokens/_colors.scss +23 -66
- package/src/styles/tokens/_elevation.scss +25 -37
- package/src/styles/tokens/_index.scss +0 -5
- package/src/styles/tokens/_motion.scss +0 -14
- package/src/styles/tokens/_shape.scss +0 -10
- package/src/styles/tokens/_spacing.scss +4 -17
- package/src/styles/tokens/_typography.scss +26 -70
- package/types/eagami-ui.d.ts +93 -106
|
@@ -1,42 +1,26 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// TYPOGRAPHY TOKENS
|
|
3
|
-
// =============================================================================
|
|
4
|
-
|
|
5
1
|
:root {
|
|
6
|
-
// ---------------------------------------------------------------------------
|
|
7
|
-
// Font families
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
2
|
--font-family-sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
10
3
|
--font-family-brand: 'Syne', 'DM Sans', system-ui, sans-serif;
|
|
11
4
|
--font-family-serif: 'Georgia', 'Times New Roman', serif;
|
|
12
5
|
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
13
6
|
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
--font-size-
|
|
18
|
-
--font-size-
|
|
19
|
-
--font-size-
|
|
20
|
-
--font-size-
|
|
21
|
-
--font-size-
|
|
22
|
-
--font-size-
|
|
23
|
-
--font-size-
|
|
24
|
-
|
|
25
|
-
--font-size-4xl: 2.25rem; // 36px
|
|
26
|
-
--font-size-5xl: 3rem; // 48px
|
|
27
|
-
|
|
28
|
-
// ---------------------------------------------------------------------------
|
|
29
|
-
// Font weights
|
|
30
|
-
// ---------------------------------------------------------------------------
|
|
7
|
+
--font-size-2xs: 0.625rem; // 10px
|
|
8
|
+
--font-size-xs: 0.75rem; // 12px
|
|
9
|
+
--font-size-sm: 0.875rem; // 14px
|
|
10
|
+
--font-size-md: 1rem; // 16px
|
|
11
|
+
--font-size-lg: 1.125rem; // 18px
|
|
12
|
+
--font-size-xl: 1.25rem; // 20px
|
|
13
|
+
--font-size-2xl: 1.5rem; // 24px
|
|
14
|
+
--font-size-3xl: 1.875rem; // 30px
|
|
15
|
+
--font-size-4xl: 2.25rem; // 36px
|
|
16
|
+
--font-size-5xl: 3rem; // 48px
|
|
17
|
+
|
|
31
18
|
--font-weight-regular: 400;
|
|
32
19
|
--font-weight-medium: 500;
|
|
33
20
|
--font-weight-semibold: 600;
|
|
34
21
|
--font-weight-bold: 700;
|
|
35
22
|
--font-weight-extrabold: 800;
|
|
36
23
|
|
|
37
|
-
// ---------------------------------------------------------------------------
|
|
38
|
-
// Line heights
|
|
39
|
-
// ---------------------------------------------------------------------------
|
|
40
24
|
--line-height-none: 1;
|
|
41
25
|
--line-height-tight: 1.25;
|
|
42
26
|
--line-height-snug: 1.375;
|
|
@@ -44,9 +28,6 @@
|
|
|
44
28
|
--line-height-relaxed: 1.625;
|
|
45
29
|
--line-height-loose: 2;
|
|
46
30
|
|
|
47
|
-
// ---------------------------------------------------------------------------
|
|
48
|
-
// Letter spacing
|
|
49
|
-
// ---------------------------------------------------------------------------
|
|
50
31
|
--letter-spacing-tighter: -0.05em;
|
|
51
32
|
--letter-spacing-tight: -0.025em;
|
|
52
33
|
--letter-spacing-normal: 0em;
|
|
@@ -54,17 +35,10 @@
|
|
|
54
35
|
--letter-spacing-wider: 0.05em;
|
|
55
36
|
--letter-spacing-widest: 0.1em;
|
|
56
37
|
|
|
57
|
-
// ---------------------------------------------------------------------------
|
|
58
|
-
// Semantic text styles (composite tokens)
|
|
59
|
-
// These map to specific UI roles for consistent usage.
|
|
60
|
-
// ---------------------------------------------------------------------------
|
|
61
|
-
|
|
62
|
-
// Display
|
|
63
38
|
--text-display-size: var(--font-size-5xl);
|
|
64
39
|
--text-display-weight: var(--font-weight-bold);
|
|
65
40
|
--text-display-lh: var(--line-height-tight);
|
|
66
41
|
|
|
67
|
-
// Headings
|
|
68
42
|
--text-h1-size: var(--font-size-4xl);
|
|
69
43
|
--text-h1-weight: var(--font-weight-bold);
|
|
70
44
|
--text-h1-lh: var(--line-height-tight);
|
|
@@ -81,18 +55,14 @@
|
|
|
81
55
|
--text-h4-weight: var(--font-weight-semibold);
|
|
82
56
|
--text-h4-lh: var(--line-height-snug);
|
|
83
57
|
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
// as part of the brand wordmark rather than the body type. The only
|
|
88
|
-
// composite that pins a font-family; consumers who want to recolour or
|
|
89
|
-
// resize without re-specifying the family can still override per-piece.
|
|
58
|
+
// Page-level subsection title (an `<h2>` under the page `<h1>`). Mirrors
|
|
59
|
+
// `--text-h4-*` metrics but pins the brand family so it reads as wordmark,
|
|
60
|
+
// not body. Only composite that pins a font-family.
|
|
90
61
|
--text-section-heading-size: var(--font-size-xl);
|
|
91
62
|
--text-section-heading-weight: var(--font-weight-semibold);
|
|
92
63
|
--text-section-heading-lh: var(--line-height-snug);
|
|
93
64
|
--text-section-heading-family: var(--font-family-brand);
|
|
94
65
|
|
|
95
|
-
// Body
|
|
96
66
|
--text-body-lg-size: var(--font-size-lg);
|
|
97
67
|
--text-body-lg-weight: var(--font-weight-regular);
|
|
98
68
|
--text-body-lg-lh: var(--line-height-relaxed);
|
|
@@ -105,7 +75,6 @@
|
|
|
105
75
|
--text-body-sm-weight: var(--font-weight-regular);
|
|
106
76
|
--text-body-sm-lh: var(--line-height-normal);
|
|
107
77
|
|
|
108
|
-
// Labels (form labels, badges, tags)
|
|
109
78
|
--text-label-lg-size: var(--font-size-md);
|
|
110
79
|
--text-label-lg-weight: var(--font-weight-medium);
|
|
111
80
|
--text-label-lg-lh: var(--line-height-tight);
|
|
@@ -118,19 +87,14 @@
|
|
|
118
87
|
--text-label-sm-weight: var(--font-weight-medium);
|
|
119
88
|
--text-label-sm-lh: var(--line-height-tight);
|
|
120
89
|
|
|
121
|
-
// Helper / caption
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
// Primary role: field-level hint and error messages on form-like components
|
|
127
|
-
// (see STANDARD below). Secondary role: short subordinate metadata text
|
|
128
|
-
// inside a component, e.g. `<ea-file-uploader>`'s constraints disclosure
|
|
129
|
-
// ("PNG or JPG up to 5MB") and per-file size label ("245 KB"). For any
|
|
130
|
-
// role bigger than these, reach for a body-* composite instead.
|
|
90
|
+
// Helper / caption: subordinate text below a component's primary content.
|
|
91
|
+
// 13px (between --font-size-xs 12px and -sm 14px) so it stays subordinate
|
|
92
|
+
// without hitting the barely-readable 12px floor. Used for field hint and
|
|
93
|
+
// error messages (see standard below) and short metadata such as a
|
|
94
|
+
// file-uploader's constraints or per-file size labels.
|
|
131
95
|
//
|
|
132
|
-
//
|
|
133
|
-
// `hint`) must render its messages identically. Mirror `<ea-input
|
|
96
|
+
// Standard: every form-like component (anything exposing `errorMsg` and/or
|
|
97
|
+
// `hint`) must render its messages identically. Mirror `<ea-input>`:
|
|
134
98
|
// 1. `<p class="ea-{name}-field__message ea-{name}-field__message--error">`
|
|
135
99
|
// (or `--hint`) with `role="alert"` on the error variant and an `id`
|
|
136
100
|
// matching the field's `aria-describedby`.
|
|
@@ -146,35 +110,27 @@
|
|
|
146
110
|
// specific (`--color-text-secondary` or `inherit`) but stays consistent
|
|
147
111
|
// within a component.
|
|
148
112
|
// 6. `AlertCircleIconComponent` must be in the component's `imports: [...]`.
|
|
149
|
-
--text-helper-size: 0.8125rem; //
|
|
113
|
+
--text-helper-size: 0.8125rem; // 13px
|
|
150
114
|
--text-helper-weight: var(--font-weight-regular);
|
|
151
115
|
--text-helper-lh: var(--line-height-normal);
|
|
152
116
|
|
|
153
|
-
//
|
|
154
|
-
// is relative (em) so it tracks the surrounding text size rather than
|
|
155
|
-
// forcing an absolute value. Apply with `font-size: var(--text-code-size);
|
|
156
|
-
// font-weight: var(--text-code-weight); font-family: var(--text-code-family);
|
|
157
|
-
// color: var(--text-code-color); background-color: var(--text-code-bg);
|
|
158
|
-
// padding: var(--text-code-padding); border-radius: var(--text-code-radius);`
|
|
159
|
-
// on `code` (or `<ea-text variant="code">` when that ships).
|
|
117
|
+
// Inline code chip; em-sized so it tracks the surrounding text
|
|
160
118
|
--text-code-size: 0.875em;
|
|
161
119
|
--text-code-weight: var(--font-weight-regular);
|
|
162
120
|
--text-code-family: var(--font-family-mono);
|
|
163
121
|
--text-code-color: var(--color-text-primary);
|
|
164
122
|
--text-code-bg: var(--color-bg-muted);
|
|
165
|
-
--text-code-padding: var(--space-0-5) var(--space-1-5); //
|
|
123
|
+
--text-code-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
166
124
|
--text-code-radius: var(--radius-sm);
|
|
167
125
|
|
|
168
|
-
//
|
|
169
|
-
// raised appearance (border + 1px bottom shadow) to suggest a physical key.
|
|
170
|
-
// Same shape language as `code` so the two read as a family.
|
|
126
|
+
// Keyboard-key glyph; raised border + bottom shadow suggest a physical key
|
|
171
127
|
--text-kbd-size: 0.8125em;
|
|
172
128
|
--text-kbd-weight: var(--font-weight-medium);
|
|
173
129
|
--text-kbd-family: var(--font-family-mono);
|
|
174
130
|
--text-kbd-color: var(--color-text-primary);
|
|
175
131
|
--text-kbd-bg: var(--color-bg-base);
|
|
176
132
|
--text-kbd-border: var(--border-width-thin) solid var(--color-border-default);
|
|
177
|
-
--text-kbd-padding: var(--space-0-5) var(--space-1-5); //
|
|
133
|
+
--text-kbd-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
178
134
|
--text-kbd-radius: var(--radius-sm);
|
|
179
135
|
--text-kbd-shadow: 0 1px 0 var(--color-border-default);
|
|
180
136
|
}
|