@actuate-media/cms-admin 0.10.0 → 0.11.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/dist/AdminRoot.d.ts.map +1 -1
- package/dist/AdminRoot.js +8 -5
- package/dist/AdminRoot.js.map +1 -1
- package/dist/__tests__/layout/primitives.test.d.ts +2 -0
- package/dist/__tests__/layout/primitives.test.d.ts.map +1 -0
- package/dist/__tests__/layout/primitives.test.js +34 -0
- package/dist/__tests__/layout/primitives.test.js.map +1 -0
- package/dist/__tests__/lib/cv.test.d.ts +2 -0
- package/dist/__tests__/lib/cv.test.d.ts.map +1 -0
- package/dist/__tests__/lib/cv.test.js +66 -0
- package/dist/__tests__/lib/cv.test.js.map +1 -0
- package/dist/actuate-admin.css +1 -1
- package/dist/assets/actuate-logo.d.ts +36 -0
- package/dist/assets/actuate-logo.d.ts.map +1 -0
- package/dist/assets/actuate-logo.js +15 -0
- package/dist/assets/actuate-logo.js.map +1 -0
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/CommandPalette.js +10 -10
- package/dist/components/ContentOverviewChart.js +3 -3
- package/dist/components/ErrorBoundary.js +1 -1
- package/dist/components/FocalPointPicker.js +2 -2
- package/dist/components/FolderTree.js +20 -20
- package/dist/components/LivePreview.js +3 -3
- package/dist/components/LocaleSwitcher.js +1 -1
- package/dist/components/MediaPickerModal.js +4 -4
- package/dist/components/PresenceIndicator.js +1 -1
- package/dist/components/SEOConfigPanel.d.ts +2 -0
- package/dist/components/SEOConfigPanel.d.ts.map +1 -0
- package/dist/components/SEOConfigPanel.js +174 -0
- package/dist/components/SEOConfigPanel.js.map +1 -0
- package/dist/components/SEOPanel.js +9 -9
- package/dist/components/SEOPerformance.js +2 -2
- package/dist/components/SchedulePublishDialog.js +1 -1
- package/dist/components/SharePreviewLinkDialog.js +1 -1
- package/dist/components/TipTapEditor.js +5 -5
- package/dist/components/VersionHistory.js +2 -2
- package/dist/components/ui/Badge.d.ts +33 -3
- package/dist/components/ui/Badge.d.ts.map +1 -1
- package/dist/components/ui/Badge.js +42 -8
- package/dist/components/ui/Badge.js.map +1 -1
- package/dist/components/ui/Button.d.ts +19 -8
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/Button.js +35 -14
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Card.d.ts +26 -0
- package/dist/components/ui/Card.d.ts.map +1 -0
- package/dist/components/ui/Card.js +45 -0
- package/dist/components/ui/Card.js.map +1 -0
- package/dist/components/ui/DataTable.js +1 -1
- package/dist/components/ui/Input.d.ts +15 -0
- package/dist/components/ui/Input.d.ts.map +1 -0
- package/dist/components/ui/Input.js +23 -0
- package/dist/components/ui/Input.js.map +1 -0
- package/dist/components/ui/SearchInput.js +1 -1
- package/dist/components/ui/Select.d.ts +16 -0
- package/dist/components/ui/Select.d.ts.map +1 -0
- package/dist/components/ui/Select.js +25 -0
- package/dist/components/ui/Select.js.map +1 -0
- package/dist/components/ui/Toast.js +1 -1
- package/dist/components/ui/index.d.ts +10 -4
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +5 -2
- package/dist/components/ui/index.js.map +1 -1
- package/dist/fields/BlockBuilderField.js +3 -3
- package/dist/fields/DateField.js +1 -1
- package/dist/fields/RelationshipField.js +3 -3
- package/dist/fields/TextField.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/Header.js +1 -1
- package/dist/layout/Layout.d.ts +14 -0
- package/dist/layout/Layout.d.ts.map +1 -1
- package/dist/layout/Layout.js +17 -11
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Sidebar.js +21 -11
- package/dist/layout/Sidebar.js.map +1 -1
- package/dist/layout/primitives/AdminShell.d.ts +43 -0
- package/dist/layout/primitives/AdminShell.d.ts.map +1 -0
- package/dist/layout/primitives/AdminShell.js +51 -0
- package/dist/layout/primitives/AdminShell.js.map +1 -0
- package/dist/layout/primitives/Box.d.ts +19 -0
- package/dist/layout/primitives/Box.d.ts.map +1 -0
- package/dist/layout/primitives/Box.js +12 -0
- package/dist/layout/primitives/Box.js.map +1 -0
- package/dist/layout/primitives/Cluster.d.ts +27 -0
- package/dist/layout/primitives/Cluster.d.ts.map +1 -0
- package/dist/layout/primitives/Cluster.js +37 -0
- package/dist/layout/primitives/Cluster.js.map +1 -0
- package/dist/layout/primitives/Grid.d.ts +45 -0
- package/dist/layout/primitives/Grid.d.ts.map +1 -0
- package/dist/layout/primitives/Grid.js +59 -0
- package/dist/layout/primitives/Grid.js.map +1 -0
- package/dist/layout/primitives/PageContainer.d.ts +36 -0
- package/dist/layout/primitives/PageContainer.d.ts.map +1 -0
- package/dist/layout/primitives/PageContainer.js +41 -0
- package/dist/layout/primitives/PageContainer.js.map +1 -0
- package/dist/layout/primitives/Split.d.ts +34 -0
- package/dist/layout/primitives/Split.d.ts.map +1 -0
- package/dist/layout/primitives/Split.js +27 -0
- package/dist/layout/primitives/Split.js.map +1 -0
- package/dist/layout/primitives/Stack.d.ts +23 -0
- package/dist/layout/primitives/Stack.d.ts.map +1 -0
- package/dist/layout/primitives/Stack.js +34 -0
- package/dist/layout/primitives/Stack.js.map +1 -0
- package/dist/layout/primitives/index.d.ts +30 -0
- package/dist/layout/primitives/index.d.ts.map +1 -0
- package/dist/layout/primitives/index.js +22 -0
- package/dist/layout/primitives/index.js.map +1 -0
- package/dist/layout/primitives/tokens.d.ts +48 -0
- package/dist/layout/primitives/tokens.d.ts.map +1 -0
- package/dist/layout/primitives/tokens.js +54 -0
- package/dist/layout/primitives/tokens.js.map +1 -0
- package/dist/lib/cv.d.ts +53 -0
- package/dist/lib/cv.d.ts.map +1 -0
- package/dist/lib/cv.js +39 -0
- package/dist/lib/cv.js.map +1 -0
- package/dist/views/ApiKeys.js +7 -7
- package/dist/views/CollectionList.js +8 -8
- package/dist/views/Dashboard.d.ts.map +1 -1
- package/dist/views/Dashboard.js +333 -78
- package/dist/views/Dashboard.js.map +1 -1
- package/dist/views/DocumentEdit.js +3 -3
- package/dist/views/ForgotPassword.js +2 -2
- package/dist/views/FormEditor.js +5 -5
- package/dist/views/FormSubmissions.js +6 -6
- package/dist/views/Forms.js +2 -2
- package/dist/views/Login.d.ts +16 -1
- package/dist/views/Login.d.ts.map +1 -1
- package/dist/views/Login.js +17 -7
- package/dist/views/Login.js.map +1 -1
- package/dist/views/MediaBrowser.js +16 -16
- package/dist/views/PageEditor.js +2 -2
- package/dist/views/Pages.js +10 -10
- package/dist/views/PostEditor.js +2 -2
- package/dist/views/Posts.js +4 -4
- package/dist/views/Redirects.js +4 -4
- package/dist/views/ResetPassword.js +2 -2
- package/dist/views/SEO.js +6 -6
- package/dist/views/ScriptTagEditor.js +4 -4
- package/dist/views/ScriptTags.js +2 -2
- package/dist/views/Settings.d.ts.map +1 -1
- package/dist/views/Settings.js +9 -8
- package/dist/views/Settings.js.map +1 -1
- package/dist/views/SetupWizard.js +2 -2
- package/dist/views/Users.js +4 -4
- package/dist/views/page-builder/AIBlockAssist.js +1 -1
- package/dist/views/page-builder/AIGenerateDialog.js +10 -10
- package/dist/views/page-builder/BlockEditor.js +10 -10
- package/dist/views/page-builder/BlockPicker.js +4 -4
- package/dist/views/page-builder/BottomBar.js +1 -1
- package/dist/views/page-builder/BuilderToolbar.js +2 -2
- package/dist/views/page-builder/ContextPanel.js +2 -2
- package/dist/views/page-builder/DesignScore.js +9 -9
- package/dist/views/page-builder/NodeSettings.js +8 -8
- package/dist/views/page-builder/PageBuilder.js +3 -3
- package/dist/views/page-builder/PageSettings.js +1 -1
- package/dist/views/page-builder/PageTemplates.js +2 -2
- package/dist/views/page-builder/SEOPanel.js +13 -13
- package/dist/views/page-builder/SavedSections.js +5 -5
- package/dist/views/page-builder/TemplatePicker.js +2 -2
- package/dist/views/page-builder/block-renderers/CTAPreview.js +5 -5
- package/dist/views/page-builder/block-renderers/CardsPreview.js +1 -1
- package/dist/views/page-builder/block-renderers/CodePreview.js +1 -1
- package/dist/views/page-builder/block-renderers/FAQPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/FallbackPreview.js +1 -1
- package/dist/views/page-builder/block-renderers/FormPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/GalleryPreview.js +5 -5
- package/dist/views/page-builder/block-renderers/HeroPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/ImagePreview.js +3 -3
- package/dist/views/page-builder/block-renderers/TextPreview.js +3 -3
- package/dist/views/page-builder/block-renderers/VideoPreview.js +4 -4
- package/dist/views/page-builder/canvas/BlockRenderer.js +1 -1
- package/dist/views/page-builder/canvas/BuilderCanvas.js +3 -3
- package/dist/views/page-builder/canvas/ColumnRenderer.js +2 -2
- package/dist/views/page-builder/canvas/ContainerRenderer.js +2 -2
- package/dist/views/page-builder/canvas/RowRenderer.js +2 -2
- package/dist/views/page-builder/canvas/SectionRenderer.js +2 -2
- package/package.json +6 -2
- package/src/AdminRoot.tsx +21 -11
- package/src/__tests__/layout/primitives.test.ts +37 -0
- package/src/__tests__/lib/cv.test.ts +74 -0
- package/src/assets/actuate-logo.tsx +72 -0
- package/src/components/Breadcrumbs.tsx +6 -6
- package/src/components/CommandPalette.tsx +34 -34
- package/src/components/ContentOverviewChart.tsx +3 -3
- package/src/components/ErrorBoundary.tsx +3 -3
- package/src/components/FocalPointPicker.tsx +4 -4
- package/src/components/FolderTree.tsx +38 -38
- package/src/components/LivePreview.tsx +16 -16
- package/src/components/LocaleSwitcher.tsx +7 -7
- package/src/components/MediaPickerModal.tsx +21 -21
- package/src/components/PresenceIndicator.tsx +2 -2
- package/src/components/SEOConfigPanel.tsx +582 -0
- package/src/components/SEOPanel.tsx +46 -46
- package/src/components/SEOPerformance.tsx +21 -21
- package/src/components/SchedulePublishDialog.tsx +4 -4
- package/src/components/SharePreviewLinkDialog.tsx +1 -1
- package/src/components/TipTapEditor.tsx +33 -33
- package/src/components/VersionHistory.tsx +16 -16
- package/src/components/ui/Badge.tsx +66 -14
- package/src/components/ui/Button.tsx +70 -33
- package/src/components/ui/Card.tsx +101 -0
- package/src/components/ui/DataTable.tsx +1 -1
- package/src/components/ui/Input.tsx +35 -0
- package/src/components/ui/SearchInput.tsx +4 -4
- package/src/components/ui/Select.tsx +56 -0
- package/src/components/ui/Toast.tsx +1 -1
- package/src/components/ui/index.ts +18 -4
- package/src/fields/BlockBuilderField.tsx +3 -3
- package/src/fields/DateField.tsx +1 -1
- package/src/fields/RelationshipField.tsx +10 -10
- package/src/fields/TextField.tsx +1 -1
- package/src/index.ts +28 -0
- package/src/layout/Header.tsx +28 -28
- package/src/layout/Layout.tsx +39 -46
- package/src/layout/Sidebar.tsx +37 -64
- package/src/layout/primitives/AdminShell.tsx +118 -0
- package/src/layout/primitives/Box.tsx +30 -0
- package/src/layout/primitives/Cluster.tsx +74 -0
- package/src/layout/primitives/Grid.tsx +120 -0
- package/src/layout/primitives/PageContainer.tsx +96 -0
- package/src/layout/primitives/Split.tsx +73 -0
- package/src/layout/primitives/Stack.tsx +67 -0
- package/src/layout/primitives/index.ts +36 -0
- package/src/layout/primitives/tokens.ts +76 -0
- package/src/lib/cv.ts +96 -0
- package/src/styles/build-input.css +1 -1
- package/src/views/ApiKeys.tsx +57 -57
- package/src/views/CollectionList.tsx +30 -30
- package/src/views/Dashboard.tsx +737 -186
- package/src/views/DocumentEdit.tsx +9 -9
- package/src/views/ForgotPassword.tsx +18 -18
- package/src/views/FormEditor.tsx +75 -75
- package/src/views/FormSubmissions.tsx +76 -76
- package/src/views/Forms.tsx +27 -27
- package/src/views/Login.tsx +65 -25
- package/src/views/MediaBrowser.tsx +127 -127
- package/src/views/PageEditor.tsx +25 -25
- package/src/views/Pages.tsx +59 -59
- package/src/views/PostEditor.tsx +37 -37
- package/src/views/Posts.tsx +48 -48
- package/src/views/Redirects.tsx +21 -21
- package/src/views/ResetPassword.tsx +28 -28
- package/src/views/SEO.tsx +144 -144
- package/src/views/ScriptTagEditor.tsx +24 -24
- package/src/views/ScriptTags.tsx +10 -10
- package/src/views/Settings.tsx +88 -80
- package/src/views/SetupWizard.tsx +28 -28
- package/src/views/Users.tsx +20 -20
- package/src/views/page-builder/AIBlockAssist.tsx +1 -1
- package/src/views/page-builder/AIGenerateDialog.tsx +63 -63
- package/src/views/page-builder/BlockEditor.tsx +26 -26
- package/src/views/page-builder/BlockPicker.tsx +22 -22
- package/src/views/page-builder/BottomBar.tsx +8 -8
- package/src/views/page-builder/BuilderToolbar.tsx +17 -17
- package/src/views/page-builder/ContextPanel.tsx +3 -3
- package/src/views/page-builder/DesignScore.tsx +21 -21
- package/src/views/page-builder/NodeSettings.tsx +27 -27
- package/src/views/page-builder/PageBuilder.tsx +11 -11
- package/src/views/page-builder/PageSettings.tsx +4 -4
- package/src/views/page-builder/PageTemplates.tsx +18 -18
- package/src/views/page-builder/SEOPanel.tsx +53 -53
- package/src/views/page-builder/SavedSections.tsx +37 -37
- package/src/views/page-builder/TemplatePicker.tsx +17 -17
- package/src/views/page-builder/block-renderers/CTAPreview.tsx +13 -13
- package/src/views/page-builder/block-renderers/CardsPreview.tsx +5 -5
- package/src/views/page-builder/block-renderers/CodePreview.tsx +6 -6
- package/src/views/page-builder/block-renderers/FAQPreview.tsx +13 -13
- package/src/views/page-builder/block-renderers/FallbackPreview.tsx +3 -3
- package/src/views/page-builder/block-renderers/FormPreview.tsx +20 -20
- package/src/views/page-builder/block-renderers/GalleryPreview.tsx +8 -8
- package/src/views/page-builder/block-renderers/HeroPreview.tsx +16 -16
- package/src/views/page-builder/block-renderers/ImagePreview.tsx +4 -4
- package/src/views/page-builder/block-renderers/TextPreview.tsx +14 -14
- package/src/views/page-builder/block-renderers/VideoPreview.tsx +12 -12
- package/src/views/page-builder/canvas/BlockRenderer.tsx +4 -4
- package/src/views/page-builder/canvas/BuilderCanvas.tsx +6 -6
- package/src/views/page-builder/canvas/ColumnRenderer.tsx +3 -3
- package/src/views/page-builder/canvas/ContainerRenderer.tsx +2 -2
- package/src/views/page-builder/canvas/RowRenderer.tsx +2 -2
- package/src/views/page-builder/canvas/SectionRenderer.tsx +2 -2
|
@@ -164,22 +164,22 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
164
164
|
<div className="p-4 pr-8">
|
|
165
165
|
<div className="mb-6 flex items-center justify-between">
|
|
166
166
|
<div>
|
|
167
|
-
<h1 className="text-2xl font-medium
|
|
168
|
-
<p className="text-
|
|
167
|
+
<h1 className="text-foreground text-2xl font-medium">Saved Sections</h1>
|
|
168
|
+
<p className="text-muted-foreground mt-1 text-sm">
|
|
169
169
|
Reusable sections for the page builder
|
|
170
170
|
</p>
|
|
171
171
|
</div>
|
|
172
172
|
<button
|
|
173
173
|
type="button"
|
|
174
174
|
onClick={() => setViewState({ mode: 'create' })}
|
|
175
|
-
className="flex items-center gap-2 rounded-lg
|
|
175
|
+
className="bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors"
|
|
176
176
|
>
|
|
177
177
|
<Plus size={16} />
|
|
178
178
|
Create Section
|
|
179
179
|
</button>
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
|
-
<div className="mb-4 flex items-center gap-1 border-b
|
|
182
|
+
<div className="border-border mb-4 flex items-center gap-1 border-b">
|
|
183
183
|
<CategoryTab
|
|
184
184
|
label="All"
|
|
185
185
|
active={activeCategory === 'all'}
|
|
@@ -197,18 +197,18 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
197
197
|
|
|
198
198
|
{loading && (
|
|
199
199
|
<div className="flex items-center justify-center py-16">
|
|
200
|
-
<Loader2 className="
|
|
200
|
+
<Loader2 className="text-muted-foreground h-6 w-6 animate-spin" />
|
|
201
201
|
</div>
|
|
202
202
|
)}
|
|
203
203
|
|
|
204
204
|
{error && !loading && (
|
|
205
205
|
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
206
206
|
<AlertTriangle size={24} className="text-destructive mb-2" />
|
|
207
|
-
<p className="text-
|
|
207
|
+
<p className="text-muted-foreground mb-3 text-sm">{error}</p>
|
|
208
208
|
<button
|
|
209
209
|
type="button"
|
|
210
210
|
onClick={fetchSections}
|
|
211
|
-
className="px-3 py-1.5 text-sm font-medium
|
|
211
|
+
className="text-foreground border-border hover:bg-accent rounded-md border px-3 py-1.5 text-sm font-medium transition-colors"
|
|
212
212
|
>
|
|
213
213
|
Retry
|
|
214
214
|
</button>
|
|
@@ -218,8 +218,8 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
218
218
|
{!loading && !error && filteredSections.length === 0 && (
|
|
219
219
|
<div className="flex flex-col items-center justify-center py-16 text-center">
|
|
220
220
|
<Layers size={32} className="text-muted-foreground mb-3" />
|
|
221
|
-
<p className="text-
|
|
222
|
-
<p className="text-
|
|
221
|
+
<p className="text-foreground mb-1 text-sm font-medium">No saved sections</p>
|
|
222
|
+
<p className="text-muted-foreground mb-4 text-xs">
|
|
223
223
|
{activeCategory === 'all'
|
|
224
224
|
? 'Create your first reusable section to get started.'
|
|
225
225
|
: `No sections in the "${activeCategory}" category.`}
|
|
@@ -228,7 +228,7 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
228
228
|
<button
|
|
229
229
|
type="button"
|
|
230
230
|
onClick={() => setViewState({ mode: 'create' })}
|
|
231
|
-
className="flex items-center gap-2 rounded-md
|
|
231
|
+
className="bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium transition-colors"
|
|
232
232
|
>
|
|
233
233
|
<Plus size={14} />
|
|
234
234
|
Create Section
|
|
@@ -238,29 +238,29 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
238
238
|
)}
|
|
239
239
|
|
|
240
240
|
{!loading && !error && filteredSections.length > 0 && (
|
|
241
|
-
<div className="grid grid-cols-1 lg:grid-cols-2
|
|
241
|
+
<div className="grid grid-cols-1 gap-3 lg:grid-cols-2">
|
|
242
242
|
{filteredSections.map((section) => (
|
|
243
243
|
<div
|
|
244
244
|
key={section.id}
|
|
245
|
-
className="border
|
|
245
|
+
className="border-border bg-card hover:border-primary/50 rounded-lg border p-4 transition-colors"
|
|
246
246
|
>
|
|
247
247
|
<div className="flex items-start justify-between gap-3">
|
|
248
248
|
<div className="min-w-0 flex-1">
|
|
249
|
-
<p className="text-sm font-medium
|
|
249
|
+
<p className="text-foreground truncate text-sm font-medium">{section.name}</p>
|
|
250
250
|
{section.description && (
|
|
251
|
-
<p className="text-
|
|
251
|
+
<p className="text-muted-foreground mt-0.5 line-clamp-2 text-xs">
|
|
252
252
|
{section.description}
|
|
253
253
|
</p>
|
|
254
254
|
)}
|
|
255
255
|
</div>
|
|
256
256
|
<span
|
|
257
|
-
className={`shrink-0
|
|
257
|
+
className={`shrink-0 rounded-full px-2 py-0.5 text-xs ${CATEGORY_COLORS[section.category] ?? 'bg-muted text-muted-foreground'}`}
|
|
258
258
|
>
|
|
259
259
|
{section.category}
|
|
260
260
|
</span>
|
|
261
261
|
</div>
|
|
262
262
|
|
|
263
|
-
<div className="mt-3 flex items-center gap-4 text-xs
|
|
263
|
+
<div className="text-muted-foreground mt-3 flex items-center gap-4 text-xs">
|
|
264
264
|
<span className="flex items-center gap-1">
|
|
265
265
|
<Hash size={12} />
|
|
266
266
|
{section.usageCount} use{section.usageCount !== 1 ? 's' : ''}
|
|
@@ -277,11 +277,11 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
277
277
|
)}
|
|
278
278
|
</div>
|
|
279
279
|
|
|
280
|
-
<div className="mt-3 flex items-center gap-1 border-t
|
|
280
|
+
<div className="border-border mt-3 flex items-center gap-1 border-t pt-3">
|
|
281
281
|
<button
|
|
282
282
|
type="button"
|
|
283
283
|
onClick={() => setViewState({ mode: 'edit', section })}
|
|
284
|
-
className="flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium
|
|
284
|
+
className="text-foreground hover:bg-accent flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors"
|
|
285
285
|
aria-label={`Edit ${section.name}`}
|
|
286
286
|
>
|
|
287
287
|
<Edit size={13} />
|
|
@@ -290,7 +290,7 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
290
290
|
<button
|
|
291
291
|
type="button"
|
|
292
292
|
onClick={() => handleDuplicate(section)}
|
|
293
|
-
className="flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium
|
|
293
|
+
className="text-foreground hover:bg-accent flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors"
|
|
294
294
|
aria-label={`Duplicate ${section.name}`}
|
|
295
295
|
>
|
|
296
296
|
<Copy size={13} />
|
|
@@ -298,18 +298,18 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
298
298
|
</button>
|
|
299
299
|
{deleteConfirmId === section.id ? (
|
|
300
300
|
<div className="ml-auto flex items-center gap-1">
|
|
301
|
-
<span className="text-
|
|
301
|
+
<span className="text-destructive mr-1 text-xs">Delete?</span>
|
|
302
302
|
<button
|
|
303
303
|
type="button"
|
|
304
304
|
onClick={() => handleDelete(section.id)}
|
|
305
|
-
className="
|
|
305
|
+
className="text-destructive-foreground bg-destructive hover:bg-destructive/90 rounded-md px-2 py-1 text-xs font-medium transition-colors"
|
|
306
306
|
>
|
|
307
307
|
Yes
|
|
308
308
|
</button>
|
|
309
309
|
<button
|
|
310
310
|
type="button"
|
|
311
311
|
onClick={() => setDeleteConfirmId(null)}
|
|
312
|
-
className="px-2 py-1 text-xs font-medium
|
|
312
|
+
className="text-foreground border-border hover:bg-accent rounded-md border px-2 py-1 text-xs font-medium transition-colors"
|
|
313
313
|
>
|
|
314
314
|
No
|
|
315
315
|
</button>
|
|
@@ -318,7 +318,7 @@ export function SavedSections({ onNavigate, config }: SavedSectionsProps) {
|
|
|
318
318
|
<button
|
|
319
319
|
type="button"
|
|
320
320
|
onClick={() => setDeleteConfirmId(section.id)}
|
|
321
|
-
className="ml-auto flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium
|
|
321
|
+
className="text-destructive hover:bg-destructive/10 ml-auto flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors"
|
|
322
322
|
aria-label={`Delete ${section.name}`}
|
|
323
323
|
>
|
|
324
324
|
<Trash2 size={13} />
|
|
@@ -345,10 +345,10 @@ function CategoryTab({ label, active, onClick }: CategoryTabProps) {
|
|
|
345
345
|
<button
|
|
346
346
|
type="button"
|
|
347
347
|
onClick={onClick}
|
|
348
|
-
className={
|
|
348
|
+
className={`-mb-px border-b-2 px-3 py-2 text-sm transition-colors ${
|
|
349
349
|
active
|
|
350
350
|
? 'border-primary text-foreground font-medium'
|
|
351
|
-
: '
|
|
351
|
+
: 'text-muted-foreground hover:text-foreground border-transparent'
|
|
352
352
|
}`}
|
|
353
353
|
>
|
|
354
354
|
{label}
|
|
@@ -382,20 +382,20 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
382
382
|
<button
|
|
383
383
|
type="button"
|
|
384
384
|
onClick={onCancel}
|
|
385
|
-
className="flex items-center gap-1.5 text-sm
|
|
385
|
+
className="text-muted-foreground hover:text-foreground mb-3 flex items-center gap-1.5 text-sm transition-colors"
|
|
386
386
|
aria-label="Back to saved sections"
|
|
387
387
|
>
|
|
388
388
|
<ArrowLeft size={16} />
|
|
389
389
|
Back
|
|
390
390
|
</button>
|
|
391
|
-
<h1 className="text-2xl font-medium
|
|
391
|
+
<h1 className="text-foreground text-2xl font-medium">
|
|
392
392
|
{initial ? `Edit: ${initial.name}` : 'Create Saved Section'}
|
|
393
393
|
</h1>
|
|
394
394
|
</div>
|
|
395
395
|
|
|
396
396
|
<form onSubmit={handleSubmit} className="max-w-lg space-y-4">
|
|
397
397
|
<div>
|
|
398
|
-
<label htmlFor="section-name" className="block text-sm font-medium
|
|
398
|
+
<label htmlFor="section-name" className="text-foreground mb-1 block text-sm font-medium">
|
|
399
399
|
Name <span className="text-destructive">*</span>
|
|
400
400
|
</label>
|
|
401
401
|
<input
|
|
@@ -405,14 +405,14 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
405
405
|
onChange={(e) => setName(e.target.value)}
|
|
406
406
|
required
|
|
407
407
|
placeholder="e.g. Hero Banner"
|
|
408
|
-
className="
|
|
408
|
+
className="bg-background border-input focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none"
|
|
409
409
|
/>
|
|
410
410
|
</div>
|
|
411
411
|
|
|
412
412
|
<div>
|
|
413
413
|
<label
|
|
414
414
|
htmlFor="section-description"
|
|
415
|
-
className="block text-sm font-medium
|
|
415
|
+
className="text-foreground mb-1 block text-sm font-medium"
|
|
416
416
|
>
|
|
417
417
|
Description
|
|
418
418
|
</label>
|
|
@@ -422,14 +422,14 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
422
422
|
onChange={(e) => setDescription(e.target.value)}
|
|
423
423
|
placeholder="Optional description of this section..."
|
|
424
424
|
rows={3}
|
|
425
|
-
className="
|
|
425
|
+
className="bg-background border-input focus:ring-ring w-full resize-none rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none"
|
|
426
426
|
/>
|
|
427
427
|
</div>
|
|
428
428
|
|
|
429
429
|
<div>
|
|
430
430
|
<label
|
|
431
431
|
htmlFor="section-category"
|
|
432
|
-
className="block text-sm font-medium
|
|
432
|
+
className="text-foreground mb-1 block text-sm font-medium"
|
|
433
433
|
>
|
|
434
434
|
Category
|
|
435
435
|
</label>
|
|
@@ -437,7 +437,7 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
437
437
|
id="section-category"
|
|
438
438
|
value={category}
|
|
439
439
|
onChange={(e) => setCategory(e.target.value)}
|
|
440
|
-
className="
|
|
440
|
+
className="bg-background border-input focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none"
|
|
441
441
|
>
|
|
442
442
|
{CATEGORIES.map((cat) => (
|
|
443
443
|
<option key={cat} value={cat}>
|
|
@@ -448,8 +448,8 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
448
448
|
</div>
|
|
449
449
|
|
|
450
450
|
{treeSize !== null && (
|
|
451
|
-
<div className="
|
|
452
|
-
<p className="text-
|
|
451
|
+
<div className="border-border bg-muted rounded-md border p-3">
|
|
452
|
+
<p className="text-muted-foreground text-xs">
|
|
453
453
|
Section tree editing is available in the page builder. Current tree size:{' '}
|
|
454
454
|
{(treeSize / 1024).toFixed(1)} KB
|
|
455
455
|
</p>
|
|
@@ -460,7 +460,7 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
460
460
|
<button
|
|
461
461
|
type="submit"
|
|
462
462
|
disabled={saving || !name.trim()}
|
|
463
|
-
className="flex items-center gap-2 rounded-lg
|
|
463
|
+
className="bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50"
|
|
464
464
|
>
|
|
465
465
|
{saving && <Loader2 size={14} className="animate-spin" />}
|
|
466
466
|
{initial ? 'Save Changes' : 'Create Section'}
|
|
@@ -469,7 +469,7 @@ function SectionForm({ initial, saving, onSave, onCancel }: SectionFormProps) {
|
|
|
469
469
|
type="button"
|
|
470
470
|
onClick={onCancel}
|
|
471
471
|
disabled={saving}
|
|
472
|
-
className="px-4 py-2 text-sm font-medium
|
|
472
|
+
className="text-foreground border-border hover:bg-accent rounded-lg border px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50"
|
|
473
473
|
>
|
|
474
474
|
Cancel
|
|
475
475
|
</button>
|
|
@@ -101,18 +101,18 @@ export function TemplatePicker({ onSelect, onClose }: TemplatePickerProps) {
|
|
|
101
101
|
aria-label="Choose a template"
|
|
102
102
|
>
|
|
103
103
|
<div
|
|
104
|
-
className="
|
|
104
|
+
className="motion-safe:animate-in motion-safe:fade-in-0 absolute inset-0 bg-black/50"
|
|
105
105
|
onClick={onClose}
|
|
106
106
|
aria-hidden="true"
|
|
107
107
|
/>
|
|
108
108
|
|
|
109
|
-
<div className="relative z-10
|
|
109
|
+
<div className="bg-card border-border relative z-10 flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border shadow-2xl">
|
|
110
110
|
<div className="flex items-center justify-between px-5 pt-5 pb-3">
|
|
111
|
-
<h2 className="text-lg font-medium
|
|
111
|
+
<h2 className="text-foreground text-lg font-medium">Choose a Template</h2>
|
|
112
112
|
<button
|
|
113
113
|
type="button"
|
|
114
114
|
onClick={onClose}
|
|
115
|
-
className="
|
|
115
|
+
className="text-muted-foreground hover:text-foreground hover:bg-accent rounded-md p-1.5 transition-colors"
|
|
116
116
|
aria-label="Close"
|
|
117
117
|
>
|
|
118
118
|
<X size={18} />
|
|
@@ -122,18 +122,18 @@ export function TemplatePicker({ onSelect, onClose }: TemplatePickerProps) {
|
|
|
122
122
|
<div className="flex-1 overflow-y-auto px-5 pb-5">
|
|
123
123
|
{loading && (
|
|
124
124
|
<div className="flex items-center justify-center py-16">
|
|
125
|
-
<Loader2 className="
|
|
125
|
+
<Loader2 className="text-muted-foreground h-6 w-6 animate-spin" />
|
|
126
126
|
</div>
|
|
127
127
|
)}
|
|
128
128
|
|
|
129
129
|
{error && !loading && (
|
|
130
130
|
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
131
131
|
<AlertTriangle size={24} className="text-destructive mb-2" />
|
|
132
|
-
<p className="text-
|
|
132
|
+
<p className="text-muted-foreground mb-3 text-sm">{error}</p>
|
|
133
133
|
<button
|
|
134
134
|
type="button"
|
|
135
135
|
onClick={fetchTemplates}
|
|
136
|
-
className="px-3 py-1.5 text-sm font-medium
|
|
136
|
+
className="text-foreground border-border hover:bg-accent rounded-md border px-3 py-1.5 text-sm font-medium transition-colors"
|
|
137
137
|
>
|
|
138
138
|
Retry
|
|
139
139
|
</button>
|
|
@@ -142,7 +142,7 @@ export function TemplatePicker({ onSelect, onClose }: TemplatePickerProps) {
|
|
|
142
142
|
|
|
143
143
|
{!loading && !error && (
|
|
144
144
|
<div
|
|
145
|
-
className="grid grid-cols-2 md:grid-cols-3
|
|
145
|
+
className="grid grid-cols-2 gap-3 md:grid-cols-3"
|
|
146
146
|
role="list"
|
|
147
147
|
aria-label="Available templates"
|
|
148
148
|
>
|
|
@@ -150,13 +150,13 @@ export function TemplatePicker({ onSelect, onClose }: TemplatePickerProps) {
|
|
|
150
150
|
type="button"
|
|
151
151
|
role="listitem"
|
|
152
152
|
onClick={handleBlankPage}
|
|
153
|
-
className="
|
|
153
|
+
className="border-border hover:border-primary bg-card group focus:ring-ring flex cursor-pointer flex-col items-center gap-2 rounded-lg border p-4 text-left transition-colors focus:ring-2 focus:outline-none"
|
|
154
154
|
>
|
|
155
|
-
<div className="
|
|
155
|
+
<div className="bg-muted text-muted-foreground group-hover:bg-primary/10 group-hover:text-primary flex h-10 w-10 items-center justify-center rounded-md transition-colors">
|
|
156
156
|
<File size={20} />
|
|
157
157
|
</div>
|
|
158
|
-
<p className="text-
|
|
159
|
-
<p className="text-
|
|
158
|
+
<p className="text-foreground text-center text-sm font-medium">Blank Page</p>
|
|
159
|
+
<p className="text-muted-foreground text-center text-xs">Start from scratch</p>
|
|
160
160
|
</button>
|
|
161
161
|
|
|
162
162
|
{templates.map((template) => {
|
|
@@ -169,20 +169,20 @@ export function TemplatePicker({ onSelect, onClose }: TemplatePickerProps) {
|
|
|
169
169
|
type="button"
|
|
170
170
|
role="listitem"
|
|
171
171
|
onClick={() => handleTemplateSelect(template)}
|
|
172
|
-
className="
|
|
172
|
+
className="border-border hover:border-primary bg-card group focus:ring-ring flex cursor-pointer flex-col items-center gap-2 rounded-lg border p-4 text-left transition-colors focus:ring-2 focus:outline-none"
|
|
173
173
|
>
|
|
174
|
-
<div className="
|
|
174
|
+
<div className="bg-accent text-foreground group-hover:bg-primary/10 group-hover:text-primary flex h-10 w-10 items-center justify-center rounded-md transition-colors">
|
|
175
175
|
<Icon size={20} />
|
|
176
176
|
</div>
|
|
177
|
-
<p className="text-
|
|
177
|
+
<p className="text-foreground w-full truncate text-center text-sm font-medium">
|
|
178
178
|
{template.name}
|
|
179
179
|
</p>
|
|
180
180
|
{template.description && (
|
|
181
|
-
<p className="text-
|
|
181
|
+
<p className="text-muted-foreground line-clamp-2 text-center text-xs">
|
|
182
182
|
{template.description}
|
|
183
183
|
</p>
|
|
184
184
|
)}
|
|
185
|
-
<span className={`inline-block
|
|
185
|
+
<span className={`inline-block rounded-full px-2 py-0.5 text-xs ${badgeColor}`}>
|
|
186
186
|
{template.category}
|
|
187
187
|
</span>
|
|
188
188
|
</button>
|
|
@@ -8,19 +8,19 @@ export function CTAPreview({ data, variant = 'banner' }: BlockPreviewProps) {
|
|
|
8
8
|
const buttonText = (data.buttonText as string) || ''
|
|
9
9
|
|
|
10
10
|
const button = (
|
|
11
|
-
<span className="inline-block rounded-md
|
|
11
|
+
<span className="bg-primary text-primary-foreground inline-block rounded-md px-4 py-2 text-sm">
|
|
12
12
|
{buttonText || 'Click Here'}
|
|
13
13
|
</span>
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
if (variant === 'inline') {
|
|
17
17
|
return (
|
|
18
|
-
<div className="flex items-center justify-between gap-4 rounded-md border
|
|
18
|
+
<div className="border-border flex items-center justify-between gap-4 rounded-md border p-4">
|
|
19
19
|
<div className="flex-1">
|
|
20
|
-
<p className="text-sm font-medium
|
|
20
|
+
<p className="text-foreground text-sm font-medium">
|
|
21
21
|
{heading || <span className="text-muted-foreground">CTA Heading</span>}
|
|
22
22
|
</p>
|
|
23
|
-
{body && <p className="mt-1 text-xs
|
|
23
|
+
{body && <p className="text-muted-foreground mt-1 text-xs">{body}</p>}
|
|
24
24
|
</div>
|
|
25
25
|
{button}
|
|
26
26
|
</div>
|
|
@@ -29,13 +29,13 @@ export function CTAPreview({ data, variant = 'banner' }: BlockPreviewProps) {
|
|
|
29
29
|
|
|
30
30
|
if (variant === 'floating') {
|
|
31
31
|
return (
|
|
32
|
-
<div className="mx-auto max-w-md rounded-lg border
|
|
32
|
+
<div className="border-border bg-card mx-auto max-w-md rounded-lg border p-6 shadow-md">
|
|
33
33
|
<div className="text-center">
|
|
34
|
-
<h3 className="text-lg font-medium
|
|
34
|
+
<h3 className="text-foreground text-lg font-medium">
|
|
35
35
|
{heading || <span className="text-muted-foreground">CTA Heading</span>}
|
|
36
36
|
</h3>
|
|
37
37
|
{(body || !heading) && (
|
|
38
|
-
<p className="mt-2 text-sm
|
|
38
|
+
<p className="text-muted-foreground mt-2 text-sm">
|
|
39
39
|
{body || 'Supporting text for the call to action'}
|
|
40
40
|
</p>
|
|
41
41
|
)}
|
|
@@ -47,13 +47,13 @@ export function CTAPreview({ data, variant = 'banner' }: BlockPreviewProps) {
|
|
|
47
47
|
|
|
48
48
|
if (variant === 'split') {
|
|
49
49
|
return (
|
|
50
|
-
<div className="flex items-center gap-6 rounded-md border
|
|
50
|
+
<div className="border-border flex items-center gap-6 rounded-md border p-6">
|
|
51
51
|
<div className="flex-1">
|
|
52
|
-
<h3 className="text-lg font-medium
|
|
52
|
+
<h3 className="text-foreground text-lg font-medium">
|
|
53
53
|
{heading || <span className="text-muted-foreground">CTA Heading</span>}
|
|
54
54
|
</h3>
|
|
55
55
|
{(body || !heading) && (
|
|
56
|
-
<p className="mt-2 text-sm
|
|
56
|
+
<p className="text-muted-foreground mt-2 text-sm">
|
|
57
57
|
{body || 'Supporting text for the call to action'}
|
|
58
58
|
</p>
|
|
59
59
|
)}
|
|
@@ -64,12 +64,12 @@ export function CTAPreview({ data, variant = 'banner' }: BlockPreviewProps) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<div className="
|
|
68
|
-
<h3 className="text-lg font-medium
|
|
67
|
+
<div className="border-border bg-accent rounded-md border p-6 text-center">
|
|
68
|
+
<h3 className="text-foreground text-lg font-medium">
|
|
69
69
|
{heading || <span className="text-muted-foreground">CTA Heading</span>}
|
|
70
70
|
</h3>
|
|
71
71
|
{(body || !heading) && (
|
|
72
|
-
<p className="mt-2 text-sm
|
|
72
|
+
<p className="text-muted-foreground mt-2 text-sm">
|
|
73
73
|
{body || 'Supporting text for the call to action'}
|
|
74
74
|
</p>
|
|
75
75
|
)}
|
|
@@ -33,14 +33,14 @@ export function CardsPreview({ data, variant = 'grid-3' }: BlockPreviewProps) {
|
|
|
33
33
|
: 'grid grid-cols-3 gap-3'
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<div className="rounded-md border
|
|
36
|
+
<div className="border-border rounded-md border p-4">
|
|
37
37
|
<div className={gridClass}>
|
|
38
38
|
{placeholderItems.map((item, i) => (
|
|
39
39
|
<div
|
|
40
40
|
key={i}
|
|
41
|
-
className={`flex flex-col overflow-hidden rounded-md border
|
|
41
|
+
className={`border-border bg-card flex flex-col overflow-hidden rounded-md border ${variant === 'horizontal' ? 'min-w-40' : ''}`}
|
|
42
42
|
>
|
|
43
|
-
<div className="flex h-20 items-center justify-center
|
|
43
|
+
<div className="bg-muted flex h-20 items-center justify-center">
|
|
44
44
|
{item.image ? (
|
|
45
45
|
<img
|
|
46
46
|
src={item.image}
|
|
@@ -52,11 +52,11 @@ export function CardsPreview({ data, variant = 'grid-3' }: BlockPreviewProps) {
|
|
|
52
52
|
)}
|
|
53
53
|
</div>
|
|
54
54
|
<div className="p-3">
|
|
55
|
-
<p className="text-sm font-medium
|
|
55
|
+
<p className="text-foreground text-sm font-medium">
|
|
56
56
|
{item.title || <span className="text-muted-foreground">Card Title</span>}
|
|
57
57
|
</p>
|
|
58
58
|
{item.description && (
|
|
59
|
-
<p className="
|
|
59
|
+
<p className="text-muted-foreground mt-1 line-clamp-2 text-xs">
|
|
60
60
|
{item.description}
|
|
61
61
|
</p>
|
|
62
62
|
)}
|
|
@@ -20,23 +20,23 @@ export function CodePreview({ data, variant = 'embed' }: BlockPreviewProps) {
|
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
<div className="overflow-hidden rounded-md border
|
|
24
|
-
<div className="flex items-center gap-2 border-b
|
|
23
|
+
<div className="border-border overflow-hidden rounded-md border">
|
|
24
|
+
<div className="border-border bg-card flex items-center gap-2 border-b px-3 py-2">
|
|
25
25
|
{icon}
|
|
26
|
-
<span className="text-
|
|
26
|
+
<span className="text-muted-foreground text-xs">{language || variant}</span>
|
|
27
27
|
{sandboxed && (
|
|
28
|
-
<span className="ml-auto rounded
|
|
28
|
+
<span className="bg-muted text-muted-foreground ml-auto rounded px-1.5 py-0.5 text-xs">
|
|
29
29
|
sandboxed
|
|
30
30
|
</span>
|
|
31
31
|
)}
|
|
32
32
|
</div>
|
|
33
33
|
<div className="bg-card p-4">
|
|
34
34
|
{truncated ? (
|
|
35
|
-
<pre className="overflow-hidden
|
|
35
|
+
<pre className="text-foreground overflow-hidden font-mono text-xs whitespace-pre-wrap">
|
|
36
36
|
{truncated}
|
|
37
37
|
</pre>
|
|
38
38
|
) : (
|
|
39
|
-
<p className="font-mono text-xs
|
|
39
|
+
<p className="text-muted-foreground font-mono text-xs italic">
|
|
40
40
|
// Code content goes here…
|
|
41
41
|
</p>
|
|
42
42
|
)}
|
|
@@ -29,16 +29,16 @@ export function FAQPreview({ data, variant = 'accordion' }: BlockPreviewProps) {
|
|
|
29
29
|
const col2 = placeholderItems.slice(mid)
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<div className="rounded-md border
|
|
32
|
+
<div className="border-border rounded-md border p-4">
|
|
33
33
|
<div className="grid grid-cols-2 gap-4">
|
|
34
34
|
{[col1, col2].map((column, colIdx) => (
|
|
35
35
|
<div key={colIdx} className="flex flex-col gap-3">
|
|
36
36
|
{column.map((item, i) => (
|
|
37
|
-
<div key={i} className="rounded-md border
|
|
38
|
-
<p className="text-sm font-medium
|
|
37
|
+
<div key={i} className="border-border rounded-md border p-3">
|
|
38
|
+
<p className="text-foreground text-sm font-medium">
|
|
39
39
|
{item.question || 'Question?'}
|
|
40
40
|
</p>
|
|
41
|
-
<p className="
|
|
41
|
+
<p className="text-muted-foreground mt-1 line-clamp-2 text-xs">
|
|
42
42
|
{item.answer || 'Answer text…'}
|
|
43
43
|
</p>
|
|
44
44
|
</div>
|
|
@@ -52,12 +52,12 @@ export function FAQPreview({ data, variant = 'accordion' }: BlockPreviewProps) {
|
|
|
52
52
|
|
|
53
53
|
if (variant === 'list') {
|
|
54
54
|
return (
|
|
55
|
-
<div className="rounded-md border
|
|
55
|
+
<div className="border-border rounded-md border p-4">
|
|
56
56
|
<div className="flex flex-col gap-3">
|
|
57
57
|
{placeholderItems.map((item, i) => (
|
|
58
|
-
<div key={i} className="border-
|
|
59
|
-
<p className="text-sm font-medium
|
|
60
|
-
<p className="
|
|
58
|
+
<div key={i} className="border-border border-b pb-3 last:border-b-0 last:pb-0">
|
|
59
|
+
<p className="text-foreground text-sm font-medium">{item.question || 'Question?'}</p>
|
|
60
|
+
<p className="text-muted-foreground mt-1 line-clamp-2 text-xs">
|
|
61
61
|
{item.answer || 'Answer text…'}
|
|
62
62
|
</p>
|
|
63
63
|
</div>
|
|
@@ -68,16 +68,16 @@ export function FAQPreview({ data, variant = 'accordion' }: BlockPreviewProps) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
|
-
<div className="rounded-md border
|
|
71
|
+
<div className="border-border rounded-md border p-4">
|
|
72
72
|
<div className="flex flex-col gap-2">
|
|
73
73
|
{placeholderItems.map((item, i) => (
|
|
74
|
-
<div key={i} className="rounded-md border
|
|
74
|
+
<div key={i} className="border-border rounded-md border p-3">
|
|
75
75
|
<div className="flex items-center justify-between">
|
|
76
|
-
<p className="text-sm font-medium
|
|
77
|
-
<ChevronDown size={14} className="
|
|
76
|
+
<p className="text-foreground text-sm font-medium">{item.question || 'Question?'}</p>
|
|
77
|
+
<ChevronDown size={14} className="text-muted-foreground shrink-0" />
|
|
78
78
|
</div>
|
|
79
79
|
{i === 0 && (
|
|
80
|
-
<p className="mt-2 text-xs
|
|
80
|
+
<p className="text-muted-foreground mt-2 text-xs">{item.answer || 'Answer text…'}</p>
|
|
81
81
|
)}
|
|
82
82
|
</div>
|
|
83
83
|
))}
|
|
@@ -9,10 +9,10 @@ export interface FallbackPreviewProps {
|
|
|
9
9
|
|
|
10
10
|
export function FallbackPreview({ blockType }: FallbackPreviewProps) {
|
|
11
11
|
return (
|
|
12
|
-
<div className="flex flex-col items-center justify-center gap-2 rounded-md border border-dashed
|
|
12
|
+
<div className="border-border bg-muted/50 flex flex-col items-center justify-center gap-2 rounded-md border border-dashed p-8">
|
|
13
13
|
<Box size={24} className="text-muted-foreground" />
|
|
14
|
-
<p className="text-sm font-medium
|
|
15
|
-
<p className="text-
|
|
14
|
+
<p className="text-muted-foreground text-sm font-medium">{blockType}</p>
|
|
15
|
+
<p className="text-muted-foreground text-xs">No preview available</p>
|
|
16
16
|
</div>
|
|
17
17
|
)
|
|
18
18
|
}
|