lightning-base-components 1.18.2-alpha → 1.18.4-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/metadata/raptor.json +4 -0
- package/package.json +15 -1
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/src/lightning/accordion/__docs__/accordion.md +2 -2
- package/src/lightning/avatar/__docs__/avatar.md +7 -7
- package/src/lightning/badge/__docs__/badge.md +2 -2
- package/src/lightning/baseCombobox/baseCombobox.js +62 -22
- package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +3 -3
- package/src/lightning/button/__docs__/button.md +15 -15
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +9 -9
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +9 -9
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +8 -8
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +12 -12
- package/src/lightning/calendar/calendar.css +2 -2
- package/src/lightning/calendar/calendar.js +4 -2
- package/src/lightning/card/__docs__/card.md +3 -3
- package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +2 -2
- package/src/lightning/datatable/__docs__/datatable.md +45 -35
- package/src/lightning/datatable/autoWidthStrategy.js +3 -0
- package/src/lightning/datatable/columnWidthManager.js +1 -1
- package/src/lightning/datatable/datatable.js +8 -7
- package/src/lightning/datatable/rowSelection.js +7 -4
- package/src/lightning/datatable/templates/table/table.html +1 -0
- package/src/lightning/datepicker/datepicker.css +2 -2
- package/src/lightning/datepicker/datepicker.js +4 -2
- package/src/lightning/datetimepicker/datetimepicker.css +2 -2
- package/src/lightning/datetimepicker/datetimepicker.js +4 -2
- package/src/lightning/dualListbox/dualListbox.js +16 -7
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +230 -0
- package/src/lightning/formattedRichText/formattedRichText.css +2 -0
- package/src/lightning/formattedRichText/formattedRichText.js +4 -2
- package/src/lightning/formattedText/formattedText.css +1 -0
- package/src/lightning/formattedText/formattedText.js +3 -2
- package/src/lightning/helptext/__docs__/helptext.md +2 -2
- package/src/lightning/icon/__docs__/icon.md +5 -5
- package/src/lightning/icon/icon.js +6 -1
- package/src/lightning/iconUtils/iconUtils.js +0 -12
- package/src/lightning/iconUtils/polyfill.js +5 -90
- package/src/lightning/input/__docs__/input.md +7 -7
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -0
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +2 -1
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
- package/src/lightning/input/__examples__/number/number.html +0 -5
- package/src/lightning/input/input.css +2 -4
- package/src/lightning/input/input.html +149 -239
- package/src/lightning/input/input.js +209 -532
- package/src/lightning/inputAddress/__docs__/inputAddress.md +3 -3
- package/src/lightning/inputUtils/inputUtils.js +15 -20
- package/src/lightning/inputUtils/normalize.js +7 -0
- package/src/lightning/{input/numberUtil.js → inputUtils/number.js} +1 -1
- package/src/lightning/inputUtils/utils.js +18 -0
- package/src/lightning/modalBody/__docs__/modalBody.md +9 -9
- package/src/lightning/modalFooter/__docs__/modalFooter.md +9 -9
- package/src/lightning/modalHeader/__docs__/modalHeader.md +9 -9
- package/src/lightning/overlayContainer/overlayContainer.js +4 -2
- package/src/lightning/pill/__docs__/pill.md +3 -3
- package/src/lightning/pillContainer/__docs__/pillContainer.md +14 -14
- package/src/lightning/primitiveIcon/primitiveIcon.js +8 -5
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.css +3 -0
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +48 -0
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +139 -0
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +126 -0
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.css +6 -0
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +24 -0
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +176 -0
- package/src/lightning/primitiveInputColor/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputColor/input-color.slds.css +35 -0
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +4 -0
- package/src/lightning/primitiveInputColor/primitiveInputColor.html +50 -0
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +184 -0
- package/src/lightning/primitiveInputFile/button.slds.css +527 -0
- package/src/lightning/primitiveInputFile/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputFile/input-file.slds.css +62 -0
- package/src/lightning/primitiveInputFile/primitiveInputFile.css +5 -0
- package/src/lightning/primitiveInputFile/primitiveInputFile.html +45 -0
- package/src/lightning/primitiveInputFile/primitiveInputFile.js +111 -0
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +24 -0
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.js +103 -0
- package/src/lightning/primitiveInputSimple/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputSimple/input-text.slds.css +398 -0
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.css +9 -0
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +65 -0
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +585 -0
- package/src/lightning/primitiveInputToggle/form-element.slds.css +281 -0
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +170 -0
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.css +3 -0
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +34 -0
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +164 -0
- package/src/lightning/radioGroup/__docs__/radioGroup.md +4 -4
- package/src/lightning/select/__docs__/select.md +2 -2
- package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +1 -1
- package/src/lightning/sldsCommon/sldsCommon.css +144 -42
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +10 -0
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +18 -0
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +24 -0
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +20 -0
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +259 -0
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +8 -0
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +57 -0
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +313 -0
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +308 -0
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +18 -0
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +1408 -0
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +295 -0
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.js-meta.xml +4 -0
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +14 -0
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.js-meta.xml +4 -0
- package/src/lightning/slider/__docs__/slider.md +2 -2
- package/src/lightning/tabset/__docs__/tabset.md +2 -2
- package/src/lightning/textarea/__docs__/textarea.md +2 -2
- package/src/lightning/timepicker/timepicker.js +4 -2
- package/src/lightning/toast/toast.js-meta.xml +2 -0
- package/src/lightning/toastContainer/__docs__/toastContainer.md +14 -34
- package/src/lightning/toastContainer/toastContainer.js +10 -15
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +12 -5
- package/src/lightning/iconUtils/isIframeInEdge.js +0 -7
- package/src/lightning/iconUtils/supportsSvg.js +0 -16
- /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.html +0 -0
- /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.js +0 -0
- /package/src/lightning/{input/emailUtil.js → inputUtils/email.js} +0 -0
- /package/src/lightning/{input → primitiveInputCheckbox}/input-checkbox.slds.css +0 -0
- /package/src/lightning/{input → primitiveInputColor}/input-text.slds.css +0 -0
- /package/src/lightning/{input → primitiveInputSimple}/normalize.js +0 -0
- /package/src/lightning/{input → primitiveInputSimple}/selection.js +0 -0
|
@@ -0,0 +1,295 @@
|
|
|
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
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* TODO: all the .slds-button--neutral related lines are commented out because unused by LBC.
|
|
7
|
+
* They are related to some legacy usage of the theme utilities with the link variant of the button neutral.
|
|
8
|
+
* The SLDS _themes.css uses the old BEM syntax and there may be a bug with part of the code that uses the new one.
|
|
9
|
+
* Also, the documentation on the SLDS site doesn't show any relevant examples
|
|
10
|
+
* (https://www.lightningdesignsystem.com/utilities/themes/)
|
|
11
|
+
*
|
|
12
|
+
* In addition, in the Native Shadow world, this construct may not work as expected with nested shadows.
|
|
13
|
+
* At the moment it doesn't make sense to include them in here, but keeping them commented out for discussion if needed
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* .slds-theme {} */
|
|
18
|
+
|
|
19
|
+
.slds-theme_default {
|
|
20
|
+
background-color: var(--slds-g-color-neutral-base-100, #fff);
|
|
21
|
+
color: var(--slds-g-color-neutral-base-10, #181818);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.slds-theme_shade {
|
|
25
|
+
background-color: var(--slds-g-color-neutral-base-95, #f3f3f3);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.slds-theme_inverse {
|
|
29
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
30
|
+
background-color: var(--slds-g-color-brand-base-10, #001639);
|
|
31
|
+
border-color: var(--slds-g-color-brand-base-10, #001639);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* .slds-theme_inverse a:not(.slds-button--neutral) {
|
|
35
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
36
|
+
text-decoration: underline;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.slds-theme_inverse a:not(.slds-button--neutral):link,
|
|
40
|
+
.slds-theme_inverse a:not(.slds-button--neutral):visited {
|
|
41
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slds-theme_inverse a:not(.slds-button--neutral):hover,
|
|
45
|
+
.slds-theme_inverse a:not(.slds-button--neutral):focus {
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.slds-theme_inverse a:not(.slds-button--neutral):active {
|
|
50
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.slds-theme_inverse a:not(.slds-button--neutral)[disabled] {
|
|
54
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
55
|
+
} */
|
|
56
|
+
|
|
57
|
+
.slds-theme_alt-inverse {
|
|
58
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
59
|
+
background-color: var(--slds-g-color-brand-base-20, #032d60);
|
|
60
|
+
border-color: var(--slds-g-color-brand-base-20, #032d60);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* .slds-theme_alt-inverse a:not(.slds-button--neutral) {
|
|
64
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
65
|
+
text-decoration: underline;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral):link,
|
|
69
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral):visited {
|
|
70
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral):hover,
|
|
74
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral):focus {
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral):active {
|
|
79
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.slds-theme_alt-inverse a:not(.slds-button--neutral)[disabled] {
|
|
83
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
84
|
+
} */
|
|
85
|
+
|
|
86
|
+
.slds-theme_success {
|
|
87
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
88
|
+
background-color: var(--slds-g-color-success-base-50, #2e844a);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* .slds-theme_success a:not(.slds-button--neutral) {
|
|
92
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
93
|
+
text-decoration: underline;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.slds-theme_success a:not(.slds-button--neutral):link,
|
|
97
|
+
.slds-theme_success a:not(.slds-button--neutral):visited {
|
|
98
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.slds-theme_success a:not(.slds-button--neutral):hover,
|
|
102
|
+
.slds-theme_success a:not(.slds-button--neutral):focus {
|
|
103
|
+
text-decoration: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.slds-theme_success a:not(.slds-button--neutral):active {
|
|
107
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.slds-theme_success a:not(.slds-button--neutral)[disabled] {
|
|
111
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
112
|
+
} */
|
|
113
|
+
|
|
114
|
+
.slds-theme_info {
|
|
115
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
116
|
+
background-color: var(--slds-g-color-neutral-base-50, #747474);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* .slds-theme_info a:not(.slds-button--neutral) {
|
|
120
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
121
|
+
text-decoration: underline;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.slds-theme_info a:not(.slds-button--neutral):link,
|
|
125
|
+
.slds-theme_info a:not(.slds-button--neutral):visited {
|
|
126
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.slds-theme_info a:not(.slds-button--neutral):hover,
|
|
130
|
+
.slds-theme_info a:not(.slds-button--neutral):focus {
|
|
131
|
+
text-decoration: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.slds-theme_info a:not(.slds-button--neutral):active {
|
|
135
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.slds-theme_info a:not(.slds-button--neutral)[disabled] {
|
|
139
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
140
|
+
} */
|
|
141
|
+
|
|
142
|
+
.slds-theme_warning {
|
|
143
|
+
background-color: var(--slds-g-color-warning-base-60, #fe9339);
|
|
144
|
+
color: var(--slds-g-color-neutral-base-10, #181818);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* TODO: Unsure why .slds-theme_warning involves more css for links and buttons
|
|
149
|
+
* It seems to be related to legacy implementation.
|
|
150
|
+
* However, the color contrast doesn't seem to be compliant.
|
|
151
|
+
* In addition, we may not want to have the same implementation in Native Shadow.
|
|
152
|
+
* For the time being it's better to keep these selectors disabled, and have the
|
|
153
|
+
* warning theme to have similar behavior as the other ones.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
/* .slds-theme_warning a {
|
|
158
|
+
color: var(--slds-g-color-neutral-base-10, #181818);
|
|
159
|
+
text-decoration: underline;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.slds-theme_warning a:link,
|
|
163
|
+
.slds-theme_warning a:visited {
|
|
164
|
+
color: var(--slds-g-color-neutral-base-10, #181818);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.slds-theme_warning a:hover,
|
|
168
|
+
.slds-theme_warning a:focus {
|
|
169
|
+
text-decoration: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.slds-theme_warning a:focus {
|
|
173
|
+
box-shadow: 0 0 3px var(--slds-g-color-neutral-base-30, #514f4d);
|
|
174
|
+
border: 1px solid var(--slds-g-color-neutral-base-30, #514f4d);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.slds-theme_warning a:active {
|
|
178
|
+
color: var(--slds-g-color-neutral-base-30, #514f4d);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.slds-theme_warning a[disabled] {
|
|
182
|
+
color: var(--slds-g-color-neutral-base-30, #514f4d);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.slds-theme_warning button {
|
|
186
|
+
color: var(--slds-g-color-neutral-base-30, #514f4d);
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.slds-theme_warning button:hover {
|
|
191
|
+
color: var(--slds-g-color-neutral-base-50, #706e6b);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.slds-theme_warning button:focus {
|
|
195
|
+
color: var(--slds-g-color-neutral-base-30, #514f4d);
|
|
196
|
+
box-shadow: 0 0 3px var(--slds-g-color-neutral-base-30, #514f4d);
|
|
197
|
+
border: 1px solid var(--slds-g-color-neutral-base-30, #514f4d);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.slds-theme_warning button:active {
|
|
201
|
+
color: var(--slds-g-color-neutral-base-50, #706e6b);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.slds-theme_warning .slds-icon,
|
|
205
|
+
.slds-theme_warning .slds-button__icon {
|
|
206
|
+
fill: var(--slds-g-color-neutral-base-30, #514f4d);
|
|
207
|
+
} */
|
|
208
|
+
|
|
209
|
+
.slds-theme_error {
|
|
210
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
211
|
+
background-color: var(--slds-g-color-error-base-40, #ea001e);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* .slds-theme_error a:not(.slds-button--neutral) {
|
|
215
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
216
|
+
text-decoration: underline;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.slds-theme_error a:not(.slds-button--neutral):link,
|
|
220
|
+
.slds-theme_error a:not(.slds-button--neutral):visited {
|
|
221
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.slds-theme_error a:not(.slds-button--neutral):hover,
|
|
225
|
+
.slds-theme_error a:not(.slds-button--neutral):focus {
|
|
226
|
+
text-decoration: none;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.slds-theme_error a:not(.slds-button--neutral):active {
|
|
230
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.slds-theme_error a:not(.slds-button--neutral)[disabled] {
|
|
234
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
235
|
+
} */
|
|
236
|
+
|
|
237
|
+
.slds-theme_offline {
|
|
238
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
239
|
+
background-color: var(--slds-g-color-neutral-base-30, #444);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* .slds-theme_offline a:not(.slds-button--neutral) {
|
|
243
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
244
|
+
text-decoration: underline;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.slds-theme_offline a:not(.slds-button--neutral):link,
|
|
248
|
+
.slds-theme_offline a:not(.slds-button--neutral):visited {
|
|
249
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.slds-theme_offline a:not(.slds-button--neutral):hover,
|
|
253
|
+
.slds-theme_offline a:not(.slds-button--neutral):focus {
|
|
254
|
+
text-decoration: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.slds-theme_offline a:not(.slds-button--neutral):active {
|
|
258
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.slds-theme_offline a:not(.slds-button--neutral)[disabled] {
|
|
262
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
263
|
+
} */
|
|
264
|
+
|
|
265
|
+
.slds-theme_alert-texture {
|
|
266
|
+
background-image: linear-gradient(45deg, rgb(0 0 0 / 2.5%) 25%, transparent 25%, transparent 50%, rgb(0 0 0 / 2.5%) 50%, rgb(0 0 0 / 2.5%) 75%, transparent 75%, transparent);
|
|
267
|
+
background-size: 64px 64px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.slds-theme_inverse-text {
|
|
271
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* .slds-theme_inverse-text a:not(.slds-button--neutral) {
|
|
275
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
276
|
+
text-decoration: underline;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral):link,
|
|
280
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral):visited {
|
|
281
|
+
color: var(--slds-g-color-neutral-base-100, #fff);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral):hover,
|
|
285
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral):focus {
|
|
286
|
+
text-decoration: none;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral):active {
|
|
290
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgb(255 255 255 / 50%));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.slds-theme_inverse-text a:not(.slds-button--neutral)[disabled] {
|
|
294
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgb(255 255 255 / 15%));
|
|
295
|
+
} */
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Notes:
|
|
6
|
+
* - Some of the selectors available in SLDS were not included here, because they are unused in LBC
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.slds-truncate {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
@@ -86,8 +86,8 @@ To apply custom styling, use the `:host` selector. Use SLDS styling hooks to cus
|
|
|
86
86
|
|
|
87
87
|
```css
|
|
88
88
|
:host {
|
|
89
|
-
--
|
|
90
|
-
--
|
|
89
|
+
--slds-c-slider-track-color-background: orange;
|
|
90
|
+
--slds-c-slider-thumb-color-foreground: black;
|
|
91
91
|
}
|
|
92
92
|
```
|
|
93
93
|
|
|
@@ -133,11 +133,11 @@ To change the text color on the active tab, define a custom class using the `cla
|
|
|
133
133
|
</lightning-tabset>
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
Specify the text color using the `--
|
|
136
|
+
Specify the text color using the `--slds-c-tabs-scoped-color-text-active` custom property.
|
|
137
137
|
|
|
138
138
|
```css
|
|
139
139
|
.tab-active {
|
|
140
|
-
--
|
|
140
|
+
--slds-c-tabs-scoped-color-text-active: red;
|
|
141
141
|
}
|
|
142
142
|
```
|
|
143
143
|
|
|
@@ -226,11 +226,11 @@ This example adds padding on top of the textarea using an SLDS class.
|
|
|
226
226
|
</lightning-textarea>
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
To apply custom styling, use the `:host` selector. Use SLDS styling hooks to customize the component's styles. For example, specify the minimum height using the `--
|
|
229
|
+
To apply custom styling, use the `:host` selector. Use SLDS styling hooks to customize the component's styles. For example, specify the minimum height using the `--slds-c-textarea-sizing-min-height` custom property.
|
|
230
230
|
|
|
231
231
|
```css
|
|
232
232
|
:host {
|
|
233
|
-
--
|
|
233
|
+
--slds-c-textarea-sizing-min-height: 200px;
|
|
234
234
|
}
|
|
235
235
|
```
|
|
236
236
|
|
|
@@ -4,7 +4,8 @@ import labelRangeOverflow from '@salesforce/label/LightningDateTimePicker.rangeO
|
|
|
4
4
|
import labelRangeUnderflow from '@salesforce/label/LightningDateTimePicker.rangeUnderflow';
|
|
5
5
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
6
6
|
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
7
|
-
import {
|
|
7
|
+
import { track, api } from 'lwc';
|
|
8
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
8
9
|
import { getTimeToHighlight } from './utils';
|
|
9
10
|
import { classSet, formatLabel } from 'lightning/utils';
|
|
10
11
|
import {
|
|
@@ -40,7 +41,7 @@ const TIME_STYLE = {
|
|
|
40
41
|
LONG: 'long',
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
export default class LightningTimePicker extends
|
|
44
|
+
export default class LightningTimePicker extends LightningShadowBaseClass {
|
|
44
45
|
static delegatesFocus = true;
|
|
45
46
|
|
|
46
47
|
@track _disabled = false;
|
|
@@ -276,6 +277,7 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
connectedCallback() {
|
|
280
|
+
super.connectedCallback();
|
|
279
281
|
this.connected = true;
|
|
280
282
|
}
|
|
281
283
|
|
|
@@ -1,40 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
Use the `lightning/toastContainer` module (Beta) to manage a list of toast components and their order. Pages support a single page-level toast container.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This module is available only for LWR Sites for Experience Cloud. For more information, see [Create Components for LWR Sites](https://developer.salesforce.com/docs/atlas.en-us.exp_cloud_lwr.meta/exp_cloud_lwr/get_started_components.htm).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The following example will create a toast container component. This component will handle and display all the page-level toast messages. Only 1 page-level container exists at a time.
|
|
8
|
-
|
|
9
|
-
By default, the toast container shows, at most, 3 toast notifications at the same time. The most recent toast will display visually at the top or first, and the oldest toast notification will be displayed at the bottom of the toast container, or last. The container position is fixed to the viewport and the toast component will display at the top and center of the container.
|
|
5
|
+
This example creates a basic toast container component that handles and displays all the page-level toast messages.
|
|
10
6
|
|
|
11
7
|
```javascript
|
|
12
8
|
const toastContainer = ToastContainer.instance();
|
|
13
9
|
```
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
The `maxToasts` attribute sets the maximum number of toasts shown in the container. It accepts any non-zero positive number. Default value is 3.
|
|
11
|
+
#### Customization
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
By default, the toast container shows a maximum of 3 toast notifications at the same time. Set the `maxToasts` attribute to change the maximum number of toasts shown at a time.
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|-------| ------------ |
|
|
23
|
-
| `fixed` (default) | positioned relative to the initial containing block established by the viewport |
|
|
24
|
-
| `absolute` | positioned relative to its closest positioned ancestor |
|
|
15
|
+
Toast components display at the top center of the container by default. The most recent toast displays at the top of the container, and the oldest toast notification displays at the bottom. Change the toasts' position in the container with the `toastPosition` attribute.
|
|
25
16
|
|
|
26
|
-
The
|
|
17
|
+
The container position is fixed to the viewport. Adjust the position of the container relative to its parent element with the `containerPosition` attribute. This attribute has two values.
|
|
18
|
+
- `fixed` - positions the container relative to the initial containing block established by the viewport.
|
|
19
|
+
- `absolute` - positions the container relative to a positioned parent element.
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|-------| ------------ |
|
|
30
|
-
| `top-center` (default) | toasts shown at top-center in the container |
|
|
31
|
-
| `top-left` | toasts shown at top-left in the container |
|
|
32
|
-
| `top-right` | toasts shown at top-right in the container |
|
|
33
|
-
| `bottom-center` | toasts shown at bottom-center in the container |
|
|
34
|
-
| `bottom-left` | toasts shown at bottom-left in the container |
|
|
35
|
-
| `bottom-right` | toasts shown at bottom-right in the container |
|
|
36
|
-
|
|
37
|
-
The following example changes the page-level toast container to show at most 5 toast messages at one time at the top-right in the viewport (i.e. `containerPosition` is `fixed` by default).
|
|
21
|
+
This example creates a page-level toast container in the top-right in the viewport that shows a maximum of 5 toast messages at one time.
|
|
38
22
|
```javascript
|
|
39
23
|
// c/myApp.js
|
|
40
24
|
import { LightningElement } from 'lwc';
|
|
@@ -49,11 +33,7 @@ export default class MyApp extends LightningElement {
|
|
|
49
33
|
}
|
|
50
34
|
```
|
|
51
35
|
|
|
52
|
-
|
|
53
|
-
Toast container
|
|
54
|
-
- Press `
|
|
55
|
-
- Press `Shift` + `
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Future support (244+)
|
|
59
|
-
- Local toast container support - allows multiple toast containers in a page. A component can have its own toast container to display toast messages relevant to the component's context.
|
|
36
|
+
#### Accessibility
|
|
37
|
+
Toast container follows the SLDS [Global Focus Orchestration](https://www.lightningdesignsystem.com/accessibility/guidelines/global-focus/#global-orchestration) accessibility guidelines, which allow users to use the keyboard shortcut to navigate between toasts.
|
|
38
|
+
- Press `Control` + `F6` or `Command` + `F6` for Mac OS to move focus to next toast, if any.
|
|
39
|
+
- Press `Shift` + `Control` + `F6` or `Shift` + `Command` + `F6` for Mac OS to move focus to the previous toast, if any.
|
|
@@ -96,11 +96,9 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* toast container
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* @returns {string}
|
|
103
|
-
* @default 'fixed'
|
|
99
|
+
* Controls the position of the toast container <div> related to the containing element. Supported values are 'absolute' and 'fixed'.
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @default fixed
|
|
104
102
|
*/
|
|
105
103
|
@api get containerPosition() {
|
|
106
104
|
return this._containerPosition;
|
|
@@ -117,9 +115,8 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
117
115
|
}
|
|
118
116
|
|
|
119
117
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @returns {number}
|
|
118
|
+
* Sets the maximum number of toast components shown at a given time.
|
|
119
|
+
* @type {number}
|
|
123
120
|
* @default 3
|
|
124
121
|
*/
|
|
125
122
|
@api get maxToasts() {
|
|
@@ -134,7 +131,7 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
134
131
|
}
|
|
135
132
|
|
|
136
133
|
/**
|
|
137
|
-
*
|
|
134
|
+
* Returns the <div> element that hosts the toast components.
|
|
138
135
|
* @return {HTMLElement}
|
|
139
136
|
*/
|
|
140
137
|
get root() {
|
|
@@ -142,11 +139,9 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
142
139
|
}
|
|
143
140
|
|
|
144
141
|
/**
|
|
145
|
-
* toast
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* @returns {string}
|
|
149
|
-
* @default 'top-center'
|
|
142
|
+
* Controls the position of toast components inside the toast container. Supported values are 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', and 'bottom-right'.
|
|
143
|
+
* @type {string}
|
|
144
|
+
* @default top-center
|
|
150
145
|
*/
|
|
151
146
|
@api get toastPosition() {
|
|
152
147
|
return this._toastPosition;
|
|
@@ -167,7 +162,7 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
167
162
|
}
|
|
168
163
|
|
|
169
164
|
/**
|
|
170
|
-
*
|
|
165
|
+
* Overrides the "close" function of the toast container.
|
|
171
166
|
*/
|
|
172
167
|
@api close() {
|
|
173
168
|
// reset before closing the container
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'lwc';
|
|
2
2
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
3
|
-
import { assert, guid, normalizeString } from 'lightning/utilsPrivate';
|
|
3
|
+
import { assert, guid, normalizeString, isCSR } from 'lightning/utilsPrivate';
|
|
4
4
|
import LightningPrimitiveBubble from 'lightning/primitiveBubble';
|
|
5
5
|
import AriaObserver from 'lightning/ariaObserver';
|
|
6
6
|
export { Direction } from 'lightning/positionLibrary';
|
|
@@ -105,7 +105,7 @@ export class Tooltip {
|
|
|
105
105
|
|
|
106
106
|
// If a tooltip element is not given, fall back on the globally shared instance.
|
|
107
107
|
this._element = config.element;
|
|
108
|
-
if (!this._element) {
|
|
108
|
+
if (isCSR && !this._element) {
|
|
109
109
|
this._element = getCachedBubbleElement;
|
|
110
110
|
const bubbleElement = getCachedBubbleElement();
|
|
111
111
|
if (bubbleElement.parentNode === null) {
|
|
@@ -173,9 +173,16 @@ export class Tooltip {
|
|
|
173
173
|
);
|
|
174
174
|
// Unlike the tooltip in Aura, we want clicks and keys to dismiss the tooltip.
|
|
175
175
|
['mouseleave', 'blur', 'click', 'keydown'].forEach((name) =>
|
|
176
|
-
target.addEventListener(name, (event) =>
|
|
177
|
-
this.
|
|
178
|
-
|
|
176
|
+
target.addEventListener(name, (event) => {
|
|
177
|
+
if (!this._visible) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
this.hideIfNotSelfCover(event);
|
|
181
|
+
|
|
182
|
+
if (event.key === 'Escape') {
|
|
183
|
+
event.stopPropagation();
|
|
184
|
+
}
|
|
185
|
+
})
|
|
179
186
|
);
|
|
180
187
|
}
|
|
181
188
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// Taken from https://github.com/jonathantneal/svg4everybody/pull/139
|
|
2
|
-
// Remove this iframe-in-edge check once the following is resolved https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8323875/
|
|
3
|
-
const isEdgeUA = /\bEdge\/.(\d+)\b/.test(navigator.userAgent);
|
|
4
|
-
const inIframe = window.top !== window.self;
|
|
5
|
-
const isIframeInEdge = isEdgeUA && inIframe;
|
|
6
|
-
|
|
7
|
-
export default isIframeInEdge;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import isIframeInEdge from './isIframeInEdge';
|
|
2
|
-
|
|
3
|
-
// Taken from https://git.soma.salesforce.com/aura/lightning-global/blob/999dc35f948246181510df6e56f45ad4955032c2/src/main/components/lightning/SVGLibrary/stamper.js#L89-L98
|
|
4
|
-
// Which looks like it was inspired by https://github.com/jonathantneal/svg4everybody/blob/377d27208fcad3671ed466e9511556cb9c8b5bd8/lib/svg4everybody.js#L92-L107
|
|
5
|
-
// Modify at your own risk!
|
|
6
|
-
const newerIEUA = /\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/;
|
|
7
|
-
const webkitUA = /\bAppleWebKit\/(\d+)\b/;
|
|
8
|
-
const olderEdgeUA = /\bEdge\/12\.(\d+)\b/;
|
|
9
|
-
const isIE =
|
|
10
|
-
newerIEUA.test(navigator.userAgent) ||
|
|
11
|
-
(navigator.userAgent.match(olderEdgeUA) || [])[1] < 10547 ||
|
|
12
|
-
(navigator.userAgent.match(webkitUA) || [])[1] < 537;
|
|
13
|
-
|
|
14
|
-
const supportsSvg = !isIE && !isIframeInEdge;
|
|
15
|
-
|
|
16
|
-
export default supportsSvg;
|
/package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.html
RENAMED
|
File without changes
|
/package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|