lightning-base-components 1.18.1-alpha → 1.18.2-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 +5 -0
- package/package.json +43 -1
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/src/lightning/accordion/accordion.css +12 -0
- package/src/lightning/accordion/accordion.html +3 -1
- package/src/lightning/accordion/accordion.js +4 -2
- package/src/lightning/accordion/accordion.slds.css +671 -0
- package/src/lightning/accordionSection/accordion-section.slds.css +647 -0
- package/src/lightning/accordionSection/accordionSection.css +14 -0
- package/src/lightning/accordionSection/accordionSection.html +23 -19
- package/src/lightning/accordionSection/accordionSection.js +29 -2
- package/src/lightning/ariaObserver/__docs__/ariaObserver.md +21 -9
- package/src/lightning/ariaObserver/ariaObserver.js +185 -154
- package/src/lightning/ariaObserver/polyfill.js +639 -0
- package/src/lightning/avatar/avatar.css +2 -0
- package/src/lightning/avatar/avatar.html +2 -0
- package/src/lightning/avatar/avatar.js +18 -15
- package/src/lightning/avatar/avatar.slds.css +272 -0
- package/src/lightning/baseCombobox/base-combobox.slds.css +1585 -0
- package/src/lightning/baseCombobox/baseCombobox.css +11 -1
- package/src/lightning/baseCombobox/baseCombobox.html +154 -146
- package/src/lightning/baseCombobox/baseCombobox.js +82 -46
- package/src/lightning/baseCombobox/spinner.slds.css +438 -0
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +4 -2
- package/src/lightning/baseComboboxItem/inline.css +2 -0
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +4 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +2 -7
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +3 -2
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +7 -1
- package/src/lightning/button/__examples__/inverse/inverse.css +8 -0
- package/src/lightning/button/__examples__/inverse/inverse.html +3 -2
- package/src/lightning/button/button.css +2 -0
- package/src/lightning/button/button.html +4 -2
- package/src/lightning/button/button.js +21 -0
- package/src/lightning/button/button.slds.css +527 -0
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +3 -2
- package/src/lightning/buttonIcon/button-icon.slds.css +215 -453
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +4 -0
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +215 -453
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/{dropdown.slds.css → button-menu.slds.css} +853 -217
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.html +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +10 -14
- package/src/lightning/buttonStateful/button-stateful.slds.css +225 -457
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +3 -2
- package/src/lightning/calendar/__examples__/basic/basic.html +7 -0
- package/src/lightning/calendar/__examples__/basic/basic.js +3 -0
- package/src/lightning/calendar/calendar.css +3 -0
- package/src/lightning/calendar/calendar.html +12 -9
- package/src/lightning/calendar/calendar.js +15 -1
- package/src/lightning/calendar/calendar.slds.css +2048 -0
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +3 -2
- package/src/lightning/card/card.slds.css +141 -88
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -2
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +11 -38
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +3 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -2
- package/src/lightning/colorPickerPanel/popover.slds.css +121 -0
- package/src/lightning/combobox/combobox.css +4 -0
- package/src/lightning/combobox/combobox.html +31 -29
- package/src/lightning/combobox/combobox.js +21 -4
- package/src/lightning/combobox/combobox.slds.css +13 -0
- package/src/lightning/combobox/form-element.slds.css +281 -0
- package/src/lightning/configProvider/defaultConfig.js +2 -1
- package/src/lightning/datepicker/datepicker.css +3 -0
- package/src/lightning/datepicker/datepicker.html +7 -4
- package/src/lightning/datepicker/datepicker.js +73 -19
- package/src/lightning/datepicker/form-element.slds.css +281 -0
- package/src/lightning/datepicker/input-text.slds.css +398 -0
- package/src/lightning/datetimepicker/datetimepicker.css +3 -0
- package/src/lightning/datetimepicker/datetimepicker.html +9 -3
- package/src/lightning/datetimepicker/datetimepicker.js +39 -35
- package/src/lightning/datetimepicker/form-element.slds.css +281 -0
- package/src/lightning/datetimepicker/input-text.slds.css +398 -0
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.html +3 -3
- package/src/lightning/dualListbox/dualListbox.js +31 -6
- package/src/lightning/dualListbox/form-element.slds.css +83 -34
- package/src/lightning/dualListbox/keyboard.js +20 -1
- package/src/lightning/dynamicIcon/dynamicIcon.js +3 -2
- package/src/lightning/dynamicIcon/ellie.css +1 -1
- package/src/lightning/dynamicIcon/eq.css +1 -1
- package/src/lightning/dynamicIcon/score.css +1 -1
- package/src/lightning/dynamicIcon/strength.css +1 -1
- package/src/lightning/dynamicIcon/trend.css +1 -1
- package/src/lightning/dynamicIcon/waffle.css +1 -1
- package/src/lightning/formattedRichText/linkify.js +2 -2
- package/src/lightning/helptext/form-element.slds.css +83 -34
- package/src/lightning/helptext/help-text.slds.css +215 -453
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +3 -2
- package/src/lightning/i18nCldrOptions/README.md +5 -0
- package/src/lightning/i18nService/README.md +5 -0
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +16 -2
- package/src/lightning/icon/icon.slds.css +29 -17
- package/src/lightning/icon/iconColors.js +1 -0
- package/src/lightning/input/__examples__/text/text.html +0 -1
- package/src/lightning/input/form-element.slds.css +281 -0
- package/src/lightning/input/input-checkbox.slds.css +3 -12
- package/src/lightning/input/input-text.slds.css +239 -128
- package/src/lightning/input/input.css +2 -1
- package/src/lightning/input/input.html +8 -8
- package/src/lightning/input/input.js +107 -73
- package/src/lightning/internationalizationLibrary/README.md +24 -0
- package/src/lightning/internationalizationLibrary/utils.js +4 -1
- package/src/lightning/layout/__docs__/layout.md +1 -1
- package/src/lightning/layout/__examples__/simple/simple.css +1 -1
- package/src/lightning/layout/layout.css +5 -1
- package/src/lightning/layout/layout.js +4 -2
- package/src/lightning/layoutItem/__examples__/alignmentBump/alignmentBump.css +1 -1
- package/src/lightning/layoutItem/__examples__/sizePerDevice/sizePerDevice.css +0 -1
- package/src/lightning/layoutItem/layoutItem.css +5 -0
- package/src/lightning/layoutItem/layoutItem.js +4 -2
- package/src/lightning/menuDivider/menu-divider.slds.css +15 -0
- package/src/lightning/menuDivider/menuDivider.css +3 -0
- package/src/lightning/menuDivider/menuDivider.html +1 -1
- package/src/lightning/menuDivider/menuDivider.js +4 -2
- package/src/lightning/menuItem/menu-item.slds.css +140 -0
- package/src/lightning/menuItem/menuItem.css +3 -0
- package/src/lightning/menuItem/menuItem.html +43 -41
- package/src/lightning/menuItem/menuItem.js +4 -4
- package/src/lightning/menuSubheader/menu-subheader.slds.css +22 -0
- package/src/lightning/menuSubheader/menuSubheader.css +3 -0
- package/src/lightning/menuSubheader/menuSubheader.html +3 -1
- package/src/lightning/menuSubheader/menuSubheader.js +4 -6
- package/src/lightning/modal/__docs__/modal.md +3 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +267 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +1165 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +131 -0
- package/src/lightning/modal/modal.js +1 -1
- package/src/lightning/pill/avatar.slds.css +272 -0
- package/src/lightning/pill/link.css +3 -0
- package/src/lightning/pill/link.html +1 -1
- package/src/lightning/pill/pill.js +29 -9
- package/src/lightning/pill/pill.slds.css +168 -0
- package/src/lightning/pill/plain.css +3 -0
- package/src/lightning/pill/plain.html +1 -1
- package/src/lightning/pill/plainLink.css +3 -0
- package/src/lightning/pill/plainLink.html +1 -1
- package/src/lightning/pillContainer/barePillContainer.css +3 -0
- package/src/lightning/pillContainer/barePillContainer.html +1 -2
- package/src/lightning/pillContainer/listbox.slds.css +267 -0
- package/src/lightning/pillContainer/pill-container.slds.css +22 -0
- package/src/lightning/pillContainer/pill.slds.css +168 -0
- package/src/lightning/pillContainer/pillContainer.js +7 -3
- package/src/lightning/pillContainer/standardPillContainer.css +4 -0
- package/src/lightning/pillContainer/standardPillContainer.html +2 -2
- package/src/lightning/popup/popover.slds.css +119 -119
- package/src/lightning/popup/popup.css +1 -2
- package/src/lightning/popup/popup.js +3 -2
- package/src/lightning/positionLibrary/elementProxy.js +7 -2
- package/src/lightning/positionLibrary/util.js +8 -0
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +4 -2
- package/src/lightning/primitiveButton/primitiveButton.js +5 -4
- package/src/lightning/primitiveCellFactory/cellWithStandardLayout.html +29 -21
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -0
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +31 -19
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +5 -3
- package/src/lightning/primitiveIcon/icon.slds.css +209 -0
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -1
- package/src/lightning/primitiveIcon/primitiveIcon.html +1 -1
- package/src/lightning/primitiveIcon/primitiveIcon.js +18 -11
- package/src/lightning/progressStep/progressStep.js +10 -13
- package/src/lightning/radioGroup/radioGroup.css +2 -1
- package/src/lightning/radioGroup/radioGroup.js +4 -2
- package/src/lightning/select/form-element.slds.css +83 -34
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +4 -2
- package/src/lightning/select/select.slds.css +86 -34
- package/src/lightning/sldsCommon/sldsCommon.css +135 -75
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +4 -2
- package/src/lightning/tabBar/tab-bar.slds.css +334 -0
- package/src/lightning/tabBar/tabBar.css +2 -0
- package/src/lightning/tabBar/tabBar.html +4 -3
- package/src/lightning/tabBar/tabBar.js +30 -3
- package/src/lightning/tabset/tabset.html +5 -4
- package/src/lightning/tabset/tabset.js +29 -11
- package/src/lightning/timepicker/form-element.slds.css +281 -0
- package/src/lightning/timepicker/timepicker.css +3 -0
- package/src/lightning/timepicker/timepicker.html +5 -1
- package/src/lightning/timepicker/timepicker.js +18 -15
- package/src/lightning/timepicker/timepicker.slds.css +18 -0
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +21 -19
- package/src/lightning/utilsPrivate/browser.js +5 -3
- package/src/lightning/utilsPrivate/os.js +6 -4
- package/src/lightning/utilsPrivate/ssr.js +4 -0
- package/src/lightning/utilsPrivate/utilsPrivate.js +2 -0
- package/src/lightning/verticalNavigation/verticalNavigation.css +2 -1
- package/src/lightning/verticalNavigation/verticalNavigation.js +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +2 -1
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +3 -2
- package/src/lightning/accordion/__perf__DISABLED/accordion-perf-utils.js +0 -76
- package/src/lightning/accordion/__perf__DISABLED/accordion10Multiple25SectionEach.perf.js +0 -57
- package/src/lightning/accordion/__perf__DISABLED/accordion10Simple25SectionEach.perf.js +0 -37
- package/src/lightning/accordion/__perf__DISABLED/accordionMultiple50Section.perf.js +0 -45
- package/src/lightning/accordion/__perf__DISABLED/accordionSimple50Section.perf.js +0 -35
- package/src/lightning/accordion/__perf__DISABLED/container/container.html +0 -15
- package/src/lightning/accordion/__perf__DISABLED/container/container.js +0 -7
- package/src/lightning/positionLibrary/__component__/positionLibraryBounding.spec.js +0 -319
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.css +0 -16
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.html +0 -36
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.js +0 -122
- /package/src/lightning/{baseCombobox → baseComboboxItem}/listbox.slds.css +0 -0
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
@supports (--styling-hooks: '') {
|
|
5
|
+
/* TODO: Swap with utility classes */
|
|
6
|
+
:host([data-render-mode="shadow"]) fieldset {
|
|
7
|
+
border: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
/* FORM ELEMENT: BASE */
|
|
6
13
|
:host([data-render-mode="shadow"]) .slds-form-element {
|
|
7
14
|
position: relative;
|
|
@@ -29,11 +36,6 @@
|
|
|
29
36
|
position: relative;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
|
-
:host([data-render-mode="shadow"]) .slds-form-element__control .slds-radio,:host([data-render-mode="shadow"])
|
|
33
|
-
.slds-form-element__control .slds-checkbox {
|
|
34
|
-
display: block;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
39
|
:host([data-render-mode="shadow"]) .slds-form-element__icon {
|
|
38
40
|
display: inline-block;
|
|
39
41
|
position: relative;
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
:host([data-render-mode="shadow"]) .slds-form-element__help,:host([data-render-mode="shadow"])
|
|
51
|
-
.slds-form-element__helper {
|
|
53
|
+
.slds-form-element__helper {
|
|
52
54
|
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
53
55
|
margin-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
54
56
|
display: block;
|
|
@@ -135,29 +137,31 @@
|
|
|
135
137
|
display: block;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']):not(:host([data-render-mode="shadow"]) .slds-is-editing) {
|
|
143
|
-
padding: 0 var(--sds-g-spacing-1, 0.25rem);
|
|
140
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
141
|
+
|
|
142
|
+
/* :host([variant~='label-stacked']):not(.slds-form-element_readonly) {
|
|
143
|
+
margin-block-end: var(--sds-g-spacing-2);
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
|
|
146
|
+
:host([variant~='label-stacked']):not(.slds-is-editing) {
|
|
147
|
+
padding: 0 var(--sds-g-spacing-1);
|
|
148
|
+
} */
|
|
149
|
+
|
|
150
|
+
/* :host([variant~='label-stacked']):not([class*="slds-size"]) {
|
|
151
|
+
width: 100%;
|
|
152
|
+
flex-basis: 100%;
|
|
153
|
+
} */
|
|
154
|
+
|
|
146
155
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element {
|
|
147
156
|
padding: 0;
|
|
148
157
|
margin-block-end: 0;
|
|
149
158
|
}
|
|
150
|
-
|
|
151
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']):not([class*="slds-size"]) {
|
|
152
|
-
width: 100%;
|
|
153
|
-
flex-basis: 100%;
|
|
154
|
-
}
|
|
155
|
-
|
|
159
|
+
|
|
156
160
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
157
161
|
border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
|
|
158
162
|
padding-inline-start: 0;
|
|
159
163
|
}
|
|
160
|
-
|
|
164
|
+
|
|
161
165
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
162
166
|
width: 100%;
|
|
163
167
|
flex-basis: 100%;
|
|
@@ -170,26 +174,39 @@
|
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
/* --------------------------------------- */
|
|
173
|
-
|
|
177
|
+
|
|
174
178
|
/* FORM ELEMENT: INLINE */
|
|
175
179
|
|
|
176
180
|
:host([data-render-mode="shadow"][variant~='label-inline']) {
|
|
177
181
|
display: block;
|
|
178
182
|
}
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
|
|
184
|
+
/*
|
|
185
|
+
we have to combine with slds class here to avoid duplication
|
|
186
|
+
of this rule in child elements who import this stylesheet
|
|
187
|
+
in lighting-input this slds class is synonymous with the variant
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
:host([data-render-mode="shadow"][variant~='label-inline'].slds-form-element_horizontal) {
|
|
191
|
+
padding: var(--sds-g-spacing-1, 0.25rem);
|
|
181
192
|
margin-block-end: var(--sds-g-spacing-2, 0.5rem);
|
|
182
193
|
}
|
|
183
|
-
|
|
184
|
-
:
|
|
194
|
+
|
|
195
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
196
|
+
|
|
197
|
+
/* :host([variant~='label-inline']):not(.slds-form-element_readonly) {
|
|
198
|
+
margin-block-end: var(--sds-g-spacing-2);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host([variant~='label-inline']):not([class*="slds-size"]) {
|
|
185
202
|
width: 100%;
|
|
186
203
|
flex-basis: 100%;
|
|
187
204
|
}
|
|
188
|
-
|
|
189
|
-
:host([
|
|
190
|
-
padding: var(--sds-g-spacing-1
|
|
191
|
-
}
|
|
192
|
-
|
|
205
|
+
|
|
206
|
+
:host([variant~='label-inline']:not(.slds-is-editing)) {
|
|
207
|
+
padding: var(--sds-g-spacing-1);
|
|
208
|
+
} */
|
|
209
|
+
|
|
193
210
|
:host([data-render-mode="shadow"][variant~='label-inline']).slds-is-edited {
|
|
194
211
|
padding-block-start: var(--sds-g-sizing-6, 1.25rem)
|
|
195
212
|
}
|
|
@@ -204,16 +221,20 @@
|
|
|
204
221
|
position: relative;
|
|
205
222
|
z-index: 1;
|
|
206
223
|
}
|
|
207
|
-
|
|
224
|
+
|
|
225
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) lightning-helptext {
|
|
226
|
+
float: left;
|
|
227
|
+
}
|
|
228
|
+
|
|
208
229
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control {
|
|
209
|
-
|
|
230
|
+
margin-inline-start: 33%;
|
|
210
231
|
clear: none; /* Reset clear: left when switching to horizontal form layout */
|
|
211
232
|
}
|
|
212
|
-
|
|
233
|
+
|
|
213
234
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control .slds-form-element__control {
|
|
214
235
|
padding-inline-start: 0; /* Remove left padding on nested form controls, due to issues related to lightning-form components */
|
|
215
236
|
}
|
|
216
|
-
|
|
237
|
+
|
|
217
238
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list__column .slds-form-element__label {
|
|
218
239
|
width: auto;
|
|
219
240
|
max-width: 100%;
|
|
@@ -225,8 +246,36 @@
|
|
|
225
246
|
margin-block-end: 0;
|
|
226
247
|
}
|
|
227
248
|
|
|
249
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__help {
|
|
250
|
+
margin-inline-start: 33%;
|
|
251
|
+
}
|
|
252
|
+
|
|
228
253
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list {
|
|
229
254
|
clear: none;
|
|
230
255
|
}
|
|
231
256
|
}
|
|
257
|
+
|
|
258
|
+
/* --------------------------------------- */
|
|
259
|
+
|
|
260
|
+
/* FORM ELEMENT: COMPOUND */
|
|
261
|
+
|
|
262
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row {
|
|
263
|
+
display: flex;
|
|
264
|
+
margin-bottom: var(--sds-g-spacing-1, 0.25rem);
|
|
265
|
+
margin-left: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
266
|
+
margin-right: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row .slds-form-element__label {
|
|
270
|
+
padding-top: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element {
|
|
274
|
+
padding-left: var(--sds-g-spacing-1, 0.25rem);
|
|
275
|
+
padding-right: var(--sds-g-spacing-1, 0.25rem);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
|
+
align-items: flex-end;
|
|
280
|
+
}
|
|
232
281
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { keyCodes } from 'lightning/utilsPrivate';
|
|
2
2
|
|
|
3
|
+
function isNextOptionElmDisabled(optionEl) {
|
|
4
|
+
return !!(optionEl?.getAttribute('aria-disabled') === 'true');
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
function preventDefaultAndStopPropagation(event) {
|
|
4
8
|
event.preventDefault();
|
|
5
9
|
event.stopPropagation();
|
|
@@ -17,10 +21,18 @@ function setFocusOnNextOption(option, moveUp, intf) {
|
|
|
17
21
|
|
|
18
22
|
function selectNextOption(option, moveUp, intf) {
|
|
19
23
|
const selected = option.getAttribute('aria-selected') === 'true';
|
|
24
|
+
const isLockedOption = option.getAttribute('aria-disabled') === 'true';
|
|
20
25
|
const index = parseInt(option.getAttribute('data-index'), 10);
|
|
21
|
-
const i = index + (selected ? (moveUp ? -1 : 1) : 0);
|
|
26
|
+
const i = index + (selected || isLockedOption ? (moveUp ? -1 : 1) : 0);
|
|
22
27
|
const options = intf.getElementsOfList(option.getAttribute('data-type'));
|
|
23
28
|
const next = options[i];
|
|
29
|
+
|
|
30
|
+
// To skip selection on the locked option and move on to the next selectable option.
|
|
31
|
+
if (isNextOptionElmDisabled(next)) {
|
|
32
|
+
selectNextOption(next, moveUp, intf);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
if (next) {
|
|
25
37
|
intf.updateSelectedOptions(next, true, false);
|
|
26
38
|
}
|
|
@@ -37,6 +49,13 @@ function selectNextOptionFromShift(option, moveUp, isMultiple, intf) {
|
|
|
37
49
|
const shiftAdd = pos === moveUp || intf.getShiftIndex() === next;
|
|
38
50
|
const options = intf.getElementsOfList(option.getAttribute('data-type'));
|
|
39
51
|
const nextOption = options[next];
|
|
52
|
+
|
|
53
|
+
// To skip multi-selection on the locked option and move on to the next selectable option.
|
|
54
|
+
if (isNextOptionElmDisabled(nextOption)) {
|
|
55
|
+
selectNextOptionFromShift(nextOption, moveUp, isMultiple, intf);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
40
59
|
if (nextOption) {
|
|
41
60
|
intf.updateSelectedOptions(nextOption, shiftAdd, true);
|
|
42
61
|
intf.setLastShift(moveUp);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import { classSet } from 'lightning/utils';
|
|
3
4
|
import { normalizeString as normalize } from 'lightning/utilsPrivate';
|
|
4
5
|
import eqHtml from './eq.html';
|
|
@@ -12,7 +13,7 @@ import defaultHtml from './default.html';
|
|
|
12
13
|
/**
|
|
13
14
|
* Represents various animated icons with different states.
|
|
14
15
|
*/
|
|
15
|
-
export default class LightningDynamicIcon extends
|
|
16
|
+
export default class LightningDynamicIcon extends LightningShadowBaseClass {
|
|
16
17
|
/**
|
|
17
18
|
* The alternative text used to describe the dynamic icon.
|
|
18
19
|
* This text should describe what's happening.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-ellie.slds.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-eq.slds.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-score.slds.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-strength.slds.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-trend.slds.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import './dynamic-icon-waffle.slds.css';
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from 'lightning/utilsPrivate';
|
|
8
8
|
|
|
9
9
|
const linkRegex = new RegExp(
|
|
10
|
-
`${tagRegexString}|${
|
|
10
|
+
`${tagRegexString}|${emailRegexString}|${urlRegexString}`,
|
|
11
11
|
'gi'
|
|
12
12
|
);
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ export const linkify = function (text) {
|
|
|
25
25
|
if (typeof text !== 'string') {
|
|
26
26
|
return '';
|
|
27
27
|
}
|
|
28
|
-
return text.replace(linkRegex, (match, tagMatch,
|
|
28
|
+
return text.replace(linkRegex, (match, tagMatch, emailMatch, hrefMatch) => {
|
|
29
29
|
if (tagMatch) {
|
|
30
30
|
return tagMatch;
|
|
31
31
|
} else if (hrefMatch) {
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
@supports (--styling-hooks: '') {
|
|
5
|
+
/* TODO: Swap with utility classes */
|
|
6
|
+
:host([data-render-mode="shadow"]) fieldset {
|
|
7
|
+
border: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
/* FORM ELEMENT: BASE */
|
|
6
13
|
:host([data-render-mode="shadow"]) .slds-form-element {
|
|
7
14
|
position: relative;
|
|
@@ -29,11 +36,6 @@
|
|
|
29
36
|
position: relative;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
|
-
:host([data-render-mode="shadow"]) .slds-form-element__control .slds-radio,:host([data-render-mode="shadow"])
|
|
33
|
-
.slds-form-element__control .slds-checkbox {
|
|
34
|
-
display: block;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
39
|
:host([data-render-mode="shadow"]) .slds-form-element__icon {
|
|
38
40
|
display: inline-block;
|
|
39
41
|
position: relative;
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
:host([data-render-mode="shadow"]) .slds-form-element__help,:host([data-render-mode="shadow"])
|
|
51
|
-
.slds-form-element__helper {
|
|
53
|
+
.slds-form-element__helper {
|
|
52
54
|
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
53
55
|
margin-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
54
56
|
display: block;
|
|
@@ -135,29 +137,31 @@
|
|
|
135
137
|
display: block;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']):not(:host([data-render-mode="shadow"]) .slds-is-editing) {
|
|
143
|
-
padding: 0 var(--sds-g-spacing-1, 0.25rem);
|
|
140
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
141
|
+
|
|
142
|
+
/* :host([variant~='label-stacked']):not(.slds-form-element_readonly) {
|
|
143
|
+
margin-block-end: var(--sds-g-spacing-2);
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
|
|
146
|
+
:host([variant~='label-stacked']):not(.slds-is-editing) {
|
|
147
|
+
padding: 0 var(--sds-g-spacing-1);
|
|
148
|
+
} */
|
|
149
|
+
|
|
150
|
+
/* :host([variant~='label-stacked']):not([class*="slds-size"]) {
|
|
151
|
+
width: 100%;
|
|
152
|
+
flex-basis: 100%;
|
|
153
|
+
} */
|
|
154
|
+
|
|
146
155
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element {
|
|
147
156
|
padding: 0;
|
|
148
157
|
margin-block-end: 0;
|
|
149
158
|
}
|
|
150
|
-
|
|
151
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']):not([class*="slds-size"]) {
|
|
152
|
-
width: 100%;
|
|
153
|
-
flex-basis: 100%;
|
|
154
|
-
}
|
|
155
|
-
|
|
159
|
+
|
|
156
160
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
157
161
|
border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
|
|
158
162
|
padding-inline-start: 0;
|
|
159
163
|
}
|
|
160
|
-
|
|
164
|
+
|
|
161
165
|
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
162
166
|
width: 100%;
|
|
163
167
|
flex-basis: 100%;
|
|
@@ -170,26 +174,39 @@
|
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
/* --------------------------------------- */
|
|
173
|
-
|
|
177
|
+
|
|
174
178
|
/* FORM ELEMENT: INLINE */
|
|
175
179
|
|
|
176
180
|
:host([data-render-mode="shadow"][variant~='label-inline']) {
|
|
177
181
|
display: block;
|
|
178
182
|
}
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
|
|
184
|
+
/*
|
|
185
|
+
we have to combine with slds class here to avoid duplication
|
|
186
|
+
of this rule in child elements who import this stylesheet
|
|
187
|
+
in lighting-input this slds class is synonymous with the variant
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
:host([data-render-mode="shadow"][variant~='label-inline'].slds-form-element_horizontal) {
|
|
191
|
+
padding: var(--sds-g-spacing-1, 0.25rem);
|
|
181
192
|
margin-block-end: var(--sds-g-spacing-2, 0.5rem);
|
|
182
193
|
}
|
|
183
|
-
|
|
184
|
-
:
|
|
194
|
+
|
|
195
|
+
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
196
|
+
|
|
197
|
+
/* :host([variant~='label-inline']):not(.slds-form-element_readonly) {
|
|
198
|
+
margin-block-end: var(--sds-g-spacing-2);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host([variant~='label-inline']):not([class*="slds-size"]) {
|
|
185
202
|
width: 100%;
|
|
186
203
|
flex-basis: 100%;
|
|
187
204
|
}
|
|
188
|
-
|
|
189
|
-
:host([
|
|
190
|
-
padding: var(--sds-g-spacing-1
|
|
191
|
-
}
|
|
192
|
-
|
|
205
|
+
|
|
206
|
+
:host([variant~='label-inline']:not(.slds-is-editing)) {
|
|
207
|
+
padding: var(--sds-g-spacing-1);
|
|
208
|
+
} */
|
|
209
|
+
|
|
193
210
|
:host([data-render-mode="shadow"][variant~='label-inline']).slds-is-edited {
|
|
194
211
|
padding-block-start: var(--sds-g-sizing-6, 1.25rem)
|
|
195
212
|
}
|
|
@@ -204,16 +221,20 @@
|
|
|
204
221
|
position: relative;
|
|
205
222
|
z-index: 1;
|
|
206
223
|
}
|
|
207
|
-
|
|
224
|
+
|
|
225
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) lightning-helptext {
|
|
226
|
+
float: left;
|
|
227
|
+
}
|
|
228
|
+
|
|
208
229
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control {
|
|
209
|
-
|
|
230
|
+
margin-inline-start: 33%;
|
|
210
231
|
clear: none; /* Reset clear: left when switching to horizontal form layout */
|
|
211
232
|
}
|
|
212
|
-
|
|
233
|
+
|
|
213
234
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control .slds-form-element__control {
|
|
214
235
|
padding-inline-start: 0; /* Remove left padding on nested form controls, due to issues related to lightning-form components */
|
|
215
236
|
}
|
|
216
|
-
|
|
237
|
+
|
|
217
238
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list__column .slds-form-element__label {
|
|
218
239
|
width: auto;
|
|
219
240
|
max-width: 100%;
|
|
@@ -225,8 +246,36 @@
|
|
|
225
246
|
margin-block-end: 0;
|
|
226
247
|
}
|
|
227
248
|
|
|
249
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__help {
|
|
250
|
+
margin-inline-start: 33%;
|
|
251
|
+
}
|
|
252
|
+
|
|
228
253
|
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list {
|
|
229
254
|
clear: none;
|
|
230
255
|
}
|
|
231
256
|
}
|
|
257
|
+
|
|
258
|
+
/* --------------------------------------- */
|
|
259
|
+
|
|
260
|
+
/* FORM ELEMENT: COMPOUND */
|
|
261
|
+
|
|
262
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row {
|
|
263
|
+
display: flex;
|
|
264
|
+
margin-bottom: var(--sds-g-spacing-1, 0.25rem);
|
|
265
|
+
margin-left: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
266
|
+
margin-right: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row .slds-form-element__label {
|
|
270
|
+
padding-top: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element {
|
|
274
|
+
padding-left: var(--sds-g-spacing-1, 0.25rem);
|
|
275
|
+
padding-right: var(--sds-g-spacing-1, 0.25rem);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
|
+
align-items: flex-end;
|
|
280
|
+
}
|
|
232
281
|
}
|