@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/checkbox.js
CHANGED
|
@@ -7,11 +7,11 @@ import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
|
7
7
|
function Checkbox({ className, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
9
9
|
"data-slot": "checkbox",
|
|
10
|
-
className: cn("cursor-clickable border-
|
|
10
|
+
className: cn("cursor-clickable bg-shade border-transparent not-data-disabled:data-unchecked:hover:border-focus not-data-disabled:data-unchecked:group-hover/field:border-focus data-checked:bg-primary data-indeterminate:bg-primary data-checked:text-white data-indeterminate:text-white data-checked:border-primary data-indeterminate:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-danger focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-danger/30 peer relative flex size-6 shrink-0 items-center justify-center rounded-sm border motion-color outline-hidden group-has-disabled/field:opacity-30 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 data-disabled:pointer-events-none data-disabled:opacity-30 aria-invalid:ring-3", className),
|
|
11
11
|
...props,
|
|
12
12
|
children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
|
|
13
13
|
"data-slot": "checkbox-indicator",
|
|
14
|
-
className: "group/indicator grid place-content-center text-current transition-none [&>svg]:size-
|
|
14
|
+
className: "group/indicator grid place-content-center text-current transition-none [&>svg]:size-5",
|
|
15
15
|
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "col-start-1 row-start-1 group-data-indeterminate/indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "col-start-1 row-start-1 hidden group-data-indeterminate/indicator:block" })]
|
|
16
16
|
})
|
|
17
17
|
});
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
4
|
-
|
|
5
3
|
//#region src/collapsible.d.ts
|
|
6
4
|
type CollapsibleProps = React.ComponentProps<typeof Collapsible$1.Root>;
|
|
7
5
|
type CollapsibleTriggerProps = React.ComponentProps<typeof Collapsible$1.Trigger>;
|
|
8
6
|
type CollapsibleContentProps = React.ComponentProps<typeof Collapsible$1.Panel>;
|
|
9
|
-
declare function Collapsible({
|
|
10
|
-
|
|
11
|
-
}:
|
|
12
|
-
declare function CollapsibleTrigger({
|
|
13
|
-
className,
|
|
14
|
-
...props
|
|
15
|
-
}: CollapsibleTriggerProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
-
declare function CollapsibleContent({
|
|
17
|
-
...props
|
|
18
|
-
}: CollapsibleContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
7
|
+
declare function Collapsible({ ...props }: CollapsibleProps): React.JSX.Element;
|
|
8
|
+
declare function CollapsibleTrigger({ className, ...props }: CollapsibleTriggerProps): React.JSX.Element;
|
|
9
|
+
declare function CollapsibleContent({ ...props }: CollapsibleContentProps): React.JSX.Element;
|
|
19
10
|
//#endregion
|
|
20
11
|
export { Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps };
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
-
|
|
7
4
|
//#region src/combobox.d.ts
|
|
8
5
|
type ComboboxProps = React.ComponentProps<typeof Combobox$1.Root>;
|
|
9
6
|
type ComboboxValueProps = React.ComponentProps<typeof Combobox$1.Value>;
|
|
@@ -32,85 +29,25 @@ type ComboboxChipProps = ComboboxChipBaseProps & {
|
|
|
32
29
|
showRemove?: boolean;
|
|
33
30
|
};
|
|
34
31
|
type ComboboxContentProps = ComboboxPopupProps & Pick<ComboboxPositionerProps, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">;
|
|
35
|
-
declare function Combobox({
|
|
36
|
-
|
|
37
|
-
}:
|
|
38
|
-
declare function
|
|
39
|
-
|
|
40
|
-
}:
|
|
41
|
-
declare function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}:
|
|
46
|
-
declare function
|
|
47
|
-
|
|
48
|
-
...props
|
|
49
|
-
}: ComboboxClearProps): _$react_jsx_runtime0.JSX.Element;
|
|
50
|
-
declare function ComboboxInput({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
disabled,
|
|
54
|
-
showTrigger,
|
|
55
|
-
showClear,
|
|
56
|
-
size,
|
|
57
|
-
...props
|
|
58
|
-
}: ComboboxInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
59
|
-
declare function ComboboxContent({
|
|
60
|
-
className,
|
|
61
|
-
side,
|
|
62
|
-
sideOffset,
|
|
63
|
-
align,
|
|
64
|
-
alignOffset,
|
|
65
|
-
anchor,
|
|
66
|
-
...props
|
|
67
|
-
}: ComboboxContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
68
|
-
declare function ComboboxList({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: ComboboxListProps): _$react_jsx_runtime0.JSX.Element;
|
|
72
|
-
declare function ComboboxItem({
|
|
73
|
-
className,
|
|
74
|
-
children,
|
|
75
|
-
...props
|
|
76
|
-
}: ComboboxItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
77
|
-
declare function ComboboxGroup({
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}: ComboboxGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
81
|
-
declare function ComboboxLabel({
|
|
82
|
-
className,
|
|
83
|
-
...props
|
|
84
|
-
}: ComboboxLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
85
|
-
declare function ComboboxCollection({
|
|
86
|
-
...props
|
|
87
|
-
}: ComboboxCollectionProps): _$react_jsx_runtime0.JSX.Element;
|
|
88
|
-
declare function ComboboxEmpty({
|
|
89
|
-
className,
|
|
90
|
-
...props
|
|
91
|
-
}: ComboboxEmptyProps): _$react_jsx_runtime0.JSX.Element;
|
|
92
|
-
declare function ComboboxSeparator({
|
|
93
|
-
className,
|
|
94
|
-
...props
|
|
95
|
-
}: ComboboxSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
32
|
+
declare function Combobox({ ...props }: ComboboxProps): React.JSX.Element;
|
|
33
|
+
declare function ComboboxValue({ ...props }: ComboboxValueProps): React.JSX.Element;
|
|
34
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): React.JSX.Element;
|
|
35
|
+
declare function ComboboxClear({ className, ...props }: ComboboxClearProps): React.JSX.Element;
|
|
36
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, size, ...props }: ComboboxInputProps): React.JSX.Element;
|
|
37
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxContentProps): React.JSX.Element;
|
|
38
|
+
declare function ComboboxList({ className, ...props }: ComboboxListProps): React.JSX.Element;
|
|
39
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): React.JSX.Element;
|
|
40
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxGroupProps): React.JSX.Element;
|
|
41
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxLabelProps): React.JSX.Element;
|
|
42
|
+
declare function ComboboxCollection({ ...props }: ComboboxCollectionProps): React.JSX.Element;
|
|
43
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps): React.JSX.Element;
|
|
44
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps): React.JSX.Element;
|
|
96
45
|
declare const comboboxChipsVariants: (props?: ({
|
|
97
|
-
size?: "default" | "
|
|
98
|
-
} &
|
|
99
|
-
declare function ComboboxChips({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
...props
|
|
103
|
-
}: ComboboxChipsProps): _$react_jsx_runtime0.JSX.Element;
|
|
104
|
-
declare function ComboboxChip({
|
|
105
|
-
className,
|
|
106
|
-
children,
|
|
107
|
-
showRemove,
|
|
108
|
-
...props
|
|
109
|
-
}: ComboboxChipProps): _$react_jsx_runtime0.JSX.Element;
|
|
110
|
-
declare function ComboboxChipsInput({
|
|
111
|
-
className,
|
|
112
|
-
...props
|
|
113
|
-
}: ComboboxChipsInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
46
|
+
size?: "default" | "lg" | "sm" | "xs" | null | undefined;
|
|
47
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
48
|
+
declare function ComboboxChips({ className, size, ...props }: ComboboxChipsProps): React.JSX.Element;
|
|
49
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxChipProps): React.JSX.Element;
|
|
50
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps): React.JSX.Element;
|
|
114
51
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
115
52
|
//#endregion
|
|
116
53
|
export { Combobox, ComboboxChip, type ComboboxChipProps, ComboboxChips, ComboboxChipsInput, type ComboboxChipsInputProps, type ComboboxChipsProps, ComboboxClear, type ComboboxClearProps, ComboboxCollection, type ComboboxCollectionProps, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxLabel, type ComboboxLabelProps, ComboboxList, type ComboboxListProps, type ComboboxPortalProps, type ComboboxPositionerProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, ComboboxValue, type ComboboxValueProps, comboboxChipsVariants, useComboboxAnchor };
|
package/dist/combobox.js
CHANGED
|
@@ -94,7 +94,7 @@ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "
|
|
|
94
94
|
className: "isolate z-50",
|
|
95
95
|
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
96
96
|
"data-slot": "combobox-content",
|
|
97
|
-
className: cn("motion-pop-md bg-elevated text-contrast ring-contrast/10 *:data-[slot=input-group]:bg-
|
|
97
|
+
className: cn("motion-pop-md bg-elevated text-contrast ring-contrast/10 *:data-[slot=input-group]:bg-shade/30 *:data-[slot=input-group]:border-shade/30 group/combobox-content relative max-h-(--available-height) max-w-(--available-width) min-w-(--anchor-width) overflow-hidden rounded-md shadow-md ring-1 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none", className),
|
|
98
98
|
...props
|
|
99
99
|
})
|
|
100
100
|
}) });
|
|
@@ -109,7 +109,7 @@ function ComboboxList({ className, ...props }) {
|
|
|
109
109
|
function ComboboxItem({ className, children, ...props }) {
|
|
110
110
|
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
111
111
|
"data-slot": "combobox-item",
|
|
112
|
-
className: cn("data-highlighted:bg-
|
|
112
|
+
className: cn("data-highlighted:bg-highlight relative flex w-full cursor-clickable items-center gap-2 rounded-sm py-1 pr-8 pl-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),
|
|
113
113
|
...props,
|
|
114
114
|
children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
|
|
115
115
|
render: /* @__PURE__ */ jsx("span", {
|
|
@@ -150,11 +150,11 @@ function ComboboxEmpty({ className, ...props }) {
|
|
|
150
150
|
function ComboboxSeparator({ className, ...props }) {
|
|
151
151
|
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
152
152
|
"data-slot": "combobox-separator",
|
|
153
|
-
className: cn("bg-
|
|
153
|
+
className: cn("bg-contour -mx-1 my-1 h-px", className),
|
|
154
154
|
...props
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
const comboboxChipsVariants = cva("bg-
|
|
157
|
+
const comboboxChipsVariants = cva("bg-shade hover:border-focus focus-within:border-focus focus-within:ring-focus/50 has-aria-invalid:ring-danger/30 has-aria-invalid:border-danger flex flex-wrap items-center gap-1 rounded-md border border-transparent motion-color focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1", {
|
|
158
158
|
variants: { size: {
|
|
159
159
|
xs: "min-h-6 rounded-sm px-2 py-0.5 text-xs",
|
|
160
160
|
sm: "min-h-8 px-3 py-1 text-sm",
|
package/dist/context-menu.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { RestoreFocusOnClose } from "./lib/focus.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
5
|
-
|
|
6
4
|
//#region src/context-menu.d.ts
|
|
7
5
|
type ContextMenuProps = React.ComponentProps<typeof ContextMenu$1.Root>;
|
|
8
6
|
type ContextMenuPortalProps = React.ComponentProps<typeof ContextMenu$1.Portal>;
|
|
@@ -22,7 +20,8 @@ type ContextMenuLabelProps = React.ComponentProps<typeof ContextMenu$1.GroupLabe
|
|
|
22
20
|
};
|
|
23
21
|
type ContextMenuItemProps = React.ComponentProps<typeof ContextMenu$1.Item> & {
|
|
24
22
|
inset?: boolean;
|
|
25
|
-
|
|
23
|
+
/** `danger` turns the item's text and leading icon red. */
|
|
24
|
+
variant?: "default" | "danger";
|
|
26
25
|
};
|
|
27
26
|
type ContextMenuSubProps = React.ComponentProps<typeof ContextMenu$1.SubmenuRoot>;
|
|
28
27
|
type ContextMenuSubTriggerProps = React.ComponentProps<typeof ContextMenu$1.SubmenuTrigger> & {
|
|
@@ -38,70 +37,20 @@ type ContextMenuRadioItemProps = React.ComponentProps<typeof ContextMenu$1.Radio
|
|
|
38
37
|
type ContextMenuSeparatorProps = React.ComponentProps<typeof ContextMenu$1.Separator>;
|
|
39
38
|
type ContextMenuSubContentProps = React.ComponentProps<typeof ContextMenuContent>;
|
|
40
39
|
type ContextMenuShortcutProps = React.ComponentProps<"span">;
|
|
41
|
-
declare function ContextMenu(props: ContextMenuProps):
|
|
42
|
-
declare function ContextMenuPortal(props: ContextMenuPortalProps):
|
|
43
|
-
declare function ContextMenuTrigger({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}:
|
|
47
|
-
declare function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}: ContextMenuContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
57
|
-
declare function ContextMenuGroup(props: ContextMenuGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
58
|
-
declare function ContextMenuLabel({
|
|
59
|
-
className,
|
|
60
|
-
inset,
|
|
61
|
-
...props
|
|
62
|
-
}: ContextMenuLabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
63
|
-
declare function ContextMenuItem({
|
|
64
|
-
className,
|
|
65
|
-
inset,
|
|
66
|
-
variant,
|
|
67
|
-
...props
|
|
68
|
-
}: ContextMenuItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
69
|
-
declare function ContextMenuSub(props: ContextMenuSubProps): _$react_jsx_runtime0.JSX.Element;
|
|
70
|
-
declare function ContextMenuSubTrigger({
|
|
71
|
-
className,
|
|
72
|
-
inset,
|
|
73
|
-
children,
|
|
74
|
-
...props
|
|
75
|
-
}: ContextMenuSubTriggerProps): _$react_jsx_runtime0.JSX.Element;
|
|
76
|
-
declare function ContextMenuSubContent({
|
|
77
|
-
align,
|
|
78
|
-
alignOffset,
|
|
79
|
-
side,
|
|
80
|
-
sideOffset,
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}: ContextMenuSubContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
84
|
-
declare function ContextMenuCheckboxItem({
|
|
85
|
-
className,
|
|
86
|
-
children,
|
|
87
|
-
checked,
|
|
88
|
-
inset,
|
|
89
|
-
...props
|
|
90
|
-
}: ContextMenuCheckboxItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
91
|
-
declare function ContextMenuRadioGroup(props: ContextMenuRadioGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
92
|
-
declare function ContextMenuRadioItem({
|
|
93
|
-
className,
|
|
94
|
-
children,
|
|
95
|
-
inset,
|
|
96
|
-
...props
|
|
97
|
-
}: ContextMenuRadioItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
98
|
-
declare function ContextMenuSeparator({
|
|
99
|
-
className,
|
|
100
|
-
...props
|
|
101
|
-
}: ContextMenuSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
102
|
-
declare function ContextMenuShortcut({
|
|
103
|
-
className,
|
|
104
|
-
...props
|
|
105
|
-
}: ContextMenuShortcutProps): _$react_jsx_runtime0.JSX.Element;
|
|
40
|
+
declare function ContextMenu(props: ContextMenuProps): React.JSX.Element;
|
|
41
|
+
declare function ContextMenuPortal(props: ContextMenuPortalProps): React.JSX.Element;
|
|
42
|
+
declare function ContextMenuTrigger({ className, ...props }: ContextMenuTriggerProps): React.JSX.Element;
|
|
43
|
+
declare function ContextMenuContent({ className, align, alignOffset, side, sideOffset, restoreFocusOnClose, finalFocus, ...props }: ContextMenuContentProps): React.JSX.Element;
|
|
44
|
+
declare function ContextMenuGroup(props: ContextMenuGroupProps): React.JSX.Element;
|
|
45
|
+
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): React.JSX.Element;
|
|
46
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenuItemProps): React.JSX.Element;
|
|
47
|
+
declare function ContextMenuSub(props: ContextMenuSubProps): React.JSX.Element;
|
|
48
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuSubTriggerProps): React.JSX.Element;
|
|
49
|
+
declare function ContextMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: ContextMenuSubContentProps): React.JSX.Element;
|
|
50
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: ContextMenuCheckboxItemProps): React.JSX.Element;
|
|
51
|
+
declare function ContextMenuRadioGroup(props: ContextMenuRadioGroupProps): React.JSX.Element;
|
|
52
|
+
declare function ContextMenuRadioItem({ className, children, inset, ...props }: ContextMenuRadioItemProps): React.JSX.Element;
|
|
53
|
+
declare function ContextMenuSeparator({ className, ...props }: ContextMenuSeparatorProps): React.JSX.Element;
|
|
54
|
+
declare function ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): React.JSX.Element;
|
|
106
55
|
//#endregion
|
|
107
56
|
export { ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuPortalProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuShortcut, type ContextMenuShortcutProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, type RestoreFocusOnClose };
|
package/dist/context-menu.js
CHANGED
|
@@ -24,7 +24,7 @@ function ContextMenuTrigger({ className, ...props }) {
|
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "
|
|
27
|
+
function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "inline-end", sideOffset = 0, restoreFocusOnClose, finalFocus, ...props }) {
|
|
28
28
|
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
|
|
29
29
|
"data-slot": "context-menu-positioner",
|
|
30
30
|
className: "isolate z-50 outline-hidden",
|
|
@@ -34,7 +34,7 @@ function ContextMenuContent({ className, align = "start", alignOffset = 4, side
|
|
|
34
34
|
sideOffset,
|
|
35
35
|
children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
|
|
36
36
|
"data-slot": "context-menu-content",
|
|
37
|
-
className: cn("motion-pop-md
|
|
37
|
+
className: cn("motion-pop-md bg-elevated/80 not-supports-backdrop-filter:bg-elevated/90 text-contrast ring-contrast/10 z-50 max-h-(--available-height) min-w-48 overflow-x-hidden overflow-y-auto rounded-lg p-1.5 shadow-md ring-1 backdrop-blur-xl backdrop-saturate-150 outline-hidden", className),
|
|
38
38
|
finalFocus: resolveFinalFocus(restoreFocusOnClose, finalFocus),
|
|
39
39
|
...props
|
|
40
40
|
})
|
|
@@ -50,7 +50,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
50
50
|
return /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
|
|
51
51
|
"data-slot": "context-menu-label",
|
|
52
52
|
"data-inset": inset,
|
|
53
|
-
className: cn("text-muted px-
|
|
53
|
+
className: cn("text-muted px-3 py-2.5 text-xs font-medium data-inset:ps-9.5", className),
|
|
54
54
|
...props
|
|
55
55
|
});
|
|
56
56
|
}
|
|
@@ -59,7 +59,7 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
59
59
|
"data-slot": "context-menu-item",
|
|
60
60
|
"data-inset": inset,
|
|
61
61
|
"data-variant": variant,
|
|
62
|
-
className: cn("focus:bg-
|
|
62
|
+
className: cn("focus:bg-highlight data-[variant=danger]:text-danger data-[variant=danger]:*:[svg]:text-danger data-[variant=danger]:focus:bg-danger data-[variant=danger]:focus:text-white data-[variant=danger]:focus:**:text-white group/context-menu-item relative flex cursor-clickable items-center gap-2.5 rounded-[calc(var(--radius)+var(--spacing)-var(--spacing)*1.5)] px-3 py-2 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-30 data-inset:ps-9.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
63
63
|
...props
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -73,15 +73,15 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
73
73
|
return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
|
|
74
74
|
"data-slot": "context-menu-sub-trigger",
|
|
75
75
|
"data-inset": inset,
|
|
76
|
-
className: cn("focus:bg-
|
|
76
|
+
className: cn("focus:bg-highlight data-popup-open:bg-highlight flex cursor-clickable items-center gap-2.5 rounded-[calc(var(--radius)+var(--spacing)-var(--spacing)*1.5)] px-3 py-2 text-sm font-medium outline-hidden select-none data-inset:ps-9.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
77
77
|
...props,
|
|
78
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "
|
|
78
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })]
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
function ContextMenuSubContent({ align = "start", alignOffset = -
|
|
81
|
+
function ContextMenuSubContent({ align = "start", alignOffset = -6, side = "inline-end", sideOffset = 0, className, ...props }) {
|
|
82
82
|
return /* @__PURE__ */ jsx(ContextMenuContent, {
|
|
83
83
|
"data-slot": "context-menu-sub-content",
|
|
84
|
-
className: cn("w-auto min-w-24
|
|
84
|
+
className: cn("w-auto min-w-24", className),
|
|
85
85
|
align,
|
|
86
86
|
alignOffset,
|
|
87
87
|
side,
|
|
@@ -93,12 +93,12 @@ function ContextMenuCheckboxItem({ className, children, checked, inset, ...props
|
|
|
93
93
|
return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
|
|
94
94
|
"data-slot": "context-menu-checkbox-item",
|
|
95
95
|
"data-inset": inset,
|
|
96
|
-
className: cn("focus:bg-
|
|
96
|
+
className: cn("focus:bg-highlight relative flex cursor-clickable items-center gap-2.5 rounded-[calc(var(--radius)+var(--spacing)-var(--spacing)*1.5)] py-2 pe-8 ps-3 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-30 data-inset:ps-9.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
97
97
|
checked,
|
|
98
98
|
...props,
|
|
99
99
|
children: [/* @__PURE__ */ jsx("span", {
|
|
100
100
|
"data-slot": "context-menu-checkbox-item-indicator",
|
|
101
|
-
className: "absolute
|
|
101
|
+
className: "absolute end-2 pointer-events-none",
|
|
102
102
|
children: /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
103
103
|
}), children]
|
|
104
104
|
});
|
|
@@ -113,11 +113,11 @@ function ContextMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
113
113
|
return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
|
|
114
114
|
"data-slot": "context-menu-radio-item",
|
|
115
115
|
"data-inset": inset,
|
|
116
|
-
className: cn("focus:bg-
|
|
116
|
+
className: cn("focus:bg-highlight relative flex cursor-clickable items-center gap-2.5 rounded-[calc(var(--radius)+var(--spacing)-var(--spacing)*1.5)] py-2 pe-8 ps-3 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-30 data-inset:ps-9.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
117
117
|
...props,
|
|
118
118
|
children: [/* @__PURE__ */ jsx("span", {
|
|
119
119
|
"data-slot": "context-menu-radio-item-indicator",
|
|
120
|
-
className: "absolute
|
|
120
|
+
className: "absolute end-2 pointer-events-none",
|
|
121
121
|
children: /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
122
122
|
}), children]
|
|
123
123
|
});
|
|
@@ -125,14 +125,14 @@ function ContextMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
125
125
|
function ContextMenuSeparator({ className, ...props }) {
|
|
126
126
|
return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
|
|
127
127
|
"data-slot": "context-menu-separator",
|
|
128
|
-
className: cn("bg-
|
|
128
|
+
className: cn("bg-contour -mx-1.5 my-1.5 h-px", className),
|
|
129
129
|
...props
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
function ContextMenuShortcut({ className, ...props }) {
|
|
133
133
|
return /* @__PURE__ */ jsx("span", {
|
|
134
134
|
"data-slot": "context-menu-shortcut",
|
|
135
|
-
className: cn("text-muted
|
|
135
|
+
className: cn("text-muted ms-auto text-xs tracking-widest", className),
|
|
136
136
|
...props
|
|
137
137
|
});
|
|
138
138
|
}
|
package/dist/count.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ReactElement } from "react";
|
|
3
|
-
|
|
4
2
|
//#region src/count.d.ts
|
|
5
3
|
interface CountProps {
|
|
6
4
|
/** Target number or Date to count to */
|
|
@@ -67,19 +65,7 @@ declare function easeOut(t: number): number;
|
|
|
67
65
|
* </Count>
|
|
68
66
|
* ```
|
|
69
67
|
*/
|
|
70
|
-
declare function Count({
|
|
71
|
-
to,
|
|
72
|
-
from: start,
|
|
73
|
-
duration,
|
|
74
|
-
delay,
|
|
75
|
-
format,
|
|
76
|
-
prefix,
|
|
77
|
-
suffix,
|
|
78
|
-
children,
|
|
79
|
-
once,
|
|
80
|
-
easing,
|
|
81
|
-
onComplete
|
|
82
|
-
}: CountProps): _$react_jsx_runtime0.JSX.Element;
|
|
68
|
+
declare function Count({ to, from: start, duration, delay, format, prefix, suffix, children, once, easing, onComplete }: CountProps): import("react").JSX.Element;
|
|
83
69
|
/** @deprecated Use `Count` instead */
|
|
84
70
|
declare const CountUp: typeof Count;
|
|
85
71
|
//#endregion
|
package/dist/count.js
CHANGED
|
@@ -7,6 +7,7 @@ import { useInView, useReducedMotion } from "motion/react";
|
|
|
7
7
|
function easeOut(t) {
|
|
8
8
|
return 1 - (1 - t) ** 3;
|
|
9
9
|
}
|
|
10
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
10
11
|
function formatCountdown(ms) {
|
|
11
12
|
if (ms <= 0) return "00:00:00";
|
|
12
13
|
const totalSeconds = Math.floor(ms / 1e3);
|
|
@@ -14,7 +15,6 @@ function formatCountdown(ms) {
|
|
|
14
15
|
const hours = Math.floor(totalSeconds % 86400 / 3600);
|
|
15
16
|
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
16
17
|
const seconds = totalSeconds % 60;
|
|
17
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
18
18
|
if (days > 0) return `${days}d ${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
19
19
|
return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
20
20
|
}
|
|
@@ -114,7 +114,8 @@ function NumberCount({ to, from: start, duration, delay, format, prefix, suffix,
|
|
|
114
114
|
if (!startTime) startTime = timestamp;
|
|
115
115
|
const elapsed = timestamp - startTime;
|
|
116
116
|
const progress = Math.min(elapsed / duration, 1);
|
|
117
|
-
|
|
117
|
+
const current = start + (to - start) * easingRef.current(progress);
|
|
118
|
+
setDisplay(current);
|
|
118
119
|
if (progress < 1) raf = requestAnimationFrame(animate);
|
|
119
120
|
else onCompleteRef.current?.();
|
|
120
121
|
};
|
package/dist/dialog.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 { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
|
-
|
|
5
3
|
//#region src/dialog.d.ts
|
|
6
4
|
type DialogProps = React.ComponentProps<typeof Dialog$1.Root> & {
|
|
7
5
|
/**
|
|
@@ -28,44 +26,15 @@ type DialogContentProps = DialogPopupProps & {
|
|
|
28
26
|
};
|
|
29
27
|
type DialogHeaderProps = React.ComponentProps<"div">;
|
|
30
28
|
type DialogFooterProps = React.ComponentProps<"div">;
|
|
31
|
-
declare function Dialog({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}:
|
|
35
|
-
declare function
|
|
36
|
-
|
|
37
|
-
}:
|
|
38
|
-
declare function
|
|
39
|
-
|
|
40
|
-
}:
|
|
41
|
-
declare function DialogClose({
|
|
42
|
-
...props
|
|
43
|
-
}: DialogCloseProps): _$react_jsx_runtime0.JSX.Element;
|
|
44
|
-
declare function DialogOverlay({
|
|
45
|
-
className,
|
|
46
|
-
...props
|
|
47
|
-
}: DialogOverlayProps): _$react_jsx_runtime0.JSX.Element;
|
|
48
|
-
declare function DialogContent({
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
showCloseButton,
|
|
52
|
-
...props
|
|
53
|
-
}: DialogContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
|
-
declare function DialogHeader({
|
|
55
|
-
className,
|
|
56
|
-
...props
|
|
57
|
-
}: DialogHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
58
|
-
declare function DialogFooter({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: DialogFooterProps): _$react_jsx_runtime0.JSX.Element;
|
|
62
|
-
declare function DialogTitle({
|
|
63
|
-
className,
|
|
64
|
-
...props
|
|
65
|
-
}: DialogTitleProps): _$react_jsx_runtime0.JSX.Element;
|
|
66
|
-
declare function DialogDescription({
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: DialogDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
29
|
+
declare function Dialog({ disablePointerDismissal, ...props }: DialogProps): React.JSX.Element;
|
|
30
|
+
declare function DialogTrigger({ ...props }: DialogTriggerProps): React.JSX.Element;
|
|
31
|
+
declare function DialogPortal({ ...props }: DialogPortalProps): React.JSX.Element;
|
|
32
|
+
declare function DialogClose({ ...props }: DialogCloseProps): React.JSX.Element;
|
|
33
|
+
declare function DialogOverlay({ className, ...props }: DialogOverlayProps): React.JSX.Element;
|
|
34
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: DialogContentProps): React.JSX.Element;
|
|
35
|
+
declare function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element;
|
|
36
|
+
declare function DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element;
|
|
37
|
+
declare function DialogTitle({ className, ...props }: DialogTitleProps): React.JSX.Element;
|
|
38
|
+
declare function DialogDescription({ className, ...props }: DialogDescriptionProps): React.JSX.Element;
|
|
70
39
|
//#endregion
|
|
71
40
|
export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, type DialogPopupProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
|
package/dist/dialog.js
CHANGED
|
@@ -40,13 +40,13 @@ function DialogOverlay({ className, ...props }) {
|
|
|
40
40
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
41
41
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
42
42
|
"data-slot": "dialog-content",
|
|
43
|
-
className: cn("motion-scale-lg bg-foundation ring-contrast/10 fixed top-1/2
|
|
43
|
+
className: cn("motion-scale-lg bg-foundation ring-contrast/10 fixed top-1/2 start-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-6 rounded-lg p-6 text-sm ring-1 outline-hidden sm:max-w-sm shadow-lg", className),
|
|
44
44
|
...props,
|
|
45
45
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
46
46
|
"data-slot": "dialog-close",
|
|
47
47
|
render: /* @__PURE__ */ jsx(Button, {
|
|
48
48
|
variant: "ghost",
|
|
49
|
-
className: "absolute top-
|
|
49
|
+
className: "absolute top-3 end-3",
|
|
50
50
|
size: "icon-sm"
|
|
51
51
|
}),
|
|
52
52
|
children: [/* @__PURE__ */ jsx(CloseIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
@@ -59,21 +59,21 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
59
59
|
function DialogHeader({ className, ...props }) {
|
|
60
60
|
return /* @__PURE__ */ jsx("div", {
|
|
61
61
|
"data-slot": "dialog-header",
|
|
62
|
-
className: cn("flex flex-col gap-
|
|
62
|
+
className: cn("flex flex-col gap-3", className),
|
|
63
63
|
...props
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function DialogFooter({ className, ...props }) {
|
|
67
67
|
return /* @__PURE__ */ jsx("div", {
|
|
68
68
|
"data-slot": "dialog-footer",
|
|
69
|
-
className: cn("
|
|
69
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
70
70
|
...props
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function DialogTitle({ className, ...props }) {
|
|
74
74
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
75
75
|
"data-slot": "dialog-title",
|
|
76
|
-
className: cn("text-
|
|
76
|
+
className: cn("text-lg font-medium leading-none pe-8", className),
|
|
77
77
|
...props
|
|
78
78
|
});
|
|
79
79
|
}
|
package/dist/direction.d.ts
CHANGED
package/dist/drawer.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 { Drawer as Drawer$1 } from "@base-ui/react/drawer";
|
|
4
|
-
|
|
5
3
|
//#region src/drawer.d.ts
|
|
6
4
|
type DrawerProps = React.ComponentProps<typeof Drawer$1.Root>;
|
|
7
5
|
type DrawerTriggerProps = React.ComponentProps<typeof Drawer$1.Trigger>;
|
|
@@ -17,47 +15,16 @@ type DrawerFooterProps = React.ComponentProps<"div">;
|
|
|
17
15
|
type DrawerContentProps = DrawerPopupProps & {
|
|
18
16
|
showCloseButton?: boolean;
|
|
19
17
|
};
|
|
20
|
-
declare function Drawer({
|
|
21
|
-
|
|
22
|
-
}:
|
|
23
|
-
declare function
|
|
24
|
-
|
|
25
|
-
}:
|
|
26
|
-
declare function
|
|
27
|
-
|
|
28
|
-
}:
|
|
29
|
-
declare function
|
|
30
|
-
|
|
31
|
-
}: DrawerCloseProps): _$react_jsx_runtime0.JSX.Element;
|
|
32
|
-
declare function DrawerOverlay({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: DrawerOverlayProps): _$react_jsx_runtime0.JSX.Element;
|
|
36
|
-
declare function DrawerViewport({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: DrawerViewportProps): _$react_jsx_runtime0.JSX.Element;
|
|
40
|
-
declare function DrawerContent({
|
|
41
|
-
className,
|
|
42
|
-
children,
|
|
43
|
-
showCloseButton,
|
|
44
|
-
...props
|
|
45
|
-
}: DrawerContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
46
|
-
declare function DrawerHeader({
|
|
47
|
-
className,
|
|
48
|
-
...props
|
|
49
|
-
}: DrawerHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
50
|
-
declare function DrawerFooter({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: DrawerFooterProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
|
-
declare function DrawerTitle({
|
|
55
|
-
className,
|
|
56
|
-
...props
|
|
57
|
-
}: DrawerTitleProps): _$react_jsx_runtime0.JSX.Element;
|
|
58
|
-
declare function DrawerDescription({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: DrawerDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
18
|
+
declare function Drawer({ ...props }: DrawerProps): React.JSX.Element;
|
|
19
|
+
declare function DrawerTrigger({ ...props }: DrawerTriggerProps): React.JSX.Element;
|
|
20
|
+
declare function DrawerPortal({ ...props }: DrawerPortalProps): React.JSX.Element;
|
|
21
|
+
declare function DrawerClose({ ...props }: DrawerCloseProps): React.JSX.Element;
|
|
22
|
+
declare function DrawerOverlay({ className, ...props }: DrawerOverlayProps): React.JSX.Element;
|
|
23
|
+
declare function DrawerViewport({ className, ...props }: DrawerViewportProps): React.JSX.Element;
|
|
24
|
+
declare function DrawerContent({ className, children, showCloseButton, ...props }: DrawerContentProps): React.JSX.Element;
|
|
25
|
+
declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
|
|
26
|
+
declare function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element;
|
|
27
|
+
declare function DrawerTitle({ className, ...props }: DrawerTitleProps): React.JSX.Element;
|
|
28
|
+
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): React.JSX.Element;
|
|
62
29
|
//#endregion
|
|
63
30
|
export { Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, type DrawerOverlayProps, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DrawerViewport, type DrawerViewportProps };
|