Skip to content

Commit 4ea721f

Browse files
authored
Merge pull request #48 from springload/chore/upgrade-deps
Chore/upgrade dev deps
2 parents 47bed2b + 5a5e60f commit 4ea721f

File tree

9 files changed

+4412
-2721
lines changed

9 files changed

+4412
-2721
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ dist
33
demo/bundle.js
44
demo/bundle.js.map
55
coverage/
6-
flow-typed/
6+
flow-typed/
7+
pages/

CHANGELOG.md

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
Changelog
2-
=========
1+
# Changelog
32

43
> All notable changes to this project are documented in this file.
5-
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4+
> This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5+
6+
## [[v2.0.1]](https://github.com/springload/react-accessible-accordion/releases/tag/v2.0.0)
7+
8+
Version 2.1 represents changes to devDependencies only, and should have no backward-incompatible effect on this library.
9+
10+
### Changed
11+
12+
* Upgrade all dev-dependencies except the eslint configs.
613

714
## [[v2.0.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v2.0.0)
815

@@ -12,20 +19,20 @@ As this is a major release, users should expect some breaking changes - though t
1219

1320
### Added
1421

15-
- Exports `resetNextId` (https://github.com/springload/react-accessible-accordion/issues/41).
22+
* Exports `resetNextId` (https://github.com/springload/react-accessible-accordion/issues/41).
1623

1724
### Fixed
1825

19-
- Defect where controlled components' props were overridden by React.Children.map (https://github.com/springload/react-accessible-accordion/issues/33).
20-
- Defect where accordion crashed with unexpected `children` types (https://github.com/springload/react-accessible-accordion/issues/45).
21-
- Defect where React Accessible Accordion's components could not be extended.
22-
- Defect where the `children` of `Accordion` or `AccordionItem` could not be arbitrary.
23-
- Defect where `AccordionItem` had to be a child of `Accordion` (as opposed to to an arbitrary-level descendant).
24-
- Defect where `AccordionItemBody` and `AccordionItemTitle` had to be children of `AccordionItem` (as opposed to arbitrary-level descendants).
26+
* Defect where controlled components' props were overridden by React.Children.map (https://github.com/springload/react-accessible-accordion/issues/33).
27+
* Defect where accordion crashed with unexpected `children` types (https://github.com/springload/react-accessible-accordion/issues/45).
28+
* Defect where React Accessible Accordion's components could not be extended.
29+
* Defect where the `children` of `Accordion` or `AccordionItem` could not be arbitrary.
30+
* Defect where `AccordionItem` had to be a child of `Accordion` (as opposed to to an arbitrary-level descendant).
31+
* Defect where `AccordionItemBody` and `AccordionItemTitle` had to be children of `AccordionItem` (as opposed to arbitrary-level descendants).
2532

2633
### Removed:
2734

28-
- 🚨 Breaking change 🚨 `activeItems` property is no longer supported.
35+
* 🚨 Breaking change 🚨 `activeItems` property is no longer supported.
2936

3037
Control at the `Accordion` level (via the `activeItems` prop) and `AccordionItem` level (via the `expanded` prop) fought against one another, and choosing which control mechanism to give preference to would have been an arbitrary decision - and whichever way we went, we would have had test cases which demonstrated unusual/unpredictable behaviour. The `activeItems` mechanism was the obvious one to remove - it was arguably the "less React-y way", and we considered it more of a convenience than a feature. Crucially though, it fought too hard against the new architecture of the library, and keeping it would have prevented us enabling lots of other new features or resolving some of the issues that our users had raised.
3138

@@ -50,55 +57,54 @@ Please don't hesitate to reach out to one of the maintainers (or raise an issue)
5057

5158
## [[v1.0.1]](https://github.com/springload/react-accessible-accordion/releases/tag/v1.0.1)
5259

53-
- Renders predictable `id` attributes.(https://github.com/springload/react-accessible-accordion/pull/29)
60+
* Renders predictable `id` attributes.(https://github.com/springload/react-accessible-accordion/pull/29)
5461

5562
## [[v1.0.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v1.0.0)
5663

57-
- Replace prop-types implementation with flow-types (https://github.com/springload/react-accessible-accordion/pull/22)
58-
Thanks @ryami333 for the great contribution
64+
* Replace prop-types implementation with flow-types (https://github.com/springload/react-accessible-accordion/pull/22)
65+
Thanks @ryami333 for the great contribution
5966

6067
NB: This version is backward compatible. It's just bumping to 1.0 to represent maturity rather than API changes.
6168

6269
## [[v0.6.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.6.0)
6370

64-
- Improved accessibility support (Following https://github.com/springload/react-accessible-accordion/pull/19)
65-
- Adds possibility to programmatically open items(https://github.com/springload/react-accessible-accordion/pull/13)
66-
Thanks @epotockiy for the contribution
67-
- Improved accessibility status on demo page
68-
- Documentation about accessibility for this component
71+
* Improved accessibility support (Following https://github.com/springload/react-accessible-accordion/pull/19)
72+
* Adds possibility to programmatically open items(https://github.com/springload/react-accessible-accordion/pull/13)
73+
Thanks @epotockiy for the contribution
74+
* Improved accessibility status on demo page
75+
* Documentation about accessibility for this component
6976

7077
## [[v0.5.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.5.0)
7178

72-
- Possibility to add a CSS class to hidden blocks (Following https://github.com/springload/react-accessible-accordion/pull/16)
73-
- Githooks are executable (https://github.com/springload/react-accessible-accordion/pull/15)
74-
- Bump to Node 8 / NPM 5
79+
* Possibility to add a CSS class to hidden blocks (Following https://github.com/springload/react-accessible-accordion/pull/16)
80+
* Githooks are executable (https://github.com/springload/react-accessible-accordion/pull/15)
81+
* Bump to Node 8 / NPM 5
7582

7683
## [[v0.4.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.4.0)
7784

78-
- Supports React 15.5+
85+
* Supports React 15.5+
7986

8087
## [[v0.3.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.3.0)
8188

82-
- No warnings when you have only one item in the accordion
89+
* No warnings when you have only one item in the accordion
8390

8491
## [[v0.2.0]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.2.0)
8592

86-
- Possibility to have extra blocks in AccordionItem
93+
* Possibility to have extra blocks in AccordionItem
8794

8895
## [[v0.1.2]](https://github.com/springload/react-accessible-accordion/releases/tag/v0.1.2)
8996

90-
- Accordion mode / Collapse mode
91-
- Possibility to pre expand items
92-
- 100% coverage with unit tests
93-
- Possibility to customise CSS.
94-
- Clean CSS for the demo/github page.
95-
97+
* Accordion mode / Collapse mode
98+
* Possibility to pre expand items
99+
* 100% coverage with unit tests
100+
* Possibility to customise CSS.
101+
* Clean CSS for the demo/github page.
96102

97103
## [[vx.y.z]](https://github.com/springload/Quicktube.js/releases/tag/x.y.z) Template from http://keepachangelog.com/
98104

99105
### Added
100106

101-
- Something was added to the API / a new feature was introduced.
107+
* Something was added to the API / a new feature was introduced.
102108

103109
### Changed
104110

demo/css/demo.css

Lines changed: 97 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
}
1717

1818
.u-margin-bottom-s {
19-
margin-bottom: .5rem;
19+
margin-bottom: 0.5rem;
2020
}
2121

22-
2322
.u-position-absolute {
2423
position: absolute;
2524
}
@@ -29,112 +28,132 @@
2928
}
3029

3130
.accordion {
32-
border: 1px solid rgba(0, 0, 0, .1);
31+
border: 1px solid rgba(0, 0, 0, 0.1);
3332
border-radius: 2px;
3433
}
3534

3635
.accordion__item + .accordion__item {
37-
border-top: 1px solid rgba(0, 0, 0, .1);
36+
border-top: 1px solid rgba(0, 0, 0, 0.1);
3837
}
3938

4039
.accordion__item--has-icon {
4140
position: relative;
4241
}
4342

44-
.accordion__title {
45-
background-color: #f4f4f4;
46-
color: #444;
47-
cursor: pointer;
48-
padding: 18px;
49-
width: 100%;
50-
text-align: left;
51-
border: none;
52-
}
43+
.accordion__title {
44+
background-color: #f4f4f4;
45+
color: #444;
46+
cursor: pointer;
47+
padding: 18px;
48+
width: 100%;
49+
text-align: left;
50+
border: none;
51+
}
5352

54-
.accordion__title:hover {
55-
background-color: #ddd;
56-
}
53+
.accordion__title:hover {
54+
background-color: #ddd;
55+
}
5756

58-
.accordion__body {
59-
padding: 20px;
60-
}
57+
.accordion__body {
58+
padding: 20px;
59+
}
6160

62-
.accordion__title > *:last-child,
63-
.accordion__body > *:last-child {
64-
margin-bottom: 0;
65-
}
61+
.accordion__title > *:last-child,
62+
.accordion__body > *:last-child {
63+
margin-bottom: 0;
64+
}
6665

67-
.accordion__arrow {
68-
display: inline-block;
69-
position: relative;
70-
width: 24px;
71-
height: 12px;
72-
position: absolute;
73-
top: 50%;
74-
right: 0;
75-
margin-top: -6px;
76-
}
77-
78-
79-
.accordion__arrow::after,
80-
.accordion__arrow::before {
81-
display: block;
82-
position: absolute;
83-
top: 50%;
84-
width: 10px;
85-
height: 2px;
86-
background-color: currentColor;
87-
content: '';
88-
}
89-
90-
.accordion__arrow::before {
91-
left: 4px;
92-
transform: rotate(45deg);
93-
}
94-
95-
[aria-expanded="true"] .accordion__arrow::before {
96-
transform: rotate(-45deg);
97-
}
98-
99-
.accordion__arrow::after {
100-
right: 4px;
101-
transform: rotate(-45deg);
102-
}
103-
104-
[aria-expanded="true"] .accordion__arrow::after {
105-
transform: rotate(45deg);
106-
}
107-
108-
.accordion__arrow::before, .accordion__arrow::after {
109-
transition: transform .25s ease, -webkit-transform .25s ease;
110-
}
66+
.accordion__arrow {
67+
display: inline-block;
68+
position: relative;
69+
width: 24px;
70+
height: 12px;
71+
position: absolute;
72+
top: 50%;
73+
right: 0;
74+
margin-top: -6px;
75+
}
76+
77+
.accordion__arrow::after,
78+
.accordion__arrow::before {
79+
display: block;
80+
position: absolute;
81+
top: 50%;
82+
width: 10px;
83+
height: 2px;
84+
background-color: currentColor;
85+
content: '';
86+
}
87+
88+
.accordion__arrow::before {
89+
left: 4px;
90+
transform: rotate(45deg);
91+
}
92+
93+
[aria-expanded='true'] .accordion__arrow::before {
94+
transform: rotate(-45deg);
95+
}
96+
97+
.accordion__arrow::after {
98+
right: 4px;
99+
transform: rotate(-45deg);
100+
}
101+
102+
[aria-expanded='true'] .accordion__arrow::after {
103+
transform: rotate(45deg);
104+
}
105+
106+
.accordion__arrow::before,
107+
.accordion__arrow::after {
108+
transition: transform 0.25s ease, -webkit-transform 0.25s ease;
109+
}
111110

112111
/* -------------------------------------------------- */
113112
/* ---------------- Animation part ------------------ */
114113
/* -------------------------------------------------- */
115114

116115
@keyframes move-down {
117-
0% { transform: translateY(0); }
118-
10% { transform: translateY(0); }
119-
20% { transform: translateY(5px); }
120-
30% { transform: translateY(0); }
121-
100% { transform: translateY(0); }
116+
0% {
117+
transform: translateY(0);
118+
}
119+
10% {
120+
transform: translateY(0);
121+
}
122+
20% {
123+
transform: translateY(5px);
124+
}
125+
30% {
126+
transform: translateY(0);
127+
}
128+
100% {
129+
transform: translateY(0);
130+
}
122131
}
123132

124133
@keyframes move-up {
125-
0% { transform: translateY(0); }
126-
10% { transform: translateY(0); }
127-
20% { transform: translateY(-5px); }
128-
30% { transform: translateY(0); }
129-
100% { transform: translateY(0); }
134+
0% {
135+
transform: translateY(0);
136+
}
137+
10% {
138+
transform: translateY(0);
139+
}
140+
20% {
141+
transform: translateY(-5px);
142+
}
143+
30% {
144+
transform: translateY(0);
145+
}
146+
100% {
147+
transform: translateY(0);
148+
}
130149
}
131150

132151
.accordion__title--animated:hover .accordion__arrow {
133152
animation-name: move-down;
134153
animation-duration: 1.5s;
135154
}
136155

137-
.accordion__title--animated[aria-expanded="true"]:hover .accordion__arrow {
156+
.accordion__title--animated[aria-expanded='true']:hover .accordion__arrow {
138157
animation-name: move-up;
139158
animation-duration: 1.5s;
140159
}

demo/js/demo.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ const Example = () => (
409409
npm install<br />
410410
# Install the git hooks.<br />
411411
./.githooks/deploy<br />
412-
# Set up a `.env` file with the appropriate secrets.<br
413-
/>
412+
# Set up a `.env` file with the appropriate secrets.<br />
414413
touch .env
415414
</p>
416415
</AccordionItemBody>

0 commit comments

Comments
 (0)