@rak200/ui 0.7.0 → 0.7.2

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/dist/select.js CHANGED
@@ -240,6 +240,23 @@ export class UiSelect extends LitElement {
240
240
  display: block;
241
241
  }
242
242
 
243
+ /* What a theme's glow is drawn on, around the box for the reason src/input.ts gives
244
+ beside its own, which tests/select.test.ts compares as it compares the box. */
245
+ .glow {
246
+ display: grid;
247
+ border-radius: ${reference('--ui-radius')};
248
+ color: ${reference('--ui-color-accent')};
249
+ box-shadow: ${reference('--ui-elevation-control')};
250
+ }
251
+
252
+ .glow:has(> [aria-invalid='true']) {
253
+ color: ${reference('--ui-color-danger')};
254
+ }
255
+
256
+ .glow:has(> :disabled) {
257
+ box-shadow: none;
258
+ }
259
+
243
260
  /* The box, which src/input.ts also draws and tests/select.test.ts compares. */
244
261
  select {
245
262
  box-sizing: border-box;
@@ -536,19 +553,21 @@ export class UiSelect extends LitElement {
536
553
  return html `
537
554
  <div class="stack" part="stack">
538
555
  <label for="control" part="label">${this.label}</label>
539
- <select
540
- id="control"
541
- part="control"
542
- name=${this.name === '' ? nothing : this.name}
543
- ?required=${this.required}
544
- ?disabled=${this.disabled}
545
- ?multiple=${this.multiple}
546
- aria-invalid=${this.error === '' ? nothing : 'true'}
547
- aria-describedby=${this.#described()}
548
- @change=${this.#changed}
556
+ <span class="glow"
557
+ ><select
558
+ id="control"
559
+ part="control"
560
+ name=${this.name === '' ? nothing : this.name}
561
+ ?required=${this.required}
562
+ ?disabled=${this.disabled}
563
+ ?multiple=${this.multiple}
564
+ aria-invalid=${this.error === '' ? nothing : 'true'}
565
+ aria-describedby=${this.#described()}
566
+ @change=${this.#changed}
567
+ >
568
+ ${[...this.children].map((node) => this.#draw(node, chosen))}
569
+ </select></span
549
570
  >
550
- ${[...this.children].map((node) => this.#draw(node, chosen))}
551
- </select>
552
571
  ${this.help === ''
553
572
  ? nothing
554
573
  : html `<span class="help" id="help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CACV,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;2CAChC,IAAI,CAAC,UAAU,EAAE;kCAC1B,IAAI,CAAC,QAAQ;;0BAErB,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;;kBAIhE,IAAI,CAAC,IAAI,KAAK,EAAE;YACZ,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,IAAI,CAAA,4CAA4C,IAAI,CAAC,IAAI,SACnE;kBAEI,IAAI,CAAC,KAAK,KAAK,EAAE;YACb,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,IAAI,CAAA,+CAA+C,IAAI,CAAC,KAAK,SACvE;kBACE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;;;oCAGT,IAAI,CAAC,OAAO;;SAEvC,CAAC;IACN,CAAC;;AAGL,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,oEAAoE;AACpE,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE7C,0EAA0E;AAC1E,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE7C,0EAA0E;AAC1E,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { type DerivedToken, type Token } from './tokens.js';
2
+ /** A name a theme may set: a ground, or a derived role it overrides. */
3
+ type Named = Token | DerivedToken;
4
+ /**
5
+ * A named set of decisions, as data, for {@link themeStyleSheet} to render.
6
+ *
7
+ * **The object `defaults`, `darkScheme` and `moreContrast` already are**, for a palette other
8
+ * than the default one — RFC 0003. Data first and CSS second, because a target that is not CSS
9
+ * reads the source rather than parsing a stylesheet back into values, which is what #24 records
10
+ * as the thing to avoid.
11
+ *
12
+ * A theme carries no `scheme`: no shipped theme declines one, and a theme that wanted one would
13
+ * gain an optional field, additively.
14
+ */
15
+ export interface Theme {
16
+ /** What `data-ui-theme` says to select it. */
17
+ readonly name: string;
18
+ /**
19
+ * What it sets, at its value in the light scheme or in both — as `defaults` is. A derived
20
+ * role belongs here only where the theme needs a different mix than the formula gives,
21
+ * and then the floors measure what it wrote.
22
+ */
23
+ readonly values: Readonly<Partial<Record<Named, string>>>;
24
+ /** The values that differ in the dark scheme, as `darkScheme` is. Colours only. */
25
+ readonly dark?: Readonly<Partial<Record<Named, string>>>;
26
+ /**
27
+ * Its answer to `prefers-contrast: more`, a light and a dark value per name, as
28
+ * `moreContrast` is.
29
+ */
30
+ readonly more?: Readonly<Partial<Record<Named, readonly [light: string, dark: string]>>>;
31
+ }
32
+ /**
33
+ * A theme as CSS: its block under `[data-ui-theme='…']`, and its answer to
34
+ * `prefers-contrast: more` after it.
35
+ *
36
+ * **Never emitted by `tokenStyleSheet()`**, so a host inserts the block for a theme it uses
37
+ * and pays for no theme it never selects. Selecting one stays the attribute.
38
+ *
39
+ * **The answer resets the states the default palette's answer writes and the theme's leaves
40
+ * out.** `tokenStyleSheet()` writes them under `more` at `:root`, and a value declared at
41
+ * `:root` reaches every subtree — so under a theme it would paint the default palette's greys
42
+ * over the theme's grounds. `initial` takes each back to its formula, which resolves against
43
+ * the theme's own grounds where it is used. A ground needs no reset: one the theme declares
44
+ * wins on its own element, and one it does not is the reader's setting, rightly inherited.
45
+ */
46
+ export declare function themeStyleSheet(theme: Theme): string;
47
+ /**
48
+ * Matrix: a terminal's green on near-black in the dark scheme, and the same idea on white in
49
+ * the light one — RFC 0003 built it in both and kept both.
50
+ *
51
+ * The dark scheme is the reference's wherever the floors allow it: its green on `#050505`,
52
+ * a monospace face, an 8px corner. On white that green is 1.37:1, so the text goes to a dark
53
+ * green and the accent to a middle one, which keeps the derived black label legible on it.
54
+ * Success is the theme's own green, where the default palette's would sit beside it as a
55
+ * second one, and info a terminal's brighter cyan; both clear the 4.5:1 every outcome does.
56
+ *
57
+ * **The raised surfaces' glow is the elevation step**: the card, the menu, the toast and the
58
+ * tip already read `--ui-elevation-100`, and a glow is a shadow at no offset. A shadow is not
59
+ * a colour, so `light-dark()` cannot carry two of them — but the part of a glow that follows
60
+ * the scheme is its colour, and a colour inside a shadow can be `light-dark()`. The strength
61
+ * the prototype settled on, 1.8, is folded into the alphas. **The controls wear the same
62
+ * ring and glow through `--ui-elevation-control`.** Both are written in `currentColor`, so
63
+ * each surface and control lights them in its own colour: the accent's green, the danger on
64
+ * an invalid control, and a toast's edge.
65
+ *
66
+ * Under `prefers-contrast: more` the green stays on the accent, and the text and the edge of
67
+ * what floats over the page go to the text's pole.
68
+ */
69
+ export declare const matrix: Theme;
70
+ export {};
71
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzF,wEAAwE;AACxE,KAAK,KAAK,GAAG,KAAK,GAAG,YAAY,CAAC;AAElC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,KAAK;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1D,mFAAmF;IACnF,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACzD;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5F;AAOD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAmBpD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,MAAM,EAAE,KA4CpB,CAAC"}
package/dist/theme.js ADDED
@@ -0,0 +1,98 @@
1
+ import { derivedTokens, moreContrast } from './tokens.js';
2
+ /** One declaration, a value with its dark one where it has one. */
3
+ function declare(name, light, dark) {
4
+ return ` ${name}: ${dark === undefined ? light : `light-dark(${light}, ${dark})`};`;
5
+ }
6
+ /**
7
+ * A theme as CSS: its block under `[data-ui-theme='…']`, and its answer to
8
+ * `prefers-contrast: more` after it.
9
+ *
10
+ * **Never emitted by `tokenStyleSheet()`**, so a host inserts the block for a theme it uses
11
+ * and pays for no theme it never selects. Selecting one stays the attribute.
12
+ *
13
+ * **The answer resets the states the default palette's answer writes and the theme's leaves
14
+ * out.** `tokenStyleSheet()` writes them under `more` at `:root`, and a value declared at
15
+ * `:root` reaches every subtree — so under a theme it would paint the default palette's greys
16
+ * over the theme's grounds. `initial` takes each back to its formula, which resolves against
17
+ * the theme's own grounds where it is used. A ground needs no reset: one the theme declares
18
+ * wins on its own element, and one it does not is the reader's setting, rightly inherited.
19
+ */
20
+ export function themeStyleSheet(theme) {
21
+ const selector = `[data-ui-theme='${theme.name}']`;
22
+ const values = Object.entries(theme.values).map(([name, light]) => declare(name, light, theme.dark?.[name]));
23
+ const answered = theme.more ?? {};
24
+ const resets = derivedTokens.filter((name) => name in moreContrast && !(name in answered) && !(name in theme.values));
25
+ const answer = [
26
+ ...Object.entries(answered).map(([name, [light, dark]]) => declare(name, light, dark)),
27
+ ...resets.map((name) => ` ${name}: initial;`),
28
+ ].map((line) => ` ${line}`);
29
+ return [
30
+ `${selector} {\n${values.join('\n')}\n}`,
31
+ `@media (prefers-contrast: more) {\n ${selector} {\n${answer.join('\n')}\n }\n}`,
32
+ ].join('\n\n');
33
+ }
34
+ /**
35
+ * Matrix: a terminal's green on near-black in the dark scheme, and the same idea on white in
36
+ * the light one — RFC 0003 built it in both and kept both.
37
+ *
38
+ * The dark scheme is the reference's wherever the floors allow it: its green on `#050505`,
39
+ * a monospace face, an 8px corner. On white that green is 1.37:1, so the text goes to a dark
40
+ * green and the accent to a middle one, which keeps the derived black label legible on it.
41
+ * Success is the theme's own green, where the default palette's would sit beside it as a
42
+ * second one, and info a terminal's brighter cyan; both clear the 4.5:1 every outcome does.
43
+ *
44
+ * **The raised surfaces' glow is the elevation step**: the card, the menu, the toast and the
45
+ * tip already read `--ui-elevation-100`, and a glow is a shadow at no offset. A shadow is not
46
+ * a colour, so `light-dark()` cannot carry two of them — but the part of a glow that follows
47
+ * the scheme is its colour, and a colour inside a shadow can be `light-dark()`. The strength
48
+ * the prototype settled on, 1.8, is folded into the alphas. **The controls wear the same
49
+ * ring and glow through `--ui-elevation-control`.** Both are written in `currentColor`, so
50
+ * each surface and control lights them in its own colour: the accent's green, the danger on
51
+ * an invalid control, and a toast's edge.
52
+ *
53
+ * Under `prefers-contrast: more` the green stays on the accent, and the text and the edge of
54
+ * what floats over the page go to the text's pole.
55
+ */
56
+ export const matrix = {
57
+ name: 'matrix',
58
+ values: {
59
+ '--ui-color-surface': '#ffffff',
60
+ '--ui-color-text': '#003b00',
61
+ '--ui-color-accent': '#008f11',
62
+ '--ui-color-focus': '#008f11',
63
+ '--ui-color-success': '#00850f',
64
+ '--ui-color-info': '#00778a',
65
+ '--ui-font': "'Courier New', Courier, ui-monospace, monospace",
66
+ '--ui-radius': '0.5rem',
67
+ // 18% and 30% of the text rather than the formula's 16% and 26%: a green text is
68
+ // far from neutral, and the formula's mix left the dark hover at 1.24:1 and the light
69
+ // pressed 1.24 past the hover, under the 1.25 both owe. Written as values, so they
70
+ // are data a target that is not CSS can read.
71
+ '--ui-color-hover': '#cfd9ce',
72
+ '--ui-color-pressed': '#b0c1ae',
73
+ '--ui-elevation-100': '0 0 0 1px light-dark(rgb(from currentColor r g b / 0.54), rgb(from currentColor r g b / 0.45)), 0 0 18px light-dark(rgb(from currentColor r g b / 0.45), rgb(from currentColor r g b / 0.54))',
74
+ // The same ring and glow on every control, at the same strengths, so neither reads
75
+ // weaker than the other. In the control's own colour, which is the accent's green
76
+ // and the danger on an invalid one.
77
+ '--ui-elevation-control': '0 0 0 1px light-dark(rgb(from currentColor r g b / 0.54), rgb(from currentColor r g b / 0.45)), 0 0 18px light-dark(rgb(from currentColor r g b / 0.45), rgb(from currentColor r g b / 0.54))',
78
+ // Under the pointer the ring goes solid and the glow doubles, which stops at solid in
79
+ // the dark: the fills' own hovers barely move in this green, so the glow says a
80
+ // button is live.
81
+ '--ui-elevation-control-hover': '0 0 0 1px currentColor, 0 0 18px light-dark(rgb(from currentColor r g b / 0.9), currentColor)',
82
+ },
83
+ dark: {
84
+ '--ui-color-surface': '#050505',
85
+ '--ui-color-text': '#00ff00',
86
+ '--ui-color-accent': '#00ff00',
87
+ '--ui-color-focus': '#ccffcc',
88
+ '--ui-color-success': '#00ff00',
89
+ '--ui-color-info': '#00e5ff',
90
+ '--ui-color-hover': '#11280f',
91
+ '--ui-color-pressed': '#174315',
92
+ },
93
+ more: {
94
+ '--ui-color-text': ['#000000', '#ffffff'],
95
+ '--ui-color-border-overlay': ['#000000', '#ffffff'],
96
+ },
97
+ };
98
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAiC,MAAM,aAAa,CAAC;AAkCzF,mEAAmE;AACnE,SAAS,OAAO,CAAC,IAAY,EAAE,KAAa,EAAE,IAAwB;IAClE,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,KAAK,KAAK,IAAI,GAAG,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;;;;;;;;;;;GA0CG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACrC,yCAAyC;IACzC,gBAAyB,MAAM,0BAiD7B;IAEF,mFAAmF;IAC1E,iBAAiB,IAAI,IAAI;IAalC,qFAAqF;IAC5E,MAAM,IAAI,cAAc;CAMpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qBAAa,OAAQ,SAAQ,UAAU;;IACnC,yCAAyC;IACzC,gBAAyB,MAAM,0BAuJ7B;IAEF,mDAAmD;IACnD,gBAAyB,UAAU;;;;;;;;;;;;MAIjC;IAEF;;;;;;;;OAQG;IACH,OAAO,EAAE,YAAY,CAAU;IAE/B;;;;;;;OAOG;IACH,QAAQ,SAAS;IAEjB;;;;;;;OAOG;IACH,YAAY,SAAa;IAoCzB,2FAA2F;IAClF,iBAAiB,IAAI,IAAI;IAwBlC,yCAAyC;IAChC,oBAAoB,IAAI,IAAI;IAerC,oEAAoE;IAC3D,UAAU,IAAI,IAAI;IAQ3B,uEAAuE;IAC9D,MAAM,IAAI,cAAc;IAkCjC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,QAAO,IAAI,CAEzB;CAgEL;AAWD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;QACxB,UAAU,EAAE,OAAO,CAAC;KACvB;CACJ"}
package/dist/toast.js CHANGED
@@ -268,23 +268,18 @@ export class UiToast extends LitElement {
268
268
  gap: ${reference('--ui-space')};
269
269
  box-sizing: border-box;
270
270
  padding: ${reference('--ui-space')} calc(${reference('--ui-space')} * 1.5);
271
- /* The edge goes all the way round in the variant's colour, the stripe at the
272
- start only wider. A stripe in one colour and three sides in the derived
273
- border met at the corners as a break — RFC 0003. The shorthand comes after
274
- the border rather than a width beside it: the width and the style are the
275
- stripe's as much as the hue is. */
276
- border: 1px solid ${reference('--ui-color-info')};
277
- border-inline-start: calc(${reference('--ui-space')} / 2) solid
278
- ${reference('--ui-color-info')};
271
+ /* The edge's room, which the layer below draws in: the stripe at the start is
272
+ wider, and the rest of the edge one pixel. */
273
+ border: 1px solid transparent;
274
+ border-inline-start-width: calc(${reference('--ui-space')} / 2);
279
275
  border-radius: ${reference('--ui-radius')};
280
276
  background: ${reference('--ui-color-surface')};
281
- color: ${reference('--ui-color-text')};
277
+ /* The variant's colour, which the edge, the glow and the icon are lit in. The
278
+ message writes the text's, which is the pair the surface was chosen against. */
279
+ color: ${reference('--ui-color-info')};
282
280
  font-family: ${reference('--ui-font')};
283
- /* Lifted, because it sits over the page rather than in it — and bounded as
284
- well as lifted, for the reason src/card.ts gives: a shadow is one value in
285
- both schemes and does almost nothing on a dark page, where the edge is what
286
- separates the surface from what is under it. */
287
- box-shadow: ${reference('--ui-elevation-raised')};
281
+ /* What the edge's layer below is laid out against. */
282
+ position: relative;
288
283
  /* The toaster takes no clicks so it does not steal a corner of the page. This
289
284
  is the part that is not the corner. */
290
285
  pointer-events: auto;
@@ -297,15 +292,39 @@ export class UiToast extends LitElement {
297
292
  }
298
293
 
299
294
  :host([variant='success']) {
300
- border-color: ${reference('--ui-color-success')};
295
+ color: ${reference('--ui-color-success')};
301
296
  }
302
297
 
303
298
  :host([variant='warning']) {
304
- border-color: ${reference('--ui-color-warning')};
299
+ color: ${reference('--ui-color-warning')};
305
300
  }
306
301
 
307
302
  :host([variant='danger']) {
308
- border-color: ${reference('--ui-color-danger')};
303
+ color: ${reference('--ui-color-danger')};
304
+ }
305
+
306
+ /* The edge goes all the way round in one colour, the stripe at the start only
307
+ wider. A stripe in one colour and three sides in the derived border met at the
308
+ corners as a break — RFC 0003. Lifted, too, because a toast sits over the page
309
+ rather than in it, and bounded as well as lifted for the reason src/card.ts
310
+ gives.
311
+
312
+ Both are drawn on a layer whose colour is --ui-color-toast-edge, which is the
313
+ variant's until something sets it — the answer to more contrast sets it to the
314
+ text. A theme's glow written in currentColor is lit in it too. The layer covers
315
+ the toast and its edge, and takes no pointer, so the dismiss button is still
316
+ what is pressed. */
317
+ :host::before {
318
+ content: '';
319
+ position: absolute;
320
+ inset: -1px;
321
+ inset-inline-start: calc(${reference('--ui-space')} / -2);
322
+ border: 1px solid currentColor;
323
+ border-inline-start-width: calc(${reference('--ui-space')} / 2);
324
+ border-radius: inherit;
325
+ pointer-events: none;
326
+ color: ${reference('--ui-color-toast-edge')};
327
+ box-shadow: ${reference('--ui-elevation-raised')};
309
328
  }
310
329
 
311
330
  /* The icon takes the edge's colour, and sits centred on the message's first line,
@@ -315,19 +334,7 @@ export class UiToast extends LitElement {
315
334
  .icon {
316
335
  flex: none;
317
336
  margin-block: calc((1lh - ${reference('--ui-icon-size')}) / 2);
318
- color: ${reference('--ui-color-info')};
319
- }
320
-
321
- :host([variant='success']) .icon {
322
- color: ${reference('--ui-color-success')};
323
- }
324
-
325
- :host([variant='warning']) .icon {
326
- color: ${reference('--ui-color-warning')};
327
- }
328
-
329
- :host([variant='danger']) .icon {
330
- color: ${reference('--ui-color-danger')};
337
+ color: ${reference('--ui-color-toast-edge')};
331
338
  }
332
339
 
333
340
  /* Where the entrance comes from. Without it there is nothing to transition out of:
@@ -353,6 +360,9 @@ export class UiToast extends LitElement {
353
360
  flex item refuses to shrink below its content without this. */
354
361
  flex: 1;
355
362
  min-inline-size: 0;
363
+ /* The pair, never half of it: the surface was chosen against the text, and the
364
+ toast's own colour is its variant's. */
365
+ color: ${reference('--ui-color-text')};
356
366
  }
357
367
 
358
368
  button {
package/dist/toast.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sourceRoot":"","sources":["../src/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAA+C,MAAM,KAAK,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,2FAA2F;AAC3F,MAAM,OAAO,GAAG,SAAS,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM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AM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEjC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,4EAA4E;IAC5E,KAAK,CAAC,KAAK;QACP,oFAAoF;QACpF,kFAAkF;QAClF,yBAAyB;QACzB,EAAE;QACF,oFAAoF;QACpF,qFAAqF;QACrF,gFAAgF;QAChF,qFAAqF;QACrF,gFAAgF;QAChF,gDAAgD;QAChD,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,OAAO;QACX,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE5B,+EAA+E;QAC/E,+EAA+E;QAC/E,qFAAqF;QACrF,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEtF,oFAAoF;QACpF,oFAAoF;QACpF,wBAAwB;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/E,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;;AAGL,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,oEAAoE;AACpE,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAE/C,qDAAqD;AACrD,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC"}
package/dist/tokens.d.ts CHANGED
@@ -31,7 +31,7 @@
31
31
  * it does break is code that **enumerates** the set, an exhaustive `Record<Token, string>`
32
32
  * above all. The supported shape is the partial map, which is what a theme is anyway.
33
33
  */
34
- export declare const tokens: readonly ["--ui-color-accent", "--ui-color-surface", "--ui-color-text", "--ui-color-focus", "--ui-color-danger", "--ui-color-success", "--ui-color-warning", "--ui-color-info", "--ui-color-scrim", "--ui-radius", "--ui-space", "--ui-font", "--ui-duration-100", "--ui-easing-state", "--ui-easing-enter", "--ui-easing-exit", "--ui-icon-size", "--ui-icon-stroke", "--ui-elevation-100", "--ui-text-100"];
34
+ export declare const tokens: readonly ["--ui-color-accent", "--ui-color-surface", "--ui-color-text", "--ui-color-focus", "--ui-color-danger", "--ui-color-success", "--ui-color-warning", "--ui-color-info", "--ui-color-toast-edge", "--ui-color-scrim", "--ui-radius", "--ui-space", "--ui-font", "--ui-duration-100", "--ui-easing-state", "--ui-easing-enter", "--ui-easing-exit", "--ui-icon-size", "--ui-icon-stroke", "--ui-elevation-100", "--ui-elevation-control", "--ui-text-100"];
35
35
  /** A CSS custom property this package defines and gives a default. */
36
36
  export type Token = (typeof tokens)[number];
37
37
  /**
@@ -44,7 +44,7 @@ export type Token = (typeof tokens)[number];
44
44
  * what it buys is an override surface a host can hold in their head: change the accent and
45
45
  * the hover and pressed colours follow, rather than being one more name each.
46
46
  */
47
- export declare const derivedTokens: readonly ["--ui-duration-state", "--ui-color-border", "--ui-color-text-muted", "--ui-color-hover", "--ui-color-pressed", "--ui-color-accent-contrast", "--ui-color-accent-hover", "--ui-color-accent-pressed", "--ui-elevation-raised", "--ui-text-supporting", "--ui-color-surface-muted"];
47
+ export declare const derivedTokens: readonly ["--ui-duration-state", "--ui-color-border", "--ui-color-text-muted", "--ui-color-border-overlay", "--ui-color-hover", "--ui-color-pressed", "--ui-color-accent-contrast", "--ui-color-accent-hover", "--ui-color-accent-pressed", "--ui-elevation-raised", "--ui-elevation-control-hover", "--ui-text-supporting", "--ui-color-surface-muted"];
48
48
  /** A CSS custom property this package computes rather than declares. */
49
49
  export type DerivedToken = (typeof derivedTokens)[number];
50
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings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MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,0VAyDhB,CAAC;AAEX,wEAAwE;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAqEpD,CAAC;AAoEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CA2D3D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAiB/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,YAAY,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAgBhF,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,IAAI,MAAM,CA2BxC"}
package/dist/tokens.js CHANGED
@@ -52,6 +52,12 @@ export const tokens = [
52
52
  // colour in the default palette and a second green beside success in a green one —
53
53
  // RFC 0003. A ground for the reason the other three are.
54
54
  '--ui-color-info',
55
+ // The edge of a toast, arriving with the answer to more contrast, which edges a toast in
56
+ // the text — RFC 0003. Its default is `currentColor`, and a toast's colour is its
57
+ // variant's, so each variant is edged in its own outcome colour with no formula per
58
+ // variant. Set, it edges every variant in that one colour, and a theme's glow on a toast
59
+ // is lit in it too.
60
+ '--ui-color-toast-edge',
55
61
  // The dim behind a modal, and a *ground* rather than a derivation even though every
56
62
  // other neutral here is derived. A derived neutral mixes toward the text, which is
57
63
  // what makes one formula right in both schemes — and it is exactly wrong for this
@@ -121,6 +127,15 @@ export const tokens = [
121
127
  // and therefore already scheme-correct — which is why `src/card.ts` draws both and
122
128
  // says so beside them.
123
129
  '--ui-elevation-100',
130
+ // The glow a theme lights a control with, arriving with Matrix under RFC 0003's second
131
+ // clause: a category a shipped theme brings whose default is the identity, so the
132
+ // default palette renders as before. A ground rather than a purpose pointing into the
133
+ // scale, because a control is not raised and `none` is no step of it.
134
+ //
135
+ // **A theme writes it in `currentColor`**, and the box that draws it sets its own colour
136
+ // to the accent, or to the danger when the control is invalid — so one value lights
137
+ // every control in its state's colour. `ARCHITECTURE.md` says why a named colour would not.
138
+ '--ui-elevation-control',
124
139
  // The type scale, arriving with `ui-table` — the category `ROADMAP.md` said would, and
125
140
  // the last one the v0 surface expects. It arrives to fix a defect rather than to
126
141
  // anticipate one: `font-size: 0.875em` was written out in three places across the form
@@ -167,6 +182,11 @@ export const derivedTokens = [
167
182
  // a placeholder is text, so 1.4.3 asks 4.5:1. `tests/tokens.test.ts` holds both.
168
183
  '--ui-color-border',
169
184
  '--ui-color-text-muted',
185
+ // The edge of what floats over the page — the dialog, the tip and the open menu — apart
186
+ // from a control's boundary, because the answer to `prefers-contrast: more` edges the
187
+ // first in the text and leaves the second where its floor put it — RFC 0003. Its default
188
+ // is the boundary's, so the default palette renders as before.
189
+ '--ui-color-border-overlay',
170
190
  // `hover` matches the pseudo-class it answers to; `pressed` deliberately does not —
171
191
  // `--ui-color-active` would read as *the active item* as readily as *the pressed
172
192
  // control*, and the role this implements was named `accent hover / pressed`.
@@ -183,6 +203,10 @@ export const derivedTokens = [
183
203
  // and will not be the last, and the name a host retunes should not be the name of
184
204
  // whichever component happened to need it first.
185
205
  '--ui-elevation-raised',
206
+ // The glow a button lights to under the pointer, arriving with Matrix beside the glow it
207
+ // lights from. Derived from that one, so a theme that writes only the resting glow keeps
208
+ // it under the pointer rather than losing it, and the default palette lights nothing.
209
+ '--ui-elevation-control-hover',
186
210
  // The purpose the type scale is read through, and the only name a component writes.
187
211
  // `supporting` is a role rather than a size and rather than a component: the four
188
212
  // places that want it are a field's help text, a field's error, a tooltip's tip and a
@@ -238,6 +262,8 @@ export const defaults = {
238
262
  '--ui-color-warning': '#b45309',
239
263
  // Cyan-700, the step the other outcomes take, and held to their floor: 5.36:1.
240
264
  '--ui-color-info': '#0e7490',
265
+ // The colour of the toast it edges, which is its variant's.
266
+ '--ui-color-toast-edge': 'currentColor',
241
267
  // Half black. Enough to push the page behind a modal out of the reading order for the
242
268
  // eye as well as for the accessibility tree, and not so much that the context a modal
243
269
  // is *about* stops being visible. The alpha is the whole point, so this is the one
@@ -270,6 +296,7 @@ export const defaults = {
270
296
  // falls on rather than tinting it — a coloured shadow is a decision this layer would
271
297
  // have to defend at every hue a host might set.
272
298
  '--ui-elevation-100': '0 1px 2px -1px rgb(0 0 0 / 0.1), 0 2px 6px -1px rgb(0 0 0 / 0.1)',
299
+ '--ui-elevation-control': 'none',
273
300
  // The value the three hardcoded sites already carried, adopted rather than re-chosen:
274
301
  // this token exists to make an existing decision overridable, and changing it in the
275
302
  // same breath would hide whether the extraction was faithful. 87.5% is 14px against a
@@ -387,6 +414,10 @@ export const formulas = {
387
414
  // step below clears neither — 45% is 2.94 in light, which is what a value chosen by
388
415
  // eye would have shipped.
389
416
  '--ui-color-border': mix('--ui-color-text', 50, '--ui-color-surface'),
417
+ // The boundary's own mix, written from the grounds rather than through
418
+ // `--ui-color-border`, since a formula reads grounds only. So a host who retunes the
419
+ // boundary retunes this name beside it.
420
+ '--ui-color-border-overlay': mix('--ui-color-text', 50, '--ui-color-surface'),
390
421
  // 5.24:1 and 6.07:1, against a floor of 4.5. Not the 60% that first cleared it: that
391
422
  // is 4.52 in light, a rounding error from failing, and a default nobody could then
392
423
  // retune without breaking a floor they were not thinking about.
@@ -395,6 +426,8 @@ export const formulas = {
395
426
  // lives, and a host who wants flatter cards moves the role rather than reverse
396
427
  // engineering which step a card happens to read.
397
428
  '--ui-elevation-raised': ground('--ui-elevation-100'),
429
+ // A plain reference: the resting glow, until a theme lights a brighter one.
430
+ '--ui-elevation-control-hover': ground('--ui-elevation-control'),
398
431
  // A plain reference, like the two purposes above: the scale is where the value lives,
399
432
  // and a host who wants larger supporting text moves the role rather than working out
400
433
  // which step a tooltip happens to read.
@@ -481,6 +514,10 @@ export const moreContrast = {
481
514
  '--ui-color-accent-pressed': ['#4d4d4d', '#b3b3b3'],
482
515
  // Under the hover, so a row under the pointer is still a change rather than a stripe.
483
516
  '--ui-color-surface-muted': ['#f2f2f2', '#141414'],
517
+ // What floats over the page edged in the text, which the mix toward it falls short of.
518
+ '--ui-color-border-overlay': ['#000000', '#ffffff'],
519
+ // And a toast, whichever its variant: black and white, its icon with it.
520
+ '--ui-color-toast-edge': ['#000000', '#ffffff'],
484
521
  };
485
522
  /** The category every duration name shares, which is what reduced motion collapses. */
486
523
  const duration = '--ui-duration-';
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,qFAAqF;IACrF,uFAAuF;IACvF,mFAAmF;IACnF,cAAc;IACd,EAAE;IACF,oFAAoF;IACpF,+EAA+E;IAC/E,6EAA6E;IAC7E,oBAAoB;IACpB,oBAAoB;IACpB,mFAAmF;IACnF,mFAAmF;IACnF,mFAAmF;IACnF,yDAAyD;IACzD,iBAAiB;IACjB,oFAAoF;IACpF,mFAAmF;IACnF,kFAAkF;IAClF,iFAAiF;IACjF,oFAAoF;IACpF,wEAAwE;IACxE,EAAE;IACF,iFAAiF;IACj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IA0BlC,4EAA4E;IACnE,oBAAoB,IAAI,IAAI;IAerC,mEAAmE;IAC1D,MAAM,IAAI,cAAc;CAuXpC;AAQD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACJ"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AA4CjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,qBAAa,SAAU,SAAQ,UAAU;;IACrC,yCAAyC;IACzC,gBAAyB,MAAM,0BAsD7B;IAyFF,+EAA+E;IACtE,iBAAiB,IAAI,IAAI;IA0BlC,4EAA4E;IACnE,oBAAoB,IAAI,IAAI;IAerC,mEAAmE;IAC1D,MAAM,IAAI,cAAc;CAuXpC;AAQD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACJ"}
package/dist/tooltip.js CHANGED
@@ -104,8 +104,12 @@ export class UiTooltip extends LitElement {
104
104
  stops holding. */
105
105
  color: ${reference('--ui-color-text')};
106
106
  background: ${reference('--ui-color-surface')};
107
- border: 1px solid ${reference('--ui-color-border')};
107
+ border: 1px solid ${reference('--ui-color-border-overlay')};
108
108
  border-radius: ${reference('--ui-radius')};
109
+ /* On the tip itself, where the card and the menu draw theirs on a layer in the
110
+ accent: the tip is the host's element, so nothing of this component's sits
111
+ around it to carry another colour, and a shadow a theme writes in
112
+ currentColor is lit in the tip's text. */
109
113
  box-shadow: ${reference('--ui-elevation-raised')};
110
114
  }
111
115