@codecademy/gamut-patterns 0.8.11-alpha.0e532d.0 → 0.8.11-alpha.111771.0

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 (35) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/babel.config.js +9 -3
  3. package/dist/patterns/CheckerDense.js +60 -30
  4. package/dist/patterns/CheckerLoose.js +60 -30
  5. package/dist/patterns/CheckerRegular.js +60 -30
  6. package/dist/patterns/DiagonalADense.js +118 -64
  7. package/dist/patterns/DiagonalALoose.js +358 -208
  8. package/dist/patterns/DiagonalARegular.js +198 -112
  9. package/dist/patterns/DiagonalBDense.js +88 -46
  10. package/dist/patterns/DiagonalBLoose.js +200 -114
  11. package/dist/patterns/DiagonalBRegular.js +128 -70
  12. package/dist/patterns/DotDense.js +51 -25
  13. package/dist/patterns/DotLoose.js +126 -68
  14. package/dist/patterns/DotRegular.js +51 -25
  15. package/dist/patterns/ExDense.js +89 -47
  16. package/dist/patterns/ExLoose.js +89 -47
  17. package/dist/patterns/ExRegular.js +89 -47
  18. package/dist/patterns/FlowerDense.js +79 -41
  19. package/dist/patterns/FlowerLoose.js +79 -41
  20. package/dist/patterns/FlowerRegular.js +79 -41
  21. package/dist/patterns/GridDense.js +78 -40
  22. package/dist/patterns/GridLoose.js +78 -40
  23. package/dist/patterns/GridRegular.js +78 -40
  24. package/dist/patterns/Herringbone.js +108 -58
  25. package/dist/patterns/RainDense.js +60 -30
  26. package/dist/patterns/RainLoose.js +60 -30
  27. package/dist/patterns/RainRegular.js +60 -30
  28. package/dist/patterns/StripeDense.js +116 -62
  29. package/dist/patterns/StripeLoose.js +344 -194
  30. package/dist/patterns/StripeRegular.js +192 -106
  31. package/dist/types.js +1 -0
  32. package/dist/usePatternId.js +2 -2
  33. package/package.json +4 -4
  34. package/project.json +9 -0
  35. package/jest.config.js +0 -1
@@ -1,123 +1,209 @@
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); }
1
+ import _objectWithoutPropertiesLoose from "/home/circleci/repo/node_modules/@nrwl/web/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js";
2
+ var _excluded = ["title", "titleId"];
2
3
 
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
-
5
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
+ var _jsxFileName = "/home/circleci/repo/packages/gamut-patterns/src/patterns/StripeRegular.tsx",
5
+ _this = this;
6
6
 
7
+ import "core-js/modules/es.object.assign.js";
7
8
  import * as React from 'react';
8
9
  import { Svg } from '../props';
9
10
  import { usePatternId } from '../usePatternId';
11
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
10
12
  export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
11
13
  var _ref$title = _ref.title,
12
14
  title = _ref$title === void 0 ? 'Stripe Regular' : _ref$title,
13
15
  titleId = _ref.titleId,
14
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
16
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
15
17
 
16
18
  var patternId = usePatternId('StripeRegular');
17
- return /*#__PURE__*/React.createElement(Svg, _extends({
19
+ return /*#__PURE__*/_jsxDEV(Svg, Object.assign({
18
20
  fill: "currentColor",
19
21
  role: "img",
20
22
  "aria-hidden": "true",
21
23
  ref: svgRef,
22
24
  "aria-labelledby": titleId
23
- }, props), title ? /*#__PURE__*/React.createElement("title", {
24
- id: titleId
25
- }, title) : null, /*#__PURE__*/React.createElement("pattern", {
26
- id: patternId,
27
- x: 0,
28
- y: 0,
29
- width: 8,
30
- height: 8,
31
- patternUnits: "userSpaceOnUse"
32
- }, /*#__PURE__*/React.createElement("rect", {
33
- x: 1,
34
- width: 1,
35
- height: 1,
36
- fill: "currentColor"
37
- }), /*#__PURE__*/React.createElement("rect", {
38
- width: 1,
39
- height: 1,
40
- fill: "currentColor"
41
- }), /*#__PURE__*/React.createElement("rect", {
42
- x: 2,
43
- width: 1,
44
- height: 1,
45
- fill: "currentColor"
46
- }), /*#__PURE__*/React.createElement("rect", {
47
- x: 3,
48
- width: 1,
49
- height: 1,
50
- fill: "currentColor"
51
- }), /*#__PURE__*/React.createElement("rect", {
52
- x: 1,
53
- y: 4,
54
- width: 1,
55
- height: 1,
56
- fill: "currentColor"
57
- }), /*#__PURE__*/React.createElement("rect", {
58
- y: 4,
59
- width: 1,
60
- height: 1,
61
- fill: "currentColor"
62
- }), /*#__PURE__*/React.createElement("rect", {
63
- x: 2,
64
- y: 4,
65
- width: 1,
66
- height: 1,
67
- fill: "currentColor"
68
- }), /*#__PURE__*/React.createElement("rect", {
69
- x: 3,
70
- y: 4,
71
- width: 1,
72
- height: 1,
73
- fill: "currentColor"
74
- }), /*#__PURE__*/React.createElement("rect", {
75
- x: 5,
76
- width: 1,
77
- height: 1,
78
- fill: "currentColor"
79
- }), /*#__PURE__*/React.createElement("rect", {
80
- x: 4,
81
- width: 1,
82
- height: 1,
83
- fill: "currentColor"
84
- }), /*#__PURE__*/React.createElement("rect", {
85
- x: 6,
86
- width: 1,
87
- height: 1,
88
- fill: "currentColor"
89
- }), /*#__PURE__*/React.createElement("rect", {
90
- x: 7,
91
- width: 1,
92
- height: 1,
93
- fill: "currentColor"
94
- }), /*#__PURE__*/React.createElement("rect", {
95
- x: 5,
96
- y: 4,
97
- width: 1,
98
- height: 1,
99
- fill: "currentColor"
100
- }), /*#__PURE__*/React.createElement("rect", {
101
- x: 4,
102
- y: 4,
103
- width: 1,
104
- height: 1,
105
- fill: "currentColor"
106
- }), /*#__PURE__*/React.createElement("rect", {
107
- x: 6,
108
- y: 4,
109
- width: 1,
110
- height: 1,
111
- fill: "currentColor"
112
- }), /*#__PURE__*/React.createElement("rect", {
113
- x: 7,
114
- y: 4,
115
- width: 1,
116
- height: 1,
117
- fill: "currentColor"
118
- })), /*#__PURE__*/React.createElement("rect", {
119
- width: "100%",
120
- height: "100%",
121
- fill: "url(#".concat(patternId, ")")
122
- }));
25
+ }, props, {
26
+ children: [title ? /*#__PURE__*/_jsxDEV("title", {
27
+ id: titleId,
28
+ children: title
29
+ }, void 0, false, {
30
+ fileName: _jsxFileName,
31
+ lineNumber: 16,
32
+ columnNumber: 18
33
+ }, _this) : null, /*#__PURE__*/_jsxDEV("pattern", {
34
+ id: patternId,
35
+ x: 0,
36
+ y: 0,
37
+ width: 8,
38
+ height: 8,
39
+ patternUnits: "userSpaceOnUse",
40
+ children: [/*#__PURE__*/_jsxDEV("rect", {
41
+ x: 1,
42
+ width: 1,
43
+ height: 1,
44
+ fill: "currentColor"
45
+ }, void 0, false, {
46
+ fileName: _jsxFileName,
47
+ lineNumber: 25,
48
+ columnNumber: 11
49
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
50
+ width: 1,
51
+ height: 1,
52
+ fill: "currentColor"
53
+ }, void 0, false, {
54
+ fileName: _jsxFileName,
55
+ lineNumber: 26,
56
+ columnNumber: 11
57
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
58
+ x: 2,
59
+ width: 1,
60
+ height: 1,
61
+ fill: "currentColor"
62
+ }, void 0, false, {
63
+ fileName: _jsxFileName,
64
+ lineNumber: 27,
65
+ columnNumber: 11
66
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
67
+ x: 3,
68
+ width: 1,
69
+ height: 1,
70
+ fill: "currentColor"
71
+ }, void 0, false, {
72
+ fileName: _jsxFileName,
73
+ lineNumber: 28,
74
+ columnNumber: 11
75
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
76
+ x: 1,
77
+ y: 4,
78
+ width: 1,
79
+ height: 1,
80
+ fill: "currentColor"
81
+ }, void 0, false, {
82
+ fileName: _jsxFileName,
83
+ lineNumber: 29,
84
+ columnNumber: 11
85
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
86
+ y: 4,
87
+ width: 1,
88
+ height: 1,
89
+ fill: "currentColor"
90
+ }, void 0, false, {
91
+ fileName: _jsxFileName,
92
+ lineNumber: 30,
93
+ columnNumber: 11
94
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
95
+ x: 2,
96
+ y: 4,
97
+ width: 1,
98
+ height: 1,
99
+ fill: "currentColor"
100
+ }, void 0, false, {
101
+ fileName: _jsxFileName,
102
+ lineNumber: 31,
103
+ columnNumber: 11
104
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
105
+ x: 3,
106
+ y: 4,
107
+ width: 1,
108
+ height: 1,
109
+ fill: "currentColor"
110
+ }, void 0, false, {
111
+ fileName: _jsxFileName,
112
+ lineNumber: 32,
113
+ columnNumber: 11
114
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
115
+ x: 5,
116
+ width: 1,
117
+ height: 1,
118
+ fill: "currentColor"
119
+ }, void 0, false, {
120
+ fileName: _jsxFileName,
121
+ lineNumber: 33,
122
+ columnNumber: 11
123
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
124
+ x: 4,
125
+ width: 1,
126
+ height: 1,
127
+ fill: "currentColor"
128
+ }, void 0, false, {
129
+ fileName: _jsxFileName,
130
+ lineNumber: 34,
131
+ columnNumber: 11
132
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
133
+ x: 6,
134
+ width: 1,
135
+ height: 1,
136
+ fill: "currentColor"
137
+ }, void 0, false, {
138
+ fileName: _jsxFileName,
139
+ lineNumber: 35,
140
+ columnNumber: 11
141
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
142
+ x: 7,
143
+ width: 1,
144
+ height: 1,
145
+ fill: "currentColor"
146
+ }, void 0, false, {
147
+ fileName: _jsxFileName,
148
+ lineNumber: 36,
149
+ columnNumber: 11
150
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
151
+ x: 5,
152
+ y: 4,
153
+ width: 1,
154
+ height: 1,
155
+ fill: "currentColor"
156
+ }, void 0, false, {
157
+ fileName: _jsxFileName,
158
+ lineNumber: 37,
159
+ columnNumber: 11
160
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
161
+ x: 4,
162
+ y: 4,
163
+ width: 1,
164
+ height: 1,
165
+ fill: "currentColor"
166
+ }, void 0, false, {
167
+ fileName: _jsxFileName,
168
+ lineNumber: 38,
169
+ columnNumber: 11
170
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
171
+ x: 6,
172
+ y: 4,
173
+ width: 1,
174
+ height: 1,
175
+ fill: "currentColor"
176
+ }, void 0, false, {
177
+ fileName: _jsxFileName,
178
+ lineNumber: 39,
179
+ columnNumber: 11
180
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
181
+ x: 7,
182
+ y: 4,
183
+ width: 1,
184
+ height: 1,
185
+ fill: "currentColor"
186
+ }, void 0, false, {
187
+ fileName: _jsxFileName,
188
+ lineNumber: 40,
189
+ columnNumber: 11
190
+ }, _this)]
191
+ }, void 0, true, {
192
+ fileName: _jsxFileName,
193
+ lineNumber: 17,
194
+ columnNumber: 9
195
+ }, _this), /*#__PURE__*/_jsxDEV("rect", {
196
+ width: "100%",
197
+ height: "100%",
198
+ fill: "url(#" + patternId + ")"
199
+ }, void 0, false, {
200
+ fileName: _jsxFileName,
201
+ lineNumber: 42,
202
+ columnNumber: 9
203
+ }, _this)]
204
+ }), void 0, true, {
205
+ fileName: _jsxFileName,
206
+ lineNumber: 8,
207
+ columnNumber: 7
208
+ }, _this);
123
209
  });
package/dist/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
@@ -3,8 +3,8 @@ var counter = {};
3
3
  export function usePatternId(id) {
4
4
  return useMemo(function () {
5
5
  var key = id.toLowerCase();
6
- var idCounter = (counter === null || counter === void 0 ? void 0 : counter[key]) || 0;
6
+ var idCounter = (counter == null ? void 0 : counter[key]) || 0;
7
7
  counter[key] = idCounter;
8
- return "".concat(id, "-pattern-").concat(counter[key] += 1);
8
+ return id + "-pattern-" + (counter[key] += 1);
9
9
  }, [id]);
10
10
  }
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "url": "https://github.com/Codecademy/gamut/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@codecademy/gamut-styles": "14.0.2-alpha.0e532d.0",
8
- "@codecademy/variance": "0.20.2-alpha.0e532d.0",
7
+ "@codecademy/gamut-styles": "14.0.2-alpha.111771.0",
8
+ "@codecademy/variance": "0.20.2-alpha.111771.0",
9
9
  "classnames": "^2.2.5"
10
10
  },
11
11
  "devDependencies": {
@@ -38,6 +38,6 @@
38
38
  "build": "nx build @codecademy/gamut-patterns"
39
39
  },
40
40
  "sideEffects": false,
41
- "version": "0.8.11-alpha.0e532d.0",
42
- "gitHead": "1a1f04501b8da9b5f5c0db397edd8fcf497bac30"
41
+ "version": "0.8.11-alpha.111771.0",
42
+ "gitHead": "55882c097ba6891fd128d815e973cdee6d76791f"
43
43
  }
package/project.json CHANGED
@@ -18,6 +18,15 @@
18
18
  ],
19
19
  "parallel": false
20
20
  }
21
+ },
22
+ "test": {
23
+ "executor": "@nrwl/jest:jest",
24
+ "outputs": ["coverage/packages/gamut-patterns"],
25
+ "dependsOn": ["build"],
26
+ "options": {
27
+ "jestConfig": "packages/gamut-patterns/jest.config.ts",
28
+ "passWithNoTests": true
29
+ }
21
30
  }
22
31
  },
23
32
  "tags": []
package/jest.config.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('../../jest.config.base')('gamut-patterns');