@threadlabs/looma 0.44.3 → 0.44.5
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/components/ui-button/ui-button.html +3 -3
- package/components/ui-icon-button/ui-icon-button.html +5 -24
- package/dist/index.js +1 -1
- package/docs/README.md +1 -1
- package/docs/catalog.json +18 -10
- package/docs/theme.mjs +25 -10
- package/editor/file-uploads.d.ts +3 -1
- package/package.json +1 -1
- package/styles/ui-button.css +3 -3
- package/styles/ui-icon-button.css +5 -24
- package/tokens.css +7 -7
- package/vue/UiButton.vue +3 -6
- package/vue/UiIconButton.vue +7 -17
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/compact.js +1 -1
- package/vue/components.css +18 -50
- package/vue/editor/index.js +105 -57
package/docs/README.md
CHANGED
|
@@ -105,7 +105,7 @@ The generated values follow rules. The medium control height is base text size t
|
|
|
105
105
|
|
|
106
106
|
Choose a coordinated palette, then refine surface warmth, color intensity and palette relationship. Warmth runs from cool to warm paper and ink, with 0.5 neutral; intensity runs from quiet to vivid, with 0.5 retaining original seed intensity. Keep my colors preserves the base hues; Related colors and Contrasting colors tint quiet surfaces toward neighboring and opposite hues. These decisions regenerate paired light/dark colors through Oklab/OKLCH operations, gamut repair and readability checks. They do not transform existing CSS colors live. Four base colors remain visible for precise edits. Supporting accents optionally adds second and third brand seeds. They feed `tone="accent-secondary"` and `tone="accent-tertiary"` on Button, IconButton, Badge, Card, Meter and Text, with the same derived readable text, states and material response as the primary. Unset supporting accents follow primary; the primary remains the normal action voice.
|
|
107
107
|
|
|
108
|
-
Palette details expose relationships rather than arbitrary status colors. **Neutrals & shared borders** derives restrained neutrals from text, an accent family or untinted gray, with fill strength and a shared minimum boundary contrast (default 2:1). Neutral solid/outline actions and form fields all consume `--ui-control-border` and its hover role. **Status colors** lets each role retain its semantic hue, harmonize toward the primary hue by at most 15 degrees, or use one of the three brand families. Perceptual saturation is coordinated with the primary; readability and material stops are resolved for both modes. Dark derivation separates canvas and content elevations, compensates quiet neutral fills and borders, and derives selection washes from readable contextual pigment. Subtle badges, toned cards, callouts, toasts and generated notifications share semantic background, foreground and border roles. Composed Text inherits the containing foreground; the document root supplies the normal body color. These roles provide paler light fills and visible dark tints. Optional overlay group overrides remain explicit choices instead of masking semantic defaults. There are no per-status color pickers. Words and icons preserve meaning when all statuses use one family. **Accent assignments** selects families for links, focus rings and selected rows. Light/dark specimens show these roles together, including an actual field beside the shared neutral actions.
|
|
108
|
+
Palette details expose relationships rather than arbitrary status colors. **Neutrals & shared borders** derives restrained neutrals from text, an accent family or untinted gray, with fill strength and a shared minimum boundary contrast (default 2:1). Neutral solid/outline actions and form fields all consume `--ui-control-border` and its hover role. Colored outlines resolve from their pigment against the same minimum over the finished wash and material gradient in light and dark modes, independently of readable text; outline hover retains that boundary color. Button and IconButton washes use translucent tone pigment rather than contextual text ink. **Status colors** lets each role retain its semantic hue, harmonize toward the primary hue by at most 15 degrees, or use one of the three brand families. Perceptual saturation is coordinated with the primary; readability and material stops are resolved for both modes. Dark derivation separates canvas and content elevations, compensates quiet neutral fills and borders, and derives selection washes from readable contextual pigment. Subtle badges, toned cards, callouts, toasts and generated notifications share semantic background, foreground and border roles. Composed Text inherits the containing foreground; the document root supplies the normal body color. These roles provide paler light fills and visible dark tints. Optional overlay group overrides remain explicit choices instead of masking semantic defaults. There are no per-status color pickers. Words and icons preserve meaning when all statuses use one family. **Accent assignments** selects families for links, focus rings and selected rows. Light/dark specimens show these roles together, including an actual field beside the shared neutral actions.
|
|
109
109
|
|
|
110
110
|
Documentation navigation stays out of the customization workspace. **Material & light** opens a movable light source, real component samples and bounded surface controls. **Palette** opens light/dark specimens, base seeds and advanced relationship controls. Each editor changes the same persistent theme. Returning to the overview, navigating to a component, or reloading keeps the result.
|
|
111
111
|
|
package/docs/catalog.json
CHANGED
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
],
|
|
464
464
|
"schemaVersion": 1,
|
|
465
465
|
"package": "@threadlabs/looma",
|
|
466
|
-
"version": "0.44.
|
|
466
|
+
"version": "0.44.5",
|
|
467
467
|
"groups": [
|
|
468
468
|
{
|
|
469
469
|
"id": "layout",
|
|
@@ -2146,6 +2146,14 @@
|
|
|
2146
2146
|
{
|
|
2147
2147
|
"name": "--ui-button-hover-border",
|
|
2148
2148
|
"declarations": [
|
|
2149
|
+
"var(--ui-accent-outline-border, var(--ui-accent-subtle-text))",
|
|
2150
|
+
"var(--ui-accent-secondary-outline-border, var(--ui-accent-secondary-subtle-text))",
|
|
2151
|
+
"var(--ui-accent-tertiary-outline-border, var(--ui-accent-tertiary-subtle-text))",
|
|
2152
|
+
"var(--ui-control-border)",
|
|
2153
|
+
"var(--ui-danger-outline-border, var(--ui-danger-subtle-text))",
|
|
2154
|
+
"var(--ui-success-outline-border, var(--ui-success-subtle-text))",
|
|
2155
|
+
"var(--ui-warning-outline-border, var(--ui-warning-subtle-text))",
|
|
2156
|
+
"var(--ui-info-outline-border, var(--ui-info-subtle-text))",
|
|
2149
2157
|
"var(--_hue-text)",
|
|
2150
2158
|
"var(--ui-accent-hover-border, var(--ui-accent-hover))",
|
|
2151
2159
|
"var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover))",
|
|
@@ -2157,7 +2165,6 @@
|
|
|
2157
2165
|
"var(--ui-info-hover-border, var(--ui-info-hover))"
|
|
2158
2166
|
],
|
|
2159
2167
|
"fallbacks": [
|
|
2160
|
-
"color-mix(in srgb, var(--_tone-text) 35%, var(--_tone-outline-border))",
|
|
2161
2168
|
"var(--ui-border-strong)",
|
|
2162
2169
|
"var(--ui-control-border-hover)",
|
|
2163
2170
|
"var(--ui-control-border-hover, var(--ui-text-secondary))"
|
|
@@ -9654,6 +9661,14 @@
|
|
|
9654
9661
|
{
|
|
9655
9662
|
"name": "--ui-icon-button-hover-border",
|
|
9656
9663
|
"declarations": [
|
|
9664
|
+
"var(--ui-accent-outline-border, var(--ui-accent-subtle-text))",
|
|
9665
|
+
"var(--ui-accent-secondary-outline-border, var(--ui-accent-secondary-subtle-text))",
|
|
9666
|
+
"var(--ui-accent-tertiary-outline-border, var(--ui-accent-tertiary-subtle-text))",
|
|
9667
|
+
"var(--ui-danger-outline-border, var(--ui-danger-subtle-text))",
|
|
9668
|
+
"var(--ui-success-outline-border, var(--ui-success-subtle-text))",
|
|
9669
|
+
"var(--ui-warning-outline-border, var(--ui-warning-subtle-text))",
|
|
9670
|
+
"var(--ui-info-outline-border, var(--ui-info-subtle-text))",
|
|
9671
|
+
"var(--ui-control-border)",
|
|
9657
9672
|
"var(--ui-accent-hover-border, var(--ui-accent-hover))",
|
|
9658
9673
|
"var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover))",
|
|
9659
9674
|
"var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover))",
|
|
@@ -9664,7 +9679,6 @@
|
|
|
9664
9679
|
"var(--ui-control-border-hover, var(--ui-neutral-hover))"
|
|
9665
9680
|
],
|
|
9666
9681
|
"fallbacks": [
|
|
9667
|
-
"color-mix(in srgb, var(--_icon-button-text, var(--ui-accent-subtle-text)) 35%, var(--_tone-outline-border))",
|
|
9668
9682
|
"var(--_icon-button-hover-border, var(--ui-control-border-hover, var(--ui-control-border)))"
|
|
9669
9683
|
]
|
|
9670
9684
|
},
|
|
@@ -9700,7 +9714,7 @@
|
|
|
9700
9714
|
"name": "--ui-icon-button-outline-surface",
|
|
9701
9715
|
"fallbacks": [
|
|
9702
9716
|
"var(--_icon-button-outline-surface, var(--ui-surface-default))",
|
|
9703
|
-
"
|
|
9717
|
+
"transparent"
|
|
9704
9718
|
]
|
|
9705
9719
|
},
|
|
9706
9720
|
{
|
|
@@ -9757,12 +9771,6 @@
|
|
|
9757
9771
|
"transparent"
|
|
9758
9772
|
]
|
|
9759
9773
|
},
|
|
9760
|
-
{
|
|
9761
|
-
"name": "--ui-icon-button-text",
|
|
9762
|
-
"fallbacks": [
|
|
9763
|
-
"var(--_icon-button-text, var(--ui-accent-subtle-text))"
|
|
9764
|
-
]
|
|
9765
|
-
},
|
|
9766
9774
|
{
|
|
9767
9775
|
"name": "--ui-neutral-highlight",
|
|
9768
9776
|
"declarations": [
|
package/docs/theme.mjs
CHANGED
|
@@ -22,7 +22,7 @@ export const themeFields = [
|
|
|
22
22
|
['Colour', 'tertiary-action', 'Tertiary accent', null, 'optional-colour', 'none', 'An optional third accent for categories, highlights and supporting content.'],
|
|
23
23
|
['Colour', 'neutral-source', 'Neutral relationship', null, 'choice', 'text', 'Derive restrained neutrals from text, an accent family or an untinted gray. Shared border contrast and readable labels stay governed.'],
|
|
24
24
|
['Colour', 'neutral-strength', 'Neutral fill strength', null, 'fraction', '0.25', 'How much neutral pigment appears in quiet filled controls. Borders remain shared with fields.'],
|
|
25
|
-
['Colour', 'neutral-border-contrast', '
|
|
25
|
+
['Colour', 'neutral-border-contrast', 'Border contrast', null, 'ratio', '2', 'Minimum border-to-surface contrast for outlined buttons and form fields, independent of text readability. 2:1 is the default; raise it for stronger boundaries.'],
|
|
26
26
|
['Colour', 'status-chroma', 'Derived status saturation', null, 'fraction', '0.5', 'Coordinate derived status pigment, text and quiet tints with the primary accent. Brand mappings keep the chosen family intact.'],
|
|
27
27
|
['Colour', 'success-source', 'Success relationship', null, 'choice', 'derived', 'Choose a semantic hue, harmonize it with primary, or use a governed brand-accent family.'],
|
|
28
28
|
['Colour', 'danger-source', 'Error relationship', null, 'choice', 'derived', 'Choose a semantic hue, harmonize it with primary, or use a governed brand-accent family.'],
|
|
@@ -346,9 +346,10 @@ const actionBoundary = (fill, surfaces, ink, amplitude) => {
|
|
|
346
346
|
// amber toward black also removes its color, making a readable warning look brown.
|
|
347
347
|
function readableTone(seed, surfaces, minimum, endpoint) {
|
|
348
348
|
const [l, c, h] = toLch(seed), end = toLch(endpoint)[0];
|
|
349
|
+
const backgrounds = surfaces.map(surface => typeof surface === 'number' ? surface : luminance(surface));
|
|
349
350
|
for (let step = 0; step <= 256; step++) {
|
|
350
351
|
const next = fromLch([l + (end - l) * step / 256, c, h]);
|
|
351
|
-
if (
|
|
352
|
+
if (backgrounds.every(background => luminanceContrast(luminance(next), background) >= minimum)) return next;
|
|
352
353
|
}
|
|
353
354
|
return endpoint;
|
|
354
355
|
}
|
|
@@ -363,7 +364,7 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
363
364
|
const [min, max] = bounds[field.id]; tokens[field.property] = `clamp(${min}px, ${values[field.id]}, ${max}px)`;
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
|
-
const cacheKey = JSON.stringify([mode, ...paletteKeys.map(key => values[key]), values['light-color'], values.translucency]);
|
|
367
|
+
const cacheKey = JSON.stringify([mode, ...paletteKeys.map(key => values[key]), values['light-color'], values.translucency, values.finish, values['light-strength']]);
|
|
367
368
|
if (paletteCache.has(cacheKey)) {
|
|
368
369
|
const cached = paletteCache.get(cacheKey);
|
|
369
370
|
return { tokens: { ...tokens, ...cached.tokens }, adjustments: cached.adjustments.map(item => ({ ...item })) };
|
|
@@ -451,18 +452,13 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
451
452
|
while (tonalOpacity > 0 && quietSurfaces(tonalOpacity).some(background => contrast(ink, background) < 4.5)) tonalOpacity = Math.max(0, tonalOpacity - .01);
|
|
452
453
|
tokens['--ui-tonal-opacity'] = String(Number(tonalOpacity.toFixed(2)));
|
|
453
454
|
const readingSurfaces = quietSurfaces(tonalOpacity);
|
|
455
|
+
const borderMinimum = Math.min(4.5, Number(values['neutral-border-contrast']) * (dark ? 1.15 : 1));
|
|
454
456
|
for (const tone of Object.keys(tones)) {
|
|
455
457
|
const [l, c, h] = toLch(tokens[`--ui-${tone}`]);
|
|
456
458
|
const semantic = Object.hasOwn(statusSeeds, tone) && ['derived', 'related'].includes(values[tone + '-source']);
|
|
457
459
|
const foregroundSeed = fromLch([dark ? Math.max(l, .80) : semantic ? l : Math.min(l, .50), Math.min(c, semantic ? .12 : dark ? .16 : .18), h]);
|
|
458
460
|
tokens[`--ui-${tone}-subtle-text`] = (semantic ? readableTone : readableColour)(foregroundSeed, readingSurfaces, 4.5, ink);
|
|
459
|
-
tokens[`--ui-${tone}-outline-border`] = readableColour(mix(tokens[`--ui-${tone}-subtle-text`], tokens['--ui-surface-raised'], .68), surfaces, 3, tokens[`--ui-${tone}-subtle-text`]);
|
|
460
|
-
tokens[`--ui-${tone}-soft-border`] = alphaSurface(tokens[`--ui-${tone}-subtle-text`], tokens[`--ui-${tone}-soft`], .25);
|
|
461
461
|
}
|
|
462
|
-
// Existing validation/editor hooks must receive a contextual text role, never
|
|
463
|
-
// a pressed fill. Preserve consumer overrides at their established boundaries.
|
|
464
|
-
tokens['--ui-field-danger'] = tokens['--ui-danger-subtle-text'];
|
|
465
|
-
for (const hook of ['code-keyword', 'link-color', 'toolbar-active-text', 'mention-color']) tokens[`--ui-editor-${hook}`] = tokens['--ui-accent-subtle-text'];
|
|
466
462
|
const textSeed = nativeInk === ink ? seeds.text : mix(seeds.text, ink, .08);
|
|
467
463
|
tokens['--ui-text'] = readableColour(textSeed, readingSurfaces, 4.5, ink);
|
|
468
464
|
tokens['--ui-text-secondary'] = readableColour(mix(tokens['--ui-text'], tokens['--ui-surface-raised'], .72), readingSurfaces, 4.5, ink);
|
|
@@ -488,7 +484,6 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
488
484
|
}
|
|
489
485
|
const borderSurfaces = [...surfaces, tokens['--ui-neutral-surface']];
|
|
490
486
|
const engagedSurfaces = [...surfaces, tokens['--ui-neutral-hover'], tokens['--ui-neutral-active']];
|
|
491
|
-
const borderMinimum = Math.min(4.5, Number(values['neutral-border-contrast']) * (dark ? 1.15 : 1));
|
|
492
487
|
tokens['--ui-control-border'] = readableColour(mix(neutral, tokens['--ui-surface-raised'], .14), borderSurfaces, borderMinimum, ink);
|
|
493
488
|
tokens['--ui-control-border-hover'] = readableColour(tokens['--ui-control-border'], engagedSurfaces, Math.min(4.5, borderMinimum + .3), ink);
|
|
494
489
|
tokens['--ui-border'] = mix(neutral, tokens['--ui-surface-raised'], .10);
|
|
@@ -497,6 +492,26 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
497
492
|
['surface', tokens['--ui-surface-raised'], [tokens['--ui-text'], tokens['--ui-text-secondary'], ...Object.keys(tones).map(tone => tokens[`--ui-${tone}-subtle-text`])]],
|
|
498
493
|
['neutral', tokens['--ui-neutral-surface'], tokens['--ui-text']],
|
|
499
494
|
]) for (const [part, colour] of Object.entries(materialColours(fill, labels, values['light-color']))) tokens[`--ui-${role}-${part}`] = colour;
|
|
495
|
+
// Borders surround the finished paint, including its translucent wash and
|
|
496
|
+
// material gradient. Text readability has its own independent contrast floor.
|
|
497
|
+
const materialOpacity = Number(values.finish) * Number(values['light-strength']);
|
|
498
|
+
for (const tone of Object.keys(tones)) {
|
|
499
|
+
const pigment = tokens[`--ui-${tone}`];
|
|
500
|
+
const backgrounds = surfaces.flatMap(surface => {
|
|
501
|
+
const reflection = alphaSurface(tokens['--ui-surface-reflection'], surface, materialOpacity);
|
|
502
|
+
const shade = alphaSurface(tokens['--ui-surface-shade'], surface, materialOpacity);
|
|
503
|
+
return [surface, ...materialLuminances(reflection, shade),
|
|
504
|
+
...[.08, .12].flatMap(alpha => materialLuminances(alphaSurface(pigment, reflection, alpha * tonalOpacity), alphaSurface(pigment, shade, alpha * tonalOpacity))),
|
|
505
|
+
...[.08, .12, .18].map(alpha => alphaSurface(pigment, surface, alpha * tonalOpacity))];
|
|
506
|
+
});
|
|
507
|
+
tokens[`--ui-${tone}-outline-border`] = readableTone(pigment, backgrounds, borderMinimum, ink);
|
|
508
|
+
tokens[`--ui-${tone}-subtle-text`] = readableTone(tokens[`--ui-${tone}-subtle-text`], [...readingSurfaces, ...backgrounds], 4.5, ink);
|
|
509
|
+
tokens[`--ui-${tone}-soft-border`] = alphaSurface(tokens[`--ui-${tone}-subtle-text`], tokens[`--ui-${tone}-soft`], .25);
|
|
510
|
+
}
|
|
511
|
+
// Existing validation/editor hooks must receive a contextual text role, never
|
|
512
|
+
// a pressed fill. Preserve consumer overrides at their established boundaries.
|
|
513
|
+
tokens['--ui-field-danger'] = tokens['--ui-danger-subtle-text'];
|
|
514
|
+
for (const hook of ['code-keyword', 'link-color', 'toolbar-active-text', 'mention-color']) tokens[`--ui-editor-${hook}`] = tokens['--ui-accent-subtle-text'];
|
|
500
515
|
// Knobs are painted foreground surfaces, not text. Bound them against the
|
|
501
516
|
// continuous track luminance range, not just its colored endpoints (3:1).
|
|
502
517
|
for (const [role, fill, track, trackFill] of [
|
package/editor/file-uploads.d.ts
CHANGED
|
@@ -18,8 +18,9 @@ export interface LoomaFileUploadsState {
|
|
|
18
18
|
loaded: number;
|
|
19
19
|
total: number;
|
|
20
20
|
} | null;
|
|
21
|
+
failed: File | null;
|
|
21
22
|
}
|
|
22
|
-
/** Captures the caret before
|
|
23
|
+
/** Captures the caret before transport and retains its mapped position for an explicit retry. */
|
|
23
24
|
export declare function createFileUploads(options: {
|
|
24
25
|
editor: Editor;
|
|
25
26
|
upload: () => LoomaFileUpload | undefined;
|
|
@@ -28,4 +29,5 @@ export declare function createFileUploads(options: {
|
|
|
28
29
|
}): {
|
|
29
30
|
cancel(): void;
|
|
30
31
|
insert(file: File): Promise<void>;
|
|
32
|
+
retry(): Promise<void>;
|
|
31
33
|
};
|
package/package.json
CHANGED
package/styles/ui-button.css
CHANGED
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
|
|
212
|
-
--_outline-wash: oklch(from var(--_tone
|
|
212
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
213
213
|
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
214
214
|
background-color: var(--ui-button-surface, transparent);
|
|
215
215
|
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
@@ -219,9 +219,9 @@
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]) {
|
|
222
|
-
--_outline-wash: oklch(from var(--_tone
|
|
222
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
223
223
|
background-color: var(--ui-button-hover-surface, transparent);
|
|
224
|
-
border-color: var(--ui-button-hover-border,
|
|
224
|
+
border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
/* A link is never :enabled, so interactive states test "not unavailable" instead: for a button that
|
|
@@ -374,37 +374,18 @@
|
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
|
|
377
|
-
--_outline-wash: oklch(
|
|
378
|
-
from
|
|
379
|
-
var(--ui-icon-button-text, var(--_icon-button-text, var(--ui-accent-subtle-text)))
|
|
380
|
-
l
|
|
381
|
-
c
|
|
382
|
-
h
|
|
383
|
-
/
|
|
384
|
-
calc(4% * var(--ui-tonal-opacity, 1))
|
|
385
|
-
);
|
|
377
|
+
--_outline-wash: oklch(from var(--_icon-button-solid-surface, var(--ui-accent)) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
386
378
|
border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
|
|
387
|
-
background-color: var(--ui-icon-button-outline-surface,
|
|
379
|
+
background-color: var(--ui-icon-button-outline-surface, transparent);
|
|
388
380
|
background-image:
|
|
389
381
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
390
382
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
391
383
|
}
|
|
392
384
|
|
|
393
385
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]) {
|
|
394
|
-
--_outline-wash: oklch(
|
|
395
|
-
from
|
|
396
|
-
var(--ui-icon-button-text, var(--_icon-button-text, var(--ui-accent-subtle-text)))
|
|
397
|
-
l
|
|
398
|
-
c
|
|
399
|
-
h
|
|
400
|
-
/
|
|
401
|
-
calc(9% * var(--ui-tonal-opacity, 1))
|
|
402
|
-
);
|
|
386
|
+
--_outline-wash: oklch(from var(--_icon-button-solid-surface, var(--ui-accent)) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
403
387
|
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
404
|
-
border-color: var(
|
|
405
|
-
--ui-icon-button-hover-border,
|
|
406
|
-
color-mix(in srgb, var(--_icon-button-text, var(--ui-accent-subtle-text)) 35%, var(--_tone-outline-border))
|
|
407
|
-
);
|
|
388
|
+
border-color: var(--ui-icon-button-hover-border, var(--_tone-outline-border));
|
|
408
389
|
}
|
|
409
390
|
|
|
410
391
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]) {
|
|
@@ -512,7 +493,7 @@
|
|
|
512
493
|
}
|
|
513
494
|
|
|
514
495
|
/* Disabled is a flat neutral control, independent of the active variant's tone. */
|
|
515
|
-
:scope:where([data-component~="ui-icon-button"]):disabled {
|
|
496
|
+
:scope:where([data-component~="ui-icon-button"])[data-tone]:disabled {
|
|
516
497
|
border-color: var(--ui-disabled-border);
|
|
517
498
|
background-color: var(--ui-disabled-surface);
|
|
518
499
|
color: var(--ui-disabled-text);
|
package/tokens.css
CHANGED
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
/* Shared action boundaries follow their fills until a recipe refines the family. */
|
|
31
31
|
--ui-tonal-opacity: 1;
|
|
32
|
-
--ui-accent-outline-border:
|
|
33
|
-
--ui-accent-secondary-outline-border:
|
|
34
|
-
--ui-accent-tertiary-outline-border:
|
|
35
|
-
--ui-success-outline-border:
|
|
36
|
-
--ui-danger-outline-border:
|
|
37
|
-
--ui-warning-outline-border:
|
|
38
|
-
--ui-info-outline-border:
|
|
32
|
+
--ui-accent-outline-border: var(--ui-accent);
|
|
33
|
+
--ui-accent-secondary-outline-border: var(--ui-accent-secondary);
|
|
34
|
+
--ui-accent-tertiary-outline-border: var(--ui-accent-tertiary);
|
|
35
|
+
--ui-success-outline-border: var(--ui-success);
|
|
36
|
+
--ui-danger-outline-border: var(--ui-danger);
|
|
37
|
+
--ui-warning-outline-border: var(--ui-warning);
|
|
38
|
+
--ui-info-outline-border: var(--ui-info);
|
|
39
39
|
--ui-accent-border: var(--ui-accent);
|
|
40
40
|
--ui-accent-hover-border: var(--ui-accent-hover);
|
|
41
41
|
--ui-accent-active-border: var(--ui-accent-active);
|
package/vue/UiButton.vue
CHANGED
|
@@ -1205,7 +1205,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
1207
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-button])) {
|
|
1208
|
-
--_outline-wash: oklch(from var(--_tone
|
|
1208
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
1209
1209
|
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
1210
1210
|
background-color: var(--ui-button-surface, transparent);
|
|
1211
1211
|
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
@@ -1215,12 +1215,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
1217
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
|
|
1218
|
-
--_outline-wash: oklch(from var(--_tone
|
|
1218
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
1219
1219
|
background-color: var(--ui-button-hover-surface, transparent);
|
|
1220
|
-
border-color: var(
|
|
1221
|
-
--ui-button-hover-border,
|
|
1222
|
-
color-mix(in srgb, var(--_tone-text) 35%, var(--_tone-outline-border))
|
|
1223
|
-
);
|
|
1220
|
+
border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
|
|
1224
1221
|
}
|
|
1225
1222
|
:global(:scope:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
|
|
1226
1223
|
border-color: var(--ui-button-hover-border, var(--_tone-text));
|
package/vue/UiIconButton.vue
CHANGED
|
@@ -941,14 +941,11 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
941
941
|
|
|
942
942
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-icon-button])) {
|
|
943
943
|
--_outline-wash: oklch(
|
|
944
|
-
from var(--
|
|
945
|
-
l c h / calc(
|
|
944
|
+
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
945
|
+
l c h / calc(8% * var(--ui-tonal-opacity, 1))
|
|
946
946
|
);
|
|
947
947
|
border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
|
|
948
|
-
background-color: var(
|
|
949
|
-
--ui-icon-button-outline-surface,
|
|
950
|
-
var(--_icon-button-outline-surface, transparent)
|
|
951
|
-
);
|
|
948
|
+
background-color: var(--ui-icon-button-outline-surface, transparent);
|
|
952
949
|
background-image:
|
|
953
950
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
954
951
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
@@ -956,18 +953,11 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
956
953
|
|
|
957
954
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
|
|
958
955
|
--_outline-wash: oklch(
|
|
959
|
-
from var(--
|
|
960
|
-
l c h / calc(
|
|
956
|
+
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
957
|
+
l c h / calc(12% * var(--ui-tonal-opacity, 1))
|
|
961
958
|
);
|
|
962
959
|
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
963
|
-
border-color: var(
|
|
964
|
-
--ui-icon-button-hover-border,
|
|
965
|
-
color-mix(
|
|
966
|
-
in srgb,
|
|
967
|
-
var(--_icon-button-text, var(--ui-accent-subtle-text)) 35%,
|
|
968
|
-
var(--_tone-outline-border)
|
|
969
|
-
)
|
|
970
|
-
);
|
|
960
|
+
border-color: var(--ui-icon-button-hover-border, var(--_tone-outline-border));
|
|
971
961
|
}
|
|
972
962
|
|
|
973
963
|
:global(:scope[data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
|
|
@@ -1088,7 +1078,7 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
1088
1078
|
outline-offset: var(--ui-focus-width);
|
|
1089
1079
|
}
|
|
1090
1080
|
}
|
|
1091
|
-
:global(:scope:disabled:where([data-hn-ui-icon-button])) {
|
|
1081
|
+
:global(:scope[data-tone]:disabled:where([data-hn-ui-icon-button])) {
|
|
1092
1082
|
border-color: var(--ui-disabled-border);
|
|
1093
1083
|
background-color: var(--ui-disabled-surface);
|
|
1094
1084
|
color: var(--ui-disabled-text);
|
package/vue/chunks/UiButton.js
CHANGED
package/vue/chunks/compact.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, h, nextTick, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
|
|
2
|
+
import { closeHistory, history, redo, undo } from "@tiptap/pm/history";
|
|
2
3
|
import { Extension, Mark, Node, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core";
|
|
3
4
|
import { Editor as Editor$1, EditorContent } from "@tiptap/vue-3";
|
|
4
5
|
import { Plugin } from "@tiptap/pm/state";
|
|
5
|
-
import { closeHistory, history, redo, undo } from "@tiptap/pm/history";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@tiptap+extension-document@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-document/dist/index.js
|
|
7
7
|
/**
|
|
8
8
|
* The default document node which represents the top level node of the editor.
|
package/vue/components.css
CHANGED
|
@@ -1184,7 +1184,7 @@ svg,.arc {
|
|
|
1184
1184
|
align-self: center;
|
|
1185
1185
|
}
|
|
1186
1186
|
:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-button]) {
|
|
1187
|
-
--_outline-wash: oklch(from var(--_tone
|
|
1187
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
1188
1188
|
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
1189
1189
|
background-color: var(--ui-button-surface, transparent);
|
|
1190
1190
|
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
@@ -1193,12 +1193,9 @@ svg,.arc {
|
|
|
1193
1193
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
1194
1194
|
}
|
|
1195
1195
|
:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button]) {
|
|
1196
|
-
--_outline-wash: oklch(from var(--_tone
|
|
1196
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
1197
1197
|
background-color: var(--ui-button-hover-surface, transparent);
|
|
1198
|
-
border-color: var(
|
|
1199
|
-
--ui-button-hover-border,
|
|
1200
|
-
color-mix(in srgb, var(--_tone-text) 35%, var(--_tone-outline-border))
|
|
1201
|
-
);
|
|
1198
|
+
border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
|
|
1202
1199
|
}
|
|
1203
1200
|
:scope:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button]) {
|
|
1204
1201
|
border-color: var(--ui-button-hover-border, var(--_tone-text));
|
|
@@ -4048,32 +4045,22 @@ html[data-ui-input-modality="touch"] :scope:where([data-hn-ui-icon-button])::aft
|
|
|
4048
4045
|
}
|
|
4049
4046
|
:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-icon-button]) {
|
|
4050
4047
|
--_outline-wash: oklch(
|
|
4051
|
-
from var(--
|
|
4052
|
-
l c h / calc(
|
|
4048
|
+
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
4049
|
+
l c h / calc(8% * var(--ui-tonal-opacity, 1))
|
|
4053
4050
|
);
|
|
4054
4051
|
border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
|
|
4055
|
-
background-color: var(
|
|
4056
|
-
--ui-icon-button-outline-surface,
|
|
4057
|
-
var(--_icon-button-outline-surface, transparent)
|
|
4058
|
-
);
|
|
4052
|
+
background-color: var(--ui-icon-button-outline-surface, transparent);
|
|
4059
4053
|
background-image:
|
|
4060
4054
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
4061
4055
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
4062
4056
|
}
|
|
4063
4057
|
:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button]) {
|
|
4064
4058
|
--_outline-wash: oklch(
|
|
4065
|
-
from var(--
|
|
4066
|
-
l c h / calc(
|
|
4059
|
+
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
4060
|
+
l c h / calc(12% * var(--ui-tonal-opacity, 1))
|
|
4067
4061
|
);
|
|
4068
4062
|
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
4069
|
-
border-color: var(
|
|
4070
|
-
--ui-icon-button-hover-border,
|
|
4071
|
-
color-mix(
|
|
4072
|
-
in srgb,
|
|
4073
|
-
var(--_icon-button-text, var(--ui-accent-subtle-text)) 35%,
|
|
4074
|
-
var(--_tone-outline-border)
|
|
4075
|
-
)
|
|
4076
|
-
);
|
|
4063
|
+
border-color: var(--ui-icon-button-hover-border, var(--_tone-outline-border));
|
|
4077
4064
|
}
|
|
4078
4065
|
:scope[data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button]) {
|
|
4079
4066
|
border-color: var(
|
|
@@ -4178,7 +4165,7 @@ html[data-ui-input-modality="touch"] :scope:where([data-hn-ui-icon-button])::aft
|
|
|
4178
4165
|
outline-offset: var(--ui-focus-width);
|
|
4179
4166
|
}
|
|
4180
4167
|
}
|
|
4181
|
-
:scope:disabled:where([data-hn-ui-icon-button]) {
|
|
4168
|
+
:scope[data-tone]:disabled:where([data-hn-ui-icon-button]) {
|
|
4182
4169
|
border-color: var(--ui-disabled-border);
|
|
4183
4170
|
background-color: var(--ui-disabled-surface);
|
|
4184
4171
|
color: var(--ui-disabled-text);
|
|
@@ -13377,7 +13364,7 @@ html[data-ui-input-modality="touch"]
|
|
|
13377
13364
|
}
|
|
13378
13365
|
|
|
13379
13366
|
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
|
|
13380
|
-
--_outline-wash: oklch(from var(--_tone
|
|
13367
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
13381
13368
|
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
13382
13369
|
background-color: var(--ui-button-surface, transparent);
|
|
13383
13370
|
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
@@ -13387,9 +13374,9 @@ html[data-ui-input-modality="touch"]
|
|
|
13387
13374
|
}
|
|
13388
13375
|
|
|
13389
13376
|
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]) {
|
|
13390
|
-
--_outline-wash: oklch(from var(--_tone
|
|
13377
|
+
--_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
13391
13378
|
background-color: var(--ui-button-hover-surface, transparent);
|
|
13392
|
-
border-color: var(--ui-button-hover-border,
|
|
13379
|
+
border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
|
|
13393
13380
|
}
|
|
13394
13381
|
|
|
13395
13382
|
/* A link is never :enabled, so interactive states test "not unavailable" instead: for a button that
|
|
@@ -14443,37 +14430,18 @@ html[data-ui-input-modality="touch"]
|
|
|
14443
14430
|
}
|
|
14444
14431
|
|
|
14445
14432
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
|
|
14446
|
-
--_outline-wash: oklch(
|
|
14447
|
-
from
|
|
14448
|
-
var(--ui-icon-button-text, var(--_icon-button-text, var(--ui-accent-subtle-text)))
|
|
14449
|
-
l
|
|
14450
|
-
c
|
|
14451
|
-
h
|
|
14452
|
-
/
|
|
14453
|
-
calc(4% * var(--ui-tonal-opacity, 1))
|
|
14454
|
-
);
|
|
14433
|
+
--_outline-wash: oklch(from var(--_icon-button-solid-surface, var(--ui-accent)) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
|
|
14455
14434
|
border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
|
|
14456
|
-
background-color: var(--ui-icon-button-outline-surface,
|
|
14435
|
+
background-color: var(--ui-icon-button-outline-surface, transparent);
|
|
14457
14436
|
background-image:
|
|
14458
14437
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
14459
14438
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
14460
14439
|
}
|
|
14461
14440
|
|
|
14462
14441
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]) {
|
|
14463
|
-
--_outline-wash: oklch(
|
|
14464
|
-
from
|
|
14465
|
-
var(--ui-icon-button-text, var(--_icon-button-text, var(--ui-accent-subtle-text)))
|
|
14466
|
-
l
|
|
14467
|
-
c
|
|
14468
|
-
h
|
|
14469
|
-
/
|
|
14470
|
-
calc(9% * var(--ui-tonal-opacity, 1))
|
|
14471
|
-
);
|
|
14442
|
+
--_outline-wash: oklch(from var(--_icon-button-solid-surface, var(--ui-accent)) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
14472
14443
|
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
14473
|
-
border-color: var(
|
|
14474
|
-
--ui-icon-button-hover-border,
|
|
14475
|
-
color-mix(in srgb, var(--_icon-button-text, var(--ui-accent-subtle-text)) 35%, var(--_tone-outline-border))
|
|
14476
|
-
);
|
|
14444
|
+
border-color: var(--ui-icon-button-hover-border, var(--_tone-outline-border));
|
|
14477
14445
|
}
|
|
14478
14446
|
|
|
14479
14447
|
:scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]) {
|
|
@@ -14581,7 +14549,7 @@ html[data-ui-input-modality="touch"]
|
|
|
14581
14549
|
}
|
|
14582
14550
|
|
|
14583
14551
|
/* Disabled is a flat neutral control, independent of the active variant's tone. */
|
|
14584
|
-
:scope:where([data-component~="ui-icon-button"]):disabled {
|
|
14552
|
+
:scope:where([data-component~="ui-icon-button"])[data-tone]:disabled {
|
|
14585
14553
|
border-color: var(--ui-disabled-border);
|
|
14586
14554
|
background-color: var(--ui-disabled-surface);
|
|
14587
14555
|
color: var(--ui-disabled-text);
|