@codecademy/gamut-patterns 0.8.11 → 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/props.d.ts +2 -2
- package/package.json +7 -4
- package/.svgo.yml +0 -11
- package/CHANGELOG.md +0 -412
- package/babel.config.js +0 -5
- package/dist/svg/CheckerDense.svg +0 -14
- package/dist/svg/CheckerLoose.svg +0 -14
- package/dist/svg/CheckerRegular.svg +0 -14
- package/dist/svg/DiagonalADense.svg +0 -20
- package/dist/svg/DiagonalALoose.svg +0 -44
- package/dist/svg/DiagonalARegular.svg +0 -28
- package/dist/svg/DiagonalBDense.svg +0 -24
- package/dist/svg/DiagonalBLoose.svg +0 -28
- package/dist/svg/DiagonalBRegular.svg +0 -28
- package/dist/svg/DotDense.svg +0 -13
- package/dist/svg/DotLoose.svg +0 -40
- package/dist/svg/DotRegular.svg +0 -13
- package/dist/svg/ExDense.svg +0 -17
- package/dist/svg/ExLoose.svg +0 -17
- package/dist/svg/ExRegular.svg +0 -17
- package/dist/svg/FlowerDense.svg +0 -16
- package/dist/svg/FlowerLoose.svg +0 -16
- package/dist/svg/FlowerRegular.svg +0 -16
- package/dist/svg/GridDense.svg +0 -16
- package/dist/svg/GridLoose.svg +0 -16
- package/dist/svg/GridRegular.svg +0 -16
- package/dist/svg/Herringbone.svg +0 -19
- package/dist/svg/RainDense.svg +0 -14
- package/dist/svg/RainLoose.svg +0 -14
- package/dist/svg/RainRegular.svg +0 -14
- package/dist/svg/StripeDense.svg +0 -20
- package/dist/svg/StripeLoose.svg +0 -44
- package/dist/svg/StripeRegular.svg +0 -28
- package/emotion-plugin.js +0 -46
- package/index-template.js +0 -10
- package/jest.config.js +0 -1
- package/pattern-template.js +0 -30
- package/project.json +0 -24
- package/svgr.config.js +0 -29
- package/tsconfig.json +0 -12
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalBLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect y="15" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="14" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="2" y="13" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" y="12" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="4" y="11" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="5" y="10" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="6" y="9" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="7" y="8" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="8" y="7" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="9" y="6" width="1" height="1" fill="currentColor" />
|
|
20
|
-
<rect x="10" y="5" width="1" height="1" fill="currentColor" />
|
|
21
|
-
<rect x="11" y="4" width="1" height="1" fill="currentColor" />
|
|
22
|
-
<rect x="12" y="3" width="1" height="1" fill="currentColor" />
|
|
23
|
-
<rect x="13" y="2" width="1" height="1" fill="currentColor" />
|
|
24
|
-
<rect x="14" y="1" width="1" height="1" fill="currentColor" />
|
|
25
|
-
<rect x="15" width="1" height="1" fill="currentColor" />
|
|
26
|
-
</pattern>
|
|
27
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalBLoose)" />
|
|
28
|
-
</svg>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalBRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<g clipPath="url(#clipDiagonalBRegular)">
|
|
11
|
-
<rect width="8" height="8" fill="transparent" />
|
|
12
|
-
<rect y="7" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="1" y="6" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="2" y="5" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="3" y="4" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="4" y="3" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="5" y="2" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="6" y="1" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="7" width="1" height="1" fill="currentColor" />
|
|
20
|
-
</g>
|
|
21
|
-
<defs>
|
|
22
|
-
<clipPath id="clipDiagonalBRegular">
|
|
23
|
-
<rect width="8" height="8" fill="transparent" />
|
|
24
|
-
</clipPath>
|
|
25
|
-
</defs>
|
|
26
|
-
</pattern>
|
|
27
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalBRegular)" />
|
|
28
|
-
</svg>
|
package/dist/svg/DotDense.svg
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="dotDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<circle cx="0.5" cy="0.5" r="0.5" fill="currentColor" />
|
|
11
|
-
</pattern>
|
|
12
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#dotDense)" />
|
|
13
|
-
</svg>
|
package/dist/svg/DotLoose.svg
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="dotLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="0.5" height="0.5" fill="currentColor" fillOpacity="0.5" />
|
|
11
|
-
<rect
|
|
12
|
-
y="1"
|
|
13
|
-
width="0.5"
|
|
14
|
-
height="0.5"
|
|
15
|
-
fill="currentColor"
|
|
16
|
-
fillOpacity="0.5"
|
|
17
|
-
/>
|
|
18
|
-
<rect y="0.5" width="0.5" height="0.5" fill="currentColor" />
|
|
19
|
-
<rect
|
|
20
|
-
x="1"
|
|
21
|
-
width="0.5"
|
|
22
|
-
height="0.5"
|
|
23
|
-
fill="currentColor"
|
|
24
|
-
fillOpacity="0.5"
|
|
25
|
-
/>
|
|
26
|
-
<rect
|
|
27
|
-
x="1"
|
|
28
|
-
y="1"
|
|
29
|
-
width="0.5"
|
|
30
|
-
height="0.5"
|
|
31
|
-
fill="currentColor"
|
|
32
|
-
fillOpacity="0.5"
|
|
33
|
-
/>
|
|
34
|
-
<rect x="1" y="0.5" width="0.5" height="0.5" fill="currentColor" />
|
|
35
|
-
<rect x="0.5" width="0.5" height="0.5" fill="currentColor" />
|
|
36
|
-
<rect x="0.5" y="1" width="0.5" height="0.5" fill="currentColor" />
|
|
37
|
-
<rect x="0.5" y="0.5" width="0.5" height="0.5" fill="currentColor" />
|
|
38
|
-
</pattern>
|
|
39
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#dotLoose)" />
|
|
40
|
-
</svg>
|
package/dist/svg/DotRegular.svg
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="dotRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<circle cx="0.5" cy="0.5" r="0.5" fill="currentColor" />
|
|
11
|
-
</pattern>
|
|
12
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#dotRegular)" />
|
|
13
|
-
</svg>
|
package/dist/svg/ExDense.svg
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="exDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="3" y="2" width="1" height="1" fill="currentColor" />
|
|
15
|
-
</pattern>
|
|
16
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#exDense)" />
|
|
17
|
-
</svg>
|
package/dist/svg/ExLoose.svg
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="exLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="15" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="15" y="2" width="1" height="1" fill="currentColor" />
|
|
15
|
-
</pattern>
|
|
16
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#exLoose)" />
|
|
17
|
-
</svg>
|
package/dist/svg/ExRegular.svg
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="exRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="7" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="7" y="2" width="1" height="1" fill="currentColor" />
|
|
15
|
-
</pattern>
|
|
16
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#exRegular)" />
|
|
17
|
-
</svg>
|
package/dist/svg/FlowerDense.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="flowerDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" y="1" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#flowerDense)" />
|
|
16
|
-
</svg>
|
package/dist/svg/FlowerLoose.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="flowerLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="15" y="1" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#flowerLoose)" />
|
|
16
|
-
</svg>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="flowerRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="7" y="1" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#flowerRegular)" />
|
|
16
|
-
</svg>
|
package/dist/svg/GridDense.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="gridDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="2" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="2" y="2" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#gridDense)" />
|
|
16
|
-
</svg>
|
package/dist/svg/GridLoose.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="gridLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="8" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="8" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="8" y="8" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#gridLoose)" />
|
|
16
|
-
</svg>
|
package/dist/svg/GridRegular.svg
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="gridRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect y="4" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="4" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="4" y="4" width="1" height="1" fill="currentColor" />
|
|
14
|
-
</pattern>
|
|
15
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#gridRegular)" />
|
|
16
|
-
</svg>
|
package/dist/svg/Herringbone.svg
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="herringbone"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect y="1" width="1" height="1" fill="herringbone" />
|
|
11
|
-
<rect x="1" y="2" width="1" height="1" fill="herringbone" />
|
|
12
|
-
<rect x="3" width="1" height="1" fill="herringbone" />
|
|
13
|
-
<rect x="2" width="1" height="1" fill="herringbone" />
|
|
14
|
-
<rect x="3" y="1" width="1" height="1" fill="herringbone" />
|
|
15
|
-
<rect x="3" y="3" width="1" height="1" fill="herringbone" />
|
|
16
|
-
<rect y="3" width="1" height="1" fill="herringbone" />
|
|
17
|
-
</pattern>
|
|
18
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#herringbone)" />
|
|
19
|
-
</svg>
|
package/dist/svg/RainDense.svg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="rainDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#rainDense)" />
|
|
14
|
-
</svg>
|
package/dist/svg/RainLoose.svg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="rainLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#rainLoose)" />
|
|
14
|
-
</svg>
|
package/dist/svg/RainRegular.svg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="rainRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect x="1" y="1" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#rainRegular)" />
|
|
14
|
-
</svg>
|
package/dist/svg/StripeDense.svg
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="stripeDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect y="2" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="2" y="2" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="3" y="2" width="1" height="1" fill="currentColor" />
|
|
18
|
-
</pattern>
|
|
19
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#stripeDense)" />
|
|
20
|
-
</svg>
|
package/dist/svg/StripeLoose.svg
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="stripeLoose"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="16"
|
|
7
|
-
height="16"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="1" y="8" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect y="8" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="2" y="8" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="3" y="8" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="5" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="4" width="1" height="1" fill="currentColor" />
|
|
20
|
-
<rect x="6" width="1" height="1" fill="currentColor" />
|
|
21
|
-
<rect x="7" width="1" height="1" fill="currentColor" />
|
|
22
|
-
<rect x="5" y="8" width="1" height="1" fill="currentColor" />
|
|
23
|
-
<rect x="4" y="8" width="1" height="1" fill="currentColor" />
|
|
24
|
-
<rect x="6" y="8" width="1" height="1" fill="currentColor" />
|
|
25
|
-
<rect x="7" y="8" width="1" height="1" fill="currentColor" />
|
|
26
|
-
<rect x="9" width="1" height="1" fill="currentColor" />
|
|
27
|
-
<rect x="8" width="1" height="1" fill="currentColor" />
|
|
28
|
-
<rect x="10" width="1" height="1" fill="currentColor" />
|
|
29
|
-
<rect x="11" width="1" height="1" fill="currentColor" />
|
|
30
|
-
<rect x="9" y="8" width="1" height="1" fill="currentColor" />
|
|
31
|
-
<rect x="8" y="8" width="1" height="1" fill="currentColor" />
|
|
32
|
-
<rect x="10" y="8" width="1" height="1" fill="currentColor" />
|
|
33
|
-
<rect x="11" y="8" width="1" height="1" fill="currentColor" />
|
|
34
|
-
<rect x="13" width="1" height="1" fill="currentColor" />
|
|
35
|
-
<rect x="12" width="1" height="1" fill="currentColor" />
|
|
36
|
-
<rect x="14" width="1" height="1" fill="currentColor" />
|
|
37
|
-
<rect x="15" width="1" height="1" fill="currentColor" />
|
|
38
|
-
<rect x="13" y="8" width="1" height="1" fill="currentColor" />
|
|
39
|
-
<rect x="12" y="8" width="1" height="1" fill="currentColor" />
|
|
40
|
-
<rect x="14" y="8" width="1" height="1" fill="currentColor" />
|
|
41
|
-
<rect x="15" y="8" width="1" height="1" fill="currentColor" />
|
|
42
|
-
</pattern>
|
|
43
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#stripeLoose)" />
|
|
44
|
-
</svg>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="stripeRegular"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="8"
|
|
7
|
-
height="8"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<rect x="1" width="1" height="1" fill="currentColor" />
|
|
11
|
-
<rect width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="1" y="4" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect y="4" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="2" y="4" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="3" y="4" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="5" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="4" width="1" height="1" fill="currentColor" />
|
|
20
|
-
<rect x="6" width="1" height="1" fill="currentColor" />
|
|
21
|
-
<rect x="7" width="1" height="1" fill="currentColor" />
|
|
22
|
-
<rect x="5" y="4" width="1" height="1" fill="currentColor" />
|
|
23
|
-
<rect x="4" y="4" width="1" height="1" fill="currentColor" />
|
|
24
|
-
<rect x="6" y="4" width="1" height="1" fill="currentColor" />
|
|
25
|
-
<rect x="7" y="4" width="1" height="1" fill="currentColor" />
|
|
26
|
-
</pattern>
|
|
27
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#stripeRegular)" />
|
|
28
|
-
</svg>
|
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');
|
package/pattern-template.js
DELETED
|
@@ -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
|
-
};
|