@webority/theme 0.178.4 → 0.179.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/dist/purge-safelist.json +9 -0
- package/dist/webority-modes.css +1 -1
- package/dist/webority-theme.css +2 -2
- package/fonts/sans/WeboritySans-Black.woff2 +0 -0
- package/fonts/sans/WeboritySans-BlackItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-Bold.woff2 +0 -0
- package/fonts/sans/WeboritySans-BoldItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-ExtraBold.woff2 +0 -0
- package/fonts/sans/WeboritySans-ExtraBoldItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-ExtraLight.woff2 +0 -0
- package/fonts/sans/WeboritySans-ExtraLightItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-Light.woff2 +0 -0
- package/fonts/sans/WeboritySans-LightItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-Medium.woff2 +0 -0
- package/fonts/sans/WeboritySans-MediumItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-Regular.woff2 +0 -0
- package/fonts/sans/WeboritySans-RegularItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-SemiBold.woff2 +0 -0
- package/fonts/sans/WeboritySans-SemiBoldItalic.woff2 +0 -0
- package/fonts/sans/WeboritySans-Thin.woff2 +0 -0
- package/fonts/sans/WeboritySans-ThinItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-Bold.woff2 +0 -0
- package/fonts/serif/WeboritySerif-BoldItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-DemiBold.woff2 +0 -0
- package/fonts/serif/WeboritySerif-DemiBoldItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-ExtraBold.woff2 +0 -0
- package/fonts/serif/WeboritySerif-ExtraBoldItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-Light.woff2 +0 -0
- package/fonts/serif/WeboritySerif-LightItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-Medium.woff2 +0 -0
- package/fonts/serif/WeboritySerif-MediumItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-Regular.woff2 +0 -0
- package/fonts/serif/WeboritySerif-RegularItalic.woff2 +0 -0
- package/fonts/serif/WeboritySerif-Thin.woff2 +0 -0
- package/fonts/serif/WeboritySerif-ThinItalic.woff2 +0 -0
- package/package.json +3 -3
- package/scss/_bootstrap.generated.scss +1 -1
- package/scss/_components.scss +94 -2
- package/scss/_fonts.scss +137 -2
- package/scss/_tokens-modes.generated.scss +1 -1
- package/scss/_tokens.generated.scss +1 -1
- package/scss/wui/_controls.scss +56 -15
- package/scss/wui/_disclosure.scss +102 -1
- package/scss/wui/_navigation-menu.scss +43 -3
- package/scss/wui/forced-colors/_display.scss +7 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.179.0",
|
|
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": {
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@popperjs/core": "2.11.8",
|
|
82
82
|
"@types/node": "25.6.0",
|
|
83
|
-
"@webority/biome-config": "0.
|
|
84
|
-
"@webority/tokens": "0.
|
|
83
|
+
"@webority/biome-config": "0.179.0",
|
|
84
|
+
"@webority/tokens": "0.179.0",
|
|
85
85
|
"bootstrap": "5.3.9",
|
|
86
86
|
"country-flag-icons": "^1.6.20",
|
|
87
87
|
"sass-embedded": "^1.108.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by @webority/tokens 0.
|
|
1
|
+
// Generated by @webority/tokens 0.179.0 from its token source. Do not edit; run webority brand --library.
|
|
2
2
|
$body-color: #252f4a !default;
|
|
3
3
|
$body-secondary-color: #4b5675 !default;
|
|
4
4
|
$body-tertiary-color: #626a82 !default;
|
package/scss/_components.scss
CHANGED
|
@@ -503,6 +503,7 @@
|
|
|
503
503
|
// .btn-anim-none no hover motion
|
|
504
504
|
// .btn-anim-roll the label rolls up and a trailing icon slides through a round well
|
|
505
505
|
// (AppButton animation="roll" renders the copies it needs)
|
|
506
|
+
// .btn-anim-wave a round wave rises from below and fills the button with its hover colour
|
|
506
507
|
//
|
|
507
508
|
// Shared plumbing: a clipped, isolated box so a z-index:-1 layer can sit above
|
|
508
509
|
// the fill but below the label; overflow clips it to the squircle corners.
|
|
@@ -572,6 +573,45 @@
|
|
|
572
573
|
transform: scaleX(1);
|
|
573
574
|
}
|
|
574
575
|
|
|
576
|
+
// --- Wave (AppButton animation="wave"): a rounded wave rises from below the button and grows until
|
|
577
|
+
// it fills it with the button's hover colour, while the label and border turn to their hover
|
|
578
|
+
// colours. The rest fill stays put under the wave, so the colour change comes from the wave alone.
|
|
579
|
+
// --wui-btn-wave-bg on the button or any ancestor sets the wave colour.
|
|
580
|
+
.btn-anim-wave {
|
|
581
|
+
--wui-btn-wave-ease: var(--wui-ease-ui);
|
|
582
|
+
transition:
|
|
583
|
+
color var(--wui-duration-default) var(--wui-btn-wave-ease),
|
|
584
|
+
border-color var(--wui-duration-default) var(--wui-btn-wave-ease);
|
|
585
|
+
}
|
|
586
|
+
.btn-anim-wave::before {
|
|
587
|
+
content: "";
|
|
588
|
+
position: absolute;
|
|
589
|
+
inset-inline: 0;
|
|
590
|
+
margin-inline: auto;
|
|
591
|
+
top: 118.9%;
|
|
592
|
+
z-index: -1;
|
|
593
|
+
width: 19.87%;
|
|
594
|
+
height: calc(100% - 2px);
|
|
595
|
+
border-radius: 50%;
|
|
596
|
+
background: var(--wui-btn-wave-bg, var(--bs-btn-hover-bg));
|
|
597
|
+
transform: scale(1);
|
|
598
|
+
transition: transform var(--wui-duration-default) var(--wui-btn-wave-ease);
|
|
599
|
+
pointer-events: none;
|
|
600
|
+
}
|
|
601
|
+
.btn-anim-wave:is(:hover, :focus-visible):not(:disabled) {
|
|
602
|
+
background-color: var(--bs-btn-bg);
|
|
603
|
+
border-color: var(--wui-btn-wave-bg, var(--bs-btn-hover-border-color));
|
|
604
|
+
color: var(--bs-btn-hover-color);
|
|
605
|
+
transform: none;
|
|
606
|
+
transition:
|
|
607
|
+
color var(--wui-duration-default) var(--wui-btn-wave-ease),
|
|
608
|
+
border-color calc(var(--wui-duration-slow) * 1.5) var(--wui-btn-wave-ease);
|
|
609
|
+
}
|
|
610
|
+
.btn-anim-wave:is(:hover, :focus-visible):not(:disabled)::before {
|
|
611
|
+
transform: scale(7);
|
|
612
|
+
transition: transform calc(var(--wui-duration-slow) * 1.5) var(--wui-btn-wave-ease);
|
|
613
|
+
}
|
|
614
|
+
|
|
575
615
|
// --- Expand: a radial glow blooms from the centre (aspect-ratio keeps it round).
|
|
576
616
|
.btn-anim-expand::before {
|
|
577
617
|
content: "";
|
|
@@ -689,7 +729,8 @@
|
|
|
689
729
|
margin-block: calc((1lh - var(--wui-btn-roll-well)) / 2);
|
|
690
730
|
border-radius: 50%;
|
|
691
731
|
overflow: hidden;
|
|
692
|
-
background: color-mix(in srgb, currentColor 20%, transparent);
|
|
732
|
+
background: var(--wui-btn-well-bg, color-mix(in srgb, currentColor 20%, transparent));
|
|
733
|
+
color: var(--wui-btn-icon-color, inherit);
|
|
693
734
|
vertical-align: middle;
|
|
694
735
|
}
|
|
695
736
|
.wui-btn-roll-ico > * {
|
|
@@ -757,7 +798,53 @@
|
|
|
757
798
|
width: var(--wui-btn-roll-well, 1.75em);
|
|
758
799
|
height: var(--wui-btn-roll-well, 1.75em);
|
|
759
800
|
border-radius: 50%;
|
|
760
|
-
background: color-mix(in srgb, currentColor 20%, transparent);
|
|
801
|
+
background: var(--wui-btn-well-bg, color-mix(in srgb, currentColor 20%, transparent));
|
|
802
|
+
color: var(--wui-btn-icon-color, inherit);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// AppButton iconBg / iconColor: the well's fill and the icon's colour, from a tone or white. Each sets a
|
|
806
|
+
// variable the well reads, so a product can also set --wui-btn-well-bg or --wui-btn-icon-color itself.
|
|
807
|
+
.btn.wui-btn-icon-bg-primary {
|
|
808
|
+
--wui-btn-well-bg: var(--color-primary);
|
|
809
|
+
}
|
|
810
|
+
.btn.wui-btn-icon-color-primary {
|
|
811
|
+
--wui-btn-icon-color: var(--color-primary);
|
|
812
|
+
}
|
|
813
|
+
.btn.wui-btn-icon-bg-success {
|
|
814
|
+
--wui-btn-well-bg: var(--color-success);
|
|
815
|
+
}
|
|
816
|
+
.btn.wui-btn-icon-color-success {
|
|
817
|
+
--wui-btn-icon-color: var(--color-success);
|
|
818
|
+
}
|
|
819
|
+
.btn.wui-btn-icon-bg-warning {
|
|
820
|
+
--wui-btn-well-bg: var(--color-warning);
|
|
821
|
+
}
|
|
822
|
+
.btn.wui-btn-icon-color-warning {
|
|
823
|
+
--wui-btn-icon-color: var(--color-warning);
|
|
824
|
+
}
|
|
825
|
+
.btn.wui-btn-icon-bg-danger {
|
|
826
|
+
--wui-btn-well-bg: var(--color-danger);
|
|
827
|
+
}
|
|
828
|
+
.btn.wui-btn-icon-color-danger {
|
|
829
|
+
--wui-btn-icon-color: var(--color-danger);
|
|
830
|
+
}
|
|
831
|
+
.btn.wui-btn-icon-bg-info {
|
|
832
|
+
--wui-btn-well-bg: var(--color-info);
|
|
833
|
+
}
|
|
834
|
+
.btn.wui-btn-icon-color-info {
|
|
835
|
+
--wui-btn-icon-color: var(--color-info);
|
|
836
|
+
}
|
|
837
|
+
.btn.wui-btn-icon-bg-neutral {
|
|
838
|
+
--wui-btn-well-bg: var(--color-neutral);
|
|
839
|
+
}
|
|
840
|
+
.btn.wui-btn-icon-color-neutral {
|
|
841
|
+
--wui-btn-icon-color: var(--color-neutral);
|
|
842
|
+
}
|
|
843
|
+
.btn.wui-btn-icon-bg-white {
|
|
844
|
+
--wui-btn-well-bg: var(--bs-white);
|
|
845
|
+
}
|
|
846
|
+
.btn.wui-btn-icon-color-white {
|
|
847
|
+
--wui-btn-icon-color: var(--bs-white);
|
|
761
848
|
}
|
|
762
849
|
|
|
763
850
|
// ---- Dropdown menu (AppDropdown / <app-dropdown>) -------------------
|
|
@@ -1706,6 +1793,11 @@ html.is-scrolling body::-webkit-scrollbar-thumb {
|
|
|
1706
1793
|
transform: none;
|
|
1707
1794
|
box-shadow: none;
|
|
1708
1795
|
}
|
|
1796
|
+
// Without its wave, the wave look takes the plain hover fill at once.
|
|
1797
|
+
.btn-anim-wave:is(:hover, :focus-visible):not(:disabled) {
|
|
1798
|
+
background-color: var(--wui-btn-wave-bg, var(--bs-btn-hover-bg));
|
|
1799
|
+
transition: none;
|
|
1800
|
+
}
|
|
1709
1801
|
// The roll stays still: the label and the icon keep their resting copy.
|
|
1710
1802
|
.wui-btn-roll__a,
|
|
1711
1803
|
.wui-btn-roll__b,
|
package/scss/_fonts.scss
CHANGED
|
@@ -1,8 +1,52 @@
|
|
|
1
1
|
// Webority Sans and Webority Serif, shipped with the theme. URLs are relative to the compiled CSS:
|
|
2
2
|
// dist/webority-theme.css reads ../fonts (the npm package) and wwwroot/css/webority-theme.css reads
|
|
3
3
|
// ../fonts (the Razor static web asset, _content/Webority.Ui.Razor/fonts). Sans is SIL OFL 1.1
|
|
4
|
-
// (fonts/sans/OFL.txt travels with it). The
|
|
5
|
-
// Greek, arrows), about
|
|
4
|
+
// (fonts/sans/OFL.txt travels with it). The files are the webority-fonts 1.3.0 Latin cut (Latin, ₹, basic
|
|
5
|
+
// Greek, arrows), about 40 KB each; a character outside it falls back to the next font in the stack.
|
|
6
|
+
// Every weight the families have ships, each with its italic: Sans 100 to 900, Serif 100 and 300 to 800
|
|
7
|
+
// (Serif has no 200 or 900). A browser downloads only the faces a page uses.
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: 'Webority Sans';
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 100;
|
|
12
|
+
font-display: swap;
|
|
13
|
+
src: url('../fonts/sans/WeboritySans-Thin.woff2') format('woff2');
|
|
14
|
+
}
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: 'Webority Sans';
|
|
17
|
+
font-style: italic;
|
|
18
|
+
font-weight: 100;
|
|
19
|
+
font-display: swap;
|
|
20
|
+
src: url('../fonts/sans/WeboritySans-ThinItalic.woff2') format('woff2');
|
|
21
|
+
}
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'Webority Sans';
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 200;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
src: url('../fonts/sans/WeboritySans-ExtraLight.woff2') format('woff2');
|
|
28
|
+
}
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'Webority Sans';
|
|
31
|
+
font-style: italic;
|
|
32
|
+
font-weight: 200;
|
|
33
|
+
font-display: swap;
|
|
34
|
+
src: url('../fonts/sans/WeboritySans-ExtraLightItalic.woff2') format('woff2');
|
|
35
|
+
}
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'Webority Sans';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 300;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
src: url('../fonts/sans/WeboritySans-Light.woff2') format('woff2');
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'Webority Sans';
|
|
45
|
+
font-style: italic;
|
|
46
|
+
font-weight: 300;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
src: url('../fonts/sans/WeboritySans-LightItalic.woff2') format('woff2');
|
|
49
|
+
}
|
|
6
50
|
@font-face {
|
|
7
51
|
font-family: 'Webority Sans';
|
|
8
52
|
font-style: normal;
|
|
@@ -24,6 +68,13 @@
|
|
|
24
68
|
font-display: swap;
|
|
25
69
|
src: url('../fonts/sans/WeboritySans-Medium.woff2') format('woff2');
|
|
26
70
|
}
|
|
71
|
+
@font-face {
|
|
72
|
+
font-family: 'Webority Sans';
|
|
73
|
+
font-style: italic;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
font-display: swap;
|
|
76
|
+
src: url('../fonts/sans/WeboritySans-MediumItalic.woff2') format('woff2');
|
|
77
|
+
}
|
|
27
78
|
@font-face {
|
|
28
79
|
font-family: 'Webority Sans';
|
|
29
80
|
font-style: normal;
|
|
@@ -31,6 +82,13 @@
|
|
|
31
82
|
font-display: swap;
|
|
32
83
|
src: url('../fonts/sans/WeboritySans-SemiBold.woff2') format('woff2');
|
|
33
84
|
}
|
|
85
|
+
@font-face {
|
|
86
|
+
font-family: 'Webority Sans';
|
|
87
|
+
font-style: italic;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
font-display: swap;
|
|
90
|
+
src: url('../fonts/sans/WeboritySans-SemiBoldItalic.woff2') format('woff2');
|
|
91
|
+
}
|
|
34
92
|
@font-face {
|
|
35
93
|
font-family: 'Webority Sans';
|
|
36
94
|
font-style: normal;
|
|
@@ -45,6 +103,62 @@
|
|
|
45
103
|
font-display: swap;
|
|
46
104
|
src: url('../fonts/sans/WeboritySans-BoldItalic.woff2') format('woff2');
|
|
47
105
|
}
|
|
106
|
+
@font-face {
|
|
107
|
+
font-family: 'Webority Sans';
|
|
108
|
+
font-style: normal;
|
|
109
|
+
font-weight: 800;
|
|
110
|
+
font-display: swap;
|
|
111
|
+
src: url('../fonts/sans/WeboritySans-ExtraBold.woff2') format('woff2');
|
|
112
|
+
}
|
|
113
|
+
@font-face {
|
|
114
|
+
font-family: 'Webority Sans';
|
|
115
|
+
font-style: italic;
|
|
116
|
+
font-weight: 800;
|
|
117
|
+
font-display: swap;
|
|
118
|
+
src: url('../fonts/sans/WeboritySans-ExtraBoldItalic.woff2') format('woff2');
|
|
119
|
+
}
|
|
120
|
+
@font-face {
|
|
121
|
+
font-family: 'Webority Sans';
|
|
122
|
+
font-style: normal;
|
|
123
|
+
font-weight: 900;
|
|
124
|
+
font-display: swap;
|
|
125
|
+
src: url('../fonts/sans/WeboritySans-Black.woff2') format('woff2');
|
|
126
|
+
}
|
|
127
|
+
@font-face {
|
|
128
|
+
font-family: 'Webority Sans';
|
|
129
|
+
font-style: italic;
|
|
130
|
+
font-weight: 900;
|
|
131
|
+
font-display: swap;
|
|
132
|
+
src: url('../fonts/sans/WeboritySans-BlackItalic.woff2') format('woff2');
|
|
133
|
+
}
|
|
134
|
+
@font-face {
|
|
135
|
+
font-family: 'Webority Serif';
|
|
136
|
+
font-style: normal;
|
|
137
|
+
font-weight: 100;
|
|
138
|
+
font-display: swap;
|
|
139
|
+
src: url('../fonts/serif/WeboritySerif-Thin.woff2') format('woff2');
|
|
140
|
+
}
|
|
141
|
+
@font-face {
|
|
142
|
+
font-family: 'Webority Serif';
|
|
143
|
+
font-style: italic;
|
|
144
|
+
font-weight: 100;
|
|
145
|
+
font-display: swap;
|
|
146
|
+
src: url('../fonts/serif/WeboritySerif-ThinItalic.woff2') format('woff2');
|
|
147
|
+
}
|
|
148
|
+
@font-face {
|
|
149
|
+
font-family: 'Webority Serif';
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-weight: 300;
|
|
152
|
+
font-display: swap;
|
|
153
|
+
src: url('../fonts/serif/WeboritySerif-Light.woff2') format('woff2');
|
|
154
|
+
}
|
|
155
|
+
@font-face {
|
|
156
|
+
font-family: 'Webority Serif';
|
|
157
|
+
font-style: italic;
|
|
158
|
+
font-weight: 300;
|
|
159
|
+
font-display: swap;
|
|
160
|
+
src: url('../fonts/serif/WeboritySerif-LightItalic.woff2') format('woff2');
|
|
161
|
+
}
|
|
48
162
|
@font-face {
|
|
49
163
|
font-family: 'Webority Serif';
|
|
50
164
|
font-style: normal;
|
|
@@ -66,6 +180,13 @@
|
|
|
66
180
|
font-display: swap;
|
|
67
181
|
src: url('../fonts/serif/WeboritySerif-Medium.woff2') format('woff2');
|
|
68
182
|
}
|
|
183
|
+
@font-face {
|
|
184
|
+
font-family: 'Webority Serif';
|
|
185
|
+
font-style: italic;
|
|
186
|
+
font-weight: 500;
|
|
187
|
+
font-display: swap;
|
|
188
|
+
src: url('../fonts/serif/WeboritySerif-MediumItalic.woff2') format('woff2');
|
|
189
|
+
}
|
|
69
190
|
@font-face {
|
|
70
191
|
font-family: 'Webority Serif';
|
|
71
192
|
font-style: normal;
|
|
@@ -73,6 +194,13 @@
|
|
|
73
194
|
font-display: swap;
|
|
74
195
|
src: url('../fonts/serif/WeboritySerif-DemiBold.woff2') format('woff2');
|
|
75
196
|
}
|
|
197
|
+
@font-face {
|
|
198
|
+
font-family: 'Webority Serif';
|
|
199
|
+
font-style: italic;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
font-display: swap;
|
|
202
|
+
src: url('../fonts/serif/WeboritySerif-DemiBoldItalic.woff2') format('woff2');
|
|
203
|
+
}
|
|
76
204
|
@font-face {
|
|
77
205
|
font-family: 'Webority Serif';
|
|
78
206
|
font-style: normal;
|
|
@@ -94,3 +222,10 @@
|
|
|
94
222
|
font-display: swap;
|
|
95
223
|
src: url('../fonts/serif/WeboritySerif-ExtraBold.woff2') format('woff2');
|
|
96
224
|
}
|
|
225
|
+
@font-face {
|
|
226
|
+
font-family: 'Webority Serif';
|
|
227
|
+
font-style: italic;
|
|
228
|
+
font-weight: 800;
|
|
229
|
+
font-display: swap;
|
|
230
|
+
src: url('../fonts/serif/WeboritySerif-ExtraBoldItalic.woff2') format('woff2');
|
|
231
|
+
}
|
package/scss/wui/_controls.scss
CHANGED
|
@@ -488,7 +488,8 @@ textarea.form-control.autosize {
|
|
|
488
488
|
// below keeps working and simply paints no fill. A unit or prefix/suffix field draws its box on
|
|
489
489
|
// the wrapper, so the wrapper takes the same treatment; its 1px top padding stands in for the
|
|
490
490
|
// dropped top border, keeping the height of every shell equal to the boxed field's.
|
|
491
|
-
.input.
|
|
491
|
+
// AppTextarea takes the same variants; the textarea carries .form-control, not .input.
|
|
492
|
+
:is(.input, :where(textarea).form-control).wui-input-underline,
|
|
492
493
|
.input-with-unit:has(> .wui-input-underline),
|
|
493
494
|
.input-affixed:has(> .wui-input-underline) {
|
|
494
495
|
--color-field-bg: transparent;
|
|
@@ -497,7 +498,7 @@ textarea.form-control.autosize {
|
|
|
497
498
|
border-width: 0 0 1px;
|
|
498
499
|
border-radius: 0;
|
|
499
500
|
}
|
|
500
|
-
.input.wui-input-underline {
|
|
501
|
+
:is(.input, :where(textarea).form-control).wui-input-underline {
|
|
501
502
|
padding-inline-start: 0;
|
|
502
503
|
}
|
|
503
504
|
.input-with-unit:has(> .wui-input-underline),
|
|
@@ -505,13 +506,13 @@ textarea.form-control.autosize {
|
|
|
505
506
|
padding-top: var(--bs-border-width);
|
|
506
507
|
}
|
|
507
508
|
// One line carries the whole error cue, so it takes the full danger colour, not the boxed field's 30% tint.
|
|
508
|
-
.input.wui-input-underline:is(.error, .is-invalid, [aria-invalid="true"]),
|
|
509
|
-
.input.wui-input-underline:is(.error, .is-invalid, [aria-invalid="true"]):focus,
|
|
509
|
+
:is(.input, :where(textarea).form-control).wui-input-underline:is(.error, .is-invalid, [aria-invalid="true"]),
|
|
510
|
+
:is(.input, :where(textarea).form-control).wui-input-underline:is(.error, .is-invalid, [aria-invalid="true"]):focus,
|
|
510
511
|
.input-with-unit:has(> .wui-input-underline:is(.error, [aria-invalid="true"])),
|
|
511
512
|
.input-affixed:has(> .wui-input-underline:is(.error, [aria-invalid="true"])) {
|
|
512
513
|
border-color: var(--color-danger);
|
|
513
514
|
}
|
|
514
|
-
.input.wui-input-underline:disabled {
|
|
515
|
+
:is(.input, :where(textarea).form-control).wui-input-underline:disabled {
|
|
515
516
|
background: transparent;
|
|
516
517
|
border-color: var(--color-field-border);
|
|
517
518
|
border-bottom-style: dashed;
|
|
@@ -532,7 +533,7 @@ textarea.form-control.autosize {
|
|
|
532
533
|
// glyph ends where the line does. The leading slot shrinks to the glyph; each trailing button keeps
|
|
533
534
|
// its hit area and shifts out by its own glyph inset ((32 - 18) / 2 for the toggle, (28 - 16) / 2
|
|
534
535
|
// for the clear button), so only its transparent padding passes the line's end.
|
|
535
|
-
.input-icon:has(> .input.wui-input-underline) {
|
|
536
|
+
.input-icon:has(> :is(.input, :where(textarea).form-control).wui-input-underline) {
|
|
536
537
|
--wui-input-icon-slot: var(--wui-input-icon-size);
|
|
537
538
|
}
|
|
538
539
|
// Layout constants of the two trailing buttons: the glyph inset of each, and the room the text
|
|
@@ -1001,7 +1002,8 @@ form .wui-field-message:empty {
|
|
|
1001
1002
|
background: var(--color-field-border);
|
|
1002
1003
|
pointer-events: none;
|
|
1003
1004
|
}
|
|
1004
|
-
.input-icon .input
|
|
1005
|
+
.input-icon .input,
|
|
1006
|
+
.input-icon > textarea.form-control {
|
|
1005
1007
|
padding-inline-start: calc(var(--wui-input-icon-slot) + var(--wui-input-icon-gap));
|
|
1006
1008
|
}
|
|
1007
1009
|
.input-icon:focus-within > .ic {
|
|
@@ -1076,7 +1078,8 @@ form .wui-field-message:empty {
|
|
|
1076
1078
|
|
|
1077
1079
|
// Clearable ✕: a trailing reset button, placed inside .input-wrap / .input-icon. It only
|
|
1078
1080
|
// renders while the field has a value; .has-clear reserves the room so text never sits under it.
|
|
1079
|
-
.input.has-clear
|
|
1081
|
+
.input.has-clear,
|
|
1082
|
+
textarea.form-control.has-clear {
|
|
1080
1083
|
padding-inline-end: 40px;
|
|
1081
1084
|
}
|
|
1082
1085
|
.input-clear {
|
|
@@ -1111,6 +1114,21 @@ form .wui-field-message:empty {
|
|
|
1111
1114
|
from { opacity: 0; transform: translateY(-50%) scale(0.72); }
|
|
1112
1115
|
to { opacity: 1; transform: translateY(-50%) scale(1); }
|
|
1113
1116
|
}
|
|
1117
|
+
// A textarea is several lines tall, so its leading icon and clear button sit on its first line,
|
|
1118
|
+
// not the vertical centre: the 12px top padding plus half of one 1.5 line.
|
|
1119
|
+
.input-icon:has(> textarea.form-control) > .ic {
|
|
1120
|
+
bottom: auto;
|
|
1121
|
+
height: calc(24px + 1.5em);
|
|
1122
|
+
}
|
|
1123
|
+
:is(.input-wrap, .input-icon) > textarea.form-control ~ .input-clear {
|
|
1124
|
+
top: 8px;
|
|
1125
|
+
transform: none;
|
|
1126
|
+
animation-name: wui-clear-in-top;
|
|
1127
|
+
}
|
|
1128
|
+
@keyframes wui-clear-in-top {
|
|
1129
|
+
from { opacity: 0; transform: scale(0.72); }
|
|
1130
|
+
to { opacity: 1; transform: none; }
|
|
1131
|
+
}
|
|
1114
1132
|
|
|
1115
1133
|
// Prefix / suffix addon: a bordered box before/after the input (₹, https://, .com). The
|
|
1116
1134
|
// WRAPPER owns the border + radius so the affixes and input read as one control; the input
|
|
@@ -1223,23 +1241,35 @@ form .wui-field-message:empty {
|
|
|
1223
1241
|
.field-float .float-label:dir(rtl) {
|
|
1224
1242
|
transform-origin: right center;
|
|
1225
1243
|
}
|
|
1244
|
+
// A textarea's label rests on its first line, not the vertical centre.
|
|
1245
|
+
.field-float:has(> textarea.form-control) .float-label {
|
|
1246
|
+
top: 22px;
|
|
1247
|
+
}
|
|
1226
1248
|
.field-float .input:focus ~ .float-label,
|
|
1227
|
-
.field-float .
|
|
1249
|
+
.field-float textarea.form-control:focus ~ .float-label,
|
|
1250
|
+
.field-float .input:not(:placeholder-shown) ~ .float-label,
|
|
1251
|
+
.field-float textarea.form-control:not(:placeholder-shown) ~ .float-label {
|
|
1228
1252
|
top: 0;
|
|
1229
1253
|
transform: translateY(-50%) scale(0.86);
|
|
1230
1254
|
}
|
|
1231
|
-
.field-float .input:focus ~ .float-label
|
|
1255
|
+
.field-float .input:focus ~ .float-label,
|
|
1256
|
+
.field-float textarea.form-control:focus ~ .float-label {
|
|
1232
1257
|
color: var(--color-primary-text);
|
|
1233
1258
|
}
|
|
1234
|
-
.field-float .input.error ~ .float-label
|
|
1259
|
+
.field-float .input.error ~ .float-label,
|
|
1260
|
+
.field-float textarea.form-control.error ~ .float-label {
|
|
1235
1261
|
color: var(--color-danger-text);
|
|
1236
1262
|
}
|
|
1237
1263
|
// Track the field's fill: it lifts to --color-surface while focused or invalid, so the label
|
|
1238
1264
|
// mask follows to stay seamless in those states too.
|
|
1239
1265
|
.field-float .input:focus ~ .float-label,
|
|
1266
|
+
.field-float textarea.form-control:focus ~ .float-label,
|
|
1240
1267
|
.field-float .input.error ~ .float-label,
|
|
1268
|
+
.field-float textarea.form-control.error ~ .float-label,
|
|
1241
1269
|
.field-float .input.is-invalid ~ .float-label,
|
|
1242
|
-
.field-float .
|
|
1270
|
+
.field-float textarea.form-control.is-invalid ~ .float-label,
|
|
1271
|
+
.field-float .input[aria-invalid="true"] ~ .float-label,
|
|
1272
|
+
.field-float textarea.form-control[aria-invalid="true"] ~ .float-label {
|
|
1243
1273
|
background: var(--color-surface);
|
|
1244
1274
|
}
|
|
1245
1275
|
// Above placement (floatingLabel="above"): the same slide, but the label comes to rest above
|
|
@@ -1249,6 +1279,9 @@ form .wui-field-message:empty {
|
|
|
1249
1279
|
--wui-float-above-space: 22px;
|
|
1250
1280
|
padding-top: var(--wui-float-above-space);
|
|
1251
1281
|
}
|
|
1282
|
+
.field-float.wui-float-above:has(> textarea.form-control) .float-label {
|
|
1283
|
+
top: calc(22px + var(--wui-float-above-space));
|
|
1284
|
+
}
|
|
1252
1285
|
.field-float.wui-float-above .float-label {
|
|
1253
1286
|
// Centred on the box, not the shell: the shell is the reserved line plus the box.
|
|
1254
1287
|
top: calc(50% + var(--wui-float-above-space) / 2);
|
|
@@ -1261,21 +1294,29 @@ form .wui-field-message:empty {
|
|
|
1261
1294
|
color var(--wui-duration-fast) var(--wui-ease-ui);
|
|
1262
1295
|
}
|
|
1263
1296
|
.field-float.wui-float-above .input:focus ~ .float-label,
|
|
1264
|
-
.field-float.wui-float-above .
|
|
1297
|
+
.field-float.wui-float-above textarea.form-control:focus ~ .float-label,
|
|
1298
|
+
.field-float.wui-float-above .input:not(:placeholder-shown) ~ .float-label,
|
|
1299
|
+
.field-float.wui-float-above textarea.form-control:not(:placeholder-shown) ~ .float-label {
|
|
1265
1300
|
top: 0;
|
|
1266
1301
|
inset-inline-start: 0;
|
|
1267
1302
|
padding: 0;
|
|
1268
1303
|
transform: scale(0.86);
|
|
1269
1304
|
font-weight: 500;
|
|
1270
1305
|
}
|
|
1271
|
-
.field-float.wui-float-above .input:not(:focus):not(:placeholder-shown):not(.error):not(.is-invalid) ~ .float-label
|
|
1306
|
+
.field-float.wui-float-above .input:not(:focus):not(:placeholder-shown):not(.error):not(.is-invalid) ~ .float-label,
|
|
1307
|
+
.field-float.wui-float-above textarea.form-control:not(:focus):not(:placeholder-shown):not(.error):not(.is-invalid) ~ .float-label {
|
|
1272
1308
|
color: var(--color-text);
|
|
1273
1309
|
}
|
|
1274
1310
|
.field-float.wui-float-above .input ~ .float-label,
|
|
1311
|
+
.field-float.wui-float-above textarea.form-control ~ .float-label,
|
|
1275
1312
|
.field-float.wui-float-above .input:focus ~ .float-label,
|
|
1313
|
+
.field-float.wui-float-above textarea.form-control:focus ~ .float-label,
|
|
1276
1314
|
.field-float.wui-float-above .input.error ~ .float-label,
|
|
1315
|
+
.field-float.wui-float-above textarea.form-control.error ~ .float-label,
|
|
1277
1316
|
.field-float.wui-float-above .input.is-invalid ~ .float-label,
|
|
1278
|
-
.field-float.wui-float-above .
|
|
1317
|
+
.field-float.wui-float-above textarea.form-control.is-invalid ~ .float-label,
|
|
1318
|
+
.field-float.wui-float-above .input[aria-invalid="true"] ~ .float-label,
|
|
1319
|
+
.field-float.wui-float-above textarea.form-control[aria-invalid="true"] ~ .float-label {
|
|
1279
1320
|
background: transparent;
|
|
1280
1321
|
}
|
|
1281
1322
|
|