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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
@supports (--styling-hooks: '') {
|
|
3
|
+
:host([data-render-mode="shadow"]) [part="badge"] {
|
|
4
|
+
/**
|
|
5
|
+
* Remap to SLDS blueprint hooks for parity
|
|
6
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
--slds-c-badge-line-height: var(var(--slds-c-badge-font-lineheight));
|
|
10
|
+
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: var(--sds-g-spacing-1, 0.25rem) var(--sds-g-spacing-2, 0.5rem);
|
|
14
|
+
color: var(--slds-c-badge-text-color, var(--sds-g-color-neutral-base-10, #181818));
|
|
15
|
+
font-size: var(--slds-c-badge-font-size, var(--sds-g-font-scale-neg-3, 0.75rem));
|
|
16
|
+
font-weight: var(--sds-g-font-weight-7, 700);
|
|
17
|
+
line-height: var(--slds-c-badge-font-lineheight, normal);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
border-width: var(--slds-c-badge-sizing-border, var(--sds-g-sizing-border-1, 1px));
|
|
20
|
+
border-style: solid;
|
|
21
|
+
border-color: var(--slds-c-badge-color-border, transparent);
|
|
22
|
+
border-radius: var(--slds-c-badge-radius-border, 15rem);
|
|
23
|
+
background-color: var(--slds-c-badge-color-background, var(--sds-g-color-neutral-base-95, #f3f3f3));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([data-render-mode="shadow"]) [part="badge"]:empty {
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
color: var(--slds-c-badge-icon-color-foreground, var(--slds-g-color-neutral-base-50, var(--sds-g-color-neutral-base-50, #747474)));
|
|
34
|
+
line-height: 1;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_inverse {
|
|
39
|
+
--slds-c-badge-icon-color-foreground: var(--slds-c-badge-icon-inverse-color-foreground, currentColor);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_left {
|
|
43
|
+
margin-inline-end: var(--sds-g-spacing-1, 0.25rem);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_right {
|
|
47
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([data-render-mode="shadow"]) [part="badge"] lightning-primitive-icon {
|
|
51
|
+
vertical-align: middle;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
55
|
+
However, the public API for this component does not expose an attribute for this class. Establishing a programmatic
|
|
56
|
+
mapping between the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
57
|
+
:host([data-render-mode="shadow"].slds-badge_inverse) {
|
|
58
|
+
--slds-c-badge-color-background: var(--slds-c-badge-inverse-color-background, var(--slds-g-color-neutral-base-50, var(--sds-g-color-neutral-base-50, #747474)));
|
|
59
|
+
--slds-c-badge-text-color: var(--slds-c-badge-inverse-text-color, var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff)));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
63
|
+
However, the public API for badge does not expose an attribute for this class. Establishing a programmatic mapping between
|
|
64
|
+
the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
65
|
+
:host([data-render-mode="shadow"].slds-badge_lightest) {
|
|
66
|
+
--slds-c-badge-color-background: var(--slds-c-badge-lightest-color-background, var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff)));
|
|
67
|
+
--slds-c-badge-color-border: var(--slds-c-badge-lightest-color-border, var(--slds-g-color-border-base-1, var(--sds-g-color-neutral-base-90, #e5e5e5)));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([data-render-mode="shadow"].slds-badge:not(:first-of-type)) {
|
|
71
|
+
margin-inline-start: var(--sds-g-spacing-2, 0.5rem);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -872,7 +872,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
872
872
|
/**
|
|
873
873
|
* Input Text
|
|
874
874
|
*/
|
|
875
|
-
:host([data-render-mode="shadow"]) [part
|
|
875
|
+
:host([data-render-mode="shadow"]) [part='input-text'] {
|
|
876
876
|
/* Host reassignments to composed slds-icon */
|
|
877
877
|
--slds-c-icon-color-foreground: var(
|
|
878
878
|
--slds-c-inputtext-icon-color-foreground,
|
|
@@ -918,23 +918,23 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
918
918
|
/**
|
|
919
919
|
* Input Container
|
|
920
920
|
*/
|
|
921
|
-
:host([data-render-mode="shadow"]) [part
|
|
921
|
+
:host([data-render-mode="shadow"]) [part='input-container'] {
|
|
922
922
|
flex: 1 0 100%;
|
|
923
923
|
align-items: stretch;
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
-
:host([data-render-mode="shadow"]) [part
|
|
926
|
+
:host([data-render-mode="shadow"]) [part='input-container'][type~='range'] {
|
|
927
927
|
border: none;
|
|
928
928
|
display: inline-block;
|
|
929
929
|
}
|
|
930
930
|
|
|
931
|
-
:host([data-render-mode="shadow"]) [part
|
|
931
|
+
:host([data-render-mode="shadow"]) [part='input'][type~='range'] {
|
|
932
932
|
min-height: calc(1.875rem + (1px * 2));
|
|
933
933
|
margin: 0;
|
|
934
934
|
}
|
|
935
935
|
|
|
936
|
-
:host([data-render-mode="shadow"]) [part
|
|
937
|
-
[part
|
|
936
|
+
:host([data-render-mode="shadow"]) [part='input-container'][type~='range']:focus-within,:host([data-render-mode="shadow"])
|
|
937
|
+
[part='input-container'][type~='range']:active {
|
|
938
938
|
--sds-c-inputtext-color-border: var(--sds-g-color-brand-base-60, #1b96ff);
|
|
939
939
|
--sds-c-inputtext-shadow: 0 0 3px var(--sds-g-color-brand-base-50, #0176d3);
|
|
940
940
|
--sds-c-inputtext-color-background: var(--sds-g-color-neutral-base-100, #ffffff);
|
|
@@ -947,7 +947,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
947
947
|
/**
|
|
948
948
|
* Input
|
|
949
949
|
*/
|
|
950
|
-
:host([data-render-mode="shadow"]) [part
|
|
950
|
+
:host([data-render-mode="shadow"]) [part='input'] {
|
|
951
951
|
padding-inline-start: var(
|
|
952
952
|
--slds-c-inputtext-spacing-inline-start,
|
|
953
953
|
var(--sds-g-spacing-3, 0.75rem));
|
|
@@ -961,8 +961,8 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
961
961
|
/**
|
|
962
962
|
* Focus / active State
|
|
963
963
|
*/
|
|
964
|
-
:host([data-render-mode="shadow"]) [part
|
|
965
|
-
[part
|
|
964
|
+
:host([data-render-mode="shadow"]) [part="input-container"]:focus-within,:host([data-render-mode="shadow"])
|
|
965
|
+
[part="input-container"]:active {
|
|
966
966
|
--sds-c-inputtext-color-border: var(--sds-g-color-brand-base-60, #1b96ff);
|
|
967
967
|
--sds-c-inputtext-shadow: 0 0 3px var(--sds-g-color-brand-base-50, #0176d3);
|
|
968
968
|
--sds-c-inputtext-color-background: var(--sds-g-color-neutral-base-100, #ffffff);
|
|
@@ -973,7 +973,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
973
973
|
/**
|
|
974
974
|
* Read Only State
|
|
975
975
|
*/
|
|
976
|
-
:host([data-render-mode="shadow"][readonly]) [part
|
|
976
|
+
:host([data-render-mode="shadow"][readonly]) [part='input-text'] {
|
|
977
977
|
--sds-c-inputtext-spacing-inline-start-readonly: 0;
|
|
978
978
|
--sds-c-inputtext-color-border-focus: transparent;
|
|
979
979
|
--slds-c-inputtext-color-border: transparent;
|
|
@@ -988,7 +988,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
988
988
|
* tied to :host([aria-invalid]) which this subsystem does not use. Instead, it
|
|
989
989
|
* uses :host([invalid]).
|
|
990
990
|
*/
|
|
991
|
-
:host([data-render-mode="shadow"][invalid]) [part
|
|
991
|
+
:host([data-render-mode="shadow"][invalid]) [part='input-text'] {
|
|
992
992
|
--sds-c-inputtext-shadow: 0 0 0 var(--sds-g-sizing-border-1, 1px) inset
|
|
993
993
|
var(--sds-g-color-error-base-50, #ea001e);
|
|
994
994
|
--slds-c-inputtext-color-border: var(--sds-g-color-error-base-50, #ea001e);
|
|
@@ -1001,7 +1001,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1001
1001
|
* The following styling hooks are included in SDS and need to be reassigned
|
|
1002
1002
|
* here to prevent a bug with the focus state border and box-shadow
|
|
1003
1003
|
*/
|
|
1004
|
-
:host([data-render-mode="shadow"][invalid]) [part
|
|
1004
|
+
:host([data-render-mode="shadow"][invalid]) [part='input-container']:focus-within {
|
|
1005
1005
|
--sds-c-inputtext-shadow:
|
|
1006
1006
|
var(--sds-g-color-error-base-50, #ea001e) 0 0 0 var(--sds-g-sizing-border-1, 1px) inset,
|
|
1007
1007
|
0 0 var(--sds-g-sizing-border-3, 3px) var(--sds-g-color-brand-base-50, #0176d3);
|
|
@@ -1013,7 +1013,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1013
1013
|
*
|
|
1014
1014
|
* Both parts form the visible form control.
|
|
1015
1015
|
*/
|
|
1016
|
-
:host([data-render-mode="shadow"][disabled]) [part
|
|
1016
|
+
:host([data-render-mode="shadow"][disabled]) [part='input-container'],:host([data-render-mode="shadow"][disabled]) [part='input'] {
|
|
1017
1017
|
cursor: not-allowed;
|
|
1018
1018
|
--sds-c-inputtext-color-background: var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
1019
1019
|
--sds-c-inputtext-color-border: var(--sds-g-color-neutral-base-80, #c9c9c9);
|
|
@@ -1023,10 +1023,10 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Label
|
|
1025
1025
|
*
|
|
1026
|
-
* Add [part
|
|
1027
|
-
* avoid collisions with other components using [part
|
|
1026
|
+
* Add [part='input-text'] to increase specificity and
|
|
1027
|
+
* avoid collisions with other components using [part='label'] (e.g. slds-input-checkbox)
|
|
1028
1028
|
*/
|
|
1029
|
-
:host([data-render-mode="shadow"]) [part
|
|
1029
|
+
:host([data-render-mode="shadow"]) [part='input-text'] [part='label'] {
|
|
1030
1030
|
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
1031
1031
|
padding-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
1032
1032
|
color: var(
|
|
@@ -1050,7 +1050,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1050
1050
|
* so we don't add spacing to other icons composed in the component, e.g.,
|
|
1051
1051
|
* the icon in the inline help text.
|
|
1052
1052
|
*/
|
|
1053
|
-
:host([data-render-mode="shadow"]) [part
|
|
1053
|
+
:host([data-render-mode="shadow"]) [part='start'] {
|
|
1054
1054
|
--slds-c-icon-spacing-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
1055
1055
|
}
|
|
1056
1056
|
|
|
@@ -1067,11 +1067,11 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1067
1067
|
* Ref: https://github.com/salesforce-ux/design-system-internal/blob/240-winter-23/ui/components/form-element/horizontal/_index.scss#L63
|
|
1068
1068
|
*/
|
|
1069
1069
|
@media (min-width: 48em) {
|
|
1070
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part
|
|
1070
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) [part='input-text'] {
|
|
1071
1071
|
display: block;
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
1074
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part
|
|
1074
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) [part='label'] {
|
|
1075
1075
|
float: left;
|
|
1076
1076
|
|
|
1077
1077
|
/* TODO: Get rid of these magic numbers */
|
|
@@ -1079,11 +1079,11 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1079
1079
|
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part
|
|
1082
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) [part='input-container'] {
|
|
1083
1083
|
margin-inline-start: 33%;
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) [part
|
|
1086
|
+
:host([data-render-mode="shadow"][variant~='label-inline']) [part='inline-help'] {
|
|
1087
1087
|
float: left;
|
|
1088
1088
|
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
1089
1089
|
}
|
|
@@ -1093,7 +1093,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1093
1093
|
left: var(--sds-g-spacing-3, 0.75rem);
|
|
1094
1094
|
fill: var(--slds-g-color-neutral-base-50, #747474);
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1096
|
+
|
|
1097
1097
|
:host([data-render-mode="shadow"]) .slds-input-has-icon .slds-button_icon {
|
|
1098
1098
|
background-color: transparent;
|
|
1099
1099
|
}
|
|
@@ -1145,7 +1145,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1145
1145
|
--slds-c-inputtext-spacing-inline-start: var(--sds-g-spacing-6, 2rem);
|
|
1146
1146
|
--slds-c-inputtext-spacing-inline-end: var(--sds-g-spacing-6, 2rem);
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1148
|
+
|
|
1149
1149
|
/**
|
|
1150
1150
|
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
1151
1151
|
*
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<input id="combobox-input"
|
|
18
18
|
class={computedInputClass}
|
|
19
19
|
type="text"
|
|
20
|
-
role=
|
|
20
|
+
role={customRole}
|
|
21
21
|
aria-expanded={computedAriaExpanded}
|
|
22
|
-
aria-haspopup=
|
|
22
|
+
aria-haspopup={customAriaHasPopup}
|
|
23
23
|
required={required}
|
|
24
24
|
readonly={_inputAriaReadOnly}
|
|
25
25
|
autocomplete={autocomplete}
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
type="button"
|
|
49
49
|
class={computedInputClass}
|
|
50
50
|
aria-expanded={computedAriaExpanded}
|
|
51
|
-
aria-haspopup=
|
|
51
|
+
aria-haspopup={customAriaHasPopup}
|
|
52
52
|
name={name}
|
|
53
|
-
role=
|
|
53
|
+
role={customRole}
|
|
54
54
|
data-value={computedInputValue}
|
|
55
55
|
disabled={disabled}
|
|
56
56
|
aria-label={computedButtonTriggerAriaLabel}
|
|
@@ -147,13 +147,9 @@
|
|
|
147
147
|
</template>
|
|
148
148
|
</template>
|
|
149
149
|
<template if:true={showDropdownActivityIndicator}>
|
|
150
|
-
<div role="presentation" class="slds-listbox__item">
|
|
151
|
-
<div class="slds-align_absolute-center slds-p-top_medium">
|
|
152
|
-
<
|
|
153
|
-
<span class="slds-assistive-text">{i18n.loadingText}</span>
|
|
154
|
-
<div class="slds-spinner__dot-a"></div>
|
|
155
|
-
<div class="slds-spinner__dot-b"></div>
|
|
156
|
-
</div>
|
|
150
|
+
<div role="presentation" class="slds-listbox__item slds-spinner_inline">
|
|
151
|
+
<div class="slds-align_absolute-center slds-p-top_medium slds-p-bottom_medium">
|
|
152
|
+
<lightning-spinner size="x-small" alternative-text={i18n.loadingText}></lightning-spinner>
|
|
157
153
|
</div>
|
|
158
154
|
</div>
|
|
159
155
|
</template>
|
|
@@ -3,7 +3,8 @@ import labelDeselectOptionKeyboard from '@salesforce/label/LightningCombobox.des
|
|
|
3
3
|
import labelLoadingText from '@salesforce/label/LightningCombobox.loadingText';
|
|
4
4
|
import labelPillCloseButtonAlternativeText from '@salesforce/label/LightningCombobox.pillCloseButtonAlternativeText';
|
|
5
5
|
import labelPlaceholder from '@salesforce/label/LightningCombobox.placeholder';
|
|
6
|
-
import {
|
|
6
|
+
import { api, track } from 'lwc';
|
|
7
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
7
8
|
import { handleKeyDownOnInput } from './keyboard';
|
|
8
9
|
import { BaseComboboxEvents } from './baseComboboxEvents';
|
|
9
10
|
import { classSet } from 'lightning/utils';
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
21
22
|
import { VARIANT } from 'lightning/inputUtils';
|
|
22
23
|
import AriaObserver from 'lightning/ariaObserver';
|
|
23
|
-
|
|
24
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
24
25
|
const i18n = {
|
|
25
26
|
ariaSelectedOptions: labelAriaSelectedOptions,
|
|
26
27
|
deselectOptionKeyboard: labelDeselectOptionKeyboard,
|
|
@@ -32,6 +33,8 @@ const i18n = {
|
|
|
32
33
|
const SMALL_MIN_HEIGHT = '2.25rem';
|
|
33
34
|
const MEDIUM_MIN_HEIGHT = '6.75rem';
|
|
34
35
|
const INPUT_ELEMENT_SELECTOR = '.slds-combobox__input';
|
|
36
|
+
const INPUT_PART_ELEMENT_SELECTOR = '[part~="input-text"]';
|
|
37
|
+
const FAUX_INPUT_BUTTON_ELEMENT_SELECTOR = `${INPUT_ELEMENT_SELECTOR}.slds-input_faux`;
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Breakpoint when viewport height doesn't fit 10 items in the dropdown
|
|
@@ -46,8 +49,9 @@ const ARIA_LABEL = 'aria-label';
|
|
|
46
49
|
const ARIA_ACTIVEDESCENDANT = 'aria-activedescendant';
|
|
47
50
|
const ARIA_INVALID = 'aria-invalid';
|
|
48
51
|
|
|
49
|
-
export default class LightningBaseCombobox extends
|
|
52
|
+
export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
50
53
|
static delegatesFocus = true;
|
|
54
|
+
static validationOptOut = ['class'];
|
|
51
55
|
|
|
52
56
|
/**
|
|
53
57
|
* Controls auto-filling of the input. Set the attribute to pass
|
|
@@ -73,23 +77,24 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
73
77
|
@api required = false;
|
|
74
78
|
@api placeholder = i18n.placeholder;
|
|
75
79
|
@api inputLabel;
|
|
80
|
+
@api customRole = 'combobox';
|
|
81
|
+
@api customAriaHasPopup = 'listbox';
|
|
76
82
|
|
|
77
83
|
@api name;
|
|
78
84
|
@api inputPill;
|
|
79
85
|
@api attributionLogoUrl;
|
|
80
86
|
@api attributionLogoAssistiveText;
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
_showDropdownActivityIndicator = false;
|
|
83
89
|
@track _items = [];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
_disabled = false;
|
|
91
|
+
_dropdownVisible = false;
|
|
92
|
+
_hasDropdownOpened = false;
|
|
93
|
+
_highlightedOptionElementId = null;
|
|
94
|
+
_variant;
|
|
95
|
+
_dropdownHeight = 'standard';
|
|
96
|
+
_readonly = false;
|
|
97
|
+
_logoLoaded = false;
|
|
93
98
|
_inputDescribedBy = [];
|
|
94
99
|
_inputAriaControls;
|
|
95
100
|
_activeElementDomId;
|
|
@@ -98,11 +103,13 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
98
103
|
originDisableDefaultHighlight;
|
|
99
104
|
privateDisableDefaultHighlight;
|
|
100
105
|
_editingMode = false;
|
|
106
|
+
_connected = false;
|
|
107
|
+
ariaObserver = null;
|
|
101
108
|
|
|
102
109
|
constructor() {
|
|
103
110
|
super();
|
|
104
111
|
this._events = new BaseComboboxEvents(this);
|
|
105
|
-
this.
|
|
112
|
+
this.setupAriaObserverIfAbsent();
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
renderedCallback() {
|
|
@@ -114,19 +121,16 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
114
121
|
},
|
|
115
122
|
})
|
|
116
123
|
);
|
|
117
|
-
|
|
118
|
-
if (this.isConnected) {
|
|
119
|
-
this.ariaObserver.sync();
|
|
120
|
-
}
|
|
121
|
-
|
|
124
|
+
this.syncAriaObserver();
|
|
122
125
|
this.synchronizeA11y();
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
connectedCallback() {
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
super.connectedCallback();
|
|
130
|
+
this.setupAriaObserverIfAbsent();
|
|
131
|
+
if (isCSR) {
|
|
132
|
+
this.overrideDropdownAlignment();
|
|
128
133
|
}
|
|
129
|
-
this.overrideDropdownAlignment();
|
|
130
134
|
this.classList.add('slds-combobox_container');
|
|
131
135
|
this._connected = true;
|
|
132
136
|
this._keyboardInterface = this.dropdownKeyboardInterface();
|
|
@@ -135,9 +139,19 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
135
139
|
disconnectedCallback() {
|
|
136
140
|
this._connected = false;
|
|
137
141
|
this._listBoxElementCache = undefined;
|
|
138
|
-
|
|
142
|
+
this.removeAriaObserver();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
setupAriaObserverIfAbsent() {
|
|
146
|
+
if (!this.ariaObserver) {
|
|
147
|
+
this.ariaObserver = new AriaObserver(this);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
removeAriaObserver() {
|
|
152
|
+
if (this.ariaObserver && this.ariaObserver.disconnect) {
|
|
139
153
|
this.ariaObserver.disconnect();
|
|
140
|
-
this.ariaObserver =
|
|
154
|
+
this.ariaObserver = null;
|
|
141
155
|
}
|
|
142
156
|
}
|
|
143
157
|
|
|
@@ -160,6 +174,15 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
160
174
|
this.connectAriaControls();
|
|
161
175
|
}
|
|
162
176
|
|
|
177
|
+
syncAriaObserver() {
|
|
178
|
+
this.setupAriaObserverIfAbsent();
|
|
179
|
+
const ariaObserverSyncExists =
|
|
180
|
+
this.ariaObserver && this.ariaObserver.sync;
|
|
181
|
+
if (this.isConnected && ariaObserverSyncExists) {
|
|
182
|
+
this.ariaObserver.sync();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
163
186
|
connectAriaControls() {
|
|
164
187
|
this.connectAriaAttribute({
|
|
165
188
|
attribute: ARIA_CONTROLS,
|
|
@@ -169,15 +192,18 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
169
192
|
}
|
|
170
193
|
|
|
171
194
|
connectAriaAttribute(params) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
195
|
+
this.setupAriaObserverIfAbsent();
|
|
196
|
+
if (this.ariaObserver && this.ariaObserver.connect) {
|
|
197
|
+
const relatedNodeIds = Array.isArray(params.relatedNodeIds)
|
|
198
|
+
? params.relatedNodeIds.map((el) => getRealDOMId(el)).join(' ')
|
|
199
|
+
: getRealDOMId(params.relatedNodeIds);
|
|
200
|
+
|
|
201
|
+
this.ariaObserver.connect({
|
|
202
|
+
...params,
|
|
203
|
+
targetSelector: INPUT_ELEMENT_SELECTOR,
|
|
204
|
+
relatedNodeIds,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
181
207
|
}
|
|
182
208
|
|
|
183
209
|
@api
|
|
@@ -228,7 +254,10 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
228
254
|
}
|
|
229
255
|
|
|
230
256
|
set rootAriaNode(root) {
|
|
231
|
-
this.
|
|
257
|
+
this.setupAriaObserverIfAbsent();
|
|
258
|
+
if (this.ariaObserver) {
|
|
259
|
+
this.ariaObserver.root = root;
|
|
260
|
+
}
|
|
232
261
|
}
|
|
233
262
|
|
|
234
263
|
get inputId() {
|
|
@@ -572,7 +601,9 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
572
601
|
}
|
|
573
602
|
|
|
574
603
|
get dropdownElement() {
|
|
575
|
-
return
|
|
604
|
+
return isCSR
|
|
605
|
+
? this.template.querySelector('[data-dropdown-element]')
|
|
606
|
+
: null;
|
|
576
607
|
}
|
|
577
608
|
|
|
578
609
|
get i18n() {
|
|
@@ -917,7 +948,9 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
917
948
|
}
|
|
918
949
|
|
|
919
950
|
get inputElement() {
|
|
920
|
-
return
|
|
951
|
+
return isCSR
|
|
952
|
+
? this.template.querySelector(INPUT_ELEMENT_SELECTOR)
|
|
953
|
+
: null;
|
|
921
954
|
}
|
|
922
955
|
|
|
923
956
|
// remove-next-line-for-c-namespace
|
|
@@ -930,8 +963,25 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
930
963
|
this._autoPosition = new AutoPosition(this);
|
|
931
964
|
}
|
|
932
965
|
|
|
966
|
+
// when using dropdown-alignment='auto' positioning and standard variant lighting-combobox
|
|
967
|
+
// the selector for 'target' is determined by this.isUserInputDisabled
|
|
968
|
+
// when TRUE the target is a BUTTON element acting as a faux / fake INPUT element
|
|
969
|
+
// when FALSE the target is an INPUT element
|
|
970
|
+
// NOTE: isUserInputDisabled is NOT determined by combobox.disabled
|
|
971
|
+
// instead isUserInputDisabled is determined by
|
|
972
|
+
// this.isStandardVariant && !this.isAutocompleteEnabled (which is an internal variable)
|
|
973
|
+
// this means that the INPUT is often NOT present, and instead a BUTTON is
|
|
974
|
+
// this selector for .start({ target }) is used to
|
|
975
|
+
// position the element from so this.isUserInputDisabled
|
|
976
|
+
// must be taken into account so the proper selector can be used
|
|
977
|
+
// the 'element' below is always the same without IF/ELSE, so there
|
|
978
|
+
// is not a need to switch between selectors
|
|
979
|
+
const selectorToUse = this.isUserInputDisabled
|
|
980
|
+
? FAUX_INPUT_BUTTON_ELEMENT_SELECTOR
|
|
981
|
+
: INPUT_PART_ELEMENT_SELECTOR;
|
|
982
|
+
|
|
933
983
|
this._autoPosition.start({
|
|
934
|
-
target: () => this.template.querySelector(
|
|
984
|
+
target: () => this.template.querySelector(selectorToUse),
|
|
935
985
|
element: () => this.template.querySelector('div.slds-dropdown'),
|
|
936
986
|
align: {
|
|
937
987
|
horizontal: Direction.Left,
|