@parallelworks/ui 0.41.0 → 0.43.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 (283) hide show
  1. package/README.md +25 -0
  2. package/dist/ai/components/AllocationSelector.d.ts +3 -4
  3. package/dist/ai/components/AllocationSelector.js +37 -33
  4. package/dist/ai/components/AttachmentManager.js +7 -7
  5. package/dist/ai/components/AttachmentUpload.js +5 -5
  6. package/dist/ai/components/BranchNavigator.js +1 -1
  7. package/dist/ai/components/ChatEmptyState.js +2 -2
  8. package/dist/ai/components/ChatInput.js +10 -8
  9. package/dist/ai/components/ChatLayout.js +4 -5
  10. package/dist/ai/components/ChatMessage.js +12 -12
  11. package/dist/ai/components/ChatMessageList.js +9 -9
  12. package/dist/ai/components/ChatSidebar.js +8 -9
  13. package/dist/ai/components/ChatThread.js +4 -4
  14. package/dist/ai/components/ComposerChrome.d.ts +2 -2
  15. package/dist/ai/components/ComposerChrome.js +3 -6
  16. package/dist/ai/components/DragOverlay.js +2 -2
  17. package/dist/ai/components/ModelSelector.d.ts +5 -3
  18. package/dist/ai/components/ModelSelector.js +102 -339
  19. package/dist/ai/components/PastedText.js +11 -11
  20. package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
  21. package/dist/ai/components/ProviderIssueBanner.js +34 -16
  22. package/dist/ai/components/Reasoning.js +4 -4
  23. package/dist/ai/components/ShareDialog.js +43 -35
  24. package/dist/ai/components/SlashMenu.d.ts +12 -2
  25. package/dist/ai/components/SlashMenu.js +29 -13
  26. package/dist/ai/components/agent/ActivityLine.js +3 -3
  27. package/dist/ai/components/agent/AgentMessageParts.js +20 -20
  28. package/dist/ai/components/agent/PermissionPicker.js +13 -11
  29. package/dist/ai/components/conversationActions.d.ts +4 -6
  30. package/dist/ai/components/conversationActions.js +9 -13
  31. package/dist/ai/core/ChatProvider.js +1 -1
  32. package/dist/ai/core/config.js +1 -1
  33. package/dist/ai/core/providerIssues.d.ts +7 -0
  34. package/dist/ai/core/providerIssues.js +9 -1
  35. package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
  36. package/dist/ai/core/useKeyboardShortcuts.js +8 -2
  37. package/dist/ai/index.d.ts +0 -1
  38. package/dist/ai/index.js +1 -2
  39. package/dist/ai/strings.d.ts +19 -0
  40. package/dist/ai/strings.js +18 -1
  41. package/dist/ai/ui/Avatar.js +5 -5
  42. package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
  43. package/dist/ai/ui/ConversationSidebar.js +6 -7
  44. package/dist/ai/ui/Markdown.js +3 -3
  45. package/dist/ai/ui/Notice.js +6 -6
  46. package/dist/ai/ui/chip.d.ts +4 -0
  47. package/dist/ai/ui/chip.js +8 -0
  48. package/dist/ai/ui/sidebar.d.ts +6 -5
  49. package/dist/ai/ui/sidebar.js +39 -43
  50. package/dist/components/ActionMenu.d.ts +13 -0
  51. package/dist/components/ActionMenu.js +30 -0
  52. package/dist/components/Avatar.js +6 -6
  53. package/dist/components/Breadcrumbs.js +1 -1
  54. package/dist/components/Button.js +10 -10
  55. package/dist/components/Callout.js +2 -2
  56. package/dist/components/Card.js +3 -3
  57. package/dist/components/Combobox.d.ts +49 -0
  58. package/dist/components/Combobox.js +405 -0
  59. package/dist/components/ConfirmModal.js +11 -11
  60. package/dist/components/ContextMenu.d.ts +23 -0
  61. package/dist/components/ContextMenu.js +89 -0
  62. package/dist/components/CopyToClipboard.js +2 -2
  63. package/dist/components/CreateModal.d.ts +19 -38
  64. package/dist/components/CreateModal.js +116 -267
  65. package/dist/components/DescriptionList.js +8 -8
  66. package/dist/components/Filter.js +2 -2
  67. package/dist/components/FilterPill.js +2 -2
  68. package/dist/components/HoverCard.d.ts +14 -0
  69. package/dist/components/HoverCard.js +33 -0
  70. package/dist/components/IconButton.d.ts +5 -5
  71. package/dist/components/IconButton.js +18 -22
  72. package/dist/components/InfoTip.d.ts +15 -0
  73. package/dist/components/InfoTip.js +60 -0
  74. package/dist/components/Input.js +5 -5
  75. package/dist/components/LetterBadge.js +2 -2
  76. package/dist/components/Loader.js +3 -3
  77. package/dist/components/Markdown.js +1 -1
  78. package/dist/components/MarkdownImpl.js +2 -2
  79. package/dist/components/Menu.d.ts +33 -0
  80. package/dist/components/Menu.js +86 -0
  81. package/dist/components/MenuEntries.d.ts +56 -0
  82. package/dist/components/MenuEntries.js +123 -0
  83. package/dist/components/Modal.d.ts +29 -0
  84. package/dist/components/Modal.js +47 -0
  85. package/dist/components/Overview.js +11 -10
  86. package/dist/components/PageHeader.d.ts +10 -16
  87. package/dist/components/PageHeader.js +69 -95
  88. package/dist/components/Pagination.js +5 -5
  89. package/dist/components/Provider.d.ts +5 -11
  90. package/dist/components/Provider.js +11 -14
  91. package/dist/components/Radio.d.ts +8 -0
  92. package/dist/components/Radio.js +16 -0
  93. package/dist/components/SectionHeader.js +2 -2
  94. package/dist/components/SegmentedControl.d.ts +6 -5
  95. package/dist/components/SegmentedControl.js +34 -30
  96. package/dist/components/Select.d.ts +27 -0
  97. package/dist/components/Select.js +78 -0
  98. package/dist/components/SettingModeOption.d.ts +5 -8
  99. package/dist/components/SettingModeOption.js +10 -12
  100. package/dist/components/SettingRow.js +4 -4
  101. package/dist/components/SettingsCard.js +4 -4
  102. package/dist/components/SettingsGroup.js +2 -2
  103. package/dist/components/Sort.js +1 -1
  104. package/dist/components/StatusBadge.js +7 -7
  105. package/dist/components/StatusIcons.js +4 -4
  106. package/dist/components/Switch.d.ts +22 -0
  107. package/dist/components/Switch.js +28 -0
  108. package/dist/components/Table.js +11 -11
  109. package/dist/components/Tooltip.d.ts +24 -20
  110. package/dist/components/Tooltip.js +58 -76
  111. package/dist/components/comboboxItems.d.ts +24 -0
  112. package/dist/components/comboboxItems.js +10 -0
  113. package/dist/components/floating.d.ts +14 -0
  114. package/dist/components/floating.js +21 -0
  115. package/dist/components/search.d.ts +2 -0
  116. package/dist/components/search.js +14 -0
  117. package/dist/editor/Editor.js +1 -1
  118. package/dist/editor/EditorField.js +16 -21
  119. package/dist/editor/FormCodePanel.js +19 -19
  120. package/dist/editor/Monaco.js +3 -3
  121. package/dist/file-explorer/FileExplorer.js +77 -81
  122. package/dist/file-explorer/FileExplorerContext.js +2 -2
  123. package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
  124. package/dist/file-explorer/FilePreview/Inline.js +1 -1
  125. package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
  126. package/dist/file-explorer/FilePreview/Viewer.js +8 -8
  127. package/dist/file-explorer/FilePreview/index.d.ts +1 -1
  128. package/dist/file-explorer/FilePreview/index.js +49 -83
  129. package/dist/file-explorer/FileRow.d.ts +4 -3
  130. package/dist/file-explorer/FileRow.js +32 -38
  131. package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
  132. package/dist/file-explorer/FileRowsWindow.js +4 -4
  133. package/dist/file-explorer/FileTable.d.ts +3 -2
  134. package/dist/file-explorer/FileTable.js +3 -3
  135. package/dist/file-explorer/LoadMoreRow.js +1 -1
  136. package/dist/file-explorer/TreeView.js +11 -16
  137. package/dist/file-explorer/helpers.js +11 -12
  138. package/dist/file-explorer/toasts.js +11 -11
  139. package/dist/form/FieldGroup.d.ts +11 -0
  140. package/dist/form/FieldGroup.js +36 -0
  141. package/dist/form/FieldWrapper.js +4 -4
  142. package/dist/form/Fields/BooleanField.js +23 -33
  143. package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
  144. package/dist/form/Fields/CheckboxGroupField.js +9 -13
  145. package/dist/form/Fields/ColorField.d.ts +1 -2
  146. package/dist/form/Fields/ColorField.js +6 -11
  147. package/dist/form/Fields/DropdownField.d.ts +3 -13
  148. package/dist/form/Fields/DropdownField.js +40 -27
  149. package/dist/form/Fields/DurationField.d.ts +1 -2
  150. package/dist/form/Fields/DurationField.js +25 -32
  151. package/dist/form/Fields/LabelField.js +2 -2
  152. package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
  153. package/dist/form/Fields/MultiDropdownField.js +31 -22
  154. package/dist/form/Fields/NumberField.d.ts +1 -1
  155. package/dist/form/Fields/NumberField.js +65 -35
  156. package/dist/form/Fields/ObjectField.d.ts +1 -1
  157. package/dist/form/Fields/ObjectField.js +12 -43
  158. package/dist/form/Fields/RadioField.d.ts +1 -1
  159. package/dist/form/Fields/RadioField.js +30 -41
  160. package/dist/form/Fields/RangeField.d.ts +1 -2
  161. package/dist/form/Fields/RangeField.js +23 -16
  162. package/dist/form/Fields/StringField.d.ts +1 -2
  163. package/dist/form/Fields/StringField.js +58 -26
  164. package/dist/form/Fields/TextAreaField.js +12 -10
  165. package/dist/form/Form.d.ts +30 -48
  166. package/dist/form/Form.js +306 -412
  167. package/dist/form/FormLayout.js +9 -9
  168. package/dist/form/Wizard/WizardContainer.d.ts +1 -4
  169. package/dist/form/Wizard/WizardContainer.js +40 -56
  170. package/dist/form/Wizard/WizardNavigation.js +1 -1
  171. package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
  172. package/dist/form/Wizard/WizardStepContent.js +11 -16
  173. package/dist/form/Wizard/WizardStepIndicator.js +6 -6
  174. package/dist/form/Wizard/types.d.ts +0 -14
  175. package/dist/form/fieldRegistry.d.ts +1 -1
  176. package/dist/form/fieldRegistry.js +6 -6
  177. package/dist/form/formEditing.js +1 -1
  178. package/dist/form/index.d.ts +5 -4
  179. package/dist/form/index.js +6 -7
  180. package/dist/form/lib.js +3 -2
  181. package/dist/form/types/fieldComponentTypes.d.ts +8 -10
  182. package/dist/form/useChoiceField.d.ts +18 -0
  183. package/dist/form/useChoiceField.js +46 -0
  184. package/dist/form/useFieldValue.d.ts +7 -0
  185. package/dist/form/useFieldValue.js +20 -0
  186. package/dist/form/useParsedOpts.d.ts +3 -1
  187. package/dist/form/useParsedOpts.js +12 -17
  188. package/dist/form/utils/dependentOptions.d.ts +8 -4
  189. package/dist/form/utils/dependentOptions.js +25 -17
  190. package/dist/form/utils/fieldItems.d.ts +32 -0
  191. package/dist/form/utils/fieldItems.js +32 -0
  192. package/dist/form/utils/fieldPath.d.ts +10 -0
  193. package/dist/form/utils/fieldPath.js +20 -0
  194. package/dist/form/utils/shareEqual.d.ts +6 -0
  195. package/dist/form/utils/shareEqual.js +38 -0
  196. package/dist/graph/AnnotationBanner.js +8 -8
  197. package/dist/graph/Collapse.d.ts +1 -0
  198. package/dist/graph/Collapse.js +6 -27
  199. package/dist/graph/Connectors.js +5 -5
  200. package/dist/graph/DependencyGraph.js +20 -19
  201. package/dist/graph/GraphEditor.js +30 -41
  202. package/dist/graph/GraphEditorDialogs.js +17 -17
  203. package/dist/graph/GraphNode.js +1 -1
  204. package/dist/graph/InputDialog.js +19 -22
  205. package/dist/graph/InputsEditor.js +58 -66
  206. package/dist/graph/JobSummary.js +42 -39
  207. package/dist/graph/MatrixGroup.js +1 -1
  208. package/dist/graph/ProblemsButton.js +18 -19
  209. package/dist/graph/Reveal.js +1 -1
  210. package/dist/graph/ShortcutsButton.js +15 -18
  211. package/dist/graph/SuggestionInput.d.ts +5 -10
  212. package/dist/graph/SuggestionInput.js +14 -18
  213. package/dist/graph/ToolbarPopover.d.ts +11 -6
  214. package/dist/graph/ToolbarPopover.js +35 -67
  215. package/dist/graph/TreeView.js +24 -37
  216. package/dist/graph/WorkflowSettingsDialog.js +4 -4
  217. package/dist/graph/editorChrome.js +13 -12
  218. package/dist/graph/editorFields.js +29 -29
  219. package/dist/graph/editorPrimitives.d.ts +1 -1
  220. package/dist/graph/editorPrimitives.js +10 -7
  221. package/dist/graph/editorRows.js +103 -97
  222. package/dist/graph/fieldProblems.js +2 -2
  223. package/dist/graph/graphEditorState.d.ts +4 -3
  224. package/dist/graph/inputRefs.js +9 -9
  225. package/dist/graph/settingsViews.js +6 -7
  226. package/dist/graph/stepWith.js +6 -6
  227. package/dist/index.d.ts +14 -15
  228. package/dist/index.js +15 -14
  229. package/dist/list/ActionToolbar.d.ts +6 -14
  230. package/dist/list/ActionToolbar.js +48 -96
  231. package/dist/list/ListPage.d.ts +6 -12
  232. package/dist/list/ListPage.js +46 -29
  233. package/dist/list/ListPager.js +4 -4
  234. package/dist/list/ListTable.js +5 -5
  235. package/dist/list/ListViewControls.d.ts +5 -4
  236. package/dist/list/ListViewControls.js +177 -267
  237. package/dist/list/UserHoverCard.d.ts +3 -17
  238. package/dist/list/UserHoverCard.js +21 -45
  239. package/dist/list/index.d.ts +3 -4
  240. package/dist/list/index.js +3 -4
  241. package/dist/list/listSearch.js +12 -11
  242. package/dist/list/rowMenu.d.ts +68 -0
  243. package/dist/list/rowMenu.js +136 -0
  244. package/dist/logviewer/LogViewer.js +26 -26
  245. package/dist/styles.css +1 -1
  246. package/package.json +7 -13
  247. package/dist/ai/ui/Dropdown.d.ts +0 -31
  248. package/dist/ai/ui/Dropdown.js +0 -110
  249. package/dist/components/AddMenu.d.ts +0 -18
  250. package/dist/components/AddMenu.js +0 -46
  251. package/dist/components/BareModal.d.ts +0 -17
  252. package/dist/components/BareModal.js +0 -77
  253. package/dist/components/CollapsiblePanel.d.ts +0 -27
  254. package/dist/components/CollapsiblePanel.js +0 -77
  255. package/dist/components/Dropdown.d.ts +0 -28
  256. package/dist/components/Dropdown.js +0 -355
  257. package/dist/components/Listbox.d.ts +0 -21
  258. package/dist/components/Listbox.js +0 -119
  259. package/dist/components/MultiSelect.d.ts +0 -22
  260. package/dist/components/MultiSelect.js +0 -168
  261. package/dist/components/SwitchToggle.d.ts +0 -15
  262. package/dist/components/SwitchToggle.js +0 -57
  263. package/dist/components/SwitchToggleSmall.d.ts +0 -6
  264. package/dist/components/SwitchToggleSmall.js +0 -14
  265. package/dist/components/Toggle.d.ts +0 -6
  266. package/dist/components/Toggle.js +0 -20
  267. package/dist/components/dropdownUtils.d.ts +0 -37
  268. package/dist/components/dropdownUtils.js +0 -99
  269. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
  270. package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
  271. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
  272. package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
  273. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
  274. package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
  275. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
  276. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
  277. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
  278. package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
  279. package/dist/form/SpecialTypes/index.d.ts +0 -3
  280. package/dist/list/HoverCard.d.ts +0 -24
  281. package/dist/list/HoverCard.js +0 -73
  282. package/dist/list/RowContextMenu.d.ts +0 -127
  283. package/dist/list/RowContextMenu.js +0 -515
@@ -9,5 +9,4 @@ export interface IDurationField extends BaseField {
9
9
  disableValue?: number;
10
10
  disableLabel?: string;
11
11
  }
12
- declare const _default: import("react").MemoExoticComponent<({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty, currentValue, setFieldValue, setFieldTouched, }: FieldComponentProps<IDurationField, number | string | undefined>) => import("react").JSX.Element>;
13
- export default _default;
12
+ export default function DurationField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, }: FieldComponentProps<IDurationField>): import("react").JSX.Element;
@@ -1,21 +1,24 @@
1
1
  import { useStrings } from "../../components/Provider.js";
2
2
  import { FieldWrapper } from "../FieldWrapper.js";
3
+ import { useFieldValue } from "../useFieldValue.js";
3
4
  import { formatDuration, parseDuration } from "../utils/duration.js";
4
5
  import { setDurationValidity } from "./durationValidity.js";
5
- import cx from "classnames";
6
- import { memo, useEffect, useRef, useState } from "react";
7
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { useEffect, useRef, useState } from "react";
9
+ import { useFormContext } from "react-hook-form";
8
10
  //#region src/form/Fields/DurationField.tsx
9
- var DEBOUNCE_MS = 500;
10
11
  var isNumericString = (value) => typeof value === "string" && /^\d+$/.test(value.trim());
11
12
  var toDisplay = (value) => {
12
13
  if (typeof value === "number") return formatDuration(value);
13
14
  if (isNumericString(value)) return formatDuration(Number(value));
14
15
  return "";
15
16
  };
16
- var DurationField_default = memo(function DurationField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty, currentValue, setFieldValue, setFieldTouched }) {
17
+ function DurationField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact }) {
17
18
  const { form: t } = useStrings();
18
19
  const name = field.name ?? "";
20
+ const [currentValue, change] = useFieldValue(name);
21
+ const { setValue } = useFormContext();
19
22
  const min = field.min !== void 0 ? Number(field.min) : Number.NEGATIVE_INFINITY;
20
23
  const max = field.max !== void 0 ? Number(field.max) : Number.POSITIVE_INFINITY;
21
24
  const disableValue = field.disableValue;
@@ -23,12 +26,11 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
23
26
  const isSentinel = hasDisableCheckbox && currentValue !== "" && Number(currentValue) === disableValue;
24
27
  const [text, setText] = useState(() => toDisplay(currentValue));
25
28
  const focusedRef = useRef(false);
26
- const debounceRef = useRef(null);
27
29
  useEffect(() => {
28
30
  if (isSentinel) {
29
- if (typeof currentValue !== "number") setFieldValue?.(name, disableValue);
30
- } else if (isNumericString(currentValue)) setFieldValue?.(name, Number(currentValue));
31
- else if ((currentValue === void 0 || currentValue === null || currentValue === "") && typeof field.default === "number") setFieldValue?.(name, field.default);
31
+ if (typeof currentValue !== "number") setValue(name, disableValue);
32
+ } else if (isNumericString(currentValue)) setValue(name, Number(currentValue));
33
+ else if ((currentValue === void 0 || currentValue === null || currentValue === "") && typeof field.default === "number") setValue(name, field.default);
32
34
  }, []);
33
35
  useEffect(() => {
34
36
  if (!focusedRef.current) setText(toDisplay(currentValue));
@@ -43,44 +45,35 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
43
45
  useEffect(() => {
44
46
  setDurationValidity(name, error === null);
45
47
  }, [name, error]);
46
- useEffect(() => () => {
47
- setDurationValidity(name, true);
48
- clearTimeout(debounceRef.current ?? void 0);
49
- }, [name]);
50
- const flushToFormik = (val) => {
51
- setFieldValue?.(name, val);
48
+ useEffect(() => () => setDurationValidity(name, true), [name]);
49
+ const set = (val) => {
50
+ change(val);
52
51
  onChange?.(val);
53
- setFieldTouched?.(name, true);
54
52
  };
55
53
  const handleDisableToggle = (checked) => {
56
- clearTimeout(debounceRef.current ?? void 0);
57
- setFormDirty(true);
58
54
  if (checked) {
59
55
  setText("");
60
- if (disableValue !== void 0) flushToFormik(disableValue);
61
- } else flushToFormik(typeof field.default === "number" ? field.default : "");
56
+ if (disableValue !== void 0) set(disableValue);
57
+ } else set(typeof field.default === "number" ? field.default : "");
62
58
  };
63
59
  const handleChange = (e) => {
64
60
  const raw = e.target.value;
65
61
  setText(raw);
66
- setFormDirty(true);
67
- clearTimeout(debounceRef.current ?? void 0);
68
62
  const rawTrimmed = raw.trim();
69
63
  const value = rawTrimmed === "" ? "" : parseDuration(rawTrimmed);
70
- if (value === "" || typeof value === "number" && value >= min && value <= max) debounceRef.current = setTimeout(() => flushToFormik(value), DEBOUNCE_MS);
64
+ if (value === "" || typeof value === "number" && value >= min && value <= max) set(value);
71
65
  };
72
66
  const handleFocus = () => {
73
67
  focusedRef.current = true;
74
68
  };
75
69
  const handleBlur = () => {
76
70
  focusedRef.current = false;
77
- clearTimeout(debounceRef.current ?? void 0);
78
71
  if (trimmed === "") {
79
72
  setText("");
80
- flushToFormik("");
73
+ set("");
81
74
  } else if (parsed !== null && parsed >= min && parsed <= max) {
82
75
  setText(formatDuration(parsed));
83
- flushToFormik(parsed);
76
+ set(parsed);
84
77
  }
85
78
  };
86
79
  return /* @__PURE__ */ jsx(FieldWrapper, {
@@ -90,10 +83,10 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
90
83
  labelPosition,
91
84
  spaceCompact: spaceCompact ?? false,
92
85
  ...field.description !== void 0 && { description: field.description },
93
- children: ({ id, describedBy }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
86
+ children: ({ id, describedBy }) => /* @__PURE__ */ jsxs(Fragment, { children: [
94
87
  !isSentinel && /* @__PURE__ */ jsx("input", {
95
88
  "data-1p-ignore": true,
96
- className: cx("w-full", disabled && "disabled", (missing || error !== null) && "invalid"),
89
+ className: clsx("w-full", disabled && "disabled", (missing || error !== null) && "invalid"),
97
90
  id,
98
91
  "aria-describedby": describedBy,
99
92
  name,
@@ -111,13 +104,13 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
111
104
  children: error
112
105
  }),
113
106
  hasDisableCheckbox && /* @__PURE__ */ jsxs("label", {
114
- className: cx("flex items-center gap-2 mt-1", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
107
+ className: clsx("flex items-center gap-2 mt-1", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
115
108
  children: [/* @__PURE__ */ jsx("input", {
116
109
  type: "checkbox",
117
110
  checked: isSentinel,
118
111
  disabled,
119
112
  onChange: (e) => handleDisableToggle(e.target.checked),
120
- className: cx("h-4 w-4 accent-(--theme-link)", disabled ? "cursor-not-allowed" : "cursor-pointer")
113
+ className: clsx("h-4 w-4 accent-(--theme-link)", disabled ? "cursor-not-allowed" : "cursor-pointer")
121
114
  }), /* @__PURE__ */ jsx("span", {
122
115
  className: "theme-text",
123
116
  children: field.disableLabel
@@ -125,6 +118,6 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
125
118
  })
126
119
  ] })
127
120
  });
128
- });
121
+ }
129
122
  //#endregion
130
- export { DurationField_default as default };
123
+ export { DurationField as default };
@@ -1,4 +1,4 @@
1
- import cx from "classnames";
1
+ import { clsx } from "clsx";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/form/Fields/LabelField.tsx
4
4
  function LabelField(props) {
@@ -10,7 +10,7 @@ function LabelField(props) {
10
10
  whiteSpace: "pre-wrap",
11
11
  ...field.size ? { fontSize: `${field.size}px` } : {}
12
12
  },
13
- className: cx("relative", "text-md", field.bold !== false ? "font-bold" : ""),
13
+ className: clsx("relative", "text-md", field.bold !== false ? "font-bold" : ""),
14
14
  children: field.text?.toString().replace(/(\r)/g, "").replace(/(\\n)/g, "\n") || label
15
15
  })
16
16
  });
@@ -1,18 +1,12 @@
1
1
  import type { FieldComponentProps } from '../types/fieldComponentTypes.js';
2
2
  import type { BaseField } from '../types/fieldTypes.js';
3
+ import { type FieldOption } from '../utils/fieldItems.js';
4
+ type MultiDropdownValue = string | boolean | number;
5
+ type MultiDropdownOption = FieldOption<MultiDropdownValue>;
3
6
  export interface IMultiDropdownField extends BaseField {
4
7
  type: 'multi-dropdown';
5
- options: Array<string | {
6
- label: string;
7
- value: string | boolean | number;
8
- secondaryLabel?: string;
9
- selected?: boolean;
10
- }> | Record<string, Array<string | {
11
- label: string;
12
- value: string | boolean | number;
13
- secondaryLabel?: string;
14
- selected?: boolean;
15
- }>>;
8
+ options: MultiDropdownOption[] | Record<string, MultiDropdownOption[]>;
16
9
  parentValue?: string | boolean | number;
17
10
  }
18
- export default function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange, values, }: FieldComponentProps<IMultiDropdownField>): import("react").JSX.Element;
11
+ export default function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, onChange, }: FieldComponentProps<IMultiDropdownField>): import("react").JSX.Element;
12
+ export {};
@@ -1,36 +1,45 @@
1
+ import { Combobox } from "../../components/Combobox.js";
2
+ import { toFieldItems } from "../utils/fieldItems.js";
1
3
  import { FieldWrapper } from "../FieldWrapper.js";
2
- import { dependentOptions } from "../utils/dependentOptions.js";
3
- import { MultiSelectionDropdown } from "../Form.js";
4
+ import { useFieldValue } from "../useFieldValue.js";
5
+ import { useDependentOptions } from "../utils/dependentOptions.js";
6
+ import { usePrevious } from "../usePrevious.js";
4
7
  import { jsx } from "react/jsx-runtime";
5
- import { Field } from "formik";
8
+ import { useEffect, useMemo } from "react";
6
9
  //#region src/form/Fields/MultiDropdownField.tsx
7
- function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange, values }) {
8
- const fieldName = field.name ?? "";
9
- const dependent = dependentOptions(field.options, field.depends_on, values);
10
- const { options } = dependent;
10
+ function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, onChange }) {
11
+ const [value, change] = useFieldValue(field.name ?? "");
12
+ const dependent = useDependentOptions(field.options, field.depends_on);
13
+ const items = useMemo(() => toFieldItems(dependent.options), [dependent.options]);
11
14
  const parentValue = field.depends_on ? dependent.parentValue : field.parentValue;
15
+ const previousParent = usePrevious(parentValue);
16
+ useEffect(() => {
17
+ if (previousParent !== void 0 && previousParent !== parentValue) change([]);
18
+ }, [
19
+ previousParent,
20
+ parentValue,
21
+ change
22
+ ]);
12
23
  return /* @__PURE__ */ jsx(FieldWrapper, {
13
24
  optional: field.optional,
14
25
  label,
15
26
  tooltipComponent,
16
27
  labelPosition,
17
28
  spaceCompact,
18
- children: ({ id }) => disabled ? /* @__PURE__ */ jsx(Field, {
19
- className: "theme-input h-7 w-full rounded border placeholder:text-xs",
29
+ children: ({ id, describedBy }) => /* @__PURE__ */ jsx(Combobox, {
20
30
  id,
21
- type: "search",
22
- name: field.name,
23
- disabled: true,
24
- onChange
25
- }, field.name) : /* @__PURE__ */ jsx(MultiSelectionDropdown, {
26
- name: fieldName,
27
- label: field.label || label,
28
- options,
29
- setFormDirty,
30
- parentValue,
31
- onChange,
32
- invalid: missing
33
- }, field.name)
31
+ "aria-describedby": describedBy,
32
+ multiple: true,
33
+ items,
34
+ value: value ?? [],
35
+ onValueChange: (next) => {
36
+ change(next);
37
+ onChange?.(next);
38
+ },
39
+ required: !field.optional,
40
+ disabled,
41
+ "aria-invalid": missing
42
+ })
34
43
  });
35
44
  }
36
45
  //#endregion
@@ -10,4 +10,4 @@ export interface INumberField extends BaseField {
10
10
  placeholder?: string;
11
11
  thousandsSeparator?: boolean;
12
12
  }
13
- export default function NumberField(props: FieldComponentProps<INumberField>): import("react").JSX.Element;
13
+ export default function NumberField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, }: FieldComponentProps<INumberField>): import("react").JSX.Element;
@@ -1,52 +1,82 @@
1
+ import { FaAngleDown } from "../../icons/fa/FaAngleDown.js";
2
+ import { FaAngleUp } from "../../icons/fa/FaAngleUp.js";
1
3
  import { FieldWrapper } from "../FieldWrapper.js";
2
- import FormikCustomInput from "../SpecialTypes/FormikCustomInput.js";
3
- import FormikNumericInput from "../SpecialTypes/FormikNumericInput.js";
4
+ import { useFieldValue } from "../useFieldValue.js";
4
5
  import { getPlaceholder } from "../utils/getPlaceholder.js";
6
+ import { clsx } from "clsx";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
5
8
  import { useEffect } from "react";
6
- import { jsx } from "react/jsx-runtime";
7
- import { useField, useFormikContext } from "formik";
9
+ import { NumberField } from "@base-ui/react/number-field";
8
10
  //#region src/form/Fields/NumberField.tsx
9
- function NumberField(props) {
10
- const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact } = props;
11
- const fieldName = field.name ?? "";
12
- const [fieldState] = useField(fieldName);
13
- const { setFieldValue } = useFormikContext();
11
+ /** A value held as text, as one read from a workflow's inputs may be, still shows as its number. */
12
+ function toNumber(value) {
13
+ if (typeof value === "number") return value;
14
+ if (typeof value === "string" && value.trim() !== "") {
15
+ const parsed = Number(value);
16
+ return Number.isFinite(parsed) ? parsed : null;
17
+ }
18
+ return null;
19
+ }
20
+ var stepperClassName = "flex flex-1 items-center justify-center px-1 theme-muted-text hover:theme-text data-disabled:opacity-40 data-disabled:cursor-not-allowed";
21
+ function NumberField$1({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact }) {
22
+ const [value, change] = useFieldValue(field.name ?? "");
23
+ const unset = value === void 0 || value === null || value === "";
24
+ const seed = field.prefillDefault && unset ? field.default : void 0;
14
25
  useEffect(() => {
15
- if (field.prefillDefault && field.default !== void 0 && (fieldState.value === void 0 || fieldState.value === null || fieldState.value === "")) setFieldValue(fieldName, field.default);
16
- }, [
17
- field.prefillDefault,
18
- field.default,
19
- fieldName,
20
- fieldState.value,
21
- setFieldValue
22
- ]);
26
+ if (seed !== void 0) change(seed);
27
+ }, [seed, change]);
23
28
  return /* @__PURE__ */ jsx(FieldWrapper, {
24
29
  optional: field.optional,
25
30
  label,
26
31
  tooltipComponent,
32
+ description: field.description,
27
33
  labelPosition,
28
34
  spaceCompact,
29
- children: field.thousandsSeparator ? /* @__PURE__ */ jsx(FormikNumericInput, {
30
- invalid: missing,
31
- name: fieldName,
32
- placeholder: getPlaceholder(field.placeholder, field.default),
33
- disabled,
35
+ children: ({ id, describedBy }) => /* @__PURE__ */ jsx(NumberField.Root, {
36
+ id,
37
+ name: field.name,
38
+ value: toNumber(value),
39
+ onValueChange: (next) => {
40
+ const number = next ?? void 0;
41
+ onChange?.(number);
42
+ change(number);
43
+ },
34
44
  min: field.min,
35
45
  max: field.max,
36
- ...onChange && { onChange }
37
- }, field.name) : /* @__PURE__ */ jsx(FormikCustomInput, {
38
- invalid: missing,
39
- name: fieldName,
40
- type: "number",
41
- placeholder: getPlaceholder(field.placeholder, field.default),
42
- disabled,
43
46
  step: field.step,
44
- min: field.min,
45
- max: field.max,
46
- defaultValue: field.default,
47
- ...onChange && { onChange }
48
- }, field.name)
47
+ disabled,
48
+ format: {
49
+ useGrouping: field.thousandsSeparator ?? false,
50
+ maximumFractionDigits: 20
51
+ },
52
+ children: /* @__PURE__ */ jsxs(NumberField.Group, {
53
+ className: "relative w-full",
54
+ children: [/* @__PURE__ */ jsx(NumberField.Input, {
55
+ "aria-describedby": describedBy,
56
+ "aria-required": field.optional ? void 0 : true,
57
+ "aria-invalid": missing || void 0,
58
+ "data-1p-ignore": true,
59
+ className: clsx("w-full pr-6 tabular-nums", disabled && "disabled", missing && "invalid"),
60
+ placeholder: getPlaceholder(field.placeholder, field.default)
61
+ }), /* @__PURE__ */ jsxs("div", {
62
+ className: "absolute inset-y-px right-px flex flex-col",
63
+ children: [/* @__PURE__ */ jsx(NumberField.Increment, {
64
+ className: stepperClassName,
65
+ children: /* @__PURE__ */ jsx(FaAngleUp, {
66
+ "aria-hidden": "true",
67
+ className: "size-3"
68
+ })
69
+ }), /* @__PURE__ */ jsx(NumberField.Decrement, {
70
+ className: stepperClassName,
71
+ children: /* @__PURE__ */ jsx(FaAngleDown, {
72
+ "aria-hidden": "true",
73
+ className: "size-3"
74
+ })
75
+ })]
76
+ })]
77
+ })
78
+ })
49
79
  });
50
80
  }
51
81
  //#endregion
52
- export { NumberField as default };
82
+ export { NumberField$1 as default };
@@ -4,4 +4,4 @@ export interface IObjectField extends BaseField {
4
4
  type: 'object';
5
5
  options: DynamicFormSchema;
6
6
  }
7
- export default function ObjectField({ field, label, tooltipComponent, missingFields, setFormDirty, workflowForm, labelPosition, spaceCompact, }: FieldComponentProps<IObjectField>): import("react").JSX.Element;
7
+ export default function ObjectField({ field, label, tooltipComponent, labelPosition, spaceCompact, }: FieldComponentProps<IObjectField>): import("react").JSX.Element;
@@ -1,55 +1,24 @@
1
- import { ControlledCollapsiblePanel } from "../../components/CollapsiblePanel.js";
2
- import { FieldsFromOptions, GroupHeader, resolveMetaOverrides } from "../Form.js";
3
- import { useState } from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { useFormikContext } from "formik";
1
+ import { FieldGroup } from "../FieldGroup.js";
2
+ import { FieldsFromOptions, resolveMetaOverrides } from "../Form.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { useMemo } from "react";
6
5
  //#region src/form/Fields/ObjectField.tsx
7
- function ObjectField({ field, label, tooltipComponent, missingFields, setFormDirty, workflowForm, labelPosition, spaceCompact }) {
6
+ function ObjectField({ field, label, tooltipComponent, labelPosition, spaceCompact }) {
8
7
  const fieldName = field.name ?? "";
9
- const [open, setOpen] = useState(field.collapsed !== void 0 ? !field.collapsed : true);
10
- const { values, setFieldValue, setFieldTouched } = useFormikContext();
11
8
  const meta = resolveMetaOverrides(field.options, labelPosition, spaceCompact ?? false);
12
- const body = /* @__PURE__ */ jsx("div", {
13
- className: "w-full",
9
+ const parentInfo = useMemo(() => ({ fieldNamePrefix: `${fieldName}.` }), [fieldName]);
10
+ return /* @__PURE__ */ jsx(FieldGroup, {
11
+ title: field.label || label,
12
+ actions: tooltipComponent,
13
+ collapsible: !field.noCollapse,
14
+ defaultOpen: !field.collapsed,
14
15
  children: /* @__PURE__ */ jsx(FieldsFromOptions, {
15
16
  options: field.options,
16
- values,
17
- setFormDirty,
18
- setFieldValue,
19
- setFieldTouched,
20
- missingFields,
21
- workflowForm,
22
17
  labelPosition: meta.labelPosition,
23
18
  spaceCompact: meta.spaceCompact,
24
- parentInfo: {
25
- parentName: fieldName,
26
- fieldNamePrefix: `${fieldName}.`
27
- }
19
+ parentInfo
28
20
  })
29
21
  });
30
- return /* @__PURE__ */ jsxs("div", {
31
- className: "flex flex-col w-full",
32
- children: [field.noCollapse && /* @__PURE__ */ jsx("div", {
33
- className: "flex items-center w-full mb-[15px]",
34
- children: /* @__PURE__ */ jsxs("h3", {
35
- className: "flex items-center gap-1 text-md font-bold",
36
- children: [
37
- label,
38
- " ",
39
- tooltipComponent
40
- ]
41
- })
42
- }), field.noCollapse ? body : /* @__PURE__ */ jsx(ControlledCollapsiblePanel, {
43
- open,
44
- setOpen,
45
- title: /* @__PURE__ */ jsx(GroupHeader, {
46
- open,
47
- setOpen,
48
- title: field.label || label
49
- }),
50
- children: body
51
- })]
52
- });
53
22
  }
54
23
  //#endregion
55
24
  export { ObjectField as default };
@@ -8,4 +8,4 @@ export interface IRadioField extends BaseField {
8
8
  }>;
9
9
  optionLabelPosition?: 'left' | 'top';
10
10
  }
11
- export default function RadioField(props: FieldComponentProps<IRadioField>): import("react").JSX.Element;
11
+ export default function RadioField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, }: FieldComponentProps<IRadioField>): import("react").JSX.Element;
@@ -1,56 +1,45 @@
1
+ import { Radio, RadioGroup } from "../../components/Radio.js";
1
2
  import { FieldWrapper } from "../FieldWrapper.js";
3
+ import { useFieldValue } from "../useFieldValue.js";
2
4
  import { fieldOption } from "./fieldOption.js";
3
- import cx from "classnames";
4
- import { useId } from "react";
5
+ import { clsx } from "clsx";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { useField, useFormikContext } from "formik";
7
7
  //#region src/form/Fields/RadioField.tsx
8
- function RadioField(props) {
9
- const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty } = props;
10
- const fieldName = field.name ?? "";
11
- const uid = useId();
12
- const [fieldState] = useField(fieldName);
13
- const { setFieldValue, setFieldTouched } = useFormikContext();
14
- const handleChange = (val) => {
15
- if (disabled) return;
16
- onChange?.(val);
17
- setFieldTouched(fieldName, true);
18
- setFieldValue(fieldName, val);
19
- setFormDirty(true);
20
- };
8
+ function RadioField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact }) {
9
+ const [value, change] = useFieldValue(field.name ?? "");
10
+ const options = (field.options ?? []).map((raw) => ({
11
+ ...fieldOption(raw),
12
+ unlabelled: typeof raw !== "object" || raw.label === void 0
13
+ }));
21
14
  return /* @__PURE__ */ jsx(FieldWrapper, {
22
15
  optional: field.optional,
23
16
  label,
24
17
  tooltipComponent,
25
18
  labelPosition,
26
19
  spaceCompact,
27
- children: ({ labelId, describedBy }) => /* @__PURE__ */ jsx("div", {
28
- role: "radiogroup",
20
+ children: ({ labelId, describedBy }) => /* @__PURE__ */ jsx(RadioGroup, {
29
21
  "aria-labelledby": labelId,
30
22
  "aria-describedby": describedBy,
31
- "aria-required": field.optional ? void 0 : true,
32
- className: cx("flex py-1.5", field.optionLabelPosition === "top" ? "flex-col gap-2" : "flex-row flex-wrap gap-x-5 gap-y-2"),
33
- children: field.options?.map((raw) => {
34
- const option = fieldOption(raw);
35
- const unlabelled = typeof raw !== "object" || raw.label === void 0;
36
- return /* @__PURE__ */ jsxs("label", {
37
- htmlFor: `${uid}-${option.value}`,
38
- className: cx("flex items-center gap-2", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
39
- children: [/* @__PURE__ */ jsx("input", {
40
- id: `${uid}-${option.value}`,
41
- className: cx("h-4 w-4", disabled ? "cursor-not-allowed" : "cursor-pointer", missing && "invalid"),
42
- name: field.name,
43
- type: "radio",
44
- value: option.value,
45
- checked: fieldState.value !== void 0 && fieldState.value !== null && String(fieldState.value) === option.value,
46
- disabled,
47
- onChange: () => handleChange(option.raw)
48
- }), /* @__PURE__ */ jsx("span", {
49
- className: cx("theme-text", unlabelled && "capitalize"),
50
- children: option.label
51
- })]
52
- }, field.name + option.value);
53
- })
23
+ name: field.name,
24
+ required: !field.optional,
25
+ disabled,
26
+ value: value === void 0 || value === null ? null : String(value),
27
+ onValueChange: (next) => {
28
+ const picked = options.find((option) => option.value === next)?.raw;
29
+ onChange?.(picked);
30
+ change(picked);
31
+ },
32
+ className: clsx("flex py-1.5", field.optionLabelPosition === "top" ? "flex-col gap-2" : "flex-row flex-wrap gap-x-5 gap-y-2"),
33
+ children: options.map((option) => /* @__PURE__ */ jsxs("label", {
34
+ className: clsx("flex items-center gap-2", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
35
+ children: [/* @__PURE__ */ jsx(Radio, {
36
+ value: option.value,
37
+ "aria-invalid": missing || void 0
38
+ }), /* @__PURE__ */ jsx("span", {
39
+ className: clsx("theme-text", option.unlabelled && "capitalize"),
40
+ children: option.label
41
+ })]
42
+ }, option.value))
54
43
  })
55
44
  });
56
45
  }
@@ -1,4 +1,3 @@
1
- import type React from 'react';
2
1
  import type { FieldComponentProps } from '../types/fieldComponentTypes.js';
3
2
  import type { BaseField } from '../types/fieldTypes.js';
4
3
  export interface IRangeField extends BaseField {
@@ -8,4 +7,4 @@ export interface IRangeField extends BaseField {
8
7
  max: number;
9
8
  step?: number;
10
9
  }
11
- export default function RangeField(props: FieldComponentProps<IRangeField>): React.JSX.Element;
10
+ export default function RangeField(props: FieldComponentProps<IRangeField>): import("react").JSX.Element;
@@ -1,26 +1,34 @@
1
1
  import { FieldWrapper } from "../FieldWrapper.js";
2
- import cx from "classnames";
2
+ import { useFieldValue } from "../useFieldValue.js";
3
+ import { clsx } from "clsx";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Field, useField, useFormikContext } from "formik";
5
+ import { useEffect } from "react";
6
+ import { useFormContext } from "react-hook-form";
5
7
  //#region src/form/Fields/RangeField.tsx
6
8
  function RangeField(props) {
7
- const { field, label, labelPosition, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty } = props;
8
- const fieldName = field.name ?? "";
9
- const [fieldState] = useField(fieldName);
10
- const { setFieldValue, setFieldTouched } = useFormikContext();
9
+ const { field, label, labelPosition, disabled, onChange, tooltipComponent, spaceCompact } = props;
10
+ const name = field.name ?? "";
11
+ const [value, change] = useFieldValue(name);
12
+ const { setValue } = useFormContext();
11
13
  const handleChange = (e) => {
12
14
  let val = e.target.valueAsNumber;
13
15
  if (!Number.isNaN(val)) {
14
16
  val = Math.max(field.min, Math.min(field.max, val));
15
- setFieldValue(fieldName, val);
17
+ change(val);
16
18
  onChange?.(val);
17
- setFieldTouched(fieldName, true);
18
- setFormDirty(true);
19
19
  }
20
20
  };
21
21
  const seedValue = field.default ?? field.min;
22
- if ((fieldState.value === void 0 || fieldState.value === null) && seedValue !== void 0) setFieldValue(fieldName, seedValue);
23
- const currentValue = fieldState.value !== void 0 ? fieldState.value : seedValue;
22
+ const seed = (value === void 0 || value === null) && seedValue !== void 0;
23
+ useEffect(() => {
24
+ if (seed) setValue(name, seedValue);
25
+ }, [
26
+ seed,
27
+ seedValue,
28
+ name,
29
+ setValue
30
+ ]);
31
+ const currentValue = value ?? seedValue ?? "";
24
32
  return /* @__PURE__ */ jsx(FieldWrapper, {
25
33
  optional: field.optional,
26
34
  label,
@@ -29,8 +37,8 @@ function RangeField(props) {
29
37
  spaceCompact,
30
38
  children: ({ id, labelId }) => /* @__PURE__ */ jsxs("div", {
31
39
  className: "flex items-center",
32
- children: [/* @__PURE__ */ jsx(Field, {
33
- className: cx("theme-input h-7 w-1/3 mr-5 text-center rounded border", disabled && "disabled"),
40
+ children: [/* @__PURE__ */ jsx("input", {
41
+ className: clsx("theme-input h-7 w-1/3 mr-5 text-center rounded border", disabled && "disabled"),
34
42
  id,
35
43
  type: "number",
36
44
  value: currentValue,
@@ -39,13 +47,12 @@ function RangeField(props) {
39
47
  step: field.step || 1,
40
48
  disabled,
41
49
  onChange: handleChange
42
- }), /* @__PURE__ */ jsx(Field, {
43
- className: cx("rounded w-full", disabled && "disabled"),
50
+ }), /* @__PURE__ */ jsx("input", {
51
+ className: clsx("rounded w-full", disabled && "disabled"),
44
52
  name: field.name,
45
53
  value: currentValue,
46
54
  type: "range",
47
55
  "aria-labelledby": labelId,
48
- "aria-required": field.optional ? void 0 : true,
49
56
  min: field.min,
50
57
  max: field.max,
51
58
  step: field.step || 1,
@@ -13,5 +13,4 @@ export interface IStringField extends BaseField {
13
13
  sanitize?: string;
14
14
  prefillDefault?: boolean;
15
15
  }
16
- declare const _default: import("react").MemoExoticComponent<(props: FieldComponentProps<IStringField, string>) => import("react").JSX.Element>;
17
- export default _default;
16
+ export default function StringField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, }: FieldComponentProps<IStringField>): import("react").JSX.Element;