@startsimpli/ui 0.4.7 → 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.
Files changed (61) hide show
  1. package/package.json +1 -1
  2. package/src/__mocks__/next/link.js +11 -0
  3. package/src/components/account/__tests__/account.test.tsx +315 -0
  4. package/src/components/command-palette/CommandGroup.tsx +23 -0
  5. package/src/components/command-palette/CommandPalette.tsx +183 -200
  6. package/src/components/command-palette/CommandResultItem.tsx +59 -0
  7. package/src/components/command-palette/__tests__/CommandGroup.test.tsx +81 -0
  8. package/src/components/command-palette/__tests__/CommandResultItem.test.tsx +166 -0
  9. package/src/components/command-palette/__tests__/command-palette-context.test.tsx +166 -0
  10. package/src/components/command-palette/__tests__/useCommandPaletteSearch.test.ts +271 -0
  11. package/src/components/command-palette/index.ts +6 -0
  12. package/src/components/command-palette/useCommandPaletteSearch.ts +114 -0
  13. package/src/components/compose/__tests__/compose.test.tsx +656 -0
  14. package/src/components/dashboard/PipelineFunnel.tsx +126 -0
  15. package/src/components/dashboard/TopCampaigns.tsx +132 -0
  16. package/src/components/dashboard/__tests__/dashboard.test.tsx +785 -0
  17. package/src/components/dashboard/index.ts +6 -0
  18. package/src/components/dialog/ConfirmDialog.tsx +72 -0
  19. package/src/components/dialog/__tests__/ConfirmDialog.test.tsx +126 -0
  20. package/src/components/dialog/index.ts +3 -0
  21. package/src/components/email-dialogs/__tests__/email-dialogs.test.tsx +982 -0
  22. package/src/components/email-editor/BlockRenderer.tsx +120 -0
  23. package/src/components/email-editor/__tests__/BlockRenderer.test.tsx +332 -0
  24. package/src/components/email-editor/__tests__/block-renderers.test.ts +624 -0
  25. package/src/components/email-editor/__tests__/email-html-renderer.test.ts +376 -0
  26. package/src/components/email-editor/blocks/__tests__/blocks.test.tsx +818 -0
  27. package/src/components/email-editor/editor-sidebar.tsx +6 -731
  28. package/src/components/email-editor/email-editor.tsx +78 -467
  29. package/src/components/email-editor/hooks/__tests__/useDragDrop.test.ts +355 -0
  30. package/src/components/email-editor/hooks/__tests__/useEmailEditorState.test.ts +551 -0
  31. package/src/components/email-editor/hooks/useDragDrop.ts +181 -0
  32. package/src/components/email-editor/hooks/useEmailEditorState.ts +426 -0
  33. package/src/components/email-editor/index.ts +1 -0
  34. package/src/components/email-editor/panels/BlockPropertyPanel.tsx +637 -0
  35. package/src/components/email-editor/panels/GlobalStylesPanel.tsx +108 -0
  36. package/src/components/email-editor/panels/SectionSettingsPanel.tsx +80 -0
  37. package/src/components/email-editor/panels/__tests__/BlockPropertyPanel.test.tsx +707 -0
  38. package/src/components/email-editor/panels/__tests__/GlobalStylesPanel.test.tsx +226 -0
  39. package/src/components/email-editor/panels/index.ts +3 -0
  40. package/src/components/enrichment/__tests__/enrichment.test.tsx +184 -0
  41. package/src/components/gantt/GanttBoardView.tsx +71 -0
  42. package/src/components/gantt/GanttChart.tsx +134 -881
  43. package/src/components/gantt/GanttFilterBar.tsx +100 -0
  44. package/src/components/gantt/GanttListView.tsx +63 -0
  45. package/src/components/gantt/GanttTimelineView.tsx +215 -0
  46. package/src/components/gantt/__tests__/GanttBoardView.test.tsx +305 -0
  47. package/src/components/gantt/__tests__/GanttFilterBar.test.tsx +544 -0
  48. package/src/components/gantt/__tests__/GanttListView.test.tsx +337 -0
  49. package/src/components/gantt/__tests__/GanttTimelineView.test.tsx +375 -0
  50. package/src/components/gantt/__tests__/gantt-utils.test.ts +341 -0
  51. package/src/components/gantt/__tests__/useGanttState.test.ts +535 -0
  52. package/src/components/gantt/hooks/useGanttState.ts +644 -0
  53. package/src/components/gantt/index.ts +10 -0
  54. package/src/components/integrations/__tests__/integrations.test.tsx +191 -0
  55. package/src/components/kanban/__tests__/kanban.test.tsx +157 -0
  56. package/src/components/lists/__tests__/lists.test.tsx +263 -0
  57. package/src/components/loading/__tests__/loading.test.tsx +114 -0
  58. package/src/components/navigation/__tests__/navigation.test.tsx +194 -0
  59. package/src/components/pipeline/__tests__/pipeline.test.tsx +169 -0
  60. package/src/components/settings/__tests__/settings.test.tsx +181 -0
  61. 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
+ }