@ctrl-ui/react 0.8.11 → 0.8.12

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 (75) hide show
  1. package/dist/action-bar.js +2 -2
  2. package/dist/activity.js +1 -1
  3. package/dist/blocks/design-canvas-inspector.js +2 -2
  4. package/dist/blocks/design-canvas.js +2 -2
  5. package/dist/blocks/discussion.js +1 -1
  6. package/dist/blocks/file-explorer.js +2 -2
  7. package/dist/blocks/settings.js +3 -3
  8. package/dist/chat-composer-editor/extensions/mention.js +1 -1
  9. package/dist/chat-composer.js +1 -1
  10. package/dist/chat-layout.js +1 -1
  11. package/dist/context.js +1 -1
  12. package/dist/dynamic-notification.js +1 -1
  13. package/dist/email/theme.js +1 -1
  14. package/dist/filter-bar/parts.js +1 -1
  15. package/dist/filter-bar.js +1 -1
  16. package/dist/inline-citation.js +1 -1
  17. package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
  18. package/dist/knob-contracts/tabs-knobs.js +2 -0
  19. package/dist/lib/phone-input-format.js +1 -1
  20. package/dist/styles/index.css +1 -0
  21. package/dist/styles/recipes/badge.css +1 -0
  22. package/dist/styles/recipes/button.css +20 -4
  23. package/dist/styles/recipes/code.css +0 -15
  24. package/dist/styles/recipes/field.css +15 -2
  25. package/dist/styles/recipes/scroll-area.css +5 -5
  26. package/dist/styles/recipes/tabs-motion.css +99 -0
  27. package/dist/styles/recipes/tabs.css +32 -108
  28. package/dist/ui/alert-dialog.js +1 -1
  29. package/dist/ui/alert.js +1 -1
  30. package/dist/ui/autocomplete.js +1 -1
  31. package/dist/ui/breadcrumb.js +1 -1
  32. package/dist/ui/button.d.ts +6 -3
  33. package/dist/ui/button.js +10 -6
  34. package/dist/ui/card.js +1 -1
  35. package/dist/ui/code-diff.js +1 -1
  36. package/dist/ui/code.js +2 -2
  37. package/dist/ui/collapsible.js +1 -1
  38. package/dist/ui/color-picker.js +1 -1
  39. package/dist/ui/combobox.js +1 -1
  40. package/dist/ui/context-menu.js +1 -1
  41. package/dist/ui/dialog.js +1 -1
  42. package/dist/ui/drawer.js +1 -1
  43. package/dist/ui/dropdown-menu.js +1 -1
  44. package/dist/ui/emoji-icon-picker.js +1 -1
  45. package/dist/ui/emoji-picker.js +1 -1
  46. package/dist/ui/empty.js +1 -1
  47. package/dist/ui/hover-card.js +1 -1
  48. package/dist/ui/icon-picker.js +1 -1
  49. package/dist/ui/input-group.js +1 -1
  50. package/dist/ui/item.js +1 -1
  51. package/dist/ui/menubar.js +1 -1
  52. package/dist/ui/morphing-panel.js +1 -1
  53. package/dist/ui/navigation-menu.js +1 -1
  54. package/dist/ui/phone-input.js +2 -2
  55. package/dist/ui/popover.js +1 -1
  56. package/dist/ui/rich-tooltip.js +1 -1
  57. package/dist/ui/select.js +1 -1
  58. package/dist/ui/sheet.js +1 -1
  59. package/dist/ui/sidebar-menu.js +1 -1
  60. package/dist/ui/sidebar-provider.js +2 -2
  61. package/dist/ui/sidebar-resize-rail.js +1 -1
  62. package/dist/ui/sidebar.js +1 -1
  63. package/dist/ui/tabs.d.ts +4 -0
  64. package/dist/ui/tabs.js +11 -1
  65. package/dist/ui/timeline.js +1 -1
  66. package/dist/ui/toast.js +1 -1
  67. package/dist/ui/toggle.d.ts +1 -1
  68. package/dist/ui/toggle.js +2 -1
  69. package/dist/ui/toolbar.d.ts +1 -1
  70. package/dist/ui/toolbar.js +1 -1
  71. package/dist/ui/tooltip.js +1 -1
  72. package/dist/ui/tree.js +1 -1
  73. package/dist/ui/trigger-menu.js +1 -1
  74. package/dist/user-ask.js +2 -2
  75. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { useSkin } from "../skin-provider.js";
4
- import { TooltipProvider } from "./tooltip.js";
5
4
  import { SIDEBAR_COOKIE_NAME } from "../control-props.js";
5
+ import { TooltipProvider } from "./tooltip.js";
6
6
  import { useIsMobile } from "../hooks/use-mobile.js";
7
7
  import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
8
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
8
  import { useRender } from "@base-ui/react/use-render";
9
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/ui/sidebar-provider.tsx
11
11
  const SIDEBAR_COOKIE_MAX_AGE = 604800;
12
12
  const SIDEBAR_WIDTH = "16rem";
@@ -2,8 +2,8 @@
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { useSidebar, useSidebarElements, useSidebarSurface } from "./sidebar-provider.js";
4
4
  import { useEffect, useLayoutEffect, useRef, useState } from "react";
5
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
5
  import { useRender } from "@base-ui/react/use-render";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/ui/sidebar-resize-rail.tsx
8
8
  const DRAG_THRESHOLD_PX = 5;
9
9
  const KEYBOARD_STEP_PX = 10;
@@ -8,9 +8,9 @@ import { SidebarProvider, SidebarSurfaceContext, useSidebar, useSidebarElements,
8
8
  import { SidebarResizeRail } from "./sidebar-resize-rail.js";
9
9
  import { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, sidebarMenuButtonSizes, sidebarMenuButtonVariants } from "./sidebar-menu.js";
10
10
  import { useState } from "react";
11
+ import { useRender } from "@base-ui/react/use-render";
11
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { PanelLeftIcon } from "lucide-react";
13
- import { useRender } from "@base-ui/react/use-render";
14
14
  import { createPortal } from "react-dom";
15
15
  //#region src/ui/sidebar.tsx
16
16
  const SIDEBAR_WIDTH_MOBILE = "18rem";
package/dist/ui/tabs.d.ts CHANGED
@@ -32,6 +32,10 @@ export type TabsPanelProps = Omit<ComponentProps<"div">, "style"> & {
32
32
  value: string;
33
33
  keepMounted?: boolean;
34
34
  };
35
+ export type TabsSurfaceProps = Omit<ComponentProps<"div">, "style"> & {
36
+ style?: CSSProperties & TabsKnobStyle;
37
+ };
38
+ export declare function TabsSurface({ className, ...props }: TabsSurfaceProps): import("react").JSX.Element;
35
39
  export declare function Tabs<TValue extends string = string>({ className, onValueChange, children, ...props }: TabsProps<TValue>): import("react").JSX.Element;
36
40
  export declare function TabsList({ size, variant, className, children, style, ...props }: TabsListProps): import("react").JSX.Element;
37
41
  export declare function TabsTab({ className, ...props }: TabsTabProps): import("react").JSX.Element;
package/dist/ui/tabs.js CHANGED
@@ -4,6 +4,16 @@ import { Children, Fragment, createContext, isValidElement, useContext, useEffec
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
6
6
  //#region src/ui/tabs.tsx
7
+ function TabsSurface({ className, ...props }) {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ "data-control-ui": "tabs",
10
+ "data-control-family": "tabs",
11
+ "data-slot": "surface",
12
+ "data-surface": "panel",
13
+ className,
14
+ ...props
15
+ });
16
+ }
7
17
  function refreshTabsPanelHeight(panel) {
8
18
  if (panel.node.inert || panel.node.hidden) return;
9
19
  panel.height = panel.node.getBoundingClientRect().height;
@@ -160,4 +170,4 @@ function TabsPanel({ className, value, ref, ...props }) {
160
170
  });
161
171
  }
162
172
  //#endregion
163
- export { Tabs, TabsList, TabsPanel, TabsTab };
173
+ export { Tabs, TabsList, TabsPanel, TabsSurface, TabsTab };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { useRender } from "@base-ui/react/use-render";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  //#region src/ui/timeline.tsx
6
6
  function Timeline({ className, ...props }) {
7
7
  return /* @__PURE__ */ jsx("ol", {
package/dist/ui/toast.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { controlEffectsAttribute } from "../skin.js";
3
2
  import { cn } from "../lib/cn.js";
3
+ import { controlEffectsAttribute } from "../skin.js";
4
4
  import { useSkin } from "../skin-provider.js";
5
5
  import { Button } from "./button.js";
6
6
  import { PopupCloseButton } from "../popup-parts.js";
@@ -15,6 +15,6 @@ export type ToggleGroupProps<TValue extends string = string> = Omit<ComponentPro
15
15
  orientation?: "horizontal" | "vertical";
16
16
  indicator?: HoverIndicator;
17
17
  };
18
- export declare function Toggle({ variant, size, tone, active, iconOnly, showCheck, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }: ToggleProps): import("react").JSX.Element;
18
+ export declare function Toggle({ variant, size, tone, active, iconOnly, layout, showCheck, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }: ToggleProps): import("react").JSX.Element;
19
19
  export declare function ToggleGroup<TValue extends string = string>({ className, orientation, indicator, children, ...props }: ToggleGroupProps<TValue>): import("react").JSX.Element;
20
20
  //#endregion
package/dist/ui/toggle.js CHANGED
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
9
9
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
10
10
  //#region src/ui/toggle.tsx
11
- function Toggle({ variant = "surface", size = "sm", tone = "neutral", active, iconOnly = false, showCheck = false, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }) {
11
+ function Toggle({ variant = "surface", size = "sm", tone = "neutral", active, iconOnly = false, layout = "inline", showCheck = false, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }) {
12
12
  const tracksHover = useContext(ButtonTrackContext);
13
13
  return /* @__PURE__ */ jsx(Toggle$1, {
14
14
  "data-track-item": tracksHover ? "" : void 0,
@@ -31,6 +31,7 @@ function Toggle({ variant = "surface", size = "sm", tone = "neutral", active, ic
31
31
  "data-tone": tone,
32
32
  "data-size": size,
33
33
  "data-icon-only": iconOnly ? "true" : void 0,
34
+ "data-layout": layout,
34
35
  className: cn(buttonStructureClasses, renderProps.className, className),
35
36
  children: /* @__PURE__ */ jsxs("span", {
36
37
  "data-control-ui": "toggle",
@@ -1,6 +1,6 @@
1
1
  import { ToolbarKnobStyle } from "../knob-contracts/toolbar-knobs.js";
2
- import { CSSProperties, ComponentProps } from "react";
3
2
  import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
3
+ import { CSSProperties, ComponentProps } from "react";
4
4
  //#region src/ui/toolbar.d.ts
5
5
  export type ToolbarVariant = "default" | "inverse" | "floating";
6
6
  export type ToolbarLinkVariant = "default" | "track";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
3
  import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/ui/toolbar.tsx
6
6
  function Toolbar({ orientation = "horizontal", variant = "default", className, children, ...props }) {
7
7
  return /* @__PURE__ */ jsxs(Toolbar$1.Root, {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { controlEffectsAttribute } from "../skin.js";
3
2
  import { cn } from "../lib/cn.js";
3
+ import { controlEffectsAttribute } from "../skin.js";
4
4
  import { useSkin } from "../skin-provider.js";
5
5
  import { PopupArrowShape } from "../popup-parts.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
package/dist/ui/tree.js CHANGED
@@ -3,9 +3,9 @@ import { cn } from "../lib/cn.js";
3
3
  import { useSkin } from "../skin-provider.js";
4
4
  import { TrackHighlight } from "../extensions/track-highlight.js";
5
5
  import { Children, createContext, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
6
+ import { useRender } from "@base-ui/react/use-render";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { ChevronRightIcon } from "lucide-react";
8
- import { useRender } from "@base-ui/react/use-render";
9
9
  import { Collapsible } from "@base-ui/react/collapsible";
10
10
  //#region src/ui/tree.tsx
11
11
  const TYPEAHEAD_TIMEOUT = 500;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { controlEffectsAttribute } from "../skin.js";
3
2
  import { cn } from "../lib/cn.js";
3
+ import { controlEffectsAttribute } from "../skin.js";
4
4
  import { useSkin } from "../skin-provider.js";
5
5
  import { ScrollArea } from "./scroll-area.js";
6
6
  import { popupItemStructureClasses } from "../surface-variants.js";
package/dist/user-ask.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { cn } from "./lib/cn.js";
3
- import { useUserAsk } from "./hooks/use-user-ask.js";
4
3
  import { Button } from "./ui/button.js";
5
- import { Kbd } from "./ui/kbd.js";
6
4
  import { LiveStatus } from "./ui/live-status.js";
5
+ import { useUserAsk } from "./hooks/use-user-ask.js";
6
+ import { Kbd } from "./ui/kbd.js";
7
7
  import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Check, ChevronLeft, ChevronRight, PencilLine } from "lucide-react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl-ui/react",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
4
4
  "description": "Control UI components, blocks, and primitives with neutral defaults and consumer-owned themes.",
5
5
  "license": "MIT",
6
6
  "repository": {