@vvedantb/ui 0.75.3 → 0.76.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/src/ui/avatar.js +1 -1
- package/dist/src/ui/button.js +1 -1
- package/dist/src/ui/calendar.js +1 -1
- package/dist/src/ui/dialog.js +1 -1
- package/dist/src/ui/hover-card.js +1 -1
- package/dist/src/ui/kbd.js +2 -2
- package/dist/src/ui/sheet.js +2 -2
- package/dist/src/ui/slide-over-panel.js +1 -1
- package/dist/src/ui/sonner.js +1 -1
- package/dist/src/ui/tooltip.js +1 -1
- package/dist/src/ui/ui-config.js +36 -8
- package/dist/tokens/src/css/surface-flat.css +30 -0
- package/dist/tokens/src/tokens.css +1 -0
- package/package.json +1 -1
- package/src/ai-elements/__snapshots__/queue.test.tsx.snap +1 -1
- package/src/client.ts +1 -1
- package/src/index.ts +1 -1
- package/src/ui/__snapshots__/alt-wrappers.test.tsx.snap +1 -1
- package/src/ui/__snapshots__/sonner-dom.test.tsx.snap +1 -1
- package/src/ui/avatar.tsx +1 -1
- package/src/ui/button.tsx +1 -1
- package/src/ui/calendar.tsx +1 -1
- package/src/ui/dialog.tsx +1 -1
- package/src/ui/hover-card.tsx +1 -1
- package/src/ui/kbd.tsx +2 -2
- package/src/ui/sheet.tsx +2 -2
- package/src/ui/slide-over-panel.tsx +1 -1
- package/src/ui/sonner.tsx +1 -1
- package/src/ui/tooltip.tsx +1 -1
- package/src/ui/ui-config.tsx +14 -1
- package/tokens/src/css/surface-flat.css +30 -0
- package/tokens/src/tokens.css +1 -0
package/dist/src/ui/avatar.js
CHANGED
|
@@ -22,7 +22,7 @@ const Avatar = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
22
22
|
const merge = useCn();
|
|
23
23
|
let t1;
|
|
24
24
|
if ($[3] !== className || $[4] !== merge) {
|
|
25
|
-
t1 = merge("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-border bg-surface-secondary", className);
|
|
25
|
+
t1 = merge("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-border bg-surface-secondary after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]", className);
|
|
26
26
|
$[3] = className;
|
|
27
27
|
$[4] = merge;
|
|
28
28
|
$[5] = t1;
|
package/dist/src/ui/button.js
CHANGED
|
@@ -9,7 +9,7 @@ const ghostClass = "text-muted-foreground hover:bg-surface-tertiary hover:text-f
|
|
|
9
9
|
const buttonBaseClasses = "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0";
|
|
10
10
|
const GLASS_RIM = "shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.3),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.6),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.22),0_1px_2px_rgb(0_0_0/0.16)]";
|
|
11
11
|
const GLASS_RIM_ON_PRIMARY = "shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)]";
|
|
12
|
-
const defaultVariantClass = "bg-primary text-primary-foreground hover:opacity-90" + GLASS_RIM_ON_PRIMARY;
|
|
12
|
+
const defaultVariantClass = "bg-primary text-primary-foreground hover:opacity-90 " + GLASS_RIM_ON_PRIMARY;
|
|
13
13
|
const destructiveVariantClass = "bg-[oklch(47.2%_0.195_25.7)] text-white hover:bg-[oklch(42.5%_0.185_25.7)] " + GLASS_RIM;
|
|
14
14
|
const buttonVariantClasses = {
|
|
15
15
|
default: defaultVariantClass,
|
package/dist/src/ui/calendar.js
CHANGED
|
@@ -149,7 +149,7 @@ function Calendar({
|
|
|
149
149
|
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
150
150
|
week_number: cn("select-none text-[10px] text-muted-foreground", defaultClassNames.week_number),
|
|
151
151
|
day: cn("group/day relative aspect-square h-full w-full select-none p-0 text-center", defaultClassNames.day),
|
|
152
|
-
day_button: cn("relative inline-flex size-(--cell-size) items-center justify-center rounded-lg text-xs tabular-nums text-foreground/80 transition-colors disabled:cursor-not-allowed disabled:opacity-40", pickerFocusClass, "not-group-data-selected/day:enabled:hover:bg-surface-tertiary/50", "group-data-today/day:font-medium group-data-today/day:not-group-data-selected/day:text-foreground group-data-today/day:after:absolute group-data-today/day:after:bottom-1 group-data-today/day:after:left-1/2 group-data-today/day:after:size-1 group-data-today/day:after:-translate-x-1/2 group-data-today/day:after:rounded-full group-data-today/day:after:bg-current", "group-data-outside/day:not-group-data-selected/day:text-muted-foreground", "group-data-selected/day:bg-primary group-data-selected/day:text-primary-foreground", defaultClassNames.day_button),
|
|
152
|
+
day_button: cn("relative inline-flex size-(--cell-size) items-center justify-center rounded-lg text-xs tabular-nums text-foreground/80 transition-colors disabled:cursor-not-allowed disabled:opacity-40", pickerFocusClass, "not-group-data-selected/day:enabled:hover:bg-surface-tertiary/50", "group-data-today/day:font-medium group-data-today/day:not-group-data-selected/day:text-foreground group-data-today/day:after:absolute group-data-today/day:after:bottom-1 group-data-today/day:after:left-1/2 group-data-today/day:after:size-1 group-data-today/day:after:-translate-x-1/2 group-data-today/day:after:rounded-full group-data-today/day:after:bg-current", "group-data-outside/day:not-group-data-selected/day:text-muted-foreground", "group-data-selected/day:bg-primary group-data-selected/day:text-primary-foreground group-data-selected/day:shadow-[inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),0_1px_2px_rgb(0_0_0/0.16)]", defaultClassNames.day_button),
|
|
153
153
|
range_start: cn("rounded-l-lg", defaultClassNames.range_start),
|
|
154
154
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
155
155
|
range_end: cn("rounded-r-lg", defaultClassNames.range_end),
|
package/dist/src/ui/dialog.js
CHANGED
|
@@ -321,7 +321,7 @@ const DialogContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
321
321
|
t10 = $[31];
|
|
322
322
|
}
|
|
323
323
|
const t11 = compact ? "true" : undefined;
|
|
324
|
-
const t12 = classes?.content ?? "glass-panel-strong z-50 flex w-full flex-col gap-4 p-6 text-overlay-foreground smooth-shadow-ring-xl";
|
|
324
|
+
const t12 = classes?.content ?? "glass-panel-strong z-50 flex w-full flex-col gap-4 p-6 text-overlay-foreground smooth-shadow-ring-xl after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]";
|
|
325
325
|
let t13;
|
|
326
326
|
if ($[32] !== classes?.centered || $[33] !== classes?.compact || $[34] !== compact) {
|
|
327
327
|
t13 = compact ? classes?.compact ?? cn("overflow-y-auto fixed inset-x-0 top-auto w-full max-w-none rounded-t-2xl rounded-b-none pt-3", "max-h-[var(--overlay-vv-height,100dvh)]", "bottom-[var(--overlay-vv-bottom,0px)]", "pb-[max(1.5rem,env(safe-area-inset-bottom,0px))]", "data-[compact=true]:[&_button]:min-h-11 data-[compact=true]:[&_[data-slot=dialog-footer]]:flex-col-reverse data-[compact=true]:[&_[data-slot=dialog-footer]]:sm:flex-col-reverse", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom", "motion-reduce:animate-none motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none") : classes?.centered ?? "t-modal fixed left-1/2 top-1/2 max-h-[90dvh] max-w-lg max-sm:w-[calc(100vw-2rem)] overflow-y-auto rounded-lg";
|
|
@@ -80,7 +80,7 @@ const HoverCardContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
80
80
|
const t2 = sideOffset ?? config?.sideOffset ?? 4;
|
|
81
81
|
let t3;
|
|
82
82
|
if ($[6] !== config?.classes?.content) {
|
|
83
|
-
t3 = config?.classes?.content ?? ["z-50 w-72 max-sm:max-w-[calc(100vw-2rem)] max-sm:max-h-[85dvh] max-sm:overflow-y-auto p-4 outline-none", floatingSurfaceClass, floatingSurfaceAnimateClass];
|
|
83
|
+
t3 = config?.classes?.content ?? ["z-50 w-72 max-sm:max-w-[calc(100vw-2rem)] max-sm:max-h-[85dvh] max-sm:overflow-y-auto p-4 outline-none relative after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]", floatingSurfaceClass, floatingSurfaceAnimateClass];
|
|
84
84
|
$[6] = config?.classes?.content;
|
|
85
85
|
$[7] = t3;
|
|
86
86
|
} else {
|
package/dist/src/ui/kbd.js
CHANGED
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const kbdVariantClasses = {
|
|
6
|
-
default: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md bg-surface-secondary px-1.5 font-mono text-[10px] font-medium text-muted-foreground",
|
|
7
|
-
subtle: "rounded bg-surface-secondary px-1.5 py-0.5 text-foreground"
|
|
6
|
+
default: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md bg-surface-secondary px-1.5 font-mono text-[10px] font-medium text-muted-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_1px_rgb(0_0_0/0.08)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_1px_rgb(0_0_0/0.3)]",
|
|
7
|
+
subtle: "rounded bg-surface-secondary px-1.5 py-0.5 text-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_1px_rgb(0_0_0/0.08)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_1px_rgb(0_0_0/0.3)]"
|
|
8
8
|
};
|
|
9
9
|
const Kbd = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
10
10
|
const $ = _c(11);
|
package/dist/src/ui/sheet.js
CHANGED
|
@@ -117,9 +117,9 @@ const sheetSideSurfaceClass = {
|
|
|
117
117
|
left: "rounded-2xl",
|
|
118
118
|
right: "rounded-2xl"
|
|
119
119
|
};
|
|
120
|
-
const sheetContentClass = "fixed z-50 overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl outline-hidden backdrop-blur-xl motion-reduce:transition-none";
|
|
120
|
+
const sheetContentClass = "fixed z-50 overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl outline-hidden backdrop-blur-xl motion-reduce:transition-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]";
|
|
121
121
|
const sheetBlurHostClass = "fixed z-50 outline-hidden motion-reduce:transition-none after:hidden";
|
|
122
|
-
const sheetBlurSurfaceClass = "flex min-h-0 flex-auto flex-col overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl backdrop-blur-xl";
|
|
122
|
+
const sheetBlurSurfaceClass = "flex min-h-0 flex-auto flex-col overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl backdrop-blur-xl relative after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]";
|
|
123
123
|
function supportsMotionBlur(node) {
|
|
124
124
|
return typeof DOMMatrix === "function" && typeof window.matchMedia === "function" && typeof node.getAnimations === "function" && typeof window.getComputedStyle(node).translate === "string";
|
|
125
125
|
}
|
|
@@ -39,7 +39,7 @@ export function SlideOverPanel(t0) {
|
|
|
39
39
|
damping: 30,
|
|
40
40
|
stiffness: 300
|
|
41
41
|
},
|
|
42
|
-
className: cn(`absolute top-0 right-0 bottom-0 ${width} z-20 glass-panel-strong smooth-shadow-ring-xl overflow-y-auto hidden md:flex flex-col`, className),
|
|
42
|
+
className: cn(`absolute top-0 right-0 bottom-0 ${width} z-20 glass-panel-strong smooth-shadow-ring-xl after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)] overflow-y-auto hidden md:flex flex-col`, className),
|
|
43
43
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
44
44
|
className: "flex items-start justify-between p-4 pb-2",
|
|
45
45
|
children: [header, /*#__PURE__*/_jsx(Button, {
|
package/dist/src/ui/sonner.js
CHANGED
|
@@ -32,7 +32,7 @@ function createToasterClassNames({
|
|
|
32
32
|
const compact = density === "compact";
|
|
33
33
|
const descriptionSize = compact ? "text-xs" : "text-[13px]";
|
|
34
34
|
return {
|
|
35
|
-
toast: `group toast glass-panel-strong flex w-full items-center ${compact ? "gap-2" : "gap-3"} ${radius} ${compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm"} text-foreground smooth-shadow-ring-md${hideStackedContent ? ` ${hideStackedContentClassName}` : ""}`,
|
|
35
|
+
toast: `group toast glass-panel-strong flex w-full items-center ${compact ? "gap-2" : "gap-3"} ${radius} ${compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm"} text-foreground smooth-shadow-ring-md after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]${hideStackedContent ? ` ${hideStackedContentClassName}` : ""}`,
|
|
36
36
|
content: "flex min-w-0 grow flex-col",
|
|
37
37
|
icon: "relative",
|
|
38
38
|
title: titleLeading === "5" ? "font-medium leading-5" : "font-medium leading-snug",
|
package/dist/src/ui/tooltip.js
CHANGED
|
@@ -66,7 +66,7 @@ const TooltipContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
66
66
|
const merge = useCn();
|
|
67
67
|
const config = useUiConfig("Tooltip");
|
|
68
68
|
const t1 = sideOffset ?? config?.sideOffset ?? 4;
|
|
69
|
-
const t2 = config?.classes?.content ?? "z-50 max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg bg-overlay px-2.5 py-1.5 text-xs text-overlay-foreground smooth-shadow-ring-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popper-transform-origin)]";
|
|
69
|
+
const t2 = config?.classes?.content ?? "relative z-50 max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg bg-overlay px-2.5 py-1.5 text-xs text-overlay-foreground smooth-shadow-ring-md after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)] animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popper-transform-origin)]";
|
|
70
70
|
let t3;
|
|
71
71
|
if ($[5] !== className || $[6] !== merge || $[7] !== t2) {
|
|
72
72
|
t3 = merge(t2, className);
|
package/dist/src/ui/ui-config.js
CHANGED
|
@@ -4,24 +4,52 @@ import { cn } from "../utils/cn.js";
|
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const UiConfigContext = /*#__PURE__*/React.createContext({});
|
|
6
6
|
function UiConfigProvider(t0) {
|
|
7
|
-
const $ = _c(
|
|
7
|
+
const $ = _c(6);
|
|
8
8
|
const {
|
|
9
9
|
config,
|
|
10
|
+
surface,
|
|
10
11
|
children
|
|
11
12
|
} = t0;
|
|
12
13
|
let t1;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
let t2;
|
|
15
|
+
if ($[0] !== surface) {
|
|
16
|
+
t1 = () => {
|
|
17
|
+
if (!surface || typeof document === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const root = document.documentElement;
|
|
21
|
+
const previous = root.getAttribute("data-surface");
|
|
22
|
+
root.setAttribute("data-surface", surface);
|
|
23
|
+
return () => {
|
|
24
|
+
if (previous === null) {
|
|
25
|
+
root.removeAttribute("data-surface");
|
|
26
|
+
} else {
|
|
27
|
+
root.setAttribute("data-surface", previous);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
t2 = [surface];
|
|
32
|
+
$[0] = surface;
|
|
33
|
+
$[1] = t1;
|
|
34
|
+
$[2] = t2;
|
|
35
|
+
} else {
|
|
36
|
+
t1 = $[1];
|
|
37
|
+
t2 = $[2];
|
|
38
|
+
}
|
|
39
|
+
React.useLayoutEffect(t1, t2);
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[3] !== children || $[4] !== config) {
|
|
42
|
+
t3 = /*#__PURE__*/_jsx(UiConfigContext.Provider, {
|
|
15
43
|
value: config,
|
|
16
44
|
children: children
|
|
17
45
|
});
|
|
18
|
-
$[
|
|
19
|
-
$[
|
|
20
|
-
$[
|
|
46
|
+
$[3] = children;
|
|
47
|
+
$[4] = config;
|
|
48
|
+
$[5] = t3;
|
|
21
49
|
} else {
|
|
22
|
-
|
|
50
|
+
t3 = $[5];
|
|
23
51
|
}
|
|
24
|
-
return
|
|
52
|
+
return t3;
|
|
25
53
|
}
|
|
26
54
|
function useUiConfig(name) {
|
|
27
55
|
return React.useContext(UiConfigContext)[name];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @vvedantb/ui/tokens/css/surface-flat.css: the flat surface style.
|
|
3
|
+
* UiConfigProvider sets data-surface on the root element. The default is
|
|
4
|
+
* glass. With data-surface="flat", the rules below remove the glass rim,
|
|
5
|
+
* highlight and drop shadow that components carry as utility classes.
|
|
6
|
+
* Rule 1 clears the highlight overlay (an ::after pseudo-element).
|
|
7
|
+
* Rule 2 clears elements that carry the highlight as their own box-shadow.
|
|
8
|
+
* The tab pill is plain CSS and has its own rule.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root[data-surface="flat"] [class*="after:shadow-[inset"]::after {
|
|
12
|
+
box-shadow: none !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:root[data-surface="flat"]
|
|
16
|
+
:is([class*="inset_1.5px_1.5px_1px"], [class*="inset_1px_1px_1px"]):not(
|
|
17
|
+
[class*="after:shadow-[inset"]
|
|
18
|
+
) {
|
|
19
|
+
box-shadow: none !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:root[data-surface="flat"] .t-tabs--segmented .t-tabs-pill {
|
|
23
|
+
background: var(--tabs-pill-bg) !important;
|
|
24
|
+
backdrop-filter: none !important;
|
|
25
|
+
box-shadow: none !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:root[data-surface="flat"] .t-tabs--segmented .t-tabs-pill::after {
|
|
29
|
+
display: none !important;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vvedantb/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared React 19 UI for web apps: one main JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), third-party brand logos (also @vvedantb/ui/logos), motion-driven animated SVG icons (@vvedantb/ui/icons/animated), a client entry without @vvedantb/server, convex or Clerk for Chrome extensions, design-token CSS, shared Tailwind v4 CSS, a Tailwind preset and packaged Instrument Sans fonts.",
|
|
6
6
|
"type": "module",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`vibot Queue widget DOM > renders the closed widget 1`] = `"<div class="w-full overflow-hidden" style="height: auto; opacity: 1;"><button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">3</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out"><path d="M6 9l6 6l6 -6"></path></svg></button></div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 1`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex flex-col gap-2"><textarea class="flex w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 shadow-[inset_0_1px_2px_rgb(0_0_0/0.08),inset_0_0_0_0.5px_rgb(0_0_0/0.04),0_1px_0_rgb(255_255_255/0.25)] focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring min-h-[60px]">Draft</textarea><div class="flex justify-end gap-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-x"><path d="M18 6l-12 12"></path><path d="M6 6l12 12"></path></svg><span class="ml-1 text-xs">Cancel</span></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-
|
|
5
|
+
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 1`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex flex-col gap-2"><textarea class="flex w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 shadow-[inset_0_1px_2px_rgb(0_0_0/0.08),inset_0_0_0_0.5px_rgb(0_0_0/0.04),0_1px_0_rgb(255_255_255/0.25)] focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring min-h-[60px]">Draft</textarea><div class="flex justify-end gap-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-x"><path d="M18 6l-12 12"></path><path d="M6 6l12 12"></path></svg><span class="ml-1 text-xs">Cancel</span></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-90 shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)] text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-check"><path d="M5 12l5 5l10 -10"></path></svg><span class="ml-1 text-xs">Save</span></button></div></div></div>"`;
|
|
6
6
|
|
|
7
7
|
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 2`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Draft</p><div class="flex items-center gap-1.5 shrink-0"></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div>"`;
|
|
8
8
|
|
package/src/client.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { cn } from "./utils/cn";
|
|
2
2
|
export { UiConfigProvider, useUiConfig } from "./ui/ui-config";
|
|
3
|
-
export type { UiConfig, UiConfigProviderProps } from "./ui/ui-config";
|
|
3
|
+
export type { UiConfig, UiConfigProviderProps, UiSurface } from "./ui/ui-config";
|
|
4
4
|
export { floatingSurfaceClass, triggerZoomAnimateClass } from "./ui/_menu-classes";
|
|
5
5
|
export { fieldFocusClass, fieldFocusWithinClass } from "./ui/_field-classes";
|
|
6
6
|
export * from "./ui/surface-classes";
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { cn } from "./utils/cn";
|
|
2
2
|
export { UiConfigProvider, useUiConfig } from "./ui/ui-config";
|
|
3
|
-
export type { UiConfig, UiConfigProviderProps } from "./ui/ui-config";
|
|
3
|
+
export type { UiConfig, UiConfigProviderProps, UiSurface } from "./ui/ui-config";
|
|
4
4
|
export { floatingSurfaceClass, triggerZoomAnimateClass } from "./ui/_menu-classes";
|
|
5
5
|
export { fieldFocusClass, fieldFocusWithinClass } from "./ui/_field-classes";
|
|
6
6
|
export * from "./ui/surface-classes";
|
|
@@ -14,6 +14,6 @@ exports[`ClearInputAlt markup > filled 1`] = `"<div class="relative"><input clas
|
|
|
14
14
|
|
|
15
15
|
exports[`InputGroupAlt markup > input className and props 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0 in-x" id="i" disabled=""></div>"`;
|
|
16
16
|
|
|
17
|
-
exports[`InputGroupAlt markup > input with every addon align and button size 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><div class="flex items-center flex-row ps-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></div><div data-align="inline-start" class="flex items-center flex-row ps-3"><span class="flex items-center text-sm text-muted-foreground/95">https://</span></div><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0" placeholder="Search"><div data-align="inline-end" class="flex items-center flex-row pe-3"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs">Go</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-8 rounded-lg px-2.5 text-xs">Small</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground px-4 py-2 shrink-0 shadow-none h-7 w-7 rounded-lg" aria-label="A"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-
|
|
17
|
+
exports[`InputGroupAlt markup > input with every addon align and button size 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><div class="flex items-center flex-row ps-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></div><div data-align="inline-start" class="flex items-center flex-row ps-3"><span class="flex items-center text-sm text-muted-foreground/95">https://</span></div><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0" placeholder="Search"><div data-align="inline-end" class="flex items-center flex-row pe-3"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs">Go</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-8 rounded-lg px-2.5 text-xs">Small</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground px-4 py-2 shrink-0 shadow-none h-7 w-7 rounded-lg" aria-label="A"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-90 px-4 py-2 shrink-0 shadow-none h-8 w-8 rounded-lg" type="submit" aria-label="B"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button></div></div>"`;
|
|
18
18
|
|
|
19
19
|
exports[`InputGroupAlt markup > textarea with block addons, error and classNames 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:ring-1 border-danger-border has-focus-visible:border-danger has-focus-visible:ring-danger-ring root-x" id="g"><div data-align="block-start" class="flex items-center w-full flex-row border-b border-separator px-3 py-2 addon-x"><span class="flex items-center text-sm text-x">Title</span></div><textarea class="flex min-h-20 w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring flex-1 resize-none rounded-none border-0 bg-transparent px-3 py-2.5 shadow-none focus-visible:border-0 focus-visible:ring-0 field-sizing-content ta-x" rows="2">v</textarea><div data-align="block-end" class="flex items-center w-full flex-row px-3 py-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs btn-x" disabled="" data-loading="true"><svg class="h-4 w-4 animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>Send</button></div></div>"`;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`SonnerToaster DOM > renders the toaster and a toast 1`] = `"<section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false" data-react-aria-top-layer="true"></section>"`;
|
|
4
4
|
|
|
5
|
-
exports[`SonnerToaster DOM > renders the toaster and a toast 2`] = `"<section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false" data-react-aria-top-layer="true"><ol dir="ltr" tabindex="-1" class="toaster group !font-sans" data-sonner-toaster="true" data-sonner-theme="light" data-y-position="top" data-x-position="right" style="--front-toast-height: 0px; --width: 356px; --gap: 12px; --offset-top: 24px; --offset-right: 24px; --offset-bottom: 24px; --offset-left: 24px; --mobile-offset-top: calc(16px + env(safe-area-inset-top, 0px)); --mobile-offset-right: 16px; --mobile-offset-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); --mobile-offset-left: 16px;"><li tabindex="0" class="group toast glass-panel-strong flex w-full items-center gap-3 rounded-lg px-4 py-3 text-sm text-foreground smooth-shadow-ring-md" data-sonner-toast="" data-styled="false" data-mounted="true" data-promise="false" data-swiped="false" data-removed="false" data-visible="true" data-y-position="top" data-x-position="right" data-index="0" data-front="true" data-swiping="false" data-dismissible="true" data-swipe-out="false" data-expanded="false" style="--index: 0; --toasts-before: 0; --z-index: 1; --offset: 0px; --initial-height: 0px;"><div data-content="" class="flex min-w-0 grow flex-col"><div data-title="" class="font-medium leading-snug">Saved</div><div data-description="" class="text-[13px] leading-snug text-muted-foreground">All changes stored</div></div></li></ol></section>"`;
|
|
5
|
+
exports[`SonnerToaster DOM > renders the toaster and a toast 2`] = `"<section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false" data-react-aria-top-layer="true"><ol dir="ltr" tabindex="-1" class="toaster group !font-sans" data-sonner-toaster="true" data-sonner-theme="light" data-y-position="top" data-x-position="right" style="--front-toast-height: 0px; --width: 356px; --gap: 12px; --offset-top: 24px; --offset-right: 24px; --offset-bottom: 24px; --offset-left: 24px; --mobile-offset-top: calc(16px + env(safe-area-inset-top, 0px)); --mobile-offset-right: 16px; --mobile-offset-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); --mobile-offset-left: 16px;"><li tabindex="0" class="group toast glass-panel-strong flex w-full items-center gap-3 rounded-lg px-4 py-3 text-sm text-foreground smooth-shadow-ring-md after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]" data-sonner-toast="" data-styled="false" data-mounted="true" data-promise="false" data-swiped="false" data-removed="false" data-visible="true" data-y-position="top" data-x-position="right" data-index="0" data-front="true" data-swiping="false" data-dismissible="true" data-swipe-out="false" data-expanded="false" style="--index: 0; --toasts-before: 0; --z-index: 1; --offset: 0px; --initial-height: 0px;"><div data-content="" class="flex min-w-0 grow flex-col"><div data-title="" class="font-medium leading-snug">Saved</div><div data-description="" class="text-[13px] leading-snug text-muted-foreground">All changes stored</div></div></li></ol></section>"`;
|
package/src/ui/avatar.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const Avatar = React.forwardRef<
|
|
|
11
11
|
<AvatarPrimitive.Root
|
|
12
12
|
ref={ref}
|
|
13
13
|
className={merge(
|
|
14
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-border bg-surface-secondary",
|
|
14
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-border bg-surface-secondary after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]",
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
package/src/ui/button.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const GLASS_RIM_ON_PRIMARY =
|
|
|
16
16
|
"shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)]";
|
|
17
17
|
|
|
18
18
|
const defaultVariantClass =
|
|
19
|
-
"bg-primary text-primary-foreground hover:opacity-90" + GLASS_RIM_ON_PRIMARY;
|
|
19
|
+
"bg-primary text-primary-foreground hover:opacity-90 " + GLASS_RIM_ON_PRIMARY;
|
|
20
20
|
const destructiveVariantClass =
|
|
21
21
|
"bg-[oklch(47.2%_0.195_25.7)] text-white hover:bg-[oklch(42.5%_0.185_25.7)] " + GLASS_RIM;
|
|
22
22
|
|
package/src/ui/calendar.tsx
CHANGED
|
@@ -148,7 +148,7 @@ function Calendar({
|
|
|
148
148
|
"not-group-data-selected/day:enabled:hover:bg-surface-tertiary/50",
|
|
149
149
|
"group-data-today/day:font-medium group-data-today/day:not-group-data-selected/day:text-foreground group-data-today/day:after:absolute group-data-today/day:after:bottom-1 group-data-today/day:after:left-1/2 group-data-today/day:after:size-1 group-data-today/day:after:-translate-x-1/2 group-data-today/day:after:rounded-full group-data-today/day:after:bg-current",
|
|
150
150
|
"group-data-outside/day:not-group-data-selected/day:text-muted-foreground",
|
|
151
|
-
"group-data-selected/day:bg-primary group-data-selected/day:text-primary-foreground",
|
|
151
|
+
"group-data-selected/day:bg-primary group-data-selected/day:text-primary-foreground group-data-selected/day:shadow-[inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),0_1px_2px_rgb(0_0_0/0.16)]",
|
|
152
152
|
defaultClassNames.day_button,
|
|
153
153
|
),
|
|
154
154
|
range_start: cn("rounded-l-lg", defaultClassNames.range_start),
|
package/src/ui/dialog.tsx
CHANGED
|
@@ -182,7 +182,7 @@ const DialogContent = React.forwardRef<
|
|
|
182
182
|
data-compact={compact ? "true" : undefined}
|
|
183
183
|
className={merge(
|
|
184
184
|
classes?.content ??
|
|
185
|
-
"glass-panel-strong z-50 flex w-full flex-col gap-4 p-6 text-overlay-foreground smooth-shadow-ring-xl",
|
|
185
|
+
"glass-panel-strong z-50 flex w-full flex-col gap-4 p-6 text-overlay-foreground smooth-shadow-ring-xl after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]",
|
|
186
186
|
compact
|
|
187
187
|
? classes?.compact ?? cn(
|
|
188
188
|
"overflow-y-auto fixed inset-x-0 top-auto w-full max-w-none rounded-t-2xl rounded-b-none pt-3",
|
package/src/ui/hover-card.tsx
CHANGED
|
@@ -47,7 +47,7 @@ const HoverCardContent = React.forwardRef<
|
|
|
47
47
|
sideOffset={sideOffset ?? config?.sideOffset ?? 4}
|
|
48
48
|
className={merge(
|
|
49
49
|
config?.classes?.content ?? [
|
|
50
|
-
"z-50 w-72 max-sm:max-w-[calc(100vw-2rem)] max-sm:max-h-[85dvh] max-sm:overflow-y-auto p-4 outline-none",
|
|
50
|
+
"z-50 w-72 max-sm:max-w-[calc(100vw-2rem)] max-sm:max-h-[85dvh] max-sm:overflow-y-auto p-4 outline-none relative after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]",
|
|
51
51
|
floatingSurfaceClass,
|
|
52
52
|
floatingSurfaceAnimateClass,
|
|
53
53
|
],
|
package/src/ui/kbd.tsx
CHANGED
|
@@ -3,8 +3,8 @@ import { cn } from "../utils/cn";
|
|
|
3
3
|
|
|
4
4
|
const kbdVariantClasses = {
|
|
5
5
|
default:
|
|
6
|
-
"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md bg-surface-secondary px-1.5 font-mono text-[10px] font-medium text-muted-foreground",
|
|
7
|
-
subtle: "rounded bg-surface-secondary px-1.5 py-0.5 text-foreground",
|
|
6
|
+
"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md bg-surface-secondary px-1.5 font-mono text-[10px] font-medium text-muted-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_1px_rgb(0_0_0/0.08)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_1px_rgb(0_0_0/0.3)]",
|
|
7
|
+
subtle: "rounded bg-surface-secondary px-1.5 py-0.5 text-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_1px_rgb(0_0_0/0.08)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.1),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_1px_rgb(0_0_0/0.3)]",
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export type KbdProps = React.HTMLAttributes<HTMLElement> & {
|
package/src/ui/sheet.tsx
CHANGED
|
@@ -71,13 +71,13 @@ const sheetSideSurfaceClass: Record<SheetSide, string> = {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
const sheetContentClass =
|
|
74
|
-
"fixed z-50 overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl outline-hidden backdrop-blur-xl motion-reduce:transition-none";
|
|
74
|
+
"fixed z-50 overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl outline-hidden backdrop-blur-xl motion-reduce:transition-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]";
|
|
75
75
|
|
|
76
76
|
const sheetBlurHostClass =
|
|
77
77
|
"fixed z-50 outline-hidden motion-reduce:transition-none after:hidden";
|
|
78
78
|
|
|
79
79
|
const sheetBlurSurfaceClass =
|
|
80
|
-
"flex min-h-0 flex-auto flex-col overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl backdrop-blur-xl";
|
|
80
|
+
"flex min-h-0 flex-auto flex-col overflow-y-auto bg-overlay/95 text-overlay-foreground smooth-shadow-ring-xl backdrop-blur-xl relative after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]";
|
|
81
81
|
|
|
82
82
|
function supportsMotionBlur(node: HTMLElement): boolean {
|
|
83
83
|
return (
|
|
@@ -38,7 +38,7 @@ export function SlideOverPanel({
|
|
|
38
38
|
exit={{ x: "100%" }}
|
|
39
39
|
transition={{ type: "spring", damping: 30, stiffness: 300 }}
|
|
40
40
|
className={cn(
|
|
41
|
-
`absolute top-0 right-0 bottom-0 ${width} z-20 glass-panel-strong smooth-shadow-ring-xl overflow-y-auto hidden md:flex flex-col`,
|
|
41
|
+
`absolute top-0 right-0 bottom-0 ${width} z-20 glass-panel-strong smooth-shadow-ring-xl after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)] overflow-y-auto hidden md:flex flex-col`,
|
|
42
42
|
className,
|
|
43
43
|
)}
|
|
44
44
|
>
|
package/src/ui/sonner.tsx
CHANGED
|
@@ -74,7 +74,7 @@ function createToasterClassNames({
|
|
|
74
74
|
const compact = density === "compact";
|
|
75
75
|
const descriptionSize = compact ? "text-xs" : "text-[13px]";
|
|
76
76
|
return {
|
|
77
|
-
toast: `group toast glass-panel-strong flex w-full items-center ${compact ? "gap-2" : "gap-3"} ${radius} ${compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm"} text-foreground smooth-shadow-ring-md${hideStackedContent ? ` ${hideStackedContentClassName}` : ""}`,
|
|
77
|
+
toast: `group toast glass-panel-strong flex w-full items-center ${compact ? "gap-2" : "gap-3"} ${radius} ${compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm"} text-foreground smooth-shadow-ring-md after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)]${hideStackedContent ? ` ${hideStackedContentClassName}` : ""}`,
|
|
78
78
|
content: "flex min-w-0 grow flex-col",
|
|
79
79
|
icon: "relative",
|
|
80
80
|
title: titleLeading === "5" ? "font-medium leading-5" : "font-medium leading-snug",
|
package/src/ui/tooltip.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const TooltipContent = React.forwardRef<
|
|
|
39
39
|
sideOffset={sideOffset ?? config?.sideOffset ?? 4}
|
|
40
40
|
className={merge(
|
|
41
41
|
config?.classes?.content ??
|
|
42
|
-
"z-50 max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg bg-overlay px-2.5 py-1.5 text-xs text-overlay-foreground smooth-shadow-ring-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popper-transform-origin)]",
|
|
42
|
+
"relative z-50 max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg bg-overlay px-2.5 py-1.5 text-xs text-overlay-foreground smooth-shadow-ring-md after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5)] dark:after:shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12)] animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popper-transform-origin)]",
|
|
43
43
|
className,
|
|
44
44
|
)}
|
|
45
45
|
{...props}
|
package/src/ui/ui-config.tsx
CHANGED
|
@@ -122,10 +122,23 @@ const UiConfigContext = React.createContext<UiConfig>({});
|
|
|
122
122
|
|
|
123
123
|
export interface UiConfigProviderProps {
|
|
124
124
|
config: UiConfig;
|
|
125
|
+
surface?: UiSurface;
|
|
125
126
|
children?: React.ReactNode;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
export type UiSurface = "glass" | "flat";
|
|
130
|
+
|
|
131
|
+
function UiConfigProvider({ config, surface, children }: UiConfigProviderProps) {
|
|
132
|
+
React.useLayoutEffect(() => {
|
|
133
|
+
if (!surface || typeof document === "undefined") return;
|
|
134
|
+
const root = document.documentElement;
|
|
135
|
+
const previous = root.getAttribute("data-surface");
|
|
136
|
+
root.setAttribute("data-surface", surface);
|
|
137
|
+
return () => {
|
|
138
|
+
if (previous === null) root.removeAttribute("data-surface");
|
|
139
|
+
else root.setAttribute("data-surface", previous);
|
|
140
|
+
};
|
|
141
|
+
}, [surface]);
|
|
129
142
|
return <UiConfigContext.Provider value={config}>{children}</UiConfigContext.Provider>;
|
|
130
143
|
}
|
|
131
144
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @vvedantb/ui/tokens/css/surface-flat.css: the flat surface style.
|
|
3
|
+
* UiConfigProvider sets data-surface on the root element. The default is
|
|
4
|
+
* glass. With data-surface="flat", the rules below remove the glass rim,
|
|
5
|
+
* highlight and drop shadow that components carry as utility classes.
|
|
6
|
+
* Rule 1 clears the highlight overlay (an ::after pseudo-element).
|
|
7
|
+
* Rule 2 clears elements that carry the highlight as their own box-shadow.
|
|
8
|
+
* The tab pill is plain CSS and has its own rule.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root[data-surface="flat"] [class*="after:shadow-[inset"]::after {
|
|
12
|
+
box-shadow: none !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:root[data-surface="flat"]
|
|
16
|
+
:is([class*="inset_1.5px_1.5px_1px"], [class*="inset_1px_1px_1px"]):not(
|
|
17
|
+
[class*="after:shadow-[inset"]
|
|
18
|
+
) {
|
|
19
|
+
box-shadow: none !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:root[data-surface="flat"] .t-tabs--segmented .t-tabs-pill {
|
|
23
|
+
background: var(--tabs-pill-bg) !important;
|
|
24
|
+
backdrop-filter: none !important;
|
|
25
|
+
box-shadow: none !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:root[data-surface="flat"] .t-tabs--segmented .t-tabs-pill::after {
|
|
29
|
+
display: none !important;
|
|
30
|
+
}
|