@k2b/ui 0.1.0-rc.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/actions/Button.d.ts +38 -0
- package/dist/types/actions/ContextMenu.d.ts +17 -0
- package/dist/types/actions/CopyButton.d.ts +20 -0
- package/dist/types/actions/Disclosure.d.ts +15 -0
- package/dist/types/actions/Dropdown.d.ts +100 -0
- package/dist/types/actions/FilterChip.d.ts +27 -0
- package/dist/types/actions/RemoveButton.d.ts +7 -0
- package/dist/types/actions/SegmentedControl.d.ts +20 -0
- package/dist/types/actions/SplitButton.d.ts +13 -0
- package/dist/types/actions/SpotlightSearch.d.ts +25 -0
- package/dist/types/actions/Tabs.d.ts +27 -0
- package/dist/types/actions/Toolbar.d.ts +23 -0
- package/dist/types/actions/index.d.ts +24 -0
- package/dist/types/chat/ChatComposer.d.ts +57 -0
- package/dist/types/chat/ChatPrimitives.d.ts +48 -0
- package/dist/types/chat/ChatRoot.d.ts +7 -0
- package/dist/types/chat/ChatTimeline.d.ts +52 -0
- package/dist/types/chat/chat-behavior.d.ts +29 -0
- package/dist/types/chat/index.d.ts +21 -0
- package/dist/types/chat/types.d.ts +62 -0
- package/dist/types/content/Calendar.d.ts +115 -0
- package/dist/types/content/Chart.d.ts +90 -0
- package/dist/types/content/CodeDisplay.d.ts +11 -0
- package/dist/types/content/DataTable.d.ts +113 -0
- package/dist/types/content/Docs.d.ts +52 -0
- package/dist/types/content/FileBrowser.d.ts +40 -0
- package/dist/types/content/FileTree.d.ts +29 -0
- package/dist/types/content/FileView.d.ts +59 -0
- package/dist/types/content/Lightbox.d.ts +16 -0
- package/dist/types/content/LogEntriesTable.d.ts +14 -0
- package/dist/types/content/MarkdownView.d.ts +46 -0
- package/dist/types/content/Pagination.d.ts +10 -0
- package/dist/types/content/PdfPreview.d.ts +11 -0
- package/dist/types/content/RangePicker.d.ts +29 -0
- package/dist/types/content/StructuredDataPreview.d.ts +20 -0
- package/dist/types/content/calendar-event-layout.d.ts +16 -0
- package/dist/types/content/calendar-pointer.d.ts +22 -0
- package/dist/types/content/chart-map-viewport.d.ts +5 -0
- package/dist/types/content/chart-state-timeline.d.ts +42 -0
- package/dist/types/content/code-highlight.d.ts +14 -0
- package/dist/types/content/file-tree.d.ts +41 -0
- package/dist/types/content/file-view-preview.d.ts +22 -0
- package/dist/types/content/index.d.ts +26 -0
- package/dist/types/feedback/InlineGuidance.d.ts +10 -0
- package/dist/types/feedback/Tooltip.d.ts +18 -0
- package/dist/types/feedback/dialog-core.d.ts +19 -0
- package/dist/types/feedback/index.d.ts +10 -0
- package/dist/types/feedback/prompts.d.ts +164 -0
- package/dist/types/feedback/toast.d.ts +25 -0
- package/dist/types/feedback/tooltip-position.d.ts +2 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/inputs/AutocompleteEditor.d.ts +21 -0
- package/dist/types/inputs/AutocompleteSelect.d.ts +30 -0
- package/dist/types/inputs/Checkbox.d.ts +9 -0
- package/dist/types/inputs/CheckboxCard.d.ts +9 -0
- package/dist/types/inputs/ChoiceGroups.d.ts +13 -0
- package/dist/types/inputs/ChoiceInputs.d.ts +24 -0
- package/dist/types/inputs/Combobox.d.ts +18 -0
- package/dist/types/inputs/DatePicker.d.ts +31 -0
- package/dist/types/inputs/FileInputs.d.ts +31 -0
- package/dist/types/inputs/MultiSelectInput.d.ts +41 -0
- package/dist/types/inputs/NumberInput.d.ts +24 -0
- package/dist/types/inputs/Select.d.ts +50 -0
- package/dist/types/inputs/SelectChip.d.ts +25 -0
- package/dist/types/inputs/SpecialInputs.d.ts +21 -0
- package/dist/types/inputs/Switch.d.ts +7 -0
- package/dist/types/inputs/TagEditor.d.ts +35 -0
- package/dist/types/inputs/TagsInput.d.ts +11 -0
- package/dist/types/inputs/TemplateEditor.d.ts +28 -0
- package/dist/types/inputs/TextInput.d.ts +26 -0
- package/dist/types/inputs/choice.d.ts +32 -0
- package/dist/types/inputs/completion/behaviors.d.ts +13 -0
- package/dist/types/inputs/completion/engine.d.ts +54 -0
- package/dist/types/inputs/completion/index.d.ts +3 -0
- package/dist/types/inputs/completion/overlay.d.ts +11 -0
- package/dist/types/inputs/date-picker.d.ts +42 -0
- package/dist/types/inputs/editor-dom.d.ts +6 -0
- package/dist/types/inputs/field-contract.d.ts +24 -0
- package/dist/types/inputs/icon-options.d.ts +37 -0
- package/dist/types/inputs/image-crop.d.ts +44 -0
- package/dist/types/inputs/index.d.ts +45 -0
- package/dist/types/inputs/markdown/MarkdownEditor.d.ts +25 -0
- package/dist/types/inputs/markdown/Toolbar.d.ts +9 -0
- package/dist/types/inputs/markdown/actions.d.ts +8 -0
- package/dist/types/inputs/markdown/active-formats.d.ts +1 -0
- package/dist/types/inputs/markdown/behaviors.d.ts +3 -0
- package/dist/types/inputs/markdown/code-zone.d.ts +1 -0
- package/dist/types/internal/color.d.ts +4 -0
- package/dist/types/internal/field.d.ts +27 -0
- package/dist/types/internal/portal.d.ts +1 -0
- package/dist/types/intl/Format.d.ts +84 -0
- package/dist/types/intl/index.d.ts +4 -0
- package/dist/types/intl/locale.d.ts +42 -0
- package/dist/types/intl/messages.d.ts +375 -0
- package/dist/types/layout/AppOverview.d.ts +29 -0
- package/dist/types/layout/AppWorkspace.d.ts +254 -0
- package/dist/types/layout/DataPanel.d.ts +16 -0
- package/dist/types/layout/DetailPanel.d.ts +89 -0
- package/dist/types/layout/Discussion.d.ts +52 -0
- package/dist/types/layout/FloatingWindow.d.ts +19 -0
- package/dist/types/layout/PanelDialog.d.ts +72 -0
- package/dist/types/layout/PanelHeader.d.ts +10 -0
- package/dist/types/layout/Panes.d.ts +48 -0
- package/dist/types/layout/ScrollArea.d.ts +8 -0
- package/dist/types/layout/Settings.d.ts +72 -0
- package/dist/types/layout/SettingsCollection.d.ts +41 -0
- package/dist/types/layout/SettingsModal.d.ts +39 -0
- package/dist/types/layout/app-workspace-controller.d.ts +7 -0
- package/dist/types/layout/app-workspace-state.d.ts +57 -0
- package/dist/types/layout/floating-window-geometry.d.ts +11 -0
- package/dist/types/layout/index.d.ts +32 -0
- package/dist/types/layout/panes-layout.d.ts +63 -0
- package/dist/types/layout/stable-id.d.ts +3 -0
- package/dist/types/semantics.d.ts +4 -0
- package/dist/types/surfaces/Avatar.d.ts +14 -0
- package/dist/types/surfaces/DescriptionList.d.ts +17 -0
- package/dist/types/surfaces/LinkCard.d.ts +11 -0
- package/dist/types/surfaces/NotFoundState.d.ts +15 -0
- package/dist/types/surfaces/NoticeCard.d.ts +39 -0
- package/dist/types/surfaces/Paper.d.ts +13 -0
- package/dist/types/surfaces/Placeholder.d.ts +17 -0
- package/dist/types/surfaces/ProgressBar.d.ts +13 -0
- package/dist/types/surfaces/StatCell.d.ts +22 -0
- package/dist/types/surfaces/StatGrid.d.ts +21 -0
- package/dist/types/surfaces/StatusBadge.d.ts +12 -0
- package/dist/types/surfaces/Tag.d.ts +16 -0
- package/dist/types/surfaces/index.d.ts +24 -0
- package/dist/types/widgets/Widget.d.ts +12 -0
- package/dist/types/widgets/WidgetHero.d.ts +11 -0
- package/dist/types/widgets/WidgetList.d.ts +17 -0
- package/dist/types/widgets/WidgetPills.d.ts +14 -0
- package/dist/types/widgets/WidgetStat.d.ts +17 -0
- package/dist/types/widgets/WidgetStatus.d.ts +12 -0
- package/dist/types/widgets/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type SettingsModalTabTone = "default" | "danger";
|
|
3
|
+
export type SettingsModalTabProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
tone?: SettingsModalTabTone;
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export type SettingsModalGroupProps = {
|
|
12
|
+
title: string;
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export type SettingsModalFooterProps = {
|
|
16
|
+
children: JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export type SettingsModalProps = {
|
|
19
|
+
/** Accessible name for the settings surface. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** @deprecated Retained for source compatibility; tab descriptions carry the visible context. */
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
/** @deprecated Retained for source compatibility; tab icons identify the rail entries. */
|
|
24
|
+
icon?: string;
|
|
25
|
+
defaultTab?: string;
|
|
26
|
+
activeTab?: string;
|
|
27
|
+
onTabChange?: (id: string) => void;
|
|
28
|
+
onClose?: () => void;
|
|
29
|
+
closeLabel?: string;
|
|
30
|
+
class?: string;
|
|
31
|
+
children: JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
type SettingsModalComponent = ((props: SettingsModalProps) => JSX.Element) & {
|
|
34
|
+
Tab: (props: SettingsModalTabProps) => JSX.Element;
|
|
35
|
+
Group: (props: SettingsModalGroupProps) => JSX.Element;
|
|
36
|
+
Footer: (props: SettingsModalFooterProps) => JSX.Element;
|
|
37
|
+
};
|
|
38
|
+
declare const SettingsModal: SettingsModalComponent;
|
|
39
|
+
export default SettingsModal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type AppWorkspaceLayoutState } from "./app-workspace-state";
|
|
2
|
+
export type AppWorkspaceControllerOptions = {
|
|
3
|
+
root?: Document | HTMLElement;
|
|
4
|
+
readState?: () => AppWorkspaceLayoutState | null | undefined;
|
|
5
|
+
writeState?: (state: AppWorkspaceLayoutState) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const installAppWorkspaceController: (options?: AppWorkspaceControllerOptions) => (() => void);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type AppWorkspaceLayoutState = {
|
|
2
|
+
version: 2;
|
|
3
|
+
sidebarWidth?: number;
|
|
4
|
+
sidebarCollapsed?: boolean;
|
|
5
|
+
paneWidths?: Record<string, number>;
|
|
6
|
+
detailWidths?: Record<string, number>;
|
|
7
|
+
drawerHeights?: Record<string, number>;
|
|
8
|
+
};
|
|
9
|
+
export declare const APP_WORKSPACE_SIDEBAR_DEFAULT = 208;
|
|
10
|
+
export declare const APP_WORKSPACE_SIDEBAR_COLLAPSED = 64;
|
|
11
|
+
export declare const APP_WORKSPACE_SIDEBAR_COLLAPSE_THRESHOLD = 128;
|
|
12
|
+
export declare const APP_WORKSPACE_SIDEBAR_MIN = 176;
|
|
13
|
+
export declare const APP_WORKSPACE_SIDEBAR_MAX = 360;
|
|
14
|
+
export declare const APP_WORKSPACE_DETAIL_DEFAULT = 384;
|
|
15
|
+
export declare const APP_WORKSPACE_DETAIL_MIN = 288;
|
|
16
|
+
export declare const APP_WORKSPACE_DETAIL_MAX = 640;
|
|
17
|
+
export declare const APP_WORKSPACE_DRAWER_DEFAULT = 240;
|
|
18
|
+
export declare const APP_WORKSPACE_DRAWER_MIN = 160;
|
|
19
|
+
export declare const APP_WORKSPACE_DRAWER_MAX = 560;
|
|
20
|
+
/** Space `appWorkspaceResizeLimits` always reserves for the main region. */
|
|
21
|
+
export declare const APP_WORKSPACE_MAIN_MIN = 320;
|
|
22
|
+
export declare const APP_WORKSPACE_MAIN_MIN_HEIGHT = 240;
|
|
23
|
+
export declare const APP_WORKSPACE_PANE_DEFAULT = 320;
|
|
24
|
+
export declare const APP_WORKSPACE_PANE_MIN = 240;
|
|
25
|
+
export declare const APP_WORKSPACE_PANE_MAX = 640;
|
|
26
|
+
export type AppWorkspaceResizeKind = "sidebar" | "pane" | "detail" | "drawer";
|
|
27
|
+
export declare const appWorkspaceResizeLimits: (options: {
|
|
28
|
+
kind: AppWorkspaceResizeKind;
|
|
29
|
+
workspaceSize: number;
|
|
30
|
+
reservedSize: number;
|
|
31
|
+
min?: number;
|
|
32
|
+
max?: number;
|
|
33
|
+
sidebarCollapsible?: boolean;
|
|
34
|
+
}) => {
|
|
35
|
+
min: number;
|
|
36
|
+
max: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Fits preferred auxiliary pane widths into a shared budget without giving
|
|
40
|
+
* DOM order priority. Minimums are reserved first; remaining space is shared
|
|
41
|
+
* in proportion to how much each pane still needs to reach its preference.
|
|
42
|
+
*/
|
|
43
|
+
export declare const fitAppWorkspacePaneSizes: (panes: ReadonlyArray<{
|
|
44
|
+
desired: number;
|
|
45
|
+
min: number;
|
|
46
|
+
}>, availableSize: number) => number[];
|
|
47
|
+
export declare const shouldCollapseAppWorkspaceSidebar: (width: number, collapsible: boolean) => boolean;
|
|
48
|
+
export declare const resolveAppWorkspaceSidebarWidth: (width: number, maxWidth: number, collapsible: boolean) => {
|
|
49
|
+
width: number;
|
|
50
|
+
collapsed: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare const safeAppWorkspacePanelId: (panelId: string) => string;
|
|
53
|
+
export declare const appWorkspacePanelVariable: (kind: "pane" | "detail" | "drawer", panelId: string) => string;
|
|
54
|
+
export declare const normalizeAppWorkspaceLayoutState: (value: unknown) => AppWorkspaceLayoutState | null;
|
|
55
|
+
export declare const parseAppWorkspaceLayoutState: (value: string | null | undefined) => AppWorkspaceLayoutState | null;
|
|
56
|
+
export declare const serializeAppWorkspaceLayoutState: (state: AppWorkspaceLayoutState) => string;
|
|
57
|
+
export declare const appWorkspaceLayoutStyle: (state: AppWorkspaceLayoutState | null | undefined) => string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type FloatingWindowRect = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const FLOATING_WINDOW_VIEWPORT_GAP = 16;
|
|
8
|
+
export declare const fitFloatingWindowRect: (rect: FloatingWindowRect, minWidth: number, minHeight: number, viewport: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}) => FloatingWindowRect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type { AppOverviewEmptyStateProps, AppOverviewPanelProps, AppOverviewProps, } from "./AppOverview";
|
|
2
|
+
export { default as AppOverview } from "./AppOverview";
|
|
3
|
+
export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarMobileItemsProps, AppWorkspaceSidebarMobileProps, AppWorkspaceSidebarMobileTriggerProps, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, } from "./AppWorkspace";
|
|
4
|
+
export { default as AppWorkspace } from "./AppWorkspace";
|
|
5
|
+
export type { AppWorkspaceControllerOptions } from "./app-workspace-controller";
|
|
6
|
+
export { installAppWorkspaceController } from "./app-workspace-controller";
|
|
7
|
+
export type { AppWorkspaceLayoutState, AppWorkspaceResizeKind, } from "./app-workspace-state";
|
|
8
|
+
export { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_MAIN_MIN, APP_WORKSPACE_MAIN_MIN_HEIGHT, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSE_THRESHOLD, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable, appWorkspaceResizeLimits, normalizeAppWorkspaceLayoutState, parseAppWorkspaceLayoutState, resolveAppWorkspaceSidebarWidth, safeAppWorkspacePanelId, serializeAppWorkspaceLayoutState, shouldCollapseAppWorkspaceSidebar, } from "./app-workspace-state";
|
|
9
|
+
export type { DataPanelProps } from "./DataPanel";
|
|
10
|
+
export { DataPanel } from "./DataPanel";
|
|
11
|
+
export type { DetailPanelActionButtonProps, DetailPanelActionLinkProps, DetailPanelActionProps, DetailPanelBodyProps, DetailPanelGroupProps, DetailPanelHeaderProps, DetailPanelProps, DetailPanelSectionProps, DetailPanelSummaryProps, DetailPanelTone, } from "./DetailPanel";
|
|
12
|
+
export { default as DetailPanel } from "./DetailPanel";
|
|
13
|
+
export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps } from "./Discussion";
|
|
14
|
+
export { default as Discussion } from "./Discussion";
|
|
15
|
+
export type { FloatingWindowClose, FloatingWindowProps, OpenFloatingWindowOptions, } from "./FloatingWindow";
|
|
16
|
+
export { default as FloatingWindow, type FloatingWindowRect, fitFloatingWindowRect, openFloatingWindow, } from "./FloatingWindow";
|
|
17
|
+
export type { PanelDialogBodyProps, PanelDialogFooterProps, PanelDialogHeaderProps, PanelDialogProps, PanelDialogSectionProps, PanelDialogSurface, PanelDialogTabOption, PanelDialogTabsProps, } from "./PanelDialog";
|
|
18
|
+
export { confirmDiscardIfDirty, default as PanelDialog, panelDialogFixedOptions, panelDialogFixedPanelClass, panelDialogOptions, panelDialogPanelClass, panelDialogWideOptions, panelDialogWidePanelClass, panelDialogWorkspaceOptions, panelDialogWorkspacePanelClass, } from "./PanelDialog";
|
|
19
|
+
export type { PanelHeaderProps } from "./PanelHeader";
|
|
20
|
+
export { PanelHeader } from "./PanelHeader";
|
|
21
|
+
export type { PanesItem, PanesProps } from "./Panes";
|
|
22
|
+
export { default as Panes } from "./Panes";
|
|
23
|
+
export type { AddPanesItemOptions, PanesDirection, PanesGroup, PanesIntent, PanesLayout, PanesNode, PanesPath, PanesPathSegment, PanesSide, PanesSplit, } from "./panes-layout";
|
|
24
|
+
export { activatePanesItem, addPanesItem, applyPanesIntent, createPanesLayout, isPanesItemVisible, PANES_LAYOUT_VERSION, parsePanesLayout, reconcilePanesLayout, removePanesItem, resizePanesSplit, } from "./panes-layout";
|
|
25
|
+
export type { ScrollAreaProps } from "./ScrollArea";
|
|
26
|
+
export { default as ScrollArea } from "./ScrollArea";
|
|
27
|
+
export type { SettingsFieldControlProps, SettingsFieldProps, SettingsGroupActionProps, SettingsGroupProps, SettingsPageProps, SettingsPanelFooterProps, SettingsSaveBarProps, SettingsSectionProps, } from "./Settings";
|
|
28
|
+
export { readSettingsError, SettingsField, SettingsGroup, SettingsPage, SettingsPanelFooter, SettingsSaveBar, SettingsSection, sameSettingValue, } from "./Settings";
|
|
29
|
+
export type { SettingsCollectionActionProps, SettingsCollectionItemActionsProps, SettingsCollectionItemProps, SettingsCollectionItemReorderProps, SettingsCollectionItemStatusProps, SettingsCollectionProps, } from "./SettingsCollection";
|
|
30
|
+
export { default as SettingsCollection } from "./SettingsCollection";
|
|
31
|
+
export type { SettingsModalFooterProps, SettingsModalGroupProps, SettingsModalProps, SettingsModalTabProps, SettingsModalTabTone, } from "./SettingsModal";
|
|
32
|
+
export { default as SettingsModal } from "./SettingsModal";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const PANES_LAYOUT_VERSION: 2;
|
|
2
|
+
export declare const PANES_MIN_RATIO = 0.08;
|
|
3
|
+
export declare const PANES_MAX_ID_LENGTH = 160;
|
|
4
|
+
export type PanesDirection = "horizontal" | "vertical";
|
|
5
|
+
export type PanesSide = "left" | "right" | "top" | "bottom";
|
|
6
|
+
export type PanesPathSegment = "first" | "second";
|
|
7
|
+
export type PanesPath = readonly PanesPathSegment[];
|
|
8
|
+
export type PanesGroup = {
|
|
9
|
+
type: "group";
|
|
10
|
+
items: string[];
|
|
11
|
+
active: string;
|
|
12
|
+
};
|
|
13
|
+
export type PanesSplit = {
|
|
14
|
+
type: "split";
|
|
15
|
+
direction: PanesDirection;
|
|
16
|
+
ratio: number;
|
|
17
|
+
first: PanesNode;
|
|
18
|
+
second: PanesNode;
|
|
19
|
+
};
|
|
20
|
+
export type PanesNode = PanesGroup | PanesSplit;
|
|
21
|
+
export type PanesLayout = {
|
|
22
|
+
version: typeof PANES_LAYOUT_VERSION;
|
|
23
|
+
root: PanesNode | null;
|
|
24
|
+
};
|
|
25
|
+
export type PanesIntent = {
|
|
26
|
+
type: "tab";
|
|
27
|
+
itemId: string;
|
|
28
|
+
targetItemId: string;
|
|
29
|
+
beforeItemId: string | null;
|
|
30
|
+
} | {
|
|
31
|
+
type: "split";
|
|
32
|
+
itemId: string;
|
|
33
|
+
targetItemId: string;
|
|
34
|
+
side: PanesSide;
|
|
35
|
+
};
|
|
36
|
+
export type PanesDropTarget = {
|
|
37
|
+
id: string;
|
|
38
|
+
kind: "tab" | "group" | "split";
|
|
39
|
+
targetItemId: string;
|
|
40
|
+
beforeItemId?: string | null;
|
|
41
|
+
side?: PanesSide;
|
|
42
|
+
intent: PanesIntent;
|
|
43
|
+
};
|
|
44
|
+
export type PanesDropTargetOptions = {
|
|
45
|
+
movable: boolean;
|
|
46
|
+
split: false | PanesDirection | "both";
|
|
47
|
+
};
|
|
48
|
+
export declare const parsePanesLayout: (value: unknown) => PanesLayout | null;
|
|
49
|
+
export declare const createPanesLayout: (itemIds: readonly string[]) => PanesLayout;
|
|
50
|
+
export declare const activatePanesItem: (layout: PanesLayout, itemId: string) => PanesLayout;
|
|
51
|
+
export declare const isPanesItemVisible: (layout: PanesLayout, itemId: string) => boolean;
|
|
52
|
+
export declare const removePanesItem: (layout: PanesLayout, itemId: string) => PanesLayout;
|
|
53
|
+
export type AddPanesItemOptions = {
|
|
54
|
+
itemId: string;
|
|
55
|
+
targetItemId: string | null;
|
|
56
|
+
beforeItemId?: string | null;
|
|
57
|
+
};
|
|
58
|
+
export declare const addPanesItem: (layout: PanesLayout, options: AddPanesItemOptions) => PanesLayout;
|
|
59
|
+
export declare const applyPanesIntent: (layout: PanesLayout, intent: PanesIntent) => PanesLayout;
|
|
60
|
+
export declare const reconcilePanesLayout: (layout: PanesLayout, desiredOpenItemIds: readonly string[]) => PanesLayout;
|
|
61
|
+
export declare const resizePanesSplit: (layout: PanesLayout, path: PanesPath, ratio: number) => PanesLayout;
|
|
62
|
+
export declare const samePanesIntent: (left: PanesIntent | null, right: PanesIntent | null) => boolean;
|
|
63
|
+
export declare const getPanesDropTargets: (layout: PanesLayout, itemId: string, options: PanesDropTargetOptions) => PanesDropTarget[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const isStableUiId: (value: unknown, maxLength?: number) => value is string;
|
|
2
|
+
export declare const assertStableUiId: (value: string, label: string, maxLength?: number) => string;
|
|
3
|
+
export declare const assertUniqueStableUiIds: (values: readonly string[], label: string, maxLength?: number) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Semantic intent for user-facing feedback and actions. */
|
|
2
|
+
export type IntentTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
3
|
+
/** Deliberately small accent palette for data and identity presentation. */
|
|
4
|
+
export type AccentColor = "zinc" | "blue" | "emerald" | "amber" | "red";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
3
|
+
export type AvatarProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string | null;
|
|
6
|
+
icon?: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
fallback?: string;
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
loading?: "eager" | "lazy";
|
|
11
|
+
class?: string;
|
|
12
|
+
style?: JSX.CSSProperties | string;
|
|
13
|
+
};
|
|
14
|
+
export declare function Avatar(props: AvatarProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type DescriptionListItem = {
|
|
3
|
+
term: JSX.Element;
|
|
4
|
+
description: JSX.Element;
|
|
5
|
+
action?: JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export type DescriptionListProps = {
|
|
8
|
+
items: readonly DescriptionListItem[];
|
|
9
|
+
columns?: 1 | 2 | 3;
|
|
10
|
+
layout?: "grid" | "rows";
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
actionVisibility?: "always" | "progressive";
|
|
13
|
+
class?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Semantic key-value content with predictable responsive density. */
|
|
16
|
+
export declare function DescriptionList(props: DescriptionListProps): JSX.Element;
|
|
17
|
+
export default DescriptionList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
export type LinkCardColor = "blue" | "emerald" | "violet" | "orange" | "red" | "amber" | "zinc" | "cyan" | "rose";
|
|
3
|
+
export type LinkCardProps = {
|
|
4
|
+
href: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
color: LinkCardColor;
|
|
9
|
+
};
|
|
10
|
+
export declare function LinkCard(props: LinkCardProps): JSX.Element;
|
|
11
|
+
export default LinkCard;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type NotFoundStateAction = {
|
|
3
|
+
label: string;
|
|
4
|
+
href: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
};
|
|
7
|
+
export type NotFoundStateProps = {
|
|
8
|
+
code?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
action?: NotFoundStateAction;
|
|
13
|
+
};
|
|
14
|
+
export declare function NotFoundState(props: NotFoundStateProps): JSX.Element;
|
|
15
|
+
export default NotFoundState;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { IntentTone } from "../semantics";
|
|
3
|
+
export type NoticeTone = Extract<IntentTone, "neutral" | "info" | "success" | "warning" | "danger">;
|
|
4
|
+
type NoticeCardContentProps = {
|
|
5
|
+
title: JSX.Element;
|
|
6
|
+
detail?: JSX.Element;
|
|
7
|
+
children?: JSX.Element;
|
|
8
|
+
} | {
|
|
9
|
+
title?: never;
|
|
10
|
+
detail?: never;
|
|
11
|
+
children: JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export type NoticeCardProps = Omit<JSX.HTMLAttributes<HTMLElement>, "children" | "class" | "title"> & NoticeCardContentProps & {
|
|
14
|
+
tone?: NoticeTone;
|
|
15
|
+
icon?: string | false;
|
|
16
|
+
class?: string;
|
|
17
|
+
bodyClass?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const NOTICE_CARD_CLASSES: {
|
|
20
|
+
readonly root: "k2b-notice-card";
|
|
21
|
+
readonly inner: "k2b-notice-card__inner";
|
|
22
|
+
readonly icon: "k2b-notice-card__icon";
|
|
23
|
+
readonly content: "k2b-notice-card__content";
|
|
24
|
+
readonly title: "k2b-notice-card__title";
|
|
25
|
+
readonly description: "k2b-notice-card__description";
|
|
26
|
+
readonly body: "k2b-notice-card__body";
|
|
27
|
+
};
|
|
28
|
+
export declare const NOTICE_CARD_ICONS: Readonly<Record<NoticeTone, string>>;
|
|
29
|
+
declare function NoticeCardComponent(props: NoticeCardProps): JSX.Element;
|
|
30
|
+
export type NoticeGridProps<T> = {
|
|
31
|
+
items: readonly T[];
|
|
32
|
+
children: (item: T) => JSX.Element;
|
|
33
|
+
class?: string;
|
|
34
|
+
};
|
|
35
|
+
declare function NoticeGrid<T>(props: NoticeGridProps<T>): JSX.Element;
|
|
36
|
+
export declare const NoticeCard: typeof NoticeCardComponent & {
|
|
37
|
+
Grid: typeof NoticeGrid;
|
|
38
|
+
};
|
|
39
|
+
export default NoticeCard;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type PaperTag = "div" | "section" | "article" | "a";
|
|
3
|
+
type PaperOwnProps<T extends PaperTag> = {
|
|
4
|
+
as?: T;
|
|
5
|
+
children?: JSX.Element;
|
|
6
|
+
class?: string;
|
|
7
|
+
elevated?: boolean;
|
|
8
|
+
interactive?: boolean;
|
|
9
|
+
tabIndex?: number;
|
|
10
|
+
};
|
|
11
|
+
export type PaperProps<T extends PaperTag = "div"> = PaperOwnProps<T> & Omit<JSX.IntrinsicElements[T], keyof PaperOwnProps<T>>;
|
|
12
|
+
export declare function Paper<T extends PaperTag = "div">(props: PaperProps<T>): JSX.Element;
|
|
13
|
+
export default Paper;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type PlaceholderAlign = "center" | "left";
|
|
3
|
+
export type PlaceholderSurface = "none" | "paper";
|
|
4
|
+
export type PlaceholderState = "empty" | "loading" | "error";
|
|
5
|
+
export type PlaceholderVariant = "compact" | "panel";
|
|
6
|
+
export type PlaceholderProps = {
|
|
7
|
+
title?: JSX.Element;
|
|
8
|
+
description?: JSX.Element;
|
|
9
|
+
icon?: string;
|
|
10
|
+
action?: JSX.Element;
|
|
11
|
+
align?: PlaceholderAlign;
|
|
12
|
+
surface?: PlaceholderSurface;
|
|
13
|
+
state?: PlaceholderState;
|
|
14
|
+
variant?: PlaceholderVariant;
|
|
15
|
+
class?: string;
|
|
16
|
+
};
|
|
17
|
+
export default function Placeholder(props: PlaceholderProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import type { IntentTone } from "../semantics";
|
|
3
|
+
export type ProgressBarTone = Extract<IntentTone, "info" | "success" | "danger">;
|
|
4
|
+
export type ProgressBarProps = {
|
|
5
|
+
value: number;
|
|
6
|
+
size?: "xs" | "sm" | "md";
|
|
7
|
+
tone?: ProgressBarTone;
|
|
8
|
+
showValue?: boolean;
|
|
9
|
+
label: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
|
|
13
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { AccentColor } from "../semantics";
|
|
3
|
+
import { type StatGridSize } from "./StatGrid";
|
|
4
|
+
export type StatCellTone = AccentColor;
|
|
5
|
+
export type StatCellAccent = {
|
|
6
|
+
tone: StatCellTone;
|
|
7
|
+
icon: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
};
|
|
10
|
+
export type StatCellProps = {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string | number | JSX.Element;
|
|
13
|
+
sub?: string;
|
|
14
|
+
valueClass?: string;
|
|
15
|
+
accent?: StatCellAccent;
|
|
16
|
+
href?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
trend?: readonly number[];
|
|
19
|
+
size?: StatGridSize;
|
|
20
|
+
};
|
|
21
|
+
export declare function StatCell(props: StatCellProps): JSX.Element;
|
|
22
|
+
export default StatCell;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type StatGridSize = "md" | "sm";
|
|
3
|
+
export type StatGridSurface = "white" | "muted";
|
|
4
|
+
export type StatGridColumns = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
export type StatGridAction = {
|
|
6
|
+
label: string;
|
|
7
|
+
href: string;
|
|
8
|
+
};
|
|
9
|
+
export type StatGridProps = {
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
title?: string;
|
|
12
|
+
action?: StatGridAction;
|
|
13
|
+
columns?: StatGridColumns;
|
|
14
|
+
size?: StatGridSize;
|
|
15
|
+
surface?: StatGridSurface;
|
|
16
|
+
class?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const useStatGridSize: () => StatGridSize;
|
|
19
|
+
export declare const useStatGridSurface: () => StatGridSurface;
|
|
20
|
+
export declare function StatGrid(props: StatGridProps): JSX.Element;
|
|
21
|
+
export default StatGrid;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type StatusTone = "ok" | "warning" | "error" | "degraded" | "running" | "neutral";
|
|
3
|
+
export type StatusBadgeProps = {
|
|
4
|
+
tone: StatusTone;
|
|
5
|
+
label: JSX.Element;
|
|
6
|
+
icon?: string | null;
|
|
7
|
+
variant?: "chip" | "dot" | "text";
|
|
8
|
+
title?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function StatusBadge(props: StatusBadgeProps): JSX.Element;
|
|
12
|
+
export default StatusBadge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type TagSize = "sm" | "md" | "lg";
|
|
3
|
+
export type TagProps = {
|
|
4
|
+
children: JSX.Element;
|
|
5
|
+
color?: string | null;
|
|
6
|
+
icon?: string;
|
|
7
|
+
size?: TagSize;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
onRemove?: () => void;
|
|
10
|
+
removeLabel?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Compact label presentation with optional color, icon, and remove action. */
|
|
15
|
+
export declare function Tag(props: TagProps): JSX.Element;
|
|
16
|
+
export default Tag;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type { AvatarProps, AvatarSize } from "./Avatar";
|
|
2
|
+
export { Avatar } from "./Avatar";
|
|
3
|
+
export type { DescriptionListItem, DescriptionListProps } from "./DescriptionList";
|
|
4
|
+
export { DescriptionList } from "./DescriptionList";
|
|
5
|
+
export type { LinkCardColor, LinkCardProps } from "./LinkCard";
|
|
6
|
+
export { LinkCard } from "./LinkCard";
|
|
7
|
+
export type { NotFoundStateAction, NotFoundStateProps } from "./NotFoundState";
|
|
8
|
+
export { NotFoundState } from "./NotFoundState";
|
|
9
|
+
export type { NoticeCardProps, NoticeGridProps, NoticeTone } from "./NoticeCard";
|
|
10
|
+
export { NOTICE_CARD_CLASSES, NOTICE_CARD_ICONS, NoticeCard } from "./NoticeCard";
|
|
11
|
+
export type { PaperProps, PaperTag } from "./Paper";
|
|
12
|
+
export { Paper } from "./Paper";
|
|
13
|
+
export type { PlaceholderAlign, PlaceholderProps, PlaceholderState, PlaceholderSurface, PlaceholderVariant, } from "./Placeholder";
|
|
14
|
+
export { default as Placeholder } from "./Placeholder";
|
|
15
|
+
export type { ProgressBarProps, ProgressBarTone } from "./ProgressBar";
|
|
16
|
+
export { ProgressBar } from "./ProgressBar";
|
|
17
|
+
export type { StatCellAccent, StatCellProps, StatCellTone } from "./StatCell";
|
|
18
|
+
export { StatCell } from "./StatCell";
|
|
19
|
+
export type { StatGridAction, StatGridColumns, StatGridProps, StatGridSize, StatGridSurface, } from "./StatGrid";
|
|
20
|
+
export { StatGrid } from "./StatGrid";
|
|
21
|
+
export type { StatusBadgeProps, StatusTone } from "./StatusBadge";
|
|
22
|
+
export { StatusBadge } from "./StatusBadge";
|
|
23
|
+
export type { TagProps, TagSize } from "./Tag";
|
|
24
|
+
export { Tag } from "./Tag";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type WidgetSize = "content" | "compact" | "standard";
|
|
3
|
+
export type WidgetProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
meta?: string;
|
|
8
|
+
size?: WidgetSize;
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare function Widget(props: WidgetProps): JSX.Element;
|
|
12
|
+
export default Widget;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { AccentColor } from "../semantics";
|
|
3
|
+
export type WidgetTone = AccentColor;
|
|
4
|
+
export type WidgetHeroProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
tone?: WidgetTone;
|
|
9
|
+
};
|
|
10
|
+
export declare function WidgetHero(props: WidgetHeroProps): JSX.Element;
|
|
11
|
+
export default WidgetHero;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { WidgetTone } from "./WidgetHero";
|
|
3
|
+
export type WidgetListItem = {
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconTone?: WidgetTone;
|
|
6
|
+
label: string;
|
|
7
|
+
sub?: string;
|
|
8
|
+
meta?: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
};
|
|
11
|
+
export type WidgetListProps = {
|
|
12
|
+
items: readonly WidgetListItem[];
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
grow?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function WidgetList(props: WidgetListProps): JSX.Element;
|
|
17
|
+
export default WidgetList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { WidgetTone } from "./WidgetHero";
|
|
3
|
+
export type WidgetPill = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
tone?: WidgetTone;
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
export type WidgetPillsProps = {
|
|
10
|
+
pills: readonly WidgetPill[];
|
|
11
|
+
grow?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function WidgetPills(props: WidgetPillsProps): JSX.Element;
|
|
14
|
+
export default WidgetPills;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { WidgetTone } from "./WidgetHero";
|
|
3
|
+
export type WidgetStatAccent = {
|
|
4
|
+
tone: WidgetTone;
|
|
5
|
+
icon: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
};
|
|
8
|
+
export type WidgetStatProps = {
|
|
9
|
+
value: string | number;
|
|
10
|
+
label: string;
|
|
11
|
+
sub?: string;
|
|
12
|
+
valueClass?: string;
|
|
13
|
+
accent?: WidgetStatAccent;
|
|
14
|
+
grow?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function WidgetStat(props: WidgetStatProps): JSX.Element;
|
|
17
|
+
export default WidgetStat;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { IntentTone } from "../semantics";
|
|
3
|
+
export type WidgetStatusTone = Extract<IntentTone, "info" | "success" | "warning" | "danger">;
|
|
4
|
+
export type WidgetStatusProps = {
|
|
5
|
+
tone: WidgetStatusTone;
|
|
6
|
+
title: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
grow?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function WidgetStatus(props: WidgetStatusProps): JSX.Element;
|
|
12
|
+
export default WidgetStatus;
|