@waveso/ui 0.15.1 → 0.17.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 +13 -12
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +4 -4
- package/dist/alert-dialog.js +5 -5
- package/dist/alert.d.ts +8 -1
- package/dist/alert.js +13 -4
- package/dist/animate.d.ts +1 -1
- package/dist/animate.js +2 -9
- package/dist/autocomplete.js +3 -3
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +6 -6
- package/dist/button-group.d.ts +4 -2
- package/dist/button-group.js +5 -4
- package/dist/button.d.ts +1 -1
- package/dist/button.js +6 -6
- package/dist/card.d.ts +11 -4
- package/dist/card.js +27 -14
- package/dist/checkbox.js +2 -2
- package/dist/combobox.js +4 -4
- package/dist/context-menu.d.ts +2 -1
- package/dist/context-menu.js +14 -14
- package/dist/dialog.js +5 -5
- package/dist/drawer.js +1 -1
- package/dist/encrypted-text.d.ts +15 -1
- package/dist/encrypted-text.js +205 -67
- package/dist/field.d.ts +21 -3
- package/dist/field.js +36 -8
- package/dist/fieldset.d.ts +14 -0
- package/dist/fieldset.js +26 -0
- package/dist/form.d.ts +14 -14
- 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 +3 -3
- package/dist/gradient-reveal-text.js +8 -8
- package/dist/input-group.js +1 -1
- package/dist/input-otp.d.ts +3 -3
- package/dist/input-otp.js +2 -2
- package/dist/input.js +1 -1
- package/dist/item.d.ts +1 -1
- package/dist/item.js +17 -11
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js +2 -2
- package/dist/label.js +1 -1
- package/dist/lib/merge-refs.d.ts +9 -0
- package/dist/lib/merge-refs.js +16 -0
- package/dist/lib/utils.js +7 -0
- package/dist/masonry.d.ts +1 -1
- package/dist/masonry.js +4 -2
- package/dist/menu.d.ts +2 -1
- package/dist/menu.js +7 -7
- package/dist/menubar.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/preview-card.js +1 -1
- package/dist/progress.js +2 -2
- package/dist/radio-group.js +1 -1
- 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 +13 -2
- package/dist/scroll-area.js +26 -7
- package/dist/select.js +4 -4
- package/dist/separator.js +1 -1
- package/dist/sidebar.js +12 -12
- package/dist/slider.js +3 -3
- package/dist/spinner.d.ts +7 -0
- package/dist/spinner.js +24 -6
- package/dist/styles.css +581 -194
- package/dist/swipe-deck.d.ts +98 -0
- package/dist/swipe-deck.js +931 -0
- package/dist/switch.js +6 -6
- package/dist/table.d.ts +7 -1
- package/dist/table.js +40 -9
- package/dist/tabs.js +3 -3
- package/dist/textarea.js +1 -1
- package/dist/toast.js +4 -4
- package/dist/toggle-group.js +3 -3
- package/dist/toggle.d.ts +1 -1
- package/dist/toggle.js +11 -6
- package/dist/tooltip.d.ts +3 -1
- package/dist/tooltip.js +10 -6
- package/dist/video-text.d.ts +25 -0
- package/dist/video-text.js +147 -0
- package/package.json +6 -1
package/dist/sidebar.js
CHANGED
|
@@ -163,14 +163,14 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
163
163
|
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
164
164
|
}), /* @__PURE__ */ jsx("div", {
|
|
165
165
|
"data-slot": "sidebar-container",
|
|
166
|
-
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) after:absolute after:inset-y-0 after:w-px after:bg-
|
|
166
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) after:absolute after:inset-y-0 after:w-px after:bg-contour" + (side === "left" ? " after:right-0" : " after:left-0"), className),
|
|
167
167
|
...props,
|
|
168
168
|
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
169
169
|
delay: 0,
|
|
170
170
|
closeDelay: 300,
|
|
171
171
|
children: /* @__PURE__ */ jsx("div", {
|
|
172
172
|
"data-slot": "sidebar-inner",
|
|
173
|
-
className: "bg-surface group-data-[variant=floating]:ring-
|
|
173
|
+
className: "bg-surface group-data-[variant=floating]:ring-contour group-data-[variant=floating]:rounded-md group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",
|
|
174
174
|
children
|
|
175
175
|
})
|
|
176
176
|
})
|
|
@@ -204,7 +204,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
204
204
|
tabIndex: -1,
|
|
205
205
|
onClick: toggleSidebar,
|
|
206
206
|
title: "Toggle Sidebar",
|
|
207
|
-
className: cn("hover:after:bg-
|
|
207
|
+
className: cn("hover:after:bg-contour absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-[left,right,transform] duration-200 ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-closed]_&]:cursor-e-resize [[data-side=right][data-closed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-surface group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
208
208
|
...props
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -239,7 +239,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
239
239
|
function SidebarSeparator({ className, ...props }) {
|
|
240
240
|
return /* @__PURE__ */ jsx(Separator, {
|
|
241
241
|
"data-slot": "sidebar-separator",
|
|
242
|
-
className: cn("bg-
|
|
242
|
+
className: cn("bg-contour mx-2 data-[orientation=horizontal]:w-auto", className),
|
|
243
243
|
...props
|
|
244
244
|
});
|
|
245
245
|
}
|
|
@@ -273,7 +273,7 @@ function SidebarGroupLabel({ className, render, ...props }) {
|
|
|
273
273
|
function SidebarGroupAction({ className, render, ...props }) {
|
|
274
274
|
return useRender({
|
|
275
275
|
defaultTagName: "button",
|
|
276
|
-
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-
|
|
276
|
+
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-highlight absolute top-1.5 right-3 w-5 rounded-sm p-0 focus-visible:ring-3 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform [&>svg]:shrink-0 after:absolute after:-inset-2 md:after:hidden group-data-[collapsible=icon]:hidden", className) }, props),
|
|
277
277
|
render,
|
|
278
278
|
state: { slot: "sidebar-group-action" }
|
|
279
279
|
});
|
|
@@ -299,11 +299,11 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
299
299
|
...props
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
const sidebarMenuButtonVariants = cva("ring-focus/50 hover:bg-
|
|
302
|
+
const sidebarMenuButtonVariants = cva("ring-focus/50 hover:bg-highlight active:bg-highlight data-active:bg-primary data-active:text-white gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[slot=sidebar-menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:w-full group-data-[collapsible=icon]:aspect-square group-data-[collapsible=icon]:h-11 focus-visible:ring-3 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-30 aria-disabled:pointer-events-none aria-disabled:opacity-30 [&>span:last-child]:truncate [&_svg]:shrink-0", {
|
|
303
303
|
variants: {
|
|
304
304
|
variant: {
|
|
305
|
-
default: "
|
|
306
|
-
outline: "bg-foundation hover:bg-
|
|
305
|
+
default: "",
|
|
306
|
+
outline: "bg-foundation hover:bg-highlight ring-1 ring-contour hover:ring-focus"
|
|
307
307
|
},
|
|
308
308
|
size: {
|
|
309
309
|
default: "h-11 text-sm",
|
|
@@ -344,7 +344,7 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
|
|
|
344
344
|
function SidebarMenuAction({ className, render, showOnHover = false, ...props }) {
|
|
345
345
|
return useRender({
|
|
346
346
|
defaultTagName: "button",
|
|
347
|
-
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-
|
|
347
|
+
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-highlight peer-data-active/menu-button:text-white absolute top-1/2 -translate-y-1/2 right-1 aspect-square w-5 rounded-sm p-0 focus-visible:ring-3 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0", className) }, props),
|
|
348
348
|
render,
|
|
349
349
|
state: { slot: "sidebar-menu-action" }
|
|
350
350
|
});
|
|
@@ -352,7 +352,7 @@ function SidebarMenuAction({ className, render, showOnHover = false, ...props })
|
|
|
352
352
|
function SidebarMenuBadge({ className, ...props }) {
|
|
353
353
|
return /* @__PURE__ */ jsx("div", {
|
|
354
354
|
"data-slot": "sidebar-menu-badge",
|
|
355
|
-
className: cn("text-contrast peer-
|
|
355
|
+
className: cn("text-contrast peer-data-active/menu-button:text-white pointer-events-none absolute right-1 top-1/2 -translate-y-1/2 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden", className),
|
|
356
356
|
...props
|
|
357
357
|
});
|
|
358
358
|
}
|
|
@@ -373,7 +373,7 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
373
373
|
function SidebarMenuSub({ className, ...props }) {
|
|
374
374
|
return /* @__PURE__ */ jsx("ul", {
|
|
375
375
|
"data-slot": "sidebar-menu-sub",
|
|
376
|
-
className: cn("border-
|
|
376
|
+
className: cn("border-contour ml-3.5 mr-0 translate-x-px gap-0.5 border-l pl-2.5 pr-0 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col", className),
|
|
377
377
|
...props
|
|
378
378
|
});
|
|
379
379
|
}
|
|
@@ -387,7 +387,7 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
387
387
|
function SidebarMenuSubButton({ render, size = "md", isActive = false, className, ...props }) {
|
|
388
388
|
return useRender({
|
|
389
389
|
defaultTagName: "a",
|
|
390
|
-
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-
|
|
390
|
+
props: mergeProps({ className: cn("text-contrast ring-focus/50 hover:bg-highlight active:bg-highlight data-active:bg-primary data-active:text-white h-7 gap-2 rounded-md px-2 focus-visible:ring-3 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-30 aria-disabled:pointer-events-none aria-disabled:opacity-30 [&>span:last-child]:truncate [&>svg]:shrink-0", className) }, props),
|
|
391
391
|
render,
|
|
392
392
|
state: {
|
|
393
393
|
slot: "sidebar-menu-sub-button",
|
package/dist/slider.js
CHANGED
|
@@ -23,10 +23,10 @@ function Slider({ className, controlClassName, defaultValue, value, min = 0, max
|
|
|
23
23
|
...props,
|
|
24
24
|
children: /* @__PURE__ */ jsxs(Slider$1.Control, {
|
|
25
25
|
"data-slot": "slider-control",
|
|
26
|
-
className: cn("relative flex w-full touch-none items-center select-none data-disabled:
|
|
26
|
+
className: cn("relative flex w-full touch-none items-center select-none data-disabled:pointer-events-none data-disabled:opacity-30 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", controlClassName),
|
|
27
27
|
children: [/* @__PURE__ */ jsx(Slider$1.Track, {
|
|
28
28
|
"data-slot": "slider-track",
|
|
29
|
-
className: "bg-
|
|
29
|
+
className: "bg-shade relative grow overflow-hidden rounded-full select-none data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2",
|
|
30
30
|
children: /* @__PURE__ */ jsx(Slider$1.Indicator, {
|
|
31
31
|
"data-slot": "slider-range",
|
|
32
32
|
className: "bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
@@ -34,7 +34,7 @@ function Slider({ className, controlClassName, defaultValue, value, min = 0, max
|
|
|
34
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
|
-
className: "
|
|
37
|
+
className: "ring-focus/50 relative block data-[orientation=horizontal]:h-4 data-[orientation=horizontal]:w-6 data-[orientation=vertical]:h-6 data-[orientation=vertical]:w-4 shrink-0 rounded-full border border-shade 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"
|
|
38
38
|
}, index))]
|
|
39
39
|
})
|
|
40
40
|
});
|
package/dist/spinner.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
//#region src/spinner.d.ts
|
|
3
3
|
type SpinnerProps = React.ComponentProps<"svg">;
|
|
4
|
+
/**
|
|
5
|
+
* A circle with a gap, rotating — drawn in `currentColor` so it takes the tone
|
|
6
|
+
* of whatever it sits in, and sized in `em` so it matches the text/icon beside
|
|
7
|
+
* it without a size prop at every call site. The `<svg>` itself is the
|
|
8
|
+
* accessible status (`role="status"` + `aria-label`), so pass `aria-label` to
|
|
9
|
+
* override the announced text.
|
|
10
|
+
*/
|
|
4
11
|
declare function Spinner({ className, ...props }: SpinnerProps): React.JSX.Element;
|
|
5
12
|
//#endregion
|
|
6
13
|
export { Spinner, type SpinnerProps };
|
package/dist/spinner.js
CHANGED
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import { cn } from "./lib/utils.js";
|
|
2
|
-
import {
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
//#region src/spinner.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A circle with a gap, rotating — drawn in `currentColor` so it takes the tone
|
|
6
|
+
* of whatever it sits in, and sized in `em` so it matches the text/icon beside
|
|
7
|
+
* it without a size prop at every call site. The `<svg>` itself is the
|
|
8
|
+
* accessible status (`role="status"` + `aria-label`), so pass `aria-label` to
|
|
9
|
+
* override the announced text.
|
|
10
|
+
*/
|
|
5
11
|
function Spinner({ className, ...props }) {
|
|
6
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
7
13
|
"data-slot": "spinner",
|
|
8
14
|
role: "status",
|
|
9
15
|
"aria-label": "Loading",
|
|
10
|
-
"
|
|
11
|
-
className: cn("size-
|
|
12
|
-
...props
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
className: cn("size-[1.15em] shrink-0 motion-spin-sm", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
20
|
+
cx: "12",
|
|
21
|
+
cy: "12",
|
|
22
|
+
r: "8",
|
|
23
|
+
strokeWidth: "3",
|
|
24
|
+
className: "fill-none stroke-current opacity-20"
|
|
25
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26
|
+
d: "M20 12a8 8 0 0 0-8-8",
|
|
27
|
+
strokeWidth: "3",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
className: "fill-none stroke-current"
|
|
30
|
+
})]
|
|
13
31
|
});
|
|
14
32
|
}
|
|
15
33
|
//#endregion
|