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
|
@@ -1,281 +0,0 @@
|
|
|
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
|
-
@supports (--styling-hooks: '') {
|
|
5
|
-
/* TODO: Swap with utility classes */
|
|
6
|
-
:host([data-render-mode="shadow"]) fieldset {
|
|
7
|
-
border: 0;
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* FORM ELEMENT: BASE */
|
|
13
|
-
:host([data-render-mode="shadow"]) .slds-form-element {
|
|
14
|
-
position: relative;
|
|
15
|
-
min-width: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([data-render-mode="shadow"]) .slds-form-element__label {
|
|
19
|
-
overflow-wrap: break-word;
|
|
20
|
-
word-wrap: break-word;
|
|
21
|
-
hyphens: auto;
|
|
22
|
-
display: inline-block;
|
|
23
|
-
color: var(--sds-g-color-neutral-base-30, #444444);
|
|
24
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
25
|
-
padding-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
26
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
27
|
-
margin-block-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host([data-render-mode="shadow"]) .slds-form-element__label:empty {
|
|
31
|
-
margin: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([data-render-mode="shadow"]) .slds-form-element__control {
|
|
35
|
-
clear: left; /* NOTE: Ideally we want left to be inline-start but browser support is not ready for that value. We need to figure out better RTL support */
|
|
36
|
-
position: relative;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([data-render-mode="shadow"]) .slds-form-element__icon {
|
|
40
|
-
display: inline-block;
|
|
41
|
-
position: relative;
|
|
42
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
43
|
-
vertical-align: top;
|
|
44
|
-
line-height: var(--sds-g-font-lineheight-1, 1);
|
|
45
|
-
z-index: 1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([data-render-mode="shadow"]) .slds-form-element__icon .slds-button_icon {
|
|
49
|
-
position: relative;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([data-render-mode="shadow"]) .slds-form-element__help,:host([data-render-mode="shadow"])
|
|
53
|
-
.slds-form-element__helper {
|
|
54
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
55
|
-
margin-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host([data-render-mode="shadow"]) .slds-form-element_edit .slds-form-element__static {
|
|
60
|
-
width: calc(100% - var(--sds-g-sizing-7, 1.5rem));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly {
|
|
64
|
-
flex-basis: 0%;
|
|
65
|
-
border-bottom: var(--sds-g-sizing-border-1, 1px) solid var(--sds-g-color-neutral-base-90, #e5e5e5);
|
|
66
|
-
margin-block-end: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__control {
|
|
70
|
-
padding-block-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
71
|
-
padding-block-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
:host([data-render-mode="shadow"]) .slds-form-element_readonly .slds-form-element__label {
|
|
75
|
-
margin-block-end: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:host([data-render-mode="shadow"]) .slds-form-element__legend {
|
|
79
|
-
font-weight: var(--sds-g-font-weight-7, 700);
|
|
80
|
-
float: left;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([data-render-mode="shadow"]) .slds-form-element__addon {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
margin-block-start: 0;
|
|
86
|
-
margin-block-end: 0;
|
|
87
|
-
margin-inline-start: var(--sds-g-spacing-2, 0.5rem);
|
|
88
|
-
margin-inline-end: var(--sds-g-spacing-2, 0.5rem);
|
|
89
|
-
align-self: center;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static {
|
|
93
|
-
overflow-wrap: break-word;
|
|
94
|
-
word-wrap: break-word;
|
|
95
|
-
word-break: break-word;
|
|
96
|
-
display: inline-block;
|
|
97
|
-
font-size: var(--sds-g-font-scale-neg-1, 0.875rem);
|
|
98
|
-
font-weight: var(--sds-g-font-weight-4, 400);
|
|
99
|
-
color: var(--sds-g-color-neutral-base-10, #181818);
|
|
100
|
-
width: 100%;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static.slds-text-longform *:last-child {
|
|
104
|
-
margin-block-end: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static:empty {
|
|
108
|
-
min-height: calc(var(--sds-g-sizing-6, 1.25rem) + 1px);
|
|
109
|
-
vertical-align: bottom;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host([data-render-mode="shadow"]) .slds-form-element__static--edit {
|
|
113
|
-
width: calc(100% - var(--sds-g-sizing-7, 1.5rem));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host([data-render-mode="shadow"]) .slds-required {
|
|
117
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
118
|
-
margin-block-start: 0;
|
|
119
|
-
margin-block-end: 0;
|
|
120
|
-
margin-inline-start: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
121
|
-
margin-inline-end: calc(var(--sds-g-spacing-1, 0.25rem) / 2);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
:host([data-render-mode="shadow"]) .slds-has-error .slds-form-element__help {
|
|
125
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host([data-render-mode="shadow"][invalid]) .slds-form-element__help {
|
|
129
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* --------------------------------------- */
|
|
133
|
-
|
|
134
|
-
/* FORM ELEMENT: STACKED */
|
|
135
|
-
|
|
136
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) {
|
|
137
|
-
display: block;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
141
|
-
|
|
142
|
-
/* :host([variant~='label-stacked']):not(.slds-form-element_readonly) {
|
|
143
|
-
margin-block-end: var(--sds-g-spacing-2);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:host([variant~='label-stacked']):not(.slds-is-editing) {
|
|
147
|
-
padding: 0 var(--sds-g-spacing-1);
|
|
148
|
-
} */
|
|
149
|
-
|
|
150
|
-
/* :host([variant~='label-stacked']):not([class*="slds-size"]) {
|
|
151
|
-
width: 100%;
|
|
152
|
-
flex-basis: 100%;
|
|
153
|
-
} */
|
|
154
|
-
|
|
155
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element {
|
|
156
|
-
padding: 0;
|
|
157
|
-
margin-block-end: 0;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
161
|
-
border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
|
|
162
|
-
padding-inline-start: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__control {
|
|
166
|
-
width: 100%;
|
|
167
|
-
flex-basis: 100%;
|
|
168
|
-
clear: left;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:host([data-render-mode="shadow"][variant~='label-stacked']) .slds-form-element__icon {
|
|
172
|
-
float: none;
|
|
173
|
-
padding-block-start: var(--sds-g-spacing-1, 0.25rem);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/* --------------------------------------- */
|
|
177
|
-
|
|
178
|
-
/* FORM ELEMENT: INLINE */
|
|
179
|
-
|
|
180
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) {
|
|
181
|
-
display: block;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/*
|
|
185
|
-
we have to combine with slds class here to avoid duplication
|
|
186
|
-
of this rule in child elements who import this stylesheet
|
|
187
|
-
in lighting-input this slds class is synonymous with the variant
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
:host([data-render-mode="shadow"][variant~='label-inline'].slds-form-element_horizontal) {
|
|
191
|
-
padding: var(--sds-g-spacing-1, 0.25rem);
|
|
192
|
-
margin-block-end: var(--sds-g-spacing-2, 0.5rem);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/* TODO: Using `:not` is currently not working, and it could break the build because of issues with the dist script */
|
|
196
|
-
|
|
197
|
-
/* :host([variant~='label-inline']):not(.slds-form-element_readonly) {
|
|
198
|
-
margin-block-end: var(--sds-g-spacing-2);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
:host([variant~='label-inline']):not([class*="slds-size"]) {
|
|
202
|
-
width: 100%;
|
|
203
|
-
flex-basis: 100%;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
:host([variant~='label-inline']:not(.slds-is-editing)) {
|
|
207
|
-
padding: var(--sds-g-spacing-1);
|
|
208
|
-
} */
|
|
209
|
-
|
|
210
|
-
:host([data-render-mode="shadow"][variant~='label-inline']).slds-is-edited {
|
|
211
|
-
padding-block-start: var(--sds-g-sizing-6, 1.25rem)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
@media (min-width: 48em) {
|
|
215
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__label {
|
|
216
|
-
float: left;
|
|
217
|
-
max-width: calc(33% - var(--sds-g-sizing-6, 1.25rem)); /* Removing icon width for when the help-text icon is present */
|
|
218
|
-
flex-basis: calc(33% - var(--sds-g-sizing-6, 1.25rem)); /* Some form element controls are set to display:flex */
|
|
219
|
-
flex-grow: 1; /* For IE and Safari which didn't auto expand to the available space */
|
|
220
|
-
margin-block-end: 0;
|
|
221
|
-
position: relative;
|
|
222
|
-
z-index: 1;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) lightning-helptext {
|
|
226
|
-
float: left;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control {
|
|
230
|
-
margin-inline-start: 33%;
|
|
231
|
-
clear: none; /* Reset clear: left when switching to horizontal form layout */
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__control .slds-form-element__control {
|
|
235
|
-
padding-inline-start: 0; /* Remove left padding on nested form controls, due to issues related to lightning-form components */
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list__column .slds-form-element__label {
|
|
239
|
-
width: auto;
|
|
240
|
-
max-width: 100%;
|
|
241
|
-
-ms-flex-preferred-size: auto;
|
|
242
|
-
flex-basis: auto;
|
|
243
|
-
float: none;
|
|
244
|
-
position: relative;
|
|
245
|
-
padding-inline-start: 0;
|
|
246
|
-
margin-block-end: 0;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-form-element__help {
|
|
250
|
-
margin-inline-start: 33%;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
:host([data-render-mode="shadow"][variant~='label-inline']) .slds-dueling-list {
|
|
254
|
-
clear: none;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/* --------------------------------------- */
|
|
259
|
-
|
|
260
|
-
/* FORM ELEMENT: COMPOUND */
|
|
261
|
-
|
|
262
|
-
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row {
|
|
263
|
-
display: flex;
|
|
264
|
-
margin-bottom: var(--sds-g-spacing-1, 0.25rem);
|
|
265
|
-
margin-left: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
266
|
-
margin-right: calc(var(--sds-g-spacing-1, 0.25rem) * -1);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element__row .slds-form-element__label {
|
|
270
|
-
padding-top: 0;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
:host([data-render-mode="shadow"]) .slds-form-element_compound .slds-form-element {
|
|
274
|
-
padding-left: var(--sds-g-spacing-1, 0.25rem);
|
|
275
|
-
padding-right: var(--sds-g-spacing-1, 0.25rem);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
:host([data-render-mode="shadow"]) .slds-form-element_address .slds-form-element__row {
|
|
279
|
-
align-items: flex-end;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
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
|
-
@supports (--styling-hooks: '') {
|
|
6
|
-
/* Default State */
|
|
7
|
-
:host([data-render-mode="shadow"]) [part~="faux-button"] {
|
|
8
|
-
width: var(--sds-g-sizing-9, 2rem);
|
|
9
|
-
height: var(--sds-g-sizing-9, 2rem);
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
border-radius: var(--sds-g-radius-border-2, 0.25rem);
|
|
14
|
-
border: var(--sds-g-sizing-border-1, 1px) solid var(--slds-c-inputcheckboxbutton-color-border, var(--sds-g-color-neutral-base-80, #c9c9c9));
|
|
15
|
-
background-color: var(--slds-c-inputcheckboxbutton-color-background, var(--sds-g-color-brand-base-100, #ffffff));
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
position: relative;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([data-render-mode="shadow"]) [part~="faux-button"]::before,:host([data-render-mode="shadow"])
|
|
21
|
-
[part~="faux-button"]::after {
|
|
22
|
-
content: "";
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
right: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
height: calc(var(--sds-g-sizing-9, 2rem) * 0.875 / 2);
|
|
29
|
-
width: calc(var(--sds-g-sizing-9, 2rem) * 0.125 / 2);
|
|
30
|
-
margin: auto;
|
|
31
|
-
background-color: var(--slds-c-inputcheckboxbutton-mark-color-foreground, var(--sds-g-color-brand-base-50, #0176d3));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([data-render-mode="shadow"]) [part~="faux-button"]::after {
|
|
35
|
-
height: calc(var(--sds-g-sizing-9, 2rem) * 0.125 / 2);
|
|
36
|
-
width: calc(var(--sds-g-sizing-9, 2rem) * 0.875 / 2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([data-render-mode="shadow"]:focus-within) [part~="faux-button"] {
|
|
40
|
-
box-shadow: 0 0 var(--sds-g-sizing-border-3, 3px) var(--sds-g-color-brand-base-50, #0176d3);
|
|
41
|
-
--slds-c-inputcheckboxbutton-color-border: var(--sds-g-color-brand-base-60, #1b96ff);
|
|
42
|
-
--slds-c-inputcheckboxbutton-color-border-checked: var(--sds-g-color-brand-base-60, #1b96ff);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([data-render-mode="shadow"]) [part~="faux-button"]:hover {
|
|
46
|
-
--slds-c-inputcheckboxbutton-color-background: var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
47
|
-
--slds-c-inputcheckboxbutton-color-background-checked: var(--sds-g-color-brand-base-30, #014486);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:host([data-render-mode="shadow"][disabled]) [part~="faux-button"] {
|
|
51
|
-
cursor: default;
|
|
52
|
-
--slds-c-inputcheckboxbutton-color-border: transparent;
|
|
53
|
-
--slds-c-inputcheckboxbutton-color-background: var(--sds-g-color-neutral-base-95, #f3f3f3);
|
|
54
|
-
--slds-c-inputcheckboxbutton-mark-color-foreground: var(--sds-g-color-neutral-base-60, #939393);
|
|
55
|
-
--slds-c-inputcheckboxbutton-color-border-checked: transparent;
|
|
56
|
-
--slds-c-inputcheckboxbutton-color-background-checked: var(--sds-g-color-neutral-base-100, #ffffff);
|
|
57
|
-
--slds-c-inputcheckboxbutton-mark-color-foreground-checked: var(--sds-g-color-neutral-base-60, #939393);
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Checked State */
|
|
62
|
-
:host([data-render-mode="shadow"][checked]) [part~="faux-button"] {
|
|
63
|
-
--slds-c-inputcheckboxbutton-color-border: var(--slds-c-inputcheckboxbutton-color-border-checked, transparent);
|
|
64
|
-
--slds-c-inputcheckboxbutton-color-background: var(--slds-c-inputcheckboxbutton-color-background-checked, var(--sds-g-color-brand-base-30, #014486));
|
|
65
|
-
--slds-c-inputcheckboxbutton-mark-color-foreground: var(--slds-c-inputcheckboxbutton-mark-color-foreground-checked, var(--sds-g-color-neutral-base-100, #ffffff));
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([data-render-mode="shadow"][checked]) [part~="faux-button"]::before {
|
|
70
|
-
left: calc(var(--sds-g-sizing-9, 2rem) * 0.3125 / 2);
|
|
71
|
-
width: calc(var(--sds-g-sizing-9, 2rem) * 0.125 / 2);
|
|
72
|
-
height: calc(var(--sds-g-sizing-9, 2rem) / 2);
|
|
73
|
-
-webkit-transform: rotate(40deg);
|
|
74
|
-
transform: rotate(40deg);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:host([data-render-mode="shadow"][checked]) [part~="faux-button"]::after {
|
|
78
|
-
top: calc(var(--sds-g-sizing-9, 2rem) * 0.3125 / 2);
|
|
79
|
-
left: calc(var(--sds-g-sizing-9, 2rem) * -0.625 / 2);
|
|
80
|
-
width: calc(var(--sds-g-sizing-9, 2rem) * 0.5625 / 2);
|
|
81
|
-
height: calc(var(--sds-g-sizing-9, 2rem) * 0.125 / 2);
|
|
82
|
-
-webkit-transform: rotate(40deg);
|
|
83
|
-
transform: rotate(40deg);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Help Text
|
|
88
|
-
*
|
|
89
|
-
* Note: not to be confused with lightning-helptext. This is for the text
|
|
90
|
-
* that goes below the input.
|
|
91
|
-
*/
|
|
92
|
-
:host([data-render-mode="shadow"]) [part~='help-text'] {
|
|
93
|
-
font-size: var(--sds-g-font-scale-neg-3, 0.75rem);
|
|
94
|
-
|
|
95
|
-
/* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
|
|
96
|
-
padding-block-start: 0.125rem;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Help Text's Invalid State – Part container is unique to SLDS
|
|
101
|
-
*/
|
|
102
|
-
:host([data-render-mode="shadow"][invalid]) [part~='help-text'] {
|
|
103
|
-
color: var(--sds-g-color-error-base-50, #ea001e);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A temporarily baked-in utility class until SLDS gets a proper utility package.
|
|
109
|
-
*
|
|
110
|
-
* This is a hybrid patch between synthetic and native shadow. The ideal final
|
|
111
|
-
* outcome is the removal of this class and replacing the class with the SLDS
|
|
112
|
-
* utility package solution.
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
:host([data-render-mode="shadow"]) .slds-assistive-text {
|
|
116
|
-
position: absolute !important;
|
|
117
|
-
margin: -1px !important;
|
|
118
|
-
border: 0 !important;
|
|
119
|
-
padding: 0 !important;
|
|
120
|
-
width: 1px !important;
|
|
121
|
-
height: 1px !important;
|
|
122
|
-
overflow: hidden !important;
|
|
123
|
-
clip: rect(0 0 0 0) !important;
|
|
124
|
-
text-transform: none !important;
|
|
125
|
-
white-space: nowrap !important;
|
|
126
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="slds-checkbox_add-button" part="input-checkbox-button">
|
|
3
|
-
<input type="checkbox" id="checkbox-button"
|
|
4
|
-
aria-label={ariaLabel}
|
|
5
|
-
aria-invalid={ariaInvalid}
|
|
6
|
-
accesskey={accessKey}
|
|
7
|
-
class="slds-assistive-text"
|
|
8
|
-
onblur={handleBlur}
|
|
9
|
-
onfocus={handleFocus}
|
|
10
|
-
onchange={handleChange}
|
|
11
|
-
onclick={handleClick}
|
|
12
|
-
name={name}
|
|
13
|
-
required={required}
|
|
14
|
-
readonly={readOnly}
|
|
15
|
-
disabled={disabled}
|
|
16
|
-
part="checkbox">
|
|
17
|
-
<label for="checkbox-button" class="slds-checkbox_faux" part="faux-button">
|
|
18
|
-
<span class="slds-assistive-text" part="label">{label}</span>
|
|
19
|
-
</label>
|
|
20
|
-
</div>
|
|
21
|
-
<template if:true={_helpMessage}>
|
|
22
|
-
<div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{_helpMessage}</div>
|
|
23
|
-
</template>
|
|
24
|
-
</template>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { api } from 'lwc';
|
|
2
|
-
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
|
-
import {
|
|
4
|
-
reflectAttribute,
|
|
5
|
-
normalizeBoolean,
|
|
6
|
-
isNativeComponent,
|
|
7
|
-
} from 'lightning/utilsPrivate';
|
|
8
|
-
export default class LightningPrimitiveInputColor extends LightningShadowBaseClass {
|
|
9
|
-
@api ariaLabel;
|
|
10
|
-
@api ariaInvalid;
|
|
11
|
-
@api accessKey;
|
|
12
|
-
@api name;
|
|
13
|
-
@api required;
|
|
14
|
-
@api readOnly;
|
|
15
|
-
@api label;
|
|
16
|
-
|
|
17
|
-
_checked = false;
|
|
18
|
-
_disabled = false;
|
|
19
|
-
_helpMessage = '';
|
|
20
|
-
|
|
21
|
-
rendered = false;
|
|
22
|
-
initialValueSet = false;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* If present, the checkbox is selected.
|
|
26
|
-
* @type {boolean}
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
@api
|
|
30
|
-
get checked() {
|
|
31
|
-
// checkable inputs can be part of a named group, in that case there won't be a change event thrown and so
|
|
32
|
-
// the internal tracking _checked would be out of sync with the actual input value.
|
|
33
|
-
if (this.initialValueSet) {
|
|
34
|
-
return this.inputElement.checked;
|
|
35
|
-
}
|
|
36
|
-
return this._checked;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
set checked(value) {
|
|
40
|
-
this._checked = normalizeBoolean(value);
|
|
41
|
-
|
|
42
|
-
if (this.rendered) {
|
|
43
|
-
this.inputElement.checked = this._checked;
|
|
44
|
-
}
|
|
45
|
-
reflectAttribute(this, 'checked', this.checked);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* If present, the input field is disabled and users cannot interact with it.
|
|
50
|
-
* @type {boolean}
|
|
51
|
-
* @default false
|
|
52
|
-
*/
|
|
53
|
-
@api
|
|
54
|
-
get disabled() {
|
|
55
|
-
return this._disabled;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
set disabled(value) {
|
|
59
|
-
this._disabled = normalizeBoolean(value);
|
|
60
|
-
reflectAttribute(this, 'disabled', this.disabled);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@api
|
|
64
|
-
get helpMessage() {
|
|
65
|
-
return this._helpMessage;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
set helpMessage(message) {
|
|
69
|
-
this._helpMessage = message;
|
|
70
|
-
reflectAttribute(this, 'invalid', !!message);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@api
|
|
74
|
-
get inputElement() {
|
|
75
|
-
if (!this.cachedInputElement) {
|
|
76
|
-
let inputElement = this.template.querySelector('input');
|
|
77
|
-
this.cachedInputElement = inputElement;
|
|
78
|
-
}
|
|
79
|
-
return this.cachedInputElement;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@api
|
|
83
|
-
get ariaDescribedByElements() {
|
|
84
|
-
return this.template.querySelector('[data-help-message]');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@api
|
|
88
|
-
get isNativeShadow() {
|
|
89
|
-
return this._isNativeShadow;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/********* COMPONENT CALLBACKS *********/
|
|
93
|
-
|
|
94
|
-
connectedCallback() {
|
|
95
|
-
super.connectedCallback();
|
|
96
|
-
this._isNativeShadow = isNativeComponent(this);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
disconnectedCallback() {
|
|
100
|
-
this.cachedInputElement = undefined;
|
|
101
|
-
this.initialValueSet = false;
|
|
102
|
-
this.rendered = false;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
renderedCallback() {
|
|
106
|
-
this.rendered = true;
|
|
107
|
-
if (!this.initialValueSet) {
|
|
108
|
-
this.inputElement.checked = this._checked;
|
|
109
|
-
this.initialValueSet = true;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/********* ACTION HANDLERS *********/
|
|
114
|
-
|
|
115
|
-
handleBlur() {
|
|
116
|
-
this.dispatchEvent(new CustomEvent('blur'));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
handleFocus() {
|
|
120
|
-
this.dispatchEvent(new CustomEvent('focus'));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
handleChange(event) {
|
|
124
|
-
event.stopPropagation();
|
|
125
|
-
this.dispatchCommitEvent();
|
|
126
|
-
this.dispatchChangeEvent();
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
handleClick() {
|
|
130
|
-
if (this.template.activeElement === null) {
|
|
131
|
-
this.template.querySelector("[type='checkbox']").focus();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/********* EVENT DISPATCHERS *********/
|
|
136
|
-
|
|
137
|
-
dispatchChangeEventWithDetail(detail) {
|
|
138
|
-
this.dispatchEvent(
|
|
139
|
-
new CustomEvent('change', {
|
|
140
|
-
composed: true,
|
|
141
|
-
detail,
|
|
142
|
-
})
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
dispatchChangeEvent() {
|
|
147
|
-
const detail = {};
|
|
148
|
-
this._checked = this.inputElement.checked;
|
|
149
|
-
reflectAttribute(this, 'checked', this._checked);
|
|
150
|
-
detail.checked = this._checked;
|
|
151
|
-
this.dispatchChangeEventWithDetail(detail);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
dispatchCommitEvent() {
|
|
155
|
-
this.dispatchEvent(new CustomEvent('commit'));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/********* VALUE UPDATERS *********/
|
|
159
|
-
|
|
160
|
-
setInputValue(value) {
|
|
161
|
-
this.inputElement.value = value;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/********* HELPER METHODS *********/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* TODO: lightning/inputUtils methods should be utilized in the second run of the input
|
|
168
|
-
* breakdown initiative.
|
|
169
|
-
*/
|
|
170
|
-
normalizeInput(value) {
|
|
171
|
-
if (typeof value === 'number' || typeof value === 'string') {
|
|
172
|
-
return String(value);
|
|
173
|
-
}
|
|
174
|
-
return '';
|
|
175
|
-
}
|
|
176
|
-
}
|