lightning-base-components 1.21.9-alpha → 1.22.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/metadata/raptor.json +9 -0
- package/package.json +3 -5
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/src/lightning/accordionSection/button.slds.css +18 -10
- package/src/lightning/baseCombobox/dropdown.slds.css +7 -7
- package/src/lightning/baseCombobox/input-text.slds.css +7 -6
- package/src/lightning/baseComboboxFormattedText/baseComboboxFormattedText.js-meta.xml +1 -1
- package/src/lightning/button/button.slds.css +18 -10
- package/src/lightning/buttonIcon/button-icon.slds.css +23 -15
- package/src/lightning/buttonIcon/buttonIcon.js +29 -26
- package/src/lightning/buttonIconStateful/button-icon.slds.css +23 -15
- package/src/lightning/buttonIconStateful/button.slds.css +18 -10
- package/src/lightning/buttonMenu/button-icon.slds.css +23 -15
- package/src/lightning/buttonMenu/button.slds.css +18 -10
- package/src/lightning/buttonMenu/dropdown.slds.css +7 -7
- package/src/lightning/buttonStateful/button-stateful.slds.css +23 -0
- package/src/lightning/buttonStateful/button.slds.css +18 -10
- package/src/lightning/buttonStateful/buttonStateful.js-meta.xml +3 -0
- package/src/lightning/calendar/calendar.lbc.native.css +1 -0
- package/src/lightning/calendar/calendar.slds.css +13 -10
- package/src/lightning/calendar/dropdown.slds.css +7 -7
- package/src/lightning/calendar/keyboard.js +11 -3
- package/src/lightning/colorPickerCustom/input-text.slds.css +7 -6
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +1 -11
- package/src/lightning/combobox/combobox.html +1 -1
- package/src/lightning/combobox/combobox.js +5 -13
- package/src/lightning/combobox/form-element.slds.css +1 -1
- package/src/lightning/datatable/__examples__/withVirtualization/withVirtualization.js +0 -1
- package/src/lightning/datatable/autoWidthStrategy.js +32 -44
- package/src/lightning/datatable/columns.js +4 -1
- package/src/lightning/datatable/datatable.js +15 -34
- package/src/lightning/datatable/keyboard.js +13 -12
- package/src/lightning/datatable/renderManager.js +1 -3
- package/src/lightning/datatable/rows.js +17 -9
- package/src/lightning/datatable/state.js +0 -1
- package/src/lightning/datatable/virtualization.js +11 -14
- package/src/lightning/datepicker/form-element.slds.css +1 -1
- package/src/lightning/datepicker/input-text.slds.css +7 -6
- package/src/lightning/datetimepicker/form-element.slds.css +1 -1
- package/src/lightning/datetimepicker/input-text.slds.css +7 -6
- package/src/lightning/dualListbox/form-element.slds.css +1 -1
- package/src/lightning/formattedAddress/formattedAddress.js +3 -2
- package/src/lightning/formattedDateTime/formattedDateTime.js +3 -2
- package/src/lightning/formattedDateTime/formattedDateTime.js-meta.xml +1 -1
- package/src/lightning/formattedLocation/formattedLocation.js +3 -2
- package/src/lightning/formattedPhone/formattedPhone.js +3 -2
- package/src/lightning/formattedTime/formattedTime.js +3 -2
- package/src/lightning/formattedUrl/formattedUrl.js +3 -2
- package/src/lightning/groupedCombobox/form-element.slds.css +1 -1
- package/src/lightning/groupedCombobox/groupedCombobox.js +21 -28
- package/src/lightning/groupedCombobox/input-text.slds.css +7 -6
- package/src/lightning/helptext/button-icon.slds.css +23 -15
- package/src/lightning/helptext/form-element.slds.css +1 -1
- package/src/lightning/helptext/helptext.html +2 -1
- package/src/lightning/helptext/helptext.js +0 -12
- package/src/lightning/helptext/helptext.js-meta.xml +3 -0
- package/src/lightning/input/form-element.slds.css +1 -1
- package/src/lightning/inputAddress/__docs__/inputAddress.md +44 -3
- package/src/lightning/inputAddress/form-element.slds.css +1 -1
- package/src/lightning/inputAddress/input-text.slds.css +7 -6
- package/src/lightning/inputAddress/inputAddress.js +8 -6
- package/src/lightning/inputLocation/form-element.slds.css +1 -1
- package/src/lightning/inputLocation/input-text.slds.css +7 -6
- package/src/lightning/inputName/form-element.slds.css +1 -1
- package/src/lightning/inputName/input-text.slds.css +7 -6
- package/src/lightning/inputName/inputName.js-meta.xml +3 -0
- package/src/lightning/interactiveDialogBase/button.slds.css +515 -0
- package/src/lightning/interactiveDialogBase/interactive-dialog-base.slds.css +45 -17
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.lbc.native.css +6 -1
- package/src/lightning/interactiveDialogBase/modal-base.slds.css +242 -0
- package/src/lightning/interactiveDialogBase/modal-body.slds.css +60 -0
- package/src/lightning/interactiveDialogBase/modal-footer.slds.css +79 -0
- package/src/lightning/interactiveDialogBase/modal-header.slds.css +76 -0
- package/src/lightning/lookupAddress/form-element.slds.css +1 -1
- package/src/lightning/lookupAddress/lookupAddress.js-meta.xml +3 -0
- package/src/lightning/menuDivider/menuDivider.js-meta.xml +3 -0
- package/src/lightning/menuSubheader/menuSubheader.js-meta.xml +3 -0
- package/src/lightning/modal/modal.js-meta.xml +3 -0
- package/src/lightning/modalBase/modalBase.js +7 -5
- package/src/lightning/modalBody/modalBody.js-meta.xml +3 -0
- package/src/lightning/modalFooter/modalFooter.js-meta.xml +3 -0
- package/src/lightning/modalHeader/modalHeader.js-meta.xml +3 -0
- package/src/lightning/picklist/picklist.js +3 -2
- package/src/lightning/pill/pill.js +1 -1
- package/src/lightning/pillContainer/button.slds.css +18 -10
- package/src/lightning/primitiveBubble/primitiveBubble.js +9 -4
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +1 -1
- package/src/lightning/primitiveDatatableTooltipBubble/primitiveDatatableTooltipBubble.html +1 -1
- package/src/lightning/primitiveFileDroppableZone/primitiveFileDroppableZone.js +3 -2
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.html +1 -0
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputColor/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputColor/input-text.slds.css +7 -6
- package/src/lightning/primitiveInputFile/button.slds.css +18 -10
- package/src/lightning/primitiveInputFile/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputFile/input-file.slds.css +3 -2
- package/src/lightning/primitiveInputSimple/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputSimple/input-text.slds.css +7 -6
- package/src/lightning/primitiveInputToggle/form-element.slds.css +1 -1
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +13 -7
- package/src/lightning/progressBar/progressBar.js-meta.xml +3 -0
- package/src/lightning/progressRing/progressRing.js-meta.xml +3 -0
- package/src/lightning/prompt/form-element.slds.css +319 -0
- package/src/lightning/prompt/input-text.slds.css +507 -0
- package/src/lightning/prompt/prompt.lbc.native.css +2 -0
- package/src/lightning/purifyLib/purify.js +838 -586
- package/src/lightning/radioGroup/form-element.slds.css +1 -1
- package/src/lightning/radioGroup/radioGroup.js-meta.xml +3 -0
- package/src/lightning/select/form-element.slds.css +1 -1
- package/src/lightning/select/select.slds.css +1 -1
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +6 -4
- package/src/lightning/tabBar/tab-bar.slds.css +17 -3
- package/src/lightning/textarea/form-element.slds.css +1 -1
- package/src/lightning/textarea/textarea.js-meta.xml +3 -0
- package/src/lightning/timepicker/form-element.slds.css +1 -1
- package/src/lightning/toast/button-icon.slds.css +23 -15
- package/src/lightning/toast/toast.js-meta.xml +3 -0
- package/src/lightning/toastContainer/toastContainer.js-meta.xml +3 -0
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +15 -4
- package/src/lightning/utilsPrivate/utilsPrivate.js +4 -4
- package/src/lightning/verticalNavigationOverflow/button.slds.css +18 -10
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
|
|
2
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Remap to SLDS blueprint hooks for parity
|
|
7
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
8
|
+
*
|
|
9
|
+
* "Shared" Styling Hooks for modal base/header/body/footer
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:host([data-render-mode="shadow"]) [part='modal-backdrop'] {
|
|
13
|
+
--slds-c-backdrop-color-background: var(--slds-c-modalbase-backdrop-color-background);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([data-render-mode="shadow"]) [part='modal'] {
|
|
17
|
+
/* Map modal component hooks to single "shared" hooks from blueprint */
|
|
18
|
+
/* stylelint-disable sds-stylelint-plugin/styling-hooks-pattern */
|
|
19
|
+
|
|
20
|
+
/* '--slds-c-modal-shadow' is used in body/footer */
|
|
21
|
+
--slds-c-modalbody-shadow: var(--slds-c-modal-shadow);
|
|
22
|
+
--slds-c-modalfooter-shadow: var(--slds-c-modal-shadow);
|
|
23
|
+
|
|
24
|
+
/* '--slds-c-modal-color-border' is used in header/footer */
|
|
25
|
+
--slds-c-modalheader-color-border: var(--slds-c-modal-color-border);
|
|
26
|
+
--slds-c-modalfooter-color-border: var(--slds-c-modal-color-border);
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/* '--slds-c-modal-radius-border' is used in header/body/footer */
|
|
30
|
+
--slds-c-modalheader-radius-border: var(--slds-c-modal-radius-border);
|
|
31
|
+
--slds-c-modalbody-radius-border: var(--slds-c-modal-radius-border);
|
|
32
|
+
--slds-c-modalfooter-radius-border: var(--slds-c-modal-radius-border);
|
|
33
|
+
|
|
34
|
+
/* '--slds-c-modal-sizing-border' is used in header/footer */
|
|
35
|
+
--slds-c-modalheader-sizing-border: var(--slds-c-modal-sizing-border);
|
|
36
|
+
--slds-c-modalfooter-sizing-border: var(--slds-c-modal-sizing-border);
|
|
37
|
+
|
|
38
|
+
/* stylelint-enable sds-stylelint-plugin/styling-hooks-pattern */
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([data-render-mode="shadow"]) .slds-backdrop {
|
|
43
|
+
transition-duration: 0.4s;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
opacity: 0;
|
|
47
|
+
visibility: hidden;
|
|
48
|
+
position: fixed;
|
|
49
|
+
inset-block-start: 0;
|
|
50
|
+
inset-inline-end: 0;
|
|
51
|
+
inset-block-end: 0;
|
|
52
|
+
inset-inline-start: 0;
|
|
53
|
+
background: var(--slds-c-modalbase-backdrop-color-background, var(--slds-g-color-neutral-10-opacity-50, rgba(8, 7, 7, 60%)));
|
|
54
|
+
z-index: 9000;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host([data-render-mode="shadow"]) .slds-backdrop_open {
|
|
58
|
+
visibility: visible;
|
|
59
|
+
opacity: 1;
|
|
60
|
+
transition: opacity 0.4s linear;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([data-render-mode="shadow"]) .slds-modal {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
transition: transform 0.1s linear, opacity 0.1s;
|
|
67
|
+
position: fixed;
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-inline-end: 0;
|
|
70
|
+
inset-block-end: 0;
|
|
71
|
+
inset-inline-start: 0;
|
|
72
|
+
z-index: 9001
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([data-render-mode="shadow"]) .slds-modal__container {
|
|
76
|
+
position: relative;
|
|
77
|
+
transform: translate(0, 0);
|
|
78
|
+
transition: transform 0.1s linear, opacity 0.1s linear;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
margin: 0 var(--slds-g-spacing-6);
|
|
83
|
+
height: 100%;
|
|
84
|
+
padding: var(--slds-g-spacing-8) 0 var(--slds-g-spacing-12) 0;
|
|
85
|
+
border-radius: var(--slds-g-spacing-1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host([data-render-mode="shadow"]) .slds-modal__close {
|
|
89
|
+
width: 2rem;
|
|
90
|
+
height: 2rem;
|
|
91
|
+
margin-inline-start: auto;
|
|
92
|
+
position: relative;
|
|
93
|
+
inset-block-end: var(--slds-g-spacing-2);
|
|
94
|
+
inset-inline-end: (var(--slds-g-spacing-2) * -1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([data-render-mode="shadow"]) .slds-fade-in-open {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
visibility: visible;
|
|
100
|
+
transition: opacity 0.1s linear;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host([data-render-mode="shadow"]) .slds-fade-in-open .slds-modal__container-reset {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
visibility: visible;
|
|
106
|
+
transform: translate(0, 0);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Sizes: Small, Medium, Large */
|
|
110
|
+
|
|
111
|
+
@media (width >= 48em) {
|
|
112
|
+
:host([data-render-mode="shadow"]) .slds-modal__container {
|
|
113
|
+
margin: 0 auto;
|
|
114
|
+
width: 50%;
|
|
115
|
+
max-width: 40rem;
|
|
116
|
+
min-width: 20rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host([data-render-mode="shadow"]) .slds-modal_small .slds-modal__container {
|
|
120
|
+
width: 60%;
|
|
121
|
+
max-width: 52.0625rem;
|
|
122
|
+
min-width: 40rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host([data-render-mode="shadow"]) .slds-modal_medium .slds-modal__container {
|
|
126
|
+
width: 70%;
|
|
127
|
+
max-width: 75rem;
|
|
128
|
+
min-width: 40rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:host([data-render-mode="shadow"]) .slds-modal_large .slds-modal__container {
|
|
132
|
+
width: 90%;
|
|
133
|
+
max-width: none;
|
|
134
|
+
min-width: 40rem;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Sizes: Full */
|
|
139
|
+
|
|
140
|
+
/* .slds-modal_full {} */
|
|
141
|
+
|
|
142
|
+
/* Behaves like large size when not in a small viewport */
|
|
143
|
+
|
|
144
|
+
@media (width >= 48em) {
|
|
145
|
+
:host([data-render-mode="shadow"]) .slds-modal_full .slds-modal__container {
|
|
146
|
+
width: 90%;
|
|
147
|
+
max-width: none;
|
|
148
|
+
min-width: 40rem;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Original SLDS implementation was desktop-first. This is now mobile-first for <=480px */
|
|
153
|
+
|
|
154
|
+
@media (width <= 30em) {
|
|
155
|
+
:host([data-render-mode="shadow"]) .slds-modal_full {
|
|
156
|
+
/* Account for iOS safe areas so our modal doesn't load underneath iOS elements. */
|
|
157
|
+
inset-block-start: env(safe-area-inset-top, 0);
|
|
158
|
+
|
|
159
|
+
/* Override slds-modal's bottom: 0 so we can make the height dynamic. */
|
|
160
|
+
inset-block-end: auto;
|
|
161
|
+
|
|
162
|
+
/* Viewport may be dynamic, e.g., iOS Safari toolbar hiding behavior, so we use dvh. Safe areas may not be required here. */
|
|
163
|
+
/* stylelint-disable-next-line unit-no-unknown */
|
|
164
|
+
height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host([data-render-mode="shadow"]) .slds-modal_full .slds-modal__container {
|
|
168
|
+
width: 100%;
|
|
169
|
+
max-width: none;
|
|
170
|
+
min-width: 0;
|
|
171
|
+
margin: 0;
|
|
172
|
+
padding: var(--slds-g-spacing-4) 0 0 0;
|
|
173
|
+
background-color: var(--slds-c-modalbase-color-background, var(--slds-g-color-surface-1));
|
|
174
|
+
border-radius: 0;
|
|
175
|
+
|
|
176
|
+
/* Establishes the main layout of the modal. Grid is defined by grid-template-areas
|
|
177
|
+
which explicitly defines the grid and allows optional elements to be omitted like
|
|
178
|
+
the header or footer. */
|
|
179
|
+
display: grid;
|
|
180
|
+
/* stylelint-disable-next-line unit-no-unknown */
|
|
181
|
+
height: 100dvh;
|
|
182
|
+
grid-template-columns: 1fr;
|
|
183
|
+
grid-template-rows: min-content min-content 1fr min-content;
|
|
184
|
+
grid-template-areas: "close" "header" "content" "footer";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host([data-render-mode="shadow"]) .slds-modal_full .slds-modal__close {
|
|
188
|
+
grid-area: close;
|
|
189
|
+
inset-inline-end: var(--slds-g-spacing-4);
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* A few things going on here:
|
|
193
|
+
* - We want to avoid a markup change for a single modifier so we reassign/override.
|
|
194
|
+
* - Button icon doesn't have component level hooks (yet), so we don't include them here
|
|
195
|
+
* and we have to override the CSS property instead of reassign.
|
|
196
|
+
* - States on button have a bug, they override instead of reassign hooks
|
|
197
|
+
* so the values of empty hooks default to initial values. In the case
|
|
198
|
+
* of background colors, the background will disappear (initial = transparent).
|
|
199
|
+
*/
|
|
200
|
+
--slds-c-button-color-background: var(--slds-g-color-surface-container-1, white);
|
|
201
|
+
--slds-c-button-color-background-active: var(--slds-g-color-surface-container-1, white);
|
|
202
|
+
|
|
203
|
+
color: var(--slds-g-color-on-surface-1);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:host([data-render-mode="shadow"]) .slds-modal_full .slds-modal__close:hover,:host([data-render-mode="shadow"])
|
|
207
|
+
.slds-modal_full .slds-modal__close:focus {
|
|
208
|
+
color: var(--slds-g-color-accent-3);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* INTERNAL USE ONLY - SUBJECT TO CHANGE AND REMOVAL
|
|
213
|
+
*
|
|
214
|
+
* SLDS Blueprint <> LBC Parity Patch
|
|
215
|
+
*
|
|
216
|
+
* SLDS blueprints and LBC implementation are not 1:1. This patch is needed to
|
|
217
|
+
* account for the differences introduced in the LBC implementation. Location
|
|
218
|
+
* of this code would ideally live within the LBC component CSS module but
|
|
219
|
+
* synthetic shadow and how LBC deconstructs the modal into individual components
|
|
220
|
+
* makes this not feasible. Not ideal, but this is the best solution for now.
|
|
221
|
+
* Selectors are scoped to lightning-* to avoid any potential outside conflicts.
|
|
222
|
+
*/
|
|
223
|
+
:host([data-render-mode="shadow"]) .slds-modal_full lightning-button-icon+div,:host([data-render-mode="shadow"])
|
|
224
|
+
.slds-modal_full lightning-modal {
|
|
225
|
+
display: contents;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* TODO W-12674349: remove after assistive text util is added */
|
|
230
|
+
|
|
231
|
+
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
232
|
+
position: absolute !important;
|
|
233
|
+
margin: -1px !important;
|
|
234
|
+
border: 0 !important;
|
|
235
|
+
padding: 0 !important;
|
|
236
|
+
width: 1px !important;
|
|
237
|
+
height: 1px !important;
|
|
238
|
+
overflow: hidden !important;
|
|
239
|
+
clip: rect(0 0 0 0) !important;
|
|
240
|
+
text-transform: none !important;
|
|
241
|
+
white-space: nowrap !important;
|
|
242
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
|
+
|
|
5
|
+
:host([data-render-mode="shadow"]) .slds-modal__content_headless {
|
|
6
|
+
border-start-end-radius: var(--slds-c-modalbody-radius-border, var(--slds-g-radius-border-2));
|
|
7
|
+
border-start-start-radius: var(--slds-c-modalbody-radius-border, var(--slds-g-radius-border-2));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host([data-render-mode="shadow"]) .slds-modal__content {
|
|
11
|
+
/**
|
|
12
|
+
* Remap to SLDS blueprint hooks for parity
|
|
13
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
14
|
+
*/
|
|
15
|
+
--slds-c-modal-content-color-background: var(--slds-c-modalbody-color-background);
|
|
16
|
+
--slds-c-modal-content-text-color: var(--slds-c-modalbody-text-color);
|
|
17
|
+
|
|
18
|
+
background-color: var(--slds-c-modalbody-color-background, var(--slds-g-color-surface-container-1));
|
|
19
|
+
color: var(--slds-c-modalbody-text-color);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([data-render-mode="shadow"]) .slds-modal__content_footless {
|
|
25
|
+
border-bottom-right-radius: var(--slds-c-modalbody-radius-border, var(--slds-g-radius-border-2));
|
|
26
|
+
border-bottom-left-radius: var(--slds-c-modalbody-radius-border, var(--slds-g-radius-border-2));
|
|
27
|
+
box-shadow: var(--slds-c-modalbody-shadow, var(--slds-g-shadow-2));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Sizes: Full */
|
|
31
|
+
|
|
32
|
+
/* Original SLDS implementation was desktop-first. This is now mobile-first for <=480px */
|
|
33
|
+
|
|
34
|
+
@media (width <= 30em) {
|
|
35
|
+
:host([data-render-mode="shadow"][data-size='full']) [part='modal-body'] {
|
|
36
|
+
grid-area: content;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([data-render-mode="shadow"][data-size='full'][data-variant-footless]) [part='modal-body'] {
|
|
40
|
+
border-end-end-radius: 0;
|
|
41
|
+
border-end-start-radius: 0;
|
|
42
|
+
box-shadow: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* INTERNAL USE ONLY - SUBJECT TO CHANGE AND REMOVAL
|
|
47
|
+
*
|
|
48
|
+
* SLDS Blueprint <> LBC Parity Patch
|
|
49
|
+
*
|
|
50
|
+
* SLDS blueprints and LBC implementation are not 1:1. This patch is needed to
|
|
51
|
+
* account for the differences introduced in the LBC implementation. Location
|
|
52
|
+
* of this code would ideally live within the LBC component CSS module but
|
|
53
|
+
* synthetic shadow and how LBC deconstructs the modal into individual components
|
|
54
|
+
* makes this not feasible. Not ideal, but this is the best solution for now.
|
|
55
|
+
* Selectors are scoped to lightning-* to avoid any potential outside conflicts.
|
|
56
|
+
*/
|
|
57
|
+
:host([data-render-mode="shadow"][data-size='full']) {
|
|
58
|
+
display: contents;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
|
+
|
|
5
|
+
:host([data-render-mode="shadow"]) .slds-modal__footer {
|
|
6
|
+
|
|
7
|
+
/* stylelint-disable sds-stylelint-plugin/styling-hooks-deprecated */
|
|
8
|
+
|
|
9
|
+
/* stylelint-disable sds-stylelint-plugin/styling-hooks-pattern */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Remap to SLDS blueprint hooks for parity
|
|
13
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
14
|
+
*/
|
|
15
|
+
--slds-c-modal-footer-color-background: var(--slds-c-modalfooter-color-background);
|
|
16
|
+
--slds-c-modal-footer-text-color: var(--slds-c-modalfooter-text-color);
|
|
17
|
+
--slds-c-modal-footer-spacing-block-start: var(--slds-c-modalfooter-spacing-block-start);
|
|
18
|
+
--slds-c-modal-footer-spacing-inline-end: var(--slds-c-modalfooter-spacing-inline-end);
|
|
19
|
+
--slds-c-modal-footer-spacing-block-end: var(--slds-c-modalfooter-spacing-block-end);
|
|
20
|
+
--slds-c-modal-footer-spacing-inline-start: var(--slds-c-modalfooter-spacing-inline-start);
|
|
21
|
+
|
|
22
|
+
border-end-end-radius: var(--slds-c-modalfooter-radius-border, var(--slds-g-radius-border-2));
|
|
23
|
+
border-end-start-radius: var(--slds-c-modalfooter-radius-border, var(--slds-g-radius-border-2));
|
|
24
|
+
border-block-start-width: var(--slds-c-modalfooter-sizing-border, var(--slds-g-sizing-border-2));
|
|
25
|
+
border-block-start-style: solid;
|
|
26
|
+
border-block-start-color: var(--slds-c-modalfooter-color-border, var(--slds-g-color-border-1));
|
|
27
|
+
background-color: var(--slds-c-modalfooter-color-background, var(--slds-g-color-surface-container-2));
|
|
28
|
+
color: var(--slds-c-modalfooter-text-color);
|
|
29
|
+
-ms-flex-negative: 0;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
padding-block-start: var(--slds-c-modalfooter-spacing-block-start, var(--slds-g-spacing-3));
|
|
32
|
+
padding-inline-end: var(--slds-c-modalfooter-spacing-inline-end, var(--slds-g-spacing-4));
|
|
33
|
+
padding-block-end: var(--slds-c-modalfooter-spacing-block-end, var(--slds-g-spacing-3));
|
|
34
|
+
padding-inline-start: var(--slds-c-modalfooter-spacing-inline-start, var(--slds-g-spacing-4));
|
|
35
|
+
text-align: right;
|
|
36
|
+
box-shadow: var(--slds-c-modalfooter-shadow, 0 2px 3px 0 rgba(0, 0, 0, 16%));
|
|
37
|
+
/* stylelint-enable sds-stylelint-plugin/styling-hooks-deprecated */
|
|
38
|
+
|
|
39
|
+
/* stylelint-enable sds-stylelint-plugin/styling-hooks-pattern */
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* TODO W-12674349: Replace with visibility utility classes when available */
|
|
43
|
+
|
|
44
|
+
:host([data-render-mode="shadow"]) .slds-hide {
|
|
45
|
+
display: none !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Sizes: Full */
|
|
49
|
+
|
|
50
|
+
/* Original SLDS implementation was desktop-first. This is now mobile-first for <=480px */
|
|
51
|
+
|
|
52
|
+
@media (width <= 30em) {
|
|
53
|
+
:host([data-render-mode="shadow"][data-size='full']) [part='modal-footer'] {
|
|
54
|
+
grid-area: footer;
|
|
55
|
+
border-start-end-radius: 0;
|
|
56
|
+
border-end-start-radius: 0;
|
|
57
|
+
box-shadow: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* INTERNAL USE ONLY - SUBJECT TO CHANGE AND REMOVAL
|
|
62
|
+
*
|
|
63
|
+
* SLDS Blueprint <> LBC Parity Patch
|
|
64
|
+
*
|
|
65
|
+
* SLDS blueprints and LBC implementation are not 1:1. This patch is needed to
|
|
66
|
+
* account for the differences introduced in the LBC implementation. Location
|
|
67
|
+
* of this code would ideally live within the LBC component CSS module but
|
|
68
|
+
* synthetic shadow and how LBC deconstructs the modal into individual components
|
|
69
|
+
* makes this not feasible. Not ideal, but this is the best solution for now.
|
|
70
|
+
* Selectors are scoped to lightning-* to avoid any potential outside conflicts.
|
|
71
|
+
*/
|
|
72
|
+
:host([data-render-mode="shadow"][data-size='full']) {
|
|
73
|
+
display: contents;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([data-render-mode="shadow"]) .slds-modal__footer .slds-button + .slds-button {
|
|
78
|
+
margin-left: var(--slds-g-spacing-2);
|
|
79
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
3
|
+
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
|
+
|
|
5
|
+
/* stylelint-disable sds-stylelint-plugin/styling-hooks-deprecated */
|
|
6
|
+
|
|
7
|
+
/* stylelint-disable sds-stylelint-plugin/styling-hooks-pattern */
|
|
8
|
+
|
|
9
|
+
:host([data-render-mode="shadow"]) .slds-modal__header {
|
|
10
|
+
/**
|
|
11
|
+
* Remap to SLDS blueprint hooks for parity
|
|
12
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
13
|
+
*/
|
|
14
|
+
--slds-c-modal-header-color-background: var(--slds-c-modalheader-color-background);
|
|
15
|
+
--slds-c-modal-header-text-color: var(--slds-c-modalheader-text-color);
|
|
16
|
+
--slds-c-modal-header-spacing-block-start: var(--slds-c-modalheader-spacing-block-start);
|
|
17
|
+
--slds-c-modal-header-spacing-inline-end: var(--slds-c-modalheader-spacing-inline-end);
|
|
18
|
+
--slds-c-modal-header-spacing-block-end: var(--slds-c-modalheader-spacing-block-end);
|
|
19
|
+
--slds-c-modal-header-spacing-inline-start: var(--slds-c-modalheader-spacing-inline-start);
|
|
20
|
+
|
|
21
|
+
--slds-c-modal-heading-font-size: var(--slds-c-modalheader-heading-font-size);
|
|
22
|
+
--slds-c-modal-heading-font-weight: var(--slds-c-modalheader-heading-font-weight);
|
|
23
|
+
--slds-c-modal-heading-font-lineheight: var(--slds-c-modalheader-heading-font-lineheight);
|
|
24
|
+
|
|
25
|
+
position: relative;
|
|
26
|
+
border-start-end-radius: var(--slds-c-modalheader-radius-border, var(--slds-g-radius-border-2));
|
|
27
|
+
border-start-start-radius: var(--slds-c-modalheader-radius-border, var(--slds-g-radius-border-2));
|
|
28
|
+
border-block-end-width: var(--slds-c-modalheader-sizing-border, var(--slds-g-sizing-border-2));
|
|
29
|
+
border-block-end-style: solid;
|
|
30
|
+
border-block-end-color: var(--slds-c-modalheader-color-border, var(--slds-g-color-border-1));
|
|
31
|
+
background-color: var(--slds-c-modalheader-color-background, var(--slds-g-color-surface-container-1));
|
|
32
|
+
color: var(--slds-c-modalheader-text-color);
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
padding-block-start: var(--slds-c-modalheader-spacing-block-start, var(--slds-g-spacing-4));
|
|
35
|
+
padding-inline-end: var(--slds-c-modalheader-spacing-inline-end, var(--slds-g-spacing-4));
|
|
36
|
+
padding-block-end: var(--slds-c-modalheader-spacing-block-end, var(--slds-g-spacing-4));
|
|
37
|
+
padding-inline-start: var(--slds-c-modalheader-spacing-inline-start, var(--slds-g-spacing-4));
|
|
38
|
+
text-align: center;
|
|
39
|
+
/* stylelint-enable sds-stylelint-plugin/styling-hooks-deprecated */
|
|
40
|
+
|
|
41
|
+
/* stylelint-enable sds-stylelint-plugin/styling-hooks-pattern */
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([data-render-mode="shadow"]) .slds-modal__title {
|
|
45
|
+
font-weight: var(--slds-c-modalheader-heading-font-weight);
|
|
46
|
+
font-size: var(--slds-c-modalheader-heading-font-size, 1.25rem);
|
|
47
|
+
line-height: var(--slds-c-modalheader-heading-font-lineheight, var(--slds-g-font-lineheight-2));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Sizes: Full */
|
|
51
|
+
|
|
52
|
+
/* Original SLDS implementation was desktop-first. This is now mobile-first for <=480px */
|
|
53
|
+
|
|
54
|
+
@media (width <= 30em) {
|
|
55
|
+
:host([data-render-mode="shadow"][data-size='full']) [part='modal-header'] {
|
|
56
|
+
grid-area: header;
|
|
57
|
+
border-start-start-radius: 0;
|
|
58
|
+
border-start-end-radius: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* INTERNAL USE ONLY - SUBJECT TO CHANGE AND REMOVAL
|
|
63
|
+
*
|
|
64
|
+
* SLDS Blueprint <> LBC Parity Patch
|
|
65
|
+
*
|
|
66
|
+
* SLDS blueprints and LBC implementation are not 1:1. This patch is needed to
|
|
67
|
+
* account for the differences introduced in the LBC implementation. Location
|
|
68
|
+
* of this code would ideally live within the LBC component CSS module but
|
|
69
|
+
* synthetic shadow and how LBC deconstructs the modal into individual components
|
|
70
|
+
* makes this not feasible. Not ideal, but this is the best solution for now.
|
|
71
|
+
* Selectors are scoped to lightning-* to avoid any potential outside conflicts.
|
|
72
|
+
*/
|
|
73
|
+
:host([data-render-mode="shadow"][data-size='full']) {
|
|
74
|
+
display: contents;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
hyphens: auto;
|
|
47
47
|
display: inline-block;
|
|
48
48
|
color: var(--slds-g-color-on-surface-2);
|
|
49
|
-
font-size: var(--slds-g-font-scale-neg-
|
|
49
|
+
font-size: var(--slds-s-label-font-size, var(--slds-g-font-scale-neg-2));
|
|
50
50
|
padding-inline-end: var(--slds-g-spacing-2);
|
|
51
51
|
padding-block-start: var(--slds-g-spacing-1);
|
|
52
52
|
margin-block-end: calc(var(--slds-g-spacing-1) / 2);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<LightningComponentBundle xmlns="xmlns=http://soap.sforce.com/2006/04/metadata">
|
|
3
3
|
<isExposed>true</isExposed>
|
|
4
|
+
<capabilities>
|
|
5
|
+
<capability>lightning__ServerRenderableWithHydration</capability>
|
|
6
|
+
</capabilities>
|
|
4
7
|
</LightningComponentBundle>
|
|
@@ -579,11 +579,13 @@ export default class LightningModalBase extends LightningShadowBaseClass {
|
|
|
579
579
|
// headerLabelIsPopulated is equivalent labelIsEmpty, but from modalHeader level
|
|
580
580
|
if (headerRegistered) {
|
|
581
581
|
if (headerLabelId && headerLabelIsPopulated) {
|
|
582
|
-
this.ariaObserver
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
582
|
+
if (this.ariaObserver) {
|
|
583
|
+
this.ariaObserver.connect({
|
|
584
|
+
targetNode: this.modalWrapper,
|
|
585
|
+
attribute: 'aria-labelledby',
|
|
586
|
+
relatedNodes: [this.headerTitleRef],
|
|
587
|
+
});
|
|
588
|
+
}
|
|
587
589
|
synchronizeAttrs(this.modalWrapper, { [ARIA.LABEL]: null });
|
|
588
590
|
// if labelId not set OR header label value not set,
|
|
589
591
|
// must console.error
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import labelNoneLabel from '@salesforce/label/LightningPicklist.noneLabel';
|
|
2
2
|
import labelAvailable from '@salesforce/label/LightningPicklist.available';
|
|
3
3
|
import labelChosen from '@salesforce/label/LightningPicklist.chosen';
|
|
4
|
-
import {
|
|
4
|
+
import { api } from 'lwc';
|
|
5
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
5
6
|
import { normalizeBoolean, arraysEqual } from 'lightning/utilsPrivate';
|
|
6
7
|
import formFactor from '@salesforce/client/formFactor';
|
|
7
8
|
import { isCSR } from 'lightning/utilsPrivate';
|
|
@@ -13,7 +14,7 @@ const i18n = {
|
|
|
13
14
|
};
|
|
14
15
|
const PROGRAMMATIC_CHANGE = true;
|
|
15
16
|
|
|
16
|
-
export default class LightningPicklist extends
|
|
17
|
+
export default class LightningPicklist extends LightningShadowBaseClass {
|
|
17
18
|
static delegatesFocus = true;
|
|
18
19
|
|
|
19
20
|
// The value that is passed into the sub-components. dual-listbox accepts an array whereas combobox expects a string
|
|
@@ -362,7 +362,7 @@ export default class LightningPill extends LightningShadowBaseClass {
|
|
|
362
362
|
handleBlur(event) {
|
|
363
363
|
event.stopPropagation();
|
|
364
364
|
const pillRelatedTarget =
|
|
365
|
-
event.relatedTarget || event.detail[buttonRelatedTarget];
|
|
365
|
+
event.relatedTarget || event.detail?.[buttonRelatedTarget];
|
|
366
366
|
if (!pillRelatedTarget || !this.template.contains(pillRelatedTarget))
|
|
367
367
|
this.dispatchBlurEvent(pillRelatedTarget);
|
|
368
368
|
}
|
|
@@ -280,7 +280,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
280
280
|
|
|
281
281
|
/* Text color */
|
|
282
282
|
--sds-c-button-text-color: var(--slds-c-button-neutral-text-color, var(--slds-g-color-accent-2));
|
|
283
|
-
--sds-c-button-text-color-hover: var(--slds-c-button-neutral-text-color-hover, var(--slds-g-color-accent-3));
|
|
283
|
+
--sds-c-button-text-color-hover: var(--slds-c-button-neutral-text-color-hover, var(--slds-s-button-color-hover, var(--slds-g-color-accent-3)));
|
|
284
284
|
--sds-c-button-text-color-focus: var(--slds-c-button-neutral-text-color-focus, var(--slds-g-color-accent-3));
|
|
285
285
|
--sds-c-button-text-color-active: var(
|
|
286
286
|
--slds-c-button-neutral-text-color-active,
|
|
@@ -296,6 +296,14 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
296
296
|
--sds-c-button-color-border-disabled: var(--slds-g-color-border-disabled-1);
|
|
297
297
|
--sds-c-button-text-color-disabled: var(--slds-g-color-on-disabled-1);
|
|
298
298
|
--sds-c-button-color-background-disabled: var(--slds-g-color-disabled-container-1);
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Needed to override
|
|
302
|
+
* `pointer-event: none` coming from sds
|
|
303
|
+
* that prevent tooltip from showing
|
|
304
|
+
*/
|
|
305
|
+
pointer-events: auto;
|
|
306
|
+
cursor: default;
|
|
299
307
|
}
|
|
300
308
|
/**
|
|
301
309
|
* A note about fallbacks on the default variant:
|
|
@@ -315,36 +323,36 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
315
323
|
:host([data-render-mode="shadow"][variant='brand']) [part~='button'] {
|
|
316
324
|
--slds-c-button-neutral-color-background: var(
|
|
317
325
|
--slds-c-button-brand-color-background,
|
|
318
|
-
var(--slds-g-color-accent-container-
|
|
326
|
+
var(--slds-g-color-accent-container-1)
|
|
319
327
|
);
|
|
320
328
|
--slds-c-button-neutral-color-background-hover: var(
|
|
321
329
|
--slds-c-button-brand-color-background-hover,
|
|
322
|
-
var(--slds-g-color-accent-container-
|
|
330
|
+
var(--slds-g-color-accent-container-2)
|
|
323
331
|
);
|
|
324
332
|
--slds-c-button-neutral-color-background-focus: var(
|
|
325
333
|
--slds-c-button-brand-color-background-focus,
|
|
326
|
-
var(--slds-g-color-accent-container-
|
|
334
|
+
var(--slds-g-color-accent-container-2)
|
|
327
335
|
);
|
|
328
336
|
--slds-c-button-neutral-color-background-active: var(
|
|
329
337
|
--slds-c-button-brand-color-background-active,
|
|
330
|
-
var(--slds-g-color-accent-container-
|
|
338
|
+
var(--slds-g-color-accent-container-2)
|
|
331
339
|
);
|
|
332
340
|
|
|
333
341
|
--slds-c-button-neutral-color-border: var(
|
|
334
342
|
--slds-c-button-brand-color-border,
|
|
335
|
-
var(--slds-g-color-border-accent-
|
|
343
|
+
var(--slds-g-color-border-accent-1)
|
|
336
344
|
);
|
|
337
345
|
--slds-c-button-neutral-color-border-hover: var(
|
|
338
346
|
--slds-c-button-brand-color-border-hover,
|
|
339
|
-
var(--slds-g-color-border-accent-
|
|
347
|
+
var(--slds-g-color-border-accent-2)
|
|
340
348
|
);
|
|
341
349
|
--slds-c-button-neutral-color-border-focus: var(
|
|
342
350
|
--slds-c-button-brand-color-border-focus,
|
|
343
|
-
var(--slds-g-color-border-accent-
|
|
351
|
+
var(--slds-g-color-border-accent-2)
|
|
344
352
|
);
|
|
345
353
|
--slds-c-button-neutral-color-border-active: var(
|
|
346
354
|
--slds-c-button-brand-color-border-active,
|
|
347
|
-
var(--slds-g-color-border-accent-
|
|
355
|
+
var(--slds-g-color-border-accent-2)
|
|
348
356
|
);
|
|
349
357
|
|
|
350
358
|
/* Since the text color is white for all states, bypassing inheritence and setting the color value from SDS */
|
|
@@ -396,7 +404,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
396
404
|
--slds-c-button-neutral-color-border-hover: var(--slds-g-color-border-success-2);
|
|
397
405
|
--slds-c-button-neutral-color-border-focus: var(--slds-g-color-border-success-2);
|
|
398
406
|
--slds-c-button-neutral-color-border-active: var(--slds-g-color-border-success-2);
|
|
399
|
-
--slds-c-button-neutral-text-color: var(--slds-g-color-on-success-
|
|
407
|
+
--slds-c-button-neutral-text-color: var(--slds-g-color-on-success-1);
|
|
400
408
|
--slds-c-button-neutral-text-color-hover: var(--slds-g-color-on-success-1);
|
|
401
409
|
--slds-c-button-neutral-text-color-focus: var(--slds-g-color-on-success-1);
|
|
402
410
|
--slds-c-button-neutral-text-color-active: var(--slds-g-color-on-success-1);
|