beez-ui 2.7.0 → 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 +78 -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 +2 -2
- 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
|
@@ -1,74 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Arc's Dropdown menu (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md)
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}):
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
59
|
-
/**
|
|
60
|
-
* Renders the row that opens a nested menu. It keeps the highlight fill while its submenu is open and nudges its
|
|
61
|
-
* chevron toward it.
|
|
62
|
-
* @param props - Primitive properties and `inset` to align with rows that carry an icon.
|
|
63
|
-
* @returns The styled primitive with its original interaction contract.
|
|
64
|
-
*/
|
|
65
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
66
|
-
inset?: boolean;
|
|
67
|
-
}): React.JSX.Element;
|
|
68
|
-
/**
|
|
69
|
-
* Renders a nested menu on the same raised panel, at least 12rem wide.
|
|
70
|
-
* @param props - Primitive properties. Arc's defaults: a 12px `collisionPadding` and `loop`.
|
|
71
|
-
* @returns The submenu, animated in and out with its open state.
|
|
72
|
-
*/
|
|
73
|
-
declare function DropdownMenuSubContent({ className, collisionPadding, loop, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
74
|
-
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
2
|
+
* Arc's Dropdown menu (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a labelled trigger that opens a
|
|
3
|
+
* focused list of actions on Arc's raised panel, with item rows, danger tone, separators, a staggered item entrance
|
|
4
|
+
* and a highlight that glides between items with the keyboard. It follows Arc's closed API: items are data, not
|
|
5
|
+
* children. beez-ui adds a custom trigger, link, checkbox and radio rows, trailing content, and placement and open
|
|
6
|
+
* state of the menu.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactElement, ReactNode } from "react";
|
|
9
|
+
import { type DropdownItem, type DropdownItemAttributes, type DropdownMenuSelection } from "./primitives/dropdown-menu-items.js";
|
|
10
|
+
/** Side of the trigger the menu prefers. */
|
|
11
|
+
export type DropdownMenuSide = "top" | "right" | "bottom" | "left";
|
|
12
|
+
/** Alignment of the menu against its trigger. */
|
|
13
|
+
export type DropdownMenuAlign = "start" | "center" | "end";
|
|
14
|
+
export type DropdownMenuProps = {
|
|
15
|
+
/**
|
|
16
|
+
* Text of the trigger Arc draws, and the accessible name of the menu. With a custom `trigger`, it only names the
|
|
17
|
+
* menu.
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/** Rows of the menu, in order. */
|
|
21
|
+
items: DropdownItem[];
|
|
22
|
+
/** Leading icon of the trigger Arc draws. */
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Your own trigger, rendered with `asChild` instead of Arc's labelled button, such as an icon button with its own
|
|
26
|
+
* `aria-label`. It must accept a ref and be focusable.
|
|
27
|
+
*/
|
|
28
|
+
trigger?: ReactElement;
|
|
29
|
+
/** Single selection: rows with a `value` render as radio items checked against `selection.value`. */
|
|
30
|
+
selection?: DropdownMenuSelection;
|
|
31
|
+
/** Preferred side of the trigger. Defaults to `bottom`. */
|
|
32
|
+
side?: DropdownMenuSide;
|
|
33
|
+
/** Alignment against the trigger. Defaults to `start`. */
|
|
34
|
+
align?: DropdownMenuAlign;
|
|
35
|
+
/** Class added to the menu panel. */
|
|
36
|
+
contentClassName?: string;
|
|
37
|
+
/** Accessible name of the menu when it should differ from `label`. */
|
|
38
|
+
contentLabel?: string;
|
|
39
|
+
/** Class added to the trigger Arc draws. */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Controlled open state. */
|
|
42
|
+
open?: boolean;
|
|
43
|
+
/** Initial open state when uncontrolled. */
|
|
44
|
+
defaultOpen?: boolean;
|
|
45
|
+
/** Called when the menu opens or closes. */
|
|
46
|
+
onOpenChange?: (open: boolean) => void;
|
|
47
|
+
/** Blocks outside interaction and hides the rest of the page from assistive technology while open. Defaults to `true`. */
|
|
48
|
+
modal?: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A focused list of actions anchored to a trigger.
|
|
52
|
+
* @param props - The label, the items and optional trigger, selection, placement and open state.
|
|
53
|
+
* @returns The trigger with its menu.
|
|
54
|
+
*/
|
|
55
|
+
declare function DropdownMenu({ label, items, icon, trigger, selection, side, align, contentClassName, contentLabel, className, open, defaultOpen, onOpenChange, modal, }: DropdownMenuProps): import("react").JSX.Element;
|
|
56
|
+
export { DropdownMenu };
|
|
57
|
+
export type { DropdownItem, DropdownItemAttributes, DropdownMenuSelection };
|