blocks-dusted 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/package.json +1 -1
- package/src/utils/paths.js +13 -13
- package/templates/blocks/DD-Accordion/Component.tsx +229 -0
- package/templates/blocks/DD-Accordion/README.md +3 -0
- package/templates/blocks/DD-Accordion/config.ts +73 -0
- package/templates/blocks/DD-Accordion/manifest.json +75 -0
- package/templates/blocks/DD-AnimText/Component.tsx +788 -0
- package/templates/blocks/DD-AnimText/README.md +3 -0
- package/templates/blocks/DD-AnimText/config.ts +295 -0
- package/templates/blocks/DD-AnimText/manifest.json +85 -0
- package/templates/blocks/DD-AsideNav/Component.tsx +321 -0
- package/templates/blocks/DD-AsideNav/config.ts +204 -0
- package/templates/blocks/DD-AsideNav/manifest.json +80 -0
- package/templates/blocks/DD-Banner/Component.tsx +51 -0
- package/templates/blocks/DD-Banner/config.ts +57 -0
- package/templates/blocks/DD-Banner/manifest.json +72 -0
- package/templates/blocks/DD-BgLightning/Component.tsx +44 -0
- package/templates/blocks/DD-BgLightning/README.md +3 -0
- package/templates/blocks/DD-BgLightning/config.ts +97 -0
- package/templates/blocks/DD-BgLightning/manifest.json +79 -0
- package/templates/blocks/DD-BookCall/Component.tsx +10 -11
- package/templates/blocks/DD-BookCall/config.ts +238 -238
- package/templates/blocks/DD-ButtonPop/Component.tsx +117 -0
- package/templates/blocks/DD-ButtonPop/config.ts +105 -0
- package/templates/blocks/DD-ButtonPop/manifest.json +88 -0
- package/templates/blocks/DD-ButtonPop/svg-icons/Dust2.tsx +167 -0
- package/templates/blocks/DD-Card/Component.tsx +251 -0
- package/templates/blocks/DD-Card/README.md +4 -0
- package/templates/blocks/DD-Card/config.ts +154 -0
- package/templates/blocks/DD-Card/manifest.json +82 -0
- package/templates/blocks/DD-CardTemplate01/Component.tsx +5 -6
- package/templates/blocks/DD-CardTemplate01/config.ts +106 -106
- package/templates/blocks/DD-Carousel-A/Component.tsx +249 -249
- package/templates/blocks/DD-Carousel-B/Component.tsx +403 -403
- package/templates/blocks/DD-Chip/Component.tsx +250 -0
- package/templates/blocks/DD-Chip/EXAMPLES.md +313 -0
- package/templates/blocks/DD-Chip/README.md +202 -0
- package/templates/blocks/DD-Chip/config.ts +369 -0
- package/templates/blocks/DD-Chip/manifest.json +74 -0
- package/templates/blocks/DD-ComparisonTable/Component.tsx +256 -256
- package/templates/blocks/DD-Contact/Component.tsx +434 -434
- package/templates/blocks/DD-Contact/config.ts +22 -22
- package/templates/blocks/DD-Counter/Component.tsx +190 -0
- package/templates/blocks/DD-Counter/README.md +4 -0
- package/templates/blocks/DD-Counter/config.ts +291 -0
- package/templates/blocks/DD-Counter/manifest.json +74 -0
- package/templates/blocks/DD-CustomCSS/Component.tsx +8 -0
- package/templates/blocks/DD-CustomCSS/README.md +4 -0
- package/templates/blocks/DD-CustomCSS/addToLayout.md +5 -0
- package/templates/blocks/DD-CustomCSS/config.ts +22 -0
- package/templates/blocks/DD-CustomCSS/manifest.json +72 -0
- package/templates/blocks/DD-CustomCSS/renderCustomCSS.md +7 -0
- package/templates/blocks/DD-FeatCat/Component.tsx +302 -302
- package/templates/blocks/DD-FeatCat/config.ts +201 -201
- package/templates/blocks/DD-FeatStrip/Component.tsx +585 -585
- package/templates/blocks/DD-FeatStrip/config.ts +134 -134
- package/templates/blocks/DD-FluidBtn/ButtonsEyeCatching.tsx +628 -0
- package/templates/blocks/DD-FluidBtn/Component.tsx +43 -0
- package/templates/blocks/DD-FluidBtn/README.md +6 -0
- package/templates/blocks/DD-FluidBtn/config.ts +102 -0
- package/templates/blocks/DD-FluidBtn/manifest.json +86 -0
- package/templates/blocks/DD-GooeyInfo/Component.tsx +149 -0
- package/templates/blocks/DD-GooeyInfo/config.ts +135 -0
- package/templates/blocks/DD-GooeyInfo/manifest.json +72 -0
- package/templates/blocks/DD-Hero/Component.tsx +40 -17
- package/templates/blocks/DD-Hero/config.ts +267 -267
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +4 -2
- package/templates/blocks/DD-HorizontalScroll/config.ts +231 -231
- package/templates/blocks/DD-Icon/Component.tsx +287 -0
- package/templates/blocks/DD-Icon/README.md +4 -0
- package/templates/blocks/DD-Icon/config.ts +258 -0
- package/templates/blocks/DD-Icon/hooks/revalidateBlockIds.ts +66 -0
- package/templates/blocks/DD-Icon/manifest.json +82 -0
- package/templates/blocks/DD-IconButton/Component.tsx +455 -0
- package/templates/blocks/DD-IconButton/README.md +326 -0
- package/templates/blocks/DD-IconButton/config.ts +239 -0
- package/templates/blocks/DD-IconButton/manifest.json +85 -0
- package/templates/blocks/DD-IdTag/Component.tsx +21 -0
- package/templates/blocks/DD-IdTag/README.md +4 -0
- package/templates/blocks/DD-IdTag/config.ts +41 -0
- package/templates/blocks/DD-IdTag/manifest.json +72 -0
- package/templates/blocks/DD-Iframe/Component.tsx +45 -0
- package/templates/blocks/DD-Iframe/README.md +4 -0
- package/templates/blocks/DD-Iframe/config.ts +47 -0
- package/templates/blocks/DD-Iframe/manifest.json +72 -0
- package/templates/blocks/DD-IframeMedia/Component.tsx +129 -0
- package/templates/blocks/DD-IframeMedia/README.md +4 -0
- package/templates/blocks/DD-IframeMedia/config.ts +79 -0
- package/templates/blocks/DD-IframeMedia/manifest.json +72 -0
- package/templates/blocks/DD-LineAnim/Component.tsx +36 -0
- package/templates/blocks/DD-LineAnim/README.md +4 -0
- package/templates/blocks/DD-LineAnim/config.ts +90 -0
- package/templates/blocks/DD-LineAnim/manifest.json +80 -0
- package/templates/blocks/DD-LinkGrid/Component.tsx +119 -0
- package/templates/blocks/DD-LinkGrid/README.md +4 -0
- package/templates/blocks/DD-LinkGrid/config.ts +51 -0
- package/templates/blocks/DD-LinkGrid/manifest.json +74 -0
- package/templates/blocks/DD-LogoMarq/Component.tsx +132 -0
- package/templates/blocks/DD-LogoMarq/README.md +4 -0
- package/templates/blocks/DD-LogoMarq/config.ts +264 -0
- package/templates/blocks/DD-LogoMarq/manifest.json +82 -0
- package/templates/blocks/DD-Lottie/Component.tsx +459 -0
- package/templates/blocks/DD-Lottie/README.md +4 -0
- package/templates/blocks/DD-Lottie/config.ts +379 -0
- package/templates/blocks/DD-Lottie/index.tsx +28 -0
- package/templates/blocks/DD-Lottie/manifest.json +83 -0
- package/templates/blocks/DD-MagicBento/Component.tsx +777 -0
- package/templates/blocks/DD-MagicBento/README.md +4 -0
- package/templates/blocks/DD-MagicBento/config.ts +264 -0
- package/templates/blocks/DD-MagicBento/manifest.json +74 -0
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +547 -545
- package/templates/blocks/DD-MasonaryMedia/config.ts +2 -2
- package/templates/blocks/DD-MasonaryMedia/vendor.d.ts +2 -2
- package/templates/blocks/DD-Masonry/Component.tsx +645 -0
- package/templates/blocks/DD-Masonry/README.md +4 -0
- package/templates/blocks/DD-Masonry/config.ts +475 -0
- package/templates/blocks/DD-Masonry/manifest.json +82 -0
- package/templates/blocks/DD-Pricing/Component.tsx +372 -372
- package/templates/blocks/DD-Process/Component.tsx +149 -149
- package/templates/blocks/DD-Process/config.ts +150 -150
- package/templates/blocks/DD-Progress/Component.tsx +141 -0
- package/templates/blocks/DD-Progress/README.md +4 -0
- package/templates/blocks/DD-Progress/config.ts +175 -0
- package/templates/blocks/DD-Progress/manifest.json +74 -0
- package/templates/blocks/DD-ProjHeader/Component.tsx +91 -0
- package/templates/blocks/DD-ProjHeader/README.md +4 -0
- package/templates/blocks/DD-ProjHeader/config.ts +96 -0
- package/templates/blocks/DD-ProjHeader/manifest.json +72 -0
- package/templates/blocks/DD-ProjSlider/Component.tsx +123 -0
- package/templates/blocks/DD-ProjSlider/README.md +4 -0
- package/templates/blocks/DD-ProjSlider/config.ts +64 -0
- package/templates/blocks/DD-ProjSlider/manifest.json +72 -0
- package/templates/blocks/DD-ScrollText/Component.tsx +114 -0
- package/templates/blocks/DD-ScrollText/README.md +4 -0
- package/templates/blocks/DD-ScrollText/config.ts +58 -0
- package/templates/blocks/DD-ScrollText/manifest.json +72 -0
- package/templates/blocks/DD-Section/Component.tsx +266 -266
- package/templates/blocks/DD-Separator/Component.tsx +66 -0
- package/templates/blocks/DD-Separator/README.md +4 -0
- package/templates/blocks/DD-Separator/config.ts +58 -0
- package/templates/blocks/DD-Separator/manifest.json +72 -0
- package/templates/blocks/DD-Services/Component.tsx +176 -176
- package/templates/blocks/DD-Services/config.ts +149 -149
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +307 -307
- package/templates/blocks/DD-Slider-A/Component.tsx +237 -237
- package/templates/blocks/DD-StackCards/Component.tsx +473 -473
- package/templates/blocks/DD-StackCards/config.ts +399 -399
- package/templates/blocks/DD-Team/Component.tsx +247 -247
- package/templates/blocks/DD-Team/config.ts +173 -173
- package/templates/blocks/DD-TeamCards/Component.tsx +251 -0
- package/templates/blocks/DD-TeamCards/README.md +4 -0
- package/templates/blocks/DD-TeamCards/config.ts +302 -0
- package/templates/blocks/DD-TeamCards/manifest.json +74 -0
- package/templates/blocks/DD-TechStack/Component.tsx +168 -162
- package/templates/blocks/DD-TechStack/config.ts +153 -153
- package/templates/blocks/DD-TestMarq/Component.tsx +132 -0
- package/templates/blocks/DD-TestMarq/README.md +4 -0
- package/templates/blocks/DD-TestMarq/RowLabel.tsx +9 -0
- package/templates/blocks/DD-TestMarq/config.ts +88 -0
- package/templates/blocks/DD-TestMarq/manifest.json +72 -0
- package/templates/blocks/DD-Testim/Component.tsx +247 -0
- package/templates/blocks/DD-Testim/README.md +4 -0
- package/templates/blocks/DD-Testim/config.ts +101 -0
- package/templates/blocks/DD-Testim/manifest.json +75 -0
- package/templates/blocks/DD-Testim2/Component.tsx +256 -0
- package/templates/blocks/DD-Testim2/README.md +4 -0
- package/templates/blocks/DD-Testim2/config.ts +100 -0
- package/templates/blocks/DD-Testim2/manifest.json +74 -0
- package/templates/blocks/DD-Testimonials/Component.tsx +147 -147
- package/templates/blocks/DD-Testimonials/config.ts +120 -120
- package/templates/blocks/DD-TextMarq/Component.tsx +157 -0
- package/templates/blocks/DD-TextMarq/README.md +4 -0
- package/templates/blocks/DD-TextMarq/config.ts +237 -0
- package/templates/blocks/DD-TextMarq/manifest.json +82 -0
- package/templates/blocks/DD-Thanks/Component.tsx +500 -0
- package/templates/blocks/DD-Thanks/README.md +4 -0
- package/templates/blocks/DD-Thanks/config.ts +224 -0
- package/templates/blocks/DD-Thanks/manifest.json +72 -0
- package/templates/blocks/DD-VertMarq/Component.tsx +154 -0
- package/templates/blocks/DD-VertMarq/README.md +4 -0
- package/templates/blocks/DD-VertMarq/config.ts +236 -0
- package/templates/blocks/DD-VertMarq/dist/index.css +6 -0
- package/templates/blocks/DD-VertMarq/dist/index.min.css +1 -0
- package/templates/blocks/DD-VertMarq/manifest.json +74 -0
- package/templates/blocks/DD-Work/Component.tsx +318 -315
- package/templates/blocks/DD-Work/config.ts +165 -165
- package/templates/blocks/DD-Work-B/Component.tsx +294 -294
- package/templates/blocks/DDHG-CTASection2/Component.tsx +185 -0
- package/templates/blocks/DDHG-CTASection2/config.ts +140 -0
- package/templates/blocks/DDHG-CTASection2/manifest.json +45 -0
- package/templates/blocks/DDHG-HighlightArc/Component.tsx +243 -0
- package/templates/blocks/DDHG-HighlightArc/config.ts +85 -0
- package/templates/blocks/DDHG-HighlightArc/manifest.json +46 -0
- package/templates/blocks/DDHG-LogoMarquee/Component.tsx +93 -0
- package/templates/blocks/DDHG-LogoMarquee/config.ts +66 -0
- package/templates/blocks/DDHG-LogoMarquee/manifest.json +39 -0
- package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +213 -0
- package/templates/blocks/DDHG-NavCodeGrid/config.ts +64 -0
- package/templates/blocks/DDHG-NavCodeGrid/manifest.json +45 -0
- package/templates/blocks/DDHG-ProcessSec/Component.tsx +575 -0
- package/templates/blocks/DDHG-ProcessSec/config.ts +170 -0
- package/templates/blocks/DDHG-ProcessSec/manifest.json +56 -0
- package/templates/blocks/DDHG-ServiceDetails/Component.tsx +164 -0
- package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +394 -0
- package/templates/blocks/DDHG-ServiceDetails/config.ts +77 -0
- package/templates/blocks/DDHG-ServiceDetails/manifest.json +50 -0
- package/templates/blocks/DDHG-ServiceHero/Component.tsx +234 -0
- package/templates/blocks/DDHG-ServiceHero/config.ts +49 -0
- package/templates/blocks/DDHG-ServiceHero/manifest.json +26 -0
- package/templates/blocks/DDHG-ServiceOverview/Component.tsx +277 -0
- package/templates/blocks/DDHG-ServiceOverview/config.ts +64 -0
- package/templates/blocks/DDHG-ServiceOverview/manifest.json +44 -0
- package/templates/blocks/DDHG-StatsFAQ/Component.tsx +389 -0
- package/templates/blocks/DDHG-StatsFAQ/config.ts +204 -0
- package/templates/blocks/DDHG-StatsFAQ/manifest.json +45 -0
- package/templates/blocks/DDHG-TeamCards/Component.tsx +131 -0
- package/templates/blocks/DDHG-TeamCards/config.ts +48 -0
- package/templates/blocks/DDHG-TeamCards/manifest.json +29 -0
- package/templates/shared/src/components/BgLightning/index.tsx +242 -0
- package/templates/shared/src/components/ui/ShareButton/index.tsx +80 -0
- package/templates/shared/src/components/ui/anims/FadeOnScroll.tsx +48 -0
- package/templates/shared/src/components/ui/anims/FadeUpOnInView.tsx +63 -0
- package/templates/shared/src/components/ui/anims/GlareHover.tsx +111 -0
- package/templates/shared/src/components/ui/anims/LineAnims.tsx +81 -0
- package/templates/shared/src/components/ui/anims/TitleAnims01.tsx +54 -0
- package/templates/shared/src/components/ui/anims/animation-container.tsx +29 -0
- package/templates/shared/src/components/ui/anims/blur-in.tsx +26 -0
- package/templates/shared/src/components/ui/anims/counter.tsx +53 -0
- package/templates/shared/src/components/ui/anims/fade.tsx +83 -0
- package/templates/shared/src/components/ui/anims/gradual-spacing.tsx +39 -0
- package/templates/shared/src/components/ui/anims/pull-up.tsx +93 -0
- package/templates/shared/src/components/ui/anims/reveal-text.tsx +76 -0
- package/templates/shared/src/components/ui/anims/rotate-words.tsx +43 -0
- package/templates/shared/src/components/ui/anims/shiny-text.tsx +58 -0
- package/templates/shared/src/components/ui/anims/shuffle-text.tsx +85 -0
- package/templates/shared/src/components/ui/anims/split-text.tsx +211 -0
- package/templates/shared/src/components/ui/anims/staggered-fade.tsx +133 -0
- package/templates/shared/src/components/ui/anims/text-scroll.tsx +111 -0
- package/templates/shared/src/components/ui/anims/typing-effect.tsx +112 -0
- package/templates/shared/src/components/ui/button-dusted-fluid/index.tsx +1521 -0
- package/templates/shared/src/components/ui/separator.tsx +85 -0
- package/templates/shared/src/hooks/useBodyScrollLock.ts +97 -0
- package/templates/shared/src/hooks/useClickOutside.ts +28 -0
- package/templates/shared/src/utilities/renderCustomCSS.ts +5 -0
- package/templates/shared/src/utilities/smoothScroll.ts +65 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# ChipBlock Component
|
|
2
|
+
|
|
3
|
+
A flexible and customizable chip/tag component for displaying labels, categories, or any grouped information in your Payload CMS content.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✨ **Multiple Layout Options**: Display chips in rows, columns, or wrapped rows
|
|
8
|
+
- 🎨 **Fully Customizable Styling**: Set colors, borders, sizes, and spacing
|
|
9
|
+
- 🔗 **Optional Links**: Make chips clickable with internal or external links
|
|
10
|
+
- 📱 **Responsive**: Adapts to different screen sizes with horizontal scroll on mobile
|
|
11
|
+
- ⚡ **Animation Support**: Optional scroll-based animations using Framer Motion
|
|
12
|
+
- 🎯 **Per-Chip Customization**: Override global styles on individual chips
|
|
13
|
+
- 🌙 **Dark Mode Ready**: Includes default dark mode color scheme
|
|
14
|
+
|
|
15
|
+
## Usage in Payload CMS
|
|
16
|
+
|
|
17
|
+
### Adding ChipBlock to Content
|
|
18
|
+
|
|
19
|
+
1. Open any page/post with a Content block
|
|
20
|
+
2. Add a new block in the rich text editor
|
|
21
|
+
3. Select **"Chip Block"** from the block options
|
|
22
|
+
4. Configure your chips and styling options
|
|
23
|
+
|
|
24
|
+
### Configuration Options
|
|
25
|
+
|
|
26
|
+
#### Layout & Styling
|
|
27
|
+
|
|
28
|
+
- **Layout Direction**:
|
|
29
|
+
- Row (Horizontal) - Single horizontal line
|
|
30
|
+
- Column (Vertical) - Stacked vertically
|
|
31
|
+
- Row Wrap - Multiple rows that wrap
|
|
32
|
+
|
|
33
|
+
- **Chip Size**: Small, Medium, or Large
|
|
34
|
+
- **Gap Between Chips**: None, Small, Medium, or Large
|
|
35
|
+
- **Alignment**: Start, Center, End, or Space Between
|
|
36
|
+
|
|
37
|
+
#### Color Customization
|
|
38
|
+
|
|
39
|
+
- **Background Color**: CSS color value (e.g., `#3b82f6`) or Tailwind class (e.g., `bg-blue-500`)
|
|
40
|
+
- **Text Color**: CSS color value or Tailwind class
|
|
41
|
+
- **Border Color**: CSS color value or Tailwind class
|
|
42
|
+
- **Border Width**: 0-4px
|
|
43
|
+
- **Border Radius**: None, Small, Medium, Large, or Full (pill shape)
|
|
44
|
+
- **Hover Effect**: Enable/disable hover animations
|
|
45
|
+
|
|
46
|
+
#### Managing Chips
|
|
47
|
+
|
|
48
|
+
Each chip can have:
|
|
49
|
+
|
|
50
|
+
- **Label**: Text to display (required)
|
|
51
|
+
- **Icon**: Optional emoji or icon character (e.g., ✓, ⭐, 🚀)
|
|
52
|
+
- **Custom Colors**: Override global colors for individual chips
|
|
53
|
+
- **Link**: Optional URL to make the chip clickable
|
|
54
|
+
|
|
55
|
+
#### Advanced Options
|
|
56
|
+
|
|
57
|
+
- **Custom CSS Class**: Add your own CSS classes
|
|
58
|
+
- **Enable Animation**: Animate chips on scroll into view
|
|
59
|
+
- **Max Container Width**: Limit the width of the chip container
|
|
60
|
+
- **Container Padding**: Add padding around the chip group
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
### Simple Tags
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Layout: Row Wrap
|
|
68
|
+
Size: Small
|
|
69
|
+
Background: #e5e7eb (gray-200)
|
|
70
|
+
Text Color: #111827 (gray-900)
|
|
71
|
+
Border: 1px, gray-300
|
|
72
|
+
|
|
73
|
+
Chips:
|
|
74
|
+
- React
|
|
75
|
+
- Next.js
|
|
76
|
+
- TypeScript
|
|
77
|
+
- Tailwind CSS
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Feature List
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Layout: Column
|
|
84
|
+
Size: Medium
|
|
85
|
+
Background: #dbeafe (blue-50)
|
|
86
|
+
Border: 2px, blue-300
|
|
87
|
+
|
|
88
|
+
Chips:
|
|
89
|
+
- ✓ Fast Performance
|
|
90
|
+
- ✓ SEO Optimized
|
|
91
|
+
- ✓ Mobile Responsive
|
|
92
|
+
- ✓ Accessible
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Skill Badges
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Layout: Row Wrap
|
|
99
|
+
Size: Large
|
|
100
|
+
Background: Linear gradient or custom
|
|
101
|
+
Border: None
|
|
102
|
+
Hover Effect: Enabled
|
|
103
|
+
|
|
104
|
+
Chips with links:
|
|
105
|
+
- JavaScript → /skills/javascript
|
|
106
|
+
- Python → /skills/python
|
|
107
|
+
- Design → /skills/design
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Status Indicators
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Layout: Row
|
|
114
|
+
Size: Small
|
|
115
|
+
Individual chip colors:
|
|
116
|
+
- "Active" → green background
|
|
117
|
+
- "Pending" → yellow background
|
|
118
|
+
- "Completed" → blue background
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Styling Tips
|
|
122
|
+
|
|
123
|
+
### Using CSS Colors
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Background: #3b82f6
|
|
127
|
+
Text Color: #ffffff
|
|
128
|
+
Border Color: #2563eb
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Using Tailwind Classes
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Background: bg-gradient-to-r from-purple-500 to-pink-500
|
|
135
|
+
Text Color: text-white
|
|
136
|
+
Border Color: border-purple-700
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Custom Styling
|
|
140
|
+
|
|
141
|
+
Add a custom class name and define styles in your CSS:
|
|
142
|
+
|
|
143
|
+
```css
|
|
144
|
+
.my-custom-chips .chip-item {
|
|
145
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
146
|
+
color: white;
|
|
147
|
+
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.my-custom-chips .chip-item:hover {
|
|
151
|
+
transform: translateY(-4px) scale(1.05);
|
|
152
|
+
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Responsive Behavior
|
|
157
|
+
|
|
158
|
+
- **Desktop**: Chips display according to layout settings
|
|
159
|
+
- **Mobile (Row layout)**: Horizontal scroll enabled automatically
|
|
160
|
+
- **Mobile (Wrap layout)**: Chips wrap to multiple lines
|
|
161
|
+
- **Column layout**: Stacks vertically on all screen sizes
|
|
162
|
+
|
|
163
|
+
## Accessibility
|
|
164
|
+
|
|
165
|
+
- Proper semantic HTML
|
|
166
|
+
- Keyboard navigable when using links
|
|
167
|
+
- Screen reader friendly with aria-labels
|
|
168
|
+
- Sufficient color contrast (ensure your colors meet WCAG standards)
|
|
169
|
+
|
|
170
|
+
## Animation Options
|
|
171
|
+
|
|
172
|
+
When **Enable Animation** is checked:
|
|
173
|
+
|
|
174
|
+
- Chips fade in with stagger effect as you scroll
|
|
175
|
+
- Each chip animates individually
|
|
176
|
+
- Animation triggers once when scrolled into view
|
|
177
|
+
- Smooth easing for professional appearance
|
|
178
|
+
|
|
179
|
+
## Dark Mode
|
|
180
|
+
|
|
181
|
+
Default colors automatically adjust in dark mode:
|
|
182
|
+
|
|
183
|
+
- Background: gray-700
|
|
184
|
+
- Text: gray-100
|
|
185
|
+
- Border: gray-600
|
|
186
|
+
|
|
187
|
+
Override these by setting custom colors if needed.
|
|
188
|
+
|
|
189
|
+
## Component Files
|
|
190
|
+
|
|
191
|
+
- **Config**: `src/blocks/ChipBlock/config.ts`
|
|
192
|
+
- **Component**: `src/blocks/ChipBlock/Component.tsx`
|
|
193
|
+
- **Styles**: `src/blocks/ChipBlock/index.scss`
|
|
194
|
+
|
|
195
|
+
## Need Help?
|
|
196
|
+
|
|
197
|
+
Common issues:
|
|
198
|
+
|
|
199
|
+
- **Colors not showing**: Make sure you're using valid CSS color values or Tailwind classes
|
|
200
|
+
- **Layout breaking**: Check the gap and alignment settings
|
|
201
|
+
- **Links not working**: Ensure the link field includes the protocol (https://) for external links
|
|
202
|
+
- **Hover not working**: Enable "Hover Effect" in the Color Customization section
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import type { Block } from 'payload'
|
|
2
|
+
|
|
3
|
+
export const DDChip: Block = {
|
|
4
|
+
slug: 'DD-Chip',
|
|
5
|
+
interfaceName: 'DDChip',
|
|
6
|
+
labels: {
|
|
7
|
+
singular: 'Chip Block',
|
|
8
|
+
plural: 'Chip Blocks'
|
|
9
|
+
},
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
type: 'collapsible',
|
|
13
|
+
label: 'Layout & Styling',
|
|
14
|
+
admin: {
|
|
15
|
+
initCollapsed: false
|
|
16
|
+
},
|
|
17
|
+
fields: [
|
|
18
|
+
{
|
|
19
|
+
type: 'row',
|
|
20
|
+
fields: [
|
|
21
|
+
{
|
|
22
|
+
name: 'layout',
|
|
23
|
+
type: 'select',
|
|
24
|
+
label: 'Layout Direction',
|
|
25
|
+
defaultValue: 'row',
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: 'Row (Horizontal)',
|
|
29
|
+
value: 'row'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Column (Vertical)',
|
|
33
|
+
value: 'column'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: 'Row Wrap',
|
|
37
|
+
value: 'row-wrap'
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
admin: {
|
|
41
|
+
width: '50%',
|
|
42
|
+
description: 'Direction to display chips'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'size',
|
|
47
|
+
type: 'select',
|
|
48
|
+
label: 'Chip Size',
|
|
49
|
+
defaultValue: 'medium',
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
label: 'Small',
|
|
53
|
+
value: 'small'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: 'Medium',
|
|
57
|
+
value: 'medium'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'Large',
|
|
61
|
+
value: 'large'
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
admin: {
|
|
65
|
+
width: '50%',
|
|
66
|
+
description: 'Size of the chips'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'row',
|
|
73
|
+
fields: [
|
|
74
|
+
{
|
|
75
|
+
name: 'gap',
|
|
76
|
+
type: 'select',
|
|
77
|
+
label: 'Gap Between Chips',
|
|
78
|
+
defaultValue: 'medium',
|
|
79
|
+
options: [
|
|
80
|
+
{
|
|
81
|
+
label: 'None',
|
|
82
|
+
value: 'none'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Small',
|
|
86
|
+
value: 'small'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Medium',
|
|
90
|
+
value: 'medium'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'Large',
|
|
94
|
+
value: 'large'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
admin: {
|
|
98
|
+
width: '50%'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'alignment',
|
|
103
|
+
type: 'select',
|
|
104
|
+
label: 'Alignment',
|
|
105
|
+
defaultValue: 'start',
|
|
106
|
+
options: [
|
|
107
|
+
{
|
|
108
|
+
label: 'Start',
|
|
109
|
+
value: 'start'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Center',
|
|
113
|
+
value: 'center'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: 'End',
|
|
117
|
+
value: 'end'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Space Between',
|
|
121
|
+
value: 'space-between'
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
admin: {
|
|
125
|
+
width: '50%'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'collapsible',
|
|
134
|
+
label: 'Color Customization',
|
|
135
|
+
admin: {
|
|
136
|
+
initCollapsed: true
|
|
137
|
+
},
|
|
138
|
+
fields: [
|
|
139
|
+
{
|
|
140
|
+
type: 'row',
|
|
141
|
+
fields: [
|
|
142
|
+
{
|
|
143
|
+
name: 'backgroundColor',
|
|
144
|
+
type: 'text',
|
|
145
|
+
label: 'Background Color',
|
|
146
|
+
admin: {
|
|
147
|
+
width: '33%',
|
|
148
|
+
placeholder: 'e.g., #3b82f6, blue-500',
|
|
149
|
+
description: 'CSS color value or Tailwind class'
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'textColor',
|
|
154
|
+
type: 'text',
|
|
155
|
+
label: 'Text Color',
|
|
156
|
+
admin: {
|
|
157
|
+
width: '33%',
|
|
158
|
+
placeholder: 'e.g., #ffffff, white',
|
|
159
|
+
description: 'CSS color value or Tailwind class'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'borderColor',
|
|
164
|
+
type: 'text',
|
|
165
|
+
label: 'Border Color',
|
|
166
|
+
admin: {
|
|
167
|
+
width: '33%',
|
|
168
|
+
placeholder: 'e.g., #3b82f6, border-lime-500',
|
|
169
|
+
description: 'CSS color value or Tailwind class'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'row',
|
|
176
|
+
fields: [
|
|
177
|
+
{
|
|
178
|
+
name: 'borderWidth',
|
|
179
|
+
type: 'select',
|
|
180
|
+
label: 'Border Width',
|
|
181
|
+
defaultValue: '1',
|
|
182
|
+
options: [
|
|
183
|
+
{ label: 'None', value: '0' },
|
|
184
|
+
{ label: '1px', value: '1' },
|
|
185
|
+
{ label: '2px', value: '2' },
|
|
186
|
+
{ label: '3px', value: '3' },
|
|
187
|
+
{ label: '4px', value: '4' }
|
|
188
|
+
],
|
|
189
|
+
admin: {
|
|
190
|
+
width: '33%'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'borderRadius',
|
|
195
|
+
type: 'select',
|
|
196
|
+
label: 'Border Radius',
|
|
197
|
+
defaultValue: 'full',
|
|
198
|
+
options: [
|
|
199
|
+
{ label: 'None', value: 'none' },
|
|
200
|
+
{ label: 'Small', value: 'sm' },
|
|
201
|
+
{ label: 'Medium', value: 'md' },
|
|
202
|
+
{ label: 'Large', value: 'lg' },
|
|
203
|
+
{ label: 'Full (Pill)', value: 'full' }
|
|
204
|
+
],
|
|
205
|
+
admin: {
|
|
206
|
+
width: '33%'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'hoverEffect',
|
|
211
|
+
type: 'checkbox',
|
|
212
|
+
label: 'Enable Hover Effect',
|
|
213
|
+
defaultValue: true,
|
|
214
|
+
admin: {
|
|
215
|
+
width: '33%'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'chips',
|
|
224
|
+
type: 'array',
|
|
225
|
+
label: 'Chips',
|
|
226
|
+
minRows: 1,
|
|
227
|
+
labels: {
|
|
228
|
+
singular: 'Chip',
|
|
229
|
+
plural: 'Chips'
|
|
230
|
+
},
|
|
231
|
+
admin: {
|
|
232
|
+
description: 'Add and manage individual chips',
|
|
233
|
+
initCollapsed: false
|
|
234
|
+
},
|
|
235
|
+
fields: [
|
|
236
|
+
{
|
|
237
|
+
type: 'row',
|
|
238
|
+
fields: [
|
|
239
|
+
{
|
|
240
|
+
name: 'label',
|
|
241
|
+
type: 'text',
|
|
242
|
+
label: 'Label',
|
|
243
|
+
required: true,
|
|
244
|
+
admin: {
|
|
245
|
+
width: '70%',
|
|
246
|
+
placeholder: 'Enter chip text'
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'icon',
|
|
251
|
+
type: 'text',
|
|
252
|
+
label: 'Icon (Optional)',
|
|
253
|
+
admin: {
|
|
254
|
+
width: '30%',
|
|
255
|
+
placeholder: 'e.g., ✓, ⭐, 🚀',
|
|
256
|
+
description: 'Emoji or icon character'
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
type: 'row',
|
|
263
|
+
fields: [
|
|
264
|
+
{
|
|
265
|
+
name: 'customBackgroundColor',
|
|
266
|
+
type: 'text',
|
|
267
|
+
label: 'Custom Background',
|
|
268
|
+
hidden: true,
|
|
269
|
+
admin: {
|
|
270
|
+
width: '33%',
|
|
271
|
+
placeholder: 'Override global',
|
|
272
|
+
description: 'Leave empty to use global setting'
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'customTextColor',
|
|
277
|
+
type: 'text',
|
|
278
|
+
label: 'Custom Text Color',
|
|
279
|
+
hidden: true,
|
|
280
|
+
admin: {
|
|
281
|
+
width: '33%',
|
|
282
|
+
placeholder: 'Override global',
|
|
283
|
+
description: 'Leave empty to use global setting'
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'customBorderColor',
|
|
288
|
+
type: 'text',
|
|
289
|
+
label: 'Custom Border',
|
|
290
|
+
hidden: true,
|
|
291
|
+
admin: {
|
|
292
|
+
width: '33%',
|
|
293
|
+
placeholder: 'Override global',
|
|
294
|
+
description: 'Leave empty to use global setting'
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'link',
|
|
301
|
+
type: 'text',
|
|
302
|
+
label: 'Link (Optional)',
|
|
303
|
+
admin: {
|
|
304
|
+
placeholder: 'https://example.com or /internal-path',
|
|
305
|
+
description: 'Make this chip clickable'
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
type: 'collapsible',
|
|
312
|
+
label: 'Advanced Options',
|
|
313
|
+
hidden: true,
|
|
314
|
+
admin: {
|
|
315
|
+
initCollapsed: true
|
|
316
|
+
},
|
|
317
|
+
fields: [
|
|
318
|
+
{
|
|
319
|
+
name: 'customClassName',
|
|
320
|
+
type: 'text',
|
|
321
|
+
label: 'Custom CSS Class',
|
|
322
|
+
admin: {
|
|
323
|
+
placeholder: 'e.g., my-custom-chips',
|
|
324
|
+
description: 'Add custom CSS classes for additional styling'
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: 'animate',
|
|
329
|
+
type: 'checkbox',
|
|
330
|
+
label: 'Enable Animation',
|
|
331
|
+
defaultValue: false,
|
|
332
|
+
admin: {
|
|
333
|
+
description: 'Animate chips on scroll into view'
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
type: 'row',
|
|
338
|
+
fields: [
|
|
339
|
+
{
|
|
340
|
+
name: 'maxWidth',
|
|
341
|
+
type: 'text',
|
|
342
|
+
label: 'Max Container Width',
|
|
343
|
+
admin: {
|
|
344
|
+
width: '50%',
|
|
345
|
+
placeholder: 'e.g., 800px, 100%',
|
|
346
|
+
description: 'Maximum width of chip container'
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: 'padding',
|
|
351
|
+
type: 'select',
|
|
352
|
+
label: 'Container Padding',
|
|
353
|
+
defaultValue: 'none',
|
|
354
|
+
options: [
|
|
355
|
+
{ label: 'None', value: 'none' },
|
|
356
|
+
{ label: 'Small', value: 'small' },
|
|
357
|
+
{ label: 'Medium', value: 'medium' },
|
|
358
|
+
{ label: 'Large', value: 'large' }
|
|
359
|
+
],
|
|
360
|
+
admin: {
|
|
361
|
+
width: '50%'
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-Chip",
|
|
4
|
+
"label": "Chip",
|
|
5
|
+
"sourceName": "ChipBlock",
|
|
6
|
+
"portableName": "DD-Chip",
|
|
7
|
+
"slug": "DD-Chip",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/DesignsDustedv3",
|
|
11
|
+
"originalPath": "src/blocks/ROUND-TWO-CONVERSION/ChipBlock",
|
|
12
|
+
"originalSlug": "chipBlock",
|
|
13
|
+
"originalConfigExport": "ChipBlock",
|
|
14
|
+
"originalComponentExport": "ChipBlock",
|
|
15
|
+
"originalInterfaceName": "DDChip"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-Chip/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "config.ts",
|
|
24
|
+
"to": "src/blocks/DD-Chip/config.ts"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dependencies": [
|
|
28
|
+
"framer-motion"
|
|
29
|
+
],
|
|
30
|
+
"sharedFiles": [],
|
|
31
|
+
"requiredProjectFiles": [],
|
|
32
|
+
"optionalProjectFiles": [],
|
|
33
|
+
"collectionRegistration": {
|
|
34
|
+
"enabled": true,
|
|
35
|
+
"collections": [
|
|
36
|
+
"Pages",
|
|
37
|
+
"Posts"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"renderBlocksRegistration": {
|
|
41
|
+
"enabled": true
|
|
42
|
+
},
|
|
43
|
+
"renderBlocksBehavior": {
|
|
44
|
+
"wrapperless": false
|
|
45
|
+
},
|
|
46
|
+
"pageRouteIntegration": {
|
|
47
|
+
"required": false,
|
|
48
|
+
"manualSteps": []
|
|
49
|
+
},
|
|
50
|
+
"manual": [
|
|
51
|
+
"Register DDChip in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
52
|
+
"Register DD-Chip in RenderBlocks if automatic registration was skipped.",
|
|
53
|
+
"Run payload generate:types after schema changes."
|
|
54
|
+
],
|
|
55
|
+
"manualSteps": [
|
|
56
|
+
"Register DDChip in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
57
|
+
"Register DD-Chip in RenderBlocks if automatic registration was skipped.",
|
|
58
|
+
"Run payload generate:types after schema changes."
|
|
59
|
+
],
|
|
60
|
+
"patchTargets": {
|
|
61
|
+
"blockConfigRegistration": {
|
|
62
|
+
"description": "Installer can add import { DDChip } from '@/blocks/DD-Chip/config' and add DDChip to clear Pages/Posts block arrays."
|
|
63
|
+
},
|
|
64
|
+
"renderBlocksRegistration": {
|
|
65
|
+
"description": "Installer can register DD-Chip in RenderBlocks."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"notes": [
|
|
69
|
+
"Converted from ROUND-TWO-CONVERSION as a portable Dusted template.",
|
|
70
|
+
"Project-specific imports were replaced with local, dependency-light rendering where required."
|
|
71
|
+
],
|
|
72
|
+
"exportName": "DDChip",
|
|
73
|
+
"interfaceName": "DDChip"
|
|
74
|
+
}
|