@harborclient/sdk 1.0.29 → 1.0.31

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 (195) hide show
  1. package/dist/build/index.d.ts.map +1 -1
  2. package/dist/build/index.js +1 -1
  3. package/dist/components/AsyncListState/ErrorRetry.d.ts +21 -0
  4. package/dist/components/AsyncListState/ErrorRetry.d.ts.map +1 -0
  5. package/dist/components/AsyncListState/ErrorRetry.js +10 -0
  6. package/dist/components/AsyncListState/LoadingMessage.d.ts +13 -0
  7. package/dist/components/AsyncListState/LoadingMessage.d.ts.map +1 -0
  8. package/dist/components/AsyncListState/LoadingMessage.js +8 -0
  9. package/dist/components/AsyncListState/index.d.ts +4 -50
  10. package/dist/components/AsyncListState/index.d.ts.map +1 -1
  11. package/dist/components/AsyncListState/index.js +5 -31
  12. package/dist/components/Autocomplete/AutocompleteInput.d.ts +2 -4
  13. package/dist/components/Autocomplete/AutocompleteInput.d.ts.map +1 -1
  14. package/dist/components/Autocomplete/AutocompleteInput.js +2 -1
  15. package/dist/components/Autocomplete/SuggestionList.d.ts +3 -7
  16. package/dist/components/Autocomplete/SuggestionList.d.ts.map +1 -1
  17. package/dist/components/Autocomplete/SuggestionList.js +3 -4
  18. package/dist/components/BackButton/index.d.ts +3 -16
  19. package/dist/components/BackButton/index.d.ts.map +1 -1
  20. package/dist/components/BackButton/index.js +4 -10
  21. package/dist/components/Badge/index.d.ts +3 -11
  22. package/dist/components/Badge/index.d.ts.map +1 -1
  23. package/dist/components/Badge/index.js +3 -9
  24. package/dist/components/BusyIndicator/index.js +1 -1
  25. package/dist/components/Button/index.d.ts +2 -6
  26. package/dist/components/Button/index.d.ts.map +1 -1
  27. package/dist/components/Button/index.js +9 -15
  28. package/dist/components/Card/Body.d.ts +12 -0
  29. package/dist/components/Card/Body.d.ts.map +1 -0
  30. package/dist/components/Card/Body.js +8 -0
  31. package/dist/components/Card/Image.d.ts +8 -0
  32. package/dist/components/Card/Image.d.ts.map +1 -0
  33. package/dist/components/Card/Image.js +8 -0
  34. package/dist/components/Card/index.d.ts +16 -0
  35. package/dist/components/Card/index.d.ts.map +1 -0
  36. package/dist/components/Card/index.js +13 -0
  37. package/dist/components/CodeEditor/index.d.ts +3 -7
  38. package/dist/components/CodeEditor/index.d.ts.map +1 -1
  39. package/dist/components/CodeEditor/index.js +5 -50
  40. package/dist/components/CodeEditor/renderHighlightedPlaceholder.d.ts.map +1 -1
  41. package/dist/components/CodeEditor/slashCommandHighlighter.d.ts.map +1 -1
  42. package/dist/components/CodeEditor/syntaxHighlightedPlaceholder.d.ts.map +1 -1
  43. package/dist/components/EmptyState/index.d.ts +3 -11
  44. package/dist/components/EmptyState/index.d.ts.map +1 -1
  45. package/dist/components/EmptyState/index.js +3 -9
  46. package/dist/components/FaIcon/index.d.ts +3 -10
  47. package/dist/components/FaIcon/index.d.ts.map +1 -1
  48. package/dist/components/FaIcon/index.js +5 -4
  49. package/dist/components/FieldError/index.d.ts +3 -17
  50. package/dist/components/FieldError/index.d.ts.map +1 -1
  51. package/dist/components/FieldError/index.js +3 -11
  52. package/dist/components/FooterButton/index.d.ts +3 -11
  53. package/dist/components/FooterButton/index.d.ts.map +1 -1
  54. package/dist/components/FooterButton/index.js +3 -7
  55. package/dist/components/FooterIcon/index.d.ts +3 -11
  56. package/dist/components/FooterIcon/index.d.ts.map +1 -1
  57. package/dist/components/FooterIcon/index.js +3 -7
  58. package/dist/components/FormDataEditor/index.d.ts +0 -2
  59. package/dist/components/FormDataEditor/index.d.ts.map +1 -1
  60. package/dist/components/FormDataEditor/index.js +2 -12
  61. package/dist/components/FormGroup/index.d.ts +3 -16
  62. package/dist/components/FormGroup/index.d.ts.map +1 -1
  63. package/dist/components/FormGroup/index.js +4 -20
  64. package/dist/components/KeyValueEditor/index.d.ts +0 -2
  65. package/dist/components/KeyValueEditor/index.d.ts.map +1 -1
  66. package/dist/components/KeyValueEditor/index.js +1 -8
  67. package/dist/components/MethodSelect/index.d.ts +3 -5
  68. package/dist/components/MethodSelect/index.d.ts.map +1 -1
  69. package/dist/components/MethodSelect/index.js +3 -2
  70. package/dist/components/Modal/ModalFooter.d.ts +3 -11
  71. package/dist/components/Modal/ModalFooter.d.ts.map +1 -1
  72. package/dist/components/Modal/ModalFooter.js +3 -10
  73. package/dist/components/Modal/ModalFormLayout.d.ts +0 -5
  74. package/dist/components/Modal/ModalFormLayout.d.ts.map +1 -1
  75. package/dist/components/Modal/ModalFormLayout.js +0 -5
  76. package/dist/components/Modal/ModalHeader.d.ts +3 -3
  77. package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
  78. package/dist/components/Modal/ModalHeader.js +3 -2
  79. package/dist/components/Modal/index.d.ts +3 -3
  80. package/dist/components/Modal/index.d.ts.map +1 -1
  81. package/dist/components/Modal/index.js +6 -7
  82. package/dist/components/OverlayCloseButton/index.d.ts +3 -11
  83. package/dist/components/OverlayCloseButton/index.d.ts.map +1 -1
  84. package/dist/components/OverlayCloseButton/index.js +3 -9
  85. package/dist/components/Page/index.d.ts +3 -3
  86. package/dist/components/Page/index.d.ts.map +1 -1
  87. package/dist/components/Page/index.js +4 -7
  88. package/dist/components/PageHeader/index.d.ts +3 -7
  89. package/dist/components/PageHeader/index.d.ts.map +1 -1
  90. package/dist/components/PageHeader/index.js +3 -5
  91. package/dist/components/PageSidebar/index.d.ts +3 -5
  92. package/dist/components/PageSidebar/index.d.ts.map +1 -1
  93. package/dist/components/PageSidebar/index.js +4 -5
  94. package/dist/components/PanelCloseButton/index.d.ts +5 -14
  95. package/dist/components/PanelCloseButton/index.d.ts.map +1 -1
  96. package/dist/components/PanelCloseButton/index.js +4 -12
  97. package/dist/components/Resizable/Resizable.d.ts +3 -3
  98. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  99. package/dist/components/Resizable/Resizable.js +6 -5
  100. package/dist/components/Resizable/ResizeHandle.d.ts +3 -7
  101. package/dist/components/Resizable/ResizeHandle.d.ts.map +1 -1
  102. package/dist/components/Resizable/ResizeHandle.js +4 -10
  103. package/dist/components/ResourceList/ResourceListEmptyItem.d.ts +13 -0
  104. package/dist/components/ResourceList/ResourceListEmptyItem.d.ts.map +1 -0
  105. package/dist/components/ResourceList/ResourceListEmptyItem.js +8 -0
  106. package/dist/components/ResourceList/ResourceListPrimary.d.ts +13 -0
  107. package/dist/components/ResourceList/ResourceListPrimary.d.ts.map +1 -0
  108. package/dist/components/ResourceList/ResourceListPrimary.js +8 -0
  109. package/dist/components/ResourceList/ResourceListRow.d.ts +29 -0
  110. package/dist/components/ResourceList/ResourceListRow.d.ts.map +1 -0
  111. package/dist/components/ResourceList/ResourceListRow.js +8 -0
  112. package/dist/components/ResourceList/index.d.ts +6 -74
  113. package/dist/components/ResourceList/index.d.ts.map +1 -1
  114. package/dist/components/ResourceList/index.js +7 -42
  115. package/dist/components/RowActionsMenu/index.d.ts +3 -5
  116. package/dist/components/RowActionsMenu/index.d.ts.map +1 -1
  117. package/dist/components/RowActionsMenu/index.js +6 -16
  118. package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts +3 -7
  119. package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts.map +1 -1
  120. package/dist/components/SegmentedTabs/SegmentedTabPanel.js +3 -4
  121. package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts +0 -2
  122. package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts.map +1 -1
  123. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts +0 -2
  124. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts.map +1 -1
  125. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.js +5 -13
  126. package/dist/components/SegmentedTabs/index.d.ts +3 -7
  127. package/dist/components/SegmentedTabs/index.d.ts.map +1 -1
  128. package/dist/components/SegmentedTabs/index.js +7 -28
  129. package/dist/components/SidebarLayout/index.d.ts +3 -7
  130. package/dist/components/SidebarLayout/index.d.ts.map +1 -1
  131. package/dist/components/SidebarLayout/index.js +3 -5
  132. package/dist/components/Spinner/index.d.ts +3 -11
  133. package/dist/components/Spinner/index.d.ts.map +1 -1
  134. package/dist/components/Spinner/index.js +3 -9
  135. package/dist/components/StatusMessage/index.d.ts +3 -15
  136. package/dist/components/StatusMessage/index.d.ts.map +1 -1
  137. package/dist/components/StatusMessage/index.js +3 -8
  138. package/dist/components/TabCloseButton/index.d.ts +4 -14
  139. package/dist/components/TabCloseButton/index.d.ts.map +1 -1
  140. package/dist/components/TabCloseButton/index.js +3 -7
  141. package/dist/components/Table/TableBody.d.ts +13 -0
  142. package/dist/components/Table/TableBody.d.ts.map +1 -0
  143. package/dist/components/Table/TableBody.js +11 -0
  144. package/dist/components/Table/TableCell.d.ts +8 -0
  145. package/dist/components/Table/TableCell.d.ts.map +1 -0
  146. package/dist/components/Table/TableCell.js +11 -0
  147. package/dist/components/Table/TableContext.d.ts +22 -0
  148. package/dist/components/Table/TableContext.d.ts.map +1 -0
  149. package/dist/components/Table/TableContext.js +18 -0
  150. package/dist/components/Table/TableHead.d.ts +8 -0
  151. package/dist/components/Table/TableHead.d.ts.map +1 -0
  152. package/dist/components/Table/TableHead.js +11 -0
  153. package/dist/components/Table/TableHeader.d.ts +13 -0
  154. package/dist/components/Table/TableHeader.d.ts.map +1 -0
  155. package/dist/components/Table/TableHeader.js +8 -0
  156. package/dist/components/Table/index.d.ts +10 -86
  157. package/dist/components/Table/index.d.ts.map +1 -1
  158. package/dist/components/Table/index.js +17 -94
  159. package/dist/components/Toolbar/index.d.ts +3 -11
  160. package/dist/components/Toolbar/index.d.ts.map +1 -1
  161. package/dist/components/Toolbar/index.js +3 -11
  162. package/dist/components/VariableInput/index.d.ts +3 -5
  163. package/dist/components/VariableInput/index.d.ts.map +1 -1
  164. package/dist/components/VariableInput/index.js +6 -17
  165. package/dist/components/VariableTable/index.d.ts +3 -3
  166. package/dist/components/VariableTable/index.d.ts.map +1 -1
  167. package/dist/components/VariableTable/index.js +5 -9
  168. package/dist/components/forms/Checkbox.d.ts +2 -2
  169. package/dist/components/forms/Checkbox.d.ts.map +1 -1
  170. package/dist/components/forms/Checkbox.js +2 -4
  171. package/dist/components/forms/Input.d.ts +2 -2
  172. package/dist/components/forms/Input.d.ts.map +1 -1
  173. package/dist/components/forms/Radio.d.ts +2 -2
  174. package/dist/components/forms/Radio.d.ts.map +1 -1
  175. package/dist/components/forms/Radio.js +2 -4
  176. package/dist/components/forms/Select.d.ts +2 -2
  177. package/dist/components/forms/Select.d.ts.map +1 -1
  178. package/dist/components/forms/Textarea.d.ts +2 -2
  179. package/dist/components/forms/Textarea.d.ts.map +1 -1
  180. package/dist/components/forms/classes.d.ts +0 -3
  181. package/dist/components/forms/classes.d.ts.map +1 -1
  182. package/dist/components/forms/classes.js +3 -9
  183. package/dist/components/index.d.ts +1 -0
  184. package/dist/components/index.d.ts.map +1 -1
  185. package/dist/components/index.js +1 -0
  186. package/dist/components/utils.d.ts +8 -0
  187. package/dist/components/utils.d.ts.map +1 -1
  188. package/dist/components/utils.js +11 -0
  189. package/dist/runtime/createBridgedPluginContext.js +1 -1
  190. package/dist/runtime/index.js +1 -1
  191. package/dist/runtime/react.d.ts +2 -2
  192. package/dist/runtime/view-host/index.js +1 -1
  193. package/dist/runtime/viewHost.js +1 -1
  194. package/dist/signing/inventory.js +1 -1
  195. package/package.json +7 -3
@@ -3,9 +3,9 @@ import { faXmark } from '@fortawesome/free-solid-svg-icons';
3
3
  import { useMemo } from '@harborclient/sdk/react';
4
4
  import { Button } from '../Button/index.js';
5
5
  import { FaIcon } from '../FaIcon/index.js';
6
- import { Checkbox, Input, Select, fieldFrame } from '../forms/index.js';
7
6
  import { Table, TableBody, TableCell, TableHead, TableHeader } from '../Table/index.js';
8
7
  import { VariableInput } from '../VariableInput/index.js';
8
+ import { Checkbox, Input, Select, fieldFrame } from '../forms/index.js';
9
9
  import { emptyFormPart, fileBasename, withTrailingRow } from './utils.js';
10
10
  /**
11
11
  * Editable table of multipart form parts with text and file field types.
@@ -17,9 +17,6 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
17
17
  const rows = useMemo(() => withTrailingRow(parts), [parts]);
18
18
  /**
19
19
  * Updates a single row by index, auto-appending a blank row when the last key is filled.
20
- *
21
- * @param index - Row index to update.
22
- * @param patch - Partial fields to merge into the row.
23
20
  */
24
21
  const updateRow = (index, patch) => {
25
22
  const next = rows.map((row, i) => (i === index ? { ...row, ...patch } : row));
@@ -31,8 +28,6 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
31
28
  };
32
29
  /**
33
30
  * Removes a row, keeping at least one empty row.
34
- *
35
- * @param index - Row index to remove.
36
31
  */
37
32
  const removeRow = (index) => {
38
33
  if (rows.length === 1) {
@@ -43,8 +38,6 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
43
38
  };
44
39
  /**
45
40
  * Opens the host file picker and merges selected paths into a file row.
46
- *
47
- * @param index - Row index to attach files to.
48
41
  */
49
42
  const chooseFiles = async (index) => {
50
43
  const selected = await onSelectFiles();
@@ -62,9 +55,6 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
62
55
  };
63
56
  /**
64
57
  * Removes one file path from a file row.
65
- *
66
- * @param index - Row index containing the file.
67
- * @param filePath - Absolute path to remove.
68
58
  */
69
59
  const removeFile = (index, filePath) => {
70
60
  const currentFiles = rows[index]?.files ?? [];
@@ -77,5 +67,5 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
77
67
  value: type === 'text' ? row.value : '',
78
68
  files: type === 'file' ? row.files : []
79
69
  });
80
- }, children: [_jsx("option", { value: "text", children: "Text" }), _jsx("option", { value: "file", children: "File" })] }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: row.type === 'text' ? (_jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: row.value, onChange: (value) => updateRow(index, { value }), variables: variables, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable })) : (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Button, { type: "button", variant: "secondary", className: "self-start px-2 py-0.5 text-[14px]", onClick: () => void chooseFiles(index), children: "Choose files" }), row.files.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1", children: row.files.map((filePath) => (_jsxs("span", { className: "inline-flex max-w-full items-center gap-1 rounded-md border border-separator bg-control px-1.5 py-0.5 text-[14px] text-text", title: filePath, "aria-label": filePath, children: [_jsx("span", { className: "truncate", children: fileBasename(filePath) }), _jsx("button", { type: "button", className: "inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent text-muted hover:bg-selection hover:text-text app-no-drag", onClick: () => removeFile(index, filePath), title: `Remove file ${fileBasename(filePath)}`, "aria-label": `Remove file ${fileBasename(filePath)}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3 w-3" }) })] }, filePath))) }))] })) }), _jsx(TableCell, { className: "hc-form-data-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }));
70
+ }, children: [_jsx("option", { value: "text", children: "Text" }), _jsx("option", { value: "file", children: "File" })] }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: row.type === 'text' ? (_jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: row.value, onChange: (value) => updateRow(index, { value }), variables: variables, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable })) : (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Button, { type: "button", variant: "secondary", className: "self-start px-2 py-0.5 text-[14px]", onClick: () => void chooseFiles(index), children: "Choose files" }), row.files.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1", children: row.files.map((filePath) => (_jsxs("span", { className: "inline-flex max-w-full items-center gap-1 rounded-md border border-separator bg-control px-1.5 py-0.5 text-[14px] text-text", title: filePath, "aria-label": filePath, children: [_jsx("span", { className: "truncate", children: fileBasename(filePath) }), _jsx("button", { type: "button", className: "app-no-drag inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent text-muted hover:bg-selection hover:text-text", onClick: () => removeFile(index, filePath), title: `Remove file ${fileBasename(filePath)}`, "aria-label": `Remove file ${fileBasename(filePath)}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3 w-3" }) })] }, filePath))) }))] })) }), _jsx(TableCell, { className: "hc-form-data-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }));
81
71
  }
@@ -1,4 +1,4 @@
1
- import type { JSX, ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
2
  /**
3
3
  * Layout preset for label and control placement within a form group.
4
4
  */
@@ -7,7 +7,7 @@ export type FormGroupLayout = 'stacked' | 'checkbox' | 'inline' | 'radio' | 'che
7
7
  * Label color tone for form group headings.
8
8
  */
9
9
  export type FormGroupLabelTone = 'default' | 'muted';
10
- interface Props {
10
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> {
11
11
  /**
12
12
  * Visible label text, or screen-reader-only text when `srOnly` is set.
13
13
  */
@@ -62,20 +62,7 @@ interface Props {
62
62
  * Reusable form field wrapper that pairs a label with one or more controls.
63
63
  * Supports stacked fields, checkboxes, inline rows, radio options, and
64
64
  * adjacent checkbox rows used in list pickers.
65
- *
66
- * @param label - Field label text.
67
- * @param children - Input, select, or composite control content.
68
- * @param htmlFor - ID of the primary associated control.
69
- * @param description - Optional helper text below the label and above the control.
70
- * @param error - Optional validation error below the control.
71
- * @param errorId - Explicit error element id for `aria-describedby`.
72
- * @param descriptionId - Explicit description element id for `aria-describedby`.
73
- * @param layout - Label/control placement preset.
74
- * @param labelTone - Label color style.
75
- * @param srOnly - Hide label visually for screen-reader-only labels.
76
- * @param className - Extra classes on the outer wrapper.
77
- * @param labelClassName - Extra classes on the label element.
78
65
  */
79
- export declare function FormGroup({ label, children, htmlFor, description, error, errorId, descriptionId, layout, labelTone, srOnly, className, labelClassName }: Props): JSX.Element;
66
+ export declare function FormGroup({ label, children, htmlFor, description, error, errorId, descriptionId, layout, labelTone, srOnly, className, labelClassName, ...props }: Props): JSX.Element;
80
67
  export {};
81
68
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormGroup/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5C;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,kBAAkB,GAClB,YAAY,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAqBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,KAAK,EACL,OAAO,EACP,aAAa,EACb,MAAkB,EAClB,SAAqB,EACrB,MAAc,EACd,SAAS,EACT,cAAc,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoJrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormGroup/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,kBAAkB,GAClB,YAAY,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IACrF;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAkBD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,KAAK,EACL,OAAO,EACP,aAAa,EACb,MAAkB,EAClB,SAAqB,EACrB,MAAc,EACd,SAAS,EACT,cAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoJrB"}
@@ -5,9 +5,6 @@ import { enhanceControl } from '../enhanceControl.js';
5
5
  /**
6
6
  * Returns Tailwind classes for the label text based on tone and visibility.
7
7
  *
8
- * @param tone - Label color preset.
9
- * @param srOnly - Whether the label is visually hidden.
10
- * @param inline - Whether the label sits beside the control in a row.
11
8
  * @returns Class string for the label element.
12
9
  */
13
10
  function labelClasses(tone, srOnly, inline) {
@@ -24,21 +21,8 @@ function labelClasses(tone, srOnly, inline) {
24
21
  * Reusable form field wrapper that pairs a label with one or more controls.
25
22
  * Supports stacked fields, checkboxes, inline rows, radio options, and
26
23
  * adjacent checkbox rows used in list pickers.
27
- *
28
- * @param label - Field label text.
29
- * @param children - Input, select, or composite control content.
30
- * @param htmlFor - ID of the primary associated control.
31
- * @param description - Optional helper text below the label and above the control.
32
- * @param error - Optional validation error below the control.
33
- * @param errorId - Explicit error element id for `aria-describedby`.
34
- * @param descriptionId - Explicit description element id for `aria-describedby`.
35
- * @param layout - Label/control placement preset.
36
- * @param labelTone - Label color style.
37
- * @param srOnly - Hide label visually for screen-reader-only labels.
38
- * @param className - Extra classes on the outer wrapper.
39
- * @param labelClassName - Extra classes on the label element.
40
24
  */
41
- export function FormGroup({ label, children, htmlFor, description, error, errorId, descriptionId, layout = 'stacked', labelTone = 'default', srOnly = false, className, labelClassName }) {
25
+ export function FormGroup({ label, children, htmlFor, description, error, errorId, descriptionId, layout = 'stacked', labelTone = 'default', srOnly = false, className, labelClassName, ...props }) {
42
26
  const generatedId = useId();
43
27
  const controlId = htmlFor ?? generatedId;
44
28
  const extra = className ?? '';
@@ -56,7 +40,7 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
56
40
  ? `hc-form-group-label ${labelClassName}`
57
41
  : 'hc-form-group-label min-w-0 flex-1 text-[16px] text-text';
58
42
  const linkedChildren = enhanceControl(children, { id: controlId });
59
- return (_jsxs("div", { className: wrapperClasses, children: [linkedChildren, _jsx("label", { htmlFor: controlId, className: adjacentLabelClasses, children: label })] }));
43
+ return (_jsxs("div", { ...props, className: wrapperClasses, children: [linkedChildren, _jsx("label", { htmlFor: controlId, className: adjacentLabelClasses, children: label })] }));
60
44
  }
61
45
  if (layout === 'radio') {
62
46
  const wrapperClasses = extra
@@ -82,7 +66,7 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
82
66
  const wrapperClasses = extra
83
67
  ? `hc-form-group flex flex-col gap-1 p-4 border border-separator rounded-md ${extra}`
84
68
  : 'hc-form-group flex flex-col gap-1 p-4 border border-separator rounded-md';
85
- return (_jsxs("div", { className: wrapperClasses, children: [_jsxs("label", { htmlFor: controlId, className: "hc-form-group-label flex flex-col gap-1", children: [_jsxs("span", { className: "hc-form-group-label-row flex items-center gap-2", children: [linkedChildren, _jsx("span", { className: labelClasses(labelTone, srOnly, false), children: label })] }), resolvedDescriptionId ? (_jsx("p", { id: resolvedDescriptionId, className: "hc-form-group-description m-0 pl-[26px] text-[14px] text-muted", children: description })) : null] }), resolvedErrorId ? (_jsx(FieldError, { id: resolvedErrorId, spacing: "field", children: error })) : null] }));
69
+ return (_jsxs("div", { ...props, className: wrapperClasses, children: [_jsxs("label", { htmlFor: controlId, className: "hc-form-group-label flex flex-col gap-1", children: [_jsxs("span", { className: "hc-form-group-label-row flex items-center gap-2", children: [linkedChildren, _jsx("span", { className: labelClasses(labelTone, srOnly, false), children: label })] }), resolvedDescriptionId ? (_jsx("p", { id: resolvedDescriptionId, className: "hc-form-group-description m-0 pl-[26px] text-[14px] text-muted", children: description })) : null] }), resolvedErrorId ? (_jsx(FieldError, { id: resolvedErrorId, spacing: "field", children: error })) : null] }));
86
70
  }
87
71
  if (layout === 'inline') {
88
72
  const wrapperClasses = extra
@@ -107,5 +91,5 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
107
91
  const wrapperClasses = extra
108
92
  ? `hc-form-group flex flex-col gap-1 p-4 text-[16px] border border-separator rounded-md ${extra}`
109
93
  : 'hc-form-group flex flex-col gap-1 p-4 text-[16px] border border-separator rounded-md';
110
- return (_jsxs("div", { className: wrapperClasses, children: [_jsxs("label", { htmlFor: htmlFor, className: "hc-form-group-label flex flex-col gap-1", children: [_jsx("span", { className: labelClasses(labelTone, srOnly, false), children: label }), resolvedDescriptionId ? (_jsx("p", { id: resolvedDescriptionId, className: "hc-form-group-description m-0 text-[14px] text-muted", children: description })) : null, control] }), resolvedErrorId ? (_jsx(FieldError, { id: resolvedErrorId, spacing: "field", children: error })) : null] }));
94
+ return (_jsxs("div", { ...props, className: wrapperClasses, children: [_jsxs("label", { htmlFor: htmlFor, className: "hc-form-group-label flex flex-col gap-1", children: [_jsx("span", { className: labelClasses(labelTone, srOnly, false), children: label }), resolvedDescriptionId ? (_jsx("p", { id: resolvedDescriptionId, className: "hc-form-group-description m-0 text-[14px] text-muted", children: description })) : null, control] }), resolvedErrorId ? (_jsx(FieldError, { id: resolvedErrorId, spacing: "field", children: error })) : null] }));
111
95
  }
@@ -8,8 +8,6 @@ export interface Props {
8
8
  rows: KeyValue[];
9
9
  /**
10
10
  * Called when rows are added, updated, or removed.
11
- *
12
- * @param rows - Updated row list.
13
11
  */
14
12
  onChange: (rows: KeyValue[]) => void;
15
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/KeyValueEditor/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,cAAsB,EACtB,gBAA0B,EAC1B,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACZ,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA2GrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/KeyValueEditor/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,cAAsB,EACtB,gBAA0B,EAC1B,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACZ,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoGrB"}
@@ -3,18 +3,15 @@ import { faXmark } from '@fortawesome/free-solid-svg-icons';
3
3
  import { AutocompleteInput } from '../Autocomplete/index.js';
4
4
  import { Button } from '../Button/index.js';
5
5
  import { FaIcon } from '../FaIcon/index.js';
6
- import { Checkbox, fieldFrame } from '../forms/index.js';
7
6
  import { Table, TableBody, TableCell, TableHead, TableHeader } from '../Table/index.js';
8
7
  import { VariableInput } from '../VariableInput/index.js';
8
+ import { Checkbox, fieldFrame } from '../forms/index.js';
9
9
  /**
10
10
  * Editable table of key-value rows with enable toggles for headers and params.
11
11
  */
12
12
  export function KeyValueEditor({ rows, onChange, placeholderKey = 'Key', placeholderValue = 'Value', variables, onEditVariable, keySource, valueSource }) {
13
13
  /**
14
14
  * Updates a single row by index.
15
- *
16
- * @param index - Row index to update.
17
- * @param patch - Partial fields to merge into the row.
18
15
  */
19
16
  const updateRow = (index, patch) => {
20
17
  const next = rows.map((row, i) => (i === index ? { ...row, ...patch } : row));
@@ -26,8 +23,6 @@ export function KeyValueEditor({ rows, onChange, placeholderKey = 'Key', placeho
26
23
  };
27
24
  /**
28
25
  * Removes a row, keeping at least one empty row.
29
- *
30
- * @param index - Row index to remove.
31
26
  */
32
27
  const removeRow = (index) => {
33
28
  if (rows.length === 1) {
@@ -38,8 +33,6 @@ export function KeyValueEditor({ rows, onChange, placeholderKey = 'Key', placeho
38
33
  };
39
34
  /**
40
35
  * Normalizes a key-value row so editors never receive undefined fields.
41
- *
42
- * @param row - Raw row from host state or imports.
43
36
  */
44
37
  const normalizeRow = (row) => ({
45
38
  key: row.key ?? '',
@@ -1,20 +1,18 @@
1
- import type { JSX } from 'react';
1
+ import type { ComponentPropsWithoutRef, JSX } from 'react';
2
2
  import type { HttpMethod } from '../../types.js';
3
- interface Props {
3
+ interface Props extends Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'children'> {
4
4
  /**
5
5
  * Currently selected HTTP method.
6
6
  */
7
7
  value: HttpMethod;
8
8
  /**
9
9
  * Called when the user picks a different method.
10
- *
11
- * @param method - Newly selected HTTP method.
12
10
  */
13
11
  onChange: (method: HttpMethod) => void;
14
12
  }
15
13
  /**
16
14
  * Dropdown for selecting an HTTP request method.
17
15
  */
18
- export declare function MethodSelect({ value, onChange }: Props): JSX.Element;
16
+ export declare function MethodSelect({ value, onChange, className, ...props }: Props): JSX.Element;
19
17
  export {};
20
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MethodSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAMjD,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAgBpE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MethodSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,UAAU,KAAM,SAAQ,IAAI,CAC1B,wBAAwB,CAAC,QAAQ,CAAC,EAClC,OAAO,GAAG,UAAU,GAAG,UAAU,CAClC;IACC;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAqBzF"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
2
  import { methodColorClass } from '../../ui/tokens.js';
3
3
  import { Select } from '../forms/index.js';
4
+ import { cn } from '../utils.js';
4
5
  const METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];
5
6
  /**
6
7
  * Dropdown for selecting an HTTP request method.
7
8
  */
8
- export function MethodSelect({ value, onChange }) {
9
- return (_jsx(Select, { variant: "plain", className: `hc-method-select w-[100px] shrink-0 cursor-pointer appearance-none border-none bg-transparent px-2 py-1.5 text-[14px] leading-none font-normal focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent app-no-drag ${methodColorClass(value)}`, value: value, "aria-label": "HTTP method", onChange: (e) => onChange(e.target.value), children: METHODS.map((method) => (_jsx("option", { value: method, className: methodColorClass(method), children: method }, method))) }));
9
+ export function MethodSelect({ value, onChange, className, ...props }) {
10
+ return (_jsx(Select, { ...props, variant: "plain", className: cn('hc-method-select app-no-drag w-[100px] shrink-0 cursor-pointer appearance-none border-none bg-transparent px-2 py-1.5 text-[14px] leading-none font-normal focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent', methodColorClass(value), className), value: value, "aria-label": "HTTP method", onChange: (e) => onChange(e.target.value), children: METHODS.map((method) => (_jsx("option", { value: method, className: methodColorClass(method), children: method }, method))) }));
10
11
  }
@@ -1,5 +1,5 @@
1
- import type { JSX, ReactNode } from 'react';
2
- interface Props {
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
3
3
  /**
4
4
  * Action buttons rendered in a right-aligned row.
5
5
  */
@@ -8,18 +8,10 @@ interface Props {
8
8
  * When true, adds top margin before the action row (common in modal bodies).
9
9
  */
10
10
  spaced?: boolean;
11
- /**
12
- * Additional Tailwind classes merged onto the footer row.
13
- */
14
- className?: string;
15
11
  }
16
12
  /**
17
13
  * Right-aligned action button row for modal bodies and overlay footers.
18
- *
19
- * @param children - Cancel, confirm, and other action controls.
20
- * @param spaced - Whether to add `mt-4` above the button row.
21
- * @param className - Extra classes appended after the layout preset.
22
14
  */
23
- export declare function ModalFooter({ children, spaced, className }: Props): JSX.Element;
15
+ export declare function ModalFooter({ children, spaced, className, ...props }: Props): JSX.Element;
24
16
  export {};
25
17
  //# sourceMappingURL=ModalFooter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,MAAc,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAOvF"}
1
+ {"version":3,"file":"ModalFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACvE;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,MAAc,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CASjG"}
@@ -1,15 +1,8 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
2
3
  /**
3
4
  * Right-aligned action button row for modal bodies and overlay footers.
4
- *
5
- * @param children - Cancel, confirm, and other action controls.
6
- * @param spaced - Whether to add `mt-4` above the button row.
7
- * @param className - Extra classes appended after the layout preset.
8
5
  */
9
- export function ModalFooter({ children, spaced = false, className }) {
10
- const base = spaced
11
- ? 'hc-modal-footer mt-4 flex justify-end gap-2'
12
- : 'hc-modal-footer flex justify-end gap-2';
13
- const classes = className ? `${base} ${className}` : base;
14
- return _jsx("div", { className: classes, children: children });
6
+ export function ModalFooter({ children, spaced = false, className, ...props }) {
7
+ return (_jsx("div", { ...props, className: cn('hc-modal-footer flex justify-end gap-2', spaced && 'mt-4', className), children: children }));
15
8
  }
@@ -20,11 +20,6 @@ interface Props {
20
20
  /**
21
21
  * Stacks modal body content, an optional error block, and a trailing action footer
22
22
  * using the shared spacing conventions used across Team Hub and settings dialogs.
23
- *
24
- * @param children - Main modal content.
25
- * @param error - Optional inline error rendered before actions.
26
- * @param actions - Footer buttons wrapped by {@link ModalFooter}.
27
- * @param actionsSpaced - Whether the footer row receives `mt-4`.
28
23
  */
29
24
  export declare function ModalFormLayout({ children, error, actions, actionsSpaced }: Props): JSX.Element;
30
25
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ModalFormLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalFormLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5C,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,OAAO,EACP,aAAoB,EACrB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAQrB"}
1
+ {"version":3,"file":"ModalFormLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalFormLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5C,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,OAAO,EACP,aAAoB,EACrB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAQrB"}
@@ -4,11 +4,6 @@ import { ModalFooter } from './ModalFooter.js';
4
4
  /**
5
5
  * Stacks modal body content, an optional error block, and a trailing action footer
6
6
  * using the shared spacing conventions used across Team Hub and settings dialogs.
7
- *
8
- * @param children - Main modal content.
9
- * @param error - Optional inline error rendered before actions.
10
- * @param actions - Footer buttons wrapped by {@link ModalFooter}.
11
- * @param actionsSpaced - Whether the footer row receives `mt-4`.
12
7
  */
13
8
  export function ModalFormLayout({ children, error, actions, actionsSpaced = true }) {
14
9
  return (_jsxs(_Fragment, { children: [children, error != null && error !== '' ? _jsx(FieldError, { spacing: "modal", children: error }) : null, actions ? _jsx(ModalFooter, { spaced: actionsSpaced, children: actions }) : null] }));
@@ -1,5 +1,5 @@
1
- import type { JSX, ReactNode } from 'react';
2
- interface Props {
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'title'> {
3
3
  /**
4
4
  * Id referenced by the dialog's `aria-labelledby`.
5
5
  */
@@ -33,6 +33,6 @@ interface Props {
33
33
  * Modal header row with a bordered bottom edge, title block on the left,
34
34
  * optional actions, and a close icon on the right.
35
35
  */
36
- export declare function ModalHeader({ titleId, title, description, descriptionId, headerActions, closeDisabled, onClose }: Props): JSX.Element;
36
+ export declare function ModalHeader({ titleId, title, description, descriptionId, headerActions, closeDisabled, onClose, className, ...props }: Props): JSX.Element;
37
37
  export {};
38
38
  //# sourceMappingURL=ModalHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAqB,EACrB,OAAO,EACR,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkCrB"}
1
+ {"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACjF;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAqB,EACrB,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAwCrB"}
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
2
  import { faXmark } from '@fortawesome/free-solid-svg-icons';
3
3
  import { Button } from '../Button/index.js';
4
4
  import { FaIcon } from '../FaIcon/index.js';
5
+ import { cn } from '../utils.js';
5
6
  /**
6
7
  * Modal header row with a bordered bottom edge, title block on the left,
7
8
  * optional actions, and a close icon on the right.
8
9
  */
9
- export function ModalHeader({ titleId, title, description, descriptionId, headerActions, closeDisabled = false, onClose }) {
10
- return (_jsxs("div", { className: "hc-modal-header flex flex-wrap items-center gap-2 border-b border-separator px-4 py-4", children: [_jsxs("div", { className: "hc-modal-header-content min-w-0 flex-1", children: [_jsx("h2", { id: titleId, className: "hc-modal-header-title m-0 flex flex-wrap items-center gap-2 text-[17px] font-semibold text-text", children: title }), description ? (_jsx("p", { id: descriptionId, className: "hc-modal-header-description m-0 mt-1 text-[14px] text-muted", children: description })) : null] }), _jsxs("div", { className: "hc-modal-header-actions flex flex-wrap items-center gap-2", children: [headerActions, _jsx(Button, { type: "button", variant: "icon", className: "hc-modal-header-close shrink-0", "aria-label": "Close", disabled: closeDisabled, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "h-4 w-4" }) })] })] }));
10
+ export function ModalHeader({ titleId, title, description, descriptionId, headerActions, closeDisabled = false, onClose, className, ...props }) {
11
+ return (_jsxs("div", { ...props, className: cn('hc-modal-header flex flex-wrap items-center gap-2 border-b border-separator px-4 py-4', className), children: [_jsxs("div", { className: "hc-modal-header-content min-w-0 flex-1", children: [_jsx("h2", { id: titleId, className: "hc-modal-header-title m-0 flex flex-wrap items-center gap-2 text-[17px] font-semibold text-text", children: title }), description ? (_jsx("p", { id: descriptionId, className: "hc-modal-header-description m-0 mt-1 text-[14px] text-muted", children: description })) : null] }), _jsxs("div", { className: "hc-modal-header-actions flex flex-wrap items-center gap-2", children: [headerActions, _jsx(Button, { type: "button", variant: "icon", className: "hc-modal-header-close shrink-0", "aria-label": "Close", disabled: closeDisabled, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "h-4 w-4" }) })] })] }));
11
12
  }
@@ -1,7 +1,7 @@
1
- import type { JSX, ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
2
  export { ModalFooter } from './ModalFooter.js';
3
3
  export { ModalFormLayout } from './ModalFormLayout.js';
4
- interface BaseProps {
4
+ interface BaseProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'title'> {
5
5
  /**
6
6
  * Called when the backdrop is clicked or Escape is pressed.
7
7
  */
@@ -55,5 +55,5 @@ type Props = BaseProps & ({
55
55
  /**
56
56
  * Shared modal backdrop and panel wrapper used by all application dialogs.
57
57
  */
58
- export declare function Modal({ onClose, className, overlayClassName, disableEscape, title, description, headerActions, closeDisabled, labelledBy, label, children }: Props): JSX.Element;
58
+ export declare function Modal({ onClose, className, overlayClassName, disableEscape, title, description, headerActions, closeDisabled, labelledBy, label, children, ...props }: Props): JSX.Element;
59
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,SAAS;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,KAAK,KAAK,GAAG,SAAS,GACpB,CACI;IACE;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GACD;IACE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CACJ,CAAC;AAEJ;;GAEG;AACH,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,SAAkB,EAClB,gBAAgB,EAChB,aAAqB,EACrB,KAAK,EACL,WAAW,EACX,aAAa,EACb,aAAqB,EACrB,UAAU,EACV,KAAK,EACL,QAAQ,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAyErB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,SAAU,SAAQ,IAAI,CAC9B,wBAAwB,CAAC,KAAK,CAAC,EAC/B,UAAU,GAAG,WAAW,GAAG,OAAO,CACnC;IACC;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,KAAK,KAAK,GAAG,SAAS,GACpB,CACI;IACE;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GACD;IACE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CACJ,CAAC;AAEJ;;GAEG;AACH,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,SAAkB,EAClB,gBAAgB,EAChB,aAAqB,EACrB,KAAK,EACL,WAAW,EACX,aAAa,EACb,aAAqB,EACrB,UAAU,EACV,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6ErB"}
@@ -1,13 +1,14 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
2
  import { useEffect, useRef } from '@harborclient/sdk/react';
3
3
  import { useDialogFocus } from '../useDialogFocus.js';
4
+ import { cn } from '../utils.js';
4
5
  import { ModalHeader } from './ModalHeader.js';
5
6
  export { ModalFooter } from './ModalFooter.js';
6
7
  export { ModalFormLayout } from './ModalFormLayout.js';
7
8
  /**
8
9
  * Shared modal backdrop and panel wrapper used by all application dialogs.
9
10
  */
10
- export function Modal({ onClose, className = 'w-96', overlayClassName, disableEscape = false, title, description, headerActions, closeDisabled = false, labelledBy, label, children }) {
11
+ export function Modal({ onClose, className = 'w-96', overlayClassName, disableEscape = false, title, description, headerActions, closeDisabled = false, labelledBy, label, children, ...props }) {
11
12
  const panelRef = useRef(null);
12
13
  const overlayRef = useRef(null);
13
14
  useDialogFocus(overlayRef);
@@ -19,8 +20,6 @@ export function Modal({ onClose, className = 'w-96', overlayClassName, disableEs
19
20
  return;
20
21
  /**
21
22
  * Dismisses the dialog on Escape key press.
22
- *
23
- * @param event - Document keydown event.
24
23
  */
25
24
  const handleKeyDown = (event) => {
26
25
  if (event.key === 'Escape') {
@@ -30,10 +29,10 @@ export function Modal({ onClose, className = 'w-96', overlayClassName, disableEs
30
29
  document.addEventListener('keydown', handleKeyDown);
31
30
  return () => document.removeEventListener('keydown', handleKeyDown);
32
31
  }, [disableEscape, onClose]);
33
- const overlayClass = `hc-modal fixed inset-0 flex items-center justify-center bg-black/40 ${overlayClassName ?? 'z-50'}`;
32
+ const overlayClass = cn('hc-modal fixed inset-0 flex items-center justify-center bg-black/40', overlayClassName ?? 'z-50');
34
33
  const panelClass = title
35
- ? `${className} flex max-h-[85vh] flex-col overflow-hidden rounded-lg border border-separator bg-surface shadow-xl`
36
- : `${className} rounded-lg border border-separator bg-surface p-4 shadow-xl`;
34
+ ? cn(className, 'flex max-h-[85vh] flex-col overflow-hidden rounded-lg border border-separator bg-surface shadow-xl')
35
+ : cn(className, 'rounded-lg border border-separator bg-surface p-4 shadow-xl');
37
36
  const descriptionId = description && labelledBy ? `${labelledBy}-description` : undefined;
38
- return (_jsxs("div", { ref: overlayRef, className: overlayClass, children: [_jsx("div", { ref: panelRef, role: "dialog", "aria-modal": "true", "aria-labelledby": labelledBy, "aria-describedby": descriptionId, "aria-label": label, className: `hc-modal-panel relative z-10 ${panelClass}`, onClick: (event) => event.stopPropagation(), children: title && labelledBy ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { titleId: labelledBy, title: title, description: description, descriptionId: descriptionId, headerActions: headerActions, closeDisabled: closeDisabled, onClose: onClose }), _jsx("div", { className: "hc-modal-body flex-1 overflow-y-auto p-4", children: children })] })) : (children) }), _jsx("button", { type: "button", tabIndex: -1, className: "hc-modal-backdrop absolute inset-0 z-0 cursor-default border-none bg-transparent p-0", "aria-label": "Close dialog", onClick: onClose })] }));
37
+ return (_jsxs("div", { ref: overlayRef, ...props, className: overlayClass, children: [_jsx("div", { ref: panelRef, role: "dialog", "aria-modal": "true", "aria-labelledby": labelledBy, "aria-describedby": descriptionId, "aria-label": label, className: cn('hc-modal-panel relative z-10', panelClass), onClick: (event) => event.stopPropagation(), children: title && labelledBy ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { titleId: labelledBy, title: title, description: description, descriptionId: descriptionId, headerActions: headerActions, closeDisabled: closeDisabled, onClose: onClose }), _jsx("div", { className: "hc-modal-body flex-1 overflow-y-auto p-4", children: children })] })) : (children) }), _jsx("button", { type: "button", tabIndex: -1, className: "hc-modal-backdrop absolute inset-0 z-0 cursor-default border-none bg-transparent p-0", "aria-label": "Close dialog", onClick: onClose })] }));
39
38
  }
@@ -1,5 +1,5 @@
1
- import type { JSX } from 'react';
2
- interface Props {
1
+ import type { ComponentPropsWithoutRef, JSX } from 'react';
2
+ interface Props extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'aria-label' | 'onClick' | 'aria-labelledby'> {
3
3
  /**
4
4
  * Accessible name for the close control.
5
5
  */
@@ -8,18 +8,10 @@ interface Props {
8
8
  * Called when the user activates the close button.
9
9
  */
10
10
  onClose: () => void;
11
- /**
12
- * Additional Tailwind classes merged onto the button element.
13
- */
14
- className?: string;
15
11
  }
16
12
  /**
17
13
  * Always-visible overlay close icon used on full-page settings and plugin views.
18
- *
19
- * @param label - Accessible name; defaults to "Close".
20
- * @param onClose - Close handler.
21
- * @param className - Extra classes appended after the overlay preset.
22
14
  */
23
- export declare function OverlayCloseButton({ label, onClose, className }: Props): JSX.Element;
15
+ export declare function OverlayCloseButton({ label, onClose, className, ...props }: Props): JSX.Element;
24
16
  export {};
25
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OverlayCloseButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAe,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAU9F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OverlayCloseButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK3D,UAAU,KAAM,SAAQ,IAAI,CAC1B,wBAAwB,CAAC,QAAQ,CAAC,EAClC,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,iBAAiB,CAC1D;IACC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAe,EACf,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAarB"}
@@ -2,16 +2,10 @@ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
2
  import { faXmark } from '@fortawesome/free-solid-svg-icons';
3
3
  import { Button } from '../Button/index.js';
4
4
  import { FaIcon } from '../FaIcon/index.js';
5
+ import { cn } from '../utils.js';
5
6
  /**
6
7
  * Always-visible overlay close icon used on full-page settings and plugin views.
7
- *
8
- * @param label - Accessible name; defaults to "Close".
9
- * @param onClose - Close handler.
10
- * @param className - Extra classes appended after the overlay preset.
11
8
  */
12
- export function OverlayCloseButton({ label = 'Close', onClose, className }) {
13
- const classes = className
14
- ? `hc-overlay-close-button text-[28px] ${className}`
15
- : 'hc-overlay-close-button text-[28px]';
16
- return (_jsx(Button, { type: "button", variant: "icon", className: classes, "aria-label": label, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "hc-overlay-close-button-icon h-4 w-4" }) }));
9
+ export function OverlayCloseButton({ label = 'Close', onClose, className, ...props }) {
10
+ return (_jsx(Button, { ...props, type: "button", variant: "icon", className: cn('hc-overlay-close-button text-[28px]', className), "aria-label": label, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "hc-overlay-close-button-icon h-4 w-4" }) }));
17
11
  }
@@ -1,6 +1,6 @@
1
1
  import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
- import type { JSX, ReactNode } from 'react';
3
- interface Props {
2
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
3
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> {
4
4
  /**
5
5
  * Page heading rendered in the header row.
6
6
  */
@@ -41,6 +41,6 @@ interface Props {
41
41
  * footer. Use the default mode for self-contained overlay pages; set
42
42
  * `embedded` when the parent already provides scroll and padding.
43
43
  */
44
- export declare function Page({ title, description, icon, actions, footer, embedded, className, children }: Props): JSX.Element;
44
+ export declare function Page({ title, description, icon, actions, footer, embedded, className, children, ...props }: Props): JSX.Element;
45
45
  export {};
46
46
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,QAAgB,EAChB,SAAS,EACT,QAAQ,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+BrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IACrF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,QAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6BrB"}
@@ -1,18 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
2
  import { PageHeader } from '../PageHeader/index.js';
3
+ import { cn } from '../utils.js';
3
4
  /**
4
5
  * Full-area page shell with a {@link PageHeader}, scrollable body, and optional
5
6
  * footer. Use the default mode for self-contained overlay pages; set
6
7
  * `embedded` when the parent already provides scroll and padding.
7
8
  */
8
- export function Page({ title, description, icon, actions, footer, embedded = false, className, children }) {
9
+ export function Page({ title, description, icon, actions, footer, embedded = false, className, children, ...props }) {
9
10
  const header = (_jsx(PageHeader, { title: title, description: description, icon: icon, children: actions }));
10
11
  if (embedded) {
11
- const outer = className ? `hc-page ${className}` : 'hc-page';
12
- return (_jsxs("div", { className: outer, children: [header, children, footer] }));
12
+ return (_jsxs("div", { ...props, className: cn('hc-page', className), children: [header, children, footer] }));
13
13
  }
14
- const outer = className
15
- ? `hc-page flex min-h-0 flex-1 flex-col overflow-y-auto p-6 ${className}`
16
- : 'hc-page flex min-h-0 flex-1 flex-col overflow-y-auto p-6';
17
- return (_jsx("div", { className: outer, children: _jsxs("div", { className: "hc-page-inner mx-auto w-full", children: [header, children, footer] }) }));
14
+ return (_jsx("div", { ...props, className: cn('hc-page flex min-h-0 flex-1 flex-col overflow-y-auto p-6', className), children: _jsxs("div", { className: "hc-page-inner mx-auto w-full", children: [header, children, footer] }) }));
18
15
  }
@@ -1,6 +1,6 @@
1
1
  import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
- import type { JSX, ReactNode } from 'react';
3
- interface Props {
2
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
3
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
4
4
  /**
5
5
  * Page heading rendered as an `h2`.
6
6
  */
@@ -17,15 +17,11 @@ interface Props {
17
17
  * Action controls aligned to the right side of the header row.
18
18
  */
19
19
  children?: ReactNode;
20
- /**
21
- * Extra classes merged onto the outer header wrapper.
22
- */
23
- className?: string;
24
20
  }
25
21
  /**
26
22
  * Full-bleed page header with a bordered bottom edge, title block on the left,
27
23
  * and optional action controls on the right.
28
24
  */
29
- export declare function PageHeader({ title, description, icon, children, className }: Props): JSX.Element;
25
+ export declare function PageHeader({ title, description, icon, children, className, ...props }: Props): JSX.Element;
30
26
  export {};
31
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6BhG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACvE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+BrB"}