@startsimpli/ui 0.4.6 → 0.4.8
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/package.json +2 -1
- package/src/__mocks__/next/link.js +11 -0
- package/src/components/ActivityTimeline.tsx +173 -0
- package/src/components/LogActivityDialog.tsx +303 -0
- package/src/components/QuickLogButtons.tsx +32 -0
- package/src/components/account/__tests__/account.test.tsx +315 -0
- package/src/components/badge/StageBadge.tsx +31 -0
- package/src/components/badge/index.ts +3 -0
- package/src/components/command-palette/CommandGroup.tsx +23 -0
- package/src/components/command-palette/CommandPalette.tsx +327 -0
- package/src/components/command-palette/CommandResultItem.tsx +59 -0
- package/src/components/command-palette/__tests__/CommandGroup.test.tsx +81 -0
- package/src/components/command-palette/__tests__/CommandResultItem.test.tsx +166 -0
- package/src/components/command-palette/__tests__/command-palette-context.test.tsx +166 -0
- package/src/components/command-palette/__tests__/useCommandPaletteSearch.test.ts +271 -0
- package/src/components/command-palette/command-palette-context.tsx +51 -0
- package/src/components/command-palette/index.ts +9 -0
- package/src/components/command-palette/useCommandPaletteSearch.ts +114 -0
- package/src/components/compose/__tests__/compose.test.tsx +656 -0
- package/src/components/compose/compose-header.tsx +72 -0
- package/src/components/compose/compose-loading.tsx +13 -0
- package/src/components/compose/index.ts +6 -0
- package/src/components/compose/save-status-indicator.tsx +57 -0
- package/src/components/compose/send-confirmation-dialog.tsx +87 -0
- package/src/components/compose/subject-input.tsx +25 -0
- package/src/components/compose/useAutoSave.ts +93 -0
- package/src/components/dashboard/DashboardGrid.tsx +32 -0
- package/src/components/dashboard/DashboardSection.tsx +32 -0
- package/src/components/dashboard/MetricCard.tsx +129 -0
- package/src/components/dashboard/PeriodSelector.tsx +55 -0
- package/src/components/dashboard/PipelineFunnel.tsx +126 -0
- package/src/components/dashboard/SparklineTrend.tsx +102 -0
- package/src/components/dashboard/TopCampaigns.tsx +132 -0
- package/src/components/dashboard/__tests__/dashboard.test.tsx +785 -0
- package/src/components/dashboard/index.ts +20 -0
- package/src/components/dialog/ConfirmDialog.tsx +72 -0
- package/src/components/dialog/__tests__/ConfirmDialog.test.tsx +126 -0
- package/src/components/dialog/index.ts +3 -0
- package/src/components/email-dialogs/__tests__/email-dialogs.test.tsx +982 -0
- package/src/components/email-dialogs/index.ts +14 -0
- package/src/components/email-dialogs/merge-fields.tsx +196 -0
- package/src/components/email-dialogs/preview-dialog.tsx +194 -0
- package/src/components/email-dialogs/schedule-dialog.tsx +297 -0
- package/src/components/email-dialogs/template-picker.tsx +225 -0
- package/src/components/email-dialogs/test-send-dialog.tsx +188 -0
- package/src/components/email-editor/BlockRenderer.tsx +120 -0
- package/src/components/email-editor/__tests__/BlockRenderer.test.tsx +332 -0
- package/src/components/email-editor/__tests__/block-renderers.test.ts +624 -0
- package/src/components/email-editor/__tests__/email-html-renderer.test.ts +376 -0
- package/src/components/email-editor/add-block-menu.tsx +151 -0
- package/src/components/email-editor/block-toolbar.tsx +73 -0
- package/src/components/email-editor/blocks/__tests__/blocks.test.tsx +818 -0
- package/src/components/email-editor/blocks/button-block.tsx +44 -0
- package/src/components/email-editor/blocks/divider-block.tsx +43 -0
- package/src/components/email-editor/blocks/footer-block.tsx +39 -0
- package/src/components/email-editor/blocks/header-block.tsx +39 -0
- package/src/components/email-editor/blocks/image-block.tsx +61 -0
- package/src/components/email-editor/blocks/index.ts +9 -0
- package/src/components/email-editor/blocks/metrics-block.tsx +198 -0
- package/src/components/email-editor/blocks/social-block.tsx +75 -0
- package/src/components/email-editor/blocks/spacer-block.tsx +26 -0
- package/src/components/email-editor/blocks/text-block.tsx +75 -0
- package/src/components/email-editor/editor-sidebar.tsx +66 -0
- package/src/components/email-editor/email-editor.tsx +497 -0
- package/src/components/email-editor/hooks/__tests__/useDragDrop.test.ts +355 -0
- package/src/components/email-editor/hooks/__tests__/useEmailEditorState.test.ts +551 -0
- package/src/components/email-editor/hooks/useDragDrop.ts +181 -0
- package/src/components/email-editor/hooks/useEmailEditorState.ts +426 -0
- package/src/components/email-editor/index.ts +51 -0
- package/src/components/email-editor/panels/BlockPropertyPanel.tsx +637 -0
- package/src/components/email-editor/panels/GlobalStylesPanel.tsx +108 -0
- package/src/components/email-editor/panels/SectionSettingsPanel.tsx +80 -0
- package/src/components/email-editor/panels/__tests__/BlockPropertyPanel.test.tsx +707 -0
- package/src/components/email-editor/panels/__tests__/GlobalStylesPanel.test.tsx +226 -0
- package/src/components/email-editor/panels/index.ts +3 -0
- package/src/components/email-editor/renderer/block-renderers.ts +209 -0
- package/src/components/email-editor/renderer/email-html-renderer.ts +128 -0
- package/src/components/email-editor/types.ts +413 -0
- package/src/components/email-editor/utils/defaults.ts +116 -0
- package/src/components/email-editor/utils/undo-redo.ts +59 -0
- package/src/components/enrichment/EnrichButton.tsx +33 -0
- package/src/components/enrichment/EnrichmentProgress.tsx +66 -0
- package/src/components/enrichment/QualityBadge.tsx +43 -0
- package/src/components/enrichment/__tests__/enrichment.test.tsx +184 -0
- package/src/components/enrichment/index.ts +8 -0
- package/src/components/gantt/GanttBoardView.tsx +71 -0
- package/src/components/gantt/GanttChart.tsx +140 -887
- package/src/components/gantt/GanttFilterBar.tsx +100 -0
- package/src/components/gantt/GanttListView.tsx +63 -0
- package/src/components/gantt/GanttTimelineView.tsx +215 -0
- package/src/components/gantt/__tests__/GanttBoardView.test.tsx +305 -0
- package/src/components/gantt/__tests__/GanttFilterBar.test.tsx +544 -0
- package/src/components/gantt/__tests__/GanttListView.test.tsx +337 -0
- package/src/components/gantt/__tests__/GanttTimelineView.test.tsx +375 -0
- package/src/components/gantt/__tests__/gantt-utils.test.ts +341 -0
- package/src/components/gantt/__tests__/useGanttState.test.ts +535 -0
- package/src/components/gantt/hooks/useGanttState.ts +644 -0
- package/src/components/gantt/index.ts +10 -0
- package/src/components/gantt/types.ts +5 -5
- package/src/components/index.ts +46 -0
- package/src/components/integrations/ConnectionStatus.tsx +77 -0
- package/src/components/integrations/IntegrationCard.tsx +92 -0
- package/src/components/integrations/__tests__/integrations.test.tsx +191 -0
- package/src/components/integrations/index.ts +5 -0
- package/src/components/kanban/KanbanBoard.tsx +103 -0
- package/src/components/kanban/__tests__/kanban.test.tsx +157 -0
- package/src/components/kanban/index.ts +2 -0
- package/src/components/lists/CreateListDialog.tsx +158 -0
- package/src/components/lists/ListCard.tsx +77 -0
- package/src/components/lists/__tests__/lists.test.tsx +263 -0
- package/src/components/lists/index.ts +5 -0
- package/src/components/loading/__tests__/loading.test.tsx +114 -0
- package/src/components/navigation/__tests__/navigation.test.tsx +194 -0
- package/src/components/pipeline/StageTransitionModal.tsx +146 -0
- package/src/components/pipeline/__tests__/pipeline.test.tsx +169 -0
- package/src/components/pipeline/index.ts +2 -0
- package/src/components/settings/SettingsCard.tsx +33 -0
- package/src/components/settings/SettingsLayout.tsx +28 -0
- package/src/components/settings/SettingsNav.tsx +42 -0
- package/src/components/settings/__tests__/settings.test.tsx +181 -0
- package/src/components/settings/index.ts +6 -0
- package/src/components/wizard/__tests__/wizard.test.tsx +97 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { GlobalStyles } from '../types'
|
|
4
|
+
import { Input } from '../../ui/input'
|
|
5
|
+
import { Label } from '../../ui/label'
|
|
6
|
+
import {
|
|
7
|
+
Select,
|
|
8
|
+
SelectContent,
|
|
9
|
+
SelectItem,
|
|
10
|
+
SelectTrigger,
|
|
11
|
+
SelectValue,
|
|
12
|
+
} from '../../ui/select'
|
|
13
|
+
import { THEME_PRESETS } from '../utils/defaults'
|
|
14
|
+
import { cn } from '../../../lib/utils'
|
|
15
|
+
|
|
16
|
+
interface GlobalStylesPanelProps {
|
|
17
|
+
globalStyles: GlobalStyles
|
|
18
|
+
onChange: (styles: GlobalStyles) => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function GlobalStylesPanel({ globalStyles, onChange }: GlobalStylesPanelProps) {
|
|
22
|
+
return (
|
|
23
|
+
<div className="space-y-4">
|
|
24
|
+
<div className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
|
|
25
|
+
Email Design
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div className="space-y-1">
|
|
29
|
+
<Label className="text-xs">Background Color</Label>
|
|
30
|
+
<div className="flex gap-2">
|
|
31
|
+
<input
|
|
32
|
+
type="color"
|
|
33
|
+
value={globalStyles.backgroundColor}
|
|
34
|
+
onChange={(e) => onChange({ ...globalStyles, backgroundColor: e.target.value })}
|
|
35
|
+
className="h-8 w-8 rounded border cursor-pointer"
|
|
36
|
+
/>
|
|
37
|
+
<Input
|
|
38
|
+
value={globalStyles.backgroundColor}
|
|
39
|
+
onChange={(e) => onChange({ ...globalStyles, backgroundColor: e.target.value })}
|
|
40
|
+
className="h-8 text-xs"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div className="space-y-1">
|
|
46
|
+
<Label className="text-xs">Content Width (px)</Label>
|
|
47
|
+
<Input
|
|
48
|
+
type="number"
|
|
49
|
+
value={globalStyles.contentWidth}
|
|
50
|
+
onChange={(e) =>
|
|
51
|
+
onChange({ ...globalStyles, contentWidth: parseInt(e.target.value) || 600 })
|
|
52
|
+
}
|
|
53
|
+
className="h-8 text-xs"
|
|
54
|
+
min={400}
|
|
55
|
+
max={800}
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div className="space-y-1">
|
|
60
|
+
<Label className="text-xs">Font Family</Label>
|
|
61
|
+
<Select
|
|
62
|
+
value={globalStyles.fontFamily}
|
|
63
|
+
onValueChange={(v) => onChange({ ...globalStyles, fontFamily: v })}
|
|
64
|
+
>
|
|
65
|
+
<SelectTrigger className="h-8 text-xs">
|
|
66
|
+
<SelectValue />
|
|
67
|
+
</SelectTrigger>
|
|
68
|
+
<SelectContent>
|
|
69
|
+
<SelectItem value='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'>
|
|
70
|
+
System (Default)
|
|
71
|
+
</SelectItem>
|
|
72
|
+
<SelectItem value="Arial, sans-serif">Arial</SelectItem>
|
|
73
|
+
<SelectItem value="Georgia, serif">Georgia</SelectItem>
|
|
74
|
+
<SelectItem value="Verdana, sans-serif">Verdana</SelectItem>
|
|
75
|
+
<SelectItem value="'Trebuchet MS', sans-serif">Trebuchet MS</SelectItem>
|
|
76
|
+
</SelectContent>
|
|
77
|
+
</Select>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div className="border-t pt-4 space-y-2">
|
|
81
|
+
<div className="text-xs font-medium text-muted-foreground">Themes</div>
|
|
82
|
+
<div className="grid gap-2">
|
|
83
|
+
{THEME_PRESETS.map((preset) => (
|
|
84
|
+
<button
|
|
85
|
+
key={preset.id}
|
|
86
|
+
onClick={() => onChange(preset.globalStyles)}
|
|
87
|
+
className={cn(
|
|
88
|
+
'flex items-center gap-3 p-2 rounded border text-left text-xs transition-colors',
|
|
89
|
+
globalStyles.theme === preset.id
|
|
90
|
+
? 'border-primary bg-primary/5'
|
|
91
|
+
: 'border-border hover:bg-muted'
|
|
92
|
+
)}
|
|
93
|
+
>
|
|
94
|
+
<div
|
|
95
|
+
className="h-6 w-6 rounded border"
|
|
96
|
+
style={{ backgroundColor: preset.globalStyles.backgroundColor }}
|
|
97
|
+
/>
|
|
98
|
+
<div>
|
|
99
|
+
<div className="font-medium">{preset.name}</div>
|
|
100
|
+
<div className="text-muted-foreground">{preset.description}</div>
|
|
101
|
+
</div>
|
|
102
|
+
</button>
|
|
103
|
+
))}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Section } from '../types'
|
|
4
|
+
import { Input } from '../../ui/input'
|
|
5
|
+
import { Label } from '../../ui/label'
|
|
6
|
+
|
|
7
|
+
interface SectionSettingsPanelProps {
|
|
8
|
+
section: Section
|
|
9
|
+
onChange: (section: Section) => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function SectionSettingsPanel({ section, onChange }: SectionSettingsPanelProps) {
|
|
13
|
+
return (
|
|
14
|
+
<div className="space-y-4">
|
|
15
|
+
<div className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
|
|
16
|
+
Section Settings
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div className="space-y-1">
|
|
20
|
+
<Label className="text-xs">Background Color</Label>
|
|
21
|
+
<div className="flex gap-2">
|
|
22
|
+
<input
|
|
23
|
+
type="color"
|
|
24
|
+
value={section.backgroundColor || '#ffffff'}
|
|
25
|
+
onChange={(e) => onChange({ ...section, backgroundColor: e.target.value })}
|
|
26
|
+
className="h-8 w-8 rounded border cursor-pointer"
|
|
27
|
+
/>
|
|
28
|
+
<Input
|
|
29
|
+
value={section.backgroundColor || ''}
|
|
30
|
+
onChange={(e) => onChange({ ...section, backgroundColor: e.target.value })}
|
|
31
|
+
placeholder="transparent"
|
|
32
|
+
className="h-8 text-xs"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div className="space-y-3">
|
|
38
|
+
<div className="text-xs font-medium text-muted-foreground">Padding</div>
|
|
39
|
+
<div className="grid grid-cols-2 gap-2">
|
|
40
|
+
<div className="space-y-1">
|
|
41
|
+
<Label className="text-xs">Top</Label>
|
|
42
|
+
<Input
|
|
43
|
+
type="number"
|
|
44
|
+
value={section.paddingTop ?? 16}
|
|
45
|
+
onChange={(e) => onChange({ ...section, paddingTop: parseInt(e.target.value) || 0 })}
|
|
46
|
+
className="h-8 text-xs"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<div className="space-y-1">
|
|
50
|
+
<Label className="text-xs">Bottom</Label>
|
|
51
|
+
<Input
|
|
52
|
+
type="number"
|
|
53
|
+
value={section.paddingBottom ?? 16}
|
|
54
|
+
onChange={(e) => onChange({ ...section, paddingBottom: parseInt(e.target.value) || 0 })}
|
|
55
|
+
className="h-8 text-xs"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
<div className="space-y-1">
|
|
59
|
+
<Label className="text-xs">Left</Label>
|
|
60
|
+
<Input
|
|
61
|
+
type="number"
|
|
62
|
+
value={section.paddingLeft ?? 0}
|
|
63
|
+
onChange={(e) => onChange({ ...section, paddingLeft: parseInt(e.target.value) || 0 })}
|
|
64
|
+
className="h-8 text-xs"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
<div className="space-y-1">
|
|
68
|
+
<Label className="text-xs">Right</Label>
|
|
69
|
+
<Input
|
|
70
|
+
type="number"
|
|
71
|
+
value={section.paddingRight ?? 0}
|
|
72
|
+
onChange={(e) => onChange({ ...section, paddingRight: parseInt(e.target.value) || 0 })}
|
|
73
|
+
className="h-8 text-xs"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|