lightning-base-components 1.18.5-alpha → 1.18.6-alpha
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/package.json +3 -2
- package/src/lightning/button/button.js +3 -2
- package/src/lightning/f6Controller/f6Controller.js +49 -3
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +1 -1
- package/src/lightning/formattedRichText/formattedRichText.css +1 -0
- package/src/lightning/formattedRichText/formattedRichText.html +1 -1
- package/src/lightning/formattedRichText/formattedRichText.js +1 -0
- package/src/lightning/layout/layout.js +2 -0
- package/src/lightning/layoutItem/layoutItem.js +2 -0
- package/src/lightning/primitiveButton/primitiveButton.js +8 -8
- package/src/lightning/sldsCommon/sldsCommon.css +14 -6
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +4 -4
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +50 -19
- package/src/lightning/spinner/spinner.js +7 -3
- package/src/lightning/tab/tab.js +14 -22
- package/src/lightning/tabset/tabset.js +10 -28
- package/src/lightning/toast/button-icon.slds.css +909 -0
- package/src/lightning/toast/formatted-rich-text.slds.css +230 -0
- package/src/lightning/toast/icon.slds.css +209 -0
- package/src/lightning/toast/toast.css +22 -6
- package/src/lightning/toast/toast.html +1 -1
- package/src/lightning/toast/toast.js +9 -7
- package/src/lightning/toast/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toastContainer.css +17 -6
- package/src/lightning/toastContainer/toastContainer.js +4 -0
- package/src/lightning/utilsPrivate/url.js +4 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +8 -4
- package/src/lightning/tab/tab.css +0 -2
- package/src/lightning/tab/tab.slds.css +0 -47
- package/src/lightning/tabset/tabset.css +0 -10
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) {
|
|
3
|
+
line-height: var(--sds-g-font-lineheight, 1.5);
|
|
4
|
+
overflow-wrap: break-word;
|
|
5
|
+
word-wrap: break-word;
|
|
6
|
+
-webkit-hyphens: manual;
|
|
7
|
+
-ms-hyphens: manual;
|
|
8
|
+
hyphens: manual;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h1 {
|
|
12
|
+
font-size: var(--sds-g-font-scale-1, 1.125rem);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h2 {
|
|
16
|
+
font-size: var(--sds-g-font-scale-neg-1, 0.875rem);
|
|
17
|
+
font-weight: var(--sds-g-font-weight-7, 700);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h3 {
|
|
21
|
+
font-size: var(--sds-g-font-scale-neg-1, 0.875rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h4 {
|
|
25
|
+
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
26
|
+
font-weight: var(--sds-g-font-weight-7, 700);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h5 {
|
|
30
|
+
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h6 {
|
|
34
|
+
font-size: var(--sds-g-font-scale-neg-4, 0.625rem);
|
|
35
|
+
font-weight: var(--sds-g-font-weight-7, 700);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) h1,:host([data-render-mode="shadow"].slds-rich-text-editor__output) h2,:host([data-render-mode="shadow"].slds-rich-text-editor__output) h3,:host([data-render-mode="shadow"].slds-rich-text-editor__output) h4,:host([data-render-mode="shadow"].slds-rich-text-editor__output) h5,:host([data-render-mode="shadow"].slds-rich-text-editor__output) h6,:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul,:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol,:host([data-render-mode="shadow"].slds-rich-text-editor__output) dl,:host([data-render-mode="shadow"].slds-rich-text-editor__output) img {
|
|
39
|
+
margin-block-end: var(--sds-g-spacing-3, 0.75rem);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) blockquote {
|
|
43
|
+
margin: var(--sds-g-spacing-6, 2rem) var(--sds-g-spacing-5, 1.5rem);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ins {
|
|
47
|
+
color: var(--slds-g-color-success-base-50, var(--sds-g-color-success-base-50, #2e844a));
|
|
48
|
+
text-decoration: underline;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) del {
|
|
52
|
+
color: var(--slds-g-color-error-base-30, var(--sds-g-color-error-base-50, #ea001e));
|
|
53
|
+
text-decoration: line-through;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul {
|
|
57
|
+
margin-inline-start: var(--sds-g-spacing-5, 1.5rem);
|
|
58
|
+
list-style: disc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul ul {
|
|
62
|
+
list-style: circle;
|
|
63
|
+
margin-block-end: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul ul ul {
|
|
67
|
+
list-style: square;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul ul ul ul {
|
|
71
|
+
list-style: disc;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul ul ul ul ul {
|
|
75
|
+
list-style: circle;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ul ol {
|
|
79
|
+
margin-inline-start: var(--sds-g-spacing-5, 1.5rem);
|
|
80
|
+
list-style: decimal;
|
|
81
|
+
margin-block-end: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol {
|
|
85
|
+
margin-inline-start: var(--sds-g-spacing-5, 1.5rem);
|
|
86
|
+
list-style: decimal;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol ol {
|
|
90
|
+
list-style: lower-alpha;
|
|
91
|
+
margin-block-end: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol ol ol {
|
|
95
|
+
list-style: lower-roman;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol ol ol ol {
|
|
99
|
+
list-style: decimal;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol ol ol ol ol {
|
|
103
|
+
list-style: lower-alpha;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) ol ul {
|
|
107
|
+
margin-inline-start: var(--sds-g-spacing-5, 1.5rem);
|
|
108
|
+
list-style: disc;
|
|
109
|
+
margin-block-end: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) dd {
|
|
113
|
+
margin-inline-start: var(--sds-g-spacing-7, 2.5rem);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) abbr[title],:host([data-render-mode="shadow"].slds-rich-text-editor__output) acronym[title] {
|
|
117
|
+
border-bottom: var(--sds-g-sizing-border-1, 1px) dotted;
|
|
118
|
+
cursor: help;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) table {
|
|
122
|
+
overflow-wrap: normal;
|
|
123
|
+
word-wrap: normal;
|
|
124
|
+
word-break: normal;
|
|
125
|
+
width: auto;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) table caption {
|
|
129
|
+
text-align: center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) th,:host([data-render-mode="shadow"].slds-rich-text-editor__output) td {
|
|
133
|
+
padding: var(--sds-g-spacing-2, 0.5rem);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .sans-serif {
|
|
137
|
+
font-family: sans-serif;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .courier {
|
|
141
|
+
font-family: courier;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .verdana {
|
|
145
|
+
font-family: verdana;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .tahoma {
|
|
149
|
+
font-family: tahoma;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .garamond {
|
|
153
|
+
font-family: garamond;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .serif {
|
|
157
|
+
font-family: serif;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-1:not(.ql-direction-rtl) {
|
|
161
|
+
padding-inline-start: var(--sds-g-spacing-8, 3rem);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-1.ql-direction-rtl.ql-align-right {
|
|
165
|
+
padding-inline-end: var(--sds-g-spacing-8, 3rem);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-2:not(.ql-direction-rtl) {
|
|
169
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 2);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-2.ql-direction-rtl.ql-align-right {
|
|
173
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 2);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-3:not(.ql-direction-rtl) {
|
|
177
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 3);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-3.ql-direction-rtl.ql-align-right {
|
|
181
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 3);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-4:not(.ql-direction-rtl) {
|
|
185
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 4);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-4.ql-direction-rtl.ql-align-right {
|
|
189
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 4);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-5:not(.ql-direction-rtl) {
|
|
193
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 5);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-5.ql-direction-rtl.ql-align-right {
|
|
197
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 5);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-6:not(.ql-direction-rtl) {
|
|
201
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 6);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-6.ql-direction-rtl.ql-align-right {
|
|
205
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 6);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-7:not(.ql-direction-rtl) {
|
|
209
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 7);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-7.ql-direction-rtl.ql-align-right {
|
|
213
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 7);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-8:not(.ql-direction-rtl) {
|
|
217
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 8);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-8.ql-direction-rtl.ql-align-right {
|
|
221
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 8);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-9:not(.ql-direction-rtl) {
|
|
225
|
+
padding-inline-start: calc(var(--sds-g-spacing-8, 3rem) * 9);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:host([data-render-mode="shadow"].slds-rich-text-editor__output) .ql-indent-9.ql-direction-rtl.ql-align-right {
|
|
229
|
+
padding-inline-end: calc(var(--sds-g-spacing-8, 3rem) * 9);
|
|
230
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
2
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
3
|
+
|
|
4
|
+
:host([data-render-mode="shadow"]) {
|
|
5
|
+
/**
|
|
6
|
+
* Establish independent formatting context, we don't want ancestor rules affecting our layout.
|
|
7
|
+
* This assumes there will not be a direct, child inline-level element.
|
|
8
|
+
* See https://www.w3.org/TR/css-display-3/#establish-an-independent-formatting-context
|
|
9
|
+
*/
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([data-render-mode="shadow"]) [part~='boundary'] {
|
|
14
|
+
padding-block-start: var(--sds-c-icon-spacing-block-start, var(--sds-c-icon-spacing));
|
|
15
|
+
padding-block-end: var(--sds-c-icon-spacing-block-end, var(--sds-c-icon-spacing));
|
|
16
|
+
padding-inline-start: var(--sds-c-icon-spacing-inline-start, var(--sds-c-icon-spacing));
|
|
17
|
+
padding-inline-end: var(--sds-c-icon-spacing-inline-end, var(--sds-c-icon-spacing));
|
|
18
|
+
border-radius: var(--sds-c-icon-radius-border);
|
|
19
|
+
border-width: var(--sds-c-icon-sizing-border, 1px);
|
|
20
|
+
border-style: solid;
|
|
21
|
+
border-color: var(--sds-c-icon-color-border, transparent);
|
|
22
|
+
background-color: var(--sds-c-icon-color-background);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([data-render-mode="shadow"]) [part~='icon'] {
|
|
26
|
+
display: flex; /* See line #5 */
|
|
27
|
+
height: var(--sds-c-icon-sizing-height, var(--sds-c-icon-sizing));
|
|
28
|
+
width: var(--sds-c-icon-sizing-width, var(--sds-c-icon-sizing));
|
|
29
|
+
color: var(--sds-c-icon-color-foreground);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Normalize svgs and control width/height with Styling Hooks
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
:host([data-render-mode="shadow"]) svg {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @Note: Static fallbacks are in place until SLDS adopts SDS. Without static
|
|
43
|
+
* fallbacks, styles will regress due to invalid CSS variables from
|
|
44
|
+
* missing SLDS shared and globals.
|
|
45
|
+
*
|
|
46
|
+
* Additionally, LBC are currently relying on 'part' attributes to
|
|
47
|
+
* receive styling. Authoring styles that rely on slots is not recommended.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
@supports (--styling-hooks: '') {
|
|
51
|
+
:host([data-render-mode="shadow"][size~='xxx-small']) {
|
|
52
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-3, 0.5rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([data-render-mode="shadow"][size~='xx-small']) {
|
|
56
|
+
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([data-render-mode="shadow"][size~='x-small']) {
|
|
60
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-5, 1rem);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([data-render-mode="shadow"][size~='small']) {
|
|
64
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-7, 1.5rem);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host([data-render-mode="shadow"][size~='large']) {
|
|
68
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-10, 3rem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([data-render-mode="shadow"][variant~='warning']) {
|
|
72
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-warning-base-70, #fe9339);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([data-render-mode="shadow"][variant~='success']) {
|
|
76
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-success-base-50, #2e844a);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([data-render-mode="shadow"][variant~='error']) {
|
|
80
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-error-base-50, #ea001e);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([data-render-mode="shadow"][variant~='light']) {
|
|
84
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([data-render-mode="shadow"]) [part~='boundary'] {
|
|
88
|
+
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
89
|
+
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
90
|
+
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
91
|
+
--sds-c-icon-color-border: var(--slds-c-icon-color-border);
|
|
92
|
+
--sds-c-icon-spacing-block-start: var(
|
|
93
|
+
--slds-c-icon-spacing-block-start,
|
|
94
|
+
var(--slds-c-icon-spacing-block)
|
|
95
|
+
);
|
|
96
|
+
--sds-c-icon-spacing-block-end: var(--slds-c-icon-spacing-block-end, var(--slds-c-icon-spacing-block));
|
|
97
|
+
--sds-c-icon-spacing-inline-start: var(
|
|
98
|
+
--slds-c-icon-spacing-inline-start,
|
|
99
|
+
var(--slds-c-icon-spacing-inline)
|
|
100
|
+
);
|
|
101
|
+
--sds-c-icon-spacing-inline-end: var(--slds-c-icon-spacing-inline-end, var(--slds-c-icon-spacing-inline));
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* There's a divergence in LBC that we have to support here: LBC splits their
|
|
105
|
+
* icon implementation into two components: lightning-icon and lightning-primitive-icon.
|
|
106
|
+
* slds-icon is consumed within both with no issues except that the presence of an
|
|
107
|
+
* additional custom element (primitive-icon) creates an unexpected inline-level
|
|
108
|
+
* element and breaks our formatting context. tl;dr, we have to reset the formatting
|
|
109
|
+
* context of the boundary or else we'll inherit line-height from an ancestor and
|
|
110
|
+
* get visual regressions.
|
|
111
|
+
*
|
|
112
|
+
* If lightning-icon is refactored into a single component, this line can be removed.
|
|
113
|
+
*/
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([data-render-mode="shadow"]) [part~='icon'] {
|
|
118
|
+
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
119
|
+
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
120
|
+
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host([data-render-mode="shadow"][icon-name*='action']) {
|
|
124
|
+
--slds-c-icon-spacing-block: var(--sds-g-sizing-3, 0.5rem);
|
|
125
|
+
--slds-c-icon-spacing-inline: var(--sds-g-sizing-3, 0.5rem);
|
|
126
|
+
--slds-c-icon-radius-border: calc(var(--sds-g-radius-border-circle, 100%) / 2);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* P R I V A T E
|
|
132
|
+
*
|
|
133
|
+
* The following styling is implemented by classes within the shadow DOM.
|
|
134
|
+
* They're expected to be private to the component and not for external use.
|
|
135
|
+
*
|
|
136
|
+
* See notes for each class for the rationale behind their inclusion.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Utility icons traditionally added a class to change the default foreground
|
|
141
|
+
* color (white) to a grey. This was done implicitly whereas other color changes
|
|
142
|
+
* were done explicitly through the 'variant' attribute. So this is an outlier
|
|
143
|
+
* to the overall pattern. Leaving it as-is since an update would require an
|
|
144
|
+
* API change or more investigating.
|
|
145
|
+
*
|
|
146
|
+
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
147
|
+
* outcome is the removal of this class and the default utility styling would
|
|
148
|
+
* be implemented through an attribute or some other class-less solution.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
:host([data-render-mode="shadow"]) .slds-icon-text-default {
|
|
152
|
+
/*! @css-var-fallback fill */
|
|
153
|
+
--slds-c-icon-color-foreground: var(
|
|
154
|
+
--slds-c-icon-color-foreground-default,
|
|
155
|
+
var(--sds-c-icon-color-foreground-default, var(
|
|
156
|
+
--sds-g-color-neutral-base-50, #747474))
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host([data-render-mode="shadow"]) .slds-icon-text-default.slds-is-disabled {
|
|
161
|
+
fill: var(--sds-g-color-neutral-base-80, #c9c9c9);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
166
|
+
*
|
|
167
|
+
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
168
|
+
* outcome is the removal of this class and replacing the class with the SLDS
|
|
169
|
+
* utility package solution.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
173
|
+
position: absolute !important;
|
|
174
|
+
margin: -1px !important;
|
|
175
|
+
border: 0 !important;
|
|
176
|
+
padding: 0 !important;
|
|
177
|
+
width: 1px !important;
|
|
178
|
+
height: 1px !important;
|
|
179
|
+
overflow: hidden !important;
|
|
180
|
+
clip: rect(0 0 0 0) !important;
|
|
181
|
+
text-transform: none !important;
|
|
182
|
+
white-space: nowrap !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* For the initial alpha version, we're hardcoding in the various unique icon styles.
|
|
187
|
+
*
|
|
188
|
+
* Next version, we want to dynamically generate these from legacy SLDS with the
|
|
189
|
+
* following design pattern:
|
|
190
|
+
*
|
|
191
|
+
* [type="action"][icon-name="approval"] {
|
|
192
|
+
* --sds-c-icon-color-background: var(--slds-c-icon-color-background, #111);
|
|
193
|
+
* }
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
:host([data-render-mode="shadow"]) .slds-icon_disabled {
|
|
197
|
+
background-color: currentColor;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
201
|
+
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
202
|
+
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 50%;
|
|
205
|
+
margin-block-start: -0.4375rem;
|
|
206
|
+
line-height: var(--sds-g-font-lineheight-1, 1);
|
|
207
|
+
border: 0;
|
|
208
|
+
z-index: 2;
|
|
209
|
+
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
@import 'lightning/sldsCommon';
|
|
2
|
+
@import './toast.slds.css';
|
|
3
|
+
@import './icon.slds.css';
|
|
4
|
+
@import './button-icon.slds.css';
|
|
5
|
+
@import './formatted-rich-text.slds.css';
|
|
6
|
+
@import 'lightning/sldsUtilsThemes';
|
|
7
|
+
@import 'lightning/sldsUtilsMargin';
|
|
8
|
+
@import 'lightning/sldsUtilsPosition';
|
|
9
|
+
@import 'lightning/sldsUtilsGrid';
|
|
10
|
+
|
|
11
|
+
.fix-notify_toast_animation,
|
|
12
|
+
:host([data-render-mode="shadow"]) .fix-notify_toast_animation {
|
|
2
13
|
animation-name: fadeIn;
|
|
3
14
|
animation-duration: 0.4s;
|
|
4
15
|
}
|
|
@@ -13,7 +24,8 @@
|
|
|
13
24
|
}
|
|
14
25
|
}
|
|
15
26
|
|
|
16
|
-
.fix-notify_toast_animation.closing
|
|
27
|
+
.fix-notify_toast_animation.closing,
|
|
28
|
+
:host([data-render-mode="shadow"]) .fix-notify_toast_animation.closing {
|
|
17
29
|
animation-name: fadeOut;
|
|
18
30
|
animation-duration: 0.4s;
|
|
19
31
|
}
|
|
@@ -29,24 +41,28 @@
|
|
|
29
41
|
}
|
|
30
42
|
|
|
31
43
|
/* TODO: change the following classes to the actual SLDS classes once W-12084169 is completed. */
|
|
32
|
-
.fix-slds-notify--mobile
|
|
44
|
+
.fix-slds-notify--mobile,
|
|
45
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile {
|
|
33
46
|
padding: 0.5rem 1rem 0.75rem;
|
|
34
47
|
min-width: 90%;
|
|
35
48
|
width: 90%;
|
|
36
49
|
}
|
|
37
50
|
|
|
38
|
-
.fix-slds-notify--mobile.slds-notify_toast h2
|
|
51
|
+
.fix-slds-notify--mobile.slds-notify_toast h2,
|
|
52
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile.slds-notify_toast h2 {
|
|
39
53
|
font-size: 0.8125rem;
|
|
40
54
|
font-weight: 300;
|
|
41
55
|
}
|
|
42
56
|
|
|
43
57
|
/* for screen smaller than 480px */
|
|
44
|
-
.fix-slds-notify--mobile .slds-notify__close
|
|
58
|
+
.fix-slds-notify--mobile .slds-notify__close,
|
|
59
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile .slds-notify__close {
|
|
45
60
|
top: 0.5rem;
|
|
46
61
|
}
|
|
47
62
|
|
|
48
63
|
/* for mobile device */
|
|
49
|
-
.fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close
|
|
64
|
+
.fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close,
|
|
65
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close {
|
|
50
66
|
top: -0.25rem;
|
|
51
67
|
right: -0.15rem;
|
|
52
68
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api, track } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import {
|
|
3
4
|
makeAbsoluteUrl,
|
|
4
5
|
normalizeString,
|
|
@@ -25,7 +26,7 @@ import iconErrorAltText from '@salesforce/label/LightningToast.errorLabel';
|
|
|
25
26
|
import macNavigationAssistiveText from '@salesforce/label/LightningToast.macNavigationAssistiveText';
|
|
26
27
|
import genericNavigationAssistiveText from '@salesforce/label/LightningToast.genericNavigationAssistiveText';
|
|
27
28
|
|
|
28
|
-
import {
|
|
29
|
+
import { getCurrentRegionAttributeName } from 'lightning/f6Controller';
|
|
29
30
|
|
|
30
31
|
const MODE_DISMISSIBLE = 'dismissible';
|
|
31
32
|
const MODE_STICKY = 'sticky';
|
|
@@ -45,7 +46,7 @@ const MIN_BROWSER_WIDTH = 480;
|
|
|
45
46
|
/**
|
|
46
47
|
* A notification element used to convey a label.
|
|
47
48
|
*/
|
|
48
|
-
export default class Toast extends
|
|
49
|
+
export default class Toast extends LightningShadowBaseClass {
|
|
49
50
|
static [instanceName] = 'lightning-toast';
|
|
50
51
|
static [properties] = [
|
|
51
52
|
'variant',
|
|
@@ -532,6 +533,7 @@ export default class Toast extends LightningElement {
|
|
|
532
533
|
}
|
|
533
534
|
|
|
534
535
|
connectedCallback() {
|
|
536
|
+
super.connectedCallback();
|
|
535
537
|
this.registerWithContainer();
|
|
536
538
|
this.determineSmallerScreen();
|
|
537
539
|
this.determineSmallFormFactor();
|
|
@@ -563,10 +565,10 @@ export default class Toast extends LightningElement {
|
|
|
563
565
|
}, duration);
|
|
564
566
|
}
|
|
565
567
|
// add the data-f6-region attribute to the toast div
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
''
|
|
569
|
-
|
|
568
|
+
const regionAttributeName = getCurrentRegionAttributeName();
|
|
569
|
+
if (regionAttributeName) {
|
|
570
|
+
this.toastElement.setAttribute(regionAttributeName, '');
|
|
571
|
+
}
|
|
570
572
|
}
|
|
571
573
|
}
|
|
572
574
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
background: none;
|
|
7
|
+
background-color: var(--slds-c-toast-color-background, var(--sds-g-color-neutral-base-50, #747474));
|
|
8
|
+
color: var(--slds-c-toast-text-color, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
9
|
+
border-radius: var(--slds-c-toast-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
10
|
+
margin: var(--sds-g-spacing-2, 0.5rem);
|
|
11
|
+
padding-block-start: var(--slds-c-toast-spacing-block-start, var(--sds-g-spacing-3, 0.75rem));
|
|
12
|
+
padding-inline-end: var(--slds-c-toast-spacing-inline-end, var(--sds-g-spacing-8, 3rem));
|
|
13
|
+
padding-block-end: var(--slds-c-toast-spacing-block-end, var(--sds-g-spacing-3, 0.75rem));
|
|
14
|
+
padding-inline-start: var(--slds-c-toast-spacing-inline-start, var(--sds-g-spacing-5, 1.5rem));
|
|
15
|
+
min-width: var(--slds-c-toast-sizing-min-width, var(--sds-g-sizing-16, 30rem));
|
|
16
|
+
text-align: left;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a {
|
|
21
|
+
color: currentColor;
|
|
22
|
+
border: var(--sds-g-sizing-border-1, 1px) solid transparent;
|
|
23
|
+
border-radius: var(--sds-g-radius-border-2, 0.25rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:hover,:host([data-render-mode="shadow"])
|
|
27
|
+
.slds-notify_toast a:focus {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
outline: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:focus {
|
|
33
|
+
box-shadow: 0 0 3px var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
34
|
+
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:active {
|
|
38
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgba(255, 255, 255, 0.5));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a[disabled] {
|
|
42
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgba(255, 255, 255, 0.15));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast .slds-notify__close {
|
|
46
|
+
float: right;
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: var(--sds-g-spacing-3, 0.75rem);
|
|
49
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
50
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
51
|
+
transform: translateY(-0.125rem);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([data-render-mode="shadow"]) .slds-region_narrow .slds-notify_toast {
|
|
55
|
+
min-width: auto;
|
|
56
|
+
width: 100%;
|
|
57
|
+
margin-inline-start: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* TODO W-12674349: remove after name-value-list utils are added */
|
|
61
|
+
|
|
62
|
+
:host([data-render-mode="shadow"]) .slds-list--inline {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* TODO W-12674349: remove after assistive text util is added */
|
|
68
|
+
|
|
69
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
70
|
+
position: absolute !important;
|
|
71
|
+
margin: -1px !important;
|
|
72
|
+
border: 0 !important;
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
width: 1px !important;
|
|
75
|
+
height: 1px !important;
|
|
76
|
+
overflow: hidden !important;
|
|
77
|
+
clip: rect(0 0 0 0) !important;
|
|
78
|
+
text-transform: none !important;
|
|
79
|
+
white-space: nowrap !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* TODO W-12674349: remove after text utils are added */
|
|
83
|
+
|
|
84
|
+
:host([data-render-mode="shadow"]) .slds-text-heading_small {
|
|
85
|
+
font-size: var(--sds-g-font-size-base, 1rem);
|
|
86
|
+
line-height: var(--sds-g-font-lineheight-2, 1.25);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* TODO W-12674349: remove after alert is added */
|
|
90
|
+
|
|
91
|
+
:host([data-render-mode="shadow"]) .slds-notify__close {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 50%;
|
|
94
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
95
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
96
|
+
transform: translateY(-50%);
|
|
97
|
+
}
|