@sb1/ffe-grid-react 10.1.4 → 11.1.1

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