@codapet/design-system 0.2.1 → 0.2.4
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/index.d.mts +16 -34
- package/dist/index.mjs +207 -261
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -13
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -137,19 +137,19 @@ import "react";
|
|
|
137
137
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
138
138
|
|
|
139
139
|
// src/components/ui/button.tsx
|
|
140
|
-
import "react";
|
|
141
140
|
import { Slot } from "@radix-ui/react-slot";
|
|
142
141
|
import { cva as cva2 } from "class-variance-authority";
|
|
142
|
+
import "react";
|
|
143
143
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
144
144
|
var buttonVariants = cva2(
|
|
145
|
-
"cursor-pointer
|
|
145
|
+
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-semibold transition-colors transition-opacity disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none relative select-none will-change-auto focus-visible:before:absolute focus-visible:before:-inset-[3px] focus-visible:before:rounded-lg focus-visible:before:ring-2 focus-visible:before:ring-blue-500/80 focus-visible:before:pointer-events-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
146
146
|
{
|
|
147
147
|
variants: {
|
|
148
148
|
variant: {
|
|
149
|
-
primary: "bg-primary text-primary-foreground hover:bg-brand-dark",
|
|
150
|
-
secondary: "bg-brand-subtle text-brand-vibrant hover:bg-brand-light border border-brand-light",
|
|
151
|
-
tertiary: "bg-zinc-100 text-zinc-700 hover:bg-zinc-300 hover:border-zinc-300 border border-zinc-200",
|
|
152
|
-
outline: "text-zinc-800 border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
149
|
+
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-slate-800 ",
|
|
150
|
+
secondary: "bg-brand-subtle text-brand-vibrant hover:bg-brand-light border border-brand-light active:bg-icon-disabled",
|
|
151
|
+
tertiary: "bg-zinc-100 text-zinc-700 hover:bg-zinc-300 hover:border-zinc-300 border border-zinc-200 active:bg-zinc-400",
|
|
152
|
+
outline: "text-zinc-800 border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 active:bg-surface-default",
|
|
153
153
|
ghost: "text-zinc-800 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
154
154
|
link: "text-primary underline-offset-4 hover:underline",
|
|
155
155
|
destructive: "bg-red-400 text-white hover:bg-red-900 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
@@ -2283,30 +2283,134 @@ function HoverCardContent({
|
|
|
2283
2283
|
}
|
|
2284
2284
|
|
|
2285
2285
|
// src/components/ui/input.tsx
|
|
2286
|
-
import "
|
|
2287
|
-
import
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2286
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
2287
|
+
import * as React21 from "react";
|
|
2288
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2289
|
+
var inputVariants = cva5(
|
|
2290
|
+
[
|
|
2291
|
+
// Base styles
|
|
2292
|
+
"file:text-zinc-800 placeholder:text-gray-subtle selection:bg-primary selection:text-primary-foreground",
|
|
2293
|
+
"flex w-full min-w-0 rounded-md border bg-transparent text-base shadow-xs transition-all duration-200",
|
|
2294
|
+
"outline-none font-sans",
|
|
2295
|
+
// File input styles
|
|
2296
|
+
"file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
2297
|
+
// Disabled styles
|
|
2298
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
2299
|
+
// Responsive text size
|
|
2300
|
+
"md:text-sm",
|
|
2301
|
+
// Default state
|
|
2302
|
+
"border-zinc-300 bg-background",
|
|
2303
|
+
// Hover state
|
|
2304
|
+
"hover:border-brand-normal",
|
|
2305
|
+
// Focus state
|
|
2306
|
+
"focus:border-blue-500",
|
|
2307
|
+
"active:border-brand-normal"
|
|
2308
|
+
],
|
|
2309
|
+
{
|
|
2310
|
+
variants: {
|
|
2311
|
+
size: {
|
|
2312
|
+
sm: "h-9 px-3 py-1 text-sm",
|
|
2313
|
+
md: "h-10 px-3 py-2 text-sm",
|
|
2314
|
+
lg: "h-12 px-4 py-3 text-base"
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2317
|
+
defaultVariants: {
|
|
2318
|
+
size: "md"
|
|
2301
2319
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2320
|
+
}
|
|
2321
|
+
);
|
|
2322
|
+
var Input = React21.forwardRef(
|
|
2323
|
+
({
|
|
2324
|
+
className,
|
|
2325
|
+
type,
|
|
2326
|
+
size,
|
|
2327
|
+
leftIcon,
|
|
2328
|
+
rightIcon,
|
|
2329
|
+
leftIconClassName,
|
|
2330
|
+
rightIconClassName,
|
|
2331
|
+
error,
|
|
2332
|
+
...props
|
|
2333
|
+
}, ref) => {
|
|
2334
|
+
const errorStyles2 = error ? [
|
|
2335
|
+
"border-destructive bg-red-subtle",
|
|
2336
|
+
"focus:border-destructive focus:ring-destructive/20",
|
|
2337
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
2338
|
+
] : [];
|
|
2339
|
+
if (leftIcon || rightIcon) {
|
|
2340
|
+
return /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
|
|
2341
|
+
/* @__PURE__ */ jsx23(
|
|
2342
|
+
"input",
|
|
2343
|
+
{
|
|
2344
|
+
type,
|
|
2345
|
+
"data-slot": "input",
|
|
2346
|
+
className: cn(
|
|
2347
|
+
inputVariants({ size }),
|
|
2348
|
+
errorStyles2,
|
|
2349
|
+
"peer",
|
|
2350
|
+
leftIcon && "pl-10",
|
|
2351
|
+
rightIcon && "pr-10",
|
|
2352
|
+
className
|
|
2353
|
+
),
|
|
2354
|
+
ref,
|
|
2355
|
+
"aria-invalid": error,
|
|
2356
|
+
...props
|
|
2357
|
+
}
|
|
2358
|
+
),
|
|
2359
|
+
leftIcon && /* @__PURE__ */ jsx23(
|
|
2360
|
+
"div",
|
|
2361
|
+
{
|
|
2362
|
+
className: cn(
|
|
2363
|
+
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
2364
|
+
"transition-colors",
|
|
2365
|
+
error ? "text-destructive peer-hover:text-destructive peer-focus:text-destructive peer-active:text-destructive" : "text-muted-foreground peer-hover:text-brand-normal peer-focus:text-blue-500 peer-active:text-brand-normal",
|
|
2366
|
+
leftIconClassName
|
|
2367
|
+
),
|
|
2368
|
+
children: React21.isValidElement(leftIcon) ? (() => {
|
|
2369
|
+
const iconEl = leftIcon;
|
|
2370
|
+
return React21.cloneElement(iconEl, {
|
|
2371
|
+
className: cn("h-4 w-4", iconEl.props.className)
|
|
2372
|
+
});
|
|
2373
|
+
})() : leftIcon
|
|
2374
|
+
}
|
|
2375
|
+
),
|
|
2376
|
+
rightIcon && /* @__PURE__ */ jsx23(
|
|
2377
|
+
"div",
|
|
2378
|
+
{
|
|
2379
|
+
className: cn(
|
|
2380
|
+
"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
2381
|
+
"transition-colors",
|
|
2382
|
+
rightIconClassName
|
|
2383
|
+
),
|
|
2384
|
+
children: React21.isValidElement(rightIcon) ? (() => {
|
|
2385
|
+
const iconEl = rightIcon;
|
|
2386
|
+
return React21.cloneElement(iconEl, {
|
|
2387
|
+
className: cn("h-4 w-4", iconEl.props.className)
|
|
2388
|
+
});
|
|
2389
|
+
})() : rightIcon
|
|
2390
|
+
}
|
|
2391
|
+
)
|
|
2392
|
+
] });
|
|
2393
|
+
}
|
|
2394
|
+
return /* @__PURE__ */ jsx23(
|
|
2395
|
+
"input",
|
|
2396
|
+
{
|
|
2397
|
+
type,
|
|
2398
|
+
"data-slot": "input",
|
|
2399
|
+
className: cn(inputVariants({ size }), errorStyles2, className),
|
|
2400
|
+
ref,
|
|
2401
|
+
"aria-invalid": error,
|
|
2402
|
+
...props
|
|
2403
|
+
}
|
|
2404
|
+
);
|
|
2405
|
+
}
|
|
2406
|
+
);
|
|
2407
|
+
Input.displayName = "Input";
|
|
2304
2408
|
|
|
2305
2409
|
// src/components/ui/input-otp.tsx
|
|
2306
2410
|
import * as React22 from "react";
|
|
2307
2411
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
2308
2412
|
import { MinusIcon } from "lucide-react";
|
|
2309
|
-
import { jsx as jsx24, jsxs as
|
|
2413
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2310
2414
|
function InputOTP({
|
|
2311
2415
|
className,
|
|
2312
2416
|
containerClassName,
|
|
@@ -2342,7 +2446,7 @@ function InputOTPSlot({
|
|
|
2342
2446
|
}) {
|
|
2343
2447
|
const inputOTPContext = React22.useContext(OTPInputContext);
|
|
2344
2448
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
2345
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ jsxs12(
|
|
2346
2450
|
"div",
|
|
2347
2451
|
{
|
|
2348
2452
|
"data-slot": "input-otp-slot",
|
|
@@ -2367,7 +2471,7 @@ function InputOTPSeparator({ ...props }) {
|
|
|
2367
2471
|
import "react";
|
|
2368
2472
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
2369
2473
|
import { CheckIcon as CheckIcon4, ChevronRightIcon as ChevronRightIcon4, CircleIcon as CircleIcon3 } from "lucide-react";
|
|
2370
|
-
import { jsx as jsx25, jsxs as
|
|
2474
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2371
2475
|
function Menubar({
|
|
2372
2476
|
className,
|
|
2373
2477
|
...props
|
|
@@ -2468,7 +2572,7 @@ function MenubarCheckboxItem({
|
|
|
2468
2572
|
checked,
|
|
2469
2573
|
...props
|
|
2470
2574
|
}) {
|
|
2471
|
-
return /* @__PURE__ */
|
|
2575
|
+
return /* @__PURE__ */ jsxs13(
|
|
2472
2576
|
MenubarPrimitive.CheckboxItem,
|
|
2473
2577
|
{
|
|
2474
2578
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -2490,7 +2594,7 @@ function MenubarRadioItem({
|
|
|
2490
2594
|
children,
|
|
2491
2595
|
...props
|
|
2492
2596
|
}) {
|
|
2493
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ jsxs13(
|
|
2494
2598
|
MenubarPrimitive.RadioItem,
|
|
2495
2599
|
{
|
|
2496
2600
|
"data-slot": "menubar-radio-item",
|
|
@@ -2564,7 +2668,7 @@ function MenubarSubTrigger({
|
|
|
2564
2668
|
children,
|
|
2565
2669
|
...props
|
|
2566
2670
|
}) {
|
|
2567
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ jsxs13(
|
|
2568
2672
|
MenubarPrimitive.SubTrigger,
|
|
2569
2673
|
{
|
|
2570
2674
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -2601,16 +2705,16 @@ function MenubarSubContent({
|
|
|
2601
2705
|
// src/components/ui/navigation-menu.tsx
|
|
2602
2706
|
import "react";
|
|
2603
2707
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
2604
|
-
import { cva as
|
|
2708
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
2605
2709
|
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
2606
|
-
import { jsx as jsx26, jsxs as
|
|
2710
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2607
2711
|
function NavigationMenu({
|
|
2608
2712
|
className,
|
|
2609
2713
|
children,
|
|
2610
2714
|
viewport = true,
|
|
2611
2715
|
...props
|
|
2612
2716
|
}) {
|
|
2613
|
-
return /* @__PURE__ */
|
|
2717
|
+
return /* @__PURE__ */ jsxs14(
|
|
2614
2718
|
NavigationMenuPrimitive.Root,
|
|
2615
2719
|
{
|
|
2616
2720
|
"data-slot": "navigation-menu",
|
|
@@ -2656,7 +2760,7 @@ function NavigationMenuItem({
|
|
|
2656
2760
|
}
|
|
2657
2761
|
);
|
|
2658
2762
|
}
|
|
2659
|
-
var navigationMenuTriggerStyle =
|
|
2763
|
+
var navigationMenuTriggerStyle = cva6(
|
|
2660
2764
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
2661
2765
|
);
|
|
2662
2766
|
function NavigationMenuTrigger({
|
|
@@ -2664,7 +2768,7 @@ function NavigationMenuTrigger({
|
|
|
2664
2768
|
children,
|
|
2665
2769
|
...props
|
|
2666
2770
|
}) {
|
|
2667
|
-
return /* @__PURE__ */
|
|
2771
|
+
return /* @__PURE__ */ jsxs14(
|
|
2668
2772
|
NavigationMenuPrimitive.Trigger,
|
|
2669
2773
|
{
|
|
2670
2774
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -2766,7 +2870,7 @@ import {
|
|
|
2766
2870
|
ChevronRightIcon as ChevronRightIcon5,
|
|
2767
2871
|
MoreHorizontalIcon
|
|
2768
2872
|
} from "lucide-react";
|
|
2769
|
-
import { jsx as jsx27, jsxs as
|
|
2873
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2770
2874
|
function Pagination({ className, ...props }) {
|
|
2771
2875
|
return /* @__PURE__ */ jsx27(
|
|
2772
2876
|
"nav",
|
|
@@ -2822,7 +2926,7 @@ function PaginationPrevious({
|
|
|
2822
2926
|
className,
|
|
2823
2927
|
...props
|
|
2824
2928
|
}) {
|
|
2825
|
-
return /* @__PURE__ */
|
|
2929
|
+
return /* @__PURE__ */ jsxs15(
|
|
2826
2930
|
PaginationLink,
|
|
2827
2931
|
{
|
|
2828
2932
|
"aria-label": "Go to previous page",
|
|
@@ -2840,7 +2944,7 @@ function PaginationNext({
|
|
|
2840
2944
|
className,
|
|
2841
2945
|
...props
|
|
2842
2946
|
}) {
|
|
2843
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ jsxs15(
|
|
2844
2948
|
PaginationLink,
|
|
2845
2949
|
{
|
|
2846
2950
|
"aria-label": "Go to next page",
|
|
@@ -2858,7 +2962,7 @@ function PaginationEllipsis({
|
|
|
2858
2962
|
className,
|
|
2859
2963
|
...props
|
|
2860
2964
|
}) {
|
|
2861
|
-
return /* @__PURE__ */
|
|
2965
|
+
return /* @__PURE__ */ jsxs15(
|
|
2862
2966
|
"span",
|
|
2863
2967
|
{
|
|
2864
2968
|
"aria-hidden": true,
|
|
@@ -3034,13 +3138,13 @@ function ResizableHandle({
|
|
|
3034
3138
|
// src/components/ui/scroll-area.tsx
|
|
3035
3139
|
import "react";
|
|
3036
3140
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3037
|
-
import { jsx as jsx32, jsxs as
|
|
3141
|
+
import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3038
3142
|
function ScrollArea({
|
|
3039
3143
|
className,
|
|
3040
3144
|
children,
|
|
3041
3145
|
...props
|
|
3042
3146
|
}) {
|
|
3043
|
-
return /* @__PURE__ */
|
|
3147
|
+
return /* @__PURE__ */ jsxs16(
|
|
3044
3148
|
ScrollAreaPrimitive.Root,
|
|
3045
3149
|
{
|
|
3046
3150
|
"data-slot": "scroll-area",
|
|
@@ -3093,7 +3197,7 @@ function ScrollBar({
|
|
|
3093
3197
|
import "react";
|
|
3094
3198
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3095
3199
|
import { CheckIcon as CheckIcon5, ChevronDownIcon as ChevronDownIcon4, ChevronUpIcon } from "lucide-react";
|
|
3096
|
-
import { jsx as jsx33, jsxs as
|
|
3200
|
+
import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3097
3201
|
function Select({
|
|
3098
3202
|
...props
|
|
3099
3203
|
}) {
|
|
@@ -3115,7 +3219,7 @@ function SelectTrigger({
|
|
|
3115
3219
|
children,
|
|
3116
3220
|
...props
|
|
3117
3221
|
}) {
|
|
3118
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ jsxs17(
|
|
3119
3223
|
SelectPrimitive.Trigger,
|
|
3120
3224
|
{
|
|
3121
3225
|
"data-slot": "select-trigger",
|
|
@@ -3138,7 +3242,7 @@ function SelectContent({
|
|
|
3138
3242
|
position = "popper",
|
|
3139
3243
|
...props
|
|
3140
3244
|
}) {
|
|
3141
|
-
return /* @__PURE__ */ jsx33(SelectPrimitive.Portal, { children: /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ jsx33(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
|
|
3142
3246
|
SelectPrimitive.Content,
|
|
3143
3247
|
{
|
|
3144
3248
|
"data-slot": "select-content",
|
|
@@ -3184,7 +3288,7 @@ function SelectItem({
|
|
|
3184
3288
|
children,
|
|
3185
3289
|
...props
|
|
3186
3290
|
}) {
|
|
3187
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsxs17(
|
|
3188
3292
|
SelectPrimitive.Item,
|
|
3189
3293
|
{
|
|
3190
3294
|
"data-slot": "select-item",
|
|
@@ -3277,7 +3381,7 @@ function Separator5({
|
|
|
3277
3381
|
import "react";
|
|
3278
3382
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3279
3383
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
3280
|
-
import { jsx as jsx35, jsxs as
|
|
3384
|
+
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3281
3385
|
function Sheet({ ...props }) {
|
|
3282
3386
|
return /* @__PURE__ */ jsx35(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
3283
3387
|
}
|
|
@@ -3318,9 +3422,9 @@ function SheetContent({
|
|
|
3318
3422
|
side = "right",
|
|
3319
3423
|
...props
|
|
3320
3424
|
}) {
|
|
3321
|
-
return /* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ jsxs18(SheetPortal, { children: [
|
|
3322
3426
|
/* @__PURE__ */ jsx35(SheetOverlay, {}),
|
|
3323
|
-
/* @__PURE__ */
|
|
3427
|
+
/* @__PURE__ */ jsxs18(
|
|
3324
3428
|
SheetPrimitive.Content,
|
|
3325
3429
|
{
|
|
3326
3430
|
"data-slot": "sheet-content",
|
|
@@ -3335,7 +3439,7 @@ function SheetContent({
|
|
|
3335
3439
|
...props,
|
|
3336
3440
|
children: [
|
|
3337
3441
|
children,
|
|
3338
|
-
/* @__PURE__ */
|
|
3442
|
+
/* @__PURE__ */ jsxs18(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
3339
3443
|
/* @__PURE__ */ jsx35(XIcon2, { className: "size-4" }),
|
|
3340
3444
|
/* @__PURE__ */ jsx35("span", { className: "sr-only", children: "Close" })
|
|
3341
3445
|
] })
|
|
@@ -3394,7 +3498,7 @@ function SheetDescription({
|
|
|
3394
3498
|
// src/components/ui/sidebar.tsx
|
|
3395
3499
|
import * as React36 from "react";
|
|
3396
3500
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
3397
|
-
import { cva as
|
|
3501
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
3398
3502
|
import { PanelLeftIcon } from "lucide-react";
|
|
3399
3503
|
|
|
3400
3504
|
// src/hooks/use-mobile.ts
|
|
@@ -3430,7 +3534,7 @@ function Skeleton({ className, ...props }) {
|
|
|
3430
3534
|
// src/components/ui/tooltip.tsx
|
|
3431
3535
|
import "react";
|
|
3432
3536
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3433
|
-
import { jsx as jsx37, jsxs as
|
|
3537
|
+
import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3434
3538
|
function TooltipProvider({
|
|
3435
3539
|
delayDuration = 0,
|
|
3436
3540
|
...props
|
|
@@ -3460,7 +3564,7 @@ function TooltipContent({
|
|
|
3460
3564
|
children,
|
|
3461
3565
|
...props
|
|
3462
3566
|
}) {
|
|
3463
|
-
return /* @__PURE__ */ jsx37(TooltipPrimitive.Portal, { children: /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsx37(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs19(
|
|
3464
3568
|
TooltipPrimitive.Content,
|
|
3465
3569
|
{
|
|
3466
3570
|
"data-slot": "tooltip-content",
|
|
@@ -3479,7 +3583,7 @@ function TooltipContent({
|
|
|
3479
3583
|
}
|
|
3480
3584
|
|
|
3481
3585
|
// src/components/ui/sidebar.tsx
|
|
3482
|
-
import { jsx as jsx38, jsxs as
|
|
3586
|
+
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3483
3587
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
3484
3588
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3485
3589
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -3587,7 +3691,7 @@ function Sidebar({
|
|
|
3587
3691
|
);
|
|
3588
3692
|
}
|
|
3589
3693
|
if (isMobile) {
|
|
3590
|
-
return /* @__PURE__ */ jsx38(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */
|
|
3694
|
+
return /* @__PURE__ */ jsx38(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs20(
|
|
3591
3695
|
SheetContent,
|
|
3592
3696
|
{
|
|
3593
3697
|
"data-sidebar": "sidebar",
|
|
@@ -3599,7 +3703,7 @@ function Sidebar({
|
|
|
3599
3703
|
},
|
|
3600
3704
|
side,
|
|
3601
3705
|
children: [
|
|
3602
|
-
/* @__PURE__ */
|
|
3706
|
+
/* @__PURE__ */ jsxs20(SheetHeader, { className: "sr-only", children: [
|
|
3603
3707
|
/* @__PURE__ */ jsx38(SheetTitle, { children: "Sidebar" }),
|
|
3604
3708
|
/* @__PURE__ */ jsx38(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
3605
3709
|
] }),
|
|
@@ -3608,7 +3712,7 @@ function Sidebar({
|
|
|
3608
3712
|
}
|
|
3609
3713
|
) });
|
|
3610
3714
|
}
|
|
3611
|
-
return /* @__PURE__ */
|
|
3715
|
+
return /* @__PURE__ */ jsxs20(
|
|
3612
3716
|
"div",
|
|
3613
3717
|
{
|
|
3614
3718
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -3663,7 +3767,7 @@ function SidebarTrigger({
|
|
|
3663
3767
|
...props
|
|
3664
3768
|
}) {
|
|
3665
3769
|
const { toggleSidebar } = useSidebar();
|
|
3666
|
-
return /* @__PURE__ */
|
|
3770
|
+
return /* @__PURE__ */ jsxs20(
|
|
3667
3771
|
Button,
|
|
3668
3772
|
{
|
|
3669
3773
|
"data-sidebar": "trigger",
|
|
@@ -3874,7 +3978,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
3874
3978
|
}
|
|
3875
3979
|
);
|
|
3876
3980
|
}
|
|
3877
|
-
var sidebarMenuButtonVariants =
|
|
3981
|
+
var sidebarMenuButtonVariants = cva7(
|
|
3878
3982
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3879
3983
|
{
|
|
3880
3984
|
variants: {
|
|
@@ -3924,7 +4028,7 @@ function SidebarMenuButton({
|
|
|
3924
4028
|
children: tooltip
|
|
3925
4029
|
};
|
|
3926
4030
|
}
|
|
3927
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ jsxs20(Tooltip2, { children: [
|
|
3928
4032
|
/* @__PURE__ */ jsx38(TooltipTrigger, { asChild: true, children: button }),
|
|
3929
4033
|
/* @__PURE__ */ jsx38(
|
|
3930
4034
|
TooltipContent,
|
|
@@ -3994,7 +4098,7 @@ function SidebarMenuSkeleton({
|
|
|
3994
4098
|
const width = React36.useMemo(() => {
|
|
3995
4099
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3996
4100
|
}, []);
|
|
3997
|
-
return /* @__PURE__ */
|
|
4101
|
+
return /* @__PURE__ */ jsxs20(
|
|
3998
4102
|
"div",
|
|
3999
4103
|
{
|
|
4000
4104
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -4083,7 +4187,7 @@ function SidebarMenuSubButton({
|
|
|
4083
4187
|
// src/components/ui/slider.tsx
|
|
4084
4188
|
import * as React37 from "react";
|
|
4085
4189
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4086
|
-
import { jsx as jsx39, jsxs as
|
|
4190
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4087
4191
|
function Slider({
|
|
4088
4192
|
className,
|
|
4089
4193
|
defaultValue,
|
|
@@ -4096,7 +4200,7 @@ function Slider({
|
|
|
4096
4200
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
4097
4201
|
[value, defaultValue, min, max]
|
|
4098
4202
|
);
|
|
4099
|
-
return /* @__PURE__ */
|
|
4203
|
+
return /* @__PURE__ */ jsxs21(
|
|
4100
4204
|
SliderPrimitive.Root,
|
|
4101
4205
|
{
|
|
4102
4206
|
"data-slot": "slider",
|
|
@@ -4362,28 +4466,53 @@ function TabsContent({
|
|
|
4362
4466
|
}
|
|
4363
4467
|
|
|
4364
4468
|
// src/components/ui/textarea.tsx
|
|
4365
|
-
import "react";
|
|
4469
|
+
import * as React41 from "react";
|
|
4366
4470
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4471
|
+
var textareaBaseStyles = [
|
|
4472
|
+
// Base styles aligned with Input
|
|
4473
|
+
"placeholder:text-gray-subtle selection:bg-primary selection:text-primary-foreground",
|
|
4474
|
+
"flex w-full min-w-0 rounded-md border bg-transparent text-base shadow-xs transition-all duration-200",
|
|
4475
|
+
"outline-none font-sans",
|
|
4476
|
+
// Disabled
|
|
4477
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
4478
|
+
// Responsive text size
|
|
4479
|
+
"md:text-sm",
|
|
4480
|
+
// Default state
|
|
4481
|
+
"border-zinc-300 bg-background",
|
|
4482
|
+
// Hover/Focus/Active states
|
|
4483
|
+
"hover:border-brand-normal",
|
|
4484
|
+
"focus:border-blue-500",
|
|
4485
|
+
"active:border-brand-normal",
|
|
4486
|
+
// Textarea specific
|
|
4487
|
+
"field-sizing-content min-h-16 resize-y px-3 py-2"
|
|
4488
|
+
].join(" ");
|
|
4489
|
+
var errorStyles = [
|
|
4490
|
+
"border-destructive bg-red-subtle",
|
|
4491
|
+
"focus:border-destructive focus:ring-destructive/20",
|
|
4492
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
4493
|
+
].join(" ");
|
|
4494
|
+
var Textarea = React41.forwardRef(
|
|
4495
|
+
({ className, error, ...props }, ref) => {
|
|
4496
|
+
return /* @__PURE__ */ jsx44(
|
|
4497
|
+
"textarea",
|
|
4498
|
+
{
|
|
4499
|
+
"data-slot": "textarea",
|
|
4500
|
+
className: cn(textareaBaseStyles, error && errorStyles, className),
|
|
4501
|
+
"aria-invalid": error,
|
|
4502
|
+
ref,
|
|
4503
|
+
...props
|
|
4504
|
+
}
|
|
4505
|
+
);
|
|
4506
|
+
}
|
|
4507
|
+
);
|
|
4508
|
+
Textarea.displayName = "Textarea";
|
|
4380
4509
|
|
|
4381
4510
|
// src/components/ui/toggle.tsx
|
|
4382
4511
|
import "react";
|
|
4383
4512
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4384
|
-
import { cva as
|
|
4513
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
4385
4514
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4386
|
-
var toggleVariants =
|
|
4515
|
+
var toggleVariants = cva8(
|
|
4387
4516
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
4388
4517
|
{
|
|
4389
4518
|
variants: {
|
|
@@ -4477,180 +4606,6 @@ function ToggleGroupItem({
|
|
|
4477
4606
|
}
|
|
4478
4607
|
);
|
|
4479
4608
|
}
|
|
4480
|
-
|
|
4481
|
-
// src/components/ui/typography.tsx
|
|
4482
|
-
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
4483
|
-
import { cva as cva8 } from "class-variance-authority";
|
|
4484
|
-
import "react";
|
|
4485
|
-
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4486
|
-
var displayTextVariants = cva8(
|
|
4487
|
-
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
4488
|
-
{
|
|
4489
|
-
variants: {
|
|
4490
|
-
size: {
|
|
4491
|
-
md: "text-[1.75rem] md:text-4xl leading-[2.75rem] md:leading-[4rem]",
|
|
4492
|
-
sm: "text-lg md:text-xl leading-[2.5rem] md:leading-[3rem]",
|
|
4493
|
-
lg: "text-4xl md:text-[3.25rem] leading-[4rem] md:leading-[5rem]"
|
|
4494
|
-
}
|
|
4495
|
-
},
|
|
4496
|
-
defaultVariants: {
|
|
4497
|
-
size: "md"
|
|
4498
|
-
}
|
|
4499
|
-
}
|
|
4500
|
-
);
|
|
4501
|
-
function DisplayHeading({
|
|
4502
|
-
className,
|
|
4503
|
-
size,
|
|
4504
|
-
asChild = false,
|
|
4505
|
-
...props
|
|
4506
|
-
}) {
|
|
4507
|
-
const Comp = asChild ? Slot7 : "h1";
|
|
4508
|
-
return /* @__PURE__ */ jsx47(
|
|
4509
|
-
Comp,
|
|
4510
|
-
{
|
|
4511
|
-
"data-slot": "h1",
|
|
4512
|
-
className: cn(displayTextVariants({ size, className })),
|
|
4513
|
-
...props
|
|
4514
|
-
}
|
|
4515
|
-
);
|
|
4516
|
-
}
|
|
4517
|
-
var bodyTextVariants = cva8("font-sans ", {
|
|
4518
|
-
variants: {
|
|
4519
|
-
size: {
|
|
4520
|
-
lg: "text-lg md:text-xl leading-[1.625rem] md:leading-[1.75rem]",
|
|
4521
|
-
md: "text-base leading-[1.5rem] ",
|
|
4522
|
-
sm: "text-sm leading-[1.25rem] ",
|
|
4523
|
-
xs: "text-xs leading-[1rem]"
|
|
4524
|
-
}
|
|
4525
|
-
},
|
|
4526
|
-
defaultVariants: {
|
|
4527
|
-
size: "md"
|
|
4528
|
-
}
|
|
4529
|
-
});
|
|
4530
|
-
function Body({
|
|
4531
|
-
className,
|
|
4532
|
-
size,
|
|
4533
|
-
asChild = false,
|
|
4534
|
-
...props
|
|
4535
|
-
}) {
|
|
4536
|
-
const Comp = asChild ? Slot7 : "p";
|
|
4537
|
-
return /* @__PURE__ */ jsx47(
|
|
4538
|
-
Comp,
|
|
4539
|
-
{
|
|
4540
|
-
"data-slot": "h1",
|
|
4541
|
-
className: cn(bodyTextVariants({ size, className })),
|
|
4542
|
-
...props
|
|
4543
|
-
}
|
|
4544
|
-
);
|
|
4545
|
-
}
|
|
4546
|
-
function HeadingXL({
|
|
4547
|
-
className,
|
|
4548
|
-
asChild = false,
|
|
4549
|
-
...props
|
|
4550
|
-
}) {
|
|
4551
|
-
const Comp = asChild ? Slot7 : "h1";
|
|
4552
|
-
return /* @__PURE__ */ jsx47(
|
|
4553
|
-
Comp,
|
|
4554
|
-
{
|
|
4555
|
-
"data-slot": "h1",
|
|
4556
|
-
className: cn(
|
|
4557
|
-
"text-2xl md:text-[2rem] md:leading-[2.5rem] leading-[2rem] font-semibold font-sans",
|
|
4558
|
-
className
|
|
4559
|
-
),
|
|
4560
|
-
...props
|
|
4561
|
-
}
|
|
4562
|
-
);
|
|
4563
|
-
}
|
|
4564
|
-
function HeadingL({
|
|
4565
|
-
className,
|
|
4566
|
-
asChild = false,
|
|
4567
|
-
...props
|
|
4568
|
-
}) {
|
|
4569
|
-
const Comp = asChild ? Slot7 : "h2";
|
|
4570
|
-
return /* @__PURE__ */ jsx47(
|
|
4571
|
-
Comp,
|
|
4572
|
-
{
|
|
4573
|
-
"data-slot": "h2",
|
|
4574
|
-
className: cn(
|
|
4575
|
-
"md:text-[1.5rem] text-[1.25rem] md:leading-[2rem] leading-[1.75rem] font-semibold font-sans",
|
|
4576
|
-
className
|
|
4577
|
-
),
|
|
4578
|
-
...props
|
|
4579
|
-
}
|
|
4580
|
-
);
|
|
4581
|
-
}
|
|
4582
|
-
function HeadingM({
|
|
4583
|
-
className,
|
|
4584
|
-
asChild = false,
|
|
4585
|
-
...props
|
|
4586
|
-
}) {
|
|
4587
|
-
const Comp = asChild ? Slot7 : "h3";
|
|
4588
|
-
return /* @__PURE__ */ jsx47(
|
|
4589
|
-
Comp,
|
|
4590
|
-
{
|
|
4591
|
-
"data-slot": "h3",
|
|
4592
|
-
className: cn(
|
|
4593
|
-
"text-[1.125rem] md:text-xl md:leading-[1.75rem] leading-[1.625rem] font-semibold font-sans",
|
|
4594
|
-
className
|
|
4595
|
-
),
|
|
4596
|
-
...props
|
|
4597
|
-
}
|
|
4598
|
-
);
|
|
4599
|
-
}
|
|
4600
|
-
function HeadingS({
|
|
4601
|
-
className,
|
|
4602
|
-
asChild = false,
|
|
4603
|
-
...props
|
|
4604
|
-
}) {
|
|
4605
|
-
const Comp = asChild ? Slot7 : "h4";
|
|
4606
|
-
return /* @__PURE__ */ jsx47(
|
|
4607
|
-
Comp,
|
|
4608
|
-
{
|
|
4609
|
-
"data-slot": "h4",
|
|
4610
|
-
className: cn(
|
|
4611
|
-
"text-base leading-[1.5rem] font-semibold font-sans",
|
|
4612
|
-
className
|
|
4613
|
-
),
|
|
4614
|
-
...props
|
|
4615
|
-
}
|
|
4616
|
-
);
|
|
4617
|
-
}
|
|
4618
|
-
function HeadingXS({
|
|
4619
|
-
className,
|
|
4620
|
-
asChild = false,
|
|
4621
|
-
...props
|
|
4622
|
-
}) {
|
|
4623
|
-
const Comp = asChild ? Slot7 : "h5";
|
|
4624
|
-
return /* @__PURE__ */ jsx47(
|
|
4625
|
-
Comp,
|
|
4626
|
-
{
|
|
4627
|
-
"data-slot": "h5",
|
|
4628
|
-
className: cn(
|
|
4629
|
-
"text-sm leading-[1.25rem] font-semibold font-sans",
|
|
4630
|
-
className
|
|
4631
|
-
),
|
|
4632
|
-
...props
|
|
4633
|
-
}
|
|
4634
|
-
);
|
|
4635
|
-
}
|
|
4636
|
-
function HeadingXXS({
|
|
4637
|
-
className,
|
|
4638
|
-
asChild = false,
|
|
4639
|
-
...props
|
|
4640
|
-
}) {
|
|
4641
|
-
const Comp = asChild ? Slot7 : "h6";
|
|
4642
|
-
return /* @__PURE__ */ jsx47(
|
|
4643
|
-
Comp,
|
|
4644
|
-
{
|
|
4645
|
-
"data-slot": "h5",
|
|
4646
|
-
className: cn(
|
|
4647
|
-
"text-xs leading-[1rem] font-semibold font-sans",
|
|
4648
|
-
className
|
|
4649
|
-
),
|
|
4650
|
-
...props
|
|
4651
|
-
}
|
|
4652
|
-
);
|
|
4653
|
-
}
|
|
4654
4609
|
export {
|
|
4655
4610
|
Accordion,
|
|
4656
4611
|
AccordionContent,
|
|
@@ -4675,7 +4630,6 @@ export {
|
|
|
4675
4630
|
AvatarFallback,
|
|
4676
4631
|
AvatarImage,
|
|
4677
4632
|
Badge,
|
|
4678
|
-
Body,
|
|
4679
4633
|
Breadcrumb,
|
|
4680
4634
|
BreadcrumbEllipsis,
|
|
4681
4635
|
BreadcrumbItem,
|
|
@@ -4742,7 +4696,6 @@ export {
|
|
|
4742
4696
|
DialogPortal,
|
|
4743
4697
|
DialogTitle,
|
|
4744
4698
|
DialogTrigger,
|
|
4745
|
-
DisplayHeading,
|
|
4746
4699
|
Drawer,
|
|
4747
4700
|
DrawerClose,
|
|
4748
4701
|
DrawerContent,
|
|
@@ -4775,12 +4728,6 @@ export {
|
|
|
4775
4728
|
FormItem,
|
|
4776
4729
|
FormLabel,
|
|
4777
4730
|
FormMessage,
|
|
4778
|
-
HeadingL,
|
|
4779
|
-
HeadingM,
|
|
4780
|
-
HeadingS,
|
|
4781
|
-
HeadingXL,
|
|
4782
|
-
HeadingXS,
|
|
4783
|
-
HeadingXXS,
|
|
4784
4731
|
HoverCard,
|
|
4785
4732
|
HoverCardContent,
|
|
4786
4733
|
HoverCardTrigger,
|
|
@@ -4900,10 +4847,9 @@ export {
|
|
|
4900
4847
|
TooltipProvider,
|
|
4901
4848
|
TooltipTrigger,
|
|
4902
4849
|
badgeVariants,
|
|
4903
|
-
bodyTextVariants,
|
|
4904
4850
|
buttonVariants,
|
|
4905
4851
|
cn,
|
|
4906
|
-
|
|
4852
|
+
inputVariants,
|
|
4907
4853
|
labelTextVariants,
|
|
4908
4854
|
navigationMenuTriggerStyle,
|
|
4909
4855
|
toggleVariants,
|