blocks-dusted 0.1.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.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/bin/index.js +8 -0
- package/package.json +40 -0
- package/src/cli.js +79 -0
- package/src/commands/add.js +327 -0
- package/src/commands/doctor.js +21 -0
- package/src/commands/list.js +18 -0
- package/src/installers/checkRequirements.js +101 -0
- package/src/installers/copyTemplateFiles.js +79 -0
- package/src/installers/installDependencies.js +69 -0
- package/src/installers/patchPayloadBlocksArray.js +122 -0
- package/src/installers/patchRenderBlocks.js +110 -0
- package/src/installers/runGenerators.js +3 -0
- package/src/installers/writeInstalledBlockReadme.js +117 -0
- package/src/registry/listTemplates.js +17 -0
- package/src/registry/loadTemplateManifest.js +20 -0
- package/src/registry/validateTemplateManifest.js +69 -0
- package/src/utils/logger.js +8 -0
- package/src/utils/packageManager.js +42 -0
- package/src/utils/paths.js +7 -0
- package/src/utils/project.js +122 -0
- package/src/utils/strings.js +7 -0
- package/templates/blocks/DD-BookCall/Component.tsx +573 -0
- package/templates/blocks/DD-BookCall/config.ts +239 -0
- package/templates/blocks/DD-BookCall/manifest.json +112 -0
- package/templates/blocks/DD-CardTemplate01/Component.tsx +144 -0
- package/templates/blocks/DD-CardTemplate01/config.ts +106 -0
- package/templates/blocks/DD-CardTemplate01/manifest.json +84 -0
- package/templates/blocks/DD-Carousel-A/Component.tsx +266 -0
- package/templates/blocks/DD-Carousel-A/config.ts +163 -0
- package/templates/blocks/DD-Carousel-A/manifest.json +86 -0
- package/templates/blocks/DD-Carousel-B/Component.tsx +432 -0
- package/templates/blocks/DD-Carousel-B/config.ts +176 -0
- package/templates/blocks/DD-Carousel-B/manifest.json +86 -0
- package/templates/blocks/DD-ComparisonTable/Component.tsx +272 -0
- package/templates/blocks/DD-ComparisonTable/config.ts +105 -0
- package/templates/blocks/DD-ComparisonTable/manifest.json +78 -0
- package/templates/blocks/DD-Contact/Component.tsx +439 -0
- package/templates/blocks/DD-Contact/config.ts +217 -0
- package/templates/blocks/DD-Contact/manifest.json +107 -0
- package/templates/blocks/DD-FeatCat/Component.tsx +361 -0
- package/templates/blocks/DD-FeatCat/config.ts +204 -0
- package/templates/blocks/DD-FeatCat/manifest.json +87 -0
- package/templates/blocks/DD-FeatStrip/Component.tsx +615 -0
- package/templates/blocks/DD-FeatStrip/config.ts +134 -0
- package/templates/blocks/DD-FeatStrip/manifest.json +82 -0
- package/templates/blocks/DD-Hero/Component.tsx +317 -0
- package/templates/blocks/DD-Hero/config.ts +267 -0
- package/templates/blocks/DD-Hero/manifest.json +92 -0
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +995 -0
- package/templates/blocks/DD-HorizontalScroll/config.ts +231 -0
- package/templates/blocks/DD-HorizontalScroll/manifest.json +85 -0
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +571 -0
- package/templates/blocks/DD-MasonaryMedia/config.ts +390 -0
- package/templates/blocks/DD-MasonaryMedia/manifest.json +101 -0
- package/templates/blocks/DD-MasonaryMedia/vendor.d.ts +2 -0
- package/templates/blocks/DD-Pricing/Component.tsx +380 -0
- package/templates/blocks/DD-Pricing/config.ts +215 -0
- package/templates/blocks/DD-Pricing/manifest.json +78 -0
- package/templates/blocks/DD-Process/Component.tsx +155 -0
- package/templates/blocks/DD-Process/config.ts +150 -0
- package/templates/blocks/DD-Process/manifest.json +82 -0
- package/templates/blocks/DD-Section/Component.tsx +327 -0
- package/templates/blocks/DD-Section/config.ts +214 -0
- package/templates/blocks/DD-Section/manifest.json +85 -0
- package/templates/blocks/DD-Services/Component.tsx +188 -0
- package/templates/blocks/DD-Services/config.ts +149 -0
- package/templates/blocks/DD-Services/manifest.json +95 -0
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +317 -0
- package/templates/blocks/DD-ShowcaseGrid/config.ts +197 -0
- package/templates/blocks/DD-ShowcaseGrid/manifest.json +80 -0
- package/templates/blocks/DD-Slider-A/Component.tsx +252 -0
- package/templates/blocks/DD-Slider-A/config.ts +118 -0
- package/templates/blocks/DD-Slider-A/manifest.json +86 -0
- package/templates/blocks/DD-StackCards/Component.tsx +496 -0
- package/templates/blocks/DD-StackCards/config.ts +399 -0
- package/templates/blocks/DD-StackCards/manifest.json +87 -0
- package/templates/blocks/DD-Team/Component.tsx +265 -0
- package/templates/blocks/DD-Team/config.ts +173 -0
- package/templates/blocks/DD-Team/manifest.json +82 -0
- package/templates/blocks/DD-TechStack/Component.tsx +189 -0
- package/templates/blocks/DD-TechStack/config.ts +153 -0
- package/templates/blocks/DD-TechStack/manifest.json +118 -0
- package/templates/blocks/DD-Testimonials/Component.tsx +147 -0
- package/templates/blocks/DD-Testimonials/config.ts +120 -0
- package/templates/blocks/DD-Testimonials/manifest.json +87 -0
- package/templates/blocks/DD-Work/Component.tsx +328 -0
- package/templates/blocks/DD-Work/config.ts +165 -0
- package/templates/blocks/DD-Work/manifest.json +87 -0
- package/templates/blocks/DD-Work-B/Component.tsx +320 -0
- package/templates/blocks/DD-Work-B/config.ts +165 -0
- package/templates/blocks/DD-Work-B/manifest.json +75 -0
- package/templates/shared/components/ui/anims/fade.tsx +83 -0
- package/templates/shared/components/ui/button.tsx +233 -0
- package/templates/shared/components/ui/input.tsx +41 -0
- package/templates/shared/fields/lucide-icon-picker/Cell.tsx +24 -0
- package/templates/shared/fields/lucide-icon-picker/README.md +160 -0
- package/templates/shared/fields/lucide-icon-picker/field.ts +40 -0
- package/templates/shared/fields/lucide-icon-picker/index.tsx +203 -0
- package/templates/shared/utilities/canUseDOM.ts +1 -0
- package/templates/shared/utilities/getURL.ts +31 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-Carousel-B",
|
|
4
|
+
"label": "Studio Carousel Block B",
|
|
5
|
+
"sourceName": "StudioCarouselBlock-B",
|
|
6
|
+
"portableName": "DD-Carousel-B",
|
|
7
|
+
"slug": "DD-Carousel-B",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/DesignsDustedv3",
|
|
11
|
+
"originalPath": "src/blocks/StudioCarouselBlock-B",
|
|
12
|
+
"originalSlug": "studioCarouselBlockB",
|
|
13
|
+
"originalConfigExport": "StudioCarouselBlockB",
|
|
14
|
+
"originalComponentExport": "StudioCarouselBlockB",
|
|
15
|
+
"originalInterfaceName": "StudioCarouselBlockBProps"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-Carousel-B/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "config.ts",
|
|
24
|
+
"to": "src/blocks/DD-Carousel-B/config.ts"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dependencies": [
|
|
28
|
+
{
|
|
29
|
+
"name": "embla-carousel-react"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "lucide-react"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"sharedFiles": [],
|
|
36
|
+
"requiredProjectFiles": [
|
|
37
|
+
{
|
|
38
|
+
"path": "src/utilities/ui.ts",
|
|
39
|
+
"reason": "Block uses the cn utility from @/utilities/ui."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"optionalProjectFiles": [],
|
|
43
|
+
"collectionRegistration": {
|
|
44
|
+
"enabled": true,
|
|
45
|
+
"collections": [
|
|
46
|
+
"Pages",
|
|
47
|
+
"Posts"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"renderBlocksRegistration": {
|
|
51
|
+
"enabled": true
|
|
52
|
+
},
|
|
53
|
+
"renderBlocksBehavior": {
|
|
54
|
+
"wrapperless": false
|
|
55
|
+
},
|
|
56
|
+
"pageRouteIntegration": {
|
|
57
|
+
"required": false,
|
|
58
|
+
"manualSteps": []
|
|
59
|
+
},
|
|
60
|
+
"manual": [
|
|
61
|
+
"Register DDCarouselB in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
62
|
+
"Register DD-Carousel-B in RenderBlocks if automatic registration was skipped.",
|
|
63
|
+
"Run payload generate:types after schema changes.",
|
|
64
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
65
|
+
],
|
|
66
|
+
"manualSteps": [
|
|
67
|
+
"Register DDCarouselB in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
68
|
+
"Register DD-Carousel-B in RenderBlocks if automatic registration was skipped.",
|
|
69
|
+
"Run payload generate:types after schema changes.",
|
|
70
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
71
|
+
],
|
|
72
|
+
"patchTargets": {
|
|
73
|
+
"blockConfigRegistration": {
|
|
74
|
+
"description": "Installer can add import { DDCarouselB } from '@/blocks/DD-Carousel-B/config' and add DDCarouselB to clear Pages/Posts blocks arrays."
|
|
75
|
+
},
|
|
76
|
+
"renderBlocksRegistration": {
|
|
77
|
+
"description": "Installer can register DD-Carousel-B in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"notes": [
|
|
81
|
+
"Converted from DesignsDustedv3 StudioCarouselBlock-B.",
|
|
82
|
+
"Installer must not overwrite existing target files."
|
|
83
|
+
],
|
|
84
|
+
"exportName": "DDCarouselB",
|
|
85
|
+
"interfaceName": "DDCarouselB"
|
|
86
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React, { Fragment, useState } from "react";
|
|
4
|
+
import { Check, Minus, Plus } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
type TierKey = "free" | "pro" | "team";
|
|
7
|
+
|
|
8
|
+
type CellValue = boolean | string;
|
|
9
|
+
|
|
10
|
+
interface FeatureRow {
|
|
11
|
+
id?: string | null;
|
|
12
|
+
label?: string | null;
|
|
13
|
+
free?: CellValue | null;
|
|
14
|
+
pro?: CellValue | null;
|
|
15
|
+
team?: CellValue | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface FeatureGroup {
|
|
19
|
+
id?: string | null;
|
|
20
|
+
group?: string | null;
|
|
21
|
+
rows?: FeatureRow[] | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface TierHeader {
|
|
25
|
+
key: TierKey;
|
|
26
|
+
label: string;
|
|
27
|
+
highlight: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface StudioComparisonTableProps {
|
|
31
|
+
eyebrow?: string | null;
|
|
32
|
+
heading?: string | null;
|
|
33
|
+
defaultOpen?: boolean | null;
|
|
34
|
+
groups?: FeatureGroup[] | null;
|
|
35
|
+
sectionId?: string | null;
|
|
36
|
+
customCSS?: string | null;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const DEFAULT_GROUPS: FeatureGroup[] = [
|
|
41
|
+
{
|
|
42
|
+
group: "Components & Templates",
|
|
43
|
+
rows: [
|
|
44
|
+
{ label: "Free components", free: true, pro: true, team: true },
|
|
45
|
+
{ label: "Premium components", free: false, pro: "120+", team: "120+" },
|
|
46
|
+
{ label: "Free templates", free: true, pro: true, team: true },
|
|
47
|
+
{ label: "Premium templates", free: false, pro: "24+", team: "24+" },
|
|
48
|
+
{ label: "Payload CMS v3 blocks", free: false, pro: true, team: true },
|
|
49
|
+
{ label: "Figma source files", free: false, pro: true, team: true },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
group: "Licensing",
|
|
54
|
+
rows: [
|
|
55
|
+
{ label: "Personal use", free: true, pro: true, team: true },
|
|
56
|
+
{
|
|
57
|
+
label: "Commercial projects",
|
|
58
|
+
free: false,
|
|
59
|
+
pro: "1 project",
|
|
60
|
+
team: "Unlimited",
|
|
61
|
+
},
|
|
62
|
+
{ label: "White-label license", free: false, pro: false, team: true },
|
|
63
|
+
{ label: "Client resale rights", free: false, pro: false, team: true },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
group: "Updates & Access",
|
|
68
|
+
rows: [
|
|
69
|
+
{ label: "Lifetime updates", free: true, pro: true, team: true },
|
|
70
|
+
{
|
|
71
|
+
label: "Early access to new releases",
|
|
72
|
+
free: false,
|
|
73
|
+
pro: true,
|
|
74
|
+
team: true,
|
|
75
|
+
},
|
|
76
|
+
{ label: "Download source files", free: false, pro: true, team: true },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
group: "Support",
|
|
81
|
+
rows: [
|
|
82
|
+
{ label: "Community Discord", free: true, pro: true, team: true },
|
|
83
|
+
{ label: "Priority email support", free: false, pro: true, team: true },
|
|
84
|
+
{ label: "Dedicated Slack channel", free: false, pro: false, team: true },
|
|
85
|
+
{ label: "1-on-1 onboarding call", free: false, pro: false, team: true },
|
|
86
|
+
{ label: "SLA support guarantee", free: false, pro: false, team: true },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
group: "Team",
|
|
91
|
+
rows: [
|
|
92
|
+
{ label: "Team seats", free: "1", pro: "1", team: "Up to 10" },
|
|
93
|
+
{
|
|
94
|
+
label: "Invoice & billing management",
|
|
95
|
+
free: false,
|
|
96
|
+
pro: false,
|
|
97
|
+
team: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: "Custom Payload CMS schemas",
|
|
101
|
+
free: false,
|
|
102
|
+
pro: false,
|
|
103
|
+
team: true,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
function Cell({
|
|
110
|
+
value,
|
|
111
|
+
highlight,
|
|
112
|
+
}: {
|
|
113
|
+
value: CellValue | null | undefined;
|
|
114
|
+
highlight: boolean;
|
|
115
|
+
}) {
|
|
116
|
+
if (typeof value === "string") {
|
|
117
|
+
return (
|
|
118
|
+
<span
|
|
119
|
+
className={`text-sm font-medium ${highlight ? "text-indigo-900 dark:text-lime-400" : "text-stone-700 dark:text-stone-300"}`}
|
|
120
|
+
>
|
|
121
|
+
{value}
|
|
122
|
+
</span>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (value === true) {
|
|
127
|
+
return (
|
|
128
|
+
<div
|
|
129
|
+
className={`mx-auto flex h-5 w-5 items-center justify-center rounded-full ${
|
|
130
|
+
highlight ? "bg-stone-900" : "bg-stone-800"
|
|
131
|
+
}`}
|
|
132
|
+
style={{ cornerShape: "squircle" } as React.CSSProperties}
|
|
133
|
+
>
|
|
134
|
+
<Check
|
|
135
|
+
className={`h-3 w-3 ${highlight ? "text-stone-50" : "text-stone-300"}`}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<div className="mx-auto flex h-5 w-5 items-center justify-center opacity-30">
|
|
143
|
+
<Minus className="h-4 w-4 text-stone-600" />
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function DDComparisonTable({
|
|
149
|
+
eyebrow = "Full breakdown",
|
|
150
|
+
heading = "Compare all features",
|
|
151
|
+
defaultOpen = true,
|
|
152
|
+
groups,
|
|
153
|
+
sectionId,
|
|
154
|
+
}: StudioComparisonTableProps) {
|
|
155
|
+
const [open, setOpen] = useState(defaultOpen !== false);
|
|
156
|
+
const featureGroups = groups && groups.length > 0 ? groups : DEFAULT_GROUPS;
|
|
157
|
+
|
|
158
|
+
const tiers: TierHeader[] = [
|
|
159
|
+
{ key: "free", label: "Free", highlight: false },
|
|
160
|
+
{ key: "pro", label: "Pro", highlight: true },
|
|
161
|
+
{ key: "team", label: "Team", highlight: false },
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
return (
|
|
165
|
+
<section
|
|
166
|
+
id={sectionId ?? undefined}
|
|
167
|
+
className="studio-comparison-table border-t border-stone-800 bg-transparent px-6 py-20"
|
|
168
|
+
>
|
|
169
|
+
<div className="mx-auto max-w-6xl">
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
onClick={() => setOpen((current) => !current)}
|
|
173
|
+
className="group mb-8 flex w-full cursor-pointer items-center justify-between gap-6 text-left"
|
|
174
|
+
>
|
|
175
|
+
<div>
|
|
176
|
+
{eyebrow && (
|
|
177
|
+
<p className="mb-1 text-xs font-semibold uppercase tracking-widest text-stone-500">
|
|
178
|
+
{eyebrow}
|
|
179
|
+
</p>
|
|
180
|
+
)}
|
|
181
|
+
{heading && (
|
|
182
|
+
<h2 className="text-3xl font-semibold text-stone-900 dark:text-stone-50">
|
|
183
|
+
{heading}
|
|
184
|
+
</h2>
|
|
185
|
+
)}
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<div
|
|
189
|
+
className="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-stone-100 bg-stone-200 dark:border-stone-700 dark:bg-stone-800 transition-colors group-hover:border-stone-300 dark:group-hover:border-stone-500"
|
|
190
|
+
style={{ cornerShape: "squircle" } as React.CSSProperties}
|
|
191
|
+
>
|
|
192
|
+
{open ? (
|
|
193
|
+
<Minus className="h-4 w-4 text-stone-700 dark:text-stone-400 transition-transform duration-300" />
|
|
194
|
+
) : (
|
|
195
|
+
<Plus className="h-4 w-4 text-stone-700 dark:text-stone-300 transition-transform duration-300" />
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
198
|
+
</button>
|
|
199
|
+
|
|
200
|
+
{open && (
|
|
201
|
+
<div className="overflow-x-auto">
|
|
202
|
+
<table className="w-full min-w-160">
|
|
203
|
+
<thead>
|
|
204
|
+
<tr>
|
|
205
|
+
<th className="w-1/2 pb-0 text-left" />
|
|
206
|
+
{tiers.map((tier) => (
|
|
207
|
+
<th key={tier.key} className="pb-0 text-center">
|
|
208
|
+
<span
|
|
209
|
+
className={`inline-block rounded-lg px-4 py-1.5 text-sm font-semibold ${
|
|
210
|
+
tier.highlight
|
|
211
|
+
? "bg-stone-100 text-stone-900"
|
|
212
|
+
: "border-stone-100 bg-stone-200 dark:border-stone-700 dark:bg-stone-800/50 transition-colors group-hover:border-stone-300 dark:group-hover:border-stone-500"
|
|
213
|
+
}`}
|
|
214
|
+
style={
|
|
215
|
+
{ cornerShape: "squircle" } as React.CSSProperties
|
|
216
|
+
}
|
|
217
|
+
>
|
|
218
|
+
{tier.label}
|
|
219
|
+
</span>
|
|
220
|
+
</th>
|
|
221
|
+
))}
|
|
222
|
+
</tr>
|
|
223
|
+
</thead>
|
|
224
|
+
|
|
225
|
+
<tbody>
|
|
226
|
+
{featureGroups.map((group, groupIndex) => (
|
|
227
|
+
<Fragment key={group.id ?? group.group ?? groupIndex}>
|
|
228
|
+
<tr>
|
|
229
|
+
<td colSpan={4} className="pb-3 pt-0">
|
|
230
|
+
<span className="text-xs font-bold uppercase tracking-widest text-stone-500">
|
|
231
|
+
{group.group}
|
|
232
|
+
</span>
|
|
233
|
+
</td>
|
|
234
|
+
</tr>
|
|
235
|
+
|
|
236
|
+
{(group.rows ?? []).map((row, rowIndex) => (
|
|
237
|
+
<tr
|
|
238
|
+
key={row.id ?? row.label ?? rowIndex}
|
|
239
|
+
className={`border-t transition-colors hover:bg-stone-200/40 dark:hover:bg-stone-900/40 ${
|
|
240
|
+
rowIndex === 0
|
|
241
|
+
? "border-stone-800"
|
|
242
|
+
: "border-stone-800/50"
|
|
243
|
+
}`}
|
|
244
|
+
>
|
|
245
|
+
<td className="py-3.5 pr-6">
|
|
246
|
+
<span className="text-sm text-stone-400">
|
|
247
|
+
{row.label}
|
|
248
|
+
</span>
|
|
249
|
+
</td>
|
|
250
|
+
|
|
251
|
+
{tiers.map((tier) => (
|
|
252
|
+
<td key={tier.key} className="py-3.5 text-center">
|
|
253
|
+
<Cell
|
|
254
|
+
value={row[tier.key]}
|
|
255
|
+
highlight={tier.highlight}
|
|
256
|
+
/>
|
|
257
|
+
</td>
|
|
258
|
+
))}
|
|
259
|
+
</tr>
|
|
260
|
+
))}
|
|
261
|
+
</Fragment>
|
|
262
|
+
))}
|
|
263
|
+
</tbody>
|
|
264
|
+
</table>
|
|
265
|
+
</div>
|
|
266
|
+
)}
|
|
267
|
+
</div>
|
|
268
|
+
</section>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export default DDComparisonTable;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Block } from 'payload'
|
|
2
|
+
|
|
3
|
+
export const DDComparisonTable: Block = {
|
|
4
|
+
slug: 'DD-ComparisonTable',
|
|
5
|
+
interfaceName: 'DDComparisonTable',
|
|
6
|
+
labels: {
|
|
7
|
+
singular: 'Studio Comparison Table',
|
|
8
|
+
plural: 'Studio Comparison Tables',
|
|
9
|
+
},
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
type: 'tabs',
|
|
13
|
+
tabs: [
|
|
14
|
+
{
|
|
15
|
+
label: 'Content',
|
|
16
|
+
fields: [
|
|
17
|
+
{
|
|
18
|
+
name: 'eyebrow',
|
|
19
|
+
type: 'text',
|
|
20
|
+
defaultValue: 'Full breakdown',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'heading',
|
|
24
|
+
type: 'text',
|
|
25
|
+
defaultValue: 'Compare all features',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'defaultOpen',
|
|
30
|
+
type: 'checkbox',
|
|
31
|
+
defaultValue: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'groups',
|
|
35
|
+
type: 'array',
|
|
36
|
+
minRows: 1,
|
|
37
|
+
fields: [
|
|
38
|
+
{
|
|
39
|
+
name: 'group',
|
|
40
|
+
type: 'text',
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'rows',
|
|
45
|
+
type: 'array',
|
|
46
|
+
minRows: 1,
|
|
47
|
+
fields: [
|
|
48
|
+
{
|
|
49
|
+
name: 'label',
|
|
50
|
+
type: 'text',
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'row',
|
|
55
|
+
fields: [
|
|
56
|
+
{
|
|
57
|
+
name: 'free',
|
|
58
|
+
type: 'text',
|
|
59
|
+
admin: {
|
|
60
|
+
width: '33%',
|
|
61
|
+
description: 'Use true / false or text value',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'pro',
|
|
66
|
+
type: 'text',
|
|
67
|
+
admin: {
|
|
68
|
+
width: '33%',
|
|
69
|
+
description: 'Use true / false or text value',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'team',
|
|
74
|
+
type: 'text',
|
|
75
|
+
admin: {
|
|
76
|
+
width: '33%',
|
|
77
|
+
description: 'Use true / false or text value',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'sectionId',
|
|
92
|
+
type: 'text',
|
|
93
|
+
admin: {
|
|
94
|
+
description: 'Optional section anchor ID',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'customCSS',
|
|
99
|
+
type: 'textarea',
|
|
100
|
+
admin: {
|
|
101
|
+
description: 'Optional custom CSS for this block',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-ComparisonTable",
|
|
4
|
+
"label": "Studio Comparison Table",
|
|
5
|
+
"sourceName": "StudioComparisonTable",
|
|
6
|
+
"portableName": "DD-ComparisonTable",
|
|
7
|
+
"slug": "DD-ComparisonTable",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/DesignsDustedv3",
|
|
11
|
+
"originalPath": "src/blocks/StudioComparisonTable",
|
|
12
|
+
"originalSlug": "studioComparisonTable",
|
|
13
|
+
"originalConfigExport": "StudioComparisonTable",
|
|
14
|
+
"originalComponentExport": "StudioComparisonTable",
|
|
15
|
+
"originalInterfaceName": "StudioComparisonTable"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-ComparisonTable/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "config.ts",
|
|
24
|
+
"to": "src/blocks/DD-ComparisonTable/config.ts"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dependencies": [
|
|
28
|
+
{
|
|
29
|
+
"name": "lucide-react"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"sharedFiles": [],
|
|
33
|
+
"requiredProjectFiles": [],
|
|
34
|
+
"optionalProjectFiles": [],
|
|
35
|
+
"collectionRegistration": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"collections": [
|
|
38
|
+
"Pages",
|
|
39
|
+
"Posts"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"renderBlocksRegistration": {
|
|
43
|
+
"enabled": true
|
|
44
|
+
},
|
|
45
|
+
"renderBlocksBehavior": {
|
|
46
|
+
"wrapperless": false
|
|
47
|
+
},
|
|
48
|
+
"pageRouteIntegration": {
|
|
49
|
+
"required": false,
|
|
50
|
+
"manualSteps": []
|
|
51
|
+
},
|
|
52
|
+
"manual": [
|
|
53
|
+
"Register DDComparisonTable in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
54
|
+
"Register DD-ComparisonTable in RenderBlocks if automatic registration was skipped.",
|
|
55
|
+
"Run payload generate:types after schema changes.",
|
|
56
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
57
|
+
],
|
|
58
|
+
"manualSteps": [
|
|
59
|
+
"Register DDComparisonTable in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
60
|
+
"Register DD-ComparisonTable in RenderBlocks if automatic registration was skipped.",
|
|
61
|
+
"Run payload generate:types after schema changes.",
|
|
62
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
63
|
+
],
|
|
64
|
+
"patchTargets": {
|
|
65
|
+
"blockConfigRegistration": {
|
|
66
|
+
"description": "Installer can add import { DDComparisonTable } from '@/blocks/DD-ComparisonTable/config' and add DDComparisonTable to clear Pages/Posts blocks arrays."
|
|
67
|
+
},
|
|
68
|
+
"renderBlocksRegistration": {
|
|
69
|
+
"description": "Installer can register DD-ComparisonTable in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"notes": [
|
|
73
|
+
"Converted from DesignsDustedv3 StudioComparisonTable.",
|
|
74
|
+
"Installer must not overwrite existing target files."
|
|
75
|
+
],
|
|
76
|
+
"exportName": "DDComparisonTable",
|
|
77
|
+
"interfaceName": "DDComparisonTable"
|
|
78
|
+
}
|