beez-ui 2.5.0 → 2.6.1
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/CHANGELOG.md +63 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/components/alert-dialog.d.ts +15 -4
- package/dist/components/alert-dialog.js +84 -44
- package/dist/components/alert.d.ts +30 -9
- package/dist/components/alert.js +360 -39
- package/dist/components/avatar.d.ts +33 -10
- package/dist/components/avatar.js +110 -30
- package/dist/components/badge.d.ts +39 -7
- package/dist/components/badge.js +348 -24
- package/dist/components/calendar.d.ts +29 -2
- package/dist/components/calendar.js +1035 -223
- package/dist/components/card.d.ts +17 -1
- package/dist/components/card.js +34 -8
- package/dist/components/carousel.d.ts +29 -2
- package/dist/components/carousel.js +471 -90
- package/dist/components/checkbox.d.ts +13 -2
- package/dist/components/checkbox.js +301 -41
- package/dist/components/dialog-surface.d.ts +27 -0
- package/dist/components/dialog-surface.js +137 -0
- package/dist/components/dialog.d.ts +21 -4
- package/dist/components/dialog.js +163 -96
- package/dist/components/dropdown-menu.d.ts +30 -16
- package/dist/components/dropdown-menu.js +139 -83
- package/dist/components/hover-card.d.ts +46 -3
- package/dist/components/hover-card.js +423 -60
- package/dist/components/pagination.d.ts +32 -14
- package/dist/components/pagination.js +136 -59
- package/dist/components/popover.d.ts +14 -5
- package/dist/components/popover.js +78 -36
- package/dist/components/radio-group.d.ts +19 -3
- package/dist/components/radio-group.js +400 -57
- package/dist/components/select.d.ts +17 -6
- package/dist/components/select.js +83 -71
- package/dist/components/sheet.js +37 -26
- package/dist/components/sidebar.js +11 -0
- package/dist/components/skeleton.d.ts +19 -5
- package/dist/components/skeleton.js +434 -14
- package/dist/components/switch.d.ts +14 -4
- package/dist/components/switch.js +424 -40
- package/dist/components/tabs.d.ts +38 -5
- package/dist/components/tabs.js +564 -97
- package/dist/components/themed-toaster.d.ts +6 -2
- package/dist/components/themed-toaster.js +80 -50
- package/dist/components/tooltip.d.ts +33 -2
- package/dist/components/tooltip.js +197 -69
- package/dist/constants/alert.d.ts +12 -0
- package/dist/constants/alert.js +9 -0
- package/dist/constants/avatar.d.ts +10 -0
- package/dist/constants/avatar.js +7 -0
- package/dist/constants/badge.d.ts +6 -0
- package/dist/constants/badge.js +6 -0
- package/dist/constants/calendar.d.ts +24 -0
- package/dist/constants/calendar.js +22 -0
- package/dist/constants/carousel.d.ts +37 -0
- package/dist/constants/carousel.js +53 -0
- package/dist/constants/checkbox.d.ts +17 -0
- package/dist/constants/checkbox.js +17 -0
- package/dist/constants/dialog.d.ts +6 -0
- package/dist/constants/dialog.js +6 -0
- package/dist/constants/dropdown-menu.d.ts +5 -0
- package/dist/constants/dropdown-menu.js +5 -0
- package/dist/constants/hover-card.d.ts +37 -0
- package/dist/constants/hover-card.js +85 -0
- package/dist/constants/pagination.d.ts +9 -0
- package/dist/constants/pagination.js +9 -0
- package/dist/constants/popover.d.ts +7 -0
- package/dist/constants/popover.js +39 -0
- package/dist/constants/radio-group.d.ts +10 -0
- package/dist/constants/radio-group.js +10 -0
- package/dist/constants/select.d.ts +3 -0
- package/dist/constants/select.js +3 -0
- package/dist/constants/skeleton.d.ts +17 -0
- package/dist/constants/skeleton.js +17 -0
- package/dist/constants/switch.d.ts +44 -0
- package/dist/constants/switch.js +49 -0
- package/dist/constants/tabs.d.ts +17 -0
- package/dist/constants/tabs.js +17 -0
- package/dist/constants/toast.d.ts +3 -0
- package/dist/constants/toast.js +3 -0
- package/dist/constants/tooltip.d.ts +13 -0
- package/dist/constants/tooltip.js +52 -0
- package/dist/lib/toast-layer.d.ts +24 -0
- package/dist/lib/toast-layer.js +76 -0
- package/dist/motion/arc-floating-slot.d.ts +40 -0
- package/dist/motion/arc-floating-slot.js +167 -0
- package/dist/motion/glide-indicator.d.ts +6 -7
- package/dist/motion/glide-indicator.js +5 -3
- package/dist/motion/overlay-warmth.d.ts +24 -0
- package/dist/motion/overlay-warmth.js +70 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arc's Card (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a contained group of related content on
|
|
3
|
+
* Arc's surface, panel radius and spacing. A card holding a link or button floats a little on fine-pointer hover,
|
|
4
|
+
* and `CardMedia` drifts its photo in slowly while the card is pointed at. The compound shadcn structure is kept;
|
|
5
|
+
* Arc's quick look is not part of it.
|
|
6
|
+
*/
|
|
1
7
|
import * as React from "react";
|
|
8
|
+
/**
|
|
9
|
+
* Card surface. The outline is a 1px ring in the border token, so the hover shadow can stack on it, and isolation
|
|
10
|
+
* keeps the rounded clip on media while the card lifts (Safari drops it otherwise).
|
|
11
|
+
*/
|
|
2
12
|
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
3
13
|
size?: "default" | "sm";
|
|
4
14
|
}): React.JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Arc's card media: a muted frame for a photo or illustration that zooms in slowly while the card is pointed at
|
|
17
|
+
* and eases back a little faster. Place it first to sit flush with the top edge.
|
|
18
|
+
*/
|
|
19
|
+
declare function CardMedia({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
20
|
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
21
|
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
22
|
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
23
|
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
24
|
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
|
+
/** Arc's footer row: a byline or meta on the start side and actions on the end, without a tinted band. */
|
|
10
26
|
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
27
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, CardMedia, };
|
package/dist/components/card.js
CHANGED
|
@@ -1,58 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arc's Card (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a contained group of related content on
|
|
3
|
+
* Arc's surface, panel radius and spacing. A card holding a link or button floats a little on fine-pointer hover,
|
|
4
|
+
* and `CardMedia` drifts its photo in slowly while the card is pointed at. The compound shadcn structure is kept;
|
|
5
|
+
* Arc's quick look is not part of it.
|
|
6
|
+
*/
|
|
1
7
|
import * as React from "react";
|
|
2
8
|
import { MotionSlot } from "../motion/motion-slot.js";
|
|
3
9
|
import { cn } from "../lib/utils.js";
|
|
4
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* Card surface. The outline is a 1px ring in the border token, so the hover shadow can stack on it, and isolation
|
|
13
|
+
* keeps the rounded clip on media while the card lifts (Safari drops it otherwise).
|
|
14
|
+
*/
|
|
5
15
|
function Card({ className, size = "default", ...props }) {
|
|
6
16
|
return /* @__PURE__ */ _jsx(MotionSlot, {
|
|
7
17
|
kind: "card",
|
|
8
18
|
children: /* @__PURE__ */ _jsx("div", {
|
|
9
19
|
"data-slot": "card",
|
|
10
20
|
"data-size": size,
|
|
11
|
-
className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-
|
|
21
|
+
className: cn("group/card isolate flex min-w-0 flex-col gap-(--space-4) overflow-hidden rounded-(--radius-panel) bg-surface py-(--space-5) text-sm text-foreground ring-1 ring-border has-[>img:first-child]:pt-0 has-[>[data-slot=card-media]:first-child]:pt-0 data-[size=sm]:gap-(--space-3) data-[size=sm]:py-(--space-4) motion-safe:transition-[translate] motion-safe:duration-(--duration-spring) motion-safe:ease-(--ease-spring) hover-fine:has-[a,button]:motion-safe:-translate-y-0.5", className),
|
|
12
22
|
...props
|
|
13
23
|
})
|
|
14
24
|
});
|
|
15
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Arc's card media: a muted frame for a photo or illustration that zooms in slowly while the card is pointed at
|
|
28
|
+
* and eases back a little faster. Place it first to sit flush with the top edge.
|
|
29
|
+
*/
|
|
30
|
+
function CardMedia({ className, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
32
|
+
"data-slot": "card-media",
|
|
33
|
+
className: cn("relative overflow-hidden bg-surface-muted", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: /* @__PURE__ */ _jsx("div", {
|
|
36
|
+
className: "grid min-h-28 place-items-center transition-transform duration-(--duration-considered) ease-(--ease-standard) motion-reduce:transition-none pointer-fine:group-hover/card:scale-[1.04] pointer-fine:group-hover/card:duration-[calc(var(--duration-considered)*2)] motion-reduce:scale-100! [&>img]:size-full [&>img]:object-cover",
|
|
37
|
+
children
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
16
41
|
function CardHeader({ className, ...props }) {
|
|
17
42
|
return /* @__PURE__ */ _jsx("div", {
|
|
18
43
|
"data-slot": "card-header",
|
|
19
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-
|
|
44
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-(--space-2) px-(--space-5) group-data-[size=sm]/card:px-(--space-4) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--space-5) group-data-[size=sm]/card:[.border-b]:pb-(--space-4)", className),
|
|
20
45
|
...props
|
|
21
46
|
});
|
|
22
47
|
}
|
|
23
48
|
function CardTitle({ className, ...props }) {
|
|
24
49
|
return /* @__PURE__ */ _jsx("div", {
|
|
25
50
|
"data-slot": "card-title",
|
|
26
|
-
className: cn("font-
|
|
51
|
+
className: cn("font-sans text-lg leading-[1.3] font-medium tracking-(--tracking-body) text-balance group-data-[size=sm]/card:text-base", className),
|
|
27
52
|
...props
|
|
28
53
|
});
|
|
29
54
|
}
|
|
30
55
|
function CardDescription({ className, ...props }) {
|
|
31
56
|
return /* @__PURE__ */ _jsx("div", {
|
|
32
57
|
"data-slot": "card-description",
|
|
33
|
-
className: cn("text-sm text-
|
|
58
|
+
className: cn("text-sm leading-(--leading-body) text-pretty text-text-secondary", className),
|
|
34
59
|
...props
|
|
35
60
|
});
|
|
36
61
|
}
|
|
37
62
|
function CardAction({ className, ...props }) {
|
|
38
63
|
return /* @__PURE__ */ _jsx("div", {
|
|
39
64
|
"data-slot": "card-action",
|
|
40
|
-
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
65
|
+
className: cn("relative z-1 col-start-2 row-span-2 row-start-1 flex flex-wrap gap-(--space-3) self-start justify-self-end", className),
|
|
41
66
|
...props
|
|
42
67
|
});
|
|
43
68
|
}
|
|
44
69
|
function CardContent({ className, ...props }) {
|
|
45
70
|
return /* @__PURE__ */ _jsx("div", {
|
|
46
71
|
"data-slot": "card-content",
|
|
47
|
-
className: cn("px-
|
|
72
|
+
className: cn("px-(--space-5) group-data-[size=sm]/card:px-(--space-4)", className),
|
|
48
73
|
...props
|
|
49
74
|
});
|
|
50
75
|
}
|
|
76
|
+
/** Arc's footer row: a byline or meta on the start side and actions on the end, without a tinted band. */
|
|
51
77
|
function CardFooter({ className, ...props }) {
|
|
52
78
|
return /* @__PURE__ */ _jsx("div", {
|
|
53
79
|
"data-slot": "card-footer",
|
|
54
|
-
className: cn("flex items-center
|
|
80
|
+
className: cn("flex items-center justify-between gap-(--space-3) px-(--space-5) group-data-[size=sm]/card:px-(--space-4)", className),
|
|
55
81
|
...props
|
|
56
82
|
});
|
|
57
83
|
}
|
|
58
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
84
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, CardMedia };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carousel on Embla with Arc's carousel design (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): round
|
|
3
|
+
* outlined controls on the surface that answer hover on fine pointers and press in, a grab cursor while the track can
|
|
4
|
+
* be dragged, Home and End to reach the edges, and optional Arc indicators whose pill stretches and travels with the
|
|
5
|
+
* slides frame by frame. Embla keeps dragging, snapping, looping and plugins.
|
|
6
|
+
*/
|
|
1
7
|
import * as React from "react";
|
|
2
8
|
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
9
|
+
import { type CarouselOrientation } from "../constants/carousel.js";
|
|
3
10
|
import { ControlButton } from "./control-button.js";
|
|
4
11
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
12
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -8,7 +15,7 @@ type CarouselPlugin = UseCarouselParameters[1];
|
|
|
8
15
|
type CarouselProps = {
|
|
9
16
|
opts?: CarouselOptions;
|
|
10
17
|
plugins?: CarouselPlugin;
|
|
11
|
-
orientation?:
|
|
18
|
+
orientation?: CarouselOrientation;
|
|
12
19
|
setApi?: (api: CarouselApi) => void;
|
|
13
20
|
};
|
|
14
21
|
type CarouselContextProps = {
|
|
@@ -21,8 +28,28 @@ type CarouselContextProps = {
|
|
|
21
28
|
} & CarouselProps;
|
|
22
29
|
declare function useCarousel(): CarouselContextProps;
|
|
23
30
|
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): React.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* The clipped viewport and the slide track. While the track can be dragged it shows Arc's grab cursor on fine
|
|
33
|
+
* pointers, and a grabbing cursor while a drag is held.
|
|
34
|
+
*/
|
|
24
35
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
36
|
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
26
37
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof ControlButton>): React.JSX.Element;
|
|
27
38
|
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof ControlButton>): React.JSX.Element;
|
|
28
|
-
|
|
39
|
+
type CarouselIndicatorsProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
40
|
+
/** Accessible name of the indicator list. Defaults to "Elegir una diapositiva". */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** Names each indicator. Defaults to "Diapositiva 2 de 5". */
|
|
43
|
+
slideLabel?: (index: number, count: number) => string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Arc's page indicator for a carousel: one dot per snap point, where the current one stretches into a pill that
|
|
47
|
+
* follows the track frame by frame while it is dragged or scrolled. The dots are buttons in a named group and the
|
|
48
|
+
* current one carries `aria-current`; activating a dot scrolls to its slide, and when a dot has focus the carousel's
|
|
49
|
+
* arrow, Home and End keys move the focus to the dot of the new slide. It renders
|
|
50
|
+
* once Embla has measured the slides. Place it inside `Carousel`.
|
|
51
|
+
* @param props - Optional accessible copy plus native attributes of the list.
|
|
52
|
+
* @returns The indicator list, or nothing until there is more than one snap point.
|
|
53
|
+
*/
|
|
54
|
+
declare function CarouselIndicators({ className, label, slideLabel, ...props }: CarouselIndicatorsProps): React.JSX.Element | null;
|
|
55
|
+
export { type CarouselApi, type CarouselIndicatorsProps, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CarouselIndicators, useCarousel, };
|