@stll/ui 0.91.0 → 0.92.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.
@@ -6,7 +6,9 @@ type DateRangeFilterProps = Omit<DatePickerPopoverProps, "value" | "onChange" |
6
6
  onToChange: (value: string | null) => void;
7
7
  fromLabel: string;
8
8
  toLabel: string;
9
+ /** `horizontal` puts the bounds side by side, for wide filter bars. */
10
+ orientation?: "vertical" | "horizontal";
9
11
  };
10
12
  /** Both calendar bounds and the focus handoff belong to the range. */
11
- declare const DateRangeFilter: ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, ...pickerProps }: DateRangeFilterProps) => import("react").JSX.Element;
13
+ declare const DateRangeFilter: ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, orientation, ...pickerProps }: DateRangeFilterProps) => import("react").JSX.Element;
12
14
  export { DateRangeFilter, type DateRangeFilterProps };
@@ -5,13 +5,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useId, useRef, useState } from "react";
6
6
  // src/components/date-range-filter.tsx
7
7
  /** Both calendar bounds and the focus handoff belong to the range. */
8
- const DateRangeFilter = ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, ...pickerProps }) => {
8
+ const DateRangeFilter = ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, orientation = "vertical", ...pickerProps }) => {
9
9
  const id = useId();
10
10
  const toRef = useRef(null);
11
11
  const [picker, setPicker] = useState({ type: "closed" });
12
12
  const fromMax = to && (!maxDate || to < maxDate) ? to : maxDate;
13
13
  return /* @__PURE__ */ jsxs("div", {
14
- className: cn("flex flex-col gap-1.5", className),
14
+ className: cn(orientation === "horizontal" ? "grid grid-cols-2 gap-2" : "flex flex-col gap-1.5", className),
15
15
  children: [/* @__PURE__ */ jsxs("div", {
16
16
  className: "flex min-w-0 flex-col gap-1.5",
17
17
  children: [/* @__PURE__ */ jsx("span", {
@@ -36,7 +36,7 @@ function documentIdentityMark(identity, size) {
36
36
  abbreviation,
37
37
  size,
38
38
  weight: identity.courtTier === void 0 ? "outline" : COURT_TIER_WEIGHT[identity.courtTier],
39
- className: cn("max-w-full overflow-hidden", abbreviation.length > 4 && "px-0.5 text-[9px] tracking-normal")
39
+ className: cn("max-w-full overflow-hidden", abbreviation.length > 4 && "px-0.5 text-[9px] leading-[inherit] tracking-normal")
40
40
  })
41
41
  });
42
42
  }
@@ -58,7 +58,7 @@ function documentIdentityMark(identity, size) {
58
58
  function referenceLabelMark(labels, kind) {
59
59
  const classes = statuteLabelClasses(labels.long.length);
60
60
  return /* @__PURE__ */ jsxs("span", {
61
- className: cn("@container/document-identity inline-flex max-w-full shrink-0 items-center justify-center font-mono leading-4 font-semibold tabular-nums", labels.short.length > 7 ? "text-[9px]" : "text-[10px]"),
61
+ className: cn("@container/document-identity inline-flex max-w-full shrink-0 items-center justify-center font-mono font-semibold tabular-nums", labels.short.length > 7 ? "text-[9px]" : "text-[10px]"),
62
62
  style: { width: `${labels.long.length + .25}ch` },
63
63
  "aria-label": labels.long,
64
64
  "data-slot": "document-identity-badge",
@@ -18,7 +18,7 @@ import { useSyncExternalStore } from "react";
18
18
  const Kbd = ({ className, children, keys, variant = "cap", ...props }) => {
19
19
  const platform = useKbdPlatform();
20
20
  return /* @__PURE__ */ jsx("kbd", {
21
- className: cn("inline-flex shrink-0 items-center justify-center gap-0.5 font-sans leading-none font-medium tabular-nums", KBD_VARIANT_CLASS_NAME[variant], className),
21
+ className: cn("inline-flex shrink-0 items-center justify-center gap-0.5 font-sans font-medium tabular-nums", KBD_VARIANT_CLASS_NAME[variant], className),
22
22
  "data-slot": "kbd",
23
23
  "data-variant": variant,
24
24
  ...props,
@@ -41,6 +41,10 @@ declare const PopoverPanel: ({ children, contentClassName, ...props }: Component
41
41
  contentClassName?: string;
42
42
  }) => React.JSX.Element;
43
43
  declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React.JSX.Element;
44
- declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React.JSX.Element;
44
+ type PopoverTitleSize = "default" | "sm";
45
+ type PopoverTitleProps = Popover$1.Title.Props & {
46
+ size?: PopoverTitleSize | undefined;
47
+ };
48
+ declare const PopoverTitle: ({ className, size, ...props }: PopoverTitleProps) => React.JSX.Element;
45
49
  declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React.JSX.Element;
46
50
  export { Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger };
@@ -69,8 +69,14 @@ const PopoverClose = ({ ...props }) => /* @__PURE__ */ jsx(Popover$1.Close, {
69
69
  "data-slot": "popover-close",
70
70
  ...props
71
71
  });
72
- const PopoverTitle = ({ className, ...props }) => /* @__PURE__ */ jsx(Popover$1.Title, {
73
- className: cn("text-lg leading-none font-semibold", className),
72
+ /** Each size states its own line height; `sm` heads a compact menu-like popover. */
73
+ const POPOVER_TITLE_SIZE_CLASS = {
74
+ default: "text-lg leading-none",
75
+ sm: "text-sm leading-(--text-sm--line-height)"
76
+ };
77
+ const PopoverTitle = ({ className, size = "default", ...props }) => /* @__PURE__ */ jsx(Popover$1.Title, {
78
+ className: cn(POPOVER_TITLE_SIZE_CLASS[size], "font-semibold", className),
79
+ "data-size": size,
74
80
  "data-slot": "popover-title",
75
81
  ...props
76
82
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
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",
@@ -1027,7 +1027,7 @@
1027
1027
  "clsx": "^2.1.1",
1028
1028
  "input-otp": "^1.5.0",
1029
1029
  "lucide-react": "1.74.0",
1030
- "tailwind-merge": "^3.7.0",
1030
+ "tailwind-merge": "^3.7.1",
1031
1031
  "temporal-polyfill": "1.0.8"
1032
1032
  },
1033
1033
  "devDependencies": {