@adecore/ui 0.53.3 → 0.54.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 (180) hide show
  1. package/dist/Banner.d.ts +1 -1
  2. package/dist/ButtonGroup.js +1 -1
  3. package/dist/Checkbox.js +1 -1
  4. package/dist/ChoiceCards.d.ts +1 -1
  5. package/dist/ChoiceCards.js +2 -2
  6. package/dist/CloseButton.js +1 -1
  7. package/dist/ColorSwatch.d.ts +1 -1
  8. package/dist/ColorSwatch.js +1 -1
  9. package/dist/ColorWheelPicker.js +1 -1
  10. package/dist/CopyButton.js +1 -1
  11. package/dist/DockShell.js +1 -1
  12. package/dist/EmptyState.d.ts +1 -1
  13. package/dist/EmptyState.js +1 -1
  14. package/dist/ErrorBoundary.js +122 -112
  15. package/dist/Field.d.ts +1 -1
  16. package/dist/Field.js +2 -2
  17. package/dist/FileIcon.js +1 -1
  18. package/dist/Icon.d.ts +1 -1
  19. package/dist/IconButton.d.ts +3 -3
  20. package/dist/IconButton.js +2 -2
  21. package/dist/IconPicker.js +35 -32
  22. package/dist/Input.d.ts +1 -1
  23. package/dist/ListRow.js +1 -1
  24. package/dist/MiddleTruncate.js +2 -2
  25. package/dist/PanelEmpty.d.ts +1 -1
  26. package/dist/PanelHeader.d.ts +1 -1
  27. package/dist/PanelHeader.js +1 -1
  28. package/dist/ProjectSwitcher.js +1 -1
  29. package/dist/PromptDialog.d.ts +1 -1
  30. package/dist/ScrollArea.d.ts +12 -0
  31. package/dist/ScrollArea.js +144 -0
  32. package/dist/SectionLabel.js +1 -1
  33. package/dist/SegmentBar.js +1 -1
  34. package/dist/Segmented.d.ts +1 -1
  35. package/dist/Select.d.ts +1 -1
  36. package/dist/Select.js +22 -16
  37. package/dist/SelectSearch.js +49 -33
  38. package/dist/ShortcutHints.js +1 -1
  39. package/dist/Slider.js +2 -2
  40. package/dist/SlidingColumn.js +1 -1
  41. package/dist/SplitButton.js +1 -1
  42. package/dist/Surface.js +1 -1
  43. package/dist/Switch.js +1 -1
  44. package/dist/TextMenu.js +2 -2
  45. package/dist/Toasts.js +2 -2
  46. package/dist/Tooltip.d.ts +1 -1
  47. package/dist/Tooltip.js +1 -1
  48. package/dist/UIProvider.d.ts +1 -1
  49. package/dist/Waveform.js +1 -1
  50. package/dist/Wipe.js +2 -2
  51. package/dist/combobox/parts.d.ts +3 -3
  52. package/dist/combobox/parts.js +53 -32
  53. package/dist/command-palette/parts.d.ts +1 -1
  54. package/dist/command-palette/parts.js +22 -7
  55. package/dist/command-palette/virtual.js +4 -4
  56. package/dist/dialog/parts.d.ts +1 -1
  57. package/dist/dialog/parts.js +2 -2
  58. package/dist/file-tree/parts.d.ts +2 -2
  59. package/dist/file-tree/parts.js +3 -3
  60. package/dist/file-tree/use-file-tree-shift.d.ts +1 -1
  61. package/dist/file-tree/use-file-tree-shift.js +1 -1
  62. package/dist/index.d.ts +2 -0
  63. package/dist/index.js +2 -0
  64. package/dist/key-value-list/parts.js +1 -1
  65. package/dist/menu/parts.d.ts +3 -3
  66. package/dist/menu/parts.js +46 -30
  67. package/dist/popover/parts.d.ts +3 -3
  68. package/dist/popover/parts.js +110 -71
  69. package/dist/project-switcher-row.js +1 -1
  70. package/dist/scrollbar-geometry.d.ts +15 -0
  71. package/dist/scrollbar-geometry.js +48 -0
  72. package/dist/settings/MasterDetail.js +40 -30
  73. package/dist/settings/SettingsDialog.d.ts +1 -1
  74. package/dist/settings/SettingsDialog.js +27 -11
  75. package/dist/settings/SettingsRow.d.ts +1 -1
  76. package/dist/settings/SettingsRow.js +1 -1
  77. package/dist/settings/SettingsSection.d.ts +1 -1
  78. package/dist/tabs/parts.d.ts +1 -1
  79. package/dist/tabs/parts.js +3 -3
  80. package/dist/testing/dedupe.js +1 -1
  81. package/dist/theme.css +91 -1
  82. package/dist/tree/parts.js +2 -2
  83. package/dist/useOverlayScrollbars.d.ts +7 -0
  84. package/dist/useOverlayScrollbars.js +281 -0
  85. package/dist/workspace/PaneBar.js +2 -2
  86. package/dist/workspace/SplitView.d.ts +1 -1
  87. package/dist/workspace/SplitView.js +4 -4
  88. package/dist/workspace/TabStrip.d.ts +1 -1
  89. package/dist/workspace/TabStrip.js +2 -2
  90. package/dist/workspace/Workspace.d.ts +1 -1
  91. package/dist/workspace/Workspace.js +2 -2
  92. package/dist/workspace/WorkspaceRail.js +1 -1
  93. package/dist/workspace/WorkspaceTopRow.js +1 -1
  94. package/package.json +1 -1
  95. package/src/AccentSwatches.tsx +1 -1
  96. package/src/Banner.tsx +1 -1
  97. package/src/Button.tsx +1 -1
  98. package/src/ButtonGroup.tsx +1 -1
  99. package/src/Checkbox.tsx +2 -2
  100. package/src/ChoiceCards.tsx +3 -3
  101. package/src/CloseButton.tsx +2 -2
  102. package/src/ColorSwatch.tsx +2 -2
  103. package/src/ColorWheelPicker.tsx +1 -1
  104. package/src/ColumnResizeHandle.tsx +1 -1
  105. package/src/CopyButton.tsx +1 -1
  106. package/src/DockShell.tsx +1 -1
  107. package/src/EmptyState.tsx +2 -2
  108. package/src/ErrorBoundary.tsx +4 -3
  109. package/src/Field.tsx +2 -2
  110. package/src/FileIcon.tsx +1 -1
  111. package/src/Icon.tsx +2 -2
  112. package/src/IconButton.tsx +3 -3
  113. package/src/IconPicker.tsx +7 -6
  114. package/src/Input.tsx +2 -2
  115. package/src/Kbd.tsx +1 -1
  116. package/src/ListRow.tsx +1 -1
  117. package/src/Meter.tsx +1 -1
  118. package/src/MiddleTruncate.tsx +2 -2
  119. package/src/PanelEmpty.tsx +2 -2
  120. package/src/PanelHeader.tsx +2 -2
  121. package/src/Pill.tsx +1 -1
  122. package/src/ProjectSwitcher.tsx +2 -2
  123. package/src/PromptDialog.tsx +1 -1
  124. package/src/RelativeTime.tsx +1 -1
  125. package/src/ScrollArea.tsx +47 -0
  126. package/src/SectionLabel.tsx +1 -1
  127. package/src/SegmentBar.tsx +1 -1
  128. package/src/Segmented.tsx +1 -1
  129. package/src/Select.tsx +6 -2
  130. package/src/SelectSearch.tsx +19 -12
  131. package/src/Separator.tsx +1 -1
  132. package/src/ShortcutHints.tsx +1 -1
  133. package/src/Skeleton.tsx +1 -1
  134. package/src/Slider.tsx +2 -2
  135. package/src/SlidingColumn.tsx +1 -1
  136. package/src/Spinner.tsx +1 -1
  137. package/src/SplitButton.tsx +1 -1
  138. package/src/Stepper.tsx +1 -1
  139. package/src/Surface.tsx +1 -1
  140. package/src/Switch.tsx +2 -2
  141. package/src/TextMenu.tsx +2 -2
  142. package/src/Tile.tsx +1 -1
  143. package/src/Toasts.tsx +2 -2
  144. package/src/Tooltip.tsx +2 -2
  145. package/src/UIProvider.tsx +1 -1
  146. package/src/Waveform.tsx +1 -1
  147. package/src/Wipe.tsx +2 -2
  148. package/src/ZoomControls.tsx +1 -1
  149. package/src/combobox/parts.tsx +9 -4
  150. package/src/command-palette/parts.tsx +25 -19
  151. package/src/command-palette/virtual.tsx +4 -4
  152. package/src/dialog/parts.tsx +2 -2
  153. package/src/file-tree/parts.tsx +6 -6
  154. package/src/file-tree/use-empty-lines.ts +1 -1
  155. package/src/file-tree/use-file-tree-shift.tsx +2 -2
  156. package/src/file-tree/use-slots.ts +2 -2
  157. package/src/index.ts +2 -0
  158. package/src/key-value-list/parts.tsx +1 -1
  159. package/src/menu/parts.tsx +11 -6
  160. package/src/popover/parts.tsx +13 -5
  161. package/src/project-switcher-row.tsx +2 -2
  162. package/src/scrollbar-geometry.ts +67 -0
  163. package/src/select-shared.ts +1 -1
  164. package/src/settings/DetailHeader.tsx +1 -1
  165. package/src/settings/MasterDetail.tsx +9 -6
  166. package/src/settings/SettingsDialog.tsx +16 -9
  167. package/src/settings/SettingsRow.tsx +1 -1
  168. package/src/settings/SettingsSection.tsx +1 -1
  169. package/src/tabs/parts.tsx +4 -4
  170. package/src/testing/dedupe.ts +1 -1
  171. package/src/theme.css +91 -1
  172. package/src/tree/parts.tsx +2 -2
  173. package/src/useOverlayScrollbars.tsx +263 -0
  174. package/src/workspace/DropPreview.tsx +1 -1
  175. package/src/workspace/PaneBar.tsx +2 -2
  176. package/src/workspace/SplitView.tsx +5 -5
  177. package/src/workspace/TabStrip.tsx +3 -3
  178. package/src/workspace/Workspace.tsx +2 -2
  179. package/src/workspace/WorkspaceRail.tsx +1 -1
  180. package/src/workspace/WorkspaceTopRow.tsx +1 -1
package/dist/ListRow.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
4
  const VARIANT = {
5
5
  /* A row of a list that reads as a table and fills the width of its panel: commits, processes,
6
6
  branches. Square, so the rows stack into one block. It carries no padding; the caller pads 12px
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useLayoutEffect, useState } from 'react';
3
2
  import clsx from 'clsx';
4
- import { fitMiddle } from './middle-truncate.js';
3
+ import { useLayoutEffect, useState } from 'react';
5
4
  import { mergeRefs } from './merge-refs.js';
5
+ import { fitMiddle } from './middle-truncate.js';
6
6
  import { Tooltip } from "./Tooltip.js";
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  let canvas = null;
@@ -1,5 +1,5 @@
1
- import type { ReactNode, Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { ReactNode, Ref } from 'react';
3
3
  export interface PanelEmptyProps {
4
4
  header?: ReactNode;
5
5
  icon?: LucideIcon;
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  import { useRender } from '@base-ui/react/use-render';
2
+ import type { ReactNode } from 'react';
3
3
  export type PanelHeaderProps = useRender.ComponentProps<'header'> & {
4
4
  title?: ReactNode;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
4
  import { SectionLabel } from "./SectionLabel.js";
5
5
  /* As tall as a 48px toolbar beside it. */
6
6
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
- import { useTranslation } from 'react-i18next';
4
3
  import { ChevronDown, History } from 'lucide-react';
4
+ import { useTranslation } from 'react-i18next';
5
5
  import { Icon } from "./Icon.js";
6
6
  import * as Menu from './menu/index.parts.js';
7
7
  import { ProjectSwitcherRow } from "./project-switcher-row.js";
@@ -1,5 +1,5 @@
1
- import { type ReactNode, type Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import { type ReactNode, type Ref } from 'react';
3
3
  export interface PromptDialogProps {
4
4
  open: boolean;
5
5
  title: string;
@@ -0,0 +1,12 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { type Ref } from 'react';
3
+ import { type ScrollAreaAxis } from './useOverlayScrollbars.tsx';
4
+ export type ScrollAreaProps = Omit<useRender.ComponentProps<'div'>, 'className' | 'ref'> & {
5
+ axis?: ScrollAreaAxis;
6
+ className?: string;
7
+ ref?: Ref<HTMLDivElement>;
8
+ viewportRef?: Ref<HTMLElement>;
9
+ viewportClassName?: string;
10
+ coveredBottom?: number;
11
+ };
12
+ export declare function ScrollArea({ axis, className, viewportClassName, viewportRef, coveredBottom, ref, render, ...props }: ScrollAreaProps): import("react").JSX.Element;
@@ -0,0 +1,144 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
+ import { useState } from 'react';
5
+ import { mergeRefs } from './merge-refs.js';
6
+ import { useOverlayScrollbars } from "./useOverlayScrollbars.js";
7
+ /* A box that scrolls natively under thin bars that float over its content and show only while it scrolls. */
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ export function ScrollArea(t0) {
10
+ const $ = _c(33);
11
+ let className;
12
+ let coveredBottom;
13
+ let props;
14
+ let ref;
15
+ let render;
16
+ let t1;
17
+ let viewportClassName;
18
+ let viewportRef;
19
+ if ($[0] !== t0) {
20
+ ({
21
+ axis: t1,
22
+ className,
23
+ viewportClassName,
24
+ viewportRef,
25
+ coveredBottom,
26
+ ref,
27
+ render,
28
+ ...props
29
+ } = t0);
30
+ $[0] = t0;
31
+ $[1] = className;
32
+ $[2] = coveredBottom;
33
+ $[3] = props;
34
+ $[4] = ref;
35
+ $[5] = render;
36
+ $[6] = t1;
37
+ $[7] = viewportClassName;
38
+ $[8] = viewportRef;
39
+ } else {
40
+ className = $[1];
41
+ coveredBottom = $[2];
42
+ props = $[3];
43
+ ref = $[4];
44
+ render = $[5];
45
+ t1 = $[6];
46
+ viewportClassName = $[7];
47
+ viewportRef = $[8];
48
+ }
49
+ const axis = t1 === undefined ? "y" : t1;
50
+ const [viewport, setViewport] = useState(null);
51
+ let t2;
52
+ if ($[9] !== axis) {
53
+ t2 = {
54
+ axis
55
+ };
56
+ $[9] = axis;
57
+ $[10] = t2;
58
+ } else {
59
+ t2 = $[10];
60
+ }
61
+ const scrollbars = useOverlayScrollbars(viewport, t2);
62
+ let t3;
63
+ if ($[11] !== viewportRef) {
64
+ t3 = mergeRefs(setViewport, viewportRef);
65
+ $[11] = viewportRef;
66
+ $[12] = t3;
67
+ } else {
68
+ t3 = $[12];
69
+ }
70
+ let t4;
71
+ if ($[13] !== viewportClassName) {
72
+ t4 = clsx("ade-scroll-viewport", viewportClassName);
73
+ $[13] = viewportClassName;
74
+ $[14] = t4;
75
+ } else {
76
+ t4 = $[14];
77
+ }
78
+ let t5;
79
+ if ($[15] !== axis || $[16] !== props || $[17] !== t4) {
80
+ t5 = {
81
+ ...props,
82
+ "data-axis": axis,
83
+ className: t4
84
+ };
85
+ $[15] = axis;
86
+ $[16] = props;
87
+ $[17] = t4;
88
+ $[18] = t5;
89
+ } else {
90
+ t5 = $[18];
91
+ }
92
+ let t6;
93
+ if ($[19] !== render || $[20] !== t3 || $[21] !== t5) {
94
+ t6 = {
95
+ render,
96
+ ref: t3,
97
+ defaultTagName: "div",
98
+ props: t5
99
+ };
100
+ $[19] = render;
101
+ $[20] = t3;
102
+ $[21] = t5;
103
+ $[22] = t6;
104
+ } else {
105
+ t6 = $[22];
106
+ }
107
+ const content = useRender(t6);
108
+ let t7;
109
+ if ($[23] !== className) {
110
+ t7 = clsx("ade-scroll-area", className);
111
+ $[23] = className;
112
+ $[24] = t7;
113
+ } else {
114
+ t7 = $[24];
115
+ }
116
+ let t8;
117
+ if ($[25] !== coveredBottom) {
118
+ t8 = coveredBottom ? {
119
+ "--scrollbar-covered-bottom": `${coveredBottom}px`
120
+ } : undefined;
121
+ $[25] = coveredBottom;
122
+ $[26] = t8;
123
+ } else {
124
+ t8 = $[26];
125
+ }
126
+ let t9;
127
+ if ($[27] !== content || $[28] !== ref || $[29] !== scrollbars || $[30] !== t7 || $[31] !== t8) {
128
+ t9 = /*#__PURE__*/_jsxs("div", {
129
+ ref: ref,
130
+ className: t7,
131
+ style: t8,
132
+ children: [content, scrollbars]
133
+ });
134
+ $[27] = content;
135
+ $[28] = ref;
136
+ $[29] = scrollbars;
137
+ $[30] = t7;
138
+ $[31] = t8;
139
+ $[32] = t9;
140
+ } else {
141
+ t9 = $[32];
142
+ }
143
+ return t9;
144
+ }
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
4
  /* A label takes the line height of the row it sits in, which is why the size carries `/[inherit]`. */
5
5
  const SECTION_LABEL = 'text-xs/[inherit] font-medium text-text-faint';
6
6
  /*
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef, useState } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { useEffect, useRef, useState } from 'react';
4
4
  import { mergeRefs } from './merge-refs.js';
5
5
  import { Tooltip } from "./Tooltip.js";
6
6
  import { useMeasuredWidth } from './useMeasuredWidth.js';
@@ -1,5 +1,5 @@
1
- import type { Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { Ref } from 'react';
3
3
  export interface SegmentedOption<T extends string> {
4
4
  id: T;
5
5
  label: string;
package/dist/Select.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Ref } from 'react';
1
+ import { type Ref } from 'react';
2
2
  import { type SelectGroup, type SelectItem } from './select-shared.ts';
3
3
  export type { SelectGroup, SelectItem };
4
4
  export interface SelectProps<T extends string> {
package/dist/Select.js CHANGED
@@ -2,6 +2,7 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import { Select as BaseSelect } from '@base-ui/react/select';
3
3
  import clsx from 'clsx';
4
4
  import { ChevronDown } from 'lucide-react';
5
+ import { useState } from 'react';
5
6
  import { useTranslation } from 'react-i18next';
6
7
  import { Icon } from "./Icon.js";
7
8
  import { MENU_LABEL } from "./menu/parts.js";
@@ -9,6 +10,7 @@ import { renderPositioner } from './popup-layer.js';
9
10
  import { RowContent } from "./select-row.js";
10
11
  import { isGroup, rowClassName, triggerClassName } from './select-shared.js';
11
12
  import { SelectSearch } from "./SelectSearch.js";
13
+ import { useOverlayScrollbars } from "./useOverlayScrollbars.js";
12
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
15
  function Row(t0) {
14
16
  const $ = _c(14);
@@ -104,7 +106,7 @@ function _temp(sum, group) {
104
106
  return sum + group.items.length;
105
107
  }
106
108
  function PlainSelect(t0) {
107
- const $ = _c(46);
109
+ const $ = _c(47);
108
110
  const {
109
111
  value,
110
112
  onValueChange,
@@ -147,6 +149,8 @@ function PlainSelect(t0) {
147
149
  t6 = $[5];
148
150
  }
149
151
  const selected = t6;
152
+ const [list, setList] = useState(null);
153
+ const scrollbars = useOverlayScrollbars(list);
150
154
  let t7;
151
155
  if ($[6] !== flat) {
152
156
  t7 = flat.map(_temp3);
@@ -261,6 +265,7 @@ function PlainSelect(t0) {
261
265
  t18 = /*#__PURE__*/_jsx(BaseSelect.Popup, {
262
266
  className: "menu-popup",
263
267
  children: /*#__PURE__*/_jsx(BaseSelect.List, {
268
+ ref: setList,
264
269
  className: "max-h-80 overflow-auto",
265
270
  children: t17
266
271
  })
@@ -271,26 +276,27 @@ function PlainSelect(t0) {
271
276
  t18 = $[35];
272
277
  }
273
278
  let t19;
274
- if ($[36] !== align || $[37] !== t18) {
279
+ if ($[36] !== align || $[37] !== scrollbars || $[38] !== t18) {
275
280
  t19 = /*#__PURE__*/_jsx(BaseSelect.Portal, {
276
- children: /*#__PURE__*/_jsx(BaseSelect.Positioner, {
281
+ children: /*#__PURE__*/_jsxs(BaseSelect.Positioner, {
277
282
  className: "popup-positioner",
278
283
  render: renderPositioner,
279
284
  side: "bottom",
280
285
  align: align,
281
286
  sideOffset: 6,
282
287
  alignItemWithTrigger: false,
283
- children: t18
288
+ children: [t18, scrollbars]
284
289
  })
285
290
  });
286
291
  $[36] = align;
287
- $[37] = t18;
288
- $[38] = t19;
292
+ $[37] = scrollbars;
293
+ $[38] = t18;
294
+ $[39] = t19;
289
295
  } else {
290
- t19 = $[38];
296
+ t19 = $[39];
291
297
  }
292
298
  let t20;
293
- if ($[39] !== disabled || $[40] !== t16 || $[41] !== t19 || $[42] !== t7 || $[43] !== t8 || $[44] !== value) {
299
+ if ($[40] !== disabled || $[41] !== t16 || $[42] !== t19 || $[43] !== t7 || $[44] !== t8 || $[45] !== value) {
294
300
  t20 = /*#__PURE__*/_jsxs(BaseSelect.Root, {
295
301
  items: t7,
296
302
  value: value,
@@ -298,15 +304,15 @@ function PlainSelect(t0) {
298
304
  onValueChange: t8,
299
305
  children: [t16, t19]
300
306
  });
301
- $[39] = disabled;
302
- $[40] = t16;
303
- $[41] = t19;
304
- $[42] = t7;
305
- $[43] = t8;
306
- $[44] = value;
307
- $[45] = t20;
307
+ $[40] = disabled;
308
+ $[41] = t16;
309
+ $[42] = t19;
310
+ $[43] = t7;
311
+ $[44] = t8;
312
+ $[45] = value;
313
+ $[46] = t20;
308
314
  } else {
309
- t20 = $[45];
315
+ t20 = $[46];
310
316
  }
311
317
  return t20;
312
318
  }
@@ -1,18 +1,19 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useState } from 'react';
3
2
  import { Combobox } from '@base-ui/react/combobox';
4
3
  import clsx from 'clsx';
5
4
  import { ChevronDown, Search } from 'lucide-react';
5
+ import { useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { Icon } from "./Icon.js";
8
8
  import { MENU_LABEL } from "./menu/parts.js";
9
9
  import { renderPositioner } from './popup-layer.js';
10
10
  import { RowContent } from "./select-row.js";
11
11
  import { isGroup, rowClassName, triggerClassName } from './select-shared.js';
12
+ import { useOverlayScrollbars } from "./useOverlayScrollbars.js";
12
13
  /* The `Select` with a search field on top of its options, for lists too long to scan. A combobox of Base UI brings the filtering and the keyboard. */
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
15
  export function SelectSearch(t0) {
15
- const $ = _c(67);
16
+ const $ = _c(70);
16
17
  const {
17
18
  value,
18
19
  onValueChange,
@@ -81,6 +82,8 @@ export function SelectSearch(t0) {
81
82
  t8 = $[12];
82
83
  }
83
84
  const searchLabel = t8;
85
+ const [list, setList] = useState(null);
86
+ const scrollbars = useOverlayScrollbars(list);
84
87
  let t9;
85
88
  if ($[13] !== byValue || $[14] !== value) {
86
89
  t9 = itemValue => {
@@ -260,7 +263,8 @@ export function SelectSearch(t0) {
260
263
  let t25;
261
264
  if ($[49] !== groups || $[50] !== renderRow) {
262
265
  t25 = /*#__PURE__*/_jsx(Combobox.List, {
263
- className: "min-h-0 overflow-auto",
266
+ ref: setList,
267
+ className: "min-h-0 overflow-auto pr-1",
264
268
  children: groups ? group_1 => /*#__PURE__*/_jsxs(Combobox.Group, {
265
269
  items: group_1.items,
266
270
  children: [/*#__PURE__*/_jsx(Combobox.GroupLabel, {
@@ -278,39 +282,51 @@ export function SelectSearch(t0) {
278
282
  t25 = $[51];
279
283
  }
280
284
  let t26;
281
- if ($[52] !== t22 || $[53] !== t24 || $[54] !== t25) {
282
- t26 = /*#__PURE__*/_jsxs(Combobox.Popup, {
283
- className: "menu-popup flex max-h-96 flex-col",
284
- children: [t22, t24, t25]
285
+ if ($[52] !== scrollbars || $[53] !== t25) {
286
+ t26 = /*#__PURE__*/_jsxs("div", {
287
+ className: "relative -mr-1 flex min-h-0 flex-col",
288
+ children: [t25, scrollbars]
285
289
  });
286
- $[52] = t22;
287
- $[53] = t24;
288
- $[54] = t25;
289
- $[55] = t26;
290
+ $[52] = scrollbars;
291
+ $[53] = t25;
292
+ $[54] = t26;
290
293
  } else {
291
- t26 = $[55];
294
+ t26 = $[54];
292
295
  }
293
296
  let t27;
294
- if ($[56] !== align || $[57] !== t26) {
295
- t27 = /*#__PURE__*/_jsx(Combobox.Portal, {
297
+ if ($[55] !== t22 || $[56] !== t24 || $[57] !== t26) {
298
+ t27 = /*#__PURE__*/_jsxs(Combobox.Popup, {
299
+ className: "menu-popup flex max-h-96 flex-col",
300
+ children: [t22, t24, t26]
301
+ });
302
+ $[55] = t22;
303
+ $[56] = t24;
304
+ $[57] = t26;
305
+ $[58] = t27;
306
+ } else {
307
+ t27 = $[58];
308
+ }
309
+ let t28;
310
+ if ($[59] !== align || $[60] !== t27) {
311
+ t28 = /*#__PURE__*/_jsx(Combobox.Portal, {
296
312
  children: /*#__PURE__*/_jsx(Combobox.Positioner, {
297
313
  className: "popup-positioner",
298
314
  render: renderPositioner,
299
315
  side: "bottom",
300
316
  align: align,
301
317
  sideOffset: 6,
302
- children: t26
318
+ children: t27
303
319
  })
304
320
  });
305
- $[56] = align;
306
- $[57] = t26;
307
- $[58] = t27;
321
+ $[59] = align;
322
+ $[60] = t27;
323
+ $[61] = t28;
308
324
  } else {
309
- t27 = $[58];
325
+ t28 = $[61];
310
326
  }
311
- let t28;
312
- if ($[59] !== comboboxItems || $[60] !== disabled || $[61] !== t10 || $[62] !== t11 || $[63] !== t20 || $[64] !== t27 || $[65] !== value) {
313
- t28 = /*#__PURE__*/_jsxs(Combobox.Root, {
327
+ let t29;
328
+ if ($[62] !== comboboxItems || $[63] !== disabled || $[64] !== t10 || $[65] !== t11 || $[66] !== t20 || $[67] !== t28 || $[68] !== value) {
329
+ t29 = /*#__PURE__*/_jsxs(Combobox.Root, {
314
330
  items: comboboxItems,
315
331
  value: value,
316
332
  disabled: disabled,
@@ -319,20 +335,20 @@ export function SelectSearch(t0) {
319
335
  onValueChange: t11,
320
336
  onInputValueChange: setQuery,
321
337
  onOpenChange: t12,
322
- children: [t20, t27]
338
+ children: [t20, t28]
323
339
  });
324
- $[59] = comboboxItems;
325
- $[60] = disabled;
326
- $[61] = t10;
327
- $[62] = t11;
328
- $[63] = t20;
329
- $[64] = t27;
330
- $[65] = value;
331
- $[66] = t28;
340
+ $[62] = comboboxItems;
341
+ $[63] = disabled;
342
+ $[64] = t10;
343
+ $[65] = t11;
344
+ $[66] = t20;
345
+ $[67] = t28;
346
+ $[68] = value;
347
+ $[69] = t29;
332
348
  } else {
333
- t28 = $[66];
349
+ t29 = $[69];
334
350
  }
335
- return t28;
351
+ return t29;
336
352
  }
337
353
  function _temp5(item_1) {
338
354
  return item_1.value;
@@ -2,8 +2,8 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { isApplePlatform } from './platform.js';
5
- import { formatShortcut } from './shortcut.js';
6
5
  import { ModifierHold, placeHint, shortcutHintTargets } from './shortcut-hints.js';
6
+ import { formatShortcut } from './shortcut.js';
7
7
  /* Whether a person can see the button now: on screen, not faded out, and not under a dialog or another node. */
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const isSeen = (element, rect) => {
package/dist/Slider.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useId } from 'react';
3
- import clsx from 'clsx';
4
2
  import { Slider as BaseSlider } from '@base-ui/react/slider';
3
+ import clsx from 'clsx';
4
+ import { useId } from 'react';
5
5
  import { formatFixed } from './format/number.js';
6
6
  import { placesOf } from './step-places.js';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef, useState } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { useEffect, useRef, useState } from 'react';
4
4
  import { ColumnResizeHandle } from "./ColumnResizeHandle.js";
5
5
  import { mergeRefs } from './merge-refs.js';
6
6
  import { useColumnResize } from './useColumnResize.js';
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useState } from 'react';
3
2
  import clsx from 'clsx';
4
3
  import { ChevronDown } from 'lucide-react';
4
+ import { useState } from 'react';
5
5
  import { splitFrameClass, splitHalfClass } from './button-class.js';
6
6
  import { Icon } from "./Icon.js";
7
7
  import { MenuPopup, MenuRoot, MenuTrigger } from "./menu/parts.js";
package/dist/Surface.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
4
  const FLOAT = 'border border-border bg-[color-mix(in_srgb,var(--surface-raised)_88%,transparent)] shadow-float backdrop-blur-[14px]';
5
5
  /*
6
6
  * The glass card that floats over the content under it: a dock, a banner, a toast, a find bar, a
package/dist/Switch.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { Switch as BaseSwitch } from '@base-ui/react/switch';
3
+ import clsx from 'clsx';
4
4
  /* On or off, as a switch rather than a checkbox: a setting that takes effect the moment it flips. */
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export function Switch(t0) {
package/dist/TextMenu.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useRef, useState } from 'react';
3
2
  import { Copy, Scan } from 'lucide-react';
3
+ import { useRef, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { copyText } from './clipboard.js';
6
6
  import { Icon } from "./Icon.js";
7
7
  import { Kbd } from "./Kbd.js";
8
- import { mergeRefs } from './merge-refs.js';
9
8
  import { ContextMenuRoot, ContextMenuTrigger, MenuItem, MenuPopup, MenuSeparator } from "./menu/parts.js";
9
+ import { mergeRefs } from './merge-refs.js';
10
10
  import { isApplePlatform } from './platform.js';
11
11
  import { selectAllWithin, selectionWithin } from './selection.js';
12
12
  import { EDIT_SHORTCUTS, matchesShortcut } from './shortcut.js';
package/dist/Toasts.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useState } from 'react';
3
2
  import clsx from 'clsx';
4
- import { useTranslation } from 'react-i18next';
5
3
  import { CircleAlert, CircleCheck, Trash, X } from 'lucide-react';
4
+ import { useState } from 'react';
5
+ import { useTranslation } from 'react-i18next';
6
6
  import { useStore } from 'zustand';
7
7
  import { Button } from "./Button.js";
8
8
  import { Icon } from "./Icon.js";
package/dist/Tooltip.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type ComponentProps, type ReactElement, type ReactNode } from 'react';
2
1
  import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
2
+ import { type ComponentProps, type ReactElement, type ReactNode } from 'react';
3
3
  import type { Shortcut } from './shortcut.ts';
4
4
  export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
5
5
  export declare function TooltipProvider({ children }: {
package/dist/Tooltip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import 'react';
3
2
  import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
3
+ import 'react';
4
4
  import { Kbd } from "./Kbd.js";
5
5
  import { registerShortcutHint } from './shortcut-hints.js';
6
6
  /* One provider per app. Tooltips share a delay, so moving along a row of buttons feels instant. `UIProvider` mounts it. */
@@ -1,5 +1,5 @@
1
- import { type ReactNode } from 'react';
2
1
  import type { i18n as I18n } from 'i18next';
2
+ import { type ReactNode } from 'react';
3
3
  import { type FormatSource } from './format/locale.ts';
4
4
  export interface UIProviderProps {
5
5
  i18n: I18n;
package/dist/Waveform.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useRef } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { useRef } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { formatClockDuration } from './format/duration.js';
6
6
  import { mergeRefs } from './merge-refs.js';
package/dist/Wipe.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useRef } from 'react';
3
2
  import clsx from 'clsx';
4
3
  import { ChevronsLeftRight } from 'lucide-react';
5
- import { Icon } from "./Icon.js";
4
+ import { useRef } from 'react';
6
5
  import { formatPercent } from './format/number.js';
6
+ import { Icon } from "./Icon.js";
7
7
  import { mergeRefs } from './merge-refs.js';
8
8
  import { splitAt, splitForKey } from './wipe-split.js';
9
9
  /* It fills the positioned element it sits in. A plain line handle is dragged anywhere along its height. */
@@ -1,6 +1,6 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
- import type { LucideIcon } from 'lucide-react';
3
1
  import { Autocomplete } from '@base-ui/react/autocomplete';
2
+ import type { LucideIcon } from 'lucide-react';
3
+ import { type ComponentProps, type ReactNode } from 'react';
4
4
  import { type PlacementKey } from '../placement.ts';
5
5
  import type { Shortcut } from '../shortcut.ts';
6
6
  export declare const ComboboxRoot: typeof Autocomplete.Root;
@@ -13,7 +13,7 @@ export type ComboboxInputProps = Omit<ComponentProps<typeof Autocomplete.Input>,
13
13
  export declare function ComboboxInput({ size, mono, icon, className, id, ...props }: ComboboxInputProps): import("react").JSX.Element;
14
14
  type Placement = Pick<ComponentProps<typeof Autocomplete.Positioner>, PlacementKey>;
15
15
  export type ComboboxPopupProps = ComponentProps<typeof Autocomplete.Popup> & Placement;
16
- export declare function ComboboxPopup({ side, align, sideOffset, className, ...props }: ComboboxPopupProps): import("react").JSX.Element;
16
+ export declare function ComboboxPopup({ side, align, sideOffset, className, ref, ...props }: ComboboxPopupProps): import("react").JSX.Element;
17
17
  export declare function ComboboxList(props: ComponentProps<typeof Autocomplete.List>): import("react").JSX.Element;
18
18
  export type ComboboxItemProps = ComponentProps<typeof Autocomplete.Item> & {
19
19
  icon?: ReactNode;