@flodesk/grain 1.1.2 → 1.1.3

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.
@@ -9,7 +9,7 @@
9
9
  --grn-text-xxl: calc(var(--grn-text-xl) + var(--ratio));
10
10
 
11
11
  --grn-weight-normal: 400;
12
- --grn-weight-bold: 600;
12
+ --grn-weight-semiBold: 600;
13
13
  }
14
14
 
15
15
  * {
@@ -4,13 +4,17 @@ import "core-js/modules/es.object.define-properties.js";
4
4
 
5
5
  var _templateObject;
6
6
 
7
+ import "core-js/modules/es.array.includes.js";
8
+
7
9
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
8
10
 
9
11
  import PropTypes from 'prop-types';
10
12
  import React from "react";
11
13
  import styled from "@emotion/styled";
12
- var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n font-size: var(--grn-text-", ");\n font-weight: var(--grn-weight-", ");\n"])), function (p) {
13
- return p.size;
14
+ var sizes = ['s', 'm', 'l', 'xl', 'xxl'];
15
+ var weights = ['normal', 'semiBold'];
16
+ var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n font-size: ", ";\n font-weight: var(--grn-weight-", ");\n"])), function (p) {
17
+ return sizes.includes(p.size) ? "var(--grn-text-".concat(p.size, ")") : p.size;
14
18
  }, function (p) {
15
19
  return p.weight;
16
20
  });
@@ -25,8 +29,6 @@ export var Text = function Text(_ref) {
25
29
  weight: weight
26
30
  }, children);
27
31
  };
28
- var sizes = ['s', 'm', 'l', 'xl', 'xxl'];
29
- var weights = ['normal', 'bold'];
30
32
  Text.propTypes = {
31
33
  size: PropTypes.oneOf(sizes),
32
34
  weight: PropTypes.oneOf(weights)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",
@@ -21,9 +21,10 @@
21
21
  "es"
22
22
  ],
23
23
  "dependencies": {
24
- "core-js": "^3.22.8",
25
24
  "@emotion/react": "^11.9.0",
26
- "@emotion/styled": "^11.8.1"
25
+ "@emotion/styled": "^11.8.1",
26
+ "core-js": "^3.22.8",
27
+ "prop-types": "^15.8.1"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "react": ">=16.8",