@bagelink/blox 1.5.17 → 1.5.20

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 (109) hide show
  1. package/dist/blox.css +720 -68
  2. package/dist/components/base/Button.vue.d.ts.map +1 -1
  3. package/dist/components/base/Container.vue.d.ts.map +1 -1
  4. package/dist/components/base/Image.vue.d.ts.map +1 -1
  5. package/dist/components/base/Spacer.vue.d.ts.map +1 -1
  6. package/dist/components/base/Text.vue.d.ts.map +1 -1
  7. package/dist/components/base/Title.vue.d.ts.map +1 -1
  8. package/dist/components/blocks/BigImage.vue.d.ts +12 -0
  9. package/dist/components/blocks/BigImage.vue.d.ts.map +1 -0
  10. package/dist/components/blocks/BigQuote.vue.d.ts +14 -0
  11. package/dist/components/blocks/BigQuote.vue.d.ts.map +1 -0
  12. package/dist/components/blocks/BlockFooter.vue.d.ts +17 -0
  13. package/dist/components/blocks/BlockFooter.vue.d.ts.map +1 -0
  14. package/dist/components/blocks/BlockNav.vue.d.ts +22 -0
  15. package/dist/components/blocks/BlockNav.vue.d.ts.map +1 -0
  16. package/dist/components/blocks/Cards.vue.d.ts +18 -0
  17. package/dist/components/blocks/Cards.vue.d.ts.map +1 -0
  18. package/dist/components/blocks/Contact.vue.d.ts +22 -0
  19. package/dist/components/blocks/Contact.vue.d.ts.map +1 -0
  20. package/dist/components/blocks/CountDown.vue.d.ts +76 -0
  21. package/dist/components/blocks/CountDown.vue.d.ts.map +1 -0
  22. package/dist/components/blocks/Cta.vue.d.ts +15 -0
  23. package/dist/components/blocks/Cta.vue.d.ts.map +1 -0
  24. package/dist/components/blocks/Faq.vue.d.ts +20 -0
  25. package/dist/components/blocks/Faq.vue.d.ts.map +1 -0
  26. package/dist/components/blocks/Grid.vue.d.ts +24 -0
  27. package/dist/components/blocks/Grid.vue.d.ts.map +1 -0
  28. package/dist/components/blocks/Icons.vue.d.ts +16 -0
  29. package/dist/components/blocks/Icons.vue.d.ts.map +1 -0
  30. package/dist/components/blocks/IconsList.vue.d.ts +22 -0
  31. package/dist/components/blocks/IconsList.vue.d.ts.map +1 -0
  32. package/dist/components/blocks/ImageCarousel.vue.d.ts +16 -0
  33. package/dist/components/blocks/ImageCarousel.vue.d.ts.map +1 -0
  34. package/dist/components/blocks/ImageLinkBoxes.vue.d.ts +14 -0
  35. package/dist/components/blocks/ImageLinkBoxes.vue.d.ts.map +1 -0
  36. package/dist/components/blocks/Logos.vue.d.ts +17 -0
  37. package/dist/components/blocks/Logos.vue.d.ts.map +1 -0
  38. package/dist/components/blocks/PopUp.vue.d.ts +23 -0
  39. package/dist/components/blocks/PopUp.vue.d.ts.map +1 -0
  40. package/dist/components/blocks/PriceTable.vue.d.ts +24 -0
  41. package/dist/components/blocks/PriceTable.vue.d.ts.map +1 -0
  42. package/dist/components/blocks/Space.vue.d.ts +25 -0
  43. package/dist/components/blocks/Space.vue.d.ts.map +1 -0
  44. package/dist/components/blocks/Tabs.vue.d.ts +15 -0
  45. package/dist/components/blocks/Tabs.vue.d.ts.map +1 -0
  46. package/dist/components/blocks/Team.vue.d.ts +19 -0
  47. package/dist/components/blocks/Team.vue.d.ts.map +1 -0
  48. package/dist/components/blocks/Testimonials.vue.d.ts +18 -0
  49. package/dist/components/blocks/Testimonials.vue.d.ts.map +1 -0
  50. package/dist/components/blocks/Text.vue.d.ts +10 -0
  51. package/dist/components/blocks/Text.vue.d.ts.map +1 -0
  52. package/dist/components/blocks/TextImage.vue.d.ts +20 -0
  53. package/dist/components/blocks/TextImage.vue.d.ts.map +1 -0
  54. package/dist/components/blocks/TextSide.vue.d.ts +19 -0
  55. package/dist/components/blocks/TextSide.vue.d.ts.map +1 -0
  56. package/dist/components/blocks/Title.vue.d.ts +16 -0
  57. package/dist/components/blocks/Title.vue.d.ts.map +1 -0
  58. package/dist/components/blocks/TitleSide.vue.d.ts +21 -0
  59. package/dist/components/blocks/TitleSide.vue.d.ts.map +1 -0
  60. package/dist/components/blocks/VideoBox.vue.d.ts +15 -0
  61. package/dist/components/blocks/VideoBox.vue.d.ts.map +1 -0
  62. package/dist/components/blocks/blocks.d.ts +27 -0
  63. package/dist/components/blocks/blocks.d.ts.map +1 -0
  64. package/dist/components/index.d.ts +4 -3
  65. package/dist/components/index.d.ts.map +1 -1
  66. package/dist/config/baseComponents.d.ts.map +1 -1
  67. package/dist/config/blockComponents.d.ts +41 -0
  68. package/dist/config/blockComponents.d.ts.map +1 -0
  69. package/dist/core/communication.d.ts.map +1 -1
  70. package/dist/core/registry.d.ts.map +1 -1
  71. package/dist/core/renderer.d.ts.map +1 -1
  72. package/dist/core/types.d.ts.map +1 -1
  73. package/dist/index.cjs +9223 -472
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.mjs +9124 -458
  77. package/dist/setup.d.ts +4 -4
  78. package/dist/setup.d.ts.map +1 -1
  79. package/dist/utils/componentPreviewGenerator.d.ts +113 -0
  80. package/dist/utils/componentPreviewGenerator.d.ts.map +1 -0
  81. package/dist/utils/normalizer.d.ts.map +1 -1
  82. package/dist/utils/styles.d.ts.map +1 -1
  83. package/dist/views/ExternalPreview.vue.d.ts.map +1 -1
  84. package/dist/views/RenderPage.vue.d.ts.map +1 -1
  85. package/package.json +3 -2
  86. package/components/base/Button.vue +0 -140
  87. package/components/base/Container.vue +0 -64
  88. package/components/base/Image.vue +0 -75
  89. package/components/base/Spacer.vue +0 -33
  90. package/components/base/Text.vue +0 -37
  91. package/components/base/Title.vue +0 -55
  92. package/components/index.ts +0 -20
  93. package/config/baseComponents.ts +0 -364
  94. package/core/communication.ts +0 -140
  95. package/core/registry.ts +0 -108
  96. package/core/renderer.ts +0 -217
  97. package/core/types.ts +0 -148
  98. package/dist/example-setup.d.ts +0 -1
  99. package/dist/example-setup.d.ts.map +0 -1
  100. package/dist/styles.d.ts +0 -8
  101. package/dist/styles.d.ts.map +0 -1
  102. package/dist/vite.config.d.ts +0 -3
  103. package/dist/vite.config.d.ts.map +0 -1
  104. package/index.ts +0 -43
  105. package/setup.ts +0 -472
  106. package/utils/normalizer.ts +0 -74
  107. package/utils/styles.ts +0 -228
  108. package/views/ExternalPreview.vue +0 -415
  109. package/views/RenderPage.vue +0 -127
package/dist/setup.d.ts CHANGED
@@ -71,10 +71,10 @@ export interface BloxOptions {
71
71
  */
72
72
  debug?: boolean;
73
73
  /**
74
- * Automatically register base components on first registerComponents call
75
- * @default true
74
+ * Automatically register default blox (built-in components)
75
+ * @default false
76
76
  */
77
- autoRegisterBaseComponents?: boolean;
77
+ useDefaultBlox?: boolean;
78
78
  }
79
79
  /**
80
80
  * Validation error class
@@ -106,7 +106,7 @@ export declare function createBlox(options?: BloxOptions): BloxInstance;
106
106
  */
107
107
  export declare function createComponentConfig<T extends ComponentConfig>(config: T): T;
108
108
  /**
109
- * Get all component configurations (base + custom)
109
+ * Get all component configurations (base + blocks + custom)
110
110
  * This returns both the Vue components and their editor schemas
111
111
  */
112
112
  export declare function getAllComponentConfigs(customConfigs?: ComponentConfig[]): ComponentConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAKpF,MAAM,WAAW,YAAY;IAC5B;;;OAGG;IACH,kBAAkB,EAAE,CACnB,UAAU,EAAE,eAAe,GAAG,eAAe,EAAE,EAC/C,OAAO,CAAC,EAAE,eAAe,KACrB,YAAY,CAAA;IAEjB;;OAEG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,YAAY,CAAA;IAExE;;OAEG;IACH,uBAAuB,EAAE,MAAM,eAAe,EAAE,CAAA;IAEhD;;OAEG;IACH,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;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC1B;AAED,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACd,WAAW,CAAC,EAAE,MAAM;gBAA5C,OAAO,EAAE,MAAM,EAAS,WAAW,CAAC,EAAE,MAAM,YAAA;CAIxD;AAoGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,YAAY,CAqOlE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAE7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,GAAE,eAAe,EAAO,GAAG,eAAe,EAAE,CAE/F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAGrE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAIzE"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Auto-generated SVG previews for components
3
+ * This file generates SVG-based previews for block components
4
+ */
5
+ interface BlockPreviewConfig {
6
+ background: string;
7
+ gradient?: {
8
+ from: string;
9
+ to: string;
10
+ direction?: 'horizontal' | 'vertical' | 'diagonal';
11
+ };
12
+ elements: Array<{
13
+ type: 'rect' | 'circle' | 'text' | 'line' | 'gradient';
14
+ x: number;
15
+ y: number;
16
+ width?: number;
17
+ height?: number;
18
+ radius?: number;
19
+ text?: string;
20
+ fill?: string;
21
+ stroke?: string;
22
+ strokeWidth?: number;
23
+ fontSize?: number;
24
+ fontWeight?: string;
25
+ opacity?: number;
26
+ shadow?: boolean;
27
+ rx?: number;
28
+ gradient?: {
29
+ from: string;
30
+ to: string;
31
+ direction?: 'horizontal' | 'vertical' | 'diagonal';
32
+ };
33
+ }>;
34
+ }
35
+ interface ComponentAnalysis {
36
+ id: string;
37
+ category?: string;
38
+ icon?: string;
39
+ label?: string;
40
+ hasText: boolean;
41
+ hasRichText?: boolean;
42
+ hasImage: boolean;
43
+ hasButton: boolean;
44
+ hasItems: boolean;
45
+ hasIcon: boolean;
46
+ hasVideo: boolean;
47
+ hasForm?: boolean;
48
+ isNav: boolean;
49
+ isFooter: boolean;
50
+ isHero: boolean;
51
+ isCard: boolean;
52
+ isGrid: boolean;
53
+ isList: boolean;
54
+ isModal: boolean;
55
+ isSlider: boolean;
56
+ isTabs: boolean;
57
+ isVideo: boolean;
58
+ isTestimonial: boolean;
59
+ isPricing: boolean;
60
+ isFullWidth: boolean;
61
+ isCentered: boolean;
62
+ hasColumns: boolean;
63
+ contentStructure?: any;
64
+ settingsStructure?: any;
65
+ defaultValues?: any;
66
+ propNames: string[];
67
+ }
68
+ /**
69
+ * Generate SVG preview for a component type
70
+ */
71
+ export declare function generateSVGPreview(componentId: string): string;
72
+ /**
73
+ * Get preview for a component (main function to use)
74
+ * 1. Uses registered preview config (manual) - highest priority
75
+ * 2. Uses enhanced analysis from component configs if available
76
+ * 3. Falls back to default preview
77
+ */
78
+ export declare function getComponentPreview(componentId: string, label?: string): string;
79
+ /**
80
+ * Get preview with auto-generation (opt-in)
81
+ * Use this if you want automatic preview generation from component analysis
82
+ */
83
+ export declare function getComponentPreviewAuto(componentId: string, label?: string, component?: any): string;
84
+ /**
85
+ * Register a custom preview configuration
86
+ */
87
+ export declare function registerPreviewConfig(componentId: string, config: BlockPreviewConfig): void;
88
+ /**
89
+ * Check if a component has a preview config
90
+ */
91
+ export declare function hasPreviewConfig(componentId: string): boolean;
92
+ /**
93
+ * Get all registered preview config IDs
94
+ */
95
+ export declare function getRegisteredPreviewIds(): string[];
96
+ /**
97
+ * Export types for use by consumers
98
+ */
99
+ export type { BlockPreviewConfig };
100
+ /**
101
+ * Development helper: Generate and log preview for testing
102
+ * This function is useful for debugging and testing new component previews
103
+ */
104
+ export declare function debugComponentPreview(componentId: string, label?: string): void;
105
+ /**
106
+ * Development helper: Get enhanced component analysis
107
+ */
108
+ export declare function debugComponentAnalysis(componentId: string): ComponentAnalysis | null;
109
+ /**
110
+ * Development helper: Test all component preview mappings
111
+ */
112
+ export declare function debugAllPreviews(): void;
113
+ //# sourceMappingURL=componentPreviewGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentPreviewGenerator.d.ts","sourceRoot":"","sources":["../../src/utils/componentPreviewGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,kBAAkB;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,UAAU,CAAA;KAClD,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC;QACf,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;QACtD,CAAC,EAAE,MAAM,CAAA;QACT,CAAC,EAAE,MAAM,CAAA;QACT,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,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,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAwCrF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEtC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,CAYvD"}
1
+ {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/utils/normalizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAwCrF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEtC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,CAYvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../utils/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,QAAQ,GAAE,OAAe,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqKxB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAgBxE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CA8BzC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/utils/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,QAAQ,GAAE,OAAe,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyKxB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAgBxE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CA8BzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalPreview.vue.d.ts","sourceRoot":"","sources":["../../views/ExternalPreview.vue"],"names":[],"mappings":"AAiaA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQ5D,UAAU,KAAK;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,QAAQ,CAAA;IAC1B,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAA;CACxB;;YAHS,MAAM;sBAEI,GAAG,EAAE;;AAqXzB,wBAQG"}
1
+ {"version":3,"file":"ExternalPreview.vue.d.ts","sourceRoot":"","sources":["../../src/views/ExternalPreview.vue"],"names":[],"mappings":"AA2oBA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQ5D,UAAU,KAAK;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,QAAQ,CAAA;IAC1B,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAA;CACxB;;YAHS,MAAM;sBAEI,GAAG,EAAE;;AA2ZzB,wBAQG"}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderPage.vue.d.ts","sourceRoot":"","sources":["../../views/RenderPage.vue"],"names":[],"mappings":"AAiIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAO7C,UAAU,KAAK;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;;sBADmB,MAAM;;AAsI1B,wBAQG"}
1
+ {"version":3,"file":"RenderPage.vue.d.ts","sourceRoot":"","sources":["../../src/views/RenderPage.vue"],"names":[],"mappings":"AA8HA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAO7C,UAAU,KAAK;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;;sBADmB,MAAM;;AAmI1B,wBAQG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.5.17",
4
+ "version": "1.5.20",
5
5
  "description": "Blox page builder library for drag-and-drop page building and static data management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -75,7 +75,8 @@
75
75
  },
76
76
  "peerDependencies": {
77
77
  "vue": "^3.3.0",
78
- "vue-router": "^4.0.0"
78
+ "vue-router": "^4.0.0",
79
+ "@bagelink/vue": "1.5.20"
79
80
  },
80
81
  "devDependencies": {
81
82
  "@vitejs/plugin-vue": "^5.0.0",
@@ -1,140 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Button Component
4
- *
5
- * A customizable button/link component
6
- */
7
-
8
- interface Props {
9
- btnTxt?: string
10
- btnUrl?: string
11
- btnTarget?: '_self' | '_blank' | '_parent' | '_top'
12
- variant?: 'primary' | 'secondary' | 'outline' | 'ghost'
13
- size?: 'sm' | 'md' | 'lg'
14
- align?: 'left' | 'center' | 'right'
15
- fullWidth?: boolean
16
- isMobile?: boolean
17
- }
18
-
19
- const props = withDefaults(defineProps<Props>(), {
20
- btnTxt: 'Click Me',
21
- btnUrl: '#',
22
- btnTarget: '_self',
23
- variant: 'primary',
24
- size: 'md',
25
- align: 'left',
26
- fullWidth: false,
27
- })
28
-
29
- function handleClick(e: MouseEvent) {
30
- // Emit event for analytics tracking if needed
31
- console.log('Button clicked:', props.btnTxt)
32
- }
33
- </script>
34
-
35
- <template>
36
- <div :class="`button-wrapper align-${align}`">
37
- <a
38
- :href="btnUrl"
39
- :target="btnTarget"
40
- :rel="btnTarget === '_blank' ? 'noopener noreferrer' : undefined"
41
- class="btn" :class="[
42
- `btn-${variant}`,
43
- `btn-${size}`,
44
- { 'btn-full-width': fullWidth },
45
- ]"
46
- @click="handleClick"
47
- >
48
- {{ btnTxt }}
49
- </a>
50
- </div>
51
- </template>
52
-
53
- <style scoped>
54
- .button-wrapper {
55
- display: flex;
56
- }
57
-
58
- .button-wrapper.align-left {
59
- justify-content: flex-start;
60
- }
61
-
62
- .button-wrapper.align-center {
63
- justify-content: center;
64
- }
65
-
66
- .button-wrapper.align-right {
67
- justify-content: flex-end;
68
- }
69
-
70
- .btn {
71
- display: inline-block;
72
- padding: 0.75rem 1.5rem;
73
- text-decoration: none;
74
- border-radius: 6px;
75
- font-weight: 500;
76
- transition: all 0.2s;
77
- cursor: pointer;
78
- border: 2px solid transparent;
79
- text-align: center;
80
- }
81
-
82
- .btn-full-width {
83
- width: 100%;
84
- }
85
-
86
- /* Sizes */
87
- .btn-sm {
88
- padding: 0.5rem 1rem;
89
- font-size: 0.875rem;
90
- }
91
-
92
- .btn-md {
93
- padding: 0.75rem 1.5rem;
94
- font-size: 1rem;
95
- }
96
-
97
- .btn-lg {
98
- padding: 1rem 2rem;
99
- font-size: 1.125rem;
100
- }
101
-
102
- /* Variants */
103
- .btn-primary {
104
- background: #3b82f6;
105
- color: white;
106
- }
107
-
108
- .btn-primary:hover {
109
- background: #2563eb;
110
- }
111
-
112
- .btn-secondary {
113
- background: #6b7280;
114
- color: white;
115
- }
116
-
117
- .btn-secondary:hover {
118
- background: #4b5563;
119
- }
120
-
121
- .btn-outline {
122
- background: transparent;
123
- border-color: #3b82f6;
124
- color: #3b82f6;
125
- }
126
-
127
- .btn-outline:hover {
128
- background: #3b82f6;
129
- color: white;
130
- }
131
-
132
- .btn-ghost {
133
- background: transparent;
134
- color: #3b82f6;
135
- }
136
-
137
- .btn-ghost:hover {
138
- background: rgba(59, 130, 246, 0.1);
139
- }
140
- </style>
@@ -1,64 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Container Component
4
- *
5
- * A wrapper component for grouping other blocks
6
- */
7
-
8
- interface Props {
9
- maxWidth?: number | string
10
- padding?: number | string
11
- gap?: number // Gap between child elements in pixels
12
- layout?: 'vertical' | 'horizontal' | 'grid'
13
- columns?: number // For grid layout
14
- isMobile?: boolean
15
- }
16
-
17
- const props = withDefaults(defineProps<Props>(), {
18
- maxWidth: 1200,
19
- padding: 20,
20
- gap: 16,
21
- layout: 'vertical',
22
- columns: 3,
23
- })
24
-
25
- const containerStyle = {
26
- maxWidth: typeof props.maxWidth === 'number' ? `${props.maxWidth}px` : props.maxWidth,
27
- padding: typeof props.padding === 'number' ? `${props.padding}px` : props.padding,
28
- gap: `${props.gap}px`,
29
- }
30
- </script>
31
-
32
- <template>
33
- <div class="container" :class="[`layout-${layout}`]" :style="containerStyle">
34
- <slot />
35
- </div>
36
- </template>
37
-
38
- <style scoped>
39
- .container {
40
- margin: 0 auto;
41
- }
42
-
43
- .layout-vertical {
44
- display: flex;
45
- flex-direction: column;
46
- }
47
-
48
- .layout-horizontal {
49
- display: flex;
50
- flex-direction: row;
51
- flex-wrap: wrap;
52
- }
53
-
54
- .layout-grid {
55
- display: grid;
56
- grid-template-columns: repeat(v-bind(columns), 1fr);
57
- }
58
-
59
- @media (max-width: 768px) {
60
- .layout-grid {
61
- grid-template-columns: 1fr;
62
- }
63
- }
64
- </style>
@@ -1,75 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Image Component
4
- *
5
- * Displays an image with optional link and captions
6
- */
7
-
8
- interface Props {
9
- src?: string
10
- alt?: string
11
- caption?: string
12
- link?: string
13
- linkTarget?: '_self' | '_blank' | '_parent' | '_top'
14
- objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
15
- aspectRatio?: string // e.g., '16/9', '4/3', '1/1'
16
- isMobile?: boolean
17
- }
18
-
19
- const props = withDefaults(defineProps<Props>(), {
20
- src: '',
21
- alt: '',
22
- caption: '',
23
- link: '',
24
- linkTarget: '_self',
25
- objectFit: 'cover',
26
- aspectRatio: 'auto',
27
- })
28
-
29
- const imageStyle = {
30
- objectFit: props.objectFit,
31
- aspectRatio: props.aspectRatio,
32
- }
33
- </script>
34
-
35
- <template>
36
- <figure class="image-wrapper">
37
- <a
38
- v-if="link"
39
- :href="link"
40
- :target="linkTarget"
41
- :rel="linkTarget === '_blank' ? 'noopener noreferrer' : undefined"
42
- class="image-link"
43
- >
44
- <img :src="src" :alt="alt" :style="imageStyle" class="image">
45
- </a>
46
- <img v-else :src="src" :alt="alt" :style="imageStyle" class="image">
47
- <figcaption v-if="caption" class="image-caption">
48
- {{ caption }}
49
- </figcaption>
50
- </figure>
51
- </template>
52
-
53
- <style scoped>
54
- .image-wrapper {
55
- margin: 0;
56
- padding: 0;
57
- }
58
-
59
- .image-link {
60
- display: block;
61
- }
62
-
63
- .image {
64
- width: 100%;
65
- height: auto;
66
- display: block;
67
- }
68
-
69
- .image-caption {
70
- margin-top: 0.5rem;
71
- font-size: 0.875rem;
72
- color: #6b7280;
73
- text-align: center;
74
- }
75
- </style>
@@ -1,33 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Spacer Component
4
- *
5
- * Creates vertical spacing between blocks
6
- */
7
-
8
- interface Props {
9
- height?: number | string // Height in pixels or 'auto'
10
- heightMobile?: number | string
11
- isMobile?: boolean
12
- }
13
-
14
- const props = withDefaults(defineProps<Props>(), {
15
- height: 40,
16
- heightMobile: undefined,
17
- })
18
-
19
- function computedHeight() {
20
- const h = props.isMobile && props.heightMobile ? props.heightMobile : props.height
21
- return typeof h === 'number' ? `${h}px` : h
22
- }
23
- </script>
24
-
25
- <template>
26
- <div class="spacer" :style="{ height: computedHeight() }" />
27
- </template>
28
-
29
- <style scoped>
30
- .spacer {
31
- width: 100%;
32
- }
33
- </style>
@@ -1,37 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Text Component
4
- *
5
- * A simple text/paragraph component for displaying rich content
6
- */
7
-
8
- interface Props {
9
- content?: string
10
- tag?: 'p' | 'div' | 'span' | 'article' | 'section'
11
- align?: 'left' | 'center' | 'right' | 'justify'
12
- }
13
-
14
- const { content = '', tag = 'div', align = 'left' } = defineProps<Props>()
15
- </script>
16
-
17
- <template>
18
- <component :is="tag" :class="`text-align-${align}`" v-html="content" />
19
- </template>
20
-
21
- <style scoped>
22
- .text-align-left {
23
- text-align: left;
24
- }
25
-
26
- .text-align-center {
27
- text-align: center;
28
- }
29
-
30
- .text-align-right {
31
- text-align: right;
32
- }
33
-
34
- .text-align-justify {
35
- text-align: justify;
36
- }
37
- </style>
@@ -1,55 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * Base Title Component
4
- *
5
- * Renders headings with customizable tag and styling
6
- */
7
-
8
- interface Props {
9
- title?: string
10
- subTitle?: string
11
- tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
12
- align?: 'left' | 'center' | 'right'
13
- }
14
-
15
- const { title = '', subTitle = '', tag = 'h2', align = 'left' } = defineProps<Props>()
16
- </script>
17
-
18
- <template>
19
- <div :class="`title-wrapper text-align-${align}`">
20
- <component :is="tag" v-if="title" class="title">
21
- {{ title }}
22
- </component>
23
- <p v-if="subTitle" class="subtitle">
24
- {{ subTitle }}
25
- </p>
26
- </div>
27
- </template>
28
-
29
- <style scoped>
30
- .title-wrapper {
31
- margin-bottom: 1rem;
32
- }
33
-
34
- .title {
35
- margin: 0 0 0.5rem 0;
36
- line-height: 1.2;
37
- }
38
-
39
- .subtitle {
40
- margin: 0;
41
- opacity: 0.8;
42
- }
43
-
44
- .text-align-left {
45
- text-align: left;
46
- }
47
-
48
- .text-align-center {
49
- text-align: center;
50
- }
51
-
52
- .text-align-right {
53
- text-align: right;
54
- }
55
- </style>
@@ -1,20 +0,0 @@
1
- /**
2
- * Component Exports
3
- *
4
- * Export all base components for easy importing
5
- */
6
-
7
- export { default as Button } from './base/Button.vue'
8
- export * from './base/Button.vue'
9
- export { default as Container } from './base/Container.vue'
10
- export * from './base/Container.vue'
11
- export { default as Image } from './base/Image.vue'
12
- export * from './base/Image.vue'
13
-
14
- export { default as Spacer } from './base/Spacer.vue'
15
- export * from './base/Spacer.vue'
16
- export { default as Text } from './base/Text.vue'
17
- // Re-export for convenience
18
- export * from './base/Text.vue'
19
- export { default as Title } from './base/Title.vue'
20
- export * from './base/Title.vue'