lightning-base-components 1.18.6-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 -59
- 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/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 +1 -1
- package/src/lightning/formattedRichText/formattedRichText.css +2 -2
- package/src/lightning/formattedRichText/formattedRichText.js +2 -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 -6
- package/src/lightning/layoutItem/layoutItem.css +2 -2
- package/src/lightning/layoutItem/layoutItem.js +2 -6
- 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 +2 -3
- 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/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +5 -11
- package/src/lightning/tabBar/tabBar.css +2 -2
- package/src/lightning/tabBar/tabBar.js +2 -4
- 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/toast/toast.css +2 -2
- package/src/lightning/toast/toast.js +2 -4
- package/src/lightning/toastContainer/toastContainer.css +2 -2
- 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/button.slds.css +0 -527
- 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/{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
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
3
2
|
import { classSet } from 'lightning/utils';
|
|
4
|
-
import { normalizeString as normalize
|
|
3
|
+
import { normalizeString as normalize } from 'lightning/utilsPrivate';
|
|
5
4
|
|
|
6
5
|
const DEFAULT_SIZE = 'medium';
|
|
7
6
|
const DEFAULT_VARIANT = 'base';
|
|
@@ -9,9 +8,7 @@ const DEFAULT_VARIANT = 'base';
|
|
|
9
8
|
/**
|
|
10
9
|
* Displays an animated spinner.
|
|
11
10
|
*/
|
|
12
|
-
export default class LightningSpinner extends
|
|
13
|
-
static validationOptOut = ['class'];
|
|
14
|
-
|
|
11
|
+
export default class LightningSpinner extends LightningElement {
|
|
15
12
|
/**
|
|
16
13
|
* The alternative text used to describe the reason for the wait and need for a spinner.
|
|
17
14
|
* @type {string}
|
|
@@ -61,12 +58,9 @@ export default class LightningSpinner extends LightningShadowBaseClass {
|
|
|
61
58
|
_altText = '';
|
|
62
59
|
|
|
63
60
|
connectedCallback() {
|
|
64
|
-
super.connectedCallback();
|
|
65
61
|
this.classList.add('slds-spinner_container');
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.template.addEventListener('touchmove', this.stopScrolling);
|
|
69
|
-
}
|
|
62
|
+
this.template.addEventListener('mousewheel', this.stopScrolling);
|
|
63
|
+
this.template.addEventListener('touchmove', this.stopScrolling);
|
|
70
64
|
}
|
|
71
65
|
|
|
72
66
|
renderedCallback() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
2
|
-
@import './tab-bar.slds.css';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './tab-bar.slds.css'; */
|
|
@@ -3,8 +3,7 @@ import labelOverflowMoreAlternativeText from '@salesforce/label/LightningTabs.ov
|
|
|
3
3
|
import labelOverflowMoreTitle from '@salesforce/label/LightningTabs.overflowMoreTitle';
|
|
4
4
|
import labelErrorStateAlternativeText from '@salesforce/label/LightningTabs.errorStateAlternativeText';
|
|
5
5
|
|
|
6
|
-
import { api, track } from 'lwc';
|
|
7
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
6
|
+
import { LightningElement, api, track } from 'lwc';
|
|
8
7
|
import { classSet } from 'lightning/utils';
|
|
9
8
|
import { reflectAttribute } from 'lightning/utilsPrivate';
|
|
10
9
|
import { calculateOverflow } from 'lightning/overflowLibrary';
|
|
@@ -22,7 +21,7 @@ const i18n = {
|
|
|
22
21
|
const RECOMPUTE_OVERFLOW_THRESHOLD_PX = 30;
|
|
23
22
|
const TARGET_SELECTION_NAME_SUFFIX = 'Tab';
|
|
24
23
|
|
|
25
|
-
export default class LightningTabBar extends
|
|
24
|
+
export default class LightningTabBar extends LightningElement {
|
|
26
25
|
@api disableOverflow = false;
|
|
27
26
|
|
|
28
27
|
@track _allTabs = [];
|
|
@@ -37,7 +36,6 @@ export default class LightningTabBar extends LightningShadowBaseClass {
|
|
|
37
36
|
_selectedTab;
|
|
38
37
|
|
|
39
38
|
connectedCallback() {
|
|
40
|
-
super.connectedCallback();
|
|
41
39
|
this._connected = true;
|
|
42
40
|
if (this.overflowSupported) {
|
|
43
41
|
this._queueOverflow();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
2
|
@import './timepicker.slds.css';
|
|
3
|
-
@import './form-element.slds.css';
|
|
3
|
+
@import './form-element.slds.css'; */
|
|
@@ -4,8 +4,7 @@ import labelRangeOverflow from '@salesforce/label/LightningDateTimePicker.rangeO
|
|
|
4
4
|
import labelRangeUnderflow from '@salesforce/label/LightningDateTimePicker.rangeUnderflow';
|
|
5
5
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
6
6
|
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
7
|
-
import {
|
|
8
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
7
|
+
import { LightningElement, api, track } from 'lwc';
|
|
9
8
|
import { getTimeToHighlight } from './utils';
|
|
10
9
|
import { classSet, formatLabel } from 'lightning/utils';
|
|
11
10
|
import {
|
|
@@ -41,7 +40,7 @@ const TIME_STYLE = {
|
|
|
41
40
|
LONG: 'long',
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
export default class LightningTimePicker extends
|
|
43
|
+
export default class LightningTimePicker extends LightningElement {
|
|
45
44
|
static delegatesFocus = true;
|
|
46
45
|
|
|
47
46
|
@track _disabled = false;
|
|
@@ -277,7 +276,6 @@ export default class LightningTimePicker extends LightningShadowBaseClass {
|
|
|
277
276
|
}
|
|
278
277
|
|
|
279
278
|
connectedCallback() {
|
|
280
|
-
super.connectedCallback();
|
|
281
279
|
this.connected = true;
|
|
282
280
|
}
|
|
283
281
|
|
|
@@ -10,7 +10,7 @@ The function also creates a single page-level toast container if one does not ex
|
|
|
10
10
|
```javascript
|
|
11
11
|
// c/myComponent.js
|
|
12
12
|
import { LightningElement } from 'lwc';
|
|
13
|
-
import
|
|
13
|
+
import Toast from 'lightning/toast';
|
|
14
14
|
|
|
15
15
|
export default class MyComponent extends LightningElement {
|
|
16
16
|
...
|
|
@@ -100,4 +100,4 @@ If no `mode` is provided, the default `mode` will be determined by the value of
|
|
|
100
100
|
|
|
101
101
|
`LightningToast` is implemented to be responsive according to the screen resolution. For smaller screen or mobile environments, the toast's **icon** and **description** (i.e. text stored in `message`, and `messageLinks`) will **not be shown** due to the screen's width limitation (see [Toast blueprint screen variants](https://www.lightningdesignsystem.com/guidelines/messaging/components/toasts/#flavor-variants-screen).
|
|
102
102
|
|
|
103
|
-
The best practice where small screen and mobile environments are the primary use case is to only provide links in the toast's title (ie `label` and `labelLinks`) in order to have links visible and interactive.
|
|
103
|
+
The best practice where small screen and mobile environments are the primary use case is to only provide links in the toast's title (ie `label` and `labelLinks`) in order to have links visible and interactive.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
2
|
@import './toast.slds.css';
|
|
3
3
|
@import './icon.slds.css';
|
|
4
4
|
@import './button-icon.slds.css';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@import 'lightning/sldsUtilsThemes';
|
|
7
7
|
@import 'lightning/sldsUtilsMargin';
|
|
8
8
|
@import 'lightning/sldsUtilsPosition';
|
|
9
|
-
@import 'lightning/sldsUtilsGrid';
|
|
9
|
+
@import 'lightning/sldsUtilsGrid'; */
|
|
10
10
|
|
|
11
11
|
.fix-notify_toast_animation,
|
|
12
12
|
:host([data-render-mode="shadow"]) .fix-notify_toast_animation {
|
|
@@ -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 {
|
|
4
3
|
makeAbsoluteUrl,
|
|
5
4
|
normalizeString,
|
|
@@ -46,7 +45,7 @@ const MIN_BROWSER_WIDTH = 480;
|
|
|
46
45
|
/**
|
|
47
46
|
* A notification element used to convey a label.
|
|
48
47
|
*/
|
|
49
|
-
export default class Toast extends
|
|
48
|
+
export default class Toast extends LightningElement {
|
|
50
49
|
static [instanceName] = 'lightning-toast';
|
|
51
50
|
static [properties] = [
|
|
52
51
|
'variant',
|
|
@@ -533,7 +532,6 @@ export default class Toast extends LightningShadowBaseClass {
|
|
|
533
532
|
}
|
|
534
533
|
|
|
535
534
|
connectedCallback() {
|
|
536
|
-
super.connectedCallback();
|
|
537
535
|
this.registerWithContainer();
|
|
538
536
|
this.determineSmallerScreen();
|
|
539
537
|
this.determineSmallFormFactor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import 'lightning/sldsCommon';
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
2
|
@import './toast.slds.css';
|
|
3
3
|
@import 'lightning/sldsUtilsPosition';
|
|
4
|
-
@import 'lightning/sldsUtilsGrid';
|
|
4
|
+
@import 'lightning/sldsUtilsGrid'; */
|
|
5
5
|
|
|
6
6
|
.top,
|
|
7
7
|
:host([data-render-mode="shadow"]) .top {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
@import '
|
|
1
|
+
/* sldsCommon missed earlier - check on review */
|
|
2
|
+
/* @import 'lightning/sldsCommon'; */
|
|
3
|
+
/* @import './vertical-navigation.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 {
|
|
5
4
|
assert,
|
|
@@ -18,7 +17,7 @@ const ALLOWED_CHILDREN = [
|
|
|
18
17
|
* A vertical list of links that either take the user to another page or parts of the page the user is in.
|
|
19
18
|
* @slot default Placeholder for lightning-vertical-navigation-section and lightning-vertical-navigation-overflow.
|
|
20
19
|
*/
|
|
21
|
-
export default class LightningVerticalNavigation extends
|
|
20
|
+
export default class LightningVerticalNavigation extends LightningElement {
|
|
22
21
|
@track _compact;
|
|
23
22
|
@track _shaded;
|
|
24
23
|
@track _selectedItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
@import '
|
|
1
|
+
/* sldsCommon missed earlier - check on review
|
|
2
|
+
@import 'lightning/sldsCommon'; */
|
|
3
|
+
/* @import './vertical-navigation-section.slds.css'; */
|
|
3
4
|
|
|
4
5
|
div[role="list"] {
|
|
5
6
|
list-style: none;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { guid, isHeadingLevelValid } from 'lightning/utilsPrivate';
|
|
4
3
|
|
|
5
|
-
export default class LightningVerticalNavigationSection extends
|
|
4
|
+
export default class LightningVerticalNavigationSection extends LightningElement {
|
|
6
5
|
headingId = guid();
|
|
7
6
|
|
|
8
7
|
@track _label;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function isEmptyString(s) {
|
|
2
|
-
return (
|
|
3
|
-
s === undefined ||
|
|
4
|
-
s === null ||
|
|
5
|
-
(typeof s === 'string' && s.trim() === '')
|
|
6
|
-
);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function isEmptyObject(obj) {
|
|
10
|
-
if (obj === undefined || obj === null || typeof obj !== 'object') {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
// eslint-disable-next-line guard-for-in
|
|
14
|
-
for (const name in obj) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
|
-
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
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
|
-
|
|
12
|
-
/* FORM ELEMENT: BASE */
|
|
13
|
-
:host([data-render-mode="shadow"]) .slds-form-element {
|
|
14
|
-
position: relative;
|
|
15
|
-
min-width: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([data-render-mode="shadow"]) .slds-form-element__label {
|
|
19
|
-
overflow-wrap: break-word;
|
|
20
|
-
word-wrap: break-word;
|
|
21
|
-
hyphens: auto;
|
|
22
|
-
display: inline-block;
|
|
23
|
-
color: var(--sds-g-color-neutral-base-30, #444444);
|
|
24
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
25
|
-
padding-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
26
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
27
|
-
margin-block-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host([data-render-mode="shadow"]) .slds-form-element__label:empty {
|
|
31
|
-
margin: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([data-render-mode="shadow"]) .slds-form-element__control {
|
|
35
|
-
clear: left; /* NOTE: Ideally we want left to be inline-start but browser support is not ready for that value. We need to figure out better RTL support */
|
|
36
|
-
position: relative;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([data-render-mode="shadow"]) .slds-form-element__icon {
|
|
40
|
-
display: inline-block;
|
|
41
|
-
position: relative;
|
|
42
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
43
|
-
vertical-align: top;
|
|
44
|
-
line-height: var(--sds-g-font-lineheight-1, 1);
|
|
45
|
-
z-index: 1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([data-render-mode="shadow"]) .slds-form-element__icon .slds-button_icon {
|
|
49
|
-
position: relative;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([data-render-mode="shadow"]) .slds-form-element__help,:host([data-render-mode="shadow"])
|
|
53
|
-
.slds-form-element__helper {
|
|
54
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
55
|
-
margin-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host([data-render-mode="shadow"]) .slds-form-element_edit .slds-form-element__static {
|
|
60
|
-
width: calc(100% - var(--sds-g-sizing-7, 1.5rem));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly {
|
|
64
|
-
flex-basis: 0%;
|
|
65
|
-
border-bottom: var(--sds-g-sizing-border-1, 1px) solid var(--sds-g-color-neutral-base-90, #e5e5e5);
|
|
66
|
-
margin-block-end: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__control {
|
|
70
|
-
padding-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
71
|
-
padding-block-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__label {
|
|
75
|
-
margin-block-end: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:host([data-render-mode="shadow"]) .slds-form-element__legend {
|
|
79
|
-
font-weight: var(--sds-g-font-weight-7, 700);
|
|
80
|
-
float: left;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([data-render-mode="shadow"]) .slds-form-element__addon {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
margin-block-start: 0;
|
|
86
|
-
margin-block-end: 0;
|
|
87
|
-
margin-inline-start: var(--sds-g-spacing-2, 0.5rem);
|
|
88
|
-
margin-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
89
|
-
align-self: center;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static {
|
|
93
|
-
overflow-wrap: break-word;
|
|
94
|
-
word-wrap: break-word;
|
|
95
|
-
word-break: break-word;
|
|
96
|
-
display: inline-block;
|
|
97
|
-
font-size: var(--sds-g-font-scale-neg-1, 0.875rem);
|
|
98
|
-
font-weight: var(--sds-g-font-weight-4, 400);
|
|
99
|
-
color: var(--sds-g-color-neutral-base-10, #181818);
|
|
100
|
-
width: 100%;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static.slds-text-longform *:last-child {
|
|
104
|
-
margin-block-end: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static:empty {
|
|
108
|
-
min-height: calc(var(--sds-g-sizing-6, 1.25rem) + 1px);
|
|
109
|
-
vertical-align: bottom;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static--edit {
|
|
113
|
-
width: calc(100% - var(--sds-g-sizing-7, 1.5rem));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host([data-render-mode="shadow"]) .slds-required {
|
|
117
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
118
|
-
margin-block-start: 0;
|
|
119
|
-
margin-block-end: 0;
|
|
120
|
-
margin-inline-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
121
|
-
margin-inline-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
:host([data-render-mode="shadow"]) .slds-has-error .slds-form-element__help {
|
|
125
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host([data-render-mode="shadow"][invalid]) .slds-form-element__help {
|
|
129
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* --------------------------------------- */
|
|
133
|
-
|
|
134
|
-
/* FORM ELEMENT: STACKED */
|
|
135
|
-
|
|
136
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) {
|
|
137
|
-
display: block;
|
|
138
|
-
}
|
|
139
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
155
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element {
|
|
156
|
-
padding: 0;
|
|
157
|
-
margin-block-end: 0;
|
|
158
|
-
}
|
|
159
|
-
|
|
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 {
|
|
161
|
-
border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
|
|
162
|
-
padding-inline-start: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
166
|
-
width: 100%;
|
|
167
|
-
flex-basis: 100%;
|
|
168
|
-
clear: left;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__icon {
|
|
172
|
-
float: none;
|
|
173
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/* --------------------------------------- */
|
|
177
|
-
|
|
178
|
-
/* FORM ELEMENT: INLINE */
|
|
179
|
-
|
|
180
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) {
|
|
181
|
-
display: block;
|
|
182
|
-
}
|
|
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);
|
|
192
|
-
margin-block-end: var(--sds-g-spacing-2, 0.5rem);
|
|
193
|
-
}
|
|
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"]) {
|
|
202
|
-
width: 100%;
|
|
203
|
-
flex-basis: 100%;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
:host([variant~='label-inline']:not(.slds-is-editing)) {
|
|
207
|
-
padding: var(--sds-g-spacing-1);
|
|
208
|
-
} */
|
|
209
|
-
|
|
210
|
-
:host([data-render-mode="shadow"][variant~='label-inline']).slds-is-edited {
|
|
211
|
-
padding-block-start: var(--sds-g-sizing-6, 1.25rem)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
@media (min-width: 48em) {
|
|
215
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__label {
|
|
216
|
-
float: left;
|
|
217
|
-
max-width: calc(33% - var(--sds-g-sizing-6, 1.25rem)); /* Removing icon width for when the help-text icon is present */
|
|
218
|
-
flex-basis: calc(33% - var(--sds-g-sizing-6, 1.25rem)); /* Some form element controls are set to display:flex */
|
|
219
|
-
flex-grow: 1; /* For IE and Safari which didn't auto expand to the available space */
|
|
220
|
-
margin-block-end: 0;
|
|
221
|
-
position: relative;
|
|
222
|
-
z-index: 1;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) lightning-helptext {
|
|
226
|
-
float: left;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control {
|
|
230
|
-
margin-inline-start: 33%;
|
|
231
|
-
clear: none; /* Reset clear: left when switching to horizontal form layout */
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control .slds-form-element__control {
|
|
235
|
-
padding-inline-start: 0; /* Remove left padding on nested form controls, due to issues related to lightning-form components */
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list__column .slds-form-element__label {
|
|
239
|
-
width: auto;
|
|
240
|
-
max-width: 100%;
|
|
241
|
-
-ms-flex-preferred-size: auto;
|
|
242
|
-
flex-basis: auto;
|
|
243
|
-
float: none;
|
|
244
|
-
position: relative;
|
|
245
|
-
padding-inline-start: 0;
|
|
246
|
-
margin-block-end: 0;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__help {
|
|
250
|
-
margin-inline-start: 33%;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list {
|
|
254
|
-
clear: none;
|
|
255
|
-
}
|
|
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
|
-
}
|
|
281
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<template if:false={isStandardVariant}>
|
|
3
|
-
<label for="checkbox" part="label-container" class="slds-checkbox__label">
|
|
4
|
-
<template if:true={required}>
|
|
5
|
-
<abbr class="slds-required" title={labelRequired}>*</abbr>
|
|
6
|
-
</template>
|
|
7
|
-
<span class={computedLabelClass}>{label}</span>
|
|
8
|
-
</label>
|
|
9
|
-
<lightning-helptext if:true={fieldLevelHelp} content={fieldLevelHelp} alternative-text={helptextAlternativeText}></lightning-helptext>
|
|
10
|
-
</template>
|
|
11
|
-
<div class="slds-form-element__control slds-grow">
|
|
12
|
-
<span part="input-checkbox" class={computedCheckboxClass}>
|
|
13
|
-
<template if:true={isStandardVariant}>
|
|
14
|
-
<template if:true={required}>
|
|
15
|
-
<abbr class="slds-required" title={labelRequired}>*</abbr>
|
|
16
|
-
</template>
|
|
17
|
-
</template>
|
|
18
|
-
<input
|
|
19
|
-
type="checkbox"
|
|
20
|
-
part="checkbox"
|
|
21
|
-
id="checkbox"
|
|
22
|
-
aria-label={ariaLabel}
|
|
23
|
-
aria-invalid={ariaInvalid}
|
|
24
|
-
accesskey={accessKey}
|
|
25
|
-
onblur={handleBlur}
|
|
26
|
-
onfocus={handleFocus}
|
|
27
|
-
onchange={handleChange}
|
|
28
|
-
onclick={handleClick}
|
|
29
|
-
name={name}
|
|
30
|
-
required={required}
|
|
31
|
-
readonly={readOnly}
|
|
32
|
-
disabled={disabled}>
|
|
33
|
-
<template if:false={isStandardVariant}>
|
|
34
|
-
<span part="indicator" class="slds-checkbox_faux"></span>
|
|
35
|
-
</template>
|
|
36
|
-
<template if:true={isStandardVariant}>
|
|
37
|
-
<label for="checkbox" part="label-container" class="slds-checkbox__label">
|
|
38
|
-
<span part="indicator" class="slds-checkbox_faux"></span>
|
|
39
|
-
<span part="label" class={computedLabelClass}>{label}</span>
|
|
40
|
-
</label>
|
|
41
|
-
<lightning-helptext if:true={fieldLevelHelp} content={fieldLevelHelp} alternative-text={helptextAlternativeText}></lightning-helptext>
|
|
42
|
-
</template>
|
|
43
|
-
</span>
|
|
44
|
-
</div>
|
|
45
|
-
<template if:true={helpMessage}>
|
|
46
|
-
<div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{helpMessage}</div>
|
|
47
|
-
</template>
|
|
48
|
-
</template>
|