beez-ui 2.7.1 → 3.0.0
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 +72 -0
- package/README.md +43 -13
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/components/account-menu.d.ts +4 -3
- package/dist/components/account-menu.js +63 -54
- package/dist/components/alert.d.ts +15 -15
- package/dist/components/alert.js +289 -270
- package/dist/components/animated-theme-toggler.js +1 -1
- package/dist/components/avatar.d.ts +56 -31
- package/dist/components/avatar.js +394 -277
- package/dist/components/badge.d.ts +8 -28
- package/dist/components/badge.js +55 -108
- package/dist/components/calendar.d.ts +36 -26
- package/dist/components/calendar.js +132 -1227
- package/dist/components/card.d.ts +36 -25
- package/dist/components/card.js +895 -72
- package/dist/components/carousel.d.ts +63 -47
- package/dist/components/carousel.js +496 -777
- package/dist/components/data-table.d.ts +5 -4
- package/dist/components/data-table.js +7 -6
- package/dist/components/dialog-surface.d.ts +23 -1
- package/dist/components/dialog-surface.js +99 -3
- package/dist/components/dialog.d.ts +80 -45
- package/dist/components/dialog.js +258 -503
- package/dist/components/dropdown-menu.d.ts +56 -73
- package/dist/components/dropdown-menu.js +79 -714
- package/dist/components/field.d.ts +3 -1
- package/dist/components/field.js +49 -39
- package/dist/components/filter-presets-bar.js +2 -2
- package/dist/components/filter-query-bar.js +1 -1
- package/dist/components/hover-card.d.ts +42 -41
- package/dist/components/hover-card.js +57 -483
- package/dist/components/pagination.d.ts +53 -31
- package/dist/components/pagination.js +176 -412
- package/dist/components/popover.d.ts +11 -23
- package/dist/components/popover.js +19 -304
- package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
- package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
- package/dist/components/primitives/avatar.d.ts +46 -0
- package/dist/components/primitives/avatar.js +267 -0
- package/dist/components/primitives/calendar.d.ts +37 -0
- package/dist/components/primitives/calendar.js +1250 -0
- package/dist/components/primitives/carousel.d.ts +106 -0
- package/dist/components/primitives/carousel.js +928 -0
- package/dist/components/primitives/dialog.d.ts +62 -0
- package/dist/components/primitives/dialog.js +490 -0
- package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
- package/dist/components/primitives/dropdown-menu-items.js +265 -0
- package/dist/components/primitives/dropdown-menu.d.ts +64 -0
- package/dist/components/primitives/dropdown-menu.js +557 -0
- package/dist/components/primitives/hover-card.d.ts +50 -0
- package/dist/components/primitives/hover-card.js +507 -0
- package/dist/components/primitives/pagination.d.ts +65 -0
- package/dist/components/primitives/pagination.js +373 -0
- package/dist/components/primitives/popover.d.ts +22 -0
- package/dist/components/primitives/popover.js +213 -0
- package/dist/components/primitives/select.d.ts +36 -0
- package/dist/components/primitives/select.js +407 -0
- package/dist/components/primitives/tooltip.d.ts +30 -0
- package/dist/components/primitives/tooltip.js +277 -0
- package/dist/components/radio-group.d.ts +30 -17
- package/dist/components/radio-group.js +266 -315
- package/dist/components/rich-link-editor.js +1 -1
- package/dist/components/select.d.ts +51 -42
- package/dist/components/select.js +163 -495
- package/dist/components/skeleton.d.ts +16 -15
- package/dist/components/skeleton.js +99 -205
- package/dist/components/split-button.js +1 -1
- package/dist/components/switch.d.ts +3 -6
- package/dist/components/switch.js +163 -170
- package/dist/components/tabs.d.ts +3 -11
- package/dist/components/tabs.js +61 -75
- package/dist/components/themed-toaster.d.ts +1 -1
- package/dist/components/themed-toaster.js +1 -1
- package/dist/components/toaster.d.ts +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/tooltip.d.ts +36 -31
- package/dist/components/tooltip.js +44 -284
- package/dist/constants/alert.d.ts +5 -1
- package/dist/constants/alert.js +5 -1
- package/dist/constants/avatar.d.ts +24 -1
- package/dist/constants/avatar.js +19 -0
- package/dist/constants/calendar.d.ts +12 -0
- package/dist/constants/calendar.js +12 -0
- package/dist/constants/card.d.ts +23 -0
- package/dist/constants/card.js +20 -0
- package/dist/constants/carousel.d.ts +31 -13
- package/dist/constants/carousel.js +32 -11
- package/dist/constants/dialog.d.ts +6 -1
- package/dist/constants/dialog.js +5 -1
- package/dist/constants/dropdown-menu.d.ts +2 -2
- package/dist/constants/dropdown-menu.js +2 -2
- package/dist/constants/pagination.d.ts +13 -2
- package/dist/constants/pagination.js +13 -2
- package/dist/constants/select.d.ts +4 -2
- package/dist/constants/select.js +4 -2
- package/dist/constants/switch.d.ts +5 -16
- package/dist/constants/switch.js +6 -14
- package/dist/hooks/use-today.d.ts +7 -0
- package/dist/hooks/use-today.js +50 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/motion/glide-indicator.d.ts +1 -1
- package/dist/motion/glide-indicator.js +1 -1
- package/dist/motion/presence.d.ts +0 -1
- package/dist/motion/presence.js +0 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -6
|
@@ -6,7 +6,7 @@ import { animate, frame } from "motion/react";
|
|
|
6
6
|
import { MotionSlot } from "../motion/motion-slot.js";
|
|
7
7
|
import { MOTION_EASE } from "../motion/tokens.js";
|
|
8
8
|
import { useTheme } from "next-themes";
|
|
9
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
9
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "./primitives/dropdown-menu.js";
|
|
10
10
|
import { MILLISECONDS_PER_SECOND, REDUCED_MOTION_QUERY } from "../constants/motion.js";
|
|
11
11
|
import { cn } from "../lib/utils.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,40 +1,65 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { AvatarGroupSize, AvatarSize, AvatarStatus } from "../constants/avatar.js";
|
|
3
|
+
export type { AvatarGroupSize, AvatarSize, AvatarStatus };
|
|
4
|
+
export type AvatarProps = Omit<ComponentProps<"span">, "children"> & {
|
|
5
|
+
/** Full name: the accessible name of the avatar and the source of its first two initials. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Photo URL, rendered through the provider's `Image` adapter. Falls back to the initials if it fails to load. */
|
|
8
|
+
src?: string | null;
|
|
9
|
+
/** Diameter: 24px (`sm`), 32px (`md`, default), 40px (`lg`) or Arc's 88px profile size (`xl`). */
|
|
10
|
+
size?: AvatarSize;
|
|
11
|
+
/** Adds a presence dot and appends the presence to the accessible name. */
|
|
12
|
+
status?: AvatarStatus;
|
|
13
|
+
/** Presence text appended to the accessible name; defaults to "En línea" or "Desconectado". */
|
|
14
|
+
statusLabel?: string;
|
|
15
|
+
/** Replaces the initials, for example with an icon. */
|
|
16
|
+
fallback?: ReactNode;
|
|
17
|
+
/** A custom corner badge; the presence dot moves to the top corner while it is shown. */
|
|
18
|
+
badge?: ReactNode;
|
|
19
|
+
/** Accessible text to use instead of `name`, when the photo needs a different description. */
|
|
20
|
+
alt?: string;
|
|
21
|
+
};
|
|
1
22
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
23
|
+
* A round portrait for one person, with initials as fallback and an optional presence dot.
|
|
24
|
+
* @param props - Name, photo, size, presence, optional fallback and badge, plus native span attributes for the root.
|
|
25
|
+
* @returns The avatar, announced as one image.
|
|
5
26
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/** Accepts native image props and nullable image sources from application results. */
|
|
13
|
-
export type AvatarImageProps = Omit<ComponentProps<"img">, "src"> & {
|
|
27
|
+
declare function Avatar({ name, src, size, status, statusLabel, fallback, badge, alt, ...props }: AvatarProps): import("react").JSX.Element;
|
|
28
|
+
/** One person of an avatar group. */
|
|
29
|
+
export type AvatarGroupMember = {
|
|
30
|
+
/** Full name, shown on hover and used as the avatar's accessible name. */
|
|
31
|
+
name: string;
|
|
32
|
+
/** Photo URL. */
|
|
14
33
|
src?: string | null;
|
|
34
|
+
/** Presence dot of the avatar. */
|
|
35
|
+
status?: AvatarStatus;
|
|
36
|
+
/** Stable key for members that share a name; defaults to `name`. */
|
|
37
|
+
key?: string;
|
|
15
38
|
};
|
|
16
|
-
export type
|
|
17
|
-
size?: AvatarSize;
|
|
39
|
+
export type AvatarGroupProps = Omit<ComponentProps<"div">, "children" | "role" | "aria-label"> & {
|
|
18
40
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
41
|
+
* People in display order. Pass the whole list and let `max` collapse the rest, or a preview of it together with
|
|
42
|
+
* `total`.
|
|
21
43
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
44
|
+
members: AvatarGroupMember[];
|
|
45
|
+
/**
|
|
46
|
+
* How many people the group has when `members` is only a preview of them. When it is larger than
|
|
47
|
+
* `members.length`, the +N chip counts the people left out against it. Defaults to `members.length`.
|
|
48
|
+
*/
|
|
49
|
+
total?: number;
|
|
50
|
+
/** Avatars shown before the rest collapse into the overflow count. */
|
|
51
|
+
max?: number;
|
|
52
|
+
/** Size of each avatar and of the overflow chip. */
|
|
53
|
+
size?: AvatarGroupSize;
|
|
54
|
+
/** Accessible name of the group, also used in the overflow label; defaults to "Integrantes". */
|
|
55
|
+
label?: string;
|
|
56
|
+
/** Classes for the group. Native attributes such as `aria-hidden`, `style` or `data-*` also go to the root. */
|
|
57
|
+
className?: string;
|
|
25
58
|
};
|
|
26
59
|
/**
|
|
27
|
-
*
|
|
28
|
-
* @param props -
|
|
29
|
-
* @returns The
|
|
60
|
+
* An overlapping stack of avatars with a +N overflow chip.
|
|
61
|
+
* @param props - Members, optional total, how many to show, size, accessible label, classes and native root attributes.
|
|
62
|
+
* @returns The group.
|
|
30
63
|
*/
|
|
31
|
-
declare function
|
|
32
|
-
|
|
33
|
-
declare function AvatarImage({ alt, className, src, ...props }: AvatarImageProps): import("react").JSX.Element;
|
|
34
|
-
declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): import("react").JSX.Element;
|
|
35
|
-
/** A custom corner badge, drawn with the same ring as Arc's presence dot. Prefer `status` for presence. */
|
|
36
|
-
declare function AvatarBadge({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
37
|
-
/** Overlaps avatars; the hovered one lifts slightly above its neighbours. */
|
|
38
|
-
declare function AvatarGroup({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
39
|
-
declare function AvatarGroupCount({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
40
|
-
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
|
|
64
|
+
declare function AvatarGroup({ members, total, max, size, label, className, style, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
65
|
+
export { Avatar, AvatarGroup };
|