lightning-base-components 1.18.1-alpha → 1.18.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/metadata/raptor.json +5 -0
- package/package.json +43 -1
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/src/lightning/accordion/accordion.css +12 -0
- package/src/lightning/accordion/accordion.html +3 -1
- package/src/lightning/accordion/accordion.js +4 -2
- package/src/lightning/accordion/accordion.slds.css +671 -0
- package/src/lightning/accordionSection/accordion-section.slds.css +647 -0
- package/src/lightning/accordionSection/accordionSection.css +14 -0
- package/src/lightning/accordionSection/accordionSection.html +23 -19
- package/src/lightning/accordionSection/accordionSection.js +29 -2
- package/src/lightning/ariaObserver/__docs__/ariaObserver.md +21 -9
- package/src/lightning/ariaObserver/ariaObserver.js +185 -154
- package/src/lightning/ariaObserver/polyfill.js +639 -0
- package/src/lightning/avatar/avatar.css +2 -0
- package/src/lightning/avatar/avatar.html +2 -0
- package/src/lightning/avatar/avatar.js +18 -15
- package/src/lightning/avatar/avatar.slds.css +272 -0
- package/src/lightning/baseCombobox/base-combobox.slds.css +1585 -0
- package/src/lightning/baseCombobox/baseCombobox.css +11 -1
- package/src/lightning/baseCombobox/baseCombobox.html +154 -146
- package/src/lightning/baseCombobox/baseCombobox.js +82 -46
- package/src/lightning/baseCombobox/spinner.slds.css +438 -0
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +4 -2
- package/src/lightning/baseComboboxItem/inline.css +2 -0
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +4 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +2 -7
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +3 -2
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +7 -1
- package/src/lightning/button/__examples__/inverse/inverse.css +8 -0
- package/src/lightning/button/__examples__/inverse/inverse.html +3 -2
- package/src/lightning/button/button.css +2 -0
- package/src/lightning/button/button.html +4 -2
- package/src/lightning/button/button.js +21 -0
- package/src/lightning/button/button.slds.css +527 -0
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +3 -2
- package/src/lightning/buttonIcon/button-icon.slds.css +215 -453
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +4 -0
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +215 -453
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/{dropdown.slds.css → button-menu.slds.css} +853 -217
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.html +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +10 -14
- package/src/lightning/buttonStateful/button-stateful.slds.css +225 -457
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +3 -2
- package/src/lightning/calendar/__examples__/basic/basic.html +7 -0
- package/src/lightning/calendar/__examples__/basic/basic.js +3 -0
- package/src/lightning/calendar/calendar.css +3 -0
- package/src/lightning/calendar/calendar.html +12 -9
- package/src/lightning/calendar/calendar.js +15 -1
- package/src/lightning/calendar/calendar.slds.css +2048 -0
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +3 -2
- package/src/lightning/card/card.slds.css +141 -88
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -2
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +11 -38
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +3 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -2
- package/src/lightning/colorPickerPanel/popover.slds.css +121 -0
- package/src/lightning/combobox/combobox.css +4 -0
- package/src/lightning/combobox/combobox.html +31 -29
- package/src/lightning/combobox/combobox.js +21 -4
- package/src/lightning/combobox/combobox.slds.css +13 -0
- package/src/lightning/combobox/form-element.slds.css +281 -0
- package/src/lightning/configProvider/defaultConfig.js +2 -1
- package/src/lightning/datepicker/datepicker.css +3 -0
- package/src/lightning/datepicker/datepicker.html +7 -4
- package/src/lightning/datepicker/datepicker.js +73 -19
- package/src/lightning/datepicker/form-element.slds.css +281 -0
- package/src/lightning/datepicker/input-text.slds.css +398 -0
- package/src/lightning/datetimepicker/datetimepicker.css +3 -0
- package/src/lightning/datetimepicker/datetimepicker.html +9 -3
- package/src/lightning/datetimepicker/datetimepicker.js +39 -35
- package/src/lightning/datetimepicker/form-element.slds.css +281 -0
- package/src/lightning/datetimepicker/input-text.slds.css +398 -0
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.html +3 -3
- package/src/lightning/dualListbox/dualListbox.js +31 -6
- package/src/lightning/dualListbox/form-element.slds.css +83 -34
- package/src/lightning/dualListbox/keyboard.js +20 -1
- package/src/lightning/dynamicIcon/dynamicIcon.js +3 -2
- package/src/lightning/dynamicIcon/ellie.css +1 -1
- package/src/lightning/dynamicIcon/eq.css +1 -1
- package/src/lightning/dynamicIcon/score.css +1 -1
- package/src/lightning/dynamicIcon/strength.css +1 -1
- package/src/lightning/dynamicIcon/trend.css +1 -1
- package/src/lightning/dynamicIcon/waffle.css +1 -1
- package/src/lightning/formattedRichText/linkify.js +2 -2
- package/src/lightning/helptext/form-element.slds.css +83 -34
- package/src/lightning/helptext/help-text.slds.css +215 -453
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +3 -2
- package/src/lightning/i18nCldrOptions/README.md +5 -0
- package/src/lightning/i18nService/README.md +5 -0
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +16 -2
- package/src/lightning/icon/icon.slds.css +29 -17
- package/src/lightning/icon/iconColors.js +1 -0
- package/src/lightning/input/__examples__/text/text.html +0 -1
- package/src/lightning/input/form-element.slds.css +281 -0
- package/src/lightning/input/input-checkbox.slds.css +3 -12
- package/src/lightning/input/input-text.slds.css +239 -128
- package/src/lightning/input/input.css +2 -1
- package/src/lightning/input/input.html +8 -8
- package/src/lightning/input/input.js +107 -73
- package/src/lightning/internationalizationLibrary/README.md +24 -0
- package/src/lightning/internationalizationLibrary/utils.js +4 -1
- package/src/lightning/layout/__docs__/layout.md +1 -1
- package/src/lightning/layout/__examples__/simple/simple.css +1 -1
- package/src/lightning/layout/layout.css +5 -1
- package/src/lightning/layout/layout.js +4 -2
- package/src/lightning/layoutItem/__examples__/alignmentBump/alignmentBump.css +1 -1
- package/src/lightning/layoutItem/__examples__/sizePerDevice/sizePerDevice.css +0 -1
- package/src/lightning/layoutItem/layoutItem.css +5 -0
- package/src/lightning/layoutItem/layoutItem.js +4 -2
- package/src/lightning/menuDivider/menu-divider.slds.css +15 -0
- package/src/lightning/menuDivider/menuDivider.css +3 -0
- package/src/lightning/menuDivider/menuDivider.html +1 -1
- package/src/lightning/menuDivider/menuDivider.js +4 -2
- package/src/lightning/menuItem/menu-item.slds.css +140 -0
- package/src/lightning/menuItem/menuItem.css +3 -0
- package/src/lightning/menuItem/menuItem.html +43 -41
- package/src/lightning/menuItem/menuItem.js +4 -4
- package/src/lightning/menuSubheader/menu-subheader.slds.css +22 -0
- package/src/lightning/menuSubheader/menuSubheader.css +3 -0
- package/src/lightning/menuSubheader/menuSubheader.html +3 -1
- package/src/lightning/menuSubheader/menuSubheader.js +4 -6
- package/src/lightning/modal/__docs__/modal.md +3 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +267 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +1165 -0
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +131 -0
- package/src/lightning/modal/modal.js +1 -1
- package/src/lightning/pill/avatar.slds.css +272 -0
- package/src/lightning/pill/link.css +3 -0
- package/src/lightning/pill/link.html +1 -1
- package/src/lightning/pill/pill.js +29 -9
- package/src/lightning/pill/pill.slds.css +168 -0
- package/src/lightning/pill/plain.css +3 -0
- package/src/lightning/pill/plain.html +1 -1
- package/src/lightning/pill/plainLink.css +3 -0
- package/src/lightning/pill/plainLink.html +1 -1
- package/src/lightning/pillContainer/barePillContainer.css +3 -0
- package/src/lightning/pillContainer/barePillContainer.html +1 -2
- package/src/lightning/pillContainer/listbox.slds.css +267 -0
- package/src/lightning/pillContainer/pill-container.slds.css +22 -0
- package/src/lightning/pillContainer/pill.slds.css +168 -0
- package/src/lightning/pillContainer/pillContainer.js +7 -3
- package/src/lightning/pillContainer/standardPillContainer.css +4 -0
- package/src/lightning/pillContainer/standardPillContainer.html +2 -2
- package/src/lightning/popup/popover.slds.css +119 -119
- package/src/lightning/popup/popup.css +1 -2
- package/src/lightning/popup/popup.js +3 -2
- package/src/lightning/positionLibrary/elementProxy.js +7 -2
- package/src/lightning/positionLibrary/util.js +8 -0
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +4 -2
- package/src/lightning/primitiveButton/primitiveButton.js +5 -4
- package/src/lightning/primitiveCellFactory/cellWithStandardLayout.html +29 -21
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -0
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +31 -19
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +5 -3
- package/src/lightning/primitiveIcon/icon.slds.css +209 -0
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -1
- package/src/lightning/primitiveIcon/primitiveIcon.html +1 -1
- package/src/lightning/primitiveIcon/primitiveIcon.js +18 -11
- package/src/lightning/progressStep/progressStep.js +10 -13
- package/src/lightning/radioGroup/radioGroup.css +2 -1
- package/src/lightning/radioGroup/radioGroup.js +4 -2
- package/src/lightning/select/form-element.slds.css +83 -34
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +4 -2
- package/src/lightning/select/select.slds.css +86 -34
- package/src/lightning/sldsCommon/sldsCommon.css +135 -75
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +4 -2
- package/src/lightning/tabBar/tab-bar.slds.css +334 -0
- package/src/lightning/tabBar/tabBar.css +2 -0
- package/src/lightning/tabBar/tabBar.html +4 -3
- package/src/lightning/tabBar/tabBar.js +30 -3
- package/src/lightning/tabset/tabset.html +5 -4
- package/src/lightning/tabset/tabset.js +29 -11
- package/src/lightning/timepicker/form-element.slds.css +281 -0
- package/src/lightning/timepicker/timepicker.css +3 -0
- package/src/lightning/timepicker/timepicker.html +5 -1
- package/src/lightning/timepicker/timepicker.js +18 -15
- package/src/lightning/timepicker/timepicker.slds.css +18 -0
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +21 -19
- package/src/lightning/utilsPrivate/browser.js +5 -3
- package/src/lightning/utilsPrivate/os.js +6 -4
- package/src/lightning/utilsPrivate/ssr.js +4 -0
- package/src/lightning/utilsPrivate/utilsPrivate.js +2 -0
- package/src/lightning/verticalNavigation/verticalNavigation.css +2 -1
- package/src/lightning/verticalNavigation/verticalNavigation.js +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +2 -1
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +3 -2
- package/src/lightning/accordion/__perf__DISABLED/accordion-perf-utils.js +0 -76
- package/src/lightning/accordion/__perf__DISABLED/accordion10Multiple25SectionEach.perf.js +0 -57
- package/src/lightning/accordion/__perf__DISABLED/accordion10Simple25SectionEach.perf.js +0 -37
- package/src/lightning/accordion/__perf__DISABLED/accordionMultiple50Section.perf.js +0 -45
- package/src/lightning/accordion/__perf__DISABLED/accordionSimple50Section.perf.js +0 -35
- package/src/lightning/accordion/__perf__DISABLED/container/container.html +0 -15
- package/src/lightning/accordion/__perf__DISABLED/container/container.js +0 -7
- package/src/lightning/positionLibrary/__component__/positionLibraryBounding.spec.js +0 -319
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.css +0 -16
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.html +0 -36
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.js +0 -122
- /package/src/lightning/{baseCombobox → baseComboboxItem}/listbox.slds.css +0 -0
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
required={required}
|
|
27
27
|
onfocus={handleDatepickerFocus}
|
|
28
28
|
onblur={handleDatepickerBlur}
|
|
29
|
-
onchange={handleDateChange}
|
|
29
|
+
onchange={handleDateChange}
|
|
30
|
+
aria-error-message-element={errorMessageElement}
|
|
31
|
+
root-aria-node={rootAriaNode}
|
|
32
|
+
>
|
|
30
33
|
</lightning-datepicker>
|
|
31
34
|
|
|
32
35
|
<lightning-timepicker
|
|
@@ -43,12 +46,15 @@
|
|
|
43
46
|
disabled={disabled}
|
|
44
47
|
onfocus={handleTimepickerFocus}
|
|
45
48
|
onblur={handleTimepickerBlur}
|
|
46
|
-
onchange={handleTimeChange}
|
|
49
|
+
onchange={handleTimeChange}
|
|
50
|
+
aria-error-message-element={errorMessageElement}
|
|
51
|
+
root-aria-node={rootAriaNode}
|
|
52
|
+
>
|
|
47
53
|
</lightning-timepicker>
|
|
48
54
|
</div>
|
|
49
55
|
</div>
|
|
50
56
|
</div>
|
|
51
|
-
|
|
57
|
+
<div data-error-message id="errormessage" class={computedClass} aria-live="assertive">{customErrorMessage}</div>
|
|
52
58
|
|
|
53
59
|
</fieldset>
|
|
54
60
|
</div>
|
|
@@ -4,14 +4,13 @@ import labelRangeUnderflow from '@salesforce/label/LightningDateTimePicker.range
|
|
|
4
4
|
import labelTime from '@salesforce/label/LightningDateTimePicker.timeLabel';
|
|
5
5
|
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
6
6
|
import sfTimeZone from '@salesforce/i18n/timeZone';
|
|
7
|
-
import { LightningElement,
|
|
7
|
+
import { LightningElement, api, track } from 'lwc';
|
|
8
8
|
import { classSet, formatLabel } from 'lightning/utils';
|
|
9
9
|
import {
|
|
10
10
|
normalizeBoolean,
|
|
11
|
-
normalizeAriaAttribute,
|
|
12
11
|
synchronizeAttrs,
|
|
13
|
-
getRealDOMId,
|
|
14
12
|
computeAriaInvalid,
|
|
13
|
+
reflectAttribute,
|
|
15
14
|
} from 'lightning/utilsPrivate';
|
|
16
15
|
import {
|
|
17
16
|
getCurrentTimeString,
|
|
@@ -57,6 +56,8 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
57
56
|
|
|
58
57
|
@api timeAriaLabel;
|
|
59
58
|
|
|
59
|
+
@api rootAriaNode;
|
|
60
|
+
|
|
60
61
|
/**
|
|
61
62
|
* Controls auto-filling of the input. Set the attribute to pass
|
|
62
63
|
* through autocomplete values to be interpreted by the browser.
|
|
@@ -268,6 +269,10 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
268
269
|
return this.getDatepicker().hasBadInput();
|
|
269
270
|
}
|
|
270
271
|
|
|
272
|
+
get hasMissingDateTimeInput() {
|
|
273
|
+
return this.required && !this._dateValue && !this._timeValue;
|
|
274
|
+
}
|
|
275
|
+
|
|
271
276
|
get hasBadTimeInput() {
|
|
272
277
|
const timeBadInput = this.getTimepicker().hasBadInput();
|
|
273
278
|
const timeMissing =
|
|
@@ -286,19 +291,37 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
286
291
|
return;
|
|
287
292
|
}
|
|
288
293
|
|
|
294
|
+
if (this.hasMissingDateTimeInput) {
|
|
295
|
+
this.clearHelpMessage();
|
|
296
|
+
reflectAttribute(this.getDatepicker(), 'invalid', true);
|
|
297
|
+
reflectAttribute(this.getTimeCombobox(), 'invalid', true);
|
|
298
|
+
}
|
|
299
|
+
|
|
289
300
|
if (this.hasBadDateInput && !this._messageWhenBadInput) {
|
|
290
301
|
this.clearHelpMessage();
|
|
302
|
+
reflectAttribute(
|
|
303
|
+
this.getDatepicker(),
|
|
304
|
+
'invalid',
|
|
305
|
+
this.hasBadDateInput
|
|
306
|
+
);
|
|
291
307
|
this.getDatepicker().showHelpMessage(message);
|
|
292
308
|
return;
|
|
293
309
|
}
|
|
294
310
|
|
|
295
311
|
if (this.hasBadTimeInput && !this._messageWhenBadInput) {
|
|
296
312
|
this.clearHelpMessage();
|
|
313
|
+
reflectAttribute(
|
|
314
|
+
this.getTimepicker(),
|
|
315
|
+
'invalid',
|
|
316
|
+
this.hasBadTimeInput
|
|
317
|
+
);
|
|
318
|
+
reflectAttribute(this.getTimeCombobox(), 'invalid', true);
|
|
297
319
|
this.getTimepicker().showHelpMessage(message);
|
|
298
320
|
return;
|
|
299
321
|
}
|
|
300
322
|
|
|
301
323
|
this.classList.add('slds-has-error');
|
|
324
|
+
|
|
302
325
|
this._customErrorMessage = message;
|
|
303
326
|
}
|
|
304
327
|
|
|
@@ -306,7 +329,10 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
306
329
|
this.classList.remove('slds-has-error');
|
|
307
330
|
this._customErrorMessage = '';
|
|
308
331
|
this.getDatepicker().showHelpMessage('');
|
|
332
|
+
this.getDatepicker().removeAttribute('invalid');
|
|
309
333
|
this.getTimepicker().showHelpMessage('');
|
|
334
|
+
this.getTimepicker().removeAttribute('invalid');
|
|
335
|
+
this.getTimeCombobox().removeAttribute('invalid');
|
|
310
336
|
}
|
|
311
337
|
|
|
312
338
|
get isLabelHidden() {
|
|
@@ -340,36 +366,8 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
340
366
|
return 'slds-form-element__help ' + displayClass;
|
|
341
367
|
}
|
|
342
368
|
|
|
343
|
-
get
|
|
344
|
-
return
|
|
345
|
-
this.template.querySelector('[data-error-message]')
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
get computedDateAriaDescribedBy() {
|
|
350
|
-
const ariaValues = [];
|
|
351
|
-
|
|
352
|
-
if (this.customErrorMessage) {
|
|
353
|
-
ariaValues.push(this.errorMessageElementId);
|
|
354
|
-
}
|
|
355
|
-
if (this.dateAriaDescribedBy) {
|
|
356
|
-
ariaValues.push(this.dateAriaDescribedBy);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return normalizeAriaAttribute(ariaValues);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
get computedTimeAriaDescribedBy() {
|
|
363
|
-
const ariaValues = [];
|
|
364
|
-
|
|
365
|
-
if (this.customErrorMessage) {
|
|
366
|
-
ariaValues.push(this.errorMessageElementId);
|
|
367
|
-
}
|
|
368
|
-
if (this.timeAriaDescribedBy) {
|
|
369
|
-
ariaValues.push(this.timeAriaDescribedBy);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return normalizeAriaAttribute(ariaValues);
|
|
369
|
+
get errorMessageElement() {
|
|
370
|
+
return this.template.querySelector('[data-error-message]');
|
|
373
371
|
}
|
|
374
372
|
|
|
375
373
|
get hasExternalLabel() {
|
|
@@ -394,7 +392,7 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
394
392
|
if (datepicker) {
|
|
395
393
|
synchronizeAttrs(datepicker, {
|
|
396
394
|
ariaLabelledByElement: this.dateAriaLabelledBy,
|
|
397
|
-
ariaDescribedByElements: this.
|
|
395
|
+
ariaDescribedByElements: this.dateAriaDescribedBy,
|
|
398
396
|
ariaControlsElement: this.dateAriaControls,
|
|
399
397
|
'aria-label': this.dateAriaLabel,
|
|
400
398
|
});
|
|
@@ -403,7 +401,7 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
403
401
|
if (timepicker) {
|
|
404
402
|
synchronizeAttrs(timepicker, {
|
|
405
403
|
ariaLabelledByElement: this.timeAriaLabelledBy,
|
|
406
|
-
ariaDescribedByElements: this.
|
|
404
|
+
ariaDescribedByElements: this.timeAriaDescribedBy,
|
|
407
405
|
ariaControlsElement: this.timeAriaControls,
|
|
408
406
|
'aria-label': this.timeAriaLabel,
|
|
409
407
|
});
|
|
@@ -441,6 +439,12 @@ export default class LightningDateTimePicker extends LightningElement {
|
|
|
441
439
|
return this.template.querySelector('lightning-timepicker');
|
|
442
440
|
}
|
|
443
441
|
|
|
442
|
+
getTimeCombobox() {
|
|
443
|
+
return this.getTimepicker().shadowRoot.querySelector(
|
|
444
|
+
'lightning-base-combobox'
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
444
448
|
getDatepicker() {
|
|
445
449
|
return this.template.querySelector('lightning-datepicker');
|
|
446
450
|
}
|
|
@@ -0,0 +1,281 @@
|
|
|
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
|
+
}
|