@waveso/ui 0.12.0 → 0.14.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/dist/badge.d.ts CHANGED
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
5
5
 
6
6
  //#region src/badge.d.ts
7
7
  declare const badgeVariants: (props?: ({
8
- variant?: "default" | "link" | "success" | "destructive" | "warning" | "secondary" | "outline" | "ghost" | null | undefined;
8
+ variant?: "default" | "link" | "outline" | "success" | "warning" | "secondary" | "ghost" | "destructive" | null | undefined;
9
9
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
10
10
  type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
11
11
  declare function Badge({
package/dist/badge.js CHANGED
@@ -4,16 +4,16 @@ import { cva } from "class-variance-authority";
4
4
  import { mergeProps } from "@base-ui/react/merge-props";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  //#region src/badge.tsx
7
- const badgeVariants = cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium motion-color has-data-[icon=inline-start]:pl-1.5 has-data-[icon=inline-end]:pr-1.5 [&>svg:not([class*='size-'])]:size-3 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-focus focus-visible:ring-focus/50 focus-visible:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge", {
7
+ const badgeVariants = cva("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium motion-color has-data-[icon=inline-start]:ps-1.5 has-data-[icon=inline-end]:pe-1.5 [&_svg:not([class*='size-'])]:size-3 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&_svg]:shrink-0 [&_svg]:pointer-events-none focus-visible:border-focus focus-visible:ring-focus/50 focus-visible:ring-3 aria-invalid:ring-destructive/30 aria-invalid:border-destructive overflow-hidden group/badge", {
8
8
  variants: { variant: {
9
9
  default: "bg-primary text-white [a]:hover:bg-primary/80",
10
- success: "bg-success/10 [a]:hover:bg-success/20 focus-visible:ring-success/50 text-success dark:bg-success/20",
11
- destructive: "bg-destructive/10 text-destructive [a]:hover:bg-destructive/20 focus-visible:ring-destructive/50 dark:bg-destructive/20",
12
- warning: "bg-warning/10 text-warning [a]:hover:bg-warning/20 focus-visible:ring-warning/50 dark:bg-warning/20",
10
+ success: "bg-success text-contrast dark:text-foundation [a]:hover:bg-success/80",
11
+ destructive: "bg-destructive text-white [a]:hover:bg-destructive/80 [a]:focus-visible:ring-destructive/50",
12
+ warning: "bg-warning text-contrast dark:text-foundation [a]:hover:bg-warning/80",
13
13
  secondary: "bg-secondary text-contrast [a]:hover:bg-secondary/80",
14
- outline: "border-line text-contrast [a]:hover:bg-secondary [a]:hover:text-muted",
15
- ghost: "hover:bg-secondary hover:text-muted dark:hover:bg-secondary/50",
16
- link: "text-primary underline-offset-4 hover:underline"
14
+ outline: "border-edge bg-foundation [a]:hover:bg-secondary/80 [a]:hover:text-contrast dark:bg-edge/30",
15
+ ghost: "text-muted [a]:hover:bg-secondary/80",
16
+ link: "text-primary [a]:underline-offset-4 [a]:hover:underline"
17
17
  } },
18
18
  defaultVariants: { variant: "default" }
19
19
  });
package/dist/button.d.ts CHANGED
@@ -6,8 +6,8 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
6
6
 
7
7
  //#region src/button.d.ts
8
8
  declare const buttonVariants: (props?: ({
9
- variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
9
+ variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
10
+ size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
11
11
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
13
13
  declare function Button({
@@ -1,4 +1,5 @@
1
1
  import { Button } from "./button.js";
2
+ import { Input } from "./input.js";
2
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
4
  import * as React from "react";
4
5
  import { VariantProps } from "class-variance-authority";
@@ -11,7 +12,7 @@ type InputGroupButtonProps = Omit<React.ComponentProps<typeof Button>, "size" |
11
12
  type?: "button" | "submit" | "reset";
12
13
  };
13
14
  type InputGroupTextProps = React.ComponentProps<"span">;
14
- type InputGroupInputProps = React.ComponentProps<"input">;
15
+ type InputGroupInputProps = React.ComponentProps<typeof Input>;
15
16
  type InputGroupTextareaProps = React.ComponentProps<"textarea">;
16
17
  declare function InputGroup({
17
18
  className,
@@ -26,7 +27,7 @@ declare function InputGroupAddon({
26
27
  ...props
27
28
  }: InputGroupAddonProps): _$react_jsx_runtime0.JSX.Element;
28
29
  declare const inputGroupButtonVariants: (props?: ({
29
- size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
30
+ size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
30
31
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
31
32
  declare function InputGroupButton({
32
33
  className,
package/dist/input.d.ts CHANGED
@@ -1,13 +1,19 @@
1
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import * as React from "react";
3
+ import { VariantProps } from "class-variance-authority";
3
4
  import { Input as Input$1 } from "@base-ui/react/input";
5
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
4
6
 
5
7
  //#region src/input.d.ts
6
- type InputProps = React.ComponentProps<typeof Input$1>;
8
+ declare const inputVariants: (props?: ({
9
+ size?: "default" | "sm" | "lg" | "xs" | null | undefined;
10
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
11
+ type InputProps = Omit<React.ComponentProps<typeof Input$1>, "size"> & VariantProps<typeof inputVariants>;
7
12
  declare function Input({
8
13
  className,
9
14
  type,
15
+ size,
10
16
  ...props
11
17
  }: InputProps): _$react_jsx_runtime0.JSX.Element;
12
18
  //#endregion
13
- export { Input, type InputProps };
19
+ export { Input, type InputProps, inputVariants };
package/dist/input.js CHANGED
@@ -1,14 +1,25 @@
1
1
  import { cn } from "./lib/utils.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
3
4
  import { Input as Input$1 } from "@base-ui/react/input";
4
5
  //#region src/input.tsx
5
- function Input({ className, type, ...props }) {
6
+ const inputVariants = cva("dark:bg-edge/30 hover:bg-edge/50 dark:hover:bg-edge/50 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive disabled:bg-edge/50 dark:disabled:bg-edge/80 placeholder:text-soft flex w-full min-w-0 items-center overflow-hidden rounded-md border bg-transparent motion-color outline-hidden file:inline-flex file:my-[3px] file:items-center file:me-3 file:cursor-clickable file:rounded-md file:border-0 file:bg-primary file:px-2.5 file:leading-none file:font-medium file:text-white file:motion-color file:hover:bg-primary/80 focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 aria-invalid:ring-3", {
7
+ variants: { size: {
8
+ xs: "h-6 rounded-sm px-2 text-xs file:-ms-[5px] file:h-4",
9
+ sm: "h-8 px-2.5 text-base file:-ms-[7px] file:h-6 md:text-sm",
10
+ default: "h-9 px-3 text-base file:-ms-[9px] file:h-7 md:text-sm",
11
+ lg: "h-10 px-3.5 text-base file:-ms-[11px] file:h-8"
12
+ } },
13
+ defaultVariants: { size: "default" }
14
+ });
15
+ function Input({ className, type, size = "default", ...props }) {
6
16
  return /* @__PURE__ */ jsx(Input$1, {
7
17
  type,
8
18
  "data-slot": "input",
9
- className: cn("dark:bg-edge/30 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive disabled:bg-edge/50 dark:disabled:bg-edge/80 file:text-contrast placeholder:text-soft h-8 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors outline-hidden file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm", className),
19
+ "data-size": size,
20
+ className: cn(inputVariants({ size }), className),
10
21
  ...props
11
22
  });
12
23
  }
13
24
  //#endregion
14
- export { Input };
25
+ export { Input, inputVariants };
package/dist/item.d.ts CHANGED
@@ -8,10 +8,10 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
8
8
  //#region src/item.d.ts
9
9
  declare const itemVariants: (props?: ({
10
10
  variant?: "default" | "outline" | "muted" | null | undefined;
11
- size?: "default" | "xs" | "sm" | null | undefined;
11
+ size?: "default" | "sm" | "xs" | null | undefined;
12
12
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  declare const itemMediaVariants: (props?: ({
14
- variant?: "default" | "icon" | "image" | null | undefined;
14
+ variant?: "default" | "image" | "icon" | null | undefined;
15
15
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
16
16
  type ItemGroupProps = React.ComponentProps<"div">;
17
17
  type ItemSeparatorProps = React.ComponentProps<typeof Separator>;
package/dist/styles.css CHANGED
@@ -36,6 +36,27 @@
36
36
  }
37
37
  }
38
38
 
39
+ /* ---------------------------------------------------------------------------
40
+ * Squircle corners — progressive enhancement. `corner-shape` renders every
41
+ * `border-radius` as a continuous superellipse (iOS-style) instead of a plain
42
+ * circular arc: softer, friendlier. It composes with `border-radius` and
43
+ * respects borders / rings / shadows, and degrades to normal rounding where
44
+ * unsupported (Chrome 2025+ today; Safari/Firefox pending). Pills and circles
45
+ * opt back out — a squircled circle reads as an app icon, not an avatar.
46
+ * `::file-selector-button` is listed too — `*` doesn't match pseudo-elements,
47
+ * so the file-input button would otherwise stay round at the squircle radius. */
48
+ @layer base {
49
+ *,
50
+ ::before,
51
+ ::after,
52
+ ::file-selector-button {
53
+ corner-shape: squircle;
54
+ }
55
+ [class*="rounded-full"] {
56
+ corner-shape: round;
57
+ }
58
+ }
59
+
39
60
  /* ---------------------------------------------------------------------------
40
61
  * Themes — named by identity: Paper (light) · Graphite (dark) · Ink (dark)
41
62
  *
@@ -230,6 +251,16 @@
230
251
  --stagger-lg: 90ms;
231
252
  }
232
253
 
254
+ /* A squircle reads tighter than a circular arc at the same radius, so where
255
+ * `corner-shape` is active we bump the radius to restore the intended roundness.
256
+ * Scoped via @supports — browsers without squircles keep the original values.
257
+ * Starting value; nudge by eye in Chrome. Feeds --radius-sm/md/lg (all calc off it). */
258
+ @supports (corner-shape: squircle) {
259
+ :root {
260
+ --radius: 1rem;
261
+ }
262
+ }
263
+
233
264
  /* ---------------------------------------------------------------------------
234
265
  * Paper — the LIGHT theme, and the default. The single source for Paper's
235
266
  * per-theme tokens, shared by `:root` (the default) and `.paper` (explicit —
package/dist/toast.d.ts CHANGED
@@ -7,7 +7,7 @@ import * as _$_base_ui_react0 from "@base-ui/react";
7
7
  //#region src/toast.d.ts
8
8
  declare const toastRootClass = "bg-elevated text-contrast ring-contrast/10 rounded-md p-4 text-sm shadow-md ring-1 outline-hidden";
9
9
  declare const toastIconVariants: (props?: ({
10
- type?: "success" | "warning" | "loading" | "info" | "error" | null | undefined;
10
+ type?: "loading" | "success" | "info" | "warning" | "error" | null | undefined;
11
11
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  declare const toastViewportVariants: (props?: ({
13
13
  position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waveso/ui",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Wave UI component library built on Base UI and Tailwind CSS",
5
5
  "type": "module",
6
6
  "sideEffects": [