lightning-base-components 1.18.7-alpha → 1.18.7-ssr
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 +30 -9
- package/package.json +68 -2
- package/src/lightning/accordion/accordion.css +4 -4
- package/src/lightning/accordion/accordion.js +4 -2
- package/src/lightning/accordion/accordion.slds.css +26 -20
- package/src/lightning/accordionSection/accordion-section.slds.css +20 -14
- package/src/lightning/accordionSection/accordionSection.css +4 -4
- package/src/lightning/accordionSection/accordionSection.js +4 -2
- package/src/lightning/avatar/avatar.css +2 -2
- package/src/lightning/avatar/avatar.js +3 -2
- package/src/lightning/avatar/avatar.slds.css +10 -10
- package/src/lightning/badge/__examples__/basic/basic.html +3 -1
- package/src/lightning/badge/badge.css +2 -0
- package/src/lightning/badge/badge.html +16 -14
- package/src/lightning/badge/badge.js +4 -2
- package/src/lightning/badge/badge.slds.css +73 -0
- package/src/lightning/baseCombobox/base-combobox.slds.css +23 -23
- package/src/lightning/baseCombobox/baseCombobox.css +2 -2
- package/src/lightning/baseCombobox/baseCombobox.html +7 -11
- package/src/lightning/baseCombobox/baseCombobox.js +87 -37
- package/src/lightning/baseCombobox/listbox.slds.css +267 -0
- package/src/lightning/baseCombobox/spinner.slds.css +34 -34
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +4 -2
- package/src/lightning/baseComboboxItem/inline.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +8 -4
- package/src/lightning/breadcrumb/breadcrumb.slds.css +3 -3
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +3 -2
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +5 -5
- package/src/lightning/button/button.css +2 -2
- package/src/lightning/button/button.slds.css +8 -2
- package/src/lightning/buttonGroup/button-group.slds.css +5 -5
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +3 -2
- package/src/lightning/buttonIcon/button-icon.slds.css +9 -3
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +1 -0
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +15 -9
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/button-menu.slds.css +13 -7
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +4 -2
- package/src/lightning/buttonMenu/dropdown.slds.css +1360 -0
- package/src/lightning/buttonStateful/button-stateful.slds.css +11 -5
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +3 -2
- package/src/lightning/calendar/calendar.css +2 -2
- package/src/lightning/calendar/calendar.js +19 -25
- package/src/lightning/calendar/calendar.slds.css +29 -23
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +3 -2
- package/src/lightning/card/card.slds.css +68 -68
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +2 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -2
- package/src/lightning/combobox/combobox.css +2 -2
- package/src/lightning/combobox/combobox.js +4 -2
- package/src/lightning/combobox/combobox.slds.css +1 -1
- package/src/lightning/combobox/form-element.slds.css +8 -0
- package/src/lightning/datatable/datatable.js +3 -0
- package/src/lightning/datatable/keyboard.js +8 -4
- package/src/lightning/datatable/sort.js +1 -1
- package/src/lightning/datepicker/datepicker.css +2 -2
- package/src/lightning/datepicker/datepicker.js +5 -3
- package/src/lightning/datepicker/form-element.slds.css +8 -0
- package/src/lightning/datepicker/input-text.slds.css +23 -23
- package/src/lightning/datetimepicker/datetimepicker.css +2 -2
- package/src/lightning/datetimepicker/datetimepicker.js +4 -2
- package/src/lightning/datetimepicker/form-element.slds.css +8 -0
- package/src/lightning/datetimepicker/input-text.slds.css +23 -23
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.js +4 -2
- package/src/lightning/dualListbox/form-element.slds.css +8 -0
- 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/f6Controller/f6Controller.js +31 -22
- package/src/lightning/formattedRichText/formattedRichText.css +2 -2
- package/src/lightning/formattedRichText/formattedRichText.js +4 -2
- package/src/lightning/formattedText/formattedText.css +1 -1
- package/src/lightning/formattedText/formattedText.js +3 -2
- package/src/lightning/groupedCombobox/groupedCombobox.html +4 -0
- package/src/lightning/groupedCombobox/groupedCombobox.js +3 -2
- package/src/lightning/helptext/form-element.slds.css +8 -0
- package/src/lightning/helptext/help-text.slds.css +10 -4
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +3 -2
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +10 -3
- package/src/lightning/icon/icon.slds.css +3 -3
- 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/form-element.slds.css +8 -0
- package/src/lightning/input/input.css +2 -4
- package/src/lightning/input/input.html +149 -239
- package/src/lightning/input/input.js +221 -539
- 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/layout/layout.css +2 -2
- package/src/lightning/layout/layout.js +6 -2
- package/src/lightning/layoutItem/layoutItem.css +2 -2
- package/src/lightning/layoutItem/layoutItem.js +6 -2
- package/src/lightning/menuDivider/menuDivider.css +2 -2
- package/src/lightning/menuDivider/menuDivider.js +4 -2
- package/src/lightning/menuItem/menuItem.css +2 -2
- package/src/lightning/menuItem/menuItem.js +4 -2
- package/src/lightning/menuSubheader/menuSubheader.css +2 -2
- package/src/lightning/menuSubheader/menuSubheader.js +4 -2
- package/src/lightning/modal/__docs__/modal.md +102 -3
- package/src/lightning/modal/__examples__disabled/basic/basic.css +1 -1
- package/src/lightning/modal/__examples__disabled/demo/demo.css +1 -0
- package/src/lightning/modal/__examples__disabled/demoall/demoall.css +5 -0
- package/src/lightning/modal/__examples__disabled/demoallform/demoallform.css +4 -2
- package/src/lightning/modal/__examples__disabled/demoallformfull/demoallformfull.css +4 -2
- package/src/lightning/modal/__examples__disabled/demofootless/demofootless.css +1 -0
- package/src/lightning/modal/__examples__disabled/demoheadless/demoheadless.css +5 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +15 -0
- package/src/lightning/modalBase/modal-base.slds.css +240 -0
- package/src/lightning/modalBase/modalBase.css +7 -2
- package/src/lightning/modalBase/modalBase.html +2 -0
- package/src/lightning/modalBase/modalBase.js +44 -5
- package/src/lightning/modalBody/modal-body.slds.css +61 -0
- package/src/lightning/modalBody/modalBody.css +3 -0
- package/src/lightning/modalBody/modalBody.html +1 -0
- package/src/lightning/modalBody/modalBody.js +15 -2
- package/src/lightning/modalFooter/modal-footer.slds.css +68 -0
- package/src/lightning/modalFooter/modalFooter.css +2 -0
- package/src/lightning/modalFooter/modalFooter.html +1 -1
- package/src/lightning/modalFooter/modalFooter.js +17 -2
- package/src/lightning/modalHeader/modal-header.slds.css +70 -0
- package/src/lightning/modalHeader/modalHeader.css +3 -0
- package/src/lightning/modalHeader/modalHeader.html +1 -1
- package/src/lightning/modalHeader/modalHeader.js +18 -2
- package/src/lightning/overlay/overlay.js +3 -2
- package/src/lightning/pill/avatar.slds.css +10 -10
- package/src/lightning/pill/link.css +2 -2
- package/src/lightning/pill/pill.js +4 -2
- package/src/lightning/pill/plain.css +2 -2
- package/src/lightning/pill/plainLink.css +2 -2
- package/src/lightning/pillContainer/barePillContainer.css +2 -2
- package/src/lightning/pillContainer/pillContainer.js +4 -2
- package/src/lightning/pillContainer/standardPillContainer.css +2 -2
- package/src/lightning/popup/popup.css +2 -2
- package/src/lightning/popup/popup.js +3 -2
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +4 -2
- package/src/lightning/primitiveButton/primitiveButton.js +3 -2
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +9 -9
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +3 -2
- package/src/lightning/primitiveIcon/icon.slds.css +3 -3
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -2
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +289 -0
- package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +395 -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 +289 -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 +289 -0
- package/src/lightning/primitiveInputColor/input-color.slds.css +35 -0
- package/src/lightning/primitiveInputColor/input-text.slds.css +398 -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 +533 -0
- package/src/lightning/primitiveInputFile/form-element.slds.css +289 -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 +289 -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 +289 -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/progressBar/progress-bar.slds.css +66 -0
- package/src/lightning/progressBar/progressBar.css +2 -0
- package/src/lightning/progressBar/progressBar.html +1 -0
- package/src/lightning/progressBar/progressBar.js +3 -2
- package/src/lightning/progressRing/progress-ring.slds.css +140 -0
- package/src/lightning/progressRing/progressRing.css +2 -0
- package/src/lightning/progressRing/progressRing.html +8 -3
- package/src/lightning/progressRing/progressRing.js +3 -2
- package/src/lightning/radioGroup/input-radio-group.slds.css +57 -57
- package/src/lightning/radioGroup/radioGroup.css +2 -3
- package/src/lightning/radioGroup/radioGroup.js +4 -2
- package/src/lightning/select/form-element.slds.css +8 -0
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +5 -2
- package/src/lightning/select/select.slds.css +30 -22
- package/src/lightning/sldsCommon/sldsCommon.css +21 -0
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +11 -5
- package/src/lightning/spinner/spinner.slds.css +34 -34
- package/src/lightning/tab/tab.css +2 -0
- package/src/lightning/tab/tab.js +37 -14
- package/src/lightning/tab/tab.slds.css +47 -0
- package/src/lightning/tabBar/tab-bar.slds.css +5 -5
- package/src/lightning/tabBar/tabBar.css +2 -2
- package/src/lightning/tabBar/tabBar.js +4 -2
- package/src/lightning/tabset/tabset.css +2 -0
- package/src/lightning/tabset/tabset.js +35 -9
- package/src/lightning/tabset/tabset.slds.css +9 -0
- package/src/lightning/timepicker/form-element.slds.css +8 -0
- package/src/lightning/timepicker/timepicker.css +2 -2
- package/src/lightning/timepicker/timepicker.js +4 -2
- package/src/lightning/toast/button-icon.slds.css +9 -3
- package/src/lightning/toast/icon.slds.css +3 -3
- package/src/lightning/toast/toast.css +2 -2
- package/src/lightning/toast/toast.js +4 -2
- package/src/lightning/toastContainer/toastContainer.css +2 -2
- package/src/lightning/verticalNavigation/vertical-navigation.slds.css +1 -1
- package/src/lightning/verticalNavigation/verticalNavigation.css +2 -3
- package/src/lightning/verticalNavigation/verticalNavigation.js +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +2 -3
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +3 -2
- /package/src/lightning/{input/emailUtil.js → inputUtils/email.js} +0 -0
- /package/src/lightning/{input → primitiveInputSimple}/normalize.js +0 -0
- /package/src/lightning/{input → primitiveInputSimple}/selection.js +0 -0
|
@@ -2,6 +2,11 @@ import { debounce } from 'lightning/inputUtils';
|
|
|
2
2
|
import { findAllTabbableElements } from 'lightning/focusUtils';
|
|
3
3
|
const DEBOUNCE_KEY_DOWN = 300;
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The configuration for the F6 controller
|
|
7
|
+
* - navKey: the key used as a trigger for navigating between regions
|
|
8
|
+
* - f6RegionAttribute: attribute that defines f6 regions
|
|
9
|
+
*/
|
|
5
10
|
export const DEFAULT_CONFIG = {
|
|
6
11
|
navKey: 'F6',
|
|
7
12
|
f6RegionAttribute: 'data-f6-region',
|
|
@@ -34,7 +39,7 @@ export const getActiveElement = (element) => {
|
|
|
34
39
|
* quickly move to designated regions in a page.
|
|
35
40
|
* It handles logic for:
|
|
36
41
|
* - Globally detecting F6 regions (i.e. registered components must have the data attribute stored in config - f6RegionAttribute
|
|
37
|
-
*
|
|
42
|
+
* in their tag, 'data-f6-region')
|
|
38
43
|
* - Handling F6 keypresses by focusing and highlighting F6 regions
|
|
39
44
|
* Supported keyboard shortcuts:
|
|
40
45
|
* - Ctrl/Cmd + F6 to move focus to the next available registered region.
|
|
@@ -55,18 +60,15 @@ export class F6Controller {
|
|
|
55
60
|
_styleElement;
|
|
56
61
|
|
|
57
62
|
/**
|
|
58
|
-
* Creates a F6Controller
|
|
59
|
-
* @param {Object} config - a configuration object
|
|
60
|
-
* - config.navKey: the key used as a trigger for navigating between regions
|
|
61
|
-
* - config.f6RegionAttribute: attribute that defines f6 regions
|
|
63
|
+
* Creates a F6Controller
|
|
62
64
|
*/
|
|
63
|
-
constructor(
|
|
65
|
+
constructor() {
|
|
64
66
|
// debounce function for handling keydown event
|
|
65
67
|
this._debounceKeyDownHandler = debounce(
|
|
66
68
|
this.handleKeyDown.bind(this),
|
|
67
69
|
DEBOUNCE_KEY_DOWN
|
|
68
70
|
);
|
|
69
|
-
this.initialize(
|
|
71
|
+
this.initialize();
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
appendStyleElement() {
|
|
@@ -327,30 +329,37 @@ export class F6Controller {
|
|
|
327
329
|
*/
|
|
328
330
|
populateRegions() {
|
|
329
331
|
this.regions = [];
|
|
332
|
+
this.shadowTreeWalker(document.body);
|
|
333
|
+
}
|
|
330
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Creates a tree walker from the given root and through
|
|
337
|
+
* the shadow DOM adding any F6 regions found
|
|
338
|
+
* @param {Element} root - element for tree walker to start from
|
|
339
|
+
*/
|
|
340
|
+
shadowTreeWalker(root) {
|
|
331
341
|
const treeWalker = document.createTreeWalker(
|
|
332
|
-
|
|
342
|
+
root,
|
|
333
343
|
NodeFilter.SHOW_ELEMENT,
|
|
334
|
-
this.elementFilter
|
|
335
|
-
false
|
|
344
|
+
this.elementFilter
|
|
336
345
|
);
|
|
337
346
|
|
|
338
347
|
while (treeWalker.nextNode()) {
|
|
339
|
-
|
|
348
|
+
if (treeWalker.currentNode.shadowRoot) {
|
|
349
|
+
this.shadowTreeWalker(treeWalker.currentNode.shadowRoot);
|
|
350
|
+
} else {
|
|
351
|
+
this.regions.push(treeWalker.currentNode);
|
|
352
|
+
}
|
|
340
353
|
}
|
|
341
354
|
}
|
|
342
355
|
|
|
343
356
|
/**
|
|
344
357
|
* Add document event listeners to handling all the F6 related interations
|
|
345
358
|
*/
|
|
346
|
-
initialize(
|
|
359
|
+
initialize() {
|
|
347
360
|
document.addEventListener('keydown', this._debounceKeyDownHandler);
|
|
348
361
|
document.addEventListener('click', this.handleClick);
|
|
349
362
|
this.regions = [];
|
|
350
|
-
this.config = {
|
|
351
|
-
...this.config,
|
|
352
|
-
...config,
|
|
353
|
-
};
|
|
354
363
|
this.appendStyleElement();
|
|
355
364
|
}
|
|
356
365
|
|
|
@@ -359,7 +368,6 @@ export class F6Controller {
|
|
|
359
368
|
document.removeEventListener('keydown', this._debounceKeyDownHandler);
|
|
360
369
|
document.removeEventListener('click', this.handleClick);
|
|
361
370
|
this._regions = [];
|
|
362
|
-
this._config = DEFAULT_CONFIG;
|
|
363
371
|
this._debounceKeyDownHandler = null;
|
|
364
372
|
if (this._styleElement) {
|
|
365
373
|
document.head.removeChild(this._styleElement);
|
|
@@ -394,9 +402,10 @@ export class F6Controller {
|
|
|
394
402
|
}
|
|
395
403
|
|
|
396
404
|
if (
|
|
397
|
-
element.matches(`*[${this.config.f6RegionAttribute}]`) &&
|
|
398
|
-
|
|
399
|
-
|
|
405
|
+
(element.matches(`*[${this.config.f6RegionAttribute}]`) &&
|
|
406
|
+
this.isVisible(element) &&
|
|
407
|
+
!this.isEmpty(element)) ||
|
|
408
|
+
element.shadowRoot
|
|
400
409
|
) {
|
|
401
410
|
return NodeFilter.FILTER_ACCEPT;
|
|
402
411
|
}
|
|
@@ -410,9 +419,9 @@ export class F6Controller {
|
|
|
410
419
|
}
|
|
411
420
|
|
|
412
421
|
let f6Controller;
|
|
413
|
-
export const createF6Controller = (
|
|
422
|
+
export const createF6Controller = () => {
|
|
414
423
|
if (!f6Controller) {
|
|
415
|
-
f6Controller = new F6Controller(
|
|
424
|
+
f6Controller = new F6Controller();
|
|
416
425
|
}
|
|
417
426
|
return f6Controller;
|
|
418
427
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
@import 'lightning/sldsCommon';
|
|
2
2
|
@import './formatted-rich-text.slds.css';
|
|
3
|
-
@import 'lightning/sldsUtilsThemes';
|
|
3
|
+
@import 'lightning/sldsUtilsThemes';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import sanitizeHTML from 'lightning/purifyLib';
|
|
3
4
|
import { linkify } from './linkify';
|
|
4
5
|
import { richTextConfig } from './richTextConfig';
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
* Displays rich text that's formatted with allowed tags and attributes.
|
|
13
14
|
* Other tags and attributes are removed and only their text content is displayed.
|
|
14
15
|
*/
|
|
15
|
-
export default class LightningFormattedRichText extends
|
|
16
|
+
export default class LightningFormattedRichText extends LightningShadowBaseClass {
|
|
16
17
|
static validationOptOut = ['class'];
|
|
17
18
|
/**
|
|
18
19
|
* If present, the component does not create links in the rich text.
|
|
@@ -58,6 +59,7 @@ export default class LightningFormattedRichText extends LightningElement {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
connectedCallback() {
|
|
62
|
+
super.connectedCallback();
|
|
61
63
|
this.classList.add('slds-rich-text-editor__output');
|
|
62
64
|
this.connected = true;
|
|
63
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
@import 'lightning/sldsCommon'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api, track } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import {
|
|
3
4
|
normalizeBoolean,
|
|
4
5
|
parseToFormattedLinkifiedParts,
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
/**
|
|
9
10
|
* Displays text, replaces newlines with line breaks, and linkifies if requested.
|
|
10
11
|
*/
|
|
11
|
-
export default class FormattedText extends
|
|
12
|
+
export default class FormattedText extends LightningShadowBaseClass {
|
|
12
13
|
/**
|
|
13
14
|
* Sets the text to display.
|
|
14
15
|
* @type {string}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
data-filter
|
|
19
19
|
onready={handleFilterReady}
|
|
20
20
|
disabled={disabled}
|
|
21
|
+
read-only={readOnly}
|
|
21
22
|
items={filterItems}
|
|
22
23
|
input-text={filterInputText}
|
|
23
24
|
input-icon-name="utility:down"
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
data-lookup
|
|
36
37
|
name={name}
|
|
37
38
|
disabled={disabled}
|
|
39
|
+
read-only={readOnly}
|
|
38
40
|
required={required}
|
|
39
41
|
class={computedLookupComboboxClass}
|
|
40
42
|
variant="lookup"
|
|
@@ -48,6 +50,8 @@
|
|
|
48
50
|
input-icon-alternative-text={inputIconAlternativeText}
|
|
49
51
|
show-input-activity-indicator={showActivityIndicator}
|
|
50
52
|
show-dropdown-activity-indicator={showDropdownActivityIndicator}
|
|
53
|
+
custom-role={customRole}
|
|
54
|
+
custom-aria-has-popup={customAriaHasPopup}
|
|
51
55
|
onready={handleLookupReady}
|
|
52
56
|
ontextchange={handleTextChange}
|
|
53
57
|
ontextinput={handleTextInput}
|
|
@@ -40,8 +40,6 @@ export default class LightningGroupedCombobox extends LightningElement {
|
|
|
40
40
|
@api value;
|
|
41
41
|
@api required = false;
|
|
42
42
|
@api disabled = false;
|
|
43
|
-
// TODO: Need to remove as if a readonly combobox is needed,
|
|
44
|
-
// the regular lightning-combobox should be used
|
|
45
43
|
@api readOnly = false;
|
|
46
44
|
|
|
47
45
|
@api inputPill;
|
|
@@ -57,6 +55,9 @@ export default class LightningGroupedCombobox extends LightningElement {
|
|
|
57
55
|
*/
|
|
58
56
|
@api disableDefaultHighlight;
|
|
59
57
|
|
|
58
|
+
@api customRole = 'combobox';
|
|
59
|
+
@api customAriaHasPopup = 'listbox';
|
|
60
|
+
|
|
60
61
|
@track _pills;
|
|
61
62
|
|
|
62
63
|
@track _variant;
|
|
@@ -278,4 +278,12 @@
|
|
|
278
278
|
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
279
|
align-items: flex-end;
|
|
280
280
|
}
|
|
281
|
+
|
|
282
|
+
/* --------------------------------------- */
|
|
283
|
+
|
|
284
|
+
/* FORM ELEMENT: HIDDEN */
|
|
285
|
+
|
|
286
|
+
:host([data-render-mode="shadow"][variant~='label-hidden']) .slds-form-element__label {
|
|
287
|
+
display: none
|
|
288
|
+
}
|
|
281
289
|
}
|
|
@@ -484,14 +484,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
484
484
|
justify-content: center;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
489
|
+
*/
|
|
487
490
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
488
491
|
display: inline-flex;
|
|
489
|
-
padding-inline-end:
|
|
492
|
+
padding-inline-end: 0;
|
|
490
493
|
}
|
|
491
494
|
|
|
495
|
+
/**
|
|
496
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
497
|
+
*/
|
|
492
498
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
493
499
|
display: inline-flex;
|
|
494
|
-
padding-inline-start:
|
|
500
|
+
padding-inline-start: 0;
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
503
|
|
|
@@ -883,7 +889,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
883
889
|
/**
|
|
884
890
|
* End part
|
|
885
891
|
*/
|
|
886
|
-
:host([data-render-mode="shadow"]) [part
|
|
892
|
+
:host([data-render-mode="shadow"]) [part='end'] {
|
|
887
893
|
padding-inline-start: var(--slds-c-buttonicon-end-spacing-inline-start, 0);
|
|
888
894
|
}
|
|
889
895
|
|
|
@@ -912,7 +918,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
912
918
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
913
919
|
|
|
914
920
|
@supports (--styling-hooks: '') {
|
|
915
|
-
:host([data-render-mode="shadow"]) [part
|
|
921
|
+
:host([data-render-mode="shadow"]) [part='help-text'] {
|
|
916
922
|
--slds-c-buttonicon-color-background: var(--slds-c-helptext-color-background);
|
|
917
923
|
--slds-c-buttonicon-color-background-hover: var(--slds-c-helptext-color-background-hover);
|
|
918
924
|
--slds-c-buttonicon-color-background-focus: var(--slds-c-helptext-color-background-focus);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
@import 'lightning/sldsCommon';
|
|
2
2
|
@import './help-text.slds.css';
|
|
3
|
-
@import
|
|
3
|
+
@import './form-element.slds.css';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import labelButtonAlternativeText from '@salesforce/label/LightningHelptext.buttonAlternativeText';
|
|
2
|
-
import {
|
|
2
|
+
import { api, track } from 'lwc';
|
|
3
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
4
|
import { isValidName } from 'lightning/iconUtils';
|
|
4
5
|
import { normalizeString } from 'lightning/utilsPrivate';
|
|
5
6
|
import { TooltipType } from 'lightning/tooltipLibrary';
|
|
@@ -11,7 +12,7 @@ const DEFAULT_ICON_VARIANT = 'bare';
|
|
|
11
12
|
/**
|
|
12
13
|
* An icon with a text popover used for tooltips.
|
|
13
14
|
*/
|
|
14
|
-
export default class LightningHelptext extends
|
|
15
|
+
export default class LightningHelptext extends LightningShadowBaseClass {
|
|
15
16
|
// TODO: future refactoring to remove this.state convention
|
|
16
17
|
@track
|
|
17
18
|
state = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
@import './icon.slds.css';
|
|
1
|
+
@import 'lightning/sldsCommon';
|
|
2
|
+
@import './icon.slds.css';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
2
3
|
import {
|
|
3
4
|
classListMutation,
|
|
4
5
|
normalizeString,
|
|
@@ -16,7 +17,9 @@ import { normalizeVariant } from './util';
|
|
|
16
17
|
/**
|
|
17
18
|
* Represents a visual element that provides context and enhances usability.
|
|
18
19
|
*/
|
|
19
|
-
export default class LightningIcon extends
|
|
20
|
+
export default class LightningIcon extends LightningShadowBaseClass {
|
|
21
|
+
static validationOptOut = ['class'];
|
|
22
|
+
|
|
20
23
|
_src;
|
|
21
24
|
_privateIconName;
|
|
22
25
|
_iconName;
|
|
@@ -159,6 +162,7 @@ export default class LightningIcon extends LightningElement {
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
connectedCallback() {
|
|
165
|
+
super.connectedCallback();
|
|
162
166
|
this.classList.add('slds-icon_container');
|
|
163
167
|
}
|
|
164
168
|
|
|
@@ -172,7 +176,10 @@ export default class LightningIcon extends LightningElement {
|
|
|
172
176
|
const name = getName(iconName);
|
|
173
177
|
const color = iconColors[category] && iconColors[category][name];
|
|
174
178
|
if (color) {
|
|
175
|
-
this.
|
|
179
|
+
this.setAttribute(
|
|
180
|
+
'style',
|
|
181
|
+
`--sds-c-icon-color-background: var(--slds-c-icon-color-background, ${color})`
|
|
182
|
+
);
|
|
176
183
|
}
|
|
177
184
|
}
|
|
178
185
|
}
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
:host([data-render-mode="shadow"]) [part
|
|
87
|
+
:host([data-render-mode="shadow"]) [part='boundary'] {
|
|
88
88
|
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
89
89
|
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
90
90
|
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
display: inline-flex;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
:host([data-render-mode="shadow"]) [part
|
|
117
|
+
:host([data-render-mode="shadow"]) [part='icon'] {
|
|
118
118
|
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
119
119
|
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
120
120
|
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
|
|
200
200
|
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
201
201
|
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
position: absolute;
|
|
204
204
|
top: 50%;
|
|
205
205
|
margin-block-start: -0.4375rem;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<h2 class="header">Input Checkbox Button</h2>
|
|
4
4
|
<lightning-input type="checkbox-button" label="Input One" name="input1"></lightning-input>
|
|
5
5
|
<lightning-input type="checkbox-button" label="Input Two" name="input2" checked required></lightning-input>
|
|
6
|
-
<lightning-input type="checkbox-button" label="Input Three" name="input3"
|
|
6
|
+
<lightning-input type="checkbox-button" label="Input Three" name="input3" disabled></lightning-input>
|
|
7
|
+
<lightning-input type="checkbox-button" label="Input Four" name="input3" checked disabled></lightning-input>
|
|
7
8
|
</div>
|
|
8
9
|
</template>
|
|
@@ -19,11 +19,6 @@
|
|
|
19
19
|
<lightning-input type="number" name="input8" required value="5" label="Required number field with a maximum value of 99" max="99"></lightning-input>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
<div>
|
|
23
|
-
<h2>Input Counter</h2>
|
|
24
|
-
<lightning-input type="counter" value="123" label="Input with a Counter"></lightning-input>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
22
|
<div>
|
|
28
23
|
<h2>Live Input Number</h2>
|
|
29
24
|
<lightning-input type="number" name="seven" value={amount} onchange={handleAmountChange} placeholder="type the number of items..." label="Enter a number" ></lightning-input>
|
|
@@ -278,4 +278,12 @@
|
|
|
278
278
|
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
279
|
align-items: flex-end;
|
|
280
280
|
}
|
|
281
|
+
|
|
282
|
+
/* --------------------------------------- */
|
|
283
|
+
|
|
284
|
+
/* FORM ELEMENT: HIDDEN */
|
|
285
|
+
|
|
286
|
+
:host([data-render-mode="shadow"][variant~='label-hidden']) .slds-form-element__label {
|
|
287
|
+
display: none
|
|
288
|
+
}
|
|
281
289
|
}
|