@stll/ui 0.25.1 → 0.25.2

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.
@@ -10,8 +10,8 @@
10
10
  */
11
11
  declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
12
12
  declare const buttonVariants: (props?: ({
13
- size?: "xs" | "sm" | "icon" | "default" | "chip" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | null | undefined;
14
- variant?: "link" | "destructive" | "outline" | "default" | "destructive-outline" | "ghost" | "secondary" | null | undefined;
13
+ size?: "default" | "chip" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "sm" | "xl" | "xs" | null | undefined;
14
+ variant?: "link" | "default" | "destructive" | "destructive-outline" | "ghost" | "outline" | "secondary" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  //#endregion
17
17
  export { buttonAccessibleDisabledClass, buttonVariants };
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
4
+ import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
4
5
  import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { Popover as Popover$1 } from "@base-ui/react/popover";
@@ -20,13 +21,13 @@ const PopoverPopup = ({ children, className, side = "bottom", align = "center",
20
21
  align,
21
22
  alignOffset,
22
23
  anchor,
23
- className: cn("h-(--positioner-height) w-max max-w-(--available-width)", OVERLAY_LAYER_CLASS_NAMES[layer]),
24
+ className: cn(CONTENT_SIZED_POSITIONER_CLASS_NAME, OVERLAY_LAYER_CLASS_NAMES[layer]),
24
25
  collisionPadding: 8,
25
26
  "data-slot": "popover-positioner",
26
27
  side,
27
28
  sideOffset,
28
29
  children: /* @__PURE__ */ jsx(Popover$1.Popup, {
29
- className: cn("bg-popover text-popover-foreground relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-lg border shadow-lg/5 transition-[width,height,scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", tooltipStyle && "w-fit rounded-md text-xs text-balance shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]", className),
30
+ className: cn(IN_FLOW_POPUP_CLASS_NAME, "bg-popover text-popover-foreground flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-lg border shadow-lg/5 transition-[width,height,scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", tooltipStyle && "w-fit rounded-md text-xs text-balance shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]", className),
30
31
  "data-slot": "popover-popup",
31
32
  ...props,
32
33
  children: /* @__PURE__ */ jsx(Popover$1.Viewport, {
@@ -30,7 +30,7 @@ declare function useSidebar(): SidebarContextProps;
30
30
  * left for the content column. Mobile reports 0: there the sidebar is an
31
31
  * overlay sheet and occupies no layout width.
32
32
  */
33
- declare function useSidebarInlineSize(): 0 | 48 | 256;
33
+ declare function useSidebarInlineSize(): 0 | 256 | 48;
34
34
  declare const SidebarProvider: ({ defaultOpen, forceCollapsed, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
35
35
  defaultOpen?: boolean;
36
36
  forceCollapsed?: boolean;
@@ -82,8 +82,8 @@ declare const SidebarGroupContent: ({ className, ...props }: React.ComponentProp
82
82
  declare const SidebarMenu: ({ className, ...props }: React.ComponentProps<"ul">) => import("react").JSX.Element;
83
83
  declare const SidebarMenuItem: ({ className, ...props }: React.ComponentProps<"li">) => import("react").JSX.Element;
84
84
  declare const sidebarMenuButtonVariants: (props?: ({
85
- variant?: "outline" | "default" | null | undefined;
86
- size?: "sm" | "default" | "lg" | "rail" | null | undefined;
85
+ variant?: "default" | "outline" | null | undefined;
86
+ size?: "default" | "lg" | "sm" | "rail" | null | undefined;
87
87
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
88
88
  declare const SidebarMenuButton: ({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
89
89
  asChild?: boolean;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
4
+ import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
6
7
  //#region src/components/tooltip.tsx
@@ -13,13 +14,13 @@ const TooltipTrigger = (props) => /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
13
14
  });
14
15
  const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top", layer = "default", children, ...props }) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
15
16
  align,
16
- className: cn("h-(--positioner-height) w-max max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none", OVERLAY_LAYER_CLASS_NAMES[layer]),
17
+ className: cn(CONTENT_SIZED_POSITIONER_CLASS_NAME, "transition-[top,left,right,bottom,transform] data-instant:transition-none", OVERLAY_LAYER_CLASS_NAMES[layer]),
17
18
  collisionPadding: 8,
18
19
  "data-slot": "tooltip-positioner",
19
20
  side,
20
21
  sideOffset,
21
22
  children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
22
- className: cn("bg-popover text-popover-foreground relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-md border text-xs text-balance shadow-md/5 transition-[width,height,scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-ending-style:opacity-0 data-instant:duration-0 data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", className),
23
+ className: cn(IN_FLOW_POPUP_CLASS_NAME, "bg-popover text-popover-foreground flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-md border text-xs text-balance shadow-md/5 transition-[width,height,scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-ending-style:opacity-0 data-instant:duration-0 data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", className),
23
24
  "data-slot": "tooltip-popup",
24
25
  ...props,
25
26
  children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
@@ -8,7 +8,7 @@ import { Tabs } from "@base-ui/react/tabs";
8
8
  */
9
9
  declare const InspectorTabs: ({ className, ...props }: Omit<Tabs.Root.Props, "orientation">) => React$1.JSX.Element;
10
10
  declare const INSPECTOR_RAIL_MEDIA_QUERY: "(min-width: 48rem)";
11
- declare const resolveInspectorTabOrientation: (isRailLayout: boolean) => "horizontal" | "vertical";
11
+ declare const resolveInspectorTabOrientation: (isRailLayout: boolean) => "vertical" | "horizontal";
12
12
  declare const InspectorTabList: ({ className, ...props }: Tabs.List.Props) => React$1.JSX.Element;
13
13
  declare const InspectorTab: ({ className, ...props }: Tabs.Tab.Props) => React$1.JSX.Element;
14
14
  declare const InspectorTabPanel: ({ className, ...props }: Tabs.Panel.Props) => React$1.JSX.Element;
@@ -5,6 +5,6 @@ declare const CONTROL_SIZE: Readonly<{
5
5
  readonly lg: "lg";
6
6
  }>;
7
7
  type ControlSize = (typeof CONTROL_SIZE)[keyof typeof CONTROL_SIZE];
8
- declare const CONTROL_SIZES: readonly ("sm" | "default" | "lg")[];
8
+ declare const CONTROL_SIZES: readonly ("default" | "lg" | "sm")[];
9
9
  //#endregion
10
10
  export { CONTROL_SIZE, CONTROL_SIZES, type ControlSize };
@@ -0,0 +1,5 @@
1
+ //#region src/lib/positioner-sizing.d.ts
2
+ declare const CONTENT_SIZED_POSITIONER_CLASS_NAME = "w-max max-w-(--available-width)";
3
+ declare const IN_FLOW_POPUP_CLASS_NAME = "relative!";
4
+ //#endregion
5
+ export { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME };
@@ -0,0 +1,5 @@
1
+ //#region src/lib/positioner-sizing.ts
2
+ const CONTENT_SIZED_POSITIONER_CLASS_NAME = "w-max max-w-(--available-width)";
3
+ const IN_FLOW_POPUP_CLASS_NAME = "relative!";
4
+ //#endregion
5
+ export { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "Stella's design system: bidi-aware React primitives built on Base UI, the dockable inspector pane, and the Tailwind v4 theme they are styled with.",
5
5
  "keywords": [
6
6
  "base-ui",
@@ -197,6 +197,10 @@
197
197
  "types": "./dist/components/popover.d.ts",
198
198
  "import": "./dist/components/popover.js"
199
199
  },
200
+ "./positioner-sizing": {
201
+ "types": "./dist/lib/positioner-sizing.d.ts",
202
+ "import": "./dist/lib/positioner-sizing.js"
203
+ },
200
204
  "./preview-card": {
201
205
  "types": "./dist/components/preview-card.d.ts",
202
206
  "import": "./dist/components/preview-card.js"
@@ -585,11 +589,11 @@
585
589
  "prepack": "bun run build"
586
590
  },
587
591
  "dependencies": {
588
- "better-result": "3.0.0",
592
+ "better-result": "3.0.1",
589
593
  "class-variance-authority": "^0.7.1",
590
594
  "clsx": "^2.1.1",
591
595
  "input-otp": "^1.5.0",
592
- "lucide-react": "1.30.0",
596
+ "lucide-react": "1.39.0",
593
597
  "tailwind-merge": "^3.6.0"
594
598
  },
595
599
  "devDependencies": {