@webority/theme 0.8.2 → 0.8.3
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/dist/webority-theme.css +1 -1
- package/package.json +1 -1
- package/scss/wui/_overlays.scss +15 -1
- package/scss/wui/_utilities.scss +234 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
package/scss/wui/_overlays.scss
CHANGED
|
@@ -301,10 +301,24 @@
|
|
|
301
301
|
line-height: 0;
|
|
302
302
|
margin-bottom: 22px;
|
|
303
303
|
}
|
|
304
|
+
// Lift the badge off the modal surface with a soft outer shadow. `drop-shadow` traces
|
|
305
|
+
// the SVG's circular alpha (a `box-shadow` would cast a square), and takes no spread —
|
|
306
|
+
// so this is authored spread-free rather than reusing the `--wui-shadow-overlay` token.
|
|
307
|
+
.wui-confirm-icon svg {
|
|
308
|
+
filter: drop-shadow(0 10px 18px rgba(7, 20, 55, 0.18));
|
|
309
|
+
}
|
|
310
|
+
// Icon size tracks the copy: a title+message dialog keeps the full 80px badge (set on
|
|
311
|
+
// the element), but a lone title (no message) is one line and gets a smaller badge.
|
|
312
|
+
// `.wui-confirm-msg` is a real element rendered only when a message exists, so `:has()`
|
|
313
|
+
// is reliable here; CSS width/height override the SVG's own width/height attributes.
|
|
314
|
+
.wui-confirm-content:not(:has(.wui-confirm-msg)) .wui-confirm-icon svg {
|
|
315
|
+
width: 56px;
|
|
316
|
+
height: 56px;
|
|
317
|
+
}
|
|
304
318
|
.wui-confirm-title {
|
|
305
319
|
margin: 0 0 10px;
|
|
306
320
|
font-size: 22px;
|
|
307
|
-
font-weight:
|
|
321
|
+
font-weight: 600;
|
|
308
322
|
letter-spacing: -0.01em;
|
|
309
323
|
color: var(--color-text);
|
|
310
324
|
}
|
package/scss/wui/_utilities.scss
CHANGED
|
@@ -567,65 +567,277 @@
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
-
//
|
|
571
|
-
//
|
|
570
|
+
// Callout — a soft branded aside that EXPLAINS something and stays (distinct from
|
|
571
|
+
// `.alert`, which reports a state). A thick coloured LEFT edge reads as an aside; a
|
|
572
|
+
// circular icon badge + optional coloured heading keep it visually in the alert family.
|
|
573
|
+
// One local `--callout-accent`/-border/-bg triad, swapped per tone, drives the left
|
|
574
|
+
// edge, the icon badge fill, the heading colour, and the compact body text.
|
|
572
575
|
.info-callout {
|
|
576
|
+
--callout-accent: var(--color-info-active);
|
|
577
|
+
// AA-safe text colour for the heading / compact body / <strong> (the vivid --callout-accent
|
|
578
|
+
// is fine for the badge fill, left edge and halo, but fails AA as text on the soft bg).
|
|
579
|
+
--callout-text: var(--color-info-text);
|
|
580
|
+
--callout-border: var(--color-info-30);
|
|
581
|
+
--callout-bg: var(--color-info-10);
|
|
582
|
+
|
|
573
583
|
display: flex;
|
|
574
584
|
align-items: center;
|
|
575
585
|
gap: 12px;
|
|
576
586
|
padding: 14px 18px;
|
|
577
|
-
border:
|
|
578
|
-
// A
|
|
579
|
-
|
|
580
|
-
border-
|
|
581
|
-
border-radius: var(--radius-xl);
|
|
587
|
+
border: 1px solid var(--callout-border);
|
|
588
|
+
// A thick coloured left edge — the callout's signature aside marker.
|
|
589
|
+
border-left: 4px solid var(--callout-accent);
|
|
590
|
+
border-radius: var(--radius-lg);
|
|
582
591
|
corner-shape: squircle;
|
|
583
|
-
background: var(--
|
|
592
|
+
background: var(--callout-bg);
|
|
584
593
|
font-size: 14px;
|
|
585
|
-
|
|
594
|
+
// Sub-content (the body/subtitle) reads at #252F4A / 400; the heading and the
|
|
595
|
+
// compact-size text override colour + weight below.
|
|
596
|
+
font-weight: 400;
|
|
586
597
|
line-height: 1.5;
|
|
587
|
-
color: var(--
|
|
598
|
+
color: var(--wui-text-1);
|
|
599
|
+
}
|
|
600
|
+
.info-callout.tone-success {
|
|
601
|
+
--callout-accent: var(--color-success-active);
|
|
602
|
+
--callout-text: var(--color-success-text);
|
|
603
|
+
--callout-border: var(--color-success-30);
|
|
604
|
+
--callout-bg: var(--color-success-10);
|
|
605
|
+
}
|
|
606
|
+
.info-callout.tone-warning {
|
|
607
|
+
--callout-accent: var(--color-warning-active);
|
|
608
|
+
--callout-text: var(--color-warning-text);
|
|
609
|
+
--callout-border: var(--color-warning-30);
|
|
610
|
+
--callout-bg: var(--color-warning-10);
|
|
611
|
+
}
|
|
612
|
+
.info-callout.tone-danger {
|
|
613
|
+
--callout-accent: var(--color-danger-active);
|
|
614
|
+
--callout-text: var(--color-danger-text);
|
|
615
|
+
--callout-border: var(--color-danger-30);
|
|
616
|
+
--callout-bg: var(--color-danger-10);
|
|
588
617
|
}
|
|
618
|
+
|
|
619
|
+
// The leading glyph is a solid circular badge — tone fill, white glyph centred, with a
|
|
620
|
+
// soft 3px same-colour halo ring. Base is the single-content size (20px badge / 20px
|
|
621
|
+
// glyph); a title+body stack steps it up to 24px. The badge stays VERTICALLY CENTRED
|
|
622
|
+
// against the whole block in both cases (align-items: center on .info-callout).
|
|
589
623
|
.info-callout-icon {
|
|
590
624
|
flex: none;
|
|
591
625
|
display: inline-flex;
|
|
592
626
|
align-items: center;
|
|
593
|
-
|
|
627
|
+
justify-content: center;
|
|
628
|
+
width: 20px;
|
|
629
|
+
height: 20px;
|
|
630
|
+
border-radius: 50%;
|
|
631
|
+
background: var(--callout-accent);
|
|
632
|
+
color: #fff;
|
|
633
|
+
// 4px translucent ring in the badge's own colour — the "outer shadow".
|
|
634
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--callout-accent) 20%, transparent);
|
|
635
|
+
|
|
636
|
+
.bi {
|
|
637
|
+
line-height: 1;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
// A title+body stack gets the larger badge (24px / 22px glyph).
|
|
641
|
+
.info-callout-stack .info-callout-icon {
|
|
642
|
+
width: 24px;
|
|
643
|
+
height: 24px;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// Custom image in the badge (icon replacement): the image fills the circle, so drop the
|
|
647
|
+
// tone fill and clip it round. Applies to both AppCallout and AppAlert badges.
|
|
648
|
+
.info-callout-icon-image,
|
|
649
|
+
.alert-icon-image {
|
|
650
|
+
background: transparent;
|
|
651
|
+
overflow: hidden;
|
|
652
|
+
}
|
|
653
|
+
.info-callout-icon img,
|
|
654
|
+
.alert-icon img {
|
|
655
|
+
width: 100%;
|
|
656
|
+
height: 100%;
|
|
657
|
+
object-fit: cover;
|
|
658
|
+
border-radius: 50%;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.info-callout-content {
|
|
662
|
+
min-width: 0;
|
|
663
|
+
font-size: 12px;
|
|
664
|
+
}
|
|
665
|
+
.info-callout-heading {
|
|
666
|
+
font-size: 14px;
|
|
667
|
+
font-weight: 600;
|
|
668
|
+
line-height: 1.3;
|
|
669
|
+
margin-bottom: 1px;
|
|
670
|
+
color: var(--callout-text);
|
|
594
671
|
}
|
|
595
672
|
.info-callout strong {
|
|
596
673
|
font-weight: 700;
|
|
597
|
-
color: var(--
|
|
674
|
+
color: var(--callout-text);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// Optional dismiss × — pushed to the right edge, vertically centred, subtle.
|
|
678
|
+
.info-callout-close {
|
|
679
|
+
flex: none;
|
|
680
|
+
align-self: center;
|
|
681
|
+
margin-left: auto;
|
|
682
|
+
display: inline-flex;
|
|
683
|
+
align-items: center;
|
|
684
|
+
justify-content: center;
|
|
685
|
+
padding: 4px;
|
|
686
|
+
border: none;
|
|
687
|
+
background: transparent;
|
|
688
|
+
color: var(--color-text-muted);
|
|
689
|
+
cursor: pointer;
|
|
690
|
+
opacity: 0.7;
|
|
691
|
+
border-radius: var(--radius-sm);
|
|
692
|
+
transition: opacity 0.15s;
|
|
693
|
+
}
|
|
694
|
+
.info-callout-close:hover {
|
|
695
|
+
opacity: 1;
|
|
696
|
+
}
|
|
697
|
+
.info-callout-close:focus-visible {
|
|
698
|
+
outline: 2px solid currentColor;
|
|
699
|
+
outline-offset: 2px;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Compact size — a single tinted line: tighter padding and the body text itself carries
|
|
703
|
+
// the tone colour. The badge stays the single-content 20px base.
|
|
704
|
+
.info-callout-sm {
|
|
705
|
+
padding: 9px 14px;
|
|
706
|
+
gap: 10px;
|
|
707
|
+
font-weight: 600;
|
|
708
|
+
color: var(--callout-text);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// AppAlert — a soft tinted status banner with a filled circular icon badge and a
|
|
712
|
+
// coloured heading line. Bootstrap styles the base `.alert`; these rules set the
|
|
713
|
+
// per-variant surface (soft-tint background, soft border, dark body text), lay out
|
|
714
|
+
// the icon column, turn the leading glyph into a solid circular badge, and colour
|
|
715
|
+
// the heading to the variant. Only the heading takes the variant colour — the body
|
|
716
|
+
// stays dark ink so the message reads calmly.
|
|
717
|
+
.alert {
|
|
718
|
+
--bs-alert-border-radius: var(--wui-radius-lg);
|
|
719
|
+
padding: 16px 18px;
|
|
720
|
+
border-width: 1px;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// Per-variant surface: soft tint fill + soft border; body text stays dark ink.
|
|
724
|
+
.alert-info {
|
|
725
|
+
--bs-alert-bg: var(--wui-info-10);
|
|
726
|
+
--bs-alert-border-color: var(--wui-info-30);
|
|
727
|
+
--bs-alert-color: var(--wui-text-1);
|
|
728
|
+
--alert-accent: var(--wui-info-active);
|
|
729
|
+
}
|
|
730
|
+
.alert-success {
|
|
731
|
+
--bs-alert-bg: var(--wui-success-10);
|
|
732
|
+
--bs-alert-border-color: var(--wui-success-30);
|
|
733
|
+
--bs-alert-color: var(--wui-text-1);
|
|
734
|
+
--alert-accent: var(--wui-success-active);
|
|
735
|
+
}
|
|
736
|
+
.alert-warning {
|
|
737
|
+
--bs-alert-bg: var(--wui-warning-10);
|
|
738
|
+
--bs-alert-border-color: var(--wui-warning-30);
|
|
739
|
+
--bs-alert-color: var(--wui-text-1);
|
|
740
|
+
--alert-accent: var(--wui-warning-active);
|
|
741
|
+
}
|
|
742
|
+
.alert-danger {
|
|
743
|
+
--bs-alert-bg: var(--wui-danger-10);
|
|
744
|
+
--bs-alert-border-color: var(--wui-danger-30);
|
|
745
|
+
--bs-alert-color: var(--wui-text-1);
|
|
746
|
+
--alert-accent: var(--wui-danger-active);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// Borderless variant (`bordered={false}` / `bordered="false"`): drop the soft ring and
|
|
750
|
+
// keep only the tint fill. `transparent` rather than `border: 0` so the box keeps its
|
|
751
|
+
// 1px so nothing shifts when toggling the border on and off.
|
|
752
|
+
.alert-borderless {
|
|
753
|
+
border-color: transparent;
|
|
598
754
|
}
|
|
599
755
|
|
|
600
|
-
// AppAlert extras — a leading icon and/or a bold heading line. Bootstrap already
|
|
601
|
-
// styles `.alert`/`.alert-{variant}`; these rules only lay out the icon column and
|
|
602
|
-
// give the plain `.alert-heading` div its type treatment (Bootstrap's own rule is
|
|
603
|
-
// just `color: inherit`, meant for an <h4>).
|
|
604
756
|
.alert-has-icon {
|
|
605
757
|
display: flex;
|
|
606
|
-
|
|
607
|
-
|
|
758
|
+
// Single-line alerts (a lone body, or a lone title) read best with the badge
|
|
759
|
+
// centred against the one line. A heading+body STACK top-aligns instead — the
|
|
760
|
+
// wrapper adds `.alert-stack` when both a title and a body are present.
|
|
761
|
+
align-items: center;
|
|
762
|
+
gap: 14px;
|
|
608
763
|
}
|
|
764
|
+
// A title+body stack gets the larger badge (24px, 22px glyph); a lone line keeps the
|
|
765
|
+
// smaller base below. The badge stays VERTICALLY CENTRED against the whole block in
|
|
766
|
+
// both cases (align-items: center on .alert-has-icon), matching the design.
|
|
767
|
+
.alert-has-icon.alert-stack .alert-icon {
|
|
768
|
+
width: 24px;
|
|
769
|
+
height: 24px;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// The leading glyph is a solid circular badge — variant fill, white glyph centred, with
|
|
773
|
+
// a soft 3px same-colour halo ring around it. Base size is the SINGLE-line badge (20px,
|
|
774
|
+
// 20px glyph); the .alert-stack override above enlarges it when a title and body appear
|
|
775
|
+
// together. (The glyph itself is a Bootstrap Icons font `<i>` sized by the component.)
|
|
609
776
|
.alert-icon {
|
|
610
777
|
flex: none;
|
|
611
778
|
display: inline-flex;
|
|
612
|
-
|
|
613
|
-
|
|
779
|
+
align-items: center;
|
|
780
|
+
justify-content: center;
|
|
781
|
+
width: 20px;
|
|
782
|
+
height: 20px;
|
|
783
|
+
border-radius: 50%;
|
|
784
|
+
background: var(--alert-accent);
|
|
785
|
+
color: #fff;
|
|
786
|
+
// 4px translucent ring in the badge's own colour — the "outer shadow".
|
|
787
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--alert-accent) 20%, transparent);
|
|
788
|
+
|
|
789
|
+
.bi {
|
|
790
|
+
line-height: 1;
|
|
791
|
+
}
|
|
614
792
|
}
|
|
793
|
+
|
|
615
794
|
.alert-content {
|
|
616
795
|
flex: 1;
|
|
617
796
|
min-width: 0;
|
|
797
|
+
// Body copy sits at 12px; the heading keeps its own explicit 14px above.
|
|
798
|
+
font-size: 12px;
|
|
618
799
|
}
|
|
800
|
+
|
|
801
|
+
// Coloured, bold heading line (Bootstrap's own rule is just `color: inherit`).
|
|
619
802
|
.alert .alert-heading {
|
|
620
803
|
margin-bottom: 2px;
|
|
621
|
-
font-size:
|
|
622
|
-
font-weight:
|
|
804
|
+
font-size: 14px;
|
|
805
|
+
font-weight: 600;
|
|
806
|
+
line-height: 1.3;
|
|
807
|
+
}
|
|
808
|
+
// Use the AA-safe `-text` tokens (not the vivid `-active`, which fails AA as text on
|
|
809
|
+
// the soft `-10` background); the badge fill / halo keep the vivid `-active`.
|
|
810
|
+
.alert-info .alert-heading {
|
|
811
|
+
color: var(--wui-info-text);
|
|
812
|
+
}
|
|
813
|
+
.alert-success .alert-heading {
|
|
814
|
+
color: var(--wui-success-text);
|
|
815
|
+
}
|
|
816
|
+
.alert-warning .alert-heading {
|
|
817
|
+
color: var(--wui-warning-text);
|
|
623
818
|
}
|
|
819
|
+
.alert-danger .alert-heading {
|
|
820
|
+
color: var(--wui-danger-text);
|
|
821
|
+
}
|
|
822
|
+
|
|
624
823
|
// The body's trailing paragraph shouldn't add space below the alert.
|
|
625
824
|
.alert .alert-content > :last-child {
|
|
626
825
|
margin-bottom: 0;
|
|
627
826
|
}
|
|
628
827
|
|
|
828
|
+
// Reserve room on the right for the absolutely-positioned close button. The theme's
|
|
829
|
+
// base `.alert` padding overrides Bootstrap's own `.alert-dismissible` padding-right, so
|
|
830
|
+
// without this the body text runs under the × (the button is ~48px wide at right:0).
|
|
831
|
+
.alert-dismissible {
|
|
832
|
+
padding-right: 52px;
|
|
833
|
+
}
|
|
834
|
+
// Centre the dismiss × vertically rather than pinning it to the top corner.
|
|
835
|
+
.alert-dismissible .btn-close {
|
|
836
|
+
top: 50%;
|
|
837
|
+
padding: 12px 16px;
|
|
838
|
+
transform: translateY(-50%);
|
|
839
|
+
}
|
|
840
|
+
|
|
629
841
|
// ============================================================================
|
|
630
842
|
// Inline help glyph — a hint attached to a word rather than to a field label.
|
|
631
843
|
// (For a field label use `.infotip`, which is a real popover button.)
|