@ctrl-ui/react 0.9.8 → 0.9.9

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.
@@ -1,4 +1,4 @@
1
1
  //#region src/knob-contracts/item-knobs.d.ts
2
- export declare const itemKnobs: readonly ["--cui-item-radius", "--cui-item-hover-background", "--cui-item-hover-border-color", "--cui-item-border-width", "--cui-item-active-scale", "--cui-item-gap", "--cui-item-padding-block", "--cui-item-padding-inline", "--cui-item-description-font-size", "--cui-item-description-line-height", "--cui-item-description-foreground", "--cui-item-media-foreground"];
2
+ export declare const itemKnobs: readonly ["--cui-item-radius", "--cui-item-hover-background", "--cui-item-current-background", "--cui-item-hover-border-color", "--cui-item-border-width", "--cui-item-active-scale", "--cui-item-gap", "--cui-item-padding-block", "--cui-item-padding-inline", "--cui-item-description-font-size", "--cui-item-description-line-height", "--cui-item-description-foreground", "--cui-item-media-foreground"];
3
3
  export type ItemKnobStyle = Partial<Record<(typeof itemKnobs)[number], string>>;
4
4
  //#endregion
@@ -2,6 +2,7 @@
2
2
  const itemKnobs = [
3
3
  "--cui-item-radius",
4
4
  "--cui-item-hover-background",
5
+ "--cui-item-current-background",
5
6
  "--cui-item-hover-border-color",
6
7
  "--cui-item-border-width",
7
8
  "--cui-item-active-scale",
@@ -33,6 +33,11 @@
33
33
  overflow-wrap: anywhere;
34
34
  }
35
35
 
36
+ :where([data-control-family="empty"][data-slot="root"][data-variant="outline"]) {
37
+ --cui-empty-border-color: var(--border);
38
+ --cui-empty-border-style: dashed;
39
+ }
40
+
36
41
  :where([data-control-family="empty"][data-slot="media"]) {
37
42
  inline-size: var(--cui-empty-media-size);
38
43
  block-size: var(--cui-empty-media-size);
@@ -2,6 +2,7 @@
2
2
  :where([data-control-family="item"][data-slot="root"]) {
3
3
  --cui-item-radius: var(--radius-lg);
4
4
  --cui-item-hover-background: var(--hover-fill);
5
+ --cui-item-current-background: var(--active-fill);
5
6
  --cui-item-hover-border-color: var(--_item-border-color);
6
7
  --cui-item-border-width: 0px;
7
8
  --cui-item-active-scale: 0.99;
@@ -65,6 +66,10 @@
65
66
  --_item-background: oklch(from var(--muted) l c h / 0.5);
66
67
  }
67
68
 
69
+ :where([data-control-family="item"][data-slot="root"][aria-current]:not([aria-current="false"])) {
70
+ --_item-background: var(--cui-item-current-background);
71
+ }
72
+
68
73
  @media (hover: hover) {
69
74
  :where(
70
75
  [data-control-family="item"][data-slot="root"]:is(a, button, [href], [role="button"]):not(
@@ -127,6 +132,12 @@
127
132
  initial-value: transparent;
128
133
  }
129
134
 
135
+ @property --cui-item-current-background {
136
+ syntax: "<color>";
137
+ inherits: true;
138
+ initial-value: transparent;
139
+ }
140
+
130
141
  @property --cui-item-hover-border-color {
131
142
  syntax: "<color>";
132
143
  inherits: true;
@@ -1,4 +1,10 @@
1
1
  @layer components {
2
+ :where([data-control-family="popup"][data-popup-part="item"][data-tone="danger"]) {
3
+ --cui-popup-item-foreground: var(--destructive-text);
4
+ --cui-popup-item-highlight-background: oklch(from var(--destructive-text) l c h / 0.12);
5
+ --cui-popup-item-highlight-foreground: var(--destructive-text);
6
+ }
7
+
2
8
  :where([data-control-family="popup"][data-popup-kind="dialog"][data-slot="title"]),
3
9
  :where([data-control-family="popup"][data-popup-kind="alert-dialog"][data-slot="title"]),
4
10
  :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="title"]),
@@ -112,6 +118,32 @@
112
118
  padding: calc(var(--spacing) * 4);
113
119
  }
114
120
 
121
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="content"]:has(> [data-slot="body"])) {
122
+ gap: 0;
123
+ }
124
+
125
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="body"]) {
126
+ gap: calc(var(--spacing) * 4);
127
+ overscroll-behavior: contain;
128
+ }
129
+
130
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="body"][data-padding="default"]) {
131
+ padding: calc(var(--spacing) * 4);
132
+ }
133
+
134
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="footer"]) {
135
+ gap: calc(var(--spacing) * 2);
136
+ padding: calc(var(--spacing) * 4);
137
+ }
138
+
139
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="header"]:has(+ [data-slot="body"])) {
140
+ border-block-end: 1px solid var(--cui-popup-separator-color);
141
+ }
142
+
143
+ :where([data-control-family="popup"][data-popup-kind="sheet"][data-slot="body"] + [data-slot="footer"]) {
144
+ border-block-start: 1px solid var(--cui-popup-separator-color);
145
+ }
146
+
115
147
  :where([data-control-family="popup"][data-popup-kind="popover"][data-slot="header"]) {
116
148
  gap: calc(var(--spacing) * 1.5);
117
149
  padding-block-end: calc(var(--spacing) * 3);
@@ -15,6 +15,14 @@
15
15
  background-image: var(--cui-skeleton-background-image);
16
16
  }
17
17
 
18
+ :where([data-control-family="skeleton"][data-slot="root"][data-shape="circle"]) {
19
+ --cui-skeleton-radius: 9999px;
20
+ }
21
+
22
+ :where([data-control-family="skeleton"][data-slot="root"][data-shape="panel"]) {
23
+ --cui-skeleton-radius: var(--radius-panel);
24
+ }
25
+
18
26
  :where([data-control-family="skeleton"][data-slot="root"][data-variant="shimmer"]) {
19
27
  --cui-skeleton-easing: linear;
20
28
  }
@@ -1,5 +1,7 @@
1
1
  //#region src/surface-variants.d.ts
2
2
  export declare const popupItemStructureClasses = "flex select-none items-center";
3
+ export declare const popupItemTones: readonly ["neutral", "danger"];
4
+ export type PopupItemTone = (typeof popupItemTones)[number];
3
5
  export declare const popupParts: readonly ["backdrop", "surface", "list-surface", "list-content", "bar", "item", "navigation-link", "label", "separator", "shortcut"];
4
6
  export type PopupPart = (typeof popupParts)[number];
5
7
  //#endregion
@@ -1,5 +1,6 @@
1
1
  //#region src/surface-variants.ts
2
2
  const popupItemStructureClasses = "flex select-none items-center";
3
+ const popupItemTones = ["neutral", "danger"];
3
4
  const popupParts = [
4
5
  "backdrop",
5
6
  "surface",
@@ -13,4 +14,4 @@ const popupParts = [
13
14
  "shortcut"
14
15
  ];
15
16
  //#endregion
16
- export { popupItemStructureClasses, popupParts };
17
+ export { popupItemStructureClasses, popupItemTones, popupParts };
@@ -1,5 +1,6 @@
1
1
  import { ControlledChoice, OpenChangeEventDetails } from "../control-props.js";
2
2
  import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
3
+ import { PopupItemTone } from "../surface-variants.js";
3
4
  import { CSSProperties, ComponentProps, MouseEvent, ReactNode } from "react";
4
5
  import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
5
6
  //#region src/ui/context-menu.d.ts
@@ -23,6 +24,7 @@ export type ContextMenuItemProps = Omit<Omit<ComponentProps<"div">, "onClick">,
23
24
  } & {
24
25
  disabled?: boolean;
25
26
  inset?: boolean;
27
+ tone?: PopupItemTone;
26
28
  onClick?: (event: MouseEvent) => void;
27
29
  };
28
30
  export type ContextMenuCheckboxItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
@@ -72,7 +74,7 @@ export declare function ContextMenuTrigger({ className, ...props }: ContextMenuT
72
74
  export declare function ContextMenuPortal(props: ComponentProps<typeof ContextMenu$1.Portal>): import("react").JSX.Element;
73
75
  export declare function ContextMenuGroup({ className, ...props }: ContextMenuGroupProps): import("react").JSX.Element;
74
76
  export declare function ContextMenuContent({ className, children, ...props }: ContextMenuContentProps): import("react").JSX.Element;
75
- export declare function ContextMenuItem({ className, inset, ...props }: ContextMenuItemProps): import("react").JSX.Element;
77
+ export declare function ContextMenuItem({ className, inset, tone, ...props }: ContextMenuItemProps): import("react").JSX.Element;
76
78
  export declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuCheckboxItemProps): import("react").JSX.Element;
77
79
  export declare function ContextMenuRadioGroup<TValue extends string = string>({ className, ...props }: ContextMenuRadioGroupProps<TValue>): import("react").JSX.Element;
78
80
  export declare function ContextMenuRadioItem({ className, children, value, ...props }: ContextMenuRadioItemProps): import("react").JSX.Element;
@@ -56,13 +56,14 @@ function ContextMenuContent({ className, children, ...props }) {
56
56
  })
57
57
  }) });
58
58
  }
59
- function ContextMenuItem({ className, inset = false, ...props }) {
59
+ function ContextMenuItem({ className, inset = false, tone = "neutral", ...props }) {
60
60
  return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
61
61
  "data-control-ui": "context-menu",
62
62
  "data-popup-kind": "context-menu",
63
63
  "data-slot": "item",
64
64
  "data-control-family": "popup",
65
65
  "data-popup-part": "item",
66
+ "data-tone": tone,
66
67
  "data-inset": inset || void 0,
67
68
  className: cn(itemClasses, className),
68
69
  ...mergeProps(popupItemFocusProps, props)
@@ -1,6 +1,7 @@
1
1
  import { ControlSize } from "../control-variants.js";
2
2
  import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
3
3
  import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
4
+ import { PopupItemTone } from "../surface-variants.js";
4
5
  import { CSSProperties, ComponentProps } from "react";
5
6
  import { Menu } from "@base-ui/react/menu";
6
7
  //#region src/ui/dropdown-menu.d.ts
@@ -19,7 +20,9 @@ export type DropdownMenuTriggerProps = Omit<ComponentProps<"button">, "style"> &
19
20
  variant?: DropdownMenuTriggerVariant;
20
21
  };
21
22
  export type DropdownMenuContentProps = DropdownMenuStyledProps<Menu.Popup.Props> & Pick<Menu.Positioner.Props, "side" | "sideOffset" | "align" | "alignOffset" | "collisionBoundary" | "collisionPadding" | "collisionAvoidance">;
22
- export type DropdownMenuItemProps = DropdownMenuStyledProps<Menu.Item.Props>;
23
+ export type DropdownMenuItemProps = DropdownMenuStyledProps<Menu.Item.Props> & {
24
+ tone?: PopupItemTone;
25
+ };
23
26
  export type DropdownMenuGroupProps = DropdownMenuStyledProps<Menu.Group.Props>;
24
27
  export type DropdownMenuCheckboxItemProps = DropdownMenuStyledProps<Menu.CheckboxItem.Props>;
25
28
  export type DropdownMenuRadioGroupProps = DropdownMenuStyledProps<Menu.RadioGroup.Props>;
@@ -37,7 +40,7 @@ export type DropdownMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
37
40
  export declare function DropdownMenu({ children, ...props }: DropdownMenuProps): import("react").JSX.Element;
38
41
  export declare function DropdownMenuTrigger({ size, iconOnly, variant, className, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
39
42
  export declare function DropdownMenuContent({ className, children, side, sideOffset, align, alignOffset, collisionBoundary, collisionPadding, collisionAvoidance, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
40
- export declare function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
43
+ export declare function DropdownMenuItem({ tone, className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
41
44
  export declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
42
45
  export declare function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps): import("react").JSX.Element;
43
46
  export declare function DropdownMenuPortal(props: Menu.Portal.Props): import("react").JSX.Element;
@@ -74,12 +74,13 @@ function DropdownMenuContent({ className, children, side, sideOffset = 6, align
74
74
  })
75
75
  }) });
76
76
  }
77
- function DropdownMenuItem({ className, ...props }) {
77
+ function DropdownMenuItem({ tone = "neutral", className, ...props }) {
78
78
  return /* @__PURE__ */ jsx(Menu.Item, {
79
79
  "data-control-ui": "dropdown-menu",
80
80
  "data-slot": "item",
81
81
  "data-control-family": "popup",
82
82
  "data-popup-part": "item",
83
+ "data-tone": tone,
83
84
  className: cn(popupItemStructureClasses, className),
84
85
  ...mergeProps(popupItemFocusProps, props)
85
86
  });
@@ -2,8 +2,11 @@ import { RenderProp } from "../control-props.js";
2
2
  import { EmptyKnobStyle } from "../knob-contracts/empty-knobs.js";
3
3
  import { CSSProperties, ComponentProps } from "react";
4
4
  //#region src/ui/empty.d.ts
5
+ export declare const emptyVariants: readonly ["default", "outline"];
6
+ export type EmptyVariant = (typeof emptyVariants)[number];
5
7
  export type EmptyProps = Omit<ComponentProps<"div">, "style"> & {
6
8
  style?: CSSProperties & EmptyKnobStyle;
9
+ variant?: EmptyVariant;
7
10
  };
8
11
  export type EmptyHeaderProps = Omit<ComponentProps<"div">, "style"> & {
9
12
  style?: CSSProperties & EmptyKnobStyle;
@@ -21,7 +24,7 @@ export type EmptyTitleProps = Omit<ComponentProps<"div">, "style"> & {
21
24
  render?: RenderProp<ComponentProps<"div">>;
22
25
  style?: CSSProperties & EmptyKnobStyle;
23
26
  };
24
- export declare function Empty({ className, ...props }: EmptyProps): import("react").JSX.Element;
27
+ export declare function Empty({ variant, className, ...props }: EmptyProps): import("react").JSX.Element;
25
28
  export declare function EmptyHeader({ className, ...props }: EmptyHeaderProps): import("react").JSX.Element;
26
29
  export declare function EmptyMedia({ className, ...props }: EmptyMediaProps): import("react").JSX.Element;
27
30
  export declare function EmptyTitle({ render, ...props }: EmptyTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
package/dist/ui/empty.js CHANGED
@@ -3,11 +3,13 @@ import { cn } from "../lib/cn.js";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/ui/empty.tsx
6
- function Empty({ className, ...props }) {
6
+ const emptyVariants = ["default", "outline"];
7
+ function Empty({ variant = "default", className, ...props }) {
7
8
  return /* @__PURE__ */ jsx("div", {
8
9
  "data-control-ui": "empty",
9
10
  "data-control-family": "empty",
10
11
  "data-slot": "root",
12
+ "data-variant": variant,
11
13
  className: cn("flex min-w-0 flex-1 flex-col items-center justify-center", className),
12
14
  ...props
13
15
  });
@@ -61,4 +63,4 @@ function EmptyContent({ className, ...props }) {
61
63
  });
62
64
  }
63
65
  //#endregion
64
- export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
66
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyVariants };
@@ -1,6 +1,7 @@
1
1
  import { OpenChangeEventDetails } from "../control-props.js";
2
2
  import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
3
3
  import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
4
+ import { PopupItemTone } from "../surface-variants.js";
4
5
  import { CSSProperties, ComponentProps, MouseEvent, ReactNode } from "react";
5
6
  //#region src/ui/menubar.d.ts
6
7
  export type MenubarProps = Omit<ComponentProps<"div">, "style"> & {
@@ -30,6 +31,7 @@ export type MenubarItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "sty
30
31
  style?: CSSProperties & PopupKnobStyle;
31
32
  } & {
32
33
  disabled?: boolean;
34
+ tone?: PopupItemTone;
33
35
  onClick?: (event: MouseEvent) => void;
34
36
  };
35
37
  export type MenubarSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
@@ -63,7 +65,7 @@ export declare function MenubarMenu(props: MenubarMenuProps): import("react").JS
63
65
  export declare function MenubarTrigger({ className, ...props }: MenubarTriggerProps): import("react").JSX.Element;
64
66
  export declare function MenubarContent({ className, children, ...props }: MenubarContentProps): import("react").JSX.Element;
65
67
  export declare function MenubarGroup({ className, ...props }: MenubarGroupProps): import("react").JSX.Element;
66
- export declare function MenubarItem({ className, ...props }: MenubarItemProps): import("react").JSX.Element;
68
+ export declare function MenubarItem({ tone, className, ...props }: MenubarItemProps): import("react").JSX.Element;
67
69
  export declare function MenubarLabel({ className, inset, ...props }: MenubarLabelProps): import("react").JSX.Element;
68
70
  export declare function MenubarSeparator({ className, ...props }: MenubarSeparatorProps): import("react").JSX.Element;
69
71
  export declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): import("react").JSX.Element;
@@ -69,13 +69,14 @@ function MenubarGroup({ className, ...props }) {
69
69
  ...props
70
70
  });
71
71
  }
72
- function MenubarItem({ className, ...props }) {
72
+ function MenubarItem({ tone = "neutral", className, ...props }) {
73
73
  return /* @__PURE__ */ jsx(Menu.Item, {
74
74
  "data-control-ui": "menubar",
75
75
  "data-popup-kind": "menubar",
76
76
  "data-slot": "item",
77
77
  "data-control-family": "popup",
78
78
  "data-popup-part": "item",
79
+ "data-tone": tone,
79
80
  className: cn(itemClasses, className),
80
81
  ...props
81
82
  });
@@ -2,6 +2,8 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
2
2
  import { CSSProperties, ComponentProps } from "react";
3
3
  import { Dialog } from "@base-ui/react/dialog";
4
4
  //#region src/ui/sheet.d.ts
5
+ export declare const sheetBodyPaddings: readonly ["default", "none"];
6
+ export type SheetBodyPadding = (typeof sheetBodyPaddings)[number];
5
7
  export declare function Sheet(props: ComponentProps<typeof Dialog.Root>): import("react").JSX.Element;
6
8
  export declare function SheetClose({ className, ...props }: ComponentProps<typeof Dialog.Close> & {
7
9
  style?: CSSProperties & PopupKnobStyle;
@@ -15,6 +17,13 @@ export declare function SheetContent({ className, children, side, ...props }: Sh
15
17
  export declare function SheetHeader({ className, ...props }: ComponentProps<"div"> & {
16
18
  style?: CSSProperties & PopupKnobStyle;
17
19
  }): import("react").JSX.Element;
20
+ export declare function SheetBody({ padding, className, ...props }: ComponentProps<"div"> & {
21
+ padding?: SheetBodyPadding;
22
+ style?: CSSProperties & PopupKnobStyle;
23
+ }): import("react").JSX.Element;
24
+ export declare function SheetFooter({ className, ...props }: ComponentProps<"div"> & {
25
+ style?: CSSProperties & PopupKnobStyle;
26
+ }): import("react").JSX.Element;
18
27
  export declare function SheetTitle({ className, ...props }: ComponentProps<typeof Dialog.Title> & {
19
28
  style?: CSSProperties & PopupKnobStyle;
20
29
  }): import("react").JSX.Element;
package/dist/ui/sheet.js CHANGED
@@ -5,6 +5,7 @@ import { useSkin } from "../skin-provider.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Dialog } from "@base-ui/react/dialog";
7
7
  //#region src/ui/sheet.tsx
8
+ const sheetBodyPaddings = ["default", "none"];
8
9
  function Sheet(props) {
9
10
  return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
10
11
  }
@@ -54,6 +55,27 @@ function SheetHeader({ className, ...props }) {
54
55
  ...props
55
56
  });
56
57
  }
58
+ function SheetBody({ padding = "default", className, ...props }) {
59
+ return /* @__PURE__ */ jsx("div", {
60
+ "data-control-ui": "sheet",
61
+ "data-control-family": "popup",
62
+ "data-popup-kind": "sheet",
63
+ "data-slot": "body",
64
+ "data-padding": padding,
65
+ className: cn("flex min-h-0 flex-1 flex-col overflow-y-auto", className),
66
+ ...props
67
+ });
68
+ }
69
+ function SheetFooter({ className, ...props }) {
70
+ return /* @__PURE__ */ jsx("div", {
71
+ "data-control-ui": "sheet",
72
+ "data-control-family": "popup",
73
+ "data-popup-kind": "sheet",
74
+ "data-slot": "footer",
75
+ className: cn("mt-auto flex shrink-0 flex-col sm:flex-row sm:justify-end", className),
76
+ ...props
77
+ });
78
+ }
57
79
  function SheetTitle({ className, ...props }) {
58
80
  return /* @__PURE__ */ jsx(Dialog.Title, {
59
81
  "data-control-ui": "sheet",
@@ -75,4 +97,4 @@ function SheetDescription({ className, ...props }) {
75
97
  });
76
98
  }
77
99
  //#endregion
78
- export { Sheet, SheetClose, SheetContent, SheetDescription, SheetHeader, SheetTitle };
100
+ export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, sheetBodyPaddings };
@@ -3,9 +3,12 @@ import { CSSProperties, ComponentProps } from "react";
3
3
  //#region src/ui/skeleton.d.ts
4
4
  export declare const skeletonVariants: readonly ["shimmer", "pulse", "none"];
5
5
  export type SkeletonVariant = (typeof skeletonVariants)[number];
6
+ export declare const skeletonShapes: readonly ["default", "circle", "panel"];
7
+ export type SkeletonShape = (typeof skeletonShapes)[number];
6
8
  export type SkeletonProps = Omit<ComponentProps<"div">, "style"> & {
7
9
  style?: CSSProperties & SkeletonKnobStyle;
8
10
  variant?: SkeletonVariant;
11
+ shape?: SkeletonShape;
9
12
  };
10
- export declare function Skeleton({ variant, className, ...props }: SkeletonProps): import("react").JSX.Element;
13
+ export declare function Skeleton({ variant, shape, className, ...props }: SkeletonProps): import("react").JSX.Element;
11
14
  //#endregion
@@ -5,16 +5,22 @@ const skeletonVariants = [
5
5
  "pulse",
6
6
  "none"
7
7
  ];
8
- function Skeleton({ variant = "shimmer", className, ...props }) {
8
+ const skeletonShapes = [
9
+ "default",
10
+ "circle",
11
+ "panel"
12
+ ];
13
+ function Skeleton({ variant = "shimmer", shape = "default", className, ...props }) {
9
14
  return /* @__PURE__ */ jsx("div", {
10
15
  "aria-hidden": "true",
11
16
  "data-control-ui": "skeleton",
12
17
  "data-control-family": "skeleton",
13
18
  "data-slot": "root",
14
19
  "data-variant": variant,
20
+ "data-shape": shape,
15
21
  className,
16
22
  ...props
17
23
  });
18
24
  }
19
25
  //#endregion
20
- export { Skeleton, skeletonVariants };
26
+ export { Skeleton, skeletonShapes, skeletonVariants };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl-ui/react",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "description": "100+ React components for Tailwind CSS and shadcn/ui: pickers, trees, editors, canvases, app templates, and AI chat surfaces, with neutral defaults and consumer-owned themes.",
5
5
  "keywords": [
6
6
  "react",