@hed-hog/core 0.0.297 → 0.0.299

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 (183) hide show
  1. package/dist/auth/auth.controller.d.ts +10 -10
  2. package/dist/auth/auth.service.d.ts +10 -10
  3. package/dist/dashboard/dashboard/dashboard.controller.d.ts +3 -0
  4. package/dist/dashboard/dashboard/dashboard.controller.d.ts.map +1 -1
  5. package/dist/dashboard/dashboard/dashboard.service.d.ts +3 -0
  6. package/dist/dashboard/dashboard/dashboard.service.d.ts.map +1 -1
  7. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +12 -0
  8. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts.map +1 -1
  9. package/dist/dashboard/dashboard-component/dashboard-component.controller.js +22 -0
  10. package/dist/dashboard/dashboard-component/dashboard-component.controller.js.map +1 -1
  11. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +15 -0
  12. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts.map +1 -1
  13. package/dist/dashboard/dashboard-component/dashboard-component.service.js +110 -3
  14. package/dist/dashboard/dashboard-component/dashboard-component.service.js.map +1 -1
  15. package/dist/dashboard/dashboard-component/dto/create.dto.d.ts +1 -0
  16. package/dist/dashboard/dashboard-component/dto/create.dto.d.ts.map +1 -1
  17. package/dist/dashboard/dashboard-component/dto/create.dto.js +5 -0
  18. package/dist/dashboard/dashboard-component/dto/create.dto.js.map +1 -1
  19. package/dist/dashboard/dashboard-component/dto/update.dto.d.ts +1 -0
  20. package/dist/dashboard/dashboard-component/dto/update.dto.d.ts.map +1 -1
  21. package/dist/dashboard/dashboard-component/dto/update.dto.js +5 -0
  22. package/dist/dashboard/dashboard-component/dto/update.dto.js.map +1 -1
  23. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +1 -0
  24. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts.map +1 -1
  25. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +1 -0
  26. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts.map +1 -1
  27. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +21 -1
  28. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts.map +1 -1
  29. package/dist/dashboard/dashboard-core/dashboard-core.controller.js +9 -0
  30. package/dist/dashboard/dashboard-core/dashboard-core.controller.js.map +1 -1
  31. package/dist/dashboard/dashboard-core/dashboard-core.module.d.ts.map +1 -1
  32. package/dist/dashboard/dashboard-core/dashboard-core.module.js +6 -1
  33. package/dist/dashboard/dashboard-core/dashboard-core.module.js.map +1 -1
  34. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +180 -2
  35. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts.map +1 -1
  36. package/dist/dashboard/dashboard-core/dashboard-core.service.js +619 -9
  37. package/dist/dashboard/dashboard-core/dashboard-core.service.js.map +1 -1
  38. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +1 -0
  39. package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts.map +1 -1
  40. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +1 -0
  41. package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts.map +1 -1
  42. package/dist/file/file.controller.d.ts.map +1 -1
  43. package/dist/file/file.controller.js +16 -0
  44. package/dist/file/file.controller.js.map +1 -1
  45. package/dist/file/file.service.d.ts +7 -1
  46. package/dist/file/file.service.d.ts.map +1 -1
  47. package/dist/file/file.service.js +38 -1
  48. package/dist/file/file.service.js.map +1 -1
  49. package/dist/file/provider/s3.provider.d.ts +1 -0
  50. package/dist/file/provider/s3.provider.d.ts.map +1 -1
  51. package/dist/file/provider/s3.provider.js +38 -29
  52. package/dist/file/provider/s3.provider.js.map +1 -1
  53. package/dist/oauth/oauth.service.d.ts.map +1 -1
  54. package/dist/oauth/oauth.service.js +2 -1
  55. package/dist/oauth/oauth.service.js.map +1 -1
  56. package/dist/user/constants/user.constants.d.ts +1 -0
  57. package/dist/user/constants/user.constants.d.ts.map +1 -1
  58. package/dist/user/constants/user.constants.js +2 -1
  59. package/dist/user/constants/user.constants.js.map +1 -1
  60. package/dist/user/user.controller.d.ts +10 -10
  61. package/dist/user/user.service.d.ts +30 -30
  62. package/dist/user/user.service.d.ts.map +1 -1
  63. package/dist/user/user.service.js +2 -1
  64. package/dist/user/user.service.js.map +1 -1
  65. package/hedhog/data/dashboard_item.yaml +10 -10
  66. package/hedhog/data/route.yaml +20 -0
  67. package/hedhog/frontend/app/dashboard/[slug]/dashboard-content.tsx.ejs +212 -34
  68. package/hedhog/frontend/app/dashboard/[slug]/types.ts.ejs +3 -0
  69. package/hedhog/frontend/app/dashboard/[slug]/widget-renderer.tsx.ejs +136 -23
  70. package/hedhog/frontend/app/dashboard/components/add-widget-selector-dialog.tsx.ejs +266 -85
  71. package/hedhog/frontend/app/dashboard/components/widgets/core..gitkeep.ejs +11 -0
  72. package/hedhog/frontend/app/dashboard/components/widgets/core.account-security.tsx.ejs +192 -0
  73. package/hedhog/frontend/app/dashboard/components/widgets/core.email-notifications.tsx.ejs +226 -0
  74. package/hedhog/frontend/app/dashboard/components/widgets/core.locale-config.tsx.ejs +168 -0
  75. package/hedhog/frontend/app/dashboard/components/widgets/core.mail-config.tsx.ejs +199 -0
  76. package/hedhog/frontend/app/dashboard/components/widgets/core.oauth-config.tsx.ejs +175 -0
  77. package/hedhog/frontend/app/dashboard/components/widgets/core.profile-card.tsx.ejs +186 -0
  78. package/hedhog/frontend/app/dashboard/components/widgets/core.storage-config.tsx.ejs +196 -0
  79. package/hedhog/frontend/app/dashboard/components/widgets/core.theme-config.tsx.ejs +213 -0
  80. package/hedhog/frontend/app/dashboard/components/widgets/core.user-roles.tsx.ejs +132 -0
  81. package/hedhog/frontend/app/dashboard/components/widgets/core.user-sessions.tsx.ejs +236 -0
  82. package/hedhog/frontend/app/dashboard/components/widgets/finance.alerts.tsx.ejs +108 -0
  83. package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-balance-kpi.tsx.ejs +66 -0
  84. package/hedhog/frontend/app/dashboard/components/widgets/finance.cash-flow-chart.tsx.ejs +122 -0
  85. package/hedhog/frontend/app/dashboard/components/widgets/finance.default-kpi.tsx.ejs +63 -0
  86. package/hedhog/frontend/app/dashboard/components/widgets/finance.payable-30d-kpi.tsx.ejs +73 -0
  87. package/hedhog/frontend/app/dashboard/components/widgets/finance.receivable-30d-kpi.tsx.ejs +73 -0
  88. package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-payable.tsx.ejs +123 -0
  89. package/hedhog/frontend/app/dashboard/components/widgets/finance.upcoming-receivable.tsx.ejs +118 -0
  90. package/hedhog/frontend/messages/en.json +93 -0
  91. package/hedhog/frontend/messages/pt.json +93 -0
  92. package/hedhog/frontend/public/dashboard-previews/.gitkeep +12 -0
  93. package/hedhog/frontend/public/dashboard-previews/account-security.png +0 -0
  94. package/hedhog/frontend/public/dashboard-previews/active-users-card.png +0 -0
  95. package/hedhog/frontend/public/dashboard-previews/activity-timeline.png +0 -0
  96. package/hedhog/frontend/public/dashboard-previews/cash-balance-kpi.png +0 -0
  97. package/hedhog/frontend/public/dashboard-previews/cash-flow-chart.png +0 -0
  98. package/hedhog/frontend/public/dashboard-previews/default-kpi.png +0 -0
  99. package/hedhog/frontend/public/dashboard-previews/email-notifications.png +0 -0
  100. package/hedhog/frontend/public/dashboard-previews/financial-alerts.png +0 -0
  101. package/hedhog/frontend/public/dashboard-previews/login-history-chart.png +0 -0
  102. package/hedhog/frontend/public/dashboard-previews/mail-sent-card.png +0 -0
  103. package/hedhog/frontend/public/dashboard-previews/mail-sent-chart.png +0 -0
  104. package/hedhog/frontend/public/dashboard-previews/menus-card.png +0 -0
  105. package/hedhog/frontend/public/dashboard-previews/payable-30d-kpi.png +0 -0
  106. package/hedhog/frontend/public/dashboard-previews/permissions-card.png +0 -0
  107. package/hedhog/frontend/public/dashboard-previews/permissions-chart.png +0 -0
  108. package/hedhog/frontend/public/dashboard-previews/profile-card.png +0 -0
  109. package/hedhog/frontend/public/dashboard-previews/receivable-30d-kpi.png +0 -0
  110. package/hedhog/frontend/public/dashboard-previews/routes-card.png +0 -0
  111. package/hedhog/frontend/public/dashboard-previews/session-activity-chart.png +0 -0
  112. package/hedhog/frontend/public/dashboard-previews/sessions-today-card.png +0 -0
  113. package/hedhog/frontend/public/dashboard-previews/stat-access-level.png +0 -0
  114. package/hedhog/frontend/public/dashboard-previews/stat-actions-today.png +0 -0
  115. package/hedhog/frontend/public/dashboard-previews/stat-consecutive-days.png +0 -0
  116. package/hedhog/frontend/public/dashboard-previews/stat-online-time.png +0 -0
  117. package/hedhog/frontend/public/dashboard-previews/upcoming-payable.png +0 -0
  118. package/hedhog/frontend/public/dashboard-previews/upcoming-receivable.png +0 -0
  119. package/hedhog/frontend/public/dashboard-previews/user-growth-chart.png +0 -0
  120. package/hedhog/frontend/public/dashboard-previews/user-roles.png +0 -0
  121. package/hedhog/frontend/{app/dashboard/components/widgets → widgets}/account-security.tsx.ejs +33 -29
  122. package/hedhog/frontend/widgets/active-users-card.tsx.ejs +58 -0
  123. package/hedhog/frontend/widgets/activity-timeline.tsx.ejs +223 -0
  124. package/hedhog/frontend/{app/dashboard/components/widgets → widgets}/email-notifications.tsx.ejs +85 -61
  125. package/hedhog/frontend/widgets/locale-config.tsx.ejs +168 -0
  126. package/hedhog/frontend/widgets/login-history-chart.tsx.ejs +115 -0
  127. package/hedhog/frontend/widgets/mail-config.tsx.ejs +199 -0
  128. package/hedhog/frontend/widgets/mail-sent-card.tsx.ejs +58 -0
  129. package/hedhog/frontend/widgets/mail-sent-chart.tsx.ejs +149 -0
  130. package/hedhog/frontend/widgets/menus-card.tsx.ejs +58 -0
  131. package/hedhog/frontend/widgets/oauth-config.tsx.ejs +175 -0
  132. package/hedhog/frontend/widgets/permissions-card.tsx.ejs +61 -0
  133. package/hedhog/frontend/widgets/permissions-chart.tsx.ejs +156 -0
  134. package/hedhog/frontend/{app/dashboard/components/widgets → widgets}/profile-card.tsx.ejs +3 -3
  135. package/hedhog/frontend/widgets/routes-card.tsx.ejs +58 -0
  136. package/hedhog/frontend/widgets/session-activity-chart.tsx.ejs +183 -0
  137. package/hedhog/frontend/widgets/sessions-today-card.tsx.ejs +62 -0
  138. package/hedhog/frontend/widgets/stat-access-level.tsx.ejs +57 -0
  139. package/hedhog/frontend/widgets/stat-actions-today.tsx.ejs +57 -0
  140. package/hedhog/frontend/widgets/stat-consecutive-days.tsx.ejs +57 -0
  141. package/hedhog/frontend/widgets/stat-online-time.tsx.ejs +57 -0
  142. package/hedhog/frontend/widgets/storage-config.tsx.ejs +196 -0
  143. package/hedhog/frontend/widgets/theme-config.tsx.ejs +213 -0
  144. package/hedhog/frontend/widgets/user-growth-chart.tsx.ejs +210 -0
  145. package/hedhog/frontend/{app/dashboard/components/widgets → widgets}/user-roles.tsx.ejs +12 -14
  146. package/hedhog/frontend/{app/dashboard/components/widgets → widgets}/user-sessions.tsx.ejs +1 -1
  147. package/hedhog/table/dashboard_component.yaml +7 -0
  148. package/hedhog/table/mail_sent_user.yaml +75 -0
  149. package/package.json +4 -4
  150. package/src/dashboard/dashboard-component/dashboard-component.controller.ts +36 -12
  151. package/src/dashboard/dashboard-component/dashboard-component.service.ts +150 -3
  152. package/src/dashboard/dashboard-component/dto/create.dto.ts +4 -0
  153. package/src/dashboard/dashboard-component/dto/update.dto.ts +4 -0
  154. package/src/dashboard/dashboard-core/dashboard-core.controller.ts +5 -0
  155. package/src/dashboard/dashboard-core/dashboard-core.module.ts +6 -1
  156. package/src/dashboard/dashboard-core/dashboard-core.service.ts +874 -8
  157. package/src/file/file.controller.ts +37 -13
  158. package/src/file/file.service.ts +47 -5
  159. package/src/file/provider/s3.provider.ts +39 -29
  160. package/src/oauth/oauth.service.ts +8 -7
  161. package/src/user/constants/user.constants.ts +1 -0
  162. package/src/user/user.service.ts +2 -1
  163. package/hedhog/frontend/app/dashboard/components/widgets/locale-config.tsx.ejs +0 -309
  164. package/hedhog/frontend/app/dashboard/components/widgets/mail-config.tsx.ejs +0 -445
  165. package/hedhog/frontend/app/dashboard/components/widgets/oauth-config.tsx.ejs +0 -296
  166. package/hedhog/frontend/app/dashboard/components/widgets/storage-config.tsx.ejs +0 -340
  167. package/hedhog/frontend/app/dashboard/components/widgets/theme-config.tsx.ejs +0 -275
  168. /package/hedhog/frontend/app/dashboard/components/widgets/{active-users-card.tsx.ejs → core.active-users-card.tsx.ejs} +0 -0
  169. /package/hedhog/frontend/app/dashboard/components/widgets/{activity-timeline.tsx.ejs → core.activity-timeline.tsx.ejs} +0 -0
  170. /package/hedhog/frontend/app/dashboard/components/widgets/{login-history-chart.tsx.ejs → core.login-history-chart.tsx.ejs} +0 -0
  171. /package/hedhog/frontend/app/dashboard/components/widgets/{mail-sent-card.tsx.ejs → core.mail-sent-card.tsx.ejs} +0 -0
  172. /package/hedhog/frontend/app/dashboard/components/widgets/{mail-sent-chart.tsx.ejs → core.mail-sent-chart.tsx.ejs} +0 -0
  173. /package/hedhog/frontend/app/dashboard/components/widgets/{menus-card.tsx.ejs → core.menus-card.tsx.ejs} +0 -0
  174. /package/hedhog/frontend/app/dashboard/components/widgets/{permissions-card.tsx.ejs → core.permissions-card.tsx.ejs} +0 -0
  175. /package/hedhog/frontend/app/dashboard/components/widgets/{permissions-chart.tsx.ejs → core.permissions-chart.tsx.ejs} +0 -0
  176. /package/hedhog/frontend/app/dashboard/components/widgets/{routes-card.tsx.ejs → core.routes-card.tsx.ejs} +0 -0
  177. /package/hedhog/frontend/app/dashboard/components/widgets/{session-activity-chart.tsx.ejs → core.session-activity-chart.tsx.ejs} +0 -0
  178. /package/hedhog/frontend/app/dashboard/components/widgets/{sessions-today-card.tsx.ejs → core.sessions-today-card.tsx.ejs} +0 -0
  179. /package/hedhog/frontend/app/dashboard/components/widgets/{stat-access-level.tsx.ejs → core.stat-access-level.tsx.ejs} +0 -0
  180. /package/hedhog/frontend/app/dashboard/components/widgets/{stat-actions-today.tsx.ejs → core.stat-actions-today.tsx.ejs} +0 -0
  181. /package/hedhog/frontend/app/dashboard/components/widgets/{stat-consecutive-days.tsx.ejs → core.stat-consecutive-days.tsx.ejs} +0 -0
  182. /package/hedhog/frontend/app/dashboard/components/widgets/{stat-online-time.tsx.ejs → core.stat-online-time.tsx.ejs} +0 -0
  183. /package/hedhog/frontend/app/dashboard/components/widgets/{user-growth-chart.tsx.ejs → core.user-growth-chart.tsx.ejs} +0 -0
@@ -1,275 +0,0 @@
1
- 'use client';
2
-
3
- import { Button } from '@/components/ui/button';
4
- import {
5
- Card,
6
- CardContent,
7
- CardDescription,
8
- CardHeader,
9
- CardTitle,
10
- } from '@/components/ui/card';
11
- import { Input } from '@/components/ui/input';
12
- import { Label } from '@/components/ui/label';
13
- import { ImageIcon, Palette, Upload } from 'lucide-react';
14
- import { useRef, useState } from 'react';
15
-
16
- const PRESET_COLORS = [
17
- { name: 'Azul', value: '#3b82f6' },
18
- { name: 'Indigo', value: '#6366f1' },
19
- { name: 'Violeta', value: '#8b5cf6' },
20
- { name: 'Rosa', value: '#ec4899' },
21
- { name: 'Vermelho', value: '#ef4444' },
22
- { name: 'Laranja', value: '#f97316' },
23
- { name: 'Amber', value: '#f59e0b' },
24
- { name: 'Esmeralda', value: '#10b981' },
25
- { name: 'Teal', value: '#14b8a6' },
26
- { name: 'Ciano', value: '#06b6d4' },
27
- { name: 'Cinza', value: '#6b7280' },
28
- { name: 'Zinc', value: '#18181b' },
29
- ];
30
-
31
- export default function ThemeConfig() {
32
- const [title, setTitle] = useState('HeroAdmin');
33
- const [slogan, setSlogan] = useState('Painel de Controle Inteligente');
34
- const [primaryColor, setPrimaryColor] = useState('#3b82f6');
35
- const [logoPreview, setLogoPreview] = useState<string | null>(null);
36
- const [faviconPreview, setFaviconPreview] = useState<string | null>(null);
37
- const logoRef = useRef<HTMLInputElement>(null);
38
- const faviconRef = useRef<HTMLInputElement>(null);
39
-
40
- function handleFileChange(
41
- e: React.ChangeEvent<HTMLInputElement>,
42
- setter: (url: string | null) => void
43
- ) {
44
- const file = e.target.files?.[0];
45
- if (file) {
46
- const reader = new FileReader();
47
- reader.onloadend = () => setter(reader.result as string);
48
- reader.readAsDataURL(file);
49
- }
50
- }
51
-
52
- return (
53
- <Card className="h-full">
54
- <CardHeader>
55
- <div className="flex items-center gap-3">
56
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-rose-50">
57
- <Palette className="h-5 w-5 text-rose-600" />
58
- </div>
59
- <div>
60
- <CardTitle className="text-base">Aparencia e Tema</CardTitle>
61
- <CardDescription>
62
- Personalize a identidade visual do sistema
63
- </CardDescription>
64
- </div>
65
- </div>
66
- </CardHeader>
67
- <CardContent className="space-y-6">
68
- {/* Preview */}
69
- <div className="rounded-lg border bg-muted/30 p-4">
70
- <p className="mb-3 text-xs font-medium text-muted-foreground">
71
- Pre-visualizacao
72
- </p>
73
- <div className="flex items-center gap-3 rounded-lg border bg-background p-3">
74
- <div
75
- className="flex h-10 w-10 items-center justify-center rounded-lg"
76
- style={{ backgroundColor: primaryColor }}
77
- >
78
- {logoPreview ? (
79
- <img
80
- src={logoPreview}
81
- alt="Logo"
82
- className="h-6 w-6 rounded object-contain"
83
- />
84
- ) : (
85
- <span className="text-sm font-bold text-white">
86
- {title.charAt(0)}
87
- </span>
88
- )}
89
- </div>
90
- <div>
91
- <span
92
- className="text-sm font-bold"
93
- style={{ color: primaryColor }}
94
- >
95
- {title || 'Titulo do Sistema'}
96
- </span>
97
- <p className="text-xs text-muted-foreground">
98
- {slogan || 'Slogan do sistema'}
99
- </p>
100
- </div>
101
- {faviconPreview && (
102
- <div className="ml-auto flex items-center gap-1.5 text-xs text-muted-foreground">
103
- <img
104
- src={faviconPreview}
105
- alt="Favicon"
106
- className="h-4 w-4 object-contain"
107
- />
108
- Favicon
109
- </div>
110
- )}
111
- </div>
112
- </div>
113
-
114
- {/* Logo + Favicon */}
115
- <div className="grid gap-4 sm:grid-cols-2">
116
- <div className="space-y-2">
117
- <Label>Logo do sistema</Label>
118
- <div
119
- onClick={() => logoRef.current?.click()}
120
- onKeyDown={(e) => {
121
- if (e.key === 'Enter') logoRef.current?.click();
122
- }}
123
- role="button"
124
- tabIndex={0}
125
- className="flex h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed transition-colors hover:border-foreground/30 hover:bg-muted/50"
126
- >
127
- {logoPreview ? (
128
- <img
129
- src={logoPreview}
130
- alt="Logo"
131
- className="h-12 w-12 object-contain"
132
- />
133
- ) : (
134
- <>
135
- <Upload className="h-5 w-5 text-muted-foreground" />
136
- <span className="text-xs text-muted-foreground">
137
- Clique para enviar
138
- </span>
139
- </>
140
- )}
141
- </div>
142
- <input
143
- ref={logoRef}
144
- type="file"
145
- accept="image/*"
146
- className="hidden"
147
- onChange={(e) => handleFileChange(e, setLogoPreview)}
148
- />
149
- </div>
150
- <div className="space-y-2">
151
- <Label>Favicon</Label>
152
- <div
153
- onClick={() => faviconRef.current?.click()}
154
- onKeyDown={(e) => {
155
- if (e.key === 'Enter') faviconRef.current?.click();
156
- }}
157
- role="button"
158
- tabIndex={0}
159
- className="flex h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed transition-colors hover:border-foreground/30 hover:bg-muted/50"
160
- >
161
- {faviconPreview ? (
162
- <img
163
- src={faviconPreview}
164
- alt="Favicon"
165
- className="h-8 w-8 object-contain"
166
- />
167
- ) : (
168
- <>
169
- <ImageIcon className="h-5 w-5 text-muted-foreground" />
170
- <span className="text-xs text-muted-foreground">
171
- 16x16 ou 32x32 px
172
- </span>
173
- </>
174
- )}
175
- </div>
176
- <input
177
- ref={faviconRef}
178
- type="file"
179
- accept="image/png,image/ico,image/x-icon,image/svg+xml"
180
- className="hidden"
181
- onChange={(e) => handleFileChange(e, setFaviconPreview)}
182
- />
183
- </div>
184
- </div>
185
-
186
- {/* Title + Slogan */}
187
- <div className="grid gap-4 sm:grid-cols-2">
188
- <div className="space-y-2">
189
- <Label htmlFor="sys-title">Titulo do sistema</Label>
190
- <Input
191
- id="sys-title"
192
- value={title}
193
- onChange={(e) => setTitle(e.target.value)}
194
- placeholder="Meu Sistema"
195
- />
196
- </div>
197
- <div className="space-y-2">
198
- <Label htmlFor="sys-slogan">Slogan</Label>
199
- <Input
200
- id="sys-slogan"
201
- value={slogan}
202
- onChange={(e) => setSlogan(e.target.value)}
203
- placeholder="Seu slogan aqui"
204
- />
205
- </div>
206
- </div>
207
-
208
- {/* Color Picker */}
209
- <div className="space-y-3">
210
- <Label>Cor primaria</Label>
211
- <div className="flex items-center gap-3">
212
- <div
213
- className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border"
214
- style={{ backgroundColor: primaryColor }}
215
- >
216
- <input
217
- type="color"
218
- value={primaryColor}
219
- onChange={(e) => setPrimaryColor(e.target.value)}
220
- className="h-full w-full cursor-pointer opacity-0"
221
- title="Selecionar cor"
222
- />
223
- </div>
224
- <Input
225
- value={primaryColor}
226
- onChange={(e) => setPrimaryColor(e.target.value)}
227
- className="w-28 font-mono text-sm uppercase"
228
- maxLength={7}
229
- />
230
- </div>
231
- <div className="flex flex-wrap gap-2 pt-1">
232
- {PRESET_COLORS.map((c) => (
233
- <button
234
- key={c.value}
235
- type="button"
236
- onClick={() => setPrimaryColor(c.value)}
237
- className={`group relative flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all ${
238
- primaryColor === c.value
239
- ? 'border-foreground scale-110'
240
- : 'border-transparent hover:scale-105'
241
- }`}
242
- title={c.name}
243
- >
244
- <span
245
- className="h-5 w-5 rounded-full"
246
- style={{ backgroundColor: c.value }}
247
- />
248
- </button>
249
- ))}
250
- </div>
251
- </div>
252
-
253
- {/* Actions */}
254
- <div className="flex items-center justify-end border-t pt-4">
255
- <div className="flex gap-2">
256
- <Button
257
- variant="outline"
258
- size="sm"
259
- onClick={() => {
260
- setTitle('HeroAdmin');
261
- setSlogan('Painel de Controle Inteligente');
262
- setPrimaryColor('#3b82f6');
263
- setLogoPreview(null);
264
- setFaviconPreview(null);
265
- }}
266
- >
267
- Restaurar padrao
268
- </Button>
269
- <Button size="sm">Salvar</Button>
270
- </div>
271
- </div>
272
- </CardContent>
273
- </Card>
274
- );
275
- }