@webstacks/ui 0.4.4 → 0.4.5
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.cjs +144 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +33 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +144 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -143,7 +143,7 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
|
|
|
143
143
|
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
144
144
|
|
|
145
145
|
declare const badgeVariants: (props?: ({
|
|
146
|
-
variant?: "default" | "destructive" | "
|
|
146
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
147
147
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
148
148
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
149
149
|
}
|
|
@@ -214,8 +214,10 @@ interface BoxProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "color">, O
|
|
|
214
214
|
declare const Box: React$1.ForwardRefExoticComponent<BoxProps & React$1.RefAttributes<HTMLElement>>;
|
|
215
215
|
|
|
216
216
|
declare const buttonVariants: (props?: ({
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
mode?: "link" | "stroke" | "filled" | "bleed" | null | undefined;
|
|
218
|
+
tone?: "primary" | "secondary" | "tertiary" | null | undefined;
|
|
219
|
+
size?: "xs" | "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
220
|
+
fullWidth?: boolean | null | undefined;
|
|
219
221
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
220
222
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
221
223
|
asChild?: boolean;
|
|
@@ -357,8 +359,9 @@ interface StackProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "dir">, O
|
|
|
357
359
|
}
|
|
358
360
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLElement>>;
|
|
359
361
|
|
|
360
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout,
|
|
361
|
-
|
|
362
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonMode, buttonTone, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
|
|
363
|
+
buttonMode?: React$1.ComponentProps<typeof Button>["mode"];
|
|
364
|
+
buttonTone?: React$1.ComponentProps<typeof Button>["tone"];
|
|
362
365
|
}): react_jsx_runtime.JSX.Element;
|
|
363
366
|
declare function CalendarDayButton({ className, day, modifiers, ...props }: React$1.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
|
|
364
367
|
|
package/dist/index.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
|
|
|
143
143
|
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
144
144
|
|
|
145
145
|
declare const badgeVariants: (props?: ({
|
|
146
|
-
variant?: "default" | "destructive" | "
|
|
146
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
147
147
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
148
148
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
149
149
|
}
|
|
@@ -214,8 +214,10 @@ interface BoxProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "color">, O
|
|
|
214
214
|
declare const Box: React$1.ForwardRefExoticComponent<BoxProps & React$1.RefAttributes<HTMLElement>>;
|
|
215
215
|
|
|
216
216
|
declare const buttonVariants: (props?: ({
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
mode?: "link" | "stroke" | "filled" | "bleed" | null | undefined;
|
|
218
|
+
tone?: "primary" | "secondary" | "tertiary" | null | undefined;
|
|
219
|
+
size?: "xs" | "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
220
|
+
fullWidth?: boolean | null | undefined;
|
|
219
221
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
220
222
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
221
223
|
asChild?: boolean;
|
|
@@ -357,8 +359,9 @@ interface StackProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "dir">, O
|
|
|
357
359
|
}
|
|
358
360
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLElement>>;
|
|
359
361
|
|
|
360
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout,
|
|
361
|
-
|
|
362
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonMode, buttonTone, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
|
|
363
|
+
buttonMode?: React$1.ComponentProps<typeof Button>["mode"];
|
|
364
|
+
buttonTone?: React$1.ComponentProps<typeof Button>["tone"];
|
|
362
365
|
}): react_jsx_runtime.JSX.Element;
|
|
363
366
|
declare function CalendarDayButton({ className, day, modifiers, ...props }: React$1.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
|
|
364
367
|
|
package/dist/index.js
CHANGED
|
@@ -275,37 +275,148 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
275
275
|
import { cva as cva2 } from "class-variance-authority";
|
|
276
276
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
277
277
|
var buttonVariants = cva2(
|
|
278
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full
|
|
278
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
279
279
|
{
|
|
280
280
|
variants: {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
281
|
+
mode: {
|
|
282
|
+
filled: "",
|
|
283
|
+
stroke: "bg-transparent border",
|
|
284
|
+
bleed: "!bg-transparent border-0 !rounded hover:!bg-foreground/5 disabled:opacity-50",
|
|
285
|
+
link: "disabled:opacity-50"
|
|
286
|
+
},
|
|
287
|
+
tone: {
|
|
288
|
+
primary: "",
|
|
289
|
+
secondary: "",
|
|
290
|
+
tertiary: ""
|
|
288
291
|
},
|
|
289
292
|
size: {
|
|
290
|
-
|
|
291
|
-
sm: "
|
|
292
|
-
|
|
293
|
+
xs: "",
|
|
294
|
+
sm: "px-4 py-2 text-xs",
|
|
295
|
+
md: "px-6 py-3 text-sm",
|
|
296
|
+
lg: "px-8 py-4 text-base",
|
|
293
297
|
icon: "h-9 w-9"
|
|
298
|
+
},
|
|
299
|
+
fullWidth: {
|
|
300
|
+
true: "w-full",
|
|
301
|
+
false: ""
|
|
294
302
|
}
|
|
295
303
|
},
|
|
296
304
|
defaultVariants: {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
305
|
+
mode: "filled",
|
|
306
|
+
tone: "primary",
|
|
307
|
+
size: "md"
|
|
308
|
+
},
|
|
309
|
+
compoundVariants: [
|
|
310
|
+
/* ── Filled ── */
|
|
311
|
+
{
|
|
312
|
+
mode: "filled",
|
|
313
|
+
tone: "primary",
|
|
314
|
+
className: "bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
mode: "filled",
|
|
318
|
+
tone: "secondary",
|
|
319
|
+
className: "bg-foreground text-background hover:bg-foreground/90 dark:bg-background dark:text-foreground dark:hover:bg-background/90 dark:border dark:border-border disabled:opacity-50"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
mode: "filled",
|
|
323
|
+
tone: "tertiary",
|
|
324
|
+
className: "bg-muted text-foreground hover:bg-muted/80 disabled:opacity-50"
|
|
325
|
+
},
|
|
326
|
+
/* ── Stroke ── */
|
|
327
|
+
{
|
|
328
|
+
mode: "stroke",
|
|
329
|
+
tone: "primary",
|
|
330
|
+
className: "border-primary text-primary hover:bg-primary hover:text-primary-foreground disabled:opacity-50"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
mode: "stroke",
|
|
334
|
+
tone: "secondary",
|
|
335
|
+
className: "border-border text-foreground hover:bg-primary hover:text-primary-foreground hover:border-primary disabled:opacity-50"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
mode: "stroke",
|
|
339
|
+
tone: "tertiary",
|
|
340
|
+
className: "border-border text-foreground hover:bg-accent disabled:opacity-50"
|
|
341
|
+
},
|
|
342
|
+
/* ── Bleed ── */
|
|
343
|
+
{
|
|
344
|
+
mode: "bleed",
|
|
345
|
+
tone: "primary",
|
|
346
|
+
className: "text-foreground"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
mode: "bleed",
|
|
350
|
+
tone: "secondary",
|
|
351
|
+
className: "text-foreground"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
mode: "bleed",
|
|
355
|
+
tone: "tertiary",
|
|
356
|
+
className: "text-muted-foreground"
|
|
357
|
+
},
|
|
358
|
+
/* ── Link ── */
|
|
359
|
+
{
|
|
360
|
+
mode: "link",
|
|
361
|
+
tone: "primary",
|
|
362
|
+
className: "text-primary underline-offset-4 hover:underline"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
mode: "link",
|
|
366
|
+
tone: "secondary",
|
|
367
|
+
className: "text-foreground underline-offset-4 hover:underline"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
mode: "link",
|
|
371
|
+
tone: "tertiary",
|
|
372
|
+
className: "text-muted-foreground underline-offset-4 hover:underline"
|
|
373
|
+
},
|
|
374
|
+
/* ── Link + Bleed size overrides ── */
|
|
375
|
+
{
|
|
376
|
+
mode: "link",
|
|
377
|
+
size: "xs",
|
|
378
|
+
className: "text-xs"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
mode: "link",
|
|
382
|
+
size: "sm",
|
|
383
|
+
className: "px-0 py-0 text-sm"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
mode: "link",
|
|
387
|
+
size: "md",
|
|
388
|
+
className: "px-0 py-0 text-sm"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
mode: "link",
|
|
392
|
+
size: "lg",
|
|
393
|
+
className: "px-0 py-0 text-base"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
mode: "bleed",
|
|
397
|
+
size: "sm",
|
|
398
|
+
className: "px-2 py-1 text-sm"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
mode: "bleed",
|
|
402
|
+
size: "md",
|
|
403
|
+
className: "px-3 py-2 text-sm"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
mode: "bleed",
|
|
407
|
+
size: "lg",
|
|
408
|
+
className: "px-3 py-2 text-base"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
300
411
|
}
|
|
301
412
|
);
|
|
302
413
|
var Button = React6.forwardRef(
|
|
303
|
-
({ className,
|
|
414
|
+
({ className, mode, tone, size, fullWidth, asChild = false, ...props }, ref) => {
|
|
304
415
|
const Comp = asChild ? Slot : "button";
|
|
305
416
|
return /* @__PURE__ */ jsx4(
|
|
306
417
|
Comp,
|
|
307
418
|
{
|
|
308
|
-
className: cn(buttonVariants({
|
|
419
|
+
className: cn(buttonVariants({ mode, tone, size, fullWidth, className })),
|
|
309
420
|
ref,
|
|
310
421
|
...props
|
|
311
422
|
}
|
|
@@ -406,7 +517,7 @@ var AlertDialogCancel = React7.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
406
517
|
{
|
|
407
518
|
ref,
|
|
408
519
|
className: cn(
|
|
409
|
-
buttonVariants({
|
|
520
|
+
buttonVariants({ mode: "stroke", tone: "secondary" }),
|
|
410
521
|
"mt-2 sm:mt-0",
|
|
411
522
|
className
|
|
412
523
|
),
|
|
@@ -1610,7 +1721,8 @@ function Calendar({
|
|
|
1610
1721
|
classNames,
|
|
1611
1722
|
showOutsideDays = true,
|
|
1612
1723
|
captionLayout = "label",
|
|
1613
|
-
|
|
1724
|
+
buttonMode = "bleed",
|
|
1725
|
+
buttonTone = "primary",
|
|
1614
1726
|
formatters,
|
|
1615
1727
|
components,
|
|
1616
1728
|
...props
|
|
@@ -1643,12 +1755,12 @@ function Calendar({
|
|
|
1643
1755
|
defaultClassNames.nav
|
|
1644
1756
|
),
|
|
1645
1757
|
button_previous: cn(
|
|
1646
|
-
buttonVariants({
|
|
1758
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1647
1759
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1648
1760
|
defaultClassNames.button_previous
|
|
1649
1761
|
),
|
|
1650
1762
|
button_next: cn(
|
|
1651
|
-
buttonVariants({
|
|
1763
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1652
1764
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1653
1765
|
defaultClassNames.button_next
|
|
1654
1766
|
),
|
|
@@ -1765,7 +1877,7 @@ function CalendarDayButton({
|
|
|
1765
1877
|
Button,
|
|
1766
1878
|
{
|
|
1767
1879
|
ref,
|
|
1768
|
-
|
|
1880
|
+
mode: "bleed",
|
|
1769
1881
|
size: "icon",
|
|
1770
1882
|
"data-day": day.date.toLocaleDateString(),
|
|
1771
1883
|
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
@@ -1974,13 +2086,14 @@ var CarouselItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1974
2086
|
);
|
|
1975
2087
|
});
|
|
1976
2088
|
CarouselItem.displayName = "CarouselItem";
|
|
1977
|
-
var CarouselPrevious = React18.forwardRef(({ className,
|
|
2089
|
+
var CarouselPrevious = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
1978
2090
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1979
2091
|
return /* @__PURE__ */ jsxs5(
|
|
1980
2092
|
Button,
|
|
1981
2093
|
{
|
|
1982
2094
|
ref,
|
|
1983
|
-
|
|
2095
|
+
mode,
|
|
2096
|
+
tone,
|
|
1984
2097
|
size,
|
|
1985
2098
|
className: cn(
|
|
1986
2099
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -1998,13 +2111,14 @@ var CarouselPrevious = React18.forwardRef(({ className, variant = "outline", siz
|
|
|
1998
2111
|
);
|
|
1999
2112
|
});
|
|
2000
2113
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
2001
|
-
var CarouselNext = React18.forwardRef(({ className,
|
|
2114
|
+
var CarouselNext = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
2002
2115
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
2003
2116
|
return /* @__PURE__ */ jsxs5(
|
|
2004
2117
|
Button,
|
|
2005
2118
|
{
|
|
2006
2119
|
ref,
|
|
2007
|
-
|
|
2120
|
+
mode,
|
|
2121
|
+
tone,
|
|
2008
2122
|
size,
|
|
2009
2123
|
className: cn(
|
|
2010
2124
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -3373,7 +3487,8 @@ var PaginationLink = ({
|
|
|
3373
3487
|
"aria-current": isActive ? "page" : void 0,
|
|
3374
3488
|
className: cn(
|
|
3375
3489
|
buttonVariants({
|
|
3376
|
-
|
|
3490
|
+
mode: isActive ? "stroke" : "bleed",
|
|
3491
|
+
tone: "secondary",
|
|
3377
3492
|
size
|
|
3378
3493
|
}),
|
|
3379
3494
|
className
|
|
@@ -3389,7 +3504,7 @@ var PaginationPrevious = ({
|
|
|
3389
3504
|
PaginationLink,
|
|
3390
3505
|
{
|
|
3391
3506
|
"aria-label": "Go to previous page",
|
|
3392
|
-
size: "
|
|
3507
|
+
size: "md",
|
|
3393
3508
|
className: cn("gap-1 pl-2.5", className),
|
|
3394
3509
|
...props,
|
|
3395
3510
|
children: [
|
|
@@ -3406,7 +3521,7 @@ var PaginationNext = ({
|
|
|
3406
3521
|
PaginationLink,
|
|
3407
3522
|
{
|
|
3408
3523
|
"aria-label": "Go to next page",
|
|
3409
|
-
size: "
|
|
3524
|
+
size: "md",
|
|
3410
3525
|
className: cn("gap-1 pr-2.5", className),
|
|
3411
3526
|
...props,
|
|
3412
3527
|
children: [
|
|
@@ -4053,7 +4168,7 @@ var SidebarTrigger = React42.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
4053
4168
|
{
|
|
4054
4169
|
ref,
|
|
4055
4170
|
"data-sidebar": "trigger",
|
|
4056
|
-
|
|
4171
|
+
mode: "bleed",
|
|
4057
4172
|
size: "icon",
|
|
4058
4173
|
className: cn("h-7 w-7", className),
|
|
4059
4174
|
onClick: (event) => {
|