@dscout/particle 1.0.0-alpha.1 → 1.0.0-alpha.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/CHANGELOG.md +10 -1
- package/lib/components/flex.js +11 -223
- package/lib/components/modifier.js +38 -592
- package/lib/stylesheets/particle.css +3 -3
- package/lib/stylesheets/particle.min.css +1 -1
- package/lib/stylesheets/particle.min.css.gz +0 -0
- package/lib/utils/props.js +5 -1
- package/package.json +1 -1
- package/styles/components/grid/_base.scss +3 -3
- package/styles/css_variables/_bandit.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased alpha]
|
|
9
9
|
|
|
10
|
+
## [1.0.0-alpha.2]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Bandit theme `--shadow--s` is now a valid `box-shadow` value
|
|
14
|
+
- Spacing and dimension enums in `<Flex />` component proptypes
|
|
15
|
+
- Calc statement causing parsing errors in some `postcss-values-parser` versions
|
|
16
|
+
|
|
10
17
|
## [1.0.0-alpha.1]
|
|
11
18
|
|
|
12
19
|
### Added
|
|
@@ -82,6 +89,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
82
89
|
- Breaking: Grayscale colors have been renamed to `gray-1` (formerly `main-light`), `gray-2` (formerly `dem`), `gray-3` (formerly `disabled`), `gray-4` (formerly `line`), `gray-5` (formerly `faint`), and `gray-6` (formerly `min`).
|
|
83
90
|
- Grayscale colors no longer apply transparency
|
|
84
91
|
- Breaking: Border utility class `.border--n` has been renamed to `.border--none` for naming consistency.
|
|
92
|
+
- Breaking: `<Flex />` `height`, `spacing`, and `width` props updated to use sizing class names.
|
|
85
93
|
- Breaking: `.no-underline` utility renamed to `.text-decoration--none`.
|
|
86
94
|
- Breaking: `.font-weight--b` renamed to `.font-weight--bold`.
|
|
87
95
|
- Breaking: `<Separator />` no longer accepts `solid` prop. Instead, it accepts `color` prop to provide more flexibility (replace `solid` with `color="line-s"`).
|
|
@@ -1446,7 +1454,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
1446
1454
|
|
|
1447
1455
|
- First usable version of particle
|
|
1448
1456
|
|
|
1449
|
-
[Unreleased alpha]: https://github.com/dscout/particle/compare/v1.0.0-alpha.
|
|
1457
|
+
[Unreleased alpha]: https://github.com/dscout/particle/compare/v1.0.0-alpha.2...v1
|
|
1458
|
+
[1.0.0-alpha.2]: https://github.com/dscout/particle/compare/v1.0.0-alpha.1...v1.0.0-alpha.2
|
|
1450
1459
|
[1.0.0-alpha.1]: https://github.com/dscout/particle/compare/v1.0.0-alpha.0...v1.0.0-alpha.1
|
|
1451
1460
|
[1.0.0-alpha.0]: https://github.com/dscout/particle/compare/main...v1.0.0-alpha.0
|
|
1452
1461
|
[Unreleased]: https://github.com/dscout/particle/compare/v0.46.0...HEAD
|
package/lib/components/flex.js
CHANGED
|
@@ -13,6 +13,8 @@ var _class_names = _interopRequireDefault(require("../utils/class_names"));
|
|
|
13
13
|
|
|
14
14
|
var _refs = require("../utils/refs");
|
|
15
15
|
|
|
16
|
+
var _props = require("../utils/props");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -21,7 +23,6 @@ var ALIGN_CONTENTS = ['around', 'between', 'center', 'end', 'start'];
|
|
|
21
23
|
var ALIGN_ITEMS = ['baseline', 'center', 'end', 'start', 'stretch'];
|
|
22
24
|
var DIRECTIONS = ['column', 'column-reverse', 'row', 'row-reverse'];
|
|
23
25
|
var JUSTIFY_VALUES = ['around', 'between', 'center', 'end', 'start'];
|
|
24
|
-
var SIZES = ['none', 'xs', 's', 'm', 'base', 'l', 'xl', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%'];
|
|
25
26
|
var propTypes = {
|
|
26
27
|
_modifierClass: _propTypes.default.string,
|
|
27
28
|
alignContent: _propTypes.default.oneOf(ALIGN_CONTENTS),
|
|
@@ -32,12 +33,12 @@ var propTypes = {
|
|
|
32
33
|
children: _propTypes.default.node.isRequired,
|
|
33
34
|
direction: _propTypes.default.oneOf(DIRECTIONS),
|
|
34
35
|
getRef: _refs.getRefPropType,
|
|
35
|
-
height: _propTypes.default.oneOf(
|
|
36
|
+
height: _propTypes.default.oneOf(_props.DIMENSION_ENUMS),
|
|
36
37
|
id: _propTypes.default.string,
|
|
37
38
|
inline: _propTypes.default.bool,
|
|
38
39
|
justify: _propTypes.default.oneOf(JUSTIFY_VALUES),
|
|
39
|
-
spacing: _propTypes.default.oneOf(
|
|
40
|
-
width: _propTypes.default.oneOf(
|
|
40
|
+
spacing: _propTypes.default.oneOf(_props.SPACING_ENUMS),
|
|
41
|
+
width: _propTypes.default.oneOf(_props.DIMENSION_ENUMS),
|
|
41
42
|
wrap: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string])
|
|
42
43
|
};
|
|
43
44
|
var DIRECTION_MAP = {
|
|
@@ -215,106 +216,8 @@ Flex.__docgenInfo = {
|
|
|
215
216
|
"height": {
|
|
216
217
|
"type": {
|
|
217
218
|
"name": "enum",
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
"computed": false
|
|
221
|
-
}, {
|
|
222
|
-
"value": "'xs'",
|
|
223
|
-
"computed": false
|
|
224
|
-
}, {
|
|
225
|
-
"value": "'s'",
|
|
226
|
-
"computed": false
|
|
227
|
-
}, {
|
|
228
|
-
"value": "'m'",
|
|
229
|
-
"computed": false
|
|
230
|
-
}, {
|
|
231
|
-
"value": "'base'",
|
|
232
|
-
"computed": false
|
|
233
|
-
}, {
|
|
234
|
-
"value": "'l'",
|
|
235
|
-
"computed": false
|
|
236
|
-
}, {
|
|
237
|
-
"value": "'xl'",
|
|
238
|
-
"computed": false
|
|
239
|
-
}, {
|
|
240
|
-
"value": "1",
|
|
241
|
-
"computed": false
|
|
242
|
-
}, {
|
|
243
|
-
"value": "2",
|
|
244
|
-
"computed": false
|
|
245
|
-
}, {
|
|
246
|
-
"value": "3",
|
|
247
|
-
"computed": false
|
|
248
|
-
}, {
|
|
249
|
-
"value": "4",
|
|
250
|
-
"computed": false
|
|
251
|
-
}, {
|
|
252
|
-
"value": "5",
|
|
253
|
-
"computed": false
|
|
254
|
-
}, {
|
|
255
|
-
"value": "6",
|
|
256
|
-
"computed": false
|
|
257
|
-
}, {
|
|
258
|
-
"value": "7",
|
|
259
|
-
"computed": false
|
|
260
|
-
}, {
|
|
261
|
-
"value": "8",
|
|
262
|
-
"computed": false
|
|
263
|
-
}, {
|
|
264
|
-
"value": "9",
|
|
265
|
-
"computed": false
|
|
266
|
-
}, {
|
|
267
|
-
"value": "10",
|
|
268
|
-
"computed": false
|
|
269
|
-
}, {
|
|
270
|
-
"value": "11",
|
|
271
|
-
"computed": false
|
|
272
|
-
}, {
|
|
273
|
-
"value": "12",
|
|
274
|
-
"computed": false
|
|
275
|
-
}, {
|
|
276
|
-
"value": "13",
|
|
277
|
-
"computed": false
|
|
278
|
-
}, {
|
|
279
|
-
"value": "14",
|
|
280
|
-
"computed": false
|
|
281
|
-
}, {
|
|
282
|
-
"value": "15",
|
|
283
|
-
"computed": false
|
|
284
|
-
}, {
|
|
285
|
-
"value": "16",
|
|
286
|
-
"computed": false
|
|
287
|
-
}, {
|
|
288
|
-
"value": "'10%'",
|
|
289
|
-
"computed": false
|
|
290
|
-
}, {
|
|
291
|
-
"value": "'20%'",
|
|
292
|
-
"computed": false
|
|
293
|
-
}, {
|
|
294
|
-
"value": "'30%'",
|
|
295
|
-
"computed": false
|
|
296
|
-
}, {
|
|
297
|
-
"value": "'40%'",
|
|
298
|
-
"computed": false
|
|
299
|
-
}, {
|
|
300
|
-
"value": "'50%'",
|
|
301
|
-
"computed": false
|
|
302
|
-
}, {
|
|
303
|
-
"value": "'60%'",
|
|
304
|
-
"computed": false
|
|
305
|
-
}, {
|
|
306
|
-
"value": "'70%'",
|
|
307
|
-
"computed": false
|
|
308
|
-
}, {
|
|
309
|
-
"value": "'80%'",
|
|
310
|
-
"computed": false
|
|
311
|
-
}, {
|
|
312
|
-
"value": "'90%'",
|
|
313
|
-
"computed": false
|
|
314
|
-
}, {
|
|
315
|
-
"value": "'100%'",
|
|
316
|
-
"computed": false
|
|
317
|
-
}]
|
|
219
|
+
"computed": true,
|
|
220
|
+
"value": "DIMENSION_ENUMS"
|
|
318
221
|
},
|
|
319
222
|
"required": false,
|
|
320
223
|
"description": ""
|
|
@@ -359,25 +262,8 @@ Flex.__docgenInfo = {
|
|
|
359
262
|
"spacing": {
|
|
360
263
|
"type": {
|
|
361
264
|
"name": "enum",
|
|
362
|
-
"
|
|
363
|
-
|
|
364
|
-
"computed": false
|
|
365
|
-
}, {
|
|
366
|
-
"value": "'s'",
|
|
367
|
-
"computed": false
|
|
368
|
-
}, {
|
|
369
|
-
"value": "'m'",
|
|
370
|
-
"computed": false
|
|
371
|
-
}, {
|
|
372
|
-
"value": "'base'",
|
|
373
|
-
"computed": false
|
|
374
|
-
}, {
|
|
375
|
-
"value": "'l'",
|
|
376
|
-
"computed": false
|
|
377
|
-
}, {
|
|
378
|
-
"value": "'xl'",
|
|
379
|
-
"computed": false
|
|
380
|
-
}]
|
|
265
|
+
"computed": true,
|
|
266
|
+
"value": "SPACING_ENUMS"
|
|
381
267
|
},
|
|
382
268
|
"required": false,
|
|
383
269
|
"description": ""
|
|
@@ -385,106 +271,8 @@ Flex.__docgenInfo = {
|
|
|
385
271
|
"width": {
|
|
386
272
|
"type": {
|
|
387
273
|
"name": "enum",
|
|
388
|
-
"
|
|
389
|
-
|
|
390
|
-
"computed": false
|
|
391
|
-
}, {
|
|
392
|
-
"value": "'xs'",
|
|
393
|
-
"computed": false
|
|
394
|
-
}, {
|
|
395
|
-
"value": "'s'",
|
|
396
|
-
"computed": false
|
|
397
|
-
}, {
|
|
398
|
-
"value": "'m'",
|
|
399
|
-
"computed": false
|
|
400
|
-
}, {
|
|
401
|
-
"value": "'base'",
|
|
402
|
-
"computed": false
|
|
403
|
-
}, {
|
|
404
|
-
"value": "'l'",
|
|
405
|
-
"computed": false
|
|
406
|
-
}, {
|
|
407
|
-
"value": "'xl'",
|
|
408
|
-
"computed": false
|
|
409
|
-
}, {
|
|
410
|
-
"value": "1",
|
|
411
|
-
"computed": false
|
|
412
|
-
}, {
|
|
413
|
-
"value": "2",
|
|
414
|
-
"computed": false
|
|
415
|
-
}, {
|
|
416
|
-
"value": "3",
|
|
417
|
-
"computed": false
|
|
418
|
-
}, {
|
|
419
|
-
"value": "4",
|
|
420
|
-
"computed": false
|
|
421
|
-
}, {
|
|
422
|
-
"value": "5",
|
|
423
|
-
"computed": false
|
|
424
|
-
}, {
|
|
425
|
-
"value": "6",
|
|
426
|
-
"computed": false
|
|
427
|
-
}, {
|
|
428
|
-
"value": "7",
|
|
429
|
-
"computed": false
|
|
430
|
-
}, {
|
|
431
|
-
"value": "8",
|
|
432
|
-
"computed": false
|
|
433
|
-
}, {
|
|
434
|
-
"value": "9",
|
|
435
|
-
"computed": false
|
|
436
|
-
}, {
|
|
437
|
-
"value": "10",
|
|
438
|
-
"computed": false
|
|
439
|
-
}, {
|
|
440
|
-
"value": "11",
|
|
441
|
-
"computed": false
|
|
442
|
-
}, {
|
|
443
|
-
"value": "12",
|
|
444
|
-
"computed": false
|
|
445
|
-
}, {
|
|
446
|
-
"value": "13",
|
|
447
|
-
"computed": false
|
|
448
|
-
}, {
|
|
449
|
-
"value": "14",
|
|
450
|
-
"computed": false
|
|
451
|
-
}, {
|
|
452
|
-
"value": "15",
|
|
453
|
-
"computed": false
|
|
454
|
-
}, {
|
|
455
|
-
"value": "16",
|
|
456
|
-
"computed": false
|
|
457
|
-
}, {
|
|
458
|
-
"value": "'10%'",
|
|
459
|
-
"computed": false
|
|
460
|
-
}, {
|
|
461
|
-
"value": "'20%'",
|
|
462
|
-
"computed": false
|
|
463
|
-
}, {
|
|
464
|
-
"value": "'30%'",
|
|
465
|
-
"computed": false
|
|
466
|
-
}, {
|
|
467
|
-
"value": "'40%'",
|
|
468
|
-
"computed": false
|
|
469
|
-
}, {
|
|
470
|
-
"value": "'50%'",
|
|
471
|
-
"computed": false
|
|
472
|
-
}, {
|
|
473
|
-
"value": "'60%'",
|
|
474
|
-
"computed": false
|
|
475
|
-
}, {
|
|
476
|
-
"value": "'70%'",
|
|
477
|
-
"computed": false
|
|
478
|
-
}, {
|
|
479
|
-
"value": "'80%'",
|
|
480
|
-
"computed": false
|
|
481
|
-
}, {
|
|
482
|
-
"value": "'90%'",
|
|
483
|
-
"computed": false
|
|
484
|
-
}, {
|
|
485
|
-
"value": "'100%'",
|
|
486
|
-
"computed": false
|
|
487
|
-
}]
|
|
274
|
+
"computed": true,
|
|
275
|
+
"value": "DIMENSION_ENUMS"
|
|
488
276
|
},
|
|
489
277
|
"required": false,
|
|
490
278
|
"description": ""
|