@erxes/ui 4.0.0-v2.1 → 4.0.0-v2.11

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 (318) hide show
  1. package/AGENTS.md +58 -0
  2. package/CATALOG.md +251 -0
  3. package/README.md +25 -2
  4. package/dist/components/accordion.d.ts +1 -0
  5. package/dist/components/accordion.js +1 -0
  6. package/dist/components/alert-dialog.d.ts +4 -0
  7. package/dist/components/alert-dialog.js +4 -0
  8. package/dist/components/alert.d.ts +1 -0
  9. package/dist/components/alert.js +1 -0
  10. package/dist/components/avatar.d.ts +2 -0
  11. package/dist/components/avatar.js +1 -0
  12. package/dist/components/background-gradient-animation.d.ts +4 -1
  13. package/dist/components/background-gradient-animation.js +4 -1
  14. package/dist/components/badge.d.ts +3 -0
  15. package/dist/components/badge.js +2 -0
  16. package/dist/components/breadcrumb.d.ts +1 -0
  17. package/dist/components/breadcrumb.js +1 -0
  18. package/dist/components/button.d.ts +6 -1
  19. package/dist/components/button.js +5 -1
  20. package/dist/components/calendar.d.ts +5 -0
  21. package/dist/components/calendar.js +4 -0
  22. package/dist/components/card.d.ts +1 -0
  23. package/dist/components/card.js +1 -0
  24. package/dist/components/chart-config.d.ts +4 -1
  25. package/dist/components/charts.d.ts +6 -0
  26. package/dist/components/charts.js +12 -3
  27. package/dist/components/checkbox.d.ts +1 -0
  28. package/dist/components/checkbox.js +1 -0
  29. package/dist/components/choicebox-group.d.ts +1 -0
  30. package/dist/components/choicebox-group.js +1 -0
  31. package/dist/components/collapsible.d.ts +1 -0
  32. package/dist/components/collapsible.js +1 -0
  33. package/dist/components/color-picker.d.ts +1 -0
  34. package/dist/components/color-picker.js +13 -6
  35. package/dist/components/combobox.d.ts +6 -1
  36. package/dist/components/combobox.js +9 -1
  37. package/dist/components/command-bar.d.ts +4 -0
  38. package/dist/components/command-bar.js +4 -0
  39. package/dist/components/command.d.ts +4 -0
  40. package/dist/components/command.js +4 -0
  41. package/dist/components/context-menu.d.ts +1 -0
  42. package/dist/components/context-menu.js +1 -0
  43. package/dist/components/copy-text.d.ts +1 -0
  44. package/dist/components/copy-text.js +1 -0
  45. package/dist/components/date-picker-value.d.ts +5 -9
  46. package/dist/components/date-picker-value.js +15 -34
  47. package/dist/components/date-picker.d.ts +4 -4
  48. package/dist/components/date-picker.js +9 -7
  49. package/dist/components/date-text-input.d.ts +2 -4
  50. package/dist/components/date-text-input.js +11 -9
  51. package/dist/components/dialog.d.ts +4 -0
  52. package/dist/components/dialog.js +5 -1
  53. package/dist/components/drag-handle.d.ts +1 -0
  54. package/dist/components/drag-handle.js +1 -0
  55. package/dist/components/dropdown-menu.d.ts +1 -0
  56. package/dist/components/dropdown-menu.js +1 -0
  57. package/dist/components/empty.d.ts +6 -1
  58. package/dist/components/empty.js +25 -2
  59. package/dist/components/form.d.ts +6 -2
  60. package/dist/components/form.js +8 -2
  61. package/dist/components/hover-card.d.ts +1 -0
  62. package/dist/components/hover-card.js +1 -0
  63. package/dist/components/icon-tip.d.ts +7 -0
  64. package/dist/components/icon-tip.js +16 -0
  65. package/dist/components/info-card.d.ts +4 -0
  66. package/dist/components/info-card.js +4 -0
  67. package/dist/components/input-group.d.ts +5 -4
  68. package/dist/components/input-group.js +5 -4
  69. package/dist/components/input.d.ts +1 -0
  70. package/dist/components/input.js +1 -0
  71. package/dist/components/kbd.d.ts +2 -1
  72. package/dist/components/kbd.js +2 -1
  73. package/dist/components/label.d.ts +1 -1
  74. package/dist/components/label.js +1 -1
  75. package/dist/components/multiselect.d.ts +1 -0
  76. package/dist/components/multiselect.js +3 -2
  77. package/dist/components/on-demand.d.ts +6 -0
  78. package/dist/components/on-demand.js +6 -0
  79. package/dist/components/popover.d.ts +4 -0
  80. package/dist/components/popover.js +4 -0
  81. package/dist/components/radio-group.d.ts +1 -0
  82. package/dist/components/radio-group.js +1 -0
  83. package/dist/components/scroll-area.d.ts +1 -0
  84. package/dist/components/scroll-area.js +1 -0
  85. package/dist/components/select.d.ts +5 -1
  86. package/dist/components/select.js +7 -1
  87. package/dist/components/separator.d.ts +4 -0
  88. package/dist/components/separator.js +4 -0
  89. package/dist/components/sheet.d.ts +4 -0
  90. package/dist/components/sheet.js +8 -4
  91. package/dist/components/sidebar/panel.js +29 -7
  92. package/dist/components/sidebar.d.ts +1 -0
  93. package/dist/components/sidebar.js +1 -0
  94. package/dist/components/skeleton.d.ts +1 -0
  95. package/dist/components/skeleton.js +1 -0
  96. package/dist/components/spinner.d.ts +1 -0
  97. package/dist/components/spinner.js +1 -0
  98. package/dist/components/string-array.js +1 -0
  99. package/dist/components/switch.d.ts +1 -0
  100. package/dist/components/switch.js +1 -0
  101. package/dist/components/table.d.ts +4 -0
  102. package/dist/components/table.js +4 -0
  103. package/dist/components/tabs.d.ts +8 -1
  104. package/dist/components/tabs.js +8 -1
  105. package/dist/components/text-overflow.d.ts +4 -1
  106. package/dist/components/text-overflow.js +4 -1
  107. package/dist/components/textarea.d.ts +1 -0
  108. package/dist/components/textarea.js +1 -0
  109. package/dist/components/toaster.d.ts +4 -1
  110. package/dist/components/toaster.js +5 -2
  111. package/dist/components/toggle-group.d.ts +5 -0
  112. package/dist/components/toggle-group.js +19 -11
  113. package/dist/components/toggle.d.ts +1 -0
  114. package/dist/components/toggle.js +1 -0
  115. package/dist/components/tooltip.d.ts +4 -0
  116. package/dist/components/tooltip.js +4 -0
  117. package/dist/components/upload.d.ts +4 -0
  118. package/dist/components/upload.js +20 -11
  119. package/dist/federation.d.ts +8 -1
  120. package/dist/federation.js +12 -2
  121. package/dist/hooks/use-item-keys.d.ts +11 -0
  122. package/dist/hooks/use-item-keys.js +24 -0
  123. package/dist/hooks/use-page-hotkey.d.ts +12 -0
  124. package/dist/hooks/use-page-hotkey.js +22 -0
  125. package/dist/hooks/use-toast.d.ts +5 -0
  126. package/dist/hooks/use-toast.js +5 -0
  127. package/dist/index.d.ts +33 -6
  128. package/dist/index.js +31 -4
  129. package/dist/lib/format.d.ts +60 -0
  130. package/dist/lib/format.js +86 -0
  131. package/dist/lib/money.d.ts +13 -0
  132. package/dist/lib/money.js +21 -0
  133. package/dist/lib/stored.d.ts +13 -0
  134. package/dist/lib/stored.js +41 -0
  135. package/dist/lib/text.d.ts +11 -0
  136. package/dist/lib/text.js +18 -0
  137. package/dist/modules/attachments/use-carousel.js +5 -10
  138. package/dist/modules/blocks/hooks/useBarcodeSizeForm.d.ts +1 -1
  139. package/dist/modules/blocks/utils/parseBlocks.d.ts +1 -1
  140. package/dist/modules/blocks/utils/parseBlocks.js +1 -1
  141. package/dist/modules/conditions/ConditionValueInput.d.ts +10 -0
  142. package/dist/modules/conditions/ConditionValueInput.js +166 -0
  143. package/dist/modules/conditions/ConditionsEditor.d.ts +11 -0
  144. package/dist/modules/conditions/ConditionsEditor.js +209 -0
  145. package/dist/modules/conditions/LazyConditionsEditor.d.ts +10 -0
  146. package/dist/modules/conditions/LazyConditionsEditor.js +11 -0
  147. package/dist/modules/conditions/PathPicker.d.ts +8 -0
  148. package/dist/modules/conditions/PathPicker.js +51 -0
  149. package/dist/modules/conditions/conditions.d.ts +66 -0
  150. package/dist/modules/conditions/conditions.js +136 -0
  151. package/dist/modules/display/components/EmailDisplay.d.ts +4 -0
  152. package/dist/modules/display/components/EmailDisplay.js +6 -3
  153. package/dist/modules/display/components/PhoneDisplay.d.ts +4 -0
  154. package/dist/modules/display/components/PhoneDisplay.js +4 -0
  155. package/dist/modules/display/components/RelativeDateDisplay.d.ts +7 -5
  156. package/dist/modules/display/components/RelativeDateDisplay.js +10 -8
  157. package/dist/modules/display/components/SexDisplay.d.ts +1 -0
  158. package/dist/modules/display/components/SexDisplay.js +1 -0
  159. package/dist/modules/filter/components/Filter.d.ts +4 -0
  160. package/dist/modules/filter/components/Filter.js +4 -0
  161. package/dist/modules/filter/components/FilterBar.js +5 -7
  162. package/dist/modules/filter/components/FilterDialog.js +4 -5
  163. package/dist/modules/filter/components/FilterPopover.js +1 -1
  164. package/dist/modules/filter/components/FilterProvider.d.ts +1 -2
  165. package/dist/modules/filter/components/FilterProvider.js +22 -16
  166. package/dist/modules/filter/hooks/useFilterContext.d.ts +1 -0
  167. package/dist/modules/filter/hooks/useFilterContext.js +1 -0
  168. package/dist/modules/filter/types/filter.d.ts +0 -1
  169. package/dist/modules/hotkey/components/PopoverScoped.d.ts +5 -0
  170. package/dist/modules/hotkey/components/PopoverScoped.js +5 -0
  171. package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.d.ts +1 -0
  172. package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.js +1 -0
  173. package/dist/modules/hotkey/hooks/useScopedHotkeys.d.ts +5 -1
  174. package/dist/modules/hotkey/hooks/useScopedHotkeys.js +5 -1
  175. package/dist/modules/icons/components/IconComponent.d.ts +4 -0
  176. package/dist/modules/icons/components/IconComponent.js +4 -0
  177. package/dist/modules/icons/components/IconPicker.d.ts +4 -0
  178. package/dist/modules/icons/components/IconPicker.js +7 -5
  179. package/dist/modules/icons/providers/IconsProvider.d.ts +1 -0
  180. package/dist/modules/icons/providers/IconsProvider.js +1 -0
  181. package/dist/modules/inputs/components/EmailField.d.ts +4 -1
  182. package/dist/modules/inputs/components/EmailField.js +4 -1
  183. package/dist/modules/inputs/components/FullNameField.d.ts +6 -0
  184. package/dist/modules/inputs/components/FullNameField.js +20 -8
  185. package/dist/modules/inputs/components/PhoneField.d.ts +4 -1
  186. package/dist/modules/inputs/components/PhoneField.js +4 -1
  187. package/dist/modules/inputs/components/SexField.d.ts +1 -0
  188. package/dist/modules/inputs/components/SexField.js +1 -0
  189. package/dist/modules/layout/components/AppLayout.d.ts +6 -6
  190. package/dist/modules/layout/components/AppLayout.js +12 -13
  191. package/dist/modules/layout/components/AppLayoutResizeHandle.d.ts +5 -12
  192. package/dist/modules/layout/components/AppLayoutResizeHandle.js +15 -18
  193. package/dist/modules/layout/components/Page.d.ts +5 -0
  194. package/dist/modules/layout/components/Page.js +5 -0
  195. package/dist/modules/layout/components/PageHeader.d.ts +4 -1
  196. package/dist/modules/layout/components/PageHeader.js +9 -3
  197. package/dist/modules/list/DisplayMenu.d.ts +24 -0
  198. package/dist/modules/list/DisplayMenu.js +87 -0
  199. package/dist/modules/list/ListFilter.d.ts +63 -0
  200. package/dist/modules/list/ListFilter.js +44 -0
  201. package/dist/modules/list/ViewBar.d.ts +13 -0
  202. package/dist/modules/list/ViewBar.js +30 -0
  203. package/dist/modules/list/filter/AdvancedFilterDialog.d.ts +5 -0
  204. package/dist/modules/list/filter/AdvancedFilterDialog.js +52 -0
  205. package/dist/modules/list/filter/FieldMenus.d.ts +5 -0
  206. package/dist/modules/list/filter/FieldMenus.js +184 -0
  207. package/dist/modules/list/filter/ListFilterBar.d.ts +6 -0
  208. package/dist/modules/list/filter/ListFilterBar.js +246 -0
  209. package/dist/modules/list/filter/RecordCount.d.ts +7 -0
  210. package/dist/modules/list/filter/RecordCount.js +22 -0
  211. package/dist/modules/list/filter/RuleChips.d.ts +2 -0
  212. package/dist/modules/list/filter/RuleChips.js +157 -0
  213. package/dist/modules/list/filter/fieldIcons.d.ts +7 -0
  214. package/dist/modules/list/filter/fieldIcons.js +16 -0
  215. package/dist/modules/list/filter/filterRules.d.ts +46 -0
  216. package/dist/modules/list/filter/filterRules.js +166 -0
  217. package/dist/modules/list/filter/listFilterContext.d.ts +29 -0
  218. package/dist/modules/list/filter/listFilterContext.js +34 -0
  219. package/dist/modules/list/filter/listFilterQuery.d.ts +16 -0
  220. package/dist/modules/list/filter/listFilterQuery.js +22 -0
  221. package/dist/modules/navigation-menu/components/NavigationMenu.d.ts +4 -3
  222. package/dist/modules/navigation-menu/components/NavigationMenu.js +7 -7
  223. package/dist/modules/pickers/EntityPicker.d.ts +37 -0
  224. package/dist/modules/pickers/EntityPicker.js +67 -0
  225. package/dist/modules/pickers/LookupPicker.d.ts +51 -0
  226. package/dist/modules/pickers/LookupPicker.js +84 -0
  227. package/dist/modules/pickers/SelectMember.d.ts +41 -0
  228. package/dist/modules/pickers/SelectMember.js +122 -0
  229. package/dist/modules/pickers/members.d.ts +30 -0
  230. package/dist/modules/pickers/members.js +18 -0
  231. package/dist/modules/record-field/components/NumberField.d.ts +5 -0
  232. package/dist/modules/record-field/components/NumberField.js +14 -7
  233. package/dist/modules/record-field/components/TextField.d.ts +4 -0
  234. package/dist/modules/record-field/components/TextField.js +14 -3
  235. package/dist/modules/record-field/meta-inputs/components/PhoneInput.d.ts +5 -0
  236. package/dist/modules/record-field/meta-inputs/components/PhoneInput.js +5 -0
  237. package/dist/modules/record-list/RecordList.d.ts +18 -0
  238. package/dist/modules/record-list/RecordList.js +23 -0
  239. package/dist/modules/record-list/RecordListProvider.d.ts +30 -0
  240. package/dist/modules/record-list/RecordListProvider.js +57 -0
  241. package/dist/modules/record-list/RecordListRoot.d.ts +28 -0
  242. package/dist/modules/record-list/RecordListRoot.js +124 -0
  243. package/dist/modules/record-list/selection.d.ts +22 -0
  244. package/dist/modules/record-list/selection.js +54 -0
  245. package/dist/modules/record-panel/PanelDescriptionEditor.d.ts +9 -0
  246. package/dist/modules/record-panel/PanelDescriptionEditor.js +39 -0
  247. package/dist/modules/record-panel/PanelDescriptionField.d.ts +13 -0
  248. package/dist/modules/record-panel/PanelDescriptionField.js +39 -0
  249. package/dist/modules/record-panel/PanelField.d.ts +17 -0
  250. package/dist/modules/record-panel/PanelField.js +47 -0
  251. package/dist/modules/record-panel/PanelForm.d.ts +28 -0
  252. package/dist/modules/record-panel/PanelForm.js +88 -0
  253. package/dist/modules/record-panel/PanelLabel.d.ts +10 -0
  254. package/dist/modules/record-panel/PanelLabel.js +55 -0
  255. package/dist/modules/record-panel/PanelSection.d.ts +12 -0
  256. package/dist/modules/record-panel/PanelSection.js +24 -0
  257. package/dist/modules/record-panel/panelExpansion.d.ts +10 -0
  258. package/dist/modules/record-panel/panelExpansion.js +7 -0
  259. package/dist/modules/record-panel/useSaveOnLeave.d.ts +14 -0
  260. package/dist/modules/record-panel/useSaveOnLeave.js +42 -0
  261. package/dist/modules/record-table/components/RecordTable.d.ts +6 -0
  262. package/dist/modules/record-table/components/RecordTable.js +6 -0
  263. package/dist/modules/record-table/components/RecordTableCell.d.ts +9 -0
  264. package/dist/modules/record-table/components/RecordTableCell.js +16 -2
  265. package/dist/modules/record-table/components/RecordTableCellInline.d.ts +5 -0
  266. package/dist/modules/record-table/components/RecordTableCellInline.js +8 -7
  267. package/dist/modules/record-table/components/RecordTableCursor.js +30 -28
  268. package/dist/modules/record-table/components/RecordTableProvider.js +12 -7
  269. package/dist/modules/record-table/hooks/useTablePreferences.d.ts +1 -1
  270. package/dist/modules/record-table/hooks/useTablePreferences.js +18 -31
  271. package/dist/modules/record-table/states/RecordTableCursorState.d.ts +21 -1
  272. package/dist/modules/record-table/states/RecordTableCursorState.js +21 -3
  273. package/dist/modules/record-table/types/RecordTableCursorTypes.d.ts +1 -0
  274. package/dist/modules/record-table/types/RecordTableCursorTypes.js +1 -0
  275. package/dist/modules/records/ContactLink.d.ts +13 -0
  276. package/dist/modules/records/ContactLink.js +77 -0
  277. package/dist/modules/records/contacts.d.ts +35 -0
  278. package/dist/modules/records/contacts.js +10 -0
  279. package/dist/modules/records/openRecord.d.ts +44 -0
  280. package/dist/modules/records/openRecord.js +48 -0
  281. package/dist/state/sidebarPanelState.d.ts +5 -1
  282. package/dist/state/sidebarPanelState.js +11 -3
  283. package/dist/state/themeState.d.ts +13 -2
  284. package/dist/state/themeState.js +18 -4
  285. package/dist/theme.css +5 -2
  286. package/dist/types/SexCode.d.ts +1 -0
  287. package/dist/types/SexCode.js +1 -0
  288. package/dist/types/UIConfig.d.ts +131 -3
  289. package/dist/utils/IsUndefinedOrNull.d.ts +1 -0
  290. package/dist/utils/IsUndefinedOrNull.js +1 -0
  291. package/dist/utils/file-storage.d.ts +1 -0
  292. package/dist/utils/file-storage.js +1 -0
  293. package/dist/utils/format/formatPhoneNumber.d.ts +4 -0
  294. package/dist/utils/format/formatPhoneNumber.js +4 -0
  295. package/dist/utils/getPluginAssetsUrl.d.ts +5 -0
  296. package/dist/utils/getPluginAssetsUrl.js +5 -0
  297. package/dist/utils/host-component.d.ts +10 -0
  298. package/dist/utils/host-component.js +34 -0
  299. package/dist/utils/json.d.ts +3 -2
  300. package/dist/utils/json.js +3 -2
  301. package/dist/utils/plugin-runtime.d.ts +21 -17
  302. package/dist/utils/plugin-runtime.js +59 -12
  303. package/dist/utils/plugin-styles.d.ts +7 -0
  304. package/dist/utils/plugin-styles.js +54 -0
  305. package/dist/utils/record-timeline.d.ts +10 -9
  306. package/dist/utils/record-timeline.js +12 -17
  307. package/exports.txt +226 -0
  308. package/package.json +13 -3
  309. package/dist/constants/IntlLanguages.d.ts +0 -74
  310. package/dist/constants/IntlLanguages.js +0 -76
  311. package/dist/hooks/use-query-state.d.ts +0 -16
  312. package/dist/hooks/use-query-state.js +0 -122
  313. package/dist/modules/filter/hooks/useFilterQueryState.d.ts +0 -4
  314. package/dist/modules/filter/hooks/useFilterQueryState.js +0 -14
  315. package/dist/types/Theme.d.ts +0 -1
  316. package/dist/types/Theme.js +0 -0
  317. package/dist/utils/localization/formatDateISOStringToRelativeDate.d.ts +0 -2
  318. package/dist/utils/localization/formatDateISOStringToRelativeDate.js +0 -16
@@ -34,6 +34,7 @@ declare const DropdownMenuLabel: ({ className, inset, ...props }: React.Componen
34
34
  }) => React.JSX.Element;
35
35
  declare const DropdownMenuSeparator: ({ className, ...props }: Menu.Separator.Props) => React.JSX.Element;
36
36
  declare const DropdownMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
37
+ /** A menu of actions that opens from a button, such as a row's "more" menu. */
37
38
  export declare const DropdownMenu: typeof DropdownMenuRoot & {
38
39
  Trigger: Menu.Trigger;
39
40
  Group: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -102,6 +102,7 @@ const DropdownMenuShortcut = ({ className, ...props }) => {
102
102
  ...props
103
103
  });
104
104
  };
105
+ /** A menu of actions that opens from a button, such as a row's "more" menu. */
105
106
  const DropdownMenu = Object.assign(DropdownMenuRoot, {
106
107
  Trigger: Menu.Trigger,
107
108
  Group: Menu.Group,
@@ -1,5 +1,9 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
- declare function EmptyRoot({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
2
+ declare const emptyVariants: (props?: ({
3
+ variant?: "default" | "outline" | null | undefined;
4
+ size?: "default" | "sm" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function EmptyRoot({ className, variant, size, ...props }: React.ComponentProps<'div'> & VariantProps<typeof emptyVariants>): import("react").JSX.Element;
3
7
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
4
8
  declare const emptyMediaVariants: (props?: ({
5
9
  variant?: "default" | "icon" | null | undefined;
@@ -8,6 +12,7 @@ declare function EmptyMedia({ className, variant, ...props }: React.ComponentPro
8
12
  declare function EmptyTitle({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
9
13
  declare function EmptyDescription({ className, ...props }: React.ComponentProps<'p'>): import("react").JSX.Element;
10
14
  declare function EmptyContent({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
15
+ /** A list's or page's empty state: icon, title, a line and an action. */
11
16
  export declare const Empty: typeof EmptyRoot & {
12
17
  Header: typeof EmptyHeader;
13
18
  Title: typeof EmptyTitle;
@@ -2,10 +2,32 @@ import { cn } from "../lib/utils.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
4
  // src/components/empty.tsx
5
- function EmptyRoot({ className, ...props }) {
5
+ const emptyVariants = cva("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed text-center text-balance", {
6
+ variants: {
7
+ variant: {
8
+ default: "",
9
+ /** A dashed outline on the page background, standing in for missing content. */
10
+ outline: "border bg-background"
11
+ },
12
+ size: {
13
+ default: "px-6 py-12 md:px-12",
14
+ /** Inside a card or a widget, where a page's spacing would crowd it. */
15
+ sm: "p-6"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ variant: "default",
20
+ size: "default"
21
+ }
22
+ });
23
+ function EmptyRoot({ className, variant, size, ...props }) {
6
24
  return /* @__PURE__ */ jsx("div", {
7
25
  "data-slot": "empty",
8
- className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed px-6 py-12 text-center text-balance md:px-12", className),
26
+ className: cn(emptyVariants({
27
+ variant,
28
+ size,
29
+ className
30
+ })),
9
31
  ...props
10
32
  });
11
33
  }
@@ -55,6 +77,7 @@ function EmptyContent({ className, ...props }) {
55
77
  ...props
56
78
  });
57
79
  }
80
+ /** A list's or page's empty state: icon, title, a line and an action. */
58
81
  const Empty = Object.assign(EmptyRoot, {
59
82
  Header: EmptyHeader,
60
83
  Title: EmptyTitle,
@@ -8,7 +8,7 @@ declare const useFormField: () => {
8
8
  isDirty: boolean;
9
9
  isTouched: boolean;
10
10
  isValidating: boolean;
11
- error?: import("react-hook-form").FieldError;
11
+ error?: import("react-hook-form").FieldError | undefined;
12
12
  id: string;
13
13
  name: string | undefined;
14
14
  formItemId: string;
@@ -36,7 +36,11 @@ declare const formMessageVariants: (props?: ({
36
36
  variant?: "default" | "solid" | null | undefined;
37
37
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
38
38
  declare const FormMessage: ({ ref, className, children, variant, ...props }: React.ComponentProps<'p'> & VariantProps<typeof formMessageVariants>) => React.JSX.Element | null;
39
- export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
39
+ /**
40
+ * react-hook-form's provider with field, label, control and error parts.
41
+ * A settings page lays out `Form.Item`s with `Form.Label` above and `Form.Message` below.
42
+ */
43
+ export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getErrors, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
40
44
  Control: typeof FormControl;
41
45
  Description: typeof FormDescription;
42
46
  Field: typeof FormField;
@@ -8,8 +8,9 @@ import { useRender } from "@base-ui/react/use-render";
8
8
  // src/components/form.tsx
9
9
  const FormFieldContext = React.createContext(null);
10
10
  const FormField = ({ ...props }) => {
11
+ const field = React.useMemo(() => ({ name: props.name }), [props.name]);
11
12
  return /* @__PURE__ */ jsx(FormFieldContext.Provider, {
12
- value: { name: props.name },
13
+ value: field,
13
14
  children: /* @__PURE__ */ jsx(Controller, { ...props })
14
15
  });
15
16
  };
@@ -39,8 +40,9 @@ const formItemVariants = cva("", {
39
40
  });
40
41
  const FormItem = ({ ref, className, orientation, ...props }) => {
41
42
  const id = React.useId();
43
+ const item = React.useMemo(() => ({ id }), [id]);
42
44
  return /* @__PURE__ */ jsx(FormItemContext.Provider, {
43
- value: { id },
45
+ value: item,
44
46
  children: /* @__PURE__ */ jsx("div", {
45
47
  ref,
46
48
  className: cn(formItemVariants({ orientation }), className),
@@ -97,6 +99,10 @@ const FormMessage = ({ ref, className, children, variant, ...props }) => {
97
99
  children: body
98
100
  });
99
101
  };
102
+ /**
103
+ * react-hook-form's provider with field, label, control and error parts.
104
+ * A settings page lays out `Form.Item`s with `Form.Label` above and `Form.Message` below.
105
+ */
100
106
  const Form = Object.assign(FormProvider, {
101
107
  Control: FormControl,
102
108
  Description: FormDescription,
@@ -2,6 +2,7 @@ import { PreviewCard } from "@base-ui/react/preview-card";
2
2
  /** Opens after 700ms, the delay Radix's hover card had. */
3
3
  declare const HoverCardTrigger: ({ delay, ...props }: PreviewCard.Trigger.Props) => import("react").JSX.Element;
4
4
  declare const HoverCardContent: ({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCard.Popup.Props & Pick<PreviewCard.Positioner.Props, 'side' | 'sideOffset' | 'align' | 'alignOffset'>) => import("react").JSX.Element;
5
+ /** A preview card that opens when the pointer rests on a link, after 700ms. */
5
6
  export declare const HoverCard: (<Payload>(props: PreviewCard.Root.Props<Payload>) => React.JSX.Element) & {
6
7
  Trigger: typeof HoverCardTrigger;
7
8
  Content: typeof HoverCardContent;
@@ -19,6 +19,7 @@ const HoverCardContent = ({ className, side = "bottom", sideOffset = 4, align =
19
19
  ...props
20
20
  })
21
21
  }) });
22
+ /** A preview card that opens when the pointer rests on a link, after 700ms. */
22
23
  const HoverCard = Object.assign(PreviewCard.Root, {
23
24
  Trigger: HoverCardTrigger,
24
25
  Content: HoverCardContent
@@ -0,0 +1,7 @@
1
+ import { ReactElement } from "react";
2
+ /** The hover label of an icon-only button, with its shortcut if it has one. */
3
+ export declare const IconTip: ({ label, hotkey, children }: {
4
+ label: string;
5
+ hotkey?: string;
6
+ children: ReactElement;
7
+ }) => import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { Kbd } from "./kbd.js";
2
+ import { Tooltip } from "./tooltip.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ // src/components/icon-tip.tsx
5
+ /** The hover label of an icon-only button, with its shortcut if it has one. */
6
+ const IconTip = ({ label, hotkey, children }) => /* @__PURE__ */ jsx(Tooltip.Provider, {
7
+ delay: 300,
8
+ children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: children }), /* @__PURE__ */ jsx(Tooltip.Content, {
9
+ side: "bottom",
10
+ children: /* @__PURE__ */ jsxs("span", {
11
+ className: "flex items-center gap-1.5",
12
+ children: [label, hotkey && /* @__PURE__ */ jsx(Kbd, { children: hotkey })]
13
+ })
14
+ })] })
15
+ });
16
+ export { IconTip };
@@ -6,6 +6,10 @@ declare const InfoCardRoot: ({ title, description, children, className }: {
6
6
  className?: string;
7
7
  }) => React.JSX.Element;
8
8
  declare const InfoCardContent: ({ ref, children, className, ...props }: React.ComponentProps<'div'>) => React.JSX.Element;
9
+ /**
10
+ * A tinted dashboard tile: a caps title, an info tip and a content box.
11
+ * `description` shows in the tooltip behind the info icon.
12
+ */
9
13
  export declare const InfoCard: typeof InfoCardRoot & {
10
14
  Content: typeof InfoCardContent;
11
15
  };
@@ -32,5 +32,9 @@ const InfoCardContent = ({ ref, children, className, ...props }) => {
32
32
  children
33
33
  });
34
34
  };
35
+ /**
36
+ * A tinted dashboard tile: a caps title, an info tip and a content box.
37
+ * `description` shows in the tooltip behind the info icon.
38
+ */
35
39
  const InfoCard = Object.assign(InfoCardRoot, { Content: InfoCardContent });
36
40
  export { InfoCard };
@@ -2,10 +2,6 @@ import { Input } from "./input.js";
2
2
  import { Textarea } from "./textarea.js";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
5
- /**
6
- * An input or textarea with an icon or button beside its text, inside the same box. The group
7
- * draws the box and the focus ring; the field inside is bare. After shadcn's InputGroup.
8
- */
9
5
  declare const InputGroupRoot: ({ className, ...props }: React.ComponentProps<'div'>) => React.JSX.Element;
10
6
  declare const addonVariants: (props?: ({
11
7
  align?: "end" | "start" | null | undefined;
@@ -14,6 +10,11 @@ declare const addonVariants: (props?: ({
14
10
  declare const InputGroupAddon: ({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof addonVariants>) => React.JSX.Element;
15
11
  declare const InputGroupInput: ({ className, ...props }: React.ComponentProps<typeof Input>) => React.JSX.Element;
16
12
  declare const InputGroupTextarea: ({ className, ...props }: React.ComponentProps<typeof Textarea>) => React.JSX.Element;
13
+ /**
14
+ * An input or textarea with an icon or button inside the same box.
15
+ * The group draws the box and the focus ring; the field inside is bare. After shadcn's
16
+ * InputGroup.
17
+ */
17
18
  export declare const InputGroup: typeof InputGroupRoot & {
18
19
  Addon: typeof InputGroupAddon;
19
20
  Input: typeof InputGroupInput;
@@ -5,10 +5,6 @@ import { jsx } from "react/jsx-runtime";
5
5
  import "react";
6
6
  import { cva } from "class-variance-authority";
7
7
  // src/components/input-group.tsx
8
- /**
9
- * An input or textarea with an icon or button beside its text, inside the same box. The group
10
- * draws the box and the focus ring; the field inside is bare. After shadcn's InputGroup.
11
- */
12
8
  const InputGroupRoot = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
13
9
  className: cn("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-sm bg-background shadow-xs transition has-[>textarea]:h-auto has-[>:is(input,textarea):focus-visible]:shadow-focus has-[>:is(input,textarea):disabled]:opacity-50", "has-[>[data-align=start]]:[&>:is(input,textarea)]:pl-1.5 has-[>[data-align=end]]:[&>:is(input,textarea)]:pr-1.5", className),
14
10
  ...props
@@ -34,6 +30,11 @@ const InputGroupTextarea = ({ className, ...props }) => /* @__PURE__ */ jsx(Text
34
30
  className: cn("min-w-0 flex-1 shadow-none focus-visible:shadow-none", className),
35
31
  ...props
36
32
  });
33
+ /**
34
+ * An input or textarea with an icon or button inside the same box.
35
+ * The group draws the box and the focus ring; the field inside is bare. After shadcn's
36
+ * InputGroup.
37
+ */
37
38
  const InputGroup = Object.assign(InputGroupRoot, {
38
39
  Addon: InputGroupAddon,
39
40
  Input: InputGroupInput,
@@ -22,6 +22,7 @@ declare const InputNumber: ({ value, onChange, className, ...props }: ReactEleme
22
22
  onChange?: (value?: number | '') => void;
23
23
  value?: number;
24
24
  }) => React.JSX.Element;
25
+ /** A themed text input; `Input.Number` adds thousands separators. */
25
26
  export declare const Input: typeof InputMain & {
26
27
  Number: typeof InputNumber;
27
28
  };
@@ -63,5 +63,6 @@ const InputNumber = ({ value, onChange, className, ...props }) => {
63
63
  ...props
64
64
  });
65
65
  };
66
+ /** A themed text input; `Input.Number` adds thousands separators. */
66
67
  const Input = Object.assign(InputMain, { Number: InputNumber });
67
68
  export { Input, fieldTextVariants, inputVariants };
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  /**
3
- * This component is based on the `kbd` element and supports all of its props
3
+ * A keyboard key, such as a shortcut in a tooltip or menu.
4
+ * A `<kbd>` that takes all of its props; `variant` picks a light or dark tint.
4
5
  */
5
6
  export declare const Kbd: ({ ref, children, className, variant, ...props }: React.ComponentProps<'kbd'> & {
6
7
  variant?: 'background' | 'foreground';
@@ -3,7 +3,8 @@ import { jsx } from "react/jsx-runtime";
3
3
  import "react";
4
4
  // src/components/kbd.tsx
5
5
  /**
6
- * This component is based on the `kbd` element and supports all of its props
6
+ * A keyboard key, such as a shortcut in a tooltip or menu.
7
+ * A `<kbd>` that takes all of its props; `variant` picks a light or dark tint.
7
8
  */
8
9
  const Kbd = ({ ref, children, className, variant = "background", ...props }) => {
9
10
  return /* @__PURE__ */ jsx("kbd", {
@@ -3,6 +3,6 @@ import { VariantProps } from "class-variance-authority";
3
3
  declare const labelVariants: (props?: ({
4
4
  variant?: "default" | "muted" | "option" | "peer" | "plain" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
- /** A native label: Base UI has no label primitive. */
6
+ /** A form control's label, a native `<label>` since Base UI has none. */
7
7
  export declare const Label: ({ className, variant, htmlFor, ...props }: React.ComponentProps<'label'> & VariantProps<typeof labelVariants>) => React.JSX.Element;
8
8
  export {};
@@ -13,7 +13,7 @@ const labelVariants = cva("leading-none inline-block peer-disabled:cursor-not-al
13
13
  } },
14
14
  defaultVariants: { variant: "default" }
15
15
  });
16
- /** A native label: Base UI has no label primitive. */
16
+ /** A form control's label, a native `<label>` since Base UI has none. */
17
17
  const Label = ({ className, variant, htmlFor, ...props }) => /* @__PURE__ */ jsx("label", {
18
18
  htmlFor,
19
19
  className: cn(labelVariants({ variant }), className),
@@ -1,3 +1,4 @@
1
+ /** One option of `MultipleSelector`: its value and the label shown. */
1
2
  export type MultiSelectOption = {
2
3
  value: string;
3
4
  label: string;
@@ -14,7 +14,7 @@ const SelectorField = ({ fieldRef, value, placeholder, hidePlaceholderWhenSelect
14
14
  className: "flex flex-wrap gap-1 w-full",
15
15
  children: [
16
16
  value.map((option) => /* @__PURE__ */ jsxs(Combobox.Chip, {
17
- className: "relative inline-flex h-7 cursor-default items-center rounded-md border border-solid bg-background pe-7 pl-2 ps-2 text-xs font-medium text-secondary-foreground transition-all hover:bg-background data-disabled:cursor-not-allowed data-disabled:opacity-50",
17
+ className: "relative inline-flex h-7 cursor-default items-center rounded-md border border-solid bg-background pe-7 pl-2 ps-2 text-xs font-medium text-secondary-foreground transition-colors hover:bg-background data-disabled:cursor-not-allowed data-disabled:opacity-50",
18
18
  children: [option.label, /* @__PURE__ */ jsx(Combobox.ChipRemove, {
19
19
  "aria-label": "Remove",
20
20
  className: "absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-lg border border-transparent p-0 text-muted-foreground/80 outline-0 transition-colors hover:text-foreground focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-ring/70",
@@ -68,8 +68,9 @@ const SelectorPopup = ({ fieldRef, emptyIndicator }) => /* @__PURE__ */ jsx(Comb
68
68
  })
69
69
  }) });
70
70
  const has = (list, key) => list.some((item) => item.value === key);
71
+ const NONE = [];
71
72
  /** Picks several options from a list, shown as removable badges; picked options leave the list. */
72
- const MultipleSelector = ({ value = [], onChange, options = [], placeholder = "Search", creatable, emptyIndicator, disabled, ...fieldProps }) => {
73
+ const MultipleSelector = ({ value = NONE, onChange, options = NONE, placeholder = "Search", creatable, emptyIndicator, disabled, ...fieldProps }) => {
73
74
  const fieldRef = useRef(null);
74
75
  const [query, setQuery] = useState("");
75
76
  const typed = query.trim();
@@ -3,12 +3,18 @@ import { Resizable as Resizable$1 } from "./resizable.js";
3
3
  import { SliderProps } from "./slider.js";
4
4
  import { ComponentProps } from "react";
5
5
  declare const Selector: import("react").LazyExoticComponent<typeof MultipleSelector$1>;
6
+ /**
7
+ * Picks several options from a list, shown as removable badges.
8
+ * Picked options leave the list. The code loads the first time one renders.
9
+ */
6
10
  export declare const MultipleSelector: (props: ComponentProps<typeof Selector>) => import("react").JSX.Element;
11
+ /** A draggable slider for one number or a range. Its code loads on first render. */
7
12
  export declare const Slider: <Value extends number | readonly number[]>(props: SliderProps<Value>) => import("react").JSX.Element;
8
13
  type Parts = typeof Resizable$1;
9
14
  declare const ResizablePanelGroup: (props: ComponentProps<Parts['PanelGroup']>) => import("react").JSX.Element;
10
15
  declare const ResizablePanel: (props: ComponentProps<Parts['Panel']>) => import("react").JSX.Element;
11
16
  declare const ResizableHandle: (props: ComponentProps<Parts['Handle']>) => import("react").JSX.Element;
17
+ /** Side-by-side panels with handles that drag their sizes. Its code loads on first render. */
12
18
  export declare const Resizable: {
13
19
  PanelGroup: typeof ResizablePanelGroup;
14
20
  Panel: typeof ResizablePanel;
@@ -3,6 +3,10 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { Suspense, lazy, use } from "react";
4
4
  // src/components/on-demand.tsx
5
5
  const Selector = lazy(async () => ({ default: (await import("./multiselect.js")).MultipleSelector }));
6
+ /**
7
+ * Picks several options from a list, shown as removable badges.
8
+ * Picked options leave the list. The code loads the first time one renders.
9
+ */
6
10
  const MultipleSelector = (props) => /* @__PURE__ */ jsx(Suspense, {
7
11
  fallback: /* @__PURE__ */ jsx("div", { className: cn("min-h-7 w-full rounded shadow-xs", props.className) }),
8
12
  children: /* @__PURE__ */ jsx(Selector, { ...props })
@@ -12,6 +16,7 @@ const LoadedSlider = (props) => {
12
16
  const { Slider } = use(sliderModule ??= import("./slider.js"));
13
17
  return /* @__PURE__ */ jsx(Slider, { ...props });
14
18
  };
19
+ /** A draggable slider for one number or a range. Its code loads on first render. */
15
20
  const Slider = (props) => /* @__PURE__ */ jsx(Suspense, {
16
21
  fallback: /* @__PURE__ */ jsx("div", { className: "h-4 w-full" }),
17
22
  children: /* @__PURE__ */ jsx(LoadedSlider, { ...props })
@@ -34,6 +39,7 @@ const ResizableHandle = (props) => {
34
39
  const { Handle } = useResizable();
35
40
  return /* @__PURE__ */ jsx(Handle, { ...props });
36
41
  };
42
+ /** Side-by-side panels with handles that drag their sizes. Its code loads on first render. */
37
43
  const Resizable = {
38
44
  PanelGroup: ResizablePanelGroup,
39
45
  Panel: ResizablePanel,
@@ -14,6 +14,10 @@ export type PopoverContentProps = Popover$1.Popup.Props & Pick<Popover$1.Positio
14
14
  * on its root, which has no tabbable element for the default focus to land on.
15
15
  */
16
16
  declare const PopoverContent: ({ ref, className, side, sideOffset, align, alignOffset, collisionPadding, anchor, variant, disableTransition, initialFocus, ...props }: PopoverContentProps) => import("react").JSX.Element;
17
+ /**
18
+ * A floating box anchored to its trigger, for a picker or a few controls.
19
+ * Content sits in a positioner, which sets `--anchor-width` and `--available-height`.
20
+ */
17
21
  export declare const Popover: typeof Popover$1.Root & {
18
22
  Trigger: Popover$1.Trigger;
19
23
  Content: typeof PopoverContent;
@@ -38,6 +38,10 @@ const PopoverContent = ({ ref, className, side = "bottom", sideOffset = 4, align
38
38
  })
39
39
  }) });
40
40
  };
41
+ /**
42
+ * A floating box anchored to its trigger, for a picker or a few controls.
43
+ * Content sits in a positioner, which sets `--anchor-width` and `--available-height`.
44
+ */
41
45
  const Popover = Object.assign(Popover$1.Root, {
42
46
  Trigger: Popover$1.Trigger,
43
47
  Content: PopoverContent,
@@ -3,6 +3,7 @@ import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
3
3
  export type RadioGroupProps<Value = string> = RadioGroup$1.Props<Value>;
4
4
  declare const RadioGroupRoot: <Value = string>({ className, ...props }: RadioGroupProps<Value>) => import("react").JSX.Element;
5
5
  declare const RadioGroupItem: <Value = string>({ className, ...props }: Radio.Root.Props<Value>) => import("react").JSX.Element;
6
+ /** A set of radio buttons where one value is picked. */
6
7
  export declare const RadioGroup: typeof RadioGroupRoot & {
7
8
  Item: typeof RadioGroupItem;
8
9
  };
@@ -26,5 +26,6 @@ const RadioGroupItem = ({ className, ...props }) => /* @__PURE__ */ jsx(Radio.Ro
26
26
  })
27
27
  })
28
28
  });
29
+ /** A set of radio buttons where one value is picked. */
29
30
  const RadioGroup = Object.assign(RadioGroupRoot, { Item: RadioGroupItem });
30
31
  export { RadioGroup };
@@ -12,6 +12,7 @@ declare const ScrollAreaRoot: ({ className, gutter, ...props }: ScrollArea$1.Roo
12
12
  declare const ScrollAreaViewport: ({ className, children, ...props }: ScrollArea$1.Viewport.Props) => import("react").JSX.Element;
13
13
  /** Shows while the pointer is over the area or it scrolls, and hides 600ms after, as Radix's hover type did. */
14
14
  declare const ScrollBar: ({ className, orientation, ...props }: ScrollArea$1.Scrollbar.Props) => import("react").JSX.Element;
15
+ /** A scrolling box with thin scrollbars that show on hover or scroll. */
15
16
  export declare const ScrollArea: typeof ScrollAreaMain & {
16
17
  Root: typeof ScrollAreaRoot;
17
18
  Viewport: typeof ScrollAreaViewport;
@@ -33,6 +33,7 @@ const ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__P
33
33
  ...props,
34
34
  children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, { className: "relative flex-1 rounded-full bg-scroll" })
35
35
  });
36
+ /** A scrolling box with thin scrollbars that show on hover or scroll. */
36
37
  const ScrollArea = Object.assign(ScrollAreaMain, {
37
38
  Root: ScrollAreaRoot,
38
39
  Viewport: ScrollAreaViewport,
@@ -11,13 +11,17 @@ declare const SelectGroup: (props: Select$1.Group.Props) => string | number | bi
11
11
  declare const selectTriggerVariants: (props?: ({
12
12
  variant?: "bordered" | "default" | "flush" | null | undefined;
13
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
- declare const SelectTrigger: ({ className, children, variant, ...props }: Select$1.Trigger.Props & VariantProps<typeof selectTriggerVariants>) => React.JSX.Element;
14
+ declare const SelectTrigger: ({ className, children, variant, id, ...props }: Select$1.Trigger.Props & VariantProps<typeof selectTriggerVariants>) => React.JSX.Element;
15
15
  declare const SelectContent: ({ className, children, side, align, ...props }: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, 'side' | 'align'>) => React.JSX.Element;
16
16
  declare const SelectLabel: ({ className, ...props }: Select$1.GroupLabel.Props) => React.JSX.Element | null;
17
17
  declare const SelectItem: ({ className, children, value, ...props }: Omit<Select$1.Item.Props, 'value'> & {
18
18
  value: string;
19
19
  }) => React.JSX.Element;
20
20
  declare const SelectSeparator: ({ className, ...props }: Select$1.Separator.Props) => React.JSX.Element | null;
21
+ /**
22
+ * A dropdown to pick one value from a short fixed list.
23
+ * An empty string means nothing is selected. For a searchable or long list, use `Combobox`.
24
+ */
21
25
  export declare const Select: typeof SelectRoot & {
22
26
  Group: typeof SelectGroup;
23
27
  Value: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectValueProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,4 +1,5 @@
1
1
  import { cn } from "../lib/utils.js";
2
+ import { useCellLabel } from "../modules/record-table/components/RecordTableCell.js";
2
3
  import { IconCheck, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
3
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
5
  import { createContext, use, useCallback, useLayoutEffect, useState } from "react";
@@ -38,7 +39,8 @@ const selectTriggerVariants = cva("flex h-7 w-full items-center font-medium just
38
39
  } },
39
40
  defaultVariants: { variant: "default" }
40
41
  });
41
- const SelectTrigger = ({ className, children, variant, ...props }) => /* @__PURE__ */ jsxs(Select$1.Trigger, {
42
+ const SelectTrigger = ({ className, children, variant, id, ...props }) => /* @__PURE__ */ jsxs(Select$1.Trigger, {
43
+ ...useCellLabel(id),
42
44
  className: cn(selectTriggerVariants({ variant }), className),
43
45
  ...props,
44
46
  children: [children, /* @__PURE__ */ jsx(IconChevronDown, {
@@ -103,6 +105,10 @@ const SelectSeparator = ({ className, ...props }) => use(CollectingContext) ? nu
103
105
  className: cn("-mx-1 my-1 h-px bg-muted", className),
104
106
  ...props
105
107
  });
108
+ /**
109
+ * A dropdown to pick one value from a short fixed list.
110
+ * An empty string means nothing is selected. For a searchable or long list, use `Combobox`.
111
+ */
106
112
  const Select = Object.assign(SelectRoot, {
107
113
  Group: SelectGroup,
108
114
  Value: Select$1.Value,
@@ -2,6 +2,10 @@ import React from "react";
2
2
  import { Separator as Separator$1 } from "@base-ui/react/separator";
3
3
  declare const SeparatorRoot: ({ className, orientation, ...props }: React.ComponentProps<typeof Separator$1>) => React.JSX.Element;
4
4
  declare const SeparatorInline: ({ className, orientation, ...props }: React.ComponentProps<typeof Separator$1>) => React.JSX.Element;
5
+ /**
6
+ * A thin horizontal or vertical line between sections.
7
+ * `Separator.Inline` is a short tick in text.
8
+ */
5
9
  export declare const Separator: typeof SeparatorRoot & {
6
10
  Inline: typeof SeparatorInline;
7
11
  };
@@ -13,5 +13,9 @@ const SeparatorInline = ({ className, orientation = "vertical", ...props }) => /
13
13
  className: cn("inline-block bg-border rounded-lg flex-none", orientation === "horizontal" ? "w-3 h-0.5" : "w-0.5 h-3", className),
14
14
  ...props
15
15
  });
16
+ /**
17
+ * A thin horizontal or vertical line between sections.
18
+ * `Separator.Inline` is a short tick in text.
19
+ */
16
20
  const Separator = Object.assign(SeparatorRoot, { Inline: SeparatorInline });
17
21
  export { Separator };
@@ -21,6 +21,10 @@ declare const SheetContent: ({ className, ...props }: React.HTMLAttributes<HTMLD
21
21
  declare const SheetFooter: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
22
22
  declare const SheetTitle: ({ className, ...props }: Dialog.Title.Props) => React.JSX.Element;
23
23
  declare const SheetDescription: ({ className, ...props }: Dialog.Description.Props) => React.JSX.Element;
24
+ /**
25
+ * A panel that slides in from a page edge over a dimmed page.
26
+ * A plugin's records open in core's side panel through `useOpenRecord`, never in a Sheet.
27
+ */
24
28
  export declare const Sheet: typeof SheetRoot & {
25
29
  Trigger: Dialog.Trigger;
26
30
  View: typeof SheetView;
@@ -4,8 +4,8 @@ import { IconX } from "@tabler/icons-react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import React from "react";
6
6
  import { cva } from "class-variance-authority";
7
- import { Dialog } from "@base-ui/react/dialog";
8
7
  import { useTranslation } from "react-i18next";
8
+ import { Dialog } from "@base-ui/react/dialog";
9
9
  // src/components/sheet.tsx
10
10
  const SheetHeaderActionsContext = React.createContext(null);
11
11
  const SheetRoot = ({ headerActions = null, ...props }) => /* @__PURE__ */ jsx(SheetHeaderActionsContext, {
@@ -80,7 +80,7 @@ const SheetHeader = ({ className, children, ...props }) => {
80
80
  const items = React.Children.toArray(children);
81
81
  const close = actions ? items.find((child) => React.isValidElement(child) && child.type === SheetClose) : void 0;
82
82
  return /* @__PURE__ */ jsx("div", {
83
- className: cn("flex px-5 h-10 items-center bg-background border-b flex-none", className),
83
+ className: cn("flex flex-wrap items-center gap-x-2 gap-y-1 px-5 py-2 min-h-10 bg-background border-b flex-none", className),
84
84
  ...props,
85
85
  children: actions ? /* @__PURE__ */ jsxs(Fragment, { children: [items.filter((child) => child !== close), /* @__PURE__ */ jsxs("div", {
86
86
  className: "ml-auto flex shrink-0 items-center gap-1 [&>button]:ml-0",
@@ -97,13 +97,17 @@ const SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
97
97
  ...props
98
98
  });
99
99
  const SheetTitle = ({ className, ...props }) => /* @__PURE__ */ jsx(Dialog.Title, {
100
- className: cn("text-lg font-semibold text-foreground leading-none", className),
100
+ className: cn("min-w-0 flex-1 text-lg font-semibold text-foreground leading-tight", className),
101
101
  ...props
102
102
  });
103
103
  const SheetDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(Dialog.Description, {
104
- className: cn("text-sm leading-none text-muted-foreground mt-2", className),
104
+ className: cn("order-last basis-full text-sm leading-snug text-muted-foreground", className),
105
105
  ...props
106
106
  });
107
+ /**
108
+ * A panel that slides in from a page edge over a dimmed page.
109
+ * A plugin's records open in core's side panel through `useOpenRecord`, never in a Sheet.
110
+ */
107
111
  const Sheet = Object.assign(SheetRoot, {
108
112
  Trigger: Dialog.Trigger,
109
113
  View: SheetView,