@mythicalos/ui-core 0.1.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/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +89 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +9 -0
- package/dist/logic/button.d.ts +10 -0
- package/dist/logic/button.js +12 -0
- package/dist/logic/dialog.d.ts +9 -0
- package/dist/logic/dialog.js +12 -0
- package/dist/logic/gauge.d.ts +13 -0
- package/dist/logic/gauge.js +18 -0
- package/dist/logic/poll.d.ts +72 -0
- package/dist/logic/poll.js +80 -0
- package/dist/logic/toast.d.ts +20 -0
- package/dist/logic/toast.js +14 -0
- package/dist/logic/tone.d.ts +8 -0
- package/dist/logic/tone.js +19 -0
- package/package.json +61 -0
- package/src/select/mythical-select.d.ts +115 -0
- package/src/select/mythical-select.js +1279 -0
- package/src/select/register.js +4 -0
- package/styles.css +302 -0
package/styles.css
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/* @mythicalos/ui-core — component stylesheet (Task 3). The CSS classes the pure logic in
|
|
2
|
+
src/logic/ derives (buttonClass, chipClass, statusLineClass, bannerClass, gaugeTone/gaugeGeom)
|
|
3
|
+
and that BOTH the Preact and React bindings render for the same visual result from one shared
|
|
4
|
+
source. Classes + CSS custom properties only — no inline styles. Serve this AFTER
|
|
5
|
+
@mythicalos/tokens' styles.css; every color/spacing/radius/font-size below resolves through a
|
|
6
|
+
`--my-*` custom property that flips under [data-theme="dark"]. Apache-2.0. */
|
|
7
|
+
|
|
8
|
+
/* ══════════════════════════════════════════════════════════════════════════════════════════
|
|
9
|
+
BASE — ported verbatim from the family's internal Preact atoms package (styles.css) (the shipped,
|
|
10
|
+
codex-gated atom sheet: buttons, inputs/toggles/checkboxes, the secret-slot chip, toasts,
|
|
11
|
+
dialogs, empty states). Class names are unchanged — these are exactly what buttonClass et al.
|
|
12
|
+
emit and what the skuld/brokkr consumer tests assert.
|
|
13
|
+
══════════════════════════════════════════════════════════════════════════════════════════ */
|
|
14
|
+
|
|
15
|
+
/* ── base helpers ─────────────────────────────────────────────────────── */
|
|
16
|
+
.mono { font-family: var(--my-font-mono); font-size: var(--my-fs-mono); }
|
|
17
|
+
.tnum { font-variant-numeric: tabular-nums; }
|
|
18
|
+
.muted { color: var(--my-muted); }
|
|
19
|
+
.hidden { display: none; }
|
|
20
|
+
|
|
21
|
+
/* shared focus ring (design rule 6 — identical everywhere, both themes) */
|
|
22
|
+
.btn:focus-visible, .input:focus-visible,
|
|
23
|
+
.tog:focus-visible, .cb:focus-visible, .rep:focus-visible,
|
|
24
|
+
a:focus-visible, .link:focus-visible, .is-focus {
|
|
25
|
+
outline: 2px solid var(--my-accent);
|
|
26
|
+
outline-offset: 2px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ── buttons (ds/components-buttons: 5 variants × 6 states) ───────────── */
|
|
30
|
+
.btn {
|
|
31
|
+
border-radius: var(--my-r-control); padding: 8px 16px;
|
|
32
|
+
font-weight: var(--my-fw-medium); font-size: var(--my-fs-body);
|
|
33
|
+
border: 1px solid transparent; font-family: inherit; cursor: pointer;
|
|
34
|
+
transition: background var(--my-t-fast), border-color var(--my-t-fast);
|
|
35
|
+
display: inline-flex; align-items: center; gap: var(--my-sp-2); justify-content: center;
|
|
36
|
+
}
|
|
37
|
+
.btn--pri { background: var(--my-ink); color: var(--my-surface); }
|
|
38
|
+
.btn--pri:hover, .btn--pri.is-hover { background: var(--my-ink-hover); }
|
|
39
|
+
/* §1a-5: pressed collapses onto the hover token step ("hover = one token step", design.md §5) —
|
|
40
|
+
the v0.4 literal #0A0C10 was light-theme-only thinking (dark ink-fill buttons are cream). */
|
|
41
|
+
.btn--pri:active, .btn--pri.is-active { background: var(--my-ink-hover); }
|
|
42
|
+
.btn--acc { background: var(--my-accent); color: var(--my-surface); }
|
|
43
|
+
.btn--acc:hover, .btn--acc.is-hover { background: var(--my-accent-hover); }
|
|
44
|
+
.btn--acc:active, .btn--acc.is-active { background: var(--my-accent-strong); }
|
|
45
|
+
.btn--sec { background: var(--my-surface); border-color: var(--my-control-border); color: var(--my-ink); } /* §1a-12 (v0.5.4 rule 11) */
|
|
46
|
+
.btn--sec:hover, .btn--sec.is-hover { background: var(--my-surface-hover); }
|
|
47
|
+
.btn--gho { background: transparent; color: var(--my-accent-strong); }
|
|
48
|
+
.btn--gho:hover, .btn--gho.is-hover { background: var(--my-surface-hover); }
|
|
49
|
+
.btn--dan { background: var(--my-surface); border-color: var(--my-error); color: var(--my-error); }
|
|
50
|
+
.btn--dan:hover, .btn--dan.is-hover { background: var(--my-error-soft); }
|
|
51
|
+
.btn:disabled, .btn.is-disabled {
|
|
52
|
+
background: var(--my-disabled-bg); color: var(--my-disabled-ink);
|
|
53
|
+
border-color: transparent; cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
|
|
56
|
+
.spin {
|
|
57
|
+
width: 13px; height: 13px; border-radius: 50%;
|
|
58
|
+
border: 2px solid currentColor; border-top-color: transparent;
|
|
59
|
+
animation: my-spin .8s linear infinite; opacity: .85; flex: none;
|
|
60
|
+
}
|
|
61
|
+
@keyframes my-spin { to { transform: rotate(360deg); } }
|
|
62
|
+
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
|
|
63
|
+
|
|
64
|
+
/* ── inputs / toggles / checkboxes (ds/components-inputs) ─────────────── */
|
|
65
|
+
.field { display: block; }
|
|
66
|
+
.field-label { display: block; font-size: var(--my-fs-caption); font-weight: var(--my-fw-bold); margin-bottom: 4px; }
|
|
67
|
+
.field-label .st { font-weight: var(--my-fw-regular); color: var(--my-muted); }
|
|
68
|
+
.input {
|
|
69
|
+
width: 100%; border: 1px solid var(--my-control-border); border-radius: var(--my-r-control); /* §1a-12 (v0.5.4 rule 11) */
|
|
70
|
+
padding: 8px 12px; font: inherit; background: var(--my-surface); color: var(--my-ink);
|
|
71
|
+
transition: border-color var(--my-t-fast);
|
|
72
|
+
}
|
|
73
|
+
.input:hover:not(:disabled) { border-color: var(--my-muted); } /* §1a-4 (input row v2 reference) */
|
|
74
|
+
.input.is-err { border-color: var(--my-error); }
|
|
75
|
+
.input:disabled, .input.is-disabled { background: var(--my-disabled-bg); color: var(--my-disabled-ink); cursor: not-allowed; }
|
|
76
|
+
.input.is-dirty { border-color: var(--my-accent); }
|
|
77
|
+
.help { font-size: 11px; color: var(--my-muted); margin-top: 4px; }
|
|
78
|
+
.emsg { font-size: 11px; color: var(--my-error); margin-top: 4px; display: flex; gap: 4px; align-items: center; }
|
|
79
|
+
.textarea { resize: vertical; min-height: 64px; }
|
|
80
|
+
.readonly-input { background: var(--my-surface-hover); }
|
|
81
|
+
.rep { font-size: 11px; font-weight: var(--my-fw-bold); color: var(--my-accent-strong); cursor: pointer; white-space: nowrap; background: none; border: 0; font-family: inherit; }
|
|
82
|
+
|
|
83
|
+
.slot { display: flex; gap: var(--my-sp-2); align-items: center; }
|
|
84
|
+
.slot .input { flex: 1; }
|
|
85
|
+
.chip {
|
|
86
|
+
font-size: 11px; font-weight: var(--my-fw-bold); border-radius: 99px;
|
|
87
|
+
padding: 3px 11px; background: var(--my-accent-soft); color: var(--my-accent-strong);
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
.chip--empty { background: var(--my-disabled-bg); color: var(--my-muted); border: 1px dashed var(--my-control-border); } /* §1a-15 (design r7-F1): v3 resting boundary token — supersedes the color half of §1a-9 */
|
|
91
|
+
|
|
92
|
+
.tog {
|
|
93
|
+
/* §1a-1: interactables are squared (v0.5.1 decision #20) — the pill radius is for
|
|
94
|
+
non-interactive tags only, so the toggle takes --my-r-control, never 99px. */
|
|
95
|
+
width: 38px; height: 22px; border-radius: var(--my-r-control); background: var(--my-accent);
|
|
96
|
+
position: relative; display: inline-block; cursor: pointer; padding: 0;
|
|
97
|
+
/* §1a-13 (design r7-F1): v3 resting control boundary — v0.5.4 rule 11. The <button> is
|
|
98
|
+
border-box (UA default), so the 38x22 track keeps its outer size. */
|
|
99
|
+
border: 1px solid var(--my-control-border);
|
|
100
|
+
transition: background var(--my-t-fast); flex: none;
|
|
101
|
+
}
|
|
102
|
+
/* §1a-13 (design r7-F1): on-state boundary joins the accent fill (reference .toggle.on) —
|
|
103
|
+
base .tog carries the ON look here (Toggle.tsx adds .is-off when off), so on = :not(.is-off). */
|
|
104
|
+
.tog:not(.is-off) { border-color: var(--my-accent); }
|
|
105
|
+
.tog i { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 4px; background: var(--my-surface); display: block; transition: left var(--my-t-fast), right var(--my-t-fast); } /* §1a-14 (design r7-F1): squared thumb (v3); §1a-17: 16px per the v3 reference — symmetric 2px insets inside the bordered 22px track */
|
|
106
|
+
.tog.is-off { background: var(--my-track); } /* §1a-13 (design r7-F1): v3 off-state track fill */
|
|
107
|
+
.tog.is-off i { right: auto; left: 2px; }
|
|
108
|
+
.tog:hover:not(.is-disabled) { background: var(--my-accent-hover); }
|
|
109
|
+
.tog.is-off:hover:not(.is-disabled) { background: var(--my-muted); } /* §1a-2: hover-darkened border tone (input-hover precedent) */
|
|
110
|
+
.tog.is-disabled { background: var(--my-disabled-bg); border-color: transparent; cursor: not-allowed; } /* §1a-16: reference .toggle.d neutralizes the boundary when disabled */
|
|
111
|
+
.tog.is-disabled i { background: var(--my-disabled-ink); } /* §1a-2: rules-of-use 8 (disabled = --my-disabled-*) */
|
|
112
|
+
|
|
113
|
+
.cb {
|
|
114
|
+
width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--my-control-border); /* §1a-3 (checkbox reference) + §1a-12 (v0.5.4 rule 11) */
|
|
115
|
+
background: var(--my-surface); display: inline-flex; align-items: center; justify-content: center;
|
|
116
|
+
color: var(--my-surface); font-size: 11px; font-weight: var(--my-fw-bold); cursor: pointer; padding: 0; flex: none;
|
|
117
|
+
}
|
|
118
|
+
.cb.is-on { background: var(--my-accent); border-color: var(--my-accent); }
|
|
119
|
+
.cb.is-disabled { background: var(--my-disabled-bg); border-color: var(--my-border); color: var(--my-disabled-ink); cursor: not-allowed; }
|
|
120
|
+
.check-row { display: flex; gap: var(--my-sp-2); align-items: center; cursor: pointer; }
|
|
121
|
+
|
|
122
|
+
/* ── toasts (ds/components-toasts) — bottom-CENTER stack (§1a-10, design.md interaction rules) ── */
|
|
123
|
+
.toast-stack { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--my-sp-5); z-index: 50; display: flex; flex-direction: column-reverse; gap: 10px; max-width: 420px; }
|
|
124
|
+
.toast { display: flex; gap: 10px; align-items: baseline; border-radius: 8px; padding: 11px 14px; font-size: 13px; animation: my-toast-in 180ms ease-out; }
|
|
125
|
+
@keyframes my-toast-in { from { opacity: 0; transform: translateY(12px); } }
|
|
126
|
+
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
|
|
127
|
+
.toast .toast-icon { font-style: normal; font-size: 13px; font-weight: var(--my-fw-bold); flex: none; }
|
|
128
|
+
.toast b { font-weight: var(--my-fw-bold); }
|
|
129
|
+
.toast .toast-action { font-weight: var(--my-fw-bold); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; background: none; border: 0; font-family: inherit; font-size: 13px; }
|
|
130
|
+
.toast .toast-x { margin-left: auto; color: var(--my-muted); cursor: pointer; flex: none; font-size: 12px; background: none; border: 0; }
|
|
131
|
+
.toast .toast-x:hover { color: var(--my-ink); }
|
|
132
|
+
/* §1a-6 (as corrected by gate r4-adjIII): the canonical v0.5 toast is a border-LESS tone-colored
|
|
133
|
+
soft fill (design.md "tone-colored soft fill + icon + message") — the v0.4 status borders were
|
|
134
|
+
themselves a deviation and are REMOVED entirely, not tokenized. */
|
|
135
|
+
.toast--ok { background: var(--my-ok-soft); }
|
|
136
|
+
.toast--ok .toast-icon, .toast--ok .toast-action { color: var(--my-ok); }
|
|
137
|
+
.toast--warn { background: var(--my-warn-soft); }
|
|
138
|
+
.toast--warn .toast-icon, .toast--warn .toast-action { color: var(--my-warn); }
|
|
139
|
+
.toast--error { background: var(--my-error-soft); }
|
|
140
|
+
.toast--error .toast-icon, .toast--error .toast-action { color: var(--my-error); }
|
|
141
|
+
.toast--info { background: var(--my-info-soft); }
|
|
142
|
+
.toast--info .toast-icon, .toast--info .toast-action { color: var(--my-info); }
|
|
143
|
+
.toast-more { font-size: 11px; color: var(--my-muted); text-align: center; }
|
|
144
|
+
|
|
145
|
+
/* ── dialogs (ds/components-dialogs) ─────────────────────────────────── */
|
|
146
|
+
.scrim { position: fixed; inset: 0; background: var(--my-scrim); z-index: 60; display: flex; align-items: center; justify-content: center; padding: var(--my-sp-5); }
|
|
147
|
+
.dlg { background: var(--my-surface); border-radius: var(--my-r-modal); box-shadow: var(--my-shadow-modal); padding: var(--my-sp-5); width: 400px; max-width: 100%; }
|
|
148
|
+
.dlg h2 { font-size: var(--my-fs-h3); font-weight: var(--my-fw-bold); margin: 0 0 6px; }
|
|
149
|
+
.dlg p { font-size: 13px; color: var(--my-muted); margin: 0 0 12px; }
|
|
150
|
+
.dlg ul { list-style: none; font-size: 12.5px; margin: 0 0 4px; padding: 0; }
|
|
151
|
+
.dlg li { padding: 5px 0; display: flex; gap: 9px; align-items: baseline; }
|
|
152
|
+
.dlg li i { font-style: normal; flex: none; }
|
|
153
|
+
.dlg .ic-ok { color: var(--my-ok); }
|
|
154
|
+
.dlg .ic-warn { color: var(--my-warn); }
|
|
155
|
+
.dlg .ic-error { color: var(--my-error); }
|
|
156
|
+
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: var(--my-sp-5); }
|
|
157
|
+
.danf { background: var(--my-error); color: var(--my-surface); border: 1px solid transparent; } /* §1a-7 */
|
|
158
|
+
/* §1a-7: no --my-error-hover token exists and the v0.5 confirm-dialog reference styles no
|
|
159
|
+
danger-fill hover restyle — the hover keeps the rest fill (token addendum candidate, §9.5). */
|
|
160
|
+
.danf:hover:not(:disabled) { background: var(--my-error); }
|
|
161
|
+
.danf:disabled { background: var(--my-disabled-bg); color: var(--my-disabled-ink); cursor: not-allowed; }
|
|
162
|
+
.esc { font-size: 11px; color: var(--my-disabled-ink); margin-top: var(--my-sp-4); }
|
|
163
|
+
|
|
164
|
+
/* ── empty states (ds/layouts-observability + book §7.10) ────────────── */
|
|
165
|
+
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--my-sp-8) var(--my-sp-5); text-align: center; }
|
|
166
|
+
.empty h2 { font-size: var(--my-fs-h2); font-weight: var(--my-fw-bold); margin: var(--my-sp-4) 0 6px; }
|
|
167
|
+
.empty p { font-size: 13px; color: var(--my-muted); max-width: 380px; margin: 0 0 var(--my-sp-4); }
|
|
168
|
+
.ebtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
|
|
169
|
+
/* §1a-8: the spine art rides package-owned tokenized classes — the gauge-block `gfill--nominal`
|
|
170
|
+
and the literal #C9C3B6 strokes are replaced (empty-state row v1: segments = border, hollow /
|
|
171
|
+
waiting nodes = muted, the live "you are here" node = accent). */
|
|
172
|
+
.spine-empty { width: 180px; height: 36px; }
|
|
173
|
+
.spine-track { stroke: var(--my-border); }
|
|
174
|
+
.spine-dash { stroke: var(--my-muted); }
|
|
175
|
+
.spine-node { fill: none; stroke: var(--my-muted); }
|
|
176
|
+
.spine-dot { fill: var(--my-muted); }
|
|
177
|
+
.spine-here { fill: var(--my-accent); }
|
|
178
|
+
|
|
179
|
+
/* @section: additions */
|
|
180
|
+
/* ══════════════════════════════════════════════════════════════════════════════════════════
|
|
181
|
+
ADDITIONS — new atom families (Task 3), extracted from design-export's
|
|
182
|
+
mythical-design/src/styles/{components,base}.css: .my-chip, .my-status (statusLineClass's
|
|
183
|
+
target — NOT the topbar's plain `.my-statusline`, which has no per-tone modifiers and belongs
|
|
184
|
+
to a later shell task), .my-card, .my-avatar, .my-search, .my-banner, .my-gauge, .my-truncate.
|
|
185
|
+
|
|
186
|
+
Fidelity note: the export's own tokens.css is v0.4-era and predates two v0.5.4 canonical
|
|
187
|
+
token distinctions, so two rules were remapped against the CANONICAL tokens.css
|
|
188
|
+
(mythical-design/tokens.css) rather than copied as-is:
|
|
189
|
+
- .my-gauge__track's rail color: var(--my-border) → var(--my-track)
|
|
190
|
+
(canonical rule #4: "Gauges: ... rail = --my-track").
|
|
191
|
+
- .my-search__input's border: var(--my-border) → var(--my-control-border), and its radius
|
|
192
|
+
→ var(--my-r-control) to match the base `.input` atom (canonical rule #11: control
|
|
193
|
+
boundaries use --my-control-border; --my-border is dividers/cards/non-interactive only).
|
|
194
|
+
Separately, several literal font-size px values in the export had no exact step on the
|
|
195
|
+
--my-fs-* scale; they're normalized to the nearest existing token (--my-fs-caption for tiny
|
|
196
|
+
badge/label/gauge text, --my-fs-body for body-scale text) so every declaration below resolves
|
|
197
|
+
through a token — see the Task 3 report for the full before/after list.
|
|
198
|
+
══════════════════════════════════════════════════════════════════════════════════════════ */
|
|
199
|
+
|
|
200
|
+
/* chip (chipClass's 6 tones: neutral has no modifier, the other 5 add my-chip--{tone}) */
|
|
201
|
+
.my-chip {
|
|
202
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
203
|
+
font-size: var(--my-fs-micro); font-weight: var(--my-fw-bold); /* export: 10px, no exact token step */
|
|
204
|
+
border-radius: var(--my-r-pill); padding: 2px 9px; /* export: literal 99px — the pill token */
|
|
205
|
+
background: var(--my-surface-hover); color: var(--my-muted);
|
|
206
|
+
letter-spacing: .3px;
|
|
207
|
+
}
|
|
208
|
+
.my-chip--accent { background: var(--my-accent-soft); color: var(--my-accent-strong); }
|
|
209
|
+
.my-chip--ok { background: var(--my-ok-soft); color: var(--my-ok); }
|
|
210
|
+
.my-chip--warn { background: var(--my-warn-soft); color: var(--my-warn); }
|
|
211
|
+
.my-chip--error { background: var(--my-error-soft); color: var(--my-error); }
|
|
212
|
+
.my-chip--info { background: var(--my-info-soft); color: var(--my-info); }
|
|
213
|
+
|
|
214
|
+
/* status dot + text (statusLineClass's 6 tones — always a modifier, never bare `.my-status`) */
|
|
215
|
+
.my-status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--my-fs-caption); }
|
|
216
|
+
.my-status__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
|
|
217
|
+
.my-status--ok { color: var(--my-muted); } .my-status--ok .my-status__dot { background: var(--my-ok); }
|
|
218
|
+
.my-status--warn { color: var(--my-warn); } .my-status--warn .my-status__dot { background: var(--my-warn); }
|
|
219
|
+
.my-status--error { color: var(--my-error); } .my-status--error .my-status__dot { background: var(--my-error); }
|
|
220
|
+
.my-status--info { color: var(--my-info); } .my-status--info .my-status__dot { background: var(--my-info); }
|
|
221
|
+
.my-status--muted { color: var(--my-muted); } .my-status--muted .my-status__dot { background: var(--my-border); }
|
|
222
|
+
.my-status--accent{ color: var(--my-accent-strong); } .my-status--accent .my-status__dot { background: var(--my-accent); }
|
|
223
|
+
|
|
224
|
+
/* card */
|
|
225
|
+
.my-card {
|
|
226
|
+
background: var(--my-surface); border: 1px solid var(--my-border); /* cards are a valid --my-border use (canonical rule #11) */
|
|
227
|
+
border-radius: var(--my-r-card); padding: 15px 17px;
|
|
228
|
+
}
|
|
229
|
+
.my-card--flush { padding: 0; overflow: hidden; } /* for table/row lists */
|
|
230
|
+
.my-card__title {
|
|
231
|
+
font-size: var(--my-fs-micro); font-weight: var(--my-fw-bold); color: var(--my-muted); /* export: 11px, no exact token step */
|
|
232
|
+
text-transform: uppercase; letter-spacing: .4px; margin: 0 0 11px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* avatar (with optional context ring) */
|
|
236
|
+
.my-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
|
|
237
|
+
.my-avatar__ring {
|
|
238
|
+
display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
|
|
239
|
+
flex: none; padding: 3px; background: var(--my-border); /* decorative ring, non-interactive */
|
|
240
|
+
}
|
|
241
|
+
.my-avatar__inner {
|
|
242
|
+
border-radius: 50%; background: var(--my-surface); display: inline-flex;
|
|
243
|
+
align-items: center; justify-content: center; padding: 2px;
|
|
244
|
+
}
|
|
245
|
+
.my-avatar__initials {
|
|
246
|
+
width: 34px; height: 34px; border-radius: 50%;
|
|
247
|
+
background: var(--my-accent-soft); color: var(--my-accent-strong);
|
|
248
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
249
|
+
font-weight: var(--my-fw-bold); font-size: var(--my-fs-body); /* export: 14px — exact token match */
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* search / filter input */
|
|
253
|
+
.my-search { position: relative; display: flex; align-items: center; }
|
|
254
|
+
.my-search__icon { position: absolute; left: 11px; font-size: var(--my-fs-caption); color: var(--my-muted); pointer-events: none; } /* export: 12.5px, no exact step */
|
|
255
|
+
.my-search__input {
|
|
256
|
+
width: 100%; box-sizing: border-box;
|
|
257
|
+
border: 1px solid var(--my-control-border); /* remapped — see fidelity note above */
|
|
258
|
+
background: var(--my-surface); border-radius: var(--my-r-control); /* remapped to match the base .input atom */
|
|
259
|
+
padding: 8px 30px; font-size: var(--my-fs-caption); /* export: 12.5px, no exact step */
|
|
260
|
+
color: var(--my-ink); font-family: inherit;
|
|
261
|
+
}
|
|
262
|
+
.my-search__input:focus { outline: none; border-color: var(--my-accent); box-shadow: 0 0 0 3px var(--my-accent-soft); }
|
|
263
|
+
.my-search__clear {
|
|
264
|
+
position: absolute; right: 8px; width: 18px; height: 18px; border: 0;
|
|
265
|
+
background: var(--my-surface-hover); color: var(--my-muted); border-radius: 50%;
|
|
266
|
+
font-size: var(--my-fs-micro); /* export: 11px, no exact step */
|
|
267
|
+
line-height: 1; cursor: pointer;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* banners (status softs — always icon + label, token rule #7) */
|
|
271
|
+
.my-banner {
|
|
272
|
+
display: flex; gap: 10px; align-items: baseline; border-radius: var(--my-r-card);
|
|
273
|
+
padding: 13px 16px; font-size: var(--my-fs-body); /* export: 13px, nearest body-scale token */
|
|
274
|
+
text-wrap: pretty;
|
|
275
|
+
}
|
|
276
|
+
.my-banner__glyph { font-style: normal; font-weight: var(--my-fw-bold); }
|
|
277
|
+
.my-banner--warn { background: var(--my-warn-soft); border: 1px solid var(--my-warn); }
|
|
278
|
+
.my-banner--warn .my-banner__glyph { color: var(--my-warn); }
|
|
279
|
+
.my-banner--info { background: var(--my-info-soft); border: 1px solid var(--my-info); }
|
|
280
|
+
.my-banner--info .my-banner__glyph { color: var(--my-info); }
|
|
281
|
+
.my-banner--ok { background: var(--my-ok-soft); border: 1px solid var(--my-ok); }
|
|
282
|
+
.my-banner--ok .my-banner__glyph { color: var(--my-ok); }
|
|
283
|
+
.my-banner--error { background: var(--my-error-soft); border: 1px solid var(--my-error); }
|
|
284
|
+
.my-banner--error .my-banner__glyph { color: var(--my-error); }
|
|
285
|
+
|
|
286
|
+
/* gauge (context / usage) — fill thresholds per token rule #4 */
|
|
287
|
+
.my-gauge { display: inline-flex; }
|
|
288
|
+
.my-gauge svg { display: block; transform: rotate(-90deg); }
|
|
289
|
+
.my-gauge__track { stroke: var(--my-track); fill: none; } /* remapped — see fidelity note above */
|
|
290
|
+
.my-gauge__fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset var(--my-t-base); }
|
|
291
|
+
.my-gauge__fill--ok { stroke: var(--my-accent); } /* < 75% — rule #4: fill = accent, not the "ok" status color */
|
|
292
|
+
.my-gauge__fill--warn { stroke: var(--my-warn); } /* 75–89% */
|
|
293
|
+
.my-gauge__fill--error { stroke: var(--my-error); } /* ≥ 90% */
|
|
294
|
+
.my-gauge__label {
|
|
295
|
+
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
296
|
+
font-size: var(--my-fs-micro); /* export: 11px, no exact step */
|
|
297
|
+
font-weight: var(--my-fw-bold); font-variant-numeric: tabular-nums; color: var(--my-ink);
|
|
298
|
+
}
|
|
299
|
+
.my-gauge__wrap { position: relative; display: inline-flex; }
|
|
300
|
+
|
|
301
|
+
/* truncation helper (design-export base.css) */
|
|
302
|
+
.my-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|