@equinor/eds-core-react 2.3.6 → 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.
- package/build/index.css +407 -64
- package/build/index.min.css +1 -1
- package/dist/eds-core-react.cjs +199 -28
- package/dist/esm/components/Autocomplete/AutocompleteContext.js +2 -2
- package/dist/esm/components/Autocomplete/MultipleInput.js +2 -2
- package/dist/esm/components/Autocomplete/OptionList.js +6 -4
- package/dist/esm/components/Autocomplete/useAutocomplete.js +4 -0
- package/dist/esm/components/Datepicker/DatePicker.js +4 -1
- package/dist/esm/components/Datepicker/DateRangePicker.js +4 -1
- package/dist/esm/components/Datepicker/calendars/CalendarGrid.js +4 -8
- package/dist/esm/components/Datepicker/calendars/CalendarHeader.js +6 -6
- package/dist/esm/components/Datepicker/fields/DateSegment.js +4 -1
- package/dist/esm/components/Datepicker/utils/getLocalizedValidationErrors.js +164 -0
- package/dist/esm/components/InputWrapper/InputWrapper.js +1 -1
- package/dist/esm/components/Popover/Popover.js +4 -4
- package/dist/esm/components/Table/DataCell/DataCell.js +1 -1
- package/dist/esm/components/Table/FooterCell/FooterCell.js +1 -1
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +1 -1
- package/dist/esm/components/Textarea/Textarea.js +1 -1
- package/dist/esm-next/components/next/Banner/Banner.js +88 -0
- package/dist/esm-next/components/next/Button/Button.js +1 -0
- package/dist/esm-next/components/next/Icon/Icon.js +27 -1
- package/dist/esm-next/components/next/Input/Input.js +1 -1
- package/dist/esm-next/components/next/Link/Link.js +24 -0
- package/dist/esm-next/components/next/Search/Search.js +118 -0
- package/dist/esm-next/components/next/TextArea/TextArea.js +131 -0
- package/dist/esm-next/components/next/TextField/TextField.js +7 -2
- package/dist/esm-next/components/next/Tooltip/Tooltip.js +84 -0
- package/dist/esm-next/index.next.js +5 -0
- package/dist/index.next.cjs +451 -8
- package/dist/types/components/Autocomplete/AutocompleteContext.d.ts +2 -2
- package/dist/types/components/Autocomplete/useAutocomplete.d.ts +2 -2
- package/dist/types/components/Datepicker/utils/getLocalizedValidationErrors.d.ts +9 -0
- package/dist/types/components/next/Banner/Banner.d.ts +23 -0
- package/dist/types/components/next/Banner/Banner.figma.d.ts +1 -0
- package/dist/types/components/next/Banner/Banner.types.d.ts +33 -0
- package/dist/types/components/next/Banner/index.d.ts +2 -0
- package/dist/types/components/next/Icon/Icon.d.ts +0 -1
- package/dist/types/components/next/Input/Input.types.d.ts +4 -1
- package/dist/types/components/next/Link/Link.d.ts +4 -0
- package/dist/types/components/next/Link/Link.figma.d.ts +1 -0
- package/dist/types/components/next/Link/Link.types.d.ts +11 -0
- package/dist/types/components/next/Link/index.d.ts +2 -0
- package/dist/types/components/next/Search/Search.d.ts +9 -0
- package/dist/types/components/next/Search/Search.figma.d.ts +1 -0
- package/dist/types/components/next/Search/Search.types.d.ts +16 -0
- package/dist/types/components/next/Search/index.d.ts +2 -0
- package/dist/types/components/next/TextArea/TextArea.d.ts +11 -0
- package/dist/types/components/next/TextArea/TextArea.figma.d.ts +1 -0
- package/dist/types/components/next/TextArea/TextArea.types.d.ts +21 -0
- package/dist/types/components/next/TextArea/index.d.ts +2 -0
- package/dist/types/components/next/Tooltip/Tooltip.d.ts +7 -0
- package/dist/types/components/next/Tooltip/Tooltip.figma.d.ts +1 -0
- package/dist/types/components/next/Tooltip/Tooltip.types.d.ts +17 -0
- package/dist/types/components/next/Tooltip/index.d.ts +2 -0
- package/dist/types/components/next/index.d.ts +10 -0
- package/package.json +42 -35
package/build/index.css
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
@layer eds-components;
|
|
3
3
|
/* EDS 2.0 Next Components - CSS */
|
|
4
4
|
/* Define layer order - eds-components has lowest priority for easy user overrides */
|
|
5
|
+
/*
|
|
6
|
+
* Font loading:
|
|
7
|
+
* Next components use two font families:
|
|
8
|
+
* - "Inter" for UI text (buttons, inputs, labels, etc.)
|
|
9
|
+
* - "Equinor" for headings
|
|
10
|
+
*
|
|
11
|
+
* Load both fonts via the EDS variable font stylesheet:
|
|
12
|
+
* <link rel="stylesheet" href="https://cdn.eds.equinor.com/font/eds-uprights-vf.css" />
|
|
13
|
+
*
|
|
14
|
+
* Note: The older "equinor-font.css" only includes the Equinor font.
|
|
15
|
+
* If you only load that, UI components will fall back to a generic sans-serif.
|
|
16
|
+
*/
|
|
5
17
|
:root,[data-color-scheme=light]{color-scheme:light}
|
|
6
18
|
[data-color-scheme=dark]{color-scheme:dark}
|
|
7
19
|
:root{--eds-color-bg-floating:light-dark(#fff,#202223);--eds-color-bg-backdrop:light-dark(#aeaeae,#738696);--eds-color-bg-input:light-dark(#f5f5f5,#0b0b0b);--eds-color-border-focus:light-dark(#6fb6e9,#2d8bc5);--eds-color-text-link:light-dark(#0070a9,#5abbfb);--eds-color-bg-disabled:light-dark(#e1e1e1,#525c65);--eds-color-border-disabled:light-dark(#aeaeae,#738696);--eds-color-text-disabled:light-dark(#aeaeae,#738696);--eds-color-accent-1:light-dark(#eaf8fa,#0a0b0b);--eds-color-accent-2:light-dark(#f6ffff,#1e2323);--eds-color-accent-3:light-dark(#cfe7e9,#3c6266);--eds-color-accent-4:light-dark(#bbdbdf,#3e7378);--eds-color-accent-5:light-dark(#a2cdd2,#41878e);--eds-color-accent-6:light-dark(#bbdbdf,#3c6266);--eds-color-accent-7:light-dark(#7cbac1,#439199);--eds-color-accent-8:light-dark(#21767e,#6ec0c9);--eds-color-accent-9:light-dark(#206f77,#8cd2da);--eds-color-accent-10:light-dark(#205c62,#ace3e9);--eds-color-accent-11:light-dark(#20565c,#c7f1f6);--eds-color-accent-12:light-dark(#1f6369,#bcebf1);--eds-color-accent-13:light-dark(#141f20,#e6ffff);--eds-color-accent-14:light-dark(#cae4e7,#2c3839);--eds-color-accent-15:light-dark(#fff,#030303);--eds-color-neutral-1:light-dark(#f5f5f5,#0b0b0b);--eds-color-neutral-2:light-dark(#fff,#202223);--eds-color-neutral-3:light-dark(#e1e1e1,#525c65);--eds-color-neutral-4:light-dark(#d4d4d4,#5d6b76);--eds-color-neutral-5:light-dark(#c4c4c4,#6b7d8b);--eds-color-neutral-6:light-dark(#d4d4d4,#525c65);--eds-color-neutral-7:light-dark(#aeaeae,#738696);--eds-color-neutral-8:light-dark(#696969,#9fb4c6);--eds-color-neutral-9:light-dark(#636363,#b4c7d7);--eds-color-neutral-10:light-dark(#525252,#cadae7);--eds-color-neutral-11:light-dark(#4d4d4d,#deeaf4);--eds-color-neutral-12:light-dark(#585858,#d6e3ee);--eds-color-neutral-13:light-dark(#1d1d1d,#f5fdff);--eds-color-neutral-14:light-dark(#dedede,#333639);--eds-color-neutral-15:light-dark(#fff,#030303);--eds-color-info-1:light-dark(#e7f8ff,#0a0b0c);--eds-color-info-2:light-dark(#f4ffff,#1d2226);--eds-color-info-3:light-dark(#cae6fa,#33607e);--eds-color-info-4:light-dark(#b5daf5,#316f98);--eds-color-info-5:light-dark(#99cbf0,#2e82b7);--eds-color-info-6:light-dark(#b5daf5,#33607e);--eds-color-info-7:light-dark(#6fb6e9,#2d8bc5);--eds-color-info-8:light-dark(#0070a9,#5abbfb);--eds-color-info-9:light-dark(#006aa0,#7dceff);--eds-color-info-10:light-dark(#085883,#a2e0ff);--eds-color-info-11:light-dark(#0e5279,#c4eeff);--eds-color-info-12:light-dark(#015e8d,#b7e8ff);--eds-color-info-13:light-dark(#121e27,#ecffff);--eds-color-info-14:light-dark(#c5e3f9,#2a3741);--eds-color-info-15:light-dark(#fff,#030304);--eds-color-success-1:light-dark(#eafbe8,#0a0c0a);--eds-color-success-2:light-dark(#f6fff5,#1e231e);--eds-color-success-3:light-dark(#cfeacc,#3c673a);--eds-color-success-4:light-dark(#bbe0b8,#3e793c);--eds-color-success-5:light-dark(#a2d49e,#418e3e);--eds-color-success-6:light-dark(#bbe0b8,#3c673a);--eds-color-success-7:light-dark(#7cc278,#439941);--eds-color-success-8:light-dark(#227e22,#6eca6a);--eds-color-success-9:light-dark(#207720,#8cdb87);--eds-color-success-10:light-dark(#20621f,#aceba8);--eds-color-success-11:light-dark(#215c1f,#c7f7c3);--eds-color-success-12:light-dark(#20691f,#bcf2b8);--eds-color-success-13:light-dark(#142114,#e6ffe3);--eds-color-success-14:light-dark(#cae8c7,#2c392b);--eds-color-success-15:light-dark(#fff,#030303);--eds-color-warning-1:light-dark(#fff1e2,#0c0b0a);--eds-color-warning-2:light-dark(#fffcf0,#27201b);--eds-color-warning-3:light-dark(#fbdac1,#7e4e25);--eds-color-warning-4:light-dark(#f6caaa,#97571b);--eds-color-warning-5:light-dark(#f0b689,#b46201);--eds-color-warning-6:light-dark(#f6caaa,#7e4e25);--eds-color-warning-7:light-dark(#e89959,#c36800);--eds-color-warning-8:light-dark(#a34e00,#f99539);--eds-color-warning-9:light-dark(#9b4900,#ffad63);--eds-color-warning-10:light-dark(#813e00,#ffc791);--eds-color-warning-11:light-dark(#773a00,#ffddb9);--eds-color-warning-12:light-dark(#8a4100,#ffd4aa);--eds-color-warning-13:light-dark(#27190e,#fff7e6);--eds-color-warning-14:light-dark(#fad6bc,#413226);--eds-color-warning-15:light-dark(#fff,#040303);--eds-color-danger-1:light-dark(#ffecea,#0d0a0a);--eds-color-danger-2:light-dark(#fff9f8,#2a1e1e);--eds-color-danger-3:light-dark(#ffd0ce,#923a3c);--eds-color-danger-4:light-dark(#ffbcba,#b03940);--eds-color-danger-5:light-dark(#ffa3a1,#d43745);--eds-color-danger-6:light-dark(#ffbcba,#923a3c);--eds-color-danger-7:light-dark(#ff7a7d,#e53748);--eds-color-danger-8:light-dark(#c6002d,#ff8082);--eds-color-danger-9:light-dark(#bc002a,#ffa3a1);--eds-color-danger-10:light-dark(#9a1026,#ffc1bf);--eds-color-danger-11:light-dark(#8e1525,#ffd9d7);--eds-color-danger-12:light-dark(#a50827,#ffd0ce);--eds-color-danger-13:light-dark(#2e1414,#fff5f4);--eds-color-danger-14:light-dark(#ffcbc9,#492d2c);--eds-color-danger-15:light-dark(#fff,#040303);--eds-color-bg-neutral-canvas:var(--eds-color-neutral-1);--eds-color-bg-neutral-surface:var(--eds-color-neutral-2);--eds-color-bg-neutral-fill-muted-default:var(--eds-color-neutral-3);--eds-color-bg-neutral-fill-muted-hover:var(--eds-color-neutral-4);--eds-color-bg-neutral-fill-muted-active:var(--eds-color-neutral-5);--eds-color-bg-neutral-fill-emphasis-default:var(--eds-color-neutral-9);--eds-color-bg-neutral-fill-emphasis-hover:var(--eds-color-neutral-10);--eds-color-bg-neutral-fill-emphasis-active:var(--eds-color-neutral-11);--eds-color-bg-accent-canvas:var(--eds-color-accent-1);--eds-color-bg-accent-surface:var(--eds-color-accent-2);--eds-color-bg-accent-fill-muted-default:var(--eds-color-accent-3);--eds-color-bg-accent-fill-muted-hover:var(--eds-color-accent-4);--eds-color-bg-accent-fill-muted-active:var(--eds-color-accent-5);--eds-color-bg-accent-fill-emphasis-default:var(--eds-color-accent-9);--eds-color-bg-accent-fill-emphasis-hover:var(--eds-color-accent-10);--eds-color-bg-accent-fill-emphasis-active:var(--eds-color-accent-11);--eds-color-bg-success-canvas:var(--eds-color-success-1);--eds-color-bg-success-surface:var(--eds-color-success-2);--eds-color-bg-success-fill-muted-default:var(--eds-color-success-3);--eds-color-bg-success-fill-muted-hover:var(--eds-color-success-4);--eds-color-bg-success-fill-muted-active:var(--eds-color-success-5);--eds-color-bg-success-fill-emphasis-default:var(--eds-color-success-9);--eds-color-bg-success-fill-emphasis-hover:var(--eds-color-success-10);--eds-color-bg-success-fill-emphasis-active:var(--eds-color-success-11);--eds-color-bg-info-canvas:var(--eds-color-info-1);--eds-color-bg-info-surface:var(--eds-color-info-2);--eds-color-bg-info-fill-muted-default:var(--eds-color-info-3);--eds-color-bg-info-fill-muted-hover:var(--eds-color-info-4);--eds-color-bg-info-fill-muted-active:var(--eds-color-info-5);--eds-color-bg-info-fill-emphasis-default:var(--eds-color-info-9);--eds-color-bg-info-fill-emphasis-hover:var(--eds-color-info-10);--eds-color-bg-info-fill-emphasis-active:var(--eds-color-info-11);--eds-color-bg-warning-canvas:var(--eds-color-warning-1);--eds-color-bg-warning-surface:var(--eds-color-warning-2);--eds-color-bg-warning-fill-muted-default:var(--eds-color-warning-3);--eds-color-bg-warning-fill-muted-hover:var(--eds-color-warning-4);--eds-color-bg-warning-fill-muted-active:var(--eds-color-warning-5);--eds-color-bg-warning-fill-emphasis-default:var(--eds-color-warning-9);--eds-color-bg-warning-fill-emphasis-hover:var(--eds-color-warning-10);--eds-color-bg-warning-fill-emphasis-active:var(--eds-color-warning-11);--eds-color-bg-danger-canvas:var(--eds-color-danger-1);--eds-color-bg-danger-surface:var(--eds-color-danger-2);--eds-color-bg-danger-fill-muted-default:var(--eds-color-danger-3);--eds-color-bg-danger-fill-muted-hover:var(--eds-color-danger-4);--eds-color-bg-danger-fill-muted-active:var(--eds-color-danger-5);--eds-color-bg-danger-fill-emphasis-default:var(--eds-color-danger-9);--eds-color-bg-danger-fill-emphasis-hover:var(--eds-color-danger-10);--eds-color-bg-danger-fill-emphasis-active:var(--eds-color-danger-11);--eds-color-border-neutral-subtle:var(--eds-color-neutral-6);--eds-color-border-neutral-medium:var(--eds-color-neutral-7);--eds-color-border-neutral-strong:var(--eds-color-neutral-8);--eds-color-border-accent-subtle:var(--eds-color-accent-6);--eds-color-border-accent-medium:var(--eds-color-accent-7);--eds-color-border-accent-strong:var(--eds-color-accent-8);--eds-color-border-success-subtle:var(--eds-color-success-6);--eds-color-border-success-medium:var(--eds-color-success-7);--eds-color-border-success-strong:var(--eds-color-success-8);--eds-color-border-info-subtle:var(--eds-color-info-6);--eds-color-border-info-medium:var(--eds-color-info-7);--eds-color-border-info-strong:var(--eds-color-info-8);--eds-color-border-warning-subtle:var(--eds-color-warning-6);--eds-color-border-warning-medium:var(--eds-color-warning-7);--eds-color-border-warning-strong:var(--eds-color-warning-8);--eds-color-border-danger-subtle:var(--eds-color-danger-6);--eds-color-border-danger-medium:var(--eds-color-danger-7);--eds-color-border-danger-strong:var(--eds-color-danger-8);--eds-color-text-neutral-subtle:var(--eds-color-neutral-12);--eds-color-text-neutral-strong:var(--eds-color-neutral-13);--eds-color-text-neutral-subtle-on-emphasis:var(--eds-color-neutral-14);--eds-color-text-neutral-strong-on-emphasis:var(--eds-color-neutral-15);--eds-color-text-accent-subtle:var(--eds-color-accent-12);--eds-color-text-accent-strong:var(--eds-color-accent-13);--eds-color-text-accent-subtle-on-emphasis:var(--eds-color-accent-14);--eds-color-text-accent-strong-on-emphasis:var(--eds-color-accent-15);--eds-color-text-success-subtle:var(--eds-color-success-12);--eds-color-text-success-strong:var(--eds-color-success-13);--eds-color-text-success-subtle-on-emphasis:var(--eds-color-success-14);--eds-color-text-success-strong-on-emphasis:var(--eds-color-success-15);--eds-color-text-info-subtle:var(--eds-color-info-12);--eds-color-text-info-strong:var(--eds-color-info-13);--eds-color-text-info-subtle-on-emphasis:var(--eds-color-info-14);--eds-color-text-info-strong-on-emphasis:var(--eds-color-info-15);--eds-color-text-warning-subtle:var(--eds-color-warning-12);--eds-color-text-warning-strong:var(--eds-color-warning-13);--eds-color-text-warning-subtle-on-emphasis:var(--eds-color-warning-14);--eds-color-text-warning-strong-on-emphasis:var(--eds-color-warning-15);--eds-color-text-danger-subtle:var(--eds-color-danger-12);--eds-color-text-danger-strong:var(--eds-color-danger-13);--eds-color-text-danger-subtle-on-emphasis:var(--eds-color-danger-14);--eds-color-text-danger-strong-on-emphasis:var(--eds-color-danger-15)}
|
|
@@ -92,13 +104,9 @@
|
|
|
92
104
|
[data-tracking=wide],[data-tracking=loose]{--eds-typography-tracking:var(--eds-typography-tracking-wide)}
|
|
93
105
|
@layer eds-components {
|
|
94
106
|
/* Inline with text: uses token from parent's data-font-size, or 1.5em fallback */
|
|
95
|
-
.icon {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* Then use 1em for width/height (relative to computed font-size).
|
|
99
|
-
* This avoids compound scaling (1.5em × 1.5em = 2.25em would be wrong).
|
|
100
|
-
*/
|
|
101
|
-
font-size: var(--eds-typography-icon-size, 1.5em);
|
|
107
|
+
.eds-icon {
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
|
|
102
110
|
width: 1em;
|
|
103
111
|
height: 1em;
|
|
104
112
|
|
|
@@ -106,11 +114,16 @@
|
|
|
106
114
|
margin-block: -0.25em;
|
|
107
115
|
margin-inline: -0.1em;
|
|
108
116
|
|
|
109
|
-
|
|
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);
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
/* Explicit size: fixed size from design tokens, no margins */
|
|
113
|
-
.icon[data-icon-size] {
|
|
126
|
+
.eds-icon[data-icon-size] {
|
|
114
127
|
--_explicit-size: var(--eds-sizing-icon-md); /* fallback */
|
|
115
128
|
|
|
116
129
|
width: var(--_explicit-size);
|
|
@@ -119,52 +132,65 @@
|
|
|
119
132
|
font-size: inherit;
|
|
120
133
|
}
|
|
121
134
|
|
|
122
|
-
.icon[data-icon-size='xs'] {
|
|
135
|
+
.eds-icon[data-icon-size='xs'] {
|
|
123
136
|
--_explicit-size: var(--eds-sizing-icon-xs);
|
|
124
137
|
}
|
|
125
|
-
|
|
138
|
+
|
|
139
|
+
.eds-icon[data-icon-size='sm'] {
|
|
126
140
|
--_explicit-size: var(--eds-sizing-icon-sm);
|
|
127
141
|
}
|
|
128
|
-
|
|
142
|
+
|
|
143
|
+
.eds-icon[data-icon-size='md'] {
|
|
129
144
|
--_explicit-size: var(--eds-sizing-icon-md);
|
|
130
145
|
}
|
|
131
|
-
|
|
146
|
+
|
|
147
|
+
.eds-icon[data-icon-size='lg'] {
|
|
132
148
|
--_explicit-size: var(--eds-sizing-icon-lg);
|
|
133
149
|
}
|
|
134
|
-
|
|
150
|
+
|
|
151
|
+
.eds-icon[data-icon-size='xl'] {
|
|
135
152
|
--_explicit-size: var(--eds-sizing-icon-xl);
|
|
136
153
|
}
|
|
137
|
-
|
|
154
|
+
|
|
155
|
+
.eds-icon[data-icon-size='2xl'] {
|
|
138
156
|
--_explicit-size: var(--eds-sizing-icon-2xl);
|
|
139
157
|
}
|
|
140
|
-
|
|
158
|
+
|
|
159
|
+
.eds-icon[data-icon-size='3xl'] {
|
|
141
160
|
--_explicit-size: var(--eds-sizing-icon-3xl);
|
|
142
161
|
}
|
|
143
|
-
|
|
162
|
+
|
|
163
|
+
.eds-icon[data-icon-size='4xl'] {
|
|
144
164
|
--_explicit-size: var(--eds-sizing-icon-4xl);
|
|
145
165
|
}
|
|
146
|
-
|
|
166
|
+
|
|
167
|
+
.eds-icon[data-icon-size='5xl'] {
|
|
147
168
|
--_explicit-size: var(--eds-sizing-icon-5xl);
|
|
148
169
|
}
|
|
149
|
-
|
|
170
|
+
|
|
171
|
+
.eds-icon[data-icon-size='6xl'] {
|
|
150
172
|
--_explicit-size: var(--eds-sizing-icon-6xl);
|
|
151
173
|
}
|
|
152
174
|
}
|
|
153
175
|
@layer eds-components {
|
|
154
176
|
.eds-button {
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
|
|
155
179
|
/* Layout */
|
|
156
180
|
display: inline-flex;
|
|
157
181
|
align-items: center;
|
|
158
182
|
justify-content: center;
|
|
183
|
+
|
|
159
184
|
box-sizing: border-box;
|
|
160
185
|
|
|
161
186
|
/* Appearance */
|
|
162
187
|
border: none;
|
|
163
188
|
border-radius: var(--eds-spacing-border-radius-rounded, 4px);
|
|
164
|
-
|
|
165
|
-
outline: none;
|
|
189
|
+
|
|
166
190
|
text-decoration: none;
|
|
167
191
|
|
|
192
|
+
outline: none;
|
|
193
|
+
|
|
168
194
|
/* Transitions */
|
|
169
195
|
transition:
|
|
170
196
|
background-color 150ms ease-in-out,
|
|
@@ -182,21 +208,21 @@
|
|
|
182
208
|
*/
|
|
183
209
|
|
|
184
210
|
.eds-button[data-selectable-space='lg'] {
|
|
211
|
+
gap: var(--eds-typography-gap-horizontal);
|
|
185
212
|
min-height: 2.75rem; /* 44px */
|
|
186
213
|
padding-inline: var(--eds-selectable-space-horizontal);
|
|
187
|
-
gap: var(--eds-typography-gap-horizontal);
|
|
188
214
|
}
|
|
189
215
|
|
|
190
216
|
.eds-button[data-selectable-space='md'] {
|
|
217
|
+
gap: var(--eds-typography-gap-horizontal);
|
|
191
218
|
min-height: 2.25rem; /* 36px */
|
|
192
219
|
padding-inline: var(--eds-selectable-space-horizontal);
|
|
193
|
-
gap: var(--eds-typography-gap-horizontal);
|
|
194
220
|
}
|
|
195
221
|
|
|
196
222
|
.eds-button[data-selectable-space='sm'] {
|
|
223
|
+
gap: var(--eds-typography-gap-horizontal);
|
|
197
224
|
min-height: 1.5rem; /* 24px */
|
|
198
225
|
padding-inline: var(--eds-selectable-space-horizontal);
|
|
199
|
-
gap: var(--eds-typography-gap-horizontal);
|
|
200
226
|
}
|
|
201
227
|
|
|
202
228
|
/* Comfortable density */
|
|
@@ -230,8 +256,8 @@
|
|
|
230
256
|
/* ===== PRIMARY VARIANT ===== */
|
|
231
257
|
|
|
232
258
|
.eds-button[data-variant='primary'] {
|
|
233
|
-
background-color: var(--eds-color-bg-fill-emphasis-default);
|
|
234
259
|
color: var(--eds-color-text-strong-on-emphasis);
|
|
260
|
+
background-color: var(--eds-color-bg-fill-emphasis-default);
|
|
235
261
|
}
|
|
236
262
|
|
|
237
263
|
.eds-button[data-variant='primary']:hover:not(:disabled) {
|
|
@@ -243,16 +269,16 @@
|
|
|
243
269
|
}
|
|
244
270
|
|
|
245
271
|
.eds-button[data-variant='primary']:disabled {
|
|
246
|
-
background-color: var(--eds-color-bg-fill-emphasis-disabled);
|
|
247
|
-
color: var(--eds-color-text-disabled);
|
|
248
272
|
cursor: not-allowed;
|
|
273
|
+
color: var(--eds-color-text-disabled);
|
|
274
|
+
background-color: var(--eds-color-bg-fill-emphasis-disabled);
|
|
249
275
|
}
|
|
250
276
|
|
|
251
277
|
/* ===== SECONDARY VARIANT ===== */
|
|
252
278
|
|
|
253
279
|
.eds-button[data-variant='secondary'] {
|
|
254
|
-
background-color: transparent;
|
|
255
280
|
color: var(--eds-color-text-subtle);
|
|
281
|
+
background-color: transparent;
|
|
256
282
|
outline: var(--eds-border-width-default, 1px) solid
|
|
257
283
|
var(--eds-color-border-strong);
|
|
258
284
|
outline-offset: calc(-1 * var(--eds-border-width-default, 1px));
|
|
@@ -267,18 +293,18 @@
|
|
|
267
293
|
}
|
|
268
294
|
|
|
269
295
|
.eds-button[data-variant='secondary']:disabled {
|
|
296
|
+
cursor: not-allowed;
|
|
297
|
+
color: var(--eds-color-text-disabled);
|
|
270
298
|
outline: var(--eds-border-width-default, 1px) solid
|
|
271
299
|
var(--eds-color-border-disabled);
|
|
272
300
|
outline-offset: calc(-1 * var(--eds-border-width-default, 1px));
|
|
273
|
-
color: var(--eds-color-text-disabled);
|
|
274
|
-
cursor: not-allowed;
|
|
275
301
|
}
|
|
276
302
|
|
|
277
303
|
/* ===== GHOST VARIANT ===== */
|
|
278
304
|
|
|
279
305
|
.eds-button[data-variant='ghost'] {
|
|
280
|
-
background-color: transparent;
|
|
281
306
|
color: var(--eds-color-text-subtle);
|
|
307
|
+
background-color: transparent;
|
|
282
308
|
}
|
|
283
309
|
|
|
284
310
|
.eds-button[data-variant='ghost']:hover:not(:disabled) {
|
|
@@ -290,8 +316,8 @@
|
|
|
290
316
|
}
|
|
291
317
|
|
|
292
318
|
.eds-button[data-variant='ghost']:disabled {
|
|
293
|
-
color: var(--eds-color-text-disabled);
|
|
294
319
|
cursor: not-allowed;
|
|
320
|
+
color: var(--eds-color-text-disabled);
|
|
295
321
|
}
|
|
296
322
|
|
|
297
323
|
/* ===== FOCUS STATE ===== */
|
|
@@ -310,12 +336,12 @@
|
|
|
310
336
|
/* Icons inherit size from Typography via --eds-typography-icon-size */
|
|
311
337
|
/* Icons use em-based negative margins from icon.css for optical alignment */
|
|
312
338
|
|
|
313
|
-
.eds-button .icon {
|
|
339
|
+
.eds-button .eds-icon {
|
|
314
340
|
flex-shrink: 0;
|
|
315
341
|
}
|
|
316
342
|
|
|
317
343
|
/* Icon-only buttons: remove negative margins since flexbox handles centering */
|
|
318
|
-
.eds-button[data-icon-only] .icon {
|
|
344
|
+
.eds-button[data-icon-only] .eds-icon {
|
|
319
345
|
margin: 0;
|
|
320
346
|
}
|
|
321
347
|
}
|
|
@@ -327,12 +353,14 @@
|
|
|
327
353
|
* text-box/padding-block reset disables typography.css baseline padding —
|
|
328
354
|
* button handles its own sizing via min-height + flexbox centering.
|
|
329
355
|
*/
|
|
330
|
-
.eds-
|
|
356
|
+
.eds-button__label {
|
|
331
357
|
display: inline-flex;
|
|
332
|
-
align-items: center;
|
|
333
358
|
gap: var(--eds-typography-gap-horizontal);
|
|
334
|
-
|
|
359
|
+
align-items: center;
|
|
360
|
+
|
|
335
361
|
padding-block: 0;
|
|
362
|
+
|
|
363
|
+
text-box: normal;
|
|
336
364
|
}
|
|
337
365
|
@layer eds-components {
|
|
338
366
|
.eds-field {
|
|
@@ -392,6 +420,12 @@
|
|
|
392
420
|
color: var(--_eds-field-helper-color);
|
|
393
421
|
}
|
|
394
422
|
|
|
423
|
+
/* Reduce gap before helper message to 3xs spacing.
|
|
424
|
+
Applied to the preceding sibling (not helper message) to avoid [data-font-family] margin: 0 override. */
|
|
425
|
+
.eds-field > :has(+ .eds-field__helper-message) {
|
|
426
|
+
margin-block-end: calc(var(--eds-spacing-vertical-3xs) - var(--eds-generic-gap-vertical));
|
|
427
|
+
}
|
|
428
|
+
|
|
395
429
|
/* Only helper message changes color when disabled */
|
|
396
430
|
.eds-field[data-disabled='true'] {
|
|
397
431
|
--_eds-field-helper-color: var(--eds-color-text-disabled);
|
|
@@ -943,10 +977,8 @@
|
|
|
943
977
|
&:focus-within {
|
|
944
978
|
outline-color: var(--eds-color-border-strong);
|
|
945
979
|
box-shadow:
|
|
946
|
-
0 0 0 var(--eds-sizing-stroke-
|
|
947
|
-
0 0 0
|
|
948
|
-
calc(var(--eds-sizing-stroke-thick) + var(--eds-sizing-stroke-thin))
|
|
949
|
-
var(--eds-color-border-focus);
|
|
980
|
+
0 0 0 var(--eds-sizing-stroke-thin) var(--_bg-input),
|
|
981
|
+
0 0 0 calc(var(--eds-sizing-stroke-thin) * 2) var(--eds-color-border-focus);
|
|
950
982
|
}
|
|
951
983
|
|
|
952
984
|
/* Invalid state */
|
|
@@ -956,10 +988,8 @@
|
|
|
956
988
|
&:focus-within {
|
|
957
989
|
outline-color: var(--eds-color-border-strong);
|
|
958
990
|
box-shadow:
|
|
959
|
-
0 0 0 var(--eds-sizing-stroke-
|
|
960
|
-
0 0 0
|
|
961
|
-
calc(var(--eds-sizing-stroke-thick) + var(--eds-sizing-stroke-thin))
|
|
962
|
-
var(--eds-color-border-focus);
|
|
991
|
+
0 0 0 var(--eds-sizing-stroke-thin) var(--_bg-input),
|
|
992
|
+
0 0 0 calc(var(--eds-sizing-stroke-thin) * 2) var(--eds-color-border-focus);
|
|
963
993
|
}
|
|
964
994
|
}
|
|
965
995
|
|
|
@@ -1013,8 +1043,7 @@
|
|
|
1013
1043
|
|
|
1014
1044
|
/* Input/Textarea element */
|
|
1015
1045
|
.eds-input {
|
|
1016
|
-
|
|
1017
|
-
--_placeholder-text-color: var(--eds-color-border-strong);
|
|
1046
|
+
--_placeholder-text-color: var(--eds-color-text-subtle);
|
|
1018
1047
|
|
|
1019
1048
|
flex: 1;
|
|
1020
1049
|
min-inline-size: 0;
|
|
@@ -1095,31 +1124,345 @@
|
|
|
1095
1124
|
}
|
|
1096
1125
|
|
|
1097
1126
|
.eds-text-field__info {
|
|
1098
|
-
display: inline-flex;
|
|
1099
|
-
align-items: center;
|
|
1100
1127
|
flex-shrink: 0;
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
background: transparent;
|
|
1104
|
-
color: var(--eds-color-icon-subtle);
|
|
1105
|
-
cursor: pointer;
|
|
1128
|
+
/* Negative margin collapses the button's 24px layout contribution to ~8px,
|
|
1129
|
+
matching Figma's 8px icon container. Label text-box height determines row height. */
|
|
1106
1130
|
margin-block: calc(var(--eds-sizing-icon-xs) / -2);
|
|
1131
|
+
}
|
|
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
|
+
}
|
|
1107
1147
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
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
|
+
}
|
|
1111
1162
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1163
|
+
&:has(+ .helper-row) {
|
|
1164
|
+
margin-block-end: calc(
|
|
1165
|
+
var(--eds-spacing-vertical-3xs) - var(--eds-generic-gap-vertical)
|
|
1166
|
+
);
|
|
1115
1167
|
}
|
|
1116
1168
|
}
|
|
1117
1169
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
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;
|
|
1122
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;
|
|
1123
1466
|
}
|
|
1124
1467
|
}
|
|
1125
1468
|
|