Skip to content

Commit a1d0dba

Browse files
Remove deprecated variants (#1213)
Removes the following which have been marked as deprecated for a while now 1. Alert announcement type 2. Button danger and warning variants 3. DropdownToggle overrides of the above Button variants
1 parent baa8a7b commit a1d0dba

File tree

9 files changed

+0
-388
lines changed

9 files changed

+0
-388
lines changed

scss/buttons.scss

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
$synthesis-primary: $synth-primary-cta-blue;
2222

2323
$primary: $ux-emerald-600;
24-
$danger: $ux-red;
25-
$warning: $ux-yellow-400;
2624

2725
@mixin btn-focus-outline {
2826
box-shadow: none !important;
@@ -229,152 +227,6 @@ $warning: $ux-yellow-400;
229227
}
230228
}
231229

232-
@mixin btn-danger {
233-
$btn-danger-background: $danger;
234-
$btn-danger-border: $danger;
235-
$btn-danger-color: $ux-white;
236-
237-
$btn-danger-hover-background: $ux-red-600;
238-
$btn-danger-hover-border: $ux-red-600;
239-
$btn-danger-hover-color: $ux-white;
240-
241-
$btn-danger-active-background: $ux-red-700;
242-
$btn-danger-active-border: $ux-red-700;
243-
$btn-danger-active-color: $ux-white;
244-
245-
@include button-variant(
246-
$btn-danger-background,
247-
$btn-danger-border,
248-
$btn-danger-color,
249-
250-
$btn-danger-hover-background,
251-
$btn-danger-hover-border,
252-
$btn-danger-hover-color,
253-
254-
$btn-danger-active-background,
255-
$btn-danger-active-border,
256-
$btn-danger-active-color,
257-
);
258-
259-
&:focus-visible {
260-
@include btn-focus-outline;
261-
}
262-
263-
&:active, &:focus {
264-
@include btn-remove-bootstrap-focus-outline;
265-
}
266-
}
267-
268-
@mixin btn-outline-danger {
269-
$btn-outline-danger-color: $danger;
270-
$btn-outline-danger-color-hover: $ux-white;
271-
272-
$btn-outline-danger-hover-background: $ux-red-600;
273-
$btn-outline-danger-hover-border: $ux-red-600;
274-
$btn-outline-danger-hover-color: $ux-white;
275-
276-
$btn-outline-danger-border: $danger;
277-
278-
$btn-outline-danger-active-background: $ux-red-700;
279-
$btn-outline-danger-active-border-color: $ux-red-700;
280-
281-
@include button-outline-variant(
282-
$btn-outline-danger-color,
283-
$btn-outline-danger-color-hover,
284-
285-
$btn-outline-danger-hover-background,
286-
$btn-outline-danger-hover-border,
287-
$btn-outline-danger-hover-color,
288-
);
289-
border-color: var(--btn-outline-danger-border);
290-
291-
&:active {
292-
background-color: var(--btn-outline-danger-active-background);
293-
border-color: var(--btn-outline-danger-active-border-color);
294-
}
295-
296-
&:focus-visible {
297-
@include btn-focus-outline;
298-
}
299-
300-
&:active, &:focus {
301-
@include btn-remove-bootstrap-focus-outline;
302-
}
303-
}
304-
305-
@mixin btn-warning {
306-
$btn-warning-background: $warning;
307-
$btn-warning-border: $warning;
308-
$btn-warning-color: $ux-yellow-900;
309-
310-
$btn-warning-hover-background: $ux-yellow-500;
311-
$btn-warning-hover-border: $ux-yellow-500;
312-
$btn-warning-hover-color: $ux-yellow-900;
313-
314-
$btn-warning-active-background: $ux-yellow-600;
315-
$btn-warning-active-border: $ux-yellow-600;
316-
$btn-warning-active-color: $ux-yellow-900;
317-
318-
@include button-variant(
319-
$btn-warning-background,
320-
$btn-warning-border,
321-
$btn-warning-color,
322-
323-
$btn-warning-hover-background,
324-
$btn-warning-hover-border,
325-
$btn-warning-hover-color,
326-
327-
$btn-warning-active-background,
328-
$btn-warning-active-border,
329-
$btn-warning-active-color,
330-
);
331-
332-
&:focus-visible {
333-
@include btn-focus-outline;
334-
}
335-
336-
&:active, &:focus {
337-
@include btn-remove-bootstrap-focus-outline;
338-
}
339-
}
340-
341-
@mixin btn-outline-warning {
342-
$btn-outline-warning-color: $ux-yellow-900;
343-
$btn-outline-warning-color-hover: $ux-yellow-900;
344-
345-
$btn-outline-warning-hover-background: $warning;
346-
$btn-outline-warning-hover-border: $warning;
347-
$btn-outline-warning-hover-color: $ux-yellow-900;
348-
349-
$btn-outline-warning-border: $ux-yellow-500;
350-
351-
$btn-outline-warning-active-background: $ux-yellow-500;
352-
$btn-outline-warning-active-border-color: $ux-yellow-500;
353-
354-
@include button-outline-variant(
355-
$btn-outline-warning-color,
356-
$btn-outline-warning-color-hover,
357-
358-
$btn-outline-warning-hover-background,
359-
$btn-outline-warning-hover-border,
360-
$btn-outline-warning-hover-color,
361-
);
362-
border-color: var(--btn-outline-warning-border);
363-
364-
&:active {
365-
background-color: var(--btn-outline-warning-active-background);
366-
border-color: var(--btn-outline-warning-active-border-color);
367-
}
368-
369-
&:focus-visible {
370-
@include btn-focus-outline;
371-
}
372-
373-
&:active, &:focus {
374-
@include btn-remove-bootstrap-focus-outline;
375-
}
376-
}
377-
378230
@mixin btn-transparent {
379231
$btn-transparent-background: transparent;
380232
$btn-transparent-border: transparent;

src/Alert/Alert.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import classNames from 'classnames';
1717
export const MessageTypes = {
1818
SUCCESS: 'success',
1919
INFO: 'info',
20-
ANNOUNCEMENT: 'announcement',
2120
FEATURE: 'feature',
2221
WARNING: 'warning',
2322
ERROR: 'error',
@@ -39,8 +38,6 @@ const getAlertIcon = (type) => {
3938
<FontAwesomeIcon icon={faInfo} transform="shrink-4" />
4039
</span>
4140
);
42-
case MessageTypes.ANNOUNCEMENT:
43-
return (<FontAwesomeIcon icon={faBullhorn} transform="grow-2" />);
4441
case MessageTypes.FEATURE:
4542
return (<FontAwesomeIcon icon={faBullhorn} transform="grow-2" />);
4643
case MessageTypes.WARNING:

src/Alert/Alert.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ page and are not affected by an event.
3636
### Feature
3737

3838
- Use when showcasing a new feature to a user.
39-
- NOTE: use this variant instead of the Announcement variant (this will be deprecated soon)
4039

4140
<Canvas of={ComponentStories.Feature} />
4241

src/Alert/Alert.scss

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,6 @@
129129
}
130130
}
131131

132-
.Alert-announcement {
133-
border-left: 8px solid var(--synth-hyperlink-color);
134-
135-
.close {
136-
@include close-action;
137-
}
138-
139-
.primary-action {
140-
@include primary-action;
141-
}
142-
}
143-
144132
.Alert-feature {
145133
border: 2px solid var(--ux-teal-600);
146134

@@ -294,20 +282,6 @@
294282
}
295283
}
296284

297-
.Alert-announcement {
298-
background-color: var(--ux-blue-100);
299-
color: var(--ux-blue-700);
300-
border-left: 8px solid var(--ux-blue-300);
301-
302-
.close {
303-
@include close-action;
304-
}
305-
306-
.primary-action {
307-
@include primary-action;
308-
}
309-
}
310-
311285
.Alert-feature {
312286
background-color: var(--ux-teal-100);
313287
color: var(--ux-teal-800);

src/Button/Button.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ import * as ComponentStories from './Button.stories';
4444
- Space is limited (e.g. too small for text alone)
4545
- The icon is standardized or represents an object with a strong physical analog or visual attribute (e.g. floppy disk (Save), pencil (Edit))
4646

47-
### Deprecated variants
48-
49-
- The `danger` and `warning` variants are deprecated and will be removed in the next major version.
50-
5147
## Button vs. Link distinction
5248

5349
- Buttons are used for actions that affect the application. Clicking them causes changes on the frontend or backend.

src/Button/Button.scss

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@
5454
@include btn-tertiary;
5555
}
5656

57-
&.btn-danger {
58-
@include btn-danger;
59-
}
60-
61-
&.btn-outline-danger {
62-
@include btn-outline-danger;
63-
}
64-
65-
&.btn-warning {
66-
@include btn-warning;
67-
}
68-
69-
&.btn-outline-warning {
70-
@include btn-outline-warning;
71-
}
72-
7357
&.btn-transparent {
7458
@include btn-transparent;
7559
}

0 commit comments

Comments
 (0)