@flodesk/grain 11.22.6 → 11.23.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.
Files changed (152) hide show
  1. package/es/components/arrange/index.js +34 -47
  2. package/es/components/autocomplete.js +94 -149
  3. package/es/components/autocomplete2.js +131 -170
  4. package/es/components/badge.js +12 -17
  5. package/es/components/box.js +115 -126
  6. package/es/components/breakpoints-provider.js +6 -4
  7. package/es/components/button.js +27 -40
  8. package/es/components/checkbox.js +31 -28
  9. package/es/components/dropdown.js +52 -50
  10. package/es/components/flex/index.js +31 -46
  11. package/es/components/icon-button.js +17 -25
  12. package/es/components/icon-toggle.js +30 -34
  13. package/es/components/icon.js +10 -20
  14. package/es/components/link.js +18 -18
  15. package/es/components/modal.js +75 -69
  16. package/es/components/nav/index.js +36 -43
  17. package/es/components/pagination.js +45 -63
  18. package/es/components/popover.js +47 -48
  19. package/es/components/progress.js +12 -15
  20. package/es/components/provider.js +7 -6
  21. package/es/components/radio.js +25 -24
  22. package/es/components/select.js +92 -100
  23. package/es/components/slider.js +25 -29
  24. package/es/components/spinner.js +11 -26
  25. package/es/components/stack.js +10 -19
  26. package/es/components/switch.js +21 -21
  27. package/es/components/tab.js +18 -25
  28. package/es/components/text/index.js +38 -48
  29. package/es/components/text-button.js +28 -41
  30. package/es/components/text-input.js +53 -75
  31. package/es/components/text-toggle.js +20 -31
  32. package/es/components/textarea.js +38 -33
  33. package/es/components/toast.js +29 -28
  34. package/es/components/tooltip.js +43 -77
  35. package/es/foundational/field.js +39 -34
  36. package/es/foundational/menu.js +112 -98
  37. package/es/foundational/styles.js +23 -23
  38. package/es/hooks/useKeyPress.js +10 -31
  39. package/es/hooks/useMedia.js +8 -45
  40. package/es/hooks/useOnClickOutside.js +4 -7
  41. package/es/hooks/usePrev.js +3 -3
  42. package/es/hooks/useWidth.js +3 -29
  43. package/es/hooks/useWindowSize.js +4 -32
  44. package/es/icons/icon-align-center.js +28 -32
  45. package/es/icons/icon-align-left.js +35 -39
  46. package/es/icons/icon-align-right.js +35 -39
  47. package/es/icons/icon-archive.js +21 -25
  48. package/es/icons/icon-arrow-down.js +21 -25
  49. package/es/icons/icon-arrow-left.js +21 -25
  50. package/es/icons/icon-arrow-right.js +21 -25
  51. package/es/icons/icon-arrow-up.js +21 -25
  52. package/es/icons/icon-at.js +21 -25
  53. package/es/icons/icon-bold.js +28 -32
  54. package/es/icons/icon-bolt-filled.js +21 -25
  55. package/es/icons/icon-bolt.js +21 -25
  56. package/es/icons/icon-browser.js +21 -25
  57. package/es/icons/icon-brush.js +20 -24
  58. package/es/icons/icon-bullet-list.js +21 -25
  59. package/es/icons/icon-chart.js +29 -33
  60. package/es/icons/icon-check.js +21 -25
  61. package/es/icons/icon-chevron-down.js +21 -25
  62. package/es/icons/icon-chevron-horizontal.js +21 -25
  63. package/es/icons/icon-chevron-left.js +21 -25
  64. package/es/icons/icon-chevron-right.js +21 -25
  65. package/es/icons/icon-chevron-up.js +28 -32
  66. package/es/icons/icon-chevron-vertical.js +28 -32
  67. package/es/icons/icon-clip.js +37 -41
  68. package/es/icons/icon-clock.js +21 -25
  69. package/es/icons/icon-column-and-rows.js +25 -29
  70. package/es/icons/icon-column-one.js +21 -25
  71. package/es/icons/icon-column-two.js +21 -25
  72. package/es/icons/icon-columns-and-row.js +25 -29
  73. package/es/icons/icon-columns.js +21 -25
  74. package/es/icons/icon-content-align-bottom.js +21 -25
  75. package/es/icons/icon-content-align-center.js +21 -25
  76. package/es/icons/icon-content-align-top.js +21 -25
  77. package/es/icons/icon-crop.js +21 -25
  78. package/es/icons/icon-cross.js +23 -27
  79. package/es/icons/icon-download.js +28 -32
  80. package/es/icons/icon-drag.js +21 -25
  81. package/es/icons/icon-duplicate.js +21 -25
  82. package/es/icons/icon-ellipsis.js +21 -25
  83. package/es/icons/icon-file.js +28 -32
  84. package/es/icons/icon-folder-add.js +21 -25
  85. package/es/icons/icon-folder-move.js +21 -25
  86. package/es/icons/icon-folder-remove.js +21 -25
  87. package/es/icons/icon-folder.js +21 -25
  88. package/es/icons/icon-gear.js +35 -39
  89. package/es/icons/icon-globe.js +28 -32
  90. package/es/icons/icon-heart.js +21 -25
  91. package/es/icons/icon-hide.js +21 -25
  92. package/es/icons/icon-image.js +21 -25
  93. package/es/icons/icon-info.js +21 -25
  94. package/es/icons/icon-italic.js +28 -32
  95. package/es/icons/icon-layout-text-bottom.js +28 -32
  96. package/es/icons/icon-layout-text-left.js +21 -25
  97. package/es/icons/icon-layout-text-right.js +28 -32
  98. package/es/icons/icon-layout-text-top.js +21 -25
  99. package/es/icons/icon-link.js +21 -25
  100. package/es/icons/icon-location.js +21 -25
  101. package/es/icons/icon-mail.js +21 -25
  102. package/es/icons/icon-minus.js +19 -23
  103. package/es/icons/icon-monitor.js +21 -25
  104. package/es/icons/icon-number-list.js +29 -33
  105. package/es/icons/icon-pencil.js +28 -32
  106. package/es/icons/icon-phone.js +21 -25
  107. package/es/icons/icon-play.js +21 -25
  108. package/es/icons/icon-plus.js +21 -25
  109. package/es/icons/icon-question.js +21 -25
  110. package/es/icons/icon-redo.js +21 -25
  111. package/es/icons/icon-reset.js +22 -26
  112. package/es/icons/icon-row-and-columns.js +25 -29
  113. package/es/icons/icon-rows-and-column.js +25 -29
  114. package/es/icons/icon-rows.js +21 -25
  115. package/es/icons/icon-search.js +21 -25
  116. package/es/icons/icon-send.js +21 -25
  117. package/es/icons/icon-share.js +21 -25
  118. package/es/icons/icon-show.js +21 -25
  119. package/es/icons/icon-smile.js +28 -32
  120. package/es/icons/icon-square.js +21 -25
  121. package/es/icons/icon-strike.js +28 -32
  122. package/es/icons/icon-switch.js +21 -25
  123. package/es/icons/icon-tablet.js +21 -25
  124. package/es/icons/icon-text-align-center.js +21 -25
  125. package/es/icons/icon-text-align-left.js +21 -25
  126. package/es/icons/icon-text-align-right.js +21 -25
  127. package/es/icons/icon-text-justify.js +21 -25
  128. package/es/icons/icon-trash.js +28 -32
  129. package/es/icons/icon-type.js +28 -32
  130. package/es/icons/icon-underline.js +28 -32
  131. package/es/icons/icon-undo.js +28 -32
  132. package/es/icons/icon-upload.js +28 -32
  133. package/es/styles/base.js +1 -1
  134. package/es/styles/card.js +4 -8
  135. package/es/styles/colors/core.js +1 -1
  136. package/es/styles/colors/theme.js +1 -1
  137. package/es/styles/foundational-variables.js +5 -0
  138. package/es/styles/index.js +2 -2
  139. package/es/styles/shadows.js +1 -1
  140. package/es/styles/utilities.js +65 -90
  141. package/es/styles/variables.js +1 -1
  142. package/es/types.js +28 -29
  143. package/es/utilities/attributes.js +46 -49
  144. package/es/utilities/helpers.js +13 -36
  145. package/es/utilities/responsive.js +16 -43
  146. package/es/utilities/style-config.js +32 -76
  147. package/es/utilities/styles.js +17 -29
  148. package/es/variables/breakpoints.js +1 -1
  149. package/es/variables/colors.js +1 -1
  150. package/es/variables/vars.js +3 -13
  151. package/package.json +5 -5
  152. package/es/styles/component-variables.js +0 -2
@@ -1,26 +1,18 @@
1
- import "core-js/modules/es.array.concat.js";
2
- import "core-js/modules/es.object.keys.js";
3
- import "core-js/modules/es.array.map.js";
4
- import "core-js/modules/es.array.includes.js";
5
- import "core-js/modules/es.string.includes.js";
6
- import "core-js/modules/es.object.to-string.js";
7
- import "core-js/modules/web.dom-collections.for-each.js";
8
- import "core-js/modules/es.object.values.js";
9
1
  import { alignSelfs, autoFlows, axisAlignments, borderWidths, contentPositions, cursors, flexDirections, flexWraps, overflows, positions, sides, textAlignments, textDisplays, textTransforms } from '../types';
10
2
  import { vars } from '../variables';
11
3
  import { getDimension, getSpace, getTextSize, isSpaceVar } from './responsive';
12
4
  import { getColor, getRadius, getShadow, getTransition, getWeight, isColorVar, isRadiusVar, isShadowVar, isTrasitionVar } from './styles';
13
- var spaces = Object.keys(vars.spaces).concat(Object.keys(vars.spaceUtils));
14
- var colors = Object.keys(vars.colors).concat(Object.keys(vars.colorUtils));
15
- var shadows = Object.keys(vars.shadows);
16
- var radii = Object.keys(vars.radii);
17
- var transitions = Object.keys(vars.transitions).concat(Object.keys(vars.transitionUtils));
18
- var sizes = Object.keys(vars.texts);
19
- var weights = Object.keys(vars.weights);
5
+ const spaces = Object.keys(vars.spaces).concat(Object.keys(vars.spaceUtils));
6
+ const colors = Object.keys(vars.colors).concat(Object.keys(vars.colorUtils));
7
+ const shadows = Object.keys(vars.shadows);
8
+ const radii = Object.keys(vars.radii);
9
+ const transitions = Object.keys(vars.transitions).concat(Object.keys(vars.transitionUtils));
10
+ const sizes = Object.keys(vars.texts);
11
+ const weights = Object.keys(vars.weights);
20
12
 
21
- var borderSideToStyle = function borderSideToStyle(side) {
13
+ const borderSideToStyle = side => {
22
14
  if (side === 'all') return 'solid';
23
- var borderConfig = {
15
+ const borderConfig = {
24
16
  top: ['top'],
25
17
  right: ['right'],
26
18
  bottom: ['bottom'],
@@ -28,13 +20,11 @@ var borderSideToStyle = function borderSideToStyle(side) {
28
20
  y: ['top', 'bottom'],
29
21
  x: ['right', 'left']
30
22
  };
31
- var borderStyles = ['top', 'right', 'bottom', 'left'].map(function (s) {
32
- return borderConfig[side].includes(s) ? 'solid' : 'none';
33
- });
23
+ const borderStyles = ['top', 'right', 'bottom', 'left'].map(s => borderConfig[side].includes(s) ? 'solid' : 'none');
34
24
  return borderStyles.join(' ');
35
25
  };
36
26
 
37
- export var styleConfig = {
27
+ export const styleConfig = {
38
28
  spaceProps: {
39
29
  props: [{
40
30
  propName: 'padding',
@@ -230,9 +220,7 @@ export var styleConfig = {
230
220
  property: 'position',
231
221
  short: 'pos'
232
222
  }],
233
- variableChecker: function variableChecker(value) {
234
- return positions.includes(value);
235
- },
223
+ variableChecker: value => positions.includes(value),
236
224
  variables: positions
237
225
  },
238
226
  overflowProps: {
@@ -249,9 +237,7 @@ export var styleConfig = {
249
237
  property: 'overflow-y',
250
238
  short: 'of-y'
251
239
  }],
252
- variableChecker: function variableChecker(value) {
253
- return overflows.includes(value);
254
- },
240
+ variableChecker: value => overflows.includes(value),
255
241
  variables: overflows
256
242
  },
257
243
  transitionProps: {
@@ -274,9 +260,7 @@ export var styleConfig = {
274
260
  property: 'cursor',
275
261
  short: 'cur'
276
262
  }],
277
- variableChecker: function variableChecker(value) {
278
- return cursors.includes(value);
279
- },
263
+ variableChecker: value => cursors.includes(value),
280
264
  variables: cursors
281
265
  },
282
266
  aspectRatioProps: {
@@ -295,9 +279,7 @@ export var styleConfig = {
295
279
  isResponsive: true,
296
280
  variables: sizes,
297
281
  valueTransformer: getTextSize,
298
- variableChecker: function variableChecker(value) {
299
- return sizes.includes(value);
300
- }
282
+ variableChecker: value => sizes.includes(value)
301
283
  },
302
284
  opacityProps: {
303
285
  props: [{
@@ -317,9 +299,7 @@ export var styleConfig = {
317
299
  short: 'als'
318
300
  }],
319
301
  variables: alignSelfs,
320
- variableChecker: function variableChecker(value) {
321
- return alignSelfs.includes(value);
322
- },
302
+ variableChecker: value => alignSelfs.includes(value),
323
303
  isResponsive: true
324
304
  },
325
305
  borderColorProps: {
@@ -342,13 +322,9 @@ export var styleConfig = {
342
322
  property: 'border-width',
343
323
  short: 'bdw'
344
324
  }],
345
- valueTransformer: function valueTransformer(borderWidth) {
346
- return borderWidth;
347
- },
325
+ valueTransformer: borderWidth => borderWidth,
348
326
  variables: borderWidths,
349
- variableChecker: function variableChecker(value) {
350
- return borderWidths.includes(value);
351
- }
327
+ variableChecker: value => borderWidths.includes(value)
352
328
  },
353
329
  borderSideProps: {
354
330
  props: [{
@@ -358,9 +334,7 @@ export var styleConfig = {
358
334
  }],
359
335
  valueTransformer: borderSideToStyle,
360
336
  variables: sides,
361
- variableChecker: function variableChecker(value) {
362
- return sides.includes(value);
363
- }
337
+ variableChecker: value => sides.includes(value)
364
338
  },
365
339
  alignProps: {
366
340
  props: [{
@@ -369,9 +343,7 @@ export var styleConfig = {
369
343
  short: 'al'
370
344
  }],
371
345
  variables: textAlignments,
372
- variableChecker: function variableChecker(value) {
373
- return textAlignments.includes(value);
374
- },
346
+ variableChecker: value => textAlignments.includes(value),
375
347
  isResponsive: true
376
348
  },
377
349
  weightProps: {
@@ -381,9 +353,7 @@ export var styleConfig = {
381
353
  short: 'w'
382
354
  }],
383
355
  variables: weights,
384
- variableChecker: function variableChecker(value) {
385
- return weights.includes(value);
386
- },
356
+ variableChecker: value => weights.includes(value),
387
357
  valueTransformer: getWeight
388
358
  },
389
359
  textDisplayProps: {
@@ -394,9 +364,7 @@ export var styleConfig = {
394
364
 
395
365
  }],
396
366
  variables: textDisplays,
397
- variableChecker: function variableChecker(value) {
398
- return textDisplays.includes(value);
399
- }
367
+ variableChecker: value => textDisplays.includes(value)
400
368
  },
401
369
  letterSpacingProps: {
402
370
  props: [{
@@ -412,9 +380,7 @@ export var styleConfig = {
412
380
  short: 'tt'
413
381
  }],
414
382
  variables: textTransforms,
415
- variableChecker: function variableChecker(value) {
416
- return textTransforms.includes(value);
417
- }
383
+ variableChecker: value => textTransforms.includes(value)
418
384
  },
419
385
  autoFlowProps: {
420
386
  props: [{
@@ -423,9 +389,7 @@ export var styleConfig = {
423
389
  short: 'af'
424
390
  }],
425
391
  variables: autoFlows,
426
- variableChecker: function variableChecker(value) {
427
- return autoFlows.includes(value);
428
- },
392
+ variableChecker: value => autoFlows.includes(value),
429
393
  isResponsive: true
430
394
  },
431
395
  gridTemplateProps: {
@@ -451,9 +415,7 @@ export var styleConfig = {
451
415
  short: 'ji'
452
416
  }],
453
417
  variables: axisAlignments,
454
- variableChecker: function variableChecker(value) {
455
- return axisAlignments.includes(value);
456
- },
418
+ variableChecker: value => axisAlignments.includes(value),
457
419
  isResponsive: true
458
420
  },
459
421
  contentPositionProps: {
@@ -467,9 +429,7 @@ export var styleConfig = {
467
429
  short: 'jc'
468
430
  }],
469
431
  variables: contentPositions,
470
- variableChecker: function variableChecker(value) {
471
- return contentPositions.includes(value);
472
- },
432
+ variableChecker: value => contentPositions.includes(value),
473
433
  isResponsive: true
474
434
  },
475
435
  flexDirectionProps: {
@@ -479,9 +439,7 @@ export var styleConfig = {
479
439
  short: 'fd'
480
440
  }],
481
441
  variables: flexDirections,
482
- variableChecker: function variableChecker(value) {
483
- return flexDirections.includes(value);
484
- }
442
+ variableChecker: value => flexDirections.includes(value)
485
443
  },
486
444
  flexWrapProps: {
487
445
  props: [{
@@ -490,18 +448,16 @@ export var styleConfig = {
490
448
  short: 'fw'
491
449
  }],
492
450
  variables: flexWraps,
493
- variableChecker: function variableChecker(value) {
494
- return flexWraps.includes(value);
495
- },
451
+ variableChecker: value => flexWraps.includes(value),
496
452
  isResponsive: true
497
453
  }
498
454
  };
499
- var propNameToShortMap = {};
500
- Object.values(styleConfig).forEach(function (config) {
501
- config.props.forEach(function (prop) {
455
+ let propNameToShortMap = {};
456
+ Object.values(styleConfig).forEach(config => {
457
+ config.props.forEach(prop => {
502
458
  propNameToShortMap[prop.propName] = prop.short;
503
459
  });
504
460
  });
505
- export var propNameToShort = function propNameToShort(propName) {
461
+ export const propNameToShort = propName => {
506
462
  return propNameToShortMap[propName] || null;
507
463
  };
@@ -1,12 +1,8 @@
1
- import "core-js/modules/es.array.concat.js";
2
- import "core-js/modules/es.array.map.js";
3
1
  import { getCssVar, isNumber, isString, u } from '.';
4
2
  import { vars, varInfo } from '../variables';
5
3
  import { getDimension } from './responsive';
6
- export var isColorVar = function isColorVar(color) {
7
- return color in vars.colorUtils || color in vars.colors;
8
- };
9
- export var getColor = function getColor(color) {
4
+ export const isColorVar = color => color in vars.colorUtils || color in vars.colors;
5
+ export const getColor = color => {
10
6
  if (color in vars.colorUtils) {
11
7
  return getCssVar(varInfo.colorUtils.name, color);
12
8
  }
@@ -17,25 +13,21 @@ export var getColor = function getColor(color) {
17
13
 
18
14
  return color;
19
15
  };
20
- export var isShadowVar = function isShadowVar(shadow) {
21
- return shadow in vars.shadows;
22
- };
23
- export var getShadow = function getShadow(shadow) {
16
+ export const isShadowVar = shadow => shadow in vars.shadows;
17
+ export const getShadow = shadow => {
24
18
  if (isShadowVar(shadow)) {
25
19
  return getCssVar(varInfo.shadows.name, shadow);
26
20
  }
27
21
 
28
22
  return shadow;
29
23
  };
30
- export var getWeight = function getWeight(weight) {
24
+ export const getWeight = weight => {
31
25
  if (weight in vars.weights) {
32
26
  return getCssVar(varInfo.weights.name, weight);
33
27
  }
34
28
  };
35
- export var isRadiusVar = function isRadiusVar(radius) {
36
- return radius in vars.radii;
37
- };
38
- export var getRadius = function getRadius(radius) {
29
+ export const isRadiusVar = radius => radius in vars.radii;
30
+ export const getRadius = radius => {
39
31
  if (isRadiusVar(radius)) {
40
32
  return getCssVar(varInfo.radii.name, radius);
41
33
  }
@@ -44,10 +36,8 @@ export var getRadius = function getRadius(radius) {
44
36
  if (isString(radius)) return radius;
45
37
  if (isNumber(radius)) return u(radius);
46
38
  };
47
- export var isTrasitionVar = function isTrasitionVar(transition) {
48
- return transition in vars.transitionUtils || transition in vars.transitions;
49
- };
50
- export var getTransition = function getTransition(transition) {
39
+ export const isTrasitionVar = transition => transition in vars.transitionUtils || transition in vars.transitions;
40
+ export const getTransition = transition => {
51
41
  if (transition in vars.transitionUtils) {
52
42
  return getCssVar(varInfo.transitionUtils.name, transition);
53
43
  }
@@ -58,17 +48,17 @@ export var getTransition = function getTransition(transition) {
58
48
 
59
49
  return transition;
60
50
  };
61
- export var getIconSize = function getIconSize(size) {
51
+ export const getIconSize = size => {
62
52
  if (size in vars.icons) {
63
53
  return getCssVar(varInfo.icons.name, size);
64
54
  }
65
55
 
66
56
  return getDimension(size);
67
57
  };
68
- export var getBorder = function getBorder(borderSide) {
69
- var borderWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1px';
70
- var borderColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'border';
71
- var sidesObj = {
58
+ export const getBorder = function (borderSide) {
59
+ let borderWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1px';
60
+ let borderColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'border';
61
+ const sidesObj = {
72
62
  all: [""],
73
63
  x: ["right", "left"],
74
64
  y: ["top", "bottom"],
@@ -77,15 +67,13 @@ export var getBorder = function getBorder(borderSide) {
77
67
  left: ["left"],
78
68
  right: ["right"]
79
69
  };
80
- var value = "".concat(getDimension(borderWidth), " solid ").concat(getColor(borderColor));
70
+ const value = "".concat(getDimension(borderWidth), " solid ").concat(getColor(borderColor));
81
71
 
82
- var getSide = function getSide(side) {
72
+ const getSide = side => {
83
73
  return side ? "border-".concat(side) : "border";
84
74
  };
85
75
 
86
76
  if (borderSide in sidesObj) {
87
- return sidesObj[borderSide].map(function (side) {
88
- return "".concat(getSide(side), ": ").concat(value);
89
- }).join(';');
77
+ return sidesObj[borderSide].map(side => "".concat(getSide(side), ": ").concat(value)).join(';');
90
78
  }
91
79
  };
@@ -1,4 +1,4 @@
1
- export var breakpoints = {
1
+ export const breakpoints = {
2
2
  tablet: 1169,
3
3
  mobile: 767
4
4
  };
@@ -1,4 +1,4 @@
1
- export var colors = {
1
+ export const colors = {
2
2
  lightFades: {
3
3
  lightFade10: 'lightFade10',
4
4
  lightFade9: 'lightFade9',
@@ -1,13 +1,3 @@
1
- import "core-js/modules/es.object.define-property.js";
2
- import "core-js/modules/es.object.keys.js";
3
- import "core-js/modules/es.symbol.js";
4
- import "core-js/modules/es.array.filter.js";
5
- import "core-js/modules/es.object.to-string.js";
6
- import "core-js/modules/es.object.get-own-property-descriptor.js";
7
- import "core-js/modules/web.dom-collections.for-each.js";
8
- import "core-js/modules/es.object.get-own-property-descriptors.js";
9
- import "core-js/modules/es.object.define-properties.js";
10
-
11
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
2
 
13
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -15,8 +5,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
5
  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; }
16
6
 
17
7
  import { colors } from './colors';
18
- export var grnPrefix = '--grn-';
19
- export var vars = {
8
+ export const grnPrefix = '--grn-';
9
+ export const vars = {
20
10
  texts: {
21
11
  s: 's',
22
12
  m: 'm',
@@ -84,7 +74,7 @@ export var vars = {
84
74
  active: 'active'
85
75
  }
86
76
  };
87
- export var varInfo = {
77
+ export const varInfo = {
88
78
  texts: {
89
79
  name: 'texts',
90
80
  prefix: 'text'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "11.22.6",
3
+ "version": "11.23.1",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",
@@ -43,7 +43,7 @@
43
43
  "@emotion/babel-preset-css-prop": "^11.10.0",
44
44
  "@mdx-js/loader": "^2.1.1",
45
45
  "@mdx-js/react": "^2.2.1",
46
- "@next/mdx": "^12.1.6",
46
+ "@next/mdx": "^12.3.4",
47
47
  "@semantic-release/git": "^10.0.1",
48
48
  "@semantic-release/gitlab": "^9.3.1",
49
49
  "@semantic-release/npm": "^9.0.1",
@@ -51,15 +51,15 @@
51
51
  "cross-env": "^7.0.3",
52
52
  "del-cli": "^4.0.1",
53
53
  "eslint": "^8.16.0",
54
- "eslint-config-next": "12.1.6",
54
+ "eslint-config-next": "^13.5.6",
55
55
  "eslint-config-prettier": "^8.5.0",
56
56
  "eslint-plugin-import": "^2.26.0",
57
57
  "eslint-plugin-mdx": "^2.0.2",
58
58
  "eslint-plugin-prettier": "^4.2.1",
59
- "next": "12.1.6",
59
+ "next": "^13.5.6",
60
60
  "prettier": "^2.8.8",
61
61
  "react-docgen": "^6.0.0-alpha.3",
62
- "react-live": "^3.1.0",
62
+ "react-live": "^4.1.7",
63
63
  "semantic-release": "^19.0.2",
64
64
  "vercel": "^25.1.0"
65
65
  }
@@ -1,2 +0,0 @@
1
- var componentVariables = "\n :root {\n --grn-strokeSize: 1px;\n --grn-dividerStrokeSize: 1px;\n --grn-activeBorderColor: var(--grn-color-shade9);\n --grn-textBoxHeight: 40px;\n --grn-clearButtonHeight: 36px;\n --grn-clearButtonDangerBackgroundHover: hsl(var(--redHS) var(--redL) / 12%);\n --grn-clearButtonDangerBackgroundActive: hsl(var(--redHS) var(--redL) / 19%);\n --grn-dangerIconColor: hsl(var(--redHS) var(--redL) / 70%);\n }\n\n [data-experiment-compact-textbox=\"true\"] {\n --grn-textBoxHeight: 36px;\n }\n";
2
- export default componentVariables;