@craftzbay/ui 0.3.0 → 0.5.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/README.md +2 -2
- package/dist-lib/catalog.d.ts +8 -0
- package/dist-lib/components/patterns/DataTablePage.d.ts +81 -1
- package/dist-lib/components/patterns/FirstRunEmpty.d.ts +39 -1
- package/dist-lib/components/patterns/Onboarding.d.ts +65 -1
- package/dist-lib/components/patterns/Pricing.d.ts +40 -1
- package/dist-lib/components/patterns/RecordDetail.d.ts +48 -1
- package/dist-lib/components/patterns/Settings.d.ts +34 -1
- package/dist-lib/components/ui/Alert.d.ts +1 -1
- package/dist-lib/components/ui/DesignSystemProvider.d.ts +60 -0
- package/dist-lib/components/ui/EmptyState.d.ts +1 -1
- package/dist-lib/components/ui/ErrorState.d.ts +1 -1
- package/dist-lib/hooks/use-toast.d.ts +4 -4
- package/dist-lib/icons/index.d.ts +1 -1
- package/dist-lib/index.cjs +2 -4
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +2859 -4876
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/showcase/components/Accordion.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Alert.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Avatar.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Badge.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Breadcrumbs.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Button.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Calendar.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Card.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Carousel.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Chart.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Checkbox.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Combobox.docs.d.ts +3 -0
- package/dist-lib/showcase/components/CommandPalette.docs.d.ts +3 -0
- package/dist-lib/showcase/components/ContextMenu.docs.d.ts +3 -0
- package/dist-lib/showcase/components/DataGrid.docs.d.ts +3 -0
- package/dist-lib/showcase/components/DatePicker.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Dialog.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Drawer.docs.d.ts +3 -0
- package/dist-lib/showcase/components/DropdownMenu.docs.d.ts +3 -0
- package/dist-lib/showcase/components/EmptyState.docs.d.ts +3 -0
- package/dist-lib/showcase/components/ErrorState.docs.d.ts +3 -0
- package/dist-lib/showcase/components/FileUpload.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Form.docs.d.ts +3 -0
- package/dist-lib/showcase/components/IconButton.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Input.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Kbd.docs.d.ts +3 -0
- package/dist-lib/showcase/components/MultiSelect.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Pagination.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Popover.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Progress.docs.d.ts +3 -0
- package/dist-lib/showcase/components/RadioGroup.docs.d.ts +3 -0
- package/dist-lib/showcase/components/ScrollArea.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Select.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Separator.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Sheet.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Sidebar.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Skeleton.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Slider.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Snackbar.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Spinner.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Stepper.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Switch.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Table.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Tabs.docs.d.ts +3 -0
- package/dist-lib/showcase/components/TagInput.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Textarea.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Timeline.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Toast.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Tooltip.docs.d.ts +3 -0
- package/dist-lib/showcase/components/TopNav.docs.d.ts +3 -0
- package/dist-lib/showcase/components/Tree.docs.d.ts +3 -0
- package/dist-lib/showcase/layout/DocLayout.d.ts +22 -0
- package/dist-lib/showcase/layout/DocSidebar.d.ts +27 -0
- package/dist-lib/showcase/layout/ShowcaseTopBar.d.ts +13 -0
- package/dist-lib/showcase/layout/sidebars.d.ts +14 -0
- package/dist-lib/showcase/pages/ComponentDocPage.d.ts +6 -0
- package/dist-lib/showcase/pages/ComponentsIndexPage.d.ts +1 -0
- package/dist-lib/showcase/pages/GuidePage.d.ts +6 -0
- package/dist-lib/showcase/pages/GuidesIndexPage.d.ts +1 -0
- package/dist-lib/showcase/pages/HomePage.d.ts +1 -0
- package/dist-lib/showcase/pages/TemplateDocPage.d.ts +6 -0
- package/dist-lib/showcase/pages/TemplatesIndexPage.d.ts +1 -0
- package/dist-lib/showcase/registry/components.d.ts +4 -0
- package/dist-lib/showcase/registry/guides.d.ts +3 -0
- package/dist-lib/showcase/registry/templates.d.ts +3 -0
- package/dist-lib/showcase/registry/types.d.ts +69 -0
- package/dist-lib/showcase/routing.d.ts +39 -0
- package/dist-lib/showcase/templates/AuthForgot.template.d.ts +3 -0
- package/dist-lib/showcase/templates/AuthMagic.template.d.ts +3 -0
- package/dist-lib/showcase/templates/AuthSignIn.template.d.ts +3 -0
- package/dist-lib/showcase/templates/AuthSignUp.template.d.ts +3 -0
- package/dist-lib/showcase/templates/Dashboard.template.d.ts +3 -0
- package/dist-lib/showcase/templates/DataTable.template.d.ts +3 -0
- package/dist-lib/showcase/templates/FirstRunEmpty.template.d.ts +3 -0
- package/dist-lib/showcase/templates/Onboarding.template.d.ts +3 -0
- package/dist-lib/showcase/templates/Pricing.template.d.ts +3 -0
- package/dist-lib/showcase/templates/RecordDetail.template.d.ts +3 -0
- package/dist-lib/showcase/templates/Settings.template.d.ts +3 -0
- package/dist-lib/showcase/widgets/CodeBlock.d.ts +12 -0
- package/dist-lib/showcase/widgets/CodePreview.d.ts +14 -0
- package/dist-lib/showcase/widgets/PropsTable.d.ts +10 -0
- package/dist-lib/showcase/widgets/SectionAnchor.d.ts +13 -0
- package/dist-lib/test/setup.d.ts +0 -0
- package/package.json +26 -18
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ primitives — Button through DataGrid — plus composed patterns
|
|
|
5
5
|
(authentication, app shell, settings, etc.).
|
|
6
6
|
|
|
7
7
|
- **Showcase:** [design.runestonetechnologies.com](https://design.runestonetechnologies.com)
|
|
8
|
-
- **
|
|
8
|
+
- **Components catalog:** [design.runestonetechnologies.com#catalog](https://design.runestonetechnologies.com#catalog)
|
|
9
|
+
- **Docs:** [design.runestonetechnologies.com#docs](https://design.runestonetechnologies.com#docs)
|
|
9
10
|
|
|
10
11
|
> **Aesthetic direction:** Linear / Vercel / Stripe Dashboard / Notion / Raycast.
|
|
11
12
|
> Neutral-dominant, one accent, hairline borders, generous whitespace, fast quiet
|
|
@@ -33,7 +34,6 @@ Peer dependencies: `react@>=18`, `react-dom@>=18`.
|
|
|
33
34
|
```bash
|
|
34
35
|
pnpm install
|
|
35
36
|
pnpm dev # Vite showcase at localhost:5173
|
|
36
|
-
pnpm storybook # Storybook at localhost:6006
|
|
37
37
|
pnpm build:lib # Build library → dist-lib/
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -1 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../ui/Button';
|
|
3
|
+
import { DataGridColumn } from '../ui/DataGrid';
|
|
4
|
+
export interface DataTableFilter {
|
|
5
|
+
/** Field key used by the default predicate, and as the React key. */
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
/** First option should be the "all" / cleared value. */
|
|
9
|
+
options: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** Initial value. Defaults to the first option's value. */
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface DataTableBulkAction<T> {
|
|
17
|
+
label: string;
|
|
18
|
+
/** Optional leading icon. */
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
variant?: ButtonProps['variant'];
|
|
21
|
+
/** Receives the selected rows. Awaited — toolbar shows a spinner while pending. */
|
|
22
|
+
onAction: (selected: T[]) => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface DataTablePageProps<T extends {
|
|
25
|
+
id: string | number;
|
|
26
|
+
}> {
|
|
27
|
+
/** Page heading. */
|
|
28
|
+
title?: ReactNode;
|
|
29
|
+
/** Optional subtitle — defaults to a row-count line. */
|
|
30
|
+
subtitle?: ReactNode;
|
|
31
|
+
/** Right-aligned header actions (e.g. New / Import buttons). */
|
|
32
|
+
headerActions?: ReactNode;
|
|
33
|
+
/** Row data. */
|
|
34
|
+
rows?: T[];
|
|
35
|
+
/** Column descriptors. */
|
|
36
|
+
columns?: DataGridColumn<T>[];
|
|
37
|
+
/** Filter selects to render in the toolbar. */
|
|
38
|
+
filters?: DataTableFilter[];
|
|
39
|
+
/** Custom predicate. Receives the row + the active filter values. */
|
|
40
|
+
predicate?: (row: T, filterValues: Record<string, string>, search: string) => boolean;
|
|
41
|
+
/** Search placeholder. */
|
|
42
|
+
searchPlaceholder?: string;
|
|
43
|
+
/** Available rows-per-page sizes. */
|
|
44
|
+
pageSizeOptions?: number[];
|
|
45
|
+
/** Initial page size. */
|
|
46
|
+
defaultPageSize?: number;
|
|
47
|
+
/** Bulk-action buttons shown when rows are selected. */
|
|
48
|
+
bulkActions?: DataTableBulkAction<T>[];
|
|
49
|
+
/** EmptyState rendered when the filtered rows are empty. */
|
|
50
|
+
emptyState?: ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Generic data-table page.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* interface User { id: string; name: string; role: string; status: 'active' | 'invited' }
|
|
58
|
+
*
|
|
59
|
+
* <DataTablePage<User>
|
|
60
|
+
* title="Members"
|
|
61
|
+
* rows={users}
|
|
62
|
+
* columns={[
|
|
63
|
+
* { key: 'name', header: 'Name', sortable: true },
|
|
64
|
+
* { key: 'role', header: 'Role' },
|
|
65
|
+
* { key: 'status', header: 'Status', cell: (r) => <Badge>{r.status}</Badge> },
|
|
66
|
+
* ]}
|
|
67
|
+
* filters={[
|
|
68
|
+
* { key: 'status', label: 'Status', options: [
|
|
69
|
+
* { value: 'all', label: 'All' },
|
|
70
|
+
* { value: 'active', label: 'Active' },
|
|
71
|
+
* { value: 'invited', label: 'Invited' },
|
|
72
|
+
* ]},
|
|
73
|
+
* ]}
|
|
74
|
+
* bulkActions={[
|
|
75
|
+
* { label: 'Remove', variant: 'destructive', onAction: (rows) => api.remove(rows) },
|
|
76
|
+
* ]}
|
|
77
|
+
* />
|
|
78
|
+
*/
|
|
79
|
+
export declare function DataTablePage<T extends {
|
|
80
|
+
id: string | number;
|
|
81
|
+
}>({ title, subtitle, headerActions, rows: rowsProp, columns: columnsProp, filters: filtersProp, predicate, searchPlaceholder, pageSizeOptions, defaultPageSize, bulkActions: bulkActionsProp, emptyState, className, }?: DataTablePageProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FirstRunNextStep {
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
cta: string;
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface FirstRunEmptyProps {
|
|
10
|
+
/** Hero icon — typically a folder, sparkles, or product mark. */
|
|
11
|
+
heroIcon?: ReactNode;
|
|
12
|
+
/** Hero title. */
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/** Hero subtitle. */
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** Primary CTA inside the hero (top tutorial / overview action). */
|
|
17
|
+
primaryAction?: ReactNode;
|
|
18
|
+
/** Next-step cards rendered below the hero. */
|
|
19
|
+
steps?: FirstRunNextStep[];
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* First-run empty product state.
|
|
24
|
+
*
|
|
25
|
+
* @example Default (uses built-in placeholder copy)
|
|
26
|
+
* <FirstRunEmpty />
|
|
27
|
+
*
|
|
28
|
+
* @example Customized
|
|
29
|
+
* <FirstRunEmpty
|
|
30
|
+
* heroIcon={<Illustrations.InboxEmpty className="size-16" />}
|
|
31
|
+
* title="Welcome to Atlas"
|
|
32
|
+
* description="Pick a starting point."
|
|
33
|
+
* steps={[
|
|
34
|
+
* { icon: <Plus />, title: 'New project', description: '…', cta: 'Create' },
|
|
35
|
+
* { icon: <Github />, title: 'Import repo', description: '…', cta: 'Connect' },
|
|
36
|
+
* ]}
|
|
37
|
+
* />
|
|
38
|
+
*/
|
|
39
|
+
export declare function FirstRunEmpty({ heroIcon, title, description, primaryAction, steps, className, }?: FirstRunEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface OnboardingStepContext<T = unknown> {
|
|
3
|
+
/** Move to the next step. */
|
|
4
|
+
next: () => void;
|
|
5
|
+
/** Move to the previous step. */
|
|
6
|
+
prev: () => void;
|
|
7
|
+
/** Jump to a step by index. */
|
|
8
|
+
goTo: (index: number) => void;
|
|
9
|
+
/** Finish the flow — calls onComplete. */
|
|
10
|
+
finish: () => void;
|
|
11
|
+
/** Current accumulated data across steps. */
|
|
12
|
+
data: T;
|
|
13
|
+
/** Patch the accumulated data. */
|
|
14
|
+
setData: (patch: Partial<T>) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface OnboardingStep<T = unknown> {
|
|
17
|
+
/** Stable id used for keys + analytics. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Title shown in the Stepper. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Optional sub-description shown only in vertical Stepper. */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Card heading rendered when the step is active. */
|
|
24
|
+
heading: ReactNode;
|
|
25
|
+
/** Card description rendered under the heading. */
|
|
26
|
+
subheading?: ReactNode;
|
|
27
|
+
/** Step body. Receives navigation controls + shared data. */
|
|
28
|
+
render: (ctx: OnboardingStepContext<T>) => ReactNode;
|
|
29
|
+
/** Override the Continue / Finish button label. */
|
|
30
|
+
ctaLabel?: string;
|
|
31
|
+
/** Hide the default Back/Next bar — render your own inside `render`. */
|
|
32
|
+
hideNavigation?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface OnboardingProps<T = unknown> {
|
|
35
|
+
steps?: OnboardingStep<T>[];
|
|
36
|
+
/** Initial accumulated data. */
|
|
37
|
+
initialData?: T;
|
|
38
|
+
/** Called when the user advances past the last step. */
|
|
39
|
+
onComplete?: (data: T) => void | Promise<void>;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
interface DemoData {
|
|
43
|
+
workspaceName?: string;
|
|
44
|
+
slug?: string;
|
|
45
|
+
inviteEmail?: string;
|
|
46
|
+
role?: string;
|
|
47
|
+
source?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Multi-step onboarding wizard.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* <Onboarding<{ name: string; email: string }>
|
|
54
|
+
* initialData={{ name: '', email: '' }}
|
|
55
|
+
* steps={[
|
|
56
|
+
* { id: 'name', title: 'Name', heading: 'What should we call you?',
|
|
57
|
+
* render: ({ data, setData }) =>
|
|
58
|
+
* <Input value={data.name} onChange={(e) => setData({ name: e.target.value })} /> },
|
|
59
|
+
* …
|
|
60
|
+
* ]}
|
|
61
|
+
* onComplete={async (data) => api.completeOnboarding(data)}
|
|
62
|
+
* />
|
|
63
|
+
*/
|
|
64
|
+
export declare function Onboarding<T = DemoData>({ steps, initialData, onComplete, className, }?: OnboardingProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export {};
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PricingTier {
|
|
3
|
+
name: string;
|
|
4
|
+
/** Price string. Pre-formatted — render '$0', '$20', 'Custom', '¥1,200', etc. */
|
|
5
|
+
price: string;
|
|
6
|
+
/** Cadence label rendered next to the price ('per user / month'). */
|
|
7
|
+
cadence?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
features: string[];
|
|
10
|
+
/** CTA label. */
|
|
11
|
+
cta: string;
|
|
12
|
+
/** Mark this tier as the recommended one — adds accent border + badge. */
|
|
13
|
+
highlighted?: boolean;
|
|
14
|
+
/** Click handler for the CTA. */
|
|
15
|
+
onSelect?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface PricingProps {
|
|
18
|
+
/** Top heading. */
|
|
19
|
+
title?: ReactNode;
|
|
20
|
+
/** Subtitle under the heading. */
|
|
21
|
+
subtitle?: ReactNode;
|
|
22
|
+
/** Tier descriptors. */
|
|
23
|
+
tiers?: PricingTier[];
|
|
24
|
+
/** Label shown on the highlighted tier badge. */
|
|
25
|
+
highlightedLabel?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Pricing grid. Defaults to a 3-tier demo if `tiers` is omitted.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <Pricing
|
|
33
|
+
* title="Plans"
|
|
34
|
+
* tiers={[
|
|
35
|
+
* { name: 'Free', price: '$0', features: ['…'], cta: 'Start' },
|
|
36
|
+
* { name: 'Pro', price: '$12', features: ['…'], cta: 'Upgrade', highlighted: true },
|
|
37
|
+
* ]}
|
|
38
|
+
* />
|
|
39
|
+
*/
|
|
40
|
+
export declare function Pricing({ title, subtitle, tiers, highlightedLabel, className, }?: PricingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RecordDetailHeader {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
subtitle?: ReactNode;
|
|
5
|
+
/** Optional status pill rendered next to the title. */
|
|
6
|
+
status?: ReactNode;
|
|
7
|
+
/** Right-aligned action buttons. */
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
/** Breadcrumb trail rendered above the header. */
|
|
10
|
+
breadcrumbs?: {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
href?: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export interface RecordDetailTab {
|
|
16
|
+
id: string;
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
render: () => ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface RecordDetailProps {
|
|
21
|
+
header?: RecordDetailHeader;
|
|
22
|
+
tabs?: RecordDetailTab[];
|
|
23
|
+
/** Initial tab id. Defaults to the first tab. */
|
|
24
|
+
defaultTab?: string;
|
|
25
|
+
/** Optional right-side panel (related items, details list, watchers, …). */
|
|
26
|
+
sidePanel?: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Record detail page — header (breadcrumbs + title + actions) + tabs + side panel.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <RecordDetail
|
|
34
|
+
* header={{
|
|
35
|
+
* title: project.name,
|
|
36
|
+
* subtitle: project.description,
|
|
37
|
+
* status: <Badge tone="success">Active</Badge>,
|
|
38
|
+
* actions: <Button>Share</Button>,
|
|
39
|
+
* breadcrumbs: [{ label: 'Projects', href: '/projects' }, { label: project.name }],
|
|
40
|
+
* }}
|
|
41
|
+
* tabs={[
|
|
42
|
+
* { id: 'overview', label: 'Overview', render: () => <Overview project={project} /> },
|
|
43
|
+
* { id: 'activity', label: 'Activity', render: () => <Activity projectId={project.id} /> },
|
|
44
|
+
* ]}
|
|
45
|
+
* sidePanel={<RelatedItems project={project} />}
|
|
46
|
+
* />
|
|
47
|
+
*/
|
|
48
|
+
export declare function RecordDetail({ header, tabs, defaultTab, sidePanel, className, }?: RecordDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SettingsSection {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
render: () => ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface SettingsPageProps {
|
|
9
|
+
/** Page title — defaults to "Settings". */
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
/** Subtitle under the heading. */
|
|
12
|
+
subtitle?: ReactNode;
|
|
13
|
+
sections?: SettingsSection[];
|
|
14
|
+
/** Initially active section id. Defaults to the first section. */
|
|
15
|
+
defaultSection?: string;
|
|
16
|
+
/** Controlled active section id. */
|
|
17
|
+
activeSection?: string;
|
|
18
|
+
/** Fires when the active section changes (controlled mode). */
|
|
19
|
+
onActiveSectionChange?: (id: string) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Settings page with a sticky sub-nav on the left and section cards on the right.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <SettingsPage
|
|
27
|
+
* sections={[
|
|
28
|
+
* { id: 'profile', label: 'Profile', icon: <User />, render: () => <ProfileForm /> },
|
|
29
|
+
* { id: 'team', label: 'Team', icon: <Users />, render: () => <TeamForm /> },
|
|
30
|
+
* ]}
|
|
31
|
+
* defaultSection="profile"
|
|
32
|
+
* />
|
|
33
|
+
*/
|
|
34
|
+
export declare function SettingsPage({ title, subtitle, sections, defaultSection, activeSection, onActiveSectionChange, className, }?: SettingsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from '../../lib/cva';
|
|
|
3
3
|
declare const alert: (props?: ({
|
|
4
4
|
variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
export interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alert> {
|
|
6
|
+
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof alert> {
|
|
7
7
|
/** Heading. Renders bold above the description. */
|
|
8
8
|
title?: ReactNode;
|
|
9
9
|
/** Show a dismiss (×) button. */
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Per-brand token overrides. Keys are CSS variable names (without the `--`
|
|
4
|
+
* prefix); values are CSS values. Any unspecified token falls back to the
|
|
5
|
+
* design system default.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <DesignSystemProvider tokens={{ 'color-accent': '#ff5555', 'radius-md': '10px' }}>
|
|
9
|
+
* <App />
|
|
10
|
+
* </DesignSystemProvider>
|
|
11
|
+
*
|
|
12
|
+
* @example Multiple brands in one app
|
|
13
|
+
* <DesignSystemProvider tokens={edgelogBrand}>
|
|
14
|
+
* <Card>...</Card>
|
|
15
|
+
* </DesignSystemProvider>
|
|
16
|
+
* <DesignSystemProvider tokens={geregeBrand}>
|
|
17
|
+
* <Card>...</Card>
|
|
18
|
+
* </DesignSystemProvider>
|
|
19
|
+
*/
|
|
20
|
+
export type BrandTokens = Record<string, string>;
|
|
21
|
+
export interface DesignSystemProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/** Token overrides (CSS variable name → value). */
|
|
23
|
+
tokens?: BrandTokens;
|
|
24
|
+
/** Children to scope this brand to. */
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare function DesignSystemProvider({ tokens, className, children, style, ...props }: DesignSystemProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* Built-in brand presets — drop-in starters showing how a token override
|
|
30
|
+
* map is shaped. Consumers can fork or replace any value.
|
|
31
|
+
*/
|
|
32
|
+
export declare const brandPresets: {
|
|
33
|
+
readonly default: BrandTokens;
|
|
34
|
+
/** Cool indigo accent, slightly rounder corners. */
|
|
35
|
+
readonly edgelog: {
|
|
36
|
+
readonly 'color-accent': "oklch(0.55 0.18 250)";
|
|
37
|
+
readonly 'color-accent-700': "oklch(0.46 0.16 250)";
|
|
38
|
+
readonly 'color-accent-800': "oklch(0.38 0.14 250)";
|
|
39
|
+
readonly 'color-accent-soft': "oklch(0.95 0.04 250)";
|
|
40
|
+
readonly 'radius-md': "8px";
|
|
41
|
+
readonly 'radius-lg': "12px";
|
|
42
|
+
};
|
|
43
|
+
/** Warm copper accent, tighter geometry. */
|
|
44
|
+
readonly gerege: {
|
|
45
|
+
readonly 'color-accent': "oklch(0.62 0.16 45)";
|
|
46
|
+
readonly 'color-accent-700': "oklch(0.54 0.16 45)";
|
|
47
|
+
readonly 'color-accent-800': "oklch(0.46 0.14 45)";
|
|
48
|
+
readonly 'color-accent-soft': "oklch(0.95 0.04 45)";
|
|
49
|
+
readonly 'radius-md': "4px";
|
|
50
|
+
readonly 'radius-lg': "6px";
|
|
51
|
+
};
|
|
52
|
+
/** Forest green accent. */
|
|
53
|
+
readonly forest: {
|
|
54
|
+
readonly 'color-accent': "oklch(0.55 0.14 155)";
|
|
55
|
+
readonly 'color-accent-700': "oklch(0.47 0.14 155)";
|
|
56
|
+
readonly 'color-accent-800': "oklch(0.39 0.12 155)";
|
|
57
|
+
readonly 'color-accent-soft': "oklch(0.95 0.04 155)";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type BrandName = keyof typeof brandPresets;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
3
|
/** Visual marker — small Lucide icon or custom illustration. */
|
|
4
4
|
icon?: ReactNode;
|
|
5
5
|
/** Heading. One short sentence. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface ErrorStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
export interface ErrorStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
3
|
/** `404` not-found, `500` server, or `generic` (catch-all). */
|
|
4
4
|
variant?: '404' | '500' | 'generic';
|
|
5
5
|
/** Override the default title. */
|
|
@@ -34,10 +34,10 @@ interface InternalToast extends ToastDescriptor {
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function useToast(): {
|
|
36
36
|
toasts: InternalToast[];
|
|
37
|
-
push: (t: ToastDescriptor) =>
|
|
38
|
-
dismiss: (id: string) =>
|
|
39
|
-
remove: (id: string) =>
|
|
37
|
+
push: (t: ToastDescriptor) => string;
|
|
38
|
+
dismiss: (id: string) => void;
|
|
39
|
+
remove: (id: string) => void;
|
|
40
40
|
};
|
|
41
41
|
/** Convenience export — dispatch a toast outside React (e.g. from an API client). */
|
|
42
|
-
export declare const toast: (t: ToastDescriptor) =>
|
|
42
|
+
export declare const toast: (t: ToastDescriptor) => string;
|
|
43
43
|
export {};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* - 20px for use inside buttons
|
|
9
9
|
* - strokeWidth 1.5
|
|
10
10
|
*/
|
|
11
|
-
export { AlertCircle, AlertTriangle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, BarChart3, Bell, Bookmark, Calendar, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, Copy, CornerDownLeft, CreditCard, Download, Edit2, Ellipsis, Eye, EyeOff, Filter, Folder, GripVertical, Home, Inbox, LayoutGrid, Lock, LogOut, HelpCircle, Info, Link2, Loader2, Mail, Menu, Minus, MoreHorizontal, Plug, Plus, Search, Sparkles, Settings, Sun, Moon, Trash2, Upload, User, Users, X, XCircle, ExternalLink, type LucideIcon, type LucideProps, } from 'lucide-react';
|
|
11
|
+
export { AlertCircle, AlertTriangle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, AtSign, BarChart3, Bell, Bookmark, Calendar, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, Copy, CornerDownLeft, CreditCard, Download, Edit2, Ellipsis, Eye, EyeOff, Filter, Folder, GripVertical, Home, Inbox, LayoutGrid, Lock, LogOut, HelpCircle, Info, Link2, Loader2, Mail, Menu, Minus, MoreHorizontal, Package, Plug, Plus, Search, Sparkles, Settings, Sun, Moon, Trash2, Upload, User, Users, X, XCircle, ExternalLink, type LucideIcon, type LucideProps, } from 'lucide-react';
|