@vvedantb/ui 0.69.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 +72 -63
- 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 +15 -4
- package/src/ui/textarea.tsx +2 -1
- package/tokens/src/css/tabs-pills.css +41 -0
|
@@ -75,7 +75,7 @@ export function ComposerSlashMenu(t0) {
|
|
|
75
75
|
className: "scrollbar scroll-fade min-h-0 flex-1 overflow-y-auto overscroll-contain py-1",
|
|
76
76
|
children: groups.map(group_0 => /*#__PURE__*/_jsxs("div", {
|
|
77
77
|
children: [/*#__PURE__*/_jsx("div", {
|
|
78
|
-
className: "px-3 pb-1 pt-2 text-
|
|
78
|
+
className: "px-3 pb-1 pt-2 text-xs font-semibold text-muted-foreground",
|
|
79
79
|
children: group_0.group
|
|
80
80
|
}), group_0.items.map(item_0 => {
|
|
81
81
|
const index_0 = indexById.get(item_0.id);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export const fieldFocusClass = "focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring";
|
|
2
|
+
export const fieldGlassClass = "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)]";
|
|
2
3
|
export const fieldFocusWithinClass = "has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring";
|
|
@@ -8,6 +8,6 @@ export const menuContentClass = ["z-50 min-w-48 overflow-hidden p-1.5 outline-hi
|
|
|
8
8
|
export const menuSubTriggerClass = "flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-2 text-sm text-foreground outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-[state=open]:bg-default data-disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
9
9
|
export const menuItemClass = "relative flex cursor-pointer select-none items-center gap-2 rounded-menu-item px-2.5 py-2 text-sm outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:pointer-events-none";
|
|
10
10
|
export const menuCheckboxRadioItemClass = "relative flex cursor-pointer select-none items-center rounded-menu-item py-2 pl-8 pr-2.5 text-sm outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
11
|
-
export const menuLabelClass = "px-2.5 py-1
|
|
11
|
+
export const menuLabelClass = "px-2.5 py-1 text-xs font-semibold text-muted-foreground";
|
|
12
12
|
export const menuSeparatorClass = "-mx-1.5 my-1 h-px bg-separator";
|
|
13
13
|
export const menuShortcutClass = "ml-auto text-xs tracking-wide text-muted-foreground/90";
|
|
@@ -22,6 +22,6 @@ export const menuItemDestructiveClass = "text-danger focus:bg-danger/10 focus:te
|
|
|
22
22
|
/** Red text and a red wash on hover, for a quiet (ghost) icon button that deletes. */
|
|
23
23
|
export const destructiveGhostClass = "text-danger hover:bg-danger/10 hover:text-danger";
|
|
24
24
|
export const menuCheckboxRadioItemClass = "relative flex cursor-pointer select-none items-center rounded-menu-item py-1.5 max-sm:min-h-10 pl-8 pr-2.5 text-sm outline-none transition-[background-color,color] focus:bg-default focus:text-foreground data-[highlighted]:bg-default data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50";
|
|
25
|
-
export const menuLabelClass = "px-2.5 py-1
|
|
25
|
+
export const menuLabelClass = "px-2.5 py-1 text-xs font-semibold text-muted-foreground";
|
|
26
26
|
export const menuSeparatorClass = "-mx-1 my-1 h-px bg-separator";
|
|
27
27
|
export const menuShortcutClass = "ml-auto text-xs tracking-wide text-muted-foreground/90";
|
package/dist/src/ui/badge.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const badgeBaseClasses = "inline-flex items-center gap-1 rounded-full border border-transparent px-2.5 py-1 text-xs font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background";
|
|
5
|
+
const badgeBaseClasses = "inline-flex items-center gap-1 rounded-full border border-transparent px-2.5 py-1 text-xs 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";
|
|
6
6
|
const badgeVariantClasses = {
|
|
7
7
|
default: "border-border bg-default text-foreground",
|
|
8
8
|
secondary: "border-separator bg-default text-default-foreground",
|
package/dist/src/ui/button.js
CHANGED
|
@@ -7,8 +7,10 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
7
7
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const ghostClass = "text-muted-foreground hover:bg-surface-tertiary hover:text-foreground";
|
|
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
|
-
const
|
|
11
|
-
const
|
|
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
|
+
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;
|
|
13
|
+
const destructiveVariantClass = "bg-[oklch(47.2%_0.195_25.7)] text-white hover:bg-[oklch(42.5%_0.185_25.7)] " + GLASS_RIM;
|
|
12
14
|
const buttonVariantClasses = {
|
|
13
15
|
default: defaultVariantClass,
|
|
14
16
|
primary: defaultVariantClass,
|
|
@@ -21,8 +23,8 @@ const buttonVariantClasses = {
|
|
|
21
23
|
link: "text-primary underline-offset-4 hover:underline active:scale-100",
|
|
22
24
|
flat: `${ghostClass} bg-transparent text-muted hover:bg-surface-tertiary hover:text-foreground`,
|
|
23
25
|
// check-tokens-allow: text-muted
|
|
24
|
-
success: `${ghostClass} bg-success text-success-foreground hover:bg-success/90`,
|
|
25
|
-
warning: `${ghostClass} bg-warning text-warning-foreground hover:bg-warning/90`
|
|
26
|
+
success: `${ghostClass} bg-success text-success-foreground hover:bg-success/90 ${GLASS_RIM}`,
|
|
27
|
+
warning: `${ghostClass} bg-warning text-warning-foreground hover:bg-warning/90 ${GLASS_RIM}`
|
|
26
28
|
};
|
|
27
29
|
const buttonSizeClasses = {
|
|
28
30
|
default: "h-10 px-4 py-2",
|
package/dist/src/ui/card.js
CHANGED
|
@@ -34,7 +34,7 @@ const Card = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
34
34
|
className = $[1];
|
|
35
35
|
props = $[2];
|
|
36
36
|
}
|
|
37
|
-
const t1 = useCardClass("root", "rounded-lg bg-surface-card text-surface-foreground", className);
|
|
37
|
+
const t1 = useCardClass("root", "rounded-lg bg-surface-card text-surface-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.06),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_2px_rgb(0_0_0/0.06)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_2px_rgb(0_0_0/0.3)]", className);
|
|
38
38
|
let t2;
|
|
39
39
|
if ($[3] !== props || $[4] !== ref || $[5] !== t1) {
|
|
40
40
|
t2 = /*#__PURE__*/_jsx("div", {
|
package/dist/src/ui/checkbox.js
CHANGED
|
@@ -29,7 +29,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
29
29
|
}
|
|
30
30
|
const config = useUiConfig("Checkbox");
|
|
31
31
|
const merge = useCn();
|
|
32
|
-
const t1 = config?.classes?.root ?? "peer relative h-
|
|
32
|
+
const t1 = config?.classes?.root ?? "peer relative h-5 w-5 shrink-0 rounded-[6px] border border-border bg-field-background transition-[transform,background-color,border-color,box-shadow] duration-200 ease-smooth motion-reduce:transition-none active:scale-90 data-[state=checked]:shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1px_1px_1px_-0.5px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1px_-1px_1px_-0.5px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground before:absolute before:inset-[-12px] before:content-['']";
|
|
33
33
|
let t2;
|
|
34
34
|
if ($[4] !== className || $[5] !== merge || $[6] !== t1) {
|
|
35
35
|
t2 = merge(t1, className);
|
|
@@ -51,7 +51,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
51
51
|
let t4;
|
|
52
52
|
if ($[10] !== config?.icon || $[11] !== icon) {
|
|
53
53
|
t4 = icon ?? config?.icon ?? /*#__PURE__*/_jsx(IconCheck, {
|
|
54
|
-
className: "h-
|
|
54
|
+
className: "h-4 w-4"
|
|
55
55
|
});
|
|
56
56
|
$[10] = config?.icon;
|
|
57
57
|
$[11] = icon;
|
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { IconX } from "@tabler/icons-react";
|
|
4
4
|
import { assignRef } from "../utils/ref.js";
|
|
5
|
-
import { fieldFocusClass } from "./_field-classes.js";
|
|
5
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes.js";
|
|
6
6
|
import { runClearInputDissolve } from "./clearInputDissolve.js";
|
|
7
7
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
8
8
|
|
|
@@ -186,7 +186,7 @@ const PlainClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
186
186
|
}
|
|
187
187
|
let t8;
|
|
188
188
|
if ($[19] !== classes?.input) {
|
|
189
|
-
t8 = classes?.input ?? [inputClasses, fieldFocusClass];
|
|
189
|
+
t8 = classes?.input ?? [inputClasses, fieldGlassClass, fieldFocusClass];
|
|
190
190
|
$[19] = classes?.input;
|
|
191
191
|
$[20] = t8;
|
|
192
192
|
} else {
|
|
@@ -453,7 +453,7 @@ const DissolveClearInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
453
453
|
value: value,
|
|
454
454
|
onChange: t21,
|
|
455
455
|
placeholder: placeholder,
|
|
456
|
-
className: merge(classes?.input ?? [inputClasses, fieldFocusClass], fieldClassName),
|
|
456
|
+
className: merge(classes?.input ?? [inputClasses, fieldGlassClass, fieldFocusClass], fieldClassName),
|
|
457
457
|
...props
|
|
458
458
|
});
|
|
459
459
|
t11 = "t-clear-clip";
|
package/dist/src/ui/command.js
CHANGED
|
@@ -53,10 +53,10 @@ const Command = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
53
53
|
return t3;
|
|
54
54
|
});
|
|
55
55
|
Command.displayName = CommandPrimitive.displayName;
|
|
56
|
-
const commandDialogPinnedClass = "[&_[cmdk-list]]:h-80 [&_[cmdk-list]]:max-h-[60dvh] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
56
|
+
const commandDialogPinnedClass = "[&_[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";
|
|
57
57
|
const commandDialogInstantClass = "[--modal-open-dur:0ms] [--modal-close-dur:1ms] [--modal-scale:1] [--modal-scale-close:1]";
|
|
58
58
|
const commandOverlayInstantClass = "[animation:none!important]";
|
|
59
|
-
const commandDialogAutoClass = "[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
59
|
+
const commandDialogAutoClass = "[&_[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
|
|
60
60
|
|
|
61
61
|
function CommandDialog(t0) {
|
|
62
62
|
const $ = _c(26);
|
|
@@ -350,7 +350,7 @@ const CommandGroup = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
350
350
|
}
|
|
351
351
|
const group = useUiConfig("Command")?.classes?.group;
|
|
352
352
|
const merge = useCn();
|
|
353
|
-
const t1 = group ?? "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1
|
|
353
|
+
const t1 = group ?? "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";
|
|
354
354
|
let t2;
|
|
355
355
|
if ($[3] !== className || $[4] !== merge || $[5] !== t1) {
|
|
356
356
|
t2 = merge(t1, className);
|
package/dist/src/ui/input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { fieldFocusClass } from "./_field-classes.js";
|
|
3
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes.js";
|
|
4
4
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
5
5
|
|
|
6
6
|
/** `UiConfig.Input`: `classes.base` replaces the built-in field classes. */
|
|
@@ -29,7 +29,7 @@ const Input = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
29
29
|
const merge = useCn();
|
|
30
30
|
let t1;
|
|
31
31
|
if ($[4] !== base) {
|
|
32
|
-
t1 = base ?? ["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", fieldFocusClass];
|
|
32
|
+
t1 = base ?? ["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", fieldGlassClass, fieldFocusClass];
|
|
33
33
|
$[4] = base;
|
|
34
34
|
$[5] = t1;
|
|
35
35
|
} else {
|
package/dist/src/ui/popover.js
CHANGED
|
@@ -108,7 +108,7 @@ const PopoverContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
108
108
|
const t3 = collisionPadding ?? config?.collisionPadding ?? 8;
|
|
109
109
|
let t4;
|
|
110
110
|
if ($[7] !== config?.classes?.content) {
|
|
111
|
-
t4 = 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, triggerZoomAnimateClass];
|
|
111
|
+
t4 = 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, "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)]", triggerZoomAnimateClass];
|
|
112
112
|
$[7] = config?.classes?.content;
|
|
113
113
|
$[8] = t4;
|
|
114
114
|
} else {
|
package/dist/src/ui/progress.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
|
4
4
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const Progress = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
7
|
-
const $ = _c(
|
|
7
|
+
const $ = _c(19);
|
|
8
8
|
let className;
|
|
9
9
|
let props;
|
|
10
10
|
let value;
|
|
@@ -25,7 +25,7 @@ const Progress = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
25
25
|
}
|
|
26
26
|
const classes = useUiConfig("Progress")?.classes;
|
|
27
27
|
const merge = useCn();
|
|
28
|
-
const t1 = classes?.root ?? "relative h-
|
|
28
|
+
const t1 = 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)]";
|
|
29
29
|
let t2;
|
|
30
30
|
if ($[4] !== className || $[5] !== merge || $[6] !== t1) {
|
|
31
31
|
t2 = merge(t1, className);
|
|
@@ -36,47 +36,50 @@ const Progress = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
36
36
|
} else {
|
|
37
37
|
t2 = $[7];
|
|
38
38
|
}
|
|
39
|
-
const t3 = classes?.indicator ?? "h-full w-full flex-1 rounded-full bg-primary transition-transform duration-200 ease-smooth";
|
|
39
|
+
const t3 = classes?.indicator ?? "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";
|
|
40
40
|
const t4 = `translateX(-${100 - (value ?? 0)}%)`;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const t5 = value ? "visible" : "hidden";
|
|
42
|
+
let t6;
|
|
43
|
+
if ($[8] !== t4 || $[9] !== t5) {
|
|
44
|
+
t6 = {
|
|
45
|
+
transform: t4,
|
|
46
|
+
visibility: t5
|
|
45
47
|
};
|
|
46
48
|
$[8] = t4;
|
|
47
49
|
$[9] = t5;
|
|
50
|
+
$[10] = t6;
|
|
48
51
|
} else {
|
|
49
|
-
|
|
52
|
+
t6 = $[10];
|
|
50
53
|
}
|
|
51
|
-
let
|
|
52
|
-
if ($[
|
|
53
|
-
|
|
54
|
+
let t7;
|
|
55
|
+
if ($[11] !== t3 || $[12] !== t6) {
|
|
56
|
+
t7 = /*#__PURE__*/_jsx(ProgressPrimitive.Indicator, {
|
|
54
57
|
className: t3,
|
|
55
|
-
style:
|
|
58
|
+
style: t6
|
|
56
59
|
});
|
|
57
|
-
$[
|
|
58
|
-
$[11] = t5;
|
|
60
|
+
$[11] = t3;
|
|
59
61
|
$[12] = t6;
|
|
62
|
+
$[13] = t7;
|
|
60
63
|
} else {
|
|
61
|
-
|
|
64
|
+
t7 = $[13];
|
|
62
65
|
}
|
|
63
|
-
let
|
|
64
|
-
if ($[
|
|
65
|
-
|
|
66
|
+
let t8;
|
|
67
|
+
if ($[14] !== props || $[15] !== ref || $[16] !== t2 || $[17] !== t7) {
|
|
68
|
+
t8 = /*#__PURE__*/_jsx(ProgressPrimitive.Root, {
|
|
66
69
|
ref: ref,
|
|
67
70
|
className: t2,
|
|
68
71
|
...props,
|
|
69
|
-
children:
|
|
72
|
+
children: t7
|
|
70
73
|
});
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[16] = t6;
|
|
74
|
+
$[14] = props;
|
|
75
|
+
$[15] = ref;
|
|
76
|
+
$[16] = t2;
|
|
75
77
|
$[17] = t7;
|
|
78
|
+
$[18] = t8;
|
|
76
79
|
} else {
|
|
77
|
-
|
|
80
|
+
t8 = $[18];
|
|
78
81
|
}
|
|
79
|
-
return
|
|
82
|
+
return t8;
|
|
80
83
|
});
|
|
81
84
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
82
85
|
export { Progress };
|
|
@@ -261,7 +261,7 @@ function SelectLabel(t0) {
|
|
|
261
261
|
}
|
|
262
262
|
let t1;
|
|
263
263
|
if ($[3] !== className) {
|
|
264
|
-
t1 = cn("text-muted-foreground px-2.5 py-1
|
|
264
|
+
t1 = cn("text-muted-foreground px-2.5 py-1 text-xs font-semibold", className);
|
|
265
265
|
$[3] = className;
|
|
266
266
|
$[4] = t1;
|
|
267
267
|
} else {
|
|
@@ -154,7 +154,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
154
154
|
const t17 = config?.iconSize ?? 16;
|
|
155
155
|
let t18;
|
|
156
156
|
if ($[29] !== cn || $[30] !== config?.classes?.icon || $[31] !== size) {
|
|
157
|
-
t18 = config?.classes?.icon ?? cn("pointer-events-none absolute top-1/2 -translate-y-1/2 shrink-0 text-muted-foreground", sizeClasses[size].icon);
|
|
157
|
+
t18 = config?.classes?.icon ?? cn("pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 shrink-0 text-muted-foreground", sizeClasses[size].icon);
|
|
158
158
|
$[29] = cn;
|
|
159
159
|
$[30] = config?.classes?.icon;
|
|
160
160
|
$[31] = size;
|
|
@@ -177,7 +177,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
177
177
|
let t20;
|
|
178
178
|
if ($[36] !== shortcut || $[37] !== showShortcut) {
|
|
179
179
|
t20 = showShortcut ? /*#__PURE__*/_jsx(Kbd, {
|
|
180
|
-
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
180
|
+
className: "absolute right-2 top-1/2 z-10 -translate-y-1/2",
|
|
181
181
|
children: shortcut
|
|
182
182
|
}) : null;
|
|
183
183
|
$[36] = shortcut;
|
package/dist/src/ui/select.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
4
|
import { IconCheck, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
5
5
|
import { cn } from "../utils/cn.js";
|
|
6
|
-
import { fieldFocusClass } from "./_field-classes.js";
|
|
6
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes.js";
|
|
7
7
|
import { floatingSurfaceAnimateClass, menuSurfaceClass } from "./_menu-classes.js";
|
|
8
8
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
9
9
|
|
|
@@ -37,7 +37,7 @@ const SelectTrigger = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
37
37
|
const t1 = config?.triggerSlot ?? true ? "select-trigger" : undefined;
|
|
38
38
|
let t2;
|
|
39
39
|
if ($[4] !== config?.classes?.trigger) {
|
|
40
|
-
t2 = config?.classes?.trigger ?? ["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", fieldFocusClass];
|
|
40
|
+
t2 = config?.classes?.trigger ?? ["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", fieldGlassClass, fieldFocusClass];
|
|
41
41
|
$[4] = config?.classes?.trigger;
|
|
42
42
|
$[5] = t2;
|
|
43
43
|
} else {
|
|
@@ -345,7 +345,7 @@ const SelectLabel = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
345
345
|
}
|
|
346
346
|
const label = useUiConfig("Select")?.classes?.label;
|
|
347
347
|
const merge = useCn();
|
|
348
|
-
const t1 = label ?? "px-2.5 py-1
|
|
348
|
+
const t1 = label ?? "px-2.5 py-1 text-xs font-semibold text-muted-foreground";
|
|
349
349
|
let t2;
|
|
350
350
|
if ($[3] !== className || $[4] !== merge || $[5] !== t1) {
|
|
351
351
|
t2 = merge(t1, className);
|
package/dist/src/ui/slider.js
CHANGED
|
@@ -5,6 +5,7 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
5
5
|
|
|
6
6
|
/** `UiConfig.Slider`: `classes` replace the built-in part classes; the `*ClassName` props still merge after. */
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const THUMB_DRAG = "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";
|
|
8
9
|
const Slider = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
9
10
|
const $ = _c(29);
|
|
10
11
|
const {
|
|
@@ -20,7 +21,8 @@ const Slider = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
20
21
|
children,
|
|
21
22
|
...props
|
|
22
23
|
} = t0;
|
|
23
|
-
const
|
|
24
|
+
const config = useUiConfig("Slider");
|
|
25
|
+
const classes = config?.classes;
|
|
24
26
|
const cn = useCn();
|
|
25
27
|
const count = (props.value ?? props.defaultValue ?? [props.min ?? 0]).length;
|
|
26
28
|
const [dragging, setDragging] = React.useState(false);
|
|
@@ -125,7 +127,7 @@ const Slider = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
125
127
|
"aria-valuetext": i === 0 ? ariaValueText : undefined,
|
|
126
128
|
"data-dragging": dragging && (count === 1 || activeIndex === i) ? "" : undefined,
|
|
127
129
|
onFocus: () => setActiveIndex(i),
|
|
128
|
-
className: cn(classes?.thumb ?? "block h-5 w-8 shrink-0 rounded-full border border-border bg-background shadow-sm [transition-property:
|
|
130
|
+
className: cn(classes?.thumb ?? "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 " + THUMB_DRAG, thumbClassName)
|
|
129
131
|
}, i));
|
|
130
132
|
let t14;
|
|
131
133
|
if ($[21] !== props || $[22] !== ref || $[23] !== t12 || $[24] !== t13 || $[25] !== t3.Root || $[26] !== t5 || $[27] !== t6) {
|