@sb1/ffe-grid-react 10.1.5 → 11.1.2
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/es/Grid.js +3 -1
- package/es/GridCol.js +8 -6
- package/es/GridRow.js +4 -2
- package/es/InlineGrid.js +3 -1
- package/es/background-colors.js +2 -2
- package/lib/Grid.js +3 -1
- package/lib/GridCol.js +10 -8
- package/lib/GridRow.js +7 -5
- package/lib/InlineGrid.js +3 -1
- package/lib/background-colors.js +2 -2
- package/lib/index.js +4 -4
- package/package.json +6 -8
- package/types/index.d.ts +7 -9
- package/CHANGELOG.md +0 -534
- package/es/Grid.spec.js +0 -62
- package/es/GridCol.spec.js +0 -209
- package/es/GridRow.spec.js +0 -97
- package/es/InlineGrid.spec.js +0 -45
- package/lib/Grid.spec.js +0 -69
- package/lib/GridCol.spec.js +0 -217
- package/lib/GridRow.spec.js +0 -106
- package/lib/InlineGrid.spec.js +0 -52
package/CHANGELOG.md
DELETED
|
@@ -1,534 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [10.1.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.1.4...@sb1/ffe-grid-react@10.1.5) (2021-03-26)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* **ffe-grid-react:** remove check for nested grids ([6304ddc](https://github.com/SpareBank1/designsystem/commit/6304ddcbfdc6373bec426484c116463069c3772a))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## [10.1.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.1.3...@sb1/ffe-grid-react@10.1.4) (2021-03-15)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* **ffe-grid-react:** broadens version of peer dependencies ([1827e12](https://github.com/SpareBank1/designsystem/commit/1827e12d8decd0ee3d2fe37c7c8689a952826b9e))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## [10.1.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.1.2...@sb1/ffe-grid-react@10.1.3) (2021-02-03)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
33
|
-
* packages/ffe-grid-react/package.json to reduce vulnerabilities ([d81834c](https://github.com/SpareBank1/designsystem/commit/d81834cc927050296e7d06657b897f854a5f58a4))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## [10.1.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.1.1...@sb1/ffe-grid-react@10.1.2) (2021-02-02)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* **ffe-grid-react:** reduce vulnerabilities ([680ad96](https://github.com/SpareBank1/designsystem/commit/680ad969eeafc1eb6fffb4e074cc0fed50f06435))
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## [10.1.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.1.0...@sb1/ffe-grid-react@10.1.1) (2019-11-25)
|
|
51
|
-
|
|
52
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
53
|
-
|
|
54
|
-
# [10.1.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@10.0.0...@sb1/ffe-grid-react@10.1.0) (2019-09-16)
|
|
55
|
-
|
|
56
|
-
### Features
|
|
57
|
-
|
|
58
|
-
- **ffe-grid-react:** add white as background color ([5c64729](https://github.com/SpareBank1/designsystem/commit/5c64729))
|
|
59
|
-
|
|
60
|
-
# [10.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.3.0...@sb1/ffe-grid-react@10.0.0) (2019-08-27)
|
|
61
|
-
|
|
62
|
-
### chore
|
|
63
|
-
|
|
64
|
-
- bump React to 16.9 to allow for using hooks etc ([e3901f1](https://github.com/SpareBank1/designsystem/commit/e3901f1))
|
|
65
|
-
|
|
66
|
-
### BREAKING CHANGES
|
|
67
|
-
|
|
68
|
-
- peerDep of React is raised to 16.9. While this in itself
|
|
69
|
-
isn't a breaking change, it allows for the use of hooks in later releases.
|
|
70
|
-
Such changes would just be a minor version, or even a patch, but without
|
|
71
|
-
this major version bump it would result in a runtime error for consumers.
|
|
72
|
-
|
|
73
|
-
# [9.3.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.2.1...@sb1/ffe-grid-react@9.3.0) (2019-06-28)
|
|
74
|
-
|
|
75
|
-
### Features
|
|
76
|
-
|
|
77
|
-
- **ffe-grid-react:** Avoid circular imports ([dbfc95b](https://github.com/SpareBank1/designsystem/commit/dbfc95b))
|
|
78
|
-
|
|
79
|
-
## [9.2.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.2.0...@sb1/ffe-grid-react@9.2.1) (2019-04-26)
|
|
80
|
-
|
|
81
|
-
### Bug Fixes
|
|
82
|
-
|
|
83
|
-
- **ffe-grid-react:** Fix in typescript definition, children should not be required. ([cdfeaa8](https://github.com/SpareBank1/designsystem/commit/cdfeaa8))
|
|
84
|
-
|
|
85
|
-
# [9.2.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.1.4...@sb1/ffe-grid-react@9.2.0) (2019-04-25)
|
|
86
|
-
|
|
87
|
-
### Features
|
|
88
|
-
|
|
89
|
-
- **ffe-grid-react:** Added type definitions for typescript ([524cf3e](https://github.com/SpareBank1/designsystem/commit/524cf3e))
|
|
90
|
-
- **ffe-grid-react:** Added type definitions for typescript ([4dd607a](https://github.com/SpareBank1/designsystem/commit/4dd607a))
|
|
91
|
-
|
|
92
|
-
## [9.1.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.1.3...@sb1/ffe-grid-react@9.1.4) (2019-01-23)
|
|
93
|
-
|
|
94
|
-
### Bug Fixes
|
|
95
|
-
|
|
96
|
-
- **ffe-grid-react:** Reduce console.error noise with inline-grid ([697318d](https://github.com/SpareBank1/designsystem/commit/697318d))
|
|
97
|
-
|
|
98
|
-
## [9.1.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.1.2...@sb1/ffe-grid-react@9.1.3) (2018-12-11)
|
|
99
|
-
|
|
100
|
-
### Bug Fixes
|
|
101
|
-
|
|
102
|
-
- Build tree shakeable packages ([fb4a9ea](https://github.com/SpareBank1/designsystem/commit/fb4a9ea))
|
|
103
|
-
|
|
104
|
-
## [9.1.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.1.1...@sb1/ffe-grid-react@9.1.2) (2018-11-26)
|
|
105
|
-
|
|
106
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
107
|
-
|
|
108
|
-
## [9.1.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.1.0...@sb1/ffe-grid-react@9.1.1) (2018-11-08)
|
|
109
|
-
|
|
110
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
111
|
-
|
|
112
|
-
# [9.1.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.0.2...@sb1/ffe-grid-react@9.1.0) (2018-10-05)
|
|
113
|
-
|
|
114
|
-
### Features
|
|
115
|
-
|
|
116
|
-
- **ffe-grid-react:** Add support for inline grid ([9966b86](https://github.com/SpareBank1/designsystem/commit/9966b86))
|
|
117
|
-
|
|
118
|
-
<a name="9.0.2"></a>
|
|
119
|
-
|
|
120
|
-
## [9.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.0.1...@sb1/ffe-grid-react@9.0.2) (2018-08-09)
|
|
121
|
-
|
|
122
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
123
|
-
|
|
124
|
-
<a name="9.0.1"></a>
|
|
125
|
-
|
|
126
|
-
## [9.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@9.0.0...@sb1/ffe-grid-react@9.0.1) (2018-06-26)
|
|
127
|
-
|
|
128
|
-
### Bug Fixes
|
|
129
|
-
|
|
130
|
-
- **ffe-grid-react:** Fix incorrect propType ([e26c1d6](https://github.com/SpareBank1/designsystem/commit/e26c1d6))
|
|
131
|
-
|
|
132
|
-
<a name="9.0.0"></a>
|
|
133
|
-
|
|
134
|
-
# [9.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@8.0.0...@sb1/ffe-grid-react@9.0.0) (2018-06-19)
|
|
135
|
-
|
|
136
|
-
### Bug Fixes
|
|
137
|
-
|
|
138
|
-
- **ffe-grid-react:** Removed FFE support for some backgrounds ([713ab6d](https://github.com/SpareBank1/designsystem/commit/713ab6d)), closes [#256](https://github.com/SpareBank1/designsystem/issues/256)
|
|
139
|
-
|
|
140
|
-
### BREAKING CHANGES
|
|
141
|
-
|
|
142
|
-
- **ffe-grid-react:** Support for background colours that are not listed as backgrounds in the [design guide](https://design.sparebank1.no/visuell-identitet.html#visuell-identitet_farger) has been removed. This means the background props `blue-cobalt`, `blue-royal` and `purple-magenta`. If you were using any of those on rows or columns, please consider switching to one of those that are supported by FFE directly or add your own custom CSS classes in userland in order to have these colours.
|
|
143
|
-
|
|
144
|
-
<a name="8.0.0"></a>
|
|
145
|
-
|
|
146
|
-
# [8.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.3.0...@sb1/ffe-grid-react@8.0.0) (2018-06-18)
|
|
147
|
-
|
|
148
|
-
### Code Refactoring
|
|
149
|
-
|
|
150
|
-
- **ffe-grid-react:** Normalized padding props ([97ffc71](https://github.com/SpareBank1/designsystem/commit/97ffc71)), closes [#282](https://github.com/SpareBank1/designsystem/issues/282)
|
|
151
|
-
|
|
152
|
-
### BREAKING CHANGES
|
|
153
|
-
|
|
154
|
-
- **ffe-grid-react:** Removed the "no" prefix from the padding props.
|
|
155
|
-
For `GridCol`, `noBottomPadding` is now `bottomPadding`.
|
|
156
|
-
For `Grid`, `noTopPadding` is now `topPadding`.
|
|
157
|
-
|
|
158
|
-
The default behaviour has not been changed, so to migrate you need to
|
|
159
|
-
|
|
160
|
-
- Replace all usage of `noBottomPadding={true}` with `bottomPadding={false}` on GridCols.
|
|
161
|
-
- Replace all usage of `noTopPadding={true}` with `topPadding={false}` on Grids.
|
|
162
|
-
|
|
163
|
-
<a name="7.3.0"></a>
|
|
164
|
-
|
|
165
|
-
# [7.3.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.2.0...@sb1/ffe-grid-react@7.3.0) (2018-05-29)
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
- **ffe-grid-react:** remove warning when running tests ([aeefcb3](https://github.com/SpareBank1/designsystem/commit/aeefcb3))
|
|
170
|
-
|
|
171
|
-
### Features
|
|
172
|
-
|
|
173
|
-
- **ffe-grid-react:** Add support for more backgrounds ([6a4062a](https://github.com/SpareBank1/designsystem/commit/6a4062a)), closes [#256](https://github.com/SpareBank1/designsystem/issues/256)
|
|
174
|
-
|
|
175
|
-
<a name="7.2.0"></a>
|
|
176
|
-
|
|
177
|
-
# [7.2.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.1.2...@sb1/ffe-grid-react@7.2.0) (2018-04-25)
|
|
178
|
-
|
|
179
|
-
### Features
|
|
180
|
-
|
|
181
|
-
- **ffe-grid-react:** Add support for col bg ([bd16761](https://github.com/SpareBank1/designsystem/commit/bd16761))
|
|
182
|
-
|
|
183
|
-
<a name="7.1.2"></a>
|
|
184
|
-
|
|
185
|
-
## [7.1.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.1.1...@sb1/ffe-grid-react@7.1.2) (2018-04-12)
|
|
186
|
-
|
|
187
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
188
|
-
|
|
189
|
-
<a name="7.1.1"></a>
|
|
190
|
-
|
|
191
|
-
## [7.1.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.1.0...@sb1/ffe-grid-react@7.1.1) (2018-03-27)
|
|
192
|
-
|
|
193
|
-
**Note:** Version bump only for package @sb1/ffe-grid-react
|
|
194
|
-
|
|
195
|
-
<a name="7.1.0"></a>
|
|
196
|
-
|
|
197
|
-
# [7.1.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.0.2...@sb1/ffe-grid-react@7.1.0) (2018-03-22)
|
|
198
|
-
|
|
199
|
-
### Features
|
|
200
|
-
|
|
201
|
-
- **ffe-grid-react:** Add centerText prop to GridCol ([a116f24](https://github.com/SpareBank1/designsystem/commit/a116f24))
|
|
202
|
-
|
|
203
|
-
<a name="7.0.2"></a>
|
|
204
|
-
|
|
205
|
-
## [7.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.0.0...@sb1/ffe-grid-react@7.0.2) (2018-03-07)
|
|
206
|
-
|
|
207
|
-
### Bug Fixes
|
|
208
|
-
|
|
209
|
-
- Correct peerDependencies after breaking change ([aab59ce](https://github.com/SpareBank1/designsystem/commit/aab59ce))
|
|
210
|
-
|
|
211
|
-
<a name="7.0.1"></a>
|
|
212
|
-
|
|
213
|
-
## [7.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-grid-react@7.0.0...@sb1/ffe-grid-react@7.0.1) (2018-03-02)
|
|
214
|
-
|
|
215
|
-
### Bug Fixes
|
|
216
|
-
|
|
217
|
-
- Correct peerDependencies after breaking change ([4318363](https://github.com/SpareBank1/designsystem/commit/4318363))
|
|
218
|
-
|
|
219
|
-
<a name="7.0.0"></a>
|
|
220
|
-
|
|
221
|
-
# 7.0.0 (2018-02-25)
|
|
222
|
-
|
|
223
|
-
### Bug Fixes
|
|
224
|
-
|
|
225
|
-
- remove all references to internal system ([ff22340](https://github.com/SpareBank1/designsystem/commit/ff22340))
|
|
226
|
-
|
|
227
|
-
### Chores
|
|
228
|
-
|
|
229
|
-
- add [@sb1](https://github.com/sb1)/ scope to all packages ([37efbb4](https://github.com/SpareBank1/designsystem/commit/37efbb4))
|
|
230
|
-
|
|
231
|
-
### BREAKING CHANGES
|
|
232
|
-
|
|
233
|
-
- All packages have been renamed to add the @sb1 scope.
|
|
234
|
-
|
|
235
|
-
See links [1] and [2] to read more about package scopes.
|
|
236
|
-
|
|
237
|
-
Unfortunately this requires you update both your dependencies in
|
|
238
|
-
`package.json` and all `import` or `require` statements in your code.
|
|
239
|
-
Also, you unfortunately have to upgrade all FFE packages at once due to
|
|
240
|
-
dependency between packages. If you are on the latest version prior to
|
|
241
|
-
this breaking change the upgrade should be a matter of updating
|
|
242
|
-
`package.json` with new package names and versions, and updating your
|
|
243
|
-
imports.
|
|
244
|
-
|
|
245
|
-
To help find the proper package versions you can either browse to the
|
|
246
|
-
packages you need or check out the list of Git tags either on
|
|
247
|
-
Github [3] or by cloning the repository and running the `git tag`
|
|
248
|
-
command. All package versions get a tag in the format
|
|
249
|
-
_package@version_.
|
|
250
|
-
|
|
251
|
-
Update your `package.json` with the latest package version and add the
|
|
252
|
-
@sb1 scope to the package name:
|
|
253
|
-
|
|
254
|
-
```diff
|
|
255
|
-
- "ffe-core": "11.0.2",
|
|
256
|
-
+ "@sb1/ffe-core": "11.0.2",
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
Scoped packages all get put in a subdirectory in `node_modules/`. In our
|
|
260
|
-
case packages will be put in the `node_modules/@sb1/` directory. If your
|
|
261
|
-
build depends on file paths (for instance for copying fonts) you need to
|
|
262
|
-
update that path to include the scope.
|
|
263
|
-
|
|
264
|
-
The directory structure also means you have to update your imports, both
|
|
265
|
-
in Less and in JavaScript.
|
|
266
|
-
|
|
267
|
-
Using `less-plugin-npm-import`:
|
|
268
|
-
|
|
269
|
-
```diff
|
|
270
|
-
- @import 'npm://ffe-core/less/ffe';
|
|
271
|
-
+ @import 'npm://@sb1/ffe-core/less/ffe';
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Using Webpack:
|
|
275
|
-
|
|
276
|
-
```diff
|
|
277
|
-
- @import '~ffe-core/less/ffe';
|
|
278
|
-
+ @import '~@sb1/ffe-core/less/ffe';
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
Using plain old paths:
|
|
282
|
-
|
|
283
|
-
```diff
|
|
284
|
-
- @import '../path/to/node_modules/ffe-core/less/ffe';
|
|
285
|
-
+ @import '../path/to/node_modules/@sb1/ffe-core/less/ffe';
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
JavaScript `import`:
|
|
289
|
-
|
|
290
|
-
```diff
|
|
291
|
-
- import { ActionButton } from 'ffe-buttons-react';
|
|
292
|
-
+ import { ActionButton } from '@sb1/ffe-buttons-react';
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
JavaScript `require`:
|
|
296
|
-
|
|
297
|
-
```diff
|
|
298
|
-
- const { ActionButton } = require('ffe-buttons-react').default;
|
|
299
|
-
+ const { ActionButton } = require('@sb1/ffe-buttons-react').default;
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
[1]: https://docs.npmjs.com/misc/scope
|
|
303
|
-
[2]: https://docs.npmjs.com/getting-started/scoped-packages
|
|
304
|
-
[3]: https://github.com/sparebank1/designsystem/tags
|
|
305
|
-
|
|
306
|
-
<a name="6.0.13"></a>
|
|
307
|
-
|
|
308
|
-
## [6.0.13](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.12...ffe-grid-react@6.0.13) (2018-02-23)
|
|
309
|
-
|
|
310
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
311
|
-
|
|
312
|
-
<a name="6.0.12"></a>
|
|
313
|
-
|
|
314
|
-
## [6.0.12](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.11...ffe-grid-react@6.0.12) (2018-02-22)
|
|
315
|
-
|
|
316
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
317
|
-
|
|
318
|
-
<a name="6.0.11"></a>
|
|
319
|
-
|
|
320
|
-
## [6.0.11](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.10...ffe-grid-react@6.0.11) (2018-02-20)
|
|
321
|
-
|
|
322
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
323
|
-
|
|
324
|
-
<a name="6.0.10"></a>
|
|
325
|
-
|
|
326
|
-
## [6.0.10](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.9...ffe-grid-react@6.0.10) (2018-02-15)
|
|
327
|
-
|
|
328
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
329
|
-
|
|
330
|
-
<a name="6.0.9"></a>
|
|
331
|
-
|
|
332
|
-
## [6.0.9](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.8...ffe-grid-react@6.0.9) (2018-02-01)
|
|
333
|
-
|
|
334
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
335
|
-
|
|
336
|
-
<a name="6.0.8"></a>
|
|
337
|
-
|
|
338
|
-
## [6.0.8](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.7...ffe-grid-react@6.0.8) (2018-01-19)
|
|
339
|
-
|
|
340
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
341
|
-
|
|
342
|
-
<a name="6.0.7"></a>
|
|
343
|
-
|
|
344
|
-
## [6.0.7](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.6...ffe-grid-react@6.0.7) (2018-01-19)
|
|
345
|
-
|
|
346
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
347
|
-
|
|
348
|
-
<a name="6.0.6"></a>
|
|
349
|
-
|
|
350
|
-
## [6.0.6](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.5...ffe-grid-react@6.0.6) (2018-01-10)
|
|
351
|
-
|
|
352
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
353
|
-
|
|
354
|
-
<a name="6.0.5"></a>
|
|
355
|
-
|
|
356
|
-
## [6.0.5](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.4...ffe-grid-react@6.0.5) (2018-01-09)
|
|
357
|
-
|
|
358
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
359
|
-
|
|
360
|
-
<a name="6.0.4"></a>
|
|
361
|
-
|
|
362
|
-
## [6.0.4](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.3...ffe-grid-react@6.0.4) (2018-01-09)
|
|
363
|
-
|
|
364
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
365
|
-
|
|
366
|
-
<a name="6.0.3"></a>
|
|
367
|
-
|
|
368
|
-
## [6.0.3](https://github.com/SpareBank1/designsystem/compare/ffe-grid-react@6.0.2...ffe-grid-react@6.0.3) (2018-01-05)
|
|
369
|
-
|
|
370
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
371
|
-
|
|
372
|
-
<a name="6.0.2"></a>
|
|
373
|
-
|
|
374
|
-
## 6.0.2 (2018-01-05)
|
|
375
|
-
|
|
376
|
-
**Note:** Version bump only for package ffe-grid-react
|
|
377
|
-
|
|
378
|
-
## 6.0.1
|
|
379
|
-
|
|
380
|
-
- `utils.js` exports empty functions for production bundle
|
|
381
|
-
|
|
382
|
-
# 6.0.0
|
|
383
|
-
|
|
384
|
-
`<GridCol vertical={true} />` is now the default behavior, which means you need to do a manual
|
|
385
|
-
migration job. Do a global search for `<GridCol` and follow this approach for each occurrence:
|
|
386
|
-
|
|
387
|
-
- If you have specified `vertical={true}`, remove the prop. This is the default behavior now.
|
|
388
|
-
- If your `<GridCol />` has more than one child, add the prop `horizontal={true}` to keep the behavior from < 6.0.0.
|
|
389
|
-
- If your `<GridCol />` has exactly one child, this will now take up as much space as it originally required. So if your
|
|
390
|
-
single child is an inline element, no change is required. If your child is a block element, it will now occupy up to 100 %
|
|
391
|
-
of the available space instead of being sized by its content. You might want to add `horizontal={true}` here as well, but
|
|
392
|
-
you might not need this (depending on your use case).
|
|
393
|
-
|
|
394
|
-
### BREAKING CHANGES
|
|
395
|
-
|
|
396
|
-
- Supports `ffe-grid@^6.0.0`.
|
|
397
|
-
- Removes the `<GridCol vertical />` prop, and complains (in the console for non-production builds) if it's specified.
|
|
398
|
-
|
|
399
|
-
### New features
|
|
400
|
-
|
|
401
|
-
- Adds the `<GridCol horizontal />` prop, for keeping the behavior from < 6.0.0.
|
|
402
|
-
|
|
403
|
-
# 5.1.0
|
|
404
|
-
|
|
405
|
-
- The module now complains (in the console and for non-production builds) if `ffe-grid` is used in a way it's not meant to be.
|
|
406
|
-
From [ffe-grid's README](https://github.com/SpareBank1/designsystem/tree/master/packages/ffe-grid):
|
|
407
|
-
|
|
408
|
-
> There should be no more than four columns on small devices and six columns on medium ones.
|
|
409
|
-
> Although it's technically possible, it's not something that's encouraged by the designers.
|
|
410
|
-
|
|
411
|
-
## 5.0.1
|
|
412
|
-
|
|
413
|
-
- Removed now unnecessary class `ffe-grid__col` from markup
|
|
414
|
-
|
|
415
|
-
# 5.0.0
|
|
416
|
-
|
|
417
|
-
- BREAKING: All `bg*` have been removed, and are replaced by a single `background` prop, which accepts a dash-cased value. Please see the README for a complete list of valid values. Upgrading requires the consumer to i.e. replace `bgBlueIce={true}` with `background="blue-ice"`.
|
|
418
|
-
- Added `mint-green` as a valid background value
|
|
419
|
-
|
|
420
|
-
# 4.7.0
|
|
421
|
-
|
|
422
|
-
- Added `bgGreyCloud` prop for `GridRow`, which adds a `ffe-grey-cloud` background colour.
|
|
423
|
-
|
|
424
|
-
# 4.6.0
|
|
425
|
-
|
|
426
|
-
### New features
|
|
427
|
-
|
|
428
|
-
- Added `bgBlueRoyal` prop for `GridRow`, which adds a `ffe-blue-royal` background colour.
|
|
429
|
-
|
|
430
|
-
# 4.5.0
|
|
431
|
-
|
|
432
|
-
### New features
|
|
433
|
-
|
|
434
|
-
- Added `bgPurpleMagenta` prop for `GridRow`, which adds a `ffe-purple-magenta` background colour.
|
|
435
|
-
|
|
436
|
-
# 4.4.0
|
|
437
|
-
|
|
438
|
-
### New features
|
|
439
|
-
|
|
440
|
-
- Added `condensed` prop for `Grid`, which adds the `ffe-grid--condensed` modifier.
|
|
441
|
-
|
|
442
|
-
# 4.3.0
|
|
443
|
-
|
|
444
|
-
### New features
|
|
445
|
-
|
|
446
|
-
- Added `bgBlueIce` prop for `GridRow`, which adds a `ffe-blue-ice` background colour.
|
|
447
|
-
|
|
448
|
-
## 4.2.2
|
|
449
|
-
|
|
450
|
-
### Improvement
|
|
451
|
-
|
|
452
|
-
- The warnings about nested grid elements has been fixed to work recursively.
|
|
453
|
-
- The warnings about nested grid elements do not run in production environments.
|
|
454
|
-
|
|
455
|
-
## 4.2.1
|
|
456
|
-
|
|
457
|
-
### Bugfix
|
|
458
|
-
|
|
459
|
-
- Fix a NPE when rendering with `null` as a child of `Grid`, `GridRow` or `GridCol`.
|
|
460
|
-
|
|
461
|
-
# 4.2.0
|
|
462
|
-
|
|
463
|
-
### New features
|
|
464
|
-
|
|
465
|
-
- Warns about nesting grids, grid columns and grid rows.
|
|
466
|
-
- The default dimension for `<GridCol>` is now `sm={12}` (rather than no default) so rendering `<GridCol>` will be the same as rendering `<GridCol sm={12}>`.
|
|
467
|
-
|
|
468
|
-
## 4.1.2
|
|
469
|
-
|
|
470
|
-
- The Grid overlay has z-index over 9000.
|
|
471
|
-
- `<GridCol>` accepts 0 as valid values for both `cols` and `offset`. It's not known if there's a usecase for a 0 cols column but there definitely is for a 0 offset column. The less module generates classes for 0 cols though so we might as well support it.
|
|
472
|
-
|
|
473
|
-
## 4.1.1
|
|
474
|
-
|
|
475
|
-
### Bugfix
|
|
476
|
-
|
|
477
|
-
- `GridCol` does not pass on properties it uses itself (like `end`, `middle`, etc) to its root element
|
|
478
|
-
|
|
479
|
-
# 4.1.0
|
|
480
|
-
|
|
481
|
-
### New features
|
|
482
|
-
|
|
483
|
-
- `Grid`, `GridRow` and `GridCol` accepts new prop `element` (default: _div_) which can be used to render a different
|
|
484
|
-
element (e.g. a _section_, _header_, etc).
|
|
485
|
-
- `Grid`, `GridRow` and `GridCol` will pass any props it doesn't know what to do with (such as _onClick_, _style_, etc) on to its root element.
|
|
486
|
-
|
|
487
|
-
### Other
|
|
488
|
-
|
|
489
|
-
- Dependency on `PropTypes` from the `react` package removed in favor for direct imports from the `prop-types` package.
|
|
490
|
-
|
|
491
|
-
# 4.0.0
|
|
492
|
-
|
|
493
|
-
### BREAKING CHANGES
|
|
494
|
-
|
|
495
|
-
- `bgBlue` prop for `GridRow` renamed to `bgBluePale`
|
|
496
|
-
- Depends on new major of `ffe-grid` (`5.0.0`).
|
|
497
|
-
|
|
498
|
-
### New features
|
|
499
|
-
|
|
500
|
-
- Added `bgBlueCobalt` prop for `GridRow`, which adds a `ffe-blue-cobalt` background colour.
|
|
501
|
-
|
|
502
|
-
# 3.0.0
|
|
503
|
-
|
|
504
|
-
- Added `vertical` and `reverse` modifiers to `GridCol`.
|
|
505
|
-
- These modifiers only work with minimum v.4.2.0 of `ffe-grid` so the breaking change is that we have to
|
|
506
|
-
depend on a new major version of `ffe-grid` to use them.
|
|
507
|
-
|
|
508
|
-
## 2.2.1
|
|
509
|
-
|
|
510
|
-
- Expand peerDep scope of `ffe-grid` to include `4.x`.
|
|
511
|
-
- Add devDeps to `ffe-core` and `ffe-grid`.
|
|
512
|
-
|
|
513
|
-
# 2.2.0
|
|
514
|
-
|
|
515
|
-
- Add className property to Grid, GriRow and GridCol
|
|
516
|
-
|
|
517
|
-
## 2.1.1
|
|
518
|
-
|
|
519
|
-
- Grid rows with background colour are now full width
|
|
520
|
-
|
|
521
|
-
# 2.1.0
|
|
522
|
-
|
|
523
|
-
- Added a separate export for placing a grid overlay on the webpage
|
|
524
|
-
|
|
525
|
-
# 2.0.0
|
|
526
|
-
|
|
527
|
-
- Bumped to major version `2.0.0` of `ffe-grid`
|
|
528
|
-
- Support `noTopPadding` modifier on `Grid`
|
|
529
|
-
- Support `topPadding` modifier on `GridRow`
|
|
530
|
-
- Support `bgSand` modifier on `GridRow`
|
|
531
|
-
|
|
532
|
-
# 1.0.0
|
|
533
|
-
|
|
534
|
-
- Initial release
|
package/es/Grid.spec.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { shallow } from 'enzyme';
|
|
5
|
-
import { Grid } from '.';
|
|
6
|
-
var defaultProps = {
|
|
7
|
-
children: /*#__PURE__*/React.createElement("p", null, "blah")
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
var renderShallow = function renderShallow() {
|
|
11
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
|
-
return shallow( /*#__PURE__*/React.createElement(Grid, _extends({}, defaultProps, props)));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
describe('Grid', function () {
|
|
16
|
-
it('renders with default class and element', function () {
|
|
17
|
-
var el = renderShallow();
|
|
18
|
-
expect(el.prop('className')).toBe('ffe-grid');
|
|
19
|
-
expect(el.type()).toBe('div');
|
|
20
|
-
});
|
|
21
|
-
it('renders with custom class', function () {
|
|
22
|
-
var el = renderShallow({
|
|
23
|
-
className: 'custom-class'
|
|
24
|
-
});
|
|
25
|
-
expect(el.hasClass('custom-class')).toBe(true);
|
|
26
|
-
});
|
|
27
|
-
it('renders provided children node', function () {
|
|
28
|
-
var el = renderShallow();
|
|
29
|
-
expect(el.containsMatchingElement( /*#__PURE__*/React.createElement("p", null, "blah"))).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it('defaults to not setting the "--no-top-padding" modifier', function () {
|
|
32
|
-
var el = renderShallow();
|
|
33
|
-
expect(el.hasClass('ffe-grid--no-top-padding')).toBe(false);
|
|
34
|
-
});
|
|
35
|
-
it('sets the "--no-top-padding" modifier if "topPadding" prop is false', function () {
|
|
36
|
-
var el = renderShallow({
|
|
37
|
-
topPadding: false
|
|
38
|
-
});
|
|
39
|
-
expect(el.hasClass('ffe-grid--no-top-padding')).toBe(true);
|
|
40
|
-
});
|
|
41
|
-
it('sets the condensed modifier', function () {
|
|
42
|
-
var el = renderShallow({
|
|
43
|
-
condensed: true
|
|
44
|
-
});
|
|
45
|
-
expect(el.hasClass('ffe-grid')).toBe(true);
|
|
46
|
-
expect(el.hasClass('ffe-grid--condensed')).toBe(true);
|
|
47
|
-
});
|
|
48
|
-
it('preserves other attributes that are passed to it', function () {
|
|
49
|
-
var handler = jest.fn();
|
|
50
|
-
var el = renderShallow({
|
|
51
|
-
onClick: handler
|
|
52
|
-
});
|
|
53
|
-
el.simulate('click');
|
|
54
|
-
expect(handler).toHaveBeenCalledTimes(1);
|
|
55
|
-
});
|
|
56
|
-
it('can render a custom root element', function () {
|
|
57
|
-
var el = renderShallow({
|
|
58
|
-
element: 'section'
|
|
59
|
-
});
|
|
60
|
-
expect(el.type()).toBe('section');
|
|
61
|
-
});
|
|
62
|
-
});
|