@eagami/ui 5.20.0 → 5.22.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 +527 -91
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/_mixins.scss +40 -0
- package/types/eagami-ui.d.ts +328 -222
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.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",
|
package/src/styles/_mixins.scss
CHANGED
|
@@ -30,6 +30,46 @@ $target-size-min: 24px;
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// A readonly field takes no input, so it offers a pointer nothing: no ring on
|
|
34
|
+
// click, no icon hover, no pointer cursor. Keyboard focus still has to be
|
|
35
|
+
// visible, so the border alone picks up the focus colour, without the halo.
|
|
36
|
+
@mixin readonly-focus-cue {
|
|
37
|
+
border-color: var(--color-border-focus);
|
|
38
|
+
box-shadow: none;
|
|
39
|
+
|
|
40
|
+
// Border colour is unreliable in forced-colors, so the ring's outline stands
|
|
41
|
+
// in there, matching what `focus-ring` paints for an editable field
|
|
42
|
+
@media (forced-colors: active) {
|
|
43
|
+
outline: 2px solid Highlight;
|
|
44
|
+
outline-offset: 2px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin readonly-field {
|
|
49
|
+
&:has(:focus-visible) {
|
|
50
|
+
@include readonly-focus-cue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button {
|
|
54
|
+
cursor: default;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
color: var(--color-text-secondary);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// `readonly-field` for a control whose root is the focusable element itself: it
|
|
64
|
+
// keeps the quiet keyboard cue but stops offering to be pressed or typed into.
|
|
65
|
+
@mixin readonly-control {
|
|
66
|
+
cursor: default;
|
|
67
|
+
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
@include readonly-focus-cue;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
33
73
|
// Hides an element visually while keeping it in the accessibility tree, so
|
|
34
74
|
// screen readers still announce it. The clip pattern is used instead of
|
|
35
75
|
// `display: none` or `visibility: hidden`, which would remove it entirely.
|