@arcfusionz/arc-primitive-ui 0.3.12 → 0.3.14
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/components/AILoader/AILoader.js +59 -52
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Calendar/Calendar.js +2 -2
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Combobox/Combobox.js +7 -7
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/Input/Input.js +3 -3
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Stepper/Stepper.js +2 -2
- package/dist/components/Switch/Switch.js +3 -3
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/package.json +1 -1
- package/src/styles/theme.css +65 -34
|
@@ -28,14 +28,16 @@ const textSizeClasses = {
|
|
|
28
28
|
};
|
|
29
29
|
const textClasses = "inline-block whitespace-nowrap font-sans leading-none text-muted-foreground";
|
|
30
30
|
const textShimmerClasses = "bg-[linear-gradient(90deg,transparent_38%,var(--color-secondary)_50%,transparent_62%),linear-gradient(var(--color-muted-foreground),var(--color-muted-foreground))] bg-[length:250%_100%,100%_100%] bg-clip-text [background-repeat:no-repeat,no-repeat] motion-safe:animate-ai-loader-text-shimmer motion-safe:text-transparent motion-safe:[&_*]:!text-inherit motion-safe:will-change-[background-position]";
|
|
31
|
-
const
|
|
31
|
+
const processingRotationMotionClasses = "motion-safe:animate-ai-loader-processing-spin motion-safe:will-change-transform";
|
|
32
32
|
const processingPulseMotionClasses = "motion-safe:animate-ai-loader-processing-pulse motion-safe:will-change-transform";
|
|
33
33
|
const coreMotionClasses = "motion-safe:animate-ai-loader-core motion-safe:will-change-transform";
|
|
34
34
|
const facetMotionClasses = "motion-safe:animate-ai-loader-facet motion-safe:will-change-transform";
|
|
35
35
|
const firstSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:will-change-transform";
|
|
36
|
-
const quarterSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:[animation-delay:0.6s] motion-safe:will-change-transform";
|
|
37
36
|
const secondSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:[animation-delay:1.2s] motion-safe:will-change-transform";
|
|
38
|
-
const
|
|
37
|
+
const firstProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:will-change-transform";
|
|
38
|
+
const quarterProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:0.6s] motion-safe:will-change-transform";
|
|
39
|
+
const secondProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:1.2s] motion-safe:will-change-transform";
|
|
40
|
+
const threeQuarterProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:1.8s] motion-safe:will-change-transform";
|
|
39
41
|
const processingSatelliteMotionClasses = "motion-safe:animate-ai-loader-processing-satellite motion-safe:will-change-opacity";
|
|
40
42
|
const AILoader = forwardRef(({ state = "default", size = "md", tone = "brand", text, label, render, className, ...rest }, ref) => {
|
|
41
43
|
const gradientId = `ai-loader-${useId().replaceAll(":", "")}`;
|
|
@@ -85,59 +87,64 @@ const AILoader = forwardRef(({ state = "default", size = "md", tone = "brand", t
|
|
|
85
87
|
stopColor: endColor
|
|
86
88
|
})
|
|
87
89
|
]
|
|
88
|
-
}) }), /* @__PURE__ */ jsxs("g", {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */ jsx("path", {
|
|
90
|
+
}) }), /* @__PURE__ */ jsxs("g", { children: [
|
|
91
|
+
!processing && /* @__PURE__ */ jsx("g", {
|
|
92
|
+
className: cn("origin-center rotate-45 scale-75 opacity-15 [transform-box:fill-box]", facetMotionClasses),
|
|
93
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
94
|
+
fill: `url(#${gradientId})`,
|
|
95
|
+
d: SPARKLE_PATH
|
|
96
|
+
})
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("g", {
|
|
99
|
+
className: cn("origin-center [transform-box:view-box]", processing && processingRotationMotionClasses),
|
|
100
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
99
101
|
fill: `url(#${gradientId})`,
|
|
100
102
|
d: SPARKLE_PATH,
|
|
101
103
|
className: cn("origin-center opacity-95 [transform-box:fill-box]", processing ? processingPulseMotionClasses : coreMotionClasses)
|
|
102
|
-
}),
|
|
103
|
-
/* @__PURE__ */ jsx("g", {
|
|
104
|
-
transform: "translate(19 4.75)",
|
|
105
|
-
className: processing ? processingSatelliteMotionClasses : void 0,
|
|
106
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
107
|
-
fill: `url(#${gradientId})`,
|
|
108
|
-
className: cn("origin-center opacity-45 [transform-box:fill-box]", firstSparkMotionClasses),
|
|
109
|
-
d: LARGE_SATELLITE_PATH
|
|
110
|
-
})
|
|
111
|
-
}),
|
|
112
|
-
processing && /* @__PURE__ */ jsx("g", {
|
|
113
|
-
transform: "translate(19 19.25)",
|
|
114
|
-
className: processingSatelliteMotionClasses,
|
|
115
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
116
|
-
fill: `url(#${gradientId})`,
|
|
117
|
-
className: cn("origin-center opacity-45 [transform-box:fill-box]", quarterSparkMotionClasses),
|
|
118
|
-
d: SMALL_SATELLITE_PATH
|
|
119
|
-
})
|
|
120
|
-
}),
|
|
121
|
-
/* @__PURE__ */ jsx("g", {
|
|
122
|
-
transform: processing ? "translate(5 19.25)" : "translate(5 18.25)",
|
|
123
|
-
className: processing ? processingSatelliteMotionClasses : void 0,
|
|
124
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
125
|
-
fill: `url(#${gradientId})`,
|
|
126
|
-
className: cn("origin-center opacity-45 [transform-box:fill-box]", secondSparkMotionClasses),
|
|
127
|
-
d: processing ? LARGE_SATELLITE_PATH : SMALL_SATELLITE_PATH
|
|
128
|
-
})
|
|
129
|
-
}),
|
|
130
|
-
processing && /* @__PURE__ */ jsx("g", {
|
|
131
|
-
transform: "translate(5 4.75)",
|
|
132
|
-
className: processingSatelliteMotionClasses,
|
|
133
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
134
|
-
fill: `url(#${gradientId})`,
|
|
135
|
-
className: cn("origin-center opacity-45 [transform-box:fill-box]", threeQuarterSparkMotionClasses),
|
|
136
|
-
d: SMALL_SATELLITE_PATH
|
|
137
|
-
})
|
|
138
104
|
})
|
|
139
|
-
|
|
140
|
-
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsxs("g", {
|
|
107
|
+
className: cn("origin-center [transform-box:view-box]", processing && processingRotationMotionClasses),
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsx("g", {
|
|
110
|
+
transform: "translate(19 4.75)",
|
|
111
|
+
className: processing ? processingSatelliteMotionClasses : void 0,
|
|
112
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
113
|
+
fill: `url(#${gradientId})`,
|
|
114
|
+
className: cn("origin-center opacity-45 [transform-box:fill-box]", processing ? firstProcessingSparkMotionClasses : firstSparkMotionClasses),
|
|
115
|
+
d: LARGE_SATELLITE_PATH
|
|
116
|
+
})
|
|
117
|
+
}),
|
|
118
|
+
processing && /* @__PURE__ */ jsx("g", {
|
|
119
|
+
transform: "translate(19 19.25)",
|
|
120
|
+
className: processingSatelliteMotionClasses,
|
|
121
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
122
|
+
fill: `url(#${gradientId})`,
|
|
123
|
+
className: cn("origin-center opacity-45 [transform-box:fill-box]", secondProcessingSparkMotionClasses),
|
|
124
|
+
d: SMALL_SATELLITE_PATH
|
|
125
|
+
})
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ jsx("g", {
|
|
128
|
+
transform: processing ? "translate(5 19.25)" : "translate(5 18.25)",
|
|
129
|
+
className: processing ? processingSatelliteMotionClasses : void 0,
|
|
130
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
131
|
+
fill: `url(#${gradientId})`,
|
|
132
|
+
className: cn("origin-center opacity-45 [transform-box:fill-box]", processing ? quarterProcessingSparkMotionClasses : secondSparkMotionClasses),
|
|
133
|
+
d: processing ? LARGE_SATELLITE_PATH : SMALL_SATELLITE_PATH
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
processing && /* @__PURE__ */ jsx("g", {
|
|
137
|
+
transform: "translate(5 4.75)",
|
|
138
|
+
className: processingSatelliteMotionClasses,
|
|
139
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
140
|
+
fill: `url(#${gradientId})`,
|
|
141
|
+
className: cn("origin-center opacity-45 [transform-box:fill-box]", threeQuarterProcessingSparkMotionClasses),
|
|
142
|
+
d: SMALL_SATELLITE_PATH
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
})
|
|
147
|
+
] })]
|
|
141
148
|
}),
|
|
142
149
|
hasText && /* @__PURE__ */ jsx("span", {
|
|
143
150
|
className: cn(textClasses, textSizeClasses[size], processing && textShimmerClasses),
|
|
@@ -18,7 +18,7 @@ const itemVariantClasses = {
|
|
|
18
18
|
contained: "border-b border-border last:border-b-0",
|
|
19
19
|
separated: "overflow-hidden rounded-md border border-border"
|
|
20
20
|
};
|
|
21
|
-
const triggerBaseClasses = "group flex w-full cursor-pointer items-center gap-3 text-start font-sans font-medium text-foreground transition-colors duration-150 select-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:
|
|
21
|
+
const triggerBaseClasses = "group flex w-full cursor-pointer items-center gap-3 text-start font-sans font-medium text-foreground transition-colors duration-150 select-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
22
22
|
const triggerVariantClasses = {
|
|
23
23
|
divided: "px-0 hover:underline underline-offset-4",
|
|
24
24
|
contained: "hover:bg-muted active:bg-slate-200",
|
|
@@ -46,7 +46,7 @@ const dotOnlyFillClasses = {
|
|
|
46
46
|
warning: "bg-warning",
|
|
47
47
|
destructive: "bg-destructive"
|
|
48
48
|
};
|
|
49
|
-
const deleteButtonClasses = "relative -mr-1 inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-current opacity-70 transition-colors duration-150 before:absolute before:-inset-1 hover:bg-current/10 hover:opacity-100 active:bg-current/20 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
49
|
+
const deleteButtonClasses = "relative -mr-1 inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-current opacity-70 transition-colors duration-150 before:absolute before:-inset-1 hover:bg-current/10 hover:opacity-100 active:bg-current/20 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
50
50
|
function DeleteIcon() {
|
|
51
51
|
return /* @__PURE__ */ jsx("svg", {
|
|
52
52
|
viewBox: "0 0 24 24",
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useRef } from "react";
|
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Button } from "@base-ui/react/button";
|
|
5
5
|
//#region src/components/Button/Button.tsx
|
|
6
|
-
const baseClasses = "relative inline-flex items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium transition-colors duration-150 cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:
|
|
6
|
+
const baseClasses = "relative inline-flex items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium transition-colors duration-150 cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
7
7
|
const variantClasses = {
|
|
8
8
|
primary: "bg-primary text-primary-foreground hover:bg-primary-700 active:bg-primary-800",
|
|
9
9
|
secondary: "border border-primary-200 bg-primary-50 text-secondary-foreground hover:bg-primary-100 active:bg-primary-200",
|
|
@@ -76,8 +76,8 @@ function useControlled(controlled, initial) {
|
|
|
76
76
|
const [internal, setInternal] = useState(initial);
|
|
77
77
|
return [controlled !== void 0 ? controlled : internal, setInternal];
|
|
78
78
|
}
|
|
79
|
-
const dayButtonClasses = "relative inline-flex size-9 cursor-pointer select-none items-center justify-center rounded-full font-sans text-sm text-foreground duration-150 hover:bg-muted active:bg-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
80
|
-
const navButtonClasses = "inline-flex size-9 cursor-pointer items-center justify-center rounded-md text-foreground transition-colors duration-150 hover:bg-muted active:bg-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
79
|
+
const dayButtonClasses = "relative inline-flex size-9 cursor-pointer select-none items-center justify-center rounded-full font-sans text-sm text-foreground duration-150 hover:bg-muted active:bg-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-today:border data-today:border-primary-500 data-outside:text-muted-foreground data-hidden:invisible data-unavailable:cursor-default data-unavailable:text-muted-foreground data-unavailable:line-through data-unavailable:hover:bg-transparent data-unavailable:active:bg-transparent data-selected:bg-primary data-selected:text-primary-foreground data-selected:hover:bg-primary-700 data-selected:active:bg-primary-800 data-range-middle:rounded-none data-range-middle:bg-primary-100 data-range-middle:text-foreground data-range-middle:data-today:rounded-full data-range-middle:hover:bg-primary-200 data-range-middle:active:bg-primary-200";
|
|
80
|
+
const navButtonClasses = "inline-flex size-9 cursor-pointer items-center justify-center rounded-md text-foreground transition-colors duration-150 hover:bg-muted active:bg-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
81
81
|
const captionClasses = "font-sans text-sm font-semibold text-foreground";
|
|
82
82
|
const weekdayClasses = "size-9 p-0 text-center align-middle font-sans text-xs font-medium text-muted-foreground";
|
|
83
83
|
function ChevronLeftIcon(props) {
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
5
5
|
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
6
6
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
7
|
-
const boxClasses = "inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-md border border-border bg-background text-primary-foreground transition-colors duration-150 hover:border-slate-300 data-checked:border-primary data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 hover:data-indeterminate:border-primary-700 hover:data-indeterminate:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:
|
|
7
|
+
const boxClasses = "inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-md border border-border bg-background text-primary-foreground transition-colors duration-150 hover:border-slate-300 data-checked:border-primary data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 hover:data-indeterminate:border-primary-700 hover:data-indeterminate:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
8
8
|
const boxSizeClasses = {
|
|
9
9
|
sm: "size-4 [&_svg]:size-3",
|
|
10
10
|
md: "size-5 [&_svg]:size-3.5",
|
|
@@ -92,9 +92,9 @@ const Checkbox$1 = forwardRef(({ size = "md", label, description, required, clas
|
|
|
92
92
|
});
|
|
93
93
|
if (!hasText) return control;
|
|
94
94
|
return /* @__PURE__ */ jsxs("span", {
|
|
95
|
-
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:
|
|
95
|
+
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:cursor-not-allowed has-data-disabled:opacity-50"),
|
|
96
96
|
children: [hasLabel ? /* @__PURE__ */ jsxs("label", {
|
|
97
|
-
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-readonly:cursor-default"),
|
|
97
|
+
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-disabled:cursor-not-allowed", "has-data-readonly:cursor-default"),
|
|
98
98
|
children: [control, /* @__PURE__ */ jsxs("span", {
|
|
99
99
|
className: cn("font-medium text-foreground select-none", labelTextClasses[size]),
|
|
100
100
|
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
@@ -89,8 +89,8 @@ const ComboboxLabel = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ *
|
|
|
89
89
|
...rest
|
|
90
90
|
}));
|
|
91
91
|
ComboboxLabel.displayName = "ComboboxLabel";
|
|
92
|
-
const fieldButtonClasses = "flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors duration-150 hover:bg-primary-50 hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
93
|
-
const inputGroupBaseClasses = "flex w-full min-w-0 flex-wrap items-center cursor-text rounded-md border border-border bg-background font-sans text-foreground transition-colors duration-150 hover:border-slate-300 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring data-invalid:border-destructive data-invalid:hover:border-destructive data-invalid:has-[input:focus-visible]:outline-destructive has-aria-invalid:border-destructive has-aria-invalid:hover:border-destructive has-aria-invalid:has-[input:focus-visible]:outline-destructive data-readonly:cursor-default data-readonly:bg-surface data-disabled:
|
|
92
|
+
const fieldButtonClasses = "flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors duration-150 hover:bg-primary-50 hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
93
|
+
const inputGroupBaseClasses = "flex w-full min-w-0 flex-wrap items-center cursor-text rounded-md border border-border bg-background font-sans text-foreground transition-colors duration-150 hover:border-slate-300 has-[input:focus-visible]:outline-2 has-[input:focus-visible]:outline-offset-2 has-[input:focus-visible]:outline-ring data-invalid:border-destructive data-invalid:hover:border-destructive data-invalid:has-[input:focus-visible]:outline-destructive has-aria-invalid:border-destructive has-aria-invalid:hover:border-destructive has-aria-invalid:has-[input:focus-visible]:outline-destructive data-readonly:cursor-default data-readonly:bg-surface data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
94
94
|
const inputGroupSizeClasses = {
|
|
95
95
|
sm: "min-h-8 gap-x-1.5 gap-y-1 px-2.5 py-1 text-sm any-pointer-coarse:text-base",
|
|
96
96
|
md: "min-h-10 gap-x-2 gap-y-1 px-3 py-1 text-sm any-pointer-coarse:text-base",
|
|
@@ -138,8 +138,8 @@ const ComboboxInputGroup = forwardRef(({ size = "md", showTrigger = true, showCl
|
|
|
138
138
|
})
|
|
139
139
|
}));
|
|
140
140
|
ComboboxInputGroup.displayName = "ComboboxInputGroup";
|
|
141
|
-
const bareInputClasses = "h-6 min-w-16 flex-1 appearance-none rounded-none border-0 bg-transparent p-0 font-sans text-inherit placeholder:text-muted-foreground outline-none disabled:
|
|
142
|
-
const popupInputClasses = "h-10 w-full shrink-0 appearance-none rounded-none border-0 border-b border-border bg-transparent px-3 font-sans text-sm any-pointer-coarse:text-base text-foreground placeholder:text-muted-foreground outline-none disabled:
|
|
141
|
+
const bareInputClasses = "h-6 min-w-16 flex-1 appearance-none rounded-none border-0 bg-transparent p-0 font-sans text-inherit placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed";
|
|
142
|
+
const popupInputClasses = "h-10 w-full shrink-0 appearance-none rounded-none border-0 border-b border-border bg-transparent px-3 font-sans text-sm any-pointer-coarse:text-base text-foreground placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed";
|
|
143
143
|
/**
|
|
144
144
|
* The text input that filters the list. Context-aware: bare inside a
|
|
145
145
|
* `ComboboxInputGroup` (the group owns the frame), a pinned search row
|
|
@@ -287,7 +287,7 @@ const ComboboxPopup = forwardRef(({ align = "center", sideOffset = 4, alignOffse
|
|
|
287
287
|
})
|
|
288
288
|
}));
|
|
289
289
|
ComboboxPopup.displayName = "ComboboxPopup";
|
|
290
|
-
const itemClasses = "relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 font-sans text-sm text-foreground outline-none select-none scroll-my-1 data-highlighted:bg-primary-50 data-disabled:
|
|
290
|
+
const itemClasses = "relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 font-sans text-sm text-foreground outline-none select-none scroll-my-1 data-highlighted:bg-primary-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
291
291
|
/**
|
|
292
292
|
* One option in the popup. Children render as the option's label; a check
|
|
293
293
|
* mark appears at the item's right edge while selected. Filtering matches
|
|
@@ -348,7 +348,7 @@ const ComboboxChips = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ *
|
|
|
348
348
|
...rest
|
|
349
349
|
}));
|
|
350
350
|
ComboboxChips.displayName = "ComboboxChips";
|
|
351
|
-
const chipClasses = "flex h-6 min-w-0 cursor-default select-none items-center gap-1 rounded-md bg-muted ps-2 pe-1 font-sans text-sm text-slate-700 data-highlighted:bg-primary-100 focus-within:bg-primary-100 data-disabled:
|
|
351
|
+
const chipClasses = "flex h-6 min-w-0 cursor-default select-none items-center gap-1 rounded-md bg-muted ps-2 pe-1 font-sans text-sm text-slate-700 data-highlighted:bg-primary-100 focus-within:bg-primary-100 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
352
352
|
/**
|
|
353
353
|
* One selected value in a `multiple` combobox. ArrowLeft from the input
|
|
354
354
|
* walks the chips and Backspace removes the last one; give each chip an
|
|
@@ -361,7 +361,7 @@ const ComboboxChip = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */
|
|
|
361
361
|
...rest
|
|
362
362
|
}));
|
|
363
363
|
ComboboxChip.displayName = "ComboboxChip";
|
|
364
|
-
const chipRemoveClasses = "relative inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-current opacity-70 transition-colors duration-150 before:absolute before:-inset-1 hover:bg-current/10 hover:opacity-100 active:bg-current/20 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
364
|
+
const chipRemoveClasses = "relative inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-current opacity-70 transition-colors duration-150 before:absolute before:-inset-1 hover:bg-current/10 hover:opacity-100 active:bg-current/20 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
365
365
|
/**
|
|
366
366
|
* Removes its chip's value from the selection. Icon-only, so an accessible
|
|
367
367
|
* name is required — include the value it removes, e.g.
|
|
@@ -4,7 +4,7 @@ import { Popover, PopoverPopup, PopoverTrigger } from "../Popover/Popover.js";
|
|
|
4
4
|
import { forwardRef, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
7
|
-
const triggerBaseClasses = "inline-flex w-64 cursor-pointer items-center justify-start gap-2 rounded-md whitespace-nowrap select-none font-sans text-primary transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-empty:text-muted-foreground data-readonly:cursor-default data-invalid:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive disabled:
|
|
7
|
+
const triggerBaseClasses = "inline-flex w-64 cursor-pointer items-center justify-start gap-2 rounded-md whitespace-nowrap select-none font-sans text-primary transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-empty:text-muted-foreground data-readonly:cursor-default data-invalid:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
8
8
|
const triggerVariantClasses = {
|
|
9
9
|
outline: "border border-border bg-background hover:bg-primary-50 data-popup-open:bg-primary-50",
|
|
10
10
|
ghost: "border border-transparent bg-transparent hover:bg-primary-50 data-popup-open:bg-primary-50"
|
|
@@ -268,7 +268,7 @@ const FileUpload = forwardRef(({ accept, multiple = false, maxFiles, maxSize, mi
|
|
|
268
268
|
});
|
|
269
269
|
});
|
|
270
270
|
FileUpload.displayName = "FileUpload";
|
|
271
|
-
const dropzoneClasses = "relative flex w-full flex-col items-center justify-center rounded-md border-2 border-dashed border-border bg-transparent cursor-pointer transition-colors duration-150 hover:border-slate-300 hover:bg-surface has-[:focus-visible]:border-primary has-[:focus-visible]:bg-primary-50 data-dragging:border-primary data-dragging:bg-primary-50 data-invalid:border-destructive data-at-max:cursor-default data-at-max:hover:border-border data-at-max:hover:bg-transparent data-disabled:cursor-
|
|
271
|
+
const dropzoneClasses = "relative flex w-full flex-col items-center justify-center rounded-md border-2 border-dashed border-border bg-transparent cursor-pointer transition-colors duration-150 hover:border-slate-300 hover:bg-surface has-[:focus-visible]:border-primary has-[:focus-visible]:bg-primary-50 data-dragging:border-primary data-dragging:bg-primary-50 data-invalid:border-destructive data-at-max:cursor-default data-at-max:hover:border-border data-at-max:hover:bg-transparent data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:border-border data-disabled:hover:bg-transparent";
|
|
272
272
|
const dropzoneCompactClasses = "flex-row items-center gap-3 px-4 py-3 text-start";
|
|
273
273
|
/**
|
|
274
274
|
* Class list for an element styled as the dashed drop area — for building a
|
|
@@ -4,7 +4,7 @@ import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Input } from "@base-ui/react/input";
|
|
6
6
|
//#region src/components/Input/Input.tsx
|
|
7
|
-
const inputBaseClasses = "block w-full min-w-0 appearance-none rounded-md border border-border bg-background font-sans text-foreground placeholder:text-muted-foreground transition-colors duration-150 hover:border-slate-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-invalid:border-destructive data-invalid:hover:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:hover:border-destructive aria-invalid:focus-visible:outline-destructive [&[readonly]]:bg-surface disabled:
|
|
7
|
+
const inputBaseClasses = "block w-full min-w-0 appearance-none rounded-md border border-border bg-background font-sans text-foreground placeholder:text-muted-foreground transition-colors duration-150 hover:border-slate-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-invalid:border-destructive data-invalid:hover:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:hover:border-destructive aria-invalid:focus-visible:outline-destructive [&[readonly]]:bg-surface disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 file:me-3 file:h-full file:cursor-pointer disabled:file:cursor-not-allowed file:border-0 file:bg-transparent file:font-sans file:text-sm file:font-medium file:text-foreground";
|
|
8
8
|
const inputSizeClasses = {
|
|
9
9
|
sm: "h-8 px-2.5 text-sm any-pointer-coarse:text-base",
|
|
10
10
|
md: "h-10 px-3 text-sm any-pointer-coarse:text-base",
|
|
@@ -19,7 +19,7 @@ const inputSizeClasses = {
|
|
|
19
19
|
function inputVariants({ size = "md", className } = {}) {
|
|
20
20
|
return cn(inputBaseClasses, inputSizeClasses[size], className);
|
|
21
21
|
}
|
|
22
|
-
const bareInputClasses = "h-full w-full min-w-0 flex-1 appearance-none rounded-none border-0 bg-transparent p-0 font-sans text-inherit placeholder:text-muted-foreground outline-none disabled:
|
|
22
|
+
const bareInputClasses = "h-full w-full min-w-0 flex-1 appearance-none rounded-none border-0 bg-transparent p-0 font-sans text-inherit placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed file:me-3 file:h-full file:cursor-pointer disabled:file:cursor-not-allowed file:border-0 file:bg-transparent file:font-sans file:text-sm file:font-medium file:text-foreground";
|
|
23
23
|
function composeRefs(...refs) {
|
|
24
24
|
return (node) => {
|
|
25
25
|
for (const ref of refs) if (typeof ref === "function") ref(node);
|
|
@@ -71,7 +71,7 @@ const Input$1 = forwardRef(({ size = "md", htmlSize, invalid, type, name, value,
|
|
|
71
71
|
});
|
|
72
72
|
Input$1.displayName = "Input";
|
|
73
73
|
const InputGroupContext = createContext(null);
|
|
74
|
-
const groupBaseClasses = "flex w-full min-w-0 items-center rounded-md border border-border bg-background font-sans text-foreground transition-colors duration-150 hover:border-slate-300 focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring has-data-invalid:border-destructive has-data-invalid:hover:border-destructive has-data-invalid:focus-within:outline-destructive has-aria-invalid:border-destructive has-aria-invalid:hover:border-destructive has-aria-invalid:focus-within:outline-destructive has-[input[readonly]]:bg-surface has-[input:disabled]:
|
|
74
|
+
const groupBaseClasses = "flex w-full min-w-0 items-center rounded-md border border-border bg-background font-sans text-foreground transition-colors duration-150 hover:border-slate-300 focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-ring has-data-invalid:border-destructive has-data-invalid:hover:border-destructive has-data-invalid:focus-within:outline-destructive has-aria-invalid:border-destructive has-aria-invalid:hover:border-destructive has-aria-invalid:focus-within:outline-destructive has-[input[readonly]]:bg-surface has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50 [&:has(input:disabled)_*]:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
75
75
|
const groupSizeClasses = {
|
|
76
76
|
sm: "h-8 gap-1.5 px-2.5 text-sm any-pointer-coarse:text-base",
|
|
77
77
|
md: "h-10 gap-2 px-3 text-sm any-pointer-coarse:text-base",
|
|
@@ -125,7 +125,7 @@ const MenuPopup = forwardRef(({ side, align, sideOffset = side === void 0 ? adap
|
|
|
125
125
|
})
|
|
126
126
|
}));
|
|
127
127
|
MenuPopup.displayName = "MenuPopup";
|
|
128
|
-
const itemBaseClasses = "relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 font-sans text-sm outline-none select-none scroll-my-1 data-disabled:
|
|
128
|
+
const itemBaseClasses = "relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 font-sans text-sm outline-none select-none scroll-my-1 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
129
129
|
const itemVariantClasses = {
|
|
130
130
|
default: "text-foreground data-highlighted:bg-primary-50 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
131
131
|
destructive: "text-error-700 data-highlighted:bg-error-50"
|
|
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { Radio } from "@base-ui/react/radio";
|
|
5
5
|
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
6
6
|
//#region src/components/Radio/Radio.tsx
|
|
7
|
-
const circleClasses = "inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-full border border-border bg-background text-primary-foreground transition-colors duration-150 hover:border-slate-300 data-checked:border-primary data-checked:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:
|
|
7
|
+
const circleClasses = "inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-full border border-border bg-background text-primary-foreground transition-colors duration-150 hover:border-slate-300 data-checked:border-primary data-checked:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
8
8
|
const circleSizeClasses = {
|
|
9
9
|
sm: "size-4",
|
|
10
10
|
md: "size-5",
|
|
@@ -58,9 +58,9 @@ const Radio$1 = forwardRef(({ size = "md", label, description, className, "aria-
|
|
|
58
58
|
});
|
|
59
59
|
if (!hasText) return control;
|
|
60
60
|
return /* @__PURE__ */ jsxs("span", {
|
|
61
|
-
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:
|
|
61
|
+
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:cursor-not-allowed has-data-disabled:opacity-50"),
|
|
62
62
|
children: [hasLabel ? /* @__PURE__ */ jsxs("label", {
|
|
63
|
-
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-readonly:cursor-default"),
|
|
63
|
+
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-disabled:cursor-not-allowed", "has-data-readonly:cursor-default"),
|
|
64
64
|
children: [control, /* @__PURE__ */ jsx("span", {
|
|
65
65
|
className: cn("font-medium text-foreground select-none", labelTextClasses[size]),
|
|
66
66
|
children: label
|
|
@@ -64,7 +64,7 @@ const SelectLabel = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */
|
|
|
64
64
|
...rest
|
|
65
65
|
}));
|
|
66
66
|
SelectLabel.displayName = "SelectLabel";
|
|
67
|
-
const triggerBaseClasses = "inline-flex cursor-pointer items-center justify-between gap-2 rounded-md whitespace-nowrap select-none font-sans text-foreground transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-readonly:cursor-default data-invalid:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive disabled:
|
|
67
|
+
const triggerBaseClasses = "inline-flex cursor-pointer items-center justify-between gap-2 rounded-md whitespace-nowrap select-none font-sans text-foreground transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-readonly:cursor-default data-invalid:border-destructive data-invalid:focus-visible:outline-destructive aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
68
68
|
const triggerVariantClasses = {
|
|
69
69
|
outline: "border border-border bg-background hover:bg-primary-50 data-popup-open:bg-primary-50",
|
|
70
70
|
ghost: "border border-transparent bg-transparent hover:bg-primary-50 data-popup-open:bg-primary-50"
|
|
@@ -194,7 +194,7 @@ const SelectPopup = forwardRef(({ align = "center", sideOffset = 4, alignOffset
|
|
|
194
194
|
})
|
|
195
195
|
}));
|
|
196
196
|
SelectPopup.displayName = "SelectPopup";
|
|
197
|
-
const itemClasses = "relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 font-sans text-sm text-foreground outline-none select-none scroll-my-1 data-highlighted:bg-primary-50 data-disabled:
|
|
197
|
+
const itemClasses = "relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 font-sans text-sm text-foreground outline-none select-none scroll-my-1 data-highlighted:bg-primary-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
198
198
|
/**
|
|
199
199
|
* One option in the popup. Children render as the option's label (wrapped in
|
|
200
200
|
* Base UI's `ItemText`); a check mark appears at the item's right edge while
|
|
@@ -63,7 +63,7 @@ const gapClasses = {
|
|
|
63
63
|
md: "gap-3",
|
|
64
64
|
lg: "gap-4"
|
|
65
65
|
};
|
|
66
|
-
const itemClasses = "relative data-disabled:
|
|
66
|
+
const itemClasses = "relative data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
67
67
|
const itemOrientationClasses = {
|
|
68
68
|
horizontal: "flex min-w-0 flex-1 items-center last:flex-initial",
|
|
69
69
|
vertical: "flex flex-col"
|
|
@@ -73,7 +73,7 @@ const itemVerticalGapClasses = {
|
|
|
73
73
|
md: "[&:not(:last-child)]:pb-6",
|
|
74
74
|
lg: "[&:not(:last-child)]:pb-8"
|
|
75
75
|
};
|
|
76
|
-
const triggerClasses = "group/trigger grid cursor-pointer select-none grid-cols-[auto_1fr] items-center gap-y-0.5 rounded-md text-start transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
76
|
+
const triggerClasses = "group/trigger grid cursor-pointer select-none grid-cols-[auto_1fr] items-center gap-y-0.5 rounded-md text-start transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
77
77
|
const triggerGapClasses = {
|
|
78
78
|
sm: "gap-x-2",
|
|
79
79
|
md: "gap-x-2.5",
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useId } from "react";
|
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Switch } from "@base-ui/react/switch";
|
|
5
5
|
//#region src/components/Switch/Switch.tsx
|
|
6
|
-
const trackClasses = "inline-flex shrink-0 cursor-pointer select-none items-center rounded-full border border-border bg-muted p-px transition-colors duration-150 hover:border-slate-300 hover:bg-slate-200 data-checked:border-primary data-checked:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:
|
|
6
|
+
const trackClasses = "inline-flex shrink-0 cursor-pointer select-none items-center rounded-full border border-border bg-muted p-px transition-colors duration-150 hover:border-slate-300 hover:bg-slate-200 data-checked:border-primary data-checked:bg-primary hover:data-checked:border-primary-700 hover:data-checked:bg-primary-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive data-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-invalid:focus-visible:outline-destructive data-readonly:cursor-default disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
7
7
|
const trackSizeClasses = {
|
|
8
8
|
sm: "h-4 w-7",
|
|
9
9
|
md: "h-5 w-9",
|
|
@@ -71,9 +71,9 @@ const Switch$1 = forwardRef(({ size = "md", label, description, labelPosition =
|
|
|
71
71
|
})]
|
|
72
72
|
});
|
|
73
73
|
return /* @__PURE__ */ jsxs("span", {
|
|
74
|
-
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:
|
|
74
|
+
className: cn("inline-flex max-w-full flex-col gap-1 font-sans", "has-data-disabled:cursor-not-allowed has-data-disabled:opacity-50"),
|
|
75
75
|
children: [hasLabel ? /* @__PURE__ */ jsx("label", {
|
|
76
|
-
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-readonly:cursor-default", labelPosition === "start" && "justify-between"),
|
|
76
|
+
className: cn("inline-flex cursor-pointer items-start gap-2", "has-data-disabled:cursor-not-allowed", "has-data-readonly:cursor-default", labelPosition === "start" && "justify-between"),
|
|
77
77
|
children: labelPosition === "start" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [labelText, control] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [control, labelText] })
|
|
78
78
|
}) : control, description != null && /* @__PURE__ */ jsx("span", {
|
|
79
79
|
id: descriptionId,
|
|
@@ -22,7 +22,7 @@ const listIndicatorPositionClasses = {
|
|
|
22
22
|
start: "data-[orientation=vertical]:border-s",
|
|
23
23
|
end: "data-[orientation=vertical]:border-e"
|
|
24
24
|
};
|
|
25
|
-
const tabBaseClasses = "inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium text-slate-600 transition-colors duration-150 hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:
|
|
25
|
+
const tabBaseClasses = "inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium text-slate-600 transition-colors duration-150 hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[orientation=vertical]:justify-start";
|
|
26
26
|
const tabSizeClasses = {
|
|
27
27
|
underline: {
|
|
28
28
|
sm: "h-8 gap-1.5 px-2.5 text-sm",
|
|
@@ -5,7 +5,7 @@ import { Toggle } from "@base-ui/react/toggle";
|
|
|
5
5
|
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
6
6
|
//#region src/components/Toggle/Toggle.tsx
|
|
7
7
|
const ToggleGroupStyleContext = createContext(null);
|
|
8
|
-
const baseClasses = "inline-flex items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium text-slate-600 transition-colors duration-150 cursor-pointer hover:bg-muted hover:text-foreground active:bg-slate-200 data-pressed:bg-primary-100 data-pressed:text-primary-700 hover:data-pressed:bg-primary-200 active:data-pressed:bg-primary-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:
|
|
8
|
+
const baseClasses = "inline-flex items-center justify-center whitespace-nowrap select-none rounded-md font-sans font-medium text-slate-600 transition-colors duration-150 cursor-pointer hover:bg-muted hover:text-foreground active:bg-slate-200 data-pressed:bg-primary-100 data-pressed:text-primary-700 hover:data-pressed:bg-primary-200 active:data-pressed:bg-primary-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
9
9
|
const variantClasses = {
|
|
10
10
|
ghost: "bg-transparent",
|
|
11
11
|
outline: "border border-border bg-transparent data-pressed:border-primary-300"
|
package/package.json
CHANGED
package/src/styles/theme.css
CHANGED
|
@@ -50,18 +50,22 @@
|
|
|
50
50
|
/* ---------------------------------------------------------------------
|
|
51
51
|
* Motion
|
|
52
52
|
* AI Loader uses an asymmetric 2.4s ambient rhythm. Processing combines a
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* four eased quarter-turn beats shared by the core and satellites across a
|
|
54
|
+
* 4.8s revolution, a strong core pulse, and a monochrome currentColor fill.
|
|
55
|
+
* The satellites soften at each beat's midpoint and return as the shared
|
|
56
|
+
* rotation eases; their staggered scale cycles peak at 140% and collapse to
|
|
57
|
+
* zero. The
|
|
58
|
+
* four-point path itself never morphs. Skeleton's wave
|
|
56
59
|
* crosses a placeholder in 1.6s and rests off-canvas when motion is reduced.
|
|
57
60
|
* Progress sweeps its indeterminate segment across the track in 1.8s;
|
|
58
61
|
* reduced motion swaps the sweep for Tailwind's opacity pulse so activity
|
|
59
62
|
* still reads without positional movement.
|
|
60
63
|
* `motion-safe` leaves a still frame for reduced-motion users.
|
|
61
64
|
* ------------------------------------------------------------------- */
|
|
62
|
-
--animate-ai-loader-
|
|
65
|
+
--animate-ai-loader-processing-spin: ai-loader-processing-spin 4.8s infinite;
|
|
63
66
|
--animate-ai-loader-processing-pulse: ai-loader-processing-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
64
|
-
--animate-ai-loader-processing-satellite: ai-loader-processing-satellite
|
|
67
|
+
--animate-ai-loader-processing-satellite: ai-loader-processing-satellite 4.8s linear infinite;
|
|
68
|
+
--animate-ai-loader-processing-spark: ai-loader-processing-spark 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
65
69
|
--animate-ai-loader-core: ai-loader-core 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
66
70
|
--animate-ai-loader-facet: ai-loader-facet 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
67
71
|
--animate-ai-loader-spark: ai-loader-spark 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
@@ -178,28 +182,6 @@
|
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
@keyframes ai-loader-rotate {
|
|
182
|
-
0% {
|
|
183
|
-
transform: rotate(0deg);
|
|
184
|
-
animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.35);
|
|
185
|
-
}
|
|
186
|
-
28% {
|
|
187
|
-
transform: rotate(60deg);
|
|
188
|
-
animation-timing-function: cubic-bezier(0.15, 0.75, 0.25, 1);
|
|
189
|
-
}
|
|
190
|
-
58% {
|
|
191
|
-
transform: rotate(220deg);
|
|
192
|
-
animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.45);
|
|
193
|
-
}
|
|
194
|
-
76% {
|
|
195
|
-
transform: rotate(276deg);
|
|
196
|
-
animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
197
|
-
}
|
|
198
|
-
100% {
|
|
199
|
-
transform: rotate(360deg);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
185
|
@keyframes ai-loader-processing-pulse {
|
|
204
186
|
0%,
|
|
205
187
|
100% {
|
|
@@ -220,18 +202,43 @@
|
|
|
220
202
|
}
|
|
221
203
|
}
|
|
222
204
|
|
|
205
|
+
/* Four eased quarter turns create a repeatable visual beat. The fourfold core
|
|
206
|
+
reaches the same upright brand-mark orientation at every 1.2s boundary. */
|
|
207
|
+
@keyframes ai-loader-processing-spin {
|
|
208
|
+
0% {
|
|
209
|
+
transform: rotate(0deg);
|
|
210
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
211
|
+
}
|
|
212
|
+
25% {
|
|
213
|
+
transform: rotate(90deg);
|
|
214
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
215
|
+
}
|
|
216
|
+
50% {
|
|
217
|
+
transform: rotate(180deg);
|
|
218
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
219
|
+
}
|
|
220
|
+
75% {
|
|
221
|
+
transform: rotate(270deg);
|
|
222
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
223
|
+
}
|
|
224
|
+
100% {
|
|
225
|
+
transform: rotate(360deg);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
223
229
|
@keyframes ai-loader-processing-satellite {
|
|
224
230
|
0%,
|
|
225
|
-
|
|
231
|
+
25%,
|
|
232
|
+
50%,
|
|
233
|
+
75%,
|
|
226
234
|
100% {
|
|
227
235
|
opacity: 1;
|
|
228
236
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
opacity: 1;
|
|
237
|
+
12.5%,
|
|
238
|
+
37.5%,
|
|
239
|
+
62.5%,
|
|
240
|
+
87.5% {
|
|
241
|
+
opacity: 0.35;
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
244
|
|
|
@@ -284,6 +291,30 @@
|
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
293
|
|
|
294
|
+
@keyframes ai-loader-processing-spark {
|
|
295
|
+
0%,
|
|
296
|
+
100% {
|
|
297
|
+
opacity: 0;
|
|
298
|
+
transform: scale(0);
|
|
299
|
+
}
|
|
300
|
+
18% {
|
|
301
|
+
opacity: 0.35;
|
|
302
|
+
transform: scale(0.5);
|
|
303
|
+
}
|
|
304
|
+
42% {
|
|
305
|
+
opacity: 1;
|
|
306
|
+
transform: scale(1.4);
|
|
307
|
+
}
|
|
308
|
+
62% {
|
|
309
|
+
opacity: 0.75;
|
|
310
|
+
transform: scale(1.05);
|
|
311
|
+
}
|
|
312
|
+
82% {
|
|
313
|
+
opacity: 0;
|
|
314
|
+
transform: scale(0);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
287
318
|
@keyframes ai-loader-spark {
|
|
288
319
|
0%,
|
|
289
320
|
100% {
|