beez-ui 0.9.0 → 0.9.1

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.
@@ -12,10 +12,11 @@ import { classifyFiles } from "../lib/file-acceptance.js";
12
12
  import { formatFileSize } from "../lib/format-file-size.js";
13
13
  import { AnimatedListItem } from "./animated-list-item.js";
14
14
  import { Button } from "./button.js";
15
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  const COMPLETE_PROGRESS = 100;
17
17
  const FILE_UPLOAD_DROP_ZONE_DEFAULT_LABELS = {
18
18
  uploadAction: "Elegí un archivo",
19
+ uploadActionMobileSuffix: "",
19
20
  dragAndDrop: "o arrastralo acá",
20
21
  input: "Subir archivos"
21
22
  };
@@ -26,7 +27,7 @@ const FILE_UPLOAD_DROP_ZONE_DEFAULT_LABELS = {
26
27
  * @returns The drop zone.
27
28
  */
28
29
  export function FileUploadDropZone(t0) {
29
- const $ = _c(63);
30
+ const $ = _c(66);
30
31
  const { hint, isDisabled: t1, accept, allowsMultiple: t2, maxSize, onDropFiles, onDropUnacceptedFiles, onSizeLimitExceed, inputId, labels, className } = t0;
31
32
  const isDisabled = t1 === undefined ? false : t1;
32
33
  const allowsMultiple = t2 === undefined ? true : t2;
@@ -223,79 +224,91 @@ export function FileUploadDropZone(t0) {
223
224
  t20 = $[35];
224
225
  }
225
226
  let t21;
226
- if ($[36] !== isDisabled || $[37] !== resolvedLabels.uploadAction || $[38] !== t20) {
227
- t21 = /* @__PURE__ */ _jsx(Button, {
227
+ if ($[36] !== resolvedLabels.uploadActionMobileSuffix) {
228
+ t21 = resolvedLabels.uploadActionMobileSuffix ? /* @__PURE__ */ _jsxs(_Fragment, { children: [" ", /* @__PURE__ */ _jsx("span", {
229
+ className: "md:hidden",
230
+ children: resolvedLabels.uploadActionMobileSuffix
231
+ })] }) : null;
232
+ $[36] = resolvedLabels.uploadActionMobileSuffix;
233
+ $[37] = t21;
234
+ } else {
235
+ t21 = $[37];
236
+ }
237
+ let t22;
238
+ if ($[38] !== isDisabled || $[39] !== resolvedLabels.uploadAction || $[40] !== t20 || $[41] !== t21) {
239
+ t22 = /* @__PURE__ */ _jsxs(Button, {
228
240
  className: "h-auto p-0 font-semibold",
229
241
  disabled: isDisabled,
230
242
  type: "button",
231
243
  variant: "link",
232
244
  onClick: t20,
233
- children: resolvedLabels.uploadAction
245
+ children: [resolvedLabels.uploadAction, t21]
234
246
  });
235
- $[36] = isDisabled;
236
- $[37] = resolvedLabels.uploadAction;
237
- $[38] = t20;
238
- $[39] = t21;
247
+ $[38] = isDisabled;
248
+ $[39] = resolvedLabels.uploadAction;
249
+ $[40] = t20;
250
+ $[41] = t21;
251
+ $[42] = t22;
239
252
  } else {
240
- t21 = $[39];
253
+ t22 = $[42];
241
254
  }
242
- let t22;
243
- if ($[40] !== resolvedLabels.dragAndDrop) {
244
- t22 = /* @__PURE__ */ _jsx("span", {
255
+ let t23;
256
+ if ($[43] !== resolvedLabels.dragAndDrop) {
257
+ t23 = /* @__PURE__ */ _jsx("span", {
245
258
  className: "text-sm max-md:hidden",
246
259
  children: resolvedLabels.dragAndDrop
247
260
  });
248
- $[40] = resolvedLabels.dragAndDrop;
249
- $[41] = t22;
261
+ $[43] = resolvedLabels.dragAndDrop;
262
+ $[44] = t23;
250
263
  } else {
251
- t22 = $[41];
264
+ t23 = $[44];
252
265
  }
253
- let t23;
254
- if ($[42] !== t19 || $[43] !== t21 || $[44] !== t22) {
255
- t23 = /* @__PURE__ */ _jsxs("div", {
266
+ let t24;
267
+ if ($[45] !== t19 || $[46] !== t22 || $[47] !== t23) {
268
+ t24 = /* @__PURE__ */ _jsxs("div", {
256
269
  className: "flex flex-wrap items-center justify-center gap-1",
257
270
  children: [
258
271
  t19,
259
- t21,
260
- t22
272
+ t22,
273
+ t23
261
274
  ]
262
275
  });
263
- $[42] = t19;
264
- $[43] = t21;
265
- $[44] = t22;
266
- $[45] = t23;
276
+ $[45] = t19;
277
+ $[46] = t22;
278
+ $[47] = t23;
279
+ $[48] = t24;
267
280
  } else {
268
- t23 = $[45];
281
+ t24 = $[48];
269
282
  }
270
- let t24;
271
- if ($[46] !== hint || $[47] !== hintId || $[48] !== isInvalid) {
272
- t24 = hint ? /* @__PURE__ */ _jsx("p", {
283
+ let t25;
284
+ if ($[49] !== hint || $[50] !== hintId || $[51] !== isInvalid) {
285
+ t25 = hint ? /* @__PURE__ */ _jsx("p", {
273
286
  id: hintId,
274
287
  className: cn("m-0 text-xs transition-colors", isInvalid && "text-destructive"),
275
288
  children: hint
276
289
  }) : null;
277
- $[46] = hint;
278
- $[47] = hintId;
279
- $[48] = isInvalid;
280
- $[49] = t24;
281
- } else {
282
- t24 = $[49];
283
- }
284
- let t25;
285
- if ($[50] !== t23 || $[51] !== t24) {
286
- t25 = /* @__PURE__ */ _jsxs("div", {
287
- className: "flex flex-col gap-1 text-center",
288
- children: [t23, t24]
289
- });
290
- $[50] = t23;
291
- $[51] = t24;
290
+ $[49] = hint;
291
+ $[50] = hintId;
292
+ $[51] = isInvalid;
292
293
  $[52] = t25;
293
294
  } else {
294
295
  t25 = $[52];
295
296
  }
296
297
  let t26;
297
- if ($[53] !== handleDragOver || $[54] !== handleDrop || $[55] !== openFilePicker || $[56] !== t10 || $[57] !== t11 || $[58] !== t12 || $[59] !== t16 || $[60] !== t25 || $[61] !== t9) {
298
+ if ($[53] !== t24 || $[54] !== t25) {
298
299
  t26 = /* @__PURE__ */ _jsxs("div", {
300
+ className: "flex flex-col gap-1 text-center",
301
+ children: [t24, t25]
302
+ });
303
+ $[53] = t24;
304
+ $[54] = t25;
305
+ $[55] = t26;
306
+ } else {
307
+ t26 = $[55];
308
+ }
309
+ let t27;
310
+ if ($[56] !== handleDragOver || $[57] !== handleDrop || $[58] !== openFilePicker || $[59] !== t10 || $[60] !== t11 || $[61] !== t12 || $[62] !== t16 || $[63] !== t26 || $[64] !== t9) {
311
+ t27 = /* @__PURE__ */ _jsxs("div", {
299
312
  "data-slot": "file-upload-drop-zone",
300
313
  "data-dragging": t9,
301
314
  "data-disabled": t10,
@@ -307,22 +320,22 @@ export function FileUploadDropZone(t0) {
307
320
  onDragLeave: handleDragLeave,
308
321
  onDragEnd: handleDragLeave,
309
322
  onDrop: handleDrop,
310
- children: [t16, t25]
323
+ children: [t16, t26]
311
324
  });
312
- $[53] = handleDragOver;
313
- $[54] = handleDrop;
314
- $[55] = openFilePicker;
315
- $[56] = t10;
316
- $[57] = t11;
317
- $[58] = t12;
318
- $[59] = t16;
319
- $[60] = t25;
320
- $[61] = t9;
321
- $[62] = t26;
322
- } else {
323
- t26 = $[62];
324
- }
325
- return t26;
325
+ $[56] = handleDragOver;
326
+ $[57] = handleDrop;
327
+ $[58] = openFilePicker;
328
+ $[59] = t10;
329
+ $[60] = t11;
330
+ $[61] = t12;
331
+ $[62] = t16;
332
+ $[63] = t26;
333
+ $[64] = t9;
334
+ $[65] = t27;
335
+ } else {
336
+ t27 = $[65];
337
+ }
338
+ return t27;
326
339
  }
327
340
  function _temp(event_3) {
328
341
  return event_3.stopPropagation();
@@ -336,154 +349,233 @@ const FILE_UPLOAD_ITEM_DEFAULT_LABELS = {
336
349
  progress: "Progreso de subida"
337
350
  };
338
351
  /**
339
- * Renders one file with its size, status, progress bar, delete action and, after a failure, a
340
- * retry action. Place it inside `FileUploadList` so additions and removals animate.
352
+ * Renders one file with its size, status, progress (a bar or a background fill), delete action
353
+ * and, after a failure, a retry action. Place it inside `FileUploadList` so additions and removals animate.
341
354
  * @param props - File metadata, progress, callbacks and optional copy.
342
355
  * @returns The list item.
343
356
  */
344
357
  export function FileUploadItem(t0) {
345
- const $ = _c(46);
346
- const { name, size, progress, failed: t1, onDelete, isDeleteDisabled, onRetry, locale, labels, className } = t0;
358
+ const $ = _c(70);
359
+ const { name, size, progress, failed: t1, onDelete, isDeleteDisabled, onRetry, locale, labels, icon, progressVariant: t2, className } = t0;
347
360
  const failed = t1 === undefined ? false : t1;
348
- let t2;
361
+ const progressVariant = t2 === undefined ? "bar" : t2;
362
+ let t3;
349
363
  if ($[0] !== labels) {
350
- t2 = {
364
+ t3 = {
351
365
  ...FILE_UPLOAD_ITEM_DEFAULT_LABELS,
352
366
  ...labels
353
367
  };
354
368
  $[0] = labels;
355
- $[1] = t2;
369
+ $[1] = t3;
356
370
  } else {
357
- t2 = $[1];
371
+ t3 = $[1];
358
372
  }
359
- const resolvedLabels = t2;
373
+ const resolvedLabels = t3;
360
374
  const clampedProgress = Math.min(Math.max(progress, 0), COMPLETE_PROGRESS);
361
375
  const isComplete = clampedProgress === COMPLETE_PROGRESS && !failed;
362
- const t3 = failed || undefined;
376
+ const isFillVariant = progressVariant === "fill";
363
377
  let t4;
364
- if ($[2] !== className) {
365
- t4 = cn("relative flex w-full min-w-0 gap-3 rounded-xl bg-background p-4 ring-1 ring-border ring-inset data-failed:ring-2 data-failed:ring-destructive", className);
366
- $[2] = className;
367
- $[3] = t4;
378
+ if ($[2] !== clampedProgress || $[3] !== resolvedLabels.progress) {
379
+ t4 = {
380
+ "aria-label": resolvedLabels.progress,
381
+ "aria-valuemax": COMPLETE_PROGRESS,
382
+ "aria-valuemin": 0,
383
+ "aria-valuenow": clampedProgress,
384
+ role: "progressbar"
385
+ };
386
+ $[2] = clampedProgress;
387
+ $[3] = resolvedLabels.progress;
388
+ $[4] = t4;
368
389
  } else {
369
- t4 = $[3];
390
+ t4 = $[4];
370
391
  }
371
- let t5;
372
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
373
- t5 = /* @__PURE__ */ _jsx(FileIcon, {
392
+ const progressBarProps = t4;
393
+ const t5 = failed || undefined;
394
+ let t6;
395
+ if ($[5] !== className) {
396
+ t6 = cn("group/file-item relative flex w-full min-w-0 gap-3 overflow-hidden rounded-xl bg-background p-4", className);
397
+ $[5] = className;
398
+ $[6] = t6;
399
+ } else {
400
+ t6 = $[6];
401
+ }
402
+ let t7;
403
+ if ($[7] !== clampedProgress || $[8] !== failed || $[9] !== isComplete || $[10] !== isFillVariant || $[11] !== progressBarProps) {
404
+ t7 = isFillVariant && !failed ? /* @__PURE__ */ _jsx("div", {
405
+ ...progressBarProps,
406
+ className: cn("absolute inset-0 bg-muted transition-[translate,opacity] duration-150", isComplete && "opacity-0"),
407
+ style: { translate: `${clampedProgress - COMPLETE_PROGRESS}% 0` }
408
+ }) : null;
409
+ $[7] = clampedProgress;
410
+ $[8] = failed;
411
+ $[9] = isComplete;
412
+ $[10] = isFillVariant;
413
+ $[11] = progressBarProps;
414
+ $[12] = t7;
415
+ } else {
416
+ t7 = $[12];
417
+ }
418
+ let t8;
419
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
420
+ t8 = /* @__PURE__ */ _jsx("span", {
421
+ "data-slot": "file-upload-item-outline",
422
+ "aria-hidden": true,
423
+ className: "pointer-events-none absolute inset-0 z-[1] rounded-[inherit] ring-1 ring-border ring-inset group-data-failed/file-item:ring-2 group-data-failed/file-item:ring-destructive"
424
+ });
425
+ $[13] = t8;
426
+ } else {
427
+ t8 = $[13];
428
+ }
429
+ let t9;
430
+ if ($[14] !== icon) {
431
+ t9 = icon ?? /* @__PURE__ */ _jsx(FileIcon, {
374
432
  "aria-hidden": true,
375
433
  className: "size-10 shrink-0 stroke-[1.25] text-muted-foreground"
376
434
  });
377
- $[4] = t5;
435
+ $[14] = icon;
436
+ $[15] = t9;
378
437
  } else {
379
- t5 = $[4];
438
+ t9 = $[15];
380
439
  }
381
- let t6;
382
- if ($[5] !== name) {
383
- t6 = /* @__PURE__ */ _jsx("p", {
440
+ let t10;
441
+ if ($[16] !== t9) {
442
+ t10 = /* @__PURE__ */ _jsx("span", {
443
+ className: "relative flex shrink-0",
444
+ children: t9
445
+ });
446
+ $[16] = t9;
447
+ $[17] = t10;
448
+ } else {
449
+ t10 = $[17];
450
+ }
451
+ let t11;
452
+ if ($[18] !== name) {
453
+ t11 = /* @__PURE__ */ _jsx("p", {
384
454
  className: "m-0 max-w-full text-sm font-medium break-words text-foreground",
385
455
  children: name
386
456
  });
387
- $[5] = name;
388
- $[6] = t6;
457
+ $[18] = name;
458
+ $[19] = t11;
389
459
  } else {
390
- t6 = $[6];
460
+ t11 = $[19];
391
461
  }
392
- let t7;
393
- if ($[7] !== locale || $[8] !== size) {
394
- t7 = formatFileSize(size, { locale });
395
- $[7] = locale;
396
- $[8] = size;
397
- $[9] = t7;
462
+ let t12;
463
+ if ($[20] !== locale || $[21] !== size) {
464
+ t12 = formatFileSize(size, { locale });
465
+ $[20] = locale;
466
+ $[21] = size;
467
+ $[22] = t12;
398
468
  } else {
399
- t7 = $[9];
469
+ t12 = $[22];
400
470
  }
401
- let t8;
402
- if ($[10] !== t7) {
403
- t8 = /* @__PURE__ */ _jsx("span", {
471
+ let t13;
472
+ if ($[23] !== t12) {
473
+ t13 = /* @__PURE__ */ _jsx("span", {
404
474
  className: "truncate whitespace-nowrap text-muted-foreground",
405
- children: t7
475
+ children: t12
406
476
  });
407
- $[10] = t7;
408
- $[11] = t8;
477
+ $[23] = t12;
478
+ $[24] = t13;
409
479
  } else {
410
- t8 = $[11];
480
+ t13 = $[24];
411
481
  }
412
- let t9;
413
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
414
- t9 = /* @__PURE__ */ _jsx("span", {
482
+ let t14;
483
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
484
+ t14 = /* @__PURE__ */ _jsx("span", {
415
485
  "aria-hidden": true,
416
486
  className: "h-3 w-px rounded-full bg-border"
417
487
  });
418
- $[12] = t9;
488
+ $[25] = t14;
419
489
  } else {
420
- t9 = $[12];
490
+ t14 = $[25];
421
491
  }
422
- let t10;
423
- if ($[13] !== failed || $[14] !== isComplete || $[15] !== resolvedLabels.complete || $[16] !== resolvedLabels.failed || $[17] !== resolvedLabels.uploading) {
424
- t10 = /* @__PURE__ */ _jsx("span", {
492
+ let t15;
493
+ if ($[26] !== failed || $[27] !== isComplete || $[28] !== resolvedLabels.complete || $[29] !== resolvedLabels.failed || $[30] !== resolvedLabels.uploading) {
494
+ t15 = failed ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(XCircleIcon, {
495
+ "aria-hidden": true,
496
+ className: "size-4 text-destructive"
497
+ }), /* @__PURE__ */ _jsx("span", {
498
+ className: "text-destructive",
499
+ children: resolvedLabels.failed
500
+ })] }) : isComplete ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(CheckCircle2Icon, {
501
+ "aria-hidden": true,
502
+ className: "size-4 text-green-600 dark:text-green-500"
503
+ }), /* @__PURE__ */ _jsx("span", {
504
+ className: "text-green-700 dark:text-green-400",
505
+ children: resolvedLabels.complete
506
+ })] }) : /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(UploadCloudIcon, {
507
+ "aria-hidden": true,
508
+ className: "size-4 text-muted-foreground"
509
+ }), /* @__PURE__ */ _jsx("span", {
510
+ className: "text-muted-foreground",
511
+ children: resolvedLabels.uploading
512
+ })] });
513
+ $[26] = failed;
514
+ $[27] = isComplete;
515
+ $[28] = resolvedLabels.complete;
516
+ $[29] = resolvedLabels.failed;
517
+ $[30] = resolvedLabels.uploading;
518
+ $[31] = t15;
519
+ } else {
520
+ t15 = $[31];
521
+ }
522
+ let t16;
523
+ if ($[32] !== clampedProgress || $[33] !== failed || $[34] !== isFillVariant) {
524
+ t16 = isFillVariant && !failed ? /* @__PURE__ */ _jsxs("span", {
525
+ className: "font-normal text-muted-foreground tabular-nums",
526
+ children: [clampedProgress, "%"]
527
+ }) : null;
528
+ $[32] = clampedProgress;
529
+ $[33] = failed;
530
+ $[34] = isFillVariant;
531
+ $[35] = t16;
532
+ } else {
533
+ t16 = $[35];
534
+ }
535
+ let t17;
536
+ if ($[36] !== t15 || $[37] !== t16) {
537
+ t17 = /* @__PURE__ */ _jsxs("span", {
425
538
  className: "flex items-center gap-1 font-medium",
426
539
  role: "status",
427
- children: failed ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(XCircleIcon, {
428
- "aria-hidden": true,
429
- className: "size-4 text-destructive"
430
- }), /* @__PURE__ */ _jsx("span", {
431
- className: "text-destructive",
432
- children: resolvedLabels.failed
433
- })] }) : isComplete ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(CheckCircle2Icon, {
434
- "aria-hidden": true,
435
- className: "size-4 text-green-600 dark:text-green-500"
436
- }), /* @__PURE__ */ _jsx("span", {
437
- className: "text-green-700 dark:text-green-400",
438
- children: resolvedLabels.complete
439
- })] }) : /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(UploadCloudIcon, {
440
- "aria-hidden": true,
441
- className: "size-4 text-muted-foreground"
442
- }), /* @__PURE__ */ _jsx("span", {
443
- className: "text-muted-foreground",
444
- children: resolvedLabels.uploading
445
- })] })
540
+ children: [t15, t16]
446
541
  });
447
- $[13] = failed;
448
- $[14] = isComplete;
449
- $[15] = resolvedLabels.complete;
450
- $[16] = resolvedLabels.failed;
451
- $[17] = resolvedLabels.uploading;
452
- $[18] = t10;
542
+ $[36] = t15;
543
+ $[37] = t16;
544
+ $[38] = t17;
453
545
  } else {
454
- t10 = $[18];
546
+ t17 = $[38];
455
547
  }
456
- let t11;
457
- if ($[19] !== t10 || $[20] !== t8) {
458
- t11 = /* @__PURE__ */ _jsxs("div", {
548
+ let t18;
549
+ if ($[39] !== t13 || $[40] !== t17) {
550
+ t18 = /* @__PURE__ */ _jsxs("div", {
459
551
  className: "mt-0.5 flex items-center gap-2 text-sm",
460
552
  children: [
461
- t8,
462
- t9,
463
- t10
553
+ t13,
554
+ t14,
555
+ t17
464
556
  ]
465
557
  });
466
- $[19] = t10;
467
- $[20] = t8;
468
- $[21] = t11;
558
+ $[39] = t13;
559
+ $[40] = t17;
560
+ $[41] = t18;
469
561
  } else {
470
- t11 = $[21];
562
+ t18 = $[41];
471
563
  }
472
- let t12;
473
- if ($[22] !== t11 || $[23] !== t6) {
474
- t12 = /* @__PURE__ */ _jsxs("div", {
564
+ let t19;
565
+ if ($[42] !== t11 || $[43] !== t18) {
566
+ t19 = /* @__PURE__ */ _jsxs("div", {
475
567
  className: "min-w-0 flex-1",
476
- children: [t6, t11]
568
+ children: [t11, t18]
477
569
  });
478
- $[22] = t11;
479
- $[23] = t6;
480
- $[24] = t12;
570
+ $[42] = t11;
571
+ $[43] = t18;
572
+ $[44] = t19;
481
573
  } else {
482
- t12 = $[24];
574
+ t19 = $[44];
483
575
  }
484
- let t13;
485
- if ($[25] !== isDeleteDisabled || $[26] !== name || $[27] !== onDelete || $[28] !== resolvedLabels.delete) {
486
- t13 = onDelete ? /* @__PURE__ */ _jsx(Button, {
576
+ let t20;
577
+ if ($[45] !== isDeleteDisabled || $[46] !== name || $[47] !== onDelete || $[48] !== resolvedLabels.delete) {
578
+ t20 = onDelete ? /* @__PURE__ */ _jsx(Button, {
487
579
  "aria-label": `${resolvedLabels.delete} ${name}`,
488
580
  className: "-mt-2 -mr-2 self-start text-muted-foreground",
489
581
  disabled: isDeleteDisabled,
@@ -493,44 +585,40 @@ export function FileUploadItem(t0) {
493
585
  onClick: onDelete,
494
586
  children: /* @__PURE__ */ _jsx(Trash2Icon, { "aria-hidden": true })
495
587
  }) : null;
496
- $[25] = isDeleteDisabled;
497
- $[26] = name;
498
- $[27] = onDelete;
499
- $[28] = resolvedLabels.delete;
500
- $[29] = t13;
588
+ $[45] = isDeleteDisabled;
589
+ $[46] = name;
590
+ $[47] = onDelete;
591
+ $[48] = resolvedLabels.delete;
592
+ $[49] = t20;
501
593
  } else {
502
- t13 = $[29];
594
+ t20 = $[49];
503
595
  }
504
- let t14;
505
- if ($[30] !== t12 || $[31] !== t13) {
506
- t14 = /* @__PURE__ */ _jsxs("div", {
596
+ let t21;
597
+ if ($[50] !== t19 || $[51] !== t20) {
598
+ t21 = /* @__PURE__ */ _jsxs("div", {
507
599
  className: "flex w-full min-w-0 flex-1",
508
- children: [t12, t13]
600
+ children: [t19, t20]
509
601
  });
510
- $[30] = t12;
511
- $[31] = t13;
512
- $[32] = t14;
602
+ $[50] = t19;
603
+ $[51] = t20;
604
+ $[52] = t21;
513
605
  } else {
514
- t14 = $[32];
606
+ t21 = $[52];
515
607
  }
516
- let t15;
517
- if ($[33] !== clampedProgress || $[34] !== failed || $[35] !== onRetry || $[36] !== resolvedLabels.progress || $[37] !== resolvedLabels.retry) {
518
- t15 = failed ? onRetry ? /* @__PURE__ */ _jsx(Button, {
608
+ let t22;
609
+ if ($[53] !== clampedProgress || $[54] !== failed || $[55] !== isFillVariant || $[56] !== onRetry || $[57] !== progressBarProps || $[58] !== resolvedLabels.retry) {
610
+ t22 = failed ? onRetry ? /* @__PURE__ */ _jsx(Button, {
519
611
  className: "mt-1.5 h-auto p-0 text-destructive",
520
612
  size: "sm",
521
613
  type: "button",
522
614
  variant: "link",
523
615
  onClick: onRetry,
524
616
  children: resolvedLabels.retry
525
- }) : null : /* @__PURE__ */ _jsxs("div", {
617
+ }) : null : isFillVariant ? null : /* @__PURE__ */ _jsxs("div", {
526
618
  className: "mt-1 flex w-full items-center gap-3",
527
619
  children: [/* @__PURE__ */ _jsx("div", {
528
- "aria-label": resolvedLabels.progress,
529
- "aria-valuemax": COMPLETE_PROGRESS,
530
- "aria-valuemin": 0,
531
- "aria-valuenow": clampedProgress,
620
+ ...progressBarProps,
532
621
  className: "h-2 flex-1 overflow-hidden rounded-full bg-muted",
533
- role: "progressbar",
534
622
  children: /* @__PURE__ */ _jsx("div", {
535
623
  className: "h-full rounded-full bg-primary transition-[width] duration-150",
536
624
  style: { width: `${clampedProgress}%` }
@@ -540,43 +628,53 @@ export function FileUploadItem(t0) {
540
628
  children: [clampedProgress, "%"]
541
629
  })]
542
630
  });
543
- $[33] = clampedProgress;
544
- $[34] = failed;
545
- $[35] = onRetry;
546
- $[36] = resolvedLabels.progress;
547
- $[37] = resolvedLabels.retry;
548
- $[38] = t15;
631
+ $[53] = clampedProgress;
632
+ $[54] = failed;
633
+ $[55] = isFillVariant;
634
+ $[56] = onRetry;
635
+ $[57] = progressBarProps;
636
+ $[58] = resolvedLabels.retry;
637
+ $[59] = t22;
549
638
  } else {
550
- t15 = $[38];
639
+ t22 = $[59];
551
640
  }
552
- let t16;
553
- if ($[39] !== t14 || $[40] !== t15) {
554
- t16 = /* @__PURE__ */ _jsxs("div", {
555
- className: "flex min-w-0 flex-1 flex-col items-start",
556
- children: [t14, t15]
641
+ let t23;
642
+ if ($[60] !== t21 || $[61] !== t22) {
643
+ t23 = /* @__PURE__ */ _jsxs("div", {
644
+ className: "relative flex min-w-0 flex-1 flex-col items-start",
645
+ children: [t21, t22]
557
646
  });
558
- $[39] = t14;
559
- $[40] = t15;
560
- $[41] = t16;
647
+ $[60] = t21;
648
+ $[61] = t22;
649
+ $[62] = t23;
561
650
  } else {
562
- t16 = $[41];
651
+ t23 = $[62];
563
652
  }
564
- let t17;
565
- if ($[42] !== t16 || $[43] !== t3 || $[44] !== t4) {
566
- t17 = /* @__PURE__ */ _jsxs(AnimatedListItem, {
653
+ let t24;
654
+ if ($[63] !== progressVariant || $[64] !== t10 || $[65] !== t23 || $[66] !== t5 || $[67] !== t6 || $[68] !== t7) {
655
+ t24 = /* @__PURE__ */ _jsxs(AnimatedListItem, {
567
656
  "data-slot": "file-upload-item",
568
- "data-failed": t3,
569
- className: t4,
570
- children: [t5, t16]
657
+ "data-failed": t5,
658
+ "data-progress-variant": progressVariant,
659
+ className: t6,
660
+ children: [
661
+ t7,
662
+ t8,
663
+ t10,
664
+ t23
665
+ ]
571
666
  });
572
- $[42] = t16;
573
- $[43] = t3;
574
- $[44] = t4;
575
- $[45] = t17;
667
+ $[63] = progressVariant;
668
+ $[64] = t10;
669
+ $[65] = t23;
670
+ $[66] = t5;
671
+ $[67] = t6;
672
+ $[68] = t7;
673
+ $[69] = t24;
576
674
  } else {
577
- t17 = $[45];
675
+ t24 = $[69];
578
676
  }
579
- return t17;
677
+ return t24;
580
678
  }
581
679
  /**
582
680
  * Lays out a drop zone and its file list.