@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,211 +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); }
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 StripeLoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
11
- var _ref$title = _ref.title,
12
- title = _ref$title === void 0 ? 'Stripe Loose' : _ref$title,
13
- titleId = _ref.titleId,
14
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
15
-
16
- var patternId = usePatternId('StripeLoose');
17
- return /*#__PURE__*/React.createElement(Svg, _extends({
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export const StripeLoose = /*#__PURE__*/React.forwardRef(({
6
+ title = 'Stripe Loose',
7
+ titleId,
8
+ ...props
9
+ }, svgRef) => {
10
+ const patternId = usePatternId('StripeLoose');
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
- 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: 8,
54
- width: 1,
55
- height: 1,
56
- fill: "currentColor"
57
- }), /*#__PURE__*/React.createElement("rect", {
58
- y: 8,
59
- width: 1,
60
- height: 1,
61
- fill: "currentColor"
62
- }), /*#__PURE__*/React.createElement("rect", {
63
- x: 2,
64
- y: 8,
65
- width: 1,
66
- height: 1,
67
- fill: "currentColor"
68
- }), /*#__PURE__*/React.createElement("rect", {
69
- x: 3,
70
- y: 8,
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: 8,
97
- width: 1,
98
- height: 1,
99
- fill: "currentColor"
100
- }), /*#__PURE__*/React.createElement("rect", {
101
- x: 4,
102
- y: 8,
103
- width: 1,
104
- height: 1,
105
- fill: "currentColor"
106
- }), /*#__PURE__*/React.createElement("rect", {
107
- x: 6,
108
- y: 8,
109
- width: 1,
110
- height: 1,
111
- fill: "currentColor"
112
- }), /*#__PURE__*/React.createElement("rect", {
113
- x: 7,
114
- y: 8,
115
- width: 1,
116
- height: 1,
117
- fill: "currentColor"
118
- }), /*#__PURE__*/React.createElement("rect", {
119
- x: 9,
120
- width: 1,
121
- height: 1,
122
- fill: "currentColor"
123
- }), /*#__PURE__*/React.createElement("rect", {
124
- x: 8,
125
- width: 1,
126
- height: 1,
127
- fill: "currentColor"
128
- }), /*#__PURE__*/React.createElement("rect", {
129
- x: 10,
130
- width: 1,
131
- height: 1,
132
- fill: "currentColor"
133
- }), /*#__PURE__*/React.createElement("rect", {
134
- x: 11,
135
- width: 1,
136
- height: 1,
137
- fill: "currentColor"
138
- }), /*#__PURE__*/React.createElement("rect", {
139
- x: 9,
140
- y: 8,
141
- width: 1,
142
- height: 1,
143
- fill: "currentColor"
144
- }), /*#__PURE__*/React.createElement("rect", {
145
- x: 8,
146
- y: 8,
147
- width: 1,
148
- height: 1,
149
- fill: "currentColor"
150
- }), /*#__PURE__*/React.createElement("rect", {
151
- x: 10,
152
- y: 8,
153
- width: 1,
154
- height: 1,
155
- fill: "currentColor"
156
- }), /*#__PURE__*/React.createElement("rect", {
157
- x: 11,
158
- y: 8,
159
- width: 1,
160
- height: 1,
161
- fill: "currentColor"
162
- }), /*#__PURE__*/React.createElement("rect", {
163
- x: 13,
164
- width: 1,
165
- height: 1,
166
- fill: "currentColor"
167
- }), /*#__PURE__*/React.createElement("rect", {
168
- x: 12,
169
- width: 1,
170
- height: 1,
171
- fill: "currentColor"
172
- }), /*#__PURE__*/React.createElement("rect", {
173
- x: 14,
174
- width: 1,
175
- height: 1,
176
- fill: "currentColor"
177
- }), /*#__PURE__*/React.createElement("rect", {
178
- x: 15,
179
- width: 1,
180
- height: 1,
181
- fill: "currentColor"
182
- }), /*#__PURE__*/React.createElement("rect", {
183
- x: 13,
184
- y: 8,
185
- width: 1,
186
- height: 1,
187
- fill: "currentColor"
188
- }), /*#__PURE__*/React.createElement("rect", {
189
- x: 12,
190
- y: 8,
191
- width: 1,
192
- height: 1,
193
- fill: "currentColor"
194
- }), /*#__PURE__*/React.createElement("rect", {
195
- x: 14,
196
- y: 8,
197
- width: 1,
198
- height: 1,
199
- fill: "currentColor"
200
- }), /*#__PURE__*/React.createElement("rect", {
201
- x: 15,
202
- y: 8,
203
- width: 1,
204
- height: 1,
205
- fill: "currentColor"
206
- })), /*#__PURE__*/React.createElement("rect", {
207
- width: "100%",
208
- height: "100%",
209
- fill: "url(#".concat(patternId, ")")
210
- }));
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
+ x: 1,
30
+ width: 1,
31
+ height: 1,
32
+ fill: "currentColor"
33
+ }), /*#__PURE__*/_jsx("rect", {
34
+ width: 1,
35
+ height: 1,
36
+ fill: "currentColor"
37
+ }), /*#__PURE__*/_jsx("rect", {
38
+ x: 2,
39
+ width: 1,
40
+ height: 1,
41
+ fill: "currentColor"
42
+ }), /*#__PURE__*/_jsx("rect", {
43
+ x: 3,
44
+ width: 1,
45
+ height: 1,
46
+ fill: "currentColor"
47
+ }), /*#__PURE__*/_jsx("rect", {
48
+ x: 1,
49
+ y: 8,
50
+ width: 1,
51
+ height: 1,
52
+ fill: "currentColor"
53
+ }), /*#__PURE__*/_jsx("rect", {
54
+ y: 8,
55
+ width: 1,
56
+ height: 1,
57
+ fill: "currentColor"
58
+ }), /*#__PURE__*/_jsx("rect", {
59
+ x: 2,
60
+ y: 8,
61
+ width: 1,
62
+ height: 1,
63
+ fill: "currentColor"
64
+ }), /*#__PURE__*/_jsx("rect", {
65
+ x: 3,
66
+ y: 8,
67
+ width: 1,
68
+ height: 1,
69
+ fill: "currentColor"
70
+ }), /*#__PURE__*/_jsx("rect", {
71
+ x: 5,
72
+ width: 1,
73
+ height: 1,
74
+ fill: "currentColor"
75
+ }), /*#__PURE__*/_jsx("rect", {
76
+ x: 4,
77
+ width: 1,
78
+ height: 1,
79
+ fill: "currentColor"
80
+ }), /*#__PURE__*/_jsx("rect", {
81
+ x: 6,
82
+ width: 1,
83
+ height: 1,
84
+ fill: "currentColor"
85
+ }), /*#__PURE__*/_jsx("rect", {
86
+ x: 7,
87
+ width: 1,
88
+ height: 1,
89
+ fill: "currentColor"
90
+ }), /*#__PURE__*/_jsx("rect", {
91
+ x: 5,
92
+ y: 8,
93
+ width: 1,
94
+ height: 1,
95
+ fill: "currentColor"
96
+ }), /*#__PURE__*/_jsx("rect", {
97
+ x: 4,
98
+ y: 8,
99
+ width: 1,
100
+ height: 1,
101
+ fill: "currentColor"
102
+ }), /*#__PURE__*/_jsx("rect", {
103
+ x: 6,
104
+ y: 8,
105
+ width: 1,
106
+ height: 1,
107
+ fill: "currentColor"
108
+ }), /*#__PURE__*/_jsx("rect", {
109
+ x: 7,
110
+ y: 8,
111
+ width: 1,
112
+ height: 1,
113
+ fill: "currentColor"
114
+ }), /*#__PURE__*/_jsx("rect", {
115
+ x: 9,
116
+ width: 1,
117
+ height: 1,
118
+ fill: "currentColor"
119
+ }), /*#__PURE__*/_jsx("rect", {
120
+ x: 8,
121
+ width: 1,
122
+ height: 1,
123
+ fill: "currentColor"
124
+ }), /*#__PURE__*/_jsx("rect", {
125
+ x: 10,
126
+ width: 1,
127
+ height: 1,
128
+ fill: "currentColor"
129
+ }), /*#__PURE__*/_jsx("rect", {
130
+ x: 11,
131
+ width: 1,
132
+ height: 1,
133
+ fill: "currentColor"
134
+ }), /*#__PURE__*/_jsx("rect", {
135
+ x: 9,
136
+ y: 8,
137
+ width: 1,
138
+ height: 1,
139
+ fill: "currentColor"
140
+ }), /*#__PURE__*/_jsx("rect", {
141
+ x: 8,
142
+ y: 8,
143
+ width: 1,
144
+ height: 1,
145
+ fill: "currentColor"
146
+ }), /*#__PURE__*/_jsx("rect", {
147
+ x: 10,
148
+ y: 8,
149
+ width: 1,
150
+ height: 1,
151
+ fill: "currentColor"
152
+ }), /*#__PURE__*/_jsx("rect", {
153
+ x: 11,
154
+ y: 8,
155
+ width: 1,
156
+ height: 1,
157
+ fill: "currentColor"
158
+ }), /*#__PURE__*/_jsx("rect", {
159
+ x: 13,
160
+ width: 1,
161
+ height: 1,
162
+ fill: "currentColor"
163
+ }), /*#__PURE__*/_jsx("rect", {
164
+ x: 12,
165
+ width: 1,
166
+ height: 1,
167
+ fill: "currentColor"
168
+ }), /*#__PURE__*/_jsx("rect", {
169
+ x: 14,
170
+ width: 1,
171
+ height: 1,
172
+ fill: "currentColor"
173
+ }), /*#__PURE__*/_jsx("rect", {
174
+ x: 15,
175
+ width: 1,
176
+ height: 1,
177
+ fill: "currentColor"
178
+ }), /*#__PURE__*/_jsx("rect", {
179
+ x: 13,
180
+ y: 8,
181
+ width: 1,
182
+ height: 1,
183
+ fill: "currentColor"
184
+ }), /*#__PURE__*/_jsx("rect", {
185
+ x: 12,
186
+ y: 8,
187
+ width: 1,
188
+ height: 1,
189
+ fill: "currentColor"
190
+ }), /*#__PURE__*/_jsx("rect", {
191
+ x: 14,
192
+ y: 8,
193
+ width: 1,
194
+ height: 1,
195
+ fill: "currentColor"
196
+ }), /*#__PURE__*/_jsx("rect", {
197
+ x: 15,
198
+ y: 8,
199
+ width: 1,
200
+ height: 1,
201
+ fill: "currentColor"
202
+ })]
203
+ }), /*#__PURE__*/_jsx("rect", {
204
+ width: "100%",
205
+ height: "100%",
206
+ fill: `url(#${patternId})`
207
+ })]
208
+ });
211
209
  });