gridsmith-ui 0.29.0 → 0.29.1

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 (58) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/charts.d.ts +5 -0
  3. package/dist/charts.js +2 -2
  4. package/dist/charts.js.map +1 -1
  5. package/dist/chat.js +5 -5
  6. package/dist/{chunk-GXMTS3YD.js → chunk-37WOC7F7.js} +29 -12
  7. package/dist/chunk-37WOC7F7.js.map +1 -0
  8. package/dist/{chunk-OPFJEL3Z.js → chunk-4TUJXDRU.js} +96 -15
  9. package/dist/chunk-4TUJXDRU.js.map +1 -0
  10. package/dist/{chunk-EIWXVICU.js → chunk-6A5RHW2W.js} +3 -3
  11. package/dist/{chunk-EIWXVICU.js.map → chunk-6A5RHW2W.js.map} +1 -1
  12. package/dist/{chunk-XVB55M3N.js → chunk-72SDAX54.js} +2 -2
  13. package/dist/chunk-72SDAX54.js.map +1 -0
  14. package/dist/{chunk-YUTF2X6B.js → chunk-FUKSLQ77.js} +8 -8
  15. package/dist/{chunk-YUTF2X6B.js.map → chunk-FUKSLQ77.js.map} +1 -1
  16. package/dist/{chunk-DQCHCLEJ.js → chunk-I3MTQ3CS.js} +5 -5
  17. package/dist/{chunk-DQCHCLEJ.js.map → chunk-I3MTQ3CS.js.map} +1 -1
  18. package/dist/{chunk-66JJCQU3.js → chunk-JTU7OBYJ.js} +5 -3
  19. package/dist/chunk-JTU7OBYJ.js.map +1 -0
  20. package/dist/{chunk-2ROVDVLZ.js → chunk-MFAWJSMJ.js} +3 -3
  21. package/dist/{chunk-2ROVDVLZ.js.map → chunk-MFAWJSMJ.js.map} +1 -1
  22. package/dist/{chunk-TJEV7YAY.js → chunk-MKFWHWBK.js} +2 -2
  23. package/dist/{chunk-TJEV7YAY.js.map → chunk-MKFWHWBK.js.map} +1 -1
  24. package/dist/{chunk-BRAXJEEP.js → chunk-QNHVPE2B.js} +4 -4
  25. package/dist/{chunk-BRAXJEEP.js.map → chunk-QNHVPE2B.js.map} +1 -1
  26. package/dist/{chunk-TRDXWHD2.js → chunk-RECCCA7Z.js} +6 -6
  27. package/dist/chunk-RECCCA7Z.js.map +1 -0
  28. package/dist/{chunk-R4GXKH4U.js → chunk-RJEUQ7RL.js} +10 -8
  29. package/dist/chunk-RJEUQ7RL.js.map +1 -0
  30. package/dist/{chunk-CRQ6KCRD.js → chunk-ZHUVLBCC.js} +7 -4
  31. package/dist/chunk-ZHUVLBCC.js.map +1 -0
  32. package/dist/data-grid.d.ts +2 -2
  33. package/dist/data-grid.js +9 -9
  34. package/dist/data-grid.js.map +1 -1
  35. package/dist/editor-mentions.js +2 -2
  36. package/dist/editor.js +4 -4
  37. package/dist/icons.d.ts +9 -0
  38. package/dist/icons.js +1 -1
  39. package/dist/index.d.ts +38 -13
  40. package/dist/index.js +135 -148
  41. package/dist/index.js.map +1 -1
  42. package/dist/kanban.js +6 -6
  43. package/dist/kanban.js.map +1 -1
  44. package/dist/resizable.js +7 -7
  45. package/dist/roots.css +2 -0
  46. package/dist/{table-utils-BkjNEWts.d.ts → table-utils-CxnpFHRF.d.ts} +5 -4
  47. package/dist/{use-pagination-BxcRlNQG.d.ts → use-pagination-QykGSREv.d.ts} +7 -0
  48. package/dist/utils.js.map +1 -1
  49. package/dist/virtualized.d.ts +1 -1
  50. package/dist/virtualized.js +6 -6
  51. package/package.json +1 -1
  52. package/dist/chunk-66JJCQU3.js.map +0 -1
  53. package/dist/chunk-CRQ6KCRD.js.map +0 -1
  54. package/dist/chunk-GXMTS3YD.js.map +0 -1
  55. package/dist/chunk-OPFJEL3Z.js.map +0 -1
  56. package/dist/chunk-R4GXKH4U.js.map +0 -1
  57. package/dist/chunk-TRDXWHD2.js.map +0 -1
  58. package/dist/chunk-XVB55M3N.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,40 +1,40 @@
1
1
  "use client";
2
- import { useAppShell, REACT_VERSION_PROBLEM, Breadcrumbs, useCrumbFollow, crumbGoes, useOverlayMark, useDirtyGuard, useScrollbarInset, DrawerFooterCtx, OverlayMarkScope, OverlayCloseCtx, insetLessScrollbar, DiscardConfirm, OVERLAY_ROOT_ATTR, OverlayMarkCtx, useCompact, useElementWidth, DrawerPanel, useCloseSettle, Drawer, useRememberedWidth, pxOf, ResizeEdge, defaultMaxWidth } from './chunk-OPFJEL3Z.js';
3
- export { AppShell, Breadcrumbs, Drawer, SkipLink, useAppShell, useUnsavedChanges } from './chunk-OPFJEL3Z.js';
4
- import { Skeleton, TITLE_TEXT, useFormatLocale, useHydrated, useToday, LocaleContext } from './chunk-2ROVDVLZ.js';
5
- export { Skeleton, useFormatLocale, useHydrated } from './chunk-2ROVDVLZ.js';
2
+ import { useAppShell, REACT_VERSION_PROBLEM, Breadcrumbs, useCrumbFollow, crumbGoes, useCornerInset, NAVBAR_INSET_PRIORITY, useOverlayMark, useDirtyGuard, useScrollbarInset, DrawerFooterCtx, OverlayMarkScope, OverlayCloseCtx, insetLessScrollbar, DiscardConfirm, OVERLAY_ROOT_ATTR, OverlayMarkCtx, useCompact, useElementWidth, DrawerPanel, useCloseSettle, besideRoom, PANEL_INSET_PRIORITY, Drawer, useRememberedWidth, pxOf, ResizeEdge, LAUNCHER_INSET_PRIORITY, defaultMaxWidth } from './chunk-4TUJXDRU.js';
3
+ export { AppShell, Breadcrumbs, Drawer, SkipLink, useAppShell, useUnsavedChanges } from './chunk-4TUJXDRU.js';
4
+ import { Skeleton, TITLE_TEXT, useFormatLocale, useHydrated, useToday, LocaleContext } from './chunk-MFAWJSMJ.js';
5
+ export { Skeleton, useFormatLocale, useHydrated } from './chunk-MFAWJSMJ.js';
6
6
  import { useScrollEdges, EDGE_FADE } from './chunk-3BRQRKDO.js';
7
- import { Avatar, foldForSearch, useActiveOptionInView, shownMentions, matchMentions, mentionOptionId, MentionList, initialsOf } from './chunk-EIWXVICU.js';
8
- export { Avatar } from './chunk-EIWXVICU.js';
9
- import { Link } from './chunk-DQCHCLEJ.js';
10
- export { CodeBlock, Divider, Link } from './chunk-DQCHCLEJ.js';
7
+ import { Avatar, foldForSearch, useActiveOptionInView, shownMentions, matchMentions, mentionOptionId, MentionList, initialsOf } from './chunk-6A5RHW2W.js';
8
+ export { Avatar } from './chunk-6A5RHW2W.js';
9
+ import { Link } from './chunk-I3MTQ3CS.js';
10
+ export { CodeBlock, Divider, Link } from './chunk-I3MTQ3CS.js';
11
11
  import { useFillHeight, FillContext, useKeyboardScroll } from './chunk-FD4YED7O.js';
12
- import { Badge } from './chunk-TRDXWHD2.js';
13
- export { Badge } from './chunk-TRDXWHD2.js';
14
- import { inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, CardValue } from './chunk-BRAXJEEP.js';
15
- import { useWholeListCheck, pagerPart, Pagination, Input, CHECK_FILL, Dropdown, FilterRowContext, SWITCH_KNOB_ON, SWITCH_KNOB_OFF, SWITCH_KNOB_MOTION, SWITCH_TRACK_ON, SWITCH_TRACK_OFF, useFieldControl, useField, OutsideField, NumberInput, InlineFieldError, Label, AddAnotherRowCtx, Field } from './chunk-YUTF2X6B.js';
16
- export { Dropdown, Field, InlineFieldError, Input, Label, NumberInput, Pagination, Popover, Textarea, Toggle, usePagination } from './chunk-YUTF2X6B.js';
17
- import { Button, ControlSizeContext, triggerType, Spinner, useShellPreferences, PREFERENCE_HOUSE_DEFAULTS, formatRelativeTime, thresholdOf, toMillis, formatFullTime, preferenceActionKey, DAY, HOUR, MINUTE } from './chunk-R4GXKH4U.js';
18
- export { Button, ButtonSizeContext, ControlSizeContext, PreferencesContext, Spinner, formatFullTime, formatRelativeTime, preferenceActionKey, usePreferences } from './chunk-R4GXKH4U.js';
12
+ import { Badge } from './chunk-RECCCA7Z.js';
13
+ export { Badge } from './chunk-RECCCA7Z.js';
14
+ import { inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, CardValue } from './chunk-QNHVPE2B.js';
15
+ import { useWholeListCheck, pagerPart, Pagination, Input, CHECK_FILL, Dropdown, FilterRowContext, SWITCH_KNOB_ON, SWITCH_KNOB_OFF, SWITCH_KNOB_MOTION, SWITCH_TRACK_ON, SWITCH_TRACK_OFF, useFieldControl, useField, OutsideField, NumberInput, InlineFieldError, Label, AddAnotherRowCtx, Field } from './chunk-FUKSLQ77.js';
16
+ export { Dropdown, Field, InlineFieldError, Input, Label, NumberInput, Pagination, Popover, Textarea, Toggle, usePagination } from './chunk-FUKSLQ77.js';
17
+ import { Button, ControlSizeContext, triggerType, Spinner, useShellPreferences, PREFERENCE_HOUSE_DEFAULTS, formatRelativeTime, thresholdOf, toMillis, formatFullTime, preferenceActionKey, DAY, HOUR, MINUTE } from './chunk-RJEUQ7RL.js';
18
+ export { Button, ButtonSizeContext, ControlSizeContext, PreferencesContext, Spinner, formatFullTime, formatRelativeTime, preferenceActionKey, usePreferences } from './chunk-RJEUQ7RL.js';
19
19
  import { elementType, formatLocale, localeChoice } from './chunk-OYNUU346.js';
20
20
  import { useInputModality } from './chunk-7RKC5C7G.js';
21
21
  export { INPUT_MODALITY_ATTR, inputModality, installInputModality, useInputModality } from './chunk-7RKC5C7G.js';
22
- import { useBreakpoint, readBreakpointPx } from './chunk-CRQ6KCRD.js';
23
- export { BreakpointWidthProvider, useBreakpoint } from './chunk-CRQ6KCRD.js';
24
- import { FormChangeCtx, useReportedChange, useOptionalFormContext, FormCtx } from './chunk-XVB55M3N.js';
25
- export { useFormContext } from './chunk-XVB55M3N.js';
22
+ import { useBreakpoint, readBreakpointPx } from './chunk-ZHUVLBCC.js';
23
+ export { BreakpointWidthProvider, useBreakpoint } from './chunk-ZHUVLBCC.js';
24
+ import { FormChangeCtx, useReportedChange, useOptionalFormContext, FormCtx } from './chunk-72SDAX54.js';
25
+ export { useFormContext } from './chunk-72SDAX54.js';
26
26
  import { CardSurfaceCtx, useScrollsInside, SplitPaneCtx, RowsCtx, PageActionsCtx, SurfaceBoundary, useFramesItself, TableCardCtx } from './chunk-QM4SJKWV.js';
27
27
  import { useRevealFocus } from './chunk-HTXP5BMM.js';
28
28
  export { useRevealFocus } from './chunk-HTXP5BMM.js';
29
29
  import { FOCUSABLE, usePopupFocus, FIELD, ZOOM_KEYS, useOverlayLayer, useFocusTrap, useFocusBeforeOpen, rememberFocus, focusInitial, OVERLAY_CLOSE_ATTR, rovingTabStop, useGridKeyboard, focusAfterRemoval, useNonModalDialog, useReturnFocus } from './chunk-ZI3OQDET.js';
30
30
  export { useGridKeyboard } from './chunk-ZI3OQDET.js';
31
- import { useTextOverflow, Tooltip } from './chunk-GXMTS3YD.js';
32
- export { Tooltip, useTextOverflow } from './chunk-GXMTS3YD.js';
31
+ import { useTextOverflow, AutoTooltip } from './chunk-37WOC7F7.js';
32
+ export { Tooltip, useTextOverflow } from './chunk-37WOC7F7.js';
33
33
  import { mergeRefs, Slot } from './chunk-7Q46JXSK.js';
34
- import { Icon, slotIcon, warnOnce } from './chunk-TJEV7YAY.js';
34
+ import { Icon, slotIcon, warnOnce } from './chunk-MKFWHWBK.js';
35
35
  import { usePosition } from './chunk-HP7WUZPK.js';
36
36
  import { useLatest } from './chunk-WH2FUFAC.js';
37
- import { cn, FOCUS_RING, GLASS_SURFACE, FOCUS_INSET, PEER_FOCUS_RING, GLASS_BACKDROP, GLASS_DROPDOWN, lockBodyScroll, unlockBodyScroll, OVERLAY_SURFACE, GLASS_OVERLAY, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING, GROUP_FOCUS_RING, ERROR_ACTIVE_RING, ACTIVE_RING, ERROR_FOCUS_WITHIN_RING, FIELD_FOCUS_WITHIN_RING, ERROR_FOCUS_RING, FIELD_FOCUS_RING } from './chunk-66JJCQU3.js';
37
+ import { cn, FOCUS_RING, GLASS_SURFACE, FOCUS_INSET, PEER_FOCUS_RING, GLASS_BACKDROP, GLASS_DROPDOWN, lockBodyScroll, unlockBodyScroll, OVERLAY_SURFACE, GLASS_OVERLAY, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING, GROUP_FOCUS_RING, ERROR_ACTIVE_RING, ACTIVE_RING, ERROR_FOCUS_WITHIN_RING, FIELD_FOCUS_WITHIN_RING, ERROR_FOCUS_RING, FIELD_FOCUS_RING, atLeastFocusRoom, FOCUS_ROOM } from './chunk-JTU7OBYJ.js';
38
38
  import { createContext, forwardRef, useState, useRef, useCallback, useLayoutEffect, useMemo, useContext, isValidElement, useId, memo, useImperativeHandle, useEffect, Children, Fragment as Fragment$1, cloneElement, useSyncExternalStore } from 'react';
39
39
  import { createPortal, flushSync } from 'react-dom';
40
40
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -465,7 +465,7 @@ function Combobox({ value, onChange: onChangeProp, options, placeholder = "Searc
465
465
  container ?? document.body
466
466
  )
467
467
  ] });
468
- return /* @__PURE__ */ jsx(Tooltip, { content: selectedLabel, disabled: !labelTruncated || open, children: triggerContent });
468
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: selectedLabel, disabled: !labelTruncated || open, children: triggerContent });
469
469
  }
470
470
 
471
471
  // ../../showcase/src/lib/locale-cache.ts
@@ -619,7 +619,7 @@ function RelativeTimeAt({ at, hours, className }) {
619
619
  return () => clearTimeout(timer);
620
620
  }, [at, now, hours]);
621
621
  const full = formatFullTime(at, locale);
622
- return /* @__PURE__ */ jsx(Tooltip, { content: full, ref: placed, children: /* @__PURE__ */ jsxs(
622
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: full, ref: placed, children: /* @__PURE__ */ jsxs(
623
623
  "time",
624
624
  {
625
625
  tabIndex: inRows || inControl ? void 0 : 0,
@@ -3100,7 +3100,7 @@ function TruncFileName({ children, className }) {
3100
3100
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
3101
3101
  const el = /* @__PURE__ */ jsx("p", { ref, className: cn("truncate", className), children });
3102
3102
  if (!isTruncated) return el;
3103
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
3103
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
3104
3104
  }
3105
3105
  var PARALLEL = 3;
3106
3106
  function formatSize(bytes) {
@@ -4119,7 +4119,7 @@ var Tag = forwardRef(function Tag2({
4119
4119
  }
4120
4120
  );
4121
4121
  if (isTruncated) {
4122
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: tag });
4122
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: tag });
4123
4123
  }
4124
4124
  return tag;
4125
4125
  });
@@ -6057,7 +6057,7 @@ var CardTitle = forwardRef(function CardTitle2({ className, children, lines: lin
6057
6057
  ) : children
6058
6058
  }
6059
6059
  );
6060
- return /* @__PURE__ */ jsx(Tooltip, { content: children, disabled: !isTruncated, children: heading });
6060
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, disabled: !isTruncated, children: heading });
6061
6061
  });
6062
6062
  var CardDescription = forwardRef(function CardDescription2({ className, children, lines = 2, ...props }, forwardedRef) {
6063
6063
  const { ref: overflowRef, isTruncated } = useTextOverflow({ lines, disabled: lines === 0 });
@@ -6075,7 +6075,7 @@ var CardDescription = forwardRef(function CardDescription2({ className, children
6075
6075
  children
6076
6076
  }
6077
6077
  );
6078
- return /* @__PURE__ */ jsx(Tooltip, { content: children, disabled: !isTruncated, children: el });
6078
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, disabled: !isTruncated, children: el });
6079
6079
  });
6080
6080
  var CardContent = forwardRef(function CardContent2({ className, children, ...props }, ref) {
6081
6081
  return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 px-ds-5 py-ds-4", className), ...props, children });
@@ -6090,7 +6090,7 @@ function TruncLabel({ children }) {
6090
6090
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
6091
6091
  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 });
6092
6092
  if (!isTruncated) return el;
6093
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
6093
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
6094
6094
  }
6095
6095
  function StatsCard({ value, label, trend, icon, layout = "card", interactive, onClick, children, className }) {
6096
6096
  if (layout === "inline") {
@@ -6173,7 +6173,7 @@ function TrendBadge({ trend }) {
6173
6173
  }
6174
6174
  );
6175
6175
  if (!isTruncated) return badge;
6176
- return /* @__PURE__ */ jsx(Tooltip, { content: trend.value, children: badge });
6176
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: trend.value, children: badge });
6177
6177
  }
6178
6178
  function DataList({ items, columns = 1, className }) {
6179
6179
  return /* @__PURE__ */ jsx(
@@ -6344,7 +6344,7 @@ var DescriptionList = forwardRef(function DescriptionList2({
6344
6344
  ),
6345
6345
  children: [
6346
6346
  item.icon && /* @__PURE__ */ jsx(Icon, { name: item.icon, size: s.iconSize, className: "shrink-0" }),
6347
- item.tooltip ? /* @__PURE__ */ jsx(Tooltip, { content: item.tooltip, children: /* @__PURE__ */ jsx("span", { className: "cursor-help border-b-[length:var(--ds-border-width)] border-dashed border-[var(--ds-border-default)]", children: item.label }) }) : item.label
6347
+ item.tooltip ? /* @__PURE__ */ jsx(AutoTooltip, { content: item.tooltip, children: /* @__PURE__ */ jsx("span", { className: "cursor-help border-b-[length:var(--ds-border-width)] border-dashed border-[var(--ds-border-default)]", children: item.label }) }) : item.label
6348
6348
  ]
6349
6349
  }
6350
6350
  ),
@@ -6389,7 +6389,7 @@ var DescriptionList = forwardRef(function DescriptionList2({
6389
6389
  ),
6390
6390
  children: [
6391
6391
  item.icon && /* @__PURE__ */ jsx(Icon, { name: item.icon, size: s.iconSize, className: "shrink-0" }),
6392
- item.tooltip ? /* @__PURE__ */ jsx(Tooltip, { content: item.tooltip, children: /* @__PURE__ */ jsx("span", { className: "cursor-help border-b-[length:var(--ds-border-width)] border-dashed border-[var(--ds-border-default)]", children: item.label }) }) : item.label
6392
+ item.tooltip ? /* @__PURE__ */ jsx(AutoTooltip, { content: item.tooltip, children: /* @__PURE__ */ jsx("span", { className: "cursor-help border-b-[length:var(--ds-border-width)] border-dashed border-[var(--ds-border-default)]", children: item.label }) }) : item.label
6393
6393
  ]
6394
6394
  }
6395
6395
  ),
@@ -6579,7 +6579,7 @@ function TruncCell({ children, lines }) {
6579
6579
  const clampClass = lines === 1 ? "truncate" : `line-clamp-${lines}`;
6580
6580
  const cell = /* @__PURE__ */ jsx("span", { ref, className: cn(clampClass, "block"), children });
6581
6581
  if (!isTruncated) return cell;
6582
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: cell });
6582
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: cell });
6583
6583
  }
6584
6584
  var TITLE_CLASSES = TITLE_TEXT;
6585
6585
  var FRAME_CLASSES = cn(
@@ -7630,7 +7630,12 @@ var NEUTRAL = {
7630
7630
  text: "var(--ds-text-primary)",
7631
7631
  edge: "var(--ds-control-edge-strong)"
7632
7632
  };
7633
- function EventBar({ event, category, compact, onOpen, inert, showTime = true, continuesBefore, continuesAfter, className, style }) {
7633
+
7634
+ // ../../showcase/src/components/Calendar/styles.ts
7635
+ var TODAY_CIRCLE = "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)] font-bold";
7636
+ var CARD_CORNER = "calc(var(--ds-radius-lg) - var(--ds-border-width))";
7637
+ var FLUSH_EDGE = { "data-flush-edge": "" };
7638
+ function EventBar({ event, category, compact, onOpen, inert, showTime = true, continuesBefore, continuesAfter, flushEdge, className, style }) {
7634
7639
  const ref = useRef(null);
7635
7640
  const colours = eventColours(category);
7636
7641
  const words = useDateWords();
@@ -7673,6 +7678,7 @@ function EventBar({ event, category, compact, onOpen, inert, showTime = true, co
7673
7678
  ref,
7674
7679
  type: "button",
7675
7680
  "data-calendar-event": event.id,
7681
+ ...flushEdge ? FLUSH_EDGE : {},
7676
7682
  className: cn(
7677
7683
  "w-full text-left text-xs leading-tight px-ds-1.5 py-ds-0.5",
7678
7684
  look,
@@ -7896,9 +7902,6 @@ function DayList({ day, events, categories, anchor, onOpenEvent, onNewEvent, onC
7896
7902
  document.body
7897
7903
  );
7898
7904
  }
7899
-
7900
- // ../../showcase/src/components/Calendar/styles.ts
7901
- var TODAY_CIRCLE = "bg-[var(--ds-accent-primary)] [background-image:var(--ds-gradient)] text-[var(--ds-text-on-primary)] font-bold";
7902
7905
  var LANES = 3;
7903
7906
  var LANE_H = 20;
7904
7907
  var LANE_GAP = 4;
@@ -7958,6 +7961,7 @@ function MonthView({ date, events, categories, selectedDate, onDayClick, canStar
7958
7961
  if (!activeDay || !isSameDay(day, activeDay)) setActiveDay(day);
7959
7962
  },
7960
7963
  onClick: (e) => choose(day, e.currentTarget),
7964
+ style: lastRow && di === 0 ? { borderBottomLeftRadius: CARD_CORNER } : lastRow && di === week.length - 1 ? { borderBottomRightRadius: CARD_CORNER } : void 0,
7961
7965
  className: cn(
7962
7966
  "relative min-h-[80px] sm:min-h-[100px] border-[var(--ds-border-subtle)]",
7963
7967
  !lastRow && "border-b-[length:var(--ds-divider-width)]",
@@ -7990,6 +7994,7 @@ function MonthView({ date, events, categories, selectedDate, onDayClick, canStar
7990
7994
  onOpen: onOpenEvent,
7991
7995
  continuesBefore: s.continuesBefore,
7992
7996
  continuesAfter: s.continuesAfter,
7997
+ flushEdge: true,
7993
7998
  className: "absolute z-[1] flex items-center",
7994
7999
  style: {
7995
8000
  top: NUMBER_ROW + s.lane * (LANE_H + LANE_GAP),
@@ -8008,6 +8013,7 @@ function MonthView({ date, events, categories, selectedDate, onDayClick, canStar
8008
8013
  "aria-expanded": !!list2 && isSameDay(list2.day, day),
8009
8014
  className: cn("absolute z-[1] text-2xs text-[var(--ds-accent-text,var(--ds-accent-primary))] font-medium cursor-pointer hover:underline px-ds-1.5 rounded-[var(--ds-radius-sm)]", FOCUS_RING),
8010
8015
  style: { top: NUMBER_ROW + (LANES - 1) * (LANE_H + LANE_GAP), left: INSET, height: LANE_H },
8016
+ ...FLUSH_EDGE,
8011
8017
  onClick: (e) => {
8012
8018
  e.stopPropagation();
8013
8019
  openList(day, e.currentTarget);
@@ -8085,6 +8091,7 @@ function TimedEvent({ placed, category, onOpen, onFocusEvent }) {
8085
8091
  {
8086
8092
  type: "button",
8087
8093
  "data-calendar-event": event.id,
8094
+ ...FLUSH_EDGE,
8088
8095
  "aria-label": eventName(event, category, words),
8089
8096
  className: cn(
8090
8097
  // a short event keeps its title whole: no padding above and below it
@@ -8132,7 +8139,10 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8132
8139
  const allDayHeight = Math.max(28, 4 + allDay.lanes * (LANE_H2 + LANE_GAP2) + 2);
8133
8140
  const rootRef = useRef(null);
8134
8141
  const scrollerRef = useRef(null);
8142
+ const allDayRef = useRef(null);
8135
8143
  const syncingScroll = useRef(false);
8144
+ useRevealFocus(allDayRef);
8145
+ useRevealFocus(scrollerRef);
8136
8146
  const { ref: edgesRef, measure: measureEdges, fadeProps: edgeFade } = useScrollEdges();
8137
8147
  const [list2, setList] = useState(null);
8138
8148
  const handleScroll = useCallback((e) => {
@@ -8265,7 +8275,7 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8265
8275
  ] }),
8266
8276
  /* @__PURE__ */ jsxs("div", { className: "flex border-b-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)] bg-[var(--ds-bg-muted)]/30", children: [
8267
8277
  /* @__PURE__ */ jsx("div", { className: "w-14 shrink-0 border-r-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)] text-2xs text-[var(--ds-text-muted)] px-ds-1 py-ds-1 text-right", children: "all-day" }),
8268
- /* @__PURE__ */ jsx("div", { ...edgeFade, className: "flex-1 overflow-x-auto gs-scrollbar-none", "data-week-scroll": true, children: /* @__PURE__ */ jsx("div", { role: "grid", "aria-label": "All day", "aria-readonly": "true", style: { minWidth: stripWidth }, children: /* @__PURE__ */ jsx("div", { role: "row", className: "grid", style: { gridTemplateColumns: dayGridColumns, height: allDayHeight }, children: days.map((day, i) => {
8278
+ /* @__PURE__ */ jsx("div", { ref: allDayRef, ...edgeFade, className: "flex-1 overflow-x-auto gs-scrollbar-none", style: { ...edgeFade.style, scrollPaddingInline: FADE }, "data-week-scroll": true, children: /* @__PURE__ */ jsx("div", { role: "grid", "aria-label": "All day", "aria-readonly": "true", style: { minWidth: stripWidth }, children: /* @__PURE__ */ jsx("div", { role: "row", className: "grid", style: { gridTemplateColumns: dayGridColumns, height: allDayHeight }, children: days.map((day, i) => {
8269
8279
  const key = cellKey(day, null);
8270
8280
  const more = allDay.more[i];
8271
8281
  return /* @__PURE__ */ jsxs(
@@ -8281,24 +8291,31 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8281
8291
  onClick: () => onDayClick(day),
8282
8292
  className: cn("relative cursor-pointer", FOCUS_INSET, i > 0 && "border-l-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]"),
8283
8293
  children: [
8284
- allDay.segments.filter((s) => s.startCol === i).map((s) => /* @__PURE__ */ jsx(
8285
- EventBar,
8286
- {
8287
- event: s.event,
8288
- category: categories[s.event.category ?? ""],
8289
- onOpen: onOpenEvent,
8290
- continuesBefore: s.continuesBefore,
8291
- continuesAfter: s.continuesAfter,
8292
- className: "absolute z-[1] flex items-center",
8293
- style: {
8294
- top: 2 + s.lane * (LANE_H2 + LANE_GAP2),
8295
- height: LANE_H2,
8296
- left: s.continuesBefore ? 0 : 2,
8297
- width: `calc(${s.span} * (100% + var(--ds-divider-width)) - var(--ds-divider-width) - ${s.continuesBefore ? 0 : 2}px - ${s.continuesAfter ? 0 : 2}px)`
8298
- }
8299
- },
8300
- `${s.event.id}-${s.startCol}`
8301
- )),
8294
+ allDay.segments.filter((s) => s.startCol === i).map((s) => {
8295
+ const start = s.continuesBefore ? 0 : 2;
8296
+ const end = s.continuesAfter ? 0 : 2;
8297
+ return /* @__PURE__ */ jsx(
8298
+ EventBar,
8299
+ {
8300
+ event: s.event,
8301
+ category: categories[s.event.category ?? ""],
8302
+ onOpen: onOpenEvent,
8303
+ continuesBefore: s.continuesBefore,
8304
+ continuesAfter: s.continuesAfter,
8305
+ flushEdge: true,
8306
+ className: "absolute z-[1] flex items-center",
8307
+ style: {
8308
+ top: 2 + s.lane * (LANE_H2 + LANE_GAP2),
8309
+ height: LANE_H2,
8310
+ left: start,
8311
+ // across its days from its own cell's box: the first day's cell has no divider on its left, so
8312
+ // its box is a whole column; a later day's box starts after its divider (Sprint 25.27)
8313
+ width: s.startCol === 0 ? `calc(${s.span} * 100% - ${start + end}px)` : `calc(${s.span} * (100% + var(--ds-divider-width)) - var(--ds-divider-width) - ${start + end}px)`
8314
+ }
8315
+ },
8316
+ `${s.event.id}-${s.startCol}`
8317
+ );
8318
+ }),
8302
8319
  more.length > 0 && /* @__PURE__ */ jsxs(
8303
8320
  "button",
8304
8321
  {
@@ -8307,6 +8324,7 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8307
8324
  "aria-expanded": !!list2 && isSameDay(list2.day, day),
8308
8325
  className: cn("absolute z-[1] text-2xs text-[var(--ds-accent-text,var(--ds-accent-primary))] font-medium cursor-pointer hover:underline px-ds-1.5 rounded-[var(--ds-radius-sm)]", FOCUS_RING),
8309
8326
  style: { top: 2 + (ALL_DAY_LANES - 1) * (LANE_H2 + LANE_GAP2), left: 2, height: LANE_H2 },
8327
+ ...FLUSH_EDGE,
8310
8328
  onClick: (e) => {
8311
8329
  e.stopPropagation();
8312
8330
  setList({ day, anchor: e.currentTarget });
@@ -8324,9 +8342,9 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8324
8342
  );
8325
8343
  }) }) }) })
8326
8344
  ] }),
8327
- /* @__PURE__ */ jsxs("div", { ref: scrollerRef, className: "flex flex-1 min-h-0 overflow-y-auto", "data-week-hours": "", children: [
8345
+ /* @__PURE__ */ jsxs("div", { ref: scrollerRef, className: "flex flex-1 min-h-0 overflow-y-auto", style: { scrollPaddingBlock: FOCUS_ROOM }, "data-week-hours": "", children: [
8328
8346
  /* @__PURE__ */ jsx("div", { className: "w-14 shrink-0 relative border-r-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]", style: { height: GRID_HEIGHT }, "aria-hidden": "true", children: HOURS.map((h) => /* @__PURE__ */ jsx("div", { className: "absolute right-0 pr-ds-2 text-2xs text-[var(--ds-text-muted)] -translate-y-1/2 tabular-nums", style: { top: h * HOUR_HEIGHT }, children: h > 0 && formatHourLabel(h) }, h)) }),
8329
- /* @__PURE__ */ jsx("div", { ...edgeFade, className: "flex-1 self-start overflow-x-auto overflow-y-hidden gs-scrollbar-none", style: { height: GRID_HEIGHT }, "data-week-scroll": true, children: /* @__PURE__ */ jsxs("div", { className: "relative", style: { height: GRID_HEIGHT, minWidth: stripWidth }, children: [
8347
+ /* @__PURE__ */ jsx("div", { ...edgeFade, className: "flex-1 self-start overflow-x-auto overflow-y-hidden gs-scrollbar-none", style: { ...edgeFade.style, height: GRID_HEIGHT, scrollPaddingInline: FADE }, "data-week-scroll": true, children: /* @__PURE__ */ jsxs("div", { className: "relative", style: { height: GRID_HEIGHT, minWidth: stripWidth }, children: [
8330
8348
  /* @__PURE__ */ jsx("div", { role: "grid", "aria-label": formatWeekRange(date, weekStartsOn), "aria-readonly": "true", className: "absolute inset-0", children: HOURS.map((hour) => /* @__PURE__ */ jsx("div", { role: "row", className: "grid", style: { gridTemplateColumns: dayGridColumns, height: HOUR_HEIGHT }, children: days.map((day, i) => {
8331
8349
  const key = cellKey(day, hour);
8332
8350
  return /* @__PURE__ */ jsx(
@@ -8340,6 +8358,7 @@ function WeekView({ date, events, categories, selectedDate, onDayClick, onOpenEv
8340
8358
  if (activeKey !== key) setActiveKey(key);
8341
8359
  },
8342
8360
  onClick: chooseHour(day, hour),
8361
+ style: hour === HOURS.length - 1 && i === days.length - 1 ? { borderBottomRightRadius: CARD_CORNER } : void 0,
8343
8362
  className: cn(
8344
8363
  "cursor-pointer border-t-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)] hover:bg-[var(--ds-bg-muted)]/40",
8345
8364
  FOCUS_INSET,
@@ -8481,6 +8500,7 @@ function MonthRow({
8481
8500
  {
8482
8501
  type: "button",
8483
8502
  "aria-label": `${words.monthName(month, "short")} ${year}`,
8503
+ style: month === 11 ? { borderBottomLeftRadius: CARD_CORNER } : void 0,
8484
8504
  className: cn(
8485
8505
  "sticky left-0 z-10 flex items-center justify-center px-ds-2 text-xs font-semibold text-[var(--ds-text-primary)]",
8486
8506
  "bg-[var(--ds-bg-muted)] cursor-pointer hover:text-[var(--ds-accent-ink)] transition-colors",
@@ -9240,7 +9260,7 @@ function Calendar({
9240
9260
  "bg-[var(--ds-bg-muted)]",
9241
9261
  "border-b-[length:var(--ds-divider-width)] border-[var(--ds-border-subtle)]"
9242
9262
  ),
9243
- style: { padding: "var(--ds-space-1) var(--ds-space-1)" },
9263
+ style: { padding: atLeastFocusRoom("var(--ds-space-1)") },
9244
9264
  children: [
9245
9265
  /* @__PURE__ */ jsx(
9246
9266
  "button",
@@ -9458,9 +9478,9 @@ function AvatarGroup({ items, max = 4, size = "sm", ring = "canvas", onOverflowC
9458
9478
  },
9459
9479
  i
9460
9480
  );
9461
- return item.name ? /* @__PURE__ */ jsx(Tooltip, { content: item.name, children: avatar }, i) : avatar;
9481
+ return item.name ? /* @__PURE__ */ jsx(AutoTooltip, { content: item.name, children: avatar }, i) : avatar;
9462
9482
  }),
9463
- counter && (onOverflowClick ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onOverflowClick, "aria-label": `Show ${hidden.length} more`, className: cn("inline-flex rounded-[var(--ds-radius-full)]", FOCUS_RING), children: hiddenNames ? /* @__PURE__ */ jsx(Tooltip, { content: hiddenNames, children: counter }) : counter }) : hiddenNames ? /* @__PURE__ */ jsx(Tooltip, { content: hiddenNames, children: counter }) : counter)
9483
+ counter && (onOverflowClick ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onOverflowClick, "aria-label": `Show ${hidden.length} more`, className: cn("inline-flex rounded-[var(--ds-radius-full)]", FOCUS_RING), children: hiddenNames ? /* @__PURE__ */ jsx(AutoTooltip, { content: hiddenNames, children: counter }) : counter }) : hiddenNames ? /* @__PURE__ */ jsx(AutoTooltip, { content: hiddenNames, children: counter }) : counter)
9464
9484
  ] });
9465
9485
  }
9466
9486
  var defaultIcons = {
@@ -9907,7 +9927,7 @@ function TruncLabel2({ children }) {
9907
9927
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
9908
9928
  const label = /* @__PURE__ */ jsx("span", { ref, className: "truncate", children });
9909
9929
  if (!isTruncated) return label;
9910
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: label });
9930
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: label });
9911
9931
  }
9912
9932
  function foldersHolding(nodes, selected) {
9913
9933
  const ids = [];
@@ -10423,7 +10443,7 @@ function ActionsRow({ message, onAction }) {
10423
10443
  ),
10424
10444
  children: message.actions.map((a) => {
10425
10445
  const { id, label, icon } = resolveAction(a);
10426
- return /* @__PURE__ */ jsx(Tooltip, { content: label, children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": label, onClick: () => run(id), children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 14 }) }) }, id);
10446
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: label, children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": label, onClick: () => run(id), children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 14 }) }) }, id);
10427
10447
  })
10428
10448
  }
10429
10449
  );
@@ -10739,15 +10759,15 @@ function ChatPanel({
10739
10759
  ),
10740
10760
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
10741
10761
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-ds-2", children: [
10742
- isTruncated ? /* @__PURE__ */ jsx(Tooltip, { content: title, children: heading }) : heading,
10762
+ isTruncated ? /* @__PURE__ */ jsx(AutoTooltip, { content: title, children: heading }) : heading,
10743
10763
  status && /* @__PURE__ */ jsx(StatusDot, { variant: STATUS_VARIANT[status.tone ?? "success"], label: status.label })
10744
10764
  ] }),
10745
10765
  description && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-[var(--ds-text-muted)]", children: description })
10746
10766
  ] }),
10747
10767
  /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-ds-1", children: [
10748
10768
  actions,
10749
- onNewConversation && /* @__PURE__ */ jsx(Tooltip, { content: "New conversation", children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "New conversation", onClick: onNewConversation, children: /* @__PURE__ */ jsx(Icon, { name: "plus", size: 16 }) }) }),
10750
- onExpandedChange && /* @__PURE__ */ jsx(Tooltip, { content: expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
10769
+ onNewConversation && /* @__PURE__ */ jsx(AutoTooltip, { content: "New conversation", children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "New conversation", onClick: onNewConversation, children: /* @__PURE__ */ jsx(Icon, { name: "plus", size: 16 }) }) }),
10770
+ onExpandedChange && /* @__PURE__ */ jsx(AutoTooltip, { content: expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
10751
10771
  Button,
10752
10772
  {
10753
10773
  type: "button",
@@ -10759,7 +10779,7 @@ function ChatPanel({
10759
10779
  children: /* @__PURE__ */ jsx(Icon, { name: expanded ? "minimize-2" : "maximize-2", size: 16 })
10760
10780
  }
10761
10781
  ) }),
10762
- /* @__PURE__ */ jsx(Tooltip, { content: "Close", children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Close", onClick: onClose, ...{ [OVERLAY_CLOSE_ATTR]: "" }, children: /* @__PURE__ */ jsx(Icon, { name: "close", size: 16 }) }) })
10782
+ /* @__PURE__ */ jsx(AutoTooltip, { content: "Close", children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Close", onClick: onClose, ...{ [OVERLAY_CLOSE_ATTR]: "" }, children: /* @__PURE__ */ jsx(Icon, { name: "close", size: 16 }) }) })
10763
10783
  ] })
10764
10784
  ]
10765
10785
  }
@@ -10775,58 +10795,6 @@ function ChatPanel({
10775
10795
  )
10776
10796
  ] });
10777
10797
  }
10778
- var TOAST_INSET_VARS = {
10779
- "bottom-right": "--ds-toast-inset-bottom-right",
10780
- "bottom-left": "--ds-toast-inset-bottom-left",
10781
- right: "--ds-toast-inset-right",
10782
- left: "--ds-toast-inset-left",
10783
- top: "--ds-toast-inset-top"
10784
- };
10785
- var LAUNCHER_INSET_PRIORITY = 1;
10786
- var PANEL_INSET_PRIORITY = 2;
10787
- var NAVBAR_INSET_PRIORITY = 1;
10788
- var registry = /* @__PURE__ */ new WeakMap();
10789
- var seq = 0;
10790
- function claimsFor(target) {
10791
- let entry = registry.get(target);
10792
- if (!entry) {
10793
- entry = { "bottom-right": [], "bottom-left": [], right: [], left: [], top: [] };
10794
- registry.set(target, entry);
10795
- }
10796
- return entry;
10797
- }
10798
- function winner(claims) {
10799
- let best = null;
10800
- for (const c of claims) {
10801
- if (!best || c.priority > best.priority || c.priority === best.priority && c.seq > best.seq) best = c;
10802
- }
10803
- return best;
10804
- }
10805
- function apply(target, corner) {
10806
- const style = target.style;
10807
- if (!style) return;
10808
- const best = winner(claimsFor(target)[corner]);
10809
- if (best) style.setProperty(TOAST_INSET_VARS[corner], best.inset);
10810
- else style.removeProperty(TOAST_INSET_VARS[corner]);
10811
- }
10812
- function claimCornerInset(corner, inset, priority, target) {
10813
- const claim = { inset, priority, seq: ++seq };
10814
- const list2 = claimsFor(target)[corner];
10815
- list2.push(claim);
10816
- apply(target, corner);
10817
- return () => {
10818
- const i = list2.indexOf(claim);
10819
- if (i >= 0) list2.splice(i, 1);
10820
- apply(target, corner);
10821
- };
10822
- }
10823
- function useCornerInset(corner, inset, priority, target) {
10824
- useEffect(() => {
10825
- if (!corner || !inset) return;
10826
- const el = target ?? document.documentElement;
10827
- return claimCornerInset(corner, inset, priority, el);
10828
- }, [corner, inset, priority, target]);
10829
- }
10830
10798
  function Sheet({ open, onClose: onCloseProp, title, children, footer, dirty, onDiscard, snapPoints = [0.5, 0.92], container, flush, keepMounted = false, id, labelledBy }) {
10831
10799
  const { marked, mark } = useOverlayMark(open);
10832
10800
  const guard = useDirtyGuard(dirty ?? marked, onCloseProp, onDiscard);
@@ -10915,7 +10883,7 @@ function CornerWindow({ open, onClose, edge, align, width, height, offset, ancho
10915
10883
  const containerEl = container instanceof Element ? container : null;
10916
10884
  useCornerInset(
10917
10885
  open && mounted && !expanded ? claim : null,
10918
- vertical === "bottom" ? `calc(${bottom} + ${height} + var(--ds-space-3))` : `calc(${x} + ${width} + var(--ds-space-3))`,
10886
+ vertical === "bottom" ? `calc(${bottom} + ${height} + var(--ds-space-3))` : besideRoom(`calc(${x} + ${width} + var(--ds-space-3))`),
10919
10887
  PANEL_INSET_PRIORITY,
10920
10888
  containerEl
10921
10889
  );
@@ -11052,7 +11020,7 @@ function DockedColumn({ open, onClose, side, width, floating, navbarFloating, si
11052
11020
  });
11053
11021
  useCornerInset(
11054
11022
  open && mounted ? side : null,
11055
- floating ? `calc(${currentWidth} + ${GUTTER} + var(--ds-space-4))` : `calc(${currentWidth} + var(--ds-space-4))`,
11023
+ besideRoom(floating ? `calc(${currentWidth} + ${GUTTER} + var(--ds-space-4))` : `calc(${currentWidth} + var(--ds-space-4))`),
11056
11024
  PANEL_INSET_PRIORITY
11057
11025
  );
11058
11026
  if (!mounted) return null;
@@ -11120,7 +11088,7 @@ function TruncText({ children, className }) {
11120
11088
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
11121
11089
  const text = /* @__PURE__ */ jsx("p", { ref, className: cn("truncate", className), children });
11122
11090
  if (!isTruncated) return text;
11123
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: text });
11091
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: text });
11124
11092
  }
11125
11093
  var StackedList = forwardRef(function StackedList2({
11126
11094
  items,
@@ -12854,14 +12822,29 @@ function Launcher({
12854
12822
  const y = offset?.y ?? DEFAULT_OFFSET2;
12855
12823
  const boxSize = launcherSize(size);
12856
12824
  const onOpenChangeRef = useLatest(onOpenChange);
12857
- const corner = isRibbon ? null : side === "right" ? "bottom-right" : "bottom-left";
12825
+ const [buttonEl, setButtonEl] = useState(null);
12826
+ const [ribbonBox, setRibbonBox] = useState(null);
12827
+ useEffect(() => {
12828
+ if (!isRibbon || !buttonEl || typeof ResizeObserver === "undefined") return;
12829
+ const ro = new ResizeObserver(([entry]) => {
12830
+ const el = entry?.target ?? buttonEl;
12831
+ const width = el.offsetWidth;
12832
+ const height = el.offsetHeight;
12833
+ setRibbonBox((b) => width === 0 && height === 0 ? null : b && b.width === width && b.height === height ? b : { width, height });
12834
+ });
12835
+ ro.observe(buttonEl);
12836
+ return () => ro.disconnect();
12837
+ }, [isRibbon, buttonEl]);
12838
+ const cornerOfSide = side === "right" ? "bottom-right" : "bottom-left";
12839
+ const above = (from, height) => `calc(${from} + env(safe-area-inset-bottom) + ${height} + var(--ds-space-3))`;
12840
+ const claims = !isRibbon ? [[cornerOfSide, above(y, boxSize)]] : !ribbonBox ? [] : bottomRibbon ? (align === "end" ? ["bottom-right"] : ["bottom-right", "bottom-left", "bottom-center"]).map((e) => [e, above("0px", `${ribbonBox.height}px`)]) : align === "end" ? [[cornerOfSide, above(y, `${ribbonBox.height}px`)]] : [[side, `calc(env(safe-area-inset-${side}) + ${ribbonBox.width}px + var(--ds-space-3))`]];
12841
+ const register = useAppShell()?.registerLauncher;
12842
+ const padded = isRibbon ? null : cornerOfSide;
12843
+ useEffect(() => mounted && register ? register(padded) : void 0, [mounted, register, padded]);
12858
12844
  const containerEl = container instanceof Element ? container : null;
12859
- useCornerInset(
12860
- mounted ? corner : null,
12861
- corner ? `calc(${y} + ${boxSize} + var(--ds-space-3))` : null,
12862
- LAUNCHER_INSET_PRIORITY,
12863
- containerEl
12864
- );
12845
+ useCornerInset(mounted ? claims[0]?.[0] ?? null : null, claims[0]?.[1] ?? null, LAUNCHER_INSET_PRIORITY, containerEl);
12846
+ useCornerInset(mounted ? claims[1]?.[0] ?? null : null, claims[1]?.[1] ?? null, LAUNCHER_INSET_PRIORITY, containerEl);
12847
+ useCornerInset(mounted ? claims[2]?.[0] ?? null : null, claims[2]?.[1] ?? null, LAUNCHER_INSET_PRIORITY, containerEl);
12865
12848
  useEffect(() => {
12866
12849
  if (container) return;
12867
12850
  bodyLaunchers++;
@@ -12922,6 +12905,7 @@ function Launcher({
12922
12905
  const button = /* @__PURE__ */ jsxs(
12923
12906
  "button",
12924
12907
  {
12908
+ ref: setButtonEl,
12925
12909
  type: "button",
12926
12910
  "aria-label": accessibleName,
12927
12911
  "aria-expanded": open,
@@ -12996,7 +12980,7 @@ function Launcher({
12996
12980
  }
12997
12981
  );
12998
12982
  const content = variant === "bubble" ? /* @__PURE__ */ jsx(
12999
- Tooltip,
12983
+ AutoTooltip,
13000
12984
  {
13001
12985
  container,
13002
12986
  content: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-ds-2", children: [
@@ -13211,7 +13195,7 @@ function TabButton({
13211
13195
  ]
13212
13196
  }
13213
13197
  );
13214
- if (isTruncated) return /* @__PURE__ */ jsx(Tooltip, { content: label, children: btn2 });
13198
+ if (isTruncated) return /* @__PURE__ */ jsx(AutoTooltip, { content: label, children: btn2 });
13215
13199
  return btn2;
13216
13200
  }
13217
13201
  const btn = /* @__PURE__ */ jsx(
@@ -13254,7 +13238,7 @@ function TabButton({
13254
13238
  ] })
13255
13239
  }
13256
13240
  );
13257
- if (isTruncated) return /* @__PURE__ */ jsx(Tooltip, { content: label, children: btn });
13241
+ if (isTruncated) return /* @__PURE__ */ jsx(AutoTooltip, { content: label, children: btn });
13258
13242
  return btn;
13259
13243
  }
13260
13244
  function TabsList({ children, className }) {
@@ -13916,7 +13900,7 @@ var Sidebar = forwardRef(function Sidebar2({
13916
13900
  ]
13917
13901
  }
13918
13902
  );
13919
- return collapsed ? /* @__PURE__ */ jsx(Tooltip, { content: "Expand sidebar", side: "right", delay: 100, container: portalEl ?? void 0, children: collapseButton }) : collapseButton;
13903
+ return collapsed ? /* @__PURE__ */ jsx(AutoTooltip, { content: "Expand sidebar", side: "right", delay: 100, container: portalEl ?? void 0, children: collapseButton }) : collapseButton;
13920
13904
  })(),
13921
13905
  footer && /* @__PURE__ */ jsx(
13922
13906
  "div",
@@ -13971,7 +13955,7 @@ function TruncLabel3({ children, className, side = "right", container, lines = 1
13971
13955
  const clampClass = lines <= 1 ? "truncate" : clampMap[lines] ?? "truncate";
13972
13956
  const label = /* @__PURE__ */ jsx("span", { ref, className: cn(clampClass, className), children });
13973
13957
  if (!isTruncated) return label;
13974
- return /* @__PURE__ */ jsx(Tooltip, { content: children, side, delay: 200, container, children: label });
13958
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, side, delay: 200, container, children: label });
13975
13959
  }
13976
13960
  var isActive = (item) => !!item.active;
13977
13961
  function collectInitialExpanded(items, prefix = "") {
@@ -14196,7 +14180,7 @@ function SidebarNav({
14196
14180
  }
14197
14181
  );
14198
14182
  if (collapsed && isRoot) {
14199
- return /* @__PURE__ */ jsx(Tooltip, { content: item.label, side: "right", delay: 100, container: portalContainer ?? void 0, children: link }, item.label);
14183
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: item.label, side: "right", delay: 100, container: portalContainer ?? void 0, children: link }, item.label);
14200
14184
  }
14201
14185
  return /* @__PURE__ */ jsx("div", { children: link }, item.label);
14202
14186
  }
@@ -14551,13 +14535,16 @@ var variantIcons = {
14551
14535
  warning: { name: "warning", className: "text-[var(--ds-status-warning)]" },
14552
14536
  error: { name: "error", className: "text-[var(--ds-status-error)]" }
14553
14537
  };
14538
+ var RIGHT_ROOM = "max-w-[calc(100%_-_var(--ds-toast-inset-right)_-_var(--ds-space-4))]";
14539
+ var LEFT_ROOM = "max-w-[calc(100%_-_var(--ds-toast-inset-left)_-_var(--ds-space-4))]";
14540
+ var CENTRED = "left-[max(calc(var(--ds-toast-inset-left)_+_180px),calc(var(--ds-toast-inset-left)_+_(100%_-_var(--ds-toast-inset-left)_-_var(--ds-toast-inset-right))_/_2))] -translate-x-1/2 max-w-[max(360px,calc(100%_-_var(--ds-toast-inset-left)_-_var(--ds-toast-inset-right)))]";
14554
14541
  var TOAST_POSITION_CLASSES = {
14555
- "top-right": "top-[var(--ds-toast-inset-top)] right-[var(--ds-toast-inset-right)]",
14556
- "top-left": "top-[var(--ds-toast-inset-top)] left-[var(--ds-toast-inset-left)]",
14557
- "bottom-right": "bottom-[var(--ds-toast-inset-bottom-right)] right-[var(--ds-toast-inset-right)]",
14558
- "bottom-left": "bottom-[var(--ds-toast-inset-bottom-left)] left-[var(--ds-toast-inset-left)]",
14559
- "top-center": "top-[var(--ds-toast-inset-top)] left-1/2 -translate-x-1/2",
14560
- "bottom-center": "bottom-ds-4 left-1/2 -translate-x-1/2"
14542
+ "top-right": `top-[var(--ds-toast-inset-top)] right-[var(--ds-toast-inset-right)] ${RIGHT_ROOM}`,
14543
+ "top-left": `top-[var(--ds-toast-inset-top)] left-[var(--ds-toast-inset-left)] ${LEFT_ROOM}`,
14544
+ "bottom-right": `bottom-[var(--ds-toast-inset-bottom-right)] right-[var(--ds-toast-inset-right)] ${RIGHT_ROOM}`,
14545
+ "bottom-left": `bottom-[var(--ds-toast-inset-bottom-left)] left-[var(--ds-toast-inset-left)] ${LEFT_ROOM}`,
14546
+ "top-center": `top-[var(--ds-toast-inset-top)] ${CENTRED}`,
14547
+ "bottom-center": `bottom-[var(--ds-toast-inset-bottom-center)] ${CENTRED}`
14561
14548
  };
14562
14549
  var finite = (ms) => typeof ms === "number" && Number.isFinite(ms) && ms > 0;
14563
14550
  function Toast({ variant = "default", message, visible, onDismiss, duration = 5e3, pauseOnHover = false, action, actionWindow, position = "bottom-right", mode, container, inline = false, paused = false, onActionLapse, onAction, restartKey = 0 }) {
@@ -15462,13 +15449,13 @@ function TruncHeading({ as: Tag3 = "h1", className, children, lines: linesProp }
15462
15449
  const { ref, isTruncated } = useTextOverflow({ lines });
15463
15450
  const heading = /* @__PURE__ */ jsx(Tag3, { ref, className: cn(lines === 2 ? "line-clamp-2" : "truncate", className), children });
15464
15451
  if (!isTruncated) return heading;
15465
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: heading });
15452
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: heading });
15466
15453
  }
15467
15454
  function ClampedText({ children, className }) {
15468
15455
  const { ref, isTruncated } = useTextOverflow({ lines: 2 });
15469
15456
  const el = /* @__PURE__ */ jsx("p", { ref, className: cn("line-clamp-2", className), children });
15470
15457
  if (!isTruncated) return el;
15471
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
15458
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
15472
15459
  }
15473
15460
  function findScrollParent(el) {
15474
15461
  let node = el.parentElement;
@@ -16597,7 +16584,7 @@ function TruncSpan({ children, className }) {
16597
16584
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
16598
16585
  const el = /* @__PURE__ */ jsx("span", { ref, className: cn("truncate", className), children });
16599
16586
  if (!isTruncated) return el;
16600
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
16587
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
16601
16588
  }
16602
16589
  function NavMenu({
16603
16590
  label,
@@ -17558,13 +17545,13 @@ function TruncTitle({ children }) {
17558
17545
  const { ref, isTruncated } = useTextOverflow({ lines: 1 });
17559
17546
  const el = /* @__PURE__ */ jsx("span", { ref, className: "truncate", children });
17560
17547
  if (!isTruncated) return el;
17561
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
17548
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
17562
17549
  }
17563
17550
  function ClampedDesc({ children, className }) {
17564
17551
  const { ref, isTruncated } = useTextOverflow({ lines: 2 });
17565
17552
  const el = /* @__PURE__ */ jsx("p", { ref, className: cn("line-clamp-2", className), children });
17566
17553
  if (!isTruncated) return el;
17567
- return /* @__PURE__ */ jsx(Tooltip, { content: children, children: el });
17554
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
17568
17555
  }
17569
17556
  function NotificationCenter({
17570
17557
  notifications,
@@ -18720,7 +18707,7 @@ var TextOverflow = forwardRef(function TextOverflow2({
18720
18707
  }
18721
18708
  );
18722
18709
  }
18723
- return /* @__PURE__ */ jsx(Tooltip, { content: resolvedTooltipContent, children: content });
18710
+ return /* @__PURE__ */ jsx(AutoTooltip, { content: resolvedTooltipContent, children: content });
18724
18711
  });
18725
18712
 
18726
18713
  export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, Alert, AsidePanel, AvatarGroup, BottomNav, BulkActionBar, Calendar, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, ChatMessageList, ChatPanel, Checkbox, CheckboxGroup, CheckboxGroupItem, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, CommandPalette, ContextMenu, CornerPanel, DEFAULT_DATE_RANGE_PRESETS, DangerZone, DataList, DatePicker, DateRangePicker, DescriptionList, Dialog, Dock, DropdownMenu, EmptyState, EntityCell, FileUpload, FlowSaved, FormWrapper, Gantt, HoverCard, Kbd, Launcher, LocaleProvider, MentionInput, MobileHeaderMenu, NavItem, NavMenu, Navbar, NotificationCenter, PageActions, PageContainer, PageHeader, PinInput, Progress, RadioGroup, Rating, RecurrencePicker, RecurrenceScopeDialog, RelativeTime, ScrollArea, SectionHeading, SegmentedControl, SettingsLayout, Sheet, Sidebar, SidebarNav, SliderRange, StackedList, StatsCard, StatusDot, Stepper, TIME_ZOOMS, Table, TableToolbar, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, TextOverflow, 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 };