@codecademy/gamut-patterns 0.8.11 → 0.8.12-alpha.20ffe4.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/props.js CHANGED
@@ -1,8 +1,14 @@
1
+ import _styled from "@emotion/styled/base";
2
+
3
+ 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); }
4
+
1
5
  import { styledOptions, system } from '@codecademy/gamut-styles';
2
6
  import { variance } from '@codecademy/variance';
3
- import styled from '@emotion/styled';
4
7
  var patternStyles = variance.compose(system.layout, system.positioning, system.space);
5
- export var Svg = styled('svg', styledOptions())(patternStyles);
8
+ export var Svg = /*#__PURE__*/_styled('svg', _extends({}, {
9
+ target: "e1dw7vog0",
10
+ label: "Svg"
11
+ }, styledOptions()))(patternStyles, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQm1CIiwiZmlsZSI6Ii4uL3NyYy9wcm9wcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHN0eWxlZE9wdGlvbnMsIHN5c3RlbSB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgeyBTdHlsZVByb3BzLCB2YXJpYW5jZSB9IGZyb20gJ0Bjb2RlY2FkZW15L3ZhcmlhbmNlJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgcGF0dGVyblN0eWxlcyA9IHZhcmlhbmNlLmNvbXBvc2UoXG4gIHN5c3RlbS5sYXlvdXQsXG4gIHN5c3RlbS5wb3NpdGlvbmluZyxcbiAgc3lzdGVtLnNwYWNlXG4pO1xuXG5leHBvcnQgdHlwZSBQYXR0ZXJuU3R5bGVQcm9wcyA9IFN0eWxlUHJvcHM8dHlwZW9mIHBhdHRlcm5TdHlsZXM+O1xuZXhwb3J0IGludGVyZmFjZSBQYXR0ZXJuUHJvcHNcbiAgZXh0ZW5kcyBPbWl0PFJlYWN0LlNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+LCBrZXlvZiBQYXR0ZXJuU3R5bGVQcm9wcz4sXG4gICAgUGF0dGVyblN0eWxlUHJvcHMge1xuICAvKipcbiAgICogQSBzdWZmaXggYWRkZWQgdG8gdGhlIGVuZCBvZiB0aGUgdW5pcXVlIGdlbmVyYXRlZCBJRCBmb3IgdGhlIGljb24uIFRoaXMgaXMgdXNlZnVsIGlmIHlvdSBoYXZlIG11bHRpcGxlIG9mIHRoZSBzYW1lIGljb24gb24gdGhlIHBhZ2UgYW5kIG5lZWQgdG8gcGFzcyBhY2Nlc3NpYmlsaXR5IGd1aWRlbGluZXMuXG4gICAqL1xuICB0aXRsZUlkPzogc3RyaW5nO1xuICB0aXRsZT86IHN0cmluZztcbiAgcmVmPzogUmVhY3QuUmVmPFNWR1NWR0VsZW1lbnQ+O1xufVxuXG5leHBvcnQgY29uc3QgU3ZnID0gc3R5bGVkKFxuICAnc3ZnJyxcbiAgc3R5bGVkT3B0aW9uczwnc3ZnJz4oKVxuKTxQYXR0ZXJuUHJvcHM+KHBhdHRlcm5TdHlsZXMpO1xuXG5TdmcuZGVmYXVsdFByb3BzID0ge1xuICB3aWR0aDogJzEwMCUnLFxuICBoZWlnaHQ6ICcxMDAlJyxcbn07XG4iXX0= */");
6
12
  Svg.defaultProps = {
7
13
  width: '100%',
8
14
  height: '100%'
package/package.json CHANGED
@@ -4,12 +4,13 @@
4
4
  "url": "https://github.com/Codecademy/gamut/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@codecademy/gamut-styles": "^14.0.2",
8
- "@codecademy/variance": "^0.20.2",
7
+ "@codecademy/gamut-styles": "14.0.3-alpha.20ffe4.0",
8
+ "@codecademy/variance": "0.20.3-alpha.20ffe4.0",
9
9
  "classnames": "^2.2.5"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@svgr/cli": "5.5.0",
13
+ "@testing-library/react": "^12.1.2",
13
14
  "lodash": "^4.17.5",
14
15
  "svgo": "^1.3.2"
15
16
  },
@@ -19,6 +20,9 @@
19
20
  "module": "dist/index.js",
20
21
  "types": "dist/index.d.ts",
21
22
  "main": "dist/index.js",
23
+ "files": [
24
+ "dist"
25
+ ],
22
26
  "license": "MIT",
23
27
  "peerDependencies": {
24
28
  "@emotion/react": "^11.4.0",
@@ -38,6 +42,6 @@
38
42
  "build": "nx build @codecademy/gamut-patterns"
39
43
  },
40
44
  "sideEffects": false,
41
- "version": "0.8.11",
42
- "gitHead": "eb5934e99931cdf6a967fd964bc1e3cb27e128aa"
45
+ "version": "0.8.12-alpha.20ffe4.0",
46
+ "gitHead": "ef6493440ea9da1c2157831531694b1e83e98310"
43
47
  }
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
package/CHANGELOG.md DELETED
@@ -1,412 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ### [0.8.11](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.10...@codecademy/gamut-patterns@0.8.11) (2022-07-29)
7
-
8
- **Note:** Version bump only for package @codecademy/gamut-patterns
9
-
10
-
11
-
12
-
13
-
14
- ### [0.8.10](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.9...@codecademy/gamut-patterns@0.8.10) (2022-07-29)
15
-
16
- **Note:** Version bump only for package @codecademy/gamut-patterns
17
-
18
-
19
-
20
-
21
-
22
- ### [0.8.9](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.8...@codecademy/gamut-patterns@0.8.9) (2022-07-27)
23
-
24
- **Note:** Version bump only for package @codecademy/gamut-patterns
25
-
26
-
27
-
28
-
29
-
30
- ### [0.8.8](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.7...@codecademy/gamut-patterns@0.8.8) (2022-07-19)
31
-
32
- **Note:** Version bump only for package @codecademy/gamut-patterns
33
-
34
-
35
-
36
-
37
-
38
- ### [0.8.7](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.6...@codecademy/gamut-patterns@0.8.7) (2022-07-15)
39
-
40
- **Note:** Version bump only for package @codecademy/gamut-patterns
41
-
42
-
43
-
44
-
45
-
46
- ### [0.8.6](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.5...@codecademy/gamut-patterns@0.8.6) (2022-05-24)
47
-
48
- **Note:** Version bump only for package @codecademy/gamut-patterns
49
-
50
-
51
-
52
-
53
-
54
- ### [0.8.5](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.4...@codecademy/gamut-patterns@0.8.5) (2022-05-17)
55
-
56
- **Note:** Version bump only for package @codecademy/gamut-patterns
57
-
58
-
59
-
60
-
61
-
62
- ### [0.8.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.3...@codecademy/gamut-patterns@0.8.4) (2022-04-13)
63
-
64
- **Note:** Version bump only for package @codecademy/gamut-patterns
65
-
66
-
67
-
68
-
69
-
70
- ### [0.8.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.2...@codecademy/gamut-patterns@0.8.3) (2022-02-18)
71
-
72
- **Note:** Version bump only for package @codecademy/gamut-patterns
73
-
74
-
75
-
76
-
77
-
78
- ### [0.8.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.1...@codecademy/gamut-patterns@0.8.2) (2022-02-01)
79
-
80
- **Note:** Version bump only for package @codecademy/gamut-patterns
81
-
82
-
83
-
84
-
85
-
86
- ### [0.8.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.8.0...@codecademy/gamut-patterns@0.8.1) (2022-01-31)
87
-
88
- **Note:** Version bump only for package @codecademy/gamut-patterns
89
-
90
-
91
-
92
-
93
-
94
- ## [0.8.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.7.3...@codecademy/gamut-patterns@0.8.0) (2022-01-25)
95
-
96
-
97
- ### ⚠ BREAKING CHANGES
98
-
99
- * bumped React to 17
100
-
101
- ### Features
102
-
103
- * bumped React to 17 ([c074ecb](https://github.com/Codecademy/gamut/commit/c074ecbfa026ed8e37cf41e874d345574a46e5e4))
104
-
105
-
106
-
107
- ### [0.7.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.7.2...@codecademy/gamut-patterns@0.7.3) (2021-12-07)
108
-
109
- **Note:** Version bump only for package @codecademy/gamut-patterns
110
-
111
-
112
-
113
-
114
-
115
- ### [0.7.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.7.1...@codecademy/gamut-patterns@0.7.2) (2021-11-23)
116
-
117
- **Note:** Version bump only for package @codecademy/gamut-patterns
118
-
119
-
120
-
121
-
122
-
123
- ### [0.7.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.7.0...@codecademy/gamut-patterns@0.7.1) (2021-10-27)
124
-
125
-
126
- ### Bug Fixes
127
-
128
- * **Pattern:** fix white bg on regular and dense diagonal patterns ([2f321c2](https://github.com/Codecademy/gamut/commit/2f321c2446cdc28e4338fa1dae94efa698e4c6ea))
129
-
130
-
131
-
132
- ## 0.7.0 (2021-10-26)
133
-
134
-
135
- ### ⚠ BREAKING CHANGES
136
-
137
- * add new gamut-patterns package
138
-
139
- ### Features
140
-
141
- * bump ESLint configs to latest ([4e3cf77](https://github.com/Codecademy/gamut/commit/4e3cf77928bdd69bce3eeca8a7f07439627b4f08))
142
- * **Patterns:** Add SVGR build process and SVGO settings ([e8433ce](https://github.com/Codecademy/gamut/commit/e8433ceace8b617fcaa45f13a11ce1367cff0e0b))
143
- * **props:** Support `color` and other HTML attributes as system props without type collision GM-247 ([ff93f0c](https://github.com/Codecademy/gamut/commit/ff93f0c9b7ca64ed9819586709f58436ca4502b9))
144
- * Migrate final gamut-system docs + functions to variance [WEB-1413] ([f966933](https://github.com/Codecademy/gamut/commit/f966933ac814d228072e781ee2a3d75a33190a85))
145
- * **theme:** createTheme self containment ([87a203c](https://github.com/Codecademy/gamut/commit/87a203c56df8002406552208b8b5ffc55b228262)), closes [#666666](https://github.com/Codecademy/gamut/issues/666666) [#666666](https://github.com/Codecademy/gamut/issues/666666)
146
- * add new gamut-patterns package ([3b9785a](https://github.com/Codecademy/gamut/commit/3b9785a20e26767a9531b1f1ce8de5f504f2dd34))
147
-
148
-
149
-
150
- ### [0.6.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.6.1...@codecademy/gamut-patterns@0.6.2) (2021-09-30)
151
-
152
- **Note:** Version bump only for package @codecademy/gamut-patterns
153
-
154
-
155
-
156
-
157
-
158
- ### [0.6.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.6.0...@codecademy/gamut-patterns@0.6.1) (2021-09-13)
159
-
160
- **Note:** Version bump only for package @codecademy/gamut-patterns
161
-
162
-
163
-
164
-
165
-
166
- ## [0.6.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.8...@codecademy/gamut-patterns@0.6.0) (2021-09-10)
167
-
168
-
169
- ### Features
170
-
171
- * bump ESLint configs to latest ([e0a201a](https://github.com/Codecademy/gamut/commit/e0a201abcc5f49718538d3d91af21cb37db4470e))
172
-
173
-
174
-
175
- ### [0.5.8](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.7...@codecademy/gamut-patterns@0.5.8) (2021-08-30)
176
-
177
- **Note:** Version bump only for package @codecademy/gamut-patterns
178
-
179
-
180
-
181
-
182
-
183
- ### [0.5.7](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.6...@codecademy/gamut-patterns@0.5.7) (2021-08-16)
184
-
185
- **Note:** Version bump only for package @codecademy/gamut-patterns
186
-
187
-
188
-
189
-
190
-
191
- ### [0.5.6](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.5...@codecademy/gamut-patterns@0.5.6) (2021-08-16)
192
-
193
- **Note:** Version bump only for package @codecademy/gamut-patterns
194
-
195
-
196
-
197
-
198
-
199
- ### [0.5.5](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.4...@codecademy/gamut-patterns@0.5.5) (2021-08-13)
200
-
201
- **Note:** Version bump only for package @codecademy/gamut-patterns
202
-
203
-
204
-
205
-
206
-
207
- ### [0.5.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.3...@codecademy/gamut-patterns@0.5.4) (2021-08-12)
208
-
209
- **Note:** Version bump only for package @codecademy/gamut-patterns
210
-
211
-
212
-
213
-
214
-
215
- ### [0.5.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.2...@codecademy/gamut-patterns@0.5.3) (2021-08-05)
216
-
217
- **Note:** Version bump only for package @codecademy/gamut-patterns
218
-
219
-
220
-
221
-
222
-
223
- ### [0.5.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.1...@codecademy/gamut-patterns@0.5.2) (2021-08-03)
224
-
225
- **Note:** Version bump only for package @codecademy/gamut-patterns
226
-
227
-
228
-
229
-
230
-
231
- ### [0.5.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.0...@codecademy/gamut-patterns@0.5.1) (2021-07-29)
232
-
233
- **Note:** Version bump only for package @codecademy/gamut-patterns
234
-
235
-
236
-
237
-
238
-
239
- ## [0.5.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.7...@codecademy/gamut-patterns@0.5.0) (2021-07-27)
240
-
241
-
242
- ### Features
243
-
244
- * **Patterns:** Add SVGR build process and SVGO settings ([56e50ff](https://github.com/Codecademy/gamut/commit/56e50ffe021102b84a7f9e5d7bb33ea6de890994))
245
-
246
-
247
-
248
- ### [0.4.7](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.6...@codecademy/gamut-patterns@0.4.7) (2021-07-19)
249
-
250
- **Note:** Version bump only for package @codecademy/gamut-patterns
251
-
252
-
253
-
254
-
255
-
256
- ### [0.4.6](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.5...@codecademy/gamut-patterns@0.4.6) (2021-07-16)
257
-
258
- **Note:** Version bump only for package @codecademy/gamut-patterns
259
-
260
-
261
-
262
-
263
-
264
- ### [0.4.5](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.4...@codecademy/gamut-patterns@0.4.5) (2021-07-15)
265
-
266
- **Note:** Version bump only for package @codecademy/gamut-patterns
267
-
268
-
269
-
270
-
271
-
272
- ### [0.4.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.3...@codecademy/gamut-patterns@0.4.4) (2021-06-17)
273
-
274
- **Note:** Version bump only for package @codecademy/gamut-patterns
275
-
276
-
277
-
278
-
279
-
280
- ### [0.4.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.2...@codecademy/gamut-patterns@0.4.3) (2021-06-16)
281
-
282
- **Note:** Version bump only for package @codecademy/gamut-patterns
283
-
284
-
285
-
286
-
287
-
288
- ### [0.4.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.1...@codecademy/gamut-patterns@0.4.2) (2021-06-16)
289
-
290
- **Note:** Version bump only for package @codecademy/gamut-patterns
291
-
292
-
293
-
294
-
295
-
296
- ### [0.4.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.0...@codecademy/gamut-patterns@0.4.1) (2021-06-16)
297
-
298
- **Note:** Version bump only for package @codecademy/gamut-patterns
299
-
300
-
301
-
302
-
303
-
304
- ## [0.4.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.4...@codecademy/gamut-patterns@0.4.0) (2021-06-15)
305
-
306
-
307
- ### Features
308
-
309
- * **props:** Support `color` and other HTML attributes as system props without type collision GM-247 ([50a8b43](https://github.com/Codecademy/gamut/commit/50a8b43b27eff2d75307d317d724383156e5a3ed))
310
-
311
-
312
-
313
- ### [0.3.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.3...@codecademy/gamut-patterns@0.3.4) (2021-06-10)
314
-
315
- **Note:** Version bump only for package @codecademy/gamut-patterns
316
-
317
-
318
-
319
-
320
-
321
- ### [0.3.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.2...@codecademy/gamut-patterns@0.3.3) (2021-06-10)
322
-
323
- **Note:** Version bump only for package @codecademy/gamut-patterns
324
-
325
-
326
-
327
-
328
-
329
- ### [0.3.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.1...@codecademy/gamut-patterns@0.3.2) (2021-06-03)
330
-
331
- **Note:** Version bump only for package @codecademy/gamut-patterns
332
-
333
-
334
-
335
-
336
-
337
- ### [0.3.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.0...@codecademy/gamut-patterns@0.3.1) (2021-06-02)
338
-
339
- **Note:** Version bump only for package @codecademy/gamut-patterns
340
-
341
-
342
-
343
-
344
-
345
- ## [0.3.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.2...@codecademy/gamut-patterns@0.3.0) (2021-05-27)
346
-
347
-
348
- ### Features
349
-
350
- * Migrate final gamut-system docs + functions to variance [WEB-1413] ([67c8651](https://github.com/Codecademy/gamut/commit/67c8651dc4985dd656c8d488af4cf56ca21a813b))
351
-
352
-
353
-
354
- ### [0.2.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.1...@codecademy/gamut-patterns@0.2.2) (2021-05-25)
355
-
356
- **Note:** Version bump only for package @codecademy/gamut-patterns
357
-
358
-
359
-
360
-
361
-
362
- ### [0.2.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.0...@codecademy/gamut-patterns@0.2.1) (2021-05-24)
363
-
364
- **Note:** Version bump only for package @codecademy/gamut-patterns
365
-
366
-
367
-
368
-
369
-
370
- ## [0.2.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.3...@codecademy/gamut-patterns@0.2.0) (2021-05-18)
371
-
372
-
373
- ### Features
374
-
375
- * **theme:** createTheme self containment ([59ddff7](https://github.com/Codecademy/gamut/commit/59ddff7224cd8e0972212dd6ba1696f40ccac835)), closes [#666666](https://github.com/Codecademy/gamut/issues/666666) [#666666](https://github.com/Codecademy/gamut/issues/666666)
376
-
377
-
378
-
379
- ### [0.1.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.2...@codecademy/gamut-patterns@0.1.3) (2021-05-12)
380
-
381
- **Note:** Version bump only for package @codecademy/gamut-patterns
382
-
383
-
384
-
385
-
386
-
387
- ### [0.1.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.1...@codecademy/gamut-patterns@0.1.2) (2021-05-11)
388
-
389
- **Note:** Version bump only for package @codecademy/gamut-patterns
390
-
391
-
392
-
393
-
394
-
395
- ### [0.1.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.0...@codecademy/gamut-patterns@0.1.1) (2021-05-07)
396
-
397
- **Note:** Version bump only for package @codecademy/gamut-patterns
398
-
399
-
400
-
401
-
402
-
403
- ## 0.1.0 (2021-05-06)
404
-
405
-
406
- ### ⚠ BREAKING CHANGES
407
-
408
- * add new gamut-patterns package
409
-
410
- ### Features
411
-
412
- * add new gamut-patterns package ([e0b30b1](https://github.com/Codecademy/gamut/commit/e0b30b102b32b8447a1b4c97f9da63fcce365af6))
package/babel.config.js DELETED
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- presets: ['codecademy', '@babel/preset-typescript'],
3
- include: ['./src/**/*'],
4
- ignore: ['__tests__', './**/*.d.ts'],
5
- };
package/emotion-plugin.js DELETED
@@ -1,46 +0,0 @@
1
- const plugin = (api) => {
2
- const vistor = {
3
- JSXElement(path) {
4
- // We only want to find SVG element
5
- if (path.get('openingElement.name').isJSXIdentifier({ name: 'svg' })) {
6
- // Update the opening and closing tags to the styled component identifier
7
- const emotionTag = api.types.jsxIdentifier('Svg');
8
- path.get('openingElement.name').replaceWith(emotionTag);
9
- path.get('closingElement.name').replaceWith(emotionTag);
10
- }
11
- },
12
- JSXAttribute(path) {
13
- const valuePath = path.get('value');
14
- const attrName = path.get('name').toString();
15
- if (attrName === 'id' && valuePath.isStringLiteral()) {
16
- valuePath.replaceWith(
17
- api.types.jsxExpressionContainer(
18
- api.template.ast('patternId').expression
19
- )
20
- );
21
- }
22
-
23
- if (
24
- attrName === 'fill' &&
25
- valuePath.isStringLiteral() &&
26
- valuePath.toString().includes('url')
27
- ) {
28
- valuePath.replaceWith(
29
- api.types.jsxExpressionContainer(
30
- api.template.ast('`url(#${patternId})`').expression
31
- )
32
- );
33
- }
34
- },
35
- };
36
-
37
- return {
38
- visitor: {
39
- Program(path) {
40
- path.traverse(vistor);
41
- },
42
- },
43
- };
44
- };
45
-
46
- module.exports = plugin;
package/index-template.js DELETED
@@ -1,10 +0,0 @@
1
- const path = require('path');
2
-
3
- function indexTemplate(files) {
4
- const exportEntries = files.map((file) => {
5
- const basename = path.basename(file, path.extname(file));
6
- return `export * from './${basename}';`;
7
- });
8
- return exportEntries.join('\n');
9
- }
10
- module.exports = indexTemplate;
package/jest.config.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('../../jest.config.base')('gamut-patterns');
@@ -1,30 +0,0 @@
1
- const path = require('path');
2
- const { startCase } = require('lodash');
3
-
4
- function patternTemplate(api, opts, { jsx }) {
5
- const template = api.template.smart({ plugins: ['jsx', 'typescript'] });
6
- const { componentName, filePath } = opts.state;
7
- const exportName = componentName.replace('Svg', '');
8
- const title = startCase(path.basename(filePath, '.svg'));
9
-
10
- return template.ast`
11
- import * as React from 'react';
12
- import { Svg, PatternProps } from '../props';
13
- import { usePatternId } from '../usePatternId';
14
-
15
- export const ${exportName} = React.forwardRef<SVGSVGElement, PatternProps>(({
16
- title = "${title}",
17
- titleId,
18
- ...props
19
- },
20
- svgRef
21
- ) => {
22
- const patternId = usePatternId('${exportName}');
23
-
24
- return ${jsx};
25
- }) as React.ForwardRefExoticComponent<
26
- PatternProps & React.RefAttributes<SVGSVGElement>
27
- >;
28
- `;
29
- }
30
- module.exports = patternTemplate;
package/project.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3
- "sourceRoot": "packages/gamut-patterns/src",
4
- "projectType": "library",
5
- "targets": {
6
- "build": {
7
- "outputs": ["./dist", "./src/patterns"],
8
- "executor": "nx:run-commands",
9
- "options": {
10
- "cwd": "packages/gamut-patterns",
11
- "outputPath": ["./dist", "./src/patterns"],
12
- "commands": [
13
- "rm -rf ./dist",
14
- "rm -rf ./src/patterns",
15
- "svgr --out-dir ./src/patterns --ext 'tsx' ./src/svg",
16
- "babel ./src --out-dir ./dist --copy-files --extensions \".ts,.tsx\"",
17
- "tsc --emitDeclarationOnly"
18
- ],
19
- "parallel": false
20
- }
21
- }
22
- },
23
- "tags": []
24
- }
package/svgr.config.js DELETED
@@ -1,29 +0,0 @@
1
- const emotionPlugin = require('./emotion-plugin');
2
- const template = require('./pattern-template');
3
- const indexTemplate = require('./index-template');
4
-
5
- module.exports = {
6
- dimensions: false,
7
- titleProp: true,
8
- ref: true,
9
- svgProps: {
10
- fill: 'currentColor',
11
- role: 'img',
12
- 'aria-hidden': 'true',
13
- },
14
- prettierConfig: {
15
- parser: 'typescript',
16
- },
17
- replaceAttrValues: {
18
- '#000': 'currentColor',
19
- '#111': 'currentColor',
20
- '#444': 'currentColor',
21
- },
22
- jsx: {
23
- babelConfig: {
24
- plugins: [emotionPlugin],
25
- },
26
- },
27
- indexTemplate,
28
- template,
29
- };
package/tsconfig.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "include": [
4
- "../../typings/*.d.ts",
5
- "./src/**/*.ts",
6
- "./src/**/*.tsx",
7
- "../gamut-styles/dist/typings/theme.d.ts"
8
- ],
9
- "compilerOptions": {
10
- "outDir": "./dist"
11
- }
12
- }