Commit c19625a
authored
[EuiButtonGroup] Convert to Emotion (#6841)
* Add support for `element` prop to EuiButtonDisplay
- required for deprecation of old component, used by `EuiButtonGroup`
+ rename `element` usage in `EuiButtonGroupButton` to match existing prefix syntax
* Remove unnecessary generated `id` from EuiButtonGroup
- `label`s that wrap `input`s don't need a `for` attribute, and buttons really aren't benefiting from randomly generated IDs/data-test-subjs
* [EuiButtonGroupButton] Set up & fix focus styles
- update focus utils with a new `euiOutline` helper that only exports the outline CSS and not the `:focus-visible`
- Button group focus-visible behavior wasn't working as expected - `:has(:focus-visible)` is what's needed for `:focus-within` keyboard behavior, but it needs a Firefox interim workaround
* [EuiButtonGroupButton] Convert to non-deprecated `EuiButtonDisplay` internal
- New `EuiButtonDisplay` component makes a lot of the old Sass styles unnecessary
+ add euiCanAnimate
* [EuiButtonGroupButton] Convert state styles
- Disabled & selected buttons need a custom style
+ make all selected buttons have a slightly heavier font weight
+ remove unused(?) z-index CSS
* [EuiButtonGroupButton] Convert child content & text CSS
* [EuiButtonGroupButton] Convert size-specific styles
- handles `border-radius`
- handles faux box-shadow borders (with better cleanup)
- compressed vs uncompressed styles
* [EuiButtonGroup] Convert styles to Emotion
- remove unnecessary `box-shadow` affordances - doesn't appear to be a thing anymore in Amsterdam theme
- remove `overflow hidden` - doesn't seem to be needed
- remove `groupSizeToClassNameMap`
* Fix iconOnly padding; fix font weights
- compressed font weight is not the same as default button weight
- [opinionated] increase uncompressed font weight to make it more obvious which is chosen
* Delete button group Sass files
* Delete `EuiButtonDisplayDeprecated`
There's no longer any components using it in EUI now that `EuiButtonGroup` has been converted to Emotion
* Update tests & snapshots
- Convert Enzyme to RTL
- Reorganize tests slightly
- Add tests for ensuring `css` properly merges
* Add Storybook playground
* changelog1 parent df49741 commit c19625a
File tree
17 files changed
+1175
-1106
lines changed- src
- components
- button
- button_display
- button_group
- __snapshots__
- datagrid/controls/__snapshots__
- global_styling/mixins
- upcoming_changelogs
17 files changed
+1175
-1106
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
18 | 10 | | |
19 | 11 | | |
20 | 12 | | |
| |||
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
26 | | - | |
27 | 18 | | |
28 | 19 | | |
29 | 20 | | |
| |||
137 | 128 | | |
138 | 129 | | |
139 | 130 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
57 | 96 | | |
58 | 97 | | |
59 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
128 | | - | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
167 | | - | |
| 169 | + | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| |||
0 commit comments