@craftzbay/ui 0.8.0 → 0.8.1
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 +20 -15
- package/dist-lib/components/ui/Chart.d.ts +10 -7
- package/dist-lib/components/ui/DesignSystemProvider.d.ts +56 -30
- package/dist-lib/components/ui/Toast.d.ts +20 -0
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.d.ts +0 -11
- package/dist-lib/index.js +1911 -3034
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/styles.css +1 -1
- package/package.json +9 -12
- package/dist-lib/catalog.d.ts +0 -8
- package/dist-lib/components/patterns/AppShell.d.ts +0 -150
- package/dist-lib/components/patterns/Authentication.d.ts +0 -45
- package/dist-lib/components/patterns/DataTablePage.d.ts +0 -81
- package/dist-lib/components/patterns/FirstRunEmpty.d.ts +0 -39
- package/dist-lib/components/patterns/Onboarding.d.ts +0 -65
- package/dist-lib/components/patterns/Pricing.d.ts +0 -40
- package/dist-lib/components/patterns/RecordDetail.d.ts +0 -48
- package/dist-lib/components/patterns/Settings.d.ts +0 -34
- package/dist-lib/favicon.svg +0 -4
- package/dist-lib/showcase/components/Accordion.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Alert.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Avatar.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Badge.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Breadcrumbs.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Button.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Calendar.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Card.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Carousel.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Chart.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Checkbox.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Combobox.docs.d.ts +0 -3
- package/dist-lib/showcase/components/CommandPalette.docs.d.ts +0 -3
- package/dist-lib/showcase/components/ContextMenu.docs.d.ts +0 -3
- package/dist-lib/showcase/components/DataGrid.docs.d.ts +0 -3
- package/dist-lib/showcase/components/DatePicker.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Dialog.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Drawer.docs.d.ts +0 -3
- package/dist-lib/showcase/components/DropdownMenu.docs.d.ts +0 -3
- package/dist-lib/showcase/components/EmptyState.docs.d.ts +0 -3
- package/dist-lib/showcase/components/ErrorState.docs.d.ts +0 -3
- package/dist-lib/showcase/components/FileUpload.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Form.docs.d.ts +0 -3
- package/dist-lib/showcase/components/IconButton.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Input.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Kbd.docs.d.ts +0 -3
- package/dist-lib/showcase/components/MultiSelect.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Pagination.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Popover.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Progress.docs.d.ts +0 -3
- package/dist-lib/showcase/components/RadioGroup.docs.d.ts +0 -3
- package/dist-lib/showcase/components/ScrollArea.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Select.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Separator.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Sheet.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Sidebar.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Skeleton.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Slider.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Snackbar.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Spinner.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Stepper.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Switch.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Table.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Tabs.docs.d.ts +0 -3
- package/dist-lib/showcase/components/TagInput.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Textarea.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Timeline.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Toast.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Tooltip.docs.d.ts +0 -3
- package/dist-lib/showcase/components/TopNav.docs.d.ts +0 -3
- package/dist-lib/showcase/components/Tree.docs.d.ts +0 -3
- package/dist-lib/showcase/guides/DarkMode.d.ts +0 -1
- package/dist-lib/showcase/guides/Forms.d.ts +0 -1
- package/dist-lib/showcase/guides/Migration.d.ts +0 -1
- package/dist-lib/showcase/guides/Responsive.d.ts +0 -1
- package/dist-lib/showcase/guides/Theming.d.ts +0 -1
- package/dist-lib/showcase/layout/DocLayout.d.ts +0 -28
- package/dist-lib/showcase/layout/DocSidebar.d.ts +0 -41
- package/dist-lib/showcase/layout/ShowcaseFooter.d.ts +0 -5
- package/dist-lib/showcase/layout/ShowcaseTopBar.d.ts +0 -13
- package/dist-lib/showcase/layout/sidebars.d.ts +0 -22
- package/dist-lib/showcase/pages/ComponentDocPage.d.ts +0 -6
- package/dist-lib/showcase/pages/ComponentsIndexPage.d.ts +0 -1
- package/dist-lib/showcase/pages/GuidePage.d.ts +0 -6
- package/dist-lib/showcase/pages/GuidesIndexPage.d.ts +0 -1
- package/dist-lib/showcase/pages/HomePage.d.ts +0 -1
- package/dist-lib/showcase/pages/TemplateDocPage.d.ts +0 -6
- package/dist-lib/showcase/pages/TemplatesIndexPage.d.ts +0 -1
- package/dist-lib/showcase/registry/components.d.ts +0 -4
- package/dist-lib/showcase/registry/generated-props.d.ts +0 -7
- package/dist-lib/showcase/registry/guides.d.ts +0 -3
- package/dist-lib/showcase/registry/templates.d.ts +0 -3
- package/dist-lib/showcase/registry/types.d.ts +0 -69
- package/dist-lib/showcase/routing.d.ts +0 -39
- package/dist-lib/showcase/templates/AuthForgot.template.d.ts +0 -3
- package/dist-lib/showcase/templates/AuthMagic.template.d.ts +0 -3
- package/dist-lib/showcase/templates/AuthSignIn.template.d.ts +0 -3
- package/dist-lib/showcase/templates/AuthSignUp.template.d.ts +0 -3
- package/dist-lib/showcase/templates/Dashboard.template.d.ts +0 -3
- package/dist-lib/showcase/templates/DataTable.template.d.ts +0 -3
- package/dist-lib/showcase/templates/FirstRunEmpty.template.d.ts +0 -3
- package/dist-lib/showcase/templates/Onboarding.template.d.ts +0 -3
- package/dist-lib/showcase/templates/Pricing.template.d.ts +0 -3
- package/dist-lib/showcase/templates/RecordDetail.template.d.ts +0 -3
- package/dist-lib/showcase/templates/Settings.template.d.ts +0 -3
- package/dist-lib/showcase/widgets/CodeBlock.d.ts +0 -12
- package/dist-lib/showcase/widgets/CodePreview.d.ts +0 -14
- package/dist-lib/showcase/widgets/PropsTable.d.ts +0 -10
- package/dist-lib/showcase/widgets/SectionAnchor.d.ts +0 -13
- package/dist-lib/test/setup.d.ts +0 -0
- package/dist-lib/theme-init.js +0 -9
|
@@ -1,40 +0,0 @@
|
|
|
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,48 +0,0 @@
|
|
|
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,34 +0,0 @@
|
|
|
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;
|
package/dist-lib/favicon.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function DarkModeBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function FormsBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function MigrationBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ResponsiveBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ThemingBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DocSidebarSection } from './DocSidebar';
|
|
3
|
-
import { Route } from '../routing';
|
|
4
|
-
interface DocLayoutProps {
|
|
5
|
-
sidebar: DocSidebarSection[];
|
|
6
|
-
topLinks?: {
|
|
7
|
-
label: string;
|
|
8
|
-
route: Route;
|
|
9
|
-
}[];
|
|
10
|
-
current: {
|
|
11
|
-
kind: Route['kind'];
|
|
12
|
-
slug?: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Additional sections searched ONLY when a query is active. Pass the other
|
|
16
|
-
* kinds' sidebar sections so a user on the Components page can still find
|
|
17
|
-
* Templates / Guides through search.
|
|
18
|
-
*/
|
|
19
|
-
crossKindSections?: DocSidebarSection[];
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Two-column doc shell: left sidebar (sticky), right scrollable content.
|
|
24
|
-
* On screens < md the sidebar collapses behind a hamburger button that
|
|
25
|
-
* opens its contents in a left Sheet drawer.
|
|
26
|
-
*/
|
|
27
|
-
export declare function DocLayout({ sidebar, topLinks, current, crossKindSections, children, }: DocLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Route } from '../routing';
|
|
2
|
-
export interface DocSidebarEntry {
|
|
3
|
-
slug: string;
|
|
4
|
-
label: string;
|
|
5
|
-
group: string;
|
|
6
|
-
}
|
|
7
|
-
export interface DocSidebarSection {
|
|
8
|
-
/** Heading rendered above the section. Use 'top' for the "Get started" links. */
|
|
9
|
-
title: string;
|
|
10
|
-
/** kind = 'component' | 'template' | 'guide' — used to build the URL. */
|
|
11
|
-
kind: 'component' | 'template' | 'guide';
|
|
12
|
-
entries: DocSidebarEntry[];
|
|
13
|
-
}
|
|
14
|
-
interface DocSidebarProps {
|
|
15
|
-
sections: DocSidebarSection[];
|
|
16
|
-
current?: {
|
|
17
|
-
kind: Route['kind'];
|
|
18
|
-
slug?: string;
|
|
19
|
-
};
|
|
20
|
-
/** Top links: Overview / Components index / Templates index / Guides index. */
|
|
21
|
-
topLinks?: {
|
|
22
|
-
label: string;
|
|
23
|
-
route: Route;
|
|
24
|
-
}[];
|
|
25
|
-
/**
|
|
26
|
-
* Additional sections searched ONLY when a query is active. Lets the
|
|
27
|
-
* Components-page sidebar surface matching Templates and Guides results
|
|
28
|
-
* without showing them when the query is empty.
|
|
29
|
-
*/
|
|
30
|
-
crossKindSections?: DocSidebarSection[];
|
|
31
|
-
/**
|
|
32
|
-
* Render variant. `'desktop'` (default) is sticky-positioned and hidden
|
|
33
|
-
* on screens < md. `'mobile'` is plain block — meant to be embedded inside
|
|
34
|
-
* a Sheet content.
|
|
35
|
-
*/
|
|
36
|
-
variant?: 'desktop' | 'mobile';
|
|
37
|
-
/** Called when a link is clicked. Mobile uses this to close the Sheet. */
|
|
38
|
-
onNavigate?: () => void;
|
|
39
|
-
}
|
|
40
|
-
export declare function DocSidebar({ sections, current, topLinks, crossKindSections, variant, onNavigate, }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Route } from '../routing';
|
|
2
|
-
interface ShowcaseTopBarProps {
|
|
3
|
-
theme: 'light' | 'dark';
|
|
4
|
-
onToggleTheme: () => void;
|
|
5
|
-
onOpenPalette: () => void;
|
|
6
|
-
current: Route;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Persistent top bar shared by Home + docs pages. Hidden in full-bleed
|
|
10
|
-
* preview routes (templates rendered for screenshot / live use).
|
|
11
|
-
*/
|
|
12
|
-
export declare function ShowcaseTopBar({ theme, onToggleTheme, onOpenPalette, current, }: ShowcaseTopBarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Route } from '../routing';
|
|
2
|
-
import { DocSidebarSection } from './DocSidebar';
|
|
3
|
-
/**
|
|
4
|
-
* Build the sidebar sections + top links for each page kind.
|
|
5
|
-
* Same sidebar shape across components / templates / guides — only the
|
|
6
|
-
* active highlight differs.
|
|
7
|
-
*/
|
|
8
|
-
export declare function buildComponentSidebar(): DocSidebarSection[];
|
|
9
|
-
export declare function buildTemplateSidebar(): DocSidebarSection[];
|
|
10
|
-
export declare function buildGuideSidebar(): DocSidebarSection[];
|
|
11
|
-
export declare const docTopLinks: {
|
|
12
|
-
label: string;
|
|
13
|
-
route: Route;
|
|
14
|
-
}[];
|
|
15
|
-
type Kind = 'component' | 'template' | 'guide';
|
|
16
|
-
/**
|
|
17
|
-
* Returns the sidebar sections for the two kinds NOT matching `currentKind`.
|
|
18
|
-
* Passed to DocLayout as `crossKindSections` so the search input can surface
|
|
19
|
-
* matches from other docs sections without showing them when idle.
|
|
20
|
-
*/
|
|
21
|
-
export declare function buildCrossKindSections(currentKind: Kind): DocSidebarSection[];
|
|
22
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ComponentsIndexPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function GuidesIndexPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function HomePage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function TemplatesIndexPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PropGroup } from './types';
|
|
2
|
-
export declare const generatedProps: Record<string, PropGroup[]>;
|
|
3
|
-
/**
|
|
4
|
-
* Lookup helper: returns auto-generated props for a component, or undefined
|
|
5
|
-
* if the parser couldn't extract any (consumer should hand-write `api` then).
|
|
6
|
-
*/
|
|
7
|
-
export declare function getGeneratedProps(name: string): PropGroup[] | undefined;
|