zabi-components 5.0.21 → 6.0.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.
Files changed (89) hide show
  1. package/README.md +42 -44
  2. package/THEME.md +473 -0
  3. package/THEMING.md +248 -0
  4. package/dist/atoms/Card.svelte +40 -67
  5. package/dist/atoms/Card.svelte.d.ts +3 -3
  6. package/dist/atoms/CardContent.svelte +1 -1
  7. package/dist/atoms/CardHeader.svelte +10 -1
  8. package/dist/atoms/CardHeader.svelte.d.ts +3 -0
  9. package/dist/atoms/Checkbox.svelte +1 -7
  10. package/dist/atoms/CodeBlock.svelte +7 -7
  11. package/dist/atoms/ColorPicker.svelte +81 -73
  12. package/dist/atoms/Input.svelte +16 -12
  13. package/dist/atoms/Input.svelte.d.ts +2 -0
  14. package/dist/atoms/List.svelte +47 -0
  15. package/dist/atoms/List.svelte.d.ts +19 -0
  16. package/dist/atoms/ListItem.svelte +148 -0
  17. package/dist/atoms/ListItem.svelte.d.ts +35 -0
  18. package/dist/atoms/Progress.svelte +4 -6
  19. package/dist/atoms/Select.svelte +65 -20
  20. package/dist/atoms/Select.svelte.d.ts +13 -1
  21. package/dist/atoms/Textarea.svelte +13 -11
  22. package/dist/atoms/Textarea.svelte.d.ts +1 -0
  23. package/dist/atoms/Toast.svelte +1 -1
  24. package/dist/atoms/Toggle.svelte +1 -7
  25. package/dist/atoms/Tooltip.svelte +8 -15
  26. package/dist/atoms/index.d.ts +2 -0
  27. package/dist/atoms/index.js +2 -0
  28. package/dist/components/atoms/index.d.ts +2 -0
  29. package/dist/components/atoms/index.d.ts.map +1 -1
  30. package/dist/components/index.d.ts +4 -1
  31. package/dist/components/index.d.ts.map +1 -1
  32. package/dist/components/molecules/index.d.ts +0 -1
  33. package/dist/components/molecules/index.d.ts.map +1 -1
  34. package/dist/components/molecules/navigation-menu-context.d.ts +7 -0
  35. package/dist/components/molecules/navigation-menu-context.d.ts.map +1 -0
  36. package/dist/components/organisms/index.d.ts +2 -1
  37. package/dist/components/organisms/index.d.ts.map +1 -1
  38. package/dist/index.d.ts +4 -1
  39. package/dist/index.js +5 -9
  40. package/dist/lib/showcase/components-catalog.d.ts +3 -0
  41. package/dist/lib/showcase/components-catalog.d.ts.map +1 -0
  42. package/dist/lib/showcase/components-showcase-constants.d.ts +63 -0
  43. package/dist/lib/showcase/components-showcase-constants.d.ts.map +1 -0
  44. package/dist/lib/showcase/docs-sidebar-helpers.d.ts +15 -0
  45. package/dist/lib/showcase/docs-sidebar-helpers.d.ts.map +1 -0
  46. package/dist/molecules/Alert.svelte +9 -4
  47. package/dist/molecules/ComponentDemo.svelte +53 -50
  48. package/dist/molecules/ContactForm.svelte +113 -76
  49. package/dist/molecules/ContactForm.svelte.d.ts +1 -4
  50. package/dist/molecules/Dropdown.svelte +4 -2
  51. package/dist/molecules/ImageUpload.svelte +27 -4
  52. package/dist/molecules/ImageUpload.svelte.d.ts +1 -0
  53. package/dist/molecules/Modal.svelte +46 -45
  54. package/dist/molecules/NavigationMenu.svelte +7 -10
  55. package/dist/molecules/NavigationMenuContent.svelte +9 -9
  56. package/dist/molecules/NavigationMenuItem.svelte +7 -6
  57. package/dist/molecules/NavigationMenuLink.svelte +8 -6
  58. package/dist/molecules/NavigationMenuList.svelte +0 -7
  59. package/dist/molecules/NavigationMenuTrigger.svelte +8 -11
  60. package/dist/molecules/Section.svelte +12 -12
  61. package/dist/molecules/SlideUp.svelte +32 -2
  62. package/dist/molecules/Tabs.svelte +74 -7
  63. package/dist/molecules/index.d.ts +0 -1
  64. package/dist/molecules/index.js +0 -1
  65. package/dist/molecules/navigation-menu-context.d.ts +6 -0
  66. package/dist/molecules/navigation-menu-context.js +1 -0
  67. package/dist/organisms/Navbar.svelte +170 -53
  68. package/dist/organisms/Navbar.svelte.d.ts +31 -4
  69. package/dist/organisms/SidebarNavigation.svelte +464 -0
  70. package/dist/organisms/SidebarNavigation.svelte.d.ts +49 -0
  71. package/dist/organisms/SidebarPanel.svelte +175 -0
  72. package/dist/organisms/SidebarPanel.svelte.d.ts +32 -0
  73. package/dist/organisms/index.d.ts +2 -1
  74. package/dist/organisms/index.js +2 -1
  75. package/dist/types/page.types.d.ts +32 -0
  76. package/dist/types/page.types.d.ts.map +1 -0
  77. package/dist/types/variants.ts +76 -0
  78. package/dist/zabi-components-colors.css +347 -324
  79. package/dist/zabi-components-theme-dark-only.css +159 -151
  80. package/dist/zabi-components-theme-dark.css +159 -151
  81. package/dist/zabi-components-theme-only.css +245 -230
  82. package/dist/zabi-components-theme.css +245 -230
  83. package/dist/zabi-components.css +722 -84
  84. package/docs/theme-imports.md +112 -0
  85. package/package.json +20 -9
  86. package/dist/molecules/Sidebar.svelte +0 -324
  87. package/dist/molecules/Sidebar.svelte.d.ts +0 -30
  88. package/dist/organisms/Navigation.svelte +0 -116
  89. package/dist/organisms/Navigation.svelte.d.ts +0 -20
@@ -0,0 +1,32 @@
1
+ import type { Component } from "svelte";
2
+ export interface SidebarPanelItem {
3
+ id: string;
4
+ label: string;
5
+ icon?: Component<{
6
+ size?: number;
7
+ class?: string;
8
+ }>;
9
+ description?: string;
10
+ badgeText?: string;
11
+ }
12
+ interface Props {
13
+ className?: string;
14
+ widthClass?: string;
15
+ ariaLabel?: string;
16
+ title?: string;
17
+ subtitle?: string;
18
+ showSearch?: boolean;
19
+ searchPlaceholder?: string;
20
+ searchValue?: string;
21
+ items?: SidebarPanelItem[];
22
+ selectedItemId?: string;
23
+ emptyStateTitle?: string;
24
+ emptyStateDescription?: string;
25
+ selectLabel?: string;
26
+ closeLabel?: string;
27
+ onSelect?: (item: SidebarPanelItem) => void;
28
+ onClose?: () => void;
29
+ }
30
+ declare const SidebarPanel: Component<Props, {}, "searchValue" | "selectedItemId">;
31
+ type SidebarPanel = ReturnType<typeof SidebarPanel>;
32
+ export default SidebarPanel;
@@ -1,2 +1,3 @@
1
1
  export { default as Navbar } from './Navbar.svelte';
2
- export { default as Navigation } from './Navigation.svelte';
2
+ export { default as SidebarNavigation } from './SidebarNavigation.svelte';
3
+ export { default as SidebarPanel } from './SidebarPanel.svelte';
@@ -1,2 +1,3 @@
1
1
  export { default as Navbar } from './Navbar.svelte';
2
- export { default as Navigation } from './Navigation.svelte';
2
+ export { default as SidebarNavigation } from './SidebarNavigation.svelte';
3
+ export { default as SidebarPanel } from './SidebarPanel.svelte';
@@ -0,0 +1,32 @@
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
+ }
32
+ //# sourceMappingURL=page.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.types.d.ts","sourceRoot":"","sources":["../../src/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;CACrB"}
@@ -0,0 +1,76 @@
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
+ /**
9
+ * Semantic color variants - used for state indication
10
+ * These variants use semantic colors (success, warning, error, info) to indicate meaning
11
+ */
12
+ export type SemanticVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
13
+
14
+ /**
15
+ * Extended semantic variants - includes additional semantic colors
16
+ * Used by components that support more semantic states
17
+ */
18
+ export type ExtendedSemanticVariant = SemanticVariant | 'neutral' | 'energetic';
19
+
20
+ /**
21
+ * Button style variants - used for different button styles
22
+ * These are style-based variants, not semantic color variants
23
+ */
24
+ export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline' | 'link';
25
+
26
+ /**
27
+ * Card style variants - used for different card appearances
28
+ */
29
+ export type CardVariant = 'default' | 'elevated' | 'outlined' | 'flat';
30
+
31
+ /**
32
+ * Component size variants - consistent across all components
33
+ */
34
+ export type SizeVariant = 'sm' | 'md' | 'lg';
35
+
36
+ /**
37
+ * Helper type to check if a variant is a semantic variant
38
+ */
39
+ export function isSemanticVariant(variant: string): variant is SemanticVariant {
40
+ return ['default', 'success', 'warning', 'error', 'info'].includes(variant);
41
+ }
42
+
43
+ /**
44
+ * Helper type to check if a variant is an extended semantic variant
45
+ */
46
+ export function isExtendedSemanticVariant(variant: string): variant is ExtendedSemanticVariant {
47
+ return ['default', 'success', 'warning', 'error', 'info', 'neutral', 'energetic'].includes(variant);
48
+ }
49
+
50
+ /**
51
+ * Variant naming conventions:
52
+ *
53
+ * 1. Semantic Color Variants (for state indication):
54
+ * - default: Standard/default appearance
55
+ * - success: Positive/successful state (green)
56
+ * - warning: Cautionary state (yellow/amber)
57
+ * - error: Error/dangerous state (red)
58
+ * - info: Informational state (blue)
59
+ * - neutral: Neutral state (gray)
60
+ * - energetic: Energetic/vibrant state (yellow/orange)
61
+ *
62
+ * 2. Style Variants (for visual appearance):
63
+ * - Button: primary, secondary, danger, ghost, outline, link
64
+ * - Card: default, elevated, outlined, flat
65
+ *
66
+ * 3. Size Variants (consistent across components):
67
+ * - sm: Small size
68
+ * - md: Medium size (default)
69
+ * - lg: Large size
70
+ *
71
+ * Usage Guidelines:
72
+ * - Use semantic variants when the variant indicates a state or meaning
73
+ * - Use style variants when the variant changes visual appearance only
74
+ * - Always use SizeVariant for size props
75
+ */
76
+