@roy-ui/ui 0.0.15 → 0.0.16

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.
@@ -151,13 +151,16 @@
151
151
  }
152
152
  .royui-upload__row {
153
153
  display: flex;
154
- align-items: flex-start;
154
+ align-items: center;
155
155
  gap: 11px;
156
156
  padding: 10px 11px;
157
157
  border-radius: 10px;
158
158
  background: var(--royui-upload-row);
159
159
  box-shadow: inset 0 0 0 1px var(--royui-upload-row-line);
160
160
  animation: royui-upload-row-in 280ms var(--royui-upload-ease) both;
161
+ transition:
162
+ background 220ms var(--royui-upload-ease),
163
+ box-shadow 220ms var(--royui-upload-ease);
161
164
  }
162
165
  @keyframes royui-upload-row-in {
163
166
  from {
@@ -199,14 +202,12 @@
199
202
  .royui-upload__row-main {
200
203
  flex: 1;
201
204
  min-width: 0;
202
- }
203
- .royui-upload__row-top {
204
205
  display: flex;
205
- align-items: center;
206
- justify-content: space-between;
207
- gap: 12px;
206
+ flex-direction: column;
207
+ justify-content: center;
208
208
  }
209
209
  .royui-upload__name {
210
+ display: block;
210
211
  font-size: 13px;
211
212
  font-weight: 450;
212
213
  letter-spacing: -0.005em;
@@ -217,14 +218,15 @@
217
218
  }
218
219
  .royui-upload__row-action {
219
220
  flex: none;
221
+ align-self: center;
220
222
  display: inline-flex;
221
223
  align-items: center;
222
224
  justify-content: center;
223
- width: 24px;
224
- height: 24px;
225
+ width: 30px;
226
+ height: 30px;
225
227
  padding: 0;
226
228
  border: none;
227
- border-radius: 7px;
229
+ border-radius: 8px;
228
230
  background: transparent;
229
231
  color: var(--royui-upload-faint);
230
232
  cursor: pointer;
@@ -337,26 +339,6 @@
337
339
  padding: 14px 4px 2px;
338
340
  border-top: 1px solid var(--royui-upload-line);
339
341
  }
340
- .royui-upload__icon-btn {
341
- display: inline-flex;
342
- align-items: center;
343
- justify-content: center;
344
- width: 26px;
345
- height: 26px;
346
- padding: 0;
347
- border: none;
348
- border-radius: 7px;
349
- background: transparent;
350
- color: var(--royui-upload-faint);
351
- cursor: pointer;
352
- transition:
353
- background 140ms var(--royui-upload-ease),
354
- color 140ms var(--royui-upload-ease);
355
- }
356
- .royui-upload__icon-btn:hover {
357
- background: var(--royui-upload-hover);
358
- color: var(--royui-upload-fg);
359
- }
360
342
  .royui-upload__remove-all {
361
343
  display: inline-flex;
362
344
  align-items: center;
@@ -373,12 +355,246 @@
373
355
  cursor: pointer;
374
356
  transition: color 140ms var(--royui-upload-ease);
375
357
  }
358
+ .royui-upload__remove-all svg {
359
+ width: 16px;
360
+ height: 16px;
361
+ }
376
362
  .royui-upload__remove-all:hover {
377
363
  color: var(--royui-upload-fg);
378
364
  }
365
+ .royui-upload__footer-inner {
366
+ flex: 1;
367
+ display: flex;
368
+ align-items: center;
369
+ gap: 14px;
370
+ animation: royui-upload-swap 240ms var(--royui-upload-ease);
371
+ }
372
+ @keyframes royui-upload-swap {
373
+ from {
374
+ opacity: 0;
375
+ transform: translateY(5px);
376
+ }
377
+ to {
378
+ opacity: 1;
379
+ transform: none;
380
+ }
381
+ }
379
382
  .royui-upload__footer-spacer {
380
383
  flex: 1;
381
384
  }
385
+ .royui-upload__textbtn {
386
+ padding: 0;
387
+ border: none;
388
+ background: none;
389
+ font-family: var(--royui-upload-meta-font);
390
+ font-size: 12px;
391
+ font-weight: 400;
392
+ color: var(--royui-upload-muted);
393
+ cursor: pointer;
394
+ transition: color 140ms var(--royui-upload-ease);
395
+ }
396
+ .royui-upload__textbtn:hover {
397
+ color: var(--royui-upload-fg);
398
+ }
399
+
400
+ /* ── Clickable filename (preview trigger) ───────────────────────────────── */
401
+ .royui-upload__name--button {
402
+ display: block;
403
+ width: 100%;
404
+ padding: 0;
405
+ border: none;
406
+ background: none;
407
+ font: inherit;
408
+ text-align: left;
409
+ cursor: pointer;
410
+ transition: color 140ms var(--royui-upload-ease);
411
+ }
412
+ .royui-upload__name--button:hover {
413
+ color: var(--royui-upload-accent);
414
+ }
415
+
416
+ /* ── Selection mode ─────────────────────────────────────────────────────── */
417
+ .royui-upload--selecting .royui-upload__row {
418
+ cursor: pointer;
419
+ user-select: none;
420
+ -webkit-user-select: none;
421
+ -webkit-touch-callout: none;
422
+ }
423
+ .royui-upload__row.is-selected {
424
+ background: color-mix(in srgb, var(--royui-upload-accent) 12%, var(--royui-upload-row));
425
+ box-shadow: inset 0 0 0 1px var(--royui-upload-accent);
426
+ }
427
+ .royui-upload__check {
428
+ flex: none;
429
+ align-self: center;
430
+ display: inline-flex;
431
+ align-items: center;
432
+ justify-content: center;
433
+ width: 20px;
434
+ height: 20px;
435
+ border-radius: 50%;
436
+ color: #fff;
437
+ background: transparent;
438
+ box-shadow: inset 0 0 0 1.5px var(--royui-upload-line);
439
+ animation: royui-upload-pop-in 200ms var(--royui-upload-ease);
440
+ transition:
441
+ background 160ms var(--royui-upload-ease),
442
+ box-shadow 160ms var(--royui-upload-ease);
443
+ }
444
+ @keyframes royui-upload-pop-in {
445
+ from {
446
+ opacity: 0;
447
+ transform: scale(0.5);
448
+ }
449
+ to {
450
+ opacity: 1;
451
+ transform: none;
452
+ }
453
+ }
454
+ .royui-upload__check.is-checked svg {
455
+ animation: royui-upload-pop-in 160ms var(--royui-upload-ease);
456
+ }
457
+ .royui-upload__check.is-checked {
458
+ background: var(--royui-upload-accent);
459
+ box-shadow: inset 0 0 0 1.5px var(--royui-upload-accent);
460
+ }
461
+
462
+ /* ── Preview modal ──────────────────────────────────────────────────────── */
463
+ .royui-upload__modal {
464
+ position: fixed;
465
+ inset: 0;
466
+ z-index: 1000;
467
+ display: flex;
468
+ align-items: center;
469
+ justify-content: center;
470
+ padding: 24px;
471
+ background: rgba(0, 0, 0, 0.6);
472
+ -webkit-backdrop-filter: blur(4px);
473
+ backdrop-filter: blur(4px);
474
+ animation: royui-upload-fade 160ms var(--royui-upload-ease);
475
+ }
476
+ @keyframes royui-upload-fade {
477
+ from {
478
+ opacity: 0;
479
+ }
480
+ to {
481
+ opacity: 1;
482
+ }
483
+ }
484
+ .royui-upload__modal-panel {
485
+ display: flex;
486
+ flex-direction: column;
487
+ width: min(640px, 100%);
488
+ max-height: min(80vh, 720px);
489
+ background: var(--royui-upload-bg);
490
+ color: var(--royui-upload-fg);
491
+ border-radius: 14px;
492
+ box-shadow:
493
+ 0 0 0 1px var(--royui-upload-line),
494
+ 0 30px 80px -28px rgba(0, 0, 0, 0.7);
495
+ animation: royui-upload-pop 180ms var(--royui-upload-ease);
496
+ }
497
+ @keyframes royui-upload-pop {
498
+ from {
499
+ opacity: 0;
500
+ transform: translateY(8px) scale(0.98);
501
+ }
502
+ to {
503
+ opacity: 1;
504
+ transform: none;
505
+ }
506
+ }
507
+ .royui-upload__modal-head {
508
+ display: flex;
509
+ align-items: center;
510
+ justify-content: space-between;
511
+ gap: 12px;
512
+ padding: 14px 14px 14px 18px;
513
+ border-bottom: 1px solid var(--royui-upload-line);
514
+ }
515
+ .royui-upload__modal-title {
516
+ font-size: 14px;
517
+ font-weight: 500;
518
+ white-space: nowrap;
519
+ overflow: hidden;
520
+ text-overflow: ellipsis;
521
+ }
522
+ .royui-upload__modal-body {
523
+ flex: 1;
524
+ min-height: 0;
525
+ display: flex;
526
+ align-items: center;
527
+ justify-content: center;
528
+ padding: 18px;
529
+ overflow: auto;
530
+ }
531
+ .royui-upload__preview-img {
532
+ max-width: 100%;
533
+ max-height: 60vh;
534
+ border-radius: 8px;
535
+ object-fit: contain;
536
+ }
537
+ .royui-upload__preview-frame {
538
+ width: 100%;
539
+ height: 60vh;
540
+ border: none;
541
+ border-radius: 8px;
542
+ background: #fff;
543
+ }
544
+ .royui-upload__preview-video {
545
+ max-width: 100%;
546
+ max-height: 60vh;
547
+ border-radius: 8px;
548
+ }
549
+ .royui-upload__preview-card {
550
+ display: flex;
551
+ flex-direction: column;
552
+ align-items: center;
553
+ gap: 10px;
554
+ padding: 24px 12px;
555
+ text-align: center;
556
+ }
557
+ .royui-upload__preview-badge {
558
+ display: inline-flex;
559
+ align-items: center;
560
+ justify-content: center;
561
+ width: 56px;
562
+ height: 56px;
563
+ border-radius: 14px;
564
+ background: var(--royui-upload-badge, #8b8b94);
565
+ background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.28), transparent 55%);
566
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
567
+ margin-bottom: 4px;
568
+ }
569
+ .royui-upload__preview-badge .royui-upload__badge-label {
570
+ font-size: 13px;
571
+ }
572
+ .royui-upload__preview-name {
573
+ margin: 0;
574
+ font-size: 15px;
575
+ font-weight: 500;
576
+ }
577
+ .royui-upload__preview-sub {
578
+ margin: 0;
579
+ font-family: var(--royui-upload-meta-font);
580
+ font-size: 11px;
581
+ font-weight: 350;
582
+ letter-spacing: 0.04em;
583
+ text-transform: uppercase;
584
+ color: var(--royui-upload-muted);
585
+ }
586
+ .royui-upload__preview-empty {
587
+ margin: 6px 0 0;
588
+ font-size: 13px;
589
+ color: var(--royui-upload-faint);
590
+ }
591
+ .royui-upload__preview-download {
592
+ margin-top: 8px;
593
+ color: var(--royui-upload-accent);
594
+ font-size: 13px;
595
+ text-decoration: underline;
596
+ text-underline-offset: 2px;
597
+ }
382
598
 
383
599
  /* Footer action — retint the depth Button per theme so the label always
384
600
  reads. Dark panel: a light pill with dark ink (matches the reference).
@@ -475,6 +691,14 @@
475
691
  @media (prefers-reduced-motion: reduce) {
476
692
  .royui-upload__row {
477
693
  animation: none;
694
+ transition: none;
695
+ }
696
+ .royui-upload__footer-inner,
697
+ .royui-upload__check,
698
+ .royui-upload__check.is-checked svg,
699
+ .royui-upload__modal,
700
+ .royui-upload__modal-panel {
701
+ animation: none;
478
702
  }
479
703
  .royui-upload__bar-fill {
480
704
  transition: none;