@waveso/ui 0.15.0 → 0.16.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/README.md +25 -22
- package/dist/accordion.d.ts +4 -20
- package/dist/accordion.js +2 -2
- package/dist/action-bar.d.ts +1 -10
- package/dist/action-bar.js +6 -5
- package/dist/alert-dialog.d.ts +12 -52
- package/dist/alert-dialog.js +5 -5
- package/dist/alert.d.ts +13 -22
- package/dist/alert.js +13 -4
- package/dist/animate.d.ts +6 -49
- package/dist/animate.js +8 -13
- package/dist/aspect-ratio.d.ts +3 -8
- package/dist/autocomplete.d.ts +21 -88
- package/dist/autocomplete.js +3 -3
- package/dist/avatar.d.ts +7 -28
- package/dist/avatar.js +4 -4
- package/dist/badge.d.ts +3 -11
- package/dist/badge.js +6 -6
- package/dist/breadcrumb.d.ts +7 -31
- package/dist/button-group.d.ts +7 -20
- package/dist/button-group.js +5 -4
- package/dist/button.d.ts +4 -12
- package/dist/button.js +6 -6
- package/dist/card.d.ts +16 -33
- package/dist/card.js +27 -14
- package/dist/checkbox.d.ts +1 -6
- package/dist/checkbox.js +2 -2
- package/dist/collapsible.d.ts +3 -12
- package/dist/combobox.d.ts +18 -81
- package/dist/combobox.js +4 -4
- package/dist/context-menu.d.ts +17 -68
- package/dist/context-menu.js +14 -14
- package/dist/count.d.ts +1 -15
- package/dist/count.js +3 -2
- package/dist/dialog.d.ts +10 -41
- package/dist/dialog.js +5 -5
- package/dist/direction.d.ts +0 -1
- package/dist/drawer.d.ts +11 -44
- package/dist/drawer.js +1 -1
- package/dist/encrypted-text.d.ts +15 -14
- package/dist/encrypted-text.js +205 -66
- package/dist/field.d.ts +27 -30
- package/dist/field.js +36 -8
- package/dist/fieldset.d.ts +14 -0
- package/dist/fieldset.js +26 -0
- package/dist/film-grain-shader.d.ts +3 -4
- package/dist/film-grain-webgl.d.ts +2 -9
- package/dist/film-grain-webgl.js +4 -1
- package/dist/film-grain.d.ts +1 -11
- package/dist/form.d.ts +23 -42
- package/dist/form.js +7 -4
- package/dist/glyph-matrix.d.ts +25 -0
- package/dist/glyph-matrix.js +266 -0
- package/dist/gradient-reveal-text.d.ts +4 -17
- package/dist/gradient-reveal-text.js +8 -8
- package/dist/hooks/use-mobile.d.ts +2 -3
- package/dist/infinite-scroll.d.ts +1 -16
- package/dist/input-group.d.ts +11 -37
- package/dist/input-group.js +1 -1
- package/dist/input-otp.d.ts +4 -20
- package/dist/input-otp.js +2 -2
- package/dist/input.d.ts +3 -11
- package/dist/input.js +1 -1
- package/dist/item.d.ts +14 -51
- package/dist/item.js +17 -11
- package/dist/kbd.d.ts +3 -11
- package/dist/kbd.js +2 -2
- package/dist/label.d.ts +1 -6
- package/dist/label.js +1 -1
- package/dist/lib/focus.d.ts +3 -5
- package/dist/lib/internal-icons.d.ts +19 -22
- package/dist/lib/merge-refs.d.ts +9 -0
- package/dist/lib/merge-refs.js +16 -0
- package/dist/lib/utils.d.ts +3 -5
- package/dist/lib/utils.js +9 -1
- package/dist/masonry.d.ts +2 -16
- package/dist/masonry.js +5 -3
- package/dist/menu.d.ts +17 -65
- package/dist/menu.js +7 -7
- package/dist/menubar.d.ts +16 -55
- package/dist/menubar.js +1 -1
- package/dist/pagination.d.ts +9 -33
- package/dist/pagination.js +1 -1
- package/dist/popover.d.ts +9 -43
- package/dist/popover.js +1 -1
- package/dist/preview-card.d.ts +5 -25
- package/dist/preview-card.js +1 -1
- package/dist/progress.d.ts +5 -24
- package/dist/progress.js +2 -2
- package/dist/radio-group.d.ts +2 -9
- package/dist/radio-group.js +1 -1
- package/dist/radio.d.ts +2 -10
- package/dist/radio.js +2 -2
- package/dist/resizable.d.ts +43 -0
- package/dist/resizable.js +53 -0
- package/dist/scroll-area.d.ts +14 -13
- package/dist/scroll-area.js +26 -7
- package/dist/select.d.ts +15 -64
- package/dist/select.js +4 -4
- package/dist/separator.d.ts +1 -7
- package/dist/separator.js +1 -1
- package/dist/sidebar.d.ts +29 -126
- package/dist/sidebar.js +14 -14
- package/dist/skeleton.d.ts +1 -6
- package/dist/slider.d.ts +1 -14
- package/dist/slider.js +5 -5
- package/dist/spinner.d.ts +8 -6
- package/dist/spinner.js +24 -6
- package/dist/styles.css +575 -182
- package/dist/switch.d.ts +2 -9
- package/dist/switch.js +6 -6
- package/dist/table.d.ts +14 -34
- package/dist/table.js +40 -9
- package/dist/tabs.d.ts +5 -22
- package/dist/tabs.js +3 -3
- package/dist/textarea.d.ts +3 -12
- package/dist/textarea.js +1 -1
- package/dist/toast.d.ts +13 -39
- package/dist/toast.js +4 -4
- package/dist/toggle-group.d.ts +3 -19
- package/dist/toggle-group.js +16 -10
- package/dist/toggle.d.ts +3 -11
- package/dist/toggle.js +11 -6
- package/dist/tooltip.d.ts +6 -24
- package/dist/tooltip.js +10 -6
- package/dist/typewriter.d.ts +1 -14
- package/dist/video-text.d.ts +25 -0
- package/dist/video-text.js +147 -0
- package/package.json +57 -51
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { inputVariants } from "./input.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
5
4
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
6
|
-
|
|
7
5
|
//#region src/autocomplete.d.ts
|
|
8
6
|
type AutocompleteProps = React.ComponentProps<typeof Autocomplete$1.Root>;
|
|
9
7
|
type AutocompleteInputProps = Omit<React.ComponentProps<typeof Autocomplete$1.Input>, "size"> & VariantProps<typeof inputVariants>;
|
|
@@ -26,91 +24,26 @@ type AutocompleteGroupProps = React.ComponentProps<typeof Autocomplete$1.Group>;
|
|
|
26
24
|
type AutocompleteGroupLabelProps = React.ComponentProps<typeof Autocomplete$1.GroupLabel>;
|
|
27
25
|
type AutocompleteCollectionProps = React.ComponentProps<typeof Autocomplete$1.Collection>;
|
|
28
26
|
type AutocompleteContentProps = AutocompletePopupProps & Pick<AutocompletePositionerProps, "align" | "alignOffset" | "side" | "sideOffset">;
|
|
29
|
-
declare function Autocomplete({
|
|
30
|
-
|
|
31
|
-
}:
|
|
32
|
-
declare function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}:
|
|
37
|
-
declare function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}:
|
|
41
|
-
declare function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}:
|
|
45
|
-
declare function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}:
|
|
49
|
-
declare function
|
|
50
|
-
...props
|
|
51
|
-
}: AutocompleteValueProps): _$react_jsx_runtime0.JSX.Element;
|
|
52
|
-
declare function AutocompletePortal({
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}: AutocompletePortalProps): _$react_jsx_runtime0.JSX.Element;
|
|
56
|
-
declare function AutocompleteBackdrop({
|
|
57
|
-
className,
|
|
58
|
-
...props
|
|
59
|
-
}: AutocompleteBackdropProps): _$react_jsx_runtime0.JSX.Element;
|
|
60
|
-
declare function AutocompletePositioner({
|
|
61
|
-
className,
|
|
62
|
-
...props
|
|
63
|
-
}: AutocompletePositionerProps): _$react_jsx_runtime0.JSX.Element;
|
|
64
|
-
declare function AutocompletePopup({
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: AutocompletePopupProps): _$react_jsx_runtime0.JSX.Element;
|
|
68
|
-
declare function AutocompleteArrow({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: AutocompleteArrowProps): _$react_jsx_runtime0.JSX.Element;
|
|
72
|
-
declare function AutocompleteStatus({
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}: AutocompleteStatusProps): _$react_jsx_runtime0.JSX.Element;
|
|
76
|
-
declare function AutocompleteEmpty({
|
|
77
|
-
className,
|
|
78
|
-
...props
|
|
79
|
-
}: AutocompleteEmptyProps): _$react_jsx_runtime0.JSX.Element;
|
|
80
|
-
declare function AutocompleteList({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}: AutocompleteListProps): _$react_jsx_runtime0.JSX.Element;
|
|
84
|
-
declare function AutocompleteRow({
|
|
85
|
-
className,
|
|
86
|
-
...props
|
|
87
|
-
}: AutocompleteRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
88
|
-
declare function AutocompleteItem({
|
|
89
|
-
className,
|
|
90
|
-
...props
|
|
91
|
-
}: AutocompleteItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
92
|
-
declare function AutocompleteSeparator({
|
|
93
|
-
className,
|
|
94
|
-
...props
|
|
95
|
-
}: AutocompleteSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
96
|
-
declare function AutocompleteGroup({
|
|
97
|
-
className,
|
|
98
|
-
...props
|
|
99
|
-
}: AutocompleteGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
100
|
-
declare function AutocompleteGroupLabel({
|
|
101
|
-
className,
|
|
102
|
-
...props
|
|
103
|
-
}: AutocompleteGroupLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
104
|
-
declare function AutocompleteCollection({
|
|
105
|
-
...props
|
|
106
|
-
}: AutocompleteCollectionProps): _$react_jsx_runtime0.JSX.Element;
|
|
107
|
-
declare function AutocompleteContent({
|
|
108
|
-
className,
|
|
109
|
-
align,
|
|
110
|
-
alignOffset,
|
|
111
|
-
side,
|
|
112
|
-
sideOffset,
|
|
113
|
-
...props
|
|
114
|
-
}: AutocompleteContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
27
|
+
declare function Autocomplete({ ...props }: AutocompleteProps): React.JSX.Element;
|
|
28
|
+
declare function AutocompleteInput({ className, size, ...props }: AutocompleteInputProps): React.JSX.Element;
|
|
29
|
+
declare function AutocompleteTrigger({ className, ...props }: AutocompleteTriggerProps): React.JSX.Element;
|
|
30
|
+
declare function AutocompleteIcon({ className, ...props }: AutocompleteIconProps): React.JSX.Element;
|
|
31
|
+
declare function AutocompleteClear({ className, ...props }: AutocompleteClearProps): React.JSX.Element;
|
|
32
|
+
declare function AutocompleteValue({ ...props }: AutocompleteValueProps): React.JSX.Element;
|
|
33
|
+
declare function AutocompletePortal({ className, ...props }: AutocompletePortalProps): React.JSX.Element;
|
|
34
|
+
declare function AutocompleteBackdrop({ className, ...props }: AutocompleteBackdropProps): React.JSX.Element;
|
|
35
|
+
declare function AutocompletePositioner({ className, ...props }: AutocompletePositionerProps): React.JSX.Element;
|
|
36
|
+
declare function AutocompletePopup({ className, ...props }: AutocompletePopupProps): React.JSX.Element;
|
|
37
|
+
declare function AutocompleteArrow({ className, ...props }: AutocompleteArrowProps): React.JSX.Element;
|
|
38
|
+
declare function AutocompleteStatus({ className, ...props }: AutocompleteStatusProps): React.JSX.Element;
|
|
39
|
+
declare function AutocompleteEmpty({ className, ...props }: AutocompleteEmptyProps): React.JSX.Element;
|
|
40
|
+
declare function AutocompleteList({ className, ...props }: AutocompleteListProps): React.JSX.Element;
|
|
41
|
+
declare function AutocompleteRow({ className, ...props }: AutocompleteRowProps): React.JSX.Element;
|
|
42
|
+
declare function AutocompleteItem({ className, ...props }: AutocompleteItemProps): React.JSX.Element;
|
|
43
|
+
declare function AutocompleteSeparator({ className, ...props }: AutocompleteSeparatorProps): React.JSX.Element;
|
|
44
|
+
declare function AutocompleteGroup({ className, ...props }: AutocompleteGroupProps): React.JSX.Element;
|
|
45
|
+
declare function AutocompleteGroupLabel({ className, ...props }: AutocompleteGroupLabelProps): React.JSX.Element;
|
|
46
|
+
declare function AutocompleteCollection({ ...props }: AutocompleteCollectionProps): React.JSX.Element;
|
|
47
|
+
declare function AutocompleteContent({ className, align, alignOffset, side, sideOffset, ...props }: AutocompleteContentProps): React.JSX.Element;
|
|
115
48
|
//#endregion
|
|
116
49
|
export { Autocomplete, AutocompleteArrow, type AutocompleteArrowProps, AutocompleteBackdrop, type AutocompleteBackdropProps, AutocompleteClear, type AutocompleteClearProps, AutocompleteCollection, type AutocompleteCollectionProps, AutocompleteContent, type AutocompleteContentProps, AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteGroup, AutocompleteGroupLabel, type AutocompleteGroupLabelProps, type AutocompleteGroupProps, AutocompleteIcon, type AutocompleteIconProps, AutocompleteInput, type AutocompleteInputProps, AutocompleteItem, type AutocompleteItemProps, AutocompleteList, type AutocompleteListProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePortal, type AutocompletePortalProps, AutocompletePositioner, type AutocompletePositionerProps, type AutocompleteProps, AutocompleteRow, type AutocompleteRowProps, AutocompleteSeparator, type AutocompleteSeparatorProps, AutocompleteStatus, type AutocompleteStatusProps, AutocompleteTrigger, type AutocompleteTriggerProps, AutocompleteValue, type AutocompleteValueProps };
|
package/dist/autocomplete.js
CHANGED
|
@@ -69,7 +69,7 @@ function AutocompletePositioner({ className, ...props }) {
|
|
|
69
69
|
function AutocompletePopup({ className, ...props }) {
|
|
70
70
|
return /* @__PURE__ */ jsx(Autocomplete$1.Popup, {
|
|
71
71
|
"data-slot": "autocomplete-popup",
|
|
72
|
-
className: cn("motion-pop-md bg-elevated text-contrast ring-contrast/10 group/autocomplete-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width)
|
|
72
|
+
className: cn("motion-pop-md bg-elevated text-contrast ring-contrast/10 group/autocomplete-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1", className),
|
|
73
73
|
...props
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -111,14 +111,14 @@ function AutocompleteRow({ className, ...props }) {
|
|
|
111
111
|
function AutocompleteItem({ className, ...props }) {
|
|
112
112
|
return /* @__PURE__ */ jsx(Autocomplete$1.Item, {
|
|
113
113
|
"data-slot": "autocomplete-item",
|
|
114
|
-
className: cn("data-highlighted:bg-
|
|
114
|
+
className: cn("data-highlighted:bg-highlight relative flex w-full cursor-clickable items-center gap-2 rounded-sm py-1 pl-1.5 pr-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-30 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
115
115
|
...props
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
function AutocompleteSeparator({ className, ...props }) {
|
|
119
119
|
return /* @__PURE__ */ jsx(Autocomplete$1.Separator, {
|
|
120
120
|
"data-slot": "autocomplete-separator",
|
|
121
|
-
className: cn("bg-
|
|
121
|
+
className: cn("bg-contour -mx-1 my-1 h-px", className),
|
|
122
122
|
...props
|
|
123
123
|
});
|
|
124
124
|
}
|
package/dist/avatar.d.ts
CHANGED
|
@@ -1,40 +1,19 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
4
|
-
|
|
5
3
|
//#region src/avatar.d.ts
|
|
6
4
|
type AvatarProps = Avatar$1.Root.Props & {
|
|
7
|
-
size?: "
|
|
5
|
+
size?: "xs" | "sm" | "default" | "lg";
|
|
8
6
|
};
|
|
9
7
|
type AvatarImageProps = Avatar$1.Image.Props;
|
|
10
8
|
type AvatarFallbackProps = Avatar$1.Fallback.Props;
|
|
11
9
|
type AvatarBadgeProps = React.ComponentProps<"span">;
|
|
12
10
|
type AvatarGroupProps = React.ComponentProps<"div">;
|
|
13
11
|
type AvatarGroupCountProps = React.ComponentProps<"div">;
|
|
14
|
-
declare function Avatar({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}:
|
|
19
|
-
declare function
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: AvatarImageProps): _$react_jsx_runtime0.JSX.Element;
|
|
23
|
-
declare function AvatarFallback({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: AvatarFallbackProps): _$react_jsx_runtime0.JSX.Element;
|
|
27
|
-
declare function AvatarBadge({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: AvatarBadgeProps): _$react_jsx_runtime0.JSX.Element;
|
|
31
|
-
declare function AvatarGroup({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: AvatarGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
35
|
-
declare function AvatarGroupCount({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: AvatarGroupCountProps): _$react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare function Avatar({ className, size, ...props }: AvatarProps): React.JSX.Element;
|
|
13
|
+
declare function AvatarImage({ className, ...props }: AvatarImageProps): React.JSX.Element;
|
|
14
|
+
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): React.JSX.Element;
|
|
15
|
+
declare function AvatarBadge({ className, ...props }: AvatarBadgeProps): React.JSX.Element;
|
|
16
|
+
declare function AvatarGroup({ className, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
17
|
+
declare function AvatarGroupCount({ className, ...props }: AvatarGroupCountProps): React.JSX.Element;
|
|
39
18
|
//#endregion
|
|
40
19
|
export { Avatar, AvatarBadge, type AvatarBadgeProps, AvatarFallback, type AvatarFallbackProps, AvatarGroup, AvatarGroupCount, type AvatarGroupCountProps, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps };
|
package/dist/avatar.js
CHANGED
|
@@ -7,7 +7,7 @@ function Avatar({ className, size = "default", ...props }) {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
8
8
|
"data-slot": "avatar",
|
|
9
9
|
"data-size": size,
|
|
10
|
-
className: cn("after:border-
|
|
10
|
+
className: cn("after:border-contour group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border data-[size=lg]:size-10 data-[size=sm]:size-6 data-[size=xs]:size-5", className),
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -21,14 +21,14 @@ function AvatarImage({ className, ...props }) {
|
|
|
21
21
|
function AvatarFallback({ className, ...props }) {
|
|
22
22
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
23
23
|
"data-slot": "avatar-fallback",
|
|
24
|
-
className: cn("bg-secondary text-
|
|
24
|
+
className: cn("bg-secondary text-contrast flex size-full items-center justify-center rounded-full text-sm group-data-[size=xs]/avatar:text-[10px] group-data-[size=sm]/avatar:text-xs group-data-[size=lg]/avatar:text-base", className),
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
function AvatarBadge({ className, ...props }) {
|
|
29
29
|
return /* @__PURE__ */ jsx("span", {
|
|
30
30
|
"data-slot": "avatar-badge",
|
|
31
|
-
className: cn("bg-primary text-white ring-foundation absolute
|
|
31
|
+
className: cn("bg-primary text-white ring-foundation absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none", "group-data-[size=xs]/avatar:size-1.5 group-data-[size=xs]/avatar:[&>svg]:hidden", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
32
32
|
...props
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -42,7 +42,7 @@ function AvatarGroup({ className, ...props }) {
|
|
|
42
42
|
function AvatarGroupCount({ className, ...props }) {
|
|
43
43
|
return /* @__PURE__ */ jsx("div", {
|
|
44
44
|
"data-slot": "avatar-group-count",
|
|
45
|
-
className: cn("bg-secondary text-
|
|
45
|
+
className: cn("bg-secondary text-contrast ring-foundation relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=xs]/avatar-group:size-5 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=xs]/avatar-group:[&>svg]:size-3 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
|
|
46
46
|
...props
|
|
47
47
|
});
|
|
48
48
|
}
|
package/dist/badge.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import * as _$react from "react";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
-
|
|
6
3
|
//#region src/badge.d.ts
|
|
7
4
|
declare const badgeVariants: (props?: ({
|
|
8
|
-
variant?: "
|
|
9
|
-
} &
|
|
5
|
+
variant?: "danger" | "default" | "ghost" | "link" | "outline" | "secondary" | "success" | "warning" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
7
|
type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
|
|
11
|
-
declare function Badge({
|
|
12
|
-
className,
|
|
13
|
-
variant,
|
|
14
|
-
render,
|
|
15
|
-
...props
|
|
16
|
-
}: BadgeProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
8
|
+
declare function Badge({ className, variant, render, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
17
9
|
//#endregion
|
|
18
10
|
export { Badge, type BadgeProps, badgeVariants };
|
package/dist/badge.js
CHANGED
|
@@ -4,15 +4,15 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
//#region src/badge.tsx
|
|
7
|
-
const badgeVariants = cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium motion-color has-data-[icon=inline-start]:ps-1.5 has-data-[icon=inline-end]:pe-1.5 [&_svg:not([class*='size-'])]:size-3 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&_svg]:shrink-0 [&_svg]:pointer-events-none focus-visible:border-focus focus-visible:ring-focus/50 focus-visible:ring-3 aria-invalid:ring-
|
|
7
|
+
const badgeVariants = cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium motion-color has-data-[icon=inline-start]:ps-1.5 has-data-[icon=inline-end]:pe-1.5 [&_svg:not([class*='size-'])]:size-3 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&_svg]:shrink-0 [&_svg]:pointer-events-none focus-visible:border-focus focus-visible:ring-focus/50 focus-visible:ring-3 aria-invalid:ring-danger/30 aria-invalid:border-danger overflow-hidden group/badge", {
|
|
8
8
|
variants: { variant: {
|
|
9
9
|
default: "bg-primary text-white [a]:hover:bg-primary/80",
|
|
10
|
-
success: "bg-success text-
|
|
11
|
-
|
|
12
|
-
warning: "bg-warning text-
|
|
10
|
+
success: "bg-success text-white [a]:hover:bg-success/80",
|
|
11
|
+
danger: "bg-danger text-white [a]:hover:bg-danger/80 [a]:focus-visible:ring-danger/50",
|
|
12
|
+
warning: "bg-warning text-white [a]:hover:bg-warning/80",
|
|
13
13
|
secondary: "bg-secondary text-contrast [a]:hover:bg-secondary/80",
|
|
14
|
-
outline: "border-
|
|
15
|
-
ghost: "text-muted [a]:hover:bg-
|
|
14
|
+
outline: "border-shade bg-foundation [a]:hover:bg-highlight [a]:hover:text-contrast",
|
|
15
|
+
ghost: "text-muted [a]:hover:bg-highlight",
|
|
16
16
|
link: "text-primary [a]:underline-offset-4 [a]:hover:underline"
|
|
17
17
|
} },
|
|
18
18
|
defaultVariants: { variant: "default" }
|
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
|
|
5
3
|
//#region src/breadcrumb.d.ts
|
|
6
4
|
type BreadcrumbProps = React.ComponentProps<"nav">;
|
|
7
5
|
type BreadcrumbListProps = React.ComponentProps<"ol">;
|
|
@@ -10,34 +8,12 @@ type BreadcrumbLinkProps = useRender.ComponentProps<"a">;
|
|
|
10
8
|
type BreadcrumbPageProps = React.ComponentProps<"span">;
|
|
11
9
|
type BreadcrumbSeparatorProps = React.ComponentProps<"li">;
|
|
12
10
|
type BreadcrumbEllipsisProps = React.ComponentProps<"span">;
|
|
13
|
-
declare function Breadcrumb({
|
|
14
|
-
|
|
15
|
-
}:
|
|
16
|
-
declare function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}:
|
|
20
|
-
declare function BreadcrumbItem({
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}: BreadcrumbItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
24
|
-
declare function BreadcrumbLink({
|
|
25
|
-
className,
|
|
26
|
-
render,
|
|
27
|
-
...props
|
|
28
|
-
}: BreadcrumbLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
29
|
-
declare function BreadcrumbPage({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: BreadcrumbPageProps): _$react_jsx_runtime0.JSX.Element;
|
|
33
|
-
declare function BreadcrumbSeparator({
|
|
34
|
-
children,
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: BreadcrumbSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
38
|
-
declare function BreadcrumbEllipsis({
|
|
39
|
-
className,
|
|
40
|
-
...props
|
|
41
|
-
}: BreadcrumbEllipsisProps): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
declare function Breadcrumb({ ...props }: BreadcrumbProps): React.JSX.Element;
|
|
12
|
+
declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): React.JSX.Element;
|
|
13
|
+
declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): React.JSX.Element;
|
|
14
|
+
declare function BreadcrumbLink({ className, render, ...props }: BreadcrumbLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): React.JSX.Element;
|
|
16
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps): React.JSX.Element;
|
|
17
|
+
declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): React.JSX.Element;
|
|
42
18
|
//#endregion
|
|
43
19
|
export { Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps };
|
package/dist/button-group.d.ts
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
1
|
import { Separator } from "./separator.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
5
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
|
-
|
|
8
5
|
//#region src/button-group.d.ts
|
|
9
6
|
declare const buttonGroupVariants: (props?: ({
|
|
10
7
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
-
} &
|
|
12
|
-
type ButtonGroupProps = React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type ButtonGroupProps = React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants> & {
|
|
10
|
+
size?: "xs" | "sm" | "default" | "lg";
|
|
11
|
+
};
|
|
13
12
|
type ButtonGroupTextProps = useRender.ComponentProps<"div">;
|
|
14
13
|
type ButtonGroupSeparatorProps = React.ComponentProps<typeof Separator>;
|
|
15
|
-
declare function ButtonGroup({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...props
|
|
19
|
-
}: ButtonGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
-
declare function ButtonGroupText({
|
|
21
|
-
className,
|
|
22
|
-
render,
|
|
23
|
-
...props
|
|
24
|
-
}: ButtonGroupTextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
25
|
-
declare function ButtonGroupSeparator({
|
|
26
|
-
className,
|
|
27
|
-
orientation,
|
|
28
|
-
...props
|
|
29
|
-
}: ButtonGroupSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare function ButtonGroup({ className, orientation, size, ...props }: ButtonGroupProps): React.JSX.Element;
|
|
15
|
+
declare function ButtonGroupText({ className, render, ...props }: ButtonGroupTextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): React.JSX.Element;
|
|
30
17
|
//#endregion
|
|
31
18
|
export { ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonGroupTextProps, buttonGroupVariants };
|
package/dist/button-group.js
CHANGED
|
@@ -6,18 +6,19 @@ import { cva } from "class-variance-authority";
|
|
|
6
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
//#region src/button-group.tsx
|
|
9
|
-
const buttonGroupVariants = cva("has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md flex w-fit items-stretch *:focus-visible:z-10 *:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
9
|
+
const buttonGroupVariants = cva("group/button-group has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md flex w-fit items-stretch *:focus-visible:z-10 *:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-shade has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-shade has-[>[data-variant=outline]]:[&>input]:border-shade has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-focus has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-focus has-[>[data-variant=outline]]:[&>input:focus-visible]:border-focus [&>[data-variant=default]]:border-primary [&>[data-variant=secondary]]:border-secondary [&>[data-variant=danger]]:border-danger", {
|
|
10
10
|
variants: { orientation: {
|
|
11
11
|
horizontal: "[&>[data-slot]:has(~[data-slot])]:rounded-r-none [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
12
12
|
vertical: "flex-col [&>[data-slot]:has(~[data-slot])]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
13
13
|
} },
|
|
14
14
|
defaultVariants: { orientation: "horizontal" }
|
|
15
15
|
});
|
|
16
|
-
function ButtonGroup({ className, orientation, ...props }) {
|
|
16
|
+
function ButtonGroup({ className, orientation, size = "default", ...props }) {
|
|
17
17
|
return /* @__PURE__ */ jsx("div", {
|
|
18
18
|
role: "group",
|
|
19
19
|
"data-slot": "button-group",
|
|
20
20
|
"data-orientation": orientation,
|
|
21
|
+
"data-size": size,
|
|
21
22
|
className: cn(buttonGroupVariants({ orientation }), className),
|
|
22
23
|
...props
|
|
23
24
|
});
|
|
@@ -25,7 +26,7 @@ function ButtonGroup({ className, orientation, ...props }) {
|
|
|
25
26
|
function ButtonGroupText({ className, render, ...props }) {
|
|
26
27
|
return useRender({
|
|
27
28
|
defaultTagName: "div",
|
|
28
|
-
props: mergeProps({ className: cn("bg-secondary gap-2 rounded-md border border-
|
|
29
|
+
props: mergeProps({ className: cn("bg-secondary gap-2 rounded-md border border-shade px-3 text-base font-medium group-data-[size=xs]/button-group:px-2 group-data-[size=xs]/button-group:text-xs group-data-[size=sm]/button-group:text-sm group-data-[size=lg]/button-group:px-4 group-data-[size=lg]/button-group:text-lg [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className) }, props),
|
|
29
30
|
render,
|
|
30
31
|
state: { slot: "button-group-text" }
|
|
31
32
|
});
|
|
@@ -34,7 +35,7 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
|
|
|
34
35
|
return /* @__PURE__ */ jsx(Separator, {
|
|
35
36
|
"data-slot": "button-group-separator",
|
|
36
37
|
orientation,
|
|
37
|
-
className: cn("bg-
|
|
38
|
+
className: cn("bg-contour relative self-stretch data-[orientation=horizontal]:w-auto data-[orientation=vertical]:h-auto", className),
|
|
38
39
|
...props
|
|
39
40
|
});
|
|
40
41
|
}
|
package/dist/button.d.ts
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
-
|
|
7
4
|
//#region src/button.d.ts
|
|
8
5
|
declare const buttonVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
10
|
-
size?: "default" | "
|
|
11
|
-
} &
|
|
6
|
+
variant?: "danger" | "default" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
7
|
+
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "sm" | "xs" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
9
|
type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
|
|
13
|
-
declare function Button({
|
|
14
|
-
className,
|
|
15
|
-
variant,
|
|
16
|
-
size,
|
|
17
|
-
...props
|
|
18
|
-
}: ButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function Button({ className, variant, size, ...props }: ButtonProps): React.JSX.Element;
|
|
19
11
|
//#endregion
|
|
20
12
|
export { Button, type ButtonProps, buttonVariants };
|
package/dist/button.js
CHANGED
|
@@ -4,14 +4,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
//#region src/button.tsx
|
|
7
|
-
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-
|
|
7
|
+
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-danger/30 aria-invalid:border-danger rounded-md border border-transparent bg-clip-padding font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color data-disabled:pointer-events-none data-disabled:opacity-30 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-hidden group/button select-none active:not-aria-[haspopup]:scale-[0.97]", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-primary text-white hover:bg-primary/80",
|
|
11
|
-
outline: "border-
|
|
12
|
-
secondary: "bg-secondary text-contrast hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-contrast",
|
|
13
|
-
ghost: "text-contrast hover:bg-
|
|
14
|
-
|
|
10
|
+
default: "bg-primary text-white hover:bg-primary/80 not-supports-backdrop-filter:hover:bg-primary/90 hover:backdrop-blur-xl hover:backdrop-saturate-150",
|
|
11
|
+
outline: "border-shade bg-foundation hover:bg-highlight hover:text-contrast aria-expanded:bg-highlight aria-expanded:text-contrast",
|
|
12
|
+
secondary: "bg-secondary text-contrast hover:bg-secondary/80 not-supports-backdrop-filter:hover:bg-secondary/90 hover:backdrop-blur-xl hover:backdrop-saturate-150 aria-expanded:bg-secondary aria-expanded:text-contrast",
|
|
13
|
+
ghost: "text-contrast hover:bg-highlight aria-expanded:bg-highlight aria-expanded:text-contrast",
|
|
14
|
+
danger: "bg-danger text-white hover:bg-danger/80 not-supports-backdrop-filter:hover:bg-danger/90 hover:backdrop-blur-xl hover:backdrop-saturate-150 focus-visible:ring-danger/50",
|
|
15
15
|
link: "text-primary underline-offset-4 hover:underline"
|
|
16
16
|
},
|
|
17
17
|
size: {
|
package/dist/card.d.ts
CHANGED
|
@@ -1,44 +1,27 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
3
|
//#region src/card.d.ts
|
|
5
|
-
type CardProps =
|
|
4
|
+
type CardProps = useRender.ComponentProps<"div"> & {
|
|
6
5
|
size?: "default" | "sm";
|
|
7
6
|
};
|
|
8
7
|
type CardHeaderProps = React.ComponentProps<"div">;
|
|
9
|
-
type CardTitleProps =
|
|
8
|
+
type CardTitleProps = useRender.ComponentProps<"div">;
|
|
10
9
|
type CardDescriptionProps = React.ComponentProps<"div">;
|
|
11
10
|
type CardActionProps = React.ComponentProps<"div">;
|
|
12
11
|
type CardContentProps = React.ComponentProps<"div">;
|
|
13
12
|
type CardFooterProps = React.ComponentProps<"div">;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}:
|
|
23
|
-
declare function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}:
|
|
27
|
-
declare function CardDescription({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: CardDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
31
|
-
declare function CardAction({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: CardActionProps): _$react_jsx_runtime0.JSX.Element;
|
|
35
|
-
declare function CardContent({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: CardContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
-
declare function CardFooter({
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: CardFooterProps): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* A surface that groups related content. `render` changes the element: an
|
|
15
|
+
* `article` or `section` for semantics, or a link or button to make the whole
|
|
16
|
+
* card interactive, which adds a hover, a clickable cursor and a focus ring.
|
|
17
|
+
*/
|
|
18
|
+
declare function Card({ className, size, render, ...props }: CardProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
19
|
+
declare function CardHeader({ className, ...props }: CardHeaderProps): React.JSX.Element;
|
|
20
|
+
/** `render={<h3 />}` makes the title a real heading for screen readers. */
|
|
21
|
+
declare function CardTitle({ className, render, ...props }: CardTitleProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
22
|
+
declare function CardDescription({ className, ...props }: CardDescriptionProps): React.JSX.Element;
|
|
23
|
+
declare function CardAction({ className, ...props }: CardActionProps): React.JSX.Element;
|
|
24
|
+
declare function CardContent({ className, ...props }: CardContentProps): React.JSX.Element;
|
|
25
|
+
declare function CardFooter({ className, ...props }: CardFooterProps): React.JSX.Element;
|
|
43
26
|
//#endregion
|
|
44
27
|
export { Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps };
|
package/dist/card.js
CHANGED
|
@@ -1,26 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "./lib/utils.js";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
6
|
//#region src/card.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A surface that groups related content. `render` changes the element: an
|
|
9
|
+
* `article` or `section` for semantics, or a link or button to make the whole
|
|
10
|
+
* card interactive, which adds a hover, a clickable cursor and a focus ring.
|
|
11
|
+
*/
|
|
12
|
+
function Card({ className, size = "default", render, ...props }) {
|
|
13
|
+
return useRender({
|
|
14
|
+
defaultTagName: "div",
|
|
15
|
+
props: mergeProps({ className: cn("ring-contrast/10 bg-surface text-contrast group/card flex flex-col gap-6 overflow-hidden rounded-lg py-6 text-sm ring-1 has-[>img:first-child]:pt-0 has-[>img:last-child]:pb-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg", "[a,button]:cursor-clickable [a,button]:hover:bg-elevated [button]:text-start motion-color outline-hidden focus-visible:ring-3 focus-visible:ring-focus/50 disabled:pointer-events-none disabled:opacity-30 aria-disabled:pointer-events-none aria-disabled:opacity-30", className) }, props),
|
|
16
|
+
render,
|
|
17
|
+
state: {
|
|
18
|
+
slot: "card",
|
|
19
|
+
size
|
|
20
|
+
}
|
|
10
21
|
});
|
|
11
22
|
}
|
|
12
23
|
function CardHeader({ className, ...props }) {
|
|
13
24
|
return /* @__PURE__ */ jsx("div", {
|
|
14
25
|
"data-slot": "card-header",
|
|
15
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1
|
|
26
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1.5 px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4", className),
|
|
16
27
|
...props
|
|
17
28
|
});
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
/** `render={<h3 />}` makes the title a real heading for screen readers. */
|
|
31
|
+
function CardTitle({ className, render, ...props }) {
|
|
32
|
+
return useRender({
|
|
33
|
+
defaultTagName: "div",
|
|
34
|
+
props: mergeProps({ className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className) }, props),
|
|
35
|
+
render,
|
|
36
|
+
state: { slot: "card-title" }
|
|
24
37
|
});
|
|
25
38
|
}
|
|
26
39
|
function CardDescription({ className, ...props }) {
|
|
@@ -40,14 +53,14 @@ function CardAction({ className, ...props }) {
|
|
|
40
53
|
function CardContent({ className, ...props }) {
|
|
41
54
|
return /* @__PURE__ */ jsx("div", {
|
|
42
55
|
"data-slot": "card-content",
|
|
43
|
-
className: cn("px-
|
|
56
|
+
className: cn("px-6 group-data-[size=sm]/card:px-4", className),
|
|
44
57
|
...props
|
|
45
58
|
});
|
|
46
59
|
}
|
|
47
60
|
function CardFooter({ className, ...props }) {
|
|
48
61
|
return /* @__PURE__ */ jsx("div", {
|
|
49
62
|
"data-slot": "card-footer",
|
|
50
|
-
className: cn("
|
|
63
|
+
className: cn("flex items-center px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4", className),
|
|
51
64
|
...props
|
|
52
65
|
});
|
|
53
66
|
}
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
4
|
-
|
|
5
3
|
//#region src/checkbox.d.ts
|
|
6
4
|
type CheckboxProps = React.ComponentProps<typeof Checkbox$1.Root>;
|
|
7
|
-
declare function Checkbox({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: CheckboxProps): _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
declare function Checkbox({ className, ...props }: CheckboxProps): React.JSX.Element;
|
|
11
6
|
//#endregion
|
|
12
7
|
export { Checkbox, type CheckboxProps };
|