@pixelated-tech/components 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.COMPONENTS.md +232 -2
- package/README.md +133 -27
- package/dist/components/cms/cloudinary.image.js +1 -0
- package/dist/components/cms/wordpress.components.js +1 -0
- package/dist/components/general/sidepanel.js +1 -1
- package/dist/components/menu/menu-accordion.css +10 -0
- package/dist/components/menu/menu-accordion.js +2 -1
- package/dist/components/menu/menu-simple.css +0 -7
- package/dist/components/sitebuilder/config/CompoundFontSelector.css +25 -0
- package/dist/components/sitebuilder/config/CompoundFontSelector.js +41 -0
- package/dist/components/sitebuilder/config/ConfigBuilder.css +11 -0
- package/dist/components/sitebuilder/config/ConfigBuilder.js +188 -29
- package/dist/components/sitebuilder/config/ConfigEngine.js +82 -0
- package/dist/components/sitebuilder/config/FontSelector.css +82 -0
- package/dist/components/sitebuilder/config/FontSelector.js +115 -0
- package/dist/components/sitebuilder/config/google-fonts.js +112 -0
- package/dist/components/sitebuilder/form/formbuilder.js +1 -0
- package/dist/components/sitebuilder/form/formcomponents.js +28 -4
- package/dist/components/structured/markdown.js +1 -0
- package/dist/components/structured/recipe.js +1 -0
- package/dist/components/structured/timeline.js +1 -0
- package/dist/css/pixelated.global.css +0 -35
- package/dist/css/pixelated.grid.scss +4 -0
- package/dist/css/pixelated.visualdesign.scss +88 -0
- package/dist/data/routes.json +32 -1
- package/dist/data/visualdesignform.json +244 -0
- package/dist/index.js +4 -0
- package/dist/index.server.js +3 -3
- package/dist/types/components/cms/cloudinary.image.d.ts.map +1 -1
- package/dist/types/components/cms/wordpress.components.d.ts.map +1 -1
- package/dist/types/components/menu/menu-accordion.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/config/CompoundFontSelector.d.ts +23 -0
- package/dist/types/components/sitebuilder/config/CompoundFontSelector.d.ts.map +1 -0
- package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts +270 -2
- package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/config/ConfigEngine.d.ts +10 -0
- package/dist/types/components/sitebuilder/config/ConfigEngine.d.ts.map +1 -0
- package/dist/types/components/sitebuilder/config/FontSelector.d.ts +27 -0
- package/dist/types/components/sitebuilder/config/FontSelector.d.ts.map +1 -0
- package/dist/types/components/sitebuilder/config/google-fonts.d.ts +41 -0
- package/dist/types/components/sitebuilder/config/google-fonts.d.ts.map +1 -0
- package/dist/types/components/sitebuilder/form/formbuilder.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/form/formcomponents.d.ts +3 -1
- package/dist/types/components/sitebuilder/form/formcomponents.d.ts.map +1 -1
- package/dist/types/components/structured/markdown.d.ts.map +1 -1
- package/dist/types/components/structured/recipe.d.ts.map +1 -1
- package/dist/types/components/structured/timeline.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.server.d.ts +3 -3
- package/dist/types/stories/sitebuilder/compoundfontselector.stories.d.ts +51 -0
- package/dist/types/stories/sitebuilder/compoundfontselector.stories.d.ts.map +1 -0
- package/dist/types/stories/sitebuilder/configbuilder.stories.d.ts +55 -0
- package/dist/types/stories/sitebuilder/configbuilder.stories.d.ts.map +1 -1
- package/dist/types/tests/compoundfontselector.test.d.ts +2 -0
- package/dist/types/tests/compoundfontselector.test.d.ts.map +1 -0
- package/dist/types/tests/configengine.test.d.ts +2 -0
- package/dist/types/tests/configengine.test.d.ts.map +1 -0
- package/dist/types/tests/fontselector.test.d.ts +2 -0
- package/dist/types/tests/fontselector.test.d.ts.map +1 -0
- package/package.json +11 -9
package/README.COMPONENTS.md
CHANGED
|
@@ -2,13 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
This guide provides detailed API documentation and usage examples for all Pixelated Components.
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
|
6
16
|
|
|
7
17
|
### General Components
|
|
8
18
|
- [Accordion](#accordion)
|
|
9
19
|
- [Callout](#callout)
|
|
20
|
+
- [CSS](#css)
|
|
10
21
|
- [Loading](#loading)
|
|
22
|
+
- [MicroInteractions](#microinteractions)
|
|
11
23
|
- [Modal](#modal)
|
|
24
|
+
- [Semantic](#semantic)
|
|
12
25
|
- [SidePanel](#sidepanel)
|
|
13
26
|
- [SmartImage](#smartimage)
|
|
14
27
|
- [Tab](#tab)
|
|
@@ -312,6 +325,76 @@ import { SmartImage } from '@pixelated-tech/components';
|
|
|
312
325
|
| `width` | `number` | - | Image width |
|
|
313
326
|
| `height` | `number` | - | Image height |
|
|
314
327
|
|
|
328
|
+
### CSS
|
|
329
|
+
|
|
330
|
+
Utility functions for CSS optimization and loading.
|
|
331
|
+
|
|
332
|
+
```tsx
|
|
333
|
+
import { deferAllCSS, preloadAllCSS } from '@pixelated-tech/components';
|
|
334
|
+
|
|
335
|
+
// Defer CSS loading for better performance
|
|
336
|
+
deferAllCSS();
|
|
337
|
+
|
|
338
|
+
// Preload all CSS files
|
|
339
|
+
preloadAllCSS();
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Functions
|
|
343
|
+
- **`deferAllCSS()`**: Defers loading of all CSS stylesheets for improved page load performance
|
|
344
|
+
- **`preloadAllCSS()`**: Preloads all CSS files with high priority
|
|
345
|
+
|
|
346
|
+
### MicroInteractions
|
|
347
|
+
|
|
348
|
+
Component for adding subtle CSS animations and interactions to page elements.
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
import { MicroInteractions } from '@pixelated-tech/components';
|
|
352
|
+
|
|
353
|
+
<MicroInteractions
|
|
354
|
+
buttonring={true}
|
|
355
|
+
cartpulse={true}
|
|
356
|
+
formglow={true}
|
|
357
|
+
imgscale={true}
|
|
358
|
+
scrollfadeElements=".fade-on-scroll"
|
|
359
|
+
/>
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
#### Props
|
|
363
|
+
| Prop | Type | Default | Description |
|
|
364
|
+
|------|------|---------|-------------|
|
|
365
|
+
| `buttonring` | `boolean` | - | Add ring animation to buttons |
|
|
366
|
+
| `cartpulse` | `boolean` | - | Pulse animation for cart elements |
|
|
367
|
+
| `formglow` | `boolean` | - | Glow effect for form inputs |
|
|
368
|
+
| `grayscalehover` | `boolean` | - | Grayscale to color transition on hover |
|
|
369
|
+
| `imgscale` | `boolean` | - | Scale animation for images |
|
|
370
|
+
| `imgtwist` | `boolean` | - | Twist animation for images |
|
|
371
|
+
| `imghue` | `boolean` | - | Hue rotation for images |
|
|
372
|
+
| `simplemenubutton` | `boolean` | - | Animation for simple menu buttons |
|
|
373
|
+
| `scrollfadeElements` | `string` | - | CSS selector for elements to fade on scroll |
|
|
374
|
+
|
|
375
|
+
### Semantic
|
|
376
|
+
|
|
377
|
+
Semantic HTML layout components for structured content.
|
|
378
|
+
|
|
379
|
+
```tsx
|
|
380
|
+
import { PageSection, PageTitleHeader, GridContainer } from '@pixelated-tech/components';
|
|
381
|
+
|
|
382
|
+
<PageSection layoutType="grid" autoFlow="row">
|
|
383
|
+
<PageTitleHeader title="Welcome" />
|
|
384
|
+
<GridContainer columns={3} gap="1rem">
|
|
385
|
+
<div>Content 1</div>
|
|
386
|
+
<div>Content 2</div>
|
|
387
|
+
<div>Content 3</div>
|
|
388
|
+
</GridContainer>
|
|
389
|
+
</PageSection>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
#### Components
|
|
393
|
+
- **`PageSection`**: Semantic section with configurable layout
|
|
394
|
+
- **`PageTitleHeader`**: H1 title with optional link
|
|
395
|
+
- **`GridContainer`**: CSS Grid container with responsive columns
|
|
396
|
+
- **`FlexContainer`**: Flexbox container with alignment options
|
|
397
|
+
|
|
315
398
|
---
|
|
316
399
|
|
|
317
400
|
## CMS Integration
|
|
@@ -1113,13 +1196,42 @@ interface SiteConfig {
|
|
|
1113
1196
|
title?: string;
|
|
1114
1197
|
description?: string;
|
|
1115
1198
|
}>;
|
|
1199
|
+
visualdesign?: {
|
|
1200
|
+
'primary-color': string;
|
|
1201
|
+
'secondary-color': string;
|
|
1202
|
+
'accent1-color': string;
|
|
1203
|
+
'accent2-color': string;
|
|
1204
|
+
'bg-color': string;
|
|
1205
|
+
'text-color': string;
|
|
1206
|
+
'header-font-primary': string;
|
|
1207
|
+
'header-font-fallback': string;
|
|
1208
|
+
'header-font-generic': string;
|
|
1209
|
+
'body-font-primary': string;
|
|
1210
|
+
'body-font-fallback': string;
|
|
1211
|
+
'body-font-generic': string;
|
|
1212
|
+
'font-size1-min': string;
|
|
1213
|
+
'font-size1-max': string;
|
|
1214
|
+
'font-size2-min': string;
|
|
1215
|
+
'font-size2-max': string;
|
|
1216
|
+
'font-size3-min': string;
|
|
1217
|
+
'font-size3-max': string;
|
|
1218
|
+
'font-size4-min': string;
|
|
1219
|
+
'font-size4-max': string;
|
|
1220
|
+
'font-size5-min': string;
|
|
1221
|
+
'font-size5-max': string;
|
|
1222
|
+
'font-size6-min': string;
|
|
1223
|
+
'font-size6-max': string;
|
|
1224
|
+
'font-min-screen': string;
|
|
1225
|
+
'font-max-screen': string;
|
|
1226
|
+
};
|
|
1116
1227
|
}
|
|
1117
1228
|
```
|
|
1118
1229
|
|
|
1119
1230
|
#### Features
|
|
1120
|
-
- **Tabbed Interface**: Organized into "Site Info" and "
|
|
1231
|
+
- **Tabbed Interface**: Organized into "Site Info", "Routes", and "Visual Design" tabs
|
|
1121
1232
|
- **Comprehensive Site Info Management**: Edit all standard site metadata fields including PWA settings, contact info, and address
|
|
1122
1233
|
- **Route Management**: Add, edit, and remove page routes with component mapping
|
|
1234
|
+
- **Visual Design Configuration**: Manage design tokens like colors, fonts, and spacing through a form-based interface
|
|
1123
1235
|
- **Real-time Preview**: JSON preview of current configuration
|
|
1124
1236
|
- **Save Functionality**: Callback-based configuration persistence with form validation enforcement
|
|
1125
1237
|
- **Form Validation**: Required field validation for essential site information with visual feedback
|
|
@@ -1133,6 +1245,124 @@ The "Save Config" button enforces form validation before allowing configuration
|
|
|
1133
1245
|
- **Save Prevention**: Save action is blocked until all required validations pass
|
|
1134
1246
|
- **Real-time Validation**: Form validates as you type with immediate feedback
|
|
1135
1247
|
|
|
1248
|
+
#### Visual Design Tab
|
|
1249
|
+
|
|
1250
|
+
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.
|
|
1251
|
+
|
|
1252
|
+
**Supported Design Tokens:**
|
|
1253
|
+
- **Colors**: Primary, secondary, accent, text, and background colors
|
|
1254
|
+
- **Typography**: Header and body fonts with primary Google Fonts, web-safe fallbacks, and generic family fallbacks
|
|
1255
|
+
- **Layout**: Border radius, box shadows, transition durations
|
|
1256
|
+
|
|
1257
|
+
**Usage in Components:**
|
|
1258
|
+
```tsx
|
|
1259
|
+
// Access visual design tokens from config
|
|
1260
|
+
const config = useConfig();
|
|
1261
|
+
const primaryColor = config.visualdesign?.['primary-color'] || '#369';
|
|
1262
|
+
```
|
|
1263
|
+
|
|
1264
|
+
### FontSelector
|
|
1265
|
+
|
|
1266
|
+
Autocomplete input component for selecting fonts with support for Google Fonts, web-safe fonts, and generic font families.
|
|
1267
|
+
|
|
1268
|
+
```tsx
|
|
1269
|
+
import { FontSelector } from '@pixelated-tech/components';
|
|
1270
|
+
|
|
1271
|
+
<FontSelector
|
|
1272
|
+
id="header-font-primary"
|
|
1273
|
+
name="header-font-primary"
|
|
1274
|
+
label="Header Font (Google Fonts)"
|
|
1275
|
+
fontType="google"
|
|
1276
|
+
value="Montserrat"
|
|
1277
|
+
onChange={(font) => console.log('Selected font:', font)}
|
|
1278
|
+
/>
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
#### Props
|
|
1282
|
+
| Prop | Type | Default | Description |
|
|
1283
|
+
|------|------|---------|-------------|
|
|
1284
|
+
| `id` | `string` | - | Unique identifier for the input |
|
|
1285
|
+
| `name` | `string` | - | Name attribute for form submission |
|
|
1286
|
+
| `label` | `string` | - | Display label for the input |
|
|
1287
|
+
| `fontType` | `'google' \| 'websafe' \| 'generic'` | - | Type of fonts to show in autocomplete |
|
|
1288
|
+
| `value` | `string` | `''` | Current selected font value |
|
|
1289
|
+
| `onChange` | `function` | - | Callback when font selection changes |
|
|
1290
|
+
| `required` | `boolean` | `false` | Whether the field is required |
|
|
1291
|
+
| `placeholder` | `string` | - | Placeholder text (auto-generated based on fontType) |
|
|
1292
|
+
|
|
1293
|
+
#### Font Types
|
|
1294
|
+
|
|
1295
|
+
- **`google`**: Shows Google Fonts with live preview links
|
|
1296
|
+
- **`websafe`**: Shows common web-safe fonts (Arial, Helvetica, etc.)
|
|
1297
|
+
- **`generic`**: Shows CSS generic font families (serif, sans-serif, etc.)
|
|
1298
|
+
|
|
1299
|
+
#### Features
|
|
1300
|
+
|
|
1301
|
+
- **Autocomplete**: Intelligent font suggestions as you type
|
|
1302
|
+
- **Google Fonts Integration**: Direct links to Google Fonts preview pages
|
|
1303
|
+
- **Web-safe Fallbacks**: Ensures font availability across devices
|
|
1304
|
+
- **Generic Families**: CSS generic font family support
|
|
1305
|
+
- **Accessibility**: Proper labeling and keyboard navigation
|
|
1306
|
+
|
|
1307
|
+
### ConfigEngine
|
|
1308
|
+
|
|
1309
|
+
Components for rendering visual design styles and Google Fonts imports from configuration data.
|
|
1310
|
+
|
|
1311
|
+
#### VisualDesignStyles
|
|
1312
|
+
|
|
1313
|
+
Renders CSS custom properties from visual design configuration tokens.
|
|
1314
|
+
|
|
1315
|
+
```tsx
|
|
1316
|
+
import { VisualDesignStyles } from '@pixelated-tech/components';
|
|
1317
|
+
|
|
1318
|
+
<VisualDesignStyles visualdesign={{
|
|
1319
|
+
'primary-color': '#007bff',
|
|
1320
|
+
'header-font-primary': 'Montserrat',
|
|
1321
|
+
'header-font-fallback': 'Arial',
|
|
1322
|
+
'header-font-generic': 'sans-serif',
|
|
1323
|
+
'font-size1-min': '14px',
|
|
1324
|
+
'font-size1-max': '18px'
|
|
1325
|
+
}} />
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
**Generated CSS:**
|
|
1329
|
+
```css
|
|
1330
|
+
:root {
|
|
1331
|
+
--primary-color: #007bff;
|
|
1332
|
+
--header-font-family: "Montserrat", "Arial", "sans-serif";
|
|
1333
|
+
--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));
|
|
1334
|
+
}
|
|
1335
|
+
h1 { font-size: var(--font-size1); }
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1338
|
+
#### GoogleFontsImports
|
|
1339
|
+
|
|
1340
|
+
Automatically generates Google Fonts link tags for fonts specified in visual design configuration.
|
|
1341
|
+
|
|
1342
|
+
```tsx
|
|
1343
|
+
import { GoogleFontsImports } from '@pixelated-tech/components';
|
|
1344
|
+
|
|
1345
|
+
<GoogleFontsImports visualdesign={{
|
|
1346
|
+
'header-font-primary': 'Montserrat',
|
|
1347
|
+
'body-font-primary': 'Open Sans'
|
|
1348
|
+
}} />
|
|
1349
|
+
```
|
|
1350
|
+
|
|
1351
|
+
**Generated HTML:**
|
|
1352
|
+
```html
|
|
1353
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
1354
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
1355
|
+
<link href="https://fonts.googleapis.com/css2?family=Montserrat|Open+Sans&display=swap" rel="stylesheet">
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
#### Features
|
|
1359
|
+
|
|
1360
|
+
- **Font Stack Generation**: Automatically builds CSS font-family stacks from 3-field font configuration
|
|
1361
|
+
- **Responsive Typography**: Generates fluid font sizes using CSS clamp() for responsive design
|
|
1362
|
+
- **Google Fonts Integration**: Automatically imports only the Google Fonts used in the design
|
|
1363
|
+
- **Web-safe Font Filtering**: Excludes web-safe fonts from Google Fonts imports to reduce loading
|
|
1364
|
+
- **Server-safe**: Both components are safe to use in server components and API routes
|
|
1365
|
+
|
|
1136
1366
|
---
|
|
1137
1367
|
|
|
1138
1368
|
## SEO & Schema
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<h3 align="center">Pixelated Components</h3>
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
21
|
-
A comprehensive React component library for modern web development, featuring CMS integrations, UI components,
|
|
21
|
+
A comprehensive React component library for modern web development, featuring CMS integrations, UI components, SEO optimization tools, and accessibility-first design.
|
|
22
22
|
<br />
|
|
23
23
|
<a href="https://github.com/brianwhaley/pixelated-components"><strong>Explore the docs »</strong></a>
|
|
24
24
|
<br />
|
|
@@ -60,6 +60,27 @@ This is a library of components I have found useful to build web sites quickly.
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
## ♿ Accessibility
|
|
64
|
+
|
|
65
|
+
Pixelated Components is committed to creating inclusive web experiences. All components are built with accessibility in mind and include:
|
|
66
|
+
|
|
67
|
+
- **WCAG 2.1 AA compliance** - Components meet web accessibility guidelines
|
|
68
|
+
- **Keyboard navigation** - Full keyboard support for all interactive elements
|
|
69
|
+
- **Screen reader support** - Proper ARIA labels, roles, and semantic HTML
|
|
70
|
+
- **Focus management** - Clear focus indicators and logical tab order
|
|
71
|
+
- **Color contrast** - High contrast ratios for text and interactive elements
|
|
72
|
+
- **Semantic HTML** - Proper use of headings, landmarks, and structural elements
|
|
73
|
+
|
|
74
|
+
### Accessibility Features
|
|
75
|
+
- Automatic ARIA label generation
|
|
76
|
+
- Focus trap management for modals and overlays
|
|
77
|
+
- Skip links for keyboard users
|
|
78
|
+
- Reduced motion support for users with vestibular disorders
|
|
79
|
+
- High contrast mode compatibility
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
63
84
|
## 📦 Installation & Setup
|
|
64
85
|
|
|
65
86
|
### Requirements
|
|
@@ -93,53 +114,125 @@ npm install react react-dom prop-types
|
|
|
93
114
|
|
|
94
115
|
This library is written in TypeScript and provides full type definitions. No additional setup required.
|
|
95
116
|
|
|
117
|
+
### Reference Implementation
|
|
96
118
|
|
|
119
|
+
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:
|
|
97
120
|
|
|
98
|
-
|
|
121
|
+
- **Component Integration**: Real-world usage of all major components
|
|
122
|
+
- **Configuration Management**: Dynamic site configuration with ConfigBuilder
|
|
123
|
+
- **Page Building**: Visual page construction with PageBuilderUI
|
|
124
|
+
- **Authentication**: NextAuth.js integration for secure admin access
|
|
125
|
+
- **Deployment Ready**: Production-ready setup with HTTPS and optimized builds
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Clone the reference implementation
|
|
129
|
+
git clone https://github.com/brianwhaley/pixelated-admin.git
|
|
130
|
+
cd pixelated-admin
|
|
131
|
+
npm install
|
|
132
|
+
npm run dev
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Visit `http://localhost:3006` to explore the admin interface and see components in action.
|
|
99
136
|
|
|
100
137
|
### General Components
|
|
101
138
|
Reusable UI components for common patterns:
|
|
102
139
|
- **Accordion** - Expandable content sections using native `<details>` elements
|
|
103
140
|
- **Callout** - Flexible content highlight blocks with image support
|
|
104
|
-
- **
|
|
141
|
+
- **CSS** - Dynamic CSS utilities and styling helpers
|
|
142
|
+
- **Image** - Advanced image component with lazy loading and optimization
|
|
105
143
|
- **Loading** - Progress indicators and loading states
|
|
106
|
-
- **
|
|
144
|
+
- **MicroInteractions** - Subtle animations and interaction effects
|
|
145
|
+
- **Modal** - Dialog overlays and popups
|
|
146
|
+
- **Semantic** - Semantic HTML structure components
|
|
147
|
+
- **SidePanel** - Slide-out panel component for additional content
|
|
148
|
+
- **Table** - Data display and table components
|
|
107
149
|
|
|
108
150
|
### CMS Integration
|
|
109
151
|
Headless CMS and content management components:
|
|
110
152
|
- **WordPress** - Blog post integration and display with automatic Photon CDN URL processing
|
|
111
|
-
- **Contentful** - Headless CMS components and utilities
|
|
153
|
+
- **Contentful** - Headless CMS components and utilities with delivery and management APIs
|
|
112
154
|
- **PageBuilder** - Dynamic page construction from JSON
|
|
113
155
|
- **PageEngine** - Advanced page rendering with Contentful integration
|
|
114
156
|
|
|
115
157
|
### UI Components
|
|
116
158
|
User interface and interaction components:
|
|
117
159
|
- **Carousel** - Image and content sliders (Hero, Reviews, Portfolio)
|
|
118
|
-
- **Forms** - Form builder and
|
|
160
|
+
- **Forms** - Form builder, validation, and emailer components
|
|
161
|
+
- **FormBuilder** - Advanced form construction and configuration
|
|
162
|
+
- **FormComponents** - Individual form field components and utilities
|
|
163
|
+
- **FormEngine** - Form rendering and processing engine
|
|
119
164
|
- **Menu** - Navigation components (Simple, Accordion, Expando)
|
|
120
|
-
- **
|
|
165
|
+
- **Tab** - Tabbed interface component for organizing content
|
|
121
166
|
- **Tiles** - Image grid and tile layouts
|
|
122
167
|
|
|
168
|
+
### Development Tools
|
|
169
|
+
Components for development, configuration, and site building:
|
|
170
|
+
- **ComponentPropertiesForm** - Form for editing component properties
|
|
171
|
+
- **ComponentSelector** - Component selection interface
|
|
172
|
+
- **ComponentTree** - Visual component hierarchy display
|
|
173
|
+
- **ConfigBuilder** - Interactive configuration builder for site settings, metadata, routes, and visual design tokens
|
|
174
|
+
- **PageBuilderUI** - User interface for page building
|
|
175
|
+
- **SaveLoadSection** - Save and load functionality for configurations
|
|
176
|
+
|
|
123
177
|
### SEO & Schema
|
|
124
178
|
Search engine optimization and structured data:
|
|
179
|
+
- **404** - Custom 404 error page component
|
|
180
|
+
- **GoogleAnalytics** - Google Analytics integration
|
|
181
|
+
- **GoogleMap** - Interactive Google Maps component
|
|
182
|
+
- **GoogleSearch** - Google Custom Search integration
|
|
125
183
|
- **JSON-LD** - Structured data schemas (LocalBusiness, Recipe, BlogPosting, etc.)
|
|
184
|
+
- **Manifest** - Web app manifest generation
|
|
126
185
|
- **MetaTags** - Dynamic meta tag injection
|
|
186
|
+
- **SchemaBlogPosting** - Blog post structured data
|
|
187
|
+
- **SchemaLocalBusiness** - Local business structured data
|
|
188
|
+
- **SchemaRecipe** - Recipe structured data
|
|
189
|
+
- **SchemaServices** - Services structured data
|
|
190
|
+
- **SchemaWebsite** - Website structured data
|
|
127
191
|
- **Sitemap** - XML sitemap generation
|
|
128
192
|
- **Social Cards** - Open Graph and Twitter card generation
|
|
193
|
+
- **BuzzwordBingo** - Interactive buzzword bingo game
|
|
194
|
+
- **Markdown** - Markdown rendering component
|
|
195
|
+
- **Recipe** - Recipe display component
|
|
196
|
+
- **Resume** - Resume/CV display component
|
|
197
|
+
- **Timeline** - Timeline visualization component
|
|
129
198
|
|
|
130
199
|
### Third-Party Integrations
|
|
131
200
|
External service integrations:
|
|
132
201
|
- **Calendly** - Scheduling and appointment booking
|
|
133
202
|
- **Cloudinary** - Image optimization and delivery
|
|
203
|
+
- **GoogleReviews** - Google business reviews integration
|
|
204
|
+
- **Gravatar** - User avatar integration
|
|
134
205
|
- **HubSpot** - CRM and marketing automation
|
|
135
|
-
- **PayPal** - Payment processing
|
|
136
206
|
- **Instagram** - Social media image integration
|
|
137
207
|
- **Flickr** - Photo sharing integration
|
|
138
|
-
- **
|
|
139
|
-
- **
|
|
208
|
+
- **PayPal** - Payment processing
|
|
209
|
+
- **ShoppingCart** - E-commerce shopping cart functionality
|
|
140
210
|
- **eBay** - Store listings and shopping cart
|
|
141
211
|
- **NerdJokes** - Entertainment content integration
|
|
212
|
+
- **Yelp** - Business reviews and ratings
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## 🎨 Visual Design Configuration
|
|
216
|
+
|
|
217
|
+
The ConfigBuilder now includes a **Visual Design** tab that allows users to configure visual design tokens such as colors, fonts, spacing, and other design system variables. These tokens are stored in the `routes.json` file under the `visualdesign` object and can be used throughout your application for consistent theming.
|
|
218
|
+
|
|
219
|
+
### Features:
|
|
220
|
+
- **Color Management**: Primary, secondary, accent colors with color picker inputs
|
|
221
|
+
- **Typography**: Font family and base font size settings
|
|
222
|
+
- **Spacing & Layout**: Border radius, box shadows, transitions
|
|
223
|
+
- **Form-Based Editing**: User-friendly form interface powered by FormEngine
|
|
224
|
+
- **JSON Storage**: Design tokens stored as flattened key-value pairs in routes.json
|
|
225
|
+
|
|
226
|
+
### Usage:
|
|
227
|
+
```tsx
|
|
228
|
+
import { ConfigBuilder } from '@pixelated-tech/components';
|
|
229
|
+
|
|
230
|
+
function MyConfigPage() {
|
|
231
|
+
return <ConfigBuilder />;
|
|
232
|
+
}
|
|
233
|
+
```
|
|
142
234
|
|
|
235
|
+
The visual design tokens can be accessed in your components via the config context or directly from the routes.json file.
|
|
143
236
|
|
|
144
237
|
|
|
145
238
|
## � Quick Start
|
|
@@ -182,7 +275,7 @@ npm run storybook
|
|
|
182
275
|
- [ ] Buffer Integration (or Sendible, Sprout Social, Hootsuite)
|
|
183
276
|
- [ ] Zapier Integration
|
|
184
277
|
- [ ] Hero Banner: headline, subtext, CTA, background image/video, overlay.
|
|
185
|
-
- [ ] Accessibility Enhancer: wrapper component that automatically improves accessibility across Pixelated sites by adding ARIA labels, roles, and states to existing components. Includes color contrast checking, keyboard navigation helpers,
|
|
278
|
+
- [ ] Accessibility Enhancer: wrapper component that automatically improves accessibility across Pixelated sites by adding ARIA labels, roles, and states to existing components. Includes color contrast checking, keyboard navigation helpers, alt-text suggestions for images, and automated accessibility audits.
|
|
186
279
|
- [ ] SEO Dashboard with AI Integration: component that analyzes site content, suggests optimizations, integrates with AI for meta descriptions and keyword research.
|
|
187
280
|
|
|
188
281
|
### CI / CD Improvements
|
|
@@ -197,22 +290,35 @@ npm run storybook
|
|
|
197
290
|
- [ ] find a better solution than to generate image via build script in amplify for json for sitemap creation
|
|
198
291
|
- [ ] **SocialCards Component**: Fix state initialization to track prop changes properly.
|
|
199
292
|
- [ ] **Modal Component**: Clarify content source pattern (accepts both `modalContent` and `children`).
|
|
200
|
-
- [ ] **Form Components**: Fix validation state reset when input props change.
|
|
201
293
|
- [ ] **Carousel Component**: Fix active card state reset when `props.cards` changes.
|
|
202
294
|
- [ ] **NerdJoke Component**: Add props to useEffect dependencies if endpoint becomes configurable.
|
|
203
295
|
- [ ] **GoogleReviews Component**: Add carousel/grid display modes.
|
|
204
296
|
- [ ] **GoogleReviews Component**: Add API key to config provider instead of hardcoding.
|
|
205
297
|
- [ ] **Instagram Component**: Add accessToken and userId to config provider for centralized API credentials.
|
|
298
|
+
- [ ] **Critters Integration**: Explore adding critters CSS inlining tool for improved page load performance and critical CSS optimization.
|
|
299
|
+
|
|
300
|
+
### Platform Enhancements
|
|
301
|
+
- [ ] **Project Scaffolding CLI**: Interactive CLI tool that generates complete Next.js projects with pixelated-components pre-configured, including routes.json, layout.tsx, package.json, and basic page structure
|
|
302
|
+
- [ ] **Template Marketplace**: Pre-built industry-specific templates (restaurant, law firm, contractor, etc.) that users can clone and customize
|
|
303
|
+
- [ ] **Configuration Wizard**: Step-by-step setup wizard that collects business info, generates site configuration, and creates initial content structure
|
|
304
|
+
- [ ] **Centralized Site Manager**: Web dashboard for managing multiple pixelated sites, with bulk updates, version control, and deployment status monitoring
|
|
305
|
+
- [ ] **Site Health Monitoring**: Automated monitoring dashboard that checks site performance, broken links, SEO scores, and security vulnerabilities across all sites
|
|
306
|
+
- [ ] **Content Migration Tools**: Automated importers for WordPress, Squarespace, Wix, and other platforms to migrate content to pixelated sites
|
|
307
|
+
- [ ] **A/B Testing Framework**: Built-in experimentation system for testing different layouts, content, and CTAs with automatic winner selection
|
|
308
|
+
- [ ] **Personalization Engine**: Dynamic content delivery based on user behavior, location, and preferences
|
|
309
|
+
- [ ] **Hot Module Replacement for Configs**: Live preview of configuration changes without full rebuilds
|
|
310
|
+
- [ ] **Automated Dependency Updates**: Smart update system that tests component changes across all sites before deployment
|
|
311
|
+
- [ ] **Rollback System**: One-click rollback to previous versions with automatic database and asset restoration
|
|
312
|
+
- [ ] **Performance Budget Tracker**: Automated monitoring of Core Web Vitals with alerts when sites exceed performance budgets
|
|
313
|
+
- [ ] **ConfigBuilder SEO Enhancement**: Upgrade ConfigBuilder with AI-powered meta description generation, keyword optimization suggestions, and automated schema markup
|
|
314
|
+
- [ ] **Conversion Funnel Builder**: Visual funnel creation with automated tracking, A/B testing, and optimization recommendations
|
|
315
|
+
- [ ] **Automated Security Scanner**: Regular security audits with vulnerability detection and automated fixes
|
|
316
|
+
- [ ] **GDPR Compliance Toolkit**: Automated cookie consent, data mapping, and privacy policy generation
|
|
317
|
+
- [ ] **API Gateway**: Unified API management for connecting to CRM, email marketing, payment processors, and other business tools
|
|
318
|
+
- [ ] **Webhook Automation**: Event-driven automation for form submissions, new content, user registrations, and business workflows
|
|
319
|
+
- [ ] **Third-Party Sync Engine**: Bidirectional sync with tools like HubSpot, Mailchimp, QuickBooks, and project management systems
|
|
320
|
+
- [ ] **Documentation Auto-Generator**: Automatically generated API docs, component usage guides, and deployment instructions
|
|
206
321
|
|
|
207
|
-
### SSR Fixes
|
|
208
|
-
- [ ] **cloudinary.image.tsx** (`SmartImage`): Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
209
|
-
- [ ] **wordpress.components.tsx** (`BlogPostList`, etc.): Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
210
|
-
- [ ] **pagebuilder/form/formcomponents.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
211
|
-
- [ ] **cms/hubspot.components.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
212
|
-
- [ ] **cms/gravatar.components.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
213
|
-
- [ ] **structured/recipe.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
214
|
-
- [ ] **structured/timeline.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
215
|
-
- [ ] **structured/markdown.tsx**: Add `"use client"` or refactor to avoid `usePixelatedConfig` in server contexts
|
|
216
322
|
|
|
217
323
|
See the [open issues](https://github.com/brianwhaley/pixelated-components/issues) for a full list of proposed features (and known issues).
|
|
218
324
|
|
|
@@ -270,16 +376,16 @@ Project Link: [https://github.com/brianwhaley/pixelated-components](https://gith
|
|
|
270
376
|
|
|
271
377
|
### Overview
|
|
272
378
|
|
|
273
|
-
**Current Status**: ✅ 2,
|
|
379
|
+
**Current Status**: ✅ 2,246 tests passing across 67 test files
|
|
274
380
|
|
|
275
381
|
| Metric | Value |
|
|
276
382
|
|--------|-------|
|
|
277
383
|
| Test Files | 67 |
|
|
278
|
-
| Total Tests | 2,
|
|
279
|
-
| Coverage (Statements) | 76.
|
|
280
|
-
| Coverage (Lines) |
|
|
281
|
-
| Coverage (Functions) |
|
|
282
|
-
| Coverage (Branches) | 66.
|
|
384
|
+
| Total Tests | 2,246 |
|
|
385
|
+
| Coverage (Statements) | 76.11% |
|
|
386
|
+
| Coverage (Lines) | 78.91% |
|
|
387
|
+
| Coverage (Functions) | 77.95% |
|
|
388
|
+
| Coverage (Branches) | 66.58% |
|
|
283
389
|
| Test Framework | Vitest 4.x |
|
|
284
390
|
| Testing Library | @testing-library/react + jsdom |
|
|
285
391
|
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import './sidepanel.css';
|
|
7
|
-
export default function SidePanel({ isOpen, onClose, onToggle, position = 'left', width = '300px', showOverlay = true, showTab = false, tabIcon
|
|
7
|
+
export default function SidePanel({ isOpen, onClose, onToggle, position = 'left', width = '300px', showOverlay = true, showTab = false, tabIcon /* = "≡" */, tabLabel, children, className = '' }) {
|
|
8
8
|
const portalRootRef = useRef(null);
|
|
9
9
|
const wrapperRef = useRef(null);
|
|
10
10
|
const [hasMounted, setHasMounted] = useState(false);
|
|
@@ -24,6 +24,15 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
.panelMenuButton .hamburger{
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-family: Verdana;
|
|
29
|
+
font-size: 1.5rem;
|
|
30
|
+
color: #CCC;
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.panelMenuButton .hamburger2{
|
|
35
|
+
/* 3 lines instead of unicode hamburger (U+2261) */
|
|
27
36
|
/* the tricks */
|
|
28
37
|
/* display: block; */
|
|
29
38
|
/* display inline-block is fine too */
|
|
@@ -40,6 +49,7 @@
|
|
|
40
49
|
padding-top: 5px;
|
|
41
50
|
|
|
42
51
|
}
|
|
52
|
+
|
|
43
53
|
/* hamburger hover style */
|
|
44
54
|
/* .accordionMenu .hamburger:hover {
|
|
45
55
|
color: #FFC75F;
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import './menu-accordion.css';
|
|
6
|
+
const hamburgerIcon = "≡"; /* (U+2261) */ /* ||| */
|
|
6
7
|
function generateMenuItems({ menuData, state = "hide" }) {
|
|
7
8
|
const myItems = [];
|
|
8
9
|
let index = 0;
|
|
@@ -174,5 +175,5 @@ export function MenuAccordionButton() {
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
// suppressHydrationWarning suppresses hydration mismatch warnings for this button
|
|
177
|
-
return (_jsx("button", { className: "panelMenuButton", id: "panelMenuButton", onClick: slideMobilePanel, suppressHydrationWarning: true, children: _jsx("span", { className: "hamburger text-outline", children:
|
|
178
|
+
return (_jsx("button", { className: "panelMenuButton", id: "panelMenuButton", onClick: slideMobilePanel, suppressHydrationWarning: true, children: _jsx("span", { className: "hamburger text-outline", children: hamburgerIcon }) }));
|
|
178
179
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.compound-font-selector {
|
|
2
|
+
margin-bottom: 1rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.compound-font-selector label {
|
|
6
|
+
display: block;
|
|
7
|
+
margin-bottom: 0.5rem;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.compound-container {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 1rem;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.compound-container > .font-selector {
|
|
18
|
+
flex: 1;
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.compound-container > .font-selector label {
|
|
23
|
+
font-size: 0.875rem;
|
|
24
|
+
margin-bottom: 0.25rem;
|
|
25
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { FontSelector } from './FontSelector';
|
|
5
|
+
import './CompoundFontSelector.css';
|
|
6
|
+
export function CompoundFontSelector({ id, name, label, required = false, value = '', onChange }) {
|
|
7
|
+
// Parse the compound value into primary, fallback, generic parts
|
|
8
|
+
const parseCompoundValue = (val) => {
|
|
9
|
+
const parts = val.split(',').map(s => s.trim());
|
|
10
|
+
return {
|
|
11
|
+
primary: parts[0] || '',
|
|
12
|
+
fallback: parts[1] || '',
|
|
13
|
+
generic: parts[2] || ''
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const [fonts, setFonts] = useState(parseCompoundValue(value));
|
|
17
|
+
// Update fonts when value changes externally
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setFonts(parseCompoundValue(value));
|
|
20
|
+
}, [value]);
|
|
21
|
+
// Combine fonts into a single font stack value
|
|
22
|
+
const combineFonts = (fontParts) => {
|
|
23
|
+
return [fontParts.primary, fontParts.fallback, fontParts.generic].filter(Boolean).join(', ');
|
|
24
|
+
};
|
|
25
|
+
// Handle changes from individual font selectors
|
|
26
|
+
const handleFontChange = (type, newValue) => {
|
|
27
|
+
const updatedFonts = { ...fonts, [type]: newValue };
|
|
28
|
+
setFonts(updatedFonts);
|
|
29
|
+
const combinedValue = combineFonts(updatedFonts);
|
|
30
|
+
onChange?.(combinedValue);
|
|
31
|
+
};
|
|
32
|
+
return (_jsxs("div", { className: "compound-font-selector", children: [_jsx("label", { children: label }), _jsxs("div", { className: "compound-container", children: [_jsx(FontSelector, { id: `${id}-primary`, name: `${name}-primary`, label: "Primary Font", fontType: "google", required: required, placeholder: "Select Google Font", value: fonts.primary, onChange: (val) => handleFontChange('primary', val) }), _jsx(FontSelector, { id: `${id}-fallback`, name: `${name}-fallback`, label: "Fallback Font", fontType: "websafe", required: false, placeholder: "Select web-safe font", value: fonts.fallback, onChange: (val) => handleFontChange('fallback', val) }), _jsx(FontSelector, { id: `${id}-generic`, name: `${name}-generic`, label: "Generic Family", fontType: "generic", required: false, placeholder: "Select generic family", value: fonts.generic, onChange: (val) => handleFontChange('generic', val) })] })] }));
|
|
33
|
+
}
|
|
34
|
+
CompoundFontSelector.propTypes = {
|
|
35
|
+
id: PropTypes.string.isRequired,
|
|
36
|
+
name: PropTypes.string.isRequired,
|
|
37
|
+
label: PropTypes.string.isRequired,
|
|
38
|
+
required: PropTypes.bool,
|
|
39
|
+
value: PropTypes.string,
|
|
40
|
+
onChange: PropTypes.func,
|
|
41
|
+
};
|