@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.
- package/dist/patterns/CheckerDense.js +30 -60
- package/dist/patterns/CheckerLoose.js +30 -60
- package/dist/patterns/CheckerRegular.js +30 -60
- package/dist/patterns/DiagonalADense.js +64 -118
- package/dist/patterns/DiagonalALoose.js +208 -358
- package/dist/patterns/DiagonalARegular.js +112 -198
- package/dist/patterns/DiagonalBDense.js +46 -88
- package/dist/patterns/DiagonalBLoose.js +114 -200
- package/dist/patterns/DiagonalBRegular.js +70 -128
- package/dist/patterns/DotDense.js +25 -51
- package/dist/patterns/DotLoose.js +68 -126
- package/dist/patterns/DotRegular.js +25 -51
- package/dist/patterns/ExDense.js +47 -89
- package/dist/patterns/ExLoose.js +47 -89
- package/dist/patterns/ExRegular.js +47 -89
- package/dist/patterns/FlowerDense.js +41 -79
- package/dist/patterns/FlowerLoose.js +41 -79
- package/dist/patterns/FlowerRegular.js +41 -79
- package/dist/patterns/GridDense.js +40 -78
- package/dist/patterns/GridLoose.js +40 -78
- package/dist/patterns/GridRegular.js +40 -78
- package/dist/patterns/Herringbone.js +58 -108
- package/dist/patterns/RainDense.js +30 -60
- package/dist/patterns/RainLoose.js +30 -60
- package/dist/patterns/RainRegular.js +30 -60
- package/dist/patterns/StripeDense.js +62 -116
- package/dist/patterns/StripeLoose.js +194 -344
- package/dist/patterns/StripeRegular.js +106 -192
- package/dist/props.d.ts +3 -3
- package/dist/types.js +0 -1
- package/dist/usePatternId.js +2 -2
- package/package.json +7 -4
- package/.svgo.yml +0 -11
- package/CHANGELOG.md +0 -420
- package/babel.config.js +0 -12
- package/emotion-plugin.js +0 -46
- package/index-template.js +0 -10
- package/pattern-template.js +0 -30
- package/project.json +0 -33
- package/svgr.config.js +0 -29
- package/tsconfig.json +0 -15
|
@@ -1,209 +1,123 @@
|
|
|
1
|
-
|
|
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
|
|
5
|
-
|
|
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 =
|
|
14
|
+
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
|
|
17
15
|
|
|
18
16
|
var patternId = usePatternId('StripeRegular');
|
|
19
|
-
return /*#__PURE__*/
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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("
|
|
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("
|
|
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("
|
|
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 {};
|
package/dist/usePatternId.js
CHANGED
|
@@ -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
|
|
6
|
+
var idCounter = (counter === null || counter === void 0 ? void 0 : counter[key]) || 0;
|
|
7
7
|
counter[key] = idCounter;
|
|
8
|
-
return id
|
|
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.
|
|
8
|
-
"@codecademy/variance": "0.20.3-alpha.
|
|
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.
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"version": "0.8.12-alpha.9e36ef.0",
|
|
45
|
+
"gitHead": "b11c15d17b3d809b778b7a40e620ce0b073deadd"
|
|
43
46
|
}
|