@eagami/ui 4.5.1 → 4.7.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 +10 -2
- package/fesm2022/eagami-ui.mjs +155 -93
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +5 -2
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +64 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +16 -0
- package/schematics/ng-add/utils.js +53 -0
- package/schematics/package.json +3 -0
- package/src/styles/_mixins.scss +68 -0
- package/src/styles/_reset.scss +62 -0
- package/src/styles/_rtl.scss +38 -0
- package/src/styles/_tooltip.scss +39 -0
- package/src/styles/eagami-ui.scss +7 -0
- package/src/styles/tokens/_colors.scss +265 -0
- package/src/styles/tokens/_elevation.scss +87 -0
- package/src/styles/tokens/_index.scss +6 -0
- package/src/styles/tokens/_motion.scss +37 -0
- package/src/styles/tokens/_shape.scss +23 -0
- package/src/styles/tokens/_spacing.scss +73 -0
- package/src/styles/tokens/_typography.scss +147 -0
- package/types/eagami-ui.d.ts +7 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// :where() keeps these at zero specificity so consumer overrides win in every
|
|
2
|
+
// theme; see the note in _colors.scss.
|
|
3
|
+
:where(:root) {
|
|
4
|
+
--shadow-none: none;
|
|
5
|
+
--shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
6
|
+
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
|
|
7
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
8
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
9
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
10
|
+
--shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
11
|
+
--shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
|
|
12
|
+
|
|
13
|
+
// Composable top-edge highlight appended to every dark-mode shadow so elevated
|
|
14
|
+
// surfaces catch light along their top edge; a no-op in light mode.
|
|
15
|
+
--shadow-edge-highlight: 0 0 #0000;
|
|
16
|
+
|
|
17
|
+
// Bevel: paired inset highlight (top) + shadow (bottom) for a raised look;
|
|
18
|
+
// compose with --shadow-* for an ambient drop.
|
|
19
|
+
--shadow-bevel:
|
|
20
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.85), inset 0 -1px 1.5px rgba(0, 0, 0, 0.25);
|
|
21
|
+
--shadow-bevel-strong:
|
|
22
|
+
inset 0 1.5px 2px rgba(255, 255, 255, 0.9), inset 0 -2px 3px rgba(0, 0, 0, 0.3);
|
|
23
|
+
|
|
24
|
+
// Well: inverse of bevel (inset shadow top, highlight bottom) for a recessed look
|
|
25
|
+
--shadow-well:
|
|
26
|
+
inset 0 1px 1.5px rgba(0, 0, 0, 0.3), inset 0 -1px 0.5px rgba(255, 255, 255, 0.5);
|
|
27
|
+
--shadow-well-strong:
|
|
28
|
+
inset 0 2px 3px rgba(0, 0, 0, 0.4), inset 0 -1.5px 1px rgba(255, 255, 255, 0.55);
|
|
29
|
+
|
|
30
|
+
--shadow-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.45);
|
|
31
|
+
--shadow-focus-ring-error: 0 0 0 3px var(--color-error-200);
|
|
32
|
+
--shadow-focus-ring-success: 0 0 0 3px var(--color-success-200);
|
|
33
|
+
|
|
34
|
+
--z-index-base: 0;
|
|
35
|
+
--z-index-raised: 10;
|
|
36
|
+
--z-index-dropdown: 100;
|
|
37
|
+
--z-index-sticky: 200;
|
|
38
|
+
--z-index-overlay: 300;
|
|
39
|
+
--z-index-modal: 400;
|
|
40
|
+
--z-index-popover: 500;
|
|
41
|
+
--z-index-toast: 600;
|
|
42
|
+
--z-index-tooltip: 700;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Dark mode: a drop shadow is the absence of light, so it stays black (deeper
|
|
46
|
+
// than light mode); a white "shadow" reads as a glow and looks wrong. Elevation
|
|
47
|
+
// is carried instead by the lifted surface tone plus a hairline top highlight
|
|
48
|
+
// that catches light, appended to every level via --shadow-edge-highlight.
|
|
49
|
+
@mixin dark-elevation-tokens {
|
|
50
|
+
--shadow-edge-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
|
|
51
|
+
|
|
52
|
+
--shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4), var(--shadow-edge-highlight);
|
|
53
|
+
--shadow-sm:
|
|
54
|
+
0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4),
|
|
55
|
+
var(--shadow-edge-highlight);
|
|
56
|
+
--shadow-md:
|
|
57
|
+
0 4px 8px -2px rgba(0, 0, 0, 0.55), 0 2px 4px -2px rgba(0, 0, 0, 0.4),
|
|
58
|
+
var(--shadow-edge-highlight);
|
|
59
|
+
--shadow-lg:
|
|
60
|
+
0 12px 20px -4px rgba(0, 0, 0, 0.6), 0 4px 8px -4px rgba(0, 0, 0, 0.45),
|
|
61
|
+
var(--shadow-edge-highlight);
|
|
62
|
+
--shadow-xl:
|
|
63
|
+
0 20px 28px -6px rgba(0, 0, 0, 0.65), 0 8px 12px -6px rgba(0, 0, 0, 0.5),
|
|
64
|
+
var(--shadow-edge-highlight);
|
|
65
|
+
--shadow-2xl: 0 28px 50px -12px rgba(0, 0, 0, 0.75), var(--shadow-edge-highlight);
|
|
66
|
+
|
|
67
|
+
// On a dark surface a bright highlight reads as a halo, so drop the highlight
|
|
68
|
+
// alpha and raise the shadow alpha to keep the relief without glowing.
|
|
69
|
+
--shadow-bevel:
|
|
70
|
+
inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -1px 1.5px rgba(0, 0, 0, 0.6);
|
|
71
|
+
--shadow-bevel-strong:
|
|
72
|
+
inset 0 1.5px 2px rgba(255, 255, 255, 0.22), inset 0 -2px 3px rgba(0, 0, 0, 0.7);
|
|
73
|
+
--shadow-well:
|
|
74
|
+
inset 0 1px 1.5px rgba(0, 0, 0, 0.55), inset 0 -1px 0.5px rgba(255, 255, 255, 0.08);
|
|
75
|
+
--shadow-well-strong:
|
|
76
|
+
inset 0 2px 3px rgba(0, 0, 0, 0.7), inset 0 -1.5px 1px rgba(255, 255, 255, 0.12);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (prefers-color-scheme: dark) {
|
|
80
|
+
:where(:root:not([data-theme='light'])) {
|
|
81
|
+
@include dark-elevation-tokens;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where(:root[data-theme='dark']) {
|
|
86
|
+
@include dark-elevation-tokens;
|
|
87
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// :where() keeps tokens at zero specificity so consumer overrides win; see _colors.scss.
|
|
2
|
+
:where(:root) {
|
|
3
|
+
--duration-instant: 0ms;
|
|
4
|
+
--duration-fast: 100ms;
|
|
5
|
+
--duration-normal: 200ms;
|
|
6
|
+
--duration-slow: 300ms;
|
|
7
|
+
--duration-slower: 500ms;
|
|
8
|
+
|
|
9
|
+
--ease-linear: linear;
|
|
10
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
11
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
12
|
+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
13
|
+
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
14
|
+
|
|
15
|
+
--transition-colors:
|
|
16
|
+
color var(--duration-fast) var(--ease-out),
|
|
17
|
+
background-color var(--duration-fast) var(--ease-out),
|
|
18
|
+
border-color var(--duration-fast) var(--ease-out),
|
|
19
|
+
fill var(--duration-fast) var(--ease-out);
|
|
20
|
+
|
|
21
|
+
--transition-shadow: box-shadow var(--duration-fast) var(--ease-out);
|
|
22
|
+
|
|
23
|
+
--transition-transform: transform var(--duration-normal) var(--ease-spring);
|
|
24
|
+
|
|
25
|
+
--transition-opacity: opacity var(--duration-normal) var(--ease-out);
|
|
26
|
+
|
|
27
|
+
--transition-all: all var(--duration-normal) var(--ease-in-out);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: reduce) {
|
|
31
|
+
:where(:root) {
|
|
32
|
+
--duration-fast: 0ms;
|
|
33
|
+
--duration-normal: 0ms;
|
|
34
|
+
--duration-slow: 0ms;
|
|
35
|
+
--duration-slower: 0ms;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// :where() keeps tokens at zero specificity so consumer overrides win; see _colors.scss.
|
|
2
|
+
:where(:root) {
|
|
3
|
+
--radius-none: 0;
|
|
4
|
+
--radius-xs: 0.125rem; // 2px
|
|
5
|
+
--radius-sm: 0.25rem; // 4px
|
|
6
|
+
--radius-md: 0.375rem; // 6px
|
|
7
|
+
--radius-lg: 0.5rem; // 8px
|
|
8
|
+
--radius-xl: 0.75rem; // 12px
|
|
9
|
+
--radius-2xl: 1rem; // 16px
|
|
10
|
+
--radius-3xl: 1.5rem; // 24px
|
|
11
|
+
--radius-full: 9999px; // pill / circle
|
|
12
|
+
|
|
13
|
+
--border-width-none: 0;
|
|
14
|
+
--border-width-thin: 1px;
|
|
15
|
+
--border-width-medium: 2px;
|
|
16
|
+
--border-width-thick: 4px;
|
|
17
|
+
|
|
18
|
+
// Hit-target box for icon buttons (clear / close / dismiss / toggle). em-based
|
|
19
|
+
// so it scales with the host component's size; since all sized components share
|
|
20
|
+
// a font-size per tier, this is also consistent across components at a tier
|
|
21
|
+
// (md = 1.75 * 16px = 28px).
|
|
22
|
+
--ea-icon-button-size: 1.75em;
|
|
23
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// :where() keeps tokens at zero specificity so consumer overrides win; see _colors.scss.
|
|
2
|
+
:where(:root) {
|
|
3
|
+
--space-0: 0;
|
|
4
|
+
--space-px: 1px;
|
|
5
|
+
--space-0-5: 0.125rem; // 2px
|
|
6
|
+
--space-1: 0.25rem; // 4px
|
|
7
|
+
--space-1-5: 0.375rem; // 6px
|
|
8
|
+
--space-2: 0.5rem; // 8px
|
|
9
|
+
--space-2-5: 0.625rem; // 10px
|
|
10
|
+
--space-3: 0.75rem; // 12px
|
|
11
|
+
--space-3-5: 0.875rem; // 14px
|
|
12
|
+
--space-4: 1rem; // 16px
|
|
13
|
+
--space-5: 1.25rem; // 20px
|
|
14
|
+
--space-6: 1.5rem; // 24px
|
|
15
|
+
--space-7: 1.75rem; // 28px
|
|
16
|
+
--space-8: 2rem; // 32px
|
|
17
|
+
--space-9: 2.25rem; // 36px
|
|
18
|
+
--space-10: 2.5rem; // 40px
|
|
19
|
+
--space-11: 2.75rem; // 44px
|
|
20
|
+
--space-12: 3rem; // 48px
|
|
21
|
+
--space-14: 3.5rem; // 56px
|
|
22
|
+
--space-16: 4rem; // 64px
|
|
23
|
+
--space-20: 5rem; // 80px
|
|
24
|
+
--space-24: 6rem; // 96px
|
|
25
|
+
--space-32: 8rem; // 128px
|
|
26
|
+
|
|
27
|
+
// Negative variants mirror the scale (n- infix) so consumers skip
|
|
28
|
+
// `calc(var(--space-2) * -1)` for negative margins.
|
|
29
|
+
--space-n-px: -1px;
|
|
30
|
+
--space-n-0-5: -0.125rem; // -2px
|
|
31
|
+
--space-n-1: -0.25rem; // -4px
|
|
32
|
+
--space-n-1-5: -0.375rem; // -6px
|
|
33
|
+
--space-n-2: -0.5rem; // -8px
|
|
34
|
+
--space-n-2-5: -0.625rem; // -10px
|
|
35
|
+
--space-n-3: -0.75rem; // -12px
|
|
36
|
+
--space-n-3-5: -0.875rem; // -14px
|
|
37
|
+
--space-n-4: -1rem; // -16px
|
|
38
|
+
--space-n-5: -1.25rem; // -20px
|
|
39
|
+
--space-n-6: -1.5rem; // -24px
|
|
40
|
+
--space-n-7: -1.75rem; // -28px
|
|
41
|
+
--space-n-8: -2rem; // -32px
|
|
42
|
+
--space-n-9: -2.25rem; // -36px
|
|
43
|
+
--space-n-10: -2.5rem; // -40px
|
|
44
|
+
--space-n-11: -2.75rem; // -44px
|
|
45
|
+
--space-n-12: -3rem; // -48px
|
|
46
|
+
--space-n-14: -3.5rem; // -56px
|
|
47
|
+
--space-n-16: -4rem; // -64px
|
|
48
|
+
--space-n-20: -5rem; // -80px
|
|
49
|
+
--space-n-24: -6rem; // -96px
|
|
50
|
+
--space-n-32: -8rem; // -128px
|
|
51
|
+
|
|
52
|
+
--inset-xs: var(--space-1) var(--space-2); // 4px 8px
|
|
53
|
+
--inset-sm: var(--space-1-5) var(--space-3); // 6px 12px
|
|
54
|
+
--inset-md: var(--space-2) var(--space-4); // 8px 16px
|
|
55
|
+
--inset-lg: var(--space-3) var(--space-6); // 12px 24px
|
|
56
|
+
--inset-xl: var(--space-4) var(--space-8); // 16px 32px
|
|
57
|
+
|
|
58
|
+
// vertical gap
|
|
59
|
+
--stack-2xs: var(--space-1); // 4px
|
|
60
|
+
--stack-xs: var(--space-2); // 8px
|
|
61
|
+
--stack-sm: var(--space-3); // 12px
|
|
62
|
+
--stack-md: var(--space-4); // 16px
|
|
63
|
+
--stack-lg: var(--space-6); // 24px
|
|
64
|
+
--stack-xl: var(--space-8); // 32px
|
|
65
|
+
--stack-2xl: var(--space-12); // 48px
|
|
66
|
+
|
|
67
|
+
// horizontal gap
|
|
68
|
+
--inline-2xs: var(--space-1); // 4px
|
|
69
|
+
--inline-xs: var(--space-2); // 8px
|
|
70
|
+
--inline-sm: var(--space-3); // 12px
|
|
71
|
+
--inline-md: var(--space-4); // 16px
|
|
72
|
+
--inline-lg: var(--space-6); // 24px
|
|
73
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// :where() keeps tokens at zero specificity so consumer overrides win; see _colors.scss.
|
|
2
|
+
:where(:root) {
|
|
3
|
+
// The `* Fallback` faces are Arial tuned with metric overrides to match the
|
|
4
|
+
// web fonts, so they must sit right after each web font in the stack: that way
|
|
5
|
+
// text laid out before the font loads has the same metrics and `font-display:
|
|
6
|
+
// swap` causes no layout shift when the real font arrives.
|
|
7
|
+
--font-family-sans:
|
|
8
|
+
'DM Sans', 'DM Sans Fallback', 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
9
|
+
--font-family-brand:
|
|
10
|
+
'Syne', 'Syne Fallback', 'DM Sans', 'DM Sans Fallback', system-ui, sans-serif;
|
|
11
|
+
--font-family-serif: 'Georgia', 'Times New Roman', serif;
|
|
12
|
+
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
13
|
+
|
|
14
|
+
--font-size-2xs: 0.625rem; // 10px
|
|
15
|
+
--font-size-xs: 0.75rem; // 12px
|
|
16
|
+
--font-size-sm: 0.875rem; // 14px
|
|
17
|
+
--font-size-md: 1rem; // 16px
|
|
18
|
+
--font-size-lg: 1.125rem; // 18px
|
|
19
|
+
--font-size-xl: 1.25rem; // 20px
|
|
20
|
+
--font-size-2xl: 1.5rem; // 24px
|
|
21
|
+
--font-size-3xl: 1.875rem; // 30px
|
|
22
|
+
--font-size-4xl: 2.25rem; // 36px
|
|
23
|
+
--font-size-5xl: 3rem; // 48px
|
|
24
|
+
|
|
25
|
+
--font-weight-regular: 400;
|
|
26
|
+
--font-weight-medium: 500;
|
|
27
|
+
--font-weight-semibold: 600;
|
|
28
|
+
--font-weight-bold: 700;
|
|
29
|
+
--font-weight-extrabold: 800;
|
|
30
|
+
|
|
31
|
+
--line-height-none: 1;
|
|
32
|
+
--line-height-tight: 1.25;
|
|
33
|
+
--line-height-snug: 1.375;
|
|
34
|
+
--line-height-normal: 1.5;
|
|
35
|
+
--line-height-relaxed: 1.625;
|
|
36
|
+
--line-height-loose: 2;
|
|
37
|
+
|
|
38
|
+
--letter-spacing-tighter: -0.05em;
|
|
39
|
+
--letter-spacing-tight: -0.025em;
|
|
40
|
+
--letter-spacing-normal: 0em;
|
|
41
|
+
--letter-spacing-wide: 0.025em;
|
|
42
|
+
--letter-spacing-wider: 0.05em;
|
|
43
|
+
--letter-spacing-widest: 0.1em;
|
|
44
|
+
|
|
45
|
+
// Leading/status icon sized relative to the text beside it; em keeps it in
|
|
46
|
+
// proportion as the surrounding font-size changes
|
|
47
|
+
--icon-inline-size: 1.5em;
|
|
48
|
+
|
|
49
|
+
--text-display-size: var(--font-size-5xl);
|
|
50
|
+
--text-display-weight: var(--font-weight-bold);
|
|
51
|
+
--text-display-lh: var(--line-height-tight);
|
|
52
|
+
|
|
53
|
+
--text-h1-size: var(--font-size-4xl);
|
|
54
|
+
--text-h1-weight: var(--font-weight-bold);
|
|
55
|
+
--text-h1-lh: var(--line-height-tight);
|
|
56
|
+
|
|
57
|
+
--text-h2-size: var(--font-size-3xl);
|
|
58
|
+
--text-h2-weight: var(--font-weight-semibold);
|
|
59
|
+
--text-h2-lh: var(--line-height-snug);
|
|
60
|
+
|
|
61
|
+
--text-h3-size: var(--font-size-2xl);
|
|
62
|
+
--text-h3-weight: var(--font-weight-semibold);
|
|
63
|
+
--text-h3-lh: var(--line-height-snug);
|
|
64
|
+
|
|
65
|
+
--text-h4-size: var(--font-size-xl);
|
|
66
|
+
--text-h4-weight: var(--font-weight-semibold);
|
|
67
|
+
--text-h4-lh: var(--line-height-snug);
|
|
68
|
+
|
|
69
|
+
// Page-level subsection title (an `<h2>` under the page `<h1>`). Mirrors
|
|
70
|
+
// `--text-h4-*` metrics but pins the brand family so it reads as wordmark,
|
|
71
|
+
// not body. Only composite that pins a font-family.
|
|
72
|
+
--text-section-heading-size: var(--font-size-xl);
|
|
73
|
+
--text-section-heading-weight: var(--font-weight-semibold);
|
|
74
|
+
--text-section-heading-lh: var(--line-height-snug);
|
|
75
|
+
--text-section-heading-family: var(--font-family-brand);
|
|
76
|
+
|
|
77
|
+
--text-body-lg-size: var(--font-size-lg);
|
|
78
|
+
--text-body-lg-weight: var(--font-weight-regular);
|
|
79
|
+
--text-body-lg-lh: var(--line-height-relaxed);
|
|
80
|
+
|
|
81
|
+
--text-body-md-size: var(--font-size-md);
|
|
82
|
+
--text-body-md-weight: var(--font-weight-regular);
|
|
83
|
+
--text-body-md-lh: var(--line-height-normal);
|
|
84
|
+
|
|
85
|
+
--text-body-sm-size: var(--font-size-sm);
|
|
86
|
+
--text-body-sm-weight: var(--font-weight-regular);
|
|
87
|
+
--text-body-sm-lh: var(--line-height-normal);
|
|
88
|
+
|
|
89
|
+
--text-label-lg-size: var(--font-size-md);
|
|
90
|
+
--text-label-lg-weight: var(--font-weight-medium);
|
|
91
|
+
--text-label-lg-lh: var(--line-height-tight);
|
|
92
|
+
|
|
93
|
+
--text-label-md-size: var(--font-size-sm);
|
|
94
|
+
--text-label-md-weight: var(--font-weight-medium);
|
|
95
|
+
--text-label-md-lh: var(--line-height-tight);
|
|
96
|
+
|
|
97
|
+
--text-label-sm-size: var(--font-size-xs);
|
|
98
|
+
--text-label-sm-weight: var(--font-weight-medium);
|
|
99
|
+
--text-label-sm-lh: var(--line-height-tight);
|
|
100
|
+
|
|
101
|
+
// Helper / caption: subordinate text below a component's primary content.
|
|
102
|
+
// 13px (between --font-size-xs 12px and -sm 14px) so it stays subordinate
|
|
103
|
+
// without hitting the barely-readable 12px floor. Used for field hint and
|
|
104
|
+
// error messages (see standard below) and short metadata such as a
|
|
105
|
+
// file-uploader's constraints or per-file size labels.
|
|
106
|
+
//
|
|
107
|
+
// Standard: every form-like component (anything exposing `errorMsg` and/or
|
|
108
|
+
// `hint`) must render its messages identically. Mirror `<ea-input>`:
|
|
109
|
+
// 1. `<p class="ea-{name}-field__message ea-{name}-field__message--error">`
|
|
110
|
+
// (or `--hint`) with `role="alert"` on the error variant and an `id`
|
|
111
|
+
// matching the field's `aria-describedby`.
|
|
112
|
+
// 2. The first child of the error `<p>` is always
|
|
113
|
+
// `<ea-icon-alert-circle class="ea-{name}-field__message-icon" />`.
|
|
114
|
+
// Hints render text-only (no icon).
|
|
115
|
+
// 3. `__message` uses `display: flex; align-items: center; gap: var(--space-1)`
|
|
116
|
+
// plus the three `--text-helper-*` tokens above. Never hard-code a
|
|
117
|
+
// font-size on `__message`.
|
|
118
|
+
// 4. `__message-icon` uses `flex-shrink: 0; width: 0.875em; height: 0.875em`
|
|
119
|
+
// so the icon scales with the text.
|
|
120
|
+
// 5. Error color is `var(--color-error-default)`. Hint color is component-
|
|
121
|
+
// specific (`--color-text-secondary` or `inherit`) but stays consistent
|
|
122
|
+
// within a component.
|
|
123
|
+
// 6. `AlertCircleIconComponent` must be in the component's `imports: [...]`.
|
|
124
|
+
--text-helper-size: 0.8125rem; // 13px
|
|
125
|
+
--text-helper-weight: var(--font-weight-regular);
|
|
126
|
+
--text-helper-lh: var(--line-height-normal);
|
|
127
|
+
|
|
128
|
+
// Inline code chip; em-sized so it tracks the surrounding text
|
|
129
|
+
--text-code-size: 0.875em;
|
|
130
|
+
--text-code-weight: var(--font-weight-regular);
|
|
131
|
+
--text-code-family: var(--font-family-mono);
|
|
132
|
+
--text-code-color: var(--color-text-primary);
|
|
133
|
+
--text-code-bg: var(--color-bg-muted);
|
|
134
|
+
--text-code-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
135
|
+
--text-code-radius: var(--radius-sm);
|
|
136
|
+
|
|
137
|
+
// Keyboard-key glyph; raised border + bottom shadow suggest a physical key
|
|
138
|
+
--text-kbd-size: 0.8125em;
|
|
139
|
+
--text-kbd-weight: var(--font-weight-medium);
|
|
140
|
+
--text-kbd-family: var(--font-family-mono);
|
|
141
|
+
--text-kbd-color: var(--color-text-primary);
|
|
142
|
+
--text-kbd-bg: var(--color-bg-base);
|
|
143
|
+
--text-kbd-border: var(--border-width-thin) solid var(--color-border-default);
|
|
144
|
+
--text-kbd-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
145
|
+
--text-kbd-radius: var(--radius-sm);
|
|
146
|
+
--text-kbd-shadow: 0 1px 0 var(--color-border-default);
|
|
147
|
+
}
|
package/types/eagami-ui.d.ts
CHANGED
|
@@ -1575,8 +1575,11 @@ declare class DividerComponent {
|
|
|
1575
1575
|
static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "ea-divider", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "thick": { "alias": "thick"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1576
1576
|
}
|
|
1577
1577
|
|
|
1578
|
-
/**
|
|
1579
|
-
|
|
1578
|
+
/**
|
|
1579
|
+
* Edge of the viewport from which the drawer slides in. `start`/`end` are
|
|
1580
|
+
* direction-aware (start = left in LTR, right in RTL); `left`/`right` are fixed.
|
|
1581
|
+
*/
|
|
1582
|
+
type DrawerPosition = 'left' | 'right' | 'top' | 'bottom' | 'start' | 'end';
|
|
1580
1583
|
/** Width of the drawer panel along its primary axis. */
|
|
1581
1584
|
type DrawerWidth = EaWidth;
|
|
1582
1585
|
/**
|
|
@@ -2271,6 +2274,8 @@ interface PopoverPositionOptions {
|
|
|
2271
2274
|
readonly margin?: number;
|
|
2272
2275
|
/** Set the popover's width to match the anchor's. Useful for dropdown-style menus. */
|
|
2273
2276
|
readonly matchAnchorWidth?: boolean;
|
|
2277
|
+
/** Right-to-left context. Swaps `-start`/`-end` alignment so they track the reading direction. */
|
|
2278
|
+
readonly rtl?: boolean;
|
|
2274
2279
|
}
|
|
2275
2280
|
interface Rect {
|
|
2276
2281
|
readonly width: number;
|