tw-react-components 0.0.187 → 0.0.191

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/index.esm.js CHANGED
@@ -166,471 +166,410 @@ const Accordion = Object.assign($Accordion, {
166
166
  Content: AccordionContent,
167
167
  });
168
168
 
169
- const Block = (_a) => {
170
- var { children, className, centered, container, fullWidth, fullHeight, dataTestId = 'block' } = _a, props = __rest(_a, ["children", "className", "centered", "container", "fullWidth", "fullHeight", "dataTestId"]);
171
- return (jsx("div", Object.assign({ "data-testid": dataTestId, className: cn(centered && 'mx-auto', container && 'container', fullWidth && 'w-full', fullHeight && 'h-full', className) }, props, { children: children })));
172
- };
173
-
174
- const directionClasses = {
175
- row: {
176
- normal: 'flex-row',
177
- reverse: 'flex-row-reverse',
178
- },
179
- column: {
180
- normal: 'flex-col',
181
- reverse: 'flex-col-reverse',
182
- },
183
- };
184
- const alignClasses = {
185
- start: 'items-start',
186
- center: 'items-center',
187
- end: 'items-end',
188
- };
189
- const justifyClasses = {
190
- start: 'justify-start',
191
- center: 'justify-center',
192
- between: 'justify-between',
193
- end: 'justify-end',
194
- };
195
- const Flex = (_a) => {
196
- var { children, className, reverse, wrap, direction = 'row', align = 'start', justify = 'start', dataTestId = 'flex' } = _a, blockProps = __rest(_a, ["children", "className", "reverse", "wrap", "direction", "align", "justify", "dataTestId"]);
197
- return (jsx(Block, Object.assign({ className: cn('flex gap-2', wrap && 'flex-wrap', directionClasses[direction][reverse ? 'reverse' : 'normal'], alignClasses[align], justifyClasses[justify], className), dataTestId: dataTestId }, blockProps, { children: children })));
198
- };
199
-
200
- const Spinner = ({ className, fullScreen, dataTestId = 'spinner' }) => (jsx("div", { className: cn('flex w-full items-center justify-center bg-white dark:bg-slate-900', {
169
+ const Spinner = ({ className, spinnerClassName, fullScreen, dataTestId = 'spinner', }) => (jsx("div", { className: cn('flex w-full items-center justify-center bg-white dark:bg-slate-900', {
201
170
  'h-screen': fullScreen,
202
171
  'h-full': !fullScreen,
203
- }, className), "data-testid": dataTestId, children: jsxs("svg", { className: "h-8 w-8 animate-spin text-black dark:text-white", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }) }));
172
+ }, className), "data-testid": dataTestId, children: jsxs("svg", { className: cn('h-8 w-8 animate-spin text-black dark:text-white', spinnerClassName), fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }) }));
204
173
 
205
174
  const variantClassNames = {
206
175
  filled: {
207
- slate: {
208
- base: 'bg-slate-100 dark:bg-slate-900/70',
209
- hover: 'hover:bg-slate-200 dark:hover:bg-slate-700',
210
- focus: 'focus:bg-slate-200 dark:focus:bg-slate-700',
211
- active: 'active:bg-slate-300 dark:active:bg-slate-800/50',
212
- },
213
- gray: {
214
- base: 'text-white bg-gray-500 dark:bg-gray-600',
215
- hover: 'hover:bg-gray-400 dark:hover:bg-gray-500',
216
- focus: 'focus:bg-gray-400 dark:focus:bg-gray-500',
217
- active: 'active:bg-gray-600 dark:active:bg-gray-700',
218
- },
219
- zinc: {
220
- base: 'text-white bg-zinc-500 dark:bg-zinc-600',
221
- hover: 'hover:bg-zinc-400 dark:hover:bg-zinc-500',
222
- focus: 'focus:bg-zinc-400 dark:focus:bg-zinc-500',
223
- active: 'active:bg-zinc-600 dark:active:bg-zinc-700',
224
- },
225
- neutral: {
226
- base: 'text-white bg-neutral-500 dark:bg-neutral-600',
227
- hover: 'hover:bg-neutral-400 dark:hover:bg-neutral-500',
228
- focus: 'focus:bg-neutral-400 dark:focus:bg-neutral-500',
229
- active: 'active:bg-neutral-600 dark:active:bg-neutral-700',
230
- },
231
- stone: {
232
- base: 'text-white bg-stone-500 dark:bg-stone-600',
233
- hover: 'hover:bg-stone-400 dark:hover:bg-stone-500',
234
- focus: 'focus:bg-stone-400 dark:focus:bg-stone-500',
235
- active: 'active:bg-stone-600 dark:active:bg-stone-700',
236
- },
237
- red: {
238
- base: 'text-white bg-red-500 dark:bg-red-600',
239
- hover: 'hover:bg-red-400 dark:hover:bg-red-500',
240
- focus: 'focus:bg-red-400 dark:focus:bg-red-500',
241
- active: 'active:bg-red-600 dark:active:bg-red-700',
242
- },
243
- orange: {
244
- base: 'text-white bg-orange-500 dark:bg-orange-600',
245
- hover: 'hover:bg-orange-400 dark:hover:bg-orange-500',
246
- focus: 'focus:bg-orange-400 dark:focus:bg-orange-500',
247
- active: 'active:bg-orange-600 dark:active:bg-orange-700',
248
- },
249
- amber: {
250
- base: 'text-white bg-amber-500 dark:bg-amber-600',
251
- hover: 'hover:bg-amber-400 dark:hover:bg-amber-500',
252
- focus: 'focus:bg-amber-400 dark:focus:bg-amber-500',
253
- active: 'active:bg-amber-600 dark:active:bg-amber-700',
254
- },
255
- yellow: {
256
- base: 'text-white bg-yellow-500 dark:bg-yellow-600',
257
- hover: 'hover:bg-yellow-400 dark:hover:bg-yellow-500',
258
- focus: 'focus:bg-yellow-400 dark:focus:bg-yellow-500',
259
- active: 'active:bg-yellow-600 dark:active:bg-yellow-700',
260
- },
261
- lime: {
262
- base: 'text-white bg-lime-500 dark:bg-lime-600',
263
- hover: 'hover:bg-lime-400 dark:hover:bg-lime-500',
264
- focus: 'focus:bg-lime-400 dark:focus:bg-lime-500',
265
- active: 'active:bg-lime-600 dark:active:bg-lime-700',
266
- },
267
- green: {
268
- base: 'text-white bg-green-500 dark:bg-green-600',
269
- hover: 'hover:bg-green-400 dark:hover:bg-green-500',
270
- focus: 'focus:bg-green-400 dark:focus:bg-green-500',
271
- active: 'active:bg-green-600 dark:active:bg-green-700',
272
- },
273
- emerald: {
274
- base: 'text-white bg-emerald-500 dark:bg-emerald-600',
275
- hover: 'hover:bg-emerald-400 dark:hover:bg-emerald-500',
276
- focus: 'focus:bg-emerald-400 dark:focus:bg-emerald-500',
277
- active: 'active:bg-emerald-600 dark:active:bg-emerald-700',
278
- },
279
- teal: {
280
- base: 'text-white bg-teal-500 dark:bg-teal-600',
281
- hover: 'hover:bg-teal-400 dark:hover:bg-teal-500',
282
- focus: 'focus:bg-teal-400 dark:focus:bg-teal-500',
283
- active: 'active:bg-teal-600 dark:active:bg-teal-700',
284
- },
285
- cyan: {
286
- base: 'text-white bg-cyan-500 dark:bg-cyan-600',
287
- hover: 'hover:bg-cyan-400 dark:hover:bg-cyan-500',
288
- focus: 'focus:bg-cyan-400 dark:focus:bg-cyan-500',
289
- active: 'active:bg-cyan-600 dark:active:bg-cyan-700',
290
- },
291
- sky: {
292
- base: 'text-white bg-sky-500 dark:bg-sky-600',
293
- hover: 'hover:bg-sky-400 dark:hover:bg-sky-500',
294
- focus: 'focus:bg-sky-400 dark:focus:bg-sky-500',
295
- active: 'active:bg-sky-600 dark:active:bg-sky-700',
296
- },
297
- blue: {
298
- base: 'text-white bg-blue-500 dark:bg-blue-600',
299
- hover: 'hover:bg-blue-400 dark:hover:bg-blue-500',
300
- focus: 'focus:bg-blue-400 dark:focus:bg-blue-500',
301
- active: 'active:bg-blue-600 dark:active:bg-blue-700',
302
- },
303
- indigo: {
304
- base: 'text-white bg-indigo-500 dark:bg-indigo-600',
305
- hover: 'hover:bg-indigo-400 dark:hover:bg-indigo-500',
306
- focus: 'focus:bg-indigo-400 dark:focus:bg-indigo-500',
307
- active: 'active:bg-indigo-600 dark:active:bg-indigo-700',
308
- },
309
- violet: {
310
- base: 'text-white bg-violet-500 dark:bg-violet-600',
311
- hover: 'hover:bg-violet-400 dark:hover:bg-violet-500',
312
- focus: 'focus:bg-violet-400 dark:focus:bg-violet-500',
313
- active: 'active:bg-violet-600 dark:active:bg-violet-700',
314
- },
315
- fuchsia: {
316
- base: 'text-white bg-fuchsia-500 dark:bg-fuchsia-600',
317
- hover: 'hover:bg-fuchsia-400 dark:hover:bg-fuchsia-500',
318
- focus: 'focus:bg-fuchsia-400 dark:focus:bg-fuchsia-500',
319
- active: 'active:bg-fuchsia-600 dark:active:bg-fuchsia-700',
320
- },
321
- purple: {
322
- base: 'text-white bg-purple-500 dark:bg-purple-600',
323
- hover: 'hover:bg-purple-400 dark:hover:bg-purple-500',
324
- focus: 'focus:bg-purple-400 dark:focus:bg-purple-500',
325
- active: 'active:bg-purple-600 dark:active:bg-purple-700',
326
- },
327
- pink: {
328
- base: 'text-white bg-pink-500 dark:bg-pink-600',
329
- hover: 'hover:bg-pink-400 dark:hover:bg-pink-500',
330
- focus: 'focus:bg-pink-400 dark:focus:bg-pink-500',
331
- active: 'active:bg-pink-600 dark:active:bg-pink-700',
332
- },
333
- rose: {
334
- base: 'text-white bg-rose-500 dark:bg-rose-600',
335
- hover: 'hover:bg-rose-400 dark:hover:bg-rose-500',
336
- focus: 'focus:bg-rose-400 dark:focus:bg-rose-500',
337
- active: 'active:bg-rose-600 dark:active:bg-rose-700',
176
+ base: 'shadow-xs',
177
+ colors: {
178
+ primary: {
179
+ base: 'bg-primary text-primary-foreground',
180
+ hover: 'hover:bg-primary/90',
181
+ focus: 'focus:bg-primary/90',
182
+ active: 'active:bg-primary/90',
183
+ },
184
+ secondary: {
185
+ base: 'bg-secondary text-secondary-foreground',
186
+ hover: 'hover:bg-secondary/80',
187
+ focus: 'focus:bg-secondary/80',
188
+ active: 'active:bg-secondary/80',
189
+ },
190
+ slate: {
191
+ base: 'bg-slate-100 dark:bg-slate-900/70',
192
+ hover: 'hover:bg-slate-200 dark:hover:bg-slate-700',
193
+ focus: 'focus:bg-slate-200 dark:focus:bg-slate-700',
194
+ active: 'active:bg-slate-300 dark:active:bg-slate-800/50',
195
+ },
196
+ gray: {
197
+ base: 'text-white bg-gray-500 dark:bg-gray-600',
198
+ hover: 'hover:bg-gray-400 dark:hover:bg-gray-500',
199
+ focus: 'focus:bg-gray-400 dark:focus:bg-gray-500',
200
+ active: 'active:bg-gray-600 dark:active:bg-gray-700',
201
+ },
202
+ zinc: {
203
+ base: 'text-white bg-zinc-500 dark:bg-zinc-600',
204
+ hover: 'hover:bg-zinc-400 dark:hover:bg-zinc-500',
205
+ focus: 'focus:bg-zinc-400 dark:focus:bg-zinc-500',
206
+ active: 'active:bg-zinc-600 dark:active:bg-zinc-700',
207
+ },
208
+ neutral: {
209
+ base: 'text-white bg-neutral-500 dark:bg-neutral-600',
210
+ hover: 'hover:bg-neutral-400 dark:hover:bg-neutral-500',
211
+ focus: 'focus:bg-neutral-400 dark:focus:bg-neutral-500',
212
+ active: 'active:bg-neutral-600 dark:active:bg-neutral-700',
213
+ },
214
+ stone: {
215
+ base: 'text-white bg-stone-500 dark:bg-stone-600',
216
+ hover: 'hover:bg-stone-400 dark:hover:bg-stone-500',
217
+ focus: 'focus:bg-stone-400 dark:focus:bg-stone-500',
218
+ active: 'active:bg-stone-600 dark:active:bg-stone-700',
219
+ },
220
+ red: {
221
+ base: 'text-white bg-red-500 dark:bg-red-600',
222
+ hover: 'hover:bg-red-400 dark:hover:bg-red-500',
223
+ focus: 'focus:bg-red-400 dark:focus:bg-red-500',
224
+ active: 'active:bg-red-600 dark:active:bg-red-700',
225
+ },
226
+ orange: {
227
+ base: 'text-white bg-orange-500 dark:bg-orange-600',
228
+ hover: 'hover:bg-orange-400 dark:hover:bg-orange-500',
229
+ focus: 'focus:bg-orange-400 dark:focus:bg-orange-500',
230
+ active: 'active:bg-orange-600 dark:active:bg-orange-700',
231
+ },
232
+ amber: {
233
+ base: 'text-white bg-amber-500 dark:bg-amber-600',
234
+ hover: 'hover:bg-amber-400 dark:hover:bg-amber-500',
235
+ focus: 'focus:bg-amber-400 dark:focus:bg-amber-500',
236
+ active: 'active:bg-amber-600 dark:active:bg-amber-700',
237
+ },
238
+ yellow: {
239
+ base: 'text-white bg-yellow-500 dark:bg-yellow-600',
240
+ hover: 'hover:bg-yellow-400 dark:hover:bg-yellow-500',
241
+ focus: 'focus:bg-yellow-400 dark:focus:bg-yellow-500',
242
+ active: 'active:bg-yellow-600 dark:active:bg-yellow-700',
243
+ },
244
+ lime: {
245
+ base: 'text-white bg-lime-500 dark:bg-lime-600',
246
+ hover: 'hover:bg-lime-400 dark:hover:bg-lime-500',
247
+ focus: 'focus:bg-lime-400 dark:focus:bg-lime-500',
248
+ active: 'active:bg-lime-600 dark:active:bg-lime-700',
249
+ },
250
+ green: {
251
+ base: 'text-white bg-green-500 dark:bg-green-600',
252
+ hover: 'hover:bg-green-400 dark:hover:bg-green-500',
253
+ focus: 'focus:bg-green-400 dark:focus:bg-green-500',
254
+ active: 'active:bg-green-600 dark:active:bg-green-700',
255
+ },
256
+ emerald: {
257
+ base: 'text-white bg-emerald-500 dark:bg-emerald-600',
258
+ hover: 'hover:bg-emerald-400 dark:hover:bg-emerald-500',
259
+ focus: 'focus:bg-emerald-400 dark:focus:bg-emerald-500',
260
+ active: 'active:bg-emerald-600 dark:active:bg-emerald-700',
261
+ },
262
+ teal: {
263
+ base: 'text-white bg-teal-500 dark:bg-teal-600',
264
+ hover: 'hover:bg-teal-400 dark:hover:bg-teal-500',
265
+ focus: 'focus:bg-teal-400 dark:focus:bg-teal-500',
266
+ active: 'active:bg-teal-600 dark:active:bg-teal-700',
267
+ },
268
+ cyan: {
269
+ base: 'text-white bg-cyan-500 dark:bg-cyan-600',
270
+ hover: 'hover:bg-cyan-400 dark:hover:bg-cyan-500',
271
+ focus: 'focus:bg-cyan-400 dark:focus:bg-cyan-500',
272
+ active: 'active:bg-cyan-600 dark:active:bg-cyan-700',
273
+ },
274
+ sky: {
275
+ base: 'text-white bg-sky-500 dark:bg-sky-600',
276
+ hover: 'hover:bg-sky-400 dark:hover:bg-sky-500',
277
+ focus: 'focus:bg-sky-400 dark:focus:bg-sky-500',
278
+ active: 'active:bg-sky-600 dark:active:bg-sky-700',
279
+ },
280
+ blue: {
281
+ base: 'text-white bg-blue-500 dark:bg-blue-600',
282
+ hover: 'hover:bg-blue-400 dark:hover:bg-blue-500',
283
+ focus: 'focus:bg-blue-400 dark:focus:bg-blue-500',
284
+ active: 'active:bg-blue-600 dark:active:bg-blue-700',
285
+ },
286
+ indigo: {
287
+ base: 'text-white bg-indigo-500 dark:bg-indigo-600',
288
+ hover: 'hover:bg-indigo-400 dark:hover:bg-indigo-500',
289
+ focus: 'focus:bg-indigo-400 dark:focus:bg-indigo-500',
290
+ active: 'active:bg-indigo-600 dark:active:bg-indigo-700',
291
+ },
292
+ violet: {
293
+ base: 'text-white bg-violet-500 dark:bg-violet-600',
294
+ hover: 'hover:bg-violet-400 dark:hover:bg-violet-500',
295
+ focus: 'focus:bg-violet-400 dark:focus:bg-violet-500',
296
+ active: 'active:bg-violet-600 dark:active:bg-violet-700',
297
+ },
298
+ fuchsia: {
299
+ base: 'text-white bg-fuchsia-500 dark:bg-fuchsia-600',
300
+ hover: 'hover:bg-fuchsia-400 dark:hover:bg-fuchsia-500',
301
+ focus: 'focus:bg-fuchsia-400 dark:focus:bg-fuchsia-500',
302
+ active: 'active:bg-fuchsia-600 dark:active:bg-fuchsia-700',
303
+ },
304
+ purple: {
305
+ base: 'text-white bg-purple-500 dark:bg-purple-600',
306
+ hover: 'hover:bg-purple-400 dark:hover:bg-purple-500',
307
+ focus: 'focus:bg-purple-400 dark:focus:bg-purple-500',
308
+ active: 'active:bg-purple-600 dark:active:bg-purple-700',
309
+ },
310
+ pink: {
311
+ base: 'text-white bg-pink-500 dark:bg-pink-600',
312
+ hover: 'hover:bg-pink-400 dark:hover:bg-pink-500',
313
+ focus: 'focus:bg-pink-400 dark:focus:bg-pink-500',
314
+ active: 'active:bg-pink-600 dark:active:bg-pink-700',
315
+ },
316
+ rose: {
317
+ base: 'text-white bg-rose-500 dark:bg-rose-600',
318
+ hover: 'hover:bg-rose-400 dark:hover:bg-rose-500',
319
+ focus: 'focus:bg-rose-400 dark:focus:bg-rose-500',
320
+ active: 'active:bg-rose-600 dark:active:bg-rose-700',
321
+ },
338
322
  },
339
323
  },
340
324
  outlined: {
341
- slate: {
342
- base: 'border-2 dark:border-slate-600',
343
- hover: 'hover:bg-slate-200 dark:hover:bg-slate-600',
344
- focus: 'focus:bg-slate-200 dark:focus:bg-slate-600',
345
- active: 'active:bg-slate-300 active:border-slate-300 dark:active:bg-slate-700 dark:active:border-slate-700',
346
- },
347
- gray: {
348
- base: 'border-2 border-gray-500 text-gray-600 dark:border-gray-600 dark:text-gray-500',
349
- hover: 'hover:text-white hover:bg-gray-500 dark:hover:text-white dark:hover:bg-gray-600',
350
- focus: 'focus:text-white focus:bg-gray-500 dark:focus:text-white dark:focus:bg-gray-600',
351
- active: 'active:bg-gray-600 active:border-gray-600 dark:active:bg-gray-700 dark:active:border-gray-700',
352
- },
353
- zinc: {
354
- base: 'border-2 border-zinc-500 text-zinc-600 dark:border-zinc-600 dark:text-zinc-500',
355
- hover: 'hover:text-white hover:bg-zinc-500 dark:hover:text-white dark:hover:bg-zinc-600',
356
- focus: 'focus:text-white focus:bg-zinc-500 dark:focus:text-white dark:focus:bg-zinc-600',
357
- active: 'active:bg-zinc-600 active:border-zinc-600 dark:active:bg-zinc-700 dark:active:border-zinc-700',
358
- },
359
- neutral: {
360
- base: 'border-2 border-neutral-500 text-neutral-600 dark:border-neutral-600 dark:text-neutral-500',
361
- hover: 'hover:text-white hover:bg-neutral-500 dark:hover:text-white dark:hover:bg-neutral-600',
362
- focus: 'focus:text-white focus:bg-neutral-500 dark:focus:text-white dark:focus:bg-neutral-600',
363
- active: 'active:bg-neutral-600 active:border-neutral-600 dark:active:bg-neutral-700 dark:active:border-neutral-700',
364
- },
365
- stone: {
366
- base: 'border-2 border-stone-500 text-stone-600 dark:border-stone-600 dark:text-stone-500',
367
- hover: 'hover:text-white hover:bg-stone-500 dark:hover:text-white dark:hover:bg-stone-600',
368
- focus: 'focus:text-white focus:bg-stone-500 dark:focus:text-white dark:focus:bg-stone-600',
369
- active: 'active:bg-stone-600 active:border-stone-600 dark:active:bg-stone-700 dark:active:border-stone-700',
370
- },
371
- red: {
372
- base: 'border-2 border-red-500 text-red-600 dark:border-red-600 dark:text-red-500',
373
- hover: 'hover:text-white hover:bg-red-500 dark:hover:text-white dark:hover:bg-red-600',
374
- focus: 'focus:text-white focus:bg-red-500 dark:focus:text-white dark:focus:bg-red-600',
375
- active: 'active:bg-red-600 active:border-red-600 dark:active:bg-red-700 dark:active:border-red-700',
376
- },
377
- orange: {
378
- base: 'border-2 border-orange-500 text-orange-600 dark:border-orange-600 dark:text-orange-500',
379
- hover: 'hover:text-white hover:bg-orange-500 dark:hover:text-white dark:hover:bg-orange-600',
380
- focus: 'focus:text-white focus:bg-orange-500 dark:focus:text-white dark:focus:bg-orange-600',
381
- active: 'active:bg-orange-600 active:border-orange-600 dark:active:bg-orange-700 dark:active:border-orange-700',
382
- },
383
- amber: {
384
- base: 'border-2 border-amber-500 text-amber-600 dark:border-amber-600 dark:text-amber-500',
385
- hover: 'hover:text-white hover:bg-amber-500 dark:hover:text-white dark:hover:bg-amber-600',
386
- focus: 'focus:text-white focus:bg-amber-500 dark:focus:text-white dark:focus:bg-amber-600',
387
- active: 'active:bg-amber-600 active:border-amber-600 dark:active:bg-amber-700 dark:active:border-amber-700',
388
- },
389
- yellow: {
390
- base: 'border-2 border-yellow-500 text-yellow-600 dark:border-yellow-600 dark:text-yellow-500',
391
- hover: 'hover:text-white hover:bg-yellow-500 dark:hover:text-white dark:hover:bg-yellow-600',
392
- focus: 'focus:text-white focus:bg-yellow-500 dark:focus:text-white dark:focus:bg-yellow-600',
393
- active: 'active:bg-yellow-600 active:border-yellow-600 dark:active:bg-yellow-700 dark:active:border-yellow-700',
394
- },
395
- lime: {
396
- base: 'border-2 border-lime-500 text-lime-600 dark:border-lime-600 dark:text-lime-500',
397
- hover: 'hover:text-white hover:bg-lime-500 dark:hover:text-white dark:hover:bg-lime-600',
398
- focus: 'focus:text-white focus:bg-lime-500 dark:focus:text-white dark:focus:bg-lime-600',
399
- active: 'active:bg-lime-600 active:border-lime-600 dark:active:bg-lime-700 dark:active:border-lime-700',
400
- },
401
- green: {
402
- base: 'border-2 border-green-500 text-green-600 dark:border-green-600 dark:text-green-500',
403
- hover: 'hover:text-white hover:bg-green-500 dark:hover:text-white dark:hover:bg-green-600',
404
- focus: 'focus:text-white focus:bg-green-500 dark:focus:text-white dark:focus:bg-green-600',
405
- active: 'active:bg-green-600 active:border-green-600 dark:active:bg-green-700 dark:active:border-green-700',
406
- },
407
- emerald: {
408
- base: 'border-2 border-emerald-500 text-emerald-600 dark:border-emerald-600 dark:text-emerald-500',
409
- hover: 'hover:text-white hover:bg-emerald-500 dark:hover:text-white dark:hover:bg-emerald-600',
410
- focus: 'focus:text-white focus:bg-emerald-500 dark:focus:text-white dark:focus:bg-emerald-600',
411
- active: 'active:bg-emerald-600 active:border-emerald-600 dark:active:bg-emerald-700 dark:active:border-emerald-700',
412
- },
413
- teal: {
414
- base: 'border-2 border-teal-500 text-teal-600 dark:border-teal-600 dark:text-teal-500',
415
- hover: 'hover:text-white hover:bg-teal-500 dark:hover:text-white dark:hover:bg-teal-600',
416
- focus: 'focus:text-white focus:bg-teal-500 dark:focus:text-white dark:focus:bg-teal-600',
417
- active: 'active:bg-teal-600 active:border-teal-600 dark:active:bg-teal-700 dark:active:border-teal-700',
418
- },
419
- cyan: {
420
- base: 'border-2 border-cyan-500 text-cyan-600 dark:border-cyan-600 dark:text-cyan-500',
421
- hover: 'hover:text-white hover:bg-cyan-500 dark:hover:text-white dark:hover:bg-cyan-600',
422
- focus: 'focus:text-white focus:bg-cyan-500 dark:focus:text-white dark:focus:bg-cyan-600',
423
- active: 'active:bg-cyan-600 active:border-cyan-600 dark:active:bg-cyan-700 dark:active:border-cyan-700',
424
- },
425
- sky: {
426
- base: 'border-2 border-sky-500 text-sky-600 dark:border-sky-600 dark:text-sky-500',
427
- hover: 'hover:text-white hover:bg-sky-500 dark:hover:text-white dark:hover:bg-sky-600',
428
- focus: 'focus:text-white focus:bg-sky-500 dark:focus:text-white dark:focus:bg-sky-600',
429
- active: 'active:bg-sky-600 active:border-sky-600 dark:active:bg-sky-700 dark:active:border-sky-700',
430
- },
431
- blue: {
432
- base: 'border-2 border-blue-500 text-blue-600 dark:border-blue-600 dark:text-blue-500',
433
- hover: 'hover:text-white hover:bg-blue-500 dark:hover:text-white dark:hover:bg-blue-600',
434
- focus: 'focus:text-white focus:bg-blue-500 dark:focus:text-white dark:focus:bg-blue-600',
435
- active: 'active:bg-blue-600 active:border-blue-600 dark:active:bg-blue-700 dark:active:border-blue-700',
436
- },
437
- indigo: {
438
- base: 'border-2 border-indigo-500 text-indigo-600 dark:border-indigo-600 dark:text-indigo-500',
439
- hover: 'hover:text-white hover:bg-indigo-500 dark:hover:text-white dark:hover:bg-indigo-600',
440
- focus: 'focus:text-white focus:bg-indigo-500 dark:focus:text-white dark:focus:bg-indigo-600',
441
- active: 'active:bg-indigo-600 active:border-indigo-600 dark:active:bg-indigo-700 dark:active:border-indigo-700',
442
- },
443
- violet: {
444
- base: 'border-2 border-violet-500 text-violet-600 dark:border-violet-600 dark:text-violet-500',
445
- hover: 'hover:text-white hover:bg-violet-500 dark:hover:text-white dark:hover:bg-violet-600',
446
- focus: 'focus:text-white focus:bg-violet-500 dark:focus:text-white dark:focus:bg-violet-600',
447
- active: 'active:bg-violet-600 active:border-violet-600 dark:active:bg-violet-700 dark:active:border-violet-700',
448
- },
449
- fuchsia: {
450
- base: 'border-2 border-fuchsia-500 text-fuchsia-600 dark:border-fuchsia-600 dark:text-fuchsia-500',
451
- hover: 'hover:text-white hover:bg-fuchsia-500 dark:hover:text-white dark:hover:bg-fuchsia-600',
452
- focus: 'focus:text-white focus:bg-fuchsia-500 dark:focus:text-white dark:focus:bg-fuchsia-600',
453
- active: 'active:bg-fuchsia-600 active:border-fuchsia-600 dark:active:bg-fuchsia-700 dark:active:border-fuchsia-700',
454
- },
455
- purple: {
456
- base: 'border-2 border-purple-500 text-purple-600 dark:border-purple-600 dark:text-purple-500',
457
- hover: 'hover:text-white hover:bg-purple-500 dark:hover:text-white dark:hover:bg-purple-600',
458
- focus: 'focus:text-white focus:bg-purple-500 dark:focus:text-white dark:focus:bg-purple-600',
459
- active: 'active:bg-purple-600 active:border-purple-600 dark:active:bg-purple-700 dark:active:border-purple-700',
460
- },
461
- pink: {
462
- base: 'border-2 border-pink-500 text-pink-600 dark:border-pink-600 dark:text-pink-500',
463
- hover: 'hover:text-white hover:bg-pink-500 dark:hover:text-white dark:hover:bg-pink-600',
464
- focus: 'focus:text-white focus:bg-pink-500 dark:focus:text-white dark:focus:bg-pink-600',
465
- active: 'active:bg-pink-600 active:border-pink-600 dark:active:bg-pink-700 dark:active:border-pink-700',
466
- },
467
- rose: {
468
- base: 'border-2 border-rose-500 text-rose-600 dark:border-rose-600 dark:text-rose-500',
469
- hover: 'hover:text-white hover:bg-rose-500 dark:hover:text-white dark:hover:bg-rose-600',
470
- focus: 'focus:text-white focus:bg-rose-500 dark:focus:text-white dark:focus:bg-rose-600',
471
- active: 'active:bg-rose-600 active:border-rose-600 dark:active:bg-rose-700 dark:active:border-rose-700',
325
+ base: 'border bg-background shadow-xs dark:bg-input/30 dark:hover:bg-input/50',
326
+ colors: {
327
+ primary: {
328
+ base: 'border-primary dark:text-accent-foreground',
329
+ hover: 'hover:bg-primary/90 hover:text-primary-foreground',
330
+ focus: 'focus:bg-primary/90 focus:text-primary-foreground',
331
+ active: 'active:bg-primary/90 active:text-primary-foreground',
332
+ },
333
+ secondary: {
334
+ base: 'border-secondary text-secondary-foreground',
335
+ hover: 'hover:bg-secondary/80',
336
+ focus: 'focus:bg-secondary/80',
337
+ active: 'active:bg-secondary/80',
338
+ },
339
+ slate: {
340
+ base: 'dark:border-slate-600',
341
+ hover: 'hover:bg-slate-200 dark:hover:bg-slate-600',
342
+ focus: 'focus:bg-slate-200 dark:focus:bg-slate-600',
343
+ active: 'active:bg-slate-300 active:border-slate-300 dark:active:bg-slate-700 dark:active:border-slate-700',
344
+ },
345
+ gray: {
346
+ base: 'border-gray-500 text-gray-600 dark:border-gray-600 dark:text-gray-500',
347
+ hover: 'hover:text-white hover:bg-gray-500 dark:hover:text-white dark:hover:bg-gray-600',
348
+ focus: 'focus:text-white focus:bg-gray-500 dark:focus:text-white dark:focus:bg-gray-600',
349
+ active: 'active:bg-gray-600 active:border-gray-600 dark:active:bg-gray-700 dark:active:border-gray-700',
350
+ },
351
+ zinc: {
352
+ base: 'border-zinc-500 text-zinc-600 dark:border-zinc-600 dark:text-zinc-500',
353
+ hover: 'hover:text-white hover:bg-zinc-500 dark:hover:text-white dark:hover:bg-zinc-600',
354
+ focus: 'focus:text-white focus:bg-zinc-500 dark:focus:text-white dark:focus:bg-zinc-600',
355
+ active: 'active:bg-zinc-600 active:border-zinc-600 dark:active:bg-zinc-700 dark:active:border-zinc-700',
356
+ },
357
+ neutral: {
358
+ base: 'border-neutral-500 text-neutral-600 dark:border-neutral-600 dark:text-neutral-500',
359
+ hover: 'hover:text-white hover:bg-neutral-500 dark:hover:text-white dark:hover:bg-neutral-600',
360
+ focus: 'focus:text-white focus:bg-neutral-500 dark:focus:text-white dark:focus:bg-neutral-600',
361
+ active: 'active:bg-neutral-600 active:border-neutral-600 dark:active:bg-neutral-700 dark:active:border-neutral-700',
362
+ },
363
+ stone: {
364
+ base: 'border-stone-500 text-stone-600 dark:border-stone-600 dark:text-stone-500',
365
+ hover: 'hover:text-white hover:bg-stone-500 dark:hover:text-white dark:hover:bg-stone-600',
366
+ focus: 'focus:text-white focus:bg-stone-500 dark:focus:text-white dark:focus:bg-stone-600',
367
+ active: 'active:bg-stone-600 active:border-stone-600 dark:active:bg-stone-700 dark:active:border-stone-700',
368
+ },
369
+ red: {
370
+ base: 'border-red-500 text-red-600 dark:border-red-600 dark:text-red-500',
371
+ hover: 'hover:text-white hover:bg-red-500 dark:hover:text-white dark:hover:bg-red-600',
372
+ focus: 'focus:text-white focus:bg-red-500 dark:focus:text-white dark:focus:bg-red-600',
373
+ active: 'active:bg-red-600 active:border-red-600 dark:active:bg-red-700 dark:active:border-red-700',
374
+ },
375
+ orange: {
376
+ base: 'border-orange-500 text-orange-600 dark:border-orange-600 dark:text-orange-500',
377
+ hover: 'hover:text-white hover:bg-orange-500 dark:hover:text-white dark:hover:bg-orange-600',
378
+ focus: 'focus:text-white focus:bg-orange-500 dark:focus:text-white dark:focus:bg-orange-600',
379
+ active: 'active:bg-orange-600 active:border-orange-600 dark:active:bg-orange-700 dark:active:border-orange-700',
380
+ },
381
+ amber: {
382
+ base: 'border-amber-500 text-amber-600 dark:border-amber-600 dark:text-amber-500',
383
+ hover: 'hover:text-white hover:bg-amber-500 dark:hover:text-white dark:hover:bg-amber-600',
384
+ focus: 'focus:text-white focus:bg-amber-500 dark:focus:text-white dark:focus:bg-amber-600',
385
+ active: 'active:bg-amber-600 active:border-amber-600 dark:active:bg-amber-700 dark:active:border-amber-700',
386
+ },
387
+ yellow: {
388
+ base: 'border-yellow-500 text-yellow-600 dark:border-yellow-600 dark:text-yellow-500',
389
+ hover: 'hover:text-white hover:bg-yellow-500 dark:hover:text-white dark:hover:bg-yellow-600',
390
+ focus: 'focus:text-white focus:bg-yellow-500 dark:focus:text-white dark:focus:bg-yellow-600',
391
+ active: 'active:bg-yellow-600 active:border-yellow-600 dark:active:bg-yellow-700 dark:active:border-yellow-700',
392
+ },
393
+ lime: {
394
+ base: 'border-lime-500 text-lime-600 dark:border-lime-600 dark:text-lime-500',
395
+ hover: 'hover:text-white hover:bg-lime-500 dark:hover:text-white dark:hover:bg-lime-600',
396
+ focus: 'focus:text-white focus:bg-lime-500 dark:focus:text-white dark:focus:bg-lime-600',
397
+ active: 'active:bg-lime-600 active:border-lime-600 dark:active:bg-lime-700 dark:active:border-lime-700',
398
+ },
399
+ green: {
400
+ base: 'border-green-500 text-green-600 dark:border-green-600 dark:text-green-500',
401
+ hover: 'hover:text-white hover:bg-green-500 dark:hover:text-white dark:hover:bg-green-600',
402
+ focus: 'focus:text-white focus:bg-green-500 dark:focus:text-white dark:focus:bg-green-600',
403
+ active: 'active:bg-green-600 active:border-green-600 dark:active:bg-green-700 dark:active:border-green-700',
404
+ },
405
+ emerald: {
406
+ base: 'border-emerald-500 text-emerald-600 dark:border-emerald-600 dark:text-emerald-500',
407
+ hover: 'hover:text-white hover:bg-emerald-500 dark:hover:text-white dark:hover:bg-emerald-600',
408
+ focus: 'focus:text-white focus:bg-emerald-500 dark:focus:text-white dark:focus:bg-emerald-600',
409
+ active: 'active:bg-emerald-600 active:border-emerald-600 dark:active:bg-emerald-700 dark:active:border-emerald-700',
410
+ },
411
+ teal: {
412
+ base: 'border-teal-500 text-teal-600 dark:border-teal-600 dark:text-teal-500',
413
+ hover: 'hover:text-white hover:bg-teal-500 dark:hover:text-white dark:hover:bg-teal-600',
414
+ focus: 'focus:text-white focus:bg-teal-500 dark:focus:text-white dark:focus:bg-teal-600',
415
+ active: 'active:bg-teal-600 active:border-teal-600 dark:active:bg-teal-700 dark:active:border-teal-700',
416
+ },
417
+ cyan: {
418
+ base: 'border-cyan-500 text-cyan-600 dark:border-cyan-600 dark:text-cyan-500',
419
+ hover: 'hover:text-white hover:bg-cyan-500 dark:hover:text-white dark:hover:bg-cyan-600',
420
+ focus: 'focus:text-white focus:bg-cyan-500 dark:focus:text-white dark:focus:bg-cyan-600',
421
+ active: 'active:bg-cyan-600 active:border-cyan-600 dark:active:bg-cyan-700 dark:active:border-cyan-700',
422
+ },
423
+ sky: {
424
+ base: 'border-sky-500 text-sky-600 dark:border-sky-600 dark:text-sky-500',
425
+ hover: 'hover:text-white hover:bg-sky-500 dark:hover:text-white dark:hover:bg-sky-600',
426
+ focus: 'focus:text-white focus:bg-sky-500 dark:focus:text-white dark:focus:bg-sky-600',
427
+ active: 'active:bg-sky-600 active:border-sky-600 dark:active:bg-sky-700 dark:active:border-sky-700',
428
+ },
429
+ blue: {
430
+ base: 'border-blue-500 text-blue-600 dark:border-blue-600 dark:text-blue-500',
431
+ hover: 'hover:text-white hover:bg-blue-500 dark:hover:text-white dark:hover:bg-blue-600',
432
+ focus: 'focus:text-white focus:bg-blue-500 dark:focus:text-white dark:focus:bg-blue-600',
433
+ active: 'active:bg-blue-600 active:border-blue-600 dark:active:bg-blue-700 dark:active:border-blue-700',
434
+ },
435
+ indigo: {
436
+ base: 'border-indigo-500 text-indigo-600 dark:border-indigo-600 dark:text-indigo-500',
437
+ hover: 'hover:text-white hover:bg-indigo-500 dark:hover:text-white dark:hover:bg-indigo-600',
438
+ focus: 'focus:text-white focus:bg-indigo-500 dark:focus:text-white dark:focus:bg-indigo-600',
439
+ active: 'active:bg-indigo-600 active:border-indigo-600 dark:active:bg-indigo-700 dark:active:border-indigo-700',
440
+ },
441
+ violet: {
442
+ base: 'border-violet-500 text-violet-600 dark:border-violet-600 dark:text-violet-500',
443
+ hover: 'hover:text-white hover:bg-violet-500 dark:hover:text-white dark:hover:bg-violet-600',
444
+ focus: 'focus:text-white focus:bg-violet-500 dark:focus:text-white dark:focus:bg-violet-600',
445
+ active: 'active:bg-violet-600 active:border-violet-600 dark:active:bg-violet-700 dark:active:border-violet-700',
446
+ },
447
+ fuchsia: {
448
+ base: 'border-fuchsia-500 text-fuchsia-600 dark:border-fuchsia-600 dark:text-fuchsia-500',
449
+ hover: 'hover:text-white hover:bg-fuchsia-500 dark:hover:text-white dark:hover:bg-fuchsia-600',
450
+ focus: 'focus:text-white focus:bg-fuchsia-500 dark:focus:text-white dark:focus:bg-fuchsia-600',
451
+ active: 'active:bg-fuchsia-600 active:border-fuchsia-600 dark:active:bg-fuchsia-700 dark:active:border-fuchsia-700',
452
+ },
453
+ purple: {
454
+ base: 'border-purple-500 text-purple-600 dark:border-purple-600 dark:text-purple-500',
455
+ hover: 'hover:text-white hover:bg-purple-500 dark:hover:text-white dark:hover:bg-purple-600',
456
+ focus: 'focus:text-white focus:bg-purple-500 dark:focus:text-white dark:focus:bg-purple-600',
457
+ active: 'active:bg-purple-600 active:border-purple-600 dark:active:bg-purple-700 dark:active:border-purple-700',
458
+ },
459
+ pink: {
460
+ base: 'border-pink-500 text-pink-600 dark:border-pink-600 dark:text-pink-500',
461
+ hover: 'hover:text-white hover:bg-pink-500 dark:hover:text-white dark:hover:bg-pink-600',
462
+ focus: 'focus:text-white focus:bg-pink-500 dark:focus:text-white dark:focus:bg-pink-600',
463
+ active: 'active:bg-pink-600 active:border-pink-600 dark:active:bg-pink-700 dark:active:border-pink-700',
464
+ },
465
+ rose: {
466
+ base: 'border-rose-500 text-rose-600 dark:border-rose-600 dark:text-rose-500',
467
+ hover: 'hover:text-white hover:bg-rose-500 dark:hover:text-white dark:hover:bg-rose-600',
468
+ focus: 'focus:text-white focus:bg-rose-500 dark:focus:text-white dark:focus:bg-rose-600',
469
+ active: 'active:bg-rose-600 active:border-rose-600 dark:active:bg-rose-700 dark:active:border-rose-700',
470
+ },
472
471
  },
473
472
  },
474
473
  text: {
475
- slate: {
476
- base: 'bg-transparent',
477
- hover: 'hover:bg-slate-200 dark:hover:bg-slate-700',
478
- focus: 'focus:bg-slate-200 dark:focus:bg-slate-700',
479
- active: 'active:bg-slate-300 dark:active:bg-slate-800',
480
- },
481
- gray: {
482
- base: 'bg-transparent',
483
- hover: 'hover:text-white hover:bg-gray-500 dark:hover:bg-gray-600',
484
- focus: 'focus:text-white focus:bg-gray-500 dark:focus:bg-gray-600',
485
- active: 'active:bg-gray-600 dark:active:bg-gray-700',
486
- },
487
- zinc: {
488
- base: 'bg-transparent',
489
- hover: 'hover:text-white hover:bg-zinc-500 dark:hover:bg-zinc-600',
490
- focus: 'focus:text-white focus:bg-zinc-500 dark:focus:bg-zinc-600',
491
- active: 'active:bg-zinc-600 dark:active:bg-zinc-700',
492
- },
493
- neutral: {
494
- base: 'bg-transparent',
495
- hover: 'hover:text-white hover:bg-neutral-500 dark:hover:bg-neutral-600',
496
- focus: 'focus:text-white focus:bg-neutral-500 dark:focus:bg-neutral-600',
497
- active: 'active:bg-neutral-600 dark:active:bg-neutral-700',
498
- },
499
- stone: {
500
- base: 'bg-transparent',
501
- hover: 'hover:text-white hover:bg-stone-500 dark:hover:bg-stone-600',
502
- focus: 'focus:text-white focus:bg-stone-500 dark:focus:bg-stone-600',
503
- active: 'active:bg-stone-600 dark:active:bg-stone-700',
504
- },
505
- red: {
506
- base: 'bg-transparent',
507
- hover: 'hover:text-white hover:bg-red-500 dark:hover:bg-red-600',
508
- focus: 'focus:text-white focus:bg-red-500 dark:focus:bg-red-600',
509
- active: 'active:bg-red-600 dark:active:bg-red-700',
510
- },
511
- orange: {
512
- base: 'bg-transparent',
513
- hover: 'hover:text-white hover:bg-orange-500 dark:hover:bg-orange-600',
514
- focus: 'focus:text-white focus:bg-orange-500 dark:focus:bg-orange-600',
515
- active: 'active:bg-orange-600 dark:active:bg-orange-700',
516
- },
517
- amber: {
518
- base: 'bg-transparent',
519
- hover: 'hover:text-white hover:bg-amber-500 dark:hover:bg-amber-600',
520
- focus: 'focus:text-white focus:bg-amber-500 dark:focus:bg-amber-600',
521
- active: 'active:bg-amber-600 dark:active:bg-amber-700',
522
- },
523
- yellow: {
524
- base: 'bg-transparent',
525
- hover: 'hover:text-white hover:bg-yellow-500 dark:hover:bg-yellow-600',
526
- focus: 'focus:text-white focus:bg-yellow-500 dark:focus:bg-yellow-600',
527
- active: 'active:bg-yellow-600 dark:active:bg-yellow-700',
528
- },
529
- lime: {
530
- base: 'bg-transparent',
531
- hover: 'hover:text-white hover:bg-lime-500 dark:hover:bg-lime-600',
532
- focus: 'focus:text-white focus:bg-lime-500 dark:focus:bg-lime-600',
533
- active: 'active:bg-lime-600 dark:active:bg-lime-700',
534
- },
535
- green: {
536
- base: 'bg-transparent',
537
- hover: 'hover:text-white hover:bg-green-500 dark:hover:bg-green-600',
538
- focus: 'focus:text-white focus:bg-green-500 dark:focus:bg-green-600',
539
- active: 'active:bg-green-600 dark:active:bg-green-700',
540
- },
541
- emerald: {
542
- base: 'bg-transparent',
543
- hover: 'hover:text-white hover:bg-emerald-500 dark:hover:bg-emerald-600',
544
- focus: 'focus:text-white focus:bg-emerald-500 dark:focus:bg-emerald-600',
545
- active: 'active:bg-emerald-600 dark:active:bg-emerald-700',
546
- },
547
- teal: {
548
- base: 'bg-transparent',
549
- hover: 'hover:text-white hover:bg-teal-500 dark:hover:bg-teal-600',
550
- focus: 'focus:text-white focus:bg-teal-500 dark:focus:bg-teal-600',
551
- active: 'active:bg-teal-600 dark:active:bg-teal-700',
552
- },
553
- cyan: {
554
- base: 'bg-transparent',
555
- hover: 'hover:text-white hover:bg-cyan-500 dark:hover:bg-cyan-600',
556
- focus: 'focus:text-white focus:bg-cyan-500 dark:focus:bg-cyan-600',
557
- active: 'active:bg-cyan-600 dark:active:bg-cyan-700',
558
- },
559
- sky: {
560
- base: 'bg-transparent',
561
- hover: 'hover:text-white hover:bg-sky-500 dark:hover:bg-sky-600',
562
- focus: 'focus:text-white focus:bg-sky-500 dark:focus:bg-sky-600',
563
- active: 'active:bg-sky-600 dark:active:bg-sky-700',
564
- },
565
- blue: {
566
- base: 'bg-transparent',
567
- hover: 'hover:text-white hover:bg-blue-500 dark:hover:bg-blue-600',
568
- focus: 'focus:text-white focus:bg-blue-500 dark:focus:bg-blue-600',
569
- active: 'active:bg-blue-600 dark:active:bg-blue-700',
570
- },
571
- indigo: {
572
- base: 'bg-transparent',
573
- hover: 'hover:text-white hover:bg-indigo-500 dark:hover:bg-indigo-600',
574
- focus: 'focus:text-white focus:bg-indigo-500 dark:focus:bg-indigo-600',
575
- active: 'active:bg-indigo-600 dark:active:bg-indigo-700',
576
- },
577
- violet: {
578
- base: 'bg-transparent',
579
- hover: 'hover:text-white hover:bg-violet-500 dark:hover:bg-violet-600',
580
- focus: 'focus:text-white focus:bg-violet-500 dark:focus:bg-violet-600',
581
- active: 'active:bg-violet-600 dark:active:bg-violet-700',
582
- },
583
- fuchsia: {
584
- base: 'bg-transparent',
585
- hover: 'hover:text-white hover:bg-fuchsia-500 dark:hover:bg-fuchsia-600',
586
- focus: 'focus:text-white focus:bg-fuchsia-500 dark:focus:bg-fuchsia-600',
587
- active: 'active:bg-fuchsia-600 dark:active:bg-fuchsia-700',
588
- },
589
- purple: {
590
- base: 'bg-transparent',
591
- hover: 'hover:text-white hover:bg-purple-500 dark:hover:bg-purple-600',
592
- focus: 'focus:text-white focus:bg-purple-500 dark:focus:bg-purple-600',
593
- active: 'active:bg-purple-600 dark:active:bg-purple-700',
594
- },
595
- pink: {
596
- base: 'bg-transparent',
597
- hover: 'hover:text-white hover:bg-pink-500 dark:hover:bg-pink-600',
598
- focus: 'focus:text-white focus:bg-pink-500 dark:focus:bg-pink-600',
599
- active: 'active:bg-pink-600 dark:active:bg-pink-700',
600
- },
601
- rose: {
602
- base: 'bg-transparent',
603
- hover: 'hover:text-white hover:bg-rose-500 dark:hover:bg-rose-600',
604
- focus: 'focus:text-white focus:bg-rose-500 dark:focus:bg-rose-600',
605
- active: 'active:bg-rose-600 dark:active:bg-rose-700',
474
+ base: 'bg-transparent underline-offset-4 hover:underline',
475
+ colors: {
476
+ primary: {
477
+ base: 'dark:text-accent-foreground',
478
+ },
479
+ secondary: {
480
+ base: 'text-secondary-foreground',
481
+ },
482
+ slate: {
483
+ base: 'text-slate-600 dark:text-slate-400',
484
+ },
485
+ gray: {
486
+ base: 'text-gray-600 dark:text-gray-400',
487
+ },
488
+ zinc: {
489
+ base: 'text-zinc-600 dark:text-zinc-400',
490
+ },
491
+ neutral: {
492
+ base: 'text-neutral-600 dark:text-neutral-400',
493
+ },
494
+ stone: {
495
+ base: 'text-stone-600 dark:text-stone-400',
496
+ },
497
+ red: {
498
+ base: 'text-red-600 dark:text-red-400',
499
+ },
500
+ orange: {
501
+ base: 'text-orange-600 dark:text-orange-400',
502
+ },
503
+ amber: {
504
+ base: 'text-amber-600 dark:text-amber-400',
505
+ },
506
+ yellow: {
507
+ base: 'text-yellow-600 dark:text-yellow-400',
508
+ },
509
+ lime: {
510
+ base: 'text-lime-600 dark:text-lime-400',
511
+ },
512
+ green: {
513
+ base: 'text-green-600 dark:text-green-400',
514
+ },
515
+ emerald: {
516
+ base: 'text-emerald-600 dark:text-emerald-400',
517
+ },
518
+ teal: {
519
+ base: 'text-teal-600 dark:text-teal-400',
520
+ },
521
+ cyan: {
522
+ base: 'text-cyan-600 dark:text-cyan-400',
523
+ },
524
+ sky: {
525
+ base: 'text-sky-600 dark:text-sky-400',
526
+ },
527
+ blue: {
528
+ base: 'text-blue-600 dark:text-blue-400',
529
+ },
530
+ indigo: {
531
+ base: 'text-indigo-600 dark:text-indigo-400',
532
+ },
533
+ violet: {
534
+ base: 'text-violet-600 dark:text-violet-400',
535
+ },
536
+ fuchsia: {
537
+ base: 'text-fuchsia-600 dark:text-fuchsia-400',
538
+ },
539
+ purple: {
540
+ base: 'text-purple-600 dark:text-purple-400',
541
+ },
542
+ pink: {
543
+ base: 'text-pink-600 dark:text-pink-400',
544
+ },
545
+ rose: {
546
+ base: 'text-rose-600 dark:text-rose-400',
547
+ },
606
548
  },
607
549
  },
608
550
  };
609
551
  const sizeClassNames = {
610
552
  small: {
611
- base: 'gap-1 text-sm h-6',
612
- withChildren: 'px-1.5',
553
+ base: 'gap-1 text-xs h-6',
554
+ withChildren: 'px-2 gap-1',
613
555
  icon: {
614
556
  base: 'h-3 w-3',
615
- withChildren: 'h-2 w-2',
557
+ withChildren: 'h-2.5 w-2.5',
616
558
  },
617
559
  },
618
560
  medium: {
619
- base: 'gap-1.5 text-base h-9',
620
- withChildren: 'px-2',
561
+ base: 'gap-2 text-sm font-medium h-9 py-2',
562
+ withChildren: 'px-4 has-[>svg]:px-3',
621
563
  icon: {
622
- base: 'h-4 w-4',
623
- withChildren: 'h-3 w-3',
564
+ base: 'h-5 w-5',
565
+ withChildren: 'h-4 w-4',
624
566
  },
625
567
  },
626
568
  };
627
569
  const Button = (_a) => {
628
570
  var { children, className, size = 'medium', color = 'slate', variant = 'filled', rounded, loading, disabled, prefixIcon: PrefixIcon, suffixIcon: SuffixIcon, unstyled, dataTestId = 'button' } = _a, props = __rest(_a, ["children", "className", "size", "color", "variant", "rounded", "loading", "disabled", "prefixIcon", "suffixIcon", "unstyled", "dataTestId"]);
629
- return (jsxs("button", Object.assign({ className: cn('relative flex aspect-square items-center font-medium duration-200', sizeClassNames[size].base, variantClassNames[variant][color].base, rounded ? 'rounded-full' : 'rounded-md', disabled || loading
630
- ? 'cursor-not-allowed opacity-50'
631
- : !unstyled
632
- ? `${variantClassNames[variant][color].hover} ${variantClassNames[variant][color].focus} ${variantClassNames[variant][color].active} cursor-pointer`
633
- : 'cursor-default', children ? `${sizeClassNames[size].withChildren} aspect-[initial]` : 'justify-center', className), "data-testid": dataTestId, type: "button", disabled: disabled || loading }, props, { children: [loading && (jsx(Flex, { className: cn('absolute inset-0', rounded ? 'rounded-full' : 'rounded-md'), align: "center", justify: "center", children: jsx(Spinner, { className: "h-5 w-5 animate-spin bg-transparent dark:bg-transparent", dataTestId: `${dataTestId}-spinner` }) })), PrefixIcon && (jsx(PrefixIcon, { className: children ? sizeClassNames[size].icon.withChildren : sizeClassNames[size].icon.base })), children, SuffixIcon && (jsx(SuffixIcon, { className: children ? sizeClassNames[size].icon.withChildren : sizeClassNames[size].icon.base }))] })));
571
+ return (jsxs("button", Object.assign({ className: cn('inline-flex aspect-square shrink-0 items-center justify-center font-medium whitespace-nowrap transition-all outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0', 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-visible:ring-[3px]', sizeClassNames[size].base, variantClassNames[variant].base, variantClassNames[variant].colors[color].base, !unstyled &&
572
+ `${variantClassNames[variant].colors[color].hover} ${variantClassNames[variant].colors[color].focus} ${variantClassNames[variant].colors[color].active} cursor-pointer`, unstyled && 'cursor-default', rounded ? 'rounded-full' : 'rounded-md', children ? `${sizeClassNames[size].withChildren} aspect-[initial]` : 'justify-center', className), "data-testid": dataTestId, type: "button", disabled: disabled || loading }, props, { children: [PrefixIcon && !loading && (jsx(PrefixIcon, { className: children ? sizeClassNames[size].icon.withChildren : sizeClassNames[size].icon.base })), loading && (jsx(Spinner, { className: "bg-transparent dark:bg-transparent", spinnerClassName: children ? sizeClassNames[size].icon.withChildren : sizeClassNames[size].icon.base, dataTestId: `${dataTestId}-spinner` })), children, SuffixIcon && !loading && (jsx(SuffixIcon, { className: children ? sizeClassNames[size].icon.withChildren : sizeClassNames[size].icon.base }))] })));
634
573
  };
635
574
 
636
575
  const Badge = (_a) => {
@@ -638,11 +577,48 @@ const Badge = (_a) => {
638
577
  return (jsx(Button, Object.assign({ size: size, dataTestId: dataTestId }, props)));
639
578
  };
640
579
 
641
- const Card = (_a) => {
642
- var { children, className, dataTestId = 'card' } = _a, blockProps = __rest(_a, ["children", "className", "dataTestId"]);
643
- return (jsx(Block, Object.assign({ className: cn('bg-background rounded-lg border p-2 dark:border-slate-700', className), dataTestId: dataTestId }, blockProps, { children: children })));
580
+ const Block = (_a) => {
581
+ var { children, className, centered, container, fullWidth, fullHeight, dataTestId = 'block' } = _a, props = __rest(_a, ["children", "className", "centered", "container", "fullWidth", "fullHeight", "dataTestId"]);
582
+ return (jsx("div", Object.assign({ "data-testid": dataTestId, className: cn(centered && 'mx-auto', container && 'container', fullWidth && 'w-full', fullHeight && 'h-full', className) }, props, { children: children })));
644
583
  };
645
584
 
585
+ const $Card = (_a) => {
586
+ var { className, dataTestId = 'card' } = _a, props = __rest(_a, ["className", "dataTestId"]);
587
+ return (jsx("div", Object.assign({ className: cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className), "data-slot": "card", "data-testid": dataTestId }, props)));
588
+ };
589
+ const CardHeader = (_a) => {
590
+ var { className, dataTestId = 'card-header' } = _a, props = __rest(_a, ["className", "dataTestId"]);
591
+ return (jsx("div", Object.assign({ className: cn('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6', className), "data-slot": "card-header", "data-testid": dataTestId }, props)));
592
+ };
593
+ const CardTitle = (_a) => {
594
+ var { className, dataTestId = 'card-title' } = _a, props = __rest(_a, ["className", "dataTestId"]);
595
+ return (jsx("div", Object.assign({ className: cn('leading-none font-semibold', className), "data-slot": "card-title", "data-testid": dataTestId }, props)));
596
+ };
597
+ const CardDescription = (_a) => {
598
+ var { className, dataTestId = 'card-description' } = _a, props = __rest(_a, ["className", "dataTestId"]);
599
+ return (jsx("div", Object.assign({ className: cn('text-muted-foreground text-sm', className), "data-slot": "card-description", "data-testid": dataTestId }, props)));
600
+ };
601
+ const CardAction = (_a) => {
602
+ var { className, dataTestId = 'card-action' } = _a, props = __rest(_a, ["className", "dataTestId"]);
603
+ return (jsx("div", Object.assign({ className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className), "data-slot": "card-action", "data-testid": dataTestId }, props)));
604
+ };
605
+ const CardContent = (_a) => {
606
+ var { className, dataTestId = 'card-content' } = _a, props = __rest(_a, ["className", "dataTestId"]);
607
+ return (jsx("div", Object.assign({ className: cn('px-6', className), "data-slot": "card-content", "data-testid": dataTestId }, props)));
608
+ };
609
+ const CardFooter = (_a) => {
610
+ var { className, dataTestId = 'card-footer' } = _a, props = __rest(_a, ["className", "dataTestId"]);
611
+ return (jsx("div", Object.assign({ className: cn('flex items-center px-6 [.border-t]:pt-6', className), "data-slot": "card-footer", "data-testid": dataTestId }, props)));
612
+ };
613
+ const Card = Object.assign($Card, {
614
+ Header: CardHeader,
615
+ Footer: CardFooter,
616
+ Title: CardTitle,
617
+ Action: CardAction,
618
+ Description: CardDescription,
619
+ Content: CardContent,
620
+ });
621
+
646
622
  const CollapsibleRoot = (_a) => {
647
623
  var { dataTestId = 'collapsible' } = _a, props = __rest(_a, ["dataTestId"]);
648
624
  return (jsx(CollapsiblePrimitive.Root, Object.assign({ "data-testid": dataTestId }, props)));
@@ -660,6 +636,32 @@ const Collapsible = Object.assign(CollapsibleRoot, {
660
636
  Content: CollapsibleContent,
661
637
  });
662
638
 
639
+ const directionClasses = {
640
+ row: {
641
+ normal: 'flex-row',
642
+ reverse: 'flex-row-reverse',
643
+ },
644
+ column: {
645
+ normal: 'flex-col',
646
+ reverse: 'flex-col-reverse',
647
+ },
648
+ };
649
+ const alignClasses = {
650
+ start: 'items-start',
651
+ center: 'items-center',
652
+ end: 'items-end',
653
+ };
654
+ const justifyClasses = {
655
+ start: 'justify-start',
656
+ center: 'justify-center',
657
+ between: 'justify-between',
658
+ end: 'justify-end',
659
+ };
660
+ const Flex = (_a) => {
661
+ var { children, className, reverse, wrap, direction = 'row', align = 'start', justify = 'start', dataTestId = 'flex' } = _a, blockProps = __rest(_a, ["children", "className", "reverse", "wrap", "direction", "align", "justify", "dataTestId"]);
662
+ return (jsx(Block, Object.assign({ className: cn('flex gap-2', wrap && 'flex-wrap', directionClasses[direction][reverse ? 'reverse' : 'normal'], alignClasses[align], justifyClasses[justify], className), dataTestId: dataTestId }, blockProps, { children: children })));
663
+ };
664
+
663
665
  dayjs.extend(localeData);
664
666
  function useDays(locale = 'en') {
665
667
  return useMemo(() => {
@@ -812,6 +814,12 @@ function usePagination(currentIndex, totalPages) {
812
814
 
813
815
  const TOAST_LIMIT = 1;
814
816
  const TOAST_REMOVE_DELAY = 5000; // 5 seconds
817
+ const actionTypes = {
818
+ ADD_TOAST: 'ADD_TOAST',
819
+ UPDATE_TOAST: 'UPDATE_TOAST',
820
+ DISMISS_TOAST: 'DISMISS_TOAST',
821
+ REMOVE_TOAST: 'REMOVE_TOAST',
822
+ };
815
823
  let count = 0;
816
824
  function genId() {
817
825
  count = (count + 1) % Number.MAX_SAFE_INTEGER;
@@ -833,11 +841,11 @@ const addToRemoveQueue = (toastId) => {
833
841
  };
834
842
  const reducer = (state, action) => {
835
843
  switch (action.type) {
836
- case 'ADD_TOAST':
844
+ case actionTypes.ADD_TOAST:
837
845
  return Object.assign(Object.assign({}, state), { toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT) });
838
- case 'UPDATE_TOAST':
846
+ case actionTypes.UPDATE_TOAST:
839
847
  return Object.assign(Object.assign({}, state), { toasts: state.toasts.map((t) => (t.id === action.toast.id ? Object.assign(Object.assign({}, t), action.toast) : t)) });
840
- case 'DISMISS_TOAST': {
848
+ case actionTypes.DISMISS_TOAST: {
841
849
  const { toastId } = action;
842
850
  // ! Side effects ! - This could be extracted into a dismissToast() action,
843
851
  // but I'll keep it here for simplicity
@@ -852,7 +860,7 @@ const reducer = (state, action) => {
852
860
  return Object.assign(Object.assign({}, state), { toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined
853
861
  ? Object.assign(Object.assign({}, t), { open: false }) : t) });
854
862
  }
855
- case 'REMOVE_TOAST':
863
+ case actionTypes.REMOVE_TOAST:
856
864
  if (action.toastId === undefined) {
857
865
  return Object.assign(Object.assign({}, state), { toasts: [] });
858
866
  }
@@ -871,12 +879,12 @@ function toast(_a) {
871
879
  var props = __rest(_a, []);
872
880
  const id = genId();
873
881
  const update = (props) => dispatch({
874
- type: 'UPDATE_TOAST',
882
+ type: actionTypes.UPDATE_TOAST,
875
883
  toast: Object.assign(Object.assign({}, props), { id }),
876
884
  });
877
- const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
885
+ const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id });
878
886
  dispatch({
879
- type: 'ADD_TOAST',
887
+ type: actionTypes.ADD_TOAST,
880
888
  toast: Object.assign(Object.assign({}, props), { id, open: true, onOpenChange: (open) => {
881
889
  if (!open)
882
890
  dismiss();
@@ -899,7 +907,7 @@ function useToast() {
899
907
  }
900
908
  };
901
909
  }, [state]);
902
- return Object.assign(Object.assign({}, state), { toast, dismiss: (toastId) => dispatch({ type: 'DISMISS_TOAST', toastId }) });
910
+ return Object.assign(Object.assign({}, state), { toast, dismiss: (toastId) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId }) });
903
911
  }
904
912
 
905
913
  const Tooltip = ({ children, className, content, asChild, placement, dataTestId = 'tooltip', }) => (jsx(TooltipPrimitive.Provider, { delayDuration: 200, children: jsxs(TooltipPrimitive.Root, { children: [jsx(TooltipPrimitive.Trigger, { asChild: asChild, "data-testid": `${dataTestId}-trigger`, children: children }), jsx(TooltipPrimitive.Portal, { children: jsx(TooltipPrimitive.Content, { className: cn('animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', 'z-[101] overflow-hidden rounded-md border bg-white px-3 py-1.5 text-sm shadow-md dark:border-slate-700 dark:bg-slate-800 dark:text-white', className), side: placement, sideOffset: 5, "data-testid": `${dataTestId}-content`, children: content }) })] }) }));
@@ -911,24 +919,13 @@ const Label = ({ children, className, description, required, hasErrors, htmlFor,
911
919
  }, className), htmlFor: htmlFor, "data-testid": dataTestId, children: [children, description && (jsx(Tooltip, { content: jsx("div", { className: "max-w-xs", children: description }), placement: "top", asChild: true, dataTestId: `${dataTestId}-description-tooltip`, children: jsx(HelpCircle, { className: "h-4 w-4", "data-testid": `${dataTestId}-description-tooltip-icon` }) })), required && jsx("span", { className: "text-red-600", children: "*" })] }));
912
920
  };
913
921
 
914
- const inputClasses = {
915
- base: {
916
- input: 'dark:bg-transparent peer w-full border focus:ring-0 rounded-md overflow-hidden text-ellipsis',
917
- disabled: 'opacity-60',
918
- },
919
- withoutErrors: {
920
- input: 'border-slate-300 dark:border-slate-700 focus:border-blue-500 dark:focus:border-blue-600 dark:placeholder-slate-400',
921
- extension: 'bg-white dark:bg-transparent border-slate-300 text-slate-600 peer-focus:border-blue-500 dark:peer-focus:border-blue-600 dark:border-slate-700 dark:text-white',
922
- },
923
- withErrors: {
924
- input: 'text-red-600 border-red-500 placeholder-red-500 focus:border-red-500 dark:border-red-600 dark:peer-focus:border-red-600 dark:placeholder-red-600',
925
- extension: 'text-red-600 border-red-500 peer-focus:border-red-500 dark:border-red-600 dark:peer-focus:border-red-600 dark:text-red-500',
926
- },
927
- };
922
+ const baseInputClasses = 'peer file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent' +
923
+ 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 transition-color outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium' +
924
+ 'border-input focus:ring-0';
928
925
  const sizeClasses = {
929
926
  small: {
930
927
  label: 'text-xs',
931
- input: 'text-xs py-1 px-2 h-6',
928
+ input: 'text-sm md:text-xs py-0.5 px-2 h-6 file:h-5 file:text-xs',
932
929
  checkbox: {
933
930
  input: 'w-3 h-3',
934
931
  wrapper: 'h-6 gap-1',
@@ -944,7 +941,7 @@ const sizeClasses = {
944
941
  },
945
942
  medium: {
946
943
  label: 'text-sm',
947
- input: 'text-sm py-2 px-3 h-9',
944
+ input: 'text-base md:text-sm py-1 px-3 h-9 file:h-7 file:text-sm',
948
945
  checkbox: {
949
946
  input: 'w-4 h-4',
950
947
  wrapper: 'h-8 gap-2',
@@ -970,31 +967,17 @@ const BasicInput = (_a) => {
970
967
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, { target: { value: '', checked: false } });
971
968
  };
972
969
  return (jsxs("div", { className: cn('w-full dark:text-white', className), "data-testid": dataTestId, children: [type !== 'checkbox' && memoLabel, jsxs("div", { className: cn('group relative flex', {
970
+ errors: hasErrors,
973
971
  'mt-1': label && type !== 'checkbox',
974
972
  [`items-center ${sizeClasses[size].checkbox.wrapper}`]: type === 'checkbox',
975
- }), title: type !== 'textarea' && typeof props.value === 'string' ? props.value : undefined, children: [type === 'textarea' ? (jsx("textarea", Object.assign({ id: id, className: cn(inputClasses.base.input, sizeClasses[size].input.replace(/ h-\d/g, ''), {
976
- [inputClasses.base.disabled]: props.disabled,
977
- [inputClasses.withoutErrors.input]: !hasErrors,
978
- [inputClasses.withErrors.input]: hasErrors,
979
- 'rounded-r-none border-r-0': SuffixIcon,
980
- }, inputClassName) }, props, { value: props.value, "data-testid": `${dataTestId}-textarea` }))) : type === 'checkbox' ? (jsx("input", Object.assign({ id: id, className: cn('rounded-sm border-slate-300 text-blue-600', sizeClasses[size].checkbox.input, {
981
- [inputClasses.base.disabled]: props.disabled,
982
- 'bg-red-100': hasErrors,
983
- }, inputClassName), type: type, checked: Boolean(props.value) }, props, { "data-testid": `${dataTestId}-checkbox` }))) : (jsx("input", Object.assign({ id: id, className: cn(inputClasses.base.input, sizeClasses[size].input, {
984
- [inputClasses.base.disabled]: props.disabled,
985
- [inputClasses.withoutErrors.input]: !hasErrors,
986
- [inputClasses.withErrors.input]: hasErrors,
987
- 'rounded-r-none border-r-0': SuffixIcon,
988
- }, inputClassName), type: type !== null && type !== void 0 ? type : 'text' }, props, { value: props.value, "data-testid": `${dataTestId}-input` }))), type === 'checkbox' && memoLabel, clearable && (onClear || !!props.value) && !props.disabled && (jsx(XIcon, { className: cn('absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer rounded-full bg-white p-0.5 opacity-0 duration-200 group-hover:opacity-100 hover:bg-slate-200 dark:bg-slate-700 dark:hover:bg-slate-800', sizeClasses[size].clearButton.base, {
973
+ 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-ring/50 has-[textarea:focus-visible]:border-ring has-[textarea:focus-visible]:ring-ring/50 rounded-md has-[input:focus-visible]:ring-[3px] has-[textarea:focus-visible]:ring-[3px]': type !== 'checkbox',
974
+ 'aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40 aria-invalid:[&>input,&>textarea,&>div]:border-destructive': type !== 'checkbox',
975
+ 'shadow-xs transition-[color,box-shadow]': type !== 'checkbox',
976
+ }), title: type !== 'textarea' && typeof props.value === 'string' ? props.value : undefined, "data-testid": `${dataTestId}-wrapper`, "aria-invalid": hasErrors, children: [type === 'textarea' ? (jsx("textarea", Object.assign({ id: id, className: cn(baseInputClasses, sizeClasses[size].input.replace(/ h-\d/g, ''), 'field-sizing-content min-h-16 py-2', SuffixIcon && 'rounded-r-none border-r-0', inputClassName) }, props, { value: props.value, "data-testid": `${dataTestId}-textarea` }))) : type === 'checkbox' ? (jsx("input", Object.assign({ id: id, className: cn('border-input rounded-sm disabled:opacity-50', 'focus:ring-ring/50 focus:border-ring focus:ring-[3px] focus:ring-offset-0', 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40', sizeClasses[size].checkbox.input, hasErrors && 'bg-red-100', inputClassName), type: type, checked: Boolean(props.value) }, props, { "data-testid": `${dataTestId}-checkbox`, "aria-invalid": hasErrors }))) : (jsx("input", Object.assign({ id: id, className: cn(baseInputClasses, sizeClasses[size].input, SuffixIcon && 'rounded-r-none border-r-0', inputClassName), type: type !== null && type !== void 0 ? type : 'text' }, props, { value: props.value, "data-testid": `${dataTestId}-input` }))), type === 'checkbox' && memoLabel, clearable && (onClear || !!props.value) && !props.disabled && (jsx(XIcon, { className: cn('absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer rounded-full bg-white p-0.5 opacity-0 duration-200 group-hover:opacity-100 hover:bg-slate-200 dark:bg-slate-700 dark:hover:bg-slate-800', sizeClasses[size].clearButton.base, {
989
977
  [sizeClasses[size].clearButton.withSuffixIcon]: SuffixIcon,
990
- }), onClick: handleClear, onPointerDown: (event) => event.stopPropagation(), "data-testid": `${dataTestId}-clear` })), type !== 'checkbox' && SuffixIcon && (jsx(BasicInputExtension, { className: extensionClassName, hasErrors: hasErrors, size: size, disabled: props.disabled, onClick: onSuffixIconClick, dataTestId: `${dataTestId}-suffix`, children: jsx(SuffixIcon, { className: sizeClasses[size].suffix.icon }) }))] })] }));
978
+ }), onClick: handleClear, onPointerDown: (event) => event.stopPropagation(), "data-testid": `${dataTestId}-clear` })), type !== 'checkbox' && SuffixIcon && (jsx(BasicInputExtension, { className: extensionClassName, size: size, disabled: props.disabled, onClick: onSuffixIconClick, dataTestId: `${dataTestId}-suffix`, children: jsx(SuffixIcon, { className: sizeClasses[size].suffix.icon }) }))] })] }));
991
979
  };
992
- const BasicInputExtension = ({ children, className, size, hasErrors, disabled, onClick, dataTestId }) => (jsx("div", { className: cn('flex aspect-square items-center justify-center rounded-r-md border border-l-0', sizeClasses[size].suffix.wrapper, {
993
- [inputClasses.base.disabled]: disabled,
994
- [inputClasses.withoutErrors.extension]: !hasErrors,
995
- [inputClasses.withErrors.extension]: hasErrors,
996
- 'cursor-pointer': onClick,
997
- }, className), onClick: !disabled ? onClick : undefined, onPointerDown: (event) => event.stopPropagation(), "data-testid": dataTestId, children: children }));
980
+ const BasicInputExtension = ({ children, className, size, disabled, onClick, dataTestId }) => (jsx("div", { className: cn('dark:bg-input/30 border-input flex aspect-square items-center justify-center rounded-r-md border border-l-0 bg-transparent aria-disabled:opacity-50', sizeClasses[size].suffix.wrapper, onClick && 'cursor-pointer', className), onClick: !disabled ? onClick : undefined, onPointerDown: (event) => event.stopPropagation(), "data-testid": dataTestId, "aria-disabled": disabled, children: children }));
998
981
 
999
982
  const CheckboxInput = (_a) => {
1000
983
  var { dataTestId = 'checkbox-input' } = _a, props = __rest(_a, ["dataTestId"]);
@@ -1273,7 +1256,7 @@ const DateTimeInput = (_a) => {
1273
1256
  setIsOpen(false);
1274
1257
  }
1275
1258
  };
1276
- return (jsxs("div", { className: cn('relative w-full', className), ref: ref, children: [jsx(BasicInput, Object.assign({}, props, { type: "text", readOnly: true, value: displayDate !== null && displayDate !== void 0 ? displayDate : '', hasErrors: hasErrors, onClick: handleOnClick, onKeyUp: handleOnKeyUp, clearable: clearable && !!displayDate, onClear: clearDate, suffixIcon: (type === null || type === void 0 ? void 0 : type.includes('date')) ? CalendarIcon : ClockIcon, onSuffixIconClick: handleOnClick, dataTestId: dataTestId })), isOpen && (jsxs("div", { className: "absolute z-20 mt-2 flex origin-top-left flex-col rounded-md border bg-white shadow-sm duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-white", tabIndex: 0, onBlur: handleOnBlur, ref: calendarRef, "data-testid": `${dataTestId}-popup`, children: [(type === null || type === void 0 ? void 0 : type.includes('date')) && (jsx(DateSelector, { date: date, value: value, minDate: minDate, maxDate: maxDate, locale: displayLocale, calendarView: calendarView, setCalendarView: setCalendarView, setNewDate: setNewDate, dataTestId: `${dataTestId}-date-selector` })), calendarView === 'days' && (jsxs("div", { className: "flex items-center justify-end gap-2 px-3 py-2 select-none", "data-testid": `${dataTestId}-time-selector`, children: [(type === null || type === void 0 ? void 0 : type.includes('time')) && (jsx(TimeSelector, { date: date, step: step, minDate: minDate, maxDate: maxDate, setNewDate: setNewDate, dataTestId: `${dataTestId}-time-selector` })), jsx("div", { className: "cursor-pointer rounded-lg border border-transparent p-1 text-sm font-bold text-blue-600 uppercase transition duration-100 ease-in-out hover:bg-slate-100 dark:text-blue-500 dark:hover:bg-slate-700", onClick: () => setIsOpen(false), "data-testid": `${dataTestId}-ok`, children: "OK" })] }))] }))] }));
1259
+ return (jsxs("div", { className: cn('relative w-full', className), ref: ref, children: [jsx(TextInput, Object.assign({}, props, { readOnly: true, value: displayDate !== null && displayDate !== void 0 ? displayDate : '', hasErrors: hasErrors, onClick: handleOnClick, onKeyUp: handleOnKeyUp, clearable: clearable && !!displayDate, onClear: clearDate, suffixIcon: (type === null || type === void 0 ? void 0 : type.includes('date')) ? CalendarIcon : ClockIcon, onSuffixIconClick: handleOnClick, dataTestId: dataTestId })), isOpen && (jsxs("div", { className: "absolute z-20 mt-2 flex origin-top-left flex-col rounded-md border bg-white shadow-sm duration-200 dark:border-slate-700 dark:bg-slate-900 dark:text-white", tabIndex: 0, onBlur: handleOnBlur, ref: calendarRef, "data-testid": `${dataTestId}-popup`, children: [(type === null || type === void 0 ? void 0 : type.includes('date')) && (jsx(DateSelector, { date: date, value: value, minDate: minDate, maxDate: maxDate, locale: displayLocale, calendarView: calendarView, setCalendarView: setCalendarView, setNewDate: setNewDate, dataTestId: `${dataTestId}-date-selector` })), calendarView === 'days' && (jsxs("div", { className: "flex items-center justify-end gap-2 px-3 py-2 select-none", "data-testid": `${dataTestId}-time-selector`, children: [(type === null || type === void 0 ? void 0 : type.includes('time')) && (jsx(TimeSelector, { date: date, step: step, minDate: minDate, maxDate: maxDate, setNewDate: setNewDate, dataTestId: `${dataTestId}-time-selector` })), jsx("div", { className: "cursor-pointer rounded-lg border border-transparent p-1 text-sm font-bold text-blue-600 uppercase transition duration-100 ease-in-out hover:bg-slate-100 dark:text-blue-500 dark:hover:bg-slate-700", onClick: () => setIsOpen(false), "data-testid": `${dataTestId}-ok`, children: "OK" })] }))] }))] }));
1277
1260
  };
1278
1261
 
1279
1262
  const ListContent = (_a) => {
@@ -1475,7 +1458,7 @@ const SelectInput = (_a) => {
1475
1458
  handleOnSelect(option.id);
1476
1459
  }, dataTestId: option.dataTestId, children: jsx("span", { children: renderItem(option, isNotNullOrUndefined(selectedMap[option.id])) }) }));
1477
1460
  }, [ItemComponent, handleOnSelect, multiple, renderItem, selectedMap]);
1478
- return (jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsx(DropdownMenu.Trigger, { className: cn('w-full', className), dataTestId: `${dataTestId}-trigger`, children: jsx(TextInput, Object.assign({ className: "[&>div>*]:cursor-pointer", inputClassName: "text-left" }, props, { value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), readOnly: true, dataTestId: dataTestId })) }), jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", dataTestId: `${dataTestId}-content`, children: [search && (jsxs(Fragment, { children: [jsx(TextInput, { value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, onKeyUp: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), clearable: !!searchValue.length, onClear: clearSearchValue, dataTestId: `${dataTestId}-search` }), jsx(DropdownMenu.Separator, { className: "w-full", dataTestId: `${dataTestId}-separator` })] })), filteredItems.length === 0 &&
1461
+ return (jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsx(DropdownMenu.Trigger, { className: cn('w-full', className), dataTestId: `${dataTestId}-trigger`, children: jsx(TextInput, Object.assign({}, props, { readOnly: true, className: "[&>div>*]:cursor-pointer", inputClassName: cn('text-left', props.inputClassName), value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), dataTestId: dataTestId })) }), jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", dataTestId: `${dataTestId}-content`, children: [search && (jsxs(Fragment, { children: [jsx(TextInput, { autoFocus: true, value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, onKeyUp: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), clearable: !!searchValue.length, onClear: clearSearchValue, dataTestId: `${dataTestId}-search` }), jsx(DropdownMenu.Separator, { className: "w-full", dataTestId: `${dataTestId}-separator` })] })), filteredItems.length === 0 &&
1479
1462
  (allowAddition && searchValue ? (jsxs("button", { className: "rounded-sm bg-slate-100 py-1.5 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, "data-testid": `${dataTestId}-add-button`, children: ["Add '", searchValue, "'"] })) : (jsx("div", { className: "py-1.5 text-center text-slate-500", "data-testid": `${dataTestId}-no-items`, children: "No items" }))), jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, dataTestId: `${dataTestId}-group`, children: filteredItems.map((item, index) => item.group ? (jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", dataTestId: `${dataTestId}-group-label-${item.id}`, children: item.label }), item.items.map((subItem) => (jsx(RenderOption, Object.assign({}, subItem, { dataTestId: `${dataTestId}-item-${subItem.id}` }), subItem.id))), index < filteredItems.length - 1 && (jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsx(RenderOption, Object.assign({}, item, { dataTestId: `${dataTestId}-item-${item.id}` }), item.id))) })] })] }));
1480
1463
  };
1481
1464
  function isNotNullOrUndefined(value) {
@@ -1517,11 +1500,12 @@ function withForm(Component) {
1517
1500
  return (jsx(Component, Object.assign({}, restProps, field, { onChange: Component === NumberInput
1518
1501
  ? (value) => field.onChange(value.target.valueAsNumber)
1519
1502
  : field.onChange, value: (_a = field.value) !== null && _a !== void 0 ? _a : '', disabled: ((_b = field.disabled) !== null && _b !== void 0 ? _b : restProps.disabled) ||
1520
- formState.isSubmitting, hasErrors: fieldState.error })));
1503
+ formState.isSubmitting, hasErrors: !!fieldState.error })));
1521
1504
  } }));
1522
1505
  };
1523
1506
  }
1524
1507
  const FormInputs = {
1508
+ BasicInput: withForm(BasicInput),
1525
1509
  Text: withForm(TextInput),
1526
1510
  Email: withForm(EmailInput),
1527
1511
  Password: withForm(PasswordInput),
@@ -1552,6 +1536,8 @@ const dotSizeClassNames = {
1552
1536
  },
1553
1537
  };
1554
1538
  const colorClassNames = {
1539
+ primary: 'bg-primary text-primary-foreground',
1540
+ secondary: 'bg-secondary text-secondary-foreground',
1555
1541
  slate: 'bg-slate-500 dark:bg-slate-600',
1556
1542
  gray: 'bg-gray-500 dark:bg-gray-600',
1557
1543
  zinc: 'bg-zinc-500 dark:bg-zinc-600',
@@ -1987,7 +1973,6 @@ const SidebarContextProvider = (_a) => {
1987
1973
  var { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children } = _a, props = __rest(_a, ["defaultOpen", "open", "onOpenChange", "className", "style", "children"]);
1988
1974
  const isMobile = useIsMobile();
1989
1975
  const [openMobile, setOpenMobile] = useState(false);
1990
- useRef(typeof document === 'undefined' ? null : document.documentElement);
1991
1976
  // This is the internal state of the sidebar.
1992
1977
  // We use openProp and setOpenProp for control from outside the component.
1993
1978
  const [_open, _setOpen] = useState(getValueFromCookie(SIDEBAR_COOKIE_NAME, defaultOpen));