@stll/ui 0.28.1 → 0.28.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,7 +10,7 @@
10
10
  */
11
11
  export declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
12
12
  export 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?: "sm" | "default" | "lg" | "icon" | "chip" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "xl" | "xs" | null | undefined;
14
+ variant?: "link" | "default" | "outline" | "destructive" | "destructive-outline" | "ghost" | "secondary" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  //#endregion
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/input-group.d.ts
6
6
  declare const InputGroup: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
7
7
  declare const inputGroupAddonVariants: (props?: ({
8
- align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
8
+ align?: "inline-start" | "block-end" | "block-start" | "inline-end" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  declare const InputGroupAddon: ({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => React$1.JSX.Element;
11
11
  declare const InputGroupText: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
@@ -1,7 +1,19 @@
1
1
  import { Ref } from "react";
2
2
  import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
3
3
  //#region src/components/scroll-area.d.ts
4
- declare const ScrollArea: ({ className, children, scrollFade, scrollbarClassName, scrollbarGutter, viewportRef, ...props }: ScrollArea$1.Root.Props & {
4
+ /**
5
+ * Which way the area may scroll. `both` is the primitive's own behaviour: a
6
+ * viewport that scrolls whichever axis its content overflows. `vertical` is
7
+ * for a surface whose inline size belongs to the reader rather than to its
8
+ * content — a resizable pane, a column that can be dragged down to 320px —
9
+ * where a sideways scrollbar means something inside refused to wrap, and the
10
+ * honest answer is to make it wrap. An element that genuinely needs the axis
11
+ * (a wide table, a code block) carries its own `overflow-x-auto` and scrolls
12
+ * locally, inside the column.
13
+ */
14
+ type ScrollAreaAxis = "both" | "vertical";
15
+ declare const ScrollArea: ({ axis, className, children, scrollFade, scrollbarClassName, scrollbarGutter, viewportRef, ...props }: ScrollArea$1.Root.Props & {
16
+ axis?: ScrollAreaAxis;
5
17
  scrollFade?: boolean;
6
18
  /**
7
19
  * Extra classes applied to both scrollbars, on top of their default
@@ -3,13 +3,17 @@ import { cn } from "../lib/utils.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
5
5
  //#region src/components/scroll-area.tsx
6
- const ScrollArea = ({ className, children, scrollFade = false, scrollbarClassName, scrollbarGutter = false, viewportRef, ...props }) => /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
6
+ const AXIS_VIEWPORT_CLASS = {
7
+ both: "",
8
+ vertical: "overflow-x-hidden"
9
+ };
10
+ const ScrollArea = ({ axis = "both", className, children, scrollFade = false, scrollbarClassName, scrollbarGutter = false, viewportRef, ...props }) => /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
7
11
  className: cn("size-full min-h-0", className),
8
12
  ...props,
9
13
  children: [
10
14
  /* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
11
15
  ref: viewportRef,
12
- className: cn("focus-visible:ring-ring focus-visible:ring-offset-background h-full overscroll-contain rounded-[inherit] transition-shadow outline-none focus-visible:ring-2 focus-visible:ring-offset-1 data-has-overflow-x:overscroll-x-contain", scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] [--fade-size:1.5rem]", scrollbarGutter && "data-has-overflow-x:pb-2.5 data-has-overflow-y:pe-2.5"),
16
+ className: cn("focus-visible:ring-ring focus-visible:ring-offset-background h-full overscroll-contain rounded-[inherit] transition-shadow outline-none focus-visible:ring-2 focus-visible:ring-offset-1 data-has-overflow-x:overscroll-x-contain", scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] [--fade-size:1.5rem]", scrollbarGutter && "data-has-overflow-x:pb-2.5 data-has-overflow-y:pe-2.5", AXIS_VIEWPORT_CLASS[axis]),
13
17
  "data-slot": "scroll-area-viewport",
14
18
  children
15
19
  }),
@@ -17,7 +21,7 @@ const ScrollArea = ({ className, children, scrollFade = false, scrollbarClassNam
17
21
  className: scrollbarClassName,
18
22
  orientation: "vertical"
19
23
  }),
20
- /* @__PURE__ */ jsx(ScrollBar, {
24
+ axis === "both" && /* @__PURE__ */ jsx(ScrollBar, {
21
25
  className: scrollbarClassName,
22
26
  orientation: "horizontal"
23
27
  }),
@@ -82,7 +82,7 @@ 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;
85
+ variant?: "default" | "outline" | null | undefined;
86
86
  size?: "sm" | "default" | "lg" | "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"> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.28.1",
3
+ "version": "0.28.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",