@equinor/eds-core-react 2.3.7 → 2.4.0-beta.0

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 (49) hide show
  1. package/build/index.css +389 -39
  2. package/build/index.min.css +1 -1
  3. package/dist/eds-core-react.cjs +29 -23
  4. package/dist/esm/components/Autocomplete/AutocompleteContext.js +2 -2
  5. package/dist/esm/components/Autocomplete/MultipleInput.js +2 -2
  6. package/dist/esm/components/Autocomplete/OptionList.js +6 -4
  7. package/dist/esm/components/Autocomplete/useAutocomplete.js +4 -0
  8. package/dist/esm/components/Datepicker/calendars/CalendarGrid.js +4 -8
  9. package/dist/esm/components/Datepicker/calendars/CalendarHeader.js +6 -6
  10. package/dist/esm/components/Datepicker/fields/DateSegment.js +4 -1
  11. package/dist/esm/components/InputWrapper/InputWrapper.js +1 -1
  12. package/dist/esm/components/Popover/Popover.js +4 -4
  13. package/dist/esm/components/Textarea/Textarea.js +1 -1
  14. package/dist/esm-next/components/next/Banner/Banner.js +88 -0
  15. package/dist/esm-next/components/next/Button/Button.js +1 -0
  16. package/dist/esm-next/components/next/Icon/Icon.js +27 -1
  17. package/dist/esm-next/components/next/Input/Input.js +1 -1
  18. package/dist/esm-next/components/next/Link/Link.js +24 -0
  19. package/dist/esm-next/components/next/Search/Search.js +118 -0
  20. package/dist/esm-next/components/next/TextArea/TextArea.js +131 -0
  21. package/dist/esm-next/components/next/Tooltip/Tooltip.js +84 -0
  22. package/dist/esm-next/index.next.js +5 -0
  23. package/dist/index.next.cjs +445 -6
  24. package/dist/types/components/Autocomplete/AutocompleteContext.d.ts +2 -2
  25. package/dist/types/components/Autocomplete/useAutocomplete.d.ts +2 -2
  26. package/dist/types/components/next/Banner/Banner.d.ts +23 -0
  27. package/dist/types/components/next/Banner/Banner.figma.d.ts +1 -0
  28. package/dist/types/components/next/Banner/Banner.types.d.ts +33 -0
  29. package/dist/types/components/next/Banner/index.d.ts +2 -0
  30. package/dist/types/components/next/Icon/Icon.d.ts +0 -1
  31. package/dist/types/components/next/Input/Input.types.d.ts +4 -1
  32. package/dist/types/components/next/Link/Link.d.ts +4 -0
  33. package/dist/types/components/next/Link/Link.figma.d.ts +1 -0
  34. package/dist/types/components/next/Link/Link.types.d.ts +11 -0
  35. package/dist/types/components/next/Link/index.d.ts +2 -0
  36. package/dist/types/components/next/Search/Search.d.ts +9 -0
  37. package/dist/types/components/next/Search/Search.figma.d.ts +1 -0
  38. package/dist/types/components/next/Search/Search.types.d.ts +16 -0
  39. package/dist/types/components/next/Search/index.d.ts +2 -0
  40. package/dist/types/components/next/TextArea/TextArea.d.ts +11 -0
  41. package/dist/types/components/next/TextArea/TextArea.figma.d.ts +1 -0
  42. package/dist/types/components/next/TextArea/TextArea.types.d.ts +21 -0
  43. package/dist/types/components/next/TextArea/index.d.ts +2 -0
  44. package/dist/types/components/next/Tooltip/Tooltip.d.ts +7 -0
  45. package/dist/types/components/next/Tooltip/Tooltip.figma.d.ts +1 -0
  46. package/dist/types/components/next/Tooltip/Tooltip.types.d.ts +17 -0
  47. package/dist/types/components/next/Tooltip/index.d.ts +2 -0
  48. package/dist/types/components/next/index.d.ts +10 -0
  49. package/package.json +41 -34
package/build/index.css CHANGED
@@ -104,13 +104,9 @@
104
104
  [data-tracking=wide],[data-tracking=loose]{--eds-typography-tracking:var(--eds-typography-tracking-wide)}
105
105
  @layer eds-components {
106
106
  /* Inline with text: uses token from parent's data-font-size, or 1.5em fallback */
107
- .icon {
108
- /*
109
- * Set font-size first to establish the icon's size context.
110
- * Then use 1em for width/height (relative to computed font-size).
111
- * This avoids compound scaling (1.5em × 1.5em = 2.25em would be wrong).
112
- */
113
- font-size: var(--eds-typography-icon-size, 1.5em);
107
+ .eds-icon {
108
+ flex-shrink: 0;
109
+
114
110
  width: 1em;
115
111
  height: 1em;
116
112
 
@@ -118,11 +114,16 @@
118
114
  margin-block: -0.25em;
119
115
  margin-inline: -0.1em;
120
116
 
121
- flex-shrink: 0;
117
+ /*
118
+ * font-size establishes the icon's size context.
119
+ * width/height use 1em (relative to this computed font-size).
120
+ * This avoids compound scaling (1.5em × 1.5em = 2.25em would be wrong).
121
+ */
122
+ font-size: var(--eds-typography-icon-size, 1.5em);
122
123
  }
123
124
 
124
125
  /* Explicit size: fixed size from design tokens, no margins */
125
- .icon[data-icon-size] {
126
+ .eds-icon[data-icon-size] {
126
127
  --_explicit-size: var(--eds-sizing-icon-md); /* fallback */
127
128
 
128
129
  width: var(--_explicit-size);
@@ -131,52 +132,65 @@
131
132
  font-size: inherit;
132
133
  }
133
134
 
134
- .icon[data-icon-size='xs'] {
135
+ .eds-icon[data-icon-size='xs'] {
135
136
  --_explicit-size: var(--eds-sizing-icon-xs);
136
137
  }
137
- .icon[data-icon-size='sm'] {
138
+
139
+ .eds-icon[data-icon-size='sm'] {
138
140
  --_explicit-size: var(--eds-sizing-icon-sm);
139
141
  }
140
- .icon[data-icon-size='md'] {
142
+
143
+ .eds-icon[data-icon-size='md'] {
141
144
  --_explicit-size: var(--eds-sizing-icon-md);
142
145
  }
143
- .icon[data-icon-size='lg'] {
146
+
147
+ .eds-icon[data-icon-size='lg'] {
144
148
  --_explicit-size: var(--eds-sizing-icon-lg);
145
149
  }
146
- .icon[data-icon-size='xl'] {
150
+
151
+ .eds-icon[data-icon-size='xl'] {
147
152
  --_explicit-size: var(--eds-sizing-icon-xl);
148
153
  }
149
- .icon[data-icon-size='2xl'] {
154
+
155
+ .eds-icon[data-icon-size='2xl'] {
150
156
  --_explicit-size: var(--eds-sizing-icon-2xl);
151
157
  }
152
- .icon[data-icon-size='3xl'] {
158
+
159
+ .eds-icon[data-icon-size='3xl'] {
153
160
  --_explicit-size: var(--eds-sizing-icon-3xl);
154
161
  }
155
- .icon[data-icon-size='4xl'] {
162
+
163
+ .eds-icon[data-icon-size='4xl'] {
156
164
  --_explicit-size: var(--eds-sizing-icon-4xl);
157
165
  }
158
- .icon[data-icon-size='5xl'] {
166
+
167
+ .eds-icon[data-icon-size='5xl'] {
159
168
  --_explicit-size: var(--eds-sizing-icon-5xl);
160
169
  }
161
- .icon[data-icon-size='6xl'] {
170
+
171
+ .eds-icon[data-icon-size='6xl'] {
162
172
  --_explicit-size: var(--eds-sizing-icon-6xl);
163
173
  }
164
174
  }
165
175
  @layer eds-components {
166
176
  .eds-button {
177
+ cursor: pointer;
178
+
167
179
  /* Layout */
168
180
  display: inline-flex;
169
181
  align-items: center;
170
182
  justify-content: center;
183
+
171
184
  box-sizing: border-box;
172
185
 
173
186
  /* Appearance */
174
187
  border: none;
175
188
  border-radius: var(--eds-spacing-border-radius-rounded, 4px);
176
- cursor: pointer;
177
- outline: none;
189
+
178
190
  text-decoration: none;
179
191
 
192
+ outline: none;
193
+
180
194
  /* Transitions */
181
195
  transition:
182
196
  background-color 150ms ease-in-out,
@@ -194,21 +208,21 @@
194
208
  */
195
209
 
196
210
  .eds-button[data-selectable-space='lg'] {
211
+ gap: var(--eds-typography-gap-horizontal);
197
212
  min-height: 2.75rem; /* 44px */
198
213
  padding-inline: var(--eds-selectable-space-horizontal);
199
- gap: var(--eds-typography-gap-horizontal);
200
214
  }
201
215
 
202
216
  .eds-button[data-selectable-space='md'] {
217
+ gap: var(--eds-typography-gap-horizontal);
203
218
  min-height: 2.25rem; /* 36px */
204
219
  padding-inline: var(--eds-selectable-space-horizontal);
205
- gap: var(--eds-typography-gap-horizontal);
206
220
  }
207
221
 
208
222
  .eds-button[data-selectable-space='sm'] {
223
+ gap: var(--eds-typography-gap-horizontal);
209
224
  min-height: 1.5rem; /* 24px */
210
225
  padding-inline: var(--eds-selectable-space-horizontal);
211
- gap: var(--eds-typography-gap-horizontal);
212
226
  }
213
227
 
214
228
  /* Comfortable density */
@@ -242,8 +256,8 @@
242
256
  /* ===== PRIMARY VARIANT ===== */
243
257
 
244
258
  .eds-button[data-variant='primary'] {
245
- background-color: var(--eds-color-bg-fill-emphasis-default);
246
259
  color: var(--eds-color-text-strong-on-emphasis);
260
+ background-color: var(--eds-color-bg-fill-emphasis-default);
247
261
  }
248
262
 
249
263
  .eds-button[data-variant='primary']:hover:not(:disabled) {
@@ -255,16 +269,16 @@
255
269
  }
256
270
 
257
271
  .eds-button[data-variant='primary']:disabled {
258
- background-color: var(--eds-color-bg-fill-emphasis-disabled);
259
- color: var(--eds-color-text-disabled);
260
272
  cursor: not-allowed;
273
+ color: var(--eds-color-text-disabled);
274
+ background-color: var(--eds-color-bg-fill-emphasis-disabled);
261
275
  }
262
276
 
263
277
  /* ===== SECONDARY VARIANT ===== */
264
278
 
265
279
  .eds-button[data-variant='secondary'] {
266
- background-color: transparent;
267
280
  color: var(--eds-color-text-subtle);
281
+ background-color: transparent;
268
282
  outline: var(--eds-border-width-default, 1px) solid
269
283
  var(--eds-color-border-strong);
270
284
  outline-offset: calc(-1 * var(--eds-border-width-default, 1px));
@@ -279,18 +293,18 @@
279
293
  }
280
294
 
281
295
  .eds-button[data-variant='secondary']:disabled {
296
+ cursor: not-allowed;
297
+ color: var(--eds-color-text-disabled);
282
298
  outline: var(--eds-border-width-default, 1px) solid
283
299
  var(--eds-color-border-disabled);
284
300
  outline-offset: calc(-1 * var(--eds-border-width-default, 1px));
285
- color: var(--eds-color-text-disabled);
286
- cursor: not-allowed;
287
301
  }
288
302
 
289
303
  /* ===== GHOST VARIANT ===== */
290
304
 
291
305
  .eds-button[data-variant='ghost'] {
292
- background-color: transparent;
293
306
  color: var(--eds-color-text-subtle);
307
+ background-color: transparent;
294
308
  }
295
309
 
296
310
  .eds-button[data-variant='ghost']:hover:not(:disabled) {
@@ -302,8 +316,8 @@
302
316
  }
303
317
 
304
318
  .eds-button[data-variant='ghost']:disabled {
305
- color: var(--eds-color-text-disabled);
306
319
  cursor: not-allowed;
320
+ color: var(--eds-color-text-disabled);
307
321
  }
308
322
 
309
323
  /* ===== FOCUS STATE ===== */
@@ -322,12 +336,12 @@
322
336
  /* Icons inherit size from Typography via --eds-typography-icon-size */
323
337
  /* Icons use em-based negative margins from icon.css for optical alignment */
324
338
 
325
- .eds-button .icon {
339
+ .eds-button .eds-icon {
326
340
  flex-shrink: 0;
327
341
  }
328
342
 
329
343
  /* Icon-only buttons: remove negative margins since flexbox handles centering */
330
- .eds-button[data-icon-only] .icon {
344
+ .eds-button[data-icon-only] .eds-icon {
331
345
  margin: 0;
332
346
  }
333
347
  }
@@ -339,12 +353,14 @@
339
353
  * text-box/padding-block reset disables typography.css baseline padding —
340
354
  * button handles its own sizing via min-height + flexbox centering.
341
355
  */
342
- .eds-button > span {
356
+ .eds-button__label {
343
357
  display: inline-flex;
344
- align-items: center;
345
358
  gap: var(--eds-typography-gap-horizontal);
346
- text-box: normal;
359
+ align-items: center;
360
+
347
361
  padding-block: 0;
362
+
363
+ text-box: normal;
348
364
  }
349
365
  @layer eds-components {
350
366
  .eds-field {
@@ -1027,8 +1043,7 @@
1027
1043
 
1028
1044
  /* Input/Textarea element */
1029
1045
  .eds-input {
1030
- /* Temporary alias until proper placeholder text token is available */
1031
- --_placeholder-text-color: var(--eds-color-border-strong);
1046
+ --_placeholder-text-color: var(--eds-color-text-subtle);
1032
1047
 
1033
1048
  flex: 1;
1034
1049
  min-inline-size: 0;
@@ -1115,4 +1130,339 @@
1115
1130
  margin-block: calc(var(--eds-sizing-icon-xs) / -2);
1116
1131
  }
1117
1132
  }
1133
+ @layer eds-components {
1134
+ .eds-text-area {
1135
+ & .label-row {
1136
+ display: flex;
1137
+ align-items: center;
1138
+ justify-content: space-between;
1139
+ gap: var(--eds-typography-gap-horizontal);
1140
+ inline-size: 100%;
1141
+
1142
+ & > button {
1143
+ flex-shrink: 0;
1144
+ margin-block: calc(var(--eds-sizing-icon-xs) / -2);
1145
+ }
1146
+ }
1147
+
1148
+ & .eds-input-container {
1149
+ align-items: flex-start;
1150
+ padding-block: var(--eds-container-space-vertical);
1151
+ overflow: hidden;
1152
+
1153
+ & textarea.eds-input {
1154
+ box-sizing: border-box;
1155
+ overflow: auto;
1156
+ white-space: pre-wrap;
1157
+ text-overflow: clip;
1158
+ resize: vertical;
1159
+ padding-block-end: var(--eds-container-space-vertical);
1160
+ padding-inline-end: var(--eds-selectable-space-horizontal);
1161
+ }
1162
+
1163
+ &:has(+ .helper-row) {
1164
+ margin-block-end: calc(
1165
+ var(--eds-spacing-vertical-3xs) - var(--eds-generic-gap-vertical)
1166
+ );
1167
+ }
1168
+ }
1169
+
1170
+ & .helper-row {
1171
+ display: flex;
1172
+ align-items: baseline;
1173
+ gap: var(--eds-typography-gap-horizontal);
1174
+ inline-size: 100%;
1175
+ }
1176
+
1177
+ & .char-count {
1178
+ flex-shrink: 0;
1179
+ color: var(--eds-color-text-subtle);
1180
+ }
1181
+ }
1182
+ }
1183
+ /* Must be outside @layer: [data-font-family] { margin: 0 } in variables.css
1184
+ is unlayered and overrides any margin inside @layer eds-components. */
1185
+ .eds-text-area {
1186
+ & .eds-error-icon {
1187
+ margin-block-start: var(--eds-spacing-vertical-2xs);
1188
+ }
1189
+
1190
+ & .char-count {
1191
+ margin-inline-start: auto;
1192
+ }
1193
+
1194
+ /* Extend textarea to bottom-right corner so the resize handle sits flush. */
1195
+ & textarea.eds-input {
1196
+ margin-block-end: calc(-1 * var(--eds-container-space-vertical));
1197
+ margin-inline-end: calc(-1 * var(--eds-selectable-space-horizontal));
1198
+ }
1199
+ }
1200
+ @layer eds-components {
1201
+ .eds-search {
1202
+ /* Color changes based on state — accent by default, overridden when readonly/disabled */
1203
+ & .search-icon {
1204
+ color: var(--eds-color-text-subtle);
1205
+
1206
+ [data-readonly] & {
1207
+ color: var(--eds-color-border-strong);
1208
+ }
1209
+
1210
+ [data-disabled] & {
1211
+ color: var(--eds-color-text-disabled);
1212
+ }
1213
+ }
1214
+
1215
+ /* Hide native clear button — replaced by our custom one */
1216
+ & [type='search']::-webkit-search-cancel-button {
1217
+ appearance: none;
1218
+ }
1219
+ }
1220
+ }
1221
+ @layer eds-components {
1222
+ .eds-link {
1223
+ color: var(--eds-color-text-link);
1224
+ text-decoration: underline;
1225
+ text-decoration-thickness: var(--eds-sizing-stroke-thin);
1226
+ text-underline-offset: var(--eds-spacing-vertical-4xs);
1227
+
1228
+ transition: color 150ms ease-in-out;
1229
+ }
1230
+
1231
+ .eds-link:hover {
1232
+ color: var(--eds-color-text-strong);
1233
+ }
1234
+
1235
+ .eds-link:focus-visible {
1236
+ border-radius: var(--eds-spacing-border-radius-rounded);
1237
+ color: var(--eds-color-text-strong);
1238
+ outline: var(--eds-sizing-stroke-thin) solid var(--eds-color-border-focus);
1239
+ outline-offset: var(--eds-spacing-vertical-3xs);
1240
+ }
1241
+
1242
+ /* Standalone variant: flex layout for icon + text */
1243
+ .eds-link[data-variant='standalone'] {
1244
+ position: relative;
1245
+
1246
+ gap: var(--eds-typography-gap-horizontal);
1247
+ align-items: center;
1248
+
1249
+ border-bottom: var(--eds-sizing-stroke-thin) solid currentcolor;
1250
+
1251
+ text-decoration: none;
1252
+ }
1253
+
1254
+ /* Use pseudo-element for focus ring so it can have border-radius
1255
+ while border-bottom stays straight */
1256
+ .eds-link[data-variant='standalone']:focus-visible {
1257
+ border-radius: 0;
1258
+ outline: none;
1259
+ }
1260
+
1261
+ .eds-link[data-variant='standalone']:focus-visible::after {
1262
+ pointer-events: none;
1263
+ content: '';
1264
+
1265
+ position: absolute;
1266
+ inset: calc(var(--eds-spacing-vertical-3xs) * -1);
1267
+
1268
+ border: var(--eds-sizing-stroke-thin) solid var(--eds-color-border-focus);
1269
+ border-radius: var(--eds-spacing-border-radius-rounded);
1270
+ }
1271
+ }
1272
+ /* Outside @layer to override typography.css [data-font-family] { display: block } */
1273
+ .eds-link[data-variant='standalone'] {
1274
+ display: inline-flex;
1275
+ }
1276
+ @layer eds-components {
1277
+ .eds-tooltip {
1278
+ /* Gap between tooltip and anchor; also used for the arrow height */
1279
+ --_arrow: var(--eds-spacing-vertical-3xs);
1280
+ /* Width of the arrow tip (1px = visually sharp, matches Figma) */
1281
+ --_tip: 1px;
1282
+
1283
+ /* UA popover reset */
1284
+ position: fixed;
1285
+ margin: 0;
1286
+ inset: auto;
1287
+ border: none;
1288
+ overflow: visible;
1289
+
1290
+ position-anchor: var(--tooltip-anchor-name);
1291
+ width: max-content;
1292
+ background-color: var(--eds-color-text-strong);
1293
+ color: var(--eds-color-text-strong-on-emphasis);
1294
+ border-radius: var(--eds-spacing-border-radius-rounded);
1295
+ padding-block: var(--eds-container-space-vertical);
1296
+ padding-inline: var(--eds-container-space-horizontal);
1297
+
1298
+ /* Rectangle shadow — always downward regardless of arrow direction (no shadow tokens in EDS 2.0) */
1299
+ box-shadow:
1300
+ 0px 2px 4px rgba(0, 0, 0, 0.14),
1301
+ 0px 3px 4px rgba(0, 0, 0, 0.12),
1302
+ 0px 1px 5px rgba(0, 0, 0, 0.2);
1303
+
1304
+ /* Arrow: ::before is expanded by --_arrow on all sides via `inset: calc(-1 * var(--_arrow))`.
1305
+ A 16-point star clip-path pre-draws all 4 arrows. `margin: inherit` shifts the pseudo-element
1306
+ to match the tooltip's own margin, so 3 arrows hide behind the tooltip body (z-index:-1)
1307
+ and only the gap-side arrow remains visible. */
1308
+ &::before {
1309
+ content: '';
1310
+ position: absolute;
1311
+ z-index: -1;
1312
+ background: inherit;
1313
+ inset: calc(-1 * var(--_arrow));
1314
+ margin: inherit;
1315
+ clip-path: polygon(
1316
+ /* top */
1317
+ calc(50% - var(--_arrow)) var(--_arrow),
1318
+ calc(50% - var(--_tip)) 0,
1319
+ calc(50% + var(--_tip)) 0,
1320
+ calc(50% + var(--_arrow)) var(--_arrow),
1321
+ /* right */
1322
+ calc(100% - var(--_arrow)) calc(50% - var(--_arrow)),
1323
+ 100% calc(50% - var(--_tip)),
1324
+ 100% calc(50% + var(--_tip)),
1325
+ calc(100% - var(--_arrow)) calc(50% + var(--_arrow)),
1326
+ /* bottom */
1327
+ calc(50% + var(--_arrow)) calc(100% - var(--_arrow)),
1328
+ calc(50% + var(--_tip)) 100%,
1329
+ calc(50% - var(--_tip)) 100%,
1330
+ calc(50% - var(--_arrow)) calc(100% - var(--_arrow)),
1331
+ /* left */
1332
+ var(--_arrow) calc(50% + var(--_arrow)),
1333
+ 0 calc(50% + var(--_tip)),
1334
+ 0 calc(50% - var(--_tip)),
1335
+ var(--_arrow) calc(50% - var(--_arrow))
1336
+ );
1337
+ }
1338
+
1339
+ &[data-placement='top'] {
1340
+ position-area: top;
1341
+ bottom: var(--_arrow);
1342
+ margin: var(--_arrow) var(--_arrow) 0;
1343
+ position-try-fallbacks: flip-block, --eds-tooltip-bottom;
1344
+ }
1345
+
1346
+ &[data-placement='bottom'] {
1347
+ position-area: bottom;
1348
+ top: var(--_arrow);
1349
+ margin: 0 var(--_arrow) var(--_arrow);
1350
+ position-try-fallbacks: flip-block, --eds-tooltip-top;
1351
+ }
1352
+
1353
+ &[data-placement='right'] {
1354
+ position-area: right;
1355
+ left: var(--_arrow);
1356
+ margin: var(--_arrow) var(--_arrow) var(--_arrow) 0;
1357
+ position-try-fallbacks: flip-inline, --eds-tooltip-left;
1358
+ }
1359
+
1360
+ &[data-placement='left'] {
1361
+ position-area: left;
1362
+ right: var(--_arrow);
1363
+ margin: var(--_arrow) 0 var(--_arrow) var(--_arrow);
1364
+ position-try-fallbacks: flip-inline, --eds-tooltip-right;
1365
+ }
1366
+
1367
+ & .label {
1368
+ font-feature-settings: 'lnum', 'tnum';
1369
+ }
1370
+ }
1371
+
1372
+ .eds-tooltip-anchor {
1373
+ display: inline-block;
1374
+ anchor-name: var(--tooltip-anchor-name);
1375
+ }
1376
+ }
1377
+ /* @position-try must be outside @layer per spec. */
1378
+ @position-try --eds-tooltip-bottom {
1379
+ position-area: bottom;
1380
+ top: var(--_arrow);
1381
+ margin: 0 var(--_arrow) var(--_arrow);
1382
+ }
1383
+ @position-try --eds-tooltip-top {
1384
+ position-area: top;
1385
+ bottom: var(--_arrow);
1386
+ margin: var(--_arrow) var(--_arrow) 0;
1387
+ }
1388
+ @position-try --eds-tooltip-left {
1389
+ position-area: left;
1390
+ right: var(--_arrow);
1391
+ margin: var(--_arrow) 0 var(--_arrow) var(--_arrow);
1392
+ }
1393
+ @position-try --eds-tooltip-right {
1394
+ position-area: right;
1395
+ left: var(--_arrow);
1396
+ margin: var(--_arrow) var(--_arrow) var(--_arrow) 0;
1397
+ }
1398
+ @layer eds-components {
1399
+ .eds-banner {
1400
+ position: relative;
1401
+
1402
+ display: flex;
1403
+ flex-wrap: wrap;
1404
+ gap: var(--eds-container-space-horizontal);
1405
+ align-items: flex-start;
1406
+
1407
+ padding: var(--eds-container-space-vertical)
1408
+ var(--eds-container-space-horizontal);
1409
+ border-radius: var(--eds-spacing-border-radius-rounded, 4px);
1410
+
1411
+ background: var(--eds-color-bg-surface);
1412
+ outline: var(--eds-sizing-stroke-thin) solid var(--eds-color-border-medium);
1413
+ }
1414
+
1415
+ .eds-banner__icon {
1416
+ display: flex;
1417
+ flex-shrink: 0;
1418
+ align-items: center;
1419
+
1420
+ height: var(--eds-typography-line-height, 1.5rem);
1421
+
1422
+ /*
1423
+ * Negative margin compensates for Figma's icon container padding,
1424
+ * pulling the icon closer to the component edge.
1425
+ * Figma variable: selectable/icon-container-padding (↕︎ -6px, ↔︎ -4.8px)
1426
+ * See #4684 for exporting this as a CSS custom property.
1427
+ */
1428
+ margin-block: -6px;
1429
+ margin-inline-start: -4.8px;
1430
+
1431
+ color: var(--eds-color-text-subtle);
1432
+ }
1433
+
1434
+ .eds-banner__message {
1435
+ flex: 1;
1436
+ min-width: 0;
1437
+ margin: 0;
1438
+ color: var(--eds-color-text-strong);
1439
+ }
1440
+
1441
+ .eds-banner__actions {
1442
+ display: flex;
1443
+ gap: var(--eds-selectable-gap-horizontal, 8px);
1444
+ align-items: center;
1445
+ }
1446
+
1447
+ .eds-banner__actions[data-placement='bottom'] {
1448
+ flex-basis: 100%;
1449
+ }
1450
+
1451
+ .eds-banner:has(.eds-banner__dismiss) {
1452
+ padding-inline-end: calc(
1453
+ var(--eds-container-space-horizontal) + 24px +
1454
+ var(--eds-container-space-horizontal)
1455
+ );
1456
+ }
1457
+
1458
+ .eds-banner__dismiss {
1459
+ position: absolute;
1460
+ top: var(--eds-container-space-vertical);
1461
+ right: var(--eds-container-space-horizontal);
1462
+
1463
+ /* Same Figma icon container padding compensation as .eds-banner__icon */
1464
+ margin-block: -6px;
1465
+ margin-inline-end: -4.8px;
1466
+ }
1467
+ }
1118
1468