@pixelated-tech/components 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +12 -191
  2. package/dist/components/admin/componentusage/componentAnalysis.js +12 -4
  3. package/dist/components/admin/componentusage/componentDiscovery.js +20 -6
  4. package/dist/components/admin/site-health/site-health-accessibility.js +5 -1
  5. package/dist/components/admin/site-health/site-health-axe-core.js +4 -0
  6. package/dist/components/admin/site-health/site-health-cloudwatch.integration.js +0 -5
  7. package/dist/components/admin/site-health/site-health-cloudwatch.js +7 -1
  8. package/dist/components/admin/site-health/site-health-dependency-vulnerabilities.js +4 -0
  9. package/dist/components/admin/site-health/site-health-github.js +6 -0
  10. package/dist/components/admin/site-health/site-health-google-analytics.js +6 -0
  11. package/dist/components/admin/site-health/site-health-google-search-console.js +6 -0
  12. package/dist/components/admin/site-health/site-health-on-site-seo.integration.js +128 -55
  13. package/dist/components/admin/site-health/site-health-on-site-seo.js +4 -0
  14. package/dist/components/admin/site-health/site-health-overview.js +11 -4
  15. package/dist/components/admin/site-health/site-health-performance.js +4 -0
  16. package/dist/components/admin/site-health/site-health-security.js +5 -1
  17. package/dist/components/admin/site-health/site-health-seo.js +5 -1
  18. package/dist/components/admin/site-health/site-health-template.js +19 -9
  19. package/dist/components/admin/site-health/site-health-uptime.js +4 -0
  20. package/dist/components/callout/callout.js +0 -10
  21. package/dist/components/carousel/carousel.js +15 -4
  22. package/dist/components/carousel/tiles.js +1 -1
  23. package/dist/components/cms/contentful.items.components.js +3 -4
  24. package/dist/components/cms/flickr.js +1 -1
  25. package/dist/components/cms/google.reviews.components.js +3 -3
  26. package/dist/components/cms/instagram.components.js +15 -5
  27. package/dist/components/cms/smartimage.js +2 -2
  28. package/dist/components/cms/wordpress.components.js +32 -6
  29. package/dist/components/cms/yelp.js +5 -0
  30. package/dist/components/config/config.server.js +7 -1
  31. package/dist/components/general/css.js +0 -1
  32. package/dist/components/general/image.js +0 -1
  33. package/dist/components/general/loading.js +2 -1
  34. package/dist/components/general/microinteractions.js +0 -1
  35. package/dist/components/general/modal.css +2 -4
  36. package/dist/components/general/modal.js +72 -30
  37. package/dist/components/general/sidepanel.js +16 -0
  38. package/dist/components/general/tab.js +1 -0
  39. package/dist/components/menu/menu-accordion.css +1 -1
  40. package/dist/components/menu/menu-accordion.js +15 -4
  41. package/dist/components/menu/menu-expando.js +21 -19
  42. package/dist/components/menu/menu-simple.js +14 -14
  43. package/dist/components/nerdjoke/nerdjoke.js +1 -1
  44. package/dist/components/seo/googlesearch.js +0 -1
  45. package/dist/components/seo/schema-blogposting.js +6 -1
  46. package/dist/components/seo/schema-recipe.js +34 -1
  47. package/dist/components/seo/schema-services.js +20 -2
  48. package/dist/components/shoppingcart/ebay.components.js +3 -3
  49. package/dist/components/shoppingcart/shoppingcart.components.js +76 -28
  50. package/dist/components/shoppingcart/shoppingcart.functions.js +4 -4
  51. package/dist/components/sitebuilder/config/CompoundFontSelector.js +13 -4
  52. package/dist/components/sitebuilder/config/ConfigBuilder.css +194 -5
  53. package/dist/components/sitebuilder/config/ConfigBuilder.js +183 -17
  54. package/dist/components/sitebuilder/config/FontSelector.js +13 -2
  55. package/dist/components/sitebuilder/config/routes-form.json +67 -0
  56. package/dist/components/sitebuilder/config/siteinfo-form.json +28 -14
  57. package/dist/components/sitebuilder/config/visualdesignform.json +4 -4
  58. package/dist/components/sitebuilder/form/formbuilder.js +1 -0
  59. package/dist/components/sitebuilder/form/formcomponents.js +2 -3
  60. package/dist/components/sitebuilder/form/formengine.js +6 -5
  61. package/dist/components/sitebuilder/form/formvalidator.js +5 -0
  62. package/dist/components/sitebuilder/page/components/PageBuilderUI.js +5 -1
  63. package/dist/components/structured/buzzwordbingo.css +0 -1
  64. package/dist/components/structured/recipe.js +1 -1
  65. package/dist/components/structured/socialcard.js +2 -2
  66. package/dist/components/utilities/functions.js +82 -1
  67. package/dist/components/utilities/gemini-api.client.js +76 -0
  68. package/dist/components/utilities/gemini-api.server.js +185 -0
  69. package/dist/data/routes.json +5 -5
  70. package/dist/index.adminclient.js +30 -0
  71. package/dist/index.adminserver.js +21 -0
  72. package/dist/index.js +4 -18
  73. package/dist/index.server.js +15 -28
  74. package/dist/types/components/admin/componentusage/componentAnalysis.d.ts.map +1 -1
  75. package/dist/types/components/admin/componentusage/componentDiscovery.d.ts +1 -1
  76. package/dist/types/components/admin/componentusage/componentDiscovery.d.ts.map +1 -1
  77. package/dist/types/components/admin/site-health/site-health-accessibility.d.ts +7 -4
  78. package/dist/types/components/admin/site-health/site-health-accessibility.d.ts.map +1 -1
  79. package/dist/types/components/admin/site-health/site-health-axe-core.d.ts +7 -4
  80. package/dist/types/components/admin/site-health/site-health-axe-core.d.ts.map +1 -1
  81. package/dist/types/components/admin/site-health/site-health-cloudwatch.d.ts +9 -6
  82. package/dist/types/components/admin/site-health/site-health-cloudwatch.d.ts.map +1 -1
  83. package/dist/types/components/admin/site-health/site-health-cloudwatch.integration.d.ts.map +1 -1
  84. package/dist/types/components/admin/site-health/site-health-dependency-vulnerabilities.d.ts +7 -4
  85. package/dist/types/components/admin/site-health/site-health-dependency-vulnerabilities.d.ts.map +1 -1
  86. package/dist/types/components/admin/site-health/site-health-github.d.ts +9 -6
  87. package/dist/types/components/admin/site-health/site-health-github.d.ts.map +1 -1
  88. package/dist/types/components/admin/site-health/site-health-google-analytics.d.ts +9 -6
  89. package/dist/types/components/admin/site-health/site-health-google-analytics.d.ts.map +1 -1
  90. package/dist/types/components/admin/site-health/site-health-google-search-console.d.ts +9 -6
  91. package/dist/types/components/admin/site-health/site-health-google-search-console.d.ts.map +1 -1
  92. package/dist/types/components/admin/site-health/site-health-on-site-seo.d.ts +8 -3
  93. package/dist/types/components/admin/site-health/site-health-on-site-seo.d.ts.map +1 -1
  94. package/dist/types/components/admin/site-health/site-health-on-site-seo.integration.d.ts.map +1 -1
  95. package/dist/types/components/admin/site-health/site-health-overview.d.ts +7 -4
  96. package/dist/types/components/admin/site-health/site-health-overview.d.ts.map +1 -1
  97. package/dist/types/components/admin/site-health/site-health-performance.d.ts +7 -4
  98. package/dist/types/components/admin/site-health/site-health-performance.d.ts.map +1 -1
  99. package/dist/types/components/admin/site-health/site-health-security.d.ts +7 -4
  100. package/dist/types/components/admin/site-health/site-health-security.d.ts.map +1 -1
  101. package/dist/types/components/admin/site-health/site-health-seo.d.ts +7 -4
  102. package/dist/types/components/admin/site-health/site-health-seo.d.ts.map +1 -1
  103. package/dist/types/components/admin/site-health/site-health-template.d.ts +12 -10
  104. package/dist/types/components/admin/site-health/site-health-template.d.ts.map +1 -1
  105. package/dist/types/components/admin/site-health/site-health-uptime.d.ts +7 -4
  106. package/dist/types/components/admin/site-health/site-health-uptime.d.ts.map +1 -1
  107. package/dist/types/components/callout/callout.d.ts +3 -3
  108. package/dist/types/components/callout/callout.d.ts.map +1 -1
  109. package/dist/types/components/carousel/carousel.d.ts +16 -7
  110. package/dist/types/components/carousel/carousel.d.ts.map +1 -1
  111. package/dist/types/components/carousel/tiles.d.ts +3 -6
  112. package/dist/types/components/carousel/tiles.d.ts.map +1 -1
  113. package/dist/types/components/cms/flickr.d.ts +3 -6
  114. package/dist/types/components/cms/flickr.d.ts.map +1 -1
  115. package/dist/types/components/cms/google.reviews.components.d.ts +1 -7
  116. package/dist/types/components/cms/google.reviews.components.d.ts.map +1 -1
  117. package/dist/types/components/cms/hubspot.components.d.ts +1 -2
  118. package/dist/types/components/cms/hubspot.components.d.ts.map +1 -1
  119. package/dist/types/components/cms/instagram.components.d.ts +14 -9
  120. package/dist/types/components/cms/instagram.components.d.ts.map +1 -1
  121. package/dist/types/components/cms/smartimage.d.ts +2 -28
  122. package/dist/types/components/cms/smartimage.d.ts.map +1 -1
  123. package/dist/types/components/cms/wordpress.components.d.ts +33 -14
  124. package/dist/types/components/cms/wordpress.components.d.ts.map +1 -1
  125. package/dist/types/components/cms/yelp.d.ts +9 -4
  126. package/dist/types/components/cms/yelp.d.ts.map +1 -1
  127. package/dist/types/components/config/config.server.d.ts +9 -6
  128. package/dist/types/components/config/config.server.d.ts.map +1 -1
  129. package/dist/types/components/general/loading.d.ts +5 -1
  130. package/dist/types/components/general/loading.d.ts.map +1 -1
  131. package/dist/types/components/general/microinteractions.d.ts +1 -3
  132. package/dist/types/components/general/microinteractions.d.ts.map +1 -1
  133. package/dist/types/components/general/modal.d.ts +11 -5
  134. package/dist/types/components/general/modal.d.ts.map +1 -1
  135. package/dist/types/components/general/semantic.d.ts +3 -3
  136. package/dist/types/components/general/sidepanel.d.ts +20 -13
  137. package/dist/types/components/general/sidepanel.d.ts.map +1 -1
  138. package/dist/types/components/general/tab.d.ts +1 -2
  139. package/dist/types/components/general/tab.d.ts.map +1 -1
  140. package/dist/types/components/menu/menu-accordion.d.ts +22 -9
  141. package/dist/types/components/menu/menu-accordion.d.ts.map +1 -1
  142. package/dist/types/components/menu/menu-expando.d.ts +14 -5
  143. package/dist/types/components/menu/menu-expando.d.ts.map +1 -1
  144. package/dist/types/components/menu/menu-simple.d.ts +4 -5
  145. package/dist/types/components/menu/menu-simple.d.ts.map +1 -1
  146. package/dist/types/components/nerdjoke/nerdjoke.d.ts +1 -1
  147. package/dist/types/components/nerdjoke/nerdjoke.d.ts.map +1 -1
  148. package/dist/types/components/seo/googleanalytics.d.ts.map +1 -1
  149. package/dist/types/components/seo/metadata.components.d.ts +2 -2
  150. package/dist/types/components/seo/metadata.components.d.ts.map +1 -1
  151. package/dist/types/components/seo/schema-blogposting.d.ts +7 -4
  152. package/dist/types/components/seo/schema-blogposting.d.ts.map +1 -1
  153. package/dist/types/components/seo/schema-recipe.d.ts +29 -30
  154. package/dist/types/components/seo/schema-recipe.d.ts.map +1 -1
  155. package/dist/types/components/seo/schema-services.d.ts +19 -9
  156. package/dist/types/components/seo/schema-services.d.ts.map +1 -1
  157. package/dist/types/components/shoppingcart/paypal.d.ts +1 -1
  158. package/dist/types/components/shoppingcart/paypal.d.ts.map +1 -1
  159. package/dist/types/components/shoppingcart/shoppingcart.components.d.ts +77 -28
  160. package/dist/types/components/shoppingcart/shoppingcart.components.d.ts.map +1 -1
  161. package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts +4 -23
  162. package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts.map +1 -1
  163. package/dist/types/components/sitebuilder/config/CompoundFontSelector.d.ts +10 -11
  164. package/dist/types/components/sitebuilder/config/CompoundFontSelector.d.ts.map +1 -1
  165. package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts +41 -174
  166. package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts.map +1 -1
  167. package/dist/types/components/sitebuilder/config/FontSelector.d.ts +12 -13
  168. package/dist/types/components/sitebuilder/config/FontSelector.d.ts.map +1 -1
  169. package/dist/types/components/sitebuilder/form/formbuilder.d.ts +7 -3
  170. package/dist/types/components/sitebuilder/form/formbuilder.d.ts.map +1 -1
  171. package/dist/types/components/sitebuilder/form/formcomponents.d.ts +1 -1
  172. package/dist/types/components/sitebuilder/form/formcomponents.d.ts.map +1 -1
  173. package/dist/types/components/sitebuilder/form/formengine.d.ts +1 -2
  174. package/dist/types/components/sitebuilder/form/formengine.d.ts.map +1 -1
  175. package/dist/types/components/sitebuilder/form/formextractor.d.ts +5 -4
  176. package/dist/types/components/sitebuilder/form/formextractor.d.ts.map +1 -1
  177. package/dist/types/components/sitebuilder/form/formtypes.d.ts +3 -3
  178. package/dist/types/components/sitebuilder/form/formtypes.d.ts.map +1 -1
  179. package/dist/types/components/sitebuilder/form/formvalidator.d.ts +8 -3
  180. package/dist/types/components/sitebuilder/form/formvalidator.d.ts.map +1 -1
  181. package/dist/types/components/sitebuilder/page/components/ComponentPropertiesForm.d.ts +2 -3
  182. package/dist/types/components/sitebuilder/page/components/ComponentPropertiesForm.d.ts.map +1 -1
  183. package/dist/types/components/sitebuilder/page/components/ComponentSelector.d.ts +2 -3
  184. package/dist/types/components/sitebuilder/page/components/ComponentSelector.d.ts.map +1 -1
  185. package/dist/types/components/sitebuilder/page/components/ComponentTree.d.ts +2 -3
  186. package/dist/types/components/sitebuilder/page/components/ComponentTree.d.ts.map +1 -1
  187. package/dist/types/components/sitebuilder/page/components/PageBuilderUI.d.ts +8 -7
  188. package/dist/types/components/sitebuilder/page/components/PageBuilderUI.d.ts.map +1 -1
  189. package/dist/types/components/sitebuilder/page/components/PageEngine.d.ts.map +1 -1
  190. package/dist/types/components/sitebuilder/page/components/SaveLoadSection.d.ts +2 -3
  191. package/dist/types/components/sitebuilder/page/components/SaveLoadSection.d.ts.map +1 -1
  192. package/dist/types/components/sitebuilder/page/lib/componentMap.d.ts +1 -1
  193. package/dist/types/components/structured/markdown.d.ts +1 -3
  194. package/dist/types/components/structured/markdown.d.ts.map +1 -1
  195. package/dist/types/components/structured/recipe.d.ts +5 -32
  196. package/dist/types/components/structured/recipe.d.ts.map +1 -1
  197. package/dist/types/components/structured/socialcard.d.ts +4 -0
  198. package/dist/types/components/structured/socialcard.d.ts.map +1 -1
  199. package/dist/types/components/structured/timeline.d.ts +1 -3
  200. package/dist/types/components/structured/timeline.d.ts.map +1 -1
  201. package/dist/types/components/utilities/functions.d.ts +20 -0
  202. package/dist/types/components/utilities/functions.d.ts.map +1 -1
  203. package/dist/types/components/utilities/gemini-api.client.d.ts +38 -0
  204. package/dist/types/components/utilities/gemini-api.client.d.ts.map +1 -0
  205. package/dist/types/components/utilities/gemini-api.server.d.ts +17 -0
  206. package/dist/types/components/utilities/gemini-api.server.d.ts.map +1 -0
  207. package/dist/types/index.adminclient.d.ts +27 -0
  208. package/dist/types/index.adminclient.d.ts.map +1 -0
  209. package/dist/types/index.adminserver.d.ts +19 -0
  210. package/dist/types/index.adminserver.d.ts.map +1 -0
  211. package/dist/types/index.d.ts +4 -18
  212. package/dist/types/index.server.d.ts +5 -28
  213. package/dist/types/stories/general/sidepanel.stories.d.ts.map +1 -1
  214. package/dist/types/stories/general/smartimage.stories.d.ts +74 -2
  215. package/dist/types/stories/general/smartimage.stories.d.ts.map +1 -1
  216. package/package.json +19 -9
  217. package/README.COMPONENTS.md +0 -2310
  218. package/dist/components/cms/pixelated.linkedin.js +0 -180
  219. package/dist/components/cms/pixelated.linkedin1.js +0 -84
  220. package/dist/components/cms/pixelated.linkedin2.js +0 -92
  221. package/dist/types/components/cms/pixelated.linkedin.d.ts +0 -2
  222. package/dist/types/components/cms/pixelated.linkedin.d.ts.map +0 -1
  223. package/dist/types/components/cms/pixelated.linkedin1.d.ts +0 -2
  224. package/dist/types/components/cms/pixelated.linkedin1.d.ts.map +0 -1
  225. package/dist/types/components/cms/pixelated.linkedin2.d.ts +0 -2
  226. package/dist/types/components/cms/pixelated.linkedin2.d.ts.map +0 -1
  227. package/dist/types/tests/pixelated.menu-expando.test.d.ts +0 -2
  228. package/dist/types/tests/pixelated.menu-expando.test.d.ts.map +0 -1
@@ -1,2310 +0,0 @@
1
- # Component Reference Guide
2
-
3
- This guide provides detailed API documentation and usage examples for all Pixelated Components.
4
-
5
- ## � Reference Implementation
6
-
7
- For a complete working example of Pixelated Components in action, check out the [pixelated-admin](https://github.com/brianwhaley/pixelated-admin) project. This admin interface demonstrates real-world usage of all components with:
8
-
9
- - **Component Integration**: Live examples of component combinations
10
- - **Configuration Management**: Dynamic site configuration with ConfigBuilder
11
- - **Page Building**: Visual page construction workflows
12
- - **Authentication**: Secure admin access patterns
13
- - **Production Setup**: HTTPS, optimization, and deployment configurations
14
-
15
- ## �📋 Table of Contents
16
-
17
- ### General Components
18
- - [Accordion](#accordion)
19
- - [Callout](#callout)
20
- - [CSS](#css)
21
- - [Loading](#loading)
22
- - [MicroInteractions](#microinteractions)
23
- - [Modal](#modal)
24
- - [Semantic](#semantic)
25
- - [SidePanel](#sidepanel)
26
- - [SmartImage](#smartimage)
27
- - [Tab](#tab)
28
- - [Table](#table)
29
-
30
- ### CMS Integration
31
- - [Calendly](#calendly)
32
- - [CloudinaryImage](#cloudinaryimage)
33
- - [ContentfulItems](#contentfulitems)
34
- - [GoogleReviews](#googlereviews)
35
- - [Gravatar](#gravatar)
36
- - [HubSpot](#hubspot)
37
- - [Instagram](#instagram)
38
- - [WordPress](#wordpress)
39
-
40
- ### UI Components
41
- - [Carousel](#carousel)
42
- - [Forms](#forms)
43
- - [Menu](#menu)
44
- - [Tables](#tables)
45
- - [Tiles](#tiles)
46
-
47
- ### PageBuilder Components
48
- - [ComponentPropertiesForm](#componentpropertiesform)
49
- - [ComponentSelector](#componentselector)
50
- - [ComponentTree](#componenttree)
51
- - [ConfigBuilder](#configbuilder)
52
- - [PageBuilderUI](#pagebuilderui)
53
- - [PageEngine](#pageengine)
54
- - [SaveLoadSection](#saveloadsection)
55
-
56
- ### Admin Components
57
- - [Component Usage](#component-usage)
58
- - [Deploy](#deploy)
59
- - [Site Health](#site-health)
60
- - [Sites](#sites)
61
-
62
- ### SEO & Schema
63
- - [404 Page](#404-page)
64
- - [GoogleAnalytics](#googleanalytics)
65
- - [GoogleMap](#googlemap)
66
- - [GoogleSearch](#googlesearch)
67
- - [JSON-LD Schemas](#json-ld-schemas)
68
- - [Manifest](#manifest)
69
- - [MetadataComponents](#metadatacomponents)
70
-
71
- ### Shopping Cart
72
- - [eBay Components](#ebay-components)
73
- - [PayPal](#paypal)
74
- - [ShoppingCart](#shoppingcart)
75
-
76
- ### Structured Content
77
- - [BuzzwordBingo](#buzzwordbingo)
78
- - [Markdown](#markdown)
79
- - [Recipe](#recipe)
80
- - [Resume](#resume)
81
- - [SocialCard](#socialcard)
82
- - [Timeline](#timeline)
83
-
84
- ### Entertainment
85
- - [NerdJoke](#nerdjoke)
86
-
87
- ---
88
-
89
- ## 📖 Usage Examples
90
-
91
- ### Basic Component Usage
92
-
93
- ```tsx
94
- import { Accordion, Callout, SmartImage } from '@pixelated-tech/components';
95
-
96
- function MyApp() {
97
- return (
98
- <div>
99
- <Accordion items={[
100
- { title: 'How it works', content: 'This component uses native HTML details elements...' },
101
- { title: 'Why use it', content: 'Accessible, lightweight, and SEO-friendly...' }
102
- ]} />
103
-
104
- <Callout
105
- title="Welcome!"
106
- content="This is a highlighted callout message"
107
- variant="boxed"
108
- />
109
-
110
- <SmartImage
111
- src="/path/to/image.jpg"
112
- alt="Description"
113
- aboveFold={true}
114
- />
115
- </div>
116
- );
117
- }
118
- ```
119
-
120
- ### Storybook Interactive Demos
121
-
122
- For interactive component exploration:
123
-
124
- ```bash
125
- # Start Storybook development server
126
- npm run storybook
127
- ```
128
-
129
- **Storybook provides:**
130
- - ✅ **Live component playground** - Try different props and see results instantly
131
- - ✅ **Multiple variants** - See components in different states and configurations
132
- - ✅ **Responsive testing** - Check how components behave on different screen sizes
133
- - ✅ **Accessibility testing** - Built-in a11y checks and guidelines
134
- - ✅ **Component documentation** - Auto-generated from TypeScript interfaces
135
-
136
- **Access locally at:** `http://localhost:6006`
137
-
138
- ---
139
-
140
- ## General Components
141
-
142
- ### Accordion
143
-
144
- Expandable content component using native `<details>` elements for accessibility and SEO.
145
-
146
- ```tsx
147
- import { Accordion } from '@pixelated-tech/components';
148
-
149
- const items = [
150
- {
151
- title: 'What is React?',
152
- content: 'React is a JavaScript library for building user interfaces.'
153
- },
154
- {
155
- title: 'How does it work?',
156
- content: 'React uses a component-based architecture and virtual DOM.'
157
- }
158
- ];
159
-
160
- <Accordion items={items} />
161
- ```
162
-
163
- #### Props
164
-
165
- | Prop | Type | Default | Description |
166
- |------|------|---------|-------------|
167
- | `items` | `Array<{title: string, content: string \| ReactNode}>` | - | Array of accordion items |
168
- | `className` | `string` | - | Additional CSS classes |
169
-
170
- #### Features
171
- - ✅ **Accessible** - Uses semantic HTML with proper ARIA attributes
172
- - ✅ **SEO-friendly** - Content is crawlable when expanded
173
- - ✅ **Lightweight** - No JavaScript required for basic functionality
174
- - ✅ **Customizable** - Full CSS customization support
175
-
176
- ---
177
-
178
- ### Callout
179
-
180
- Flexible content highlight component with image and button support.
181
-
182
- ```tsx
183
- import { Callout } from '@pixelated-tech/components';
184
-
185
- <Callout
186
- title="Important Notice"
187
- content="This is a highlighted message"
188
- variant="boxed"
189
- img="/path/to/image.jpg"
190
- url="/learn-more"
191
- />
192
- ```
193
-
194
- #### Props
195
-
196
- | Prop | Type | Default | Description |
197
- |------|------|---------|-------------|
198
- | `title` | `string` | - | Callout title |
199
- | `content` | `string \| ReactNode` | - | Callout content |
200
- | `variant` | `'default' \| 'boxed' \| 'full' \| 'grid' \| 'overlay' \| 'split'` | `'default'` | Visual style variant |
201
- | `boxShape` | `'square' \| 'bevel' \| 'squircle' \| 'round'` | `'squircle'` | Border radius style |
202
- | `layout` | `'horizontal' \| 'vertical'` | `'horizontal'` | Content layout |
203
- | `direction` | `'left' \| 'right'` | `'left'` | Image position (when layout is horizontal) |
204
- | `gridColumns` | `{left: number, right: number}` | `{left: 1, right: 2}` | Grid column distribution |
205
- | `img` | `string` | - | Image URL |
206
- | `imgAlt` | `string` | - | Image alt text |
207
- | `imgShape` | `'square' \| 'bevel' \| 'squircle' \| 'round'` | `'square'` | Image border radius |
208
- | `imgClick` | `(event: MouseEvent, url?: string) => void` | - | Image click handler |
209
- | `url` | `string` | - | Link URL for the entire callout |
210
- | `buttonText` | `string` | - | Custom button text |
211
- | `subtitle` | `string` | - | Subtitle text |
212
- | `aboveFold` | `boolean` | - | Image optimization hint |
213
-
214
- #### Variants
215
- - **`default`**: Simple layout with optional border
216
- - **`boxed`**: Border around entire callout
217
- - **`full`**: Full-width layout with minimal margins
218
- - **`grid`**: CSS Grid layout with configurable columns
219
- - **`overlay`**: Image overlay with text positioning
220
- - **`split`**: Full-width split layout
221
-
222
- ---
223
-
224
- ### Loading
225
-
226
- Progress indicator component with multiple animation styles.
227
-
228
- ```tsx
229
- import { Loading } from '@pixelated-tech/components';
230
-
231
- // Default spinner
232
- <Loading />
233
-
234
- // Custom message
235
- <Loading message="Loading data..." />
236
-
237
- // Different variants
238
- <Loading variant="dots" />
239
- <Loading variant="pulse" />
240
- <Loading variant="bars" />
241
- ```
242
-
243
- #### Props
244
- | Prop | Type | Default | Description |
245
- |------|------|---------|-------------|
246
- | `variant` | `'spinner' \| 'dots' \| 'pulse' \| 'bars'` | `'spinner'` | Animation style |
247
- | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Component size |
248
- | `message` | `string` | - | Loading message text |
249
- | `color` | `string` | - | Custom color (CSS color value) |
250
-
251
- ### Modal
252
-
253
- Dialog overlay component with accessibility features.
254
-
255
- ```tsx
256
- import { Modal } from '@pixelated-tech/components';
257
-
258
- const [isOpen, setIsOpen] = useState(false);
259
-
260
- <Modal
261
- isOpen={isOpen}
262
- onClose={() => setIsOpen(false)}
263
- title="Confirm Action"
264
- >
265
- <p>Are you sure you want to proceed?</p>
266
- <button onClick={() => setIsOpen(false)}>Cancel</button>
267
- <button onClick={handleConfirm}>Confirm</button>
268
- </Modal>
269
- ```
270
-
271
- #### Props
272
- | Prop | Type | Default | Description |
273
- |------|------|---------|-------------|
274
- | `isOpen` | `boolean` | `false` | Modal visibility |
275
- | `onClose` | `() => void` | - | Close handler |
276
- | `title` | `string` | - | Modal title |
277
- | `children` | `ReactNode` | - | Modal content |
278
- | `size` | `'small' \| 'medium' \| 'large' \| 'fullscreen'` | `'medium'` | Modal size |
279
- | `closeOnOverlay` | `boolean` | `true` | Close when clicking overlay |
280
-
281
- ### SidePanel
282
-
283
- Slide-out panel component for additional content.
284
-
285
- ```tsx
286
- import { SidePanel } from '@pixelated-tech/components';
287
-
288
- <SidePanel
289
- isOpen={isOpen}
290
- onClose={() => setIsOpen(false)}
291
- position="right"
292
- title="Settings"
293
- >
294
- <div>Panel content goes here</div>
295
- </SidePanel>
296
- ```
297
-
298
- #### Props
299
- | Prop | Type | Default | Description |
300
- |------|------|---------|-------------|
301
- | `isOpen` | `boolean` | `false` | Panel visibility |
302
- | `onClose` | `() => void` | - | Close handler |
303
- | `position` | `'left' \| 'right'` | `'right'` | Slide direction |
304
- | `title` | `string` | - | Panel title |
305
- | `children` | `ReactNode` | - | Panel content |
306
- | `width` | `string` | `'300px'` | Panel width |
307
-
308
- ### SmartImage
309
-
310
- Optimized image component with lazy loading and responsive features.
311
-
312
- ```tsx
313
- import { SmartImage } from '@pixelated-tech/components';
314
-
315
- // Default Cloudinary variant (with optimizations)
316
- <SmartImage
317
- src="/path/to/image.jpg"
318
- alt="Description"
319
- aboveFold={false}
320
- sizes="(max-width: 768px) 100vw, 50vw"
321
- />
322
-
323
- // Next.js Image variant (without Cloudinary)
324
- <SmartImage
325
- src="/path/to/image.jpg"
326
- alt="Description"
327
- variant="nextjs"
328
- />
329
-
330
- // Plain img tag variant (config-independent, for error pages)
331
- <SmartImage
332
- src="/path/to/image.jpg"
333
- alt="Description"
334
- variant="img"
335
- />
336
- ```
337
-
338
- #### Props
339
- | Prop | Type | Default | Description |
340
- |------|------|---------|-------------|
341
- | `src` | `string` | - | Image source URL |
342
- | `alt` | `string` | - | Alt text |
343
- | `variant` | `'cloudinary' \| 'nextjs' \| 'img'` | `'cloudinary'` | Rendering variant |
344
- | `aboveFold` | `boolean` | `false` | Above-the-fold hint for loading |
345
- | `sizes` | `string` | - | Responsive sizes attribute |
346
- | `loading` | `'lazy' \| 'eager'` | `'lazy'` | Loading strategy |
347
- | `width` | `number` | - | Image width |
348
- | `height` | `number` | - | Image height |
349
- | `quality` | `number` | `75` | Image quality (1-100) |
350
-
351
- ### CSS
352
-
353
- Utility functions for CSS optimization and loading.
354
-
355
- ```tsx
356
- import { deferAllCSS, preloadAllCSS } from '@pixelated-tech/components';
357
-
358
- // Defer CSS loading for better performance
359
- deferAllCSS();
360
-
361
- // Preload all CSS files
362
- preloadAllCSS();
363
- ```
364
-
365
- #### Functions
366
- - **`deferAllCSS()`**: Defers loading of all CSS stylesheets for improved page load performance
367
- - **`preloadAllCSS()`**: Preloads all CSS files with high priority
368
-
369
- ### MicroInteractions
370
-
371
- Component for adding subtle CSS animations and interactions to page elements.
372
-
373
- ```tsx
374
- import { MicroInteractions } from '@pixelated-tech/components';
375
-
376
- <MicroInteractions
377
- buttonring={true}
378
- cartpulse={true}
379
- formglow={true}
380
- imgscale={true}
381
- scrollfadeElements=".fade-on-scroll"
382
- />
383
- ```
384
-
385
- #### Props
386
- | Prop | Type | Default | Description |
387
- |------|------|---------|-------------|
388
- | `buttonring` | `boolean` | - | Add ring animation to buttons |
389
- | `cartpulse` | `boolean` | - | Pulse animation for cart elements |
390
- | `formglow` | `boolean` | - | Glow effect for form inputs |
391
- | `grayscalehover` | `boolean` | - | Grayscale to color transition on hover |
392
- | `imgscale` | `boolean` | - | Scale animation for images |
393
- | `imgtwist` | `boolean` | - | Twist animation for images |
394
- | `imghue` | `boolean` | - | Hue rotation for images |
395
- | `simplemenubutton` | `boolean` | - | Animation for simple menu buttons |
396
- | `scrollfadeElements` | `string` | - | CSS selector for elements to fade on scroll |
397
-
398
- ### Semantic
399
-
400
- Semantic HTML layout components for structured content.
401
-
402
- ```tsx
403
- import { PageSection, PageTitleHeader, GridContainer } from '@pixelated-tech/components';
404
-
405
- <PageSection layoutType="grid" autoFlow="row">
406
- <PageTitleHeader title="Welcome" />
407
- <GridContainer columns={3} gap="1rem">
408
- <div>Content 1</div>
409
- <div>Content 2</div>
410
- <div>Content 3</div>
411
- </GridContainer>
412
- </PageSection>
413
- ```
414
-
415
- #### Components
416
- - **`PageSection`**: Semantic section with configurable layout
417
- - **`PageTitleHeader`**: H1 title with optional link
418
- - **`GridContainer`**: CSS Grid container with responsive columns
419
- - **`FlexContainer`**: Flexbox container with alignment options
420
-
421
- ---
422
-
423
- ## CMS Integration
424
-
425
- ### WordPress Components
426
-
427
- WordPress integration components with automatic Photon CDN URL processing for optimized image delivery.
428
-
429
- #### BlogPostList
430
-
431
- Displays a list of WordPress blog posts with pagination support. Automatically converts WordPress Photon CDN URLs to direct image URLs for better Next.js optimization.
432
-
433
- ```tsx
434
- import { BlogPostList } from '@pixelated-tech/components';
435
-
436
- <BlogPostList
437
- site="blog.pixelated.tech"
438
- count={10}
439
- />
440
- ```
441
-
442
- #### Props
443
-
444
- | Prop | Type | Default | Description |
445
- |------|------|---------|-------------|
446
- | `site` | `string` | - | WordPress site identifier (e.g., 'blog.pixelated.tech' or 'your-blog.wordpress.com') |
447
- | `count` | `number` | - | Number of posts to fetch (undefined = all) |
448
- | `posts` | `BlogPostType[]` | - | Pre-fetched posts array |
449
- | `showCategories` | `boolean` | `true` | Whether to display post categories |
450
-
451
- #### BlogPostSummary
452
-
453
- Individual blog post display component.
454
-
455
- ```tsx
456
- import { BlogPostSummary } from '@pixelated-tech/components';
457
-
458
- <BlogPostSummary
459
- ID="123"
460
- title="Blog Post Title"
461
- date="2024-01-01"
462
- excerpt="Post excerpt..."
463
- URL="https://blog.example.com/post"
464
- categories={['tech', 'react']}
465
- />
466
- ```
467
-
468
- ### Calendly
469
-
470
- Scheduling integration component for Calendly bookings.
471
-
472
- ```tsx
473
- import { Calendly } from '@pixelated-tech/components';
474
-
475
- <Calendly
476
- url="https://calendly.com/username/meeting"
477
- styles={{ height: '600px' }}
478
- />
479
- ```
480
-
481
- #### Props
482
- | Prop | Type | Default | Description |
483
- |------|------|---------|-------------|
484
- | `url` | `string` | - | Calendly booking URL |
485
- | `styles` | `object` | - | Inline styles for iframe |
486
-
487
- ### CloudinaryImage
488
-
489
- Optimized image delivery with Cloudinary transformations.
490
-
491
- ```tsx
492
- import { SmartImage } from '@pixelated-tech/components';
493
-
494
- <SmartImage
495
- src="https://res.cloudinary.com/demo/image/upload/sample.jpg"
496
- alt="Cloudinary image"
497
- transformations="w_400,h_300,c_fill,f_auto"
498
- />
499
- ```
500
-
501
- #### Props
502
- | Prop | Type | Default | Description |
503
- |------|------|---------|-------------|
504
- | `src` | `string` | - | Cloudinary image URL |
505
- | `alt` | `string` | - | Alt text |
506
- | `transformations` | `string` | - | Cloudinary transformation string |
507
- | `aboveFold` | `boolean` | `false` | Loading priority |
508
-
509
- ### ContentfulItems
510
-
511
- Contentful headless CMS integration for displaying content.
512
-
513
- ```tsx
514
- import { ContentfulItems } from '@pixelated-tech/components';
515
-
516
- <ContentfulItems
517
- spaceId="your-space-id"
518
- accessToken="your-access-token"
519
- contentType="blogPost"
520
- limit={10}
521
- />
522
- ```
523
-
524
- #### Props
525
- | Prop | Type | Default | Description |
526
- |------|------|---------|-------------|
527
- | `spaceId` | `string` | - | Contentful space ID |
528
- | `accessToken` | `string` | - | Contentful access token |
529
- | `contentType` | `string` | - | Content type to fetch |
530
- | `limit` | `number` | `10` | Number of items to fetch |
531
-
532
- ### GoogleReviews
533
-
534
- Google Business Profile reviews integration.
535
-
536
- ```tsx
537
- import { GoogleReviews } from '@pixelated-tech/components';
538
-
539
- <GoogleReviews
540
- placeId="ChIJ1234567890abcdef"
541
- apiKey="your-google-api-key"
542
- />
543
- ```
544
-
545
- #### Props
546
- | Prop | Type | Default | Description |
547
- |------|------|---------|-------------|
548
- | `placeId` | `string` | - | Google Place ID |
549
- | `apiKey` | `string` | - | Google API key |
550
- | `maxReviews` | `number` | `5` | Maximum reviews to display |
551
-
552
- ### Gravatar
553
-
554
- User avatar integration with Gravatar service.
555
-
556
- ```tsx
557
- import { Gravatar } from '@pixelated-tech/components';
558
-
559
- <Gravatar
560
- email="user@example.com"
561
- size={100}
562
- defaultImage="identicon"
563
- />
564
- ```
565
-
566
- #### Props
567
- | Prop | Type | Default | Description |
568
- |------|------|---------|-------------|
569
- | `email` | `string` | - | User email for Gravatar lookup |
570
- | `size` | `number` | `80` | Avatar size in pixels |
571
- | `defaultImage` | `string` | `'identicon'` | Default image type |
572
-
573
- ### HubSpot
574
-
575
- CRM integration for HubSpot forms and tracking.
576
-
577
- ```tsx
578
- import { HubSpot } from '@pixelated-tech/components';
579
-
580
- <HubSpot
581
- portalId="1234567"
582
- formId="abcd-1234-5678-efgh"
583
- />
584
- ```
585
-
586
- #### Props
587
- | Prop | Type | Default | Description |
588
- |------|------|---------|-------------|
589
- | `portalId` | `string` | - | HubSpot portal ID |
590
- | `formId` | `string` | - | HubSpot form ID |
591
- | `onFormSubmit` | `function` | - | Form submission callback |
592
-
593
- ### Instagram
594
-
595
- Instagram feed integration for displaying posts.
596
-
597
- ```tsx
598
- import { Instagram } from '@pixelated-tech/components';
599
-
600
- <Instagram
601
- username="instagram"
602
- accessToken="your-access-token"
603
- limit={6}
604
- />
605
- ```
606
-
607
- #### Props
608
- | Prop | Type | Default | Description |
609
- |------|------|---------|-------------|
610
- | `username` | `string` | - | Instagram username |
611
- | `accessToken` | `string` | - | Instagram API access token |
612
- | `limit` | `number` | `6` | Number of posts to display |
613
-
614
- ---
615
-
616
-
617
-
618
- ## UI Components
619
-
620
- ### Carousel
621
-
622
- Image and content slider with multiple variants.
623
-
624
- #### CarouselHero
625
-
626
- Full-width hero carousel for landing pages.
627
-
628
- ```tsx
629
- import { CarouselHero } from '@pixelated-tech/components';
630
-
631
- const slides = [
632
- {
633
- image: '/hero1.jpg',
634
- title: 'Welcome',
635
- subtitle: 'To our platform',
636
- buttonText: 'Get Started',
637
- buttonUrl: '/signup'
638
- }
639
- ];
640
-
641
- <CarouselHero slides={slides} />
642
- ```
643
-
644
- #### CarouselReviews
645
-
646
- Customer testimonial carousel.
647
-
648
- ```tsx
649
- import { CarouselReviews } from '@pixelated-tech/components';
650
-
651
- const reviews = [
652
- {
653
- name: 'John Doe',
654
- company: 'Tech Corp',
655
- review: 'Great product!',
656
- avatar: '/john.jpg'
657
- }
658
- ];
659
-
660
- <CarouselReviews reviews={reviews} />
661
- ```
662
-
663
- ### Forms
664
-
665
- Dynamic form builder that generates forms from JSON configuration with comprehensive validation and event handling.
666
-
667
- #### FormEngine
668
-
669
- Complete form rendering engine with validation and submission handling.
670
-
671
- ```tsx
672
- import { FormEngine } from '@pixelated-tech/components';
673
-
674
- const formConfig = {
675
- fields: [
676
- {
677
- component: 'FormInput',
678
- props: {
679
- type: 'text',
680
- id: 'email',
681
- name: 'email',
682
- label: 'Email Address',
683
- placeholder: 'Enter your email',
684
- required: 'required',
685
- validate: 'email'
686
- }
687
- },
688
- {
689
- component: 'FormTextarea',
690
- props: {
691
- id: 'message',
692
- name: 'message',
693
- label: 'Message',
694
- placeholder: 'Enter your message',
695
- rows: '4',
696
- required: 'required'
697
- }
698
- },
699
- {
700
- component: 'FormSelect',
701
- props: {
702
- id: 'category',
703
- name: 'category',
704
- label: 'Category',
705
- options: [
706
- { text: 'General', value: 'general' },
707
- { text: 'Support', value: 'support' },
708
- { text: 'Sales', value: 'sales' }
709
- ]
710
- }
711
- }
712
- ]
713
- };
714
-
715
- <FormEngine
716
- formData={formConfig}
717
- onSubmitHandler={(data) => console.log('Form submitted:', data)}
718
- method="POST"
719
- />
720
- ```
721
-
722
- #### Form Components
723
-
724
- Individual form field components with unified event handling and validation.
725
-
726
- ##### FormInput
727
- Text input field with validation and accessibility features.
728
-
729
- ```tsx
730
- import { FormInput } from '@pixelated-tech/components';
731
-
732
- <FormInput
733
- type="email"
734
- id="email"
735
- name="email"
736
- label="Email Address"
737
- placeholder="Enter your email"
738
- required="required"
739
- validate="email"
740
- display="vertical"
741
- />
742
- ```
743
-
744
- **Props:**
745
- - `type`: Input type (text, email, password, etc.)
746
- - `id`: Unique identifier
747
- - `name`: Form field name
748
- - `label`: Display label
749
- - `placeholder`: Input placeholder text
750
- - `required`: Makes field required
751
- - `validate`: Validation rule name
752
- - `display`: Layout mode (vertical/horizontal)
753
-
754
- ##### FormTextarea
755
- Multi-line text input with validation.
756
-
757
- ```tsx
758
- import { FormTextarea } from '@pixelated-tech/components';
759
-
760
- <FormTextarea
761
- id="description"
762
- name="description"
763
- label="Description"
764
- placeholder="Enter description"
765
- rows="4"
766
- required="required"
767
- display="vertical"
768
- />
769
- ```
770
-
771
- ##### FormSelect
772
- Dropdown selection with option validation.
773
-
774
- ```tsx
775
- import { FormSelect } from '@pixelated-tech/components';
776
-
777
- <FormSelect
778
- id="category"
779
- name="category"
780
- label="Category"
781
- options={[
782
- { text: 'Option 1', value: 'opt1' },
783
- { text: 'Option 2', value: 'opt2' }
784
- ]}
785
- required="required"
786
- />
787
- ```
788
-
789
- ##### FormRadio
790
- Radio button group with validation.
791
-
792
- ```tsx
793
- import { FormRadio } from '@pixelated-tech/components';
794
-
795
- <FormRadio
796
- id="choice"
797
- name="choice"
798
- label="Choose an option"
799
- options={[
800
- { text: 'Option A', value: 'a' },
801
- { text: 'Option B', value: 'b' }
802
- ]}
803
- required="required"
804
- />
805
- ```
806
-
807
- ##### FormCheckbox
808
- Checkbox group with validation.
809
-
810
- ```tsx
811
- import { FormCheckbox } from '@pixelated-tech/components';
812
-
813
- <FormCheckbox
814
- id="preferences"
815
- name="preferences"
816
- label="Preferences"
817
- options={[
818
- { text: 'Email updates', value: 'email' },
819
- { text: 'SMS updates', value: 'sms' }
820
- ]}
821
- />
822
- ```
823
-
824
- ##### FormButton
825
- Action button for form submission.
826
-
827
- ```tsx
828
- import { FormButton } from '@pixelated-tech/components';
829
-
830
- <FormButton
831
- type="submit"
832
- id="submit-btn"
833
- text="Submit Form"
834
- onClick={handleSubmit}
835
- />
836
- ```
837
-
838
- ##### FormTooltip
839
- Unified tooltip and validation message component with mouseover behavior and conditional styling.
840
-
841
- ```tsx
842
- import { FormTooltip } from '@pixelated-tech/components';
843
-
844
- // Tooltip mode - displays information with black ⓘ icon
845
- <FormTooltip
846
- mode="tooltip"
847
- text={['This field is required', 'Please enter a valid email address']}
848
- />
849
-
850
- // Validation mode - displays errors with red ❌ icon
851
- <FormTooltip
852
- mode="validate"
853
- text={['Email format is invalid', 'Please check your input']}
854
- />
855
- ```
856
-
857
- **Props:**
858
- - `mode`: Display mode ('tooltip' for info, 'validate' for errors)
859
- - `text`: Array of strings to display (always use array format)
860
-
861
- **Features:**
862
- - **Conditional Icons**: ⓘ (black) for tooltips, ❌ (red) for validation errors
863
- - **Mouseover Behavior**: Shows/hides content on hover for both modes
864
- - **Unified Styling**: Consistent appearance with mode-based color variations
865
- - **Array-Based Text**: Always accepts text as string array for consistency
866
-
867
- #### Form Validation
868
-
869
- Built-in validation rules available via the `validate` prop:
870
-
871
- - `email`: Email format validation
872
- - `url`: URL format validation
873
- - `phone`: Phone number format
874
- - `zipcode`: US zip code validation
875
- - `required`: Required field validation
876
- - Custom validation functions can be added to `formvalidations.tsx`
877
-
878
- #### Recent Improvements
879
-
880
- **Version 3.2.14+** includes major refactoring for better performance and maintainability:
881
-
882
- - **FormTooltip Unification**: Merged FormTooltip and FormValidate into single component with mode-based rendering
883
- - **Unified Event Handling**: All form components now use consistent `onChange` and `onInput` handlers for better test compatibility
884
- - **Performance Optimization**: Replaced inefficient `JSON.parse/stringify` with direct object destructuring
885
- - **Code Deduplication**: Custom `useFormComponent` hook eliminates repetitive validation logic
886
- - **Circular Reference Prevention**: Fixed memory leaks in option generation for radio/checkbox components
887
- - **Enhanced Test Coverage**: 2,244 tests passing across 67 test files with comprehensive form component coverage
888
-
889
- ### Menu
890
-
891
- Navigation components with multiple interaction patterns.
892
-
893
- #### MenuSimple
894
-
895
- Basic horizontal navigation menu with automatic active state detection.
896
-
897
- ```tsx
898
- import { MenuSimple } from '@pixelated-tech/components';
899
-
900
- const menuItems = [
901
- { name: 'Home', path: '/' },
902
- { name: 'About', path: '/about' },
903
- { name: 'Services', path: '/services' },
904
- { name: 'Contact', path: '/contact' }
905
- ];
906
-
907
- <MenuSimple menuItems={menuItems} />
908
- ```
909
-
910
- #### MenuAccordion
911
-
912
- Expandable navigation menu with nested items and groups.
913
-
914
- ```tsx
915
- import { MenuAccordion } from '@pixelated-tech/components';
916
-
917
- const menuData = {
918
- home: { name: 'Home', path: '/' },
919
- services: {
920
- name: 'Services',
921
- routes: {
922
- webdev: { name: 'Web Development', path: '/services/web-dev' },
923
- design: { name: 'Design', path: '/services/design' },
924
- consulting: { name: 'Consulting', path: '/services/consulting' }
925
- }
926
- },
927
- about: { name: 'About', path: '/about' }
928
- };
929
-
930
- <MenuAccordion menuItems={menuData} />
931
- ```
932
-
933
- #### MenuExpando
934
-
935
- Expandable menu with smooth animations and toggle states.
936
-
937
- ```tsx
938
- import { MenuExpando } from '@pixelated-tech/components';
939
-
940
- const menuItems = [
941
- {
942
- name: 'Products',
943
- path: '/products',
944
- routes: [
945
- { name: 'Software', path: '/products/software' },
946
- { name: 'Hardware', path: '/products/hardware' }
947
- ]
948
- },
949
- { name: 'Support', path: '/support' }
950
- ];
951
-
952
- <MenuExpando menuItems={menuItems} />
953
- ```
954
-
955
- ### Tab
956
-
957
- Configurable tab component with multiple orientations and content areas.
958
-
959
- ```tsx
960
- import { Tab } from '@pixelated-tech/components';
961
-
962
- const tabs = [
963
- { id: 'tab1', label: 'Tab 1', content: <div>Content for Tab 1</div> },
964
- { id: 'tab2', label: 'Tab 2', content: <div>Content for Tab 2</div> },
965
- { id: 'tab3', label: 'Tab 3', content: <div>Content for Tab 3</div> },
966
- ];
967
-
968
- <Tab tabs={tabs} orientation="top" defaultActiveTab="tab1" />
969
- ```
970
-
971
- #### Props
972
-
973
- - `tabs`: Array of tab objects with `id`, `label`, and `content`
974
- - `orientation`: 'top' | 'bottom' | 'left' | 'right' (default: 'top')
975
- - `defaultActiveTab`: ID of the initially active tab
976
- - `onTabChange`: Callback function called when tab changes
977
-
978
- ### Tables
979
-
980
- Data display component with sorting and image support.
981
-
982
- ```tsx
983
- import { Table } from '@pixelated-tech/components';
984
-
985
- const userData = [
986
- {
987
- name: 'John Doe',
988
- email: 'john@example.com',
989
- avatar: 'https://example.com/avatar1.jpg',
990
- role: 'Admin'
991
- },
992
- {
993
- name: 'Jane Smith',
994
- email: 'jane@example.com',
995
- avatar: 'https://example.com/avatar2.jpg',
996
- role: 'User'
997
- }
998
- ];
999
-
1000
- <Table
1001
- data={userData}
1002
- id="users-table"
1003
- sortable={true}
1004
- />
1005
- ```
1006
-
1007
- ### Tiles
1008
-
1009
- Image grid layout component for displaying card-based content.
1010
-
1011
- ```tsx
1012
- import { Tiles } from '@pixelated-tech/components';
1013
-
1014
- const cards = [
1015
- {
1016
- image: '/project1.jpg',
1017
- imageAlt: 'Project 1',
1018
- bodyText: 'Portfolio project description',
1019
- link: '/projects/1'
1020
- },
1021
- {
1022
- image: '/project2.jpg',
1023
- imageAlt: 'Project 2',
1024
- bodyText: 'Another portfolio project',
1025
- link: '/projects/2'
1026
- }
1027
- ];
1028
-
1029
- <Tiles
1030
- cards={cards}
1031
- rowCount={3}
1032
- />
1033
- ```
1034
-
1035
- ---
1036
-
1037
- ## PageBuilder Components
1038
-
1039
- ### ComponentPropertiesForm
1040
-
1041
- Form for editing component properties in the page builder.
1042
-
1043
- ```tsx
1044
- import { ComponentPropertiesForm } from '@pixelated-tech/components';
1045
-
1046
- <ComponentPropertiesForm
1047
- component={selectedComponent}
1048
- onChange={handlePropertyChange}
1049
- onSave={handleSave}
1050
- />
1051
- ```
1052
-
1053
- #### Props
1054
- | Prop | Type | Default | Description |
1055
- |------|------|---------|-------------|
1056
- | `component` | `ComponentType` | - | Component being edited |
1057
- | `onChange` | `function` | - | Property change handler |
1058
- | `onSave` | `function` | - | Save handler |
1059
-
1060
- ### ComponentSelector
1061
-
1062
- Component picker for adding new components to pages.
1063
-
1064
- ```tsx
1065
- import { ComponentSelector } from '@pixelated-tech/components';
1066
-
1067
- <ComponentSelector
1068
- onSelect={handleComponentSelect}
1069
- category="general"
1070
- />
1071
- ```
1072
-
1073
- #### Props
1074
- | Prop | Type | Default | Description |
1075
- |------|------|---------|-------------|
1076
- | `onSelect` | `function` | - | Component selection handler |
1077
- | `category` | `string` | - | Component category filter |
1078
-
1079
- ### ComponentTree
1080
-
1081
- Visual tree representation of page components.
1082
-
1083
- ```tsx
1084
- import { ComponentTree } from '@pixelated-tech/components';
1085
-
1086
- <ComponentTree
1087
- components={pageComponents}
1088
- onSelect={handleComponentSelect}
1089
- selectedId={selectedComponentId}
1090
- />
1091
- ```
1092
-
1093
- #### Props
1094
- | Prop | Type | Default | Description |
1095
- |------|------|---------|-------------|
1096
- | `components` | `ComponentType[]` | - | Page components array |
1097
- | `onSelect` | `function` | - | Component selection handler |
1098
- | `selectedId` | `string` | - | Currently selected component ID |
1099
-
1100
- ### PageBuilderUI
1101
-
1102
- Main page builder interface component.
1103
-
1104
- ```tsx
1105
- import { PageBuilderUI } from '@pixelated-tech/components';
1106
-
1107
- <PageBuilderUI
1108
- initialPage={pageData}
1109
- onSave={handleSave}
1110
- availableComponents={componentLibrary}
1111
- />
1112
- ```
1113
-
1114
- #### Props
1115
- | Prop | Type | Default | Description |
1116
- |------|------|---------|-------------|
1117
- | `initialPage` | `PageType` | - | Initial page data |
1118
- | `onSave` | `function` | - | Save handler |
1119
- | `availableComponents` | `ComponentType[]` | - | Available components |
1120
-
1121
- ### PageEngine
1122
-
1123
- Runtime page rendering engine.
1124
-
1125
- ```tsx
1126
- import { PageEngine } from '@pixelated-tech/components';
1127
-
1128
- <PageEngine
1129
- pageData={pageData}
1130
- context={pageContext}
1131
- />
1132
- ```
1133
-
1134
- #### Props
1135
- | Prop | Type | Default | Description |
1136
- |------|------|---------|-------------|
1137
- | `pageData` | `PageType` | - | Page structure data |
1138
- | `context` | `object` | - | Runtime context |
1139
-
1140
- ### SaveLoadSection
1141
-
1142
- Save and load functionality for page builder.
1143
-
1144
- ```tsx
1145
- import { SaveLoadSection } from '@pixelated-tech/components';
1146
-
1147
- <SaveLoadSection
1148
- onSave={handleSave}
1149
- onLoad={handleLoad}
1150
- onNew={handleNew}
1151
- />
1152
- ```
1153
-
1154
- #### Props
1155
- | Prop | Type | Default | Description |
1156
- |------|------|---------|-------------|
1157
- | `onSave` | `function` | - | Save handler |
1158
- | `onLoad` | `function` | - | Load handler |
1159
- | `onNew` | `function` | - | New page handler |
1160
-
1161
- ### ConfigBuilder
1162
-
1163
- Tabbed interface for managing site metadata and routes configuration.
1164
-
1165
- ```tsx
1166
- import { ConfigBuilder } from '@pixelated-tech/components';
1167
-
1168
- <ConfigBuilder
1169
- initialConfig={{
1170
- siteInfo: { name: 'My Site', description: 'Site description' },
1171
- routes: [
1172
- { path: '/home', component: 'Home', title: 'Home Page' }
1173
- ]
1174
- }}
1175
- onSave={(config) => console.log('Config saved:', config)}
1176
- />
1177
- ```
1178
-
1179
- #### Props
1180
- | Prop | Type | Default | Description |
1181
- |------|------|---------|-------------|
1182
- | `initialConfig` | `SiteConfig` | - | Initial site configuration |
1183
- | `onSave` | `function` | - | Configuration save handler |
1184
-
1185
- #### SiteConfig Type
1186
- ```tsx
1187
- interface SiteConfig {
1188
- siteInfo: {
1189
- name: string;
1190
- author: string;
1191
- description: string;
1192
- url: string;
1193
- email: string;
1194
- favicon: string;
1195
- favicon_sizes: string;
1196
- favicon_type: string;
1197
- theme_color: string;
1198
- background_color: string;
1199
- default_locale: string;
1200
- display: string;
1201
- image?: string;
1202
- image_height?: string;
1203
- image_width?: string;
1204
- telephone?: string;
1205
- address?: {
1206
- streetAddress: string;
1207
- addressLocality: string;
1208
- addressRegion: string;
1209
- postalCode: string;
1210
- addressCountry: string;
1211
- };
1212
- priceRange?: string;
1213
- sameAs?: string[];
1214
- keywords?: string;
1215
- };
1216
- routes: Array<{
1217
- path: string;
1218
- component: string;
1219
- title?: string;
1220
- description?: string;
1221
- }>;
1222
- visualdesign?: {
1223
- 'primary-color': string;
1224
- 'secondary-color': string;
1225
- 'accent1-color': string;
1226
- 'accent2-color': string;
1227
- 'bg-color': string;
1228
- 'text-color': string;
1229
- 'header-font-primary': string;
1230
- 'header-font-fallback': string;
1231
- 'header-font-generic': string;
1232
- 'body-font-primary': string;
1233
- 'body-font-fallback': string;
1234
- 'body-font-generic': string;
1235
- 'font-size1-min': string;
1236
- 'font-size1-max': string;
1237
- 'font-size2-min': string;
1238
- 'font-size2-max': string;
1239
- 'font-size3-min': string;
1240
- 'font-size3-max': string;
1241
- 'font-size4-min': string;
1242
- 'font-size4-max': string;
1243
- 'font-size5-min': string;
1244
- 'font-size5-max': string;
1245
- 'font-size6-min': string;
1246
- 'font-size6-max': string;
1247
- 'font-min-screen': string;
1248
- 'font-max-screen': string;
1249
- };
1250
- }
1251
- ```
1252
-
1253
- #### Features
1254
- - **Tabbed Interface**: Organized into "Site Info", "Routes", and "Visual Design" tabs
1255
- - **Comprehensive Site Info Management**: Edit all standard site metadata fields including PWA settings, contact info, and address
1256
- - **Route Management**: Add, edit, and remove page routes with component mapping
1257
- - **Visual Design Configuration**: Manage design tokens like colors, fonts, and spacing through a form-based interface
1258
- - **Real-time Preview**: JSON preview of current configuration
1259
- - **Save Functionality**: Callback-based configuration persistence with form validation enforcement
1260
- - **Form Validation**: Required field validation for essential site information with visual feedback
1261
-
1262
- #### Validation Behavior
1263
-
1264
- The "Save Config" button enforces form validation before allowing configuration saves:
1265
-
1266
- - **Required Fields**: Site name, author, description, URL, and email are mandatory
1267
- - **Visual Feedback**: Invalid fields show validation errors with ❌ indicators
1268
- - **Save Prevention**: Save action is blocked until all required validations pass
1269
- - **Real-time Validation**: Form validates as you type with immediate feedback
1270
-
1271
- #### Visual Design Tab
1272
-
1273
- The Visual Design tab provides a form-based interface for configuring visual design tokens. These tokens are stored in the `visualdesign` object of the site configuration and can be used to maintain consistent theming across your application.
1274
-
1275
- **Supported Design Tokens:**
1276
- - **Colors**: Primary, secondary, accent, text, and background colors
1277
- - **Typography**: Header and body fonts with primary Google Fonts, web-safe fallbacks, and generic family fallbacks
1278
- - **Layout**: Border radius, box shadows, transition durations
1279
-
1280
- **Usage in Components:**
1281
- ```tsx
1282
- // Access visual design tokens from config
1283
- const config = useConfig();
1284
- const primaryColor = config.visualdesign?.['primary-color'] || '#369';
1285
- ```
1286
-
1287
- ### FontSelector
1288
-
1289
- Autocomplete input component for selecting fonts with support for Google Fonts, web-safe fonts, and generic font families.
1290
-
1291
- ```tsx
1292
- import { FontSelector } from '@pixelated-tech/components';
1293
-
1294
- <FontSelector
1295
- id="header-font-primary"
1296
- name="header-font-primary"
1297
- label="Header Font (Google Fonts)"
1298
- fontType="google"
1299
- value="Montserrat"
1300
- onChange={(font) => console.log('Selected font:', font)}
1301
- />
1302
- ```
1303
-
1304
- #### Props
1305
- | Prop | Type | Default | Description |
1306
- |------|------|---------|-------------|
1307
- | `id` | `string` | - | Unique identifier for the input |
1308
- | `name` | `string` | - | Name attribute for form submission |
1309
- | `label` | `string` | - | Display label for the input |
1310
- | `fontType` | `'google' \| 'websafe' \| 'generic'` | - | Type of fonts to show in autocomplete |
1311
- | `value` | `string` | `''` | Current selected font value |
1312
- | `onChange` | `function` | - | Callback when font selection changes |
1313
- | `required` | `boolean` | `false` | Whether the field is required |
1314
- | `placeholder` | `string` | - | Placeholder text (auto-generated based on fontType) |
1315
-
1316
- #### Font Types
1317
-
1318
- - **`google`**: Shows Google Fonts with live preview links
1319
- - **`websafe`**: Shows common web-safe fonts (Arial, Helvetica, etc.)
1320
- - **`generic`**: Shows CSS generic font families (serif, sans-serif, etc.)
1321
-
1322
- #### Features
1323
-
1324
- - **Autocomplete**: Intelligent font suggestions as you type
1325
- - **Google Fonts Integration**: Direct links to Google Fonts preview pages
1326
- - **Web-safe Fallbacks**: Ensures font availability across devices
1327
- - **Generic Families**: CSS generic font family support
1328
- - **Accessibility**: Proper labeling and keyboard navigation
1329
-
1330
- ### ConfigEngine
1331
-
1332
- Components for rendering visual design styles and Google Fonts imports from configuration data.
1333
-
1334
- #### VisualDesignStyles
1335
-
1336
- Renders CSS custom properties from visual design configuration tokens.
1337
-
1338
- ```tsx
1339
- import { VisualDesignStyles } from '@pixelated-tech/components';
1340
-
1341
- <VisualDesignStyles visualdesign={{
1342
- 'primary-color': '#007bff',
1343
- 'header-font-primary': 'Montserrat',
1344
- 'header-font-fallback': 'Arial',
1345
- 'header-font-generic': 'sans-serif',
1346
- 'font-size1-min': '14px',
1347
- 'font-size1-max': '18px'
1348
- }} />
1349
- ```
1350
-
1351
- **Generated CSS:**
1352
- ```css
1353
- :root {
1354
- --primary-color: #007bff;
1355
- --header-font-family: "Montserrat", "Arial", "sans-serif";
1356
- --font-size1: clamp(var(--font-size1-min), calc(var(--font-size1-min) + ((var(--font-size1-max) - var(--font-size1-min)) * ((100vw - var(--font-min-screen)) / (var(--font-max-screen) - var(--font-min-screen))))), var(--font-size1-max));
1357
- }
1358
- h1 { font-size: var(--font-size1); }
1359
- ```
1360
-
1361
- #### GoogleFontsImports
1362
-
1363
- Automatically generates Google Fonts link tags for fonts specified in visual design configuration.
1364
-
1365
- ```tsx
1366
- import { GoogleFontsImports } from '@pixelated-tech/components';
1367
-
1368
- <GoogleFontsImports visualdesign={{
1369
- 'header-font-primary': 'Montserrat',
1370
- 'body-font-primary': 'Open Sans'
1371
- }} />
1372
- ```
1373
-
1374
- **Generated HTML:**
1375
- ```html
1376
- <link rel="preconnect" href="https://fonts.googleapis.com">
1377
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1378
- <link href="https://fonts.googleapis.com/css2?family=Montserrat|Open+Sans&display=swap" rel="stylesheet">
1379
- ```
1380
-
1381
- #### Features
1382
-
1383
- - **Font Stack Generation**: Automatically builds CSS font-family stacks from 3-field font configuration
1384
- - **Responsive Typography**: Generates fluid font sizes using CSS clamp() for responsive design
1385
- - **Google Fonts Integration**: Automatically imports only the Google Fonts used in the design
1386
- - **Web-safe Font Filtering**: Excludes web-safe fonts from Google Fonts imports to reduce loading
1387
- - **Server-safe**: Both components are safe to use in server components and API routes
1388
-
1389
- ---
1390
-
1391
- ## Admin Components
1392
-
1393
- Admin components provide tools for managing and monitoring websites, including site health monitoring, deployment, and component usage analysis.
1394
-
1395
- ### Component Usage
1396
-
1397
- Tracks and analyzes component usage across your application.
1398
-
1399
- ```typescript
1400
- import { ComponentDiscovery, ComponentAnalysis } from '@pixelated-tech/components/server';
1401
-
1402
- // Discover all components in your project
1403
- const components = await ComponentDiscovery.discoverComponents('./src');
1404
-
1405
- // Analyze component usage
1406
- const analysis = await ComponentAnalysis.analyzeUsage('./src', components);
1407
- ```
1408
-
1409
- #### Features
1410
-
1411
- - **Component Discovery**: Automatically finds all React components in your codebase
1412
- - **Usage Analysis**: Tracks where and how components are used
1413
- - **Server-safe**: Safe to use in API routes and server components
1414
-
1415
- ### Deploy
1416
-
1417
- Deployment utilities for managing site deployments.
1418
-
1419
- ```typescript
1420
- import { DeploymentIntegration } from '@pixelated-tech/components/server';
1421
-
1422
- // Deploy to production
1423
- const result = await DeploymentIntegration.deploy({
1424
- source: './dist',
1425
- destination: 'production-site',
1426
- config: deploymentConfig
1427
- });
1428
- ```
1429
-
1430
- #### Features
1431
-
1432
- - **Automated Deployment**: Streamlined deployment process
1433
- - **Configuration Management**: Flexible deployment configurations
1434
- - **Error Handling**: Comprehensive error reporting and recovery
1435
-
1436
- ### Site Health
1437
-
1438
- Comprehensive site health monitoring components.
1439
-
1440
- ```typescript
1441
- import {
1442
- SiteHealthOverview,
1443
- SiteHealthAxeCore,
1444
- SiteHealthPerformance
1445
- } from '@pixelated-tech/components';
1446
-
1447
- // Core Web Vitals overview
1448
- <SiteHealthOverview siteName="example.com" />
1449
-
1450
- // Accessibility testing with axe-core
1451
- <SiteHealthAxeCore siteName="example.com" />
1452
-
1453
- // Performance metrics
1454
- <SiteHealthPerformance siteName="example.com" />
1455
- ```
1456
-
1457
- #### Available Health Checks
1458
-
1459
- - **Axe Core Accessibility**: Automated accessibility testing
1460
- - **Core Web Vitals**: Performance metrics (LCP, FID, CLS)
1461
- - **Google Analytics**: Traffic and engagement data
1462
- - **Google Search Console**: Search performance and indexing
1463
- - **On-site SEO**: Meta tags, structured data, and SEO elements
1464
- - **Security Scan**: Security headers and vulnerabilities
1465
- - **Dependency Vulnerabilities**: Outdated or vulnerable dependencies
1466
- - **GitHub Integration**: Repository health and activity
1467
- - **Uptime Monitoring**: Site availability and response times
1468
-
1469
- #### Features
1470
-
1471
- - **Real-time Monitoring**: Live data from various APIs and services
1472
- - **Caching**: Built-in caching with configurable TTL
1473
- - **Error Handling**: Graceful error handling and fallbacks
1474
- - **Server-safe**: Components work in server and client environments
1475
-
1476
- ### Sites
1477
-
1478
- Site configuration management utilities.
1479
-
1480
- ```typescript
1481
- import {
1482
- loadSitesConfig,
1483
- saveSitesConfig,
1484
- getSiteConfig,
1485
- validateSiteConfig
1486
- } from '@pixelated-tech/components/server';
1487
-
1488
- // Load site configurations
1489
- const sites = await loadSitesConfig();
1490
-
1491
- // Get specific site
1492
- const site = await getSiteConfig('my-site');
1493
-
1494
- // Validate site configuration
1495
- const validation = validateSiteConfig(site);
1496
- if (!validation.valid) {
1497
- console.error('Invalid site config:', validation.errors);
1498
- }
1499
- ```
1500
-
1501
- #### Features
1502
-
1503
- - **Configuration Management**: Load and save site configurations
1504
- - **Validation**: Comprehensive site configuration validation
1505
- - **GA4 Integration**: Google Analytics 4 property validation
1506
- - **Search Console**: Google Search Console URL validation
1507
- - **File System Operations**: Safe file operations with error handling
1508
-
1509
- ---
1510
-
1511
- ## SEO & Schema
1512
-
1513
- ### JSON-LD Schemas
1514
-
1515
- Structured data components for SEO.
1516
-
1517
- **Configuration**: The LocalBusiness and Website schema components can use `siteInfo` data from the routes JSON file as fallback values when props are not explicitly provided. This allows for centralized site-wide configuration of business/website information.
1518
-
1519
- #### LocalBusiness
1520
-
1521
- Generates LocalBusiness JSON-LD structured data. When props are not provided, falls back to `siteInfo` configuration from routes JSON.
1522
-
1523
- ```tsx
1524
- import { LocalBusinessSchema } from '@pixelated-tech/components';
1525
-
1526
- // With explicit props
1527
- <LocalBusinessSchema
1528
- name="My Business"
1529
- address={{
1530
- streetAddress: '123 Main St',
1531
- addressLocality: 'City',
1532
- addressRegion: 'State',
1533
- postalCode: '12345'
1534
- }}
1535
- telephone="(555) 123-4567"
1536
- />
1537
-
1538
- // Or with siteinfo object (recommended)
1539
- <LocalBusinessSchema
1540
- siteInfo={siteInfoData}
1541
- streetAddress="123 Main St"
1542
- addressLocality="City"
1543
- addressRegion="State"
1544
- postalCode="12345"
1545
- />
1546
-
1547
- // Or with minimal props (uses siteInfo fallbacks)
1548
- <LocalBusinessSchema />
1549
- ```
1550
- ```
1551
-
1552
- #### Recipe
1553
-
1554
- ```tsx
1555
- import { RecipeSchema } from '@pixelated-tech/components';
1556
-
1557
- <RecipeSchema
1558
- name="Chocolate Chip Cookies"
1559
- author="Chef Name"
1560
- prepTime="PT15M"
1561
- cookTime="PT10M"
1562
- ingredients={[
1563
- '2 cups flour',
1564
- '1 cup butter',
1565
- '1 cup sugar'
1566
- ]}
1567
- instructions={[
1568
- {
1569
- text: 'Mix dry ingredients',
1570
- position: 1
1571
- }
1572
- ]}
1573
- />
1574
- ```
1575
-
1576
- #### Services
1577
-
1578
- ```tsx
1579
- import { ServicesSchema } from '@pixelated-tech/components';
1580
-
1581
- <ServicesSchema
1582
- name="Web Development Services"
1583
- description="Professional web development and design services"
1584
- provider={{
1585
- name: "My Company",
1586
- url: "https://example.com"
1587
- }}
1588
- serviceType="Web Development"
1589
- areaServed="Global"
1590
- />
1591
- ```
1592
-
1593
- #### Website
1594
-
1595
- Generates Website JSON-LD structured data. When props are not provided, falls back to `siteInfo` configuration from routes JSON.
1596
-
1597
- ```tsx
1598
- import { WebsiteSchema } from '@pixelated-tech/components';
1599
-
1600
- // With explicit props
1601
- <WebsiteSchema
1602
- name="My Website"
1603
- url="https://example.com"
1604
- description="Website description"
1605
- publisher={{
1606
- name: "My Company",
1607
- logo: "https://example.com/logo.png"
1608
- }}
1609
- />
1610
-
1611
- // Or with siteinfo object (recommended)
1612
- <WebsiteSchema
1613
- siteInfo={siteInfoData}
1614
- potentialAction={{
1615
- '@type': 'SearchAction',
1616
- target: {
1617
- '@type': 'EntryPoint',
1618
- urlTemplate: 'https://example.com/search?q={search_term}'
1619
- }
1620
- }}
1621
- />
1622
-
1623
- // Or with minimal props (uses siteInfo fallbacks)
1624
- <WebsiteSchema />
1625
- ```
1626
- ```
1627
-
1628
- #### BlogPosting
1629
-
1630
- ```tsx
1631
- import { BlogPostingSchema } from '@pixelated-tech/components';
1632
-
1633
- <BlogPostingSchema
1634
- headline="Blog Post Title"
1635
- author={{
1636
- name: "Author Name",
1637
- url: "https://example.com/author"
1638
- }}
1639
- datePublished="2024-01-01"
1640
- dateModified="2024-01-15"
1641
- articleBody="Full blog post content..."
1642
- image="https://example.com/blog-image.jpg"
1643
- />
1644
- ```
1645
-
1646
- ### 404 Page
1647
-
1648
- Custom 404 error page component.
1649
-
1650
- ```tsx
1651
- import { NotFound } from '@pixelated-tech/components';
1652
-
1653
- <NotFound
1654
- title="Page Not Found"
1655
- message="The page you're looking for doesn't exist."
1656
- homeUrl="/"
1657
- />
1658
- ```
1659
-
1660
- #### Props
1661
- | Prop | Type | Default | Description |
1662
- |------|------|---------|-------------|
1663
- | `title` | `string` | `'404 - Page Not Found'` | Page title |
1664
- | `message` | `string` | - | Error message |
1665
- | `homeUrl` | `string` | `'/'` | Home page URL |
1666
-
1667
- ### GoogleAnalytics
1668
-
1669
- Google Analytics tracking component.
1670
-
1671
- ```tsx
1672
- import { GoogleAnalytics } from '@pixelated-tech/components';
1673
-
1674
- <GoogleAnalytics
1675
- trackingId="GA_MEASUREMENT_ID"
1676
- debug={false}
1677
- />
1678
- ```
1679
-
1680
- #### Props
1681
- | Prop | Type | Default | Description |
1682
- |------|------|---------|-------------|
1683
- | `trackingId` | `string` | - | Google Analytics tracking ID |
1684
- | `debug` | `boolean` | `false` | Enable debug mode |
1685
-
1686
- ### GoogleMap
1687
-
1688
- Embedded Google Maps component.
1689
-
1690
- ```tsx
1691
- import { GoogleMap } from '@pixelated-tech/components';
1692
-
1693
- <GoogleMap
1694
- apiKey="your-google-api-key"
1695
- center={{ lat: 40.7128, lng: -74.0060 }}
1696
- zoom={12}
1697
- markers={[{ position: { lat: 40.7128, lng: -74.0060 }, title: 'New York' }]}
1698
- />
1699
- ```
1700
-
1701
- #### Props
1702
- | Prop | Type | Default | Description |
1703
- |------|------|---------|-------------|
1704
- | `apiKey` | `string` | - | Google Maps API key |
1705
- | `center` | `LatLng` | - | Map center coordinates |
1706
- | `zoom` | `number` | `10` | Map zoom level |
1707
- | `markers` | `Marker[]` | - | Map markers array |
1708
-
1709
- ### GoogleSearch
1710
-
1711
- Google Custom Search integration.
1712
-
1713
- ```tsx
1714
- import { GoogleSearch } from '@pixelated-tech/components';
1715
-
1716
- <GoogleSearch
1717
- searchEngineId="your-search-engine-id"
1718
- apiKey="your-api-key"
1719
- placeholder="Search our site..."
1720
- />
1721
- ```
1722
-
1723
- #### Props
1724
- | Prop | Type | Default | Description |
1725
- |------|------|---------|-------------|
1726
- | `searchEngineId` | `string` | - | Google Custom Search Engine ID |
1727
- | `apiKey` | `string` | - | Google API key |
1728
- | `placeholder` | `string` | `'Search...'` | Search input placeholder |
1729
-
1730
- ### Manifest
1731
-
1732
- Generates a complete PWA manifest from siteinfo configuration. This component centralizes PWA manifest generation and ensures consistency across sites.
1733
-
1734
- ```tsx
1735
- import { Manifest } from '@pixelated-tech/components';
1736
-
1737
- // Basic usage with siteinfo
1738
- export default function manifest() {
1739
- return Manifest({ siteInfo: myRoutes.siteInfo });
1740
- }
1741
-
1742
- // With custom properties for site-specific overrides
1743
- export default function manifest() {
1744
- return Manifest({
1745
- siteInfo: myRoutes.siteInfo,
1746
- customProperties: {
1747
- orientation: 'portrait',
1748
- categories: ['business', 'productivity'],
1749
- lang: 'en-US'
1750
- }
1751
- });
1752
- }
1753
- ```
1754
-
1755
- #### Props
1756
- | Prop | Type | Default | Description |
1757
- |------|------|---------|-------------|
1758
- | `siteInfo` | `SiteInfo` | - | Site configuration object from routes.json |
1759
- | `customProperties` | `Partial<MetadataRoute.Manifest>` | `{}` | Optional custom manifest properties to override defaults |
1760
-
1761
- #### Generated Properties
1762
-
1763
- The component automatically generates these manifest properties from `siteInfo`:
1764
-
1765
- - `name` & `short_name`: From `siteInfo.name`
1766
- - `description`: From `siteInfo.description`
1767
- - `theme_color`: From `siteInfo.theme_color`
1768
- - `background_color`: From `siteInfo.background_color`
1769
- - `display`: From `siteInfo.display`
1770
- - `homepage_url`: From `siteInfo.url`
1771
- - `developer`: Object with `name` and `url` from siteInfo
1772
- - `icons`: Array with favicon configuration
1773
- - `author`: From `siteInfo.author` (non-standard property)
1774
- - `default_locale`: From `siteInfo.default_locale`
1775
-
1776
- ### MetadataComponents
1777
-
1778
- Dynamic meta tag injection for SEO.
1779
-
1780
- ```tsx
1781
- import { MetadataComponents } from '@pixelated-tech/components';
1782
-
1783
- <MetadataComponents
1784
- title="Page Title"
1785
- description="Page description for SEO"
1786
- keywords="keyword1, keyword2"
1787
- ogImage="/social-image.jpg"
1788
- />
1789
- ```
1790
-
1791
- #### Props
1792
- | Prop | Type | Default | Description |
1793
- |------|------|---------|-------------|
1794
- | `title` | `string` | - | Page title |
1795
- | `description` | `string` | - | Meta description |
1796
- | `keywords` | `string` | - | Meta keywords |
1797
- | `ogImage` | `string` | - | Open Graph image URL |
1798
-
1799
- ---
1800
-
1801
- ## Shopping Cart
1802
-
1803
- ### eBay Components
1804
-
1805
- eBay store integration and product listings.
1806
-
1807
- ```tsx
1808
- import { eBay } from '@pixelated-tech/components';
1809
-
1810
- <eBay
1811
- storeId="your-store-id"
1812
- keywords="electronics"
1813
- limit={12}
1814
- />
1815
- ```
1816
-
1817
- #### Props
1818
- | Prop | Type | Default | Description |
1819
- |------|------|---------|-------------|
1820
- | `storeId` | `string` | - | eBay store ID |
1821
- | `keywords` | `string` | - | Search keywords |
1822
- | `limit` | `number` | `10` | Number of items to display |
1823
-
1824
- ### PayPal
1825
-
1826
- PayPal payment integration component.
1827
-
1828
- ```tsx
1829
- import { PayPal } from '@pixelated-tech/components';
1830
-
1831
- <PayPal
1832
- amount={29.99}
1833
- currency="USD"
1834
- itemName="Premium Plan"
1835
- onSuccess={handlePaymentSuccess}
1836
- />
1837
- ```
1838
-
1839
- #### Props
1840
- | Prop | Type | Default | Description |
1841
- |------|------|---------|-------------|
1842
- | `amount` | `number` | - | Payment amount |
1843
- | `currency` | `string` | `'USD'` | Currency code |
1844
- | `itemName` | `string` | - | Item description |
1845
- | `onSuccess` | `function` | - | Success callback |
1846
-
1847
- ### ShoppingCart
1848
-
1849
- Shopping cart functionality with item management.
1850
-
1851
- ```tsx
1852
- import { ShoppingCart } from '@pixelated-tech/components';
1853
-
1854
- <ShoppingCart
1855
- items={cartItems}
1856
- onUpdateQuantity={handleQuantityChange}
1857
- onRemoveItem={handleRemoveItem}
1858
- />
1859
- ```
1860
-
1861
- #### Props
1862
- | Prop | Type | Default | Description |
1863
- |------|------|---------|-------------|
1864
- | `items` | `CartItem[]` | - | Cart items array |
1865
- | `onUpdateQuantity` | `function` | - | Quantity change handler |
1866
- | `onRemoveItem` | `function` | - | Item removal handler |
1867
-
1868
- ---
1869
-
1870
- ## Structured Content
1871
-
1872
- ### BuzzwordBingo
1873
-
1874
- Interactive buzzword bingo game component.
1875
-
1876
- ```tsx
1877
- import { BuzzwordBingo } from '@pixelated-tech/components';
1878
-
1879
- <BuzzwordBingo
1880
- words={['synergy', 'paradigm', 'leverage', 'optimize']}
1881
- size={5}
1882
- />
1883
- ```
1884
-
1885
- #### Props
1886
- | Prop | Type | Default | Description |
1887
- |------|------|---------|-------------|
1888
- | `words` | `string[]` | - | Array of buzzwords |
1889
- | `size` | `number` | `5` | Grid size (NxN) |
1890
-
1891
- ### Markdown
1892
-
1893
- Markdown rendering component with syntax highlighting.
1894
-
1895
- ```tsx
1896
- import { Markdown } from '@pixelated-tech/components';
1897
-
1898
- <Markdown
1899
- content="# Hello World\n\nThis is **markdown** content."
1900
- allowHtml={false}
1901
- />
1902
- ```
1903
-
1904
- #### Props
1905
- | Prop | Type | Default | Description |
1906
- |------|------|---------|-------------|
1907
- | `content` | `string` | - | Markdown content |
1908
- | `allowHtml` | `boolean` | `false` | Allow HTML in markdown |
1909
-
1910
- ### Recipe
1911
-
1912
- Recipe display component with structured data.
1913
-
1914
- ```tsx
1915
- import { Recipe } from '@pixelated-tech/components';
1916
-
1917
- <Recipe
1918
- title="Chocolate Chip Cookies"
1919
- ingredients={['2 cups flour', '1 cup sugar', '1 cup chocolate chips']}
1920
- instructions={['Mix dry ingredients', 'Add wet ingredients', 'Bake at 350°F']}
1921
- prepTime="15 min"
1922
- cookTime="12 min"
1923
- />
1924
- ```
1925
-
1926
- #### Props
1927
- | Prop | Type | Default | Description |
1928
- |------|------|---------|-------------|
1929
- | `title` | `string` | - | Recipe title |
1930
- | `ingredients` | `string[]` | - | Ingredient list |
1931
- | `instructions` | `string[]` | - | Cooking instructions |
1932
- | `prepTime` | `string` | - | Preparation time |
1933
- | `cookTime` | `string` | - | Cooking time |
1934
-
1935
- ### Resume
1936
-
1937
- Professional resume/CV display component.
1938
-
1939
- ```tsx
1940
- import { Resume } from '@pixelated-tech/components';
1941
-
1942
- <Resume
1943
- personalInfo={{ name: 'John Doe', email: 'john@example.com' }}
1944
- experience={workExperience}
1945
- education={educationHistory}
1946
- skills={['React', 'TypeScript', 'Node.js']}
1947
- />
1948
- ```
1949
-
1950
- #### Props
1951
- | Prop | Type | Default | Description |
1952
- |------|------|---------|-------------|
1953
- | `personalInfo` | `object` | - | Personal information |
1954
- | `experience` | `Experience[]` | - | Work experience |
1955
- | `education` | `Education[]` | - | Education history |
1956
- | `skills` | `string[]` | - | Skills list |
1957
-
1958
- ### SocialCard
1959
-
1960
- Social media card component for sharing.
1961
-
1962
- ```tsx
1963
- import { SocialCard } from '@pixelated-tech/components';
1964
-
1965
- <SocialCard
1966
- title="Check out this article"
1967
- description="An interesting article about React components"
1968
- image="/article-image.jpg"
1969
- url="https://example.com/article"
1970
- />
1971
- ```
1972
-
1973
- #### Props
1974
- | Prop | Type | Default | Description |
1975
- |------|------|---------|-------------|
1976
- | `title` | `string` | - | Card title |
1977
- | `description` | `string` | - | Card description |
1978
- | `image` | `string` | - | Card image URL |
1979
- | `url` | `string` | - | Link URL |
1980
-
1981
- ### Timeline
1982
-
1983
- Timeline component for displaying chronological events.
1984
-
1985
- ```tsx
1986
- import { Timeline } from '@pixelated-tech/components';
1987
-
1988
- <Timeline
1989
- events={[
1990
- { date: '2020-01-01', title: 'Started Company', description: 'Founded XYZ Corp' },
1991
- { date: '2021-06-15', title: 'First Product', description: 'Launched flagship product' }
1992
- ]}
1993
- />
1994
- ```
1995
-
1996
- #### Props
1997
- | Prop | Type | Default | Description |
1998
- |------|------|---------|-------------|
1999
- | `events` | `TimelineEvent[]` | - | Array of timeline events |
2000
- | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Timeline orientation |
2001
-
2002
- ---
2003
-
2004
- ## Admin Components
2005
-
2006
- ### Site Health
2007
-
2008
- Comprehensive site monitoring and health check components for performance, security, and SEO analysis.
2009
-
2010
- #### SiteHealthOverview
2011
-
2012
- Displays Core Web Vitals and Lighthouse performance metrics.
2013
-
2014
- ```tsx
2015
- import { SiteHealthOverview } from '@pixelated-tech/components';
2016
-
2017
- <SiteHealthOverview siteName="my-site" />
2018
- ```
2019
-
2020
- #### SiteHealthAxeCore
2021
-
2022
- Accessibility auditing using axe-core.
2023
-
2024
- ```tsx
2025
- import { SiteHealthAxeCore } from '@pixelated-tech/components';
2026
-
2027
- <SiteHealthAxeCore siteName="my-site" />
2028
- ```
2029
-
2030
- #### SiteHealthPerformance
2031
-
2032
- Performance monitoring and metrics.
2033
-
2034
- ```tsx
2035
- import { SiteHealthPerformance } from '@pixelated-tech/components';
2036
-
2037
- <SiteHealthPerformance siteName="my-site" />
2038
- ```
2039
-
2040
- #### SiteHealthSecurity
2041
-
2042
- Security scanning and vulnerability assessment.
2043
-
2044
- ```tsx
2045
- import { SiteHealthSecurity } from '@pixelated-tech/components';
2046
-
2047
- <SiteHealthSecurity siteName="my-site" />
2048
- ```
2049
-
2050
- #### SiteHealthSEO
2051
-
2052
- SEO analysis and recommendations.
2053
-
2054
- ```tsx
2055
- import { SiteHealthSEO } from '@pixelated-tech/components';
2056
-
2057
- <SiteHealthSEO siteName="my-site" />
2058
- ```
2059
-
2060
- #### SiteHealthOnSiteSEO
2061
-
2062
- Advanced on-page SEO analysis with Puppeteer rendering.
2063
-
2064
- ```tsx
2065
- import { SiteHealthOnSiteSEO } from '@pixelated-tech/components';
2066
-
2067
- <SiteHealthOnSiteSEO siteName="my-site" />
2068
- ```
2069
-
2070
- #### SiteHealthCloudwatch
2071
-
2072
- AWS CloudWatch uptime monitoring and availability tracking.
2073
-
2074
- ```tsx
2075
- import { SiteHealthCloudwatch } from '@pixelated-tech/components';
2076
-
2077
- <SiteHealthCloudwatch
2078
- siteName="my-site"
2079
- startDate="2024-01-01"
2080
- endDate="2024-01-31"
2081
- />
2082
- ```
2083
-
2084
- #### SiteHealthGoogleAnalytics
2085
-
2086
- Google Analytics integration and reporting.
2087
-
2088
- ```tsx
2089
- import { SiteHealthGoogleAnalytics } from '@pixelated-tech/components';
2090
-
2091
- <SiteHealthGoogleAnalytics siteName="my-site" />
2092
- ```
2093
-
2094
- #### SiteHealthGoogleSearchConsole
2095
-
2096
- Google Search Console data and insights.
2097
-
2098
- ```tsx
2099
- import { SiteHealthGoogleSearchConsole } from '@pixelated-tech/components';
2100
-
2101
- <SiteHealthGoogleSearchConsole siteName="my-site" />
2102
- ```
2103
-
2104
- #### SiteHealthDependencyVulnerabilities
2105
-
2106
- NPM package vulnerability scanning.
2107
-
2108
- ```tsx
2109
- import { SiteHealthDependencyVulnerabilities } from '@pixelated-tech/components';
2110
-
2111
- <SiteHealthDependencyVulnerabilities siteName="my-site" />
2112
- ```
2113
-
2114
- #### SiteHealthGit
2115
-
2116
- Git repository health and commit analysis.
2117
-
2118
- ```tsx
2119
- import { SiteHealthGit } from '@pixelated-tech/components';
2120
-
2121
- <SiteHealthGit siteName="my-site" />
2122
- ```
2123
-
2124
- #### SiteHealthUptime
2125
-
2126
- Website uptime monitoring.
2127
-
2128
- ```tsx
2129
- import { SiteHealthUptime } from '@pixelated-tech/components';
2130
-
2131
- <SiteHealthUptime siteName="my-site" />
2132
- ```
2133
-
2134
- ### Sites
2135
-
2136
- Site management and configuration components.
2137
-
2138
- #### Sites Integration
2139
-
2140
- ```tsx
2141
- import { loadSitesConfig, saveSitesConfig } from '@pixelated-tech/components';
2142
-
2143
- // Load site configuration
2144
- const sites = loadSitesConfig();
2145
-
2146
- // Save site configuration
2147
- saveSitesConfig(sites);
2148
- ```
2149
-
2150
- ---
2151
-
2152
- ## Entertainment
2153
-
2154
- ### NerdJoke
2155
-
2156
- Random nerd joke generator component.
2157
-
2158
- ```tsx
2159
- import { NerdJoke } from '@pixelated-tech/components';
2160
-
2161
- <NerdJoke
2162
- category="programming"
2163
- refreshInterval={30000}
2164
- />
2165
- ```
2166
-
2167
- #### Props
2168
- | Prop | Type | Default | Description |
2169
- |------|------|---------|-------------|
2170
- | `category` | `string` | `'random'` | Joke category |
2171
- | `refreshInterval` | `number` | - | Auto-refresh interval (ms) |
2172
-
2173
- ---
2174
-
2175
- ## Configuration Examples
2176
-
2177
- ### PixelatedClientConfigProvider Setup
2178
-
2179
- The PixelatedClientConfigProvider enables components to access centralized configuration data. Configuration can be loaded from environment variables or a `routes.json` file in your project.
2180
-
2181
- **Config Consumers:**
2182
- - **LocalBusinessSchema & WebsiteSchema**: Use `siteInfo` for fallback business/website data
2183
- - **CloudinaryImage & SmartImage**: Use `cloudinary` for image optimization settings
2184
- - **WordPress**: Use `wordpress` for API connections
2185
- - **ContentfulItems**: Use `contentful` for CMS integration
2186
- - **eBay**: Use `ebay` for store integration
2187
- - **Flickr**: Use `flickr` for photo gallery integration
2188
- - **GoogleAnalytics**: Use `googleAnalytics` for tracking
2189
- - **HubSpot**: Use `hubspot` for CRM integration
2190
- - **PayPal**: Use `paypal` for payment processing
2191
- - **Proxy**: Use `proxy` for API proxy settings
2192
-
2193
- ```tsx
2194
- // app/layout.tsx (Next.js 13+ App Router)
2195
- import { PixelatedClientConfigProvider } from '@pixelated-tech/components';
2196
-
2197
- export default function RootLayout({
2198
- children,
2199
- }: {
2200
- children: React.ReactNode;
2201
- }) {
2202
- return (
2203
- <html lang="en">
2204
- <body>
2205
- <PixelatedClientConfigProvider config={{
2206
- // Site-wide business/website information (used by schema components)
2207
- siteInfo: {
2208
- name: 'Your Business Name',
2209
- description: 'Your business description',
2210
- url: 'https://yourwebsite.com',
2211
- email: 'contact@yourwebsite.com',
2212
- telephone: '(555) 123-4567',
2213
- address: {
2214
- streetAddress: '123 Main St',
2215
- addressLocality: 'City',
2216
- addressRegion: 'State',
2217
- postalCode: '12345',
2218
- addressCountry: 'United States'
2219
- },
2220
- openingHours: 'Mo-Fr 09:00-18:00'
2221
- },
2222
- // Image optimization
2223
- cloudinary: {
2224
- product_env: 'production',
2225
- baseUrl: 'https://res.cloudinary.com/your-account',
2226
- transforms: 'f_auto,q_auto,w_auto'
2227
- },
2228
- // CMS integrations
2229
- wordpress: {
2230
- site: 'your-blog.wordpress.com'
2231
- },
2232
- contentful: {
2233
- spaceId: 'your-space-id',
2234
- accessToken: 'your-access-token',
2235
- environment: 'master'
2236
- },
2237
- // E-commerce
2238
- ebay: {
2239
- appId: 'your-app-id',
2240
- globalId: 'EBAY-US'
2241
- },
2242
- paypal: {
2243
- sandboxPayPalApiKey: 'your-sandbox-key',
2244
- payPalApiKey: 'your-production-key'
2245
- },
2246
- // Analytics & CRM
2247
- googleAnalytics: {
2248
- id: 'GA-XXXXXXXXX'
2249
- },
2250
- hubspot: {
2251
- portalId: 'your-portal-id',
2252
- formId: 'your-form-id'
2253
- },
2254
- // Media services
2255
- flickr: {
2256
- api_key: 'your-flickr-api-key',
2257
- user_id: 'your-user-id'
2258
- },
2259
- // API proxy
2260
- proxy: {
2261
- proxyURL: 'https://proxy.pixelated.tech/prod/proxy?url='
2262
- }
2263
- }}>
2264
- {children}
2265
- </PixelatedClientConfigProvider>
2266
- </body>
2267
- </html>
2268
- );
2269
- }
2270
- ```
2271
-
2272
- ---
2273
-
2274
- ## TypeScript Support
2275
-
2276
- All components include full TypeScript definitions:
2277
-
2278
- ```tsx
2279
- import type {
2280
- CalloutType,
2281
- BlogPostType,
2282
- CarouselSlide,
2283
- PixelatedConfig
2284
- } from '@pixelated-tech/components';
2285
- ```
2286
-
2287
- ## CDN Usage (Not Recommended)
2288
-
2289
- ```html
2290
- <script src="https://unpkg.com/@pixelated-tech/components@latest/dist/index.js"></script>
2291
- ```
2292
-
2293
- **Note**: CDN usage is not recommended for production as it doesn't support tree-shaking and may include unnecessary code.
2294
-
2295
- ## Contributing
2296
-
2297
- When adding new components, please:
2298
- 1. Add TypeScript interfaces to `src/index.d.ts`
2299
- 2. Create Storybook stories in `src/stories/`
2300
- 3. Add comprehensive documentation here
2301
- 4. Include usage examples and prop tables
2302
-
2303
- ---
2304
-
2305
- *For more examples and advanced usage, check the [Storybook interactive demos](https://your-storybook-url).*
2306
-
2307
-
2308
- ---
2309
-
2310
- *This documentation is automatically updated when components are modified. Last updated: December 17, 2025*