@waveso/ui 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +12 -10
  2. package/dist/accordion.d.ts +4 -20
  3. package/dist/action-bar.d.ts +1 -10
  4. package/dist/action-bar.js +2 -1
  5. package/dist/alert-dialog.d.ts +12 -52
  6. package/dist/alert.d.ts +5 -21
  7. package/dist/animate.d.ts +5 -48
  8. package/dist/animate.js +6 -4
  9. package/dist/aspect-ratio.d.ts +3 -8
  10. package/dist/autocomplete.d.ts +21 -88
  11. package/dist/avatar.d.ts +6 -27
  12. package/dist/badge.d.ts +3 -11
  13. package/dist/breadcrumb.d.ts +7 -31
  14. package/dist/button-group.d.ts +4 -19
  15. package/dist/button.d.ts +4 -12
  16. package/dist/card.d.ts +7 -31
  17. package/dist/checkbox.d.ts +1 -6
  18. package/dist/collapsible.d.ts +3 -12
  19. package/dist/combobox.d.ts +18 -81
  20. package/dist/context-menu.d.ts +15 -67
  21. package/dist/count.d.ts +1 -15
  22. package/dist/count.js +3 -2
  23. package/dist/dialog.d.ts +10 -41
  24. package/dist/direction.d.ts +0 -1
  25. package/dist/drawer.d.ts +11 -44
  26. package/dist/encrypted-text.d.ts +1 -14
  27. package/dist/encrypted-text.js +2 -1
  28. package/dist/field.d.ts +7 -28
  29. package/dist/film-grain-shader.d.ts +3 -4
  30. package/dist/film-grain-webgl.d.ts +2 -9
  31. package/dist/film-grain-webgl.js +4 -1
  32. package/dist/film-grain.d.ts +1 -11
  33. package/dist/form.d.ts +11 -30
  34. package/dist/gradient-reveal-text.d.ts +1 -14
  35. package/dist/hooks/use-mobile.d.ts +2 -3
  36. package/dist/infinite-scroll.d.ts +1 -16
  37. package/dist/input-group.d.ts +11 -37
  38. package/dist/input-otp.d.ts +4 -20
  39. package/dist/input.d.ts +3 -11
  40. package/dist/item.d.ts +14 -51
  41. package/dist/kbd.d.ts +2 -10
  42. package/dist/label.d.ts +1 -6
  43. package/dist/lib/focus.d.ts +3 -5
  44. package/dist/lib/internal-icons.d.ts +19 -22
  45. package/dist/lib/utils.d.ts +3 -5
  46. package/dist/lib/utils.js +2 -1
  47. package/dist/masonry.d.ts +2 -16
  48. package/dist/masonry.js +1 -1
  49. package/dist/menu.d.ts +15 -64
  50. package/dist/menubar.d.ts +16 -55
  51. package/dist/pagination.d.ts +9 -33
  52. package/dist/popover.d.ts +9 -43
  53. package/dist/preview-card.d.ts +5 -25
  54. package/dist/progress.d.ts +5 -24
  55. package/dist/radio-group.d.ts +2 -9
  56. package/dist/radio.d.ts +2 -10
  57. package/dist/scroll-area.d.ts +2 -12
  58. package/dist/select.d.ts +15 -64
  59. package/dist/separator.d.ts +1 -7
  60. package/dist/sidebar.d.ts +29 -126
  61. package/dist/sidebar.js +2 -2
  62. package/dist/skeleton.d.ts +1 -6
  63. package/dist/slider.d.ts +1 -14
  64. package/dist/slider.js +2 -2
  65. package/dist/spinner.d.ts +1 -6
  66. package/dist/switch.d.ts +2 -9
  67. package/dist/table.d.ts +8 -34
  68. package/dist/tabs.d.ts +5 -22
  69. package/dist/textarea.d.ts +3 -12
  70. package/dist/toast.d.ts +13 -39
  71. package/dist/toggle-group.d.ts +3 -19
  72. package/dist/toggle-group.js +13 -7
  73. package/dist/toggle.d.ts +3 -11
  74. package/dist/tooltip.d.ts +4 -24
  75. package/dist/typewriter.d.ts +1 -14
  76. package/package.json +52 -51
package/dist/sidebar.d.ts CHANGED
@@ -2,12 +2,9 @@ import { Button } from "./button.js";
2
2
  import { Input } from "./input.js";
3
3
  import { Separator } from "./separator.js";
4
4
  import { TooltipContent } from "./tooltip.js";
5
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
5
  import * as React from "react";
7
6
  import { VariantProps } from "class-variance-authority";
8
7
  import { useRender } from "@base-ui/react/use-render";
9
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
10
-
11
8
  //#region src/sidebar.d.ts
12
9
  /**
13
10
  * Persist sidebar state to a cookie.
@@ -60,168 +57,74 @@ type SidebarProviderProps = React.ComponentProps<"div"> & {
60
57
  * <SidebarProvider persist={(open) => saveToServer(open)}>
61
58
  * ```
62
59
  */
63
- persist?: (open: boolean) => void; /** Key for Cmd/Ctrl+key toggle shortcut. Defaults to "b". Pass `false` to disable. */
64
- keyboardShortcut?: string | false; /** Breakpoint (px) below which the sidebar uses a mobile drawer. Defaults to 768. */
60
+ persist?: (open: boolean) => void;
61
+ /** Key for Cmd/Ctrl+key toggle shortcut. Defaults to "b". Pass `false` to disable. */
62
+ keyboardShortcut?: string | false;
63
+ /** Breakpoint (px) below which the sidebar uses a mobile drawer. Defaults to 768. */
65
64
  mobileBreakpoint?: number;
66
65
  };
67
- declare function SidebarProvider({
68
- defaultOpen,
69
- open: openProp,
70
- onOpenChange: setOpenProp,
71
- persist,
72
- keyboardShortcut,
73
- mobileBreakpoint,
74
- className,
75
- style,
76
- children,
77
- ...props
78
- }: SidebarProviderProps): _$react_jsx_runtime0.JSX.Element;
66
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, persist, keyboardShortcut, mobileBreakpoint, className, style, children, ...props }: SidebarProviderProps): React.JSX.Element;
79
67
  type SidebarProps = React.ComponentProps<"div"> & {
80
68
  side?: "left" | "right";
81
69
  variant?: "sidebar" | "floating" | "inset";
82
70
  collapsible?: "offcanvas" | "icon" | "none";
83
71
  };
84
- declare function Sidebar({
85
- side,
86
- variant,
87
- collapsible,
88
- className,
89
- children,
90
- ...props
91
- }: SidebarProps): _$react_jsx_runtime0.JSX.Element;
72
+ declare function Sidebar({ side, variant, collapsible, className, children, ...props }: SidebarProps): React.JSX.Element;
92
73
  type SidebarTriggerProps = React.ComponentProps<typeof Button>;
93
- declare function SidebarTrigger({
94
- className,
95
- onClick,
96
- ...props
97
- }: SidebarTriggerProps): _$react_jsx_runtime0.JSX.Element;
74
+ declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): React.JSX.Element;
98
75
  type SidebarRailProps = React.ComponentProps<"button">;
99
- declare function SidebarRail({
100
- className,
101
- ...props
102
- }: SidebarRailProps): _$react_jsx_runtime0.JSX.Element;
76
+ declare function SidebarRail({ className, ...props }: SidebarRailProps): React.JSX.Element;
103
77
  type SidebarInsetProps = React.ComponentProps<"main">;
104
- declare function SidebarInset({
105
- className,
106
- ...props
107
- }: SidebarInsetProps): _$react_jsx_runtime0.JSX.Element;
78
+ declare function SidebarInset({ className, ...props }: SidebarInsetProps): React.JSX.Element;
108
79
  type SidebarInputProps = React.ComponentProps<typeof Input>;
109
- declare function SidebarInput({
110
- className,
111
- ...props
112
- }: SidebarInputProps): _$react_jsx_runtime0.JSX.Element;
80
+ declare function SidebarInput({ className, ...props }: SidebarInputProps): React.JSX.Element;
113
81
  type SidebarHeaderProps = React.ComponentProps<"div">;
114
- declare function SidebarHeader({
115
- className,
116
- ...props
117
- }: SidebarHeaderProps): _$react_jsx_runtime0.JSX.Element;
82
+ declare function SidebarHeader({ className, ...props }: SidebarHeaderProps): React.JSX.Element;
118
83
  type SidebarFooterProps = React.ComponentProps<"div">;
119
- declare function SidebarFooter({
120
- className,
121
- ...props
122
- }: SidebarFooterProps): _$react_jsx_runtime0.JSX.Element;
84
+ declare function SidebarFooter({ className, ...props }: SidebarFooterProps): React.JSX.Element;
123
85
  type SidebarSeparatorProps = React.ComponentProps<typeof Separator>;
124
- declare function SidebarSeparator({
125
- className,
126
- ...props
127
- }: SidebarSeparatorProps): _$react_jsx_runtime0.JSX.Element;
86
+ declare function SidebarSeparator({ className, ...props }: SidebarSeparatorProps): React.JSX.Element;
128
87
  type SidebarContentProps = React.ComponentProps<"div">;
129
- declare function SidebarContent({
130
- className,
131
- style,
132
- ...props
133
- }: SidebarContentProps): _$react_jsx_runtime0.JSX.Element;
88
+ declare function SidebarContent({ className, style, ...props }: SidebarContentProps): React.JSX.Element;
134
89
  type SidebarGroupProps = React.ComponentProps<"div">;
135
- declare function SidebarGroup({
136
- className,
137
- ...props
138
- }: SidebarGroupProps): _$react_jsx_runtime0.JSX.Element;
90
+ declare function SidebarGroup({ className, ...props }: SidebarGroupProps): React.JSX.Element;
139
91
  type SidebarGroupLabelProps = useRender.ComponentProps<"div"> & React.ComponentProps<"div">;
140
- declare function SidebarGroupLabel({
141
- className,
142
- render,
143
- ...props
144
- }: SidebarGroupLabelProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
92
+ declare function SidebarGroupLabel({ className, render, ...props }: SidebarGroupLabelProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
145
93
  type SidebarGroupActionProps = useRender.ComponentProps<"button"> & React.ComponentProps<"button">;
146
- declare function SidebarGroupAction({
147
- className,
148
- render,
149
- ...props
150
- }: SidebarGroupActionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
94
+ declare function SidebarGroupAction({ className, render, ...props }: SidebarGroupActionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
151
95
  type SidebarGroupContentProps = React.ComponentProps<"div">;
152
- declare function SidebarGroupContent({
153
- className,
154
- ...props
155
- }: SidebarGroupContentProps): _$react_jsx_runtime0.JSX.Element;
96
+ declare function SidebarGroupContent({ className, ...props }: SidebarGroupContentProps): React.JSX.Element;
156
97
  type SidebarMenuProps = React.ComponentProps<"ul">;
157
- declare function SidebarMenu({
158
- className,
159
- ...props
160
- }: SidebarMenuProps): _$react_jsx_runtime0.JSX.Element;
98
+ declare function SidebarMenu({ className, ...props }: SidebarMenuProps): React.JSX.Element;
161
99
  type SidebarMenuItemProps = React.ComponentProps<"li">;
162
- declare function SidebarMenuItem({
163
- className,
164
- ...props
165
- }: SidebarMenuItemProps): _$react_jsx_runtime0.JSX.Element;
100
+ declare function SidebarMenuItem({ className, ...props }: SidebarMenuItemProps): React.JSX.Element;
166
101
  declare const sidebarMenuButtonVariants: (props?: ({
167
102
  variant?: "default" | "outline" | null | undefined;
168
- size?: "default" | "sm" | "lg" | null | undefined;
169
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
103
+ size?: "default" | "lg" | "sm" | null | undefined;
104
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
170
105
  type SidebarMenuButtonProps = useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
171
106
  isActive?: boolean;
172
107
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
173
108
  } & VariantProps<typeof sidebarMenuButtonVariants>;
174
- declare function SidebarMenuButton({
175
- render,
176
- isActive,
177
- variant,
178
- size,
179
- tooltip,
180
- className,
181
- ...props
182
- }: SidebarMenuButtonProps): _$react_jsx_runtime0.JSX.Element;
109
+ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: SidebarMenuButtonProps): React.JSX.Element;
183
110
  type SidebarMenuActionProps = useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
184
111
  showOnHover?: boolean;
185
112
  };
186
- declare function SidebarMenuAction({
187
- className,
188
- render,
189
- showOnHover,
190
- ...props
191
- }: SidebarMenuActionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
113
+ declare function SidebarMenuAction({ className, render, showOnHover, ...props }: SidebarMenuActionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
192
114
  type SidebarMenuBadgeProps = React.ComponentProps<"div">;
193
- declare function SidebarMenuBadge({
194
- className,
195
- ...props
196
- }: SidebarMenuBadgeProps): _$react_jsx_runtime0.JSX.Element;
115
+ declare function SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps): React.JSX.Element;
197
116
  type SidebarMenuSkeletonProps = React.ComponentProps<"div"> & {
198
117
  showIcon?: boolean;
199
118
  };
200
- declare function SidebarMenuSkeleton({
201
- className,
202
- showIcon,
203
- ...props
204
- }: SidebarMenuSkeletonProps): _$react_jsx_runtime0.JSX.Element;
119
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: SidebarMenuSkeletonProps): React.JSX.Element;
205
120
  type SidebarMenuSubProps = React.ComponentProps<"ul">;
206
- declare function SidebarMenuSub({
207
- className,
208
- ...props
209
- }: SidebarMenuSubProps): _$react_jsx_runtime0.JSX.Element;
121
+ declare function SidebarMenuSub({ className, ...props }: SidebarMenuSubProps): React.JSX.Element;
210
122
  type SidebarMenuSubItemProps = React.ComponentProps<"li">;
211
- declare function SidebarMenuSubItem({
212
- className,
213
- ...props
214
- }: SidebarMenuSubItemProps): _$react_jsx_runtime0.JSX.Element;
123
+ declare function SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps): React.JSX.Element;
215
124
  type SidebarMenuSubButtonProps = useRender.ComponentProps<"a"> & React.ComponentProps<"a"> & {
216
125
  size?: "sm" | "md";
217
126
  isActive?: boolean;
218
127
  };
219
- declare function SidebarMenuSubButton({
220
- render,
221
- size,
222
- isActive,
223
- className,
224
- ...props
225
- }: SidebarMenuSubButtonProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
128
+ declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: SidebarMenuSubButtonProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
226
129
  //#endregion
227
130
  export { Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupContentProps, SidebarGroupLabel, type SidebarGroupLabelProps, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarInput, type SidebarInputProps, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, type SidebarMenuBadgeProps, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarRailProps, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, cookiePersist, localStoragePersist, sidebarMenuButtonVariants, useSidebar };
package/dist/sidebar.js CHANGED
@@ -31,7 +31,7 @@ const SIDEBAR_DEFAULT_KEYBOARD_SHORTCUT = "b";
31
31
  * <SidebarProvider persist={cookiePersist("my-sidebar", 86400)}>
32
32
  * ```
33
33
  */
34
- function cookiePersist(name = "sidebar-state", maxAge = 3600 * 24 * 7) {
34
+ function cookiePersist(name = "sidebar-state", maxAge = 604800) {
35
35
  return (open) => {
36
36
  document.cookie = `${name}=${open}; path=/; max-age=${maxAge}`;
37
37
  };
@@ -74,7 +74,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
74
74
  persistRef.current?.(openState);
75
75
  }, [setOpenProp, open]);
76
76
  const toggleSidebar = React.useCallback(() => {
77
- return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
77
+ return isMobile ? setOpenMobile((prev) => !prev) : setOpen((prev) => !prev);
78
78
  }, [
79
79
  isMobile,
80
80
  setOpen,
@@ -1,11 +1,6 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import * as React from "react";
3
-
4
2
  //#region src/skeleton.d.ts
5
3
  type SkeletonProps = React.ComponentProps<"div">;
6
- declare function Skeleton({
7
- className,
8
- ...props
9
- }: SkeletonProps): _$react_jsx_runtime0.JSX.Element;
4
+ declare function Skeleton({ className, ...props }: SkeletonProps): React.JSX.Element;
10
5
  //#endregion
11
6
  export { Skeleton, type SkeletonProps };
package/dist/slider.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 { Slider as Slider$1 } from "@base-ui/react/slider";
4
-
5
3
  //#region src/slider.d.ts
6
4
  type SliderProps = React.ComponentProps<typeof Slider$1.Root> & {
7
5
  controlClassName?: string;
@@ -12,17 +10,6 @@ type SliderProps = React.ComponentProps<typeof Slider$1.Root> & {
12
10
  */
13
11
  getThumbAriaLabel?: (index: number) => string;
14
12
  };
15
- declare function Slider({
16
- className,
17
- controlClassName,
18
- defaultValue,
19
- value,
20
- min,
21
- max,
22
- orientation,
23
- "aria-label": ariaLabel,
24
- getThumbAriaLabel,
25
- ...props
26
- }: SliderProps): _$react_jsx_runtime0.JSX.Element;
13
+ declare function Slider({ className, controlClassName, defaultValue, value, min, max, orientation, "aria-label": ariaLabel, getThumbAriaLabel, ...props }: SliderProps): React.JSX.Element;
27
14
  //#endregion
28
15
  export { Slider, type SliderProps };
package/dist/slider.js CHANGED
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import { Slider as Slider$1 } from "@base-ui/react/slider";
6
6
  //#region src/slider.tsx
7
7
  function Slider({ className, controlClassName, defaultValue, value, min = 0, max = 100, orientation = "horizontal", "aria-label": ariaLabel, getThumbAriaLabel, ...props }) {
8
- const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
8
+ const resolvedValues = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
9
9
  value,
10
10
  defaultValue,
11
11
  min,
@@ -31,7 +31,7 @@ function Slider({ className, controlClassName, defaultValue, value, min = 0, max
31
31
  "data-slot": "slider-range",
32
32
  className: "bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
33
33
  })
34
- }), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
34
+ }), Array.from({ length: resolvedValues.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
35
35
  "data-slot": "slider-thumb",
36
36
  "aria-label": getThumbAriaLabel ? getThumbAriaLabel(index) : ariaLabel,
37
37
  className: "border-focus ring-focus/50 relative block size-3 shrink-0 rounded-full border bg-white motion-color cursor-clickable select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 data-disabled:pointer-events-none"
package/dist/spinner.d.ts CHANGED
@@ -1,11 +1,6 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import * as React from "react";
3
-
4
2
  //#region src/spinner.d.ts
5
3
  type SpinnerProps = React.ComponentProps<"svg">;
6
- declare function Spinner({
7
- className,
8
- ...props
9
- }: SpinnerProps): _$react_jsx_runtime0.JSX.Element;
4
+ declare function Spinner({ className, ...props }: SpinnerProps): React.JSX.Element;
10
5
  //#endregion
11
6
  export { Spinner, type SpinnerProps };
package/dist/switch.d.ts CHANGED
@@ -1,18 +1,11 @@
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 { Switch as Switch$1 } from "@base-ui/react/switch";
5
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
-
7
4
  //#region src/switch.d.ts
8
5
  declare const switchVariants: (props?: ({
9
6
  size?: "default" | "sm" | null | undefined;
10
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
8
  type SwitchProps = React.ComponentProps<typeof Switch$1.Root> & VariantProps<typeof switchVariants>;
12
- declare function Switch({
13
- className,
14
- size,
15
- ...props
16
- }: SwitchProps): _$react_jsx_runtime0.JSX.Element;
9
+ declare function Switch({ className, size, ...props }: SwitchProps): React.JSX.Element;
17
10
  //#endregion
18
11
  export { Switch, type SwitchProps, switchVariants };
package/dist/table.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import * as React from "react";
3
-
4
2
  //#region src/table.d.ts
5
3
  type TableProps = React.ComponentProps<"table">;
6
4
  type TableHeaderProps = React.ComponentProps<"thead">;
@@ -10,37 +8,13 @@ type TableRowProps = React.ComponentProps<"tr">;
10
8
  type TableHeadProps = React.ComponentProps<"th">;
11
9
  type TableCellProps = React.ComponentProps<"td">;
12
10
  type TableCaptionProps = React.ComponentProps<"caption">;
13
- declare function Table({
14
- className,
15
- ...props
16
- }: TableProps): _$react_jsx_runtime0.JSX.Element;
17
- declare function TableHeader({
18
- className,
19
- ...props
20
- }: TableHeaderProps): _$react_jsx_runtime0.JSX.Element;
21
- declare function TableBody({
22
- className,
23
- ...props
24
- }: TableBodyProps): _$react_jsx_runtime0.JSX.Element;
25
- declare function TableFooter({
26
- className,
27
- ...props
28
- }: TableFooterProps): _$react_jsx_runtime0.JSX.Element;
29
- declare function TableRow({
30
- className,
31
- ...props
32
- }: TableRowProps): _$react_jsx_runtime0.JSX.Element;
33
- declare function TableHead({
34
- className,
35
- ...props
36
- }: TableHeadProps): _$react_jsx_runtime0.JSX.Element;
37
- declare function TableCell({
38
- className,
39
- ...props
40
- }: TableCellProps): _$react_jsx_runtime0.JSX.Element;
41
- declare function TableCaption({
42
- className,
43
- ...props
44
- }: TableCaptionProps): _$react_jsx_runtime0.JSX.Element;
11
+ declare function Table({ className, ...props }: TableProps): React.JSX.Element;
12
+ declare function TableHeader({ className, ...props }: TableHeaderProps): React.JSX.Element;
13
+ declare function TableBody({ className, ...props }: TableBodyProps): React.JSX.Element;
14
+ declare function TableFooter({ className, ...props }: TableFooterProps): React.JSX.Element;
15
+ declare function TableRow({ className, ...props }: TableRowProps): React.JSX.Element;
16
+ declare function TableHead({ className, ...props }: TableHeadProps): React.JSX.Element;
17
+ declare function TableCell({ className, ...props }: TableCellProps): React.JSX.Element;
18
+ declare function TableCaption({ className, ...props }: TableCaptionProps): React.JSX.Element;
45
19
  //#endregion
46
20
  export { Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps };
package/dist/tabs.d.ts CHANGED
@@ -1,35 +1,18 @@
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 { Tabs as Tabs$1 } from "@base-ui/react/tabs";
5
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
-
7
4
  //#region src/tabs.d.ts
8
5
  declare const tabsListVariants: (props?: ({
9
6
  variant?: "default" | "line" | null | undefined;
10
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
8
  type TabsProps = React.ComponentProps<typeof Tabs$1.Root>;
12
9
  type TabsListBaseProps = React.ComponentProps<typeof Tabs$1.List>;
13
10
  type TabsListProps = TabsListBaseProps & VariantProps<typeof tabsListVariants>;
14
11
  type TabsTriggerProps = React.ComponentProps<typeof Tabs$1.Tab>;
15
12
  type TabsContentProps = React.ComponentProps<typeof Tabs$1.Panel>;
16
- declare function Tabs({
17
- className,
18
- orientation,
19
- ...props
20
- }: TabsProps): _$react_jsx_runtime0.JSX.Element;
21
- declare function TabsList({
22
- className,
23
- variant,
24
- ...props
25
- }: TabsListProps): _$react_jsx_runtime0.JSX.Element;
26
- declare function TabsTrigger({
27
- className,
28
- ...props
29
- }: TabsTriggerProps): _$react_jsx_runtime0.JSX.Element;
30
- declare function TabsContent({
31
- className,
32
- ...props
33
- }: TabsContentProps): _$react_jsx_runtime0.JSX.Element;
13
+ declare function Tabs({ className, orientation, ...props }: TabsProps): React.JSX.Element;
14
+ declare function TabsList({ className, variant, ...props }: TabsListProps): React.JSX.Element;
15
+ declare function TabsTrigger({ className, ...props }: TabsTriggerProps): React.JSX.Element;
16
+ declare function TabsContent({ className, ...props }: TabsContentProps): React.JSX.Element;
34
17
  //#endregion
35
18
  export { Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, tabsListVariants };
@@ -1,22 +1,13 @@
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
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
5
-
6
3
  //#region src/textarea.d.ts
7
4
  declare const textareaVariants: (props?: ({
8
- size?: "default" | "sm" | "xs" | "lg" | null | undefined;
9
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
5
+ size?: "default" | "lg" | "sm" | "xs" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
7
  type TextareaProps = Omit<React.ComponentProps<"textarea">, "onChange"> & {
11
8
  onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
12
9
  onValueChange?: (value: string) => void;
13
10
  } & VariantProps<typeof textareaVariants>;
14
- declare function Textarea({
15
- className,
16
- size,
17
- onChange,
18
- onValueChange,
19
- ...props
20
- }: TextareaProps): _$react_jsx_runtime0.JSX.Element;
11
+ declare function Textarea({ className, size, onChange, onValueChange, ...props }: TextareaProps): React.JSX.Element;
21
12
  //#endregion
22
13
  export { Textarea, type TextareaProps, textareaVariants };
package/dist/toast.d.ts CHANGED
@@ -1,17 +1,13 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import { Toast as Toast$1 } from "@base-ui/react/toast";
4
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
5
- import * as _$_base_ui_react0 from "@base-ui/react";
6
-
7
3
  //#region src/toast.d.ts
8
4
  declare const toastRootClass = "bg-elevated text-contrast ring-contrast/10 rounded-md p-4 text-sm shadow-md ring-1 outline-hidden";
9
5
  declare const toastIconVariants: (props?: ({
10
- type?: "loading" | "success" | "info" | "warning" | "error" | null | undefined;
11
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
6
+ type?: "error" | "info" | "loading" | "success" | "warning" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
8
  declare const toastViewportVariants: (props?: ({
13
- position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
14
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ position?: "bottom-center" | "bottom-left" | "bottom-right" | "top-center" | "top-left" | "top-right" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
11
  type ToastType = "loading" | "success" | "info" | "warning" | "error";
16
12
  type ToastOptions = {
17
13
  title?: string;
@@ -37,7 +33,7 @@ type ToastTitleProps = React.ComponentProps<typeof Toast$1.Title>;
37
33
  type ToastDescriptionProps = React.ComponentProps<typeof Toast$1.Description>;
38
34
  type ToastActionProps = React.ComponentProps<typeof Toast$1.Action>;
39
35
  type ToastCloseProps = React.ComponentProps<typeof Toast$1.Close>;
40
- declare const toastManager: _$_base_ui_react0.ToastManager<any>;
36
+ declare const toastManager: import("@base-ui/react").ToastManager<any>;
41
37
  declare const toast: ((titleOrOptions: string | ToastOptions) => string) & {
42
38
  success: (title: string, options?: Omit<ToastOptions, "type" | "title">) => string;
43
39
  error: (title: string, options?: Omit<ToastOptions, "type" | "title">) => string;
@@ -46,36 +42,14 @@ declare const toast: ((titleOrOptions: string | ToastOptions) => string) & {
46
42
  loading: (title: string, options?: Omit<ToastOptions, "type" | "title">) => string;
47
43
  dismiss: (id: string) => void;
48
44
  update: (id: string, updates: Partial<ToastOptions>) => void;
49
- promise: <Value, T extends any = any>(promiseValue: Promise<Value>, options: _$_base_ui_react0.ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
45
+ promise: <Value, T extends any = any>(promiseValue: Promise<Value>, options: import("@base-ui/react").ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
50
46
  };
51
- declare function ToastIcon({
52
- type
53
- }: ToastIconProps): _$react_jsx_runtime0.JSX.Element | null;
54
- declare function Toast({
55
- className,
56
- ...props
57
- }: ToastProps): _$react_jsx_runtime0.JSX.Element;
58
- declare function ToastTitle({
59
- className,
60
- ...props
61
- }: ToastTitleProps): _$react_jsx_runtime0.JSX.Element;
62
- declare function ToastDescription({
63
- className,
64
- ...props
65
- }: ToastDescriptionProps): _$react_jsx_runtime0.JSX.Element;
66
- declare function ToastAction({
67
- className,
68
- ...props
69
- }: ToastActionProps): _$react_jsx_runtime0.JSX.Element;
70
- declare function ToastClose({
71
- className,
72
- children,
73
- ...props
74
- }: ToastCloseProps): _$react_jsx_runtime0.JSX.Element;
75
- declare function Toaster({
76
- position,
77
- limit,
78
- timeout
79
- }: ToasterProps): _$react_jsx_runtime0.JSX.Element | null;
47
+ declare function ToastIcon({ type }: ToastIconProps): React.JSX.Element | null;
48
+ declare function Toast({ className, ...props }: ToastProps): React.JSX.Element;
49
+ declare function ToastTitle({ className, ...props }: ToastTitleProps): React.JSX.Element;
50
+ declare function ToastDescription({ className, ...props }: ToastDescriptionProps): React.JSX.Element;
51
+ declare function ToastAction({ className, ...props }: ToastActionProps): React.JSX.Element;
52
+ declare function ToastClose({ className, children, ...props }: ToastCloseProps): React.JSX.Element;
53
+ declare function Toaster({ position, limit, timeout }: ToasterProps): React.JSX.Element | null;
80
54
  //#endregion
81
55
  export { Toast, ToastAction, type ToastActionProps, ToastClose, type ToastCloseProps, ToastDescription, type ToastDescriptionProps, ToastIcon, type ToastIconProps, type ToastOptions, type ToastProps, ToastTitle, type ToastTitleProps, type ToastType, Toaster, type ToasterPosition, type ToasterProps, toast, toastIconVariants, toastManager, toastRootClass, toastViewportVariants };
@@ -1,30 +1,14 @@
1
1
  import { toggleVariants } from "./toggle.js";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Toggle } from "@base-ui/react/toggle";
5
5
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
6
-
7
6
  //#region src/toggle-group.d.ts
8
7
  type ToggleGroupProps = ToggleGroup$1.Props & VariantProps<typeof toggleVariants> & {
9
8
  spacing?: number;
10
9
  };
11
10
  type ToggleGroupItemProps = Toggle.Props & VariantProps<typeof toggleVariants>;
12
- declare function ToggleGroup({
13
- className,
14
- variant,
15
- size,
16
- spacing,
17
- orientation,
18
- style,
19
- children,
20
- ...props
21
- }: ToggleGroupProps): _$react_jsx_runtime0.JSX.Element;
22
- declare function ToggleGroupItem({
23
- className,
24
- children,
25
- variant,
26
- size,
27
- ...props
28
- }: ToggleGroupItemProps): _$react_jsx_runtime0.JSX.Element;
11
+ declare function ToggleGroup({ className, variant, size, spacing, orientation, style, children, ...props }: ToggleGroupProps): React.JSX.Element;
12
+ declare function ToggleGroupItem({ className, children, variant, size, ...props }: ToggleGroupItemProps): React.JSX.Element;
29
13
  //#endregion
30
14
  export { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps };
@@ -13,6 +13,17 @@ const ToggleGroupContext = React.createContext({
13
13
  orientation: "horizontal"
14
14
  });
15
15
  function ToggleGroup({ className, variant, size, spacing = 0, orientation = "horizontal", style, children, ...props }) {
16
+ const contextValue = React.useMemo(() => ({
17
+ variant,
18
+ size,
19
+ spacing,
20
+ orientation
21
+ }), [
22
+ variant,
23
+ size,
24
+ spacing,
25
+ orientation
26
+ ]);
16
27
  return /* @__PURE__ */ jsx(ToggleGroup$1, {
17
28
  orientation,
18
29
  "data-slot": "toggle-group",
@@ -20,18 +31,13 @@ function ToggleGroup({ className, variant, size, spacing = 0, orientation = "hor
20
31
  "data-size": size,
21
32
  "data-spacing": spacing,
22
33
  style: {
23
- ...style ?? {},
34
+ ...style,
24
35
  "--gap": spacing
25
36
  },
26
37
  className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[size=sm]:rounded-sm", className),
27
38
  ...props,
28
39
  children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
29
- value: {
30
- variant,
31
- size,
32
- spacing,
33
- orientation
34
- },
40
+ value: contextValue,
35
41
  children
36
42
  })
37
43
  });
package/dist/toggle.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 { VariantProps } from "class-variance-authority";
4
3
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
5
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
-
7
4
  //#region src/toggle.d.ts
8
5
  declare const toggleVariants: (props?: ({
9
6
  variant?: "default" | "outline" | null | undefined;
10
- size?: "default" | "sm" | "lg" | null | undefined;
11
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
7
+ size?: "default" | "lg" | "sm" | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
9
  type ToggleProps = React.ComponentProps<typeof Toggle$1> & VariantProps<typeof toggleVariants>;
13
- declare function Toggle({
14
- className,
15
- variant,
16
- size,
17
- ...props
18
- }: ToggleProps): _$react_jsx_runtime0.JSX.Element;
10
+ declare function Toggle({ className, variant, size, ...props }: ToggleProps): React.JSX.Element;
19
11
  //#endregion
20
12
  export { Toggle, type ToggleProps, toggleVariants };