zabi-components 6.0.0 → 7.0.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 +137 -1473
- package/dist/atoms/ActionPanel.svelte +116 -0
- package/dist/atoms/ActionPanel.svelte.d.ts +19 -0
- package/dist/atoms/Badge.svelte +1 -1
- package/dist/atoms/Badge.svelte.d.ts +1 -1
- package/dist/atoms/Button.svelte +38 -21
- package/dist/atoms/Button.svelte.d.ts +6 -6
- package/dist/atoms/Card.svelte +12 -3
- package/dist/atoms/Card.svelte.d.ts +2 -2
- package/dist/atoms/CardHeader.svelte +8 -4
- package/dist/atoms/CardHeader.svelte.d.ts +4 -2
- package/dist/atoms/Checkbox.svelte +50 -76
- package/dist/atoms/Checkbox.svelte.d.ts +7 -2
- package/dist/atoms/CodeBlock.svelte +20 -34
- package/dist/atoms/CodeBlock.svelte.d.ts +1 -0
- package/dist/atoms/ColorPicker.svelte +2 -6
- package/dist/atoms/Container.svelte +41 -0
- package/dist/atoms/Container.svelte.d.ts +12 -0
- package/dist/atoms/Divider.svelte +68 -0
- package/dist/atoms/Divider.svelte.d.ts +13 -0
- package/dist/atoms/FeatureCard.svelte +35 -50
- package/dist/atoms/FeatureCard.svelte.d.ts +9 -4
- package/dist/atoms/IconButton.svelte +36 -29
- package/dist/atoms/IconButton.svelte.d.ts +7 -13
- package/dist/atoms/Input.svelte +58 -26
- package/dist/atoms/Input.svelte.d.ts +6 -1
- package/dist/atoms/List.svelte +2 -7
- package/dist/atoms/List.svelte.d.ts +1 -6
- package/dist/atoms/ListItem.svelte +54 -65
- package/dist/atoms/ListItem.svelte.d.ts +7 -13
- package/dist/atoms/ListItemLeading.svelte +19 -0
- package/dist/atoms/ListItemLeading.svelte.d.ts +9 -0
- package/dist/atoms/Progress.svelte +1 -1
- package/dist/atoms/Radio.svelte +51 -0
- package/dist/atoms/Radio.svelte.d.ts +14 -0
- package/dist/atoms/Select.svelte +23 -30
- package/dist/atoms/Select.svelte.d.ts +0 -10
- package/dist/atoms/SelectionControl.svelte +98 -0
- package/dist/atoms/SelectionControl.svelte.d.ts +26 -0
- package/dist/atoms/Skeleton.svelte +39 -15
- package/dist/atoms/Skeleton.svelte.d.ts +7 -3
- package/dist/atoms/Table.svelte +27 -0
- package/dist/atoms/Table.svelte.d.ts +10 -0
- package/dist/atoms/Text.svelte +46 -0
- package/dist/atoms/Text.svelte.d.ts +13 -0
- package/dist/atoms/Textarea.svelte +74 -53
- package/dist/atoms/Textarea.svelte.d.ts +6 -2
- package/dist/atoms/ThemeToggle.svelte +35 -24
- package/dist/atoms/ThemeToggle.svelte.d.ts +1 -0
- package/dist/atoms/Toast.svelte +55 -31
- package/dist/atoms/Toast.svelte.d.ts +4 -1
- package/dist/atoms/Toggle.svelte +37 -22
- package/dist/atoms/Toggle.svelte.d.ts +2 -1
- package/dist/atoms/Tooltip.svelte +97 -14
- package/dist/atoms/Tooltip.svelte.d.ts +6 -5
- package/dist/atoms/index.d.ts +6 -0
- package/dist/atoms/index.js +6 -0
- package/dist/atoms/selection-control.styles.d.ts +25 -0
- package/dist/atoms/selection-control.styles.js +30 -0
- package/dist/components/atoms/index.d.ts +6 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/selection-control.styles.d.ts +26 -0
- package/dist/components/atoms/selection-control.styles.d.ts.map +1 -0
- package/dist/components/index.d.ts +41 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/molecules/index.d.ts +10 -0
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/navigation-menu-context.d.ts +11 -0
- package/dist/components/molecules/navigation-menu-context.d.ts.map +1 -1
- package/dist/components/molecules/toast-store.d.ts +39 -0
- package/dist/components/molecules/toast-store.d.ts.map +1 -0
- package/dist/components/organisms/index.d.ts +2 -1
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/types/page.types.d.ts +69 -0
- package/dist/components/types/page.types.d.ts.map +1 -0
- package/dist/components/types/page.types.js +1 -0
- package/dist/components/types/variants.d.ts +64 -0
- package/dist/components/types/variants.d.ts.map +1 -0
- package/dist/components/types/variants.js +44 -0
- package/dist/components/util/fixed-sidebar-flyout.d.ts +23 -0
- package/dist/components/util/fixed-sidebar-flyout.d.ts.map +1 -0
- package/dist/components/util/focus-utils.d.ts +12 -0
- package/dist/components/util/focus-utils.d.ts.map +1 -0
- package/dist/components/util/ssr-safe.d.ts +17 -0
- package/dist/components/util/ssr-safe.d.ts.map +1 -0
- package/dist/index.d.ts +41 -5
- package/dist/index.js +44 -8
- package/dist/lib/layout-width-tokens.d.ts +17 -0
- package/dist/lib/layout-width-tokens.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/Button.d.ts +3 -0
- package/dist/lib/showcase/component-docs/Button.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/Input.d.ts +3 -0
- package/dist/lib/showcase/component-docs/Input.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/List.d.ts +3 -0
- package/dist/lib/showcase/component-docs/List.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/Modal.d.ts +3 -0
- package/dist/lib/showcase/component-docs/Modal.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/Radio.d.ts +3 -0
- package/dist/lib/showcase/component-docs/Radio.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts +3 -0
- package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/Skeleton.d.ts +3 -0
- package/dist/lib/showcase/component-docs/Skeleton.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/_shared.d.ts +12 -0
- package/dist/lib/showcase/component-docs/_shared.d.ts.map +1 -0
- package/dist/lib/showcase/component-docs/index.d.ts +4 -0
- package/dist/lib/showcase/component-docs/index.d.ts.map +1 -0
- package/dist/lib/showcase/components-catalog.d.ts.map +1 -1
- package/dist/lib/showcase/components-showcase-constants.d.ts +26 -0
- package/dist/lib/showcase/components-showcase-constants.d.ts.map +1 -1
- package/dist/molecules/Alert.svelte +50 -23
- package/dist/molecules/Alert.svelte.d.ts +1 -1
- package/dist/molecules/ComponentDemo.svelte +2 -2
- package/dist/molecules/ContactForm.svelte +1 -1
- package/dist/molecules/Dropdown.svelte +99 -109
- package/dist/molecules/Dropdown.svelte.d.ts +12 -6
- package/dist/molecules/EmptyState.svelte +44 -0
- package/dist/molecules/EmptyState.svelte.d.ts +11 -0
- package/dist/molecules/FormField.svelte +89 -0
- package/dist/molecules/FormField.svelte.d.ts +23 -0
- package/dist/molecules/Header.svelte +41 -0
- package/dist/molecules/Header.svelte.d.ts +10 -0
- package/dist/molecules/Modal.svelte +37 -24
- package/dist/molecules/Modal.svelte.d.ts +4 -2
- package/dist/molecules/NavigationMenu.svelte +16 -0
- package/dist/molecules/NavigationMenu.svelte.d.ts +2 -0
- package/dist/molecules/NavigationMenuContent.svelte +9 -1
- package/dist/molecules/NavigationMenuLink.svelte +1 -1
- package/dist/molecules/NavigationMenuTrigger.svelte +9 -1
- package/dist/molecules/Page.svelte +16 -0
- package/dist/molecules/Page.svelte.d.ts +8 -0
- package/dist/molecules/PropsTable.svelte +61 -0
- package/dist/molecules/PropsTable.svelte.d.ts +8 -0
- package/dist/molecules/RadioGroup.svelte +197 -0
- package/dist/molecules/RadioGroup.svelte.d.ts +20 -0
- package/dist/molecules/Section.svelte +2 -11
- package/dist/molecules/Section.svelte.d.ts +2 -11
- package/dist/molecules/SidebarBrandHeader.svelte +68 -0
- package/dist/molecules/SidebarBrandHeader.svelte.d.ts +10 -0
- package/dist/molecules/SidebarFooter.svelte +119 -0
- package/dist/molecules/SidebarFooter.svelte.d.ts +23 -0
- package/dist/molecules/SidebarNavSection.svelte +49 -0
- package/dist/molecules/SidebarNavSection.svelte.d.ts +14 -0
- package/dist/molecules/SlideUp.svelte +19 -14
- package/dist/molecules/SlideUp.svelte.d.ts +1 -1
- package/dist/molecules/Tabs.svelte +4 -9
- package/dist/molecules/Toaster.svelte +21 -0
- package/dist/molecules/Toaster.svelte.d.ts +6 -0
- package/dist/molecules/ToasterToast.svelte +217 -0
- package/dist/molecules/ToasterToast.svelte.d.ts +7 -0
- package/dist/molecules/index.d.ts +10 -0
- package/dist/molecules/index.js +10 -0
- package/dist/molecules/navigation-menu-context.d.ts +11 -0
- package/dist/molecules/navigation-menu-context.js +18 -0
- package/dist/molecules/toast-store.d.ts +38 -0
- package/dist/molecules/toast-store.js +34 -0
- package/dist/organisms/SidebarAccountPanel.svelte +118 -0
- package/dist/organisms/SidebarAccountPanel.svelte.d.ts +20 -0
- package/dist/organisms/SidebarNavigation.svelte +267 -237
- package/dist/organisms/SidebarNavigation.svelte.d.ts +21 -5
- package/dist/organisms/SidebarPanel.svelte +54 -22
- package/dist/organisms/SidebarPanel.svelte.d.ts +3 -0
- package/dist/organisms/{Navbar.svelte → TopNavbar.svelte} +22 -17
- package/dist/organisms/TopNavbar.svelte.d.ts +35 -0
- package/dist/organisms/index.d.ts +2 -1
- package/dist/organisms/index.js +2 -1
- package/dist/routes/lib/focus-utils.d.ts +7 -18
- package/dist/routes/lib/focus-utils.ts +32 -34
- package/dist/routes/lib/ssr-safe.ts +5 -4
- package/dist/routes/lib/variant-utils.ts +48 -39
- package/dist/types/components.d.ts +187 -0
- package/dist/types/components.d.ts.map +1 -0
- package/dist/types/events.d.ts +200 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/index.d.ts +171 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/page.types.d.ts +2 -31
- package/dist/types/page.types.d.ts.map +1 -1
- package/dist/types/page.types.js +1 -0
- package/dist/types/page.types.ts +79 -0
- package/dist/types/variants.d.ts +3 -0
- package/dist/types/variants.d.ts.map +1 -0
- package/dist/types/variants.js +1 -0
- package/dist/types/variants.ts +5 -6
- package/dist/util/fixed-sidebar-flyout.d.ts +22 -0
- package/dist/util/fixed-sidebar-flyout.js +148 -0
- package/dist/util/focus-utils.d.ts +11 -0
- package/dist/util/focus-utils.js +94 -0
- package/dist/util/ssr-safe.d.ts +16 -0
- package/dist/util/ssr-safe.js +48 -0
- package/dist/zabi-components-colors.css +128 -115
- package/dist/zabi-components-theme-dark-only.css +77 -72
- package/dist/zabi-components-theme-dark.css +77 -72
- package/dist/zabi-components-theme-only.css +51 -43
- package/dist/zabi-components-theme.css +51 -43
- package/dist/zabi-components.css +952 -249
- package/docs/lucide-icons.md +24 -0
- package/package.json +22 -9
- package/scripts/fix-lucide-svelte-icon-dts.js +35 -0
- package/dist/organisms/Navbar.svelte.d.ts +0 -41
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type ToastLevel = 'success' | 'error' | 'warning' | 'info';
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Primary line (always shown). */
|
|
5
|
+
message: string;
|
|
6
|
+
type: ToastLevel;
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Expandable body; UI can fall back to `message`. */
|
|
9
|
+
detail?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Auto-dismiss duration in milliseconds.
|
|
12
|
+
* When omitted, the toaster uses 14s. Use `0` to keep the toast until dismissed manually.
|
|
13
|
+
*/
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const toastStore: {
|
|
17
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<ToastItem[]>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
|
|
18
|
+
push(options: {
|
|
19
|
+
message: string;
|
|
20
|
+
type?: ToastLevel;
|
|
21
|
+
/** Same semantics as {@link ToastItem.duration}. */
|
|
22
|
+
duration?: number;
|
|
23
|
+
id?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
detail?: string;
|
|
26
|
+
}): string;
|
|
27
|
+
dismiss: (id: string) => void;
|
|
28
|
+
clear(): void;
|
|
29
|
+
};
|
|
30
|
+
export declare function pushToast(options: {
|
|
31
|
+
message: string;
|
|
32
|
+
type?: ToastLevel;
|
|
33
|
+
/** Same semantics as {@link ToastItem.duration}. */
|
|
34
|
+
duration?: number;
|
|
35
|
+
title?: string;
|
|
36
|
+
detail?: string;
|
|
37
|
+
}): string;
|
|
38
|
+
export declare function dismissToast(id: string): void;
|
|
39
|
+
//# sourceMappingURL=toast-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-store.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/toast-store.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAwCD,eAAO,MAAM,UAAU;;kBA7BD;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB,oDAAoD;QACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,MAAM;kBAdO,MAAM;;CAmCa,CAAC;AAE7C,wBAAgB,SAAS,CAAC,OAAO,EAAE;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAET;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as TopNavbar } from './TopNavbar.svelte';
|
|
2
2
|
export { default as SidebarNavigation } from './SidebarNavigation.svelte';
|
|
3
|
+
export { default as SidebarAccountPanel } from './SidebarAccountPanel.svelte';
|
|
3
4
|
export { default as SidebarPanel } from './SidebarPanel.svelte';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export interface NavItem {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ContactFormData {
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
subscribe?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ComponentMetadata {
|
|
12
|
+
name: string;
|
|
13
|
+
category: 'atoms' | 'molecules' | 'organisms';
|
|
14
|
+
description: string;
|
|
15
|
+
props: ComponentProp[];
|
|
16
|
+
variants?: string[];
|
|
17
|
+
examples: ComponentExample[];
|
|
18
|
+
}
|
|
19
|
+
export interface ComponentProp {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
description: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ComponentExample {
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
code: string;
|
|
30
|
+
language?: string;
|
|
31
|
+
/** Optional demo id for rendering live previews via a registry. */
|
|
32
|
+
demoId?: string;
|
|
33
|
+
}
|
|
34
|
+
export type ComponentCategory = 'atoms' | 'molecules' | 'organisms';
|
|
35
|
+
export type ComponentDocSectionId = 'live' | 'snippet' | 'variants' | 'props' | 'guidelines';
|
|
36
|
+
export interface ComponentDocExample {
|
|
37
|
+
title: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
/** Demo renderer id, resolved via a registry. */
|
|
40
|
+
demoId: string;
|
|
41
|
+
/** Copy/paste ready snippet that matches the live demo. */
|
|
42
|
+
code: string;
|
|
43
|
+
language?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ComponentDocGuidelines {
|
|
46
|
+
whenToUse: string[];
|
|
47
|
+
whenToAvoid?: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface ComponentDoc {
|
|
50
|
+
name: string;
|
|
51
|
+
category: ComponentCategory;
|
|
52
|
+
/** Short description: what it is + when to use. */
|
|
53
|
+
description: string;
|
|
54
|
+
/** Primary live example shown first. */
|
|
55
|
+
defaultExample: ComponentDocExample;
|
|
56
|
+
/** Optional additional examples (variants/states/realistic patterns). */
|
|
57
|
+
examples?: ComponentDocExample[];
|
|
58
|
+
/** Optional list of variants/states, for quick scanning. */
|
|
59
|
+
variantsStates?: string[];
|
|
60
|
+
/** Props/API for the exported component. */
|
|
61
|
+
props: ComponentProp[];
|
|
62
|
+
guidelines?: ComponentDocGuidelines;
|
|
63
|
+
/** Optional section visibility/order overrides (defaults to canonical order). */
|
|
64
|
+
sections?: Array<{
|
|
65
|
+
id: ComponentDocSectionId;
|
|
66
|
+
hidden?: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=page.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.types.d.ts","sourceRoot":"","sources":["../../../src/components/types/page.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;AAEpE,MAAM,MAAM,qBAAqB,GAC3B,MAAM,GACN,SAAS,GACT,UAAU,GACV,OAAO,GACP,YAAY,CAAC;AAEnB,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,cAAc,EAAE,mBAAmB,CAAC;IACpC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,4CAA4C;IAC5C,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,iFAAiF;IACjF,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,qBAAqB,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized variant type definitions for zabi-components
|
|
3
|
+
*
|
|
4
|
+
* This file provides consistent variant naming conventions across all components.
|
|
5
|
+
* Variants are categorized into semantic color variants and style variants.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Semantic color variants - used for state indication
|
|
9
|
+
* These variants use semantic colors (success, warning, error, info) to indicate meaning
|
|
10
|
+
*/
|
|
11
|
+
export type SemanticVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
12
|
+
/**
|
|
13
|
+
* Extended semantic variants - includes additional semantic colors
|
|
14
|
+
* Used by components that support more semantic states
|
|
15
|
+
*/
|
|
16
|
+
export type ExtendedSemanticVariant = SemanticVariant | 'neutral' | 'energetic';
|
|
17
|
+
/**
|
|
18
|
+
* Button style variants - used for different button styles
|
|
19
|
+
* These are style-based variants, not semantic color variants
|
|
20
|
+
*/
|
|
21
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline' | 'link';
|
|
22
|
+
/**
|
|
23
|
+
* Card style variants - used for different card appearances
|
|
24
|
+
*/
|
|
25
|
+
export type CardVariant = 'default' | 'elevated' | 'outlined' | 'flat';
|
|
26
|
+
/**
|
|
27
|
+
* Component size variants - consistent across all components
|
|
28
|
+
*/
|
|
29
|
+
export type SizeVariant = 'sm' | 'md' | 'lg';
|
|
30
|
+
/**
|
|
31
|
+
* Helper type to check if a variant is a semantic variant
|
|
32
|
+
*/
|
|
33
|
+
export declare function isSemanticVariant(variant: string): variant is SemanticVariant;
|
|
34
|
+
/**
|
|
35
|
+
* Helper type to check if a variant is an extended semantic variant
|
|
36
|
+
*/
|
|
37
|
+
export declare function isExtendedSemanticVariant(variant: string): variant is ExtendedSemanticVariant;
|
|
38
|
+
/**
|
|
39
|
+
* Variant naming conventions:
|
|
40
|
+
*
|
|
41
|
+
* 1. Semantic Color Variants (for state indication):
|
|
42
|
+
* - default: Standard/default appearance
|
|
43
|
+
* - success: Positive/successful state (green)
|
|
44
|
+
* - warning: Cautionary state (yellow/amber)
|
|
45
|
+
* - error: Error/dangerous state (red)
|
|
46
|
+
* - info: Informational state (blue)
|
|
47
|
+
* - neutral: Neutral state (gray)
|
|
48
|
+
* - energetic: Energetic/vibrant state (yellow/orange)
|
|
49
|
+
*
|
|
50
|
+
* 2. Style Variants (for visual appearance):
|
|
51
|
+
* - Button: primary, secondary, danger, ghost, outline, link
|
|
52
|
+
* - Card: default, elevated, outlined, flat
|
|
53
|
+
*
|
|
54
|
+
* 3. Size Variants (consistent across components):
|
|
55
|
+
* - sm: Small size
|
|
56
|
+
* - md: Medium size (default)
|
|
57
|
+
* - lg: Large size
|
|
58
|
+
*
|
|
59
|
+
* Usage Guidelines:
|
|
60
|
+
* - Use semantic variants when the variant indicates a state or meaning
|
|
61
|
+
* - Use style variants when the variant changes visual appearance only
|
|
62
|
+
* - Always use SizeVariant for size props
|
|
63
|
+
*/
|
|
64
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/types/variants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,eAAe,CAE7E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,uBAAuB,CAE7F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized variant type definitions for zabi-components
|
|
3
|
+
*
|
|
4
|
+
* This file provides consistent variant naming conventions across all components.
|
|
5
|
+
* Variants are categorized into semantic color variants and style variants.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Helper type to check if a variant is a semantic variant
|
|
9
|
+
*/
|
|
10
|
+
export function isSemanticVariant(variant) {
|
|
11
|
+
return ['default', 'success', 'warning', 'error', 'info'].includes(variant);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Helper type to check if a variant is an extended semantic variant
|
|
15
|
+
*/
|
|
16
|
+
export function isExtendedSemanticVariant(variant) {
|
|
17
|
+
return ['default', 'success', 'warning', 'error', 'info', 'neutral', 'energetic'].includes(variant);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Variant naming conventions:
|
|
21
|
+
*
|
|
22
|
+
* 1. Semantic Color Variants (for state indication):
|
|
23
|
+
* - default: Standard/default appearance
|
|
24
|
+
* - success: Positive/successful state (green)
|
|
25
|
+
* - warning: Cautionary state (yellow/amber)
|
|
26
|
+
* - error: Error/dangerous state (red)
|
|
27
|
+
* - info: Informational state (blue)
|
|
28
|
+
* - neutral: Neutral state (gray)
|
|
29
|
+
* - energetic: Energetic/vibrant state (yellow/orange)
|
|
30
|
+
*
|
|
31
|
+
* 2. Style Variants (for visual appearance):
|
|
32
|
+
* - Button: primary, secondary, danger, ghost, outline, link
|
|
33
|
+
* - Card: default, elevated, outlined, flat
|
|
34
|
+
*
|
|
35
|
+
* 3. Size Variants (consistent across components):
|
|
36
|
+
* - sm: Small size
|
|
37
|
+
* - md: Medium size (default)
|
|
38
|
+
* - lg: Large size
|
|
39
|
+
*
|
|
40
|
+
* Usage Guidelines:
|
|
41
|
+
* - Use semantic variants when the variant indicates a state or meaning
|
|
42
|
+
* - Use style variants when the variant changes visual appearance only
|
|
43
|
+
* - Always use SizeVariant for size props
|
|
44
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Action } from "svelte/action";
|
|
2
|
+
export type SidebarFlyoutAlign = "top" | "bottom";
|
|
3
|
+
/** Which trigger inside the flyout root to pin to (when multiple anchors exist). */
|
|
4
|
+
export type SidebarFlyoutAnchorRole = "search" | "profile";
|
|
5
|
+
export interface FixedSidebarFlyoutParams {
|
|
6
|
+
open: boolean;
|
|
7
|
+
align: SidebarFlyoutAlign;
|
|
8
|
+
gap?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Prefer setting this when the root contains both search and profile anchors
|
|
11
|
+
* (same `SidebarNavigation`). Defaults to the first `[data-sidebar-flyout-anchor]`.
|
|
12
|
+
*/
|
|
13
|
+
anchorRole?: SidebarFlyoutAnchorRole;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Pins a flyout with `position: fixed` next to the trigger marked with
|
|
17
|
+
* `[data-sidebar-flyout-anchor]` inside `[data-sidebar-flyout-root]` (typically the
|
|
18
|
+
* search or profile button), updating on scroll and resize.
|
|
19
|
+
* While open, the node is moved to `document.body` so `overflow-y: auto` / scroll
|
|
20
|
+
* ancestors cannot clip it (fixed descendants are still painted inside scrollports).
|
|
21
|
+
*/
|
|
22
|
+
export declare const fixedSidebarFlyout: Action<HTMLElement, FixedSidebarFlyoutParams>;
|
|
23
|
+
//# sourceMappingURL=fixed-sidebar-flyout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixed-sidebar-flyout.d.ts","sourceRoot":"","sources":["../../../src/components/util/fixed-sidebar-flyout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACxC;AA4BD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACnC,WAAW,EACX,wBAAwB,CAgJ3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Focus helpers for overlays (modals, sheets). Requires `app.css` focus ring classes. */
|
|
2
|
+
/** From `app.css` `@layer components` — import the library/app stylesheet. */
|
|
3
|
+
export declare const FOCUS_BRAND_CLASS = "focus-brand";
|
|
4
|
+
export declare const FOCUS_NAV_CLASS = "focus-nav";
|
|
5
|
+
export declare function getFocusableElements(container: HTMLElement): HTMLElement[];
|
|
6
|
+
/** Tab wraps first↔last inside `container`. Caller should pair with `saveFocus` / `returnFocus`. */
|
|
7
|
+
export declare function trapFocus(container: HTMLElement): () => void;
|
|
8
|
+
export declare function saveFocus(): void;
|
|
9
|
+
/** Restores focus from the last `saveFocus`. Skips disconnected or unfocusable nodes. */
|
|
10
|
+
export declare function returnFocus(): void;
|
|
11
|
+
export declare function focusFirstElement(container: HTMLElement): void;
|
|
12
|
+
//# sourceMappingURL=focus-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-utils.d.ts","sourceRoot":"","sources":["../../../src/components/util/focus-utils.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,EAAE,CAgB1E;AAED,oGAAoG;AACpG,wBAAgB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,IAAI,CA2C5D;AAKD,wBAAgB,SAAS,IAAI,IAAI,CAUhC;AAED,yFAAyF;AACzF,wBAAgB,WAAW,IAAI,IAAI,CAgBlC;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAK9D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-only guards and id generation for components that run under SSR.
|
|
3
|
+
* `generateId()` is non-deterministic on the client (random) vs counter on the server —
|
|
4
|
+
* use stable ids for ARIA pairs (e.g. `menuId` on NavigationMenu), not for persisted keys.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isBrowser(): boolean;
|
|
7
|
+
export declare function safeWindow(): Window | undefined;
|
|
8
|
+
export declare function safeDocument(): Document | undefined;
|
|
9
|
+
export declare function safeLocalStorage(): Storage | undefined;
|
|
10
|
+
export declare function safeSessionStorage(): Storage | undefined;
|
|
11
|
+
export declare function safeRequestAnimationFrame(callback: FrameRequestCallback): number | undefined;
|
|
12
|
+
export declare function safeSetTimeout(callback: () => void, delay: number): NodeJS.Timeout | undefined;
|
|
13
|
+
export declare function safeClearTimeout(id: NodeJS.Timeout | undefined): void;
|
|
14
|
+
export declare function safeSetInterval(callback: () => void, delay: number): NodeJS.Timeout | undefined;
|
|
15
|
+
export declare function safeClearInterval(id: NodeJS.Timeout | undefined): void;
|
|
16
|
+
export declare function generateId(prefix?: string): string;
|
|
17
|
+
//# sourceMappingURL=ssr-safe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-safe.d.ts","sourceRoot":"","sources":["../../../src/components/util/ssr-safe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAE/C;AAED,wBAAgB,YAAY,IAAI,QAAQ,GAAG,SAAS,CAEnD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAEtD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,GAAG,SAAS,CAExD;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,GAAG,SAAS,CAE5F;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,SAAS,CAE9F;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,GAAG,IAAI,CAIrE;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,SAAS,CAE/F;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,GAAG,IAAI,CAItE;AAGD,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM,CAMxD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export { default as Toggle } from './atoms/Toggle.svelte';
|
|
2
2
|
export { default as Badge } from './atoms/Badge.svelte';
|
|
3
3
|
export { default as Button } from './atoms/Button.svelte';
|
|
4
|
+
export { default as IconButton } from './atoms/IconButton.svelte';
|
|
4
5
|
export { default as Card } from './atoms/Card.svelte';
|
|
6
|
+
export { default as CardHeader } from './atoms/CardHeader.svelte';
|
|
7
|
+
export { default as CardContent } from './atoms/CardContent.svelte';
|
|
8
|
+
export { default as CardFooter } from './atoms/CardFooter.svelte';
|
|
5
9
|
export { default as Input } from './atoms/Input.svelte';
|
|
6
10
|
export { default as Textarea } from './atoms/Textarea.svelte';
|
|
7
11
|
export { default as Select } from './atoms/Select.svelte';
|
|
@@ -10,26 +14,58 @@ export { default as List } from './atoms/List.svelte';
|
|
|
10
14
|
export { default as ListItem } from './atoms/ListItem.svelte';
|
|
11
15
|
export { default as Heading } from './atoms/Heading.svelte';
|
|
12
16
|
export { default as ThemeToggle } from './atoms/ThemeToggle.svelte';
|
|
17
|
+
export { default as Divider } from './atoms/Divider.svelte';
|
|
18
|
+
export { default as Container } from './atoms/Container.svelte';
|
|
19
|
+
export { default as Text } from './atoms/Text.svelte';
|
|
20
|
+
export { default as Table } from './atoms/Table.svelte';
|
|
21
|
+
export { default as Toast } from './atoms/Toast.svelte';
|
|
22
|
+
export { default as Tooltip } from './atoms/Tooltip.svelte';
|
|
23
|
+
export { default as Progress } from './atoms/Progress.svelte';
|
|
24
|
+
export { default as Skeleton } from './atoms/Skeleton.svelte';
|
|
25
|
+
export { default as Checkbox } from './atoms/Checkbox.svelte';
|
|
26
|
+
export { default as Radio } from './atoms/Radio.svelte';
|
|
27
|
+
export { default as CodeBlock } from './atoms/CodeBlock.svelte';
|
|
28
|
+
export { default as FeatureCard } from './atoms/FeatureCard.svelte';
|
|
29
|
+
export { default as OptimizedImage } from './atoms/OptimizedImage.svelte';
|
|
30
|
+
export { default as ActionPanel } from './atoms/ActionPanel.svelte';
|
|
13
31
|
export { default as Alert } from './molecules/Alert.svelte';
|
|
14
32
|
export { default as ComponentDemo } from './molecules/ComponentDemo.svelte';
|
|
15
33
|
export { default as ContactForm } from './molecules/ContactForm.svelte';
|
|
16
34
|
export { default as Dropdown } from './molecules/Dropdown.svelte';
|
|
17
35
|
export { default as Form } from './molecules/Form.svelte';
|
|
36
|
+
export { default as FormField } from './molecules/FormField.svelte';
|
|
37
|
+
export { default as Header } from './molecules/Header.svelte';
|
|
38
|
+
export { default as EmptyState } from './molecules/EmptyState.svelte';
|
|
39
|
+
export { default as Toaster } from './molecules/Toaster.svelte';
|
|
18
40
|
export { default as ImageUpload } from './molecules/ImageUpload.svelte';
|
|
19
41
|
export { default as Modal } from './molecules/Modal.svelte';
|
|
20
42
|
export { default as SlideUp } from './molecules/SlideUp.svelte';
|
|
21
43
|
export { default as Tabs } from './molecules/Tabs.svelte';
|
|
22
|
-
export { default as
|
|
44
|
+
export { default as RadioGroup } from './molecules/RadioGroup.svelte';
|
|
45
|
+
export { default as NavigationMenu } from './molecules/NavigationMenu.svelte';
|
|
46
|
+
export { default as NavigationMenuList } from './molecules/NavigationMenuList.svelte';
|
|
47
|
+
export { default as NavigationMenuItem } from './molecules/NavigationMenuItem.svelte';
|
|
48
|
+
export { default as NavigationMenuTrigger } from './molecules/NavigationMenuTrigger.svelte';
|
|
49
|
+
export { default as NavigationMenuContent } from './molecules/NavigationMenuContent.svelte';
|
|
50
|
+
export { default as NavigationMenuLink } from './molecules/NavigationMenuLink.svelte';
|
|
51
|
+
export { default as Page } from './molecules/Page.svelte';
|
|
52
|
+
export { default as Section } from './molecules/Section.svelte';
|
|
53
|
+
export { default as SidebarBrandHeader } from './molecules/SidebarBrandHeader.svelte';
|
|
54
|
+
export { default as SidebarFooter } from './molecules/SidebarFooter.svelte';
|
|
55
|
+
export { default as SidebarNavSection } from './molecules/SidebarNavSection.svelte';
|
|
56
|
+
export { toastStore, pushToast, dismissToast, type ToastItem, type ToastLevel, } from './molecules/toast-store.js';
|
|
57
|
+
export { default as TopNavbar } from './organisms/TopNavbar.svelte';
|
|
23
58
|
export { default as SidebarNavigation } from './organisms/SidebarNavigation.svelte';
|
|
59
|
+
export { default as SidebarAccountPanel } from './organisms/SidebarAccountPanel.svelte';
|
|
24
60
|
export { default as SidebarPanel } from './organisms/SidebarPanel.svelte';
|
|
61
|
+
export declare const generateId: (prefix?: string) => string;
|
|
25
62
|
export declare const createId: (prefix?: string) => string;
|
|
26
63
|
export declare const cn: (...classes: (string | undefined | null | false)[]) => string;
|
|
27
|
-
export declare const getFormData: (form: HTMLFormElement) => Record<string,
|
|
64
|
+
export declare const getFormData: (form: HTMLFormElement) => Record<string, unknown>;
|
|
28
65
|
export declare const validateEmail: (email: string) => boolean;
|
|
29
|
-
export declare const validateRequired: (value:
|
|
66
|
+
export declare const validateRequired: (value: unknown) => boolean;
|
|
30
67
|
export declare const isBrowser: () => boolean;
|
|
31
68
|
export declare const safeWindow: () => Window | undefined;
|
|
32
69
|
export declare const safeDocument: () => Document | undefined;
|
|
33
70
|
export declare const safeLocalStorage: () => Storage | undefined;
|
|
34
|
-
export
|
|
35
|
-
export { Sun, Moon, Monitor, Grip, GripVertical, ChevronUp, ChevronDown, ChevronRight, Zap, Briefcase, Clipboard, Settings } from '@lucide/svelte';
|
|
71
|
+
export { Sun, Moon, Monitor, Grip, GripVertical, ChevronUp, ChevronDown, ChevronRight, Zap, Briefcase, Clipboard, Settings, } from '@lucide/svelte';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export { default as Toggle } from './atoms/Toggle.svelte';
|
|
2
2
|
export { default as Badge } from './atoms/Badge.svelte';
|
|
3
3
|
export { default as Button } from './atoms/Button.svelte';
|
|
4
|
+
export { default as IconButton } from './atoms/IconButton.svelte';
|
|
4
5
|
export { default as Card } from './atoms/Card.svelte';
|
|
6
|
+
export { default as CardHeader } from './atoms/CardHeader.svelte';
|
|
7
|
+
export { default as CardContent } from './atoms/CardContent.svelte';
|
|
8
|
+
export { default as CardFooter } from './atoms/CardFooter.svelte';
|
|
5
9
|
export { default as Input } from './atoms/Input.svelte';
|
|
6
10
|
export { default as Textarea } from './atoms/Textarea.svelte';
|
|
7
11
|
export { default as Select } from './atoms/Select.svelte';
|
|
@@ -10,18 +14,56 @@ export { default as List } from './atoms/List.svelte';
|
|
|
10
14
|
export { default as ListItem } from './atoms/ListItem.svelte';
|
|
11
15
|
export { default as Heading } from './atoms/Heading.svelte';
|
|
12
16
|
export { default as ThemeToggle } from './atoms/ThemeToggle.svelte';
|
|
17
|
+
export { default as Divider } from './atoms/Divider.svelte';
|
|
18
|
+
export { default as Container } from './atoms/Container.svelte';
|
|
19
|
+
export { default as Text } from './atoms/Text.svelte';
|
|
20
|
+
export { default as Table } from './atoms/Table.svelte';
|
|
21
|
+
export { default as Toast } from './atoms/Toast.svelte';
|
|
22
|
+
export { default as Tooltip } from './atoms/Tooltip.svelte';
|
|
23
|
+
export { default as Progress } from './atoms/Progress.svelte';
|
|
24
|
+
export { default as Skeleton } from './atoms/Skeleton.svelte';
|
|
25
|
+
export { default as Checkbox } from './atoms/Checkbox.svelte';
|
|
26
|
+
export { default as Radio } from './atoms/Radio.svelte';
|
|
27
|
+
export { default as CodeBlock } from './atoms/CodeBlock.svelte';
|
|
28
|
+
export { default as FeatureCard } from './atoms/FeatureCard.svelte';
|
|
29
|
+
export { default as OptimizedImage } from './atoms/OptimizedImage.svelte';
|
|
30
|
+
export { default as ActionPanel } from './atoms/ActionPanel.svelte';
|
|
13
31
|
export { default as Alert } from './molecules/Alert.svelte';
|
|
14
32
|
export { default as ComponentDemo } from './molecules/ComponentDemo.svelte';
|
|
15
33
|
export { default as ContactForm } from './molecules/ContactForm.svelte';
|
|
16
34
|
export { default as Dropdown } from './molecules/Dropdown.svelte';
|
|
17
35
|
export { default as Form } from './molecules/Form.svelte';
|
|
36
|
+
export { default as FormField } from './molecules/FormField.svelte';
|
|
37
|
+
export { default as Header } from './molecules/Header.svelte';
|
|
38
|
+
export { default as EmptyState } from './molecules/EmptyState.svelte';
|
|
39
|
+
export { default as Toaster } from './molecules/Toaster.svelte';
|
|
18
40
|
export { default as ImageUpload } from './molecules/ImageUpload.svelte';
|
|
19
41
|
export { default as Modal } from './molecules/Modal.svelte';
|
|
20
42
|
export { default as SlideUp } from './molecules/SlideUp.svelte';
|
|
21
43
|
export { default as Tabs } from './molecules/Tabs.svelte';
|
|
22
|
-
export { default as
|
|
44
|
+
export { default as RadioGroup } from './molecules/RadioGroup.svelte';
|
|
45
|
+
export { default as NavigationMenu } from './molecules/NavigationMenu.svelte';
|
|
46
|
+
export { default as NavigationMenuList } from './molecules/NavigationMenuList.svelte';
|
|
47
|
+
export { default as NavigationMenuItem } from './molecules/NavigationMenuItem.svelte';
|
|
48
|
+
export { default as NavigationMenuTrigger } from './molecules/NavigationMenuTrigger.svelte';
|
|
49
|
+
export { default as NavigationMenuContent } from './molecules/NavigationMenuContent.svelte';
|
|
50
|
+
export { default as NavigationMenuLink } from './molecules/NavigationMenuLink.svelte';
|
|
51
|
+
export { default as Page } from './molecules/Page.svelte';
|
|
52
|
+
export { default as Section } from './molecules/Section.svelte';
|
|
53
|
+
export { default as SidebarBrandHeader } from './molecules/SidebarBrandHeader.svelte';
|
|
54
|
+
export { default as SidebarFooter } from './molecules/SidebarFooter.svelte';
|
|
55
|
+
export { default as SidebarNavSection } from './molecules/SidebarNavSection.svelte';
|
|
56
|
+
export { toastStore, pushToast, dismissToast, } from './molecules/toast-store.js';
|
|
57
|
+
export { default as TopNavbar } from './organisms/TopNavbar.svelte';
|
|
23
58
|
export { default as SidebarNavigation } from './organisms/SidebarNavigation.svelte';
|
|
59
|
+
export { default as SidebarAccountPanel } from './organisms/SidebarAccountPanel.svelte';
|
|
24
60
|
export { default as SidebarPanel } from './organisms/SidebarPanel.svelte';
|
|
61
|
+
export const generateId = (prefix = 'id') => {
|
|
62
|
+
if (typeof window !== 'undefined') {
|
|
63
|
+
return `${prefix}-${Math.random().toString(36).substr(2, 9)}`;
|
|
64
|
+
}
|
|
65
|
+
return `${prefix}-ssr-${Date.now()}`;
|
|
66
|
+
};
|
|
25
67
|
export const createId = (prefix = 'id') => generateId(prefix);
|
|
26
68
|
export const cn = (...classes) => classes.filter(Boolean).join(' ');
|
|
27
69
|
export const getFormData = (form) => {
|
|
@@ -47,10 +89,4 @@ export const safeDocument = () => {
|
|
|
47
89
|
export const safeLocalStorage = () => {
|
|
48
90
|
return typeof window !== 'undefined' ? localStorage : undefined;
|
|
49
91
|
};
|
|
50
|
-
export
|
|
51
|
-
if (typeof window !== 'undefined') {
|
|
52
|
-
return `${prefix}-${Math.random().toString(36).substr(2, 9)}`;
|
|
53
|
-
}
|
|
54
|
-
return `${prefix}-ssr-${Date.now()}`;
|
|
55
|
-
};
|
|
56
|
-
export { Sun, Moon, Monitor, Grip, GripVertical, ChevronUp, ChevronDown, ChevronRight, Zap, Briefcase, Clipboard, Settings } from '@lucide/svelte';
|
|
92
|
+
export { Sun, Moon, Monitor, Grip, GripVertical, ChevronUp, ChevronDown, ChevronRight, Zap, Briefcase, Clipboard, Settings, } from '@lucide/svelte';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Named aliases for layout widths that are otherwise enforced as literals in
|
|
3
|
+
* `scripts/layout-width-policy.js` (see `ARBITRARY_MAX_WIDTH`).
|
|
4
|
+
*
|
|
5
|
+
* **Sync rule:** values MUST match `ARBITRARY_MAX_WIDTH` keys exactly. After
|
|
6
|
+
* changing policy, update this file (or vice versa) and run `npm run check`.
|
|
7
|
+
*
|
|
8
|
+
* Prefer `<Container>` / `<Section>` `maxWidth` for screen tokens; use these
|
|
9
|
+
* only where a fixed arbitrary literal is still required (shell, demos).
|
|
10
|
+
*/
|
|
11
|
+
export declare const layoutArbitraryWidth: {
|
|
12
|
+
/** DOCS_CATALOG_SIDEBAR_CAP — mobile drawer cap for /components sidebar */
|
|
13
|
+
readonly docsCatalogSidebar: "max-w-[266px]";
|
|
14
|
+
/** SIDEBAR_APP_SHELL_RAIL — showcase app-shell sidebar column demo */
|
|
15
|
+
readonly showcaseSidebarRail: "max-w-[280px]";
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=layout-width-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-width-tokens.d.ts","sourceRoot":"","sources":["../../src/lib/layout-width-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;IAC7B,2EAA2E;;IAE3E,sEAAsE;;CAEhE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAiDhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAmChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/List.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAoNhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YA+BhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YAyEhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/SidebarNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ9D,eAAO,MAAM,GAAG,EAAE,YA2ChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/Skeleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,GAAG,EAAE,YA4EhB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentCategory, ComponentDoc, ComponentDocExample } from "../../../types/page.types";
|
|
2
|
+
export declare function demoId(componentName: string, suffix: string): string;
|
|
3
|
+
export declare function defaultExample(componentName: string, example: Omit<ComponentDocExample, "demoId"> & {
|
|
4
|
+
demoId?: string;
|
|
5
|
+
}): ComponentDocExample;
|
|
6
|
+
export declare function makeDoc(doc: Omit<ComponentDoc, "defaultExample"> & {
|
|
7
|
+
defaultExample: Omit<ComponentDoc["defaultExample"], "demoId"> & {
|
|
8
|
+
demoId?: string;
|
|
9
|
+
};
|
|
10
|
+
}): ComponentDoc;
|
|
11
|
+
export declare function categoryDocId(category: ComponentCategory): string;
|
|
12
|
+
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEtG,wBAAgB,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,cAAc,CAC1B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GACnE,mBAAmB,CAQrB;AAED,wBAAgB,OAAO,CACnB,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,GAAG;IACxC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,GAAG;QAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACL,GACF,YAAY,CAYd;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAEjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/showcase/component-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAoB9D,wBAAgB,gBAAgB,IAAI,YAAY,EAAE,CAEjD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAG5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-catalog.d.ts","sourceRoot":"","sources":["../../../src/lib/showcase/components-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"components-catalog.d.ts","sourceRoot":"","sources":["../../../src/lib/showcase/components-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAmjFjE,CAAC"}
|