lightning-base-components 1.16.3-alpha → 1.16.4-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.
Files changed (104) hide show
  1. package/metadata/raptor.json +106 -0
  2. package/package.json +57 -1
  3. package/scopedImports/@salesforce-label-LightningForm.cancel.js +1 -0
  4. package/scopedImports/@salesforce-label-LightningForm.closeError.js +1 -0
  5. package/scopedImports/@salesforce-label-LightningForm.edit.js +1 -0
  6. package/scopedImports/@salesforce-label-LightningForm.editErrorHelp.js +1 -0
  7. package/scopedImports/@salesforce-label-LightningForm.error.js +1 -0
  8. package/scopedImports/@salesforce-label-LightningForm.errorPopoverHeading.js +1 -0
  9. package/scopedImports/@salesforce-label-LightningForm.preview.js +1 -0
  10. package/scopedImports/@salesforce-label-LightningForm.previewHeader.js +1 -0
  11. package/scopedImports/@salesforce-label-LightningForm.reload.js +1 -0
  12. package/scopedImports/@salesforce-label-LightningForm.save.js +1 -0
  13. package/scopedImports/@salesforce-label-LightningForm.saveFieldErrorSummary.js +1 -0
  14. package/scopedImports/@salesforce-label-LightningForm.undo.js +1 -0
  15. package/scopedImports/@salesforce-label-LightningLookup.messageWhenMissingInformation.js +1 -0
  16. package/src/lightning/button/__docs__/button.md +13 -0
  17. package/src/lightning/button/button.slds.css +155 -11
  18. package/src/lightning/buttonGroup/button-group.slds.css +35 -59
  19. package/src/lightning/buttonIcon/button-icon.slds.css +287 -122
  20. package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +224 -39
  21. package/src/lightning/buttonStateful/button-stateful.slds.css +3269 -0
  22. package/src/lightning/card/card.slds.css +50 -0
  23. package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +180 -364
  24. package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +46 -413
  25. package/src/lightning/datatable/datatable.js +2 -2
  26. package/src/lightning/datatable/rowSelection.js +21 -4
  27. package/src/lightning/datetimepicker/datetimepicker.html +1 -3
  28. package/src/lightning/datetimepicker/datetimepicker.js +5 -0
  29. package/src/lightning/fileDownload/__docs__/fileDownload.md +41 -0
  30. package/src/lightning/helptext/help-text.slds.css +184 -39
  31. package/src/lightning/icon/icon.slds.css +823 -3
  32. package/src/lightning/input/input-checkbox.slds.css +291 -32
  33. package/src/lightning/input/input-text.slds.css +70 -7
  34. package/src/lightning/inputAddress/__docs__/inputAddress.md +1 -1
  35. package/src/lightning/inputAddress/inputAddress.js +2 -1
  36. package/src/lightning/internationalizationLibrary/datetime/intlFormat.js +20 -2
  37. package/src/lightning/iso8601Utils/iso8601Utils.js +2 -3
  38. package/src/lightning/modal/__docs__/migration.md +158 -0
  39. package/src/lightning/modal/__docs__/modal.md +414 -0
  40. package/src/lightning/modal/__examples__disabled/all/all.css +7 -0
  41. package/src/lightning/modal/__examples__disabled/all/all.html +9 -0
  42. package/src/lightning/modal/__examples__disabled/all/all.js +25 -0
  43. package/src/lightning/modal/__examples__disabled/allform/allform.css +7 -0
  44. package/src/lightning/modal/__examples__disabled/allform/allform.html +9 -0
  45. package/src/lightning/modal/__examples__disabled/allform/allform.js +49 -0
  46. package/src/lightning/modal/__examples__disabled/allmulti/allmulti.html +24 -0
  47. package/src/lightning/modal/__examples__disabled/allmulti/allmulti.js +12 -0
  48. package/src/lightning/modal/__examples__disabled/basic/basic.css +7 -0
  49. package/src/lightning/modal/__examples__disabled/basic/basic.html +9 -0
  50. package/src/lightning/modal/__examples__disabled/basic/basic.js +27 -0
  51. package/src/lightning/modal/__examples__disabled/demo/demo.html +15 -0
  52. package/src/lightning/modal/__examples__disabled/demo/demo.js +13 -0
  53. package/src/lightning/modal/__examples__disabled/demoall/demoall.html +26 -0
  54. package/src/lightning/modal/__examples__disabled/demoall/demoall.js +13 -0
  55. package/src/lightning/modal/__examples__disabled/demoallform/demoallform.css +3 -0
  56. package/src/lightning/modal/__examples__disabled/demoallform/demoallform.html +146 -0
  57. package/src/lightning/modal/__examples__disabled/demoallform/demoallform.js +240 -0
  58. package/src/lightning/modal/__examples__disabled/demofootless/demofootless.html +17 -0
  59. package/src/lightning/modal/__examples__disabled/demofootless/demofootless.js +11 -0
  60. package/src/lightning/modal/__examples__disabled/demoheadless/demoheadless.html +20 -0
  61. package/src/lightning/modal/__examples__disabled/demoheadless/demoheadless.js +12 -0
  62. package/src/lightning/modal/__examples__disabled/footless/footless.css +7 -0
  63. package/src/lightning/modal/__examples__disabled/footless/footless.html +9 -0
  64. package/src/lightning/modal/__examples__disabled/footless/footless.js +19 -0
  65. package/src/lightning/modal/__examples__disabled/headless/headless.css +7 -0
  66. package/src/lightning/modal/__examples__disabled/headless/headless.html +9 -0
  67. package/src/lightning/modal/__examples__disabled/headless/headless.js +27 -0
  68. package/src/lightning/modal/modal.html +3 -0
  69. package/src/lightning/modal/modal.js +93 -0
  70. package/src/lightning/modal/modal.js-meta.xml +6 -0
  71. package/src/lightning/modalBody/__docs__/modalBody.md +61 -0
  72. package/src/lightning/modalBody/modalBody.html +13 -0
  73. package/src/lightning/modalBody/modalBody.js +203 -0
  74. package/src/lightning/modalBody/modalBody.js-meta.xml +6 -0
  75. package/src/lightning/modalFooter/__docs__/modalFooter.md +72 -0
  76. package/src/lightning/modalFooter/modalFooter.html +8 -0
  77. package/src/lightning/modalFooter/modalFooter.js +161 -0
  78. package/src/lightning/modalFooter/modalFooter.js-meta.xml +6 -0
  79. package/src/lightning/modalHeader/__docs__/modalHeader.md +64 -0
  80. package/src/lightning/modalHeader/modalHeader.html +16 -0
  81. package/src/lightning/modalHeader/modalHeader.js +204 -0
  82. package/src/lightning/modalHeader/modalHeader.js-meta.xml +6 -0
  83. package/src/lightning/primitiveBubble/tooltip.slds.css +45 -1
  84. package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -12
  85. package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +2994 -319
  86. package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.html +14 -11
  87. package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +1 -0
  88. package/src/lightning/primitiveIcon/icon.slds.css +823 -3
  89. package/src/lightning/radioGroup/input-radio-group.slds.css +168 -379
  90. package/src/lightning/spinner/spinner.slds.css +8 -2
  91. package/src/lightning/timepicker/timepicker.html +1 -4
  92. package/src/lightning/timepicker/timepicker.js +9 -5
  93. package/src/lightning/treeGrid/treeGrid.js +66 -1
  94. package/src/lightning/formattedAddress/__component__/formattedAddress.spec.js +0 -61
  95. package/src/lightning/formattedAddress/__component__/formattedAddressDisabled.spec.js +0 -20
  96. package/src/lightning/formattedAddress/__component__/x/basic/basic.html +0 -10
  97. package/src/lightning/formattedAddress/__component__/x/basic/basic.js +0 -17
  98. package/src/lightning/input/__component__/inputCheckbox.spec.js +0 -60
  99. package/src/lightning/input/__component__/inputDateTimePicker.spec.js +0 -60
  100. package/src/lightning/input/__component__/inputNumber.spec.js +0 -75
  101. package/src/lightning/input/__component__/inputSelection.spec.js +0 -83
  102. package/src/lightning/input/__component__/x/tall/tall.css +0 -5
  103. package/src/lightning/input/__component__/x/tall/tall.html +0 -5
  104. package/src/lightning/input/__component__/x/tall/tall.js +0 -7
@@ -1,3 +1,53 @@
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"]) [part~='card'] {
5
+ padding-block-start: var(--sds-c-card-spacing-block-start, var(--sds-c-card-spacing-block, 0));
6
+ padding-block-end: var(--sds-c-card-spacing-block-end, var(--sds-c-card-spacing-block, 0));
7
+ padding-inline-start: var(--sds-c-card-spacing-inline-start, var(--sds-c-card-spacing-inline, 0));
8
+ padding-inline-end: var(--sds-c-card-spacing-inline-end, var(--sds-c-card-spacing-inline, 0));
9
+ background: var(--sds-c-card-color-background, transparent);
10
+ border-width: var(--sds-c-card-sizing-border, 1px);
11
+ border-style: solid;
12
+ border-color: var(--sds-c-card-color-border, transparent);
13
+ border-radius: var(--sds-c-card-radius-border, 0.25rem);
14
+ background-clip: padding-box;
15
+ box-shadow: var(--sds-c-card-shadow);
16
+ color: var(--sds-c-card-text-color);
17
+ }
18
+
19
+ :host([data-render-mode="shadow"]) [part~='header'] {
20
+ padding-block-start: var(--sds-c-card-header-spacing-block-start, var(--sds-c-card-header-spacing-block));
21
+ padding-block-end: var(--sds-c-card-header-spacing-block-end, var(--sds-c-card-header-spacing-block));
22
+ padding-inline-start: var(
23
+ --sds-c-card-header-spacing-inline-start,
24
+ var(--sds-c-card-header-spacing-inline)
25
+ );
26
+ padding-inline-end: var(--sds-c-card-header-spacing-inline-end, var(--sds-c-card-header-spacing-inline));
27
+ margin-block-end: var(--sds-c-card-header-spacing-block-end);
28
+ }
29
+
30
+ :host([data-render-mode="shadow"]) [part~='body'] {
31
+ margin-block-start: var(--sds-c-card-body-spacing-block-start, var(--sds-c-card-body-spacing-block));
32
+ margin-block-end: var(--sds-c-card-body-spacing-block-end, var(--sds-c-card-body-spacing-block));
33
+ padding-inline-start: var(--sds-c-card-body-spacing-inline-start, var(--sds-c-card-body-spacing-inline));
34
+ padding-inline-end: var(--sds-c-card-body-spacing-inline-end, var(--sds-c-card-body-spacing-inline));
35
+ }
36
+
37
+ :host([data-render-mode="shadow"]) [part~='footer'] {
38
+ padding-block-start: var(--sds-c-card-footer-spacing-block-start, var(--sds-c-card-footer-spacing-block));
39
+ padding-block-end: var(--sds-c-card-footer-spacing-block-end, var(--sds-c-card-footer-spacing-block));
40
+ padding-inline-start: var(
41
+ --sds-c-card-footer-spacing-inline-start,
42
+ var(--sds-c-card-footer-spacing-inline)
43
+ );
44
+ padding-inline-end: var(--sds-c-card-footer-spacing-inline-end, var(--sds-c-card-footer-spacing-inline));
45
+ margin-block-start: var(--sds-c-card-footer-spacing-block-start);
46
+ text-align: var(--sds-c-card-footer-text-align);
47
+ border-top-width: var(--sds-c-card-footer-sizing-border, 1px);
48
+ border-top-style: solid;
49
+ border-top-color: var(--sds-c-card-footer-color-border, transparent);
50
+ }
1
51
 
2
52
  /**
3
53
  * @Note: Static fallbacks are in place until SLDS adopts SDS. Without static
@@ -1,410 +1,226 @@
1
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
- /* Document
5
- * --------------------- */
6
-
7
- /**
8
- * Normalize box sizing to border box for all browsers.
9
- */
10
-
11
- *,
12
- ::before,
13
- ::after {
14
- box-sizing: border-box;
15
- }
16
-
17
- /* Grouping Content
18
- * --------------------- */
19
-
20
- /**
21
- * Add the correct display in IE.
22
- */
23
-
24
- main {
25
- display: block;
26
- }
27
-
28
- /**
29
- * 1. Remove the margin in all browsers.
30
- * 2. Remove the padding in all browsers.
31
- * 3. Normalize font sizes in all browsers.
32
- * 4. Normalize font weight in all browsers.
33
- */
34
-
35
- h1,
36
- h2,
37
- h3,
38
- h4,
39
- h5,
40
- h6 {
41
- font-size: 0.875rem; /* 3 */
42
- font-weight: normal; /* 4 */
43
- margin: 0; /* 1 */
44
- padding: 0; /* 2 */
45
- }
46
-
47
- /**
48
- * Remove the margin in all browsers.
49
- */
50
-
51
- p {
52
- margin: 0;
53
- }
54
-
55
- /**
56
- * 1. Remove the margin in all browsers.
57
- * 2. Normalize border styles in all browsers.
58
- */
59
-
60
- hr {
61
- margin: 0; /* 1 */
62
- border: 0; /* 2 */
63
- border-top-width: 1px; /* 2 */
64
- border-style: solid; /* 2 */
65
- border-color: inherit; /* 2 */
66
- }
67
-
68
- /**
69
- * 1. Remove the margin in all browsers.
70
- * 2. Remove the padding in all browsers.
71
- * 3. Remove the list-style in all browsers, sub-system dependant.
72
- */
73
-
74
- ol,
75
- ul {
76
- list-style: none; /* 3 */
77
- padding: 0; /* 2 */
78
- margin: 0; /* 1 */
79
- }
80
-
81
- /**
82
- * Remove the margin in all browsers.
83
- */
84
-
85
- dl,
86
- dt,
87
- dd {
88
- margin: 0;
89
- }
90
-
91
- /* Form Controls
92
- * --------------------- */
93
-
94
- /**
95
- * Remove the margin in all browsers.
96
- */
97
-
98
- form {
99
- margin: 0;
100
- }
101
-
102
- /**
103
- * 1. Correct font properties not being inherited.
104
- * 2. Remove the margin in Firefox and Safari.
105
- * 3. Fix correct color not being inherited.
106
- */
107
-
108
- button,
109
- input,
110
- optgroup,
111
- select,
112
- textarea {
113
- font: inherit; /* 1 */
114
- margin: 0; /* 2 */
115
- color: inherit; /* 3 */
116
- }
117
-
118
- /**
119
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
120
- */
121
-
122
- button,
123
- select {
124
- text-transform: none;
125
- }
126
-
127
- /**
128
- * 1. Correct inability to style clickable `input` types in iOS.
129
- * 2. Normalizes cursor indicator on clickable elements.
130
- */
131
-
132
- button,:host([data-render-mode="shadow"])
133
- [type='button'],:host([data-render-mode="shadow"])
134
- [type='reset'],:host([data-render-mode="shadow"])
135
- [type='submit'] {
136
- -webkit-appearance: button; /* 1 */
137
- appearance: button; /* 1 */
138
- cursor: pointer; /* 2 */
139
- }
140
-
141
- /**
142
- * Prevent option or optgroup to increase the width of a select.
143
- */
144
-
145
- select {
146
- max-width: 100%;
147
- }
148
-
149
- /**
150
- * Correct the outline style in Safari.
151
- */
152
-
153
- input:focus,
154
- button:focus,
155
- select:focus,
156
- textarea:focus {
157
- outline-offset: 0;
158
- }
2
+ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
159
3
 
160
- /**
161
- * Remove the inner border and padding in Firefox.
162
- */
4
+ /* The Input Control Container holds the `start` and `end` slot contents, as well as the input control itself */
163
5
 
164
- ::-moz-focus-inner {
165
- border-style: none;
6
+ :host([data-render-mode="shadow"]) [part~='input-container'] {
7
+ display: flex;
8
+ align-items: center;
9
+ position: relative;
10
+ min-height: var(--sds-c-inputtext-sizing-height);
11
+ padding-inline-end: var(--sds-c-inputtext-spacing-inline-end, var(--sds-c-inputtext-spacing-inline));
12
+ padding-inline-start: var(--sds-c-inputtext-spacing-inline-start, var(--sds-c-inputtext-spacing-inline));
13
+ background-color: var(--sds-c-inputtext-color-background, var(--sds-g-color-neutral-base-1));
14
+ border-width: var(--sds-c-inputtext-sizing-border, var(--sds-g-sizing-border-1, 1px));
15
+ border-style: solid;
16
+ border-color: var(--sds-c-inputtext-color-border, var(--sds-g-color-neutral-base-contrast-3));
17
+ border-radius: var(--sds-c-inputtext-radius-border);
18
+ box-shadow: var(--sds-c-inputtext-shadow);
19
+ }
20
+
21
+ /* The Input element (in markup) */
22
+
23
+ :host([data-render-mode="shadow"]) [part~='input'] {
24
+ width: 100%;
25
+ height: 100%;
166
26
  padding: 0;
27
+ font-size: var(--sds-c-inputtext-font-size);
28
+ color: var(--sds-c-inputtext-text-color);
29
+ line-height: 1;
30
+ border: none;
31
+ background: transparent;
167
32
  }
168
33
 
169
- /**
170
- * 1. Correct the text wrapping in Edge 18- and IE.
171
- * 2. Correct the color inheritance from `fieldset` elements in IE.
172
- * 3. Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
173
- */
174
-
175
- legend {
176
- color: inherit; /* 2 */
177
- display: table; /* 1 */
178
- max-width: 100%; /* 1 */
179
- white-space: normal; /* 1 */
180
- padding: 0; /* 3 */
181
- }
182
-
183
- /**
184
- * Add the correct vertical alignment in Chrome and Firefox.
185
- */
186
-
187
- progress {
188
- vertical-align: baseline;
189
- }
190
-
191
- /**
192
- * Correct the cursor style of increment and decrement buttons in Safari.
193
- */
34
+ /* Placeholder Text */
194
35
 
195
- ::-webkit-inner-spin-button,
196
- ::-webkit-outer-spin-button {
197
- height: auto;
36
+ :host([data-render-mode="shadow"]) [part~='input']::placeholder {
37
+ color: var(--sds-c-inputtext-text-color-placeholder);
38
+ font-style: var(--sds-c-inputtext-font-style-placeholder);
198
39
  }
199
40
 
200
- /**
201
- * 1. Correct the odd appearance in Chrome and Safari.
202
- * 2. Correct the outline style in Safari.
203
- */
41
+ /* Focus State */
204
42
 
205
- :host([data-render-mode="shadow"]) [type='search'] {
206
- -webkit-appearance: textfield; /* 1 */
207
- outline-offset: -2px; /* 2 */
43
+ :host([data-render-mode="shadow"]) [part~='input-container']:focus-within {
44
+ --sds-c-inputtext-color-border: var(
45
+ --sds-c-inputtext-color-border-focus,
46
+ var(--sds-g-color-palette-blue-50, #0176d3)
47
+ );
48
+ --sds-c-inputtext-shadow: var(--sds-c-inputtext-shadow-focus, 0 0 3px var(--sds-g-color-palette-blue-50, #0176d3));
49
+ --sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-focus);
50
+ --sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-focus);
208
51
  }
209
52
 
210
- /**
211
- * Remove the inner padding in Chrome and Safari on macOS.
212
- */
213
-
214
- ::-webkit-search-decoration {
215
- -webkit-appearance: none;
53
+ :host([data-render-mode="shadow"]) [part~='input']:focus {
54
+ outline: none;
216
55
  }
217
56
 
218
- /**
219
- * 1. Correct the inability to style clickable types in iOS and Safari.
220
- * 2. Change font properties to 'inherit' in Safari.
221
- */
57
+ /* Invalid state */
222
58
 
223
- ::-webkit-file-upload-button {
224
- -webkit-appearance: button; /* 1 */
225
- font: inherit; /* 2 */
59
+ :host([data-render-mode="shadow"][aria-invalid='true']) [part~='input-container'] {
60
+ --sds-c-inputtext-color-border: var(--sds-c-inputtext-color-border-invalid);
61
+ --sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-invalid);
226
62
  }
227
63
 
228
- /**
229
- * Restore the focus styles unset by the previous rule.
230
- */
231
-
232
- :-moz-focusring {
233
- outline: 1px dotted ButtonText;
64
+ :host([data-render-mode="shadow"][aria-invalid='true']) [part~='input'] {
65
+ --sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-invalid);
234
66
  }
235
67
 
236
- /**
237
- * Remove the additional ':invalid' styles in Firefox.
238
- * See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
239
- */
68
+ /* Valid State */
240
69
 
241
- :-moz-ui-invalid {
242
- box-shadow: none;
70
+ :host([data-render-mode="shadow"][aria-invalid='false']) [part~='input-container'] {
71
+ --sds-c-inputtext-color-border: var(--sds-c-inputtext-color-border-valid);
72
+ --sds-c-inputtext-color-background: var(--sds-c-inputtext-color-background-valid);
243
73
  }
244
74
 
245
- /* Text-level semantics
246
- * --------------------- */
247
-
248
- /**
249
- * Normalizes cursor indicator on clickable elements.
250
- */
251
-
252
- a {
253
- cursor: pointer;
75
+ :host([data-render-mode="shadow"][aria-invalid='false']) [part~='input'] {
76
+ --sds-c-inputtext-text-color: var(--sds-c-inputtext-text-color-valid);
254
77
  }
255
78
 
256
- /**
257
- * Add the correct text decoration in Chrome, Edge, and Safari.
258
- */
259
-
260
- abbr[title] {
261
- text-decoration: underline dotted;
262
- cursor: help;
263
- }
264
-
265
- /**
266
- * Add the correct font weight in Edge and Safari.
267
- */
268
-
269
- b,
270
- strong {
271
- font-weight: bolder;
272
- }
79
+ /* Readonly State */
273
80
 
274
- /**
275
- * 1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
276
- * 2. Correct the odd 'em' font sizing in all browsers.
277
- * 3. Remove the margin in all browsers.
278
- */
279
-
280
- code,
281
- kbd,
282
- samp,
283
- pre {
284
- font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; /* 1 */
285
- font-size: 1em; /* 2 */
286
- margin: 0; /* 3 */
81
+ :host([data-render-mode="shadow"][readonly]) [part~='input-container'] {
82
+ --sds-c-inputtext-sizing-border: var(--sds-c-inputtext-sizing-border-readonly);
83
+ --sds-c-inputtext-spacing-inline-start: var(
84
+ --sds-c-inputtext-spacing-inline-start-readonly,
85
+ var(--sds-c-inputtext-spacing-inline-readonly)
86
+ );
87
+ --sds-c-inputtext-spacing-inline-end: var(
88
+ --sds-c-inputtext-spacing-inline-end-readonly,
89
+ var(--sds-c-inputtext-spacing-inline-readonly)
90
+ );
287
91
  }
288
92
 
289
- /**
290
- * Prevent overflow of the container in all browsers
291
- */
93
+ /* Disabled State */
292
94
 
293
- pre {
294
- overflow: auto;
295
- -ms-overflow-style: scrollbar;
95
+ :host([data-render-mode="shadow"][disabled]) [part~='input-container'] {
96
+ --sds-c-inputtext-text-color: #3e3e3c; /* TODO: Replace with Global Styling Hook Fallback */
97
+ --sds-c-inputtext-color-background: #ecebea; /* TODO: Replace with Global Styling Hook Fallback */
98
+ --sds-c-inputtext-color-border: #c9c7c5; /* TODO: Replace with Global Styling Hook Fallback */
296
99
  }
297
100
 
298
- /**
299
- * Add the correct font size in all browsers.
300
- */
301
-
302
- small {
303
- font-size: 80%;
304
- }
305
-
306
- /**
307
- * Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
308
- */
309
-
310
- sub,
311
- sup {
312
- font-size: 75%;
313
- line-height: 0;
314
- position: relative;
315
- vertical-align: baseline;
316
- }
317
-
318
- sub {
319
- bottom: -0.25em;
320
- }
101
+ @supports (--styling-hooks: '') {
102
+ /**
103
+ * Input Text
104
+ */
105
+ :host([data-render-mode="shadow"]) [part~='input-text'] {
106
+ /* Host reassignments to composed slds-icon */
107
+ --slds-c-icon-color-foreground: var(
108
+ --slds-c-inputtext-icon-color-foreground,
109
+ var(--sds-g-color-neutral-base-50, #747474)
110
+ );
111
+ --slds-c-icon-sizing: var(--slds-c-inputtext-icon-sizing, 14px);
321
112
 
322
- sup {
323
- top: -0.5em;
324
- }
113
+ --sds-c-inputtext-spacing-inline-start: var(
114
+ --slds-c-inputtext-spacing-inline-start,
115
+ var(--sds-g-spacing-3, 0.75rem)
116
+ );
117
+ --sds-c-inputtext-spacing-inline-end: var(--slds-c-inputtext-spacing-inline-end, var(--sds-g-spacing-4, 1rem));
118
+ --sds-c-inputtext-sizing-height: var(--slds-c-inputtext-sizing-height, 1.875rem);
119
+ --sds-c-inputtext-color-background: var(--slds-c-inputtext-color-background);
120
+ --sds-c-inputtext-text-color: var(--slds-c-inputtext-text-color);
121
+ --sds-c-inputtext-font-size: var(--slds-c-inputtext-font-size, var(--sds-g-font-scale-neg-2, 0.8125rem));
122
+ --sds-c-inputtext-text-color-placeholder: var(
123
+ --slds-c-inputtext-text-color-placeholder,
124
+ var(--sds-g-color-neutral-base-50, #747474)
125
+ );
126
+ --sds-c-inputtext-color-border: var(--slds-c-inputtext-color-border, var(--sds-g-color-neutral-base-80, #c9c9c9));
127
+ --sds-c-inputtext-sizing-border: var(--slds-c-inputtext-sizing-border);
128
+ --sds-c-inputtext-radius-border: var(--slds-c-inputtext-radius-border, var(--sds-g-radius-border-2, 0.25rem));
325
129
 
326
- /* Embedded content
327
- * --------------------- */
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ align-items: center;
328
133
 
329
- /**
330
- * Change the alignment on media elements in all browsers.
331
- */
134
+ /* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
135
+ row-gap: 0.125rem;
136
+ }
332
137
 
333
- audio,
334
- canvas,
335
- iframe,
336
- img,
337
- svg,
338
- video {
339
- vertical-align: middle;
340
- }
138
+ /**
139
+ * Read Only State
140
+ */
141
+ :host([data-render-mode="shadow"][readonly]) [part~='input-text'] {
142
+ --sds-c-inputtext-spacing-inline-start-readonly: 0;
143
+ --slds-c-inputtext-color-border: transparent;
144
+ --slds-c-inputtext-color-background: transparent;
145
+ }
341
146
 
342
- /**
343
- * Make images responsive by default.
344
- */
147
+ /**
148
+ * Invalid State
149
+ */
150
+ :host([data-render-mode="shadow"][aria-invalid]) [part~='input-text'] {
151
+ --sds-c-inputtext-color-border-invalid: var(--sds-g-color-error-base-50, #ea001e);
152
+ --slds-c-inputtext-sizing-border: var(--sds-g-sizing-border-2, 2px);
153
+ --slds-c-icon-color-foreground: var(--sds-g-color-error-base-50, #ea001e);
154
+ }
345
155
 
346
- img,:host([data-render-mode="shadow"])
347
- [type='image'] {
348
- max-width: 100%;
349
- height: auto;
350
- }
156
+ /**
157
+ * Disabled State
158
+ *
159
+ * Both parts form the visible form control.
160
+ */
161
+ :host([data-render-mode="shadow"][disabled]) [part~='input-container'],:host([data-render-mode="shadow"][disabled]) [part~='input'] {
162
+ cursor: not-allowed;
163
+ }
351
164
 
352
- /**
353
- * Remove the border on iframes in all browsers.
354
- */
165
+ /**
166
+ * Label
167
+ */
168
+ :host([data-render-mode="shadow"]) [part='label'] {
169
+ padding-inline-end: var(--sds-g-spacing-2, 0.5rem);
170
+ color: var(--slds-c-inputtext-label-color, var(--sds-g-color-neutral-base-30, #444444));
171
+ font-size: var(--slds-c-inputtext-label-font-size, var(--sds-g-font-scale-neg-3, 0.75rem));
355
172
 
356
- iframe {
357
- border-style: none;
358
- }
173
+ /* We inline flex to control the spacing between elements and not have to rely on whitespace characters */
174
+ display: inline-flex;
359
175
 
360
- /**
361
- * Change the fill color to match the text color in all browsers.
362
- */
176
+ /* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
177
+ column-gap: 0.125rem;
178
+ }
363
179
 
364
- svg:not([fill]) {
365
- fill: currentColor;
366
- }
180
+ /**
181
+ * Label's Required Symbol
182
+ */
183
+ :host([data-render-mode="shadow"]) [part='label'] [title='required'] {
184
+ color: var(--sds-g-color-error-base-50, #ea001e);
185
+ }
367
186
 
368
- /* Tabular data
369
- * --------------------- */
187
+ /**
188
+ * Input Container
189
+ */
190
+ :host([data-render-mode="shadow"]) [part='input-container'] {
191
+ flex: 1 0 100%;
192
+ }
370
193
 
371
- /**
372
- * 1. Remove text indentation from table contents in Chrome and Safari. [Chromium Bug 999088](https://bugs.chromium.org/p/chromium/issues/detail?id=999088), [Webkit Bug 201297](https://bugs.webkit.org/show_bug.cgi?id=201297)
373
- * 2. Correct table border color inheritance in all Chrome and Safari. [Chromium Bug 935729](https://bugs.chromium.org/p/chromium/issues/detail?id=935729), [Webkit Bug 195016](https://bugs.webkit.org/show_bug.cgi?id=195016)
374
- * 3. Collapse border spacing in all browsers
375
- */
194
+ /**
195
+ * Help Text
196
+ *
197
+ * Note: not to be confused with lightning-helptext. This is for the text
198
+ * that goes below the input.
199
+ */
200
+ :host([data-render-mode="shadow"]) [part='help-text'] {
201
+ font-size: var(--slds-c-inputtext-helptext-font-size, var(--sds-g-font-scale-neg-3, 0.75rem));
202
+
203
+ /* TODO: Add global hook once SLDS creates a new spacing hook that equals the value needed here */
204
+ padding-block-start: 0.125rem;
205
+ }
376
206
 
377
- table {
378
- text-indent: 0; /* 1 */
379
- border-color: inherit; /* 2 */
380
- border-collapse: collapse; /* 3 */
381
- }
207
+ /**
208
+ * Help Text's Invalid State – Part container is unique to SLDS
209
+ */
210
+ :host([data-render-mode="shadow"][aria-invalid]) [part='help-text'] {
211
+ color: var(--sds-g-color-error-base-50, #ea001e);
212
+ }
382
213
 
383
- /* Shadow host
384
- * --------------------- */
385
-
386
- /**
387
- * 1. Change the line height in all browsers
388
- * 2. Change the base font size in all browsers, inherit 100% from `html`
389
- * 3. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS
390
- * 4. Remove the grey highlight on links in iOS
391
- * 5. Font Stack:
392
- * a. Safari for OS X and iOS (San Francisco)
393
- * b. Chrome < 56 for OS X (San Francisco)
394
- * c. Windows
395
- * d. Android
396
- * e. Web Fallback
397
- * f. Emoji font stack [Mac, Windows, Linux]
398
- */
399
-
400
- :host([data-render-mode="shadow"]) {
401
- line-height: 1.5;
402
- font-size: 0.875rem;
403
- -webkit-tap-highlight-color: transparent;
404
- -ms-text-size-adjust: 100%;
405
- -webkit-text-size-adjust: 100%;
406
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif,
407
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
214
+ /**
215
+ * Start
216
+ *
217
+ * Only expects an SLDS icon. We assign the SLDS Icon Styling Hook here
218
+ * so we don't add spacing to other icons composed in the component, e.g.,
219
+ * the icon in the inline help text.
220
+ */
221
+ :host([data-render-mode="shadow"]) [part~='start'] {
222
+ --slds-c-icon-spacing-inline-end: var(--sds-g-spacing-2, 0.5rem);
223
+ }
408
224
  }
409
225
 
410
226
  /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
@@ -619,7 +435,7 @@ table {
619
435
  font-size: var(--sds-g-spacing-3, 0.75rem);
620
436
  }
621
437
 
622
- abbr[title] {
438
+ :host([data-render-mode="shadow"]) abbr[title] {
623
439
  text-decoration: none;
624
440
  }
625
441
  }