mgv-backoffice 1.0.7 → 1.0.9

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.
@@ -0,0 +1,295 @@
1
+ /**
2
+ * MGV-Backoffice Tailwind Safelist (Tailwind v3 — LEGACY)
3
+ *
4
+ * ⚠️ DEPRECATED: If you are using Tailwind CSS v4+, use the CSS-based
5
+ * safelist instead:
6
+ *
7
+ * In your main CSS file:
8
+ * @import "tailwindcss";
9
+ * @import "mgv-backoffice/tailwind.safelist.css";
10
+ *
11
+ * For Tailwind v3 projects, import this file in your tailwind.config.js:
12
+ *
13
+ * const mgvSafelist = require('mgv-backoffice/tailwind.safelist')
14
+ *
15
+ * module.exports = {
16
+ * safelist: mgvSafelist,
17
+ * // ... rest of your config
18
+ * }
19
+ */
20
+
21
+ const colors = ['red', 'green', 'blue', 'yellow', 'gray', 'orange', 'purple']
22
+
23
+ const safelist = [
24
+
25
+ // ── BaseAlert ──────────────────────────────────────────────
26
+ // Dynamic: "text-" + color + "-800 border border-" + color + "-300 ..."
27
+ ...colors.flatMap(c => [
28
+ `text-${c}-800`,
29
+ `border-${c}-300`,
30
+ `bg-${c}-50`,
31
+ `dark:text-${c}-400`,
32
+ `dark:border-${c}-800`,
33
+ ]),
34
+ 'flex',
35
+ 'items-center',
36
+ 'p-4',
37
+ 'mb-4',
38
+ 'text-sm',
39
+ 'border',
40
+ 'rounded-lg',
41
+ 'dark:bg-gray-800',
42
+ 'w-6',
43
+ 'h-6',
44
+ 'text-gray-400',
45
+ 'font-medium',
46
+ 'pl-1',
47
+
48
+ // ── BaseBadge ──────────────────────────────────────────────
49
+ // Dynamic: computed badgeClasses template literal
50
+ 'bg-red-100', 'text-red-700', 'border-red-200',
51
+ 'bg-green-100', 'text-green-700', 'border-green-200',
52
+ 'bg-blue-100', 'text-blue-700', 'border-blue-200',
53
+ 'bg-yellow-100', 'text-yellow-700', 'border-yellow-200',
54
+ 'bg-gray-100', 'text-gray-700', 'border-gray-200',
55
+ 'bg-gray-50', 'text-gray-600',
56
+ 'inline-flex',
57
+ 'gap-1',
58
+ 'font-semibold',
59
+ 'text-xs',
60
+ 'leading-none',
61
+ 'px-3',
62
+ 'py-1.5',
63
+ 'rounded-full',
64
+
65
+ // ── BaseButton ─────────────────────────────────────────────
66
+ // Dynamic: switch on color
67
+ 'focus:outline-none',
68
+ 'text-white',
69
+ 'bg-blue-700',
70
+ 'hover:bg-blue-800',
71
+ 'focus:ring-4',
72
+ 'focus:ring-blue-300',
73
+ 'bg-blue-400',
74
+ 'text-gray-900',
75
+ 'bg-white',
76
+ 'border-gray-200',
77
+ 'hover:bg-gray-100',
78
+ 'hover:text-blue-700',
79
+ 'focus:z-10',
80
+ 'focus:ring-gray-200',
81
+ 'bg-gray-400',
82
+ 'bg-gray-800',
83
+ 'hover:bg-gray-900',
84
+ 'focus:ring-gray-300',
85
+ 'bg-green-700',
86
+ 'hover:bg-green-800',
87
+ 'focus:ring-green-300',
88
+ 'bg-green-400',
89
+ 'bg-red-700',
90
+ 'hover:bg-red-800',
91
+ 'focus:ring-red-300',
92
+ 'bg-red-400',
93
+ 'bg-yellow-400',
94
+ 'hover:bg-yellow-500',
95
+ 'focus:ring-yellow-300',
96
+ 'bg-purple-700',
97
+ 'hover:bg-purple-800',
98
+ 'focus:ring-purple-300',
99
+ 'bg-purple-400',
100
+ // Dynamic: switch on size
101
+ 'px-5',
102
+ 'py-2.5',
103
+ 'mr-2',
104
+ 'mb-2',
105
+ 'py-2',
106
+ 'text-base',
107
+ 'py-3',
108
+ 'px-6',
109
+ 'py-3.5',
110
+ // Dynamic: common
111
+ 'font-medium',
112
+ 'rounded-lg',
113
+ 'rounded-full',
114
+ 'cursor-not-allowed',
115
+ // Static in template
116
+ 'inline',
117
+ 'w-4',
118
+ 'h-4',
119
+ 'me-3',
120
+ 'animate-spin',
121
+
122
+ // ── BaseToast ──────────────────────────────────────────────
123
+ // Dynamic: switch on mode
124
+ 'text-red-500',
125
+ 'bg-red-100',
126
+ 'dark:bg-red-800',
127
+ 'dark:text-red-200',
128
+ 'text-green-500',
129
+ 'bg-green-100',
130
+ 'dark:bg-green-800',
131
+ 'dark:text-green-200',
132
+ 'text-orange-500',
133
+ 'bg-orange-100',
134
+ 'dark:bg-orange-700',
135
+ 'dark:text-orange-200',
136
+ 'inline-flex',
137
+ 'items-center',
138
+ 'justify-center',
139
+ 'flex-shrink-0',
140
+ 'w-8',
141
+ 'h-8',
142
+ // Dynamic: switch on positioning
143
+ 'top-5',
144
+ 'right-5',
145
+ 'bottom-5',
146
+ // Dynamic: computeMainComponentCss
147
+ 'fixed',
148
+ 'w-full',
149
+ 'max-w-md',
150
+ 'space-x-4',
151
+ 'divide-x',
152
+ // Static in template
153
+ 'shadow',
154
+ 'text-gray-500',
155
+ 'bg-white',
156
+ 'dark:text-gray-400',
157
+ 'dark:bg-gray-800',
158
+ 'ml-3',
159
+ 'font-normal',
160
+ 'ml-auto',
161
+ '-mx-1.5',
162
+ '-my-1.5',
163
+ 'hover:text-gray-900',
164
+ 'focus:ring-2',
165
+ 'focus:ring-gray-300',
166
+ 'p-1.5',
167
+ 'hover:bg-gray-100',
168
+ 'h-8',
169
+ 'w-8',
170
+ 'dark:text-gray-500',
171
+ 'dark:hover:text-white',
172
+ 'dark:hover:bg-gray-700',
173
+ 'text-gray-500',
174
+ 'cursor-pointer',
175
+ 'sr-only',
176
+ 'h-6',
177
+ 'w-6',
178
+ 'text-yellow-500',
179
+
180
+ // ── ColoredSquares ─────────────────────────────────────────
181
+ // Dynamic: computeCss() concatenation
182
+ ...colors.flatMap(c => [
183
+ `bg-${c}-100`,
184
+ `text-${c}-800`,
185
+ ]),
186
+ 'font-bold',
187
+ 'px-2.5',
188
+ 'py-0.5',
189
+ // Dynamic: random pastel colors
190
+ 'bg-slate-300',
191
+ 'bg-zinc-300',
192
+ 'bg-neutral-300',
193
+ 'bg-stone-300',
194
+ 'bg-blue-300',
195
+ 'bg-green-300',
196
+ 'bg-yellow-300',
197
+ 'bg-purple-300',
198
+ 'bg-pink-300',
199
+ // Static in template
200
+ 'w-13',
201
+ 'border-gray-300',
202
+ 'relative',
203
+ 'aspect-square',
204
+ 'bg-white',
205
+ 'shadow-sm',
206
+ 'overflow-hidden',
207
+ 'text-center',
208
+ 'absolute',
209
+ 'bottom-0',
210
+ 'left-0',
211
+ 'h-1',
212
+ 'w-full',
213
+
214
+ // ── EuroAmount ─────────────────────────────────────────────
215
+ // Dynamic: conditional :class
216
+ 'text-green-800',
217
+ 'text-red-800',
218
+ 'text-gray-800',
219
+ 'font-bold',
220
+
221
+ // ── TrendArrow ─────────────────────────────────────────────
222
+ 'space-x-2',
223
+ 'h-5',
224
+ 'w-5',
225
+ 'text-red-500',
226
+ 'text-green-500',
227
+
228
+ // ── BaseSpinner ────────────────────────────────────────────
229
+ 'border-2',
230
+ 'border-gray-200',
231
+ 'border-t-blue-500',
232
+ 'animate-spin',
233
+
234
+ // ── BaseRow ────────────────────────────────────────────────
235
+ 'block',
236
+ 'p-8',
237
+ 'rounded-xl',
238
+ 'shadow-sm',
239
+ 'dark:border-gray-700',
240
+
241
+ // ── BaseLine ───────────────────────────────────────────────
242
+ 'h-px',
243
+ 'my-8',
244
+ 'bg-gray-200',
245
+ 'border-0',
246
+ 'dark:bg-gray-700',
247
+ 'w-48',
248
+ 'mx-auto',
249
+ 'my-4',
250
+ 'bg-gray-100',
251
+ 'rounded',
252
+ 'md:my-10',
253
+ 'md:my-12',
254
+
255
+ // ── BaseLogo ───────────────────────────────────────────────
256
+ 'mb-6',
257
+ 'text-2xl',
258
+ 'font-semibold',
259
+ 'text-gray-900',
260
+ 'dark:text-white',
261
+
262
+ // ── BaseModal ──────────────────────────────────────────────
263
+ 'top-20',
264
+ 'mx-auto',
265
+ 'p-5',
266
+ 'w-96',
267
+ 'shadow-lg',
268
+ 'rounded-md',
269
+ 'p-6',
270
+ 'text-center',
271
+ 'w-12',
272
+ 'h-12',
273
+ 'mb-4',
274
+ 'mb-5',
275
+ 'text-lg',
276
+ 'font-normal',
277
+ 'dark:text-gray-400',
278
+ 'justify-center',
279
+
280
+ // ── BaseBreadcrumb ─────────────────────────────────────────
281
+ 'px-5',
282
+ 'py-3',
283
+ 'text-gray-700',
284
+ 'bg-gray-50',
285
+ 'dark:border-gray-700',
286
+ 'space-x-1',
287
+ 'md:space-x-3',
288
+ 'hover:text-blue-600',
289
+ 'dark:hover:text-white',
290
+ 'ml-1',
291
+ 'md:ml-2',
292
+ ]
293
+
294
+ // Deduplicate
295
+ export default [...new Set(safelist)]