@eagami/ui 1.4.0 → 2.0.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/fesm2022/eagami-ui.mjs +3085 -634
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +3 -3
- package/src/styles/tokens/_colors.scss +13 -0
- package/src/styles/tokens/_spacing.scss +28 -0
- package/src/styles/tokens/_typography.scss +49 -5
- package/types/eagami-ui.d.ts +785 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Lightweight, accessible Angular UI component library built on CSS custom properties",
|
|
5
5
|
"author": "Michal Wiraszka <michal@eagami.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@angular/core": "^21.0.0",
|
|
27
27
|
"@angular/forms": "^21.0.0"
|
|
28
28
|
},
|
|
29
|
+
"dependencies": {},
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=20"
|
|
31
32
|
},
|
|
@@ -40,6 +41,5 @@
|
|
|
40
41
|
"default": "./fesm2022/eagami-ui.mjs"
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
|
-
"type": "module"
|
|
44
|
-
"dependencies": {}
|
|
44
|
+
"type": "module"
|
|
45
45
|
}
|
|
@@ -132,6 +132,19 @@
|
|
|
132
132
|
--color-info-default: var(--color-info-600);
|
|
133
133
|
--color-info-subtle: var(--color-info-50);
|
|
134
134
|
--color-info-muted: var(--color-info-100);
|
|
135
|
+
|
|
136
|
+
// Color-picker mechanics — pure RGB primaries that build the hue wheel and
|
|
137
|
+
// the saturation/value gradient. These are intrinsic to the picker UI, not
|
|
138
|
+
// themeable, but live here so component SCSS stays literal-free.
|
|
139
|
+
--color-picker-hue-red: #ff0000;
|
|
140
|
+
--color-picker-hue-yellow: #ffff00;
|
|
141
|
+
--color-picker-hue-green: #00ff00;
|
|
142
|
+
--color-picker-hue-cyan: #00ffff;
|
|
143
|
+
--color-picker-hue-blue: #0000ff;
|
|
144
|
+
--color-picker-hue-magenta: #ff00ff;
|
|
145
|
+
--color-picker-sv-white: #ffffff;
|
|
146
|
+
--color-picker-sv-black: #000000;
|
|
147
|
+
--color-picker-thumb-halo: rgba(0, 0, 0, 0.25);
|
|
135
148
|
}
|
|
136
149
|
|
|
137
150
|
// ---------------------------------------------------------------------------
|
|
@@ -28,6 +28,34 @@
|
|
|
28
28
|
--space-24: 6rem; // 96px
|
|
29
29
|
--space-32: 8rem; // 128px
|
|
30
30
|
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Negative variants — mirror the positive scale 1:1 with an `n-` infix.
|
|
33
|
+
// Useful for negative margins (container bleeds, overlap tricks, gutter
|
|
34
|
+
// collapsing) so consumers don't have to write `calc(var(--space-2) * -1)`.
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
--space-n-px: -1px;
|
|
37
|
+
--space-n-0-5: -0.125rem; // -2px
|
|
38
|
+
--space-n-1: -0.25rem; // -4px
|
|
39
|
+
--space-n-1-5: -0.375rem; // -6px
|
|
40
|
+
--space-n-2: -0.5rem; // -8px
|
|
41
|
+
--space-n-2-5: -0.625rem; // -10px
|
|
42
|
+
--space-n-3: -0.75rem; // -12px
|
|
43
|
+
--space-n-3-5: -0.875rem; // -14px
|
|
44
|
+
--space-n-4: -1rem; // -16px
|
|
45
|
+
--space-n-5: -1.25rem; // -20px
|
|
46
|
+
--space-n-6: -1.5rem; // -24px
|
|
47
|
+
--space-n-7: -1.75rem; // -28px
|
|
48
|
+
--space-n-8: -2rem; // -32px
|
|
49
|
+
--space-n-9: -2.25rem; // -36px
|
|
50
|
+
--space-n-10: -2.5rem; // -40px
|
|
51
|
+
--space-n-11: -2.75rem; // -44px
|
|
52
|
+
--space-n-12: -3rem; // -48px
|
|
53
|
+
--space-n-14: -3.5rem; // -56px
|
|
54
|
+
--space-n-16: -4rem; // -64px
|
|
55
|
+
--space-n-20: -5rem; // -80px
|
|
56
|
+
--space-n-24: -6rem; // -96px
|
|
57
|
+
--space-n-32: -8rem; // -128px
|
|
58
|
+
|
|
31
59
|
// ---------------------------------------------------------------------------
|
|
32
60
|
// Layout / component-specific semantic spacing
|
|
33
61
|
// ---------------------------------------------------------------------------
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--font-family-sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
10
10
|
--font-family-brand: 'Syne', 'DM Sans', system-ui, sans-serif;
|
|
11
11
|
--font-family-serif: 'Georgia', 'Times New Roman', serif;
|
|
12
|
-
--font-family-mono:
|
|
12
|
+
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
13
13
|
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
// Font sizes (rem, base 16px)
|
|
@@ -107,13 +107,57 @@
|
|
|
107
107
|
--text-label-sm-weight: var(--font-weight-medium);
|
|
108
108
|
--text-label-sm-lh: var(--line-height-tight);
|
|
109
109
|
|
|
110
|
-
// Helper / caption
|
|
111
|
-
|
|
110
|
+
// Helper / caption — used for field-level hint and error messages. Sits
|
|
111
|
+
// between `--font-size-xs` (12px) and `--font-size-sm` (14px) at 13px so
|
|
112
|
+
// it stays visually subordinate to the field's label without dropping into
|
|
113
|
+
// the "barely readable" zone that 12px hits on dense forms.
|
|
114
|
+
//
|
|
115
|
+
// STANDARD — every form-like component (anything exposing `errorMsg` and/or
|
|
116
|
+
// `hint`) must render its messages identically. Mirror `<ea-input>` exactly:
|
|
117
|
+
// 1. `<p class="ea-{name}-field__message ea-{name}-field__message--error">`
|
|
118
|
+
// (or `--hint`) with `role="alert"` on the error variant and an `id`
|
|
119
|
+
// matching the field's `aria-describedby`.
|
|
120
|
+
// 2. The first child of the error `<p>` is always
|
|
121
|
+
// `<ea-icon-alert-circle class="ea-{name}-field__message-icon" />`.
|
|
122
|
+
// Hints render text-only (no icon).
|
|
123
|
+
// 3. `__message` uses `display: flex; align-items: center; gap: var(--space-1)`
|
|
124
|
+
// plus the three `--text-helper-*` tokens above. Never hard-code a
|
|
125
|
+
// font-size on `__message`.
|
|
126
|
+
// 4. `__message-icon` uses `flex-shrink: 0; width: 0.875em; height: 0.875em`
|
|
127
|
+
// so the icon scales with the text.
|
|
128
|
+
// 5. Error color is `var(--color-error-default)`. Hint color is component-
|
|
129
|
+
// specific (`--color-text-secondary` or `inherit`) but stays consistent
|
|
130
|
+
// within a component.
|
|
131
|
+
// 6. `AlertCircleIconComponent` must be in the component's `imports: [...]`.
|
|
132
|
+
--text-helper-size: 0.8125rem; // 13px
|
|
112
133
|
--text-helper-weight: var(--font-weight-regular);
|
|
113
134
|
--text-helper-lh: var(--line-height-normal);
|
|
114
135
|
|
|
115
|
-
// Code
|
|
116
|
-
|
|
136
|
+
// Code — inline code styled to read as a chip embedded in body text. Size
|
|
137
|
+
// is relative (em) so it tracks the surrounding text size rather than
|
|
138
|
+
// forcing an absolute value. Apply with `font-size: var(--text-code-size);
|
|
139
|
+
// font-weight: var(--text-code-weight); font-family: var(--text-code-family);
|
|
140
|
+
// color: var(--text-code-color); background-color: var(--text-code-bg);
|
|
141
|
+
// padding: var(--text-code-padding); border-radius: var(--text-code-radius);`
|
|
142
|
+
// on `code` (or `<ea-text variant="code">` when that ships).
|
|
143
|
+
--text-code-size: 0.875em;
|
|
117
144
|
--text-code-weight: var(--font-weight-regular);
|
|
118
145
|
--text-code-family: var(--font-family-mono);
|
|
146
|
+
--text-code-color: var(--color-text-primary);
|
|
147
|
+
--text-code-bg: var(--color-bg-muted);
|
|
148
|
+
--text-code-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
149
|
+
--text-code-radius: var(--radius-sm);
|
|
150
|
+
|
|
151
|
+
// Kbd — keyboard-key glyph, slightly smaller than inline code and with a
|
|
152
|
+
// raised appearance (border + 1px bottom shadow) to suggest a physical key.
|
|
153
|
+
// Same shape language as `code` so the two read as a family.
|
|
154
|
+
--text-kbd-size: 0.8125em;
|
|
155
|
+
--text-kbd-weight: var(--font-weight-medium);
|
|
156
|
+
--text-kbd-family: var(--font-family-mono);
|
|
157
|
+
--text-kbd-color: var(--color-text-primary);
|
|
158
|
+
--text-kbd-bg: var(--color-bg-base);
|
|
159
|
+
--text-kbd-border: var(--border-width-thin) solid var(--color-border-default);
|
|
160
|
+
--text-kbd-padding: var(--space-0-5) var(--space-1-5); // 2px 6px
|
|
161
|
+
--text-kbd-radius: var(--radius-sm);
|
|
162
|
+
--text-kbd-shadow: 0 1px 0 var(--color-border-default);
|
|
119
163
|
}
|