@parallelworks/ui 0.76.0 → 0.78.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 (270) hide show
  1. package/README.md +30 -5
  2. package/dist/access/AccessDrawer.d.ts +28 -7
  3. package/dist/access/AccessDrawer.js +216 -35
  4. package/dist/access/AccessList.d.ts +19 -1
  5. package/dist/access/AccessList.js +220 -9
  6. package/dist/access/GrantView.d.ts +3 -1
  7. package/dist/access/GrantView.js +17 -4
  8. package/dist/access/PrincipalPicker.js +5 -5
  9. package/dist/access/focus.js +1 -1
  10. package/dist/access/index.d.ts +2 -2
  11. package/dist/access/index.js +2 -2
  12. package/dist/access/strings.d.ts +18 -0
  13. package/dist/access/strings.js +20 -2
  14. package/dist/access/types.d.ts +26 -0
  15. package/dist/ai/adapter/types.d.ts +1 -0
  16. package/dist/ai/components/AllocationSelector.js +1 -1
  17. package/dist/ai/components/AttachmentManager.js +5 -5
  18. package/dist/ai/components/AttachmentUpload.js +2 -2
  19. package/dist/ai/components/BranchNavigator.js +1 -1
  20. package/dist/ai/components/ChatActivity.d.ts +2 -0
  21. package/dist/ai/components/ChatActivity.js +31 -0
  22. package/dist/ai/components/ChatEmptyState.js +3 -3
  23. package/dist/ai/components/ChatInput.js +3 -5
  24. package/dist/ai/components/ChatLayout.js +1 -1
  25. package/dist/ai/components/ChatMessage.js +1 -1
  26. package/dist/ai/components/ChatMessageList.js +2 -2
  27. package/dist/ai/components/ChatSidebar.js +3 -3
  28. package/dist/ai/components/ChatThread.js +4 -4
  29. package/dist/ai/components/ComposerAddMenu.js +9 -20
  30. package/dist/ai/components/ModelSelector.js +3 -3
  31. package/dist/ai/components/PastedText.js +5 -5
  32. package/dist/ai/components/SessionView.js +5 -2
  33. package/dist/ai/components/ShareDialog.js +3 -3
  34. package/dist/ai/components/SlashMenu.d.ts +31 -4
  35. package/dist/ai/components/SlashMenu.js +36 -63
  36. package/dist/ai/components/agent/ActivityLine.js +1 -1
  37. package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -1
  38. package/dist/ai/components/agent/AgentMessageParts.js +44 -18
  39. package/dist/ai/components/conversationActions.js +3 -3
  40. package/dist/ai/core/ChatProvider.js +11 -2
  41. package/dist/ai/core/config.d.ts +10 -1
  42. package/dist/ai/core/config.js +1 -1
  43. package/dist/ai/index.d.ts +1 -1
  44. package/dist/ai/strings.d.ts +2 -0
  45. package/dist/ai/strings.js +2 -1
  46. package/dist/ai/types.d.ts +3 -0
  47. package/dist/ai/ui/ConversationSidebar.js +3 -3
  48. package/dist/ai/ui/sidebar.js +3 -3
  49. package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
  50. package/dist/components/ActionMenu.d.ts +38 -9
  51. package/dist/components/ActionMenu.js +48 -22
  52. package/dist/components/Avatar.d.ts +66 -6
  53. package/dist/components/Avatar.js +130 -18
  54. package/dist/components/Breadcrumbs.d.ts +4 -0
  55. package/dist/components/Breadcrumbs.js +26 -10
  56. package/dist/components/Button.d.ts +3 -2
  57. package/dist/components/Button.js +11 -1
  58. package/dist/components/Callout.d.ts +3 -2
  59. package/dist/components/Callout.js +3 -2
  60. package/dist/components/Card.d.ts +33 -9
  61. package/dist/components/Card.js +24 -8
  62. package/dist/components/Checkbox.d.ts +3 -1
  63. package/dist/components/Checkbox.js +4 -2
  64. package/dist/components/ColorInput.js +1 -1
  65. package/dist/components/Combobox.d.ts +23 -0
  66. package/dist/components/Combobox.js +252 -86
  67. package/dist/components/ConfirmModal.d.ts +26 -2
  68. package/dist/components/ConfirmModal.js +81 -15
  69. package/dist/components/ContextMenu.d.ts +29 -2
  70. package/dist/components/ContextMenu.js +60 -8
  71. package/dist/components/CopyButton.d.ts +21 -8
  72. package/dist/components/CopyButton.js +29 -9
  73. package/dist/components/CreateModal.d.ts +16 -4
  74. package/dist/components/CreateModal.js +27 -16
  75. package/dist/components/DatePicker.d.ts +31 -1
  76. package/dist/components/DatePicker.js +178 -47
  77. package/dist/components/DescriptionList.d.ts +13 -3
  78. package/dist/components/DescriptionList.js +43 -11
  79. package/dist/components/Disclosure.d.ts +10 -2
  80. package/dist/components/Disclosure.js +18 -7
  81. package/dist/components/Drawer.js +5 -5
  82. package/dist/components/EmptyState.d.ts +12 -4
  83. package/dist/components/EmptyState.js +18 -10
  84. package/dist/components/ErrorPage.d.ts +40 -0
  85. package/dist/components/ErrorPage.js +101 -0
  86. package/dist/components/ExternalLink.d.ts +4 -1
  87. package/dist/components/ExternalLink.js +4 -5
  88. package/dist/components/Field.d.ts +21 -6
  89. package/dist/components/Field.js +32 -16
  90. package/dist/components/FileButton.d.ts +19 -0
  91. package/dist/components/FileButton.js +32 -0
  92. package/dist/components/HoverCard.d.ts +26 -6
  93. package/dist/components/HoverCard.js +11 -5
  94. package/dist/components/IconButton.js +4 -2
  95. package/dist/components/InfoTip.js +3 -3
  96. package/dist/components/Input.d.ts +33 -3
  97. package/dist/components/Input.js +149 -14
  98. package/dist/components/Kbd.d.ts +40 -0
  99. package/dist/components/Kbd.js +168 -0
  100. package/dist/components/Listbox.d.ts +103 -0
  101. package/dist/components/Listbox.js +190 -0
  102. package/dist/components/Loader.d.ts +8 -2
  103. package/dist/components/Loader.js +16 -1
  104. package/dist/components/Markdown.js +1 -1
  105. package/dist/components/MarkdownImpl.js +1 -1
  106. package/dist/components/Menu.d.ts +20 -2
  107. package/dist/components/Menu.js +48 -19
  108. package/dist/components/MenuEntries.d.ts +38 -2
  109. package/dist/components/MenuEntries.js +266 -39
  110. package/dist/components/Meter.d.ts +50 -11
  111. package/dist/components/Meter.js +71 -21
  112. package/dist/components/Modal.d.ts +9 -3
  113. package/dist/components/Modal.js +68 -29
  114. package/dist/components/OneTimeCodeInput.js +1 -1
  115. package/dist/components/PageHeader.js +111 -7
  116. package/dist/components/PageHeaderAction.d.ts +8 -3
  117. package/dist/components/PageHeaderAction.js +122 -34
  118. package/dist/components/Pagination.d.ts +13 -1
  119. package/dist/components/Pagination.js +90 -19
  120. package/dist/components/Popover.d.ts +13 -2
  121. package/dist/components/Popover.js +20 -21
  122. package/dist/components/Provider.d.ts +140 -3
  123. package/dist/components/Provider.js +142 -12
  124. package/dist/components/RefreshButton.d.ts +13 -6
  125. package/dist/components/RefreshButton.js +17 -9
  126. package/dist/components/RunStatusIcon.d.ts +16 -7
  127. package/dist/components/RunStatusIcon.js +21 -8
  128. package/dist/components/Section.d.ts +11 -4
  129. package/dist/components/Section.js +33 -22
  130. package/dist/components/SegmentedControl.d.ts +16 -3
  131. package/dist/components/SegmentedControl.js +7 -3
  132. package/dist/components/Select.d.ts +19 -3
  133. package/dist/components/Select.js +114 -68
  134. package/dist/components/SelectionCopy.d.ts +10 -0
  135. package/dist/components/SelectionCopy.js +105 -0
  136. package/dist/components/SettingModeOption.js +1 -1
  137. package/dist/components/SettingsCard.js +1 -1
  138. package/dist/components/Skeleton.js +1 -1
  139. package/dist/components/StatusBadge.d.ts +55 -10
  140. package/dist/components/StatusBadge.js +91 -15
  141. package/dist/components/StickyBar.js +1 -1
  142. package/dist/components/Table.d.ts +22 -4
  143. package/dist/components/Table.js +46 -24
  144. package/dist/components/Tabs.d.ts +9 -4
  145. package/dist/components/Tabs.js +9 -4
  146. package/dist/components/Tag.d.ts +49 -0
  147. package/dist/components/Tag.js +199 -0
  148. package/dist/components/ThemeEditor.js +1 -1
  149. package/dist/components/Toast.js +1 -1
  150. package/dist/components/ToggleGroup.d.ts +4 -1
  151. package/dist/components/ToggleGroup.js +30 -13
  152. package/dist/components/Tooltip.d.ts +9 -3
  153. package/dist/components/Tooltip.js +55 -39
  154. package/dist/components/buttonClasses.d.ts +5 -2
  155. package/dist/components/buttonClasses.js +11 -10
  156. package/dist/components/chart.d.ts +69 -0
  157. package/dist/components/chart.js +145 -0
  158. package/dist/components/comboboxItems.d.ts +7 -1
  159. package/dist/components/comboboxItems.js +6 -2
  160. package/dist/components/dismiss.d.ts +5 -1
  161. package/dist/components/dismiss.js +6 -2
  162. package/dist/components/floating.d.ts +4 -4
  163. package/dist/components/floating.js +5 -5
  164. package/dist/components/headerActionsFit.d.ts +37 -0
  165. package/dist/components/headerActionsFit.js +81 -0
  166. package/dist/components/pageHeaderStore.d.ts +3 -0
  167. package/dist/components/pageHeaderStore.js +3 -0
  168. package/dist/components/pathBreaks.js +2 -2
  169. package/dist/components/popupContainer.d.ts +17 -0
  170. package/dist/components/popupContainer.js +69 -0
  171. package/dist/components/relativeTime.d.ts +21 -10
  172. package/dist/components/relativeTime.js +50 -22
  173. package/dist/components/segmented.d.ts +18 -4
  174. package/dist/components/segmented.js +48 -6
  175. package/dist/components/typedDate.d.ts +5 -0
  176. package/dist/components/typedDate.js +50 -0
  177. package/dist/components/useClosingValue.d.ts +4 -0
  178. package/dist/components/useClosingValue.js +12 -0
  179. package/dist/components/useCopy.d.ts +6 -0
  180. package/dist/components/useCopy.js +3 -3
  181. package/dist/components/useNarrow.d.ts +2 -0
  182. package/dist/components/useNarrow.js +16 -0
  183. package/dist/editor/Editor.js +1 -1
  184. package/dist/editor/FormCodePanel.js +1 -1
  185. package/dist/editor/Monaco.js +1 -1
  186. package/dist/editor/workers.js +1 -1
  187. package/dist/file-explorer/FileExplorer.js +16 -15
  188. package/dist/file-explorer/FileExplorerContext.js +2 -2
  189. package/dist/file-explorer/FilePreview/Viewer.js +3 -3
  190. package/dist/file-explorer/FilePreview/index.js +2 -2
  191. package/dist/file-explorer/FileRowsWindow.js +3 -3
  192. package/dist/file-explorer/FileTable.js +1 -1
  193. package/dist/file-explorer/LoadMoreRow.js +1 -1
  194. package/dist/file-explorer/TreeView.js +5 -5
  195. package/dist/file-explorer/helpers.js +2 -2
  196. package/dist/file-explorer/toasts.js +2 -2
  197. package/dist/form/Fields/CheckboxGroupField.js +1 -1
  198. package/dist/form/Fields/DropdownField.js +1 -1
  199. package/dist/form/Fields/DurationField.js +2 -2
  200. package/dist/form/Fields/MultiDropdownField.js +1 -1
  201. package/dist/form/Fields/NumberField.js +1 -1
  202. package/dist/form/Fields/ObjectField.js +1 -1
  203. package/dist/form/Fields/RangeField.js +1 -1
  204. package/dist/form/Fields/StringField.js +1 -1
  205. package/dist/form/Form.js +3 -3
  206. package/dist/form/FormLayout.js +1 -1
  207. package/dist/form/Wizard/WizardContainer.js +1 -1
  208. package/dist/form/Wizard/WizardNavigation.js +1 -1
  209. package/dist/form/Wizard/WizardStepContent.js +1 -1
  210. package/dist/form/fieldRegistry.js +1 -1
  211. package/dist/form/formEditing.js +1 -1
  212. package/dist/format.d.ts +17 -7
  213. package/dist/format.js +39 -16
  214. package/dist/graph/AnnotationBanner.js +2 -2
  215. package/dist/graph/Connectors.js +5 -5
  216. package/dist/graph/DependencyGraph.js +10 -9
  217. package/dist/graph/GraphEditor.js +4 -4
  218. package/dist/graph/GraphEditorDialogs.js +13 -12
  219. package/dist/graph/GraphNode.js +1 -1
  220. package/dist/graph/InputDialog.js +5 -5
  221. package/dist/graph/InputsEditor.js +7 -7
  222. package/dist/graph/MatrixGroup.js +2 -2
  223. package/dist/graph/ProblemsButton.js +3 -3
  224. package/dist/graph/Reveal.js +1 -1
  225. package/dist/graph/RunWarningsList.js +1 -1
  226. package/dist/graph/ShortcutsButton.js +25 -8
  227. package/dist/graph/StepSummaries.js +1 -1
  228. package/dist/graph/TreeView.js +2 -2
  229. package/dist/graph/WorkflowSettingsDialog.js +3 -3
  230. package/dist/graph/editorFields.js +3 -3
  231. package/dist/graph/editorPrimitives.js +1 -1
  232. package/dist/graph/editorRows.js +5 -5
  233. package/dist/graph/fieldProblems.js +2 -2
  234. package/dist/graph/inputRefs.js +7 -6
  235. package/dist/graph/stepWith.js +2 -2
  236. package/dist/index.d.ts +30 -21
  237. package/dist/index.js +20 -12
  238. package/dist/list/ActionToolbar.d.ts +4 -0
  239. package/dist/list/ActionToolbar.js +35 -12
  240. package/dist/list/ListFilterBar.d.ts +42 -0
  241. package/dist/list/ListFilterBar.js +789 -0
  242. package/dist/list/ListPage.d.ts +42 -4
  243. package/dist/list/ListPage.js +56 -22
  244. package/dist/list/ListTable.d.ts +27 -3
  245. package/dist/list/ListTable.js +48 -23
  246. package/dist/list/ListToolbar.d.ts +31 -0
  247. package/dist/list/ListToolbar.js +43 -0
  248. package/dist/list/ListViewControls.d.ts +8 -4
  249. package/dist/list/ListViewControls.js +22 -14
  250. package/dist/list/UserHoverCard.d.ts +8 -2
  251. package/dist/list/UserHoverCard.js +26 -13
  252. package/dist/list/filterModel.d.ts +122 -0
  253. package/dist/list/filterModel.js +308 -0
  254. package/dist/list/index.d.ts +6 -2
  255. package/dist/list/index.js +6 -2
  256. package/dist/list/listSearch.d.ts +1 -1
  257. package/dist/list/listSearch.js +8 -4
  258. package/dist/list/listView.d.ts +24 -2
  259. package/dist/list/listView.js +47 -45
  260. package/dist/list/rowMenu.d.ts +10 -5
  261. package/dist/list/rowMenu.js +17 -7
  262. package/dist/list/useListFilters.d.ts +68 -0
  263. package/dist/list/useListFilters.js +252 -0
  264. package/dist/logviewer/LogViewer.js +4 -4
  265. package/dist/styles/theme.css +94 -0
  266. package/dist/styles.css +1 -1
  267. package/package.json +11 -11
  268. package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
  269. package/dist/components/fullscreen.d.ts +0 -4
  270. package/dist/components/fullscreen.js +0 -18
@@ -1,25 +1,49 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import { type LinkTarget } from './AppLink.js';
3
- declare const sizeClasses: {
3
+ declare const widthClasses: {
4
4
  sm: string;
5
5
  md: string;
6
6
  lg: string;
7
+ fill: string;
7
8
  };
9
+ declare const paddingClasses: {
10
+ none: string;
11
+ sm: string;
12
+ md: string;
13
+ lg: string;
14
+ };
15
+ export type CardSize = keyof typeof widthClasses;
16
+ export type CardPadding = keyof typeof paddingClasses;
8
17
  export interface CardProps extends LinkTarget {
9
18
  children: ReactNode;
10
- /** Its width and padding: `sm` for a short form, `lg` for a wide one. */
11
- size?: keyof typeof sizeClasses | undefined;
19
+ /** Its width and padding: `sm` for a short form, `lg` for a wide one. `fill` is a
20
+ * flat panel among the page's content, as wide as its column, with no shadow. */
21
+ size?: CardSize | undefined;
22
+ /** The room inside, over the size's own: `none` for content ruled to the card's
23
+ * edges, such as a table or a list; `sm` for dense content. */
24
+ padding?: CardPadding | undefined;
25
+ /** Rules each child off from the next, for a list of rows. */
26
+ divided?: boolean | undefined;
12
27
  /** A stronger shadow, for a card standing alone on a page, such as sign-in. */
13
28
  elevated?: boolean | undefined;
14
- /** Renders the card as this element, such as a button, which makes the
15
- * whole card pressable: it lifts on hover and shows focus. A card that
16
- * navigates takes `href` instead, which makes it a link the same way. */
29
+ /** Tints the border in the accent, setting the card apart from its siblings,
30
+ * such as a thread shared with the reader. */
31
+ highlight?: boolean | undefined;
32
+ /** Tints the border while a field inside has focus, for a card that frames an
33
+ * input, such as a composer. */
34
+ focusWithin?: boolean | undefined;
35
+ /** Renders the card as this element, such as a button, a list or a section. */
17
36
  render?: ReactElement | undefined;
37
+ /** The whole card presses: it lifts on hover and shows focus. On by default for
38
+ * a card with `href` or `render`; false for a `render` that isn't a control,
39
+ * such as `<ul />`. */
40
+ interactive?: boolean | undefined;
18
41
  className?: string | undefined;
19
42
  }
20
- /** A raised surface holding one task, such as a sign-in form or a choice among
21
- * a few options. */
22
- export declare function Card({ children, size, elevated, render: renderProp, href, reloadDocument, target, className, }: CardProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
43
+ /** A surface holding one task, such as a sign-in form or a choice among a few
44
+ * options, raised over the page; or, with `size="fill"`, a flat panel among the
45
+ * page's content. */
46
+ export declare function Card({ children, size, padding, divided, elevated, highlight, focusWithin, render: renderProp, interactive, href, reloadDocument, target, className, }: CardProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
23
47
  export interface CardHeaderProps {
24
48
  badge?: ReactNode;
25
49
  title: string;
@@ -3,23 +3,39 @@ import { AppLink } from "./AppLink.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useRender } from "@base-ui/react/use-render";
5
5
  //#region src/components/Card.tsx
6
- var sizeClasses = {
7
- sm: "max-w-[400px] p-6",
8
- md: "max-w-[520px] p-6 sm:p-10",
9
- lg: "max-w-[560px] p-6 sm:p-8"
6
+ var widthClasses = {
7
+ sm: "max-w-[400px]",
8
+ md: "max-w-[520px]",
9
+ lg: "max-w-[560px]",
10
+ fill: ""
10
11
  };
11
- /** A raised surface holding one task, such as a sign-in form or a choice among
12
- * a few options. */
13
- function Card({ children, size = "md", elevated = false, render: renderProp, href, reloadDocument, target, className }) {
12
+ var paddingClasses = {
13
+ none: "p-0",
14
+ sm: "p-3",
15
+ md: "p-4",
16
+ lg: "p-6"
17
+ };
18
+ var sizePadding = {
19
+ sm: "p-6",
20
+ md: "p-6 sm:p-10",
21
+ lg: "p-6 sm:p-8",
22
+ fill: paddingClasses.md
23
+ };
24
+ /** A surface holding one task, such as a sign-in form or a choice among a few
25
+ * options, raised over the page; or, with `size="fill"`, a flat panel among the
26
+ * page's content. */
27
+ function Card({ children, size = "md", padding, divided = false, elevated = false, highlight = false, focusWithin = false, render: renderProp, interactive, href, reloadDocument, target, className }) {
14
28
  const render = href === void 0 ? renderProp : /* @__PURE__ */ jsx(AppLink, {
15
29
  href,
16
30
  reloadDocument,
17
31
  target
18
32
  });
33
+ const fill = size === "fill";
34
+ const pressable = interactive ?? render !== void 0;
19
35
  return useRender({
20
36
  render: render ?? /* @__PURE__ */ jsx("div", {}),
21
37
  props: {
22
- className: cx("block w-full rounded-xl border border-(--theme-border) bg-(--theme-panel-bg) backdrop-blur-xl", elevated ? "shadow-(--theme-shadow-xl)" : "shadow-(--theme-shadow)", sizeClasses[size], render && "cursor-pointer text-left text-inherit no-underline transition-[background-color,box-shadow] duration-150 hover:bg-(--theme-panel-hover) hover:shadow-(--theme-shadow-lg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-link) motion-reduce:transition-none", className),
38
+ className: cx("block w-full rounded-xl border bg-(--theme-panel-bg)", highlight ? "border-(--theme-accent)/30" : "border-(--theme-border)", focusWithin && "focus-within:border-(--theme-focus)/60", !fill && "backdrop-blur-xl", !fill && (elevated ? "shadow-(--theme-shadow-xl)" : "shadow-(--theme-shadow)"), widthClasses[size], padding === void 0 ? sizePadding[size] : paddingClasses[padding], divided && "divide-y divide-(--theme-border)", pressable && "cursor-pointer text-left text-inherit no-underline transition-[background-color,box-shadow,border-color] duration-150 hover:bg-(--theme-panel-hover) hover:shadow-(--theme-shadow-lg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-link) motion-reduce:transition-none", !pressable && focusWithin && "transition-[border-color] duration-150 motion-reduce:transition-none", className),
23
39
  children
24
40
  }
25
41
  });
@@ -5,5 +5,7 @@ export interface CheckboxProps extends Omit<BaseCheckbox.Root.Props, 'className'
5
5
  }
6
6
  /** A box that ticks on and off, or shows a mixed state with `indeterminate`. Name it with an
7
7
  * enclosing `<label>`, or `aria-label` when it stands alone, as in a table row. In a
8
- * `CheckboxGroup`, `value` identifies it and the group holds which are ticked. */
8
+ * `CheckboxGroup`, `value` identifies it and the group holds which are ticked. `readOnly`
9
+ * shows a tick nobody here can change, such as a permission a role grants, filled grey; it
10
+ * stays focusable, so a tooltip can say what grants it. */
9
11
  export declare function Checkbox({ className, ...props }: CheckboxProps): import("react").JSX.Element;
@@ -7,11 +7,13 @@ import { CheckboxGroup } from "@base-ui/react/checkbox-group";
7
7
  //#region src/components/Checkbox.tsx
8
8
  /** A box that ticks on and off, or shows a mixed state with `indeterminate`. Name it with an
9
9
  * enclosing `<label>`, or `aria-label` when it stands alone, as in a table row. In a
10
- * `CheckboxGroup`, `value` identifies it and the group holds which are ticked. */
10
+ * `CheckboxGroup`, `value` identifies it and the group holds which are ticked. `readOnly`
11
+ * shows a tick nobody here can change, such as a permission a role grants, filled grey; it
12
+ * stays focusable, so a tooltip can say what grants it. */
11
13
  function Checkbox$1({ className, ...props }) {
12
14
  return /* @__PURE__ */ jsx(Checkbox.Root, {
13
15
  ...props,
14
- className: cx("flex size-4 shrink-0 items-center justify-center rounded border border-(--theme-border-strong) bg-(--theme-input-bg) text-(--theme-accent-text) cursor-pointer transition-colors motion-reduce:transition-none", focusOutline, "data-checked:border-(--theme-focus) data-checked:bg-(--theme-accent)", "data-indeterminate:border-(--theme-focus) data-indeterminate:bg-(--theme-accent)", "aria-invalid:border-(--theme-error)", "data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
16
+ className: cx("flex size-4 shrink-0 items-center justify-center rounded border border-(--theme-border-strong) bg-(--theme-input-bg) text-(--theme-accent-text) cursor-pointer transition-colors motion-reduce:transition-none", focusOutline, "data-checked:border-(--theme-focus) data-checked:bg-(--theme-accent)", "data-indeterminate:border-(--theme-focus) data-indeterminate:bg-(--theme-accent)", "aria-invalid:border-(--theme-error)", "data-disabled:cursor-not-allowed data-disabled:opacity-50", "data-readonly:cursor-default data-readonly:text-(--theme-app-bg)", "data-readonly:data-checked:border-(--theme-muted-text-color) data-readonly:data-checked:bg-(--theme-muted-text-color)", "data-readonly:data-indeterminate:border-(--theme-muted-text-color) data-readonly:data-indeterminate:bg-(--theme-muted-text-color)", className),
15
17
  children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
16
18
  className: "flex",
17
19
  render: (indicatorProps, state) => /* @__PURE__ */ jsx("span", {
@@ -4,8 +4,8 @@ import { fieldBox } from "./fieldBox.js";
4
4
  import { parseColor, toHex } from "../theme/color.js";
5
5
  import { ErrorText } from "./Field.js";
6
6
  import { framed } from "./Input.js";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { useId, useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Input } from "@base-ui/react/input";
10
10
  //#region src/components/ColorInput.tsx
11
11
  var swatchClassName = cx("shrink-0 cursor-pointer p-0.5", "[&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:rounded [&::-webkit-color-swatch]:border-0", "[&::-moz-color-swatch]:rounded [&::-moz-color-swatch]:border-0");
@@ -35,6 +35,18 @@ type SelectionProps<Value> = {
35
35
  maxItems?: number | undefined;
36
36
  /** The longest text that can be typed, such as for a created value. */
37
37
  maxLength?: number | undefined;
38
+ /** With `creatable`: turns typed text into the value it adds, such as trimmed and
39
+ * lowercased; undefined refuses it. */
40
+ createValue?: ((typed: string) => string | undefined) | undefined;
41
+ /** With `creatable`: keys that add what is typed, beside Enter, such as `','`. Pasted
42
+ * text splits on them too, adding each part. */
43
+ separators?: readonly string[] | undefined;
44
+ /** With `creatable`: leaving the field adds what is typed, so a value half entered isn't
45
+ * lost. */
46
+ addOnBlur?: boolean | undefined;
47
+ /** With `creatable`: values offered as chips under the field, each added with a press.
48
+ * Chosen ones leave the row. */
49
+ suggested?: readonly string[] | undefined;
38
50
  };
39
51
  export type ComboboxProps<Value = string> = FieldProps & SelectionProps<Value> & {
40
52
  items: ComboboxItems<Value>;
@@ -66,6 +78,17 @@ export type ComboboxProps<Value = string> = FieldProps & SelectionProps<Value> &
66
78
  /** The area the open list stays inside, such as a drawer's body above its footer; by
67
79
  * default, the viewport. With `details`, the list grows to fill it. */
68
80
  collisionBoundary?: Element | null | undefined;
81
+ /** Whether the list is open, for a host that opens it itself, such as from a shortcut or
82
+ * to keep one picker open at a time. */
83
+ open?: boolean | undefined;
84
+ defaultOpen?: boolean | undefined;
85
+ onOpenChange?: ((open: boolean) => void) | undefined;
86
+ /** The edge of the field or trigger the open list lines up with. */
87
+ align?: 'start' | 'end' | undefined;
88
+ /** Offers a row that creates the typed text, such as a label that doesn't exist yet, while
89
+ * no item has that text. Choosing it calls this with the text and picks nothing itself:
90
+ * the host creates the thing and picks it, if it should. */
91
+ onCreate?: ((text: string) => void) | undefined;
69
92
  };
70
93
  export interface AutocompleteProps extends FieldProps {
71
94
  /** Suggestions; any typed text is also a valid value. */