lightning-base-components 1.18.7-alpha → 1.18.8-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 +32 -9
- package/package.json +1 -1
- package/src/lightning/accordion/accordion.slds.css +26 -20
- package/src/lightning/accordionSection/accordion-section.slds.css +20 -14
- package/src/lightning/avatar/avatar.slds.css +10 -10
- package/src/lightning/baseCombobox/base-combobox.slds.css +23 -23
- package/src/lightning/baseCombobox/baseCombobox.css +1 -2
- package/src/lightning/baseCombobox/baseCombobox.html +7 -11
- package/src/lightning/baseCombobox/baseCombobox.js +84 -36
- package/src/lightning/breadcrumb/breadcrumb.js +4 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +3 -3
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +5 -5
- package/src/lightning/button/button.slds.css +8 -2
- package/src/lightning/buttonGroup/button-group.slds.css +5 -5
- package/src/lightning/buttonIcon/button-icon.slds.css +9 -3
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +15 -9
- package/src/lightning/buttonMenu/button-menu.slds.css +13 -7
- package/src/lightning/buttonStateful/button-stateful.slds.css +11 -5
- package/src/lightning/calendar/calendar.js +15 -23
- package/src/lightning/calendar/calendar.slds.css +29 -23
- package/src/lightning/card/card.slds.css +68 -68
- 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 +4 -0
- package/src/lightning/datatable/keyboard.js +8 -4
- package/src/lightning/datatable/sort.js +1 -1
- package/src/lightning/datepicker/datepicker.js +1 -1
- package/src/lightning/datepicker/form-element.slds.css +8 -0
- package/src/lightning/datepicker/input-text.slds.css +23 -23
- package/src/lightning/datetimepicker/form-element.slds.css +8 -0
- package/src/lightning/datetimepicker/input-text.slds.css +23 -23
- package/src/lightning/dualListbox/form-element.slds.css +8 -0
- package/src/lightning/f6Controller/f6Controller.js +31 -22
- package/src/lightning/formattedDateTime/formattedDateTime.js +1 -1
- 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/icon/icon.js +5 -1
- 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 +0 -2
- 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.js +1 -0
- package/src/lightning/layoutItem/layoutItem.js +1 -0
- package/src/lightning/modal/__docs__/modal.md +102 -3
- package/src/lightning/pill/avatar.slds.css +10 -10
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +9 -9
- package/src/lightning/primitiveIcon/icon.slds.css +3 -3
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +289 -0
- package/src/lightning/{input → primitiveInputCheckbox}/input-checkbox.slds.css +18 -18
- 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/{input → primitiveInputColor}/input-text.slds.css +23 -23
- 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/radioGroup/input-radio-group.slds.css +57 -57
- package/src/lightning/select/form-element.slds.css +8 -0
- package/src/lightning/select/select.js +1 -0
- package/src/lightning/select/select.slds.css +30 -22
- package/src/lightning/sldsCommon/sldsCommon.css +21 -0
- package/src/lightning/spinner/spinner.js +8 -4
- 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/tabset/tabset.css +10 -0
- package/src/lightning/tabset/tabset.js +31 -7
- package/src/lightning/timepicker/form-element.slds.css +8 -0
- package/src/lightning/toast/button-icon.slds.css +9 -3
- package/src/lightning/toast/icon.slds.css +3 -3
- package/src/lightning/verticalNavigation/vertical-navigation.slds.css +1 -1
- package/src/lightning/baseCombobox/spinner.slds.css +0 -438
- /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
|
@@ -3,7 +3,7 @@ import labelDeselectOptionKeyboard from '@salesforce/label/LightningCombobox.des
|
|
|
3
3
|
import labelLoadingText from '@salesforce/label/LightningCombobox.loadingText';
|
|
4
4
|
import labelPillCloseButtonAlternativeText from '@salesforce/label/LightningCombobox.pillCloseButtonAlternativeText';
|
|
5
5
|
import labelPlaceholder from '@salesforce/label/LightningCombobox.placeholder';
|
|
6
|
-
import {
|
|
6
|
+
import { api, track, LightningElement } from 'lwc';
|
|
7
7
|
import { handleKeyDownOnInput } from './keyboard';
|
|
8
8
|
import { BaseComboboxEvents } from './baseComboboxEvents';
|
|
9
9
|
import { classSet } from 'lightning/utils';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
21
21
|
import { VARIANT } from 'lightning/inputUtils';
|
|
22
22
|
import AriaObserver from 'lightning/ariaObserver';
|
|
23
|
-
|
|
23
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
24
24
|
const i18n = {
|
|
25
25
|
ariaSelectedOptions: labelAriaSelectedOptions,
|
|
26
26
|
deselectOptionKeyboard: labelDeselectOptionKeyboard,
|
|
@@ -32,6 +32,8 @@ const i18n = {
|
|
|
32
32
|
const SMALL_MIN_HEIGHT = '2.25rem';
|
|
33
33
|
const MEDIUM_MIN_HEIGHT = '6.75rem';
|
|
34
34
|
const INPUT_ELEMENT_SELECTOR = '.slds-combobox__input';
|
|
35
|
+
const INPUT_PART_ELEMENT_SELECTOR = '[part~="input-text"]';
|
|
36
|
+
const FAUX_INPUT_BUTTON_ELEMENT_SELECTOR = `${INPUT_ELEMENT_SELECTOR}.slds-input_faux`;
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Breakpoint when viewport height doesn't fit 10 items in the dropdown
|
|
@@ -48,6 +50,7 @@ const ARIA_INVALID = 'aria-invalid';
|
|
|
48
50
|
|
|
49
51
|
export default class LightningBaseCombobox extends LightningElement {
|
|
50
52
|
static delegatesFocus = true;
|
|
53
|
+
static validationOptOut = ['class'];
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
56
|
* Controls auto-filling of the input. Set the attribute to pass
|
|
@@ -73,23 +76,24 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
73
76
|
@api required = false;
|
|
74
77
|
@api placeholder = i18n.placeholder;
|
|
75
78
|
@api inputLabel;
|
|
79
|
+
@api customRole = 'combobox';
|
|
80
|
+
@api customAriaHasPopup = 'listbox';
|
|
76
81
|
|
|
77
82
|
@api name;
|
|
78
83
|
@api inputPill;
|
|
79
84
|
@api attributionLogoUrl;
|
|
80
85
|
@api attributionLogoAssistiveText;
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
_showDropdownActivityIndicator = false;
|
|
83
88
|
@track _items = [];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
_disabled = false;
|
|
90
|
+
_dropdownVisible = false;
|
|
91
|
+
_hasDropdownOpened = false;
|
|
92
|
+
_highlightedOptionElementId = null;
|
|
93
|
+
_variant;
|
|
94
|
+
_dropdownHeight = 'standard';
|
|
95
|
+
_readonly = false;
|
|
96
|
+
_logoLoaded = false;
|
|
93
97
|
_inputDescribedBy = [];
|
|
94
98
|
_inputAriaControls;
|
|
95
99
|
_activeElementDomId;
|
|
@@ -98,11 +102,13 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
98
102
|
originDisableDefaultHighlight;
|
|
99
103
|
privateDisableDefaultHighlight;
|
|
100
104
|
_editingMode = false;
|
|
105
|
+
_connected = false;
|
|
106
|
+
ariaObserver = null;
|
|
101
107
|
|
|
102
108
|
constructor() {
|
|
103
109
|
super();
|
|
104
110
|
this._events = new BaseComboboxEvents(this);
|
|
105
|
-
this.
|
|
111
|
+
this.setupAriaObserverIfAbsent();
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
renderedCallback() {
|
|
@@ -114,19 +120,15 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
114
120
|
},
|
|
115
121
|
})
|
|
116
122
|
);
|
|
117
|
-
|
|
118
|
-
if (this.isConnected) {
|
|
119
|
-
this.ariaObserver.sync();
|
|
120
|
-
}
|
|
121
|
-
|
|
123
|
+
this.syncAriaObserver();
|
|
122
124
|
this.synchronizeA11y();
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
connectedCallback() {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
this.setupAriaObserverIfAbsent();
|
|
129
|
+
if (isCSR) {
|
|
130
|
+
this.overrideDropdownAlignment();
|
|
128
131
|
}
|
|
129
|
-
this.overrideDropdownAlignment();
|
|
130
132
|
this.classList.add('slds-combobox_container');
|
|
131
133
|
this._connected = true;
|
|
132
134
|
this._keyboardInterface = this.dropdownKeyboardInterface();
|
|
@@ -135,9 +137,19 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
135
137
|
disconnectedCallback() {
|
|
136
138
|
this._connected = false;
|
|
137
139
|
this._listBoxElementCache = undefined;
|
|
138
|
-
|
|
140
|
+
this.removeAriaObserver();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
setupAriaObserverIfAbsent() {
|
|
144
|
+
if (!this.ariaObserver) {
|
|
145
|
+
this.ariaObserver = new AriaObserver(this);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
removeAriaObserver() {
|
|
150
|
+
if (this.ariaObserver && this.ariaObserver.disconnect) {
|
|
139
151
|
this.ariaObserver.disconnect();
|
|
140
|
-
this.ariaObserver =
|
|
152
|
+
this.ariaObserver = null;
|
|
141
153
|
}
|
|
142
154
|
}
|
|
143
155
|
|
|
@@ -160,6 +172,15 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
160
172
|
this.connectAriaControls();
|
|
161
173
|
}
|
|
162
174
|
|
|
175
|
+
syncAriaObserver() {
|
|
176
|
+
this.setupAriaObserverIfAbsent();
|
|
177
|
+
const ariaObserverSyncExists =
|
|
178
|
+
this.ariaObserver && this.ariaObserver.sync;
|
|
179
|
+
if (this.isConnected && ariaObserverSyncExists) {
|
|
180
|
+
this.ariaObserver.sync();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
163
184
|
connectAriaControls() {
|
|
164
185
|
this.connectAriaAttribute({
|
|
165
186
|
attribute: ARIA_CONTROLS,
|
|
@@ -169,15 +190,18 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
169
190
|
}
|
|
170
191
|
|
|
171
192
|
connectAriaAttribute(params) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
this.setupAriaObserverIfAbsent();
|
|
194
|
+
if (this.ariaObserver && this.ariaObserver.connect) {
|
|
195
|
+
const relatedNodeIds = Array.isArray(params.relatedNodeIds)
|
|
196
|
+
? params.relatedNodeIds.map((el) => getRealDOMId(el)).join(' ')
|
|
197
|
+
: getRealDOMId(params.relatedNodeIds);
|
|
198
|
+
|
|
199
|
+
this.ariaObserver.connect({
|
|
200
|
+
...params,
|
|
201
|
+
targetSelector: INPUT_ELEMENT_SELECTOR,
|
|
202
|
+
relatedNodeIds,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
181
205
|
}
|
|
182
206
|
|
|
183
207
|
@api
|
|
@@ -228,7 +252,10 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
228
252
|
}
|
|
229
253
|
|
|
230
254
|
set rootAriaNode(root) {
|
|
231
|
-
this.
|
|
255
|
+
this.setupAriaObserverIfAbsent();
|
|
256
|
+
if (this.ariaObserver) {
|
|
257
|
+
this.ariaObserver.root = root;
|
|
258
|
+
}
|
|
232
259
|
}
|
|
233
260
|
|
|
234
261
|
get inputId() {
|
|
@@ -572,7 +599,9 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
572
599
|
}
|
|
573
600
|
|
|
574
601
|
get dropdownElement() {
|
|
575
|
-
return
|
|
602
|
+
return isCSR
|
|
603
|
+
? this.template.querySelector('[data-dropdown-element]')
|
|
604
|
+
: null;
|
|
576
605
|
}
|
|
577
606
|
|
|
578
607
|
get i18n() {
|
|
@@ -917,7 +946,9 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
917
946
|
}
|
|
918
947
|
|
|
919
948
|
get inputElement() {
|
|
920
|
-
return
|
|
949
|
+
return isCSR
|
|
950
|
+
? this.template.querySelector(INPUT_ELEMENT_SELECTOR)
|
|
951
|
+
: null;
|
|
921
952
|
}
|
|
922
953
|
|
|
923
954
|
// remove-next-line-for-c-namespace
|
|
@@ -930,8 +961,25 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
930
961
|
this._autoPosition = new AutoPosition(this);
|
|
931
962
|
}
|
|
932
963
|
|
|
964
|
+
// when using dropdown-alignment='auto' positioning and standard variant lighting-combobox
|
|
965
|
+
// the selector for 'target' is determined by this.isUserInputDisabled
|
|
966
|
+
// when TRUE the target is a BUTTON element acting as a faux / fake INPUT element
|
|
967
|
+
// when FALSE the target is an INPUT element
|
|
968
|
+
// NOTE: isUserInputDisabled is NOT determined by combobox.disabled
|
|
969
|
+
// instead isUserInputDisabled is determined by
|
|
970
|
+
// this.isStandardVariant && !this.isAutocompleteEnabled (which is an internal variable)
|
|
971
|
+
// this means that the INPUT is often NOT present, and instead a BUTTON is
|
|
972
|
+
// this selector for .start({ target }) is used to
|
|
973
|
+
// position the element from so this.isUserInputDisabled
|
|
974
|
+
// must be taken into account so the proper selector can be used
|
|
975
|
+
// the 'element' below is always the same without IF/ELSE, so there
|
|
976
|
+
// is not a need to switch between selectors
|
|
977
|
+
const selectorToUse = this.isUserInputDisabled
|
|
978
|
+
? FAUX_INPUT_BUTTON_ELEMENT_SELECTOR
|
|
979
|
+
: INPUT_PART_ELEMENT_SELECTOR;
|
|
980
|
+
|
|
933
981
|
this._autoPosition.start({
|
|
934
|
-
target: () => this.template.querySelector(
|
|
982
|
+
target: () => this.template.querySelector(selectorToUse),
|
|
935
983
|
element: () => this.template.querySelector('div.slds-dropdown'),
|
|
936
984
|
align: {
|
|
937
985
|
horizontal: Direction.Left,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { LightningElement, api } from 'lwc';
|
|
2
|
-
|
|
2
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
3
3
|
const DEFAULT_HREF = '#';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* An item in the hierarchy path of the page the user is on.
|
|
7
7
|
*/
|
|
8
8
|
export default class LightningBreadcrumb extends LightningElement {
|
|
9
|
+
static validationOptOut = ['class'];
|
|
9
10
|
/**
|
|
10
11
|
* The URL of the page that the breadcrumb goes to.
|
|
11
12
|
* @type {string}
|
|
@@ -66,7 +67,7 @@ export default class LightningBreadcrumb extends LightningElement {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
get linkElement() {
|
|
69
|
-
return this.template.querySelector('a');
|
|
70
|
+
return isCSR ? this.template.querySelector('a') : null;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
/**
|
|
@@ -83,6 +84,7 @@ export default class LightningBreadcrumb extends LightningElement {
|
|
|
83
84
|
this.connected = true;
|
|
84
85
|
// add default CSS classes to custom element tag
|
|
85
86
|
this.classList.add('slds-breadcrumb__item');
|
|
87
|
+
|
|
86
88
|
this.setAttribute('role', 'listitem');
|
|
87
89
|
}
|
|
88
90
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
5
|
@supports (--styling-hooks: '') {
|
|
6
|
-
:host([data-render-mode="shadow"]) [part
|
|
6
|
+
:host([data-render-mode="shadow"]) [part='breadcrumb'] {
|
|
7
7
|
display: block;
|
|
8
8
|
padding-block-start: 0;
|
|
9
9
|
padding-inline-end: var(--slds-c-breadcrumb-spacing-inline-end, var(--sds-g-spacing-2, 0.5rem));
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
color: var(--slds-g-color-brand-base-50, var(--sds-g-color-brand-base-50, #0176d3));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:host([data-render-mode="shadow"]) [part
|
|
16
|
-
[part
|
|
15
|
+
:host([data-render-mode="shadow"]) [part='breadcrumb']:hover,:host([data-render-mode="shadow"])
|
|
16
|
+
[part='breadcrumb']:focus {
|
|
17
17
|
text-decoration: none;
|
|
18
18
|
color: var(--slds-g-color-brand-base-30, var(--sds-g-color-brand-base-30, #014486));
|
|
19
19
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
5
|
@supports (--styling-hooks: '') {
|
|
6
|
-
:host([data-render-mode="shadow"]) [part
|
|
6
|
+
:host([data-render-mode="shadow"]) [part='breadcrumbs'] {
|
|
7
7
|
/**
|
|
8
8
|
* Reassignments for parity with SLDS blueprint
|
|
9
9
|
* https://www.lightningdesignsystem.com/components/breadcrumbs/#Styling-Hooks-Overview
|
|
@@ -16,24 +16,24 @@
|
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
:host([data-render-mode="shadow"]) [part
|
|
19
|
+
:host([data-render-mode="shadow"]) [part='breadcrumbs'] ::slotted(*) {
|
|
20
20
|
position: relative;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/* Positions a '>' separator before breadcrumb */
|
|
24
|
-
:host([data-render-mode="shadow"]) [part
|
|
24
|
+
:host([data-render-mode="shadow"]) [part='breadcrumbs'] ::slotted(:not(:first-child))::before {
|
|
25
25
|
content: '\003E';
|
|
26
26
|
position: absolute;
|
|
27
27
|
left: calc((var(--sds-g-spacing-2, 0.5rem) * 0.5) * -1);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/* Don't include '>' separator before first breadcrumb */
|
|
31
|
-
:host([data-render-mode="shadow"]) [part
|
|
31
|
+
:host([data-render-mode="shadow"]) [part='breadcrumbs'] ::slotted(:first-child)::before {
|
|
32
32
|
content: '';
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* Don't include spacing before first breadcrumb */
|
|
36
|
-
:host([data-render-mode="shadow"]) [part
|
|
36
|
+
:host([data-render-mode="shadow"]) [part='breadcrumbs'] ::slotted(:first-child) {
|
|
37
37
|
--slds-c-breadcrumb-spacing-inline-start: 0;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -484,14 +484,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
484
484
|
justify-content: center;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
489
|
+
*/
|
|
487
490
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
488
491
|
display: inline-flex;
|
|
489
|
-
padding-inline-end:
|
|
492
|
+
padding-inline-end: 0;
|
|
490
493
|
}
|
|
491
494
|
|
|
495
|
+
/**
|
|
496
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
497
|
+
*/
|
|
492
498
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
493
499
|
display: inline-flex;
|
|
494
|
-
padding-inline-start:
|
|
500
|
+
padding-inline-start: 0;
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
503
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
5
|
@supports (--styling-hooks: '') {
|
|
6
|
-
:host([data-render-mode="shadow"]) [part
|
|
6
|
+
:host([data-render-mode="shadow"]) [part='button-group'] {
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* Nudge buttons over to remove double border effect */
|
|
16
|
-
:host([data-render-mode="shadow"]) [part
|
|
16
|
+
:host([data-render-mode="shadow"]) [part='button-group'] ::slotted(:not(:first-child)) {
|
|
17
17
|
margin-inline-start: calc(-1 * var(--sds-g-sizing-border-1, 1px));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* First child in group
|
|
22
22
|
*/
|
|
23
|
-
:host([data-render-mode="shadow"]) [part
|
|
23
|
+
:host([data-render-mode="shadow"]) [part='button-group'] ::slotted(:first-child) {
|
|
24
24
|
--slds-s-button-radius-border-startstart: var(--sds-g-radius-border-2, 0.25rem);
|
|
25
25
|
--slds-s-button-radius-border-endstart: var(--sds-g-radius-border-2, 0.25rem);
|
|
26
26
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
/**
|
|
29
29
|
* Last child in group
|
|
30
30
|
*/
|
|
31
|
-
:host([data-render-mode="shadow"]) [part
|
|
31
|
+
:host([data-render-mode="shadow"]) [part='button-group'] ::slotted(:last-child) {
|
|
32
32
|
--slds-s-button-radius-border-startend: var(--sds-g-radius-border-2, 0.25rem);
|
|
33
33
|
--slds-s-button-radius-border-endend: var(--sds-g-radius-border-2, 0.25rem);
|
|
34
34
|
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
*
|
|
39
39
|
* Adds stacking context so the focus shadow is visible
|
|
40
40
|
*/
|
|
41
|
-
:host([data-render-mode="shadow"]) [part
|
|
41
|
+
:host([data-render-mode="shadow"]) [part='button-group'] ::slotted(:focus) {
|
|
42
42
|
position: relative;
|
|
43
43
|
z-index: 1;
|
|
44
44
|
}
|
|
@@ -484,14 +484,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
484
484
|
justify-content: center;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
489
|
+
*/
|
|
487
490
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
488
491
|
display: inline-flex;
|
|
489
|
-
padding-inline-end:
|
|
492
|
+
padding-inline-end: 0;
|
|
490
493
|
}
|
|
491
494
|
|
|
495
|
+
/**
|
|
496
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
497
|
+
*/
|
|
492
498
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
493
499
|
display: inline-flex;
|
|
494
|
-
padding-inline-start:
|
|
500
|
+
padding-inline-start: 0;
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
503
|
|
|
@@ -883,7 +889,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
883
889
|
/**
|
|
884
890
|
* End part
|
|
885
891
|
*/
|
|
886
|
-
:host([data-render-mode="shadow"]) [part
|
|
892
|
+
:host([data-render-mode="shadow"]) [part='end'] {
|
|
887
893
|
padding-inline-start: var(--slds-c-buttonicon-end-spacing-inline-start, 0);
|
|
888
894
|
}
|
|
889
895
|
|
|
@@ -524,14 +524,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
524
524
|
justify-content: center;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
/**
|
|
528
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
529
|
+
*/
|
|
527
530
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
528
531
|
display: inline-flex;
|
|
529
|
-
padding-inline-end:
|
|
532
|
+
padding-inline-end: 0;
|
|
530
533
|
}
|
|
531
534
|
|
|
535
|
+
/**
|
|
536
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
537
|
+
*/
|
|
532
538
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
533
539
|
display: inline-flex;
|
|
534
|
-
padding-inline-start:
|
|
540
|
+
padding-inline-start: 0;
|
|
535
541
|
}
|
|
536
542
|
}
|
|
537
543
|
|
|
@@ -923,7 +929,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
923
929
|
/**
|
|
924
930
|
* End part
|
|
925
931
|
*/
|
|
926
|
-
:host([data-render-mode="shadow"]) [part
|
|
932
|
+
:host([data-render-mode="shadow"]) [part='end'] {
|
|
927
933
|
padding-inline-start: var(--slds-c-buttonicon-end-spacing-inline-start, 0);
|
|
928
934
|
}
|
|
929
935
|
|
|
@@ -953,7 +959,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
953
959
|
|
|
954
960
|
@supports (--styling-hooks: '') {
|
|
955
961
|
/* :host::part(button-icon-stateful), */
|
|
956
|
-
:host([data-render-mode="shadow"]) [part
|
|
962
|
+
:host([data-render-mode="shadow"]) [part='button-icon-stateful'] {
|
|
957
963
|
display: inline-flex;
|
|
958
964
|
color: var(--slds-c-buttoniconstateful-color-foreground);
|
|
959
965
|
|
|
@@ -989,7 +995,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
989
995
|
}
|
|
990
996
|
|
|
991
997
|
/* :host([variant='border-filled'])::part(button-icon-stateful), */
|
|
992
|
-
:host([data-render-mode="shadow"][variant='border-filled']) [part
|
|
998
|
+
:host([data-render-mode="shadow"][variant='border-filled']) [part='button-icon-stateful'] {
|
|
993
999
|
--slds-c-buttonicon-borderfilled-color-background: var(
|
|
994
1000
|
--slds-c-buttoniconstateful-borderfilled-color-background
|
|
995
1001
|
);
|
|
@@ -1016,7 +1022,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1016
1022
|
}
|
|
1017
1023
|
|
|
1018
1024
|
/* :host([variant='border-inverse'])::part(button-icon-stateful), */
|
|
1019
|
-
:host([data-render-mode="shadow"][variant='border-inverse']) [part
|
|
1025
|
+
:host([data-render-mode="shadow"][variant='border-inverse']) [part='button-icon-stateful'] {
|
|
1020
1026
|
--slds-c-buttonicon-borderinverse-color-border: var(
|
|
1021
1027
|
--slds-c-buttoniconstateful-borderinverse-color-border
|
|
1022
1028
|
);
|
|
@@ -1045,7 +1051,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1045
1051
|
}
|
|
1046
1052
|
|
|
1047
1053
|
/* Selected + Variants */
|
|
1048
|
-
:host([data-render-mode="shadow"][selected]) [part
|
|
1054
|
+
:host([data-render-mode="shadow"][selected]) [part='button-icon-stateful'] {
|
|
1049
1055
|
--slds-c-buttoniconstateful-color-foreground: var(
|
|
1050
1056
|
--slds-c-buttoniconstateful-color-foreground-selected,
|
|
1051
1057
|
var(--sds-g-color-neutral-base-100, #ffffff)
|
|
@@ -1098,7 +1104,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1098
1104
|
);
|
|
1099
1105
|
}
|
|
1100
1106
|
|
|
1101
|
-
:host([data-render-mode="shadow"][selected][variant='border-filled']) [part
|
|
1107
|
+
:host([data-render-mode="shadow"][selected][variant='border-filled']) [part='button-icon-stateful'] {
|
|
1102
1108
|
--slds-c-buttoniconstateful-borderfilled-color-background: var(
|
|
1103
1109
|
--slds-c-buttoniconstateful-borderfilled-color-background-selected,
|
|
1104
1110
|
var(--sds-g-color-brand-base-50, #0176d3)
|
|
@@ -1153,7 +1159,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1153
1159
|
);
|
|
1154
1160
|
}
|
|
1155
1161
|
|
|
1156
|
-
:host([data-render-mode="shadow"][selected][variant='border-inverse']) [part
|
|
1162
|
+
:host([data-render-mode="shadow"][selected][variant='border-inverse']) [part='button-icon-stateful'] {
|
|
1157
1163
|
--slds-c-buttoniconstateful-borderinverse-color-border: var(
|
|
1158
1164
|
--slds-c-buttoniconstateful-borderinverse-color-border-selected,
|
|
1159
1165
|
var(--sds-g-color-brand-base-50, #0176d3)
|
|
@@ -187,7 +187,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
187
187
|
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
:host([data-render-mode="shadow"]) [part
|
|
190
|
+
:host([data-render-mode="shadow"]) [part='boundary'] {
|
|
191
191
|
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
192
192
|
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
193
193
|
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
@@ -217,7 +217,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
:host([data-render-mode="shadow"]) [part
|
|
220
|
+
:host([data-render-mode="shadow"]) [part='icon'] {
|
|
221
221
|
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
222
222
|
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
223
223
|
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
@@ -302,7 +302,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
302
302
|
|
|
303
303
|
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
304
304
|
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
305
|
-
|
|
305
|
+
|
|
306
306
|
position: absolute;
|
|
307
307
|
top: 50%;
|
|
308
308
|
margin-block-start: -0.4375rem;
|
|
@@ -652,14 +652,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
652
652
|
justify-content: center;
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
657
|
+
*/
|
|
655
658
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
656
659
|
display: inline-flex;
|
|
657
|
-
padding-inline-end:
|
|
660
|
+
padding-inline-end: 0;
|
|
658
661
|
}
|
|
659
662
|
|
|
663
|
+
/**
|
|
664
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
665
|
+
*/
|
|
660
666
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
661
667
|
display: inline-flex;
|
|
662
|
-
padding-inline-start:
|
|
668
|
+
padding-inline-start: 0;
|
|
663
669
|
}
|
|
664
670
|
}
|
|
665
671
|
|
|
@@ -1051,7 +1057,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1051
1057
|
/**
|
|
1052
1058
|
* End part
|
|
1053
1059
|
*/
|
|
1054
|
-
:host([data-render-mode="shadow"]) [part
|
|
1060
|
+
:host([data-render-mode="shadow"]) [part='end'] {
|
|
1055
1061
|
padding-inline-start: var(--slds-c-buttonicon-end-spacing-inline-start, 0);
|
|
1056
1062
|
}
|
|
1057
1063
|
|
|
@@ -1855,7 +1861,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
1855
1861
|
* are different so we target button_icon specifically. display: flex
|
|
1856
1862
|
* comes from parent button styles.
|
|
1857
1863
|
*/
|
|
1858
|
-
:host([data-render-mode="shadow"]) [part
|
|
1864
|
+
:host([data-render-mode="shadow"]) [part='button-icon'] {
|
|
1859
1865
|
gap: var(--sds-g-spacing-1, 0.25rem);
|
|
1860
1866
|
}
|
|
1861
1867
|
|
|
@@ -524,14 +524,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
524
524
|
justify-content: center;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
/**
|
|
528
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
529
|
+
*/
|
|
527
530
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
528
531
|
display: inline-flex;
|
|
529
|
-
padding-inline-end:
|
|
532
|
+
padding-inline-end: 0;
|
|
530
533
|
}
|
|
531
534
|
|
|
535
|
+
/**
|
|
536
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
537
|
+
*/
|
|
532
538
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
533
539
|
display: inline-flex;
|
|
534
|
-
padding-inline-start:
|
|
540
|
+
padding-inline-start: 0;
|
|
535
541
|
}
|
|
536
542
|
}
|
|
537
543
|
|
|
@@ -612,7 +618,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
612
618
|
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
613
619
|
}
|
|
614
620
|
|
|
615
|
-
:host([data-render-mode="shadow"]) [part
|
|
621
|
+
:host([data-render-mode="shadow"]) [part='boundary'] {
|
|
616
622
|
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
617
623
|
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
618
624
|
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
@@ -642,7 +648,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
642
648
|
display: inline-flex;
|
|
643
649
|
}
|
|
644
650
|
|
|
645
|
-
:host([data-render-mode="shadow"]) [part
|
|
651
|
+
:host([data-render-mode="shadow"]) [part='icon'] {
|
|
646
652
|
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
647
653
|
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
648
654
|
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
@@ -727,7 +733,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
727
733
|
|
|
728
734
|
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
729
735
|
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
730
|
-
|
|
736
|
+
|
|
731
737
|
position: absolute;
|
|
732
738
|
top: 50%;
|
|
733
739
|
margin-block-start: -0.4375rem;
|