@webstacks/ui 0.4.3 → 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/README.md +25 -15
- package/dist/index.cjs +273 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +275 -2
- 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 +273 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/tokens.css +2 -2
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
|
),
|
|
@@ -868,6 +979,34 @@ var columnMap = {
|
|
|
868
979
|
11: "grid-cols-11",
|
|
869
980
|
12: "grid-cols-12"
|
|
870
981
|
};
|
|
982
|
+
var mdColumnMap = {
|
|
983
|
+
1: "md:grid-cols-1",
|
|
984
|
+
2: "md:grid-cols-2",
|
|
985
|
+
3: "md:grid-cols-3",
|
|
986
|
+
4: "md:grid-cols-4",
|
|
987
|
+
5: "md:grid-cols-5",
|
|
988
|
+
6: "md:grid-cols-6",
|
|
989
|
+
7: "md:grid-cols-7",
|
|
990
|
+
8: "md:grid-cols-8",
|
|
991
|
+
9: "md:grid-cols-9",
|
|
992
|
+
10: "md:grid-cols-10",
|
|
993
|
+
11: "md:grid-cols-11",
|
|
994
|
+
12: "md:grid-cols-12"
|
|
995
|
+
};
|
|
996
|
+
var lgColumnMap = {
|
|
997
|
+
1: "lg:grid-cols-1",
|
|
998
|
+
2: "lg:grid-cols-2",
|
|
999
|
+
3: "lg:grid-cols-3",
|
|
1000
|
+
4: "lg:grid-cols-4",
|
|
1001
|
+
5: "lg:grid-cols-5",
|
|
1002
|
+
6: "lg:grid-cols-6",
|
|
1003
|
+
7: "lg:grid-cols-7",
|
|
1004
|
+
8: "lg:grid-cols-8",
|
|
1005
|
+
9: "lg:grid-cols-9",
|
|
1006
|
+
10: "lg:grid-cols-10",
|
|
1007
|
+
11: "lg:grid-cols-11",
|
|
1008
|
+
12: "lg:grid-cols-12"
|
|
1009
|
+
};
|
|
871
1010
|
var Grid = React11.forwardRef(
|
|
872
1011
|
({ as: Comp = "div", className, columns = 12, gap, gapX, gapY, align, justify, ...props }, ref) => {
|
|
873
1012
|
let columnClasses;
|
|
@@ -876,8 +1015,8 @@ var Grid = React11.forwardRef(
|
|
|
876
1015
|
} else {
|
|
877
1016
|
const classes = [];
|
|
878
1017
|
if (columns.narrow) classes.push(columnMap[columns.narrow]);
|
|
879
|
-
if (columns.regular) classes.push(
|
|
880
|
-
if (columns.wide) classes.push(
|
|
1018
|
+
if (columns.regular) classes.push(mdColumnMap[columns.regular]);
|
|
1019
|
+
if (columns.wide) classes.push(lgColumnMap[columns.wide]);
|
|
881
1020
|
columnClasses = classes.join(" ");
|
|
882
1021
|
}
|
|
883
1022
|
return /* @__PURE__ */ jsx10(
|
|
@@ -942,6 +1081,34 @@ var spanMap = {
|
|
|
942
1081
|
11: "col-span-11",
|
|
943
1082
|
12: "col-span-12"
|
|
944
1083
|
};
|
|
1084
|
+
var mdSpanMap = {
|
|
1085
|
+
1: "md:col-span-1",
|
|
1086
|
+
2: "md:col-span-2",
|
|
1087
|
+
3: "md:col-span-3",
|
|
1088
|
+
4: "md:col-span-4",
|
|
1089
|
+
5: "md:col-span-5",
|
|
1090
|
+
6: "md:col-span-6",
|
|
1091
|
+
7: "md:col-span-7",
|
|
1092
|
+
8: "md:col-span-8",
|
|
1093
|
+
9: "md:col-span-9",
|
|
1094
|
+
10: "md:col-span-10",
|
|
1095
|
+
11: "md:col-span-11",
|
|
1096
|
+
12: "md:col-span-12"
|
|
1097
|
+
};
|
|
1098
|
+
var lgSpanMap = {
|
|
1099
|
+
1: "lg:col-span-1",
|
|
1100
|
+
2: "lg:col-span-2",
|
|
1101
|
+
3: "lg:col-span-3",
|
|
1102
|
+
4: "lg:col-span-4",
|
|
1103
|
+
5: "lg:col-span-5",
|
|
1104
|
+
6: "lg:col-span-6",
|
|
1105
|
+
7: "lg:col-span-7",
|
|
1106
|
+
8: "lg:col-span-8",
|
|
1107
|
+
9: "lg:col-span-9",
|
|
1108
|
+
10: "lg:col-span-10",
|
|
1109
|
+
11: "lg:col-span-11",
|
|
1110
|
+
12: "lg:col-span-12"
|
|
1111
|
+
};
|
|
945
1112
|
var GridColumn = React11.forwardRef(
|
|
946
1113
|
({ as: Comp = "div", className, span, start, ...props }, ref) => {
|
|
947
1114
|
let spanClasses;
|
|
@@ -950,8 +1117,8 @@ var GridColumn = React11.forwardRef(
|
|
|
950
1117
|
} else if (span) {
|
|
951
1118
|
const classes = [];
|
|
952
1119
|
if (span.narrow) classes.push(spanMap[span.narrow]);
|
|
953
|
-
if (span.regular) classes.push(
|
|
954
|
-
if (span.wide) classes.push(
|
|
1120
|
+
if (span.regular) classes.push(mdSpanMap[span.regular]);
|
|
1121
|
+
if (span.wide) classes.push(lgSpanMap[span.wide]);
|
|
955
1122
|
spanClasses = classes.join(" ");
|
|
956
1123
|
} else {
|
|
957
1124
|
spanClasses = "";
|
|
@@ -1400,6 +1567,14 @@ var directionMap = {
|
|
|
1400
1567
|
horizontal: "flex-row",
|
|
1401
1568
|
vertical: "flex-col"
|
|
1402
1569
|
};
|
|
1570
|
+
var mdDirectionMap = {
|
|
1571
|
+
horizontal: "md:flex-row",
|
|
1572
|
+
vertical: "md:flex-col"
|
|
1573
|
+
};
|
|
1574
|
+
var lgDirectionMap = {
|
|
1575
|
+
horizontal: "lg:flex-row",
|
|
1576
|
+
vertical: "lg:flex-col"
|
|
1577
|
+
};
|
|
1403
1578
|
var gapMap = {
|
|
1404
1579
|
none: "gap-0",
|
|
1405
1580
|
condensed: "gap-2",
|
|
@@ -1407,6 +1582,20 @@ var gapMap = {
|
|
|
1407
1582
|
spacious: "gap-6",
|
|
1408
1583
|
"extra-spacious": "gap-8"
|
|
1409
1584
|
};
|
|
1585
|
+
var mdGapMap = {
|
|
1586
|
+
none: "md:gap-0",
|
|
1587
|
+
condensed: "md:gap-2",
|
|
1588
|
+
normal: "md:gap-4",
|
|
1589
|
+
spacious: "md:gap-6",
|
|
1590
|
+
"extra-spacious": "md:gap-8"
|
|
1591
|
+
};
|
|
1592
|
+
var lgGapMap = {
|
|
1593
|
+
none: "lg:gap-0",
|
|
1594
|
+
condensed: "lg:gap-2",
|
|
1595
|
+
normal: "lg:gap-4",
|
|
1596
|
+
spacious: "lg:gap-6",
|
|
1597
|
+
"extra-spacious": "lg:gap-8"
|
|
1598
|
+
};
|
|
1410
1599
|
var alignMap = {
|
|
1411
1600
|
start: "items-start",
|
|
1412
1601
|
center: "items-center",
|
|
@@ -1414,6 +1603,20 @@ var alignMap = {
|
|
|
1414
1603
|
stretch: "items-stretch",
|
|
1415
1604
|
baseline: "items-baseline"
|
|
1416
1605
|
};
|
|
1606
|
+
var mdAlignMap = {
|
|
1607
|
+
start: "md:items-start",
|
|
1608
|
+
center: "md:items-center",
|
|
1609
|
+
end: "md:items-end",
|
|
1610
|
+
stretch: "md:items-stretch",
|
|
1611
|
+
baseline: "md:items-baseline"
|
|
1612
|
+
};
|
|
1613
|
+
var lgAlignMap = {
|
|
1614
|
+
start: "lg:items-start",
|
|
1615
|
+
center: "lg:items-center",
|
|
1616
|
+
end: "lg:items-end",
|
|
1617
|
+
stretch: "lg:items-stretch",
|
|
1618
|
+
baseline: "lg:items-baseline"
|
|
1619
|
+
};
|
|
1417
1620
|
var justifyMap = {
|
|
1418
1621
|
start: "justify-start",
|
|
1419
1622
|
center: "justify-center",
|
|
@@ -1422,16 +1625,37 @@ var justifyMap = {
|
|
|
1422
1625
|
"space-around": "justify-around",
|
|
1423
1626
|
"space-evenly": "justify-evenly"
|
|
1424
1627
|
};
|
|
1425
|
-
|
|
1628
|
+
var mdJustifyMap = {
|
|
1629
|
+
start: "md:justify-start",
|
|
1630
|
+
center: "md:justify-center",
|
|
1631
|
+
end: "md:justify-end",
|
|
1632
|
+
"space-between": "md:justify-between",
|
|
1633
|
+
"space-around": "md:justify-around",
|
|
1634
|
+
"space-evenly": "md:justify-evenly"
|
|
1635
|
+
};
|
|
1636
|
+
var lgJustifyMap = {
|
|
1637
|
+
start: "lg:justify-start",
|
|
1638
|
+
center: "lg:justify-center",
|
|
1639
|
+
end: "lg:justify-end",
|
|
1640
|
+
"space-between": "lg:justify-between",
|
|
1641
|
+
"space-around": "lg:justify-around",
|
|
1642
|
+
"space-evenly": "lg:justify-evenly"
|
|
1643
|
+
};
|
|
1644
|
+
function resolveResponsive3(value, maps) {
|
|
1426
1645
|
if (!value) return [];
|
|
1427
|
-
if (typeof value === "string") return [
|
|
1646
|
+
if (typeof value === "string") return [maps.narrow[value]].filter(Boolean);
|
|
1428
1647
|
const classes = [];
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
if (
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1648
|
+
if (value.narrow) {
|
|
1649
|
+
const cls = maps.narrow[value.narrow];
|
|
1650
|
+
if (cls) classes.push(cls);
|
|
1651
|
+
}
|
|
1652
|
+
if (value.regular) {
|
|
1653
|
+
const cls = maps.regular[value.regular];
|
|
1654
|
+
if (cls) classes.push(cls);
|
|
1655
|
+
}
|
|
1656
|
+
if (value.wide) {
|
|
1657
|
+
const cls = maps.wide[value.wide];
|
|
1658
|
+
if (cls) classes.push(cls);
|
|
1435
1659
|
}
|
|
1436
1660
|
return classes;
|
|
1437
1661
|
}
|
|
@@ -1448,10 +1672,10 @@ var Stack = React15.forwardRef(
|
|
|
1448
1672
|
...props
|
|
1449
1673
|
}, ref) => {
|
|
1450
1674
|
const responsiveClasses = [
|
|
1451
|
-
...resolveResponsive3(direction, directionMap),
|
|
1452
|
-
...resolveResponsive3(gap, gapMap),
|
|
1453
|
-
...resolveResponsive3(align, alignMap),
|
|
1454
|
-
...resolveResponsive3(justify, justifyMap)
|
|
1675
|
+
...resolveResponsive3(direction, { narrow: directionMap, regular: mdDirectionMap, wide: lgDirectionMap }),
|
|
1676
|
+
...resolveResponsive3(gap, { narrow: gapMap, regular: mdGapMap, wide: lgGapMap }),
|
|
1677
|
+
...resolveResponsive3(align, { narrow: alignMap, regular: mdAlignMap, wide: lgAlignMap }),
|
|
1678
|
+
...resolveResponsive3(justify, { narrow: justifyMap, regular: mdJustifyMap, wide: lgJustifyMap })
|
|
1455
1679
|
];
|
|
1456
1680
|
const isResponsiveDirection = typeof direction === "object";
|
|
1457
1681
|
const isResponsiveGap = typeof gap === "object";
|
|
@@ -1497,7 +1721,8 @@ function Calendar({
|
|
|
1497
1721
|
classNames,
|
|
1498
1722
|
showOutsideDays = true,
|
|
1499
1723
|
captionLayout = "label",
|
|
1500
|
-
|
|
1724
|
+
buttonMode = "bleed",
|
|
1725
|
+
buttonTone = "primary",
|
|
1501
1726
|
formatters,
|
|
1502
1727
|
components,
|
|
1503
1728
|
...props
|
|
@@ -1530,12 +1755,12 @@ function Calendar({
|
|
|
1530
1755
|
defaultClassNames.nav
|
|
1531
1756
|
),
|
|
1532
1757
|
button_previous: cn(
|
|
1533
|
-
buttonVariants({
|
|
1758
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1534
1759
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1535
1760
|
defaultClassNames.button_previous
|
|
1536
1761
|
),
|
|
1537
1762
|
button_next: cn(
|
|
1538
|
-
buttonVariants({
|
|
1763
|
+
buttonVariants({ mode: buttonMode, tone: buttonTone }),
|
|
1539
1764
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1540
1765
|
defaultClassNames.button_next
|
|
1541
1766
|
),
|
|
@@ -1652,7 +1877,7 @@ function CalendarDayButton({
|
|
|
1652
1877
|
Button,
|
|
1653
1878
|
{
|
|
1654
1879
|
ref,
|
|
1655
|
-
|
|
1880
|
+
mode: "bleed",
|
|
1656
1881
|
size: "icon",
|
|
1657
1882
|
"data-day": day.date.toLocaleDateString(),
|
|
1658
1883
|
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
@@ -1861,13 +2086,14 @@ var CarouselItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1861
2086
|
);
|
|
1862
2087
|
});
|
|
1863
2088
|
CarouselItem.displayName = "CarouselItem";
|
|
1864
|
-
var CarouselPrevious = React18.forwardRef(({ className,
|
|
2089
|
+
var CarouselPrevious = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
1865
2090
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1866
2091
|
return /* @__PURE__ */ jsxs5(
|
|
1867
2092
|
Button,
|
|
1868
2093
|
{
|
|
1869
2094
|
ref,
|
|
1870
|
-
|
|
2095
|
+
mode,
|
|
2096
|
+
tone,
|
|
1871
2097
|
size,
|
|
1872
2098
|
className: cn(
|
|
1873
2099
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -1885,13 +2111,14 @@ var CarouselPrevious = React18.forwardRef(({ className, variant = "outline", siz
|
|
|
1885
2111
|
);
|
|
1886
2112
|
});
|
|
1887
2113
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1888
|
-
var CarouselNext = React18.forwardRef(({ className,
|
|
2114
|
+
var CarouselNext = React18.forwardRef(({ className, mode = "stroke", tone = "secondary", size = "icon", ...props }, ref) => {
|
|
1889
2115
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1890
2116
|
return /* @__PURE__ */ jsxs5(
|
|
1891
2117
|
Button,
|
|
1892
2118
|
{
|
|
1893
2119
|
ref,
|
|
1894
|
-
|
|
2120
|
+
mode,
|
|
2121
|
+
tone,
|
|
1895
2122
|
size,
|
|
1896
2123
|
className: cn(
|
|
1897
2124
|
"absolute h-8 w-8 rounded-full",
|
|
@@ -3260,7 +3487,8 @@ var PaginationLink = ({
|
|
|
3260
3487
|
"aria-current": isActive ? "page" : void 0,
|
|
3261
3488
|
className: cn(
|
|
3262
3489
|
buttonVariants({
|
|
3263
|
-
|
|
3490
|
+
mode: isActive ? "stroke" : "bleed",
|
|
3491
|
+
tone: "secondary",
|
|
3264
3492
|
size
|
|
3265
3493
|
}),
|
|
3266
3494
|
className
|
|
@@ -3276,7 +3504,7 @@ var PaginationPrevious = ({
|
|
|
3276
3504
|
PaginationLink,
|
|
3277
3505
|
{
|
|
3278
3506
|
"aria-label": "Go to previous page",
|
|
3279
|
-
size: "
|
|
3507
|
+
size: "md",
|
|
3280
3508
|
className: cn("gap-1 pl-2.5", className),
|
|
3281
3509
|
...props,
|
|
3282
3510
|
children: [
|
|
@@ -3293,7 +3521,7 @@ var PaginationNext = ({
|
|
|
3293
3521
|
PaginationLink,
|
|
3294
3522
|
{
|
|
3295
3523
|
"aria-label": "Go to next page",
|
|
3296
|
-
size: "
|
|
3524
|
+
size: "md",
|
|
3297
3525
|
className: cn("gap-1 pr-2.5", className),
|
|
3298
3526
|
...props,
|
|
3299
3527
|
children: [
|
|
@@ -3940,7 +4168,7 @@ var SidebarTrigger = React42.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
3940
4168
|
{
|
|
3941
4169
|
ref,
|
|
3942
4170
|
"data-sidebar": "trigger",
|
|
3943
|
-
|
|
4171
|
+
mode: "bleed",
|
|
3944
4172
|
size: "icon",
|
|
3945
4173
|
className: cn("h-7 w-7", className),
|
|
3946
4174
|
onClick: (event) => {
|