@harborclient/sdk 1.0.21 → 1.0.23
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.
- package/README.md +1 -1
- package/dist/components/AsyncListState/index.js +3 -3
- package/dist/components/Autocomplete/SuggestionList.js +3 -3
- package/dist/components/BackButton/index.js +1 -1
- package/dist/components/BusyIndicator/index.js +1 -1
- package/dist/components/CodeEditor/index.d.ts.map +1 -1
- package/dist/components/CodeEditor/index.js +3 -1
- package/dist/components/FooterIcon/index.js +1 -1
- package/dist/components/FormDataEditor/index.js +2 -2
- package/dist/components/FormGroup/index.d.ts.map +1 -1
- package/dist/components/FormGroup/index.js +7 -5
- package/dist/components/KeyValueEditor/index.js +2 -2
- package/dist/components/Modal/ModalFooter.d.ts.map +1 -1
- package/dist/components/Modal/ModalFooter.js +3 -1
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.js +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/OverlayCloseButton/index.js +1 -1
- package/dist/components/Page/index.js +1 -1
- package/dist/components/PageHeader/index.d.ts.map +1 -1
- package/dist/components/PageHeader/index.js +1 -1
- package/dist/components/PageSidebar/index.d.ts.map +1 -1
- package/dist/components/PageSidebar/index.js +6 -6
- package/dist/components/PanelCloseButton/index.js +1 -1
- package/dist/components/Resizable/Resizable.js +2 -2
- package/dist/components/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/components/Resizable/ResizeHandle.js +4 -2
- package/dist/components/Resizable/footerPanelUtils.d.ts +1 -1
- package/dist/components/Resizable/footerPanelUtils.d.ts.map +1 -1
- package/dist/components/Resizable/footerPanelUtils.js +1 -1
- package/dist/components/ResourceList/index.d.ts.map +1 -1
- package/dist/components/ResourceList/index.js +5 -5
- package/dist/components/RowActionsMenu/index.d.ts.map +1 -1
- package/dist/components/RowActionsMenu/index.js +6 -4
- package/dist/components/SegmentedTabs/SegmentedTabPanel.js +1 -1
- package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.js +4 -4
- package/dist/components/SegmentedTabs/index.d.ts.map +1 -1
- package/dist/components/SegmentedTabs/index.js +6 -3
- package/dist/components/SidebarLayout/index.js +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/TabCloseButton/index.js +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +6 -5
- package/dist/components/VariableInput/index.d.ts.map +1 -1
- package/dist/components/VariableInput/index.js +6 -4
- package/dist/components/VariableTable/index.d.ts.map +1 -1
- package/dist/components/VariableTable/index.js +1 -1
- package/dist/components/forms/Checkbox.d.ts.map +1 -1
- package/dist/components/forms/Checkbox.js +1 -1
- package/dist/components/forms/Radio.js +1 -1
- package/dist/styles.css +38 -0
- package/dist/styles.css.d.ts +2 -0
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @harborclient/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript definitions, utility modules, and React runtime helpers for [HarborClient](https://harborclient.com/)
|
|
3
|
+
TypeScript definitions, utility modules, and React runtime helpers for [HarborClient](https://harborclient.com/) development.
|
|
4
4
|
|
|
5
5
|
**Documentation:** [https://harborclient.github.io/sdk/](https://harborclient.github.io/sdk/)
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ import { FieldError } from '../FieldError/index.js';
|
|
|
8
8
|
* @param className - Extra classes appended after the preset.
|
|
9
9
|
*/
|
|
10
10
|
export function LoadingMessage({ children = 'Loading…', className }) {
|
|
11
|
-
const base = 'text-[14px] text-muted';
|
|
11
|
+
const base = 'hc-loading-message text-[14px] text-muted';
|
|
12
12
|
const classes = className ? `${base} ${className}` : base;
|
|
13
13
|
return (_jsx("p", { role: "status", className: classes, children: children }));
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@ export function LoadingMessage({ children = 'Loading…', className }) {
|
|
|
20
20
|
* @param retryLabel - Visible retry button label.
|
|
21
21
|
*/
|
|
22
22
|
export function ErrorRetry({ error, onRetry, retryLabel = 'Retry' }) {
|
|
23
|
-
return (_jsxs("div", { className: "hc-error-retry flex flex-wrap items-center gap-2", children: [_jsx(FieldError, { spacing: "field", className: "mb-0 mt-0", children: error }), _jsx(Button, { type: "button", variant: "secondary", onClick: onRetry, children: retryLabel })] }));
|
|
23
|
+
return (_jsxs("div", { className: "hc-error-retry flex flex-wrap items-center gap-2", children: [_jsx(FieldError, { spacing: "field", className: "hc-error-retry-message mb-0 mt-0", children: error }), _jsx(Button, { type: "button", variant: "secondary", className: "hc-error-retry-button", onClick: onRetry, children: retryLabel })] }));
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Switches between loading, error-with-retry, empty, and ready list content for
|
|
@@ -45,7 +45,7 @@ export function AsyncListState({ loading, error, onRetry, emptyMessage, isEmpty
|
|
|
45
45
|
return _jsx(FieldError, { spacing: "section", children: error });
|
|
46
46
|
}
|
|
47
47
|
if (isEmpty && emptyMessage != null) {
|
|
48
|
-
return _jsx("p", { className: "text-[14px] text-muted", children: emptyMessage });
|
|
48
|
+
return _jsx("p", { className: "hc-async-list-state-empty text-[14px] text-muted", children: emptyMessage });
|
|
49
49
|
}
|
|
50
50
|
return _jsx(_Fragment, { children: children });
|
|
51
51
|
}
|
|
@@ -66,7 +66,7 @@ export function SuggestionList({ open, items, activeIndex, anchorRef, listboxId,
|
|
|
66
66
|
if (!open || items.length === 0 || !position) {
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
|
-
return portalToBody(_jsx("ul", { id: listboxId, role: "listbox", className: "fixed z-50 max-h-48 overflow-y-auto rounded-md border border-separator bg-surface py-1 text-[14px] text-text shadow-md", style: { top: position.top, left: position.left, width: position.width }, children: items.map((item, index) => (_jsx("li", { id: `${listboxId}-option-${index}`, role: "option", "aria-selected": index === activeIndex, className: index === activeIndex
|
|
70
|
-
? 'cursor-pointer bg-selection px-2 py-1'
|
|
71
|
-
: 'cursor-pointer px-2 py-1 hover:bg-selection', onMouseEnter: () => onActiveIndexChange(index), onMouseDown: (event) => event.preventDefault(), onClick: () => onSelect(item), children: item }, item))) }));
|
|
69
|
+
return portalToBody(_jsx("ul", { id: listboxId, role: "listbox", className: "hc-suggestion-list fixed z-50 max-h-48 overflow-y-auto rounded-md border border-separator bg-surface py-1 text-[14px] text-text shadow-md", style: { top: position.top, left: position.left, width: position.width }, children: items.map((item, index) => (_jsx("li", { id: `${listboxId}-option-${index}`, role: "option", "aria-selected": index === activeIndex, className: index === activeIndex
|
|
70
|
+
? 'hc-suggestion-list-option cursor-pointer bg-selection px-2 py-1'
|
|
71
|
+
: 'hc-suggestion-list-option cursor-pointer px-2 py-1 hover:bg-selection', onMouseEnter: () => onActiveIndexChange(index), onMouseDown: (event) => event.preventDefault(), onClick: () => onSelect(item), children: item }, item))) }));
|
|
72
72
|
}
|
|
@@ -15,5 +15,5 @@ import { faAngleLeft } from '@fortawesome/free-solid-svg-icons';
|
|
|
15
15
|
export function BackButton({ onClick, label = 'Back', ariaLabel, className }) {
|
|
16
16
|
const base = 'inline-flex shrink-0 items-center justify-center gap-1.5 py-1 text-[14px] h-6';
|
|
17
17
|
const classes = className ? `hc-back-button ${base} ${className}` : `hc-back-button ${base}`;
|
|
18
|
-
return (_jsxs(Button, { type: "button", variant: "toolbar", className: classes, "aria-label": ariaLabel, onClick: onClick, children: [_jsx(FaIcon, { icon: faAngleLeft, className: "h-4 w-4", "aria-hidden": true }), _jsx("span", { children: label })] }));
|
|
18
|
+
return (_jsxs(Button, { type: "button", variant: "toolbar", className: classes, "aria-label": ariaLabel, onClick: onClick, children: [_jsx(FaIcon, { icon: faAngleLeft, className: "hc-back-button-icon h-4 w-4", "aria-hidden": true }), _jsx("span", { children: label })] }));
|
|
19
19
|
}
|
|
@@ -82,5 +82,5 @@ export function BusyIndicator({ isBusy }) {
|
|
|
82
82
|
if (!visible) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "hc-busy-indicator pointer-events-none fixed inset-x-0 top-0 z-[100] h-0.5 overflow-hidden bg-separator", "aria-hidden": "true", children: _jsx("div", { className: "busy-progress-bar h-full w-1/3 bg-accent" }) }), _jsx("div", { className: "pointer-events-none fixed right-3 top-3 z-[100] flex h-6 w-6 items-center justify-center rounded-full border border-separator bg-surface shadow-sm", role: "status", "aria-label": "Working", children: _jsx(Spinner, { size: "sm" }) })] }));
|
|
85
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "hc-busy-indicator pointer-events-none fixed inset-x-0 top-0 z-[100] h-0.5 overflow-hidden bg-separator", "aria-hidden": "true", children: _jsx("div", { className: "hc-busy-indicator-progress busy-progress-bar h-full w-1/3 bg-accent" }) }), _jsx("div", { className: "hc-busy-indicator-badge pointer-events-none fixed right-3 top-3 z-[100] flex h-6 w-6 items-center justify-center rounded-full border border-separator bg-surface shadow-sm", role: "status", "aria-label": "Working", children: _jsx(Spinner, { size: "sm" }) })] }));
|
|
86
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwBjF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAKjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,QA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AAM,CAAC;CAC7B;AA4UD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAiB,EACjB,QAAgB,EAChB,WAAW,EACX,SAAmB,EACnB,SAAc,EACd,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,EACpC,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAiMrB"}
|
|
@@ -435,7 +435,9 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
|
|
|
435
435
|
placeholder,
|
|
436
436
|
minHeight,
|
|
437
437
|
basicSetup
|
|
438
|
-
}), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-md border border-separator bg-surface px-3 py-2 text-[14px] text-text shadow-md app-no-drag", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx("span", { className: selectionTooltipContent.muted
|
|
438
|
+
}), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-code-editor-tooltip pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-md border border-separator bg-surface px-3 py-2 text-[14px] text-text shadow-md app-no-drag", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx("span", { className: selectionTooltipContent.muted
|
|
439
|
+
? 'hc-code-editor-tooltip-text text-muted'
|
|
440
|
+
: 'hc-code-editor-tooltip-text', children: selectionTooltipContent.text }), onEditVariable ? (_jsx("button", { type: "button", className: "hc-code-editor-tooltip-edit self-start text-[14px] text-accent hover:underline", "aria-label": `Edit value for ${selectionTooltip.key}`, onMouseDown: (event) => {
|
|
439
441
|
event.preventDefault();
|
|
440
442
|
onEditVariable();
|
|
441
443
|
setSelectionTooltip(null);
|
|
@@ -19,5 +19,5 @@ export function FooterIcon({ icon, active, onClick, label, className }) {
|
|
|
19
19
|
const classes = className
|
|
20
20
|
? `hc-footer-icon ${footerIconButton(active)} ${className}`
|
|
21
21
|
: `hc-footer-icon ${footerIconButton(active)}`;
|
|
22
|
-
return (_jsx("button", { type: "button", className: classes, onClick: onClick, "aria-pressed": active, "aria-label": accessibleLabel, title: accessibleLabel, children: _jsx(FaIcon, { icon: icon, className: "h-4 w-4" }) }));
|
|
22
|
+
return (_jsx("button", { type: "button", className: classes, onClick: onClick, "aria-pressed": active, "aria-label": accessibleLabel, title: accessibleLabel, children: _jsx(FaIcon, { icon: icon, className: "hc-footer-icon-icon h-4 w-4" }) }));
|
|
23
23
|
}
|
|
@@ -70,12 +70,12 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
|
|
|
70
70
|
const currentFiles = rows[index]?.files ?? [];
|
|
71
71
|
updateRow(index, { files: currentFiles.filter((file) => file !== filePath) });
|
|
72
72
|
};
|
|
73
|
-
return (_jsxs(Table, { className: "hc-form-data-editor", children: [_jsx(TableHeader, { children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { className: "w-24", children: "Type" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx(TableCell, { className: "w-6 p-1 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: row.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: row.key, placeholder: "field", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateRow(index, { key: e.target.value }) }) }), _jsx(TableCell, { children: _jsxs(Select, { className: "w-full", value: row.type, "aria-label": `Type, row ${index + 1}`, onChange: (e) => {
|
|
73
|
+
return (_jsxs(Table, { className: "hc-form-data-editor", children: [_jsx(TableHeader, { className: "hc-form-data-editor-header", children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { className: "w-24", children: "Type" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { className: "hc-form-data-editor-body", children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-form-data-editor-cell w-6 p-1 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: row.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsx(Input, { type: "text", className: "w-full", value: row.key, placeholder: "field", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateRow(index, { key: e.target.value }) }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsxs(Select, { className: "w-full", value: row.type, "aria-label": `Type, row ${index + 1}`, onChange: (e) => {
|
|
74
74
|
const type = e.target.value;
|
|
75
75
|
updateRow(index, {
|
|
76
76
|
type,
|
|
77
77
|
value: type === 'text' ? row.value : '',
|
|
78
78
|
files: type === 'file' ? row.files : []
|
|
79
79
|
});
|
|
80
|
-
}, children: [_jsx("option", { value: "text", children: "Text" }), _jsx("option", { value: "file", children: "File" })] }) }), _jsx(TableCell, { 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: "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))) })] }));
|
|
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))) })] }));
|
|
81
81
|
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -11,7 +11,7 @@ import { enhanceControl } from '../enhanceControl.js';
|
|
|
11
11
|
* @returns Class string for the label element.
|
|
12
12
|
*/
|
|
13
13
|
function labelClasses(tone, srOnly, inline) {
|
|
14
|
-
const base = 'text-[18px]';
|
|
14
|
+
const base = 'hc-form-group-label text-[18px]';
|
|
15
15
|
const visibility = srOnly ? 'sr-only' : '';
|
|
16
16
|
if (inline) {
|
|
17
17
|
const color = tone === 'muted' ? 'shrink-0 text-muted' : 'shrink-0 font-medium text-text';
|
|
@@ -52,7 +52,9 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
|
|
|
52
52
|
const wrapperClasses = extra
|
|
53
53
|
? `hc-form-group flex items-start gap-2 ${extra}`
|
|
54
54
|
: 'hc-form-group flex items-start gap-2';
|
|
55
|
-
const adjacentLabelClasses = labelClassName
|
|
55
|
+
const adjacentLabelClasses = labelClassName
|
|
56
|
+
? `hc-form-group-label ${labelClassName}`
|
|
57
|
+
: 'hc-form-group-label min-w-0 flex-1 text-[16px] text-text';
|
|
56
58
|
const linkedChildren = enhanceControl(children, { id: controlId });
|
|
57
59
|
return (_jsxs("div", { className: wrapperClasses, children: [linkedChildren, _jsx("label", { htmlFor: controlId, className: adjacentLabelClasses, children: label })] }));
|
|
58
60
|
}
|
|
@@ -61,7 +63,7 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
|
|
|
61
63
|
? `hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-[16px] text-text app-no-drag ${extra}`
|
|
62
64
|
: 'hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-[16px] text-text app-no-drag';
|
|
63
65
|
const linkedChildren = enhanceControl(children, { id: controlId });
|
|
64
|
-
return (_jsxs("label", { htmlFor: controlId, className: wrapperClasses, children: [linkedChildren, label] }));
|
|
66
|
+
return (_jsxs("label", { htmlFor: controlId, className: wrapperClasses, children: [linkedChildren, _jsx("span", { className: "hc-form-group-label", children: label })] }));
|
|
65
67
|
}
|
|
66
68
|
if (layout === 'checkbox') {
|
|
67
69
|
const resolvedDescriptionId = description != null && description !== ''
|
|
@@ -80,7 +82,7 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
|
|
|
80
82
|
const wrapperClasses = extra
|
|
81
83
|
? `hc-form-group flex flex-col gap-1 p-4 border border-separator rounded-md ${extra}`
|
|
82
84
|
: 'hc-form-group flex flex-col gap-1 p-4 border border-separator rounded-md';
|
|
83
|
-
return (_jsxs("div", { className: wrapperClasses, children: [_jsxs("label", { htmlFor: controlId, className: "flex flex-col gap-1", children: [_jsxs("span", { className: "flex items-center gap-2", children: [linkedChildren, _jsx("span", { className:
|
|
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] }));
|
|
84
86
|
}
|
|
85
87
|
if (layout === 'inline') {
|
|
86
88
|
const wrapperClasses = extra
|
|
@@ -105,5 +107,5 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
|
|
|
105
107
|
const wrapperClasses = extra
|
|
106
108
|
? `hc-form-group flex flex-col gap-1 p-4 text-[16px] border border-separator rounded-md ${extra}`
|
|
107
109
|
: 'hc-form-group flex flex-col gap-1 p-4 text-[16px] border border-separator rounded-md';
|
|
108
|
-
return (_jsxs("div", { className: wrapperClasses, children: [_jsxs("label", { htmlFor: htmlFor, className: "flex flex-col gap-1", children: [_jsx("span", { className: labelClasses(labelTone, srOnly, false), children: label }), resolvedDescriptionId ? (_jsx("p", { id: resolvedDescriptionId, className: "hc-form-description m-0 text-[14px] text-muted", children: description })) : null, control] }), resolvedErrorId ? (_jsx(FieldError, { id: resolvedErrorId, spacing: "field", children: error })) : null] }));
|
|
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] }));
|
|
109
111
|
}
|
|
@@ -46,8 +46,8 @@ export function KeyValueEditor({ rows, onChange, placeholderKey = 'Key', placeho
|
|
|
46
46
|
value: row.value ?? '',
|
|
47
47
|
enabled: row.enabled ?? true
|
|
48
48
|
});
|
|
49
|
-
return (_jsxs(Table, { className: "hc-key-value-editor", children: [_jsx(TableHeader, { children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { children: rows.map((row, index) => {
|
|
49
|
+
return (_jsxs(Table, { className: "hc-key-value-editor", children: [_jsx(TableHeader, { className: "hc-key-value-editor-header", children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { className: "hc-key-value-editor-body", children: rows.map((row, index) => {
|
|
50
50
|
const normalizedRow = normalizeRow(row);
|
|
51
|
-
return (_jsxs("tr", { children: [_jsx(TableCell, { className: "w-6 p-1 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: normalizedRow.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { children: _jsx(AutocompleteInput, { type: "text", className: "w-full", value: normalizedRow.key, source: keySource, placeholder: placeholderKey, "aria-label": `Key, row ${index + 1}`, onChange: (key) => updateRow(index, { key }) }) }), _jsx(TableCell, { children: _jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: normalizedRow.value, onChange: (value) => updateRow(index, { value }), variables: variables, source: valueSource, placeholder: placeholderValue, "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable }) }), _jsx(TableCell, { className: "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));
|
|
51
|
+
return (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-key-value-editor-cell w-6 p-1 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: normalizedRow.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(AutocompleteInput, { type: "text", className: "w-full", value: normalizedRow.key, source: keySource, placeholder: placeholderKey, "aria-label": `Key, row ${index + 1}`, onChange: (key) => updateRow(index, { key }) }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: normalizedRow.value, onChange: (value) => updateRow(index, { value }), variables: variables, source: valueSource, placeholder: placeholderValue, "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable }) }), _jsx(TableCell, { className: "hc-key-value-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));
|
|
52
52
|
}) })] }));
|
|
53
53
|
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -7,7 +7,9 @@ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
|
7
7
|
* @param className - Extra classes appended after the layout preset.
|
|
8
8
|
*/
|
|
9
9
|
export function ModalFooter({ children, spaced = false, className }) {
|
|
10
|
-
const base = spaced
|
|
10
|
+
const base = spaced
|
|
11
|
+
? 'hc-modal-footer mt-4 flex justify-end gap-2'
|
|
12
|
+
: 'hc-modal-footer flex justify-end gap-2';
|
|
11
13
|
const classes = className ? `${base} ${className}` : base;
|
|
12
14
|
return _jsx("div", { className: classes, children: children });
|
|
13
15
|
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -7,5 +7,5 @@ import { FaIcon } from '../FaIcon/index.js';
|
|
|
7
7
|
* optional actions, and a close icon on the right.
|
|
8
8
|
*/
|
|
9
9
|
export function ModalHeader({ titleId, title, description, descriptionId, headerActions, closeDisabled = false, onClose }) {
|
|
10
|
-
return (_jsxs("div", { className: "flex flex-wrap items-center gap-2 border-b border-separator px-4 py-4", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h2", { id: titleId, className: "m-0 flex flex-wrap items-center gap-2 text-[17px] font-semibold text-text", children: title }), description ? (_jsx("p", { id: descriptionId, className: "m-0 mt-1 text-[14px] text-muted", children: description })) : null] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [headerActions, _jsx(Button, { type: "button", variant: "icon", className: "shrink-0", "aria-label": "Close", disabled: closeDisabled, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "h-4 w-4" }) })] })] }));
|
|
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" }) })] })] }));
|
|
11
11
|
}
|
|
@@ -35,5 +35,5 @@ export function Modal({ onClose, className = 'w-96', overlayClassName, disableEs
|
|
|
35
35
|
? `${className} flex max-h-[85vh] flex-col overflow-hidden rounded-lg border border-separator bg-surface shadow-xl`
|
|
36
36
|
: `${className} rounded-lg border border-separator bg-surface p-4 shadow-xl`;
|
|
37
37
|
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: `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: "flex-1 overflow-y-auto p-4", children: children })] })) : (children) }), _jsx("button", { type: "button", tabIndex: -1, className: "absolute inset-0 z-0 cursor-default border-none bg-transparent p-0", "aria-label": "Close dialog", onClick: onClose })] }));
|
|
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 })] }));
|
|
39
39
|
}
|
|
@@ -13,5 +13,5 @@ export function OverlayCloseButton({ label = 'Close', onClose, className }) {
|
|
|
13
13
|
const classes = className
|
|
14
14
|
? `hc-overlay-close-button text-[28px] ${className}`
|
|
15
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: "h-4 w-4" }) }));
|
|
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" }) }));
|
|
17
17
|
}
|
|
@@ -14,5 +14,5 @@ export function Page({ title, description, icon, actions, footer, embedded = fal
|
|
|
14
14
|
const outer = className
|
|
15
15
|
? `hc-page flex min-h-0 flex-1 flex-col overflow-y-auto p-6 ${className}`
|
|
16
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: "mx-auto w-full", children: [header, children, footer] }) }));
|
|
17
|
+
return (_jsx("div", { className: outer, children: _jsxs("div", { className: "hc-page-inner mx-auto w-full", children: [header, children, footer] }) }));
|
|
18
18
|
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -8,5 +8,5 @@ export function PageHeader({ title, description, icon, children, className }) {
|
|
|
8
8
|
const wrapperClassName = className
|
|
9
9
|
? `hc-page-header -mx-6 mb-4 flex flex-wrap items-center gap-2 border-b border-separator px-6 py-4 ${className}`
|
|
10
10
|
: 'hc-page-header -mx-6 mb-4 flex flex-wrap items-center gap-2 border-b border-separator px-6 py-4';
|
|
11
|
-
return (_jsxs("div", { className: wrapperClassName, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("h2", { className: "m-0 flex items-center gap-2 text-[
|
|
11
|
+
return (_jsxs("div", { className: wrapperClassName, children: [_jsxs("div", { className: "hc-page-header-content min-w-0 flex-1", children: [_jsxs("h2", { className: "hc-page-header-title m-0 flex items-center gap-2 text-[28px] font-bold leading-[1.15] tracking-[-0.01em] text-text", children: [icon ? (_jsx(FaIcon, { icon: icon, className: "hc-page-header-title-icon h-5 w-5 shrink-0 text-muted", "aria-hidden": true })) : null, title] }), description ? (_jsx("p", { className: "hc-page-header-description m-0 mt-1 text-[16px] text-muted leading-none", children: description })) : null] }), children ? (_jsx("div", { className: "hc-page-header-actions flex flex-wrap items-center gap-2", children: children })) : null] }));
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageSidebar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACxD;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;IAC9B;;OAEG;IACH,KAAK,EAAE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AO,CAuCxB"}
|
|
@@ -7,18 +7,18 @@ import { FaIcon } from '../FaIcon/index.js';
|
|
|
7
7
|
*/
|
|
8
8
|
function sidebarRow(active) {
|
|
9
9
|
return active
|
|
10
|
-
? 'group flex cursor-pointer items-center gap-1 rounded-md bg-selection px-1.5 py-
|
|
11
|
-
: 'group flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-
|
|
10
|
+
? 'group flex cursor-pointer items-center gap-1 rounded-md bg-selection px-1.5 py-2 app-no-drag'
|
|
11
|
+
: 'group flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-2 hover:bg-selection/60 app-no-drag';
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Narrow sidebar navigation for multi-section pages such as settings overlays.
|
|
15
15
|
*/
|
|
16
16
|
export function PageSidebar({ items, selected, onSelect, ariaLabel }) {
|
|
17
|
-
return (_jsx("nav", { className: "hc-page-sidebar flex w-[180px] shrink-0 flex-col gap-
|
|
17
|
+
return (_jsx("nav", { className: "hc-page-sidebar flex w-[180px] shrink-0 flex-col gap-1 border-r border-separator bg-sidebar px-2 py-3", "aria-label": ariaLabel, children: items.map((item) => {
|
|
18
18
|
const active = selected === item.value;
|
|
19
19
|
const rowClass = item.icon
|
|
20
|
-
?
|
|
21
|
-
:
|
|
22
|
-
return (_jsxs("button", { type: "button", className: rowClass, "aria-current": active ? 'page' : undefined, onClick: () => onSelect(item.value), children: [item.icon ? (_jsx(FaIcon, { icon: item.icon, className: `h-
|
|
20
|
+
? `hc-page-sidebar-item ${sidebarRow(active)} w-full gap-2 border-none text-left text-[15px] app-no-drag`
|
|
21
|
+
: `hc-page-sidebar-item ${sidebarRow(active)} w-full border-none text-left text-[15px] app-no-drag`;
|
|
22
|
+
return (_jsxs("button", { type: "button", className: rowClass, "aria-current": active ? 'page' : undefined, onClick: () => onSelect(item.value), children: [item.icon ? (_jsx(FaIcon, { icon: item.icon, className: `hc-page-sidebar-item-icon h-[18px] w-[18px] shrink-0 ${active ? 'text-text' : 'text-muted'}`, "aria-hidden": true })) : null, _jsx("span", { className: "hc-page-sidebar-item-label min-w-0 truncate", children: item.label })] }, item.value));
|
|
23
23
|
}) }));
|
|
24
24
|
}
|
|
@@ -15,5 +15,5 @@ export function PanelCloseButton({ onClose, label = 'Close', ariaLabel, classNam
|
|
|
15
15
|
const classes = className
|
|
16
16
|
? `hc-panel-close-button ${base} ${className}`
|
|
17
17
|
: `hc-panel-close-button ${base}`;
|
|
18
|
-
return (_jsx(Button, { type: "button", variant: "secondary", className: classes, "aria-label": ariaLabel ?? label, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "h-4 w-4" }) }));
|
|
18
|
+
return (_jsx(Button, { type: "button", variant: "secondary", className: classes, "aria-label": ariaLabel ?? label, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "hc-panel-close-button-icon h-4 w-4" }) }));
|
|
19
19
|
}
|
|
@@ -26,7 +26,7 @@ export function Resizable({ id, open, onClose, closeLabel, storageKey, title, he
|
|
|
26
26
|
getMaxSize,
|
|
27
27
|
storageKey
|
|
28
28
|
});
|
|
29
|
-
const closeButton = (_jsx("button", { type: "button", className: footerPanelCloseButtonClassName
|
|
29
|
+
const closeButton = (_jsx("button", { type: "button", className: `hc-resizable-close ${footerPanelCloseButtonClassName}`, onClick: onClose, "aria-label": `Close ${closeLabel}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }));
|
|
30
30
|
const body = unmountWhenClosed && !open ? null : children;
|
|
31
|
-
return (_jsxs("div", { ref: containerRef, id: id, className: `hc-resizable ${footerPanelClassName(open)}`, style: { height }, role: "region", "aria-label": `${closeLabel} panel`, "aria-hidden": !open, inert: !open || undefined, children: [_jsx(ResizeHandle, { orientation: "horizontal", value: height, min: panelMinSize, max: panelMaxSize, onResizeStart: onResizeStart, onKeyboardResize: onKeyboardResize, ariaLabel: `Resize ${closeLabel} panel` }), headerless ? (_jsxs("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden", children: [_jsx("button", { type: "button", className: `absolute right-2 top-2 z-10 ${footerPanelCloseButtonClassName}`, onClick: onClose, "aria-label": `Close ${closeLabel}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: body })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex shrink-0 items-center justify-between border-b border-separator px-3 py-2", children: [_jsx("div", { className: "min-w-0 flex-1", children: title }), closeButton] }), body] }))] }));
|
|
31
|
+
return (_jsxs("div", { ref: containerRef, id: id, className: `hc-resizable ${footerPanelClassName(open)}`, style: { height }, role: "region", "aria-label": `${closeLabel} panel`, "aria-hidden": !open, inert: !open || undefined, children: [_jsx(ResizeHandle, { orientation: "horizontal", value: height, min: panelMinSize, max: panelMaxSize, onResizeStart: onResizeStart, onKeyboardResize: onKeyboardResize, ariaLabel: `Resize ${closeLabel} panel` }), headerless ? (_jsxs("div", { className: "hc-resizable-headerless relative flex min-h-0 flex-1 flex-col overflow-hidden", children: [_jsx("button", { type: "button", className: `hc-resizable-headerless-close absolute right-2 top-2 z-10 ${footerPanelCloseButtonClassName}`, onClick: onClose, "aria-label": `Close ${closeLabel}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "hc-resizable-body flex min-h-0 flex-1 flex-col", children: body })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "hc-resizable-header flex shrink-0 items-center justify-between border-b border-separator px-3 py-2", children: [_jsx("div", { className: "hc-resizable-header-title min-w-0 flex-1", children: title }), closeButton] }), body] }))] }));
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/ResizeHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,aAAa,IAAI,kBAAkB,EACnC,UAAU,IAAI,eAAe,EAC9B,MAAM,O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B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,WAAW,EACX,KAAK,EACL,GAAG,EACH,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAmCrB"}
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
|
5
5
|
export function ResizeHandle({ orientation, value, min, max, onResizeStart, onKeyboardResize, ariaLabel, className }) {
|
|
6
6
|
const isHorizontal = orientation === 'horizontal';
|
|
7
7
|
const containerClassName = [
|
|
8
|
-
'm-0 flex shrink-0 items-center justify-center bg-control p-0 font-inherit text-inherit hover:bg-selection/60 app-no-drag',
|
|
8
|
+
'hc-resize-handle m-0 flex shrink-0 items-center justify-center bg-control p-0 font-inherit text-inherit hover:bg-selection/60 app-no-drag',
|
|
9
9
|
isHorizontal
|
|
10
10
|
? 'h-1.5 w-full cursor-row-resize border-b border-separator'
|
|
11
11
|
: 'h-full w-1.5 cursor-col-resize border-r border-separator',
|
|
@@ -13,5 +13,7 @@ export function ResizeHandle({ orientation, value, min, max, onResizeStart, onKe
|
|
|
13
13
|
]
|
|
14
14
|
.filter(Boolean)
|
|
15
15
|
.join(' ');
|
|
16
|
-
return (_jsx("div", { role: "separator", tabIndex: 0, className: containerClassName, onMouseDown: onResizeStart, onKeyDown: onKeyboardResize, "aria-orientation": orientation, "aria-label": ariaLabel, "aria-valuenow": Math.round(value), "aria-valuemin": min, "aria-valuemax": Math.round(max), children: _jsx("div", { className: isHorizontal
|
|
16
|
+
return (_jsx("div", { role: "separator", tabIndex: 0, className: containerClassName, onMouseDown: onResizeStart, onKeyDown: onKeyboardResize, "aria-orientation": orientation, "aria-label": ariaLabel, "aria-valuenow": Math.round(value), "aria-valuemin": min, "aria-valuemax": Math.round(max), children: _jsx("div", { className: isHorizontal
|
|
17
|
+
? 'hc-resize-handle-grip h-0.5 w-8 rounded-full bg-muted/50'
|
|
18
|
+
: 'hc-resize-handle-grip h-8 w-0.5 rounded-full bg-muted/50', "aria-hidden": true }) }));
|
|
17
19
|
}
|
|
@@ -21,5 +21,5 @@ export declare function getFooterPanelMaxSize(containerRef: RefObject<HTMLDivEle
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function footerPanelClassName(open: boolean): string;
|
|
23
23
|
/** Shared close-button styling for footer slide-up panels. */
|
|
24
|
-
export declare const footerPanelCloseButtonClassName = "inline-flex h-
|
|
24
|
+
export declare const footerPanelCloseButtonClassName = "inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text app-no-drag";
|
|
25
25
|
//# sourceMappingURL=footerPanelUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footerPanelUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/footerPanelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,sDAAsD;AACtD,eAAO,MAAM,UAAU,MAAM,CAAC;AAiC9B;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,MAAM,CAI5F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED,8DAA8D;AAC9D,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"footerPanelUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/footerPanelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,sDAAsD;AACtD,eAAO,MAAM,UAAU,MAAM,CAAC;AAiC9B;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,MAAM,CAI5F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED,8DAA8D;AAC9D,eAAO,MAAM,+BAA+B,sMACyJ,CAAC"}
|
|
@@ -58,4 +58,4 @@ export function footerPanelClassName(open) {
|
|
|
58
58
|
].join(' ');
|
|
59
59
|
}
|
|
60
60
|
/** Shared close-button styling for footer slide-up panels. */
|
|
61
|
-
export const footerPanelCloseButtonClassName = 'inline-flex h-
|
|
61
|
+
export const footerPanelCloseButtonClassName = 'inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text app-no-drag';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,UAAU,iBAAiB;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EAClC,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CASjC;AAED,UAAU,oBAAoB;IAC5B;;OAEG;IACH,OAAO,EAA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;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,OAAO,EACP,IAAY,EACZ,SAAS,EACV,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAwBpC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAMtF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAExF"}
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
|
|
|
8
8
|
* @param aria-labelledby - Id of a visible heading that names the list.
|
|
9
9
|
*/
|
|
10
10
|
export function ResourceList({ children, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy }) {
|
|
11
|
-
const base = 'hc-resource-list m-0 flex list-none flex-col gap-
|
|
11
|
+
const base = 'hc-resource-list m-0 flex list-none flex-col gap-[10px] p-0';
|
|
12
12
|
const classes = className ? `${base} ${className}` : base;
|
|
13
13
|
return (_jsx("ul", { className: classes, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children: children }));
|
|
14
14
|
}
|
|
@@ -24,9 +24,9 @@ export function ResourceList({ children, className, 'aria-label': ariaLabel, 'ar
|
|
|
24
24
|
*/
|
|
25
25
|
export function ResourceListRow({ primary, secondary, meta, actions, wrap = false, className }) {
|
|
26
26
|
const wrapClass = wrap ? 'flex-wrap' : '';
|
|
27
|
-
const base = `flex items-center justify-between gap-3 rounded-
|
|
27
|
+
const base = `hc-resource-list-row flex items-center justify-between gap-3 rounded-[10px] border border-separator/80 px-4 py-[14px] shadow-[0_1px_2px_rgba(0,0,0,0.04)] transition-[background-color,box-shadow] duration-[120ms] ease-out hover:shadow-[0_2px_8px_rgba(0,0,0,0.06)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.2)] dark:hover:shadow-[0_2px_8px_rgba(0,0,0,0.28)] ${wrapClass}`.trim();
|
|
28
28
|
const classes = className ? `${base} ${className}` : base;
|
|
29
|
-
return (_jsxs("li", { className: classes, children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "min-w-0", children: primary }), secondary != null ? (_jsx("div", { className: "truncate text-[14px] text-muted", children: secondary })) : null, meta] }), actions ? (_jsx("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-2", children: actions })) : null] }));
|
|
29
|
+
return (_jsxs("li", { className: classes, children: [_jsxs("div", { className: "hc-resource-list-row-content min-w-0", children: [_jsx("div", { className: "hc-resource-list-row-primary min-w-0", children: primary }), secondary != null ? (_jsx("div", { className: "hc-resource-list-row-secondary truncate text-[14px] text-muted", children: secondary })) : null, meta] }), actions ? (_jsx("div", { className: "hc-resource-list-row-actions flex shrink-0 flex-wrap items-center justify-end gap-2", children: actions })) : null] }));
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Primary title styling for {@link ResourceListRow}.
|
|
@@ -34,7 +34,7 @@ export function ResourceListRow({ primary, secondary, meta, actions, wrap = fals
|
|
|
34
34
|
* @param children - Title content.
|
|
35
35
|
*/
|
|
36
36
|
export function ResourceListPrimary({ children }) {
|
|
37
|
-
return _jsx("div", { className: "truncate text-[14px] font-medium text-text", children: children });
|
|
37
|
+
return (_jsx("div", { className: "hc-resource-list-primary truncate text-[14px] font-medium text-text", children: children }));
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Inline empty-state row rendered inside a {@link ResourceList}.
|
|
@@ -42,5 +42,5 @@ export function ResourceListPrimary({ children }) {
|
|
|
42
42
|
* @param children - Empty message content.
|
|
43
43
|
*/
|
|
44
44
|
export function ResourceListEmptyItem({ children }) {
|
|
45
|
-
return _jsx("li", { className: "text-[14px] text-muted", children: children });
|
|
45
|
+
return _jsx("li", { className: "hc-resource-list-empty-item text-[14px] text-muted", children: children });
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RowActionsMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAMhD,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC,CAAC;AAEF,UAAU,KAAK;IACb;;;OAGG;IACH,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAkBD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RowActionsMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAMhD,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC,CAAC;AAEF,UAAU,KAAK;IACb;;;OAGG;IACH,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAkBD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoP/F"}
|
|
@@ -169,7 +169,7 @@ export function RowActionsMenu({ groups, menuId, openMenuId, onOpenChange }) {
|
|
|
169
169
|
focusItem(typeahead.index);
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
return (_jsxs("div", { ref: rootRef, className: "hc-row-actions-menu relative shrink-0", children: [_jsx(Button, { innerRef: triggerRef, type: "button", variant: "icon", title: "Actions", "aria-label": "Row actions", "aria-haspopup": "menu", "aria-expanded": isOpen, "aria-controls": isOpen ? menuElementId : undefined, onClick: (e) => {
|
|
172
|
+
return (_jsxs("div", { ref: rootRef, className: "hc-row-actions-menu relative shrink-0", children: [_jsx(Button, { innerRef: triggerRef, type: "button", variant: "icon", className: "hc-row-actions-menu-trigger", title: "Actions", "aria-label": "Row actions", "aria-haspopup": "menu", "aria-expanded": isOpen, "aria-controls": isOpen ? menuElementId : undefined, onClick: (e) => {
|
|
173
173
|
e.stopPropagation();
|
|
174
174
|
if (isOpen) {
|
|
175
175
|
closeMenu();
|
|
@@ -177,13 +177,15 @@ export function RowActionsMenu({ groups, menuId, openMenuId, onOpenChange }) {
|
|
|
177
177
|
else {
|
|
178
178
|
openMenu(false);
|
|
179
179
|
}
|
|
180
|
-
}, onKeyDown: handleTriggerKeyDown, children: _jsx(FaIcon, { icon: faBars, className: "h-3.5 w-3.5" }) }), isOpen && (_jsx("div", { id: menuElementId, role: "menu", className: "absolute right-0 top-full z-10 mt-0.5 min-w-[120px] rounded-md border border-separator bg-surface py-1 shadow-md app-no-drag", onKeyDown: handleMenuKeyDown, children: groups.map((group, groupIndex) => {
|
|
180
|
+
}, onKeyDown: handleTriggerKeyDown, children: _jsx(FaIcon, { icon: faBars, className: "h-3.5 w-3.5" }) }), isOpen && (_jsx("div", { id: menuElementId, role: "menu", className: "hc-row-actions-menu-panel absolute right-0 top-full z-10 mt-0.5 min-w-[120px] rounded-md border border-separator bg-surface py-1 shadow-md app-no-drag", onKeyDown: handleMenuKeyDown, children: groups.map((group, groupIndex) => {
|
|
181
181
|
let flatIndex = groups.slice(0, groupIndex).reduce((count, g) => count + g.length, 0);
|
|
182
|
-
return (_jsx("div", { className: groupIndex > 0
|
|
182
|
+
return (_jsx("div", { className: groupIndex > 0
|
|
183
|
+
? 'hc-row-actions-menu-group border-t border-separator'
|
|
184
|
+
: 'hc-row-actions-menu-group', children: group.map((item) => {
|
|
183
185
|
const itemIndex = flatIndex++;
|
|
184
186
|
return (_jsx("button", { ref: (el) => {
|
|
185
187
|
itemRefs.current[itemIndex] = el;
|
|
186
|
-
}, type: "button", role: "menuitem", tabIndex: itemIndex === focusedIndex ? 0 : -1, className: menuItemClass(item.variant)
|
|
188
|
+
}, type: "button", role: "menuitem", tabIndex: itemIndex === focusedIndex ? 0 : -1, className: `hc-row-actions-menu-item ${menuItemClass(item.variant)}`, onClick: (e) => {
|
|
187
189
|
e.stopPropagation();
|
|
188
190
|
closeMenu();
|
|
189
191
|
item.onSelect();
|
|
@@ -32,5 +32,5 @@ export function SegmentedTabPanel({ value, children, className }) {
|
|
|
32
32
|
}, [context, value]);
|
|
33
33
|
if (context.value !== value)
|
|
34
34
|
return null;
|
|
35
|
-
return (_jsx("div", { role: "tabpanel", id: context.getPanelId(value), "aria-labelledby": context.getTabId(value), className: className, onKeyDown: handleKeyDown, children: children }));
|
|
35
|
+
return (_jsx("div", { role: "tabpanel", id: context.getPanelId(value), "aria-labelledby": context.getTabId(value), className: className ? `hc-segmented-tab-panel ${className}` : 'hc-segmented-tab-panel', onKeyDown: handleKeyDown, children: children }));
|
|
36
36
|
}
|
|
@@ -130,14 +130,14 @@ export function SegmentedTabsVisibilityMenu({ tabs, visibleTabValues, onToggle }
|
|
|
130
130
|
focusItem(arrowIndex);
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
return (_jsxs("div", { ref: rootRef, className: "hc-segmented-tabs-visibility-menu relative shrink-0", children: [_jsx(Button, { innerRef: triggerRef, type: "button", variant: "icon", className: triggerClassName
|
|
133
|
+
return (_jsxs("div", { ref: rootRef, className: "hc-segmented-tabs-visibility-menu relative shrink-0", children: [_jsx(Button, { innerRef: triggerRef, type: "button", variant: "icon", className: `hc-segmented-tabs-visibility-menu-trigger ${triggerClassName}`, "aria-label": "Customize visible tabs", "aria-haspopup": "menu", "aria-expanded": isOpen, "aria-controls": isOpen ? menuElementId : undefined, onClick: () => {
|
|
134
134
|
if (isOpen) {
|
|
135
135
|
closeMenu();
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
138
|
openMenu(false);
|
|
139
139
|
}
|
|
140
|
-
}, onKeyDown: handleTriggerKeyDown, children: _jsx(FaIcon, { icon: faCaretDown, className: "h-3.5 w-3.5" }) }), isOpen && (_jsx("div", { id: menuElementId, role: "menu", className: "absolute right-0 top-full z-10 mt-0.5 min-w-[140px] rounded-md border border-separator bg-surface py-1 shadow-md app-no-drag", onKeyDown: handleMenuKeyDown, children: tabs.map((tab, index) => {
|
|
140
|
+
}, onKeyDown: handleTriggerKeyDown, children: _jsx(FaIcon, { icon: faCaretDown, className: "h-3.5 w-3.5" }) }), isOpen && (_jsx("div", { id: menuElementId, role: "menu", className: "hc-segmented-tabs-visibility-menu-panel absolute right-0 top-full z-10 mt-0.5 min-w-[140px] rounded-md border border-separator bg-surface py-1 shadow-md app-no-drag", onKeyDown: handleMenuKeyDown, children: tabs.map((tab, index) => {
|
|
141
141
|
const checked = visibleSet.has(tab.value);
|
|
142
142
|
return (_jsx(MenuCheckboxItem, { ref: (element) => {
|
|
143
143
|
itemRefs.current[index] = element;
|
|
@@ -148,8 +148,8 @@ export function SegmentedTabsVisibilityMenu({ tabs, visibleTabValues, onToggle }
|
|
|
148
148
|
* Single checkbox-style row in the tab visibility menu.
|
|
149
149
|
*/
|
|
150
150
|
function MenuCheckboxItem({ checked, label, tabIndex, onSelect, ref }) {
|
|
151
|
-
return (_jsxs("button", { ref: ref, type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: tabIndex, className: menuItemClass
|
|
151
|
+
return (_jsxs("button", { ref: ref, type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: tabIndex, className: `hc-segmented-tabs-visibility-menu-item ${menuItemClass}`, onClick: (e) => {
|
|
152
152
|
e.stopPropagation();
|
|
153
153
|
onSelect();
|
|
154
|
-
}, children: [_jsx("span", { className: "inline-flex w-4 shrink-0 justify-center", "aria-hidden": true, children: checked ? _jsx(FaIcon, { icon: faCheck, className: "h-3 w-3" }) : null }), _jsx("span", { className: "min-w-0", children: label })] }));
|
|
154
|
+
}, children: [_jsx("span", { className: "hc-segmented-tabs-visibility-menu-item-check inline-flex w-4 shrink-0 justify-center", "aria-hidden": true, children: checked ? _jsx(FaIcon, { icon: faCheck, className: "h-3 w-3" }) : null }), _jsx("span", { className: "hc-segmented-tabs-visibility-menu-item-label min-w-0", children: label })] }));
|
|
155
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedTabs/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAMhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkD1C,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;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|
|
|
151
151
|
]
|
|
152
152
|
.filter(Boolean)
|
|
153
153
|
.join(' ');
|
|
154
|
-
const tabListClassName = [
|
|
154
|
+
const tabListClassName = [
|
|
155
|
+
'hc-segmented-tabs-list inline-flex min-w-0 flex-1 items-center',
|
|
156
|
+
fullWidth ? 'w-full' : ''
|
|
157
|
+
]
|
|
155
158
|
.filter(Boolean)
|
|
156
159
|
.join(' ');
|
|
157
160
|
const isRadiogroup = pattern === 'radiogroup';
|
|
@@ -208,7 +211,7 @@ export function SegmentedTabs({ tabs, value: valueProp, onChange: onChangeProp,
|
|
|
208
211
|
}, [visibleTabs, value, onChange, isRadiogroup, context, getPanelId]);
|
|
209
212
|
return (_jsxs("div", { className: outerClassName, children: [_jsx("div", { className: tabListClassName, role: isRadiogroup ? 'radiogroup' : 'tablist', "aria-label": ariaLabel, ...(!isRadiogroup ? { 'aria-orientation': 'horizontal' } : {}), onKeyDown: handleKeyDown, children: visibleTabs.map((tab) => {
|
|
210
213
|
const selected = value === tab.value;
|
|
211
|
-
const tabClassName =
|
|
214
|
+
const tabClassName = `hc-segmented-tabs-tab ${segment(selected)}${fullWidth ? ' flex-1' : ''}`;
|
|
212
215
|
return (_jsx("button", { ref: (element) => {
|
|
213
216
|
if (element)
|
|
214
217
|
tabRefs.current.set(tab.value, element);
|
|
@@ -221,6 +224,6 @@ export function SegmentedTabs({ tabs, value: valueProp, onChange: onChangeProp,
|
|
|
221
224
|
id: getTabId(tab.value),
|
|
222
225
|
'aria-selected': selected,
|
|
223
226
|
...(context ? { 'aria-controls': getPanelId(tab.value) } : {})
|
|
224
|
-
}), children: _jsxs("span", { className: "inline-flex items-center gap-1.5", children: [tab.label, tab.indicator && (_jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-accent", "aria-hidden": true }))] }) }, tab.value));
|
|
227
|
+
}), children: _jsxs("span", { className: "hc-segmented-tabs-tab-label inline-flex items-center gap-1.5", children: [tab.label, tab.indicator && (_jsx("span", { className: "hc-segmented-tabs-tab-indicator h-1.5 w-1.5 rounded-full bg-accent", "aria-hidden": true }))] }) }, tab.value));
|
|
225
228
|
}) }), editable && (_jsx(SegmentedTabsVisibilityMenu, { tabs: editableTabs, visibleTabValues: visibleTabValues, onToggle: handleVisibilityToggle }))] }));
|
|
226
229
|
}
|
|
@@ -7,5 +7,5 @@ export function SidebarLayout({ sidebar, children, className }) {
|
|
|
7
7
|
const outer = className
|
|
8
8
|
? `hc-sidebar-layout flex min-h-0 flex-1 flex-col ${className}`
|
|
9
9
|
: 'hc-sidebar-layout flex min-h-0 flex-1 flex-col';
|
|
10
|
-
return (_jsx("div", { className: outer, children: _jsxs("div", { className: "flex min-h-0 flex-1", children: [sidebar, _jsx("div", { className: "flex-1 overflow-y-auto p-6 pt-0!", children: children })] }) }));
|
|
10
|
+
return (_jsx("div", { className: outer, children: _jsxs("div", { className: "hc-sidebar-layout-body flex min-h-0 flex-1", children: [sidebar, _jsx("div", { className: "hc-sidebar-layout-content flex-1 overflow-y-auto p-6 pt-0!", children: children })] }) }));
|
|
11
11
|
}
|
|
@@ -18,5 +18,5 @@ function sizeClasses(size) {
|
|
|
18
18
|
export function Spinner({ size = 'md', label, className }) {
|
|
19
19
|
const wrapperBase = 'hc-spinner inline-flex items-center justify-center';
|
|
20
20
|
const wrapperClasses = className ? `${wrapperBase} ${className}` : wrapperBase;
|
|
21
|
-
return (_jsx("span", { className: wrapperClasses, role: label ? 'status' : undefined, "aria-label": label, children: _jsxs("svg", { className: `${sizeClasses(size)} animate-spin text-accent`, viewBox: "0 0 24 24", fill: "none", "aria-hidden": label ? true : undefined, children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }) }));
|
|
21
|
+
return (_jsx("span", { className: wrapperClasses, role: label ? 'status' : undefined, "aria-label": label, children: _jsxs("svg", { className: `${sizeClasses(size)} hc-spinner-icon animate-spin text-accent`, viewBox: "0 0 24 24", fill: "none", "aria-hidden": label ? true : undefined, children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }) }));
|
|
22
22
|
}
|
|
@@ -10,5 +10,5 @@ import { FaIcon } from '../FaIcon/index.js';
|
|
|
10
10
|
* @param tabIndex - Tab order index; use with roving tabindex on the tab label.
|
|
11
11
|
*/
|
|
12
12
|
export function TabCloseButton({ ariaLabel, onClick, title = 'Close tab', tabIndex }) {
|
|
13
|
-
return (_jsx("button", { type: "button", className: "hc-tab-close-button inline-flex
|
|
13
|
+
return (_jsx("button", { type: "button", className: "hc-tab-close-button inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text focus-visible:bg-selection focus-visible:text-text app-no-drag", title: title, "aria-label": ariaLabel, tabIndex: tabIndex, onClick: onClick, children: _jsx(FaIcon, { icon: faXmark, className: "hc-tab-close-button-icon h-3.5 w-3.5" }) }));
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,cAAc,gIACoG,CAAC;AAEhI;;GAEG;AACH,eAAO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GAAG,CAAC,OAAO,CAUvF"}
|
|
@@ -50,7 +50,7 @@ export function Table({ children, variant = 'bordered', className }) {
|
|
|
50
50
|
}
|
|
51
51
|
const wrapperBase = 'hc-table overflow-hidden rounded-md border border-separator';
|
|
52
52
|
const wrapperClasses = className ? `${wrapperBase} ${className}` : wrapperBase;
|
|
53
|
-
return createElement(TableVariantContext.Provider, { value: variant }, createElement('div', { className: wrapperClasses }, createElement('table', { className: 'w-full border-collapse' }, children)));
|
|
53
|
+
return createElement(TableVariantContext.Provider, { value: variant }, createElement('div', { className: wrapperClasses }, createElement('table', { className: 'hc-table-element w-full border-collapse' }, children)));
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Table header section wrapper.
|
|
@@ -59,7 +59,8 @@ export function Table({ children, variant = 'bordered', className }) {
|
|
|
59
59
|
* @param className - Extra classes appended after any section preset.
|
|
60
60
|
*/
|
|
61
61
|
export function TableHeader({ children, className, ...rest }) {
|
|
62
|
-
|
|
62
|
+
const classes = mergeClasses('hc-table-header', className);
|
|
63
|
+
return (_jsx("thead", { className: classes, ...rest, children: children }));
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
65
66
|
* Table body section wrapper.
|
|
@@ -69,7 +70,7 @@ export function TableHeader({ children, className, ...rest }) {
|
|
|
69
70
|
*/
|
|
70
71
|
export function TableBody({ children, className, ...rest }) {
|
|
71
72
|
const variant = useContext(TableVariantContext);
|
|
72
|
-
const base = variant === 'bordered' ? '[&_tr:last-child_td]:border-b-0' : '';
|
|
73
|
+
const base = variant === 'bordered' ? 'hc-table-body [&_tr:last-child_td]:border-b-0' : 'hc-table-body';
|
|
73
74
|
const classes = mergeClasses(base, className);
|
|
74
75
|
return (_jsx("tbody", { className: classes, ...rest, children: children }));
|
|
75
76
|
}
|
|
@@ -82,7 +83,7 @@ export function TableBody({ children, className, ...rest }) {
|
|
|
82
83
|
export function TableHead({ children, className, scope = 'col', ...rest }) {
|
|
83
84
|
const variant = useContext(TableVariantContext);
|
|
84
85
|
const base = variant === 'loose' ? tableHeadClassLoose : tableHeadClass;
|
|
85
|
-
const classes = mergeClasses(base
|
|
86
|
+
const classes = mergeClasses(`hc-table-head ${base}`, className);
|
|
86
87
|
return (_jsx("th", { scope: scope, className: classes, ...rest, children: children }));
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
@@ -94,6 +95,6 @@ export function TableHead({ children, className, scope = 'col', ...rest }) {
|
|
|
94
95
|
export function TableCell({ children, className, ...rest }) {
|
|
95
96
|
const variant = useContext(TableVariantContext);
|
|
96
97
|
const base = variant === 'loose' ? tableCellClassLoose : tableCellClass;
|
|
97
|
-
const classes = mergeClasses(base
|
|
98
|
+
const classes = mergeClasses(`hc-table-cell ${base}`, className);
|
|
98
99
|
return (_jsx("td", { className: classes, ...rest, children: children }));
|
|
99
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VariableInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAYnE,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MA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C;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAc,EACd,gBAAgB,EAChB,cAAc,EACd,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,MAAM,EACP,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAqTrB"}
|
|
@@ -163,20 +163,22 @@ export function VariableInput({ value, onChange, variables, placeholder, onKeyDo
|
|
|
163
163
|
const tooltipContent = tooltip ? getVariableTooltipContent(tooltip.key, variables) : null;
|
|
164
164
|
return (_jsxs("div", { className: wrapperClassName
|
|
165
165
|
? `hc-variable-input relative min-w-0 ${wrapperClassName}`
|
|
166
|
-
: 'hc-variable-input relative min-w-0 flex-1', children: [_jsx("div", { ref: backdropRef, "aria-hidden": true, className: "pointer-events-none absolute inset-0 overflow-hidden whitespace-nowrap px-2.5 py-1.5 text-[16px] text-inherit", children: safeValue ? (tokens.map((token, index) => token.key ? (_jsx("span", { ref: (el) => {
|
|
166
|
+
: 'hc-variable-input relative min-w-0 flex-1', children: [_jsx("div", { ref: backdropRef, "aria-hidden": true, className: "hc-variable-input-backdrop pointer-events-none absolute inset-0 overflow-hidden whitespace-nowrap px-2.5 py-1.5 text-[16px] text-inherit", children: safeValue ? (tokens.map((token, index) => token.key ? (_jsx("span", { ref: (el) => {
|
|
167
167
|
if (el)
|
|
168
168
|
spanRefs.current.set(index, el);
|
|
169
169
|
else
|
|
170
170
|
spanRefs.current.delete(index);
|
|
171
|
-
}, className: "text-[#32D2E2]", children: token.text }, index)) : (_jsx("span", { children: token.text }, index)))) : (_jsx("span", { className: "text-muted", children: placeholder })) }), _jsx(Input, { ref: inputRef, id: id, variant: "plain", role: source ? 'combobox' : undefined, "aria-autocomplete": source ? 'list' : undefined, "aria-expanded": source ? autocompleteOpen : undefined, "aria-controls": source && autocompleteOpen ? listboxId : undefined, "aria-activedescendant": source && autocompleteOpen && autocompleteActiveIndex >= 0
|
|
171
|
+
}, className: "hc-variable-input-token hc-variable-input-token-variable text-[#32D2E2]", children: token.text }, index)) : (_jsx("span", { className: "hc-variable-input-token", children: token.text }, index)))) : (_jsx("span", { className: "hc-variable-input-placeholder text-muted", children: placeholder })) }), _jsx(Input, { ref: inputRef, id: id, variant: "plain", role: source ? 'combobox' : undefined, "aria-autocomplete": source ? 'list' : undefined, "aria-expanded": source ? autocompleteOpen : undefined, "aria-controls": source && autocompleteOpen ? listboxId : undefined, "aria-activedescendant": source && autocompleteOpen && autocompleteActiveIndex >= 0
|
|
172
172
|
? `${listboxId}-option-${autocompleteActiveIndex}`
|
|
173
|
-
: undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": tooltip ? tooltipId : undefined, className: `relative w-full min-w-0 border-none bg-transparent px-2.5 py-1.5 text-[16px] text-transparent caret-text focus-visible:shadow-none ${className}`, type: "text", placeholder: placeholder, value: safeValue, onChange: (e) => {
|
|
173
|
+
: undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": tooltip ? tooltipId : undefined, className: `hc-variable-input-field relative w-full min-w-0 border-none bg-transparent px-2.5 py-1.5 text-[16px] text-transparent caret-text focus-visible:shadow-none ${className}`, type: "text", placeholder: placeholder, value: safeValue, onChange: (e) => {
|
|
174
174
|
onChange(e.target.value);
|
|
175
175
|
queueMicrotask(updateTooltipFromCaret);
|
|
176
176
|
}, onFocus: () => {
|
|
177
177
|
openAutocomplete();
|
|
178
178
|
updateTooltipFromCaret();
|
|
179
|
-
}, onBlur: closeAutocomplete, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onSelect: updateTooltipFromCaret, onClick: updateTooltipFromCaret, onScroll: syncScroll, onMouseMove: handleMouseMove, onMouseLeave: scheduleHide }), source && (_jsx(SuggestionList, { open: autocompleteOpen, items: autocompleteItems, activeIndex: autocompleteActiveIndex, anchorRef: inputRef, listboxId: listboxId, onSelect: selectItem, onActiveIndexChange: setActiveIndex, onClose: closeSuggestions })), tooltip && tooltipContent && (_jsxs("div", { id: tooltipId, role: "tooltip", className: "pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-2 rounded-md border border-separator bg-surface px-4 py-3 text-[14px] text-text shadow-md after:pointer-events-auto after:absolute after:-bottom-2 after:left-0 after:right-0 after:h-2 after:content-['']", style: { top: tooltip.top - 4, left: tooltip.left }, onMouseEnter: cancelHide, onMouseLeave: scheduleHide, children: [_jsx("span", { className: tooltipContent.muted
|
|
179
|
+
}, onBlur: closeAutocomplete, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onSelect: updateTooltipFromCaret, onClick: updateTooltipFromCaret, onScroll: syncScroll, onMouseMove: handleMouseMove, onMouseLeave: scheduleHide }), source && (_jsx(SuggestionList, { open: autocompleteOpen, items: autocompleteItems, activeIndex: autocompleteActiveIndex, anchorRef: inputRef, listboxId: listboxId, onSelect: selectItem, onActiveIndexChange: setActiveIndex, onClose: closeSuggestions })), tooltip && tooltipContent && (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-variable-input-tooltip pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-2 rounded-md border border-separator bg-surface px-4 py-3 text-[14px] text-text shadow-md after:pointer-events-auto after:absolute after:-bottom-2 after:left-0 after:right-0 after:h-2 after:content-['']", style: { top: tooltip.top - 4, left: tooltip.left }, onMouseEnter: cancelHide, onMouseLeave: scheduleHide, children: [_jsx("span", { className: tooltipContent.muted
|
|
180
|
+
? 'hc-variable-input-tooltip-text text-muted'
|
|
181
|
+
: 'hc-variable-input-tooltip-text', children: tooltipContent.text }), onEditVariable && (_jsx("button", { type: "button", className: "hc-variable-input-tooltip-edit -mx-1 self-start rounded px-1 py-0.5 text-[14px] text-accent hover:underline app-no-drag", "aria-label": `Edit value for ${tooltip.key}`, onClick: () => {
|
|
180
182
|
onEditVariable();
|
|
181
183
|
setTooltip(null);
|
|
182
184
|
}, children: "Edit value" }))] }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VariableTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAY/C,UAAU,KAAK;IACb;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VariableTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAY/C,UAAU,KAAK;IACb;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoHtF"}
|
|
@@ -39,5 +39,5 @@ export function VariableTable({ variables, onChange, description }) {
|
|
|
39
39
|
}
|
|
40
40
|
onChange(variables.filter((_, i) => i !== index));
|
|
41
41
|
};
|
|
42
|
-
return (_jsxs("div", { className: "hc-variable-table", children: [description && _jsx("p", { className: "mb-3 text-[14px] text-muted", children: description }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs("tr", { children: [_jsx(TableHead, { children: "Key" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { children: "Default" }), _jsx(TableHead, { className: "w-14 text-center", children: "Share" }), _jsx(TableHead, { className: "w-7 p-0 text-center" })] }) }), _jsx(TableBody, { children: variables.map((variable, index) => (_jsxs("tr", { children: [_jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.key, placeholder: "variable", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateVariable(index, { key: e.target.value }) }) }), _jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.value, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onChange: (e) => updateVariable(index, { value: e.target.value }) }) }), _jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.defaultValue, placeholder: "default", "aria-label": `Default, row ${index + 1}`, onChange: (e) => updateVariable(index, { defaultValue: e.target.value }) }) }), _jsx(TableCell, { className: "w-14 text-center", children: _jsx(Checkbox, { checked: variable.share, onChange: (e) => updateVariable(index, { share: e.target.checked }), "aria-label": `Include value in export, row ${index + 1}`, title: "Include value in export" }) }), _jsx(TableCell, { className: "w-7 p-0 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeVariable(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }), _jsxs(Button, { type: "button", variant: "toolbar", className: "inline-flex items-center gap-1 self-start", onClick: addVariable, children: [_jsx(FaIcon, { icon: faPlus, className: "h-3 w-3" }), "Add variable"] })] })] }));
|
|
42
|
+
return (_jsxs("div", { className: "hc-variable-table", children: [description && (_jsx("p", { className: "hc-variable-table-description mb-3 text-[14px] text-muted", children: description })), _jsxs("div", { className: "hc-variable-table-content flex flex-col gap-1.5", children: [_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs("tr", { children: [_jsx(TableHead, { children: "Key" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { children: "Default" }), _jsx(TableHead, { className: "w-14 text-center", children: "Share" }), _jsx(TableHead, { className: "w-7 p-0 text-center" })] }) }), _jsx(TableBody, { children: variables.map((variable, index) => (_jsxs("tr", { children: [_jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.key, placeholder: "variable", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateVariable(index, { key: e.target.value }) }) }), _jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.value, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onChange: (e) => updateVariable(index, { value: e.target.value }) }) }), _jsx(TableCell, { children: _jsx(Input, { type: "text", className: "w-full", value: variable.defaultValue, placeholder: "default", "aria-label": `Default, row ${index + 1}`, onChange: (e) => updateVariable(index, { defaultValue: e.target.value }) }) }), _jsx(TableCell, { className: "w-14 text-center", children: _jsx(Checkbox, { checked: variable.share, onChange: (e) => updateVariable(index, { share: e.target.checked }), "aria-label": `Include value in export, row ${index + 1}`, title: "Include value in export" }) }), _jsx(TableCell, { className: "w-7 p-0 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeVariable(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }), _jsxs(Button, { type: "button", variant: "toolbar", className: "hc-variable-table-add inline-flex items-center gap-1 self-start", onClick: addVariable, children: [_jsx(FaIcon, { icon: faPlus, className: "h-3 w-3" }), "Add variable"] })] })] }));
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG3D,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACzE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG3D,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACzE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+BzE"}
|
|
@@ -7,5 +7,5 @@ export function Checkbox({ ref, className, ...props }) {
|
|
|
7
7
|
const wrapperClasses = className
|
|
8
8
|
? `hc-checkbox relative inline-flex h-[18px] w-[18px] shrink-0 leading-none ${className}`
|
|
9
9
|
: 'hc-checkbox relative inline-flex h-[18px] w-[18px] shrink-0 leading-none';
|
|
10
|
-
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "checkbox", className: checkboxInput
|
|
10
|
+
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "checkbox", className: `hc-checkbox-input ${checkboxInput}`, ...props }), _jsx("span", { className: `hc-checkbox-box ${checkboxBox}`, "aria-hidden": true, children: _jsx("svg", { className: "hc-checkbox-icon h-3 w-3", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M2.5 6L5 8.5L9.5 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }));
|
|
11
11
|
}
|
|
@@ -7,5 +7,5 @@ export function Radio({ ref, className, ...props }) {
|
|
|
7
7
|
const wrapperClasses = className
|
|
8
8
|
? `hc-radio relative inline-flex h-[18px] w-[18px] shrink-0 leading-none ${className}`
|
|
9
9
|
: 'hc-radio relative inline-flex h-[18px] w-[18px] shrink-0 leading-none';
|
|
10
|
-
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "radio", className: radioInput
|
|
10
|
+
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "radio", className: `hc-radio-input ${radioInput}`, ...props }), _jsx("span", { className: `hc-radio-circle ${radioCircle}`, "aria-hidden": true, children: _jsx("span", { className: `hc-radio-dot ${radioDot}` }) })] }));
|
|
11
11
|
}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HarborClient SDK component styles that cannot be expressed as Tailwind utilities
|
|
3
|
+
* in JSX (pseudo-elements, ::highlight, forced-colors overrides).
|
|
4
|
+
*
|
|
5
|
+
* Consumers must define design tokens such as `--mac-accent` before importing this
|
|
6
|
+
* sheet. HarborClient maps these in its host `styles.css` `@theme` block.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Variable token highlight color for CSS Highlight API overlays used by
|
|
11
|
+
* VariableInput and CodeEditor.
|
|
12
|
+
*/
|
|
13
|
+
::highlight(hc-variable-token) {
|
|
14
|
+
color: #32d2e2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Active footer toggles use `shadow-sm`, which sits in Tailwind utilities and
|
|
19
|
+
* overrides the base focus ring. Restore a visible ring for keyboard focus,
|
|
20
|
+
* including programmatic focus from footer Tab handoff (`:focus:not(:focus-visible)`).
|
|
21
|
+
*/
|
|
22
|
+
.hc-footer-icon:focus-visible,
|
|
23
|
+
.hc-footer-icon:focus:not(:focus-visible),
|
|
24
|
+
.hc-footer-button:focus-visible,
|
|
25
|
+
.hc-footer-button:focus:not(:focus-visible) {
|
|
26
|
+
outline: none;
|
|
27
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mac-accent) 35%, transparent);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Windows Contrast Themes and other forced-colors environments need an explicit
|
|
32
|
+
* border on primary accent buttons so they remain distinguishable from the canvas.
|
|
33
|
+
*/
|
|
34
|
+
@media (forced-colors: active) {
|
|
35
|
+
.hc-button.bg-accent {
|
|
36
|
+
border: 1px solid ButtonBorder;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harborclient/sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "TypeScript SDK for HarborClient
|
|
3
|
+
"version": "1.0.23",
|
|
4
|
+
"description": "TypeScript SDK for HarborClient development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"harborclient",
|
|
7
7
|
"plugin",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"email": "contact@harborclient.com"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
|
-
"sideEffects":
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"*.css"
|
|
27
|
+
],
|
|
26
28
|
"types": "./dist/client.d.ts",
|
|
27
29
|
"exports": {
|
|
28
30
|
".": {
|
|
@@ -136,7 +138,11 @@
|
|
|
136
138
|
"require": "./dist/eslint/index.js",
|
|
137
139
|
"default": "./dist/eslint/index.js"
|
|
138
140
|
},
|
|
139
|
-
"./tsconfig.base.json": "./tsconfig.base.json"
|
|
141
|
+
"./tsconfig.base.json": "./tsconfig.base.json",
|
|
142
|
+
"./styles.css": {
|
|
143
|
+
"types": "./dist/styles.css.d.ts",
|
|
144
|
+
"default": "./dist/styles.css"
|
|
145
|
+
}
|
|
140
146
|
},
|
|
141
147
|
"bin": {
|
|
142
148
|
"hc-plugin-sign": "./dist/signing/cli-sign.js",
|