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
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
/* brand */
|
|
34
34
|
|
|
35
|
-
:host([data-render-mode="shadow"][variant='brand']) [part
|
|
35
|
+
:host([data-render-mode="shadow"][variant='brand']) [part='spinner'] {
|
|
36
36
|
--slds-c-spinner-color-background: var(
|
|
37
37
|
--slds-c-spinner-brand-color-background,
|
|
38
38
|
var(--sds-g-color-brand-base-60, #1b96ff)
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
/* inverse */
|
|
43
43
|
|
|
44
|
-
:host([data-render-mode="shadow"][variant='inverse']) [part
|
|
44
|
+
:host([data-render-mode="shadow"][variant='inverse']) [part='spinner'] {
|
|
45
45
|
--slds-c-spinner-color-background: var(
|
|
46
46
|
--slds-c-spinner-inverse-color-background,
|
|
47
47
|
var(--sds-g-color-neutral-base-100, #ffffff)
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
|
|
296
296
|
/* end size xx-small */
|
|
297
297
|
|
|
298
|
-
:host([data-render-mode="shadow"]) [part
|
|
298
|
+
:host([data-render-mode="shadow"]) [part='spinner'] {
|
|
299
299
|
position: absolute;
|
|
300
300
|
top: 50%;
|
|
301
301
|
width: 2rem;
|
|
@@ -306,16 +306,16 @@
|
|
|
306
306
|
transform: translate(-50%, -50%) rotate(90deg);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
:host([data-render-mode="shadow"]) [part
|
|
310
|
-
[part
|
|
311
|
-
[part
|
|
309
|
+
:host([data-render-mode="shadow"]) [part='spinner'],:host([data-render-mode="shadow"])
|
|
310
|
+
[part='dot-a'],:host([data-render-mode="shadow"])
|
|
311
|
+
[part='dot-b'] {
|
|
312
312
|
transform-origin: 50% 50%;
|
|
313
313
|
will-change: transform;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
/* creates the circles */
|
|
317
|
-
:host([data-render-mode="shadow"]) [part
|
|
318
|
-
[part
|
|
317
|
+
:host([data-render-mode="shadow"]) [part='dot-a'],:host([data-render-mode="shadow"])
|
|
318
|
+
[part='dot-b'] {
|
|
319
319
|
position: absolute;
|
|
320
320
|
top: 0;
|
|
321
321
|
left: 0;
|
|
@@ -323,12 +323,12 @@
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/* stylelint-disable no-duplicate-selectors */
|
|
326
|
-
:host([data-render-mode="shadow"]) [part
|
|
327
|
-
[part
|
|
328
|
-
[part
|
|
329
|
-
[part
|
|
330
|
-
[part
|
|
331
|
-
[part
|
|
326
|
+
:host([data-render-mode="shadow"]) [part='spinner']::before,:host([data-render-mode="shadow"])
|
|
327
|
+
[part='spinner']::after,:host([data-render-mode="shadow"])
|
|
328
|
+
[part='dot-a']::before,:host([data-render-mode="shadow"])
|
|
329
|
+
[part='dot-b']::before,:host([data-render-mode="shadow"])
|
|
330
|
+
[part='dot-a']::after,:host([data-render-mode="shadow"])
|
|
331
|
+
[part='dot-b']::after {
|
|
332
332
|
content: '';
|
|
333
333
|
position: absolute;
|
|
334
334
|
background-color: var(--slds-c-spinner-color-background, var(--sds-g-color-neutral-base-65, #a0a0a0));
|
|
@@ -338,59 +338,59 @@
|
|
|
338
338
|
transform: translate3d(0, 0, 0);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
:host([data-render-mode="shadow"]) [part
|
|
341
|
+
:host([data-render-mode="shadow"]) [part='dot-a'] {
|
|
342
342
|
transform: rotate(60deg);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
:host([data-render-mode="shadow"]) [part
|
|
345
|
+
:host([data-render-mode="shadow"]) [part='dot-b'] {
|
|
346
346
|
transform: rotate(120deg);
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
:host([data-render-mode="shadow"]) [part
|
|
349
|
+
:host([data-render-mode="shadow"]) [part='spinner']::before {
|
|
350
350
|
animation-delay: -83.33333ms;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
:host([data-render-mode="shadow"]) [part
|
|
353
|
+
:host([data-render-mode="shadow"]) [part='dot-a']::before {
|
|
354
354
|
animation-delay: 83.33333ms;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
:host([data-render-mode="shadow"]) [part
|
|
357
|
+
:host([data-render-mode="shadow"]) [part='dot-b']::before {
|
|
358
358
|
animation-delay: 250ms;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
:host([data-render-mode="shadow"]) [part
|
|
361
|
+
:host([data-render-mode="shadow"]) [part='spinner']::after {
|
|
362
362
|
animation-delay: 416.66667ms;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
:host([data-render-mode="shadow"]) [part
|
|
365
|
+
:host([data-render-mode="shadow"]) [part='dot-a']::after {
|
|
366
366
|
animation-delay: 583.33333ms;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
:host([data-render-mode="shadow"]) [part
|
|
369
|
+
:host([data-render-mode="shadow"]) [part='dot-b']::after {
|
|
370
370
|
animation-delay: 750ms;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
:host([data-render-mode="shadow"]) [part
|
|
374
|
-
[part
|
|
375
|
-
[part
|
|
376
|
-
[part
|
|
377
|
-
[part
|
|
378
|
-
[part
|
|
373
|
+
:host([data-render-mode="shadow"]) [part='spinner']::after,:host([data-render-mode="shadow"])
|
|
374
|
+
[part='spinner']::before,:host([data-render-mode="shadow"])
|
|
375
|
+
[part='dot-a']::after,:host([data-render-mode="shadow"])
|
|
376
|
+
[part='dot-a']::before,:host([data-render-mode="shadow"])
|
|
377
|
+
[part='dot-b']::after,:host([data-render-mode="shadow"])
|
|
378
|
+
[part='dot-b']::before {
|
|
379
379
|
width: 0.5rem;
|
|
380
380
|
height: 0.5rem;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
:host([data-render-mode="shadow"]) [part
|
|
384
|
-
[part
|
|
385
|
-
[part
|
|
383
|
+
:host([data-render-mode="shadow"]) [part='spinner']::before,:host([data-render-mode="shadow"])
|
|
384
|
+
[part='dot-a']::before,:host([data-render-mode="shadow"])
|
|
385
|
+
[part='dot-b']::before {
|
|
386
386
|
animation-name: dotsBounceBefore-medium;
|
|
387
387
|
top: -0.25rem;
|
|
388
388
|
left: -0.25rem;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
:host([data-render-mode="shadow"]) [part
|
|
392
|
-
[part
|
|
393
|
-
[part
|
|
391
|
+
:host([data-render-mode="shadow"]) [part='spinner']::after,:host([data-render-mode="shadow"])
|
|
392
|
+
[part='dot-a']::after,:host([data-render-mode="shadow"])
|
|
393
|
+
[part='dot-b']::after {
|
|
394
394
|
animation-name: dotsBounceAfter-medium;
|
|
395
395
|
top: -0.25rem;
|
|
396
396
|
right: -0.25rem;
|
package/src/lightning/tab/tab.js
CHANGED
|
@@ -1,28 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api, track } from 'lwc';
|
|
2
2
|
import { normalizeBoolean } from 'lightning/utilsPrivate';
|
|
3
|
-
|
|
3
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
4
4
|
/**
|
|
5
5
|
* A single tab in a tabset component.
|
|
6
6
|
* @slot default Placeholder for your content in lightning-tab.
|
|
7
7
|
*/
|
|
8
|
-
export default class LightningTab extends
|
|
8
|
+
export default class LightningTab extends LightningShadowBaseClass {
|
|
9
9
|
@track _loadContent = false;
|
|
10
|
+
_registered = false;
|
|
10
11
|
|
|
11
12
|
connectedCallback() {
|
|
13
|
+
super.connectedCallback();
|
|
12
14
|
this._connected = true;
|
|
15
|
+
if (this.template.synthetic) {
|
|
16
|
+
this.dispatchEvent(
|
|
17
|
+
new CustomEvent('privatetabregister', {
|
|
18
|
+
cancelable: true,
|
|
19
|
+
bubbles: true,
|
|
20
|
+
composed: true,
|
|
21
|
+
detail: {
|
|
22
|
+
setDeRegistrationCallback: (deRegistrationCallback) => {
|
|
23
|
+
this._deRegistrationCallback =
|
|
24
|
+
deRegistrationCallback;
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
13
31
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
renderedCallback() {
|
|
33
|
+
if (!this._registered && !this.template.synthetic) {
|
|
34
|
+
this._registered = true;
|
|
35
|
+
this.dispatchEvent(
|
|
36
|
+
new CustomEvent('privatetabregister', {
|
|
37
|
+
cancelable: true,
|
|
38
|
+
bubbles: true,
|
|
39
|
+
composed: true,
|
|
40
|
+
detail: {
|
|
41
|
+
setDeRegistrationCallback: (deRegistrationCallback) => {
|
|
42
|
+
this._deRegistrationCallback =
|
|
43
|
+
deRegistrationCallback;
|
|
44
|
+
},
|
|
22
45
|
},
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
}
|
|
26
49
|
}
|
|
27
50
|
|
|
28
51
|
/**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
@supports (--styling-hooks: '') {
|
|
3
|
+
/* Reassignments for parity with SLDS blueprint
|
|
4
|
+
https://www.lightningdesignsystem.com/components/tabs/#Styling-Hooks-Overview */
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
:host([data-render-mode="shadow"].slds-tabs_default__content) {
|
|
8
|
+
--slds-c-tabs-panel-spacing-block-start: var(--slds-c-tab-panel-spacing-block-start);
|
|
9
|
+
--slds-c-tabs-panel-spacing-block-end: var(--slds-c-tab-panel-spacing-block-end);
|
|
10
|
+
--slds-c-tabs-panel-spacing-inline-end: var(--slds-c-tab-panel-spacing-inline-end);
|
|
11
|
+
--slds-c-tabs-panel-spacing-inline-start: var(--slds-c-tab-panel-spacing-inline-start);
|
|
12
|
+
|
|
13
|
+
position: relative;
|
|
14
|
+
padding-block-start: var(--slds-c-tab-panel-spacing-block-start, var(--sds-g-spacing-3, 0.75rem));
|
|
15
|
+
padding-inline-end: var(--slds-c-tab-panel-spacing-inline-end, 0);
|
|
16
|
+
padding-block-end: var(--slds-c-tab-panel-spacing-block-end, var(--sds-g-spacing-3, 0.75rem));
|
|
17
|
+
padding-inline-start: var(--slds-c-tab-panel-spacing-inline-start, 0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([data-render-mode="shadow"].slds-tabs_scoped__content) {
|
|
21
|
+
background-color: var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
22
|
+
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-g-color-border-base-4, var(--sds-g-color-neutral-base-80, #c9c9c9));
|
|
23
|
+
border-block-start: 0;
|
|
24
|
+
border-start-start-radius: 0;
|
|
25
|
+
border-start-end-radius: 0;
|
|
26
|
+
border-end-end-radius: var(--sds-g-spacing-1, 0.25rem);
|
|
27
|
+
border-end-start-radius: var(--sds-g-spacing-1, 0.25rem);
|
|
28
|
+
padding: var(--sds-g-spacing-4, 1rem);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([data-render-mode="shadow"].slds-vertical-tabs__content) {
|
|
32
|
+
flex: 1;
|
|
33
|
+
padding: var(--sds-g-spacing-4, 1rem);
|
|
34
|
+
background: var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* TODO W-12674349: Replace with Visibility Utility Classes when available */
|
|
38
|
+
:host([data-render-mode="shadow"].slds-show) {
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* TODO W-12674349: Replace with Visibility Utility Classes when available */
|
|
43
|
+
:host([data-render-mode="shadow"].slds-hide) {
|
|
44
|
+
display: none !important
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
@@ -7,7 +7,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
7
7
|
|
|
8
8
|
/* Host reassignments to composed tabs for parity with SLDS blueprint
|
|
9
9
|
https://www.lightningdesignsystem.com/components/tabs/#Styling-Hooks-Overview */
|
|
10
|
-
:host([data-render-mode="shadow"]) [part
|
|
10
|
+
:host([data-render-mode="shadow"]) [part='tab-bar'] {
|
|
11
11
|
/* stylelint-disable sds-stylelint-plugin/styling-hooks-pattern */
|
|
12
12
|
--_slds-c-tabbar-standard-font-lineheight: 2.5rem;
|
|
13
13
|
--_slds-c-tabbar-standard-sizing-height: 2.5rem;
|
|
@@ -41,7 +41,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
41
41
|
/* stylelint-enable sds-stylelint-plugin/styling-hooks-pattern */
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
:host([data-render-mode="shadow"][variant='standard']) [part
|
|
44
|
+
:host([data-render-mode="shadow"][variant='standard']) [part='tab-bar'],:host([data-render-mode="shadow"][variant='scoped']) [part='tab-bar'] {
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: flex-start;
|
|
47
47
|
}
|
|
@@ -107,7 +107,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
107
107
|
/* STANDARD TAB BAR STYLING */
|
|
108
108
|
|
|
109
109
|
/* Line under standard tabs */
|
|
110
|
-
:host([data-render-mode="shadow"][variant='standard']) [part
|
|
110
|
+
:host([data-render-mode="shadow"][variant='standard']) [part='tab-bar'] {
|
|
111
111
|
border-block-end-width: var(--slds-c-tabbar-standard-sizing-border, var(--sds-g-sizing-border-1, 1px));
|
|
112
112
|
border-block-end-style: solid;
|
|
113
113
|
border-block-end-color: var(--slds-c-tabbar-standard-color-border, var(--slds-g-color-border-base-4, var(--sds-g-color-neutral-base-90, #e5e5e5)));
|
|
@@ -192,7 +192,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
192
192
|
|
|
193
193
|
/* SCOPED TAB BAR STYLING */
|
|
194
194
|
|
|
195
|
-
:host([data-render-mode="shadow"][variant='scoped']) [part
|
|
195
|
+
:host([data-render-mode="shadow"][variant='scoped']) [part='tab-bar'] {
|
|
196
196
|
background-color: var(--slds-c-tabbar-scoped-color-background, var(--slds-g-color-neutral-base-95, var(--sds-g-color-neutral-base-95, #f3f3f3)));
|
|
197
197
|
-webkit-box-align: start;
|
|
198
198
|
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-c-tabbar-scoped-color-border, var(--slds-g-color-border-base-4, var(--sds-g-color-neutral-base-80, #c9c9c9)));
|
|
@@ -276,7 +276,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
276
276
|
|
|
277
277
|
/* VERTICAL TAB BAR STYLING */
|
|
278
278
|
|
|
279
|
-
:host([data-render-mode="shadow"][variant='vertical']) [part
|
|
279
|
+
:host([data-render-mode="shadow"][variant='vertical']) [part='tab-bar'] {
|
|
280
280
|
background: var(--slds-c-tabbar-vertical-color-background, var(--slds-g-color-neutral-base-95, var(--sds-g-color-neutral-base-95, #f3f3f3)));
|
|
281
281
|
border-inline-end: var(--sds-g-sizing-border-1, 1px) solid var(--slds-c-tabbar-vertical-color-border, var(--slds-g-color-border-base-1, var(--sds-g-color-neutral-base-90, #e5e5e5)));
|
|
282
282
|
/* stylelint-disable sds-stylelint-plugin/styling-hooks-pattern */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* TODO W-12129682: styles are commented out for the future migration of `tabset`
|
|
2
|
+
to Native Shadow
|
|
3
|
+
|
|
4
|
+
:host([data-render-mode="shadow"]) .slds-vertical-tabs {
|
|
5
|
+
display: flex;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
border: 1px solid var(--slds-g-color-border-base-1, #e5e5e5);
|
|
8
|
+
border-radius: 0.25rem;]
|
|
9
|
+
}
|
|
10
|
+
*/
|
|
@@ -23,6 +23,8 @@ export default class LightningTabset extends LightningElement {
|
|
|
23
23
|
|
|
24
24
|
@track _tabHeaders = [];
|
|
25
25
|
|
|
26
|
+
_rerender = false;
|
|
27
|
+
|
|
26
28
|
connectedCallback() {
|
|
27
29
|
this._tabByValue = {};
|
|
28
30
|
this._connected = true;
|
|
@@ -36,6 +38,21 @@ export default class LightningTabset extends LightningElement {
|
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
/**
|
|
42
|
+
* in native shadow, must wait for this entire `tab-set` component to be rendered in order to
|
|
43
|
+
* successfully querySelect `tab-bar` from it, in methods such as _updateTabBarHeaders
|
|
44
|
+
* or _selectTab.
|
|
45
|
+
* using _rerender to trigger renderedCallback and execute these methods in here
|
|
46
|
+
* instead of the handleTabRegister method, where `tab-bar` is not querySelectable.
|
|
47
|
+
*/
|
|
48
|
+
renderedCallback() {
|
|
49
|
+
if (this._rerender && !this.template.synthetic) {
|
|
50
|
+
this._rerender = false;
|
|
51
|
+
this._updateTabBarHeaders(this._tabHeaders);
|
|
52
|
+
this._selectTab(this._activeTabValue);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
39
56
|
disconnectedCallback() {
|
|
40
57
|
this._connected = false;
|
|
41
58
|
}
|
|
@@ -84,7 +101,8 @@ export default class LightningTabset extends LightningElement {
|
|
|
84
101
|
|
|
85
102
|
handleTabRegister(event) {
|
|
86
103
|
event.stopPropagation();
|
|
87
|
-
|
|
104
|
+
// setting this to true, will trigger _updateTabBarHeaders and _selectTab in renderedCallback
|
|
105
|
+
this._rerender = true;
|
|
88
106
|
const tab = event.target;
|
|
89
107
|
|
|
90
108
|
tab.role = 'tabpanel';
|
|
@@ -149,6 +167,11 @@ export default class LightningTabset extends LightningElement {
|
|
|
149
167
|
endIconAlternativeText: tab.endIconAlternativeText,
|
|
150
168
|
showErrorIndicator: tab.showErrorIndicator,
|
|
151
169
|
});
|
|
170
|
+
|
|
171
|
+
// need to leave this _updateTabBarHeaders here so that `tab-bar` can be updated
|
|
172
|
+
// in the case of a "conditional tab". the _updateTabBarHeaders in the renderedCallback
|
|
173
|
+
// has no knowledge of the new tab being added.
|
|
174
|
+
// this call works here in the "conditional tab" case, as `tab-set` is already rendered.
|
|
152
175
|
this._updateTabBarHeaders(this._tabHeaders);
|
|
153
176
|
|
|
154
177
|
this._tabByValue[tabValue] = tab;
|
|
@@ -158,7 +181,7 @@ export default class LightningTabset extends LightningElement {
|
|
|
158
181
|
this._activeTabValue = tab.value;
|
|
159
182
|
}
|
|
160
183
|
|
|
161
|
-
if (this._activeTabValue === tab.value) {
|
|
184
|
+
if (this._activeTabValue === tab.value && this.template.synthetic) {
|
|
162
185
|
this._selectTab(tabValue);
|
|
163
186
|
}
|
|
164
187
|
}
|
|
@@ -242,16 +265,17 @@ export default class LightningTabset extends LightningElement {
|
|
|
242
265
|
* @param {Array} headers
|
|
243
266
|
*/
|
|
244
267
|
_updateTabBarHeaders(headers) {
|
|
245
|
-
this.template.querySelector('lightning-tab-bar')
|
|
246
|
-
|
|
268
|
+
if (this.template.querySelector('lightning-tab-bar')) {
|
|
269
|
+
this.template.querySelector('lightning-tab-bar').tabHeaders =
|
|
270
|
+
headers.slice();
|
|
271
|
+
}
|
|
247
272
|
}
|
|
248
273
|
|
|
249
274
|
_selectTabHeaderByTabValue(value) {
|
|
250
|
-
|
|
275
|
+
const tabBar = this.template.querySelector('lightning-tab-bar');
|
|
276
|
+
if (!this._connected || !tabBar) {
|
|
251
277
|
return;
|
|
252
278
|
}
|
|
253
|
-
|
|
254
|
-
const tabBar = this.template.querySelector('lightning-tab-bar');
|
|
255
279
|
tabBar.selectTabByValue(value);
|
|
256
280
|
}
|
|
257
281
|
|
|
@@ -278,4 +278,12 @@
|
|
|
278
278
|
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
279
|
align-items: flex-end;
|
|
280
280
|
}
|
|
281
|
+
|
|
282
|
+
/* --------------------------------------- */
|
|
283
|
+
|
|
284
|
+
/* FORM ELEMENT: HIDDEN */
|
|
285
|
+
|
|
286
|
+
:host([data-render-mode="shadow"][variant~='label-hidden']) .slds-form-element__label {
|
|
287
|
+
display: none
|
|
288
|
+
}
|
|
281
289
|
}
|
|
@@ -484,14 +484,20 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
484
484
|
justify-content: center;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Represents inner spacing around icon for icon-position="left", when present
|
|
489
|
+
*/
|
|
487
490
|
:host([data-render-mode="shadow"]) [part~='start'] {
|
|
488
491
|
display: inline-flex;
|
|
489
|
-
padding-inline-end:
|
|
492
|
+
padding-inline-end: 0;
|
|
490
493
|
}
|
|
491
494
|
|
|
495
|
+
/**
|
|
496
|
+
* Represents inner spacing around icon for icon-position="right", when present
|
|
497
|
+
*/
|
|
492
498
|
:host([data-render-mode="shadow"]) [part~='end'] {
|
|
493
499
|
display: inline-flex;
|
|
494
|
-
padding-inline-start:
|
|
500
|
+
padding-inline-start: 0;
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
503
|
|
|
@@ -883,7 +889,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
883
889
|
/**
|
|
884
890
|
* End part
|
|
885
891
|
*/
|
|
886
|
-
:host([data-render-mode="shadow"]) [part
|
|
892
|
+
:host([data-render-mode="shadow"]) [part='end'] {
|
|
887
893
|
padding-inline-start: var(--slds-c-buttonicon-end-spacing-inline-start, 0);
|
|
888
894
|
}
|
|
889
895
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
:host([data-render-mode="shadow"]) [part
|
|
87
|
+
:host([data-render-mode="shadow"]) [part='boundary'] {
|
|
88
88
|
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
89
89
|
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
90
90
|
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
display: inline-flex;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
:host([data-render-mode="shadow"]) [part
|
|
117
|
+
:host([data-render-mode="shadow"]) [part='icon'] {
|
|
118
118
|
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
119
119
|
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
120
120
|
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
|
|
200
200
|
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
201
201
|
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
position: absolute;
|
|
204
204
|
top: 50%;
|
|
205
205
|
margin-block-start: -0.4375rem;
|