@parallelworks/ui 0.50.0 → 0.52.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 (240) hide show
  1. package/README.md +204 -18
  2. package/dist/ai/agent/toolStrings.d.ts +2 -0
  3. package/dist/ai/agent/toolStrings.js +20 -18
  4. package/dist/ai/ai.css +12 -0
  5. package/dist/ai/components/AllocationSelector.js +5 -1
  6. package/dist/ai/components/AttachmentManager.js +51 -42
  7. package/dist/ai/components/AttachmentUpload.d.ts +4 -2
  8. package/dist/ai/components/AttachmentUpload.js +9 -9
  9. package/dist/ai/components/BlockedGroupBanner.js +8 -14
  10. package/dist/ai/components/BranchNavigator.js +11 -12
  11. package/dist/ai/components/ChatEmptyState.js +12 -19
  12. package/dist/ai/components/ChatInput.d.ts +4 -3
  13. package/dist/ai/components/ChatInput.js +27 -13
  14. package/dist/ai/components/ChatMessage.js +45 -121
  15. package/dist/ai/components/ChatMessageList.d.ts +5 -2
  16. package/dist/ai/components/ChatMessageList.js +89 -51
  17. package/dist/ai/components/ChatSidebar.js +11 -7
  18. package/dist/ai/components/ChatThread.js +1 -13
  19. package/dist/ai/components/DragOverlay.js +3 -3
  20. package/dist/ai/components/MessageAttachments.d.ts +10 -0
  21. package/dist/ai/components/MessageAttachments.js +78 -0
  22. package/dist/ai/components/ModelSelector.js +4 -4
  23. package/dist/ai/components/PastedText.js +2 -2
  24. package/dist/ai/components/ProviderIssueBanner.js +19 -23
  25. package/dist/ai/components/ShareDialog.js +2 -2
  26. package/dist/ai/components/agent/ActivityLine.d.ts +0 -2
  27. package/dist/ai/components/agent/ActivityLine.js +8 -51
  28. package/dist/ai/components/agent/AgentMessageParts.js +117 -56
  29. package/dist/ai/core/ChatProvider.d.ts +16 -5
  30. package/dist/ai/core/ChatProvider.js +41 -8
  31. package/dist/ai/core/config.js +4 -3
  32. package/dist/ai/index.d.ts +1 -1
  33. package/dist/ai/index.js +3 -3
  34. package/dist/ai/strings.d.ts +29 -3
  35. package/dist/ai/strings.js +81 -26
  36. package/dist/ai/types.d.ts +4 -0
  37. package/dist/ai/ui/Notice.d.ts +2 -2
  38. package/dist/ai/ui/Notice.js +29 -62
  39. package/dist/ai/ui/sidebar.d.ts +5 -3
  40. package/dist/ai/ui/sidebar.js +21 -9
  41. package/dist/components/ActionMenu.d.ts +1 -0
  42. package/dist/components/ActionMenu.js +6 -1
  43. package/dist/components/AppLink.d.ts +26 -0
  44. package/dist/components/AppLink.js +51 -0
  45. package/dist/components/Avatar.d.ts +2 -1
  46. package/dist/components/Avatar.js +4 -2
  47. package/dist/components/Button.d.ts +15 -5
  48. package/dist/components/Button.js +47 -40
  49. package/dist/components/Callout.d.ts +31 -7
  50. package/dist/components/Callout.js +51 -24
  51. package/dist/components/Card.d.ts +11 -6
  52. package/dist/components/Card.js +14 -8
  53. package/dist/components/Checkbox.js +2 -1
  54. package/dist/components/ColorInput.js +5 -3
  55. package/dist/components/Combobox.js +49 -19
  56. package/dist/components/ConfirmModal.d.ts +19 -8
  57. package/dist/components/ConfirmModal.js +31 -53
  58. package/dist/components/CopyButton.d.ts +38 -0
  59. package/dist/components/CopyButton.js +68 -0
  60. package/dist/components/CreateModal.js +118 -111
  61. package/dist/components/DatePicker.js +12 -8
  62. package/dist/components/DescriptionList.d.ts +51 -17
  63. package/dist/components/DescriptionList.js +117 -31
  64. package/dist/components/Disclosure.js +1 -1
  65. package/dist/components/Drawer.js +10 -16
  66. package/dist/components/Field.d.ts +15 -5
  67. package/dist/components/Field.js +41 -9
  68. package/dist/components/IconButton.d.ts +14 -5
  69. package/dist/components/IconButton.js +25 -14
  70. package/dist/components/InfoTip.d.ts +4 -1
  71. package/dist/components/InfoTip.js +2 -1
  72. package/dist/components/Input.d.ts +14 -8
  73. package/dist/components/Input.js +46 -31
  74. package/dist/components/Loader.js +1 -1
  75. package/dist/components/MenuEntries.d.ts +43 -12
  76. package/dist/components/MenuEntries.js +34 -19
  77. package/dist/components/Meter.js +5 -4
  78. package/dist/components/Modal.d.ts +28 -4
  79. package/dist/components/Modal.js +37 -14
  80. package/dist/components/Overview.d.ts +20 -12
  81. package/dist/components/Overview.js +14 -9
  82. package/dist/components/PageHeader.d.ts +47 -65
  83. package/dist/components/PageHeader.js +275 -153
  84. package/dist/components/PageHeaderAction.d.ts +67 -0
  85. package/dist/components/PageHeaderAction.js +107 -0
  86. package/dist/components/Pagination.js +6 -16
  87. package/dist/components/Popover.js +3 -2
  88. package/dist/components/Provider.d.ts +79 -19
  89. package/dist/components/Provider.js +140 -130
  90. package/dist/components/Radio.js +2 -1
  91. package/dist/components/RefreshButton.js +7 -8
  92. package/dist/components/RequiredMark.js +1 -1
  93. package/dist/components/RunStatusIcon.js +2 -2
  94. package/dist/components/Section.js +1 -1
  95. package/dist/components/Select.d.ts +4 -9
  96. package/dist/components/Select.js +24 -11
  97. package/dist/components/SettingModeOption.d.ts +1 -1
  98. package/dist/components/SettingModeOption.js +7 -1
  99. package/dist/components/SettingsCard.d.ts +5 -3
  100. package/dist/components/SettingsCard.js +27 -20
  101. package/dist/components/Slider.js +1 -1
  102. package/dist/components/StatusBadge.js +2 -2
  103. package/dist/components/StatusIcons.js +2 -2
  104. package/dist/components/Switch.js +5 -4
  105. package/dist/components/Table.d.ts +30 -20
  106. package/dist/components/Table.js +50 -73
  107. package/dist/components/Tabs.d.ts +3 -7
  108. package/dist/components/Tabs.js +6 -10
  109. package/dist/components/ThemeEditor.js +24 -14
  110. package/dist/components/Toast.d.ts +11 -3
  111. package/dist/components/Toast.js +47 -22
  112. package/dist/components/buttonClasses.js +2 -2
  113. package/dist/components/comboboxItems.d.ts +4 -0
  114. package/dist/components/comboboxItems.js +6 -1
  115. package/dist/components/dismiss.d.ts +12 -0
  116. package/dist/components/dismiss.js +19 -0
  117. package/dist/components/fieldBox.d.ts +4 -0
  118. package/dist/components/fieldBox.js +7 -3
  119. package/dist/components/floating.d.ts +3 -3
  120. package/dist/components/floating.js +1 -1
  121. package/dist/components/markdownCodeBreaks.js +3 -4
  122. package/dist/components/pageHeaderStore.d.ts +41 -0
  123. package/dist/components/pageHeaderStore.js +67 -0
  124. package/dist/components/pathBreaks.d.ts +8 -0
  125. package/dist/components/pathBreaks.js +28 -0
  126. package/dist/components/segmented.js +1 -1
  127. package/dist/components/shortcutKey.d.ts +2 -1
  128. package/dist/components/shortcutKey.js +19 -2
  129. package/dist/components/splitter.js +1 -1
  130. package/dist/components/tone.d.ts +5 -2
  131. package/dist/components/tone.js +15 -6
  132. package/dist/components/useCssIsDark.js +40 -18
  133. package/dist/components/useTheme.js +9 -10
  134. package/dist/dev.d.ts +9 -0
  135. package/dist/dev.js +14 -0
  136. package/dist/editor/Editor.d.ts +3 -2
  137. package/dist/editor/Editor.js +11 -2
  138. package/dist/editor/EditorField.d.ts +2 -1
  139. package/dist/editor/EditorField.js +11 -29
  140. package/dist/editor/FormCodePanel.d.ts +7 -3
  141. package/dist/editor/FormCodePanel.js +14 -7
  142. package/dist/editor/Monaco.d.ts +14 -5
  143. package/dist/editor/Monaco.js +163 -112
  144. package/dist/editor/index.d.ts +5 -5
  145. package/dist/editor/index.js +3 -3
  146. package/dist/editor/themes.d.ts +8 -5
  147. package/dist/editor/themes.js +58 -30
  148. package/dist/editor/yaml.d.ts +6 -2
  149. package/dist/editor/yaml.js +11 -2
  150. package/dist/file-explorer/FileExplorer.js +143 -124
  151. package/dist/file-explorer/FileExplorerContext.js +1 -1
  152. package/dist/file-explorer/FilePreview/StreamedBadge.js +3 -1
  153. package/dist/file-explorer/FilePreview/Viewer.js +2 -2
  154. package/dist/file-explorer/FilePreview/index.js +4 -4
  155. package/dist/file-explorer/FileRow.js +1 -1
  156. package/dist/file-explorer/FileRowsWindow.js +34 -3
  157. package/dist/file-explorer/FileTable.js +3 -1
  158. package/dist/file-explorer/TreeView.js +37 -14
  159. package/dist/file-explorer/helpers.d.ts +2 -1
  160. package/dist/file-explorer/helpers.js +21 -20
  161. package/dist/file-explorer/toasts.js +27 -19
  162. package/dist/file-explorer/treeRows.d.ts +6 -0
  163. package/dist/file-explorer/treeRows.js +19 -1
  164. package/dist/file-explorer/useNearEnd.js +3 -6
  165. package/dist/form/Fields/CheckboxGroupField.js +12 -5
  166. package/dist/form/Fields/DurationField.js +1 -1
  167. package/dist/form/Fields/LabelField.js +1 -1
  168. package/dist/form/Fields/ObjectField.d.ts +1 -1
  169. package/dist/form/Fields/ObjectField.js +3 -2
  170. package/dist/form/Fields/StringField.js +16 -29
  171. package/dist/form/Fields/TextAreaField.js +3 -4
  172. package/dist/form/Form.js +3 -8
  173. package/dist/form/Wizard/WizardNavigation.js +1 -4
  174. package/dist/form/Wizard/WizardStepIndicator.js +1 -1
  175. package/dist/form/Wizard/utils.js +1 -1
  176. package/dist/form/fieldFrame.d.ts +1 -1
  177. package/dist/form/fieldFrame.js +2 -2
  178. package/dist/form/types/fieldComponentTypes.d.ts +2 -1
  179. package/dist/graph/AnnotationBanner.d.ts +1 -2
  180. package/dist/graph/AnnotationBanner.js +30 -32
  181. package/dist/graph/Connectors.js +4 -1
  182. package/dist/graph/DependencyGraph.js +2 -2
  183. package/dist/graph/GraphEditor.js +12 -10
  184. package/dist/graph/GraphEditorDialogs.js +2 -2
  185. package/dist/graph/GraphNode.js +7 -4
  186. package/dist/graph/InputDialog.js +1 -1
  187. package/dist/graph/InputsEditor.js +14 -11
  188. package/dist/graph/MatrixGroup.js +9 -3
  189. package/dist/graph/ProblemsButton.js +2 -2
  190. package/dist/graph/Reveal.js +18 -10
  191. package/dist/graph/ShortcutsButton.d.ts +11 -2
  192. package/dist/graph/ShortcutsButton.js +15 -4
  193. package/dist/graph/TreeView.js +35 -18
  194. package/dist/graph/WorkflowSettingsDialog.js +1 -1
  195. package/dist/graph/editorChrome.js +1 -1
  196. package/dist/graph/editorFields.js +1 -1
  197. package/dist/graph/editorRows.js +16 -10
  198. package/dist/graph/editorStrings.d.ts +7 -0
  199. package/dist/graph/editorStrings.js +8 -1
  200. package/dist/graph/fieldProblems.js +1 -1
  201. package/dist/graph/inputRefs.js +1 -1
  202. package/dist/graph/settingsViews.js +11 -18
  203. package/dist/graph/stepWith.js +2 -2
  204. package/dist/icons.d.ts +2 -0
  205. package/dist/icons.js +4 -2
  206. package/dist/index.d.ts +12 -12
  207. package/dist/index.js +16 -16
  208. package/dist/list/ActionToolbar.d.ts +44 -8
  209. package/dist/list/ActionToolbar.js +301 -102
  210. package/dist/list/ListPage.d.ts +15 -23
  211. package/dist/list/ListPage.js +46 -45
  212. package/dist/list/ListTable.d.ts +32 -7
  213. package/dist/list/ListTable.js +48 -12
  214. package/dist/list/ListViewControls.js +2 -2
  215. package/dist/list/UserHoverCard.js +7 -15
  216. package/dist/list/index.d.ts +2 -2
  217. package/dist/list/index.js +2 -2
  218. package/dist/list/listSearch.js +12 -10
  219. package/dist/list/listView.d.ts +10 -1
  220. package/dist/list/listView.js +15 -1
  221. package/dist/list/rowMenu.d.ts +2 -2
  222. package/dist/logviewer/LogViewer.d.ts +4 -2
  223. package/dist/logviewer/LogViewer.js +88 -70
  224. package/dist/logviewer/logviewer.css +3 -2
  225. package/dist/reducedMotion.d.ts +5 -0
  226. package/dist/reducedMotion.js +20 -0
  227. package/dist/safeUrl.d.ts +1 -1
  228. package/dist/safeUrl.js +4 -2
  229. package/dist/styles/theme.css +24 -10
  230. package/dist/styles.css +1 -1
  231. package/dist/theme/derive.d.ts +1 -1
  232. package/dist/theme/derive.js +46 -21
  233. package/dist/theme/fit.js +10 -4
  234. package/package.json +1 -1
  235. package/dist/components/Breadcrumbs.d.ts +0 -37
  236. package/dist/components/Breadcrumbs.js +0 -90
  237. package/dist/components/CopyToClipboard.d.ts +0 -17
  238. package/dist/components/CopyToClipboard.js +0 -66
  239. package/dist/components/Sort.d.ts +0 -9
  240. package/dist/components/Sort.js +0 -42
@@ -1,73 +1,51 @@
1
1
  import { useStrings } from "./Provider.js";
2
2
  import { Button } from "./Button.js";
3
- import { Modal, ModalDescription, ModalTitle } from "./Modal.js";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { useCallback, useEffect, useRef, useState } from "react";
3
+ import { Modal } from "./Modal.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { useRef, useState } from "react";
6
6
  //#region src/components/ConfirmModal.tsx
7
+ /** Asks before an action: its title the question, its description what follows,
8
+ * and Cancel beside a confirm button named for the action. */
7
9
  function ConfirmModal({ open, onClose, title, description, children, confirmLabel, onConfirm, confirmDisabled = false, destructive = false, align = "top", cancelLabel, closeOnConfirm = true }) {
8
10
  const { common } = useStrings();
9
11
  const [pending, setPending] = useState(false);
10
- const firedRef = useRef(false);
11
- useEffect(() => {
12
- if (open) firedRef.current = false;
13
- }, [open]);
14
- const onCloseRef = useRef(onClose);
15
- onCloseRef.current = onClose;
16
- const runConfirm = useCallback(async () => {
17
- if (firedRef.current) return;
18
- firedRef.current = true;
12
+ const running = useRef(false);
13
+ const runConfirm = async () => {
14
+ if (running.current) return;
15
+ running.current = true;
19
16
  setPending(true);
20
17
  try {
21
18
  await onConfirm();
22
- if (closeOnConfirm) onCloseRef.current();
23
- else firedRef.current = false;
24
- } catch (error) {
25
- firedRef.current = false;
26
- throw error;
19
+ if (closeOnConfirm) onClose();
27
20
  } finally {
21
+ running.current = false;
28
22
  setPending(false);
29
23
  }
30
- }, [onConfirm, closeOnConfirm]);
31
- return /* @__PURE__ */ jsxs(Modal, {
24
+ };
25
+ return /* @__PURE__ */ jsx(Modal, {
32
26
  alert: destructive,
33
27
  open,
34
28
  onClose,
35
29
  align,
36
30
  dismissible: !pending,
37
- className: "w-[480px] max-w-full",
38
- children: [/* @__PURE__ */ jsxs("div", {
39
- className: "px-5 pt-5",
40
- children: [
41
- /* @__PURE__ */ jsx(ModalTitle, {
42
- className: "text-lg font-semibold text-(--theme-app)",
43
- children: title
44
- }),
45
- description !== null && description !== void 0 && /* @__PURE__ */ jsx(ModalDescription, {
46
- className: "mt-1.5 text-sm text-(--theme-muted-text-color)",
47
- children: description
48
- }),
49
- children !== null && children !== void 0 && /* @__PURE__ */ jsx("div", {
50
- className: "mt-4",
51
- children
52
- })
53
- ]
54
- }), /* @__PURE__ */ jsxs("div", {
55
- className: "mt-5 flex items-center justify-end gap-2 border-t border-(--theme-border) px-5 py-3",
56
- children: [/* @__PURE__ */ jsx(Button, {
57
- variant: "ghost",
58
- size: "sm",
59
- onClick: onClose,
60
- disabled: pending,
61
- children: cancelLabel ?? common.cancel
62
- }), /* @__PURE__ */ jsx(Button, {
63
- variant: destructive ? "danger" : "primary",
64
- size: "sm",
65
- onClick: runConfirm,
66
- disabled: confirmDisabled,
67
- loading: pending,
68
- children: confirmLabel
69
- })]
70
- })]
31
+ size: "md",
32
+ title,
33
+ description,
34
+ footer: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
35
+ variant: "ghost",
36
+ size: "sm",
37
+ onClick: onClose,
38
+ disabled: pending,
39
+ children: cancelLabel ?? common.cancel
40
+ }), /* @__PURE__ */ jsx(Button, {
41
+ variant: destructive ? "danger" : "primary",
42
+ size: "sm",
43
+ onClick: runConfirm,
44
+ disabled: confirmDisabled,
45
+ loading: pending,
46
+ children: confirmLabel
47
+ })] }),
48
+ children
71
49
  });
72
50
  }
73
51
  //#endregion
@@ -0,0 +1,38 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { type ButtonSize, type ButtonVariant } from './buttonClasses.js';
3
+ export interface CopyButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'onClick' | 'children' | 'type'> {
4
+ variant?: ButtonVariant | undefined;
5
+ size?: ButtonSize | undefined;
6
+ /** What it copies, or a function that reads it when pressed, such as from the page. */
7
+ text: string | (() => string);
8
+ /** Names what it copies, such as "email address": the button reads "Copy email
9
+ * address" and the toast "Copied email address". Without it, both say only "Copy". */
10
+ label?: string | undefined;
11
+ /** No toast, for a copy the reader can see succeed some other way. The button's
12
+ * check shows either way, and a failure still says so. */
13
+ quiet?: boolean | undefined;
14
+ /** Shows "Copy" (then "Copied") beside the icon, for a copy that is a toolbar's
15
+ * command rather than a detail beside a value. */
16
+ showLabel?: boolean | undefined;
17
+ }
18
+ /** The one copy control: a button that copies its text, turns into a check for a
19
+ * moment, and says so in a toast, which screen readers announce. */
20
+ export declare function CopyButton({ text, label, quiet, showLabel, variant, size, ...props }: CopyButtonProps): import("react").JSX.Element;
21
+ export interface CopyCodeBlockProps {
22
+ /** What the button copies: the code as the reader would type it. */
23
+ text: string;
24
+ /** Names what it copies, as CopyButton's `label` does, such as "install command". */
25
+ label?: string | undefined;
26
+ /** The code as shown, which may be masked or highlighted. */
27
+ children: ReactNode;
28
+ /** Adds an eye button that shows or hides the value; the caller masks `children`
29
+ * while `revealed` is false. */
30
+ secret?: boolean | undefined;
31
+ revealed?: boolean | undefined;
32
+ onRevealedChange?: ((revealed: boolean) => void) | undefined;
33
+ className?: string | undefined;
34
+ }
35
+ /** A block of code, such as a command to run, with a button that copies it. The
36
+ * buttons show while the pointer is over the block or focus is in it, and always
37
+ * where there is no hover to reveal them. */
38
+ export declare function CopyCodeBlock({ text, label, children, secret, revealed, onRevealedChange, className, }: CopyCodeBlockProps): import("react").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { cx } from "../cx.js";
2
+ import { buttonClasses } from "./buttonClasses.js";
3
+ import { CheckIcon, CopyIcon, EyeIcon, EyeOffIcon } from "../icons.js";
4
+ import { useStrings } from "./Provider.js";
5
+ import { useCopy } from "./useCopy.js";
6
+ import { IconButton } from "./IconButton.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/components/CopyButton.tsx
9
+ /** The one copy control: a button that copies its text, turns into a check for a
10
+ * moment, and says so in a toast, which screen readers announce. */
11
+ function CopyButton({ text, label, quiet = false, showLabel = false, variant = showLabel ? "outline" : "ghost", size = "sm", ...props }) {
12
+ const { common: t } = useStrings();
13
+ const { copy, copied } = useCopy();
14
+ const name = label ? copied ? t.copiedThing(label) : t.copyThing(label) : copied ? t.copied : t.copy;
15
+ const icon = copied ? /* @__PURE__ */ jsx(CheckIcon, { className: "text-(--theme-success)" }) : /* @__PURE__ */ jsx(CopyIcon, {});
16
+ const onClick = () => void copy(typeof text === "function" ? text() : text, {
17
+ label,
18
+ quiet
19
+ });
20
+ if (showLabel) return /* @__PURE__ */ jsxs("button", {
21
+ type: "button",
22
+ ...props,
23
+ "aria-label": props["aria-label"] ?? name,
24
+ onClick,
25
+ className: cx(buttonClasses({
26
+ variant,
27
+ size
28
+ }), props.className),
29
+ children: [icon, copied ? t.copied : t.copy]
30
+ });
31
+ return /* @__PURE__ */ jsx(IconButton, {
32
+ ...props,
33
+ variant,
34
+ size,
35
+ label: name,
36
+ icon,
37
+ onClick
38
+ });
39
+ }
40
+ /** A block of code, such as a command to run, with a button that copies it. The
41
+ * buttons show while the pointer is over the block or focus is in it, and always
42
+ * where there is no hover to reveal them. */
43
+ function CopyCodeBlock({ text, label, children, secret = false, revealed = false, onRevealedChange, className }) {
44
+ const { common: t } = useStrings();
45
+ const reveal = "opacity-0 group-hover/code:opacity-100 group-focus-within/code:opacity-100 pointer-coarse:opacity-100";
46
+ return /* @__PURE__ */ jsxs("div", {
47
+ className: cx("group/code relative", className),
48
+ children: [/* @__PURE__ */ jsx("pre", {
49
+ className: cx("m-0 overflow-x-auto rounded-lg border border-(--theme-border) bg-(--theme-muted-panel-bg) p-4 text-left font-mono text-sm text-(--theme-app)", secret ? "pr-20" : "pr-12"),
50
+ children
51
+ }), /* @__PURE__ */ jsxs("div", {
52
+ className: "absolute top-2 right-2 flex items-center gap-1",
53
+ children: [secret && /* @__PURE__ */ jsx(IconButton, {
54
+ label: t.showValue,
55
+ icon: revealed ? /* @__PURE__ */ jsx(EyeIcon, {}) : /* @__PURE__ */ jsx(EyeOffIcon, {}),
56
+ pressed: revealed,
57
+ onClick: () => onRevealedChange?.(!revealed),
58
+ className: cx("bg-(--theme-muted-panel-bg)", reveal)
59
+ }), /* @__PURE__ */ jsx(CopyButton, {
60
+ text,
61
+ label,
62
+ className: cx("bg-(--theme-muted-panel-bg)", reveal)
63
+ })]
64
+ })]
65
+ });
66
+ }
67
+ //#endregion
68
+ export { CopyButton, CopyCodeBlock };
@@ -1,6 +1,6 @@
1
1
  import { cx } from "../cx.js";
2
- import { ChevronDownIcon, FavoriteIcon, FavoriteOutlineIcon } from "../icons.js";
3
2
  import { buttonClasses } from "./buttonClasses.js";
3
+ import { ChevronDownIcon, FavoriteIcon, FavoriteOutlineIcon } from "../icons.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
5
  import { useStrings } from "./Provider.js";
6
6
  import { ActionMenu } from "./ActionMenu.js";
@@ -11,7 +11,7 @@ import { Modal } from "./Modal.js";
11
11
  import { Disclosure } from "./Disclosure.js";
12
12
  import { Switch } from "./Switch.js";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- import { useEffect, useRef, useState } from "react";
14
+ import { useId, useRef, useState } from "react";
15
15
  import { Toggle } from "@base-ui/react/toggle";
16
16
  //#region src/components/CreateModal.tsx
17
17
  /** Submits on Enter in the name field or ⌘/Ctrl+Enter from anywhere in the panel. */
@@ -21,7 +21,7 @@ function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceho
21
21
  const submitText = submitLabel ?? common.create;
22
22
  const submittingText = submittingLabel ?? t.creating;
23
23
  const descriptionText = descriptionPlaceholder ?? t.addDescription;
24
- const [name, setName] = useState("");
24
+ const [name, setName] = useState(initialName ?? "");
25
25
  const [description, setDescription] = useState("");
26
26
  const [submitting, setSubmitting] = useState(false);
27
27
  const [favorite, setFavorite] = useState(false);
@@ -29,16 +29,20 @@ function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceho
29
29
  const [nameTouched, setNameTouched] = useState(false);
30
30
  const [interacted, setInteracted] = useState(false);
31
31
  const nameRef = useRef(null);
32
- useEffect(() => {
33
- if (open) {
34
- setName(initialName ?? "");
32
+ const nameMessageId = useId();
33
+ const session = open ? initialName ?? "" : null;
34
+ const [shownSession, setShownSession] = useState(session);
35
+ if (session !== shownSession) {
36
+ setShownSession(session);
37
+ if (session !== null) {
38
+ setName(session);
35
39
  setDescription("");
36
40
  setSubmitting(false);
37
41
  setFavorite(false);
38
42
  setNameTouched(false);
39
43
  setInteracted(false);
40
44
  }
41
- }, [open, initialName]);
45
+ }
42
46
  const nameError = name.trim() ? validateName?.(name.trim()) ?? null : null;
43
47
  const hint = !nameError && name.trim() ? nameHint?.(name.trim()) : null;
44
48
  const canSubmit = (hideName || nameOptional || name.trim().length > 0) && !nameError && !submitting && !submitDisabled;
@@ -66,11 +70,11 @@ function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceho
66
70
  }
67
71
  if (close) onClose();
68
72
  };
69
- return /* @__PURE__ */ jsxs(Modal, {
73
+ return /* @__PURE__ */ jsx(Modal, {
70
74
  open,
71
75
  onClose,
72
76
  "aria-label": `${submitText}: ${typeLabel}`,
73
- className: "w-[560px] max-w-full flex flex-col max-h-full",
77
+ size: "lg",
74
78
  dismissible: !isDirty,
75
79
  initialFocus: () => nameRef.current ?? true,
76
80
  onKeyDown: (e) => {
@@ -79,84 +83,117 @@ function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceho
79
83
  onMouseDown: (e) => {
80
84
  if (e.target instanceof Element && !e.target.closest("input, textarea, button, a, select, label, code, pre, .select-all")) e.preventDefault();
81
85
  },
82
- children: [/* @__PURE__ */ jsxs("div", {
83
- className: "flex-1 min-h-0 overflow-y-auto overscroll-contain",
86
+ footer: /* @__PURE__ */ jsxs(Fragment, { children: [
87
+ showFavorite && /* @__PURE__ */ jsx("div", {
88
+ className: "me-auto",
89
+ children: /* @__PURE__ */ jsx(Tooltip, {
90
+ content: favorite ? t.favoriteHintOn : t.favoriteHintOff,
91
+ children: /* @__PURE__ */ jsxs(Toggle, {
92
+ pressed: favorite,
93
+ onPressedChange: setFavorite,
94
+ "aria-label": t.favorite,
95
+ className: buttonClasses({
96
+ variant: "ghost",
97
+ size: "sm"
98
+ }),
99
+ children: [favorite ? /* @__PURE__ */ jsx(FavoriteIcon, { className: "text-(--theme-favorite)" }) : /* @__PURE__ */ jsx(FavoriteOutlineIcon, {}), favorite ? t.favorited : t.favorite]
100
+ })
101
+ })
102
+ }),
103
+ /* @__PURE__ */ jsx(Button, {
104
+ variant: "ghost",
105
+ size: "sm",
106
+ onClick: onClose,
107
+ children: hideSubmit ? common.close : common.cancel
108
+ }),
109
+ !hideSubmit && /* @__PURE__ */ jsx(Button, {
110
+ variant: "primary",
111
+ size: "sm",
112
+ onClick: handleSubmit,
113
+ "aria-disabled": !canSubmit,
114
+ loading: submitting,
115
+ children: submitting ? submittingText : submitText
116
+ })
117
+ ] }),
118
+ children: /* @__PURE__ */ jsxs("div", {
84
119
  onChangeCapture: () => setInteracted(true),
85
120
  children: [
86
- /* @__PURE__ */ jsxs("div", {
87
- className: "px-4 pt-4",
88
- children: [
89
- typeMenu && typeMenu.length > 0 ? /* @__PURE__ */ jsxs(ActionMenu, {
90
- items: typeMenu,
91
- label: typeLabel,
92
- triggerClassName: "inline-flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-(--theme-muted-panel-bg) text-xs font-medium text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
93
- children: [
94
- typeIcon,
95
- typeLabel,
96
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-3 h-3 opacity-60" })
97
- ]
98
- }) : /* @__PURE__ */ jsxs("div", {
99
- className: "inline-flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-(--theme-muted-panel-bg) text-xs font-medium text-(--theme-muted-text-color)",
100
- children: [typeIcon, typeLabel]
121
+ /* @__PURE__ */ jsxs("div", { children: [
122
+ typeMenu && typeMenu.length > 0 ? /* @__PURE__ */ jsxs(ActionMenu, {
123
+ items: typeMenu,
124
+ label: typeLabel,
125
+ triggerClassName: "inline-flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-(--theme-muted-panel-bg) text-xs font-medium text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
126
+ children: [
127
+ typeIcon,
128
+ typeLabel,
129
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-3 h-3 opacity-60" })
130
+ ]
131
+ }) : /* @__PURE__ */ jsxs("div", {
132
+ className: "inline-flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-(--theme-muted-panel-bg) text-xs font-medium text-(--theme-muted-text-color)",
133
+ children: [typeIcon, typeLabel]
134
+ }),
135
+ hideName ? /* @__PURE__ */ jsx("div", { className: "mt-3" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
136
+ /* @__PURE__ */ jsx("input", {
137
+ ref: nameRef,
138
+ type: "text",
139
+ autoComplete: "off",
140
+ "data-1p-ignore": true,
141
+ value: name,
142
+ onChange: (e) => {
143
+ const next = sanitizeName ? sanitizeName(e.target.value) : e.target.value;
144
+ setName(next);
145
+ onNameChange?.(next);
146
+ },
147
+ onBlur: (e) => {
148
+ if (!e.target.value.trim()) setNameTouched(true);
149
+ },
150
+ onKeyDown: (e) => {
151
+ if (e.key === "Enter" && !e.nativeEvent.isComposing && !e.metaKey && !e.ctrlKey) {
152
+ e.preventDefault();
153
+ e.stopPropagation();
154
+ handleSubmit();
155
+ }
156
+ },
157
+ placeholder: namePlaceholder,
158
+ "aria-label": namePlaceholder,
159
+ "aria-required": !nameOptional,
160
+ "aria-invalid": nameMissing || !!nameError,
161
+ "aria-describedby": nameError || hint ? nameMessageId : void 0,
162
+ onAnimationEnd: () => setNameFlash(false),
163
+ className: cx("mt-2 -mb-1 -mx-1.5 w-[calc(100%+0.75rem)] rounded-md border-0 px-1.5 py-1 bg-transparent shadow-none text-lg font-medium text-(--theme-app) placeholder:text-(--theme-placeholder) focus:outline-none", nameFlash && "animate-field-flash", nameMissing ? "ring-1 ring-(--theme-error)" : "focus:ring-0")
101
164
  }),
102
- hideName ? /* @__PURE__ */ jsx("div", { className: "mt-3" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
103
- /* @__PURE__ */ jsx("input", {
104
- ref: nameRef,
105
- type: "text",
106
- autoComplete: "off",
107
- "data-1p-ignore": true,
108
- value: name,
109
- onChange: (e) => {
110
- const next = sanitizeName ? sanitizeName(e.target.value) : e.target.value;
111
- setName(next);
112
- onNameChange?.(next);
113
- },
114
- onBlur: (e) => {
115
- if (!e.target.value.trim()) setNameTouched(true);
116
- },
117
- onKeyDown: (e) => {
118
- if (e.key === "Enter" && !e.nativeEvent.isComposing && !e.metaKey && !e.ctrlKey) {
119
- e.preventDefault();
120
- e.stopPropagation();
121
- handleSubmit();
122
- }
123
- },
124
- placeholder: namePlaceholder,
125
- "aria-label": namePlaceholder,
126
- onAnimationEnd: () => setNameFlash(false),
127
- className: cx("mt-2 -mb-1 -mx-1.5 w-[calc(100%+0.75rem)] rounded-md border-0 px-1.5 py-1 bg-transparent shadow-none text-lg font-medium text-(--theme-app) placeholder:text-(--theme-placeholder) focus:outline-none", nameFlash && "animate-field-flash", nameMissing ? "ring-1 ring-(--theme-error)" : "focus:ring-0")
128
- }),
129
- nameError && /* @__PURE__ */ jsx("p", {
130
- className: "mt-1 text-xs text-(--theme-error)",
131
- children: nameError
132
- }),
133
- hint && /* @__PURE__ */ jsx("p", {
134
- className: "mt-1 text-xs text-(--theme-muted-text-color)",
135
- children: hint
136
- }),
137
- showDescription ? /* @__PURE__ */ jsx("textarea", {
138
- autoComplete: "off",
139
- "data-1p-ignore": true,
140
- value: description,
141
- onChange: (e) => setDescription(e.target.value),
142
- placeholder: descriptionText,
143
- "aria-label": descriptionText,
144
- rows: 3,
145
- className: "mt-1.5 w-full border-0 p-0 bg-transparent shadow-none resize-none text-sm text-(--theme-app) placeholder:text-(--theme-placeholder) focus:outline-none focus:ring-0"
146
- }) : /* @__PURE__ */ jsx("div", { className: "mt-3" })
147
- ] }),
148
- children && /* @__PURE__ */ jsx("div", {
149
- className: "mb-3 flex flex-col gap-3",
150
- children
151
- })
152
- ]
153
- }),
165
+ nameError && /* @__PURE__ */ jsx("p", {
166
+ id: nameMessageId,
167
+ className: "mt-1 text-xs text-(--theme-error-text)",
168
+ children: nameError
169
+ }),
170
+ hint && /* @__PURE__ */ jsx("p", {
171
+ id: nameMessageId,
172
+ className: "mt-1 text-xs text-(--theme-muted-text-color)",
173
+ children: hint
174
+ }),
175
+ showDescription ? /* @__PURE__ */ jsx("textarea", {
176
+ autoComplete: "off",
177
+ "data-1p-ignore": true,
178
+ value: description,
179
+ onChange: (e) => setDescription(e.target.value),
180
+ placeholder: descriptionText,
181
+ "aria-label": descriptionText,
182
+ rows: 3,
183
+ className: "mt-1.5 w-full border-0 p-0 bg-transparent shadow-none resize-none text-sm text-(--theme-app) placeholder:text-(--theme-placeholder) focus:outline-none focus:ring-0"
184
+ }) : /* @__PURE__ */ jsx("div", { className: "mt-3" })
185
+ ] }),
186
+ children && /* @__PURE__ */ jsx("div", {
187
+ className: "mb-3 flex flex-col gap-3",
188
+ children
189
+ })
190
+ ] }),
154
191
  properties && /* @__PURE__ */ jsx("div", {
155
- className: "flex flex-wrap items-center gap-1.5 px-4 pt-1 pb-3",
192
+ className: "flex flex-wrap items-center gap-1.5 pt-1 pb-3",
156
193
  children: properties
157
194
  }),
158
195
  advanced && /* @__PURE__ */ jsx("div", {
159
- className: "px-4 pb-3",
196
+ className: "pb-3",
160
197
  children: /* @__PURE__ */ jsx(Disclosure, {
161
198
  summary: t.advanced,
162
199
  summaryClassName: "text-xs font-medium text-(--theme-muted-text-color) transition-colors hover:text-(--theme-app)",
@@ -165,37 +202,7 @@ function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceho
165
202
  })
166
203
  })
167
204
  ]
168
- }), /* @__PURE__ */ jsxs("div", {
169
- className: "shrink-0 flex items-center justify-between gap-2 px-4 py-3",
170
- children: [showFavorite ? /* @__PURE__ */ jsx(Tooltip, {
171
- content: favorite ? t.favoriteHintOn : t.favoriteHintOff,
172
- children: /* @__PURE__ */ jsxs(Toggle, {
173
- pressed: favorite,
174
- onPressedChange: setFavorite,
175
- "aria-label": t.favorite,
176
- className: buttonClasses({
177
- variant: "ghost",
178
- size: "md"
179
- }),
180
- children: [favorite ? /* @__PURE__ */ jsx(FavoriteIcon, { className: "text-(--theme-favorite)" }) : /* @__PURE__ */ jsx(FavoriteOutlineIcon, {}), favorite ? t.favorited : t.favorite]
181
- })
182
- }) : /* @__PURE__ */ jsx("span", {}), /* @__PURE__ */ jsxs("div", {
183
- className: "flex items-center gap-2",
184
- children: [/* @__PURE__ */ jsx(Button, {
185
- variant: "ghost",
186
- size: "sm",
187
- onClick: onClose,
188
- children: hideSubmit ? common.close : common.cancel
189
- }), !hideSubmit && /* @__PURE__ */ jsx(Button, {
190
- variant: "primary",
191
- size: "sm",
192
- onClick: handleSubmit,
193
- "aria-disabled": !canSubmit,
194
- loading: submitting,
195
- children: submitting ? submittingText : submitText
196
- })]
197
- })]
198
- })]
205
+ })
199
206
  });
200
207
  }
201
208
  var pillClasses = (set) => buttonClasses({
@@ -1,9 +1,10 @@
1
1
  import { cx } from "../cx.js";
2
+ import { buttonClasses } from "./buttonClasses.js";
2
3
  import { CalendarIcon, ChevronLeftIcon, ChevronRightIcon } from "../icons.js";
3
4
  import { panelClassName, positionerClassName } from "./floating.js";
4
- import { buttonClasses } from "./buttonClasses.js";
5
5
  import { useStrings } from "./Provider.js";
6
6
  import { fieldBox } from "./fieldBox.js";
7
+ import { useFieldControl, useFieldLabelId } from "./Field.js";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import { useState } from "react";
9
10
  import { Popover } from "@base-ui/react/popover";
@@ -37,6 +38,7 @@ var caption = new Intl.DateTimeFormat(void 0, {
37
38
  var weekday = new Intl.DateTimeFormat(void 0, { weekday: "narrow" });
38
39
  var longDay = new Intl.DateTimeFormat(void 0, { dateStyle: "full" });
39
40
  var shownDay = new Intl.DateTimeFormat(void 0, { dateStyle: "medium" });
41
+ var longWeekday = new Intl.DateTimeFormat(void 0, { weekday: "long" });
40
42
  var calendarClassNames = {
41
43
  root: "relative p-3",
42
44
  months: "flex flex-col",
@@ -59,7 +61,7 @@ var calendarClassNames = {
59
61
  weekday: "size-9 text-center text-xs font-normal text-(--theme-muted-text-color)",
60
62
  week: "",
61
63
  day: "size-9 p-0 text-center text-sm",
62
- day_button: "size-9 rounded-md cursor-pointer outline-none hover:bg-(--theme-hover) focus-visible:ring-2 focus-visible:ring-(--theme-focus-ring) disabled:cursor-not-allowed disabled:hover:bg-transparent",
64
+ day_button: "size-9 rounded-md cursor-pointer hover:bg-(--theme-hover) focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-(--theme-focus) disabled:cursor-not-allowed disabled:hover:bg-transparent",
63
65
  selected: "[&>button]:bg-(--theme-accent) [&>button]:text-(--theme-accent-text) [&>button]:hover:bg-(--theme-accent)",
64
66
  today: "font-semibold [&>button]:underline [&>button]:underline-offset-4",
65
67
  outside: "text-(--theme-muted-text-color) opacity-60",
@@ -74,6 +76,8 @@ var triggerClassName = (size) => cx(fieldBox({ size }), "flex flex-1 cursor-poin
74
76
  function DatePicker({ value, onValueChange, withTime = false, min, max, timeStep = 60, required = false, disabled = false, placeholder, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, size = "md", className }) {
75
77
  const t = useStrings().datePicker;
76
78
  const { common } = useStrings();
79
+ const field = useFieldControl();
80
+ const fieldLabelId = useFieldLabelId();
77
81
  const [open, setOpen] = useState(false);
78
82
  const [weekStartsOn] = useState(firstWeekday);
79
83
  const day = parseDay(value);
@@ -103,10 +107,10 @@ function DatePicker({ value, onValueChange, withTime = false, min, max, timeStep
103
107
  id,
104
108
  disabled,
105
109
  "aria-label": ariaLabel,
106
- "aria-labelledby": ariaLabelledBy,
107
- "aria-describedby": ariaDescribedBy,
108
- "aria-invalid": ariaInvalid || void 0,
109
- "aria-required": ariaRequired || void 0,
110
+ "aria-labelledby": ariaLabelledBy ?? (ariaLabel ? void 0 : fieldLabelId),
111
+ "aria-describedby": ariaDescribedBy ?? field?.["aria-describedby"],
112
+ "aria-invalid": ariaInvalid || field?.["aria-invalid"],
113
+ "aria-required": ariaRequired || field?.["aria-required"],
110
114
  className: triggerClassName(size),
111
115
  children: [/* @__PURE__ */ jsx(CalendarIcon, {
112
116
  "aria-hidden": "true",
@@ -150,7 +154,7 @@ function DatePicker({ value, onValueChange, withTime = false, min, max, timeStep
150
154
  labelPrevious: () => t.previousMonth,
151
155
  labelNext: () => t.nextMonth,
152
156
  labelGrid: (month) => caption.format(month),
153
- labelWeekday: (date) => new Intl.DateTimeFormat(void 0, { weekday: "long" }).format(date)
157
+ labelWeekday: (date) => longWeekday.format(date)
154
158
  },
155
159
  components: { Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeftIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true" }) }
156
160
  }), !required && day && /* @__PURE__ */ jsx("div", {
@@ -178,7 +182,7 @@ function DatePicker({ value, onValueChange, withTime = false, min, max, timeStep
178
182
  min: sameDay(min) ? timeOf(min) : void 0,
179
183
  max: sameDay(max) ? timeOf(max) : void 0,
180
184
  disabled,
181
- "aria-invalid": ariaInvalid || void 0,
185
+ "aria-invalid": ariaInvalid || field?.["aria-invalid"],
182
186
  onChange: (event) => {
183
187
  const next = event.target.value;
184
188
  if (next) emit(day ?? earliest ?? /* @__PURE__ */ new Date(), next);
@@ -1,18 +1,52 @@
1
- import React from 'react';
2
- interface IDescriptionListItemProps {
3
- label: string;
4
- children: React.ReactNode;
5
- tooltip?: string;
6
- className?: string;
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ /** `plain` sets rows apart by space alone; `divided` rules a line between them; `card`
3
+ * also frames them in a panel. */
4
+ export type DescriptionListVariant = 'plain' | 'divided' | 'card';
5
+ export interface DescriptionListProps extends Omit<ComponentPropsWithoutRef<'dl'>, 'className' | 'title'> {
6
+ variant?: DescriptionListVariant | undefined;
7
+ /** A heading over the list, which names it, such as "Actor" among a record's
8
+ * details. */
9
+ title?: ReactNode;
10
+ /** The title's level in the page's outline. */
11
+ headingLevel?: 2 | 3 | 4 | undefined;
12
+ /** Puts each label over its value at any width. Without it they stack only when the
13
+ * list is too narrow for both side by side. In a DescriptionListGroup, the group's
14
+ * `stacked` decides. */
15
+ stacked?: boolean | undefined;
16
+ /** Styles the box around the list, such as its margins or width. */
17
+ className?: string | undefined;
7
18
  }
8
- export declare function DescriptionListItem({ label, children, tooltip, className, ...props }: IDescriptionListItemProps & React.ComponentPropsWithoutRef<'dd'>): React.JSX.Element;
9
- export default function DescriptionList({ children, title, separators, subtitle, className, wrapperClassName, vertical, }: {
10
- children: React.ReactNode;
11
- className?: string;
12
- wrapperClassName?: string;
13
- title?: string | React.ReactNode;
14
- separators?: boolean;
15
- subtitle?: string | React.ReactNode;
16
- vertical?: boolean;
17
- }): React.JSX.Element;
18
- export {};
19
+ /** Names and their values, such as the details of a record in a drawer or a card. The
20
+ * label column is as wide as its longest label, up to two fifths of the list, so a
21
+ * long label wraps rather than squeezing the values; each label sits over its value
22
+ * when the list is narrow. Lists side by side in one panel share their label column
23
+ * inside a `DescriptionListGroup`. */
24
+ export default function DescriptionList({ variant, title, headingLevel, stacked, className, children, ...props }: DescriptionListProps): import("react").JSX.Element;
25
+ /** Description lists in one panel, such as a record's Overview, Actor and Target, that
26
+ * share one label column: it fits the longest label across all of them, so their
27
+ * values start at one edge down the panel. Each list keeps its own title and variant;
28
+ * all of them stack together when the panel is narrow. */
29
+ export declare function DescriptionListGroup({ stacked, className, children, }: {
30
+ /** Puts each label over its value at any width. */
31
+ stacked?: boolean | undefined;
32
+ /** Styles the box around the group, such as its margins or width. */
33
+ className?: string | undefined;
34
+ /** `DescriptionList`s. */
35
+ children: ReactNode;
36
+ }): import("react").JSX.Element;
37
+ export interface DescriptionListItemProps {
38
+ label: ReactNode;
39
+ /** The value. Nothing, an empty string or `false` shows the library's empty mark.
40
+ * A path or URL in it, or in a link that is it, wraps after its slashes. */
41
+ children?: ReactNode;
42
+ /** Help behind an info button beside the label. */
43
+ tooltip?: string | undefined;
44
+ /** Sets the value in a monospace face, for an ID, a path or a hash. */
45
+ mono?: boolean | undefined;
46
+ /** Adds a button that copies the value: `true` copies its text as shown; a string
47
+ * copies that instead, such as a full ID behind a shortened one. */
48
+ copy?: boolean | string | undefined;
49
+ className?: string | undefined;
50
+ }
51
+ /** A label and its value in a DescriptionList. */
52
+ export declare function DescriptionListItem({ label, children, tooltip, mono, copy, className, }: DescriptionListItemProps): import("react").JSX.Element;