@codecademy/gamut-patterns 0.8.12-alpha.4d61d4.0 → 0.8.12-alpha.9e36ef.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 (41) hide show
  1. package/dist/patterns/CheckerDense.js +30 -60
  2. package/dist/patterns/CheckerLoose.js +30 -60
  3. package/dist/patterns/CheckerRegular.js +30 -60
  4. package/dist/patterns/DiagonalADense.js +64 -118
  5. package/dist/patterns/DiagonalALoose.js +208 -358
  6. package/dist/patterns/DiagonalARegular.js +112 -198
  7. package/dist/patterns/DiagonalBDense.js +46 -88
  8. package/dist/patterns/DiagonalBLoose.js +114 -200
  9. package/dist/patterns/DiagonalBRegular.js +70 -128
  10. package/dist/patterns/DotDense.js +25 -51
  11. package/dist/patterns/DotLoose.js +68 -126
  12. package/dist/patterns/DotRegular.js +25 -51
  13. package/dist/patterns/ExDense.js +47 -89
  14. package/dist/patterns/ExLoose.js +47 -89
  15. package/dist/patterns/ExRegular.js +47 -89
  16. package/dist/patterns/FlowerDense.js +41 -79
  17. package/dist/patterns/FlowerLoose.js +41 -79
  18. package/dist/patterns/FlowerRegular.js +41 -79
  19. package/dist/patterns/GridDense.js +40 -78
  20. package/dist/patterns/GridLoose.js +40 -78
  21. package/dist/patterns/GridRegular.js +40 -78
  22. package/dist/patterns/Herringbone.js +58 -108
  23. package/dist/patterns/RainDense.js +30 -60
  24. package/dist/patterns/RainLoose.js +30 -60
  25. package/dist/patterns/RainRegular.js +30 -60
  26. package/dist/patterns/StripeDense.js +62 -116
  27. package/dist/patterns/StripeLoose.js +194 -344
  28. package/dist/patterns/StripeRegular.js +106 -192
  29. package/dist/props.d.ts +3 -3
  30. package/dist/types.js +0 -1
  31. package/dist/usePatternId.js +2 -2
  32. package/package.json +7 -4
  33. package/.svgo.yml +0 -11
  34. package/CHANGELOG.md +0 -420
  35. package/babel.config.js +0 -12
  36. package/emotion-plugin.js +0 -46
  37. package/index-template.js +0 -10
  38. package/pattern-template.js +0 -30
  39. package/project.json +0 -33
  40. package/svgr.config.js +0 -29
  41. package/tsconfig.json +0 -15
@@ -1,209 +1,123 @@
1
- import _objectWithoutPropertiesLoose from "/home/circleci/repo/node_modules/@nrwl/web/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js";
2
- var _excluded = ["title", "titleId"];
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); }
3
2
 
4
- var _jsxFileName = "/home/circleci/repo/packages/gamut-patterns/src/patterns/StripeRegular.tsx",
5
- _this = this;
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; }
6
6
 
7
- import "core-js/modules/es.object.assign.js";
8
7
  import * as React from 'react';
9
8
  import { Svg } from '../props';
10
9
  import { usePatternId } from '../usePatternId';
11
- import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
12
10
  export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
13
11
  var _ref$title = _ref.title,
14
12
  title = _ref$title === void 0 ? 'Stripe Regular' : _ref$title,
15
13
  titleId = _ref.titleId,
16
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
14
+ props = _objectWithoutProperties(_ref, ["title", "titleId"]);
17
15
 
18
16
  var patternId = usePatternId('StripeRegular');
19
- return /*#__PURE__*/_jsxDEV(Svg, Object.assign({
17
+ return /*#__PURE__*/React.createElement(Svg, _extends({
20
18
  fill: "currentColor",
21
19
  role: "img",
22
20
  "aria-hidden": "true",
23
21
  ref: svgRef,
24
22
  "aria-labelledby": titleId
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);
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
+ }));
209
123
  });
package/dist/props.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { StyleProps } from '@codecademy/variance';
3
- declare const patternStyles: import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").Compose<[import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
3
+ declare const patternStyles: import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").Compose<[import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
4
4
  readonly flexBasis: {
5
5
  readonly property: "flexBasis";
6
6
  };
@@ -84,7 +84,7 @@ declare const patternStyles: import("packages/variance/dist/types/config").Parse
84
84
  readonly verticalAlign: {
85
85
  readonly property: "verticalAlign";
86
86
  };
87
- }>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
87
+ }>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
88
88
  readonly position: {
89
89
  readonly property: "position";
90
90
  };
@@ -115,7 +115,7 @@ declare const patternStyles: import("packages/variance/dist/types/config").Parse
115
115
  readonly opacity: {
116
116
  readonly property: "opacity";
117
117
  };
118
- }>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
118
+ }>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
119
119
  readonly p: {
120
120
  readonly property: "padding";
121
121
  readonly scale: "spacing";
package/dist/types.js CHANGED
@@ -1 +0,0 @@
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 ? void 0 : counter[key]) || 0;
6
+ var idCounter = (counter === null || counter === void 0 ? void 0 : counter[key]) || 0;
7
7
  counter[key] = idCounter;
8
- return id + "-pattern-" + (counter[key] += 1);
8
+ return "".concat(id, "-pattern-").concat(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.3-alpha.4d61d4.0",
8
- "@codecademy/variance": "0.20.3-alpha.4d61d4.0",
7
+ "@codecademy/gamut-styles": "14.0.3-alpha.9e36ef.0",
8
+ "@codecademy/variance": "0.20.3-alpha.9e36ef.0",
9
9
  "classnames": "^2.2.5"
10
10
  },
11
11
  "devDependencies": {
@@ -19,6 +19,9 @@
19
19
  "module": "dist/index.js",
20
20
  "types": "dist/index.d.ts",
21
21
  "main": "dist/index.js",
22
+ "files": [
23
+ "dist"
24
+ ],
22
25
  "license": "MIT",
23
26
  "peerDependencies": {
24
27
  "@emotion/react": "^11.4.0",
@@ -38,6 +41,6 @@
38
41
  "build": "nx build @codecademy/gamut-patterns"
39
42
  },
40
43
  "sideEffects": false,
41
- "version": "0.8.12-alpha.4d61d4.0",
42
- "gitHead": "6060cbb9e9243cdf361242feb2ca71f5212f6470"
44
+ "version": "0.8.12-alpha.9e36ef.0",
45
+ "gitHead": "b11c15d17b3d809b778b7a40e620ce0b073deadd"
43
46
  }
package/.svgo.yml DELETED
@@ -1,11 +0,0 @@
1
- multipass: true
2
-
3
- plugins:
4
- - inlineStyles:
5
- onlyMatchedOnce: false
6
- - removeDimensions: true
7
- - removeViewBox: false
8
- - removeTitle: true
9
- - removeDesc: true
10
- - mergePaths: false
11
- - convertShapeToPath: false