Skip to content

Commit 99b0077

Browse files
Merge release/1.32.0 into main branch (#660)
* remove required id from FormGroup (#645) * Fix cypress tests (#647) * Add data-testid to LoadingOverlay (#652) * add Link variant to Button component (#659) * upgrade react-select v5 (#658) * Add Accordion to DS (#656)
1 parent a3ab62a commit 99b0077

25 files changed

+4976
-1309
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const accordions = [
2+
{
3+
name: 'Default',
4+
path: 'components-accordion--default',
5+
class: '.AccordionToggle__title',
6+
match: 'Accordion Toggle #1',
7+
},
8+
{
9+
name: 'Default Open',
10+
path: 'components-accordion--default-open',
11+
class: '.AccordionToggle__title',
12+
match: 'Accordion Toggle #1',
13+
},
14+
{
15+
name: 'Chevron Left',
16+
path: 'components-accordion--chevron-left',
17+
class: '.AccordionToggle__title',
18+
match: 'Accordion Toggle #1',
19+
},
20+
{
21+
name: 'Flush',
22+
path: 'components-accordion--flush',
23+
class: '.AccordionToggle__title',
24+
match: 'Accordion Toggle #1',
25+
},
26+
{
27+
name: 'Separate',
28+
path: 'components-accordion--separate',
29+
class: '.AccordionToggle__title',
30+
match: 'Accordion Toggle #1',
31+
},
32+
{
33+
name: 'Disabled',
34+
path: 'components-accordion--disabled',
35+
class: '.AccordionToggle__title',
36+
match: 'Accordion Toggle -- Disabled',
37+
},
38+
];
39+
40+
describe('Accordion', () => {
41+
accordions.forEach((test) => {
42+
it(test.name, () => {
43+
cy.visit(test.path);
44+
const match = test.match ? test.match : test.name;
45+
cy.get('#storybook-preview-iframe').iframe().find(test.class).should('contain', match);
46+
cy.takePercySnapshot(test.path);
47+
});
48+
});
49+
});

cypress/integration/button_spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ const buttons = [
2323
class: '.Button',
2424
match: 'Skip',
2525
},
26+
{
27+
name: 'Link',
28+
path: 'components-button--link',
29+
class: '.Button',
30+
match: 'Send',
31+
},
2632
{
2733
name: 'Brands',
2834
path: 'components-button--brands',

cypress/integration/form_elements/checkbox_button_group_spec.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,40 @@ const checkboxButtonGroups = [
22
{
33
name: 'Default',
44
path: 'components-form-elements-checkboxbuttongroup--default',
5-
class: '.InputLabel',
5+
class: '.FormControlLabel__label',
6+
value: 'Value',
67
},
78
{
89
name: 'Default Row',
910
path: 'components-form-elements-checkboxbuttongroup--default-row',
10-
class: '.InputLabel',
11+
class: '.FormControlLabel__label',
12+
value: 'Label',
1113
},
1214
{
1315
name: 'Bordered Row',
1416
path: 'components-form-elements-checkboxbuttongroup--bordered-row',
15-
class: '.InputLabel',
17+
class: '.FormControlLabel__label',
18+
value: 'Label',
1619
},
1720
{
1821
name: 'Description',
1922
path: 'components-form-elements-checkboxbuttongroup--description',
20-
class: '.InputLabel',
23+
class: '.FormControlLabel__label',
24+
value: 'Label',
2125
},
2226
{
2327
name: 'Description Row',
2428
path: 'components-form-elements-checkboxbuttongroup--description-row',
25-
class: '.InputLabel',
29+
class: '.FormControlLabel__label',
30+
value: 'Label',
2631
},
2732
];
2833

2934
describe('Form Elements -> CheckboxButtonGroup', () => {
3035
checkboxButtonGroups.forEach((test) => {
3136
it(test.name, () => {
3237
cy.visit(test.path);
33-
cy.get('#storybook-preview-iframe').iframe().find(test.class).should('contain', 'Label');
38+
cy.get('#storybook-preview-iframe').iframe().find(test.class).should('contain', test.value);
3439
cy.takePercySnapshot(test.path);
3540
});
3641
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@user-interviews/ui-design-system",
3-
"version": "1.31.1",
3+
"version": "1.32.0",
44
"dependencies": {
55
"react-bootstrap": "^2.0.2",
66
"react-router-dom": "^5.2.0",
7-
"react-select": "^3.0.8",
7+
"react-select": "^5.0.0",
88
"react-transition-group": "^4.3.0",
99
"uuid": "^7.0.2"
1010
},

scss/buttons.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,3 +436,46 @@ $warning: $ux-yellow-400;
436436
}
437437
}
438438

439+
@mixin btn-link {
440+
$btn-link-background: transparent;
441+
$btn-link-border: transparent;
442+
$btn-link-color: $ux-blue;
443+
444+
$btn-link-hover-background: transparent;
445+
$btn-link-hover-border: transparent;
446+
$btn-link-hover-color: $ux-blue-600;
447+
448+
$btn-link-active-background: transparent;
449+
$btn-link-active-border: transparent;
450+
$btn-link-active-color: $ux-blue-600;
451+
452+
@include button-variant(
453+
$btn-link-background,
454+
$btn-link-border,
455+
$btn-link-color,
456+
457+
$btn-link-hover-background,
458+
$btn-link-hover-border,
459+
$btn-link-hover-color,
460+
461+
$btn-link-active-background,
462+
$btn-link-active-border,
463+
$btn-link-active-color,
464+
);
465+
466+
text-decoration: none;
467+
468+
&:disabled {
469+
color: $ux-blue;
470+
opacity: 0.5;
471+
}
472+
473+
&:hover {
474+
text-decoration: underline;
475+
}
476+
477+
&:focus, &:active {
478+
@include btn-focus-outline;
479+
}
480+
}
481+

scss/colors/inputs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import './palette';
22

33
$input-border-color: $ux-gray-400; // Override bootstrap default
4-
$input-box-shadow: inset 0px 2px 2px rgb(225 228 232 / 65%);
4+
$input-box-shadow: inset 0px 2px 2px rgba(225, 228, 232, 0.65);
55
$input-disabled-bg: $ux-gray-300; // Override bootstrap default
66
$input-focus-border-color: $ux-blue-500;
77
$input-btn-focus-color: $ux-blue-300;

scss/theme.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import './navbar';
1212
@import './spacing';
1313
@import './timing.scss';
14+
@import './transitions.scss';
1415
@import './typography';
1516
@import './z_stack';
1617

scss/transitions.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$focus-state-transition-time: 0.1s;
2+
3+
$chevron-rotation-transition-time: 0.2s;

0 commit comments

Comments
 (0)