@codecademy/gamut-patterns 1.0.0-alpha.f6cb5a.0 → 1.0.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 (43) hide show
  1. package/dist/patterns/CheckerDense.js +37 -39
  2. package/dist/patterns/CheckerLoose.js +37 -39
  3. package/dist/patterns/CheckerRegular.js +37 -39
  4. package/dist/patterns/DiagonalADense.js +71 -73
  5. package/dist/patterns/DiagonalALoose.js +215 -217
  6. package/dist/patterns/DiagonalARegular.js +119 -121
  7. package/dist/patterns/DiagonalBDense.js +53 -55
  8. package/dist/patterns/DiagonalBLoose.js +121 -123
  9. package/dist/patterns/DiagonalBRegular.js +77 -79
  10. package/dist/patterns/DotDense.js +32 -34
  11. package/dist/patterns/DotLoose.js +75 -77
  12. package/dist/patterns/DotRegular.js +32 -34
  13. package/dist/patterns/ExDense.js +54 -56
  14. package/dist/patterns/ExLoose.js +54 -56
  15. package/dist/patterns/ExRegular.js +54 -56
  16. package/dist/patterns/FlowerDense.js +48 -50
  17. package/dist/patterns/FlowerLoose.js +48 -50
  18. package/dist/patterns/FlowerRegular.js +48 -50
  19. package/dist/patterns/GridDense.js +47 -49
  20. package/dist/patterns/GridLoose.js +47 -49
  21. package/dist/patterns/GridRegular.js +47 -49
  22. package/dist/patterns/Herringbone.js +65 -67
  23. package/dist/patterns/RainDense.js +37 -39
  24. package/dist/patterns/RainLoose.js +37 -39
  25. package/dist/patterns/RainRegular.js +37 -39
  26. package/dist/patterns/StripeDense.js +69 -71
  27. package/dist/patterns/StripeLoose.js +201 -203
  28. package/dist/patterns/StripeRegular.js +113 -115
  29. package/dist/props.d.ts +141 -32
  30. package/dist/props.js +14 -6
  31. package/dist/types.js +1 -0
  32. package/dist/usePatternId.js +5 -8
  33. package/package.json +17 -30
  34. package/.svgo.yml +0 -11
  35. package/CHANGELOG.md +0 -329
  36. package/LICENSE +0 -21
  37. package/babel.config.js +0 -5
  38. package/emotion-plugin.js +0 -46
  39. package/index-template.js +0 -10
  40. package/jest.config.js +0 -1
  41. package/pattern-template.js +0 -30
  42. package/svgr.config.js +0 -29
  43. package/tsconfig.json +0 -12
@@ -1,225 +1,223 @@
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); }
2
-
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
-
7
1
  import * as React from 'react';
8
2
  import { Svg } from '../props';
9
3
  import { usePatternId } from '../usePatternId';
10
- export var DiagonalALoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
11
- var _ref$title = _ref.title,
12
- title = _ref$title === void 0 ? 'Diagonal A Loose' : _ref$title,
13
- titleId = _ref.titleId,
14
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
15
-
16
- var patternId = usePatternId('DiagonalALoose');
17
- return /*#__PURE__*/React.createElement(Svg, _extends({
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export const DiagonalALoose = /*#__PURE__*/React.forwardRef(({
6
+ title = 'Diagonal A Loose',
7
+ titleId,
8
+ ...props
9
+ }, svgRef) => {
10
+ const patternId = usePatternId('DiagonalALoose');
11
+ return /*#__PURE__*/_jsxs(Svg, {
18
12
  fill: "currentColor",
19
13
  role: "img",
20
14
  "aria-hidden": "true",
21
15
  ref: svgRef,
22
- "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: 16,
30
- height: 16,
31
- patternUnits: "userSpaceOnUse"
32
- }, /*#__PURE__*/React.createElement("rect", {
33
- width: 1,
34
- height: 1,
35
- fill: "currentColor"
36
- }), /*#__PURE__*/React.createElement("rect", {
37
- x: 14,
38
- y: 2,
39
- width: 1,
40
- height: 1,
41
- fill: "currentColor"
42
- }), /*#__PURE__*/React.createElement("rect", {
43
- x: 13,
44
- y: 2,
45
- width: 1,
46
- height: 1,
47
- fill: "currentColor"
48
- }), /*#__PURE__*/React.createElement("rect", {
49
- x: 13,
50
- y: 3,
51
- width: 1,
52
- height: 1,
53
- fill: "currentColor"
54
- }), /*#__PURE__*/React.createElement("rect", {
55
- x: 12,
56
- y: 3,
57
- width: 1,
58
- height: 1,
59
- fill: "currentColor"
60
- }), /*#__PURE__*/React.createElement("rect", {
61
- x: 15,
62
- width: 1,
63
- height: 1,
64
- fill: "currentColor"
65
- }), /*#__PURE__*/React.createElement("rect", {
66
- x: 15,
67
- y: 1,
68
- width: 1,
69
- height: 1,
70
- fill: "currentColor"
71
- }), /*#__PURE__*/React.createElement("rect", {
72
- x: 14,
73
- y: 1,
74
- width: 1,
75
- height: 1,
76
- fill: "currentColor"
77
- }), /*#__PURE__*/React.createElement("rect", {
78
- x: 11,
79
- y: 5,
80
- width: 1,
81
- height: 1,
82
- fill: "currentColor"
83
- }), /*#__PURE__*/React.createElement("rect", {
84
- x: 10,
85
- y: 5,
86
- width: 1,
87
- height: 1,
88
- fill: "currentColor"
89
- }), /*#__PURE__*/React.createElement("rect", {
90
- x: 10,
91
- y: 6,
92
- width: 1,
93
- height: 1,
94
- fill: "currentColor"
95
- }), /*#__PURE__*/React.createElement("rect", {
96
- x: 9,
97
- y: 6,
98
- width: 1,
99
- height: 1,
100
- fill: "currentColor"
101
- }), /*#__PURE__*/React.createElement("rect", {
102
- x: 8,
103
- y: 7,
104
- width: 1,
105
- height: 1,
106
- fill: "currentColor"
107
- }), /*#__PURE__*/React.createElement("rect", {
108
- x: 9,
109
- y: 7,
110
- width: 1,
111
- height: 1,
112
- fill: "currentColor"
113
- }), /*#__PURE__*/React.createElement("rect", {
114
- x: 12,
115
- y: 4,
116
- width: 1,
117
- height: 1,
118
- fill: "currentColor"
119
- }), /*#__PURE__*/React.createElement("rect", {
120
- x: 11,
121
- y: 4,
122
- width: 1,
123
- height: 1,
124
- fill: "currentColor"
125
- }), /*#__PURE__*/React.createElement("rect", {
126
- x: 7,
127
- y: 9,
128
- width: 1,
129
- height: 1,
130
- fill: "currentColor"
131
- }), /*#__PURE__*/React.createElement("rect", {
132
- x: 6,
133
- y: 9,
134
- width: 1,
135
- height: 1,
136
- fill: "currentColor"
137
- }), /*#__PURE__*/React.createElement("rect", {
138
- x: 6,
139
- y: 10,
140
- width: 1,
141
- height: 1,
142
- fill: "currentColor"
143
- }), /*#__PURE__*/React.createElement("rect", {
144
- x: 5,
145
- y: 10,
146
- width: 1,
147
- height: 1,
148
- fill: "currentColor"
149
- }), /*#__PURE__*/React.createElement("rect", {
150
- x: 8,
151
- y: 8,
152
- width: 1,
153
- height: 1,
154
- fill: "currentColor"
155
- }), /*#__PURE__*/React.createElement("rect", {
156
- x: 7,
157
- y: 8,
158
- width: 1,
159
- height: 1,
160
- fill: "currentColor"
161
- }), /*#__PURE__*/React.createElement("rect", {
162
- x: 4,
163
- y: 12,
164
- width: 1,
165
- height: 1,
166
- fill: "currentColor"
167
- }), /*#__PURE__*/React.createElement("rect", {
168
- x: 3,
169
- y: 12,
170
- width: 1,
171
- height: 1,
172
- fill: "currentColor"
173
- }), /*#__PURE__*/React.createElement("rect", {
174
- x: 3,
175
- y: 13,
176
- width: 1,
177
- height: 1,
178
- fill: "currentColor"
179
- }), /*#__PURE__*/React.createElement("rect", {
180
- x: 2,
181
- y: 13,
182
- width: 1,
183
- height: 1,
184
- fill: "currentColor"
185
- }), /*#__PURE__*/React.createElement("rect", {
186
- x: 1,
187
- y: 14,
188
- width: 1,
189
- height: 1,
190
- fill: "currentColor"
191
- }), /*#__PURE__*/React.createElement("rect", {
192
- x: 2,
193
- y: 14,
194
- width: 1,
195
- height: 1,
196
- fill: "currentColor"
197
- }), /*#__PURE__*/React.createElement("rect", {
198
- y: 15,
199
- width: 1,
200
- height: 1,
201
- fill: "currentColor"
202
- }), /*#__PURE__*/React.createElement("rect", {
203
- x: 1,
204
- y: 15,
205
- width: 1,
206
- height: 1,
207
- fill: "currentColor"
208
- }), /*#__PURE__*/React.createElement("rect", {
209
- x: 5,
210
- y: 11,
211
- width: 1,
212
- height: 1,
213
- fill: "currentColor"
214
- }), /*#__PURE__*/React.createElement("rect", {
215
- x: 4,
216
- y: 11,
217
- width: 1,
218
- height: 1,
219
- fill: "currentColor"
220
- })), /*#__PURE__*/React.createElement("rect", {
221
- width: "100%",
222
- height: "100%",
223
- fill: "url(#".concat(patternId, ")")
224
- }));
16
+ "aria-labelledby": titleId,
17
+ ...props,
18
+ children: [title ? /*#__PURE__*/_jsx("title", {
19
+ id: titleId,
20
+ children: title
21
+ }) : null, /*#__PURE__*/_jsxs("pattern", {
22
+ id: patternId,
23
+ x: 0,
24
+ y: 0,
25
+ width: 16,
26
+ height: 16,
27
+ patternUnits: "userSpaceOnUse",
28
+ children: [/*#__PURE__*/_jsx("rect", {
29
+ width: 1,
30
+ height: 1,
31
+ fill: "currentColor"
32
+ }), /*#__PURE__*/_jsx("rect", {
33
+ x: 14,
34
+ y: 2,
35
+ width: 1,
36
+ height: 1,
37
+ fill: "currentColor"
38
+ }), /*#__PURE__*/_jsx("rect", {
39
+ x: 13,
40
+ y: 2,
41
+ width: 1,
42
+ height: 1,
43
+ fill: "currentColor"
44
+ }), /*#__PURE__*/_jsx("rect", {
45
+ x: 13,
46
+ y: 3,
47
+ width: 1,
48
+ height: 1,
49
+ fill: "currentColor"
50
+ }), /*#__PURE__*/_jsx("rect", {
51
+ x: 12,
52
+ y: 3,
53
+ width: 1,
54
+ height: 1,
55
+ fill: "currentColor"
56
+ }), /*#__PURE__*/_jsx("rect", {
57
+ x: 15,
58
+ width: 1,
59
+ height: 1,
60
+ fill: "currentColor"
61
+ }), /*#__PURE__*/_jsx("rect", {
62
+ x: 15,
63
+ y: 1,
64
+ width: 1,
65
+ height: 1,
66
+ fill: "currentColor"
67
+ }), /*#__PURE__*/_jsx("rect", {
68
+ x: 14,
69
+ y: 1,
70
+ width: 1,
71
+ height: 1,
72
+ fill: "currentColor"
73
+ }), /*#__PURE__*/_jsx("rect", {
74
+ x: 11,
75
+ y: 5,
76
+ width: 1,
77
+ height: 1,
78
+ fill: "currentColor"
79
+ }), /*#__PURE__*/_jsx("rect", {
80
+ x: 10,
81
+ y: 5,
82
+ width: 1,
83
+ height: 1,
84
+ fill: "currentColor"
85
+ }), /*#__PURE__*/_jsx("rect", {
86
+ x: 10,
87
+ y: 6,
88
+ width: 1,
89
+ height: 1,
90
+ fill: "currentColor"
91
+ }), /*#__PURE__*/_jsx("rect", {
92
+ x: 9,
93
+ y: 6,
94
+ width: 1,
95
+ height: 1,
96
+ fill: "currentColor"
97
+ }), /*#__PURE__*/_jsx("rect", {
98
+ x: 8,
99
+ y: 7,
100
+ width: 1,
101
+ height: 1,
102
+ fill: "currentColor"
103
+ }), /*#__PURE__*/_jsx("rect", {
104
+ x: 9,
105
+ y: 7,
106
+ width: 1,
107
+ height: 1,
108
+ fill: "currentColor"
109
+ }), /*#__PURE__*/_jsx("rect", {
110
+ x: 12,
111
+ y: 4,
112
+ width: 1,
113
+ height: 1,
114
+ fill: "currentColor"
115
+ }), /*#__PURE__*/_jsx("rect", {
116
+ x: 11,
117
+ y: 4,
118
+ width: 1,
119
+ height: 1,
120
+ fill: "currentColor"
121
+ }), /*#__PURE__*/_jsx("rect", {
122
+ x: 7,
123
+ y: 9,
124
+ width: 1,
125
+ height: 1,
126
+ fill: "currentColor"
127
+ }), /*#__PURE__*/_jsx("rect", {
128
+ x: 6,
129
+ y: 9,
130
+ width: 1,
131
+ height: 1,
132
+ fill: "currentColor"
133
+ }), /*#__PURE__*/_jsx("rect", {
134
+ x: 6,
135
+ y: 10,
136
+ width: 1,
137
+ height: 1,
138
+ fill: "currentColor"
139
+ }), /*#__PURE__*/_jsx("rect", {
140
+ x: 5,
141
+ y: 10,
142
+ width: 1,
143
+ height: 1,
144
+ fill: "currentColor"
145
+ }), /*#__PURE__*/_jsx("rect", {
146
+ x: 8,
147
+ y: 8,
148
+ width: 1,
149
+ height: 1,
150
+ fill: "currentColor"
151
+ }), /*#__PURE__*/_jsx("rect", {
152
+ x: 7,
153
+ y: 8,
154
+ width: 1,
155
+ height: 1,
156
+ fill: "currentColor"
157
+ }), /*#__PURE__*/_jsx("rect", {
158
+ x: 4,
159
+ y: 12,
160
+ width: 1,
161
+ height: 1,
162
+ fill: "currentColor"
163
+ }), /*#__PURE__*/_jsx("rect", {
164
+ x: 3,
165
+ y: 12,
166
+ width: 1,
167
+ height: 1,
168
+ fill: "currentColor"
169
+ }), /*#__PURE__*/_jsx("rect", {
170
+ x: 3,
171
+ y: 13,
172
+ width: 1,
173
+ height: 1,
174
+ fill: "currentColor"
175
+ }), /*#__PURE__*/_jsx("rect", {
176
+ x: 2,
177
+ y: 13,
178
+ width: 1,
179
+ height: 1,
180
+ fill: "currentColor"
181
+ }), /*#__PURE__*/_jsx("rect", {
182
+ x: 1,
183
+ y: 14,
184
+ width: 1,
185
+ height: 1,
186
+ fill: "currentColor"
187
+ }), /*#__PURE__*/_jsx("rect", {
188
+ x: 2,
189
+ y: 14,
190
+ width: 1,
191
+ height: 1,
192
+ fill: "currentColor"
193
+ }), /*#__PURE__*/_jsx("rect", {
194
+ y: 15,
195
+ width: 1,
196
+ height: 1,
197
+ fill: "currentColor"
198
+ }), /*#__PURE__*/_jsx("rect", {
199
+ x: 1,
200
+ y: 15,
201
+ width: 1,
202
+ height: 1,
203
+ fill: "currentColor"
204
+ }), /*#__PURE__*/_jsx("rect", {
205
+ x: 5,
206
+ y: 11,
207
+ width: 1,
208
+ height: 1,
209
+ fill: "currentColor"
210
+ }), /*#__PURE__*/_jsx("rect", {
211
+ x: 4,
212
+ y: 11,
213
+ width: 1,
214
+ height: 1,
215
+ fill: "currentColor"
216
+ })]
217
+ }), /*#__PURE__*/_jsx("rect", {
218
+ width: "100%",
219
+ height: "100%",
220
+ fill: `url(#${patternId})`
221
+ })]
222
+ });
225
223
  });