@eagami/ui 5.0.1 → 5.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "5.0.1",
3
+ "version": "5.2.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -0,0 +1,55 @@
1
+ @use 'mixins' as ea;
2
+
3
+ // Native controls projected into <ea-form-field> get the same visual treatment
4
+ // as the library's own fields. Global because projected content sits outside
5
+ // the component's style encapsulation. Descendant (not direct-child) so a
6
+ // control wrapped for layout is styled like the aria wiring that already finds
7
+ // it at any depth; the field's own label and messages hold no form controls.
8
+ .ea-form-field input,
9
+ .ea-form-field select,
10
+ .ea-form-field textarea {
11
+ width: 100%;
12
+ min-height: 2.5em;
13
+ padding: 0 0.75em;
14
+ font-size: var(--font-size-md);
15
+ line-height: var(--line-height-normal);
16
+ font-family: var(--font-family-sans);
17
+ border: var(--border-width-thin) solid var(--color-border-default);
18
+ border-radius: var(--radius-md);
19
+ outline: none;
20
+ background-color: var(--color-bg-base);
21
+ color: var(--color-text-primary);
22
+ transition: var(--transition-colors), var(--transition-shadow);
23
+
24
+ // `opacity: 1` overrides the Firefox/WebKit default of ~0.54 on placeholders,
25
+ // which would wash out the tertiary token and collapse contrast in dark mode
26
+ &::placeholder {
27
+ color: var(--color-text-tertiary);
28
+ opacity: 1;
29
+ }
30
+
31
+ &:focus {
32
+ border-color: var(--color-border-focus);
33
+ @include ea.focus-ring;
34
+ }
35
+
36
+ &[aria-invalid='true'] {
37
+ border-color: var(--color-error-default);
38
+
39
+ &:focus {
40
+ @include ea.focus-ring(var(--shadow-focus-ring-error));
41
+ }
42
+ }
43
+
44
+ &:disabled {
45
+ opacity: 0.6;
46
+ background-color: var(--color-bg-muted);
47
+ cursor: not-allowed;
48
+ }
49
+ }
50
+
51
+ .ea-form-field textarea {
52
+ min-height: 5em;
53
+ padding: 0.5em 0.75em;
54
+ resize: vertical;
55
+ }
@@ -25,6 +25,22 @@
25
25
  }
26
26
  }
27
27
 
28
+ // Hides an element visually while keeping it in the accessibility tree, so
29
+ // screen readers still announce it. The clip pattern is used instead of
30
+ // `display: none` or `visibility: hidden`, which would remove it entirely.
31
+ @mixin visually-hidden {
32
+ position: absolute;
33
+ overflow: hidden;
34
+ clip: rect(0, 0, 0, 0);
35
+ clip-path: inset(50%);
36
+ width: 1px;
37
+ height: 1px;
38
+ padding: 0;
39
+ margin: -1px;
40
+ white-space: nowrap;
41
+ border: 0;
42
+ }
43
+
28
44
  // Standard icon button: clear, close/dismiss, password-toggle, nav, etc. The box
29
45
  // is `--ea-icon-button-size` (em) so it scales with the host component's size and
30
46
  // is consistent across components at a given size tier. The glyph is enlarged so
@@ -4,4 +4,5 @@
4
4
  @use 'tokens/index';
5
5
  @use 'reset';
6
6
  @use 'tooltip';
7
+ @use 'form-field';
7
8
  @use 'rtl';