@vamos-ui/react 0.3.0 → 0.4.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/blocks/block-image.js +1 -1
- package/dist/blocks/block-link.js +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/index.js +2 -2
- package/dist/blocks/site/_kit-1.js +1 -1
- package/dist/blocks/site/announcement-bar.js +1 -1
- package/dist/blocks/site/article-layout.d.ts +1 -0
- package/dist/blocks/site/article-layout.js +2 -1
- package/dist/blocks/site/blog-list.d.ts +1 -0
- package/dist/blocks/site/blog-list.js +3 -2
- package/dist/blocks/site/contact-dock.js +3 -1
- package/dist/blocks/site/contact-form.js +1 -1
- package/dist/blocks/site/cta.d.ts +2 -2
- package/dist/blocks/site/cta.js +6 -4
- package/dist/blocks/site/feature-grid.d.ts +1 -0
- package/dist/blocks/site/feature-grid.js +5 -4
- package/dist/blocks/site/footer.d.ts +1 -1
- package/dist/blocks/site/footer.js +8 -7
- package/dist/blocks/site/gallery-section.d.ts +6 -1
- package/dist/blocks/site/gallery-section.js +5 -4
- package/dist/blocks/site/hero.d.ts +3 -2
- package/dist/blocks/site/hero.js +7 -5
- package/dist/blocks/site/logo-strip.d.ts +1 -0
- package/dist/blocks/site/logo-strip.js +1 -1
- package/dist/blocks/site/map-hours.d.ts +2 -2
- package/dist/blocks/site/map-hours.js +4 -2
- package/dist/blocks/site/media-text.d.ts +4 -1
- package/dist/blocks/site/media-text.js +4 -3
- package/dist/blocks/site/menu-list.d.ts +7 -3
- package/dist/blocks/site/menu-list.js +34 -7
- package/dist/blocks/site/navbar.d.ts +1 -0
- package/dist/blocks/site/navbar.js +6 -5
- package/dist/blocks/site/not-found.js +2 -1
- package/dist/blocks/site/page-intro.d.ts +1 -0
- package/dist/blocks/site/page-intro.js +2 -1
- package/dist/blocks/site/process.d.ts +1 -0
- package/dist/blocks/site/process.js +2 -1
- package/dist/blocks/site/registry-1.d.ts +1 -1
- package/dist/blocks/site/registry-2.d.ts +5 -0
- package/dist/blocks/site/registry-2.js +2 -2
- package/dist/blocks/site/rich-text-section.js +2 -1
- package/dist/blocks/site/shared/heading-lines.d.ts +9 -0
- package/dist/blocks/site/shared/heading-lines.js +32 -0
- package/dist/blocks/site/shared/image-sizes.d.ts +25 -0
- package/dist/blocks/site/shared/image-sizes.js +37 -0
- package/dist/blocks/site/shared/island-keys.d.ts +1 -1
- package/dist/blocks/site/shared/island-keys.js +1 -1
- package/dist/blocks/site/shared/labels-2.d.ts +9 -1
- package/dist/blocks/site/shared/labels-2.js +24 -6
- package/dist/blocks/site/shared/open-now.d.ts +1 -1
- package/dist/blocks/site/shared/open-now.js +1 -1
- package/dist/blocks/site/shared/opening-hours.d.ts +18 -2
- package/dist/blocks/site/shared/opening-hours.js +36 -7
- package/dist/blocks/site/shared/tap.d.ts +9 -0
- package/dist/blocks/site/shared/tap.js +16 -0
- package/dist/blocks/site/team.d.ts +1 -1
- package/dist/blocks/site/team.js +4 -3
- package/dist/blocks/site/testimonials.d.ts +2 -2
- package/dist/blocks/site/testimonials.js +3 -3
- package/dist/charts/bar-chart.js +1 -1
- package/dist/charts/chart-shell.d.ts +9 -2
- package/dist/charts/chart-shell.js +10 -4
- package/dist/charts/chart.js +1 -1
- package/dist/charts/combo-chart.js +5 -7
- package/dist/charts/utils.d.ts +10 -0
- package/dist/charts/utils.js +46 -0
- package/dist/components/activity-timeline.js +5 -5
- package/dist/components/aspect-ratio.d.ts +26 -0
- package/dist/components/aspect-ratio.js +42 -0
- package/dist/components/carousel.d.ts +12 -3
- package/dist/components/carousel.js +8 -5
- package/dist/components/collapsible.d.ts +36 -0
- package/dist/components/collapsible.js +37 -0
- package/dist/components/image.d.ts +18 -2
- package/dist/components/image.js +12 -5
- package/dist/components/menubar.d.ts +96 -0
- package/dist/components/menubar.js +123 -0
- package/dist/components/placeholder-art.d.ts +51 -0
- package/dist/components/placeholder-art.js +82 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/lib/value-format.js +1 -1
- package/dist/locales/ar.d.ts +2087 -0
- package/dist/locales/ar.js +2088 -0
- package/dist/locales/de.d.ts +2087 -0
- package/dist/locales/de.js +2088 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/es.d.ts +2087 -0
- package/dist/locales/es.js +2087 -0
- package/dist/locales/fr.d.ts +2087 -0
- package/dist/locales/fr.js +2088 -0
- package/dist/locales/tr.d.ts +1 -0
- package/dist/locales/tr.js +1 -0
- package/dist/media/media-library.js +1 -1
- package/dist/motion/text-reveal.d.ts +3 -1
- package/dist/motion/text-reveal.js +5 -3
- package/dist/render/block-renderer.js +1 -1
- package/dist/styles/blocks.css +18 -9
- package/dist/styles/editors.css +2 -1
- package/dist/styles/media.css +31 -5
- package/dist/styles.css +39 -9
- package/package.json +1 -1
package/dist/locales/tr.d.ts
CHANGED
package/dist/locales/tr.js
CHANGED
|
@@ -717,7 +717,7 @@ export const MediaLibrary = React.forwardRef(function MediaLibrary({ adapter: ad
|
|
|
717
717
|
const isSel = selected.includes(a.id);
|
|
718
718
|
const disabled = isDisabled(a);
|
|
719
719
|
const missing = isAltMissing(a);
|
|
720
|
-
return (_jsxs("div", { role: "gridcell", "data-tile": index, "data-slot": "media-tile", "data-selected": isSel ? "" : undefined, "data-active": activeId === a.id ? "" : undefined, "aria-selected": selection === "none" ? undefined : isSel, "aria-disabled": disabled || undefined, "aria-label": [a.filename, missing ? t("missingAlt") : null, a.status === "processing" ? t("processing") : a.status === "failed" ? t("failed") : null].filter(Boolean).join(", "), tabIndex: index === focusIndex ? 0 : -1, onClick: (e) => onTileClick(e, index), onDoubleClick: () => detailsPanel && openDetails(a), onFocus: () => setFocusIndex(index), className: cn("vui-media-tile group/tile focus-ring relative grid min-w-0 cursor-pointer gap-1.5 rounded-ui outline-none", disabled && "cursor-not-allowed opacity-45"), children: [_jsxs("div", { className: "vui-media-tile-frame relative overflow-hidden rounded-ui bg-surface-2", children: [_jsx(MediaThumb, { asset: a, rounded: "none" }), a.kind === "video" && a.duration ? _jsx("span", { className: "tabular absolute end-1.5 bottom-1.5 rounded-sm bg-[color-mix(in_srgb,var(--scene)_82%,transparent)] px-1.5 py-0.5 text-[10.5px] font-medium text-fg", children: f.duration(a.duration) }) : null, a.status === "failed" ? _jsx(Badge, { tone: "danger", className: "absolute start-1.5 top-1.5", children: t("failed") }) : null, missing ? _jsx("span", { "aria-hidden": true, title: t("missingAlt"), className: "vui-media-alt-dot absolute end-2 top-2 size-2 rounded-full bg-warning" }) : null, selection !== "none" ? (_jsx("span", { "aria-hidden": true, "data-slot": "media-tile-check", className: cn("vui-media-check absolute start-1.5 top-1.5 flex size-5 items-center justify-center rounded-full", isSel ? "bg-accent text-accent-fg" : "border border-[color-mix(in_srgb,var(--fg)_30%,transparent)] bg-[color-mix(in_srgb,var(--scene)_70%,transparent)] text-transparent"), children: _jsx(Check, { className: "size-3", strokeWidth: 3 }) })) : null] }), _jsx("span", { className: cn("truncate px-0.5 text-[12px] leading-tight", isSel ? "text-fg" : "text-fg-muted"), children: a.filename })] }, a.id));
|
|
720
|
+
return (_jsxs("div", { role: "gridcell", "data-tile": index, "data-slot": "media-tile", "data-selected": isSel ? "" : undefined, "data-active": activeId === a.id ? "" : undefined, "aria-selected": selection === "none" ? undefined : isSel, "aria-disabled": disabled || undefined, "aria-label": [a.filename, a.kind === "video" && a.duration ? f.duration(a.duration) : null, missing ? t("missingAlt") : null, a.status === "processing" ? t("processing") : a.status === "failed" ? t("failed") : null].filter(Boolean).join(", "), tabIndex: index === focusIndex ? 0 : -1, onClick: (e) => onTileClick(e, index), onDoubleClick: () => detailsPanel && openDetails(a), onFocus: () => setFocusIndex(index), className: cn("vui-media-tile group/tile focus-ring relative grid min-w-0 cursor-pointer gap-1.5 rounded-ui outline-none", disabled && "cursor-not-allowed opacity-45"), children: [_jsxs("div", { className: "vui-media-tile-frame relative overflow-hidden rounded-ui bg-surface-2", children: [_jsx(MediaThumb, { asset: a, rounded: "none" }), a.kind === "video" && a.duration ? _jsx("span", { "aria-hidden": true, className: "tabular absolute end-1.5 bottom-1.5 rounded-sm bg-[color-mix(in_srgb,var(--scene)_82%,transparent)] px-1.5 py-0.5 text-[10.5px] font-medium text-fg", children: f.duration(a.duration) }) : null, a.status === "failed" ? _jsx(Badge, { "aria-hidden": true, tone: "danger", className: "absolute start-1.5 top-1.5", children: t("failed") }) : null, missing ? _jsx("span", { "aria-hidden": true, title: t("missingAlt"), className: "vui-media-alt-dot absolute end-2 top-2 size-2 rounded-full bg-warning" }) : null, selection !== "none" ? (_jsx("span", { "aria-hidden": true, "data-slot": "media-tile-check", className: cn("vui-media-check absolute start-1.5 top-1.5 flex size-5 items-center justify-center rounded-full", isSel ? "bg-accent text-accent-fg" : "border border-[color-mix(in_srgb,var(--fg)_30%,transparent)] bg-[color-mix(in_srgb,var(--scene)_70%,transparent)] text-transparent"), children: _jsx(Check, { className: "size-3", strokeWidth: 3 }) })) : null] }), _jsx("span", { className: cn("truncate px-0.5 text-[12px] leading-tight", isSel ? "text-fg" : "text-fg-muted"), children: a.filename })] }, a.id));
|
|
721
721
|
};
|
|
722
722
|
const gridStyle = { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`, gap: GRID_GAP };
|
|
723
723
|
const gridEl = (_jsx("div", { ref: gridRef, role: "grid", "aria-label": t("files"), "aria-multiselectable": selection === "multiple" || undefined, "aria-rowcount": virtual ? rows.length : undefined, "aria-describedby": liveId, "data-slot": "media-grid", onKeyDown: onGridKeyDown, className: "relative", style: virtual ? { height: virtualizer.getTotalSize() } : undefined, children: virtual
|
|
@@ -20,7 +20,9 @@ export interface TextRevealProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
20
20
|
/**
|
|
21
21
|
* A heading that reveals word by word (or line by line) as it scrolls into view. Assistive
|
|
22
22
|
* tech gets one plain string: the split copy is `aria-hidden`, the real text is a visually
|
|
23
|
-
* hidden twin.
|
|
23
|
+
* hidden twin. Every unit — word or line — is separated by a real space, so `textContent`
|
|
24
|
+
* (search engines, copy-paste, reader mode) reads "közde, muhabbet", never "közde,muhabbet".
|
|
25
|
+
* Transform and opacity only; reduced motion shows it at once.
|
|
24
26
|
*
|
|
25
27
|
* ```tsx
|
|
26
28
|
* <TextReveal as="h2">Small rooms, slow mornings, nothing to scroll.</TextReveal>
|
|
@@ -6,7 +6,9 @@ import { useReveal } from "./reveal.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* A heading that reveals word by word (or line by line) as it scrolls into view. Assistive
|
|
8
8
|
* tech gets one plain string: the split copy is `aria-hidden`, the real text is a visually
|
|
9
|
-
* hidden twin.
|
|
9
|
+
* hidden twin. Every unit — word or line — is separated by a real space, so `textContent`
|
|
10
|
+
* (search engines, copy-paste, reader mode) reads "közde, muhabbet", never "közde,muhabbet".
|
|
11
|
+
* Transform and opacity only; reduced motion shows it at once.
|
|
10
12
|
*
|
|
11
13
|
* ```tsx
|
|
12
14
|
* <TextReveal as="h2">Small rooms, slow mornings, nothing to scroll.</TextReveal>
|
|
@@ -16,7 +18,7 @@ export const TextReveal = React.forwardRef(function TextReveal({ children, as: T
|
|
|
16
18
|
const inner = React.useRef(null);
|
|
17
19
|
const initial = useReveal(inner, { once, rootMargin, threshold, disabled, onReveal });
|
|
18
20
|
const text = String(children);
|
|
19
|
-
const units = by === "line" ? text.split("\n") : text.split(/\s+/).filter(Boolean);
|
|
21
|
+
const units = by === "line" ? text.split("\n").map((l) => l.trim()).filter(Boolean) : text.split(/\s+/).filter(Boolean);
|
|
20
22
|
const gap = step ?? (by === "line" ? 110 : 45);
|
|
21
23
|
const Comp = Tag;
|
|
22
24
|
return (_jsxs(Comp, { ref: (node) => {
|
|
@@ -25,5 +27,5 @@ export const TextReveal = React.forwardRef(function TextReveal({ children, as: T
|
|
|
25
27
|
ref(node);
|
|
26
28
|
else if (ref)
|
|
27
29
|
ref.current = node;
|
|
28
|
-
}, "data-reveal": effect === "mask" ? "text" : effect, "data-text-reveal": by, ...initial, className: cn("vm-text-reveal", className), style: { "--vm-step": `${gap}ms`, ...(delay ? { "--vm-delay": `${delay}ms` } : null), ...style }, ...props, children: [_jsx("span", { className: "sr-only", children:
|
|
30
|
+
}, "data-reveal": effect === "mask" ? "text" : effect, "data-text-reveal": by, ...initial, className: cn("vm-text-reveal", className), style: { "--vm-step": `${gap}ms`, ...(delay ? { "--vm-delay": `${delay}ms` } : null), ...style }, ...props, children: [_jsx("span", { className: "sr-only", children: units.join(" ") }), " ", _jsx("span", { "aria-hidden": "true", className: "vm-text-reveal-visual", children: units.map((u, i) => (_jsxs(React.Fragment, { children: [_jsx("span", { className: "vm-tr-mask", children: _jsx("span", { className: "vm-tr-unit", style: { "--vm-i": i }, children: u }) }), i < units.length - 1 ? " " : null] }, i))) })] }));
|
|
29
31
|
});
|
|
@@ -10,7 +10,7 @@ import { prepareDoc, resolveDoc } from "./prepare.js";
|
|
|
10
10
|
const isProd = () => typeof process !== "undefined" && process.env?.NODE_ENV === "production";
|
|
11
11
|
/** Edit/dev placeholder for a block that can't render normally. Server component. */
|
|
12
12
|
export function BlockNotice({ tone = "danger", title, hint, type, blockId, }) {
|
|
13
|
-
return (_jsx("div", { className: "vb-container py-4", "data-block-id": blockId, "data-block-type": type, "data-block-notice": tone, children: _jsxs("div", { role: "note", "data-tone": tone, className: "vb-notice flex flex-col gap-1 rounded-ui px-4 py-3.5 @2xl:flex-row @2xl:items-baseline @2xl:gap-4", children: [_jsx("span", { className: "shrink-0 font-mono text-eyebrow uppercase tracking-[0.08em] text-(--tone)", children: type }), _jsxs("span", { className: "text-small", children: [_jsx("strong", { className: "font-semibold text-fg", children: title }), hint ? _jsxs("span", { className: "text-fg-muted", children: [" \u2014 ", hint] }) : null] })] }) }));
|
|
13
|
+
return (_jsx("div", { className: "vb-container py-4", "data-block-id": blockId, "data-block-type": type, "data-block-notice": tone, children: _jsxs("div", { role: "note", "data-tone": tone, className: "vb-notice flex flex-col gap-1 rounded-ui px-4 py-3.5 @2xl:flex-row @2xl:items-baseline @2xl:gap-4", children: [_jsx("span", { className: "shrink-0 font-mono text-eyebrow uppercase tracking-[0.08em] text-(--tone-ink)", children: type }), _jsxs("span", { className: "text-small", children: [_jsx("strong", { className: "font-semibold text-fg", children: title }), hint ? _jsxs("span", { className: "text-fg-muted", children: [" \u2014 ", hint] }) : null] })] }) }));
|
|
14
14
|
}
|
|
15
15
|
function editAttrs(ctx, n) {
|
|
16
16
|
return ctx.opts.editMode ? { "data-block-id": n.node.id, "data-block-type": n.node.type, "data-hidden": n.node.hidden ? "" : undefined } : {};
|
package/dist/styles/blocks.css
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
--scrim: linear-gradient(to top, rgb(6 8 4 / 0.8), rgb(6 8 4 / 0.58) 55%, rgb(6 8 4 / 0.5));
|
|
12
12
|
--vb-rhythm: 1;
|
|
13
13
|
}
|
|
14
|
+
/* Rhythm overrides sit next to the default, outside @layer: an unlayered declaration always beats a
|
|
15
|
+
layered one, so inside `@layer components` these never applied. */
|
|
16
|
+
.vb-section[data-rhythm="tight"] { --vb-rhythm: 0.55; }
|
|
17
|
+
.vb-section[data-rhythm="loose"] { --vb-rhythm: 1.35; }
|
|
18
|
+
.vb-section[data-rhythm="none"] { --vb-rhythm: 0; }
|
|
14
19
|
/* Emphasis in sans presets reads as accent ink (italic stays the serif's job). */
|
|
15
20
|
[data-font="grotesk"],
|
|
16
21
|
[data-font="corporate"],
|
|
@@ -27,9 +32,6 @@
|
|
|
27
32
|
color: var(--fg);
|
|
28
33
|
scroll-margin-top: calc(var(--topbar-h) + 1rem);
|
|
29
34
|
}
|
|
30
|
-
.vb-section[data-rhythm="tight"] { --vb-rhythm: 0.55; }
|
|
31
|
-
.vb-section[data-rhythm="loose"] { --vb-rhythm: 1.35; }
|
|
32
|
-
.vb-section[data-rhythm="none"] { --vb-rhythm: 0; }
|
|
33
35
|
|
|
34
36
|
.vb-section[data-surface="scene"] { background-color: var(--scene); }
|
|
35
37
|
/* Surface tokens are translucent under glass: lay them over the section's own scene colour so a
|
|
@@ -99,15 +101,18 @@
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
/* Container widths */
|
|
104
|
+
/* Full width up to the measure. An explicit width (not `auto`) matters: inside a flex column the
|
|
105
|
+
auto inline margins switch off stretching, and the container shrank to its content (a grid of
|
|
106
|
+
lazy images collapsed to almost nothing). */
|
|
102
107
|
.vb-container {
|
|
103
|
-
box-sizing:
|
|
104
|
-
width:
|
|
105
|
-
max-width: var(--container);
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
width: 100%;
|
|
110
|
+
max-width: calc(var(--container) + 2 * var(--gutter));
|
|
106
111
|
margin-inline: auto;
|
|
107
112
|
padding-inline: var(--gutter);
|
|
108
113
|
}
|
|
109
|
-
.vb-container[data-size="wide"] { max-width: var(--container-wide); }
|
|
110
|
-
.vb-container[data-size="prose"] { max-width: var(--prose); }
|
|
114
|
+
.vb-container[data-size="wide"] { max-width: calc(var(--container-wide) + 2 * var(--gutter)); }
|
|
115
|
+
.vb-container[data-size="prose"] { max-width: calc(var(--prose) + 2 * var(--gutter)); }
|
|
111
116
|
.vb-container[data-size="full"] { max-width: none; }
|
|
112
117
|
|
|
113
118
|
/* Headings */
|
|
@@ -126,6 +131,9 @@
|
|
|
126
131
|
background-size: cover;
|
|
127
132
|
background-position: var(--vb-focal, 50% 50%);
|
|
128
133
|
}
|
|
134
|
+
/* No ratio: the frame follows the image. Was a Tailwind h-auto class, which (utilities layer)
|
|
135
|
+
silently beat component sizes such as .vb-nav-logo's 1.75rem height. */
|
|
136
|
+
.vb-image:where(:not([data-ratio])) { height: auto; }
|
|
129
137
|
.vb-image > img,
|
|
130
138
|
.vb-image > picture > img {
|
|
131
139
|
display: block;
|
|
@@ -163,11 +171,12 @@
|
|
|
163
171
|
/* Edit-mode placeholders for unknown / invalid blocks. */
|
|
164
172
|
.vb-notice {
|
|
165
173
|
--tone: var(--danger);
|
|
174
|
+
--tone-ink: var(--danger-ink);
|
|
166
175
|
border: 1px dashed color-mix(in srgb, var(--tone) 55%, transparent);
|
|
167
176
|
background: color-mix(in srgb, var(--tone) 7%, var(--scene));
|
|
168
177
|
color: var(--fg);
|
|
169
178
|
}
|
|
170
|
-
.vb-notice[data-tone="warning"] { --tone: var(--warning); }
|
|
179
|
+
.vb-notice[data-tone="warning"] { --tone: var(--warning); --tone-ink: var(--warning-ink); }
|
|
171
180
|
}
|
|
172
181
|
|
|
173
182
|
/* The primary action can't be accent-on-accent: it inverts. Unlayered on purpose, so it wins
|
package/dist/styles/editors.css
CHANGED
|
@@ -589,7 +589,8 @@
|
|
|
589
589
|
.vui-cblock-unknown p { margin: 0; }
|
|
590
590
|
|
|
591
591
|
/* Images */
|
|
592
|
-
|
|
592
|
+
/* Editor image node only: the kit <Image> shares the class name. */
|
|
593
|
+
.ProseMirror .vui-image { margin-block: 1.5rem; }
|
|
593
594
|
.vui-image-frame { position: relative; border-radius: var(--radius-ui-sm); }
|
|
594
595
|
.vui-image-frame img { display: block; max-width: 100%; height: auto; border-radius: inherit; }
|
|
595
596
|
.vui-image[data-selected] .vui-image-frame { outline: 1.5px solid var(--ring); outline-offset: 4px; }
|
package/dist/styles/media.css
CHANGED
|
@@ -169,7 +169,8 @@
|
|
|
169
169
|
/* ------------------------------------------------------------------ */
|
|
170
170
|
@keyframes vui-marquee { to { transform: translateX(calc(-100% * var(--dir))); } }
|
|
171
171
|
@layer components {
|
|
172
|
-
.vui-marquee { gap: var(--marquee-gap); }
|
|
172
|
+
.vui-marquee-viewport { gap: var(--marquee-gap); }
|
|
173
|
+
.vui-marquee[data-controls] .vui-marquee-viewport { margin-inline-end: 2.25rem; }
|
|
173
174
|
.vui-marquee-track {
|
|
174
175
|
gap: var(--marquee-gap);
|
|
175
176
|
min-width: 100%;
|
|
@@ -178,15 +179,40 @@
|
|
|
178
179
|
}
|
|
179
180
|
.vui-marquee[data-reverse] .vui-marquee-track { animation-direction: reverse; }
|
|
180
181
|
.vui-marquee[data-pause-on-hover]:hover .vui-marquee-track,
|
|
181
|
-
.vui-marquee[data-pause-on-hover]:focus-within .vui-marquee-track
|
|
182
|
-
.vui-marquee
|
|
182
|
+
.vui-marquee[data-pause-on-hover]:focus-within .vui-marquee-track,
|
|
183
|
+
.vui-marquee:has(.vui-marquee-pause:checked) .vui-marquee-track { animation-play-state: paused; }
|
|
184
|
+
.vui-marquee-toggle {
|
|
185
|
+
position: absolute;
|
|
186
|
+
inset-inline-end: 0;
|
|
187
|
+
inset-block-start: 50%;
|
|
188
|
+
translate: 0 -50%;
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
width: 1.75rem;
|
|
192
|
+
height: 1.75rem;
|
|
193
|
+
border-radius: 999px;
|
|
194
|
+
border: 1px solid var(--surface-border);
|
|
195
|
+
background: var(--surface);
|
|
196
|
+
color: var(--fg-muted);
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
}
|
|
199
|
+
.vui-marquee-toggle:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, var(--surface)); }
|
|
200
|
+
.vui-marquee-toggle:has(:focus-visible) { color: var(--fg); outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
201
|
+
.vui-marquee-toggle svg { width: 0.75rem; height: 0.75rem; }
|
|
202
|
+
.vui-marquee-icon-play,
|
|
203
|
+
.vui-marquee:has(.vui-marquee-pause:checked) .vui-marquee-icon-pause { display: none; }
|
|
204
|
+
.vui-marquee:has(.vui-marquee-pause:checked) .vui-marquee-icon-play { display: block; }
|
|
205
|
+
[data-motion="off"] .vui-marquee-toggle { display: none; }
|
|
206
|
+
[data-motion="off"] .vui-marquee[data-controls] .vui-marquee-viewport { margin-inline-end: 0; }
|
|
207
|
+
.vui-marquee[data-fade] .vui-marquee-viewport {
|
|
183
208
|
-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
|
|
184
209
|
mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
|
|
185
210
|
}
|
|
186
211
|
@media (prefers-reduced-motion: reduce) {
|
|
187
|
-
.vui-marquee { overflow-x: auto; }
|
|
212
|
+
.vui-marquee-viewport { overflow-x: auto; margin-inline-end: 0; }
|
|
188
213
|
.vui-marquee-track { animation: none; }
|
|
189
|
-
.vui-marquee-track[aria-hidden]
|
|
214
|
+
.vui-marquee-track[aria-hidden],
|
|
215
|
+
.vui-marquee-toggle { display: none; }
|
|
190
216
|
}
|
|
191
217
|
}
|
|
192
218
|
|
package/dist/styles.css
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
--accent-ink-dark: oklch(0.9 0.19 122);
|
|
47
47
|
}
|
|
48
48
|
[data-accent="ocean"] {
|
|
49
|
-
--accent-base: oklch(0.
|
|
49
|
+
--accent-base: oklch(0.55 0.17 245);
|
|
50
50
|
--accent-fg: #fff;
|
|
51
51
|
--accent-ink-light: oklch(0.5 0.17 250);
|
|
52
52
|
--accent-ink-dark: oklch(0.78 0.12 240);
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
--accent-ink-dark: oklch(0.8 0.14 50);
|
|
59
59
|
}
|
|
60
60
|
[data-accent="rose"] {
|
|
61
|
-
--accent-base: oklch(0.
|
|
61
|
+
--accent-base: oklch(0.58 0.21 10);
|
|
62
62
|
--accent-fg: #fff;
|
|
63
63
|
--accent-ink-light: oklch(0.52 0.2 12);
|
|
64
64
|
--accent-ink-dark: oklch(0.8 0.13 10);
|
|
@@ -125,6 +125,13 @@
|
|
|
125
125
|
/* solid danger fill behind white text (destructive buttons); stays >= 4.5:1 in both themes */
|
|
126
126
|
--danger-solid: #d0303c;
|
|
127
127
|
--info: #2563eb;
|
|
128
|
+
/* Text-safe status inks (text-success/-warning/-danger/-info, tone text). The base hues stay for
|
|
129
|
+
fills, dots and badges; the inks keep small text >= 4.5:1 on scene, surface, hover and
|
|
130
|
+
selected rows (measured: success 5.47, warning 5.71, danger 5.51, info 5.44 on --scene). */
|
|
131
|
+
--success-ink: #0a6e4b;
|
|
132
|
+
--warning-ink: #8f4c00;
|
|
133
|
+
--danger-ink: #b8232f;
|
|
134
|
+
--info-ink: #1f56d6;
|
|
128
135
|
|
|
129
136
|
--chart-1: var(--accent-ink);
|
|
130
137
|
--chart-2: #2f6fd6;
|
|
@@ -188,6 +195,11 @@
|
|
|
188
195
|
--danger: #f2717a;
|
|
189
196
|
--danger-solid: #c93a45;
|
|
190
197
|
--info: #7cb0ff;
|
|
198
|
+
/* the dark hues already clear 4.5:1 as text (>= 5.97 on surface-2) */
|
|
199
|
+
--success-ink: var(--success);
|
|
200
|
+
--warning-ink: var(--warning);
|
|
201
|
+
--danger-ink: var(--danger);
|
|
202
|
+
--info-ink: var(--info);
|
|
191
203
|
|
|
192
204
|
--chart-2: #6ea4ff;
|
|
193
205
|
--chart-3: #f0a256;
|
|
@@ -522,6 +534,15 @@
|
|
|
522
534
|
--color-danger: var(--danger);
|
|
523
535
|
--color-danger-solid: var(--danger-solid);
|
|
524
536
|
--color-info: var(--info);
|
|
537
|
+
--color-success-ink: var(--success-ink);
|
|
538
|
+
--color-warning-ink: var(--warning-ink);
|
|
539
|
+
--color-danger-ink: var(--danger-ink);
|
|
540
|
+
--color-info-ink: var(--info-ink);
|
|
541
|
+
/* text-<status> reads the ink; bg-/border-/fill-<status> keep the base hue */
|
|
542
|
+
--text-color-success: var(--success-ink);
|
|
543
|
+
--text-color-warning: var(--warning-ink);
|
|
544
|
+
--text-color-danger: var(--danger-ink);
|
|
545
|
+
--text-color-info: var(--info-ink);
|
|
525
546
|
--color-chart-1: var(--chart-1);
|
|
526
547
|
--color-chart-2: var(--chart-2);
|
|
527
548
|
--color-chart-3: var(--chart-3);
|
|
@@ -647,15 +668,24 @@ html {
|
|
|
647
668
|
}
|
|
648
669
|
/* Semantic tints shared by Badge, Alert, Toast and Status picker:
|
|
649
670
|
pick a hue with tone-<name> (or set --tone), paint with tone-soft. */
|
|
650
|
-
@utility tone-neutral { --tone: var(--fg-muted); }
|
|
651
|
-
@utility tone-accent { --tone: var(--accent-ink); }
|
|
652
|
-
@utility tone-success { --tone: var(--success); }
|
|
653
|
-
@utility tone-warning { --tone: var(--warning); }
|
|
654
|
-
@utility tone-danger { --tone: var(--danger); }
|
|
655
|
-
@utility tone-info { --tone: var(--info); }
|
|
671
|
+
@utility tone-neutral { --tone: var(--fg-muted); --tone-ink: var(--fg-muted); }
|
|
672
|
+
@utility tone-accent { --tone: var(--accent-ink); --tone-ink: var(--accent-ink); }
|
|
673
|
+
@utility tone-success { --tone: var(--success); --tone-ink: var(--success-ink); }
|
|
674
|
+
@utility tone-warning { --tone: var(--warning); --tone-ink: var(--warning-ink); }
|
|
675
|
+
@utility tone-danger { --tone: var(--danger); --tone-ink: var(--danger-ink); }
|
|
676
|
+
@utility tone-info { --tone: var(--info); --tone-ink: var(--info-ink); }
|
|
656
677
|
@utility tone-soft {
|
|
657
678
|
background-color: color-mix(in srgb, var(--tone, var(--fg-muted)) var(--tone-mix, 13%), transparent);
|
|
658
|
-
color: color-mix(in srgb, var(--tone, var(--fg-muted)) var(--tone-ink-mix, 100%), var(--fg));
|
|
679
|
+
color: color-mix(in srgb, var(--tone, var(--fg-muted)) var(--tone-ink-mix, 100%), var(--tone-ink-base, var(--fg)));
|
|
680
|
+
}
|
|
681
|
+
/* The nav stays dark in the light theme: tone-soft text mixes toward white there instead of --fg
|
|
682
|
+
(light: >= 4.9:1 on the solid and glass rail for every tone). */
|
|
683
|
+
:where(.surface-nav, .bg-nav) {
|
|
684
|
+
--tone-ink-base: var(--nav-fg-strong);
|
|
685
|
+
--tone-ink-mix: 50%;
|
|
686
|
+
}
|
|
687
|
+
:where(.dark .surface-nav, .dark .bg-nav) {
|
|
688
|
+
--tone-ink-mix: 80%;
|
|
659
689
|
}
|
|
660
690
|
@utility focus-ring {
|
|
661
691
|
&:focus-visible {
|