lightning-base-components 1.18.5-alpha → 1.18.7-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 +10 -58
- package/scopedImports/@salesforce-label-LightningPill.delete.js +1 -1
- package/scopedImports/@salesforce-label-LightningPill.deleteAndNavigate.js +1 -1
- package/scopedImports/@salesforce-label-LightningPill.remove.js +1 -1
- package/scopedImports/@salesforce-label-LightningRecordPicker.dataSourceErrorMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.invalidConfigurationErrorMessage.js +1 -0
- package/src/lightning/accordion/accordion.css +2 -2
- package/src/lightning/accordion/accordion.js +2 -4
- package/src/lightning/accordionSection/accordionSection.css +2 -2
- package/src/lightning/accordionSection/accordionSection.js +2 -4
- package/src/lightning/avatar/avatar.css +2 -2
- package/src/lightning/avatar/avatar.js +2 -3
- package/src/lightning/baseCombobox/baseCombobox.css +2 -2
- package/src/lightning/baseCombobox/baseCombobox.js +37 -85
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +2 -4
- package/src/lightning/baseComboboxItem/inline.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +2 -4
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +2 -3
- package/src/lightning/button/button.css +2 -2
- package/src/lightning/button/button.js +3 -2
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +2 -3
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +0 -1
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +2 -4
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +2 -3
- package/src/lightning/calendar/calendar.css +2 -2
- package/src/lightning/calendar/calendar.js +2 -4
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +2 -3
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +2 -3
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +2 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +2 -4
- package/src/lightning/combobox/combobox.css +2 -2
- package/src/lightning/combobox/combobox.js +2 -4
- package/src/lightning/datepicker/datepicker.css +2 -2
- package/src/lightning/datepicker/datepicker.js +2 -4
- package/src/lightning/datetimepicker/datetimepicker.css +2 -2
- package/src/lightning/datetimepicker/datetimepicker.js +2 -4
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.js +2 -4
- package/src/lightning/dynamicIcon/dynamicIcon.js +2 -3
- 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/f6Controller/f6Controller.js +49 -3
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +1 -1
- package/src/lightning/formattedRichText/formattedRichText.css +2 -1
- package/src/lightning/formattedRichText/formattedRichText.html +1 -1
- package/src/lightning/formattedRichText/formattedRichText.js +3 -4
- package/src/lightning/formattedText/formattedText.css +1 -1
- package/src/lightning/formattedText/formattedText.js +2 -3
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +2 -3
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +3 -10
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +1 -2
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
- package/src/lightning/input/__examples__/number/number.html +5 -0
- package/src/lightning/input/input.css +4 -2
- package/src/lightning/input/input.html +239 -149
- package/src/lightning/input/input.js +532 -209
- package/src/lightning/{inputUtils/number.js → input/numberUtil.js} +1 -1
- package/src/lightning/inputUtils/inputUtils.js +20 -15
- package/src/lightning/inputUtils/normalize.js +0 -7
- package/src/lightning/layout/layout.css +2 -2
- package/src/lightning/layout/layout.js +2 -4
- package/src/lightning/layoutItem/layoutItem.css +2 -2
- package/src/lightning/layoutItem/layoutItem.js +2 -4
- package/src/lightning/menuDivider/menuDivider.css +2 -2
- package/src/lightning/menuDivider/menuDivider.js +2 -4
- package/src/lightning/menuItem/menuItem.css +2 -2
- package/src/lightning/menuItem/menuItem.js +2 -4
- package/src/lightning/menuSubheader/menuSubheader.css +2 -2
- package/src/lightning/menuSubheader/menuSubheader.js +2 -4
- package/src/lightning/pill/link.css +2 -2
- package/src/lightning/pill/link.html +8 -7
- package/src/lightning/pill/pill.js +9 -6
- package/src/lightning/pill/plain.css +2 -2
- package/src/lightning/pill/plain.html +2 -2
- package/src/lightning/pill/plainLink.css +2 -2
- package/src/lightning/pill/plainLink.html +6 -6
- package/src/lightning/pillContainer/barePillContainer.css +2 -2
- package/src/lightning/pillContainer/pillContainer.js +2 -4
- package/src/lightning/pillContainer/standardPillContainer.css +2 -2
- package/src/lightning/popup/popup.css +2 -2
- package/src/lightning/popup/popup.js +2 -3
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +2 -4
- package/src/lightning/primitiveButton/primitiveButton.js +10 -11
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +2 -3
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -2
- package/src/lightning/primitiveIcon/primitiveIcon.js +2 -3
- package/src/lightning/radioGroup/radioGroup.css +3 -2
- package/src/lightning/radioGroup/radioGroup.js +2 -4
- package/src/lightning/routingService/routingService.js +2 -1
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +2 -4
- package/src/lightning/select/select.js-meta.xml +2 -0
- 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.css +2 -2
- package/src/lightning/spinner/spinner.js +2 -4
- package/src/lightning/tab/tab.js +14 -22
- package/src/lightning/tabBar/tabBar.css +2 -2
- package/src/lightning/tabBar/tabBar.js +2 -4
- package/src/lightning/tabset/tabset.js +10 -28
- package/src/lightning/timepicker/timepicker.css +2 -2
- package/src/lightning/timepicker/timepicker.js +2 -4
- package/src/lightning/toast/__docs__/toast.md +2 -2
- package/src/lightning/{primitiveInputFile/button.slds.css → toast/button-icon.slds.css} +382 -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 +5 -5
- 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/verticalNavigation/verticalNavigation.css +3 -2
- package/src/lightning/verticalNavigation/verticalNavigation.js +2 -3
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +2 -3
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +0 -6
- package/src/lightning/inputUtils/utils.js +0 -18
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.css +0 -3
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +0 -48
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +0 -139
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +0 -126
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.css +0 -6
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +0 -24
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +0 -176
- package/src/lightning/primitiveInputColor/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputColor/input-color.slds.css +0 -35
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +0 -4
- package/src/lightning/primitiveInputColor/primitiveInputColor.html +0 -50
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +0 -184
- package/src/lightning/primitiveInputFile/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputFile/input-file.slds.css +0 -62
- package/src/lightning/primitiveInputFile/primitiveInputFile.css +0 -5
- package/src/lightning/primitiveInputFile/primitiveInputFile.html +0 -45
- package/src/lightning/primitiveInputFile/primitiveInputFile.js +0 -111
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +0 -24
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.js +0 -103
- package/src/lightning/primitiveInputSimple/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputSimple/input-text.slds.css +0 -398
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.css +0 -9
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +0 -65
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +0 -585
- package/src/lightning/primitiveInputToggle/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +0 -170
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.css +0 -3
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +0 -34
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +0 -164
- 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
- /package/src/lightning/{inputUtils/email.js → input/emailUtil.js} +0 -0
- /package/src/lightning/{primitiveInputCheckbox → input}/input-checkbox.slds.css +0 -0
- /package/src/lightning/{primitiveInputColor → input}/input-text.slds.css +0 -0
- /package/src/lightning/{primitiveInputSimple → input}/normalize.js +0 -0
- /package/src/lightning/{primitiveInputSimple → input}/selection.js +0 -0
package/metadata/raptor.json
CHANGED
|
@@ -3174,6 +3174,9 @@
|
|
|
3174
3174
|
{
|
|
3175
3175
|
"name": "blur"
|
|
3176
3176
|
},
|
|
3177
|
+
{
|
|
3178
|
+
"name": "checkValidity"
|
|
3179
|
+
},
|
|
3177
3180
|
{
|
|
3178
3181
|
"name": "focus"
|
|
3179
3182
|
}
|
|
@@ -3298,6 +3301,7 @@
|
|
|
3298
3301
|
"salesPeopleApi": {},
|
|
3299
3302
|
"salesUserWorkingHoursApi": {},
|
|
3300
3303
|
"select": {
|
|
3304
|
+
"minVersion": "59.0",
|
|
3301
3305
|
"slotNames": [],
|
|
3302
3306
|
"properties": [
|
|
3303
3307
|
{
|
|
@@ -3362,6 +3366,7 @@
|
|
|
3362
3366
|
]
|
|
3363
3367
|
},
|
|
3364
3368
|
"serviceAutomationServiceCatalogApi": {},
|
|
3369
|
+
"serviceCategoryNetworkApi": {},
|
|
3365
3370
|
"serviceCloudVoiceToolkitApi": {
|
|
3366
3371
|
"minVersion": "52.0",
|
|
3367
3372
|
"slotNames": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightning-base-components",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.7-alpha",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"external",
|
|
@@ -918,6 +918,14 @@
|
|
|
918
918
|
"name": "@salesforce/label/LightningLookup.noAccess",
|
|
919
919
|
"path": "scopedImports/@salesforce-label-LightningLookup.noAccess.js"
|
|
920
920
|
},
|
|
921
|
+
{
|
|
922
|
+
"name": "@salesforce/label/LightningRecordPicker.invalidConfigurationErrorMessage",
|
|
923
|
+
"path": "scopedImports/@salesforce-label-LightningRecordPicker.invalidConfigurationErrorMessage.js"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "@salesforce/label/LightningRecordPicker.dataSourceErrorMessage",
|
|
927
|
+
"path": "scopedImports/@salesforce-label-LightningRecordPicker.dataSourceErrorMessage.js"
|
|
928
|
+
},
|
|
921
929
|
{
|
|
922
930
|
"name": "@salesforce/label/LightningPicklist.available",
|
|
923
931
|
"path": "scopedImports/@salesforce-label-LightningPicklist.available.js"
|
|
@@ -1255,63 +1263,7 @@
|
|
|
1255
1263
|
"path": "scopedImports/@salesforce-internal-core.untrustedContentDomain.js"
|
|
1256
1264
|
}
|
|
1257
1265
|
],
|
|
1258
|
-
"nativeShadowEnabledComponents": [
|
|
1259
|
-
"lightning-accordion",
|
|
1260
|
-
"lightning-accordion-section",
|
|
1261
|
-
"lightning-avatar",
|
|
1262
|
-
"lightning-base-combobox",
|
|
1263
|
-
"lightning-base-combobox-item",
|
|
1264
|
-
"lightning-breadcrumb",
|
|
1265
|
-
"lightning-breadcrumbs",
|
|
1266
|
-
"lightning-bubble",
|
|
1267
|
-
"lightning-button",
|
|
1268
|
-
"lightning-button-group",
|
|
1269
|
-
"lightning-button-icon",
|
|
1270
|
-
"lightning-button-icon-stateful",
|
|
1271
|
-
"lightning-button-menu",
|
|
1272
|
-
"lightning-button-stateful",
|
|
1273
|
-
"lightning-card",
|
|
1274
|
-
"lightning-calendar",
|
|
1275
|
-
"lightning-color-picker-custom",
|
|
1276
|
-
"lightning-color-picker-panel",
|
|
1277
|
-
"lightning-combobox",
|
|
1278
|
-
"lightning-datepicker",
|
|
1279
|
-
"lightning-datetimepicker",
|
|
1280
|
-
"lightning-dual-listbox",
|
|
1281
|
-
"lightning-dynamic-icon",
|
|
1282
|
-
"lightning-formatted-rich-text",
|
|
1283
|
-
"lightning-formatted-text",
|
|
1284
|
-
"lightning-helptext",
|
|
1285
|
-
"lightning-icon",
|
|
1286
|
-
"lightning-input",
|
|
1287
|
-
"lightning-layout",
|
|
1288
|
-
"lightning-layout-item",
|
|
1289
|
-
"lightning-menu-divider",
|
|
1290
|
-
"lightning-menu-item",
|
|
1291
|
-
"lightning-menu-subheader",
|
|
1292
|
-
"lightning-overlay-container",
|
|
1293
|
-
"lightning-pill",
|
|
1294
|
-
"lightning-pill-container",
|
|
1295
|
-
"lightning-popup",
|
|
1296
|
-
"lightning-popup-source",
|
|
1297
|
-
"lightning-primitive-bubble",
|
|
1298
|
-
"lightning-primitive-color-picker-button",
|
|
1299
|
-
"lightning-primitive-icon",
|
|
1300
|
-
"lightning-primitive-input-checkbox",
|
|
1301
|
-
"lightning-primitive-input-checkbox-button",
|
|
1302
|
-
"lightning-primitive-input-color",
|
|
1303
|
-
"lightning-primitive-input-file",
|
|
1304
|
-
"lightning-primitive-input-simple",
|
|
1305
|
-
"lightning-primitive-input-toggle",
|
|
1306
|
-
"lightning-radio-group",
|
|
1307
|
-
"lightning-select",
|
|
1308
|
-
"lightning-spinner",
|
|
1309
|
-
"lightning-tab",
|
|
1310
|
-
"lightning-tab-bar",
|
|
1311
|
-
"lightning-timepicker",
|
|
1312
|
-
"lightning-vertical-navigation",
|
|
1313
|
-
"lightning-vertical-navigation-section"
|
|
1314
|
-
],
|
|
1266
|
+
"nativeShadowEnabledComponents": [],
|
|
1315
1267
|
"expose": [
|
|
1316
1268
|
"lightning/accordion",
|
|
1317
1269
|
"lightning/accordionSection",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default 'Press delete or backspace to remove';
|
|
1
|
+
export default 'Press delete or backspace to remove {0}';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default 'Press delete or backspace to remove, press enter to navigate';
|
|
1
|
+
export default 'Press delete or backspace to remove {0}, press enter to navigate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default 'Remove';
|
|
1
|
+
export default 'Remove {0}';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'Something went wrong. Try again.';
|
package/scopedImports/@salesforce-label-LightningRecordPicker.invalidConfigurationErrorMessage.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'Review the field\'s configuration. Ask your Salesforce admin for help.';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
3
2
|
import { createAccordionManager } from 'lightning/accordionUtilsPrivate';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* A collection of vertically stacked sections with multiple content areas.
|
|
7
6
|
* @slot default Placeholder for accordion-section components.
|
|
8
7
|
*/
|
|
9
|
-
export default class LightningAccordion extends
|
|
8
|
+
export default class LightningAccordion extends LightningElement {
|
|
10
9
|
privateIsSectionLessInLastRender = true;
|
|
11
10
|
_allowMultipleSectionsOpen = false;
|
|
12
11
|
connected = false;
|
|
@@ -31,7 +30,6 @@ export default class LightningAccordion extends LightningShadowBaseClass {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
connectedCallback() {
|
|
34
|
-
super.connectedCallback();
|
|
35
33
|
this.connected = true;
|
|
36
34
|
this.setAttribute('role', 'list');
|
|
37
35
|
this.classList.add('slds-accordion');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { generateUniqueId } from 'lightning/inputUtils';
|
|
4
3
|
import { keyCodes, isHeadingLevelValid } from 'lightning/utilsPrivate';
|
|
5
4
|
import { classSet } from 'lightning/utils';
|
|
@@ -11,7 +10,7 @@ import DIR from '@salesforce/i18n/dir';
|
|
|
11
10
|
* Actions are displayed at the top right corner of the accordion section.
|
|
12
11
|
* @slot default Placeholder for your content in the accordion section.
|
|
13
12
|
*/
|
|
14
|
-
export default class LightningAccordionSection extends
|
|
13
|
+
export default class LightningAccordionSection extends LightningElement {
|
|
15
14
|
/**
|
|
16
15
|
* The unique section name to use with the active-section-name attribute in the accordion component.
|
|
17
16
|
* @type {string}
|
|
@@ -59,7 +58,6 @@ export default class LightningAccordionSection extends LightningShadowBaseClass
|
|
|
59
58
|
privateUniqueId = generateUniqueId('lgt-accordion-section');
|
|
60
59
|
|
|
61
60
|
connectedCallback() {
|
|
62
|
-
super.connectedCallback();
|
|
63
61
|
this.setAttribute('role', 'listitem');
|
|
64
62
|
this.classList.add('slds-accordion__list-item');
|
|
65
63
|
this.registerSectionWithParent();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './avatar.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './avatar.slds.css'; */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { classSet } from 'lightning/utils';
|
|
4
3
|
import { normalizeString, reflectAttribute } from 'lightning/utilsPrivate';
|
|
5
4
|
import { computeSldsClass } from 'lightning/iconUtils';
|
|
@@ -10,7 +9,7 @@ const DEFAULT_VARIANT = 'square';
|
|
|
10
9
|
/**
|
|
11
10
|
* A visual representation of an object.
|
|
12
11
|
*/
|
|
13
|
-
export default class LightningAvatar extends
|
|
12
|
+
export default class LightningAvatar extends LightningElement {
|
|
14
13
|
/**
|
|
15
14
|
* The alternative text used to describe the avatar, which is displayed as
|
|
16
15
|
* hover text on the image.
|
|
@@ -3,8 +3,7 @@ import labelDeselectOptionKeyboard from '@salesforce/label/LightningCombobox.des
|
|
|
3
3
|
import labelLoadingText from '@salesforce/label/LightningCombobox.loadingText';
|
|
4
4
|
import labelPillCloseButtonAlternativeText from '@salesforce/label/LightningCombobox.pillCloseButtonAlternativeText';
|
|
5
5
|
import labelPlaceholder from '@salesforce/label/LightningCombobox.placeholder';
|
|
6
|
-
import { api, track } from 'lwc';
|
|
7
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
6
|
+
import { LightningElement, api, track } from 'lwc';
|
|
8
7
|
import { handleKeyDownOnInput } from './keyboard';
|
|
9
8
|
import { BaseComboboxEvents } from './baseComboboxEvents';
|
|
10
9
|
import { classSet } from 'lightning/utils';
|
|
@@ -21,7 +20,7 @@ import {
|
|
|
21
20
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
22
21
|
import { VARIANT } from 'lightning/inputUtils';
|
|
23
22
|
import AriaObserver from 'lightning/ariaObserver';
|
|
24
|
-
|
|
23
|
+
|
|
25
24
|
const i18n = {
|
|
26
25
|
ariaSelectedOptions: labelAriaSelectedOptions,
|
|
27
26
|
deselectOptionKeyboard: labelDeselectOptionKeyboard,
|
|
@@ -33,8 +32,6 @@ const i18n = {
|
|
|
33
32
|
const SMALL_MIN_HEIGHT = '2.25rem';
|
|
34
33
|
const MEDIUM_MIN_HEIGHT = '6.75rem';
|
|
35
34
|
const INPUT_ELEMENT_SELECTOR = '.slds-combobox__input';
|
|
36
|
-
const INPUT_PART_ELEMENT_SELECTOR = '[part~="input-text"]';
|
|
37
|
-
const FAUX_INPUT_BUTTON_ELEMENT_SELECTOR = `${INPUT_ELEMENT_SELECTOR}.slds-input_faux`;
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Breakpoint when viewport height doesn't fit 10 items in the dropdown
|
|
@@ -49,9 +46,8 @@ const ARIA_LABEL = 'aria-label';
|
|
|
49
46
|
const ARIA_ACTIVEDESCENDANT = 'aria-activedescendant';
|
|
50
47
|
const ARIA_INVALID = 'aria-invalid';
|
|
51
48
|
|
|
52
|
-
export default class LightningBaseCombobox extends
|
|
49
|
+
export default class LightningBaseCombobox extends LightningElement {
|
|
53
50
|
static delegatesFocus = true;
|
|
54
|
-
static validationOptOut = ['class'];
|
|
55
51
|
|
|
56
52
|
/**
|
|
57
53
|
* Controls auto-filling of the input. Set the attribute to pass
|
|
@@ -83,16 +79,17 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
83
79
|
@api attributionLogoUrl;
|
|
84
80
|
@api attributionLogoAssistiveText;
|
|
85
81
|
|
|
86
|
-
_showDropdownActivityIndicator = false;
|
|
82
|
+
@track _showDropdownActivityIndicator = false;
|
|
87
83
|
@track _items = [];
|
|
88
|
-
_disabled = false;
|
|
89
|
-
_dropdownVisible = false;
|
|
90
|
-
_hasDropdownOpened = false;
|
|
91
|
-
_highlightedOptionElementId = null;
|
|
92
|
-
_variant;
|
|
93
|
-
_dropdownHeight = 'standard';
|
|
94
|
-
_readonly = false;
|
|
95
|
-
_logoLoaded = false;
|
|
84
|
+
@track _disabled = false;
|
|
85
|
+
@track _dropdownVisible = false;
|
|
86
|
+
@track _hasDropdownOpened = false;
|
|
87
|
+
@track _highlightedOptionElementId = null;
|
|
88
|
+
@track _variant;
|
|
89
|
+
@track _dropdownHeight = 'standard';
|
|
90
|
+
@track _readonly = false;
|
|
91
|
+
@track _logoLoaded = false;
|
|
92
|
+
|
|
96
93
|
_inputDescribedBy = [];
|
|
97
94
|
_inputAriaControls;
|
|
98
95
|
_activeElementDomId;
|
|
@@ -101,13 +98,11 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
101
98
|
originDisableDefaultHighlight;
|
|
102
99
|
privateDisableDefaultHighlight;
|
|
103
100
|
_editingMode = false;
|
|
104
|
-
_connected = false;
|
|
105
|
-
ariaObserver = null;
|
|
106
101
|
|
|
107
102
|
constructor() {
|
|
108
103
|
super();
|
|
109
104
|
this._events = new BaseComboboxEvents(this);
|
|
110
|
-
this.
|
|
105
|
+
this.ariaObserver = new AriaObserver(this);
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
renderedCallback() {
|
|
@@ -119,16 +114,19 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
119
114
|
},
|
|
120
115
|
})
|
|
121
116
|
);
|
|
122
|
-
|
|
117
|
+
|
|
118
|
+
if (this.isConnected) {
|
|
119
|
+
this.ariaObserver.sync();
|
|
120
|
+
}
|
|
121
|
+
|
|
123
122
|
this.synchronizeA11y();
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
connectedCallback() {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (isCSR) {
|
|
130
|
-
this.overrideDropdownAlignment();
|
|
126
|
+
if (!this.ariaObserver) {
|
|
127
|
+
this.ariaObserver = new AriaObserver(this);
|
|
131
128
|
}
|
|
129
|
+
this.overrideDropdownAlignment();
|
|
132
130
|
this.classList.add('slds-combobox_container');
|
|
133
131
|
this._connected = true;
|
|
134
132
|
this._keyboardInterface = this.dropdownKeyboardInterface();
|
|
@@ -137,19 +135,9 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
137
135
|
disconnectedCallback() {
|
|
138
136
|
this._connected = false;
|
|
139
137
|
this._listBoxElementCache = undefined;
|
|
140
|
-
this.
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
setupAriaObserverIfAbsent() {
|
|
144
|
-
if (!this.ariaObserver) {
|
|
145
|
-
this.ariaObserver = new AriaObserver(this);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
removeAriaObserver() {
|
|
150
|
-
if (this.ariaObserver && this.ariaObserver.disconnect) {
|
|
138
|
+
if (this.ariaObserver) {
|
|
151
139
|
this.ariaObserver.disconnect();
|
|
152
|
-
this.ariaObserver =
|
|
140
|
+
this.ariaObserver = undefined;
|
|
153
141
|
}
|
|
154
142
|
}
|
|
155
143
|
|
|
@@ -172,15 +160,6 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
172
160
|
this.connectAriaControls();
|
|
173
161
|
}
|
|
174
162
|
|
|
175
|
-
syncAriaObserver() {
|
|
176
|
-
this.setupAriaObserverIfAbsent();
|
|
177
|
-
const ariaObserverSyncExists =
|
|
178
|
-
this.ariaObserver && this.ariaObserver.sync;
|
|
179
|
-
if (this.isConnected && ariaObserverSyncExists) {
|
|
180
|
-
this.ariaObserver.sync();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
163
|
connectAriaControls() {
|
|
185
164
|
this.connectAriaAttribute({
|
|
186
165
|
attribute: ARIA_CONTROLS,
|
|
@@ -190,18 +169,15 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
190
169
|
}
|
|
191
170
|
|
|
192
171
|
connectAriaAttribute(params) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
relatedNodeIds,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
172
|
+
const relatedNodeIds = Array.isArray(params.relatedNodeIds)
|
|
173
|
+
? params.relatedNodeIds.map((el) => getRealDOMId(el)).join(' ')
|
|
174
|
+
: getRealDOMId(params.relatedNodeIds);
|
|
175
|
+
|
|
176
|
+
this.ariaObserver.connect({
|
|
177
|
+
...params,
|
|
178
|
+
targetSelector: INPUT_ELEMENT_SELECTOR,
|
|
179
|
+
relatedNodeIds,
|
|
180
|
+
});
|
|
205
181
|
}
|
|
206
182
|
|
|
207
183
|
@api
|
|
@@ -252,10 +228,7 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
252
228
|
}
|
|
253
229
|
|
|
254
230
|
set rootAriaNode(root) {
|
|
255
|
-
this.
|
|
256
|
-
if (this.ariaObserver) {
|
|
257
|
-
this.ariaObserver.root = root;
|
|
258
|
-
}
|
|
231
|
+
this.ariaObserver.root = root;
|
|
259
232
|
}
|
|
260
233
|
|
|
261
234
|
get inputId() {
|
|
@@ -599,9 +572,7 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
599
572
|
}
|
|
600
573
|
|
|
601
574
|
get dropdownElement() {
|
|
602
|
-
return
|
|
603
|
-
? this.template.querySelector('[data-dropdown-element]')
|
|
604
|
-
: null;
|
|
575
|
+
return this.template.querySelector('[data-dropdown-element]');
|
|
605
576
|
}
|
|
606
577
|
|
|
607
578
|
get i18n() {
|
|
@@ -946,9 +917,7 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
946
917
|
}
|
|
947
918
|
|
|
948
919
|
get inputElement() {
|
|
949
|
-
return
|
|
950
|
-
? this.template.querySelector(INPUT_ELEMENT_SELECTOR)
|
|
951
|
-
: null;
|
|
920
|
+
return this.template.querySelector(INPUT_ELEMENT_SELECTOR);
|
|
952
921
|
}
|
|
953
922
|
|
|
954
923
|
// remove-next-line-for-c-namespace
|
|
@@ -961,25 +930,8 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
961
930
|
this._autoPosition = new AutoPosition(this);
|
|
962
931
|
}
|
|
963
932
|
|
|
964
|
-
// when using dropdown-alignment='auto' positioning and standard variant lighting-combobox
|
|
965
|
-
// the selector for 'target' is determined by this.isUserInputDisabled
|
|
966
|
-
// when TRUE the target is a BUTTON element acting as a faux / fake INPUT element
|
|
967
|
-
// when FALSE the target is an INPUT element
|
|
968
|
-
// NOTE: isUserInputDisabled is NOT determined by combobox.disabled
|
|
969
|
-
// instead isUserInputDisabled is determined by
|
|
970
|
-
// this.isStandardVariant && !this.isAutocompleteEnabled (which is an internal variable)
|
|
971
|
-
// this means that the INPUT is often NOT present, and instead a BUTTON is
|
|
972
|
-
// this selector for .start({ target }) is used to
|
|
973
|
-
// position the element from so this.isUserInputDisabled
|
|
974
|
-
// must be taken into account so the proper selector can be used
|
|
975
|
-
// the 'element' below is always the same without IF/ELSE, so there
|
|
976
|
-
// is not a need to switch between selectors
|
|
977
|
-
const selectorToUse = this.isUserInputDisabled
|
|
978
|
-
? FAUX_INPUT_BUTTON_ELEMENT_SELECTOR
|
|
979
|
-
: INPUT_PART_ELEMENT_SELECTOR;
|
|
980
|
-
|
|
981
933
|
this._autoPosition.start({
|
|
982
|
-
target: () => this.template.querySelector(
|
|
934
|
+
target: () => this.template.querySelector("[part~='input-text']"),
|
|
983
935
|
element: () => this.template.querySelector('div.slds-dropdown'),
|
|
984
936
|
align: {
|
|
985
937
|
horizontal: Direction.Left,
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
3
2
|
|
|
4
3
|
import card from './card.html';
|
|
5
4
|
import inline from './inline.html';
|
|
6
5
|
|
|
7
|
-
export default class LightningBaseComboboxItem extends
|
|
6
|
+
export default class LightningBaseComboboxItem extends LightningElement {
|
|
8
7
|
@api item = {};
|
|
9
8
|
|
|
10
9
|
connectedCallback() {
|
|
11
|
-
super.connectedCallback();
|
|
12
10
|
// We want to make sure that the item has 'aria-selected' if it's selectable
|
|
13
11
|
if (this.item.selectable) {
|
|
14
12
|
this.setAttribute('aria-selected', 'false');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './listbox.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './listbox.slds.css'; */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
3
2
|
|
|
4
3
|
const DEFAULT_HREF = '#';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* An item in the hierarchy path of the page the user is on.
|
|
8
7
|
*/
|
|
9
|
-
export default class LightningBreadcrumb extends
|
|
8
|
+
export default class LightningBreadcrumb extends LightningElement {
|
|
10
9
|
/**
|
|
11
10
|
* The URL of the page that the breadcrumb goes to.
|
|
12
11
|
* @type {string}
|
|
@@ -81,7 +80,6 @@ export default class LightningBreadcrumb extends LightningShadowBaseClass {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
connectedCallback() {
|
|
84
|
-
super.connectedCallback();
|
|
85
83
|
this.connected = true;
|
|
86
84
|
// add default CSS classes to custom element tag
|
|
87
85
|
this.classList.add('slds-breadcrumb__item');
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LightningElement } from 'lwc';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A hierarchy path of the page you're currently visiting within the website or app.
|
|
5
5
|
* @slot default Placeholder for lightning-breadcrumb
|
|
6
6
|
*/
|
|
7
|
-
export default class LightningBreadcrumbs extends
|
|
7
|
+
export default class LightningBreadcrumbs extends LightningElement {
|
|
8
8
|
connectedCallback() {
|
|
9
|
-
super.connectedCallback();
|
|
10
9
|
this.setAttribute('aria-label', 'Breadcrumbs');
|
|
11
10
|
this.setAttribute('role', 'navigation');
|
|
12
11
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './button.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './button.slds.css'; */
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
normalizeString as normalize,
|
|
5
5
|
normalizeBoolean,
|
|
6
6
|
reflectAttribute,
|
|
7
|
+
isCSR,
|
|
7
8
|
} from 'lightning/utilsPrivate';
|
|
8
9
|
import LightningPrimitiveButton from 'lightning/primitiveButton';
|
|
9
10
|
import template from './button.html';
|
|
@@ -230,7 +231,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
get button() {
|
|
233
|
-
return this.template.querySelector('button');
|
|
234
|
+
return isCSR ? this.template.querySelector('button') : null;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
/**
|
|
@@ -240,7 +241,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
240
241
|
connectedCallback() {
|
|
241
242
|
// Set `data-render-mode` attribute in native shadow mode
|
|
242
243
|
if (!this.template.synthetic) {
|
|
243
|
-
this.
|
|
244
|
+
this.setAttribute('data-render-mode', 'shadow');
|
|
244
245
|
}
|
|
245
246
|
if (!this._connected) {
|
|
246
247
|
reflectAttribute(this, 'variant', this._normalizedVariant);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LightningElement } from 'lwc';
|
|
2
2
|
import { BUTTON_GROUP_ORDER } from 'lightning/utilsPrivate';
|
|
3
3
|
|
|
4
|
-
export default class LightningButtonGroup extends
|
|
4
|
+
export default class LightningButtonGroup extends LightningElement {
|
|
5
5
|
connectedCallback() {
|
|
6
|
-
super.connectedCallback();
|
|
7
6
|
this.classList.add('slds-button-group');
|
|
8
7
|
this.setAttribute('role', 'group');
|
|
9
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './button-icon.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './button-icon.slds.css'; */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './button-icon-stateful.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './button-icon-stateful.slds.css'; */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './button-menu.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './button-menu.slds.css'; */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import labelLoading from '@salesforce/label/LightningButtonMenu.loading';
|
|
2
2
|
import labelShowMenu from '@salesforce/label/LightningButtonMenu.showMenu';
|
|
3
|
-
import { api, track } from 'lwc';
|
|
4
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
|
+
import { LightningElement, api, track } from 'lwc';
|
|
5
4
|
import { classSet } from 'lightning/utils';
|
|
6
5
|
import {
|
|
7
6
|
normalizeBoolean,
|
|
@@ -47,7 +46,7 @@ validMenuAlignments.push(...['auto', 'auto-right', 'auto-left']);
|
|
|
47
46
|
* Represents a dropdown menu with a list of actions or functions.
|
|
48
47
|
* @slot default Placeholder for menu-item
|
|
49
48
|
*/
|
|
50
|
-
export default class LightningButtonMenu extends
|
|
49
|
+
export default class LightningButtonMenu extends LightningElement {
|
|
51
50
|
static delegatesFocus = true;
|
|
52
51
|
|
|
53
52
|
/**
|
|
@@ -146,7 +145,6 @@ export default class LightningButtonMenu extends LightningShadowBaseClass {
|
|
|
146
145
|
_needsFocusAfterRender = false;
|
|
147
146
|
|
|
148
147
|
connectedCallback() {
|
|
149
|
-
super.connectedCallback();
|
|
150
148
|
this._connected = true;
|
|
151
149
|
this.keyboardInterface = this.menuKeyboardInterface();
|
|
152
150
|
|