@harborclient/sdk 1.0.29 → 1.0.30
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/dist/build/index.d.ts.map +1 -1
- package/dist/build/index.js +1 -1
- package/dist/components/AsyncListState/ErrorRetry.d.ts +21 -0
- package/dist/components/AsyncListState/ErrorRetry.d.ts.map +1 -0
- package/dist/components/AsyncListState/ErrorRetry.js +10 -0
- package/dist/components/AsyncListState/LoadingMessage.d.ts +13 -0
- package/dist/components/AsyncListState/LoadingMessage.d.ts.map +1 -0
- package/dist/components/AsyncListState/LoadingMessage.js +8 -0
- package/dist/components/AsyncListState/index.d.ts +4 -50
- package/dist/components/AsyncListState/index.d.ts.map +1 -1
- package/dist/components/AsyncListState/index.js +5 -31
- package/dist/components/Autocomplete/AutocompleteInput.d.ts +2 -4
- package/dist/components/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/components/Autocomplete/AutocompleteInput.js +2 -1
- package/dist/components/Autocomplete/SuggestionList.d.ts +3 -7
- package/dist/components/Autocomplete/SuggestionList.d.ts.map +1 -1
- package/dist/components/Autocomplete/SuggestionList.js +3 -4
- package/dist/components/BackButton/index.d.ts +3 -16
- package/dist/components/BackButton/index.d.ts.map +1 -1
- package/dist/components/BackButton/index.js +4 -10
- package/dist/components/Badge/index.d.ts +3 -11
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +3 -9
- package/dist/components/BusyIndicator/index.js +1 -1
- package/dist/components/Button/index.d.ts +2 -6
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +9 -15
- package/dist/components/Card/Body.d.ts +12 -0
- package/dist/components/Card/Body.d.ts.map +1 -0
- package/dist/components/Card/Body.js +8 -0
- package/dist/components/Card/Image.d.ts +8 -0
- package/dist/components/Card/Image.d.ts.map +1 -0
- package/dist/components/Card/Image.js +8 -0
- package/dist/components/Card/index.d.ts +16 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.js +13 -0
- package/dist/components/CodeEditor/index.d.ts +3 -7
- package/dist/components/CodeEditor/index.d.ts.map +1 -1
- package/dist/components/CodeEditor/index.js +5 -50
- package/dist/components/CodeEditor/renderHighlightedPlaceholder.d.ts.map +1 -1
- package/dist/components/CodeEditor/slashCommandHighlighter.d.ts.map +1 -1
- package/dist/components/CodeEditor/syntaxHighlightedPlaceholder.d.ts.map +1 -1
- package/dist/components/EmptyState/index.d.ts +3 -11
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +3 -9
- package/dist/components/FaIcon/index.d.ts +3 -10
- package/dist/components/FaIcon/index.d.ts.map +1 -1
- package/dist/components/FaIcon/index.js +5 -4
- package/dist/components/FieldError/index.d.ts +3 -17
- package/dist/components/FieldError/index.d.ts.map +1 -1
- package/dist/components/FieldError/index.js +3 -11
- package/dist/components/FooterButton/index.d.ts +3 -11
- package/dist/components/FooterButton/index.d.ts.map +1 -1
- package/dist/components/FooterButton/index.js +3 -7
- package/dist/components/FooterIcon/index.d.ts +3 -11
- package/dist/components/FooterIcon/index.d.ts.map +1 -1
- package/dist/components/FooterIcon/index.js +3 -7
- package/dist/components/FormDataEditor/index.d.ts +0 -2
- package/dist/components/FormDataEditor/index.d.ts.map +1 -1
- package/dist/components/FormDataEditor/index.js +2 -12
- package/dist/components/FormGroup/index.d.ts +3 -16
- package/dist/components/FormGroup/index.d.ts.map +1 -1
- package/dist/components/FormGroup/index.js +4 -20
- package/dist/components/KeyValueEditor/index.d.ts +0 -2
- package/dist/components/KeyValueEditor/index.d.ts.map +1 -1
- package/dist/components/KeyValueEditor/index.js +1 -8
- package/dist/components/MethodSelect/index.d.ts +3 -5
- package/dist/components/MethodSelect/index.d.ts.map +1 -1
- package/dist/components/MethodSelect/index.js +3 -2
- package/dist/components/Modal/ModalFooter.d.ts +3 -11
- package/dist/components/Modal/ModalFooter.d.ts.map +1 -1
- package/dist/components/Modal/ModalFooter.js +3 -10
- package/dist/components/Modal/ModalFormLayout.d.ts +0 -5
- package/dist/components/Modal/ModalFormLayout.d.ts.map +1 -1
- package/dist/components/Modal/ModalFormLayout.js +0 -5
- package/dist/components/Modal/ModalHeader.d.ts +3 -3
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.js +3 -2
- package/dist/components/Modal/index.d.ts +3 -3
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +6 -7
- package/dist/components/OverlayCloseButton/index.d.ts +3 -11
- package/dist/components/OverlayCloseButton/index.d.ts.map +1 -1
- package/dist/components/OverlayCloseButton/index.js +3 -9
- package/dist/components/Page/index.d.ts +3 -3
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/index.js +4 -7
- package/dist/components/PageHeader/index.d.ts +3 -7
- package/dist/components/PageHeader/index.d.ts.map +1 -1
- package/dist/components/PageHeader/index.js +3 -5
- package/dist/components/PageSidebar/index.d.ts +3 -5
- package/dist/components/PageSidebar/index.d.ts.map +1 -1
- package/dist/components/PageSidebar/index.js +4 -5
- package/dist/components/PanelCloseButton/index.d.ts +5 -14
- package/dist/components/PanelCloseButton/index.d.ts.map +1 -1
- package/dist/components/PanelCloseButton/index.js +4 -12
- package/dist/components/Resizable/Resizable.d.ts +3 -3
- package/dist/components/Resizable/Resizable.d.ts.map +1 -1
- package/dist/components/Resizable/Resizable.js +6 -5
- package/dist/components/Resizable/ResizeHandle.d.ts +3 -7
- package/dist/components/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/components/Resizable/ResizeHandle.js +4 -10
- package/dist/components/ResourceList/ResourceListEmptyItem.d.ts +13 -0
- package/dist/components/ResourceList/ResourceListEmptyItem.d.ts.map +1 -0
- package/dist/components/ResourceList/ResourceListEmptyItem.js +8 -0
- package/dist/components/ResourceList/ResourceListPrimary.d.ts +13 -0
- package/dist/components/ResourceList/ResourceListPrimary.d.ts.map +1 -0
- package/dist/components/ResourceList/ResourceListPrimary.js +8 -0
- package/dist/components/ResourceList/ResourceListRow.d.ts +29 -0
- package/dist/components/ResourceList/ResourceListRow.d.ts.map +1 -0
- package/dist/components/ResourceList/ResourceListRow.js +8 -0
- package/dist/components/ResourceList/index.d.ts +6 -74
- package/dist/components/ResourceList/index.d.ts.map +1 -1
- package/dist/components/ResourceList/index.js +7 -42
- package/dist/components/RowActionsMenu/index.d.ts +3 -5
- package/dist/components/RowActionsMenu/index.d.ts.map +1 -1
- package/dist/components/RowActionsMenu/index.js +6 -16
- package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts +3 -7
- package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts.map +1 -1
- package/dist/components/SegmentedTabs/SegmentedTabPanel.js +3 -4
- package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts +0 -2
- package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts.map +1 -1
- package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts +0 -2
- package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts.map +1 -1
- package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.js +5 -13
- package/dist/components/SegmentedTabs/index.d.ts +3 -7
- package/dist/components/SegmentedTabs/index.d.ts.map +1 -1
- package/dist/components/SegmentedTabs/index.js +7 -28
- package/dist/components/SidebarLayout/index.d.ts +3 -7
- package/dist/components/SidebarLayout/index.d.ts.map +1 -1
- package/dist/components/SidebarLayout/index.js +3 -5
- package/dist/components/Spinner/index.d.ts +3 -11
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.js +3 -9
- package/dist/components/StatusMessage/index.d.ts +3 -15
- package/dist/components/StatusMessage/index.d.ts.map +1 -1
- package/dist/components/StatusMessage/index.js +3 -8
- package/dist/components/TabCloseButton/index.d.ts +4 -14
- package/dist/components/TabCloseButton/index.d.ts.map +1 -1
- package/dist/components/TabCloseButton/index.js +3 -7
- package/dist/components/Table/TableBody.d.ts +13 -0
- package/dist/components/Table/TableBody.d.ts.map +1 -0
- package/dist/components/Table/TableBody.js +11 -0
- package/dist/components/Table/TableCell.d.ts +8 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -0
- package/dist/components/Table/TableCell.js +11 -0
- package/dist/components/Table/TableContext.d.ts +22 -0
- package/dist/components/Table/TableContext.d.ts.map +1 -0
- package/dist/components/Table/TableContext.js +18 -0
- package/dist/components/Table/TableHead.d.ts +8 -0
- package/dist/components/Table/TableHead.d.ts.map +1 -0
- package/dist/components/Table/TableHead.js +11 -0
- package/dist/components/Table/TableHeader.d.ts +13 -0
- package/dist/components/Table/TableHeader.d.ts.map +1 -0
- package/dist/components/Table/TableHeader.js +8 -0
- package/dist/components/Table/index.d.ts +10 -86
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +17 -94
- package/dist/components/Toolbar/index.d.ts +3 -11
- package/dist/components/Toolbar/index.d.ts.map +1 -1
- package/dist/components/Toolbar/index.js +3 -11
- package/dist/components/VariableInput/index.d.ts +3 -5
- package/dist/components/VariableInput/index.d.ts.map +1 -1
- package/dist/components/VariableInput/index.js +6 -17
- package/dist/components/VariableTable/index.d.ts +3 -3
- package/dist/components/VariableTable/index.d.ts.map +1 -1
- package/dist/components/VariableTable/index.js +5 -9
- package/dist/components/forms/Checkbox.d.ts +2 -2
- package/dist/components/forms/Checkbox.d.ts.map +1 -1
- package/dist/components/forms/Checkbox.js +2 -4
- package/dist/components/forms/Input.d.ts +2 -2
- package/dist/components/forms/Input.d.ts.map +1 -1
- package/dist/components/forms/Radio.d.ts +2 -2
- package/dist/components/forms/Radio.d.ts.map +1 -1
- package/dist/components/forms/Radio.js +2 -4
- package/dist/components/forms/Select.d.ts +2 -2
- package/dist/components/forms/Select.d.ts.map +1 -1
- package/dist/components/forms/Textarea.d.ts +2 -2
- package/dist/components/forms/Textarea.d.ts.map +1 -1
- package/dist/components/forms/classes.d.ts +0 -3
- package/dist/components/forms/classes.d.ts.map +1 -1
- package/dist/components/forms/classes.js +3 -9
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/utils.d.ts +8 -0
- package/dist/components/utils.d.ts.map +1 -1
- package/dist/components/utils.js +11 -0
- package/dist/runtime/createBridgedPluginContext.js +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/react.d.ts +2 -2
- package/dist/runtime/view-host/index.js +1 -1
- package/dist/runtime/viewHost.js +1 -1
- package/dist/signing/inventory.js +1 -1
- package/package.json +7 -3
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
|
|
2
2
|
import { FaIcon } from '../FaIcon/index.js';
|
|
3
|
+
import { cn } from '../utils.js';
|
|
3
4
|
/**
|
|
4
5
|
* Full-bleed page header with a bordered bottom edge, title block on the left,
|
|
5
6
|
* and optional action controls on the right.
|
|
6
7
|
*/
|
|
7
|
-
export function PageHeader({ title, description, icon, children, className }) {
|
|
8
|
-
|
|
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
|
-
: '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: "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] }));
|
|
8
|
+
export function PageHeader({ title, description, icon, children, className, ...props }) {
|
|
9
|
+
return (_jsxs("div", { ...props, className: cn('hc-page-header -mx-6 mb-4 flex flex-wrap items-center gap-2 border-b border-separator px-6 py-4', className), 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-[24px] leading-[1.15] font-bold 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] leading-none text-muted", children: description })) : null] }), children ? (_jsx("div", { className: "hc-page-header-actions flex flex-wrap items-center gap-2", children: children })) : null] }));
|
|
12
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
-
import type { JSX } from 'react';
|
|
2
|
+
import type { ComponentPropsWithoutRef, JSX } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* One entry in a {@link PageSidebar} navigation list.
|
|
5
5
|
*/
|
|
@@ -17,7 +17,7 @@ export interface PageSidebarItem<T extends string = string> {
|
|
|
17
17
|
*/
|
|
18
18
|
icon?: IconDefinition;
|
|
19
19
|
}
|
|
20
|
-
interface Props<T extends string> {
|
|
20
|
+
interface Props<T extends string> extends Omit<ComponentPropsWithoutRef<'nav'>, 'aria-label' | 'onSelect'> {
|
|
21
21
|
/**
|
|
22
22
|
* Navigation entries to render in the sidebar.
|
|
23
23
|
*/
|
|
@@ -28,8 +28,6 @@ interface Props<T extends string> {
|
|
|
28
28
|
selected: T;
|
|
29
29
|
/**
|
|
30
30
|
* Called when the user selects a different section.
|
|
31
|
-
*
|
|
32
|
-
* @param value - Newly selected section value.
|
|
33
31
|
*/
|
|
34
32
|
onSelect: (value: T) => void;
|
|
35
33
|
/**
|
|
@@ -40,6 +38,6 @@ interface Props<T extends string> {
|
|
|
40
38
|
/**
|
|
41
39
|
* Narrow sidebar navigation for multi-section pages such as settings overlays.
|
|
42
40
|
*/
|
|
43
|
-
export declare function PageSidebar<T extends string>({ items, selected, onSelect, ariaLabel }: Props<T>): JSX.Element;
|
|
41
|
+
export declare function PageSidebar<T extends string>({ items, selected, onSelect, ariaLabel, className, ...props }: Props<T>): JSX.Element;
|
|
44
42
|
export {};
|
|
45
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;
|
|
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,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAI3D;;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,CAAE,SAAQ,IAAI,CAC5C,wBAAwB,CAAC,KAAK,CAAC,EAC/B,YAAY,GAAG,UAAU,CAC1B;IACC;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAWD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EAC5C,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA4CxB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
|
|
2
2
|
import { FaIcon } from '../FaIcon/index.js';
|
|
3
|
+
import { cn } from '../utils.js';
|
|
3
4
|
/**
|
|
4
5
|
* Tailwind classes for a sidebar navigation row.
|
|
5
|
-
*
|
|
6
|
-
* @param active - Whether this row is the current selection.
|
|
7
6
|
*/
|
|
8
7
|
function sidebarRow(active) {
|
|
9
8
|
return active
|
|
@@ -13,12 +12,12 @@ function sidebarRow(active) {
|
|
|
13
12
|
/**
|
|
14
13
|
* Narrow sidebar navigation for multi-section pages such as settings overlays.
|
|
15
14
|
*/
|
|
16
|
-
export function PageSidebar({ items, selected, onSelect, ariaLabel }) {
|
|
17
|
-
return (_jsx("nav", { className:
|
|
15
|
+
export function PageSidebar({ items, selected, onSelect, ariaLabel, className, ...props }) {
|
|
16
|
+
return (_jsx("nav", { ...props, className: cn('hc-page-sidebar flex w-[180px] shrink-0 flex-col gap-1 border-r border-separator bg-sidebar px-2 py-3', className), "aria-label": ariaLabel, children: items.map((item) => {
|
|
18
17
|
const active = selected === item.value;
|
|
19
18
|
const rowClass = item.icon
|
|
20
19
|
? `hc-page-sidebar-item ${sidebarRow(active)} w-full gap-2 border-none text-left text-[15px] app-no-drag`
|
|
21
20
|
: `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:
|
|
21
|
+
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: cn('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
22
|
}) }));
|
|
24
23
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type { JSX } from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
/**
|
|
4
|
-
* Called when the user closes the panel or overlay.
|
|
5
|
-
*/
|
|
6
|
-
onClose: () => void;
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX } from 'react';
|
|
2
|
+
interface Props extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'aria-label'> {
|
|
7
3
|
/**
|
|
8
4
|
* Default accessible name when `ariaLabel` is not provided.
|
|
9
5
|
*/
|
|
@@ -13,18 +9,13 @@ interface Props {
|
|
|
13
9
|
*/
|
|
14
10
|
ariaLabel?: string;
|
|
15
11
|
/**
|
|
16
|
-
*
|
|
12
|
+
* Called when the user closes the panel or overlay.
|
|
17
13
|
*/
|
|
18
|
-
|
|
14
|
+
onClose: () => void;
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
21
17
|
* Secondary icon close control for settings headers and full-page panels.
|
|
22
|
-
*
|
|
23
|
-
* @param onClose - Close handler.
|
|
24
|
-
* @param label - Default accessible name; defaults to "Close".
|
|
25
|
-
* @param ariaLabel - Accessible name override.
|
|
26
|
-
* @param className - Extra classes appended after the layout preset.
|
|
27
18
|
*/
|
|
28
|
-
export declare function PanelCloseButton({ onClose, label, ariaLabel, className }: Props): JSX.Element;
|
|
19
|
+
export declare function PanelCloseButton({ onClose, label, ariaLabel, className, ...props }: Props): JSX.Element;
|
|
29
20
|
export {};
|
|
30
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PanelCloseButton/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PanelCloseButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK3D,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACzF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAe,EACf,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAgBrB"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
2
3
|
import { Button } from '../Button/index.js';
|
|
3
4
|
import { FaIcon } from '../FaIcon/index.js';
|
|
4
|
-
import {
|
|
5
|
+
import { cn } from '../utils.js';
|
|
5
6
|
/**
|
|
6
7
|
* Secondary icon close control for settings headers and full-page panels.
|
|
7
|
-
*
|
|
8
|
-
* @param onClose - Close handler.
|
|
9
|
-
* @param label - Default accessible name; defaults to "Close".
|
|
10
|
-
* @param ariaLabel - Accessible name override.
|
|
11
|
-
* @param className - Extra classes appended after the layout preset.
|
|
12
8
|
*/
|
|
13
|
-
export function PanelCloseButton({ onClose, label = 'Close', ariaLabel, className }) {
|
|
14
|
-
|
|
15
|
-
const classes = className
|
|
16
|
-
? `hc-panel-close-button ${base} ${className}`
|
|
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: "hc-panel-close-button-icon h-4 w-4" }) }));
|
|
9
|
+
export function PanelCloseButton({ onClose, label = 'Close', ariaLabel, className, ...props }) {
|
|
10
|
+
return (_jsx(Button, { ...props, type: "button", variant: "secondary", className: cn('hc-panel-close-button inline-flex shrink-0 items-center justify-center py-2', className), "aria-label": ariaLabel ?? label, onClick: onClose, children: _jsx(FaIcon, { icon: faXmark, className: "hc-panel-close-button-icon h-4 w-4" }) }));
|
|
19
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JSX, ReactNode } from 'react';
|
|
2
|
-
interface Props {
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
|
|
2
|
+
interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'id' | 'title'> {
|
|
3
3
|
/**
|
|
4
4
|
* Root element id used by footer toggles via aria-controls.
|
|
5
5
|
*/
|
|
@@ -43,6 +43,6 @@ interface Props {
|
|
|
43
43
|
* Encapsulates resize handle wiring, height persistence, open/close animation,
|
|
44
44
|
* and close affordance shared by Console, Variables, and plugin footer panels.
|
|
45
45
|
*/
|
|
46
|
-
export declare function Resizable({ id, open, onClose, closeLabel, storageKey, title, headerless, unmountWhenClosed, children }: Props): JSX.Element;
|
|
46
|
+
export declare function Resizable({ id, open, onClose, closeLabel, storageKey, title, headerless, unmountWhenClosed, children, className, ...props }: Props): JSX.Element;
|
|
47
47
|
export {};
|
|
48
48
|
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/Resizable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/Resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAatE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC;IACxF;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,IAAI,EACJ,OAAO,EACP,UAAU,EACV,UAAU,EACV,KAAK,EACL,UAAkB,EAClB,iBAAyB,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAqFrB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
2
3
|
import { useCallback, useRef } from '@harborclient/sdk/react';
|
|
3
4
|
import { FaIcon } from '../FaIcon/index.js';
|
|
4
|
-
import {
|
|
5
|
-
import { DEFAULT_HEIGHT, MIN_HEIGHT, footerPanelClassName, footerPanelCloseButtonClassName, getFooterPanelMaxSize } from './footerPanelUtils';
|
|
5
|
+
import { cn } from '../utils.js';
|
|
6
6
|
import { ResizeHandle } from './ResizeHandle.js';
|
|
7
|
+
import { DEFAULT_HEIGHT, MIN_HEIGHT, footerPanelClassName, footerPanelCloseButtonClassName, getFooterPanelMaxSize } from './footerPanelUtils';
|
|
7
8
|
import { useResizable } from './useResizable.js';
|
|
8
9
|
/**
|
|
9
10
|
* Slide-up, resizable footer panel shell with optional header bar.
|
|
@@ -11,7 +12,7 @@ import { useResizable } from './useResizable.js';
|
|
|
11
12
|
* Encapsulates resize handle wiring, height persistence, open/close animation,
|
|
12
13
|
* and close affordance shared by Console, Variables, and plugin footer panels.
|
|
13
14
|
*/
|
|
14
|
-
export function Resizable({ id, open, onClose, closeLabel, storageKey, title, headerless = false, unmountWhenClosed = false, children }) {
|
|
15
|
+
export function Resizable({ id, open, onClose, closeLabel, storageKey, title, headerless = false, unmountWhenClosed = false, children, className, ...props }) {
|
|
15
16
|
const containerRef = useRef(null);
|
|
16
17
|
/**
|
|
17
18
|
* Keeps max-size measurement stable across re-renders so useResizable
|
|
@@ -26,7 +27,7 @@ export function Resizable({ id, open, onClose, closeLabel, storageKey, title, he
|
|
|
26
27
|
getMaxSize,
|
|
27
28
|
storageKey
|
|
28
29
|
});
|
|
29
|
-
const closeButton = (_jsx("button", { type: "button", className:
|
|
30
|
+
const closeButton = (_jsx("button", { type: "button", className: cn('hc-resizable-close', footerPanelCloseButtonClassName), onClick: onClose, "aria-label": `Close ${closeLabel}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }));
|
|
30
31
|
const body = unmountWhenClosed && !open ? null : children;
|
|
31
|
-
return (_jsxs("div", { ref: containerRef, id: id, className:
|
|
32
|
+
return (_jsxs("div", { ref: containerRef, ...props, id: id, className: cn('hc-resizable', footerPanelClassName(open), className), 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: cn('hc-resizable-headerless-close absolute top-2 right-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
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JSX, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
-
interface Props {
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'aria-label' | 'aria-valuenow' | 'aria-valuemin' | 'aria-valuemax'> {
|
|
3
3
|
/**
|
|
4
4
|
* Handle orientation: horizontal resizes height, vertical resizes width.
|
|
5
5
|
*/
|
|
@@ -28,14 +28,10 @@ interface Props {
|
|
|
28
28
|
* Accessible label for the separator.
|
|
29
29
|
*/
|
|
30
30
|
ariaLabel: string;
|
|
31
|
-
/**
|
|
32
|
-
* Optional additional classes for the handle container.
|
|
33
|
-
*/
|
|
34
|
-
className?: string;
|
|
35
31
|
}
|
|
36
32
|
/**
|
|
37
33
|
* Draggable separator handle for resizable panels.
|
|
38
34
|
*/
|
|
39
|
-
export declare function ResizeHandle({ orientation, value, min, max, onResizeStart, onKeyboardResize, ariaLabel, className }: Props): JSX.Element;
|
|
35
|
+
export declare function ResizeHandle({ orientation, value, min, max, onResizeStart, onKeyboardResize, ariaLabel, className, ...props }: Props): JSX.Element;
|
|
40
36
|
export {};
|
|
41
37
|
//# sourceMappingURL=ResizeHandle.d.ts.map
|
|
@@ -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,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/ResizeHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,GAAG,EACH,aAAa,IAAI,kBAAkB,EACnC,UAAU,IAAI,eAAe,EAC9B,MAAM,OAAO,CAAC;AAGf,UAAU,KAAM,SAAQ,IAAI,CAC1B,wBAAwB,CAAC,KAAK,CAAC,EAC/B,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,CAChF;IACC;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IAEvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,WAAW,EACX,KAAK,EACL,GAAG,EACH,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAiCrB"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils.js';
|
|
2
3
|
/**
|
|
3
4
|
* Draggable separator handle for resizable panels.
|
|
4
5
|
*/
|
|
5
|
-
export function ResizeHandle({ orientation, value, min, max, onResizeStart, onKeyboardResize, ariaLabel, className }) {
|
|
6
|
+
export function ResizeHandle({ orientation, value, min, max, onResizeStart, onKeyboardResize, ariaLabel, className, ...props }) {
|
|
6
7
|
const isHorizontal = orientation === 'horizontal';
|
|
7
|
-
|
|
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
|
-
isHorizontal
|
|
8
|
+
return (_jsx("div", { ...props, role: "separator", tabIndex: 0, className: cn('hc-resize-handle font-inherit app-no-drag m-0 flex shrink-0 items-center justify-center bg-control p-0 text-inherit hover:bg-selection/60', isHorizontal
|
|
10
9
|
? 'h-1.5 w-full cursor-row-resize border-b border-separator'
|
|
11
|
-
: 'h-full w-1.5 cursor-col-resize border-r border-separator',
|
|
12
|
-
className
|
|
13
|
-
]
|
|
14
|
-
.filter(Boolean)
|
|
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
|
|
10
|
+
: 'h-full w-1.5 cursor-col-resize border-r border-separator', className), 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
11
|
? 'hc-resize-handle-grip h-0.5 w-8 rounded-full bg-muted/50'
|
|
18
12
|
: 'hc-resize-handle-grip h-8 w-0.5 rounded-full bg-muted/50', "aria-hidden": true }) }));
|
|
19
13
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
|
|
2
|
+
interface Props extends ComponentPropsWithoutRef<'li'> {
|
|
3
|
+
/**
|
|
4
|
+
* Empty-state message content.
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Inline empty-state row rendered inside a {@link ResourceList}.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ResourceListEmptyItem({ children, className, ...props }: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ResourceListEmptyItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceListEmptyItem.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceList/ResourceListEmptyItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,UAAU,KAAM,SAAQ,wBAAwB,CAAC,IAAI,CAAC;IACpD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAM3F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Inline empty-state row rendered inside a {@link ResourceList}.
|
|
5
|
+
*/
|
|
6
|
+
export function ResourceListEmptyItem({ children, className, ...props }) {
|
|
7
|
+
return (_jsx("li", { ...props, className: cn('hc-resource-list-empty-item text-[14px] text-muted', className), children: children }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
|
|
2
|
+
interface Props extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Primary title content.
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Primary title styling for {@link ResourceListRow}.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ResourceListPrimary({ children, className, ...props }: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ResourceListPrimary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceListPrimary.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceList/ResourceListPrimary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,UAAU,KAAM,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACrD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAYzF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Primary title styling for {@link ResourceListRow}.
|
|
5
|
+
*/
|
|
6
|
+
export function ResourceListPrimary({ children, className, ...props }) {
|
|
7
|
+
return (_jsx("div", { ...props, className: cn('hc-resource-list-primary truncate text-[14px] font-medium text-text', className), children: children }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
|
|
2
|
+
interface Props extends Omit<ComponentPropsWithoutRef<'li'>, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* Primary title or name for the resource.
|
|
5
|
+
*/
|
|
6
|
+
primary: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional secondary line such as a URL or identifier.
|
|
9
|
+
*/
|
|
10
|
+
secondary?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Optional metadata rendered below primary/secondary content, e.g. badges.
|
|
13
|
+
*/
|
|
14
|
+
meta?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Trailing action buttons or menus.
|
|
17
|
+
*/
|
|
18
|
+
actions?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* When true, allows primary content and actions to wrap on narrow widths.
|
|
21
|
+
*/
|
|
22
|
+
wrap?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Bordered list row with primary text, optional secondary line, metadata, and actions.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ResourceListRow({ primary, secondary, meta, actions, wrap, className, ...props }: Props): JSX.Element;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=ResourceListRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceListRow.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceList/ResourceListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IACtE;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,OAAO,EACP,IAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA0BrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Bordered list row with primary text, optional secondary line, metadata, and actions.
|
|
5
|
+
*/
|
|
6
|
+
export function ResourceListRow({ primary, secondary, meta, actions, wrap = false, className, ...props }) {
|
|
7
|
+
return (_jsxs("li", { ...props, className: cn('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)]', wrap && 'flex-wrap', className), 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] }));
|
|
8
|
+
}
|
|
@@ -1,83 +1,15 @@
|
|
|
1
|
-
import type { JSX, ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
|
|
2
|
+
export { ResourceListEmptyItem } from './ResourceListEmptyItem.js';
|
|
3
|
+
export { ResourceListPrimary } from './ResourceListPrimary.js';
|
|
4
|
+
export { ResourceListRow } from './ResourceListRow.js';
|
|
5
|
+
interface Props extends ComponentPropsWithoutRef<'ul'> {
|
|
3
6
|
/**
|
|
4
7
|
* List row elements, typically {@link ResourceListRow} items.
|
|
5
8
|
*/
|
|
6
9
|
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional Tailwind classes merged onto the list element.
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Accessible name when no visible heading labels the list.
|
|
13
|
-
*/
|
|
14
|
-
'aria-label'?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Id of the element that labels this list when using a visible heading.
|
|
17
|
-
*/
|
|
18
|
-
'aria-labelledby'?: string;
|
|
19
10
|
}
|
|
20
11
|
/**
|
|
21
12
|
* Vertical list shell used for bordered resource rows in settings and Team Hub.
|
|
22
|
-
*
|
|
23
|
-
* @param children - List item elements.
|
|
24
|
-
* @param className - Extra classes appended after the layout preset.
|
|
25
|
-
* @param aria-label - Accessible name when surrounding context does not name the list.
|
|
26
|
-
* @param aria-labelledby - Id of a visible heading that names the list.
|
|
27
13
|
*/
|
|
28
|
-
export declare function ResourceList({ children, className,
|
|
29
|
-
interface ResourceListRowProps {
|
|
30
|
-
/**
|
|
31
|
-
* Primary title or name for the resource.
|
|
32
|
-
*/
|
|
33
|
-
primary: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Optional secondary line such as a URL or identifier.
|
|
36
|
-
*/
|
|
37
|
-
secondary?: ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Optional metadata rendered below primary/secondary content, e.g. badges.
|
|
40
|
-
*/
|
|
41
|
-
meta?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Trailing action buttons or menus.
|
|
44
|
-
*/
|
|
45
|
-
actions?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* When true, allows primary content and actions to wrap on narrow widths.
|
|
48
|
-
*/
|
|
49
|
-
wrap?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Additional Tailwind classes merged onto the row element.
|
|
52
|
-
*/
|
|
53
|
-
className?: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Bordered list row with primary text, optional secondary line, metadata, and actions.
|
|
57
|
-
*
|
|
58
|
-
* @param primary - Main label for the resource.
|
|
59
|
-
* @param secondary - Optional muted secondary line.
|
|
60
|
-
* @param meta - Optional content below the title block.
|
|
61
|
-
* @param actions - Trailing controls aligned to the row end.
|
|
62
|
-
* @param wrap - Whether the row uses flex-wrap for narrow layouts.
|
|
63
|
-
* @param className - Extra classes appended after the layout preset.
|
|
64
|
-
*/
|
|
65
|
-
export declare function ResourceListRow({ primary, secondary, meta, actions, wrap, className }: ResourceListRowProps): JSX.Element;
|
|
66
|
-
/**
|
|
67
|
-
* Primary title styling for {@link ResourceListRow}.
|
|
68
|
-
*
|
|
69
|
-
* @param children - Title content.
|
|
70
|
-
*/
|
|
71
|
-
export declare function ResourceListPrimary({ children }: {
|
|
72
|
-
children: ReactNode;
|
|
73
|
-
}): JSX.Element;
|
|
74
|
-
/**
|
|
75
|
-
* Inline empty-state row rendered inside a {@link ResourceList}.
|
|
76
|
-
*
|
|
77
|
-
* @param children - Empty message content.
|
|
78
|
-
*/
|
|
79
|
-
export declare function ResourceListEmptyItem({ children }: {
|
|
80
|
-
children: ReactNode;
|
|
81
|
-
}): JSX.Element;
|
|
82
|
-
export {};
|
|
14
|
+
export declare function ResourceList({ children, className, ...props }: Props): JSX.Element;
|
|
83
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,KAAM,SAAQ,wBAAwB,CAAC,IAAI,CAAC;IACpD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CASlF"}
|
|
@@ -1,46 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils.js';
|
|
3
|
+
export { ResourceListEmptyItem } from './ResourceListEmptyItem.js';
|
|
4
|
+
export { ResourceListPrimary } from './ResourceListPrimary.js';
|
|
5
|
+
export { ResourceListRow } from './ResourceListRow.js';
|
|
2
6
|
/**
|
|
3
7
|
* Vertical list shell used for bordered resource rows in settings and Team Hub.
|
|
4
|
-
*
|
|
5
|
-
* @param children - List item elements.
|
|
6
|
-
* @param className - Extra classes appended after the layout preset.
|
|
7
|
-
* @param aria-label - Accessible name when surrounding context does not name the list.
|
|
8
|
-
* @param aria-labelledby - Id of a visible heading that names the list.
|
|
9
8
|
*/
|
|
10
|
-
export function ResourceList({ children, className,
|
|
11
|
-
|
|
12
|
-
const classes = className ? `${base} ${className}` : base;
|
|
13
|
-
return (_jsx("ul", { className: classes, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children: children }));
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Bordered list row with primary text, optional secondary line, metadata, and actions.
|
|
17
|
-
*
|
|
18
|
-
* @param primary - Main label for the resource.
|
|
19
|
-
* @param secondary - Optional muted secondary line.
|
|
20
|
-
* @param meta - Optional content below the title block.
|
|
21
|
-
* @param actions - Trailing controls aligned to the row end.
|
|
22
|
-
* @param wrap - Whether the row uses flex-wrap for narrow layouts.
|
|
23
|
-
* @param className - Extra classes appended after the layout preset.
|
|
24
|
-
*/
|
|
25
|
-
export function ResourceListRow({ primary, secondary, meta, actions, wrap = false, className }) {
|
|
26
|
-
const wrapClass = wrap ? 'flex-wrap' : '';
|
|
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
|
-
const classes = className ? `${base} ${className}` : base;
|
|
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
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Primary title styling for {@link ResourceListRow}.
|
|
33
|
-
*
|
|
34
|
-
* @param children - Title content.
|
|
35
|
-
*/
|
|
36
|
-
export function ResourceListPrimary({ children }) {
|
|
37
|
-
return (_jsx("div", { className: "hc-resource-list-primary truncate text-[14px] font-medium text-text", children: children }));
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Inline empty-state row rendered inside a {@link ResourceList}.
|
|
41
|
-
*
|
|
42
|
-
* @param children - Empty message content.
|
|
43
|
-
*/
|
|
44
|
-
export function ResourceListEmptyItem({ children }) {
|
|
45
|
-
return _jsx("li", { className: "hc-resource-list-empty-item text-[14px] text-muted", children: children });
|
|
9
|
+
export function ResourceList({ children, className, ...props }) {
|
|
10
|
+
return (_jsx("ul", { ...props, className: cn('hc-resource-list m-0 flex list-none flex-col gap-[10px] p-0', className), children: children }));
|
|
46
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { JSX } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX } from 'react';
|
|
2
2
|
export type MenuItem = {
|
|
3
3
|
label: string;
|
|
4
4
|
onSelect: () => void;
|
|
5
5
|
variant?: 'default' | 'danger';
|
|
6
6
|
};
|
|
7
|
-
interface Props {
|
|
7
|
+
interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
8
8
|
/**
|
|
9
9
|
* Grouped menu entries shown when the trigger is open. Each inner array is
|
|
10
10
|
* one visual group separated by a divider line.
|
|
@@ -20,14 +20,12 @@ interface Props {
|
|
|
20
20
|
openMenuId: string | null;
|
|
21
21
|
/**
|
|
22
22
|
* Called when the user opens or closes a menu.
|
|
23
|
-
*
|
|
24
|
-
* @param id - Open menu id, or null to close.
|
|
25
23
|
*/
|
|
26
24
|
onOpenChange: (id: string | null) => void;
|
|
27
25
|
}
|
|
28
26
|
/**
|
|
29
27
|
* Hamburger-triggered dropdown for row-level actions (rename, delete, etc.).
|
|
30
28
|
*/
|
|
31
|
-
export declare function RowActionsMenu({ groups, menuId, openMenuId, onOpenChange }: Props): JSX.Element;
|
|
29
|
+
export declare function RowActionsMenu({ groups, menuId, openMenuId, onOpenChange, className, ...props }: Props): JSX.Element;
|
|
32
30
|
export {};
|
|
33
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RowActionsMenu/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RowActionsMenu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAK1E,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,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACvE;;;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;;OAEG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAgBD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,UAAU,EACV,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAgPrB"}
|