lightning-base-components 1.18.5-alpha → 1.18.7-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/metadata/raptor.json +5 -0
- package/package.json +10 -58
- package/scopedImports/@salesforce-label-LightningPill.delete.js +1 -1
- package/scopedImports/@salesforce-label-LightningPill.deleteAndNavigate.js +1 -1
- package/scopedImports/@salesforce-label-LightningPill.remove.js +1 -1
- package/scopedImports/@salesforce-label-LightningRecordPicker.dataSourceErrorMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.invalidConfigurationErrorMessage.js +1 -0
- package/src/lightning/accordion/accordion.css +2 -2
- package/src/lightning/accordion/accordion.js +2 -4
- package/src/lightning/accordionSection/accordionSection.css +2 -2
- package/src/lightning/accordionSection/accordionSection.js +2 -4
- package/src/lightning/avatar/avatar.css +2 -2
- package/src/lightning/avatar/avatar.js +2 -3
- package/src/lightning/baseCombobox/baseCombobox.css +2 -2
- package/src/lightning/baseCombobox/baseCombobox.js +37 -85
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +2 -4
- package/src/lightning/baseComboboxItem/inline.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.css +2 -2
- package/src/lightning/breadcrumb/breadcrumb.js +2 -4
- package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
- package/src/lightning/breadcrumbs/breadcrumbs.js +2 -3
- package/src/lightning/button/button.css +2 -2
- package/src/lightning/button/button.js +3 -2
- package/src/lightning/buttonGroup/buttonGroup.css +2 -2
- package/src/lightning/buttonGroup/buttonGroup.js +2 -3
- package/src/lightning/buttonIcon/buttonIcon.css +2 -2
- package/src/lightning/buttonIcon/buttonIcon.js +0 -1
- package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.css +2 -2
- package/src/lightning/buttonMenu/buttonMenu.js +2 -4
- package/src/lightning/buttonStateful/buttonStateful.css +2 -2
- package/src/lightning/buttonStateful/buttonStateful.js +2 -3
- package/src/lightning/calendar/calendar.css +2 -2
- package/src/lightning/calendar/calendar.js +2 -4
- package/src/lightning/card/card.css +2 -2
- package/src/lightning/card/card.js +2 -3
- package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +2 -3
- package/src/lightning/colorPickerPanel/colorPickerPanel.css +2 -2
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +2 -4
- package/src/lightning/combobox/combobox.css +2 -2
- package/src/lightning/combobox/combobox.js +2 -4
- package/src/lightning/datepicker/datepicker.css +2 -2
- package/src/lightning/datepicker/datepicker.js +2 -4
- package/src/lightning/datetimepicker/datetimepicker.css +2 -2
- package/src/lightning/datetimepicker/datetimepicker.js +2 -4
- package/src/lightning/dualListbox/dualListbox.css +2 -2
- package/src/lightning/dualListbox/dualListbox.js +2 -4
- package/src/lightning/dynamicIcon/dynamicIcon.js +2 -3
- package/src/lightning/dynamicIcon/ellie.css +1 -1
- package/src/lightning/dynamicIcon/eq.css +1 -1
- package/src/lightning/dynamicIcon/score.css +1 -1
- package/src/lightning/dynamicIcon/strength.css +1 -1
- package/src/lightning/dynamicIcon/trend.css +1 -1
- package/src/lightning/dynamicIcon/waffle.css +1 -1
- package/src/lightning/f6Controller/f6Controller.js +49 -3
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +1 -1
- package/src/lightning/formattedRichText/formattedRichText.css +2 -1
- package/src/lightning/formattedRichText/formattedRichText.html +1 -1
- package/src/lightning/formattedRichText/formattedRichText.js +3 -4
- package/src/lightning/formattedText/formattedText.css +1 -1
- package/src/lightning/formattedText/formattedText.js +2 -3
- package/src/lightning/helptext/helptext.css +2 -2
- package/src/lightning/helptext/helptext.js +2 -3
- package/src/lightning/icon/icon.css +2 -2
- package/src/lightning/icon/icon.js +3 -10
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +1 -2
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
- package/src/lightning/input/__examples__/number/number.html +5 -0
- package/src/lightning/input/input.css +4 -2
- package/src/lightning/input/input.html +239 -149
- package/src/lightning/input/input.js +532 -209
- package/src/lightning/{inputUtils/number.js → input/numberUtil.js} +1 -1
- package/src/lightning/inputUtils/inputUtils.js +20 -15
- package/src/lightning/inputUtils/normalize.js +0 -7
- package/src/lightning/layout/layout.css +2 -2
- package/src/lightning/layout/layout.js +2 -4
- package/src/lightning/layoutItem/layoutItem.css +2 -2
- package/src/lightning/layoutItem/layoutItem.js +2 -4
- package/src/lightning/menuDivider/menuDivider.css +2 -2
- package/src/lightning/menuDivider/menuDivider.js +2 -4
- package/src/lightning/menuItem/menuItem.css +2 -2
- package/src/lightning/menuItem/menuItem.js +2 -4
- package/src/lightning/menuSubheader/menuSubheader.css +2 -2
- package/src/lightning/menuSubheader/menuSubheader.js +2 -4
- package/src/lightning/pill/link.css +2 -2
- package/src/lightning/pill/link.html +8 -7
- package/src/lightning/pill/pill.js +9 -6
- package/src/lightning/pill/plain.css +2 -2
- package/src/lightning/pill/plain.html +2 -2
- package/src/lightning/pill/plainLink.css +2 -2
- package/src/lightning/pill/plainLink.html +6 -6
- package/src/lightning/pillContainer/barePillContainer.css +2 -2
- package/src/lightning/pillContainer/pillContainer.js +2 -4
- package/src/lightning/pillContainer/standardPillContainer.css +2 -2
- package/src/lightning/popup/popup.css +2 -2
- package/src/lightning/popup/popup.js +2 -3
- package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
- package/src/lightning/primitiveBubble/primitiveBubble.js +2 -4
- package/src/lightning/primitiveButton/primitiveButton.js +10 -11
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +2 -3
- package/src/lightning/primitiveIcon/primitiveIcon.css +2 -2
- package/src/lightning/primitiveIcon/primitiveIcon.js +2 -3
- package/src/lightning/radioGroup/radioGroup.css +3 -2
- package/src/lightning/radioGroup/radioGroup.js +2 -4
- package/src/lightning/routingService/routingService.js +2 -1
- package/src/lightning/select/select.css +2 -2
- package/src/lightning/select/select.js +2 -4
- package/src/lightning/select/select.js-meta.xml +2 -0
- package/src/lightning/sldsCommon/sldsCommon.css +14 -6
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +4 -4
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +50 -19
- package/src/lightning/spinner/spinner.css +2 -2
- package/src/lightning/spinner/spinner.js +2 -4
- package/src/lightning/tab/tab.js +14 -22
- package/src/lightning/tabBar/tabBar.css +2 -2
- package/src/lightning/tabBar/tabBar.js +2 -4
- package/src/lightning/tabset/tabset.js +10 -28
- package/src/lightning/timepicker/timepicker.css +2 -2
- package/src/lightning/timepicker/timepicker.js +2 -4
- package/src/lightning/toast/__docs__/toast.md +2 -2
- package/src/lightning/{primitiveInputFile/button.slds.css → toast/button-icon.slds.css} +382 -0
- package/src/lightning/toast/formatted-rich-text.slds.css +230 -0
- package/src/lightning/toast/icon.slds.css +209 -0
- package/src/lightning/toast/toast.css +22 -6
- package/src/lightning/toast/toast.html +1 -1
- package/src/lightning/toast/toast.js +5 -5
- package/src/lightning/toast/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toastContainer.css +17 -6
- package/src/lightning/toastContainer/toastContainer.js +4 -0
- package/src/lightning/utilsPrivate/url.js +4 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +8 -4
- package/src/lightning/verticalNavigation/verticalNavigation.css +3 -2
- package/src/lightning/verticalNavigation/verticalNavigation.js +2 -3
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +3 -2
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +2 -3
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +0 -6
- package/src/lightning/inputUtils/utils.js +0 -18
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.css +0 -3
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +0 -48
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +0 -139
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +0 -126
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.css +0 -6
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +0 -24
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +0 -176
- package/src/lightning/primitiveInputColor/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputColor/input-color.slds.css +0 -35
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +0 -4
- package/src/lightning/primitiveInputColor/primitiveInputColor.html +0 -50
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +0 -184
- package/src/lightning/primitiveInputFile/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputFile/input-file.slds.css +0 -62
- package/src/lightning/primitiveInputFile/primitiveInputFile.css +0 -5
- package/src/lightning/primitiveInputFile/primitiveInputFile.html +0 -45
- package/src/lightning/primitiveInputFile/primitiveInputFile.js +0 -111
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +0 -24
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.js +0 -103
- package/src/lightning/primitiveInputSimple/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputSimple/input-text.slds.css +0 -398
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.css +0 -9
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +0 -65
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +0 -585
- package/src/lightning/primitiveInputToggle/form-element.slds.css +0 -281
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +0 -170
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.css +0 -3
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +0 -34
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +0 -164
- package/src/lightning/tab/tab.css +0 -2
- package/src/lightning/tab/tab.slds.css +0 -47
- package/src/lightning/tabset/tabset.css +0 -10
- /package/src/lightning/{inputUtils/email.js → input/emailUtil.js} +0 -0
- /package/src/lightning/{primitiveInputCheckbox → input}/input-checkbox.slds.css +0 -0
- /package/src/lightning/{primitiveInputColor → input}/input-text.slds.css +0 -0
- /package/src/lightning/{primitiveInputSimple → input}/normalize.js +0 -0
- /package/src/lightning/{primitiveInputSimple → input}/selection.js +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
2
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
3
|
+
|
|
4
|
+
:host([data-render-mode="shadow"]) {
|
|
5
|
+
/**
|
|
6
|
+
* Establish independent formatting context, we don't want ancestor rules affecting our layout.
|
|
7
|
+
* This assumes there will not be a direct, child inline-level element.
|
|
8
|
+
* See https://www.w3.org/TR/css-display-3/#establish-an-independent-formatting-context
|
|
9
|
+
*/
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([data-render-mode="shadow"]) [part~='boundary'] {
|
|
14
|
+
padding-block-start: var(--sds-c-icon-spacing-block-start, var(--sds-c-icon-spacing));
|
|
15
|
+
padding-block-end: var(--sds-c-icon-spacing-block-end, var(--sds-c-icon-spacing));
|
|
16
|
+
padding-inline-start: var(--sds-c-icon-spacing-inline-start, var(--sds-c-icon-spacing));
|
|
17
|
+
padding-inline-end: var(--sds-c-icon-spacing-inline-end, var(--sds-c-icon-spacing));
|
|
18
|
+
border-radius: var(--sds-c-icon-radius-border);
|
|
19
|
+
border-width: var(--sds-c-icon-sizing-border, 1px);
|
|
20
|
+
border-style: solid;
|
|
21
|
+
border-color: var(--sds-c-icon-color-border, transparent);
|
|
22
|
+
background-color: var(--sds-c-icon-color-background);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([data-render-mode="shadow"]) [part~='icon'] {
|
|
26
|
+
display: flex; /* See line #5 */
|
|
27
|
+
height: var(--sds-c-icon-sizing-height, var(--sds-c-icon-sizing));
|
|
28
|
+
width: var(--sds-c-icon-sizing-width, var(--sds-c-icon-sizing));
|
|
29
|
+
color: var(--sds-c-icon-color-foreground);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Normalize svgs and control width/height with Styling Hooks
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
:host([data-render-mode="shadow"]) svg {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @Note: Static fallbacks are in place until SLDS adopts SDS. Without static
|
|
43
|
+
* fallbacks, styles will regress due to invalid CSS variables from
|
|
44
|
+
* missing SLDS shared and globals.
|
|
45
|
+
*
|
|
46
|
+
* Additionally, LBC are currently relying on 'part' attributes to
|
|
47
|
+
* receive styling. Authoring styles that rely on slots is not recommended.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
@supports (--styling-hooks: '') {
|
|
51
|
+
:host([data-render-mode="shadow"][size~='xxx-small']) {
|
|
52
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-3, 0.5rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([data-render-mode="shadow"][size~='xx-small']) {
|
|
56
|
+
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([data-render-mode="shadow"][size~='x-small']) {
|
|
60
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-5, 1rem);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([data-render-mode="shadow"][size~='small']) {
|
|
64
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-7, 1.5rem);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host([data-render-mode="shadow"][size~='large']) {
|
|
68
|
+
--slds-c-icon-sizing: var(--sds-g-sizing-10, 3rem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([data-render-mode="shadow"][variant~='warning']) {
|
|
72
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-warning-base-70, #fe9339);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([data-render-mode="shadow"][variant~='success']) {
|
|
76
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-success-base-50, #2e844a);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([data-render-mode="shadow"][variant~='error']) {
|
|
80
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-error-base-50, #ea001e);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([data-render-mode="shadow"][variant~='light']) {
|
|
84
|
+
--slds-c-icon-color-foreground: var(--sds-g-color-neutral-base-70, #aeaeae);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([data-render-mode="shadow"]) [part~='boundary'] {
|
|
88
|
+
/* --sds-c-icon-color-background: var(--slds-c-icon-color-background); */
|
|
89
|
+
--sds-c-icon-radius-border: var(--slds-c-icon-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
90
|
+
--sds-c-icon-sizing-border: var(--slds-c-icon-sizing-border);
|
|
91
|
+
--sds-c-icon-color-border: var(--slds-c-icon-color-border);
|
|
92
|
+
--sds-c-icon-spacing-block-start: var(
|
|
93
|
+
--slds-c-icon-spacing-block-start,
|
|
94
|
+
var(--slds-c-icon-spacing-block)
|
|
95
|
+
);
|
|
96
|
+
--sds-c-icon-spacing-block-end: var(--slds-c-icon-spacing-block-end, var(--slds-c-icon-spacing-block));
|
|
97
|
+
--sds-c-icon-spacing-inline-start: var(
|
|
98
|
+
--slds-c-icon-spacing-inline-start,
|
|
99
|
+
var(--slds-c-icon-spacing-inline)
|
|
100
|
+
);
|
|
101
|
+
--sds-c-icon-spacing-inline-end: var(--slds-c-icon-spacing-inline-end, var(--slds-c-icon-spacing-inline));
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* There's a divergence in LBC that we have to support here: LBC splits their
|
|
105
|
+
* icon implementation into two components: lightning-icon and lightning-primitive-icon.
|
|
106
|
+
* slds-icon is consumed within both with no issues except that the presence of an
|
|
107
|
+
* additional custom element (primitive-icon) creates an unexpected inline-level
|
|
108
|
+
* element and breaks our formatting context. tl;dr, we have to reset the formatting
|
|
109
|
+
* context of the boundary or else we'll inherit line-height from an ancestor and
|
|
110
|
+
* get visual regressions.
|
|
111
|
+
*
|
|
112
|
+
* If lightning-icon is refactored into a single component, this line can be removed.
|
|
113
|
+
*/
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([data-render-mode="shadow"]) [part~='icon'] {
|
|
118
|
+
--sds-c-icon-color-foreground: var(--slds-c-icon-color-foreground, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
119
|
+
--sds-c-icon-sizing-height: var(--slds-c-icon-sizing-height, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
120
|
+
--sds-c-icon-sizing-width: var(--slds-c-icon-sizing-width, var(--slds-c-icon-sizing, var(--sds-g-sizing-9, 2rem)));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host([data-render-mode="shadow"][icon-name*='action']) {
|
|
124
|
+
--slds-c-icon-spacing-block: var(--sds-g-sizing-3, 0.5rem);
|
|
125
|
+
--slds-c-icon-spacing-inline: var(--sds-g-sizing-3, 0.5rem);
|
|
126
|
+
--slds-c-icon-radius-border: calc(var(--sds-g-radius-border-circle, 100%) / 2);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* P R I V A T E
|
|
132
|
+
*
|
|
133
|
+
* The following styling is implemented by classes within the shadow DOM.
|
|
134
|
+
* They're expected to be private to the component and not for external use.
|
|
135
|
+
*
|
|
136
|
+
* See notes for each class for the rationale behind their inclusion.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Utility icons traditionally added a class to change the default foreground
|
|
141
|
+
* color (white) to a grey. This was done implicitly whereas other color changes
|
|
142
|
+
* were done explicitly through the 'variant' attribute. So this is an outlier
|
|
143
|
+
* to the overall pattern. Leaving it as-is since an update would require an
|
|
144
|
+
* API change or more investigating.
|
|
145
|
+
*
|
|
146
|
+
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
147
|
+
* outcome is the removal of this class and the default utility styling would
|
|
148
|
+
* be implemented through an attribute or some other class-less solution.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
:host([data-render-mode="shadow"]) .slds-icon-text-default {
|
|
152
|
+
/*! @css-var-fallback fill */
|
|
153
|
+
--slds-c-icon-color-foreground: var(
|
|
154
|
+
--slds-c-icon-color-foreground-default,
|
|
155
|
+
var(--sds-c-icon-color-foreground-default, var(
|
|
156
|
+
--sds-g-color-neutral-base-50, #747474))
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host([data-render-mode="shadow"]) .slds-icon-text-default.slds-is-disabled {
|
|
161
|
+
fill: var(--sds-g-color-neutral-base-80, #c9c9c9);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
166
|
+
*
|
|
167
|
+
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
168
|
+
* outcome is the removal of this class and replacing the class with the SLDS
|
|
169
|
+
* utility package solution.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
173
|
+
position: absolute !important;
|
|
174
|
+
margin: -1px !important;
|
|
175
|
+
border: 0 !important;
|
|
176
|
+
padding: 0 !important;
|
|
177
|
+
width: 1px !important;
|
|
178
|
+
height: 1px !important;
|
|
179
|
+
overflow: hidden !important;
|
|
180
|
+
clip: rect(0 0 0 0) !important;
|
|
181
|
+
text-transform: none !important;
|
|
182
|
+
white-space: nowrap !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* For the initial alpha version, we're hardcoding in the various unique icon styles.
|
|
187
|
+
*
|
|
188
|
+
* Next version, we want to dynamically generate these from legacy SLDS with the
|
|
189
|
+
* following design pattern:
|
|
190
|
+
*
|
|
191
|
+
* [type="action"][icon-name="approval"] {
|
|
192
|
+
* --sds-c-icon-color-background: var(--slds-c-icon-color-background, #111);
|
|
193
|
+
* }
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
:host([data-render-mode="shadow"]) .slds-icon_disabled {
|
|
197
|
+
background-color: currentColor;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host([data-render-mode="shadow"]) .slds-input__icon {
|
|
201
|
+
--slds-c-icon-sizing: calc(var(--sds-g-sizing-1, 0.125rem) + var(--sds-g-sizing-4, 0.75rem));
|
|
202
|
+
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 50%;
|
|
205
|
+
margin-block-start: -0.4375rem;
|
|
206
|
+
line-height: var(--sds-g-font-lineheight-1, 1);
|
|
207
|
+
border: 0;
|
|
208
|
+
z-index: 2;
|
|
209
|
+
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './toast.slds.css';
|
|
3
|
+
@import './icon.slds.css';
|
|
4
|
+
@import './button-icon.slds.css';
|
|
5
|
+
@import './formatted-rich-text.slds.css';
|
|
6
|
+
@import 'lightning/sldsUtilsThemes';
|
|
7
|
+
@import 'lightning/sldsUtilsMargin';
|
|
8
|
+
@import 'lightning/sldsUtilsPosition';
|
|
9
|
+
@import 'lightning/sldsUtilsGrid'; */
|
|
10
|
+
|
|
11
|
+
.fix-notify_toast_animation,
|
|
12
|
+
:host([data-render-mode="shadow"]) .fix-notify_toast_animation {
|
|
2
13
|
animation-name: fadeIn;
|
|
3
14
|
animation-duration: 0.4s;
|
|
4
15
|
}
|
|
@@ -13,7 +24,8 @@
|
|
|
13
24
|
}
|
|
14
25
|
}
|
|
15
26
|
|
|
16
|
-
.fix-notify_toast_animation.closing
|
|
27
|
+
.fix-notify_toast_animation.closing,
|
|
28
|
+
:host([data-render-mode="shadow"]) .fix-notify_toast_animation.closing {
|
|
17
29
|
animation-name: fadeOut;
|
|
18
30
|
animation-duration: 0.4s;
|
|
19
31
|
}
|
|
@@ -29,24 +41,28 @@
|
|
|
29
41
|
}
|
|
30
42
|
|
|
31
43
|
/* TODO: change the following classes to the actual SLDS classes once W-12084169 is completed. */
|
|
32
|
-
.fix-slds-notify--mobile
|
|
44
|
+
.fix-slds-notify--mobile,
|
|
45
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile {
|
|
33
46
|
padding: 0.5rem 1rem 0.75rem;
|
|
34
47
|
min-width: 90%;
|
|
35
48
|
width: 90%;
|
|
36
49
|
}
|
|
37
50
|
|
|
38
|
-
.fix-slds-notify--mobile.slds-notify_toast h2
|
|
51
|
+
.fix-slds-notify--mobile.slds-notify_toast h2,
|
|
52
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile.slds-notify_toast h2 {
|
|
39
53
|
font-size: 0.8125rem;
|
|
40
54
|
font-weight: 300;
|
|
41
55
|
}
|
|
42
56
|
|
|
43
57
|
/* for screen smaller than 480px */
|
|
44
|
-
.fix-slds-notify--mobile .slds-notify__close
|
|
58
|
+
.fix-slds-notify--mobile .slds-notify__close,
|
|
59
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile .slds-notify__close {
|
|
45
60
|
top: 0.5rem;
|
|
46
61
|
}
|
|
47
62
|
|
|
48
63
|
/* for mobile device */
|
|
49
|
-
.fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close
|
|
64
|
+
.fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close,
|
|
65
|
+
:host([data-render-mode="shadow"]) .fix-slds-notify--mobile .slds-notify__close.fix-slds-notify--mobile__close {
|
|
50
66
|
top: -0.25rem;
|
|
51
67
|
right: -0.15rem;
|
|
52
68
|
}
|
|
@@ -25,7 +25,7 @@ import iconErrorAltText from '@salesforce/label/LightningToast.errorLabel';
|
|
|
25
25
|
import macNavigationAssistiveText from '@salesforce/label/LightningToast.macNavigationAssistiveText';
|
|
26
26
|
import genericNavigationAssistiveText from '@salesforce/label/LightningToast.genericNavigationAssistiveText';
|
|
27
27
|
|
|
28
|
-
import {
|
|
28
|
+
import { getCurrentRegionAttributeName } from 'lightning/f6Controller';
|
|
29
29
|
|
|
30
30
|
const MODE_DISMISSIBLE = 'dismissible';
|
|
31
31
|
const MODE_STICKY = 'sticky';
|
|
@@ -563,10 +563,10 @@ export default class Toast extends LightningElement {
|
|
|
563
563
|
}, duration);
|
|
564
564
|
}
|
|
565
565
|
// add the data-f6-region attribute to the toast div
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
''
|
|
569
|
-
|
|
566
|
+
const regionAttributeName = getCurrentRegionAttributeName();
|
|
567
|
+
if (regionAttributeName) {
|
|
568
|
+
this.toastElement.setAttribute(regionAttributeName, '');
|
|
569
|
+
}
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
background: none;
|
|
7
|
+
background-color: var(--slds-c-toast-color-background, var(--sds-g-color-neutral-base-50, #747474));
|
|
8
|
+
color: var(--slds-c-toast-text-color, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
9
|
+
border-radius: var(--slds-c-toast-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
10
|
+
margin: var(--sds-g-spacing-2, 0.5rem);
|
|
11
|
+
padding-block-start: var(--slds-c-toast-spacing-block-start, var(--sds-g-spacing-3, 0.75rem));
|
|
12
|
+
padding-inline-end: var(--slds-c-toast-spacing-inline-end, var(--sds-g-spacing-8, 3rem));
|
|
13
|
+
padding-block-end: var(--slds-c-toast-spacing-block-end, var(--sds-g-spacing-3, 0.75rem));
|
|
14
|
+
padding-inline-start: var(--slds-c-toast-spacing-inline-start, var(--sds-g-spacing-5, 1.5rem));
|
|
15
|
+
min-width: var(--slds-c-toast-sizing-min-width, var(--sds-g-sizing-16, 30rem));
|
|
16
|
+
text-align: left;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a {
|
|
21
|
+
color: currentColor;
|
|
22
|
+
border: var(--sds-g-sizing-border-1, 1px) solid transparent;
|
|
23
|
+
border-radius: var(--sds-g-radius-border-2, 0.25rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:hover,:host([data-render-mode="shadow"])
|
|
27
|
+
.slds-notify_toast a:focus {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
outline: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:focus {
|
|
33
|
+
box-shadow: 0 0 3px var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
34
|
+
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:active {
|
|
38
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgba(255, 255, 255, 0.5));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a[disabled] {
|
|
42
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgba(255, 255, 255, 0.15));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast .slds-notify__close {
|
|
46
|
+
float: right;
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: var(--sds-g-spacing-3, 0.75rem);
|
|
49
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
50
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
51
|
+
transform: translateY(-0.125rem);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([data-render-mode="shadow"]) .slds-region_narrow .slds-notify_toast {
|
|
55
|
+
min-width: auto;
|
|
56
|
+
width: 100%;
|
|
57
|
+
margin-inline-start: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* TODO W-12674349: remove after name-value-list utils are added */
|
|
61
|
+
|
|
62
|
+
:host([data-render-mode="shadow"]) .slds-list--inline {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* TODO W-12674349: remove after assistive text util is added */
|
|
68
|
+
|
|
69
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
70
|
+
position: absolute !important;
|
|
71
|
+
margin: -1px !important;
|
|
72
|
+
border: 0 !important;
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
width: 1px !important;
|
|
75
|
+
height: 1px !important;
|
|
76
|
+
overflow: hidden !important;
|
|
77
|
+
clip: rect(0 0 0 0) !important;
|
|
78
|
+
text-transform: none !important;
|
|
79
|
+
white-space: nowrap !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* TODO W-12674349: remove after text utils are added */
|
|
83
|
+
|
|
84
|
+
:host([data-render-mode="shadow"]) .slds-text-heading_small {
|
|
85
|
+
font-size: var(--sds-g-font-size-base, 1rem);
|
|
86
|
+
line-height: var(--sds-g-font-lineheight-2, 1.25);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* TODO W-12674349: remove after alert is added */
|
|
90
|
+
|
|
91
|
+
:host([data-render-mode="shadow"]) .slds-notify__close {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 50%;
|
|
94
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
95
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
96
|
+
transform: translateY(-50%);
|
|
97
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
background: none;
|
|
7
|
+
background-color: var(--slds-c-toast-color-background, var(--sds-g-color-neutral-base-50, #747474));
|
|
8
|
+
color: var(--slds-c-toast-text-color, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
9
|
+
border-radius: var(--slds-c-toast-radius-border, var(--sds-g-radius-border-2, 0.25rem));
|
|
10
|
+
margin: var(--sds-g-spacing-2, 0.5rem);
|
|
11
|
+
padding-block-start: var(--slds-c-toast-spacing-block-start, var(--sds-g-spacing-3, 0.75rem));
|
|
12
|
+
padding-inline-end: var(--slds-c-toast-spacing-inline-end, var(--sds-g-spacing-8, 3rem));
|
|
13
|
+
padding-block-end: var(--slds-c-toast-spacing-block-end, var(--sds-g-spacing-3, 0.75rem));
|
|
14
|
+
padding-inline-start: var(--slds-c-toast-spacing-inline-start, var(--sds-g-spacing-5, 1.5rem));
|
|
15
|
+
min-width: var(--slds-c-toast-sizing-min-width, var(--sds-g-sizing-16, 30rem));
|
|
16
|
+
text-align: left;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a {
|
|
21
|
+
color: currentColor;
|
|
22
|
+
border: var(--sds-g-sizing-border-1, 1px) solid transparent;
|
|
23
|
+
border-radius: var(--sds-g-radius-border-2, 0.25rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:hover,:host([data-render-mode="shadow"])
|
|
27
|
+
.slds-notify_toast a:focus {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
outline: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:focus {
|
|
33
|
+
box-shadow: 0 0 3px var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
34
|
+
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-g-color-neutral-base-100, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a:active {
|
|
38
|
+
color: var(--slds-g-color-neutral-100-opacity-50, rgba(255, 255, 255, 0.5));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast a[disabled] {
|
|
42
|
+
color: var(--slds-g-color-neutral-100-opacity-10, rgba(255, 255, 255, 0.15));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([data-render-mode="shadow"]) .slds-notify_toast .slds-notify__close {
|
|
46
|
+
float: right;
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: var(--sds-g-spacing-3, 0.75rem);
|
|
49
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
50
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
51
|
+
transform: translateY(-0.125rem);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([data-render-mode="shadow"]) .slds-region_narrow .slds-notify_toast {
|
|
55
|
+
min-width: auto;
|
|
56
|
+
width: 100%;
|
|
57
|
+
margin-inline-start: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* TODO W-12674349: remove after name-value-list utils are added */
|
|
61
|
+
|
|
62
|
+
:host([data-render-mode="shadow"]) .slds-list--inline {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* TODO W-12674349: remove after assistive text util is added */
|
|
68
|
+
|
|
69
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
70
|
+
position: absolute !important;
|
|
71
|
+
margin: -1px !important;
|
|
72
|
+
border: 0 !important;
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
width: 1px !important;
|
|
75
|
+
height: 1px !important;
|
|
76
|
+
overflow: hidden !important;
|
|
77
|
+
clip: rect(0 0 0 0) !important;
|
|
78
|
+
text-transform: none !important;
|
|
79
|
+
white-space: nowrap !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* TODO W-12674349: remove after text utils are added */
|
|
83
|
+
|
|
84
|
+
:host([data-render-mode="shadow"]) .slds-text-heading_small {
|
|
85
|
+
font-size: var(--sds-g-font-size-base, 1rem);
|
|
86
|
+
line-height: var(--sds-g-font-lineheight-2, 1.25);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* TODO W-12674349: remove after alert is added */
|
|
90
|
+
|
|
91
|
+
:host([data-render-mode="shadow"]) .slds-notify__close {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 50%;
|
|
94
|
+
right: var(--sds-g-spacing-3, 0.75rem);
|
|
95
|
+
margin-inline-start: var(--sds-g-spacing-1, 0.25rem);
|
|
96
|
+
transform: translateY(-50%);
|
|
97
|
+
}
|
|
@@ -1,30 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
/* @import 'lightning/sldsCommon';
|
|
2
|
+
@import './toast.slds.css';
|
|
3
|
+
@import 'lightning/sldsUtilsPosition';
|
|
4
|
+
@import 'lightning/sldsUtilsGrid'; */
|
|
5
|
+
|
|
6
|
+
.top,
|
|
7
|
+
:host([data-render-mode="shadow"]) .top {
|
|
2
8
|
top: 0;
|
|
3
9
|
bottom: unset;
|
|
4
10
|
}
|
|
5
11
|
|
|
6
|
-
.bottom
|
|
12
|
+
.bottom,
|
|
13
|
+
:host([data-render-mode="shadow"]) .bottom {
|
|
7
14
|
bottom: 0;
|
|
8
15
|
top: unset;
|
|
9
16
|
}
|
|
10
17
|
|
|
11
|
-
.left
|
|
18
|
+
.left,
|
|
19
|
+
:host([data-render-mode="shadow"]) .left {
|
|
12
20
|
left: 0;
|
|
13
21
|
right: auto;
|
|
14
22
|
}
|
|
15
23
|
|
|
16
|
-
.right
|
|
24
|
+
.right,
|
|
25
|
+
:host([data-render-mode="shadow"]) .right {
|
|
17
26
|
left: auto;
|
|
18
27
|
right: 0;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
|
-
.center
|
|
30
|
+
.center,
|
|
31
|
+
:host([data-render-mode="shadow"]) .center {
|
|
22
32
|
transform: translate(50%);
|
|
23
33
|
right: 50%;
|
|
24
34
|
}
|
|
25
35
|
|
|
26
36
|
@media (max-width: 30rem) {
|
|
27
|
-
.center
|
|
37
|
+
.center,
|
|
38
|
+
:host([data-render-mode="shadow"]) .center {
|
|
28
39
|
transform: none;
|
|
29
40
|
right: 0;
|
|
30
41
|
left: 0;
|
|
@@ -172,6 +172,10 @@ export default class ToastContainer extends LightningOverlay {
|
|
|
172
172
|
|
|
173
173
|
// private functions
|
|
174
174
|
connectedCallback() {
|
|
175
|
+
// Set `data-render-mode` attribute in native shadow mode
|
|
176
|
+
if (!this.template.synthetic) {
|
|
177
|
+
this.setAttribute('data-render-mode', 'shadow');
|
|
178
|
+
}
|
|
175
179
|
if (globalContainer.length < MAX_NUM_GLOBAL_TOAST_CONTAINER) {
|
|
176
180
|
this._showToastHandler = this.handleShowToast.bind(this);
|
|
177
181
|
document.body.addEventListener(
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { isCSR } from './ssr';
|
|
2
|
+
|
|
1
3
|
const URL_CHECK_REGEX = /^(\/+|\.+|ftp|http(s?):\/\/)/i;
|
|
4
|
+
const SSR_PROTOCOL = 'https:'; // For LWR (SSR), the protocol will always be HTTPS. See TD-0141280.
|
|
2
5
|
|
|
3
6
|
export function isAbsoluteUrl(url) {
|
|
4
7
|
return URL_CHECK_REGEX.test(url);
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
export function makeAbsoluteUrl(url) {
|
|
8
|
-
const protocol = window.location.protocol;
|
|
11
|
+
const protocol = isCSR ? window.location.protocol : SSR_PROTOCOL;
|
|
9
12
|
return isAbsoluteUrl(url) ? url : `${protocol}//${url}`;
|
|
10
13
|
}
|
|
11
14
|
|
|
@@ -162,10 +162,14 @@ const DEFAULT_ZINDEX_BASELINE = DEFAULT_MODAL_ZINDEX + DEFAULT_ZINDEX_OFFSET;
|
|
|
162
162
|
export function getZIndexBaseline() {
|
|
163
163
|
// When SLDS styles are present, typically on Core
|
|
164
164
|
// this currently resolves to: '9000' (string)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
// If function is called in server context, use default as window and document are not available.
|
|
166
|
+
const isCSR = typeof window !== 'undefined';
|
|
167
|
+
const modalZindexValueLwc = isCSR
|
|
168
|
+
? (
|
|
169
|
+
window.getComputedStyle(document.documentElement) ||
|
|
170
|
+
document.documentElement.style
|
|
171
|
+
).getPropertyValue('--lwc-zIndexModal')
|
|
172
|
+
: DEFAULT_MODAL_ZINDEX;
|
|
169
173
|
|
|
170
174
|
const baseZindexModalLwc = parseInt(modalZindexValueLwc, 10);
|
|
171
175
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
@import '
|
|
1
|
+
/* sldsCommon missed earlier - check on review */
|
|
2
|
+
/* @import 'lightning/sldsCommon'; */
|
|
3
|
+
/* @import './vertical-navigation.slds.css'; */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { classSet } from 'lightning/utils';
|
|
4
3
|
import {
|
|
5
4
|
assert,
|
|
@@ -18,7 +17,7 @@ const ALLOWED_CHILDREN = [
|
|
|
18
17
|
* A vertical list of links that either take the user to another page or parts of the page the user is in.
|
|
19
18
|
* @slot default Placeholder for lightning-vertical-navigation-section and lightning-vertical-navigation-overflow.
|
|
20
19
|
*/
|
|
21
|
-
export default class LightningVerticalNavigation extends
|
|
20
|
+
export default class LightningVerticalNavigation extends LightningElement {
|
|
22
21
|
@track _compact;
|
|
23
22
|
@track _shaded;
|
|
24
23
|
@track _selectedItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
@import '
|
|
1
|
+
/* sldsCommon missed earlier - check on review
|
|
2
|
+
@import 'lightning/sldsCommon'; */
|
|
3
|
+
/* @import './vertical-navigation-section.slds.css'; */
|
|
3
4
|
|
|
4
5
|
div[role="list"] {
|
|
5
6
|
list-style: none;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { api, track } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
1
|
+
import { LightningElement, api, track } from 'lwc';
|
|
3
2
|
import { guid, isHeadingLevelValid } from 'lightning/utilsPrivate';
|
|
4
3
|
|
|
5
|
-
export default class LightningVerticalNavigationSection extends
|
|
4
|
+
export default class LightningVerticalNavigationSection extends LightningElement {
|
|
6
5
|
headingId = guid();
|
|
7
6
|
|
|
8
7
|
@track _label;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function isEmptyString(s) {
|
|
2
|
-
return (
|
|
3
|
-
s === undefined ||
|
|
4
|
-
s === null ||
|
|
5
|
-
(typeof s === 'string' && s.trim() === '')
|
|
6
|
-
);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function isEmptyObject(obj) {
|
|
10
|
-
if (obj === undefined || obj === null || typeof obj !== 'object') {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
// eslint-disable-next-line guard-for-in
|
|
14
|
-
for (const name in obj) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return true;
|
|
18
|
-
}
|