@threadlabs/looma 0.44.2 → 0.44.4
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/shared/icons.js +1 -0
- package/components/ui-badge/ui-badge.html +7 -6
- package/components/ui-button/ui-button.html +47 -2
- package/components/ui-card/ui-card.html +6 -6
- package/components/ui-color-picker/ui-color-picker.html +12 -5
- package/components/ui-color-picker/ui-color-picker.js +20 -6
- package/components/ui-dialog/ui-dialog.html +5 -6
- package/components/ui-icon/ui-icon.html +1 -0
- package/components/ui-icon-button/ui-icon-button.html +59 -4
- package/components/ui-menu/ui-menu.html +5 -6
- package/components/ui-number-input/ui-number-input.html +7 -0
- package/components/ui-popover/ui-popover.html +5 -6
- package/components/ui-slider/ui-slider.html +6 -0
- package/components/ui-tooltip/ui-tooltip.html +8 -5
- package/components/ui-tree-item/ui-tree-item.html +7 -1
- package/dist/index.js +1 -1
- package/docs/README.md +8 -4
- package/docs/catalog.json +469 -3704
- package/docs/customizer-render.mjs +55 -36
- package/docs/customizer.js +48 -33
- package/docs/fonts.mjs +28 -0
- package/docs/theme.mjs +39 -14
- package/editor/file-uploads.d.ts +3 -1
- package/editor/icons.d.ts +1 -0
- package/editor/index.js +2 -1
- package/package.json +1 -1
- package/styles/ui-badge.css +11 -10
- package/styles/ui-button.css +47 -2
- package/styles/ui-card.css +4 -4
- package/styles/ui-color-picker.css +105 -2
- package/styles/ui-dialog.css +10 -12
- package/styles/ui-icon-button.css +59 -4
- package/styles/ui-menu.css +5 -6
- package/styles/ui-number-input.css +6 -0
- package/styles/ui-popover.css +5 -6
- package/styles/ui-slider.css +3 -0
- package/styles/ui-tooltip.css +8 -5
- package/styles/ui-tree-item.css +12 -2
- package/theme-system.css +28 -16
- package/tokens.css +7 -0
- package/vanilla/UiColorPicker.d.ts +1 -0
- package/vanilla/UiColorPicker.js +32 -28
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiNumberInput.d.ts +1 -0
- package/vanilla/UiNumberInput.js +53 -43
- package/vanilla/UiSlider.d.ts +1 -0
- package/vanilla/UiSlider.js +65 -57
- package/vanilla/UiTreeItem.js +1 -1
- package/vue/UiBadge.vue +7 -9
- package/vue/UiButton.vue +56 -2
- package/vue/UiCard.vue +13 -5
- package/vue/UiColorPicker.d.ts +6 -0
- package/vue/UiColorPicker.vue +156 -6
- package/vue/UiDialog.vue +22 -12
- package/vue/UiIcon.vue +1 -0
- package/vue/UiIconButton.vue +62 -4
- package/vue/UiMenu.vue +11 -6
- package/vue/UiNumberInput.d.ts +6 -0
- package/vue/UiNumberInput.vue +47 -1
- package/vue/UiPopover.vue +11 -6
- package/vue/UiSlider.d.ts +6 -0
- package/vue/UiSlider.vue +37 -1
- package/vue/UiTooltip.vue +11 -5
- package/vue/UiTreeItem.vue +19 -3
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCard.js +2 -2
- package/vue/chunks/UiColorPicker.js +60 -11
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiIcon.js +5 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiNumberInput.js +31 -2
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiSlider.js +33 -2
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTreeItem.js +3 -3
- package/vue/chunks/compact.js +1 -1
- package/vue/components.css +457 -84
- package/vue/editor/index.js +109 -57
- package/docs/examples/ui-editor-footnote-editor/examples/01-note.behavior.js +0 -9
- package/docs/examples/ui-editor-mention-menu/examples/00-preview.behavior.js +0 -1
- package/docs/examples/ui-editor-slash-menu/examples/00-preview.behavior.js +0 -81
- package/docs/examples/ui-editor-table-overlay/examples/00-preview.behavior.js +0 -24
package/docs/theme.mjs
CHANGED
|
@@ -51,9 +51,9 @@ export const themeFields = [
|
|
|
51
51
|
['Size & spacing', 'line-weight', 'Line weight', '--ui-border-width', 'length', '1px', 'Shared edge weight; focus stays independently visible.'],
|
|
52
52
|
['Material', 'outer-depth', 'Outer depth', '--ui-outer-depth', 'nonnegative', '0.6', 'How strongly controls and floating surfaces rise above the page.'],
|
|
53
53
|
['Material', 'inner-depth', 'Inner depth', '--ui-inner-depth', 'nonnegative', '0.3', 'How strongly fields and pressed controls sit into their surface.'],
|
|
54
|
-
['Material', 'glassiness', 'Frosting', '--ui-glassiness', 'fraction', '0', '
|
|
54
|
+
['Material', 'glassiness', 'Frosting', '--ui-glassiness', 'fraction', '0', 'Blurs the scene through glass, from clear to frosted. Most transmission is in the rim; content stays nearly opaque.'],
|
|
55
55
|
['Material', 'surface-separation', 'Surface separation', '--ui-surface-separation', 'fraction', '0', 'One material offset, scaled by popup purpose and actual size: quiet tooltips through substantial dialogs.'],
|
|
56
|
-
['Material', 'translucency', 'Transparency', '--ui-overlay-translucency', 'fraction', '0', '
|
|
56
|
+
['Material', 'translucency', 'Transparency', '--ui-overlay-translucency', 'fraction', '0', 'Reveals the scene through decorative rims. At maximum, the content plate also becomes slightly translucent.'],
|
|
57
57
|
['Material', 'edge-light', 'Edge light', '--ui-edge-light', 'fraction', '0', 'Light caught by surface edges, independent of depth.'],
|
|
58
58
|
['Material', 'finish', 'Finish', '--ui-finish', 'fraction', '0', 'Matte through polished: how strongly the material catches a reflection.'],
|
|
59
59
|
['Material', 'glow', 'Glow', '--ui-glow', 'fraction', '0', 'Reflected light beyond a surface, from a quiet halo to a vivid bloom at the upper end.'],
|
|
@@ -73,7 +73,7 @@ const fontStarting = (values, body, display) => ({
|
|
|
73
73
|
fonts: { 'body-font': body, 'display-font': display },
|
|
74
74
|
});
|
|
75
75
|
/** The documentation starts with Looma's coordinated identity; Clear keeps the neutral baseline. */
|
|
76
|
-
export const defaultRecipe = () => ({ ...starting({ action: '#7658d6', canvas: '#fbf9f4', surface: '#ffffff', text: '#2b2538', 'body-font': googleFontStack('Manrope'), 'display-font': googleFontStack('Manrope'), 'text-size': '17px' }), fonts: { 'body-font': 'Manrope', 'display-font': 'Manrope' } });
|
|
76
|
+
export const defaultRecipe = () => ({ ...starting({ action: '#7658d6', canvas: '#fbf9f4', surface: '#ffffff', text: '#2b2538', 'body-font': googleFontStack('Manrope'), 'display-font': googleFontStack('Manrope'), 'text-size': '17px', 'inner-depth': '0.7' }), fonts: { 'body-font': 'Manrope', 'display-font': 'Manrope' } });
|
|
77
77
|
export const startingPoints = {
|
|
78
78
|
looma: defaultRecipe(),
|
|
79
79
|
clear: { ...starting({
|
|
@@ -83,14 +83,14 @@ export const startingPoints = {
|
|
|
83
83
|
gold: { ...fontStarting({
|
|
84
84
|
action: '#ffb84d', 'secondary-action': '#704d7b', canvas: '#ffffff', surface: '#ffffff', text: '#171717',
|
|
85
85
|
'neutral-source': 'primary', 'neutral-strength': '0.18', 'neutral-border-contrast': '2.1',
|
|
86
|
-
'info-source': 'secondary', 'status-chroma': '0.25', 'selection-accent': 'secondary', 'link-accent': '
|
|
86
|
+
'info-source': 'secondary', 'status-chroma': '0.25', 'selection-accent': 'secondary', 'link-accent': 'primary',
|
|
87
87
|
'text-size': '17px', 'label-size': '16px', 'corner-roundness': '16px', finish: '0.55', 'light-x': '0',
|
|
88
88
|
}, 'Lato', 'Fraunces'), presets: { status: 'semantic' } },
|
|
89
89
|
bookish: { ...fontStarting({
|
|
90
90
|
action: '#2e1228', 'secondary-action': '#fc5b69', 'tertiary-action': '#896853',
|
|
91
91
|
canvas: '#f7f7f5', surface: '#fffefd', text: '#0d0c0c',
|
|
92
92
|
'neutral-source': 'primary', 'neutral-strength': '0.18', 'neutral-border-contrast': '2.1',
|
|
93
|
-
'info-source': 'primary', 'success-source': 'primary', 'status-chroma': '0.1',
|
|
93
|
+
'info-source': 'primary', 'success-source': 'primary', 'status-chroma': '0.1',
|
|
94
94
|
rhythm: '1.05', 'text-weight': '400', 'control-roominess': '2.625', 'scale-contrast': '1.18', 'corner-roundness': '6px',
|
|
95
95
|
'outer-depth': '1', 'inner-depth': '1', glassiness: '0.8', 'surface-separation': '0.65', translucency: '0.18',
|
|
96
96
|
'edge-light': '1', finish: '0.85', glow: '0.3', 'light-spread': '0.3', 'light-strength': '0.9',
|
|
@@ -287,16 +287,27 @@ function materialColours(fill, text, light, minimum = 4.55) {
|
|
|
287
287
|
const [l, c, h] = toLch(fill), [lightness] = toLch(light);
|
|
288
288
|
// Recede perceptually while retaining relative saturation and hue. Scaling
|
|
289
289
|
// L and C together scales linear RGB, keeping every shade channel <= fill.
|
|
290
|
-
|
|
290
|
+
const response = 1 - .75 * l;
|
|
291
|
+
let depth = .05 * response;
|
|
291
292
|
const shaded = amount => amount === 0 ? fill : fromLch([Math.max(0, l - amount), c * Math.max(0, l - amount) / (l || 1), h]);
|
|
292
293
|
while (depth > 0 && labels.some(label => luminanceContrast(luminance(shaded(depth)), label) < minimum)) depth = Math.max(0, depth - .001);
|
|
293
294
|
const shade = shaded(depth);
|
|
294
|
-
//
|
|
295
|
-
//
|
|
295
|
+
// Lift chroma with lightness, plus a small pigment-dependent saturation boost,
|
|
296
|
+
// so the broad reflection stays colored instead of becoming a white wash.
|
|
296
297
|
const [, tintChroma, tintHue] = toLch(mix(light, fill, .18));
|
|
297
|
-
const
|
|
298
|
+
const reflectedLightness = l + (lightness - l) * .32 * response;
|
|
299
|
+
const reflectedChroma = c * Math.max(1, reflectedLightness / (l || 1)) * (1 + .06 * response);
|
|
300
|
+
const target = fromLch([reflectedLightness, Math.max(reflectedChroma, tintChroma), tintHue]);
|
|
298
301
|
let amount = 1;
|
|
299
|
-
|
|
302
|
+
const readableReflection = amount => {
|
|
303
|
+
const colour = mix(target, fill, amount);
|
|
304
|
+
const [reflectedL, reflectedC] = toLch(colour);
|
|
305
|
+
// Gamut mapping must not dilute saturation as the reflection brightens.
|
|
306
|
+
// Back toward the pigment when needed, allowing for sRGB byte quantization.
|
|
307
|
+
return reflectedC + .002 >= c * Math.max(1, reflectedL / (l || 1))
|
|
308
|
+
&& labels.every(label => materialContrast(colour, shade, label) >= minimum);
|
|
309
|
+
};
|
|
310
|
+
while (amount > 0 && !readableReflection(amount)) amount = Math.max(0, amount - .005);
|
|
300
311
|
const reflection = mix(target, fill, amount);
|
|
301
312
|
// A tiny specular peak is allowed to brighten separately from the chromatic
|
|
302
313
|
// body reflection. Keep the same quantization margin as every material stop.
|
|
@@ -352,7 +363,7 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
352
363
|
const [min, max] = bounds[field.id]; tokens[field.property] = `clamp(${min}px, ${values[field.id]}, ${max}px)`;
|
|
353
364
|
}
|
|
354
365
|
}
|
|
355
|
-
const cacheKey = JSON.stringify([mode, ...paletteKeys.map(key => values[key]), values['light-color']]);
|
|
366
|
+
const cacheKey = JSON.stringify([mode, ...paletteKeys.map(key => values[key]), values['light-color'], values.translucency]);
|
|
356
367
|
if (paletteCache.has(cacheKey)) {
|
|
357
368
|
const cached = paletteCache.get(cacheKey);
|
|
358
369
|
return { tokens: { ...tokens, ...cached.tokens }, adjustments: cached.adjustments.map(item => ({ ...item })) };
|
|
@@ -403,8 +414,21 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
403
414
|
tokens[`--ui-${tone}-on-strong`] = onFill;
|
|
404
415
|
for (const [part, colour] of Object.entries(materialColours(fill, onFill, values['light-color']))) tokens[`--ui-${tone}-${part}`] = colour;
|
|
405
416
|
const stateTarget = onFill === '#000000' ? '#ffffff' : '#000000';
|
|
406
|
-
|
|
407
|
-
|
|
417
|
+
const [fillL, fillC, fillH] = toLch(fill);
|
|
418
|
+
for (const [state, amount, minimum] of [['hover', .14, .055], ['active', .26, .085]]) {
|
|
419
|
+
const direction = onFill === '#000000' ? 1 : -1;
|
|
420
|
+
const room = direction > 0 ? 1 - fillL : fillL;
|
|
421
|
+
const lightness = Math.max(0, Math.min(1, fillL + direction * Math.max(minimum, room * amount)));
|
|
422
|
+
const pigment = fromLch([lightness, fillC * lightness / (fillL || 1), fillH]);
|
|
423
|
+
tokens[`--ui-${tone}-${state}`] = readableColour(pigment, [onFill], 4.55, stateTarget);
|
|
424
|
+
}
|
|
425
|
+
// Move the painted pigment with its interaction fill. A fixed opaque
|
|
426
|
+
// reflection would otherwise hide hover, especially on deep accents.
|
|
427
|
+
const density = toLch(tokens[`--ui-${tone}-hover`])[0] / (toLch(fill)[0] || 1);
|
|
428
|
+
for (const part of ['reflection', 'shade']) {
|
|
429
|
+
const [l, c, h] = toLch(tokens[`--ui-${tone}-${part}`]);
|
|
430
|
+
tokens[`--ui-${tone}-hover-${part}`] = readableColour(fromLch([l * density, c * density, h]), [onFill], 4.55, stateTarget);
|
|
431
|
+
}
|
|
408
432
|
const contextual = readableColour(fill, surfaces, 4.5, ink);
|
|
409
433
|
const quiet = mix(contextual, tokens['--ui-surface-raised'], .20);
|
|
410
434
|
const [quietL] = toLch(quiet);
|
|
@@ -419,7 +443,7 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
419
443
|
}
|
|
420
444
|
// Quiet fills are actual alpha composites. At an extreme light/dark flip,
|
|
421
445
|
// reduce their shared tint before it would leave no readable contextual ink.
|
|
422
|
-
const quietSurfaces = strength => [...surfaces, ...(dark ? [readableColour(mix(ink, tokens['--ui-surface-raised'], .22), [ink], 4.5, paper)] : []), ...Object.keys(tones).map(tone => tokens[`--ui-${tone}-soft`]), ...Object.keys(tones).flatMap(tone => surfaces.flatMap(background => [
|
|
446
|
+
const quietSurfaces = strength => [...surfaces, ...surfaces.map(surface => alphaSurface(surface, ink, 1 - .1 * Number(values.translucency))), ...(dark ? [readableColour(mix(ink, tokens['--ui-surface-raised'], .22), [ink], 4.5, paper)] : []), ...Object.keys(tones).map(tone => tokens[`--ui-${tone}-soft`]), ...Object.keys(tones).flatMap(tone => surfaces.flatMap(background => [
|
|
423
447
|
mix(tokens[`--ui-${tone}`], background, .12 * strength),
|
|
424
448
|
...[.05, .12, .18, .19].map(alpha => alphaSurface(tokens[`--ui-${tone}`], background, alpha * strength)),
|
|
425
449
|
]))];
|
|
@@ -432,6 +456,7 @@ export function deriveTheme(input, { mode } = {}) {
|
|
|
432
456
|
const semantic = Object.hasOwn(statusSeeds, tone) && ['derived', 'related'].includes(values[tone + '-source']);
|
|
433
457
|
const foregroundSeed = fromLch([dark ? Math.max(l, .80) : semantic ? l : Math.min(l, .50), Math.min(c, semantic ? .12 : dark ? .16 : .18), h]);
|
|
434
458
|
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`]);
|
|
435
460
|
tokens[`--ui-${tone}-soft-border`] = alphaSurface(tokens[`--ui-${tone}-subtle-text`], tokens[`--ui-${tone}-soft`], .25);
|
|
436
461
|
}
|
|
437
462
|
// Existing validation/editor hooks must receive a contextual text role, never
|
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/editor/icons.d.ts
CHANGED
package/editor/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import { n as TABLE_CELL_BACKGROUND_PRESETS, t as TABLE_CELL_BACKGROUND_OPTIONS
|
|
|
2
2
|
import { n as resolveTableCellAt, t as measureTableOverlayGeometry } from "./chunks/ui.js";
|
|
3
3
|
import { $ as LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, A as filterLoomaMentionItems, B as LOOMA_FOOTNOTE_LABEL, C as loomaMarkdownToHtml, D as createLoomaMentionExtension, E as LoomaMentionSuggestionPluginKey, F as LoomaTableOfContents, G as LoomaFigcaption, H as LoomaFootnoteReference, I as getTableOfContentsEntries, J as revealLoomaExpandAt, K as LoomaFigure, L as normalizeTableOfContentsConfig, M as LoomaImage, N as normalizeImageDimension, O as DEFAULT_MENTION_RESULT_LIMIT, P as normalizeImagePlacement, Q as LoomaCallout, R as LoomaTab, S as loomaMarkdownFromDoc, T as siteRelativeHref, U as LoomaFootnotes, V as LoomaFootnote, W as findLoomaFootnote, X as LoomaChip, Y as LOOMA_CHIP_COLORS, Z as normalizeLoomaChipColor, _ as getActiveTableCellAlignment, a as getActiveTableUiState, b as setActiveTableCellBackground, c as insertTableAtRange, d as LoomaTableKit, et as LOOMA_ACTIVE_BLOCK_CLASS, f as getDefaultEditorExtensions, g as LoomaTableHeader, h as LoomaTableCell, i as getDefaultSlashCommands, j as normalizeMentionResultLimit, k as MAX_MENTION_RESULT_LIMIT, l as normalizeActiveTableColumnWidths, m as LoomaTable, n as createLoomaSlashCommandExtension, nt as LoomaActiveBlock, o as handleTableAction, p as getLoomaTableExtensions, q as LoomaExpand, r as filterLoomaSlashCommands, rt as LoomaActiveBlockPluginKey, s as handleTableOverlayAction, t as LoomaSlashCommand, tt as LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, u as shouldShowTextFormattingToolbar, v as getActiveTableCellBackground, w as createSiteRelativeLinks, x as LoomaSmartPaste, y as setActiveTableCellAlignment, z as LoomaTabs } from "./chunks/extensions.js";
|
|
4
4
|
import { a as setReferenceDisplay, i as referenceDisplay, n as LoomaReferencePresentation, o as LOOMA_CALLOUT_TONES, r as getReferenceDisplay, t as LoomaReference } from "./chunks/reference-display.js";
|
|
5
|
-
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bell, Bold, BookUser, Braces, Calculator, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, CodeXml, Columns3, Compass, CreditCard, Ellipsis, Eraser, ExternalLink, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, History, Image, Info, Italic, LayoutDashboard, Lightbulb, Link, List, ListOrdered, ListTodo, LoaderCircle, Merge, MessageSquareWarning, Minus, Monitor, Moon, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Paperclip, Pencil, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Search, Settings, Split, Strikethrough, Sun, Superscript, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, Unlink, UserRound, Users, X } from "lucide";
|
|
5
|
+
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bell, Bold, BookUser, Braces, Calculator, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, CodeXml, Columns3, Compass, CreditCard, Ellipsis, Eraser, ExternalLink, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, History, Image, Info, Italic, LayoutDashboard, Lightbulb, Link, List, ListOrdered, ListTodo, LoaderCircle, Merge, MessageSquareWarning, Minus, Monitor, Moon, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Paperclip, Pencil, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Search, Settings, Slash, Split, Strikethrough, Sun, Superscript, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, Unlink, UserRound, Users, X } from "lucide";
|
|
6
6
|
//#region src/editor/icons.ts
|
|
7
7
|
/** The opinionated Lucide set used by Looma's shipped interaction surfaces. */
|
|
8
8
|
var LOOMA_ICONS = {
|
|
9
|
+
slash: Slash,
|
|
9
10
|
monitor: Monitor,
|
|
10
11
|
sun: Sun,
|
|
11
12
|
moon: Moon,
|
package/package.json
CHANGED
package/styles/ui-badge.css
CHANGED
|
@@ -214,21 +214,22 @@
|
|
|
214
214
|
--_badge-color-text: color-mix(in oklab, var(--_ui-badge-color) 0%, var(--ui-surface-default));
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
/*
|
|
218
|
-
|
|
217
|
+
/* The inverse ink opposes the tone's on-fill ink, independently of the document scheme.
|
|
218
|
+
A bright pigment can use dark on-fill ink even in a light document. */
|
|
219
219
|
:scope:where([data-component~="ui-badge"])[data-ui-badge-state~="variant=inverse"] {
|
|
220
|
+
--_badge-inverse-ink: oklch(from var(--_badge-text) clamp(0, calc((0.5 - l) * 1000), 1) 0 h);
|
|
220
221
|
--_badge-color-surface: color-mix(in srgb, color-mix(in oklab, var(--_ui-badge-color) 0%, var(--ui-surface-default)) 88%, transparent);
|
|
221
222
|
--_badge-color-border: var(--_badge-color-surface);
|
|
222
223
|
--_badge-color-text: color-mix(in srgb, var(--_badge-color-ink) 85%, var(--ui-text-primary));
|
|
223
224
|
--_badge-outline-surface: var(--ui-badge-surface, var(--_badge-color-surface, color-mix(in srgb, var(--_badge-text) 88%, transparent)));
|
|
224
225
|
border-color: var(--ui-badge-border, var(--_badge-color-border, color-mix(in srgb, var(--_badge-text) 88%, transparent)));
|
|
225
|
-
color: var(--ui-badge-text, var(--_badge-color-text, color-mix(in srgb, var(--_badge-surface) 85%, var(--
|
|
226
|
+
color: var(--ui-badge-text, var(--_badge-color-text, color-mix(in srgb, var(--_badge-surface) 85%, var(--_badge-inverse-ink))));
|
|
226
227
|
/* Paint each translucent layer once, including the border, without a bright double-painted ring. */
|
|
227
228
|
background-clip: padding-box;
|
|
228
229
|
}
|
|
229
230
|
|
|
230
|
-
/* A circular count
|
|
231
|
-
|
|
231
|
+
/* A circular count retains its translucent surface and quiet rim. Bound the pigment
|
|
232
|
+
in its foreground so either on-fill polarity remains readable through that surface. */
|
|
232
233
|
:scope:where([data-component~="ui-badge"])[data-ui-badge-state~="variant=inverse"][data-ui-badge-state~="shape=circle"] {
|
|
233
234
|
--_badge-color-surface: light-dark(
|
|
234
235
|
color-mix(in srgb, color-mix(in oklab, var(--_ui-badge-color) 0%, var(--ui-surface-default)) var(--ui-badge-circle-opacity, 66%), transparent),
|
|
@@ -253,7 +254,7 @@
|
|
|
253
254
|
);
|
|
254
255
|
color: var(
|
|
255
256
|
--ui-badge-text,
|
|
256
|
-
var(--_badge-color-text,
|
|
257
|
+
var(--_badge-color-text, color-mix(in srgb, var(--_badge-surface) 35%, var(--_badge-inverse-ink)))
|
|
257
258
|
);
|
|
258
259
|
box-shadow: 0 1px 1px light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.12));
|
|
259
260
|
}
|
|
@@ -517,11 +518,11 @@
|
|
|
517
518
|
/* A solid colour fills with the ink. Its text is the page surface, mixed at 0% only so that it too is
|
|
518
519
|
invalid while the hook is unset. */
|
|
519
520
|
|
|
520
|
-
/*
|
|
521
|
-
|
|
521
|
+
/* The inverse ink opposes the tone's on-fill ink, independently of the document scheme.
|
|
522
|
+
A bright pigment can use dark on-fill ink even in a light document. */
|
|
522
523
|
|
|
523
|
-
/* A circular count
|
|
524
|
-
|
|
524
|
+
/* A circular count retains its translucent surface and quiet rim. Bound the pigment
|
|
525
|
+
in its foreground so either on-fill polarity remains readable through that surface. */
|
|
525
526
|
|
|
526
527
|
/* A count can keep its containing control's contrasting ink instead of reversing it.
|
|
527
528
|
The faint fill preserves text contrast; a quiet boundary separates the count from its control. */
|
package/styles/ui-button.css
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
--_tone-hover-border: var(--ui-accent-hover-border, var(--ui-accent-hover));
|
|
23
23
|
--_tone-active-border: var(--ui-accent-active-border, var(--ui-accent-active));
|
|
24
24
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
25
|
+
--_tone-hover-highlight: var(--ui-accent-hover-highlight, none);
|
|
26
|
+
--_tone-outline-border: var(--ui-accent-outline-border, var(--ui-accent-subtle-text));
|
|
25
27
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
26
28
|
--_hue: var(--ui-accent);
|
|
27
29
|
--_hue-hover: var(--ui-accent-hover);
|
|
@@ -206,11 +208,27 @@
|
|
|
206
208
|
align-self: center;
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
|
|
212
|
+
--_outline-wash: oklch(from var(--_tone-text) l c h / calc(4% * var(--ui-tonal-opacity, 1)));
|
|
213
|
+
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
214
|
+
background-color: var(--ui-button-surface, transparent);
|
|
215
|
+
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
216
|
+
background-image:
|
|
217
|
+
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
218
|
+
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
219
|
+
}
|
|
220
|
+
|
|
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-text) l c h / calc(9% * var(--ui-tonal-opacity, 1)));
|
|
223
|
+
background-color: var(--ui-button-hover-surface, transparent);
|
|
224
|
+
border-color: var(--ui-button-hover-border, color-mix(in srgb, var(--_tone-text) 35%, var(--_tone-outline-border)));
|
|
225
|
+
}
|
|
226
|
+
|
|
209
227
|
/* A link is never :enabled, so interactive states test "not unavailable" instead: for a button that
|
|
210
228
|
is exactly :enabled, at the same specificity, and it also matches a link that can be followed. */
|
|
211
229
|
:scope:where([data-component~="ui-button"]):hover:not(:disabled, [aria-disabled="true"]) {
|
|
212
230
|
border-color: var(--ui-button-hover-border, var(--_tone-text));
|
|
213
|
-
background-color: var(--ui-button-hover-surface, oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1))));
|
|
231
|
+
background-color: var(--ui-button-hover-surface, oklch(from var(--_tone-text) l c h / calc(12% * var(--ui-tonal-opacity, 1))));
|
|
214
232
|
}
|
|
215
233
|
|
|
216
234
|
:scope:where([data-component~="ui-button"])[data-appearance="card"][data-tone="neutral"] {
|
|
@@ -228,7 +246,8 @@
|
|
|
228
246
|
}
|
|
229
247
|
|
|
230
248
|
/* Pressed reads as pressed in: the highlight goes, and the shadow moves inside. */
|
|
231
|
-
:scope:where([data-component~="ui-button"]):active:not(:disabled, [aria-disabled="true"])
|
|
249
|
+
:scope:where([data-component~="ui-button"]):active:not(:disabled, [aria-disabled="true"]),
|
|
250
|
+
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:active:not(:disabled, [aria-disabled="true"]) {
|
|
232
251
|
scale: var(--ui-press-scale, 1);
|
|
233
252
|
background-color: var(--ui-button-active-surface, oklch(from var(--_tone) l c h / calc(18% * var(--ui-tonal-opacity, 1))));
|
|
234
253
|
background-image: none;
|
|
@@ -248,6 +267,7 @@
|
|
|
248
267
|
:scope:where([data-component~="ui-button"])[data-appearance="solid"]:hover:not(:disabled, [aria-disabled="true"]),
|
|
249
268
|
:scope:where([data-component~="ui-button"])[data-appearance="danger"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
250
269
|
background-color: var(--_tone-hover);
|
|
270
|
+
background-image: var(--_tone-hover-highlight);
|
|
251
271
|
border-color: var(--ui-button-hover-border, var(--_tone-hover-border));
|
|
252
272
|
}
|
|
253
273
|
|
|
@@ -265,6 +285,8 @@
|
|
|
265
285
|
--_tone-hover-border: var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover));
|
|
266
286
|
--_tone-active-border: var(--ui-accent-secondary-active-border, var(--ui-accent-secondary-active));
|
|
267
287
|
--_tone-highlight: var(--ui-accent-secondary-highlight, none);
|
|
288
|
+
--_tone-hover-highlight: var(--ui-accent-secondary-hover-highlight, none);
|
|
289
|
+
--_tone-outline-border: var(--ui-accent-secondary-outline-border, var(--ui-accent-secondary-subtle-text));
|
|
268
290
|
--_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
|
|
269
291
|
--_hue: var(--ui-accent-secondary);
|
|
270
292
|
--_hue-hover: var(--ui-accent-secondary-hover);
|
|
@@ -278,6 +300,8 @@
|
|
|
278
300
|
--_tone-hover-border: var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover));
|
|
279
301
|
--_tone-active-border: var(--ui-accent-tertiary-active-border, var(--ui-accent-tertiary-active));
|
|
280
302
|
--_tone-highlight: var(--ui-accent-tertiary-highlight, none);
|
|
303
|
+
--_tone-hover-highlight: var(--ui-accent-tertiary-hover-highlight, none);
|
|
304
|
+
--_tone-outline-border: var(--ui-accent-tertiary-outline-border, var(--ui-accent-tertiary-subtle-text));
|
|
281
305
|
--_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
|
|
282
306
|
--_hue: var(--ui-accent-tertiary);
|
|
283
307
|
--_hue-hover: var(--ui-accent-tertiary-hover);
|
|
@@ -291,6 +315,8 @@
|
|
|
291
315
|
--_tone-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
|
|
292
316
|
--_tone-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
|
|
293
317
|
--_tone-highlight: var(--ui-neutral-highlight, none);
|
|
318
|
+
--_tone-hover-highlight: var(--ui-neutral-highlight, var(--_tone-highlight));
|
|
319
|
+
--_tone-outline-border: var(--ui-control-border);
|
|
294
320
|
--_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
|
|
295
321
|
--_hue: var(--ui-text);
|
|
296
322
|
--_hue-hover: var(--ui-text);
|
|
@@ -313,8 +339,13 @@
|
|
|
313
339
|
:scope:where([data-component~="ui-button"])[data-tone="neutral"][data-appearance="outline"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
314
340
|
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
|
|
315
341
|
background-color: var(--ui-button-hover-surface, var(--ui-neutral-hover));
|
|
342
|
+
--_outline-wash: oklch(from var(--ui-text) l c h / 5%);
|
|
343
|
+
background-image:
|
|
344
|
+
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
345
|
+
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
316
346
|
}
|
|
317
347
|
:scope:where([data-component~="ui-button"])[data-tone="neutral"][data-appearance="outline"]:active:not(:disabled, [aria-disabled="true"]) {
|
|
348
|
+
background-image: none;
|
|
318
349
|
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
|
|
319
350
|
background-color: var(--ui-button-active-surface, var(--ui-neutral-active));
|
|
320
351
|
}
|
|
@@ -332,6 +363,8 @@
|
|
|
332
363
|
--_tone-hover-border: var(--ui-danger-hover-border, var(--ui-danger-hover));
|
|
333
364
|
--_tone-active-border: var(--ui-danger-active-border, var(--ui-danger-active));
|
|
334
365
|
--_tone-highlight: var(--ui-danger-highlight, none);
|
|
366
|
+
--_tone-hover-highlight: var(--ui-danger-hover-highlight, none);
|
|
367
|
+
--_tone-outline-border: var(--ui-danger-outline-border, var(--ui-danger-subtle-text));
|
|
335
368
|
--_tone-glow: var(--ui-danger-glow, 0 0 transparent);
|
|
336
369
|
--_hue: var(--ui-danger);
|
|
337
370
|
--_hue-hover: var(--ui-danger-hover);
|
|
@@ -345,6 +378,8 @@
|
|
|
345
378
|
--_tone-hover-border: var(--ui-success-hover-border, var(--ui-success-hover));
|
|
346
379
|
--_tone-active-border: var(--ui-success-active-border, var(--ui-success-active));
|
|
347
380
|
--_tone-highlight: var(--ui-success-highlight, none);
|
|
381
|
+
--_tone-hover-highlight: var(--ui-success-hover-highlight, none);
|
|
382
|
+
--_tone-outline-border: var(--ui-success-outline-border, var(--ui-success-subtle-text));
|
|
348
383
|
--_tone-glow: var(--ui-success-glow, 0 0 transparent);
|
|
349
384
|
--_hue: var(--ui-success);
|
|
350
385
|
--_hue-hover: var(--ui-success-hover);
|
|
@@ -358,6 +393,8 @@
|
|
|
358
393
|
--_tone-hover-border: var(--ui-warning-hover-border, var(--ui-warning-hover));
|
|
359
394
|
--_tone-active-border: var(--ui-warning-active-border, var(--ui-warning-active));
|
|
360
395
|
--_tone-highlight: var(--ui-warning-highlight, none);
|
|
396
|
+
--_tone-hover-highlight: var(--ui-warning-hover-highlight, none);
|
|
397
|
+
--_tone-outline-border: var(--ui-warning-outline-border, var(--ui-warning-subtle-text));
|
|
361
398
|
--_tone-glow: var(--ui-warning-glow, 0 0 transparent);
|
|
362
399
|
--_hue: var(--ui-warning);
|
|
363
400
|
--_hue-hover: var(--ui-warning-hover);
|
|
@@ -371,6 +408,8 @@
|
|
|
371
408
|
--_tone-hover-border: var(--ui-info-hover-border, var(--ui-info-hover));
|
|
372
409
|
--_tone-active-border: var(--ui-info-active-border, var(--ui-info-active));
|
|
373
410
|
--_tone-highlight: var(--ui-info-highlight, none);
|
|
411
|
+
--_tone-hover-highlight: var(--ui-info-hover-highlight, none);
|
|
412
|
+
--_tone-outline-border: var(--ui-info-outline-border, var(--ui-info-subtle-text));
|
|
374
413
|
--_tone-glow: var(--ui-info-glow, 0 0 transparent);
|
|
375
414
|
--_hue: var(--ui-info);
|
|
376
415
|
--_hue-hover: var(--ui-info-hover);
|
|
@@ -433,6 +472,12 @@
|
|
|
433
472
|
var(--ui-focus-halo);
|
|
434
473
|
}
|
|
435
474
|
|
|
475
|
+
:scope:where([data-component~="ui-button"])[data-appearance="outline"]:focus-visible {
|
|
476
|
+
box-shadow:
|
|
477
|
+
var(--ui-button-shadow, var(--ui-neutral-shadow)),
|
|
478
|
+
var(--ui-focus-halo);
|
|
479
|
+
}
|
|
480
|
+
|
|
436
481
|
:scope:where([data-component~="ui-button"])[data-appearance="solid"]:focus-visible {
|
|
437
482
|
box-shadow:
|
|
438
483
|
var(--ui-button-solid-shadow, var(--ui-action-shadow, var(--_ui-action-shadow))),
|
package/styles/ui-card.css
CHANGED
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
:scope:where([data-component~="ui-card"])[data-ui-card-state~="treatment=expressive"] {
|
|
56
|
+
--_ui-card-material-content: color-mix(in srgb, var(--_ui-card-surface) calc(var(--_ui-material-content-alpha, 1) * 100%), transparent);
|
|
56
57
|
--_ui-panel-glass: clamp(0, var(--ui-glassiness, 0), 1);
|
|
57
58
|
--_ui-panel-separation: clamp(0, var(--ui-surface-separation, 0), 1);
|
|
58
59
|
--_ui-panel-rim: calc(var(--_ui-panel-separation) * 8px);
|
|
59
60
|
border-width: calc(var(--ui-border-width) + var(--_ui-panel-rim));
|
|
60
61
|
border-color: transparent;
|
|
61
62
|
background:
|
|
62
|
-
var(--ui-surface-highlight, linear-gradient(transparent, transparent)) padding-box,
|
|
63
|
-
linear-gradient(var(--_ui-card-
|
|
64
|
-
linear-gradient(var(--ui-material-glass, var(--ui-surface-raised)), var(--ui-material-glass, var(--ui-surface-raised))) border-box
|
|
65
|
-
var(--_ui-card-surface) padding-box;
|
|
63
|
+
var(--ui-material-highlight, var(--ui-surface-highlight, linear-gradient(transparent, transparent))) padding-box,
|
|
64
|
+
linear-gradient(var(--_ui-card-material-content), var(--_ui-card-material-content)) padding-box,
|
|
65
|
+
linear-gradient(var(--ui-material-glass, var(--ui-surface-raised)), var(--ui-material-glass, var(--ui-surface-raised))) border-box;
|
|
66
66
|
box-shadow:
|
|
67
67
|
var(--_ui-card-elevation),
|
|
68
68
|
var(--ui-material-glow, 0 0 transparent),
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
--_inset: min(calc(var(--ui-space-1) * 1.5), calc(var(--_size) / 5));
|
|
32
32
|
box-sizing: border-box !important;
|
|
33
33
|
display: inline-grid !important;
|
|
34
|
-
place-items: center;
|
|
34
|
+
place-items: center !important;
|
|
35
35
|
margin: 0 !important;
|
|
36
36
|
padding: var(--_inset) !important;
|
|
37
37
|
inline-size: max(var(--_size), calc(var(--_font) * var(--ui-line-height-tight) + var(--_padding) * 2 + var(--ui-border-width) * 2));
|
|
@@ -60,7 +60,9 @@
|
|
|
60
60
|
cursor: not-allowed;
|
|
61
61
|
}
|
|
62
62
|
.colour {
|
|
63
|
-
display:
|
|
63
|
+
display: grid !important;
|
|
64
|
+
place-items: center !important;
|
|
65
|
+
color: var(--ui-text-secondary);
|
|
64
66
|
inline-size: 100%;
|
|
65
67
|
block-size: 100%;
|
|
66
68
|
border-radius: max(0px, calc(var(--_radius) - var(--_inset) - var(--ui-border-width)));
|
|
@@ -105,3 +107,104 @@
|
|
|
105
107
|
accent-color: var(--ui-accent-solid);
|
|
106
108
|
}
|
|
107
109
|
}
|
|
110
|
+
@scope ([data-slotted~="ui-color-picker"]:not([data-component])) to ([data-component], [data-slotted]) {
|
|
111
|
+
:where([data-component~="ui-color-picker"]):where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-color-picker"]))) {
|
|
112
|
+
display: inline-flex !important;
|
|
113
|
+
flex: 0 0 auto;
|
|
114
|
+
margin: 0 !important;
|
|
115
|
+
padding: 0 !important;
|
|
116
|
+
--_size: var(--ui-control-size-md);
|
|
117
|
+
--_font: 1em;
|
|
118
|
+
--_padding: var(--ui-control-inset-block-md, var(--ui-space-2));
|
|
119
|
+
}
|
|
120
|
+
:where([data-component~="ui-color-picker"])[data-ui-color-picker-state~="size=sm"]:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-color-picker"]))) {
|
|
121
|
+
--_size: var(--ui-control-size-sm);
|
|
122
|
+
--_font: var(--ui-font-size-sm);
|
|
123
|
+
--_padding: var(--ui-control-inset-block-sm, var(--ui-space-1));
|
|
124
|
+
}
|
|
125
|
+
:where([data-component~="ui-color-picker"])[data-ui-color-picker-state~="size=lg"]:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-color-picker"]))) {
|
|
126
|
+
--_size: var(--ui-control-size-lg);
|
|
127
|
+
--_font: var(--ui-font-size-md);
|
|
128
|
+
--_padding: var(--ui-control-inset-block-lg, var(--ui-space-3));
|
|
129
|
+
}
|
|
130
|
+
button:where(:scope, :scope *) {
|
|
131
|
+
--_radius: min(var(--ui-field-radius, var(--ui-radius-md)), calc(var(--_size) / 4));
|
|
132
|
+
--_inset: min(calc(var(--ui-space-1) * 1.5), calc(var(--_size) / 5));
|
|
133
|
+
box-sizing: border-box !important;
|
|
134
|
+
display: inline-grid !important;
|
|
135
|
+
place-items: center !important;
|
|
136
|
+
margin: 0 !important;
|
|
137
|
+
padding: var(--_inset) !important;
|
|
138
|
+
inline-size: max(var(--_size), calc(var(--_font) * var(--ui-line-height-tight) + var(--_padding) * 2 + var(--ui-border-width) * 2));
|
|
139
|
+
aspect-ratio: 1;
|
|
140
|
+
flex: 0 0 auto;
|
|
141
|
+
border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
|
|
142
|
+
border-radius: var(--_radius);
|
|
143
|
+
background: var(--ui-control-surface, var(--ui-surface-elevated));
|
|
144
|
+
box-shadow: var(--ui-control-inset);
|
|
145
|
+
font: inherit;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), scale var(--ui-motion-press, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
148
|
+
}
|
|
149
|
+
button:hover:not(:disabled):where(:scope, :scope *) {
|
|
150
|
+
background: var(--ui-surface-subtle);
|
|
151
|
+
}
|
|
152
|
+
button:active:not(:disabled):where(:scope, :scope *) {
|
|
153
|
+
scale: var(--ui-press-scale, 0.96);
|
|
154
|
+
}
|
|
155
|
+
button:focus-visible:where(:scope, :scope *) {
|
|
156
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
|
|
157
|
+
outline-offset: var(--ui-focus-width);
|
|
158
|
+
}
|
|
159
|
+
button:disabled:where(:scope, :scope *) {
|
|
160
|
+
opacity: 0.5;
|
|
161
|
+
cursor: not-allowed;
|
|
162
|
+
}
|
|
163
|
+
.colour:where(:scope, :scope *) {
|
|
164
|
+
display: grid !important;
|
|
165
|
+
place-items: center !important;
|
|
166
|
+
color: var(--ui-text-secondary);
|
|
167
|
+
inline-size: 100%;
|
|
168
|
+
block-size: 100%;
|
|
169
|
+
border-radius: max(0px, calc(var(--_radius) - var(--_inset) - var(--ui-border-width)));
|
|
170
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
|
|
171
|
+
}
|
|
172
|
+
:where([data-component~="ui-color-picker"])[data-ui-color-picker-state~="round"] button:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-color-picker"]))) {
|
|
173
|
+
border-radius: 50%;
|
|
174
|
+
}
|
|
175
|
+
:where([data-component~="ui-color-picker"])[data-ui-color-picker-state~="round"] .colour:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-color-picker"]))) {
|
|
176
|
+
border-radius: 50%;
|
|
177
|
+
}
|
|
178
|
+
.editor:where(:scope, :scope *) {
|
|
179
|
+
box-sizing: border-box !important;
|
|
180
|
+
display: grid !important;
|
|
181
|
+
gap: var(--ui-space-3) !important;
|
|
182
|
+
padding: var(--ui-space-4) !important;
|
|
183
|
+
margin: 0 !important;
|
|
184
|
+
inline-size: min(18rem, calc(100vw - 1rem));
|
|
185
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
186
|
+
border-radius: var(--ui-radius-md);
|
|
187
|
+
background: var(--ui-surface-elevated);
|
|
188
|
+
color: var(--ui-text-primary);
|
|
189
|
+
box-shadow: var(--ui-shadow-lg);
|
|
190
|
+
font: inherit;
|
|
191
|
+
}
|
|
192
|
+
.editor[hidden]:where(:scope, :scope *) {
|
|
193
|
+
display: none !important;
|
|
194
|
+
}
|
|
195
|
+
.channel:where(:scope, :scope *) {
|
|
196
|
+
display: grid !important;
|
|
197
|
+
grid-template-columns: 3.5em 1fr;
|
|
198
|
+
align-items: center !important;
|
|
199
|
+
gap: var(--ui-space-2) !important;
|
|
200
|
+
padding: 0 !important;
|
|
201
|
+
margin: 0 !important;
|
|
202
|
+
}
|
|
203
|
+
input[type="range"]:where(:scope, :scope *) {
|
|
204
|
+
inline-size: 100%;
|
|
205
|
+
min-inline-size: 0;
|
|
206
|
+
margin: 0 !important;
|
|
207
|
+
padding: 0 !important;
|
|
208
|
+
accent-color: var(--ui-accent-solid);
|
|
209
|
+
}
|
|
210
|
+
}
|
package/styles/ui-dialog.css
CHANGED
|
@@ -46,13 +46,12 @@
|
|
|
46
46
|
--_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
|
|
47
47
|
--_ui-material-active: clamp(0, calc(var(--_ui-material-separation) * 100000), 1);
|
|
48
48
|
--_ui-material-rim: calc(var(--_ui-material-separation) * var(--_ui-material-scale, 1) * 8px);
|
|
49
|
-
--_ui-material-content-color: var(--ui-dialog-surface, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated))));
|
|
49
|
+
--_ui-material-content-color: var(--ui-dialog-surface, var(--_ui-material-underpaint, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated)))));
|
|
50
50
|
--_ui-material-rim-color: color-mix(in srgb, var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%), transparent);
|
|
51
51
|
background:
|
|
52
|
-
var(--ui-surface-highlight, linear-gradient(transparent, transparent)) padding-box,
|
|
52
|
+
var(--ui-material-highlight, var(--ui-surface-highlight, linear-gradient(transparent, transparent))) padding-box,
|
|
53
53
|
linear-gradient(var(--_ui-material-content-color), var(--_ui-material-content-color)) padding-box,
|
|
54
|
-
linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box
|
|
55
|
-
var(--_ui-material-content-color) padding-box;
|
|
54
|
+
linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box;
|
|
56
55
|
border-width: calc(var(--ui-border-width) + var(--_ui-material-rim));
|
|
57
56
|
border-color: var(
|
|
58
57
|
--ui-dialog-border,
|
|
@@ -76,13 +75,13 @@
|
|
|
76
75
|
|
|
77
76
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
78
77
|
:scope:where([data-component~="ui-dialog"]) {
|
|
79
|
-
background: var(--_ui-material-content-color);
|
|
78
|
+
background: oklch(from var(--_ui-material-content-color) l c h / 1);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
@media (prefers-reduced-transparency: reduce) {
|
|
84
83
|
:scope:where([data-component~="ui-dialog"]) {
|
|
85
|
-
background: var(--_ui-material-content-color);
|
|
84
|
+
background: oklch(from var(--_ui-material-content-color) l c h / 1);
|
|
86
85
|
-webkit-backdrop-filter: none;
|
|
87
86
|
backdrop-filter: none;
|
|
88
87
|
}
|
|
@@ -275,13 +274,12 @@
|
|
|
275
274
|
--_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
|
|
276
275
|
--_ui-material-active: clamp(0, calc(var(--_ui-material-separation) * 100000), 1);
|
|
277
276
|
--_ui-material-rim: calc(var(--_ui-material-separation) * var(--_ui-material-scale, 1) * 8px);
|
|
278
|
-
--_ui-material-content-color: var(--ui-dialog-surface, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated))));
|
|
277
|
+
--_ui-material-content-color: var(--ui-dialog-surface, var(--_ui-material-underpaint, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated)))));
|
|
279
278
|
--_ui-material-rim-color: color-mix(in srgb, var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%), transparent);
|
|
280
279
|
background:
|
|
281
|
-
var(--ui-surface-highlight, linear-gradient(transparent, transparent)) padding-box,
|
|
280
|
+
var(--ui-material-highlight, var(--ui-surface-highlight, linear-gradient(transparent, transparent))) padding-box,
|
|
282
281
|
linear-gradient(var(--_ui-material-content-color), var(--_ui-material-content-color)) padding-box,
|
|
283
|
-
linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box
|
|
284
|
-
var(--_ui-material-content-color) padding-box;
|
|
282
|
+
linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box;
|
|
285
283
|
border-width: calc(var(--ui-border-width) + var(--_ui-material-rim));
|
|
286
284
|
border-color: var(
|
|
287
285
|
--ui-dialog-border,
|
|
@@ -305,13 +303,13 @@
|
|
|
305
303
|
|
|
306
304
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
307
305
|
:where([data-component~="ui-dialog"]):where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-dialog"]))) {
|
|
308
|
-
background: var(--_ui-material-content-color);
|
|
306
|
+
background: oklch(from var(--_ui-material-content-color) l c h / 1);
|
|
309
307
|
}
|
|
310
308
|
}
|
|
311
309
|
|
|
312
310
|
@media (prefers-reduced-transparency: reduce) {
|
|
313
311
|
:where([data-component~="ui-dialog"]):where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-dialog"]))) {
|
|
314
|
-
background: var(--_ui-material-content-color);
|
|
312
|
+
background: oklch(from var(--_ui-material-content-color) l c h / 1);
|
|
315
313
|
-webkit-backdrop-filter: none;
|
|
316
314
|
backdrop-filter: none;
|
|
317
315
|
}
|