@codecademy/gamut-patterns 1.0.0-alpha.aa37ee.0 → 1.0.0-alpha.b02418.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 (71) hide show
  1. package/LICENSE +1 -1
  2. package/dist/patterns/CheckerDense.d.ts +1 -1
  3. package/dist/patterns/CheckerDense.js +40 -33
  4. package/dist/patterns/CheckerLoose.d.ts +1 -1
  5. package/dist/patterns/CheckerLoose.js +40 -33
  6. package/dist/patterns/CheckerRegular.d.ts +1 -1
  7. package/dist/patterns/CheckerRegular.js +40 -33
  8. package/dist/patterns/DiagonalADense.d.ts +1 -1
  9. package/dist/patterns/DiagonalADense.js +74 -67
  10. package/dist/patterns/DiagonalALoose.d.ts +1 -1
  11. package/dist/patterns/DiagonalALoose.js +218 -211
  12. package/dist/patterns/DiagonalARegular.d.ts +1 -1
  13. package/dist/patterns/DiagonalARegular.js +122 -115
  14. package/dist/patterns/DiagonalBDense.d.ts +1 -1
  15. package/dist/patterns/DiagonalBDense.js +56 -49
  16. package/dist/patterns/DiagonalBLoose.d.ts +1 -1
  17. package/dist/patterns/DiagonalBLoose.js +124 -117
  18. package/dist/patterns/DiagonalBRegular.d.ts +1 -1
  19. package/dist/patterns/DiagonalBRegular.js +80 -73
  20. package/dist/patterns/DotDense.d.ts +1 -1
  21. package/dist/patterns/DotDense.js +35 -28
  22. package/dist/patterns/DotLoose.d.ts +1 -1
  23. package/dist/patterns/DotLoose.js +78 -71
  24. package/dist/patterns/DotRegular.d.ts +1 -1
  25. package/dist/patterns/DotRegular.js +35 -28
  26. package/dist/patterns/ExDense.d.ts +1 -1
  27. package/dist/patterns/ExDense.js +57 -50
  28. package/dist/patterns/ExLoose.d.ts +1 -1
  29. package/dist/patterns/ExLoose.js +57 -50
  30. package/dist/patterns/ExRegular.d.ts +1 -1
  31. package/dist/patterns/ExRegular.js +57 -50
  32. package/dist/patterns/FlowerDense.d.ts +1 -1
  33. package/dist/patterns/FlowerDense.js +51 -44
  34. package/dist/patterns/FlowerLoose.d.ts +1 -1
  35. package/dist/patterns/FlowerLoose.js +51 -44
  36. package/dist/patterns/FlowerRegular.d.ts +1 -1
  37. package/dist/patterns/FlowerRegular.js +51 -44
  38. package/dist/patterns/GridDense.d.ts +1 -1
  39. package/dist/patterns/GridDense.js +50 -43
  40. package/dist/patterns/GridLoose.d.ts +1 -1
  41. package/dist/patterns/GridLoose.js +50 -43
  42. package/dist/patterns/GridRegular.d.ts +1 -1
  43. package/dist/patterns/GridRegular.js +50 -43
  44. package/dist/patterns/Herringbone.d.ts +1 -1
  45. package/dist/patterns/Herringbone.js +68 -61
  46. package/dist/patterns/RainDense.d.ts +1 -1
  47. package/dist/patterns/RainDense.js +40 -33
  48. package/dist/patterns/RainLoose.d.ts +1 -1
  49. package/dist/patterns/RainLoose.js +40 -33
  50. package/dist/patterns/RainRegular.d.ts +1 -1
  51. package/dist/patterns/RainRegular.js +40 -33
  52. package/dist/patterns/StripeDense.d.ts +1 -1
  53. package/dist/patterns/StripeDense.js +72 -65
  54. package/dist/patterns/StripeLoose.d.ts +1 -1
  55. package/dist/patterns/StripeLoose.js +204 -197
  56. package/dist/patterns/StripeRegular.d.ts +1 -1
  57. package/dist/patterns/StripeRegular.js +116 -109
  58. package/dist/props.d.ts +1 -1
  59. package/dist/svg/DiagonalBDense.svg +2 -2
  60. package/dist/svg/DiagonalBRegular.svg +2 -2
  61. package/dist/types.js +1 -0
  62. package/package.json +16 -17
  63. package/.svgo.yml +0 -11
  64. package/CHANGELOG.md +0 -286
  65. package/babel.config.js +0 -5
  66. package/emotion-plugin.js +0 -46
  67. package/icon-template.js +0 -28
  68. package/index-template.js +0 -10
  69. package/jest.config.js +0 -1
  70. package/svgr.config.js +0 -29
  71. package/tsconfig.json +0 -12
package/CHANGELOG.md DELETED
@@ -1,286 +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
- ## 1.0.0-alpha.aa37ee.0 (2021-10-26)
7
-
8
-
9
- ### ⚠ BREAKING CHANGES
10
-
11
- * add new gamut-patterns package
12
-
13
- ### Features
14
-
15
- * bump ESLint configs to latest ([4e3cf77](https://github.com/Codecademy/gamut/commit/4e3cf77928bdd69bce3eeca8a7f07439627b4f08))
16
- * **Patterns:** Add SVGR build process and SVGO settings ([e8433ce](https://github.com/Codecademy/gamut/commit/e8433ceace8b617fcaa45f13a11ce1367cff0e0b))
17
- * **props:** Support `color` and other HTML attributes as system props without type collision GM-247 ([ff93f0c](https://github.com/Codecademy/gamut/commit/ff93f0c9b7ca64ed9819586709f58436ca4502b9))
18
- * Migrate final gamut-system docs + functions to variance [WEB-1413] ([f966933](https://github.com/Codecademy/gamut/commit/f966933ac814d228072e781ee2a3d75a33190a85))
19
- * **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)
20
- * add new gamut-patterns package ([3b9785a](https://github.com/Codecademy/gamut/commit/3b9785a20e26767a9531b1f1ce8de5f504f2dd34))
21
-
22
-
23
-
24
- ### [0.6.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.6.1...@codecademy/gamut-patterns@0.6.2) (2021-09-30)
25
-
26
- **Note:** Version bump only for package @codecademy/gamut-patterns
27
-
28
-
29
-
30
-
31
-
32
- ### [0.6.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.6.0...@codecademy/gamut-patterns@0.6.1) (2021-09-13)
33
-
34
- **Note:** Version bump only for package @codecademy/gamut-patterns
35
-
36
-
37
-
38
-
39
-
40
- ## [0.6.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.8...@codecademy/gamut-patterns@0.6.0) (2021-09-10)
41
-
42
-
43
- ### Features
44
-
45
- * bump ESLint configs to latest ([e0a201a](https://github.com/Codecademy/gamut/commit/e0a201abcc5f49718538d3d91af21cb37db4470e))
46
-
47
-
48
-
49
- ### [0.5.8](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.7...@codecademy/gamut-patterns@0.5.8) (2021-08-30)
50
-
51
- **Note:** Version bump only for package @codecademy/gamut-patterns
52
-
53
-
54
-
55
-
56
-
57
- ### [0.5.7](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.6...@codecademy/gamut-patterns@0.5.7) (2021-08-16)
58
-
59
- **Note:** Version bump only for package @codecademy/gamut-patterns
60
-
61
-
62
-
63
-
64
-
65
- ### [0.5.6](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.5...@codecademy/gamut-patterns@0.5.6) (2021-08-16)
66
-
67
- **Note:** Version bump only for package @codecademy/gamut-patterns
68
-
69
-
70
-
71
-
72
-
73
- ### [0.5.5](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.4...@codecademy/gamut-patterns@0.5.5) (2021-08-13)
74
-
75
- **Note:** Version bump only for package @codecademy/gamut-patterns
76
-
77
-
78
-
79
-
80
-
81
- ### [0.5.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.3...@codecademy/gamut-patterns@0.5.4) (2021-08-12)
82
-
83
- **Note:** Version bump only for package @codecademy/gamut-patterns
84
-
85
-
86
-
87
-
88
-
89
- ### [0.5.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.2...@codecademy/gamut-patterns@0.5.3) (2021-08-05)
90
-
91
- **Note:** Version bump only for package @codecademy/gamut-patterns
92
-
93
-
94
-
95
-
96
-
97
- ### [0.5.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.1...@codecademy/gamut-patterns@0.5.2) (2021-08-03)
98
-
99
- **Note:** Version bump only for package @codecademy/gamut-patterns
100
-
101
-
102
-
103
-
104
-
105
- ### [0.5.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.5.0...@codecademy/gamut-patterns@0.5.1) (2021-07-29)
106
-
107
- **Note:** Version bump only for package @codecademy/gamut-patterns
108
-
109
-
110
-
111
-
112
-
113
- ## [0.5.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.7...@codecademy/gamut-patterns@0.5.0) (2021-07-27)
114
-
115
-
116
- ### Features
117
-
118
- * **Patterns:** Add SVGR build process and SVGO settings ([56e50ff](https://github.com/Codecademy/gamut/commit/56e50ffe021102b84a7f9e5d7bb33ea6de890994))
119
-
120
-
121
-
122
- ### [0.4.7](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.6...@codecademy/gamut-patterns@0.4.7) (2021-07-19)
123
-
124
- **Note:** Version bump only for package @codecademy/gamut-patterns
125
-
126
-
127
-
128
-
129
-
130
- ### [0.4.6](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.5...@codecademy/gamut-patterns@0.4.6) (2021-07-16)
131
-
132
- **Note:** Version bump only for package @codecademy/gamut-patterns
133
-
134
-
135
-
136
-
137
-
138
- ### [0.4.5](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.4...@codecademy/gamut-patterns@0.4.5) (2021-07-15)
139
-
140
- **Note:** Version bump only for package @codecademy/gamut-patterns
141
-
142
-
143
-
144
-
145
-
146
- ### [0.4.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.3...@codecademy/gamut-patterns@0.4.4) (2021-06-17)
147
-
148
- **Note:** Version bump only for package @codecademy/gamut-patterns
149
-
150
-
151
-
152
-
153
-
154
- ### [0.4.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.2...@codecademy/gamut-patterns@0.4.3) (2021-06-16)
155
-
156
- **Note:** Version bump only for package @codecademy/gamut-patterns
157
-
158
-
159
-
160
-
161
-
162
- ### [0.4.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.1...@codecademy/gamut-patterns@0.4.2) (2021-06-16)
163
-
164
- **Note:** Version bump only for package @codecademy/gamut-patterns
165
-
166
-
167
-
168
-
169
-
170
- ### [0.4.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.4.0...@codecademy/gamut-patterns@0.4.1) (2021-06-16)
171
-
172
- **Note:** Version bump only for package @codecademy/gamut-patterns
173
-
174
-
175
-
176
-
177
-
178
- ## [0.4.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.4...@codecademy/gamut-patterns@0.4.0) (2021-06-15)
179
-
180
-
181
- ### Features
182
-
183
- * **props:** Support `color` and other HTML attributes as system props without type collision GM-247 ([50a8b43](https://github.com/Codecademy/gamut/commit/50a8b43b27eff2d75307d317d724383156e5a3ed))
184
-
185
-
186
-
187
- ### [0.3.4](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.3...@codecademy/gamut-patterns@0.3.4) (2021-06-10)
188
-
189
- **Note:** Version bump only for package @codecademy/gamut-patterns
190
-
191
-
192
-
193
-
194
-
195
- ### [0.3.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.2...@codecademy/gamut-patterns@0.3.3) (2021-06-10)
196
-
197
- **Note:** Version bump only for package @codecademy/gamut-patterns
198
-
199
-
200
-
201
-
202
-
203
- ### [0.3.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.1...@codecademy/gamut-patterns@0.3.2) (2021-06-03)
204
-
205
- **Note:** Version bump only for package @codecademy/gamut-patterns
206
-
207
-
208
-
209
-
210
-
211
- ### [0.3.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.3.0...@codecademy/gamut-patterns@0.3.1) (2021-06-02)
212
-
213
- **Note:** Version bump only for package @codecademy/gamut-patterns
214
-
215
-
216
-
217
-
218
-
219
- ## [0.3.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.2...@codecademy/gamut-patterns@0.3.0) (2021-05-27)
220
-
221
-
222
- ### Features
223
-
224
- * Migrate final gamut-system docs + functions to variance [WEB-1413] ([67c8651](https://github.com/Codecademy/gamut/commit/67c8651dc4985dd656c8d488af4cf56ca21a813b))
225
-
226
-
227
-
228
- ### [0.2.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.1...@codecademy/gamut-patterns@0.2.2) (2021-05-25)
229
-
230
- **Note:** Version bump only for package @codecademy/gamut-patterns
231
-
232
-
233
-
234
-
235
-
236
- ### [0.2.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.2.0...@codecademy/gamut-patterns@0.2.1) (2021-05-24)
237
-
238
- **Note:** Version bump only for package @codecademy/gamut-patterns
239
-
240
-
241
-
242
-
243
-
244
- ## [0.2.0](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.3...@codecademy/gamut-patterns@0.2.0) (2021-05-18)
245
-
246
-
247
- ### Features
248
-
249
- * **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)
250
-
251
-
252
-
253
- ### [0.1.3](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.2...@codecademy/gamut-patterns@0.1.3) (2021-05-12)
254
-
255
- **Note:** Version bump only for package @codecademy/gamut-patterns
256
-
257
-
258
-
259
-
260
-
261
- ### [0.1.2](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.1...@codecademy/gamut-patterns@0.1.2) (2021-05-11)
262
-
263
- **Note:** Version bump only for package @codecademy/gamut-patterns
264
-
265
-
266
-
267
-
268
-
269
- ### [0.1.1](https://github.com/Codecademy/gamut/compare/@codecademy/gamut-patterns@0.1.0...@codecademy/gamut-patterns@0.1.1) (2021-05-07)
270
-
271
- **Note:** Version bump only for package @codecademy/gamut-patterns
272
-
273
-
274
-
275
-
276
-
277
- ## 0.1.0 (2021-05-06)
278
-
279
-
280
- ### ⚠ BREAKING CHANGES
281
-
282
- * add new gamut-patterns package
283
-
284
- ### Features
285
-
286
- * 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/icon-template.js DELETED
@@ -1,28 +0,0 @@
1
- const path = require('path');
2
- const { startCase } = require('lodash');
3
-
4
- function iconTemplate(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
- });
26
- `;
27
- }
28
- module.exports = iconTemplate;
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');
package/svgr.config.js DELETED
@@ -1,29 +0,0 @@
1
- const emotionPlugin = require('./emotion-plugin');
2
- const template = require('./icon-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
- }