gridsmith-ui 0.3.2 → 0.3.4

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # gridsmith-ui
2
2
 
3
- 77 React components with a CSS custom property theming engine.
3
+ 82 React components with a CSS custom property theming engine.
4
4
 
5
5
  ## Installation
6
6
 
package/dist/index.js CHANGED
@@ -82103,9 +82103,9 @@ function Card({ variant = "default", loading = false, selected, selectable, onSe
82103
82103
  children: [
82104
82104
  selected && !loading && /* @__PURE__ */ jsx("div", { className: "absolute top-ds-3 right-ds-3 w-5 h-5 rounded-[var(--ds-radius-full)] bg-[var(--ds-accent-primary)] flex items-center justify-center", children: /* @__PURE__ */ jsx(Icon, { name: "check", size: 12, className: "text-[var(--ds-text-on-primary)]" }) }),
82105
82105
  loading ? /* @__PURE__ */ jsxs("div", { className: "space-y-ds-3", children: [
82106
- /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/3" }),
82107
- /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-full" }),
82108
- /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-2/3" })
82106
+ /* @__PURE__ */ jsx(Skeleton, { variant: "custom", className: "h-4 w-1/3" }),
82107
+ /* @__PURE__ */ jsx(Skeleton, { variant: "custom", className: "h-3 w-full" }),
82108
+ /* @__PURE__ */ jsx(Skeleton, { variant: "custom", className: "h-3 w-2/3" })
82109
82109
  ] }) : children
82110
82110
  ]
82111
82111
  }
@@ -82124,7 +82124,7 @@ function CardTitle({ className, children, ...props }) {
82124
82124
  return /* @__PURE__ */ jsx(
82125
82125
  "h3",
82126
82126
  {
82127
- className: cn("font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] leading-tight tracking-tight text-[var(--ds-text-primary)] truncate", className),
82127
+ className: cn("font-[family-name:var(--ds-font-display)] text-lg font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] truncate", className),
82128
82128
  ...props,
82129
82129
  children
82130
82130
  }
@@ -82154,7 +82154,7 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
82154
82154
  {
82155
82155
  "data-card": "",
82156
82156
  className: cn(
82157
- "flex flex-col p-ds-5",
82157
+ "flex flex-col p-ds-5 min-w-0",
82158
82158
  "bg-[var(--ds-bg-surface)] rounded-[var(--ds-radius-md)]",
82159
82159
  "border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]",
82160
82160
  isInteractive ? [
@@ -82179,8 +82179,8 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
82179
82179
  }
82180
82180
  } : void 0,
82181
82181
  children: [
82182
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-ds-2", children: [
82183
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider", children: label }),
82182
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-ds-2 min-w-0", children: [
82183
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider truncate min-w-0", title: label, children: label }),
82184
82184
  icon && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center justify-center w-8 h-8 rounded-[var(--ds-radius-sm)] bg-[var(--ds-bg-muted)]", children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 16, className: "text-[var(--ds-text-muted)]" }) })
82185
82185
  ] }),
82186
82186
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-ds-2 mt-ds-2 flex-wrap", children: [
@@ -84137,50 +84137,50 @@ var dotVariant = {
84137
84137
  warning: "bg-[var(--ds-status-warning)] shadow-[0_0_0_3px_var(--ds-status-warning)]/20",
84138
84138
  error: "bg-[var(--ds-status-error)] shadow-[0_0_0_3px_var(--ds-status-error)]/20"
84139
84139
  };
84140
- function Timeline({ items, orientation = "vertical", className, ref }) {
84141
- if (orientation === "horizontal") {
84142
- return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-start", className), children: items.map((item, i) => {
84143
- const isFirst = i === 0;
84144
- const isLast = i === items.length - 1;
84145
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center min-w-[100px]", children: [
84146
- /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full", children: [
84147
- /* @__PURE__ */ jsx(
84148
- "div",
84149
- {
84150
- className: cn(
84151
- "flex-1 h-[2px] transition-colors",
84152
- isFirst ? "bg-transparent" : "bg-[var(--ds-border-subtle)]"
84153
- )
84154
- }
84155
- ),
84156
- /* @__PURE__ */ jsx(
84157
- "div",
84158
- {
84159
- className: cn(
84160
- "shrink-0 w-3 h-3 rounded-[var(--ds-radius-full)]",
84161
- dotVariant[item.variant ?? "default"]
84162
- )
84163
- }
84164
- ),
84165
- /* @__PURE__ */ jsx(
84166
- "div",
84167
- {
84168
- className: cn(
84169
- "flex-1 h-[2px] transition-colors",
84170
- isLast ? "bg-transparent" : "bg-[var(--ds-border-subtle)]"
84171
- )
84172
- }
84173
- )
84174
- ] }),
84175
- /* @__PURE__ */ jsxs("div", { className: "text-center mt-ds-2", children: [
84176
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--ds-text-primary)]", children: item.title }),
84177
- item.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--ds-text-muted)] mt-ds-0.5", children: item.description }),
84178
- item.timestamp && /* @__PURE__ */ jsx("p", { className: "text-2xs text-[var(--ds-text-muted)] mt-ds-0.5 tabular-nums", children: item.timestamp })
84179
- ] })
84180
- ] }, i);
84181
- }) });
84182
- }
84183
- return /* @__PURE__ */ jsx("div", { ref, className: cn("relative", className), children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-ds-4", children: [
84140
+ function TimelineHorizontal({ items, className }) {
84141
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-start", className), children: items.map((item, i) => {
84142
+ const isFirst = i === 0;
84143
+ const isLast = i === items.length - 1;
84144
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center min-w-[100px]", children: [
84145
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full", children: [
84146
+ /* @__PURE__ */ jsx(
84147
+ "div",
84148
+ {
84149
+ className: cn(
84150
+ "flex-1 h-[2px] transition-colors",
84151
+ isFirst ? "bg-transparent" : "bg-[var(--ds-border-subtle)]"
84152
+ )
84153
+ }
84154
+ ),
84155
+ /* @__PURE__ */ jsx(
84156
+ "div",
84157
+ {
84158
+ className: cn(
84159
+ "shrink-0 w-3 h-3 rounded-[var(--ds-radius-full)]",
84160
+ dotVariant[item.variant ?? "default"]
84161
+ )
84162
+ }
84163
+ ),
84164
+ /* @__PURE__ */ jsx(
84165
+ "div",
84166
+ {
84167
+ className: cn(
84168
+ "flex-1 h-[2px] transition-colors",
84169
+ isLast ? "bg-transparent" : "bg-[var(--ds-border-subtle)]"
84170
+ )
84171
+ }
84172
+ )
84173
+ ] }),
84174
+ /* @__PURE__ */ jsxs("div", { className: "text-center mt-ds-2 px-ds-3", children: [
84175
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--ds-text-primary)]", children: item.title }),
84176
+ item.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--ds-text-muted)] mt-ds-0.5", children: item.description }),
84177
+ item.timestamp && /* @__PURE__ */ jsx("p", { className: "text-2xs text-[var(--ds-text-muted)] mt-ds-0.5 tabular-nums", children: item.timestamp })
84178
+ ] })
84179
+ ] }, i);
84180
+ }) });
84181
+ }
84182
+ function TimelineVertical({ items, className }) {
84183
+ return /* @__PURE__ */ jsx("div", { className: cn("relative", className), children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-ds-4", children: [
84184
84184
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
84185
84185
  /* @__PURE__ */ jsx(
84186
84186
  "div",
@@ -84200,6 +84200,18 @@ function Timeline({ items, orientation = "vertical", className, ref }) {
84200
84200
  ] })
84201
84201
  ] }, i)) });
84202
84202
  }
84203
+ function Timeline({ items, orientation = "vertical", className, ref }) {
84204
+ if (orientation === "horizontal") {
84205
+ return /* @__PURE__ */ jsx("div", { ref, className, children: /* @__PURE__ */ jsx(TimelineHorizontal, { items }) });
84206
+ }
84207
+ if (orientation === "responsive") {
84208
+ return /* @__PURE__ */ jsxs("div", { ref, className, children: [
84209
+ /* @__PURE__ */ jsx("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx(TimelineHorizontal, { items }) }),
84210
+ /* @__PURE__ */ jsx("div", { className: "md:hidden", children: /* @__PURE__ */ jsx(TimelineVertical, { items }) })
84211
+ ] });
84212
+ }
84213
+ return /* @__PURE__ */ jsx("div", { ref, className, children: /* @__PURE__ */ jsx(TimelineVertical, { items }) });
84214
+ }
84203
84215
  function CodeBlock2({
84204
84216
  code,
84205
84217
  language,
@@ -93500,6 +93512,7 @@ function VirtualizedList({
93500
93512
  var StackedList = forwardRef(function StackedList2({
93501
93513
  items,
93502
93514
  divided = true,
93515
+ flush = false,
93503
93516
  className
93504
93517
  }, ref) {
93505
93518
  return /* @__PURE__ */ jsx(
@@ -93515,14 +93528,14 @@ var StackedList = forwardRef(function StackedList2({
93515
93528
  "div",
93516
93529
  {
93517
93530
  className: cn(
93518
- "flex items-center gap-ds-3",
93531
+ "flex items-center gap-ds-3 py-ds-3",
93532
+ flush ? "px-0" : "px-ds-5",
93519
93533
  item.onClick && [
93520
93534
  "cursor-pointer transition-all duration-[var(--ds-interactive-hover-speed)] ease-[var(--ds-interactive-hover-ease)]",
93521
93535
  "hover:bg-[var(--ds-bg-muted)]",
93522
93536
  "rounded-[var(--ds-radius-md)]"
93523
93537
  ]
93524
93538
  ),
93525
- style: { padding: "var(--ds-space-3) var(--ds-space-4)" },
93526
93539
  onClick: item.onClick,
93527
93540
  role: item.onClick ? "button" : void 0,
93528
93541
  tabIndex: item.onClick ? 0 : void 0,
@@ -94266,6 +94279,13 @@ function collectInitialExpanded(items, prefix = "") {
94266
94279
  function makeKey(label, parentKey) {
94267
94280
  return parentKey ? `${parentKey}/${label}` : label;
94268
94281
  }
94282
+ var FLYOUT_BRIDGE_PX = 12;
94283
+ function computeCompactFlyoutPos(anchorEl, itemsLength) {
94284
+ const rect = anchorEl.getBoundingClientRect();
94285
+ const flyoutHeight = itemsLength * 32 + 28;
94286
+ const top = Math.min(rect.top, window.innerHeight - flyoutHeight - 8);
94287
+ return { top: Math.max(8, top), left: rect.right - (FLYOUT_BRIDGE_PX - 4) };
94288
+ }
94269
94289
  function CompactFlyout({
94270
94290
  parentLabel,
94271
94291
  items,
@@ -94276,12 +94296,9 @@ function CompactFlyout({
94276
94296
  onMouseEnter,
94277
94297
  onMouseLeave
94278
94298
  }) {
94279
- const [pos, setPos] = useState({ top: 0, left: 0 });
94280
- useEffect(() => {
94281
- const rect = anchorEl.getBoundingClientRect();
94282
- const flyoutHeight = items.length * 32 + 28;
94283
- const top = Math.min(rect.top, window.innerHeight - flyoutHeight - 8);
94284
- setPos({ top: Math.max(8, top), left: rect.right + 4 });
94299
+ const [pos, setPos] = useState(() => computeCompactFlyoutPos(anchorEl, items.length));
94300
+ useLayoutEffect(() => {
94301
+ setPos(computeCompactFlyoutPos(anchorEl, items.length));
94285
94302
  }, [anchorEl, items.length]);
94286
94303
  useEffect(() => {
94287
94304
  function handler(e) {
@@ -94290,44 +94307,47 @@ function CompactFlyout({
94290
94307
  document.addEventListener("keydown", handler);
94291
94308
  return () => document.removeEventListener("keydown", handler);
94292
94309
  }, [onClose]);
94293
- const content = /* @__PURE__ */ jsxs(
94310
+ const content = /* @__PURE__ */ jsx(
94294
94311
  "div",
94295
94312
  {
94296
- role: "menu",
94297
94313
  onMouseEnter,
94298
94314
  onMouseLeave,
94299
- className: cn(
94300
- "fixed z-50 min-w-[160px] py-ds-1",
94301
- "bg-[var(--ds-sidebar-bg)] rounded-[var(--ds-radius-md)]",
94302
- "shadow-[var(--ds-shadow-dropdown)]",
94303
- "border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]"
94304
- ),
94305
- style: { top: pos.top, left: pos.left, pointerEvents: "auto" },
94306
- children: [
94307
- /* @__PURE__ */ jsx("p", { className: "px-ds-2 pt-ds-1 pb-ds-1.5 text-2xs font-semibold uppercase tracking-wider text-[var(--ds-sidebar-text-muted)]", children: parentLabel }),
94308
- /* @__PURE__ */ jsx("div", { className: "flex flex-col px-ds-1", style: { gap: "var(--ds-space-0\\.5)" }, children: items.map((child, i) => /* @__PURE__ */ jsxs(
94309
- "a",
94310
- {
94311
- href: child.href ?? "#",
94312
- role: "menuitem",
94313
- onClick: (e) => {
94314
- e.preventDefault();
94315
- onItemClick?.(child, i);
94316
- onClose();
94315
+ className: "fixed z-50",
94316
+ style: { top: pos.top, left: pos.left, paddingLeft: FLYOUT_BRIDGE_PX, pointerEvents: "auto" },
94317
+ children: /* @__PURE__ */ jsxs("div", {
94318
+ role: "menu",
94319
+ className: cn(
94320
+ "min-w-[160px] py-ds-1",
94321
+ "bg-[var(--ds-sidebar-bg)] rounded-[var(--ds-radius-md)]",
94322
+ "shadow-[var(--ds-shadow-dropdown)]",
94323
+ "border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]"
94324
+ ),
94325
+ children: [
94326
+ /* @__PURE__ */ jsx("p", { className: "px-ds-2 pt-ds-1 pb-ds-1.5 text-2xs font-semibold uppercase tracking-wider text-[var(--ds-sidebar-text-muted)]", children: parentLabel }),
94327
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col px-ds-1", style: { gap: "var(--ds-space-0\\.5)" }, children: items.map((child, i) => /* @__PURE__ */ jsxs(
94328
+ "a",
94329
+ {
94330
+ href: child.href ?? "#",
94331
+ role: "menuitem",
94332
+ onClick: (e) => {
94333
+ e.preventDefault();
94334
+ onItemClick?.(child, i);
94335
+ onClose();
94336
+ },
94337
+ className: cn(
94338
+ "flex items-center gap-ds-2 px-ds-2 py-ds-1.5 text-xs rounded-[var(--ds-radius-sm)] transition-colors cursor-pointer",
94339
+ child.active ? "bg-sidebar-accent-subtle text-[var(--ds-sidebar-accent)] font-medium" : "text-[var(--ds-sidebar-text-secondary)] hover:bg-[var(--ds-sidebar-item-hover)] hover:text-[var(--ds-sidebar-text)]"
94340
+ ),
94341
+ children: [
94342
+ child.icon && /* @__PURE__ */ jsx(Icon, { name: child.icon, size: 14 }),
94343
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: child.label }),
94344
+ child.badge && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: child.badge })
94345
+ ]
94317
94346
  },
94318
- className: cn(
94319
- "flex items-center gap-ds-2 px-ds-2 py-ds-1.5 text-xs rounded-[var(--ds-radius-sm)] transition-colors cursor-pointer",
94320
- child.active ? "bg-sidebar-accent-subtle text-[var(--ds-sidebar-accent)] font-medium" : "text-[var(--ds-sidebar-text-secondary)] hover:bg-[var(--ds-sidebar-item-hover)] hover:text-[var(--ds-sidebar-text)]"
94321
- ),
94322
- children: [
94323
- child.icon && /* @__PURE__ */ jsx(Icon, { name: child.icon, size: 14 }),
94324
- /* @__PURE__ */ jsx("span", { className: "truncate", children: child.label }),
94325
- child.badge && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: child.badge })
94326
- ]
94327
- },
94328
- child.label
94329
- )) })
94330
- ]
94347
+ child.label
94348
+ )) })
94349
+ ]
94350
+ })
94331
94351
  }
94332
94352
  );
94333
94353
  return createPortal(content, portalContainer ?? document.body);
@@ -94361,6 +94381,8 @@ function SidebarNav({
94361
94381
  () => new Set(collectInitialExpanded(allItems))
94362
94382
  );
94363
94383
  const [openFlyout, setOpenFlyout] = useState(null);
94384
+ const openFlyoutRef = useRef(null);
94385
+ const flyoutCloseTimer = useRef(null);
94364
94386
  const toggleExpand = useCallback((key2) => {
94365
94387
  setExpandedItems((prev) => {
94366
94388
  const next = new Set(prev);
@@ -94369,7 +94391,31 @@ function SidebarNav({
94369
94391
  return next;
94370
94392
  });
94371
94393
  }, []);
94372
- const closeFlyout = useCallback(() => setOpenFlyout(null), []);
94394
+ const cancelFlyoutClose = useCallback(() => {
94395
+ if (flyoutCloseTimer.current) {
94396
+ clearTimeout(flyoutCloseTimer.current);
94397
+ flyoutCloseTimer.current = null;
94398
+ }
94399
+ }, []);
94400
+ const closeFlyout = useCallback(() => {
94401
+ cancelFlyoutClose();
94402
+ setOpenFlyout(null);
94403
+ openFlyoutRef.current = null;
94404
+ }, [cancelFlyoutClose]);
94405
+ const openFlyoutFor = useCallback((key2) => {
94406
+ cancelFlyoutClose();
94407
+ setOpenFlyout(key2);
94408
+ openFlyoutRef.current = key2;
94409
+ }, [cancelFlyoutClose]);
94410
+ const scheduleFlyoutClose = useCallback((key2) => {
94411
+ cancelFlyoutClose();
94412
+ flyoutCloseTimer.current = setTimeout(() => {
94413
+ if (openFlyoutRef.current === key2) {
94414
+ setOpenFlyout(null);
94415
+ openFlyoutRef.current = null;
94416
+ }
94417
+ }, 400);
94418
+ }, [cancelFlyoutClose]);
94373
94419
  const isCompact = sidebarType === "compact";
94374
94420
  const isMinimal = sidebarType === "minimal";
94375
94421
  function renderLeaf(item, depth, index) {
@@ -94423,8 +94469,11 @@ function SidebarNav({
94423
94469
  hasChildren,
94424
94470
  childActive,
94425
94471
  isOpen,
94426
- onOpen: () => setOpenFlyout(key2),
94472
+ flyoutKey: key2,
94473
+ onOpen: openFlyoutFor,
94427
94474
  onClose: closeFlyout,
94475
+ onScheduleClose: scheduleFlyoutClose,
94476
+ onCancelClose: cancelFlyoutClose,
94428
94477
  portalContainer,
94429
94478
  onItemClick,
94430
94479
  mobile,
@@ -94479,7 +94528,8 @@ function SidebarNav({
94479
94528
  name: "chevron-right",
94480
94529
  size: 12,
94481
94530
  className: cn(
94482
- "shrink-0 transition-transform text-[var(--ds-sidebar-text-muted)]",
94531
+ "shrink-0 transition-transform",
94532
+ item.active || childActive ? "text-[var(--ds-sidebar-accent)]" : "text-[var(--ds-sidebar-text-muted)]",
94483
94533
  isExpanded && "rotate-90"
94484
94534
  )
94485
94535
  }
@@ -94602,8 +94652,11 @@ function CompactNavItem({
94602
94652
  hasChildren,
94603
94653
  childActive,
94604
94654
  isOpen,
94655
+ flyoutKey,
94605
94656
  onOpen,
94606
94657
  onClose,
94658
+ onScheduleClose,
94659
+ onCancelClose,
94607
94660
  portalContainer,
94608
94661
  onItemClick,
94609
94662
  mobile,
@@ -94611,22 +94664,13 @@ function CompactNavItem({
94611
94664
  onToggleExpand
94612
94665
  }) {
94613
94666
  const triggerRef = useRef(null);
94614
- const closeTimer = useRef(null);
94615
- const cancelClose = useCallback(() => {
94616
- if (closeTimer.current) {
94617
- clearTimeout(closeTimer.current);
94618
- closeTimer.current = null;
94619
- }
94620
- }, []);
94621
- const scheduleClose = useCallback(() => {
94622
- cancelClose();
94623
- closeTimer.current = setTimeout(onClose, 300);
94624
- }, [onClose, cancelClose]);
94625
94667
  const handleMouseEnter = useCallback(() => {
94626
- cancelClose();
94627
- if (hasChildren && !isOpen) onOpen();
94628
- }, [hasChildren, isOpen, onOpen, cancelClose]);
94629
- useEffect(() => () => cancelClose(), [cancelClose]);
94668
+ onCancelClose();
94669
+ if (hasChildren && !isOpen) onOpen(flyoutKey);
94670
+ }, [hasChildren, isOpen, onOpen, onCancelClose, flyoutKey]);
94671
+ const handleMouseLeave = useCallback(() => {
94672
+ onScheduleClose(flyoutKey);
94673
+ }, [onScheduleClose, flyoutKey]);
94630
94674
  const handleClick2 = () => {
94631
94675
  if (mobile && hasChildren) {
94632
94676
  onToggleExpand?.();
@@ -94640,7 +94684,7 @@ function CompactNavItem({
94640
94684
  {
94641
94685
  ref: triggerRef,
94642
94686
  onMouseEnter: !mobile && hasChildren ? handleMouseEnter : void 0,
94643
- onMouseLeave: !mobile && hasChildren && isOpen ? scheduleClose : void 0,
94687
+ onMouseLeave: !mobile && hasChildren && isOpen ? handleMouseLeave : void 0,
94644
94688
  onClick: handleClick2,
94645
94689
  "aria-expanded": hasChildren ? mobile ? expanded : isOpen : void 0,
94646
94690
  className: cn(
@@ -94663,7 +94707,8 @@ function CompactNavItem({
94663
94707
  name: mobile ? "chevron-down" : "chevron-right",
94664
94708
  size: 10,
94665
94709
  className: cn(
94666
- "absolute right-1 top-1/2 -translate-y-1/2 text-[var(--ds-sidebar-text-muted)] transition-transform",
94710
+ "absolute right-1 top-1/2 -translate-y-1/2 transition-transform",
94711
+ item.active || childActive ? "text-[var(--ds-sidebar-accent)]" : "text-[var(--ds-sidebar-text-muted)]",
94667
94712
  mobile && expanded && "rotate-180"
94668
94713
  )
94669
94714
  }
@@ -94680,8 +94725,8 @@ function CompactNavItem({
94680
94725
  portalContainer,
94681
94726
  onItemClick,
94682
94727
  onClose,
94683
- onMouseEnter: cancelClose,
94684
- onMouseLeave: scheduleClose
94728
+ onMouseEnter: onCancelClose,
94729
+ onMouseLeave: handleMouseLeave
94685
94730
  }
94686
94731
  ),
94687
94732
  mobile && expanded && hasChildren && item.children && /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col gap-ds-1 pb-ds-1", children: item.children.map((child, ci) => /* @__PURE__ */ jsxs(
@@ -95155,7 +95200,7 @@ function Drawer({ open, onClose, position = "right", width = "400px", title, chi
95155
95200
  minHeight: "calc(var(--ds-space-unit) * 6 + 1.75rem + 2px + var(--ds-border-width))"
95156
95201
  },
95157
95202
  children: [
95158
- /* @__PURE__ */ jsx("h2", { id: titleId, className: "text-base font-[var(--ds-weight-heading)]", children: title }),
95203
+ /* @__PURE__ */ jsx("h2", { id: titleId, className: "font-[family-name:var(--ds-font-display)] text-lg font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] truncate", children: title }),
95159
95204
  /* @__PURE__ */ jsx(
95160
95205
  "button",
95161
95206
  {
@@ -96350,7 +96395,7 @@ function Sheet({ open, onClose, title, children, footer, snapPoints = [0.5, 0.92
96350
96395
  className: "flex items-center justify-between shrink-0 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]",
96351
96396
  style: { padding: "var(--ds-space-2) var(--ds-space-5)" },
96352
96397
  children: [
96353
- /* @__PURE__ */ jsx("h2", { id: titleId, className: "text-base font-[var(--ds-weight-heading)]", children: title }),
96398
+ /* @__PURE__ */ jsx("h2", { id: titleId, className: "font-[family-name:var(--ds-font-display)] text-lg font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] truncate", children: title }),
96354
96399
  /* @__PURE__ */ jsx(
96355
96400
  "button",
96356
96401
  {
package/dist/roots.css CHANGED
@@ -151,16 +151,16 @@
151
151
  --ds-border-width-thicker: calc(var(--ds-border-base) * 2.5);
152
152
  --ds-divider-width: var(--ds-border-width);
153
153
 
154
- /* ── L2: Derived Type Scale ─────────────────────────────────────── */
154
+ /* ── L2: Derived Type Scale (Tailwind-aligned ratios × --ds-text-base) ── */
155
155
 
156
- --ds-font-size-2xs: calc(var(--ds-text-base) * 0.714);
157
- --ds-font-size-xs: calc(var(--ds-text-base) * 0.786);
158
- --ds-font-size-sm: calc(var(--ds-text-base) * 0.929);
156
+ --ds-font-size-2xs: calc(var(--ds-text-base) * 0.625);
157
+ --ds-font-size-xs: calc(var(--ds-text-base) * 0.75);
158
+ --ds-font-size-sm: calc(var(--ds-text-base) * 0.875);
159
159
  --ds-font-size-body: var(--ds-text-base);
160
- --ds-font-size-lg: calc(var(--ds-text-base) * 1.286);
161
- --ds-font-size-xl: calc(var(--ds-text-base) * 1.571);
162
- --ds-font-size-2xl: calc(var(--ds-text-base) * 2);
163
- --ds-font-size-3xl: calc(var(--ds-text-base) * 2.571);
160
+ --ds-font-size-lg: calc(var(--ds-text-base) * 1.125);
161
+ --ds-font-size-xl: calc(var(--ds-text-base) * 1.25);
162
+ --ds-font-size-2xl: calc(var(--ds-text-base) * 1.5);
163
+ --ds-font-size-3xl: calc(var(--ds-text-base) * 1.875);
164
164
  --ds-line-height-body: 1.5;
165
165
  --ds-line-height-tight: 1.25;
166
166
 
package/dist/tailwind.css CHANGED
@@ -22,14 +22,6 @@
22
22
  --spacing-ds-10: var(--ds-space-10);
23
23
  --spacing-ds-12: var(--ds-space-12);
24
24
 
25
- --font-size-xs: var(--ds-font-size-xs);
26
- --font-size-sm: var(--ds-font-size-sm);
27
- --font-size-base: var(--ds-font-size-body);
28
- --font-size-lg: var(--ds-font-size-lg);
29
- --font-size-xl: var(--ds-font-size-xl);
30
- --font-size-2xl: var(--ds-font-size-2xl);
31
- --font-size-3xl: var(--ds-font-size-3xl);
32
-
33
25
  --font-weight-normal: var(--ds-weight-base);
34
26
  --font-weight-medium: var(--ds-weight-emphasis);
35
27
  --font-weight-semibold: var(--ds-weight-strong);
@@ -41,6 +33,16 @@
41
33
  --color-sidebar-accent-subtle: var(--ds-sidebar-accent-subtle);
42
34
  }
43
35
 
36
+ @theme inline {
37
+ --text-xs: var(--ds-font-size-xs);
38
+ --text-sm: var(--ds-font-size-sm);
39
+ --text-base: var(--ds-font-size-body);
40
+ --text-lg: var(--ds-font-size-lg);
41
+ --text-xl: var(--ds-font-size-xl);
42
+ --text-2xl: var(--ds-font-size-2xl);
43
+ --text-3xl: var(--ds-font-size-3xl);
44
+ }
45
+
44
46
  @utility text-2xs {
45
47
  font-size: var(--ds-font-size-2xs);
46
48
  }
@@ -22,14 +22,6 @@
22
22
  --spacing-ds-10: var(--ds-space-10);
23
23
  --spacing-ds-12: var(--ds-space-12);
24
24
 
25
- --font-size-xs: var(--ds-font-size-xs);
26
- --font-size-sm: var(--ds-font-size-sm);
27
- --font-size-base: var(--ds-font-size-body);
28
- --font-size-lg: var(--ds-font-size-lg);
29
- --font-size-xl: var(--ds-font-size-xl);
30
- --font-size-2xl: var(--ds-font-size-2xl);
31
- --font-size-3xl: var(--ds-font-size-3xl);
32
-
33
25
  --font-weight-normal: var(--ds-weight-base);
34
26
  --font-weight-medium: var(--ds-weight-emphasis);
35
27
  --font-weight-semibold: var(--ds-weight-strong);
@@ -41,6 +33,16 @@
41
33
  --color-sidebar-accent-subtle: var(--ds-sidebar-accent-subtle);
42
34
  }
43
35
 
36
+ @theme inline {
37
+ --text-xs: var(--ds-font-size-xs);
38
+ --text-sm: var(--ds-font-size-sm);
39
+ --text-base: var(--ds-font-size-body);
40
+ --text-lg: var(--ds-font-size-lg);
41
+ --text-xl: var(--ds-font-size-xl);
42
+ --text-2xl: var(--ds-font-size-2xl);
43
+ --text-3xl: var(--ds-font-size-3xl);
44
+ }
45
+
44
46
  @utility text-2xs {
45
47
  font-size: var(--ds-font-size-2xs);
46
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gridsmith-ui",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Gridsmith component library — 82 React components with design tokens and a CSS custom property theming engine",
5
5
  "type": "module",
6
6
  "sideEffects": [