@rak200/ui 0.6.14 → 0.7.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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +17 -3
- package/dist/select.js.map +1 -1
- package/dist/toast.d.ts +5 -4
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.js +66 -15
- package/dist/toast.js.map +1 -1
- package/dist/tokens.d.ts +32 -4
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +107 -9
- package/dist/tokens.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { UiOptgroup, UiOption, UiSelect } from './select.js';
|
|
|
10
10
|
export { UiTable } from './table.js';
|
|
11
11
|
export { UiToast, UiToaster, type ToastVariant } from './toast.js';
|
|
12
12
|
export { UiTooltip } from './tooltip.js';
|
|
13
|
-
export { tokens, derivedTokens, defaults, formulas, darkScheme, tokenStyleSheet, type Token, type DerivedToken, } from './tokens.js';
|
|
13
|
+
export { tokens, derivedTokens, defaults, formulas, darkScheme, moreContrast, tokenStyleSheet, type Token, type DerivedToken, } from './tokens.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,QAA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AC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACH,MAAM,EACN,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,eAAe,EACf,KAAK,KAAK,EACV,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@ export { UiOptgroup, UiOption, UiSelect } from './select.js';
|
|
|
10
10
|
export { UiTable } from './table.js';
|
|
11
11
|
export { UiToast, UiToaster } from './toast.js';
|
|
12
12
|
export { UiTooltip } from './tooltip.js';
|
|
13
|
-
export { tokens, derivedTokens, defaults, formulas, darkScheme, tokenStyleSheet, } from './tokens.js';
|
|
13
|
+
export { tokens, derivedTokens, defaults, formulas, darkScheme, moreContrast, tokenStyleSheet, } from './tokens.js';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAyB,MAAM,YAA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map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../src/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAkC1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,cAAM,aAAc,SAAQ,UAAU;;IAClC,gBAAyB,MAAM,EAAE,SAAS,CAIxC;IAEO,OAAO,IAAI,IAAI;IAQf,MAAM,IAAI,cAAc;CAGpC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,QAAS,SAAQ,aAAa;IACvC,mDAAmD;IACnD,gBAAyB,UAAU;;;;;;;;;;;;;MAIjC;IAEF;;;;;OAKG;IACH,KAAK,SAAM;IAEX,wDAAwD;IACxD,QAAQ,UAAS;IAEjB,8CAA8C;IAC9C,QAAQ,UAAS;CACpB;AAED;;;;;;;;;GASG;AACH,qBAAa,UAAW,SAAQ,aAAa;IACzC,mDAAmD;IACnD,gBAAyB,UAAU;;;;;;;;;MAGjC;IAEF,oDAAoD;IACpD,KAAK,SAAM;IAEX,sDAAsD;IACtD,QAAQ,UAAS;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBAAa,QAAS,SAAQ,UAAU;;IACpC,yCAAyC;IACzC,gBAAyB,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../src/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAkC1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,cAAM,aAAc,SAAQ,UAAU;;IAClC,gBAAyB,MAAM,EAAE,SAAS,CAIxC;IAEO,OAAO,IAAI,IAAI;IAQf,MAAM,IAAI,cAAc;CAGpC;AAED;;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,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIpD,uEAAuE;IACvE,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,+DAA+D;IAC/D,IAAI,QAAQ,IAAI,aAAa,CAE5B;IAED,gFAAgF;IAChF,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAuCD;;;OAGG;IACM,MAAM,IAAI,cAAc;CAoCpC;AAcD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;QACtB,WAAW,EAAE,QAAQ,CAAC;QACtB,aAAa,EAAE,UAAU,CAAC;KAC7B;CACJ"}
|
package/dist/select.js
CHANGED
|
@@ -276,9 +276,9 @@ export class UiSelect extends LitElement {
|
|
|
276
276
|
|
|
277
277
|
/* The caret is two triangles rather than a picture, and that is what keeps its
|
|
278
278
|
colour a token: gradients take var(), and an SVG in a data: URI would
|
|
279
|
-
freeze whatever colour was drawn into it. src/checkbox.ts
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
freeze whatever colour was drawn into it. src/checkbox.ts needs a path for its
|
|
280
|
+
tick, so it keeps the path as a mask and paints the colour under it; a caret is
|
|
281
|
+
two triangles, and needs neither.
|
|
282
282
|
|
|
283
283
|
A multiple select is a list rather than a drop-down, and a caret on a list
|
|
284
284
|
points at nothing, so it is guarded rather than drawn everywhere. */
|
|
@@ -324,6 +324,20 @@ export class UiSelect extends LitElement {
|
|
|
324
324
|
opacity: 0.5;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
+
/* The choices paint the surface themselves. The picker takes its colours from the
|
|
328
|
+
select unless an option brings its own, so a select whose fill a host made
|
|
329
|
+
translucent opens a list nobody can read — RFC 0003 measured it in the dark
|
|
330
|
+
scheme. In every opaque palette this renders exactly as before. The text needs
|
|
331
|
+
no rule: an option inherits the select's, which is already the text.
|
|
332
|
+
|
|
333
|
+
The drop-down only. A multiple select draws its options in the box, where the
|
|
334
|
+
platform marks a chosen one by painting its background, and an author colour on
|
|
335
|
+
every option would paint that mark out. The highlight on the option under the
|
|
336
|
+
pointer stays the platform's either way; docs/select.md says so. */
|
|
337
|
+
select:not([multiple]) :is(option, optgroup) {
|
|
338
|
+
background-color: ${reference('--ui-color-surface')};
|
|
339
|
+
}
|
|
340
|
+
|
|
327
341
|
/* Read off the control's own aria-invalid, which this element now writes: it is
|
|
328
342
|
the same source a screen reader uses. Not :host([error]) — a reflected string
|
|
329
343
|
property whose default is empty puts an empty attribute on the host, and an
|
package/dist/select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../src/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuC,MAAM,KAAK,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,GAAG,GAAG,GAAG,CAAA,QAAQ,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,GAAG,CAAA,QAAQ,SAAS,CAAC,YAAY,CAAC,UAAU,GAAG,OAAO,CAAC;AAEzE;;;;;GAKG;AACH,uFAAuF;AACvF,yFAAyF;AACzF,yFAAyF;AACzF,4EAA4E;AAC5E,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,aAAc,SAAQ,UAAU;aACT,WAAM,GAAc,GAAG,CAAA;;;;KAI/C,CAAC;IAEO,OAAO;QACZ,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAEQ,SAAS,GAAG,GAAS,EAAE;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE,OAAO,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F,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"}
|
package/dist/toast.d.ts
CHANGED
|
@@ -70,9 +70,10 @@ export declare class UiToaster extends LitElement {
|
|
|
70
70
|
* there is no way to write an assertive success.
|
|
71
71
|
*
|
|
72
72
|
* **The colour is redundant and must stay redundant.** WCAG 1.4.1 asks that colour never be
|
|
73
|
-
* the only carrier of information, and here it never is: the message says what happened
|
|
74
|
-
* the edge
|
|
75
|
-
* `forced-colors`, where the edge goes flat and
|
|
73
|
+
* the only carrier of information, and here it never is: the message says what happened,
|
|
74
|
+
* and the edge and an icon agree with it — the icon by its shape, so the variants stay
|
|
75
|
+
* apart under `forced-colors`, where the edge goes flat. The icon carries no text and is
|
|
76
|
+
* hidden from the accessibility tree, so nothing announced changes.
|
|
76
77
|
*
|
|
77
78
|
* ## Dismissal
|
|
78
79
|
*
|
|
@@ -148,7 +149,7 @@ export declare class UiToast extends LitElement {
|
|
|
148
149
|
disconnectedCallback(): void;
|
|
149
150
|
/** Moves into the region its variant names, before every render. */
|
|
150
151
|
willUpdate(): void;
|
|
151
|
-
/** The message, and a button that dismisses it. */
|
|
152
|
+
/** The variant's icon, the message, and a button that dismisses it. */
|
|
152
153
|
render(): TemplateResult;
|
|
153
154
|
/**
|
|
154
155
|
* Runs the exit, announces it, and takes the toast off the page.
|
package/dist/toast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../src/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../src/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0C,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG9F,gGAAgG;AAChG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAoCrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,0BA6I7B;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
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import { LitElement, css, html } from 'lit';
|
|
1
|
+
import { LitElement, css, html, svg } from 'lit';
|
|
2
2
|
import { reference } from './reference.js';
|
|
3
3
|
/** The class the exit is carried by, on the toast for exactly as long as the exit runs. */
|
|
4
4
|
const closing = 'closing';
|
|
5
|
+
/**
|
|
6
|
+
* The glyph each variant carries beside its edge: Lucide's `info`, `circle-check`,
|
|
7
|
+
* `triangle-alert` and `circle-x`, the geometry `src/icons/` vendors.
|
|
8
|
+
*
|
|
9
|
+
* Written here rather than imported, because importing a glyph module registers it: a
|
|
10
|
+
* toast would quietly put four names into the registry a host's `<ui-icon>` reads.
|
|
11
|
+
* `tests/toast.test.ts` compares each with the vendored one, so the copy cannot drift.
|
|
12
|
+
*/
|
|
13
|
+
const glyphs = {
|
|
14
|
+
info: svg `<circle cx="12" cy="12" r="10" /> <path d="M12 16v-4" /> <path d="M12 8h.01" />`,
|
|
15
|
+
success: svg `<circle cx="12" cy="12" r="10" /> <path d="m16 9-5.5 5.5L8 12" />`,
|
|
16
|
+
warning: svg `<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" />`,
|
|
17
|
+
danger: svg `<circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" />`,
|
|
18
|
+
};
|
|
5
19
|
/**
|
|
6
20
|
* How long a toast that is not an error stays, in milliseconds.
|
|
7
21
|
*
|
|
@@ -149,9 +163,10 @@ export class UiToaster extends LitElement {
|
|
|
149
163
|
* there is no way to write an assertive success.
|
|
150
164
|
*
|
|
151
165
|
* **The colour is redundant and must stay redundant.** WCAG 1.4.1 asks that colour never be
|
|
152
|
-
* the only carrier of information, and here it never is: the message says what happened
|
|
153
|
-
* the edge
|
|
154
|
-
* `forced-colors`, where the edge goes flat and
|
|
166
|
+
* the only carrier of information, and here it never is: the message says what happened,
|
|
167
|
+
* and the edge and an icon agree with it — the icon by its shape, so the variants stay
|
|
168
|
+
* apart under `forced-colors`, where the edge goes flat. The icon carries no text and is
|
|
169
|
+
* hidden from the accessibility tree, so nothing announced changes.
|
|
155
170
|
*
|
|
156
171
|
* ## Dismissal
|
|
157
172
|
*
|
|
@@ -253,20 +268,22 @@ export class UiToast extends LitElement {
|
|
|
253
268
|
gap: ${reference('--ui-space')};
|
|
254
269
|
box-sizing: border-box;
|
|
255
270
|
padding: ${reference('--ui-space')} calc(${reference('--ui-space')} * 1.5);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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')};
|
|
260
277
|
border-inline-start: calc(${reference('--ui-space')} / 2) solid
|
|
261
|
-
${reference('--ui-color-
|
|
278
|
+
${reference('--ui-color-info')};
|
|
262
279
|
border-radius: ${reference('--ui-radius')};
|
|
263
280
|
background: ${reference('--ui-color-surface')};
|
|
264
281
|
color: ${reference('--ui-color-text')};
|
|
265
282
|
font-family: ${reference('--ui-font')};
|
|
266
283
|
/* Lifted, because it sits over the page rather than in it — and bounded as
|
|
267
284
|
well as lifted, for the reason src/card.ts gives: a shadow is one value in
|
|
268
|
-
both schemes and does almost nothing on a dark page, where the
|
|
269
|
-
|
|
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. */
|
|
270
287
|
box-shadow: ${reference('--ui-elevation-raised')};
|
|
271
288
|
/* The toaster takes no clicks so it does not steal a corner of the page. This
|
|
272
289
|
is the part that is not the corner. */
|
|
@@ -280,15 +297,37 @@ export class UiToast extends LitElement {
|
|
|
280
297
|
}
|
|
281
298
|
|
|
282
299
|
:host([variant='success']) {
|
|
283
|
-
border-
|
|
300
|
+
border-color: ${reference('--ui-color-success')};
|
|
284
301
|
}
|
|
285
302
|
|
|
286
303
|
:host([variant='warning']) {
|
|
287
|
-
border-
|
|
304
|
+
border-color: ${reference('--ui-color-warning')};
|
|
288
305
|
}
|
|
289
306
|
|
|
290
307
|
:host([variant='danger']) {
|
|
291
|
-
border-
|
|
308
|
+
border-color: ${reference('--ui-color-danger')};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* The icon takes the edge's colour, and sits centred on the message's first line,
|
|
312
|
+
whatever height the page's text gives a line: half of what one line has to spare
|
|
313
|
+
over the glyph, above it and below. A fixed eighth of an em assumed a line-height
|
|
314
|
+
of 1.5 and sat low under a monospace face at normal — measured, under Matrix. */
|
|
315
|
+
.icon {
|
|
316
|
+
flex: none;
|
|
317
|
+
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')};
|
|
292
331
|
}
|
|
293
332
|
|
|
294
333
|
/* Where the entrance comes from. Without it there is nothing to transition out of:
|
|
@@ -432,9 +471,21 @@ export class UiToast extends LitElement {
|
|
|
432
471
|
// input can tell apart from its absence.
|
|
433
472
|
this.#route();
|
|
434
473
|
}
|
|
435
|
-
/** The message, and a button that dismisses it. */
|
|
474
|
+
/** The variant's icon, the message, and a button that dismisses it. */
|
|
436
475
|
render() {
|
|
437
476
|
return html `
|
|
477
|
+
<svg
|
|
478
|
+
class="icon"
|
|
479
|
+
part="icon"
|
|
480
|
+
viewBox="0 0 24 24"
|
|
481
|
+
fill="none"
|
|
482
|
+
stroke="currentColor"
|
|
483
|
+
stroke-linecap="round"
|
|
484
|
+
stroke-linejoin="round"
|
|
485
|
+
aria-hidden="true"
|
|
486
|
+
>
|
|
487
|
+
${glyphs[this.variant]}
|
|
488
|
+
</svg>
|
|
438
489
|
<div part="message"><slot></slot></div>
|
|
439
490
|
<button
|
|
440
491
|
type="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,
|
|
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,MAAM,GAAsD;IAC9D,IAAI,EAAE,GAAG,CAAA,iFAAiF;IAC1F,OAAO,EAAE,GAAG,CAAA,mEAAmE;IAC/E,OAAO,EAAE,GAAG,CAAA,oIAAoI;IAChJ,MAAM,EAAE,GAAG,CAAA,gFAAgF;CAC9F,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IACrC,yCAAyC;aAChB,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;0CAgBC,SAAS,CAAC,YAAY,CAAC;4BACrC,SAAS,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;mBAehC,SAAS,CAAC,YAAY,CAAC;;;;;;;;;;mBAUvB,SAAS,CAAC,YAAY,CAAC;;;;;;;KAOrC,CAAC;IAEF,mFAAmF;IAC1E,iBAAiB;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,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-
|
|
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"];
|
|
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-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-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"];
|
|
48
48
|
/** A CSS custom property this package computes rather than declares. */
|
|
49
49
|
export type DerivedToken = (typeof derivedTokens)[number];
|
|
50
50
|
/**
|
|
@@ -101,10 +101,35 @@ export declare const formulas: Readonly<Record<DerivedToken, string>>;
|
|
|
101
101
|
* takes colours, so a dark value for `--ui-radius` would emit CSS the browser discards.
|
|
102
102
|
*/
|
|
103
103
|
export declare const darkScheme: Readonly<Partial<Record<Token, string>>>;
|
|
104
|
+
/**
|
|
105
|
+
* The default palette's answer to `prefers-contrast: more`: each name it moves, with its
|
|
106
|
+
* light value and its dark one.
|
|
107
|
+
*
|
|
108
|
+
* **The reader's setting, answered in the token layer as reduced motion is, and not a
|
|
109
|
+
* theme** — RFC 0003. A host chooses a theme; a reader's system asks for contrast, and a
|
|
110
|
+
* reader who needs it should not depend on a host having shipped a picker.
|
|
111
|
+
*
|
|
112
|
+
* The text, the surface, the accent and the focus ring go to the poles, the dark scheme on
|
|
113
|
+
* pure black. The accent's label follows on its own, being the accent's pole, and so do the
|
|
114
|
+
* border and the muted text, which mix toward the text. The outcome colours stay where they
|
|
115
|
+
* were chosen, at 4.5:1: an error that turned grey would stop saying it is an error.
|
|
116
|
+
*
|
|
117
|
+
* **The states are written out, as values rather than formulas.** Over pure black a mix
|
|
118
|
+
* toward the text barely moves — 8% of white is 1.01:1 — and a black or white accent has
|
|
119
|
+
* no room to shade toward, so a palette this fully known gives its states. Each is set at
|
|
120
|
+
* the step the default palette's own states take: the hover 1.41:1 from the surface in
|
|
121
|
+
* light and 1.42 in dark, the pressed 1.28 and 1.36 past it. They are derived names, and a
|
|
122
|
+
* value declared at `:root` reaches every subtree below it, which a formula must never do
|
|
123
|
+
* and a value may.
|
|
124
|
+
*
|
|
125
|
+
* A pair rather than two maps, so a name cannot be given one scheme and forgotten in the
|
|
126
|
+
* other, and so an emitter that is not CSS reads two values rather than parsing a function.
|
|
127
|
+
*/
|
|
128
|
+
export declare const moreContrast: Readonly<Partial<Record<Token | DerivedToken, readonly [light: string, dark: string]>>>;
|
|
104
129
|
/**
|
|
105
130
|
* The token defaults as a CSS rule, for a host that wants them without importing a
|
|
106
|
-
* component. Returns the text of a `:root` block
|
|
107
|
-
* host inserts them however it prefers.
|
|
131
|
+
* component. Returns the text of a `:root` block, the reduced-motion rule beside it and the
|
|
132
|
+
* answer to `prefers-contrast: more` after both; a host inserts them however it prefers.
|
|
108
133
|
*
|
|
109
134
|
* **It declares `color-scheme` as well as the tokens, and that is deliberate.**
|
|
110
135
|
* `color-scheme` is a real property rather than a custom one, so it can never be a token —
|
|
@@ -122,6 +147,9 @@ export declare const darkScheme: Readonly<Partial<Record<Token, string>>>;
|
|
|
122
147
|
* declares is a literal rather than a formula. Without it, a host who tuned
|
|
123
148
|
* `--ui-duration-state` would keep their motion through the collapse, and the setting
|
|
124
149
|
* would be honoured for everyone except the people who had touched it.
|
|
150
|
+
*
|
|
151
|
+
* **More contrast is answered here too**, from {@link moreContrast} and for the same
|
|
152
|
+
* reason: it is the reader's setting, so no component should have to learn it exists.
|
|
125
153
|
*/
|
|
126
154
|
export declare function tokenStyleSheet(): string;
|
|
127
155
|
//# sourceMappingURL=tokens.d.ts.map
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,+YAiHT,CAAC;AAEX,sEAAsE;AACtE,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,6RAgDhB,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,CAkEpD,CAAC;AAoEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAqD3D,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,CAYhF,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,IAAI,MAAM,CA2BxC"}
|
package/dist/tokens.js
CHANGED
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
*/
|
|
34
34
|
export const tokens = [
|
|
35
35
|
'--ui-color-accent',
|
|
36
|
-
'--ui-color-accent-contrast',
|
|
37
36
|
'--ui-color-surface',
|
|
38
37
|
'--ui-color-text',
|
|
39
38
|
'--ui-color-focus',
|
|
@@ -48,6 +47,11 @@ export const tokens = [
|
|
|
48
47
|
// expected to replace with their own brand's, which is what a ground is for.
|
|
49
48
|
'--ui-color-success',
|
|
50
49
|
'--ui-color-warning',
|
|
50
|
+
// The fourth outcome, the one that is neither good nor bad news, arriving with the
|
|
51
|
+
// toast that reads it. It read the accent before, which made a notice the buttons'
|
|
52
|
+
// colour in the default palette and a second green beside success in a green one —
|
|
53
|
+
// RFC 0003. A ground for the reason the other three are.
|
|
54
|
+
'--ui-color-info',
|
|
51
55
|
// The dim behind a modal, and a *ground* rather than a derivation even though every
|
|
52
56
|
// other neutral here is derived. A derived neutral mixes toward the text, which is
|
|
53
57
|
// what makes one formula right in both schemes — and it is exactly wrong for this
|
|
@@ -168,6 +172,10 @@ export const derivedTokens = [
|
|
|
168
172
|
// control*, and the role this implements was named `accent hover / pressed`.
|
|
169
173
|
'--ui-color-hover',
|
|
170
174
|
'--ui-color-pressed',
|
|
175
|
+
// The text on the accent, derived from it so a host who moves the accent moves the
|
|
176
|
+
// label with it — RFC 0003. It was a ground until then, and a host's accent with the
|
|
177
|
+
// default label beside it was a pair nothing measured.
|
|
178
|
+
'--ui-color-accent-contrast',
|
|
171
179
|
'--ui-color-accent-hover',
|
|
172
180
|
'--ui-color-accent-pressed',
|
|
173
181
|
// The purpose the elevation scale is read through, arriving with `ui-card`. `raised`
|
|
@@ -204,7 +212,6 @@ export const derivedTokens = [
|
|
|
204
212
|
*/
|
|
205
213
|
export const defaults = {
|
|
206
214
|
'--ui-color-accent': '#2563eb',
|
|
207
|
-
'--ui-color-accent-contrast': '#ffffff',
|
|
208
215
|
'--ui-color-surface': '#ffffff',
|
|
209
216
|
'--ui-color-text': '#1f2937',
|
|
210
217
|
// Amber-700 rather than the amber-500 this shipped with, and the change is a floor
|
|
@@ -229,6 +236,8 @@ export const defaults = {
|
|
|
229
236
|
// knobs — a host who retunes the focus ring has said nothing about warnings.
|
|
230
237
|
'--ui-color-success': '#15803d',
|
|
231
238
|
'--ui-color-warning': '#b45309',
|
|
239
|
+
// Cyan-700, the step the other outcomes take, and held to their floor: 5.36:1.
|
|
240
|
+
'--ui-color-info': '#0e7490',
|
|
232
241
|
// Half black. Enough to push the page behind a modal out of the reading order for the
|
|
233
242
|
// eye as well as for the accessibility tree, and not so much that the context a modal
|
|
234
243
|
// is *about* stops being visible. The alpha is the whole point, so this is the one
|
|
@@ -285,6 +294,44 @@ function ground(name) {
|
|
|
285
294
|
function mix(foreground, amount, background) {
|
|
286
295
|
return `color-mix(in oklab, ${ground(foreground)} ${String(amount)}%, ${ground(background)})`;
|
|
287
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* A ground's relative luminance, as relative colour syntax reads it: the WCAG weights over
|
|
299
|
+
* the linear channels. Written out wherever a formula needs it, because a CSS value has no
|
|
300
|
+
* variable of its own.
|
|
301
|
+
*/
|
|
302
|
+
const luminance = '(0.2126 * r + 0.7152 * g + 0.0722 * b)';
|
|
303
|
+
/** 1 where `expression` is above zero and 0 where it is not — a step, as CSS can write one. */
|
|
304
|
+
function step(expression) {
|
|
305
|
+
return `clamp(0, (${expression}) * infinity, 1)`;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* White or black, read off `name` by `channel`: the one number written into all three linear
|
|
309
|
+
* channels, so 1 is white and 0 is black, and nothing between is ever produced by a step.
|
|
310
|
+
*/
|
|
311
|
+
function pole(name, channel) {
|
|
312
|
+
return `color(from ${ground(name)} srgb-linear ${channel} ${channel} ${channel})`;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* The luminance where white and black stand equally far from a colour, 1.05 / (Y + 0.05)
|
|
316
|
+
* against (Y + 0.05) / 0.05. Under it white is the further pole, from it on black.
|
|
317
|
+
*/
|
|
318
|
+
const crossover = 0.1791;
|
|
319
|
+
/**
|
|
320
|
+
* The pole the accent's states move toward. Away from the label while the label has little
|
|
321
|
+
* to spare, toward it once the label stands at 10:1 or more: lighten at or under 0.055 (a
|
|
322
|
+
* white label at 10:1 and up) or between the crossover and 0.45 (a black label under 10:1),
|
|
323
|
+
* darken otherwise.
|
|
324
|
+
*
|
|
325
|
+
* Away from the label always left a very light or a very dark accent no room to move, 697
|
|
326
|
+
* of 4096 under the 1.05 the suite asks; toward it always took the label under 4.5:1 on
|
|
327
|
+
* 1978. With the turn anywhere from 8.5:1 to 12:1 only black fails, its hover at 1.03 under
|
|
328
|
+
* every shape — measured for RFC 0003, and 10 sits in the middle.
|
|
329
|
+
*/
|
|
330
|
+
const room = pole('--ui-color-accent', `clamp(0, ${step(`0.055 - ${luminance}`)} + ${step(`${luminance} - ${String(crossover)}`)} * ${step(`0.45 - ${luminance}`)}, 1)`);
|
|
331
|
+
/** `amount`% of the way from the accent toward the pole its states have room to move to. */
|
|
332
|
+
function shade(amount) {
|
|
333
|
+
return `color-mix(in oklab, ${room} ${String(amount)}%, ${ground('--ui-color-accent')})`;
|
|
334
|
+
}
|
|
288
335
|
/**
|
|
289
336
|
* How each derived role computes when the host has not set it.
|
|
290
337
|
*
|
|
@@ -327,8 +374,15 @@ export const formulas = {
|
|
|
327
374
|
// light, which is passing by rounding.
|
|
328
375
|
'--ui-color-hover': mix('--ui-color-text', 16, '--ui-color-surface'),
|
|
329
376
|
'--ui-color-pressed': mix('--ui-color-text', 26, '--ui-color-surface'),
|
|
330
|
-
|
|
331
|
-
|
|
377
|
+
// The pole of the accent, white or black, whichever stands further from it: the label
|
|
378
|
+
// that reads on any accent a host picks, 0 of 4096 under 4.5:1. Black on the dark
|
|
379
|
+
// scheme's blue-400 at 8.26:1, where the ground it replaced was `#111827` at 6.98.
|
|
380
|
+
'--ui-color-accent-contrast': pole('--ui-color-accent', step(`${String(crossover)} - ${luminance}`)),
|
|
381
|
+
// Toward whichever pole has room rather than toward the text, which ran out of room on
|
|
382
|
+
// an accent already near it: the docblock on `room` carries the measurement. The light
|
|
383
|
+
// scheme's hover moves from `#255cd4` to `#1d52c6`, the pole being black there.
|
|
384
|
+
'--ui-color-accent-hover': shade(12),
|
|
385
|
+
'--ui-color-accent-pressed': shade(22),
|
|
332
386
|
// 3.39:1 on the light surface and 3.96:1 on the dark one, against a floor of 3. The
|
|
333
387
|
// step below clears neither — 45% is 2.94 in light, which is what a value chosen by
|
|
334
388
|
// eye would have shipped.
|
|
@@ -376,10 +430,9 @@ export const formulas = {
|
|
|
376
430
|
*/
|
|
377
431
|
export const darkScheme = {
|
|
378
432
|
// Blue-400 over the dark surface rather than blue-600, which is legible on white and
|
|
379
|
-
// muddy on charcoal. Its
|
|
380
|
-
//
|
|
433
|
+
// muddy on charcoal. Its label needs no dark value: it is derived from the accent, so
|
|
434
|
+
// it goes to black at this end on its own.
|
|
381
435
|
'--ui-color-accent': '#60a5fa',
|
|
382
|
-
'--ui-color-accent-contrast': '#111827',
|
|
383
436
|
'--ui-color-surface': '#111827',
|
|
384
437
|
'--ui-color-text': '#e5e7eb',
|
|
385
438
|
// Red-700 is 2.74:1 on the dark surface — under the 4.5:1 floor for text, and error
|
|
@@ -390,13 +443,51 @@ export const darkScheme = {
|
|
|
390
443
|
// the half of the pair a reader is most likely to need.
|
|
391
444
|
'--ui-color-success': '#4ade80',
|
|
392
445
|
'--ui-color-warning': '#fbbf24',
|
|
446
|
+
// Cyan-400, inverted with the other three for the same reason: 9.82:1.
|
|
447
|
+
'--ui-color-info': '#22d3ee',
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* The default palette's answer to `prefers-contrast: more`: each name it moves, with its
|
|
451
|
+
* light value and its dark one.
|
|
452
|
+
*
|
|
453
|
+
* **The reader's setting, answered in the token layer as reduced motion is, and not a
|
|
454
|
+
* theme** — RFC 0003. A host chooses a theme; a reader's system asks for contrast, and a
|
|
455
|
+
* reader who needs it should not depend on a host having shipped a picker.
|
|
456
|
+
*
|
|
457
|
+
* The text, the surface, the accent and the focus ring go to the poles, the dark scheme on
|
|
458
|
+
* pure black. The accent's label follows on its own, being the accent's pole, and so do the
|
|
459
|
+
* border and the muted text, which mix toward the text. The outcome colours stay where they
|
|
460
|
+
* were chosen, at 4.5:1: an error that turned grey would stop saying it is an error.
|
|
461
|
+
*
|
|
462
|
+
* **The states are written out, as values rather than formulas.** Over pure black a mix
|
|
463
|
+
* toward the text barely moves — 8% of white is 1.01:1 — and a black or white accent has
|
|
464
|
+
* no room to shade toward, so a palette this fully known gives its states. Each is set at
|
|
465
|
+
* the step the default palette's own states take: the hover 1.41:1 from the surface in
|
|
466
|
+
* light and 1.42 in dark, the pressed 1.28 and 1.36 past it. They are derived names, and a
|
|
467
|
+
* value declared at `:root` reaches every subtree below it, which a formula must never do
|
|
468
|
+
* and a value may.
|
|
469
|
+
*
|
|
470
|
+
* A pair rather than two maps, so a name cannot be given one scheme and forgotten in the
|
|
471
|
+
* other, and so an emitter that is not CSS reads two values rather than parsing a function.
|
|
472
|
+
*/
|
|
473
|
+
export const moreContrast = {
|
|
474
|
+
'--ui-color-accent': ['#000000', '#ffffff'],
|
|
475
|
+
'--ui-color-surface': ['#ffffff', '#000000'],
|
|
476
|
+
'--ui-color-text': ['#000000', '#ffffff'],
|
|
477
|
+
'--ui-color-focus': ['#000000', '#ffffff'],
|
|
478
|
+
'--ui-color-hover': ['#d9d9d9', '#282828'],
|
|
479
|
+
'--ui-color-pressed': ['#c1c1c1', '#3d3d3d'],
|
|
480
|
+
'--ui-color-accent-hover': ['#333333', '#d6d6d6'],
|
|
481
|
+
'--ui-color-accent-pressed': ['#4d4d4d', '#b3b3b3'],
|
|
482
|
+
// Under the hover, so a row under the pointer is still a change rather than a stripe.
|
|
483
|
+
'--ui-color-surface-muted': ['#f2f2f2', '#141414'],
|
|
393
484
|
};
|
|
394
485
|
/** The category every duration name shares, which is what reduced motion collapses. */
|
|
395
486
|
const duration = '--ui-duration-';
|
|
396
487
|
/**
|
|
397
488
|
* The token defaults as a CSS rule, for a host that wants them without importing a
|
|
398
|
-
* component. Returns the text of a `:root` block
|
|
399
|
-
* host inserts them however it prefers.
|
|
489
|
+
* component. Returns the text of a `:root` block, the reduced-motion rule beside it and the
|
|
490
|
+
* answer to `prefers-contrast: more` after both; a host inserts them however it prefers.
|
|
400
491
|
*
|
|
401
492
|
* **It declares `color-scheme` as well as the tokens, and that is deliberate.**
|
|
402
493
|
* `color-scheme` is a real property rather than a custom one, so it can never be a token —
|
|
@@ -414,6 +505,9 @@ const duration = '--ui-duration-';
|
|
|
414
505
|
* declares is a literal rather than a formula. Without it, a host who tuned
|
|
415
506
|
* `--ui-duration-state` would keep their motion through the collapse, and the setting
|
|
416
507
|
* would be honoured for everyone except the people who had touched it.
|
|
508
|
+
*
|
|
509
|
+
* **More contrast is answered here too**, from {@link moreContrast} and for the same
|
|
510
|
+
* reason: it is the reader's setting, so no component should have to learn it exists.
|
|
417
511
|
*/
|
|
418
512
|
export function tokenStyleSheet() {
|
|
419
513
|
const grounds = tokens
|
|
@@ -430,9 +524,13 @@ export function tokenStyleSheet() {
|
|
|
430
524
|
.filter((token) => token.startsWith(duration))
|
|
431
525
|
.map((token) => ` ${token}: 0.01ms;`)
|
|
432
526
|
.join('\n');
|
|
527
|
+
const contrasted = Object.entries(moreContrast)
|
|
528
|
+
.map(([token, [light, dark]]) => ` ${token}: light-dark(${light}, ${dark});`)
|
|
529
|
+
.join('\n');
|
|
433
530
|
return [
|
|
434
531
|
`:root {\n color-scheme: light dark;\n${grounds}\n}`,
|
|
435
532
|
`@media (prefers-reduced-motion: reduce) {\n :root {\n${collapsed}\n }\n}`,
|
|
533
|
+
`@media (prefers-contrast: more) {\n :root {\n${contrasted}\n }\n}`,
|
|
436
534
|
].join('\n\n');
|
|
437
535
|
}
|
|
438
536
|
//# sourceMappingURL=tokens.js.map
|
package/dist/tokens.js.map
CHANGED
|
@@ -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,
|
|
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;IACjF,oFAAoF;IACpF,iFAAi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