@flopay/ui 1.9.7 → 1.10.0
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/README.md +117 -0
- package/dist/index.cjs +389 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -2
- package/dist/index.d.ts +102 -2
- package/dist/index.mjs +392 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
- package/styles/components.css +236 -0
package/styles/components.css
CHANGED
|
@@ -495,3 +495,239 @@
|
|
|
495
495
|
color: var(--text-secondary);
|
|
496
496
|
margin-top: 4px;
|
|
497
497
|
}
|
|
498
|
+
|
|
499
|
+
/* ── Visually hidden ── */
|
|
500
|
+
/* Hidden on screen, still read by assistive tech (e.g. a Switch label in a table row). */
|
|
501
|
+
.visually-hidden {
|
|
502
|
+
position: absolute;
|
|
503
|
+
width: 1px;
|
|
504
|
+
height: 1px;
|
|
505
|
+
padding: 0;
|
|
506
|
+
margin: -1px;
|
|
507
|
+
overflow: hidden;
|
|
508
|
+
clip: rect(0, 0, 0, 0);
|
|
509
|
+
clip-path: inset(50%);
|
|
510
|
+
white-space: nowrap;
|
|
511
|
+
border: 0;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* ── Switch ── */
|
|
515
|
+
.switch {
|
|
516
|
+
display: inline-flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
gap: 8px;
|
|
519
|
+
font-family: var(--font);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.switch-control {
|
|
523
|
+
position: relative;
|
|
524
|
+
display: inline-flex;
|
|
525
|
+
flex-shrink: 0;
|
|
526
|
+
align-items: center;
|
|
527
|
+
width: 36px;
|
|
528
|
+
height: 20px;
|
|
529
|
+
padding: 2px;
|
|
530
|
+
border: none;
|
|
531
|
+
border-radius: 100px;
|
|
532
|
+
background: var(--text-tertiary);
|
|
533
|
+
cursor: pointer;
|
|
534
|
+
transition: background 0.15s, opacity 0.15s;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.switch-control[aria-checked='true'] {
|
|
538
|
+
background: var(--brand);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.switch-control:focus-visible {
|
|
542
|
+
outline: none;
|
|
543
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.switch-control:disabled {
|
|
547
|
+
cursor: not-allowed;
|
|
548
|
+
opacity: 0.5;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.switch-control[aria-busy='true'] {
|
|
552
|
+
cursor: progress;
|
|
553
|
+
opacity: 0.7;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.switch-thumb {
|
|
557
|
+
width: 16px;
|
|
558
|
+
height: 16px;
|
|
559
|
+
border-radius: 50%;
|
|
560
|
+
background: var(--bg-card);
|
|
561
|
+
box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 20%, transparent);
|
|
562
|
+
transition: transform 0.15s;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.switch-control[aria-checked='true'] .switch-thumb {
|
|
566
|
+
transform: translateX(16px);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.switch-label {
|
|
570
|
+
font-size: 14px;
|
|
571
|
+
color: var(--text);
|
|
572
|
+
cursor: pointer;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.switch-control:disabled + .switch-label {
|
|
576
|
+
color: var(--text-tertiary);
|
|
577
|
+
cursor: not-allowed;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.switch-spinner {
|
|
581
|
+
width: 16px;
|
|
582
|
+
height: 16px;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/* ── Email editor blocks ── */
|
|
586
|
+
/* Multi-line fields compose with .field (e.g. "field field-multiline"). */
|
|
587
|
+
.field-multiline {
|
|
588
|
+
min-height: 96px;
|
|
589
|
+
line-height: 1.5;
|
|
590
|
+
resize: vertical;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.slot-toolbar {
|
|
594
|
+
display: flex;
|
|
595
|
+
gap: 4px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.slot-toolbar-button {
|
|
599
|
+
padding: 4px 10px;
|
|
600
|
+
background: var(--bg-card);
|
|
601
|
+
color: var(--text-secondary);
|
|
602
|
+
font-family: var(--font);
|
|
603
|
+
font-size: 12px;
|
|
604
|
+
font-weight: 500;
|
|
605
|
+
border: 1px solid var(--border);
|
|
606
|
+
border-radius: 6px;
|
|
607
|
+
cursor: pointer;
|
|
608
|
+
transition: background 0.15s, border-color 0.15s, color 0.15s;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.slot-toolbar-button:hover {
|
|
612
|
+
background: var(--bg-subtle);
|
|
613
|
+
border-color: var(--border-hover);
|
|
614
|
+
color: var(--text);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.slot-toolbar-button:focus-visible {
|
|
618
|
+
outline: none;
|
|
619
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* Composes with .field; declared after it so the monospace face wins. */
|
|
623
|
+
.code-area {
|
|
624
|
+
min-height: 240px;
|
|
625
|
+
font-family: var(--font-mono);
|
|
626
|
+
font-size: 13px;
|
|
627
|
+
line-height: 1.5;
|
|
628
|
+
white-space: pre;
|
|
629
|
+
overflow: auto;
|
|
630
|
+
tab-size: 2;
|
|
631
|
+
resize: vertical;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.variable-picker {
|
|
635
|
+
position: relative;
|
|
636
|
+
display: inline-block;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.variable-picker-trigger {
|
|
640
|
+
display: inline-flex;
|
|
641
|
+
align-items: center;
|
|
642
|
+
gap: 6px;
|
|
643
|
+
padding: 6px 12px;
|
|
644
|
+
background: var(--bg-card);
|
|
645
|
+
color: var(--text);
|
|
646
|
+
font-family: var(--font);
|
|
647
|
+
font-size: 13px;
|
|
648
|
+
font-weight: 500;
|
|
649
|
+
border: 1px solid var(--border);
|
|
650
|
+
border-radius: var(--radius);
|
|
651
|
+
cursor: pointer;
|
|
652
|
+
transition: background 0.15s, border-color 0.15s;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.variable-picker-trigger:hover:enabled {
|
|
656
|
+
background: var(--bg-subtle);
|
|
657
|
+
border-color: var(--border-hover);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.variable-picker-trigger:focus-visible {
|
|
661
|
+
outline: none;
|
|
662
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.variable-picker-trigger:disabled {
|
|
666
|
+
cursor: not-allowed;
|
|
667
|
+
opacity: 0.5;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.variable-picker-menu {
|
|
671
|
+
position: absolute;
|
|
672
|
+
top: calc(100% + 4px);
|
|
673
|
+
left: 0;
|
|
674
|
+
z-index: 10;
|
|
675
|
+
display: flex;
|
|
676
|
+
flex-direction: column;
|
|
677
|
+
min-width: 240px;
|
|
678
|
+
max-height: 280px;
|
|
679
|
+
overflow-y: auto;
|
|
680
|
+
padding: 4px;
|
|
681
|
+
background: var(--bg-card);
|
|
682
|
+
border: 1px solid var(--border);
|
|
683
|
+
border-radius: var(--radius);
|
|
684
|
+
box-shadow: 0 4px 16px color-mix(in srgb, var(--text) 8%, transparent);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.variable-picker-item {
|
|
688
|
+
display: flex;
|
|
689
|
+
flex-direction: column;
|
|
690
|
+
align-items: flex-start;
|
|
691
|
+
gap: 2px;
|
|
692
|
+
width: 100%;
|
|
693
|
+
padding: 8px 10px;
|
|
694
|
+
background: transparent;
|
|
695
|
+
color: var(--text);
|
|
696
|
+
font-family: var(--font);
|
|
697
|
+
font-size: 13px;
|
|
698
|
+
text-align: left;
|
|
699
|
+
border: none;
|
|
700
|
+
border-radius: 6px;
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.variable-picker-item:hover,
|
|
705
|
+
.variable-picker-item:focus {
|
|
706
|
+
outline: none;
|
|
707
|
+
background: var(--bg-subtle);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.variable-picker-item-label {
|
|
711
|
+
font-weight: 500;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.variable-picker-item-token {
|
|
715
|
+
font-family: var(--font-mono);
|
|
716
|
+
font-size: 12px;
|
|
717
|
+
color: var(--text-secondary);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.preview-frame {
|
|
721
|
+
display: flex;
|
|
722
|
+
min-height: 480px;
|
|
723
|
+
overflow: hidden;
|
|
724
|
+
background: var(--bg-card);
|
|
725
|
+
border: 1px solid var(--border);
|
|
726
|
+
border-radius: var(--radius-lg);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.preview-frame-iframe {
|
|
730
|
+
flex: 1 1 auto;
|
|
731
|
+
width: 100%;
|
|
732
|
+
border: 0;
|
|
733
|
+
}
|