@adecore/ui 0.53.3 → 0.54.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 (184) 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.d.ts +1 -1
  18. package/dist/FileIcon.js +44 -36
  19. package/dist/Icon.d.ts +1 -1
  20. package/dist/IconButton.d.ts +3 -3
  21. package/dist/IconButton.js +2 -2
  22. package/dist/IconPicker.js +35 -32
  23. package/dist/Input.d.ts +1 -1
  24. package/dist/ListRow.js +1 -1
  25. package/dist/MiddleTruncate.js +2 -2
  26. package/dist/PanelEmpty.d.ts +1 -1
  27. package/dist/PanelHeader.d.ts +1 -1
  28. package/dist/PanelHeader.js +1 -1
  29. package/dist/ProjectSwitcher.js +1 -1
  30. package/dist/PromptDialog.d.ts +1 -1
  31. package/dist/ScrollArea.d.ts +12 -0
  32. package/dist/ScrollArea.js +144 -0
  33. package/dist/SectionLabel.js +1 -1
  34. package/dist/SegmentBar.js +1 -1
  35. package/dist/Segmented.d.ts +1 -1
  36. package/dist/Select.d.ts +1 -1
  37. package/dist/Select.js +22 -16
  38. package/dist/SelectSearch.js +49 -33
  39. package/dist/ShortcutHints.js +1 -1
  40. package/dist/Slider.js +2 -2
  41. package/dist/SlidingColumn.js +1 -1
  42. package/dist/SplitButton.js +1 -1
  43. package/dist/Surface.js +1 -1
  44. package/dist/Switch.js +1 -1
  45. package/dist/TextMenu.js +2 -2
  46. package/dist/Toasts.js +2 -2
  47. package/dist/Tooltip.d.ts +1 -1
  48. package/dist/Tooltip.js +1 -1
  49. package/dist/UIProvider.d.ts +1 -1
  50. package/dist/Waveform.js +1 -1
  51. package/dist/Wipe.js +2 -2
  52. package/dist/combobox/parts.d.ts +3 -3
  53. package/dist/combobox/parts.js +53 -32
  54. package/dist/command-palette/parts.d.ts +1 -1
  55. package/dist/command-palette/parts.js +22 -7
  56. package/dist/command-palette/virtual.js +4 -4
  57. package/dist/dialog/parts.d.ts +1 -1
  58. package/dist/dialog/parts.js +2 -2
  59. package/dist/file-icon.d.ts +2 -0
  60. package/dist/file-icon.js +12 -0
  61. package/dist/file-tree/parts.d.ts +2 -2
  62. package/dist/file-tree/parts.js +3 -3
  63. package/dist/file-tree/use-file-tree-shift.d.ts +1 -1
  64. package/dist/file-tree/use-file-tree-shift.js +1 -1
  65. package/dist/index.d.ts +2 -0
  66. package/dist/index.js +2 -0
  67. package/dist/key-value-list/parts.js +1 -1
  68. package/dist/menu/parts.d.ts +3 -3
  69. package/dist/menu/parts.js +46 -30
  70. package/dist/popover/parts.d.ts +3 -3
  71. package/dist/popover/parts.js +110 -71
  72. package/dist/project-switcher-row.js +1 -1
  73. package/dist/scrollbar-geometry.d.ts +15 -0
  74. package/dist/scrollbar-geometry.js +48 -0
  75. package/dist/settings/MasterDetail.js +40 -30
  76. package/dist/settings/SettingsDialog.d.ts +1 -1
  77. package/dist/settings/SettingsDialog.js +27 -11
  78. package/dist/settings/SettingsRow.d.ts +1 -1
  79. package/dist/settings/SettingsRow.js +1 -1
  80. package/dist/settings/SettingsSection.d.ts +1 -1
  81. package/dist/tabs/parts.d.ts +1 -1
  82. package/dist/tabs/parts.js +3 -3
  83. package/dist/testing/dedupe.js +1 -1
  84. package/dist/theme.css +91 -1
  85. package/dist/tree/parts.js +2 -2
  86. package/dist/useOverlayScrollbars.d.ts +7 -0
  87. package/dist/useOverlayScrollbars.js +281 -0
  88. package/dist/workspace/PaneBar.js +2 -2
  89. package/dist/workspace/SplitView.d.ts +1 -1
  90. package/dist/workspace/SplitView.js +4 -4
  91. package/dist/workspace/TabStrip.d.ts +1 -1
  92. package/dist/workspace/TabStrip.js +2 -2
  93. package/dist/workspace/Workspace.d.ts +1 -1
  94. package/dist/workspace/Workspace.js +2 -2
  95. package/dist/workspace/WorkspaceRail.js +1 -1
  96. package/dist/workspace/WorkspaceTopRow.js +1 -1
  97. package/package.json +1 -1
  98. package/src/AccentSwatches.tsx +1 -1
  99. package/src/Banner.tsx +1 -1
  100. package/src/Button.tsx +1 -1
  101. package/src/ButtonGroup.tsx +1 -1
  102. package/src/Checkbox.tsx +2 -2
  103. package/src/ChoiceCards.tsx +3 -3
  104. package/src/CloseButton.tsx +2 -2
  105. package/src/ColorSwatch.tsx +2 -2
  106. package/src/ColorWheelPicker.tsx +1 -1
  107. package/src/ColumnResizeHandle.tsx +1 -1
  108. package/src/CopyButton.tsx +1 -1
  109. package/src/DockShell.tsx +1 -1
  110. package/src/EmptyState.tsx +2 -2
  111. package/src/ErrorBoundary.tsx +4 -3
  112. package/src/Field.tsx +2 -2
  113. package/src/FileIcon.tsx +15 -6
  114. package/src/Icon.tsx +2 -2
  115. package/src/IconButton.tsx +3 -3
  116. package/src/IconPicker.tsx +7 -6
  117. package/src/Input.tsx +2 -2
  118. package/src/Kbd.tsx +1 -1
  119. package/src/ListRow.tsx +1 -1
  120. package/src/Meter.tsx +1 -1
  121. package/src/MiddleTruncate.tsx +2 -2
  122. package/src/PanelEmpty.tsx +2 -2
  123. package/src/PanelHeader.tsx +2 -2
  124. package/src/Pill.tsx +1 -1
  125. package/src/ProjectSwitcher.tsx +2 -2
  126. package/src/PromptDialog.tsx +1 -1
  127. package/src/RelativeTime.tsx +1 -1
  128. package/src/ScrollArea.tsx +47 -0
  129. package/src/SectionLabel.tsx +1 -1
  130. package/src/SegmentBar.tsx +1 -1
  131. package/src/Segmented.tsx +1 -1
  132. package/src/Select.tsx +6 -2
  133. package/src/SelectSearch.tsx +19 -12
  134. package/src/Separator.tsx +1 -1
  135. package/src/ShortcutHints.tsx +1 -1
  136. package/src/Skeleton.tsx +1 -1
  137. package/src/Slider.tsx +2 -2
  138. package/src/SlidingColumn.tsx +1 -1
  139. package/src/Spinner.tsx +1 -1
  140. package/src/SplitButton.tsx +1 -1
  141. package/src/Stepper.tsx +1 -1
  142. package/src/Surface.tsx +1 -1
  143. package/src/Switch.tsx +2 -2
  144. package/src/TextMenu.tsx +2 -2
  145. package/src/Tile.tsx +1 -1
  146. package/src/Toasts.tsx +2 -2
  147. package/src/Tooltip.tsx +2 -2
  148. package/src/UIProvider.tsx +1 -1
  149. package/src/Waveform.tsx +1 -1
  150. package/src/Wipe.tsx +2 -2
  151. package/src/ZoomControls.tsx +1 -1
  152. package/src/combobox/parts.tsx +9 -4
  153. package/src/command-palette/parts.tsx +25 -19
  154. package/src/command-palette/virtual.tsx +4 -4
  155. package/src/dialog/parts.tsx +2 -2
  156. package/src/file-icon.ts +15 -0
  157. package/src/file-tree/parts.tsx +6 -6
  158. package/src/file-tree/use-empty-lines.ts +1 -1
  159. package/src/file-tree/use-file-tree-shift.tsx +2 -2
  160. package/src/file-tree/use-slots.ts +2 -2
  161. package/src/index.ts +2 -0
  162. package/src/key-value-list/parts.tsx +1 -1
  163. package/src/menu/parts.tsx +11 -6
  164. package/src/popover/parts.tsx +13 -5
  165. package/src/project-switcher-row.tsx +2 -2
  166. package/src/scrollbar-geometry.ts +67 -0
  167. package/src/select-shared.ts +1 -1
  168. package/src/settings/DetailHeader.tsx +1 -1
  169. package/src/settings/MasterDetail.tsx +9 -6
  170. package/src/settings/SettingsDialog.tsx +16 -9
  171. package/src/settings/SettingsRow.tsx +1 -1
  172. package/src/settings/SettingsSection.tsx +1 -1
  173. package/src/tabs/parts.tsx +4 -4
  174. package/src/testing/dedupe.ts +1 -1
  175. package/src/theme.css +91 -1
  176. package/src/tree/parts.tsx +2 -2
  177. package/src/useOverlayScrollbars.tsx +263 -0
  178. package/src/workspace/DropPreview.tsx +1 -1
  179. package/src/workspace/PaneBar.tsx +2 -2
  180. package/src/workspace/SplitView.tsx +5 -5
  181. package/src/workspace/TabStrip.tsx +3 -3
  182. package/src/workspace/Workspace.tsx +2 -2
  183. package/src/workspace/WorkspaceRail.tsx +1 -1
  184. package/src/workspace/WorkspaceTopRow.tsx +1 -1
@@ -1,15 +1,16 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useId, useLayoutEffect, useRef, useState } from 'react';
3
2
  import clsx from 'clsx';
4
3
  import { Ban, ChevronDown, Search, X } from 'lucide-react';
4
+ import { useId, useLayoutEffect, useRef, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Button } from "./Button.js";
7
7
  import { EmptyState } from "./EmptyState.js";
8
8
  import { formatNumber } from './format/number.js';
9
+ import { cellForKey, escapeClearsSearch, filterSections, isGrouped, sectionsOf, tabStopOf } from './icon-picker.js';
9
10
  import { Icon } from "./Icon.js";
10
11
  import { IconButton } from "./IconButton.js";
11
- import { cellForKey, escapeClearsSearch, filterSections, isGrouped, sectionsOf, tabStopOf } from './icon-picker.js';
12
12
  import { PopoverPopup, PopoverRoot, PopoverTrigger } from "./popover/parts.js";
13
+ import { ScrollArea } from "./ScrollArea.js";
13
14
  import { SectionLabel } from "./SectionLabel.js";
14
15
  import { Tooltip } from "./Tooltip.js";
15
16
  /* A row of cells is 28 high with a gap of 4. Under a heading of 28 the last row keeps 8 below it; without headings the grid has 6 above as well. */
@@ -364,7 +365,7 @@ function _temp(section) {
364
365
  return section.icons;
365
366
  }
366
367
  function IconPickerPanel(t0) {
367
- const $ = _c(34);
368
+ const $ = _c(35);
368
369
  const {
369
370
  id,
370
371
  name,
@@ -479,12 +480,13 @@ function IconPickerPanel(t0) {
479
480
  } else {
480
481
  t5 = $[10];
481
482
  }
483
+ const T0 = ScrollArea;
482
484
  const t6 = `${id}-grid`;
483
485
  const t7 = "radiogroup";
484
486
  const t8 = headed ? "scroll-pt-7" : "px-1.5 pt-1.5 pb-2";
485
487
  let t9;
486
488
  if ($[11] !== t8) {
487
- t9 = clsx("relative overflow-y-auto overscroll-contain", t8);
489
+ t9 = clsx("relative overscroll-contain", t8);
488
490
  $[11] = t8;
489
491
  $[12] = t9;
490
492
  } else {
@@ -555,31 +557,32 @@ function IconPickerPanel(t0) {
555
557
  }, section_0.id);
556
558
  });
557
559
  let t14;
558
- if ($[16] !== moveFocus || $[17] !== name || $[18] !== t10 || $[19] !== t11 || $[20] !== t12 || $[21] !== t6 || $[22] !== t9) {
559
- t14 = /*#__PURE__*/_jsx("div", {
560
- ref: area,
560
+ if ($[16] !== T0 || $[17] !== moveFocus || $[18] !== name || $[19] !== t10 || $[20] !== t11 || $[21] !== t12 || $[22] !== t6 || $[23] !== t9) {
561
+ t14 = /*#__PURE__*/_jsx(T0, {
562
+ viewportRef: area,
561
563
  id: t6,
562
564
  role: t7,
563
565
  "aria-label": name,
564
- className: t9,
566
+ viewportClassName: t9,
565
567
  style: t10,
566
568
  onScroll: t11,
567
569
  onKeyDown: moveFocus,
568
570
  children: t12
569
571
  });
570
- $[16] = moveFocus;
571
- $[17] = name;
572
- $[18] = t10;
573
- $[19] = t11;
574
- $[20] = t12;
575
- $[21] = t6;
576
- $[22] = t9;
577
- $[23] = t14;
578
- } else {
579
- t14 = $[23];
572
+ $[16] = T0;
573
+ $[17] = moveFocus;
574
+ $[18] = name;
575
+ $[19] = t10;
576
+ $[20] = t11;
577
+ $[21] = t12;
578
+ $[22] = t6;
579
+ $[23] = t9;
580
+ $[24] = t14;
581
+ } else {
582
+ t14 = $[24];
580
583
  }
581
584
  let t15;
582
- if ($[24] !== disabled || $[25] !== onClear || $[26] !== t || $[27] !== value) {
585
+ if ($[25] !== disabled || $[26] !== onClear || $[27] !== t || $[28] !== value) {
583
586
  t15 = onClear && /*#__PURE__*/_jsx("div", {
584
587
  className: "flex border-t border-border p-1",
585
588
  children: /*#__PURE__*/_jsxs(Button, {
@@ -592,27 +595,27 @@ function IconPickerPanel(t0) {
592
595
  }), t("iconPicker.none")]
593
596
  })
594
597
  });
595
- $[24] = disabled;
596
- $[25] = onClear;
597
- $[26] = t;
598
- $[27] = value;
599
- $[28] = t15;
598
+ $[25] = disabled;
599
+ $[26] = onClear;
600
+ $[27] = t;
601
+ $[28] = value;
602
+ $[29] = t15;
600
603
  } else {
601
- t15 = $[28];
604
+ t15 = $[29];
602
605
  }
603
606
  let t16;
604
- if ($[29] !== clearSearchFirst || $[30] !== t14 || $[31] !== t15 || $[32] !== t5) {
607
+ if ($[30] !== clearSearchFirst || $[31] !== t14 || $[32] !== t15 || $[33] !== t5) {
605
608
  t16 = /*#__PURE__*/_jsxs("div", {
606
609
  onKeyDown: clearSearchFirst,
607
610
  children: [t5, t14, t15]
608
611
  });
609
- $[29] = clearSearchFirst;
610
- $[30] = t14;
611
- $[31] = t15;
612
- $[32] = t5;
613
- $[33] = t16;
612
+ $[30] = clearSearchFirst;
613
+ $[31] = t14;
614
+ $[32] = t15;
615
+ $[33] = t5;
616
+ $[34] = t16;
614
617
  } else {
615
- t16 = $[33];
618
+ t16 = $[34];
616
619
  }
617
620
  return t16;
618
621
  }
package/dist/Input.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
3
  export interface InputProps extends Omit<ComponentProps<'input'>, 'size'> {
4
4
  size?: 'md' | 'sm';
5
5
  mono?: boolean;
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';