gridsmith-ui 0.32.0 → 0.33.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/README.md +4 -2
  3. package/dist/charts.d.ts +10 -1
  4. package/dist/charts.js +113 -48
  5. package/dist/charts.js.map +1 -1
  6. package/dist/chat.js +2 -2
  7. package/dist/{chunk-NGZJK57C.js → chunk-6NRLTG5W.js} +8 -7
  8. package/dist/chunk-6NRLTG5W.js.map +1 -0
  9. package/dist/{chunk-OVHM55JF.js → chunk-6XCWKLJZ.js} +40 -5
  10. package/dist/chunk-6XCWKLJZ.js.map +1 -0
  11. package/dist/{chunk-JHZ22HQP.js → chunk-AB4UQ4G5.js} +58 -219
  12. package/dist/chunk-AB4UQ4G5.js.map +1 -0
  13. package/dist/{chunk-SIEU4H3H.js → chunk-AVSP6NDX.js} +5 -5
  14. package/dist/{chunk-SIEU4H3H.js.map → chunk-AVSP6NDX.js.map} +1 -1
  15. package/dist/chunk-F2XMZOUP.js +81 -0
  16. package/dist/chunk-F2XMZOUP.js.map +1 -0
  17. package/dist/{chunk-XBVZIN26.js → chunk-FF57N3P7.js} +8 -6
  18. package/dist/chunk-FF57N3P7.js.map +1 -0
  19. package/dist/chunk-GIA4BMGI.js +18 -0
  20. package/dist/chunk-GIA4BMGI.js.map +1 -0
  21. package/dist/{chunk-DO6DLTFK.js → chunk-OWGF362U.js} +4 -4
  22. package/dist/{chunk-DO6DLTFK.js.map → chunk-OWGF362U.js.map} +1 -1
  23. package/dist/chunk-P3NUUIL6.js +9 -0
  24. package/dist/chunk-P3NUUIL6.js.map +1 -0
  25. package/dist/chunk-R7FG4ZQ5.js +16 -0
  26. package/dist/chunk-R7FG4ZQ5.js.map +1 -0
  27. package/dist/{chunk-QY2RA2HO.js → chunk-UBLBVCQN.js} +3 -3
  28. package/dist/{chunk-QY2RA2HO.js.map → chunk-UBLBVCQN.js.map} +1 -1
  29. package/dist/{chunk-HUVZQOU4.js → chunk-WD6T57ZJ.js} +3 -3
  30. package/dist/{chunk-HUVZQOU4.js.map → chunk-WD6T57ZJ.js.map} +1 -1
  31. package/dist/chunk-ZQV26NND.js +213 -0
  32. package/dist/chunk-ZQV26NND.js.map +1 -0
  33. package/dist/dashboard.d.ts +207 -0
  34. package/dist/dashboard.js +1210 -0
  35. package/dist/dashboard.js.map +1 -0
  36. package/dist/data-grid.js +8 -7
  37. package/dist/data-grid.js.map +1 -1
  38. package/dist/index.d.ts +50 -6
  39. package/dist/index.js +190 -128
  40. package/dist/index.js.map +1 -1
  41. package/dist/kanban.js +6 -6
  42. package/dist/resizable.js +7 -6
  43. package/dist/resizable.js.map +1 -1
  44. package/dist/utils.d.ts +51 -1
  45. package/dist/utils.js +55 -4
  46. package/dist/utils.js.map +1 -1
  47. package/dist/virtualized.js +6 -6
  48. package/package.json +6 -1
  49. package/dist/chunk-H732QL56.js +0 -71
  50. package/dist/chunk-H732QL56.js.map +0 -1
  51. package/dist/chunk-JHZ22HQP.js.map +0 -1
  52. package/dist/chunk-LJYSVZMI.js +0 -25
  53. package/dist/chunk-LJYSVZMI.js.map +0 -1
  54. package/dist/chunk-NGZJK57C.js.map +0 -1
  55. package/dist/chunk-OVHM55JF.js.map +0 -1
  56. package/dist/chunk-XBVZIN26.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,45 +1,48 @@
1
1
  "use client";
2
- import { useAppShell, REACT_VERSION_PROBLEM, Breadcrumbs, useCrumbFollow, crumbGoes, useCornerInset, NAVBAR_INSET_PRIORITY, useOverlayMark, useDirtyGuard, useScrollbarInset, useBulkBarHost, DrawerFooterCtx, OverlayMarkScope, OverlayCloseCtx, BulkBarHostCtx, BulkBarSpacer, bulkBarRoom, insetLessScrollbar, BULK_BAR_LAYER, DiscardConfirm, OVERLAY_ROOT_ATTR, BulkBarPresenceCtx, BULK_BAR_WINDOW_LAYER, OverlayMarkCtx, useCompact, useElementWidth, DrawerPanel, useCloseSettle, besideRoom, PANEL_INSET_PRIORITY, Drawer, useRememberedWidth, pxOf, ResizeEdge, LAUNCHER_INSET_PRIORITY, TOAST_INSET_VARS, defaultMaxWidth } from './chunk-JHZ22HQP.js';
3
- export { AppShell, Breadcrumbs, Drawer, SkipLink, useAppShell, useUnsavedChanges } from './chunk-JHZ22HQP.js';
4
- import { Skeleton, TITLE_TEXT, SegmentedControl } from './chunk-OVHM55JF.js';
5
- export { SegmentedControl, Skeleton } from './chunk-OVHM55JF.js';
2
+ import { localeCache, startOfDay, addDays, useWeekStart, useDateWords, localeDayFirst, dayKey, moveDay, addMonths, DateSegmentFields, getMonthGrid, isSameMonth, isSameDay, DatePicker, timeSegments, pad2, inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, Checkbox, CardValue, SortIndicator, startOfWeek, endOfWeek, addMonthsClamped, isExcludedDay, CutCell, CutEmail, stepValue, separatorMovesOn, TIME_SEPARATORS, typeDigit, getEventsForDay, layoutWeek, isWeekend, getWeekDays, isBarEvent, layoutPieces, dayPieces, groupEventsByDay, timeToFraction } from './chunk-6NRLTG5W.js';
3
+ export { Checkbox, CheckboxGroup, CheckboxGroupItem, DatePicker, HoverCard, TextOverflow } from './chunk-6NRLTG5W.js';
4
+ import { useWholeListCheck, pagerPart, Pagination, NumberInput } from './chunk-AVSP6NDX.js';
5
+ export { NumberInput, Pagination, Popover, usePagination } from './chunk-AVSP6NDX.js';
6
+ import { useAppShell, REACT_VERSION_PROBLEM, Breadcrumbs, useCrumbFollow, crumbGoes, useCornerInset, NAVBAR_INSET_PRIORITY, useScrollbarInset, useBulkBarHost, DrawerFooterCtx, BulkBarHostCtx, AsideSlotContext, BulkBarSpacer, bulkBarRoom, insetLessScrollbar, BULK_BAR_LAYER, BulkBarPresenceCtx, BULK_BAR_WINDOW_LAYER, DrawerPanel, useCloseSettle, besideRoom, PANEL_INSET_PRIORITY, Drawer, LAUNCHER_INSET_PRIORITY, TOAST_INSET_VARS, useRememberedWidth, pxOf, ResizeEdge, defaultMaxWidth } from './chunk-AB4UQ4G5.js';
7
+ export { AppShell, Breadcrumbs, Drawer, SkipLink, useAppShell, useUnsavedChanges } from './chunk-AB4UQ4G5.js';
8
+ import { useShellPreferences, PREFERENCE_HOUSE_DEFAULTS, formatRelativeTime, thresholdOf, toMillis, formatFullTime, datedMillis, preferenceActionKey, DAY, HOUR, MINUTE } from './chunk-QOMP4D6V.js';
9
+ export { PreferencesContext, formatFullTime, formatRelativeTime, preferenceActionKey, usePreferences } from './chunk-QOMP4D6V.js';
10
+ import { CELL_FRAME, Skeleton, CELL_HIDE, TITLE_FLOOR, CELL_ROOM, TITLE_TEXT, CELL_STAT_ROOM, CELL_STAT_ROOM_END, CELL_STAT_TILE, CELL_ROOM_INNER, SegmentedControl } from './chunk-6XCWKLJZ.js';
11
+ export { SegmentedControl, Skeleton } from './chunk-6XCWKLJZ.js';
12
+ import { useFormatLocale, LocaleContext } from './chunk-R7FG4ZQ5.js';
13
+ export { useFormatLocale } from './chunk-R7FG4ZQ5.js';
14
+ import { Input, CHECK_FILL, Dropdown, FilterRowContext, SWITCH_KNOB_ON, SWITCH_KNOB_OFF, SWITCH_KNOB_MOTION, SWITCH_TRACK_ON, SWITCH_TRACK_OFF, useFieldControl, useField, OutsideField, InlineFieldError, Label, AddAnotherRowCtx, Field } from './chunk-OWGF362U.js';
15
+ export { Dropdown, Field, InlineFieldError, Input, Label, Textarea, Toggle } from './chunk-OWGF362U.js';
16
+ import { formatLocale, localeChoice } from './chunk-7QLXYRPD.js';
6
17
  import { useScrollEdges, EDGE_FADE } from './chunk-3BRQRKDO.js';
7
18
  import { Avatar, foldForSearch, useActiveOptionInView, shownMentions, matchMentions, mentionOptionId, MentionList, initialsOf } from './chunk-TMPPBXX3.js';
8
19
  export { Avatar } from './chunk-TMPPBXX3.js';
9
- import { Link } from './chunk-QY2RA2HO.js';
10
- export { CodeBlock, Divider, Link } from './chunk-QY2RA2HO.js';
11
- import { DropdownMenu } from './chunk-HUVZQOU4.js';
12
- export { DropdownMenu } from './chunk-HUVZQOU4.js';
13
- import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
20
+ import { Link } from './chunk-UBLBVCQN.js';
21
+ export { CodeBlock, Divider, Link } from './chunk-UBLBVCQN.js';
22
+ import { CardSurfaceCtx, useScrollsInside, useRunsEdgeToEdge, SplitPaneCtx, PanePaddedCtx, RowsCtx, PageActionsCtx, PANE_HEADING_CANCEL, SurfaceBoundary, useFramesItself, TableCardCtx, useWantsInset } from './chunk-RS624TD5.js';
14
23
  import { Badge } from './chunk-WSKPESAX.js';
15
24
  export { Badge } from './chunk-WSKPESAX.js';
16
- import { useKeyboardScroll } from './chunk-H732QL56.js';
17
- import { localeCache, startOfDay, addDays, useWeekStart, useDateWords, localeDayFirst, dayKey, moveDay, addMonths, DateSegmentFields, getMonthGrid, isSameMonth, isSameDay, DatePicker, timeSegments, pad2, inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, Checkbox, CardValue, SortIndicator, startOfWeek, endOfWeek, addMonthsClamped, isExcludedDay, CutCell, CutEmail, stepValue, separatorMovesOn, TIME_SEPARATORS, typeDigit, getEventsForDay, layoutWeek, isWeekend, getWeekDays, isBarEvent, layoutPieces, dayPieces, groupEventsByDay, timeToFraction } from './chunk-NGZJK57C.js';
18
- export { Checkbox, CheckboxGroup, CheckboxGroupItem, DatePicker, HoverCard, TextOverflow } from './chunk-NGZJK57C.js';
19
- import { useWholeListCheck, pagerPart, Pagination, NumberInput } from './chunk-SIEU4H3H.js';
20
- export { NumberInput, Pagination, Popover, usePagination } from './chunk-SIEU4H3H.js';
21
- import { useShellPreferences, PREFERENCE_HOUSE_DEFAULTS, formatRelativeTime, thresholdOf, toMillis, formatFullTime, datedMillis, preferenceActionKey, DAY, HOUR, MINUTE } from './chunk-QOMP4D6V.js';
22
- export { PreferencesContext, formatFullTime, formatRelativeTime, preferenceActionKey, usePreferences } from './chunk-QOMP4D6V.js';
23
- import { useFormatLocale, useHydrated, useToday, LocaleContext } from './chunk-LJYSVZMI.js';
24
- export { useFormatLocale, useHydrated } from './chunk-LJYSVZMI.js';
25
- import { Input, CHECK_FILL, Dropdown, FilterRowContext, SWITCH_KNOB_ON, SWITCH_KNOB_OFF, SWITCH_KNOB_MOTION, SWITCH_TRACK_ON, SWITCH_TRACK_OFF, useFieldControl, useField, OutsideField, InlineFieldError, Label, AddAnotherRowCtx, Field } from './chunk-DO6DLTFK.js';
26
- export { Dropdown, Field, InlineFieldError, Input, Label, Textarea, Toggle } from './chunk-DO6DLTFK.js';
27
- import { formatLocale, localeChoice } from './chunk-7QLXYRPD.js';
25
+ import { useTextOverflow } from './chunk-R2IAK3J3.js';
26
+ export { useTextOverflow } from './chunk-R2IAK3J3.js';
27
+ import { useOverlayMark, useDirtyGuard, OverlayMarkScope, OverlayCloseCtx, DiscardConfirm, OVERLAY_ROOT_ATTR, OverlayMarkCtx, useCompact, useElementWidth } from './chunk-ZQV26NND.js';
28
+ import { useHydrated, useToday } from './chunk-GIA4BMGI.js';
29
+ export { useHydrated } from './chunk-GIA4BMGI.js';
28
30
  import { FormChangeCtx, useReportedChange, useOptionalFormContext, FormCtx } from './chunk-72SDAX54.js';
29
31
  export { useFormContext } from './chunk-72SDAX54.js';
30
- import { CardSurfaceCtx, useScrollsInside, useRunsEdgeToEdge, SplitPaneCtx, PanePaddedCtx, RowsCtx, PageActionsCtx, PANE_HEADING_CANCEL, SurfaceBoundary, useFramesItself, TableCardCtx, useWantsInset } from './chunk-RS624TD5.js';
31
- import { Button, elementType, ControlSizeContext, triggerType, Spinner } from './chunk-XBVZIN26.js';
32
- export { Button, ButtonSizeContext, ControlSizeContext, Spinner } from './chunk-XBVZIN26.js';
32
+ import { DropdownMenu } from './chunk-WD6T57ZJ.js';
33
+ export { DropdownMenu } from './chunk-WD6T57ZJ.js';
34
+ import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
35
+ import { Button, elementType, ControlSizeContext, triggerType, Spinner } from './chunk-FF57N3P7.js';
36
+ export { Button, ButtonSizeContext, ControlSizeContext, Spinner } from './chunk-FF57N3P7.js';
33
37
  import { useBreakpoint, readBreakpointPx } from './chunk-ZHUVLBCC.js';
34
38
  export { BreakpointWidthProvider, useBreakpoint } from './chunk-ZHUVLBCC.js';
35
39
  import { inputModality, useInputModality } from './chunk-7RKC5C7G.js';
36
40
  export { INPUT_MODALITY_ATTR, inputModality, installInputModality, useInputModality } from './chunk-7RKC5C7G.js';
37
- import { useTextOverflow } from './chunk-R2IAK3J3.js';
38
- export { useTextOverflow } from './chunk-R2IAK3J3.js';
41
+ import { useKeyboardScroll } from './chunk-F2XMZOUP.js';
39
42
  import { AutoTooltip, mergeRefs, useRevealFocus } from './chunk-HCEHTJ5E.js';
40
43
  export { Tooltip, useRevealFocus } from './chunk-HCEHTJ5E.js';
41
44
  import { Icon, slotIcon, warnOnce } from './chunk-53F7GVBQ.js';
42
- import { cn, FOCUS_RING, focusAfterSelfRemoval, FOCUSABLE, GLASS_SURFACE, useFocusKeptInList, FOCUS_INSET, useLatest, PEER_FOCUS_RING, GLASS_BACKDROP, OPEN_TO_FOCUS, focusOutOf, FIELD, ZOOM_KEYS, rovingTabStop, FOCUS_ROOM, useOverlayLayer, useFocusTrap, useFocusBeforeOpen, rememberOpener, focusInitial, lockBodyScroll, unlockBodyScroll, OVERLAY_CLOSE_ATTR, OVERLAY_SURFACE, GLASS_OVERLAY, usePopupFocus, pointOf, pageAddress, registerOpenerRoot, rememberFocus, usePosition, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING, CONTROL_ANCESTOR, GROUP_FOCUS_RING, useGridKeyboard, ERROR_ACTIVE_RING, ACTIVE_RING, ERROR_FOCUS_WITHIN_RING, FIELD_FOCUS_WITHIN_RING, focusAfterRemoval, GLASS_DROPDOWN, ERROR_FOCUS_RING, FIELD_FOCUS_RING, openToFocus, atLeastFocusRoom, useNonModalDialog, useReturnFocus, onMovingOn } from './chunk-2724SJO2.js';
45
+ import { cn, FOCUS_RING, focusAfterSelfRemoval, FOCUSABLE, GLASS_SURFACE, FOCUS_INSET_WHILE_STOP, useFocusKeptInList, FOCUS_INSET, useLatest, PEER_FOCUS_RING, GLASS_BACKDROP, OPEN_TO_FOCUS, focusOutOf, FIELD, ZOOM_KEYS, rovingTabStop, FOCUS_ROOM, useOverlayLayer, useFocusTrap, useFocusBeforeOpen, rememberOpener, focusInitial, lockBodyScroll, unlockBodyScroll, OVERLAY_CLOSE_ATTR, OVERLAY_SURFACE, GLASS_OVERLAY, usePopupFocus, pointOf, pageAddress, registerOpenerRoot, rememberFocus, usePosition, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING, CONTROL_ANCESTOR, GROUP_FOCUS_RING, useGridKeyboard, ERROR_ACTIVE_RING, ACTIVE_RING, ERROR_FOCUS_WITHIN_RING, FIELD_FOCUS_WITHIN_RING, focusAfterRemoval, GLASS_DROPDOWN, ERROR_FOCUS_RING, FIELD_FOCUS_RING, openToFocus, atLeastFocusRoom, useNonModalDialog, useReturnFocus, onMovingOn } from './chunk-2724SJO2.js';
43
46
  export { useGridKeyboard } from './chunk-2724SJO2.js';
44
47
  import { forwardRef, useRef, useId, useEffect, useState, createContext, useCallback, useLayoutEffect, useMemo, useContext, isValidElement, memo, useImperativeHandle, useSyncExternalStore, Children, Fragment as Fragment$1, cloneElement, useReducer } from 'react';
45
48
  import { createPortal, flushSync } from 'react-dom';
@@ -2033,7 +2036,7 @@ function Dialog({ open, onClose: onCloseProp, title, description, children, foot
2033
2036
  ...barStack ? { scrollPaddingBottom: bulkBarRoom(barStack) } : {}
2034
2037
  },
2035
2038
  children: [
2036
- /* @__PURE__ */ jsx(SurfaceBoundary, { children: /* @__PURE__ */ jsx(DrawerFooterCtx, { value: null, children: /* @__PURE__ */ jsx(OverlayMarkScope, { mark, children: /* @__PURE__ */ jsx(OverlayCloseCtx, { value: onClose, children: /* @__PURE__ */ jsx(BulkBarHostCtx, { value: barHost, children }) }) }) }) }),
2039
+ /* @__PURE__ */ jsx(SurfaceBoundary, { children: /* @__PURE__ */ jsx(DrawerFooterCtx, { value: null, children: /* @__PURE__ */ jsx(OverlayMarkScope, { mark, children: /* @__PURE__ */ jsx(OverlayCloseCtx, { value: onClose, children: /* @__PURE__ */ jsx(BulkBarHostCtx, { value: barHost, children: /* @__PURE__ */ jsx(AsideSlotContext, { value: true, children }) }) }) }) }) }),
2037
2040
  /* @__PURE__ */ jsx(BulkBarSpacer, { room: barStack })
2038
2041
  ]
2039
2042
  }
@@ -5076,8 +5079,8 @@ var Card = forwardRef(function Card2({
5076
5079
  useLayoutEffect(() => {
5077
5080
  const root = rootRef.current;
5078
5081
  if (!root || !isAction && !checkable) return;
5079
- const controls = Array.from(root.querySelectorAll(FOCUSABLE)).some((el) => !el.hasAttribute(CARD_ACTION_ATTR));
5080
5082
  const titleId = root.querySelector("[data-card-title]")?.id || null;
5083
+ const controls = Array.from(root.querySelectorAll(FOCUSABLE)).some((el) => !el.hasAttribute(CARD_ACTION_ATTR)) || !!titleId && root.matches(CELL_FRAME);
5081
5084
  setInner((cur) => cur.controls === controls && cur.titleId === titleId ? cur : { controls, titleId });
5082
5085
  }, [isAction, checkable, loading, children]);
5083
5086
  const holdsControls = isAction && inner.controls;
@@ -5263,7 +5266,6 @@ function splitTitle(children) {
5263
5266
  if (at < 0) return { lead: [], title: parts[0] ?? null, rest: parts.slice(1) };
5264
5267
  return { lead: parts.slice(0, at), title: parts[at], rest: parts.slice(at + 1) };
5265
5268
  }
5266
- var TITLE_FLOOR = "basis-[calc(var(--ds-font-size-lg)*4.5)]";
5267
5269
  var TITLE_ROW = cn(
5268
5270
  "flex flex-wrap items-start justify-end gap-x-ds-2 gap-y-ds-2 min-w-0 grow basis-0",
5269
5271
  "[&>[data-header-actions]>*]:order-5",
@@ -5305,13 +5307,13 @@ var CardHeader = forwardRef(function CardHeader2(allProps, ref) {
5305
5307
  const band = (order) => cn("shrink-0 self-start flex items-center", TITLE_LINE, order);
5306
5308
  const checkbox = owns && row.checkbox ? /* @__PURE__ */ jsx("span", { className: band("order-5"), children: row.checkbox }) : null;
5307
5309
  const check = owns && row.check ? /* @__PURE__ */ jsx("span", { "data-card-selection": "", className: band("order-4"), children: row.check }) : null;
5308
- const menuPart = menu ? /* @__PURE__ */ jsx("span", { className: band("order-6"), children: menu }) : null;
5310
+ const menuPart = menu ? /* @__PURE__ */ jsx("span", { className: cn(band("order-6"), CELL_HIDE), children: menu }) : null;
5309
5311
  const { lead, title, rest } = splitTitle(children);
5310
5312
  const leadBlock = lead.length > 0 ? /* @__PURE__ */ jsx("div", { "data-card-lead": "", className: "flex flex-col space-y-ds-1.5 min-w-0 grow", children: lead }) : null;
5311
5313
  const topLine = iconBlock ?? leadBlock;
5312
5314
  const ownBlock = title !== null && !(isValidElement(title) && elementType(title.type) === CardTitle);
5313
- const actionsSlot = "actions" in allProps ? /* @__PURE__ */ jsx("div", { "data-header-actions": "", className: "contents", children: partsOf(actions).map((item, i) => /* @__PURE__ */ jsx("span", { className: cn("flex items-center shrink-0", TITLE_LINE), children: item }, isValidElement(item) && item.key !== null ? item.key : i)) }) : null;
5314
- return /* @__PURE__ */ jsxs("div", { ref, "data-card-header": "", className: cn("flex flex-col px-ds-5 pt-ds-4 last:pb-ds-4 min-w-0", className), ...props, children: [
5315
+ const actionsSlot = "actions" in allProps ? /* @__PURE__ */ jsx("div", { "data-header-actions": "", className: cn("contents", CELL_HIDE), children: partsOf(actions).map((item, i) => /* @__PURE__ */ jsx("span", { className: cn("flex items-center shrink-0", TITLE_LINE), children: item }, isValidElement(item) && item.key !== null ? item.key : i)) }) : null;
5316
+ return /* @__PURE__ */ jsxs("div", { ref, "data-card-header": "", className: cn("flex flex-col px-ds-5 pt-ds-4 last:pb-ds-4 min-w-0", CELL_ROOM, className), ...props, children: [
5315
5317
  topLine && /* @__PURE__ */ jsxs("div", { "data-card-icon-row": iconBlock ? "" : void 0, "data-card-lead-row": iconBlock ? void 0 : "", className: cn("flex items-start gap-ds-2", iconBlock ? "mb-ds-2.5" : "mb-ds-1.5"), children: [
5316
5318
  topLine,
5317
5319
  iconBlock && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "grow -ml-ds-2" }),
@@ -5412,8 +5414,9 @@ var CardDescription = forwardRef(function CardDescription2({ className, children
5412
5414
  );
5413
5415
  return /* @__PURE__ */ jsx(AutoTooltip, { content: children, disabled: !isTruncated, children: el });
5414
5416
  });
5417
+ var CELL_CARD_BODY = "[[data-dashboard-content]>[data-card]>&]:min-h-0 [[data-dashboard-content]>[data-card]>&]:overflow-y-auto [[data-dashboard-content]>[data-card]>&]:scroll-p-[4px]";
5415
5418
  var CardContent = forwardRef(function CardContent2({ className, children, ...props }, ref) {
5416
- return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 px-ds-5 py-ds-4", className), ...props, children });
5419
+ return /* @__PURE__ */ jsx("div", { ref, "data-card-content": "", className: cn("flex-1 px-ds-5 py-ds-4", CELL_CARD_BODY, FOCUS_INSET_WHILE_STOP, className), ...props, children });
5417
5420
  });
5418
5421
  var CardFooter = forwardRef(function CardFooter2({ className, children, ...props }, ref) {
5419
5422
  return (
@@ -5421,9 +5424,14 @@ var CardFooter = forwardRef(function CardFooter2({ className, children, ...props
5421
5424
  /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-ds-2 px-ds-5 pb-ds-4 pt-ds-2 mt-auto min-w-0 [&:not(:has(>:not(button)))]:justify-end", className), ...props, children })
5422
5425
  );
5423
5426
  });
5424
- function TruncLabel({ children }) {
5427
+ var CELL_STAT = "[[data-dashboard-content]>&]:overflow-y-auto [[data-dashboard-content]>&]:scroll-p-[4px]";
5428
+ var STAT_CONTAINER = "@container/stat [contain-intrinsic-inline-size:12rem]";
5429
+ var STAT_VALUE_STEPS = "@max-[11.25rem]/stat:text-xl @max-[7.25rem]/stat:text-lg";
5430
+ var STAT_NARROW_LINE = "@max-[10.375rem]/stat:col-span-2";
5431
+ var STAT_NARROW_TILE = "@max-[10.375rem]/stat:row-[1]";
5432
+ function TruncLabel({ children, className }) {
5425
5433
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
5426
- const el = /* @__PURE__ */ jsx("span", { ref, className: "block text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider truncate min-w-0", children });
5434
+ const el = /* @__PURE__ */ jsx("span", { ref, className: cn("block text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider truncate min-w-0", className), children });
5427
5435
  if (!isTruncated) return el;
5428
5436
  return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
5429
5437
  }
@@ -5441,6 +5449,7 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
5441
5449
  "div",
5442
5450
  {
5443
5451
  "data-card": "",
5452
+ "data-stats-card": "",
5444
5453
  className: cn(
5445
5454
  "flex flex-col p-ds-3 sm:p-ds-5 min-w-0",
5446
5455
  "bg-[var(--ds-bg-surface)] rounded-[var(--ds-radius-md)]",
@@ -5455,8 +5464,10 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
5455
5464
  "hover:scale-[var(--ds-ambient-hover-scale)] hover:-translate-y-[var(--ds-ambient-hover-lift)]"
5456
5465
  ],
5457
5466
  GLASS_SURFACE,
5458
- // a clickable card is a Tab stop
5459
- onClick && FOCUS_RING,
5467
+ STAT_CONTAINER,
5468
+ CELL_STAT,
5469
+ // a clickable card is a Tab stop; a plain one is while it scrolls in a dashboard's widget
5470
+ onClick ? FOCUS_RING : FOCUS_INSET_WHILE_STOP,
5460
5471
  className
5461
5472
  ),
5462
5473
  onClick,
@@ -5469,15 +5480,13 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
5469
5480
  }
5470
5481
  } : void 0,
5471
5482
  children: [
5472
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-ds-2 min-w-0", children: [
5473
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
5474
- /* @__PURE__ */ jsx(TruncLabel, { children: label }),
5475
- /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-ds-2 mt-ds-2 flex-wrap", children: [
5476
- /* @__PURE__ */ jsx("span", { className: "font-[family-name:var(--ds-font-display)] text-2xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] leading-none tabular-nums", children: value }),
5477
- trend && /* @__PURE__ */ jsx(TrendBadge, { trend })
5478
- ] })
5483
+ /* @__PURE__ */ jsxs("div", { className: cn("grid gap-ds-2 min-w-0", icon ? "grid-cols-[minmax(0,1fr)_auto]" : "grid-cols-[minmax(0,1fr)]", CELL_ROOM_INNER), children: [
5484
+ /* @__PURE__ */ jsx(TruncLabel, { className: cn("self-start", CELL_STAT_ROOM, !icon && CELL_STAT_ROOM_END), children: label }),
5485
+ /* @__PURE__ */ jsxs("div", { className: cn("col-start-1 flex items-baseline gap-ds-2 flex-wrap", icon && STAT_NARROW_LINE), children: [
5486
+ /* @__PURE__ */ jsx("span", { className: cn("font-[family-name:var(--ds-font-display)] text-2xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] leading-none tabular-nums", STAT_VALUE_STEPS), children: value }),
5487
+ trend && /* @__PURE__ */ jsx(TrendBadge, { trend })
5479
5488
  ] }),
5480
- 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)]" }) })
5489
+ icon && /* @__PURE__ */ jsx("div", { className: cn("col-start-2 row-[1/span_2] self-start flex items-center justify-center w-8 h-8 rounded-[var(--ds-radius-sm)] bg-[var(--ds-bg-muted)]", STAT_NARROW_TILE, CELL_STAT_TILE), children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 16, className: "text-[var(--ds-text-muted)]" }) })
5481
5490
  ] }),
5482
5491
  children && /* @__PURE__ */ jsx("div", { className: "mt-ds-3 text-xs text-[var(--ds-text-muted)]", children })
5483
5492
  ]
@@ -6163,12 +6172,12 @@ var CARD_TOGGLE = cn(
6163
6172
  );
6164
6173
  function TableHeading({ title, description, actions, titleId, descriptionId, inset }) {
6165
6174
  const heading = /* @__PURE__ */ jsx("h3", { id: titleId, className: TITLE_CLASSES, children: title });
6166
- const actionsBlock = actions ? /* @__PURE__ */ jsx("div", { className: HEADER_LAYOUT.actions, children: actions }) : null;
6175
+ const actionsBlock = actions ? /* @__PURE__ */ jsx("div", { className: cn(HEADER_LAYOUT.actions, CELL_HIDE), children: actions }) : null;
6167
6176
  const titleLeads = !actions || actionsAreBadges(actions);
6168
6177
  const leadRowRef = useRef(null);
6169
6178
  const leadFloorFits = useTitleFloorFits(leadRowRef, titleLeads);
6170
6179
  const descriptionText = (className) => description ? /* @__PURE__ */ jsx("p", { id: descriptionId, className: cn(className, "text-sm text-[var(--ds-text-muted)] break-words"), children: description }) : null;
6171
- return /* @__PURE__ */ jsx("div", { "data-table-heading": "", className: cn(inset ? "px-ds-5 py-ds-4" : "pb-ds-4"), children: !titleLeads ? /* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.row, children: [
6180
+ return /* @__PURE__ */ jsx("div", { "data-table-heading": "", className: cn(inset ? "px-ds-5 py-ds-4" : "pb-ds-4", CELL_ROOM), children: !titleLeads ? /* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.row, children: [
6172
6181
  /* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.block, children: [
6173
6182
  heading,
6174
6183
  descriptionText()
@@ -6477,7 +6486,8 @@ function Table({
6477
6486
  const preferences = useShellPreferences();
6478
6487
  const mobileBreakpoint = mobileBreakpointProp ?? preferences.tableToCardsBreakpoint ?? "md";
6479
6488
  const narrowScreen = useBreakpoint(mobileBreakpoint);
6480
- const { cards: isMobile, rootRef } = useCardsSwitch(narrowScreen, cardsBelow, title);
6489
+ const [inCell, setInCell] = useState(false);
6490
+ const { cards: isMobile, rootRef } = useCardsSwitch(narrowScreen && !inCell, inCell ? 0 : cardsBelow, title);
6481
6491
  useRevealFocus(rootRef, isMobile);
6482
6492
  useFocusKeptInList(rootRef);
6483
6493
  const [cardsEl, setCardsEl] = useState(null);
@@ -6486,6 +6496,7 @@ function Table({
6486
6496
  rootRef.current = node;
6487
6497
  if (typeof ref === "function") ref(node);
6488
6498
  else if (ref) ref.current = node;
6499
+ if (node) setInCell(node.matches(CELL_FRAME));
6489
6500
  }, [ref, rootRef]);
6490
6501
  const tableRef = useRef(null);
6491
6502
  const [pins, setPins] = useState(NO_PINS);
@@ -7323,7 +7334,7 @@ function Table({
7323
7334
  },
7324
7335
  ...fade,
7325
7336
  ...region,
7326
- className: cn("relative min-h-0 overflow-x-auto focus-visible:outline-none", title ? "rounded-b-[inherit]" : "rounded-[inherit]"),
7337
+ className: cn("relative min-h-0 overflow-x-auto focus-visible:outline-none", title ? "rounded-b-[inherit]" : "rounded-[inherit]", inCell && "scroll-p-[4px]"),
7327
7338
  children: table
7328
7339
  }
7329
7340
  )
@@ -10846,19 +10857,20 @@ function AsidePanel({
10846
10857
  }) {
10847
10858
  const collapsed = useBreakpoint(collapseBelow);
10848
10859
  const shell = useAppShell();
10860
+ const inSlot = useContext(AsideSlotContext);
10849
10861
  const navbarFloating = navbarFloatingProp ?? shell?.navbarFloating ?? false;
10850
10862
  const sidebarFloating = sidebarFloatingProp ?? shell?.sidebarFloating ?? false;
10851
- const setAsideOpen = shell?.setAsideOpen;
10852
- const setAsideFloating = shell?.setAsideFloating;
10853
10863
  const floating = position === "floating";
10854
- useEffect(() => {
10855
- setAsideOpen?.(open && !collapsed);
10856
- setAsideFloating?.(floating);
10857
- return () => {
10858
- setAsideOpen?.(false);
10859
- setAsideFloating?.(false);
10860
- };
10861
- }, [open, collapsed, floating, setAsideOpen, setAsideFloating]);
10864
+ const reportAside = shell?.reportAside;
10865
+ const close = useLatest(onClose);
10866
+ const wasOpen = useRef(false);
10867
+ useLayoutEffect(() => {
10868
+ if (!reportAside) return;
10869
+ const opened = open && !wasOpen.current;
10870
+ wasOpen.current = open;
10871
+ reportAside(close, { open, opened, page: !inSlot, docked: !collapsed, floating, side, name: labelledBy });
10872
+ return () => reportAside(close, null);
10873
+ }, [reportAside, close, open, inSlot, collapsed, floating, side, labelledBy]);
10862
10874
  if (collapsed) {
10863
10875
  return /* @__PURE__ */ jsx(
10864
10876
  Drawer,
@@ -10877,7 +10889,7 @@ function AsidePanel({
10877
10889
  }
10878
10890
  );
10879
10891
  }
10880
- return /* @__PURE__ */ jsx(
10892
+ const docked = /* @__PURE__ */ jsx(
10881
10893
  DockedColumn,
10882
10894
  {
10883
10895
  open,
@@ -10896,6 +10908,9 @@ function AsidePanel({
10896
10908
  children
10897
10909
  }
10898
10910
  );
10911
+ if (!shell || inSlot) return docked;
10912
+ const host = shell.asideHosts[side];
10913
+ return host ? createPortal(docked, host) : null;
10899
10914
  }
10900
10915
  function DockedColumn({ open, onClose, side, width, floating, navbarFloating, sidebarFloating, keepMounted, resizable, maxWidth, labelledBy, id, children, className }) {
10901
10916
  const asideRef = useRef(null);
@@ -10960,7 +10975,7 @@ function DockedColumn({ open, onClose, side, width, floating, navbarFloating, si
10960
10975
  ),
10961
10976
  style: { width: currentWidth },
10962
10977
  children: [
10963
- children,
10978
+ /* @__PURE__ */ jsx(OverlayCloseCtx, { value: null, children }),
10964
10979
  resizable && open && /* @__PURE__ */ jsx(
10965
10980
  ResizeEdge,
10966
10981
  {
@@ -15600,6 +15615,16 @@ var FLOATING_HEADER = cn(
15600
15615
  "border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]",
15601
15616
  GLASS_SURFACE
15602
15617
  );
15618
+ var HEAD_LINE = "flex flex-col @sm:flex-row flex-wrap @sm:items-center justify-between gap-ds-4";
15619
+ var HEAD_LEAD = "flex items-center gap-ds-4 min-w-0 @sm:contents";
15620
+ var HEAD_BLOCK = "min-w-0 @sm:grow @sm:max-w-max @sm:me-auto @sm:basis-[calc(var(--ds-font-size-3xl)*4.5)]";
15621
+ var MINIMAL_LINE = "flex flex-wrap items-center justify-between gap-ds-4";
15622
+ var TITLE_GROUP = "flex flex-wrap items-center gap-x-ds-2 gap-y-ds-1 min-w-0";
15623
+ var FLOOR_XL = "basis-[calc(var(--ds-font-size-xl)*4.5)]";
15624
+ var MINIMAL_LEAD = cn(TITLE_GROUP, "grow max-w-max", FLOOR_XL);
15625
+ var TITLE_KEEPS = "min-w-0 grow max-w-max";
15626
+ var FLOOR_3XL = "basis-[calc(var(--ds-font-size-3xl)*4.5)]";
15627
+ var HEAD_ACTIONS = "flex flex-wrap items-center gap-ds-2";
15603
15628
  function computeFloatingPadding(navbarFloating, sidebarFloating, overlapActive, asideFloatingSide) {
15604
15629
  return {
15605
15630
  paddingTop: navbarFloating ? 0 : "var(--ds-space-3)",
@@ -15665,7 +15690,7 @@ var PageHeader = forwardRef(function PageHeader2({
15665
15690
  }, { isHome: shell?.isHome ?? false, isMobile: shell?.isMobile ?? false, navbarFloating: shell?.navbarFloating ?? false, sidebarFloating: shell?.sidebarFloating ?? false });
15666
15691
  const { variant, behavior, position, intensity, navbarFloating, sidebarFloating } = r;
15667
15692
  const isFloating = position === "floating";
15668
- const asideFloatingSide = shell?.asideOpen && shell.asideFloating ? shell.asideSide : null;
15693
+ const asideFloatingSide = shell?.asideFloatingSide ?? null;
15669
15694
  const bcPill = r.breadcrumbStyle === "pill";
15670
15695
  const bcSep = r.breadcrumbSeparator;
15671
15696
  const contentMaxWidth = contentMaxWidthProp ?? container?.contentMaxWidth;
@@ -15868,23 +15893,20 @@ function DefaultHeader({
15868
15893
  /* @__PURE__ */ jsxs("div", { className: inner.className, style: inner.style, children: [
15869
15894
  focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
15870
15895
  hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
15871
- /* @__PURE__ */ jsxs("div", { className: cn(
15872
- "flex flex-col @sm:flex-row @sm:items-center justify-between gap-ds-4",
15873
- hasBreadcrumbs && "mt-ds-1"
15874
- ), children: [
15875
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
15896
+ /* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
15897
+ /* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
15876
15898
  onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
15877
15899
  avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
15878
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
15900
+ /* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
15879
15901
  caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
15880
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2", children: [
15881
- /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
15902
+ /* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
15903
+ /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_3XL, "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
15882
15904
  badge
15883
15905
  ] }),
15884
15906
  description && /* @__PURE__ */ jsx(ClampedText, { className: "mt-ds-1 text-sm text-[var(--ds-text-secondary)]", children: description })
15885
15907
  ] })
15886
15908
  ] }),
15887
- actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions })
15909
+ actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
15888
15910
  ] }),
15889
15911
  filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", children: filters }),
15890
15912
  tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", children: tabs })
@@ -15915,12 +15937,12 @@ function MinimalHeader({
15915
15937
  focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
15916
15938
  hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
15917
15939
  caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
15918
- /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between gap-ds-4", hasBreadcrumbs && "mt-ds-0.5"), children: [
15919
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2 min-w-0", children: [
15920
- /* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: 1, className: "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
15940
+ /* @__PURE__ */ jsxs("div", { className: cn(MINIMAL_LINE, hasBreadcrumbs && "mt-ds-0.5"), children: [
15941
+ /* @__PURE__ */ jsxs("div", { className: MINIMAL_LEAD, children: [
15942
+ /* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: 1, className: cn(TITLE_KEEPS, FLOOR_XL, "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
15921
15943
  badge
15922
15944
  ] }),
15923
- actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions }) })
15945
+ actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) })
15924
15946
  ] }),
15925
15947
  tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-3 -mx-ds-1", children: tabs })
15926
15948
  ] }) });
@@ -16005,17 +16027,16 @@ function ColourfulHeader({
16005
16027
  children: [
16006
16028
  focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack, onLight: isBold }),
16007
16029
  hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, onLight: isBold, onTint: !isBold, pill: breadcrumbPill, separator: breadcrumbSeparator }),
16008
- /* @__PURE__ */ jsxs("div", { className: cn(
16009
- "flex flex-col @sm:flex-row @sm:items-center justify-between gap-ds-4",
16010
- hasBreadcrumbs && "mt-ds-1"
16011
- ), children: [
16012
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
16030
+ /* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
16031
+ /* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
16013
16032
  onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack, onLight: isBold }),
16014
16033
  avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
16015
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
16034
+ /* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
16016
16035
  caption && /* @__PURE__ */ jsx(Caption, { onLight: isBold, onTint: !isBold, children: caption }),
16017
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2", children: [
16036
+ /* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
16018
16037
  /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(
16038
+ TITLE_KEEPS,
16039
+ FLOOR_3XL,
16019
16040
  "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)]",
16020
16041
  isBold ? "text-[var(--ds-text-on-primary)]" : "text-[var(--ds-text-primary)]"
16021
16042
  ), children: title }),
@@ -16027,7 +16048,7 @@ function ColourfulHeader({
16027
16048
  ), children: description })
16028
16049
  ] })
16029
16050
  ] }),
16030
- actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions })
16051
+ actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
16031
16052
  ] }),
16032
16053
  filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", onBand: isBold, children: filters }),
16033
16054
  tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", onBand: isBold, children: tabs })
@@ -16227,12 +16248,12 @@ function SnappingHeader({
16227
16248
  focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
16228
16249
  hasBreadcrumbs && !hideExpandedBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
16229
16250
  caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
16230
- /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between gap-ds-4", hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-0.5"), children: [
16231
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2 min-w-0", children: [
16232
- /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
16251
+ /* @__PURE__ */ jsxs("div", { className: cn(MINIMAL_LINE, hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-0.5"), children: [
16252
+ /* @__PURE__ */ jsxs("div", { className: MINIMAL_LEAD, children: [
16253
+ /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_XL, "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
16233
16254
  badge
16234
16255
  ] }),
16235
- actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions }) })
16256
+ actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) })
16236
16257
  ] }),
16237
16258
  filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-3", children: filters }),
16238
16259
  expandedContent && /* @__PURE__ */ jsx("div", { className: "mt-ds-3", children: expandedContent }),
@@ -16255,40 +16276,41 @@ function SnappingHeader({
16255
16276
  !collapsed && focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack, onLight }),
16256
16277
  !collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, onLight, onTint, pill: breadcrumbPill, separator: breadcrumbSeparator }),
16257
16278
  /* @__PURE__ */ jsxs("div", { className: cn(
16258
- "flex justify-between gap-ds-4",
16259
- collapsed ? "items-center" : "flex-col @sm:flex-row @sm:items-center",
16260
- !collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-1",
16261
- collapsed && "w-full"
16279
+ collapsed ? cn(MINIMAL_LINE, "w-full") : HEAD_LINE,
16280
+ !collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-1"
16262
16281
  ), children: [
16263
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
16282
+ /* @__PURE__ */ jsxs("div", { className: collapsed ? "contents" : HEAD_LEAD, children: [
16264
16283
  onBack && !collapsed && /* @__PURE__ */ jsx(BackButton, { onClick: onBack, onLight }),
16265
16284
  avatar && !collapsed && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
16266
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
16285
+ collapsed && hasBreadcrumbs && (() => {
16286
+ const lastCrumb = breadcrumbs[breadcrumbs.length - 1];
16287
+ const isClickable = !!lastCrumb && crumbGoes(lastCrumb);
16288
+ const Tag3 = isClickable ? "a" : "span";
16289
+ return /* @__PURE__ */ jsxs(
16290
+ Tag3,
16291
+ {
16292
+ ...isClickable ? {
16293
+ href: lastCrumb.href ?? "#",
16294
+ onClick: (e) => followCrumb(e, lastCrumb)
16295
+ } : {},
16296
+ className: cn(
16297
+ // the title's group's gap from it, not the line's
16298
+ "text-sm hidden @sm:inline-flex items-center gap-ds-1 -me-ds-2",
16299
+ isClickable ? cn("text-[var(--ds-text-secondary)] hover:text-[var(--ds-text-primary)] transition-colors duration-[var(--ds-transition-speed)] cursor-pointer", FOCUS_RING) : "text-[var(--ds-text-secondary)]"
16300
+ ),
16301
+ children: [
16302
+ lastCrumb?.label,
16303
+ breadcrumbSeparator === "slash" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "/" }) : breadcrumbSeparator === "dot" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\xB7" }) : breadcrumbSeparator === "arrow" ? /* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: 12 }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12 })
16304
+ ]
16305
+ }
16306
+ );
16307
+ })(),
16308
+ /* @__PURE__ */ jsxs("div", { className: collapsed ? cn("min-w-0 grow max-w-max me-auto", TITLE_FLOOR) : HEAD_BLOCK, children: [
16267
16309
  !collapsed && caption && /* @__PURE__ */ jsx(Caption, { onLight, onTint, children: caption }),
16268
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2", children: [
16269
- collapsed && hasBreadcrumbs && (() => {
16270
- const lastCrumb = breadcrumbs[breadcrumbs.length - 1];
16271
- const isClickable = !!lastCrumb && crumbGoes(lastCrumb);
16272
- const Tag3 = isClickable ? "a" : "span";
16273
- return /* @__PURE__ */ jsxs(
16274
- Tag3,
16275
- {
16276
- ...isClickable ? {
16277
- href: lastCrumb.href ?? "#",
16278
- onClick: (e) => followCrumb(e, lastCrumb)
16279
- } : {},
16280
- className: cn(
16281
- "text-sm hidden @sm:inline-flex items-center gap-ds-1",
16282
- isClickable ? cn("text-[var(--ds-text-secondary)] hover:text-[var(--ds-text-primary)] transition-colors duration-[var(--ds-transition-speed)] cursor-pointer", FOCUS_RING) : "text-[var(--ds-text-secondary)]"
16283
- ),
16284
- children: [
16285
- lastCrumb?.label,
16286
- breadcrumbSeparator === "slash" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "/" }) : breadcrumbSeparator === "dot" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\xB7" }) : breadcrumbSeparator === "arrow" ? /* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: 12 }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12 })
16287
- ]
16288
- }
16289
- );
16290
- })(),
16310
+ /* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
16291
16311
  /* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: collapsed ? 1 : void 0, className: cn(
16312
+ TITLE_KEEPS,
16313
+ collapsed ? TITLE_FLOOR : FLOOR_3XL,
16292
16314
  "font-[family-name:var(--ds-font-display)] font-[var(--ds-weight-heading)]",
16293
16315
  collapsed ? "text-lg text-[var(--ds-text-primary)]" : cn("text-3xl", onLight ? "text-[var(--ds-text-on-primary)]" : "text-[var(--ds-text-primary)]")
16294
16316
  ), children: title }),
@@ -16300,7 +16322,7 @@ function SnappingHeader({
16300
16322
  ), children: description })
16301
16323
  ] })
16302
16324
  ] }),
16303
- actions && (collapsed ? /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions }) }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions }))
16325
+ actions && (collapsed ? /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) }) : /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }))
16304
16326
  ] }),
16305
16327
  !collapsed && filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", onBand: isBoldColourful, children: filters }),
16306
16328
  !collapsed && expandedContent && /* @__PURE__ */ jsx("div", { className: "mt-ds-4", children: expandedContent }),
@@ -16373,23 +16395,20 @@ function TabsIntegratedHeader({
16373
16395
  return /* @__PURE__ */ jsx("header", { "data-gs": "page-header", ref: headerRef, className: cn(hasBreadcrumbs ? "pt-ds-3" : "pt-ds-6", "pb-ds-6", isFloating && cn(FLOATING_HEADER, "overflow-hidden"), className), children: /* @__PURE__ */ jsxs("div", { className: inner.className, style: inner.style, children: [
16374
16396
  focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
16375
16397
  hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
16376
- /* @__PURE__ */ jsxs("div", { className: cn(
16377
- "flex flex-col @sm:flex-row @sm:items-center justify-between gap-ds-4",
16378
- hasBreadcrumbs && "mt-ds-1"
16379
- ), children: [
16380
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
16398
+ /* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
16399
+ /* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
16381
16400
  onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
16382
16401
  avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
16383
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
16402
+ /* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
16384
16403
  caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
16385
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-2", children: [
16386
- /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
16404
+ /* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
16405
+ /* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_3XL, "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
16387
16406
  badge
16388
16407
  ] }),
16389
16408
  description && /* @__PURE__ */ jsx(ClampedText, { className: "mt-ds-1 text-sm text-[var(--ds-text-secondary)]", children: description })
16390
16409
  ] })
16391
16410
  ] }),
16392
- actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-ds-2 shrink-0", children: actions })
16411
+ actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
16393
16412
  ] }),
16394
16413
  tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", children: tabs })
16395
16414
  ] }) });
@@ -18634,7 +18653,50 @@ function DangerZone({ title = "Danger zone", description, children, className })
18634
18653
  )
18635
18654
  ] });
18636
18655
  }
18656
+ var byte = (n) => n.toString(16).padStart(2, "0");
18657
+ function readColours(el, names) {
18658
+ const doc = el.ownerDocument;
18659
+ const style = getComputedStyle(el);
18660
+ const probe = el.appendChild(doc.createElement("span"));
18661
+ const ctx = doc.createElement("canvas").getContext("2d", { willReadFrequently: true });
18662
+ const out = {};
18663
+ for (const name of names) {
18664
+ const raw = style.getPropertyValue(name).trim();
18665
+ if (!ctx || !raw || !CSS.supports("color", raw)) {
18666
+ out[name] = "#00000000";
18667
+ continue;
18668
+ }
18669
+ probe.style.color = `var(${name})`;
18670
+ const computed = getComputedStyle(probe).color;
18671
+ const see = /^rgba|\s\//.test(computed) ? /[,/]\s*([\d.]+)(%?)\s*\)$/.exec(computed) : null;
18672
+ const alpha = see ? +see[1] / (see[2] ? 100 : 1) : 1;
18673
+ ctx.clearRect(0, 0, 1, 1);
18674
+ ctx.fillStyle = see ? `${computed.slice(0, see.index)})` : computed;
18675
+ ctx.fillRect(0, 0, 1, 1);
18676
+ const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data;
18677
+ out[name] = `#${byte(r)}${byte(g)}${byte(b)}${alpha < 1 ? byte(Math.round(alpha * 255)) : ""}`;
18678
+ }
18679
+ probe.remove();
18680
+ return out;
18681
+ }
18682
+ function useThemeColors(ref, names) {
18683
+ const key = names.join(" ");
18684
+ const [colours, setColours] = useState(null);
18685
+ useLayoutEffect(() => {
18686
+ const el = ref.current;
18687
+ if (!el || !key || typeof CSS === "undefined") return;
18688
+ const read = () => {
18689
+ const next = readColours(el, key.split(" "));
18690
+ setColours((was) => JSON.stringify(was) === JSON.stringify(next) ? was : next);
18691
+ };
18692
+ read();
18693
+ const watch = new MutationObserver(read);
18694
+ watch.observe(el.ownerDocument.documentElement, { attributes: true, attributeFilter: ["data-mode"], subtree: true });
18695
+ return () => watch.disconnect();
18696
+ }, [ref, key]);
18697
+ return colours;
18698
+ }
18637
18699
 
18638
- export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, Alert, AsidePanel, AvatarGroup, BottomNav, BulkActionBar, Calendar, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, ChatMessageList, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, CommandPalette, ContextMenu, CornerPanel, DEFAULT_DATE_RANGE_PRESETS, DangerZone, DataList, DateRangePicker, DescriptionList, Dialog, Dock, EmptyState, EntityCell, FileUpload, FlowSaved, FormWrapper, Gantt, Kbd, Launcher, LocaleProvider, MentionInput, MobileHeaderMenu, NavItem, NavMenu, Navbar, NotificationCenter, PageActions, PageContainer, PageHeader, PinInput, Progress, RadioGroup, Rating, RecurrencePicker, RecurrenceScopeDialog, RelativeTime, ScrollArea, SectionHeading, SettingsLayout, Sheet, Sidebar, SidebarNav, SliderRange, StackedList, StatsCard, StatusDot, Stepper, TIME_ZOOMS, Table, TableToolbar, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, TimeBar, TimePicker, TimeRow, TimeScaleHeader, TimeViewport, Timeline, TimezoneSelect, Toast, ToastProvider, Tour, TransferList, TreeView, browserTimeZone, canonicalTimeZone, countEdited, dateOfDay, dayOf, deleteOccurrence, describeRecurrence, endDayOf, fitLabel, fitLabels, formatDateRange, nthOf, occurrenceOn, occurrences, parseRRule, readFlowProgress, readRecurrence, recurrencePresets, sameRecurrence, saveOccurrence, timeExtent, timeZoneOffset, toRRule, useBrowserTimeZone, useContentWidth, useDestructiveAction, useFittedLabels, useFlowSteps, useRelativeTimeFormat, useSidebar, useTextMeasure, useTimeScale, useTimeViewport, useTimeViewportLayout, useToast, useToastOptional };
18700
+ export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, Alert, AsidePanel, AvatarGroup, BottomNav, BulkActionBar, Calendar, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, ChatMessageList, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, CommandPalette, ContextMenu, CornerPanel, DEFAULT_DATE_RANGE_PRESETS, DangerZone, DataList, DateRangePicker, DescriptionList, Dialog, Dock, EmptyState, EntityCell, FileUpload, FlowSaved, FormWrapper, Gantt, Kbd, Launcher, LocaleProvider, MentionInput, MobileHeaderMenu, NavItem, NavMenu, Navbar, NotificationCenter, PageActions, PageContainer, PageHeader, PinInput, Progress, RadioGroup, Rating, RecurrencePicker, RecurrenceScopeDialog, RelativeTime, ScrollArea, SectionHeading, SettingsLayout, Sheet, Sidebar, SidebarNav, SliderRange, StackedList, StatsCard, StatusDot, Stepper, TIME_ZOOMS, Table, TableToolbar, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, TimeBar, TimePicker, TimeRow, TimeScaleHeader, TimeViewport, Timeline, TimezoneSelect, Toast, ToastProvider, Tour, TransferList, TreeView, browserTimeZone, canonicalTimeZone, countEdited, dateOfDay, dayOf, deleteOccurrence, describeRecurrence, endDayOf, fitLabel, fitLabels, formatDateRange, nthOf, occurrenceOn, occurrences, parseRRule, readFlowProgress, readRecurrence, recurrencePresets, sameRecurrence, saveOccurrence, timeExtent, timeZoneOffset, toRRule, useBrowserTimeZone, useContentWidth, useDestructiveAction, useFittedLabels, useFlowSteps, useRelativeTimeFormat, useSidebar, useTextMeasure, useThemeColors, useTimeScale, useTimeViewport, useTimeViewportLayout, useToast, useToastOptional };
18639
18701
  //# sourceMappingURL=index.js.map
18640
18702
  //# sourceMappingURL=index.js.map