@vvedantb/ui 0.70.0 → 0.75.3
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/composer/input-area/ComposerSlashMenu.js +1 -1
- package/dist/src/ui/_field-classes.js +1 -0
- package/dist/src/ui/_menu-classes.alt.js +1 -1
- package/dist/src/ui/_menu-classes.js +1 -1
- package/dist/src/ui/badge.js +1 -1
- package/dist/src/ui/button.js +6 -4
- package/dist/src/ui/card.js +1 -1
- package/dist/src/ui/checkbox.js +2 -2
- package/dist/src/ui/clear-input.js +3 -3
- package/dist/src/ui/command.js +3 -3
- package/dist/src/ui/input.js +2 -2
- package/dist/src/ui/popover.js +1 -1
- package/dist/src/ui/progress.js +28 -25
- package/dist/src/ui/radix-select.js +1 -1
- package/dist/src/ui/search-input.js +2 -2
- package/dist/src/ui/select.js +3 -3
- package/dist/src/ui/slider.js +4 -2
- package/dist/src/ui/switch.js +71 -62
- package/dist/src/ui/textarea.js +2 -2
- package/dist/tokens/src/css/tabs-pills.css +41 -0
- package/package.json +1 -1
- package/src/ai-elements/__snapshots__/queue.test.tsx.snap +4 -4
- package/src/composer/input-area/ComposerSlashMenu.tsx +1 -1
- package/src/ui/__snapshots__/alt-wrappers.test.tsx.snap +1 -1
- package/src/ui/_field-classes.ts +3 -0
- package/src/ui/_menu-classes.alt.ts +1 -1
- package/src/ui/_menu-classes.ts +1 -1
- package/src/ui/badge.tsx +1 -1
- package/src/ui/button.tsx +9 -4
- package/src/ui/card.tsx +1 -1
- package/src/ui/checkbox.tsx +2 -2
- package/src/ui/clear-input.tsx +3 -3
- package/src/ui/command.tsx +3 -3
- package/src/ui/input.tsx +2 -1
- package/src/ui/popover.tsx +1 -0
- package/src/ui/progress.tsx +3 -3
- package/src/ui/radix-select.tsx +1 -1
- package/src/ui/search-input.tsx +2 -2
- package/src/ui/select.tsx +3 -2
- package/src/ui/slider.tsx +7 -2
- package/src/ui/switch.tsx +14 -3
- package/src/ui/textarea.tsx +2 -1
- package/tokens/src/css/tabs-pills.css +41 -0
package/src/ui/clear-input.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { IconX } from "@tabler/icons-react";
|
|
3
3
|
import { assignRef } from "../utils/ref";
|
|
4
|
-
import { fieldFocusClass } from "./_field-classes";
|
|
4
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes";
|
|
5
5
|
import { runClearInputDissolve } from "./clearInputDissolve";
|
|
6
6
|
import { useCn, useUiConfig } from "./ui-config";
|
|
7
7
|
|
|
@@ -96,7 +96,7 @@ const PlainClearInput = React.forwardRef<
|
|
|
96
96
|
}}
|
|
97
97
|
placeholder=""
|
|
98
98
|
className={merge(
|
|
99
|
-
classes?.input ?? [inputClasses, fieldFocusClass],
|
|
99
|
+
classes?.input ?? [inputClasses, fieldGlassClass, fieldFocusClass],
|
|
100
100
|
(always || filled) && "pr-9",
|
|
101
101
|
className,
|
|
102
102
|
)}
|
|
@@ -232,7 +232,7 @@ const DissolveClearInput = React.forwardRef<HTMLInputElement, ClearInputPartsPro
|
|
|
232
232
|
}}
|
|
233
233
|
placeholder={placeholder}
|
|
234
234
|
className={merge(
|
|
235
|
-
classes?.input ?? [inputClasses, fieldFocusClass],
|
|
235
|
+
classes?.input ?? [inputClasses, fieldGlassClass, fieldFocusClass],
|
|
236
236
|
fieldClassName,
|
|
237
237
|
)}
|
|
238
238
|
{...props}
|
package/src/ui/command.tsx
CHANGED
|
@@ -52,7 +52,7 @@ const Command = React.forwardRef<
|
|
|
52
52
|
Command.displayName = CommandPrimitive.displayName;
|
|
53
53
|
|
|
54
54
|
const commandDialogPinnedClass =
|
|
55
|
-
"[&_[cmdk-list]]:h-80 [&_[cmdk-list]]:max-h-[60dvh] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
55
|
+
"[&_[cmdk-list]]:h-80 [&_[cmdk-list]]:max-h-[60dvh] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]]:rounded-menu-item [&_[cmdk-item]]:px-2.5 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4";
|
|
56
56
|
|
|
57
57
|
const commandDialogInstantClass =
|
|
58
58
|
"[--modal-open-dur:0ms] [--modal-close-dur:1ms] [--modal-scale:1] [--modal-scale-close:1]";
|
|
@@ -60,7 +60,7 @@ const commandDialogInstantClass =
|
|
|
60
60
|
const commandOverlayInstantClass = "[animation:none!important]";
|
|
61
61
|
|
|
62
62
|
const commandDialogAutoClass =
|
|
63
|
-
"[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
63
|
+
"[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-1.5 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4"; // check-tokens-allow: text-muted
|
|
64
64
|
|
|
65
65
|
interface CommandDialogProps extends React.ComponentProps<typeof Dialog> {
|
|
66
66
|
title?: string;
|
|
@@ -187,7 +187,7 @@ const CommandGroup = React.forwardRef<
|
|
|
187
187
|
ref={ref}
|
|
188
188
|
className={merge(
|
|
189
189
|
group ??
|
|
190
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
190
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
191
191
|
className,
|
|
192
192
|
)}
|
|
193
193
|
{...props}
|
package/src/ui/input.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { fieldFocusClass } from "./_field-classes";
|
|
2
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes";
|
|
3
3
|
import { useCn, useUiConfig } from "./ui-config";
|
|
4
4
|
|
|
5
5
|
/** `UiConfig.Input`: `classes.base` replaces the built-in field classes. */
|
|
@@ -17,6 +17,7 @@ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
|
17
17
|
className={merge(
|
|
18
18
|
base ?? [
|
|
19
19
|
"flex h-10 w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2 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",
|
|
20
|
+
fieldGlassClass,
|
|
20
21
|
fieldFocusClass,
|
|
21
22
|
],
|
|
22
23
|
className,
|
package/src/ui/popover.tsx
CHANGED
|
@@ -50,6 +50,7 @@ const PopoverContent = React.forwardRef<
|
|
|
50
50
|
config?.classes?.content ?? [
|
|
51
51
|
"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",
|
|
52
52
|
floatingSurfaceClass,
|
|
53
|
+
"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)]",
|
|
53
54
|
triggerZoomAnimateClass,
|
|
54
55
|
],
|
|
55
56
|
fitViewport &&
|
package/src/ui/progress.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const Progress = React.forwardRef<
|
|
|
16
16
|
<ProgressPrimitive.Root
|
|
17
17
|
ref={ref}
|
|
18
18
|
className={merge(
|
|
19
|
-
classes?.root ?? "relative h-
|
|
19
|
+
classes?.root ?? "relative h-3.5 w-full overflow-hidden rounded-full bg-default/85 p-0.5 shadow-[inset_0_1px_2px_rgb(0_0_0/0.1)]",
|
|
20
20
|
className,
|
|
21
21
|
)}
|
|
22
22
|
{...props}
|
|
@@ -24,9 +24,9 @@ const Progress = React.forwardRef<
|
|
|
24
24
|
<ProgressPrimitive.Indicator
|
|
25
25
|
className={
|
|
26
26
|
classes?.indicator ??
|
|
27
|
-
"h-full w-full flex-1 rounded-full bg-primary transition-transform duration-200 ease-smooth"
|
|
27
|
+
"relative h-full w-full flex-1 rounded-full bg-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)] transition-transform duration-200 ease-smooth motion-reduce:transition-none after:absolute after:inset-x-2.5 after:top-[2px] after:h-[3px] after:rounded-full after:bg-primary-foreground/30"
|
|
28
28
|
}
|
|
29
|
-
style={{ transform: `translateX(-${100 - (value ?? 0)}%)
|
|
29
|
+
style={{ transform: `translateX(-${100 - (value ?? 0)}%)`, visibility: value ? "visible" : "hidden" }}
|
|
30
30
|
/>
|
|
31
31
|
</ProgressPrimitive.Root>
|
|
32
32
|
);
|
package/src/ui/radix-select.tsx
CHANGED
|
@@ -102,7 +102,7 @@ function SelectLabel({
|
|
|
102
102
|
<SelectPrimitive.Label
|
|
103
103
|
data-slot="select-label"
|
|
104
104
|
className={cn(
|
|
105
|
-
"text-muted-foreground px-2.5 py-1
|
|
105
|
+
"text-muted-foreground px-2.5 py-1 text-xs font-semibold",
|
|
106
106
|
className,
|
|
107
107
|
)}
|
|
108
108
|
{...props}
|
package/src/ui/search-input.tsx
CHANGED
|
@@ -106,13 +106,13 @@ const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(
|
|
|
106
106
|
className={
|
|
107
107
|
config?.classes?.icon ??
|
|
108
108
|
cn(
|
|
109
|
-
"pointer-events-none absolute top-1/2 -translate-y-1/2 shrink-0 text-muted-foreground",
|
|
109
|
+
"pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 shrink-0 text-muted-foreground",
|
|
110
110
|
sizeClasses[size].icon,
|
|
111
111
|
)
|
|
112
112
|
}
|
|
113
113
|
/>
|
|
114
114
|
{showShortcut ? (
|
|
115
|
-
<Kbd className="absolute right-2 top-1/2 -translate-y-1/2">{shortcut}</Kbd>
|
|
115
|
+
<Kbd className="absolute right-2 top-1/2 z-10 -translate-y-1/2">{shortcut}</Kbd>
|
|
116
116
|
) : null}
|
|
117
117
|
</>
|
|
118
118
|
}
|
package/src/ui/select.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
3
|
import { IconCheck, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
4
4
|
import { cn } from "../utils/cn";
|
|
5
|
-
import { fieldFocusClass } from "./_field-classes";
|
|
5
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes";
|
|
6
6
|
import {
|
|
7
7
|
floatingSurfaceAnimateClass,
|
|
8
8
|
menuSurfaceClass,
|
|
@@ -48,6 +48,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
48
48
|
className={merge(
|
|
49
49
|
config?.classes?.trigger ?? [
|
|
50
50
|
"flex h-10 w-full max-sm:min-w-0 items-center justify-between whitespace-nowrap rounded-field border border-border bg-field-background px-3.5 py-2 text-base sm:pointer-fine:text-sm ring-offset-background placeholder:text-field-placeholder transition-[border-color,box-shadow,background-color] duration-200 ease-smooth disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
51
|
+
fieldGlassClass,
|
|
51
52
|
fieldFocusClass,
|
|
52
53
|
],
|
|
53
54
|
className,
|
|
@@ -162,7 +163,7 @@ const SelectLabel = React.forwardRef<
|
|
|
162
163
|
ref={ref}
|
|
163
164
|
className={merge(
|
|
164
165
|
label ??
|
|
165
|
-
"px-2.5 py-1
|
|
166
|
+
"px-2.5 py-1 text-xs font-semibold text-muted-foreground",
|
|
166
167
|
className,
|
|
167
168
|
)}
|
|
168
169
|
{...props}
|
package/src/ui/slider.tsx
CHANGED
|
@@ -7,6 +7,9 @@ export interface SliderConfig {
|
|
|
7
7
|
classes?: { root?: string; track?: string; range?: string; thumb?: string };
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
const THUMB_DRAG =
|
|
11
|
+
"data-[dragging]:border-transparent data-[dragging]:bg-[rgb(0_0_0/0.076)] data-[dragging]:backdrop-blur-[0.8px] data-[dragging]:backdrop-saturate-[1.24] data-[dragging]:shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.9),inset_0_0_0_1.75px_rgb(0_0_0/0.1),inset_1.5px_1.5px_1px_-1px_white,inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.6),0_6px_14px_rgb(0_0_0/0.18),0_1px_2px_rgb(0_0_0/0.22)] dark:data-[dragging]:border-transparent dark:data-[dragging]:bg-[rgb(255_255_255/0.08)] dark:data-[dragging]: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.5),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.2),0_6px_14px_rgb(0_0_0/0.4)] dark:after:bg-white/15 after:absolute after:inset-x-2 after:top-0.5 after:h-1 after:rounded-full after:bg-white/40 after:opacity-0 data-[dragging]:after:opacity-100";
|
|
12
|
+
|
|
10
13
|
type SliderProps = React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> & {
|
|
11
14
|
thumbLabels?: string[];
|
|
12
15
|
trackClassName?: string;
|
|
@@ -31,7 +34,8 @@ const Slider = React.forwardRef<React.ComponentRef<typeof SliderPrimitive.Root>,
|
|
|
31
34
|
},
|
|
32
35
|
ref,
|
|
33
36
|
) => {
|
|
34
|
-
const
|
|
37
|
+
const config = useUiConfig("Slider");
|
|
38
|
+
const classes = config?.classes;
|
|
35
39
|
const cn = useCn();
|
|
36
40
|
const count = (props.value ?? props.defaultValue ?? [props.min ?? 0]).length;
|
|
37
41
|
const [dragging, setDragging] = React.useState(false);
|
|
@@ -89,7 +93,8 @@ const Slider = React.forwardRef<React.ComponentRef<typeof SliderPrimitive.Root>,
|
|
|
89
93
|
onFocus={() => setActiveIndex(i)}
|
|
90
94
|
className={cn(
|
|
91
95
|
classes?.thumb ??
|
|
92
|
-
"block h-5 w-8 shrink-0 rounded-full border border-border bg-background shadow-sm [transition-property:
|
|
96
|
+
"relative block h-5 w-8 shrink-0 rounded-full border border-border bg-background shadow-sm [transition-property:width,height,background-color,border-color,box-shadow,backdrop-filter] duration-200 ease-smooth motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring data-[disabled]:cursor-not-allowed data-[orientation=vertical]:h-8 data-[orientation=vertical]:w-5 data-[dragging]:h-7 data-[dragging]:w-[46px] data-[dragging]:data-[orientation=vertical]:h-[46px] data-[dragging]:data-[orientation=vertical]:w-7 dark:border-muted dark:bg-foreground " + // check-tokens-allow: muted
|
|
97
|
+
THUMB_DRAG,
|
|
93
98
|
thumbClassName,
|
|
94
99
|
)}
|
|
95
100
|
/>
|
package/src/ui/switch.tsx
CHANGED
|
@@ -11,11 +11,20 @@ export interface SwitchConfig {
|
|
|
11
11
|
const PRESSED_THUMB_PX = 34;
|
|
12
12
|
const DRAG_THRESHOLD_PX = 3;
|
|
13
13
|
|
|
14
|
+
const THUMB_BASE =
|
|
15
|
+
"pointer-events-none relative block h-4 w-4 rounded-full bg-background shadow-sm ring-0 [transition-property:transform,translate,width,height,background-color,box-shadow,backdrop-filter] duration-200 ease-smooth motion-reduce:transition-none data-[state=checked]:translate-x-[30px] data-[state=checked]:bg-primary-foreground data-[state=unchecked]:translate-x-0 dark:data-[state=unchecked]:bg-foreground group-disabled:group-active:h-4 group-disabled:group-active:w-4 group-disabled:group-active:data-[state=checked]:translate-x-[30px] data-[dragging]:translate-x-(--switch-x)! data-[dragging]:[transition-property:width,height,background-color,box-shadow,backdrop-filter]";
|
|
16
|
+
|
|
17
|
+
const THUMB_CLEAR =
|
|
18
|
+
"group-active:h-7 group-active:w-[34px] group-active:data-[state=checked]:translate-x-3 group-active:bg-[rgb(255_255_255/0.12)] group-active:backdrop-blur-[1.8px] group-active:backdrop-saturate-[1.24] group-active:shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.7),inset_1.5px_1.5px_1px_-1px_white,inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.6),0_6px_14px_rgb(0_0_0/0.14),0_1px_2px_rgb(0_0_0/0.18)] group-active:data-[state=checked]:bg-[rgb(255_255_255/0.12)] group-active:data-[state=unchecked]:bg-[rgb(0_0_0/0.096)] dark:data-[state=unchecked]:group-active:bg-[rgb(255_255_255/0.14)] group-active:data-[state=unchecked]:shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.9),inset_0_0_0_1.75px_rgb(0_0_0/0.1),inset_1.5px_1.5px_1px_-1px_white,inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.6),0_6px_14px_rgb(0_0_0/0.18),0_1px_2px_rgb(0_0_0/0.22)] after:absolute after:inset-x-2 after:top-0.5 after:h-1 after:rounded-full after:bg-white/40 after:opacity-0 group-active:after:opacity-100";
|
|
19
|
+
|
|
20
|
+
|
|
14
21
|
const Switch = React.forwardRef<
|
|
15
22
|
React.ComponentRef<typeof SwitchPrimitive.Root>,
|
|
16
23
|
React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>
|
|
17
|
-
>(({ className, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onClick, ...props }, ref) => {
|
|
18
|
-
const
|
|
24
|
+
>(({ className, style, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onClick, ...props }, ref) => {
|
|
25
|
+
const config = useUiConfig("Switch");
|
|
26
|
+
const classes = config?.classes;
|
|
27
|
+
|
|
19
28
|
const merge = useCn();
|
|
20
29
|
const [dragX, setDragX] = React.useState<number | null>(null);
|
|
21
30
|
const drag = React.useRef({ startClientX: 0, startX: 0, active: false, moved: false });
|
|
@@ -50,6 +59,7 @@ const Switch = React.forwardRef<
|
|
|
50
59
|
className,
|
|
51
60
|
)}
|
|
52
61
|
{...props}
|
|
62
|
+
style={style}
|
|
53
63
|
ref={ref}
|
|
54
64
|
onClick={(event) => {
|
|
55
65
|
onClick?.(event);
|
|
@@ -97,7 +107,8 @@ const Switch = React.forwardRef<
|
|
|
97
107
|
className={
|
|
98
108
|
classes?.thumb ??
|
|
99
109
|
cn(
|
|
100
|
-
|
|
110
|
+
THUMB_BASE,
|
|
111
|
+
THUMB_CLEAR,
|
|
101
112
|
)
|
|
102
113
|
}
|
|
103
114
|
/>
|
package/src/ui/textarea.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { fieldFocusClass } from "./_field-classes";
|
|
2
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes";
|
|
3
3
|
import { useCn, useUiConfig } from "./ui-config";
|
|
4
4
|
|
|
5
5
|
/** `UiConfig.Textarea`: `classes.base` replaces the built-in field classes. */
|
|
@@ -18,6 +18,7 @@ const Textarea = React.forwardRef<
|
|
|
18
18
|
className={merge(
|
|
19
19
|
base ?? [
|
|
20
20
|
"flex min-h-20 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",
|
|
21
|
+
fieldGlassClass,
|
|
21
22
|
fieldFocusClass,
|
|
22
23
|
],
|
|
23
24
|
className,
|
|
@@ -37,6 +37,47 @@
|
|
|
37
37
|
border-radius: 48px;
|
|
38
38
|
background: var(--tabs-bar-bg);
|
|
39
39
|
}
|
|
40
|
+
/* The sliding pill is a thin frosted glass lens: translucent fill, rim, top-left highlight, streak. */
|
|
41
|
+
.t-tabs--segmented .t-tabs-pill {
|
|
42
|
+
background: color-mix(in srgb, var(--tabs-pill-bg) 55%, transparent);
|
|
43
|
+
backdrop-filter: blur(0.8px) saturate(1.24);
|
|
44
|
+
box-shadow:
|
|
45
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.9),
|
|
46
|
+
inset 0 0 0 1.75px rgb(0 0 0 / 0.06),
|
|
47
|
+
inset 1.5px 1.5px 1px -1px white,
|
|
48
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.6),
|
|
49
|
+
0 3px 8px rgb(0 0 0 / 0.12),
|
|
50
|
+
0 1px 2px rgb(0 0 0 / 0.14);
|
|
51
|
+
}
|
|
52
|
+
.t-tabs--segmented .t-tabs-pill::after {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 2px 10px auto;
|
|
56
|
+
height: 4px;
|
|
57
|
+
border-radius: 48px;
|
|
58
|
+
background: rgb(255 255 255 / 0.4);
|
|
59
|
+
}
|
|
60
|
+
.dark .t-tabs--segmented .t-tabs-pill,
|
|
61
|
+
[data-theme="dark"] .t-tabs--segmented .t-tabs-pill {
|
|
62
|
+
background: rgb(255 255 255 / 0.16);
|
|
63
|
+
box-shadow:
|
|
64
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.1),
|
|
65
|
+
inset 1.5px 1.5px 1px -1px rgb(255 255 255 / 0.45),
|
|
66
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.15),
|
|
67
|
+
0 3px 8px rgb(0 0 0 / 0.35);
|
|
68
|
+
}
|
|
69
|
+
.dark .t-tabs--segmented .t-tabs-pill::after,
|
|
70
|
+
[data-theme="dark"] .t-tabs--segmented .t-tabs-pill::after {
|
|
71
|
+
background: rgb(255 255 255 / 0.12);
|
|
72
|
+
}
|
|
73
|
+
.dark.neutral .t-tabs--segmented .t-tabs-pill {
|
|
74
|
+
background: rgb(255 255 255 / 0.14);
|
|
75
|
+
box-shadow:
|
|
76
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.1),
|
|
77
|
+
inset 1.5px 1.5px 1px -1px rgb(255 255 255 / 0.4),
|
|
78
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.12),
|
|
79
|
+
0 3px 8px rgb(0 0 0 / 0.22);
|
|
80
|
+
}
|
|
40
81
|
/* Isolated pills. Each tab owns its outline; the selected tab is filled. */
|
|
41
82
|
.t-tabs--pills {
|
|
42
83
|
gap: 6px;
|