@codecademy/gamut-patterns 0.8.11 → 0.8.12-alpha.4d61d4.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/CHANGELOG.md +8 -0
- package/babel.config.js +10 -3
- package/dist/patterns/CheckerDense.js +60 -30
- package/dist/patterns/CheckerLoose.js +60 -30
- package/dist/patterns/CheckerRegular.js +60 -30
- package/dist/patterns/DiagonalADense.js +118 -64
- package/dist/patterns/DiagonalALoose.js +358 -208
- package/dist/patterns/DiagonalARegular.js +198 -112
- package/dist/patterns/DiagonalBDense.js +88 -46
- package/dist/patterns/DiagonalBLoose.js +200 -114
- package/dist/patterns/DiagonalBRegular.js +128 -70
- package/dist/patterns/DotDense.js +51 -25
- package/dist/patterns/DotLoose.js +126 -68
- package/dist/patterns/DotRegular.js +51 -25
- package/dist/patterns/ExDense.js +89 -47
- package/dist/patterns/ExLoose.js +89 -47
- package/dist/patterns/ExRegular.js +89 -47
- package/dist/patterns/FlowerDense.js +79 -41
- package/dist/patterns/FlowerLoose.js +79 -41
- package/dist/patterns/FlowerRegular.js +79 -41
- package/dist/patterns/GridDense.js +78 -40
- package/dist/patterns/GridLoose.js +78 -40
- package/dist/patterns/GridRegular.js +78 -40
- package/dist/patterns/Herringbone.js +108 -58
- package/dist/patterns/RainDense.js +60 -30
- package/dist/patterns/RainLoose.js +60 -30
- package/dist/patterns/RainRegular.js +60 -30
- package/dist/patterns/StripeDense.js +116 -62
- package/dist/patterns/StripeLoose.js +344 -194
- package/dist/patterns/StripeRegular.js +192 -106
- package/dist/props.d.ts +5 -5
- package/dist/types.js +1 -0
- package/dist/usePatternId.js +2 -2
- package/package.json +4 -4
- package/project.json +10 -1
- package/tsconfig.json +5 -2
- 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/jest.config.js +0 -1
|
@@ -1,123 +1,209 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutPropertiesLoose from "/home/circleci/repo/node_modules/@nrwl/web/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js";
|
|
2
|
+
var _excluded = ["title", "titleId"];
|
|
2
3
|
|
|
3
|
-
|
|
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; }
|
|
4
|
+
var _jsxFileName = "/home/circleci/repo/packages/gamut-patterns/src/patterns/StripeRegular.tsx",
|
|
5
|
+
_this = this;
|
|
6
6
|
|
|
7
|
+
import "core-js/modules/es.object.assign.js";
|
|
7
8
|
import * as React from 'react';
|
|
8
9
|
import { Svg } from '../props';
|
|
9
10
|
import { usePatternId } from '../usePatternId';
|
|
11
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
10
12
|
export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
|
|
11
13
|
var _ref$title = _ref.title,
|
|
12
14
|
title = _ref$title === void 0 ? 'Stripe Regular' : _ref$title,
|
|
13
15
|
titleId = _ref.titleId,
|
|
14
|
-
props =
|
|
16
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
var patternId = usePatternId('StripeRegular');
|
|
17
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/_jsxDEV(Svg, Object.assign({
|
|
18
20
|
fill: "currentColor",
|
|
19
21
|
role: "img",
|
|
20
22
|
"aria-hidden": "true",
|
|
21
23
|
ref: svgRef,
|
|
22
24
|
"aria-labelledby": titleId
|
|
23
|
-
}, props
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
25
|
+
}, props, {
|
|
26
|
+
children: [title ? /*#__PURE__*/_jsxDEV("title", {
|
|
27
|
+
id: titleId,
|
|
28
|
+
children: title
|
|
29
|
+
}, void 0, false, {
|
|
30
|
+
fileName: _jsxFileName,
|
|
31
|
+
lineNumber: 16,
|
|
32
|
+
columnNumber: 18
|
|
33
|
+
}, _this) : null, /*#__PURE__*/_jsxDEV("pattern", {
|
|
34
|
+
id: patternId,
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0,
|
|
37
|
+
width: 8,
|
|
38
|
+
height: 8,
|
|
39
|
+
patternUnits: "userSpaceOnUse",
|
|
40
|
+
children: [/*#__PURE__*/_jsxDEV("rect", {
|
|
41
|
+
x: 1,
|
|
42
|
+
width: 1,
|
|
43
|
+
height: 1,
|
|
44
|
+
fill: "currentColor"
|
|
45
|
+
}, void 0, false, {
|
|
46
|
+
fileName: _jsxFileName,
|
|
47
|
+
lineNumber: 25,
|
|
48
|
+
columnNumber: 11
|
|
49
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
50
|
+
width: 1,
|
|
51
|
+
height: 1,
|
|
52
|
+
fill: "currentColor"
|
|
53
|
+
}, void 0, false, {
|
|
54
|
+
fileName: _jsxFileName,
|
|
55
|
+
lineNumber: 26,
|
|
56
|
+
columnNumber: 11
|
|
57
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
58
|
+
x: 2,
|
|
59
|
+
width: 1,
|
|
60
|
+
height: 1,
|
|
61
|
+
fill: "currentColor"
|
|
62
|
+
}, void 0, false, {
|
|
63
|
+
fileName: _jsxFileName,
|
|
64
|
+
lineNumber: 27,
|
|
65
|
+
columnNumber: 11
|
|
66
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
67
|
+
x: 3,
|
|
68
|
+
width: 1,
|
|
69
|
+
height: 1,
|
|
70
|
+
fill: "currentColor"
|
|
71
|
+
}, void 0, false, {
|
|
72
|
+
fileName: _jsxFileName,
|
|
73
|
+
lineNumber: 28,
|
|
74
|
+
columnNumber: 11
|
|
75
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
76
|
+
x: 1,
|
|
77
|
+
y: 4,
|
|
78
|
+
width: 1,
|
|
79
|
+
height: 1,
|
|
80
|
+
fill: "currentColor"
|
|
81
|
+
}, void 0, false, {
|
|
82
|
+
fileName: _jsxFileName,
|
|
83
|
+
lineNumber: 29,
|
|
84
|
+
columnNumber: 11
|
|
85
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
86
|
+
y: 4,
|
|
87
|
+
width: 1,
|
|
88
|
+
height: 1,
|
|
89
|
+
fill: "currentColor"
|
|
90
|
+
}, void 0, false, {
|
|
91
|
+
fileName: _jsxFileName,
|
|
92
|
+
lineNumber: 30,
|
|
93
|
+
columnNumber: 11
|
|
94
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
95
|
+
x: 2,
|
|
96
|
+
y: 4,
|
|
97
|
+
width: 1,
|
|
98
|
+
height: 1,
|
|
99
|
+
fill: "currentColor"
|
|
100
|
+
}, void 0, false, {
|
|
101
|
+
fileName: _jsxFileName,
|
|
102
|
+
lineNumber: 31,
|
|
103
|
+
columnNumber: 11
|
|
104
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
105
|
+
x: 3,
|
|
106
|
+
y: 4,
|
|
107
|
+
width: 1,
|
|
108
|
+
height: 1,
|
|
109
|
+
fill: "currentColor"
|
|
110
|
+
}, void 0, false, {
|
|
111
|
+
fileName: _jsxFileName,
|
|
112
|
+
lineNumber: 32,
|
|
113
|
+
columnNumber: 11
|
|
114
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
115
|
+
x: 5,
|
|
116
|
+
width: 1,
|
|
117
|
+
height: 1,
|
|
118
|
+
fill: "currentColor"
|
|
119
|
+
}, void 0, false, {
|
|
120
|
+
fileName: _jsxFileName,
|
|
121
|
+
lineNumber: 33,
|
|
122
|
+
columnNumber: 11
|
|
123
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
124
|
+
x: 4,
|
|
125
|
+
width: 1,
|
|
126
|
+
height: 1,
|
|
127
|
+
fill: "currentColor"
|
|
128
|
+
}, void 0, false, {
|
|
129
|
+
fileName: _jsxFileName,
|
|
130
|
+
lineNumber: 34,
|
|
131
|
+
columnNumber: 11
|
|
132
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
133
|
+
x: 6,
|
|
134
|
+
width: 1,
|
|
135
|
+
height: 1,
|
|
136
|
+
fill: "currentColor"
|
|
137
|
+
}, void 0, false, {
|
|
138
|
+
fileName: _jsxFileName,
|
|
139
|
+
lineNumber: 35,
|
|
140
|
+
columnNumber: 11
|
|
141
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
142
|
+
x: 7,
|
|
143
|
+
width: 1,
|
|
144
|
+
height: 1,
|
|
145
|
+
fill: "currentColor"
|
|
146
|
+
}, void 0, false, {
|
|
147
|
+
fileName: _jsxFileName,
|
|
148
|
+
lineNumber: 36,
|
|
149
|
+
columnNumber: 11
|
|
150
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
151
|
+
x: 5,
|
|
152
|
+
y: 4,
|
|
153
|
+
width: 1,
|
|
154
|
+
height: 1,
|
|
155
|
+
fill: "currentColor"
|
|
156
|
+
}, void 0, false, {
|
|
157
|
+
fileName: _jsxFileName,
|
|
158
|
+
lineNumber: 37,
|
|
159
|
+
columnNumber: 11
|
|
160
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
161
|
+
x: 4,
|
|
162
|
+
y: 4,
|
|
163
|
+
width: 1,
|
|
164
|
+
height: 1,
|
|
165
|
+
fill: "currentColor"
|
|
166
|
+
}, void 0, false, {
|
|
167
|
+
fileName: _jsxFileName,
|
|
168
|
+
lineNumber: 38,
|
|
169
|
+
columnNumber: 11
|
|
170
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
171
|
+
x: 6,
|
|
172
|
+
y: 4,
|
|
173
|
+
width: 1,
|
|
174
|
+
height: 1,
|
|
175
|
+
fill: "currentColor"
|
|
176
|
+
}, void 0, false, {
|
|
177
|
+
fileName: _jsxFileName,
|
|
178
|
+
lineNumber: 39,
|
|
179
|
+
columnNumber: 11
|
|
180
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
181
|
+
x: 7,
|
|
182
|
+
y: 4,
|
|
183
|
+
width: 1,
|
|
184
|
+
height: 1,
|
|
185
|
+
fill: "currentColor"
|
|
186
|
+
}, void 0, false, {
|
|
187
|
+
fileName: _jsxFileName,
|
|
188
|
+
lineNumber: 40,
|
|
189
|
+
columnNumber: 11
|
|
190
|
+
}, _this)]
|
|
191
|
+
}, void 0, true, {
|
|
192
|
+
fileName: _jsxFileName,
|
|
193
|
+
lineNumber: 17,
|
|
194
|
+
columnNumber: 9
|
|
195
|
+
}, _this), /*#__PURE__*/_jsxDEV("rect", {
|
|
196
|
+
width: "100%",
|
|
197
|
+
height: "100%",
|
|
198
|
+
fill: "url(#" + patternId + ")"
|
|
199
|
+
}, void 0, false, {
|
|
200
|
+
fileName: _jsxFileName,
|
|
201
|
+
lineNumber: 42,
|
|
202
|
+
columnNumber: 9
|
|
203
|
+
}, _this)]
|
|
204
|
+
}), void 0, true, {
|
|
205
|
+
fileName: _jsxFileName,
|
|
206
|
+
lineNumber: 8,
|
|
207
|
+
columnNumber: 7
|
|
208
|
+
}, _this);
|
|
123
209
|
});
|
package/dist/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StyleProps } from '@codecademy/variance';
|
|
3
|
-
declare const patternStyles: import("
|
|
3
|
+
declare const patternStyles: import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").Compose<[import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
|
|
4
4
|
readonly flexBasis: {
|
|
5
5
|
readonly property: "flexBasis";
|
|
6
6
|
};
|
|
@@ -84,7 +84,7 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
84
84
|
readonly verticalAlign: {
|
|
85
85
|
readonly property: "verticalAlign";
|
|
86
86
|
};
|
|
87
|
-
}>>, import("
|
|
87
|
+
}>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
|
|
88
88
|
readonly position: {
|
|
89
89
|
readonly property: "position";
|
|
90
90
|
};
|
|
@@ -115,7 +115,7 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
115
115
|
readonly opacity: {
|
|
116
116
|
readonly property: "opacity";
|
|
117
117
|
};
|
|
118
|
-
}>>, import("
|
|
118
|
+
}>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
|
|
119
119
|
readonly p: {
|
|
120
120
|
readonly property: "padding";
|
|
121
121
|
readonly scale: "spacing";
|
|
@@ -187,7 +187,7 @@ export interface PatternProps extends Omit<React.SVGProps<SVGSVGElement>, keyof
|
|
|
187
187
|
ref?: React.Ref<SVGSVGElement>;
|
|
188
188
|
}
|
|
189
189
|
export declare const Svg: import("@emotion/styled").StyledComponent<{
|
|
190
|
-
theme?: import("@emotion/react").Theme
|
|
191
|
-
as?: import("react").ElementType<any
|
|
190
|
+
theme?: import("@emotion/react").Theme;
|
|
191
|
+
as?: import("react").ElementType<any>;
|
|
192
192
|
} & PatternProps, Pick<import("react").SVGProps<SVGSVGElement>, "string" | "scale" | "filter" | "fill" | "values" | "spacing" | "clipPath" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "paintOrder" | "pointerEvents" | "rotate" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "mask" | "offset" | "min" | "max" | "end" | "clip" | "className" | "id" | "lang" | "media" | "method" | "name" | "style" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "path" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "shapeRendering" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "ref" | "key">, {}>;
|
|
193
193
|
export {};
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/usePatternId.js
CHANGED
|
@@ -3,8 +3,8 @@ var counter = {};
|
|
|
3
3
|
export function usePatternId(id) {
|
|
4
4
|
return useMemo(function () {
|
|
5
5
|
var key = id.toLowerCase();
|
|
6
|
-
var idCounter = (counter
|
|
6
|
+
var idCounter = (counter == null ? void 0 : counter[key]) || 0;
|
|
7
7
|
counter[key] = idCounter;
|
|
8
|
-
return
|
|
8
|
+
return id + "-pattern-" + (counter[key] += 1);
|
|
9
9
|
}, [id]);
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/Codecademy/gamut/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/gamut-styles": "
|
|
8
|
-
"@codecademy/variance": "
|
|
7
|
+
"@codecademy/gamut-styles": "14.0.3-alpha.4d61d4.0",
|
|
8
|
+
"@codecademy/variance": "0.20.3-alpha.4d61d4.0",
|
|
9
9
|
"classnames": "^2.2.5"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"build": "nx build @codecademy/gamut-patterns"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
|
-
"version": "0.8.
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"version": "0.8.12-alpha.4d61d4.0",
|
|
42
|
+
"gitHead": "6060cbb9e9243cdf361242feb2ca71f5212f6470"
|
|
43
43
|
}
|
package/project.json
CHANGED
|
@@ -13,11 +13,20 @@
|
|
|
13
13
|
"rm -rf ./dist",
|
|
14
14
|
"rm -rf ./src/patterns",
|
|
15
15
|
"svgr --out-dir ./src/patterns --ext 'tsx' ./src/svg",
|
|
16
|
-
"babel ./src --out-dir ./dist --
|
|
16
|
+
"babel ./src --out-dir ./dist --extensions \".ts,.tsx\"",
|
|
17
17
|
"tsc --emitDeclarationOnly"
|
|
18
18
|
],
|
|
19
19
|
"parallel": false
|
|
20
20
|
}
|
|
21
|
+
},
|
|
22
|
+
"test": {
|
|
23
|
+
"executor": "@nrwl/jest:jest",
|
|
24
|
+
"outputs": ["coverage/packages/gamut-patterns"],
|
|
25
|
+
"dependsOn": ["build"],
|
|
26
|
+
"options": {
|
|
27
|
+
"jestConfig": "packages/gamut-patterns/jest.config.ts",
|
|
28
|
+
"passWithNoTests": true
|
|
29
|
+
}
|
|
21
30
|
}
|
|
22
31
|
},
|
|
23
32
|
"tags": []
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
3
|
"include": [
|
|
4
4
|
"../../typings/*.d.ts",
|
|
5
5
|
"./src/**/*.ts",
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
"../gamut-styles/dist/typings/theme.d.ts"
|
|
8
8
|
],
|
|
9
9
|
"compilerOptions": {
|
|
10
|
-
"
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"outDir": "./dist",
|
|
13
|
+
"rootDir": "./src"
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="checkerDense"
|
|
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="2" y="2" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#checkerDense)" />
|
|
14
|
-
</svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="checkerLoose"
|
|
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="8" y="8" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#checkerLoose)" />
|
|
14
|
-
</svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="checkerRegular"
|
|
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="4" y="4" width="1" height="1" fill="currentColor" />
|
|
12
|
-
</pattern>
|
|
13
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#checkerRegular)" />
|
|
14
|
-
</svg>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalADense"
|
|
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="2" y="2" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="1" y="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect y="3" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="3" y="1" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="2" y="1" width="1" height="1" fill="currentColor" />
|
|
18
|
-
</pattern>
|
|
19
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalADense)" />
|
|
20
|
-
</svg>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalALoose"
|
|
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="14" y="2" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="13" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="13" y="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="12" y="3" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="15" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="15" y="1" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="14" y="1" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="11" y="5" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="10" y="5" width="1" height="1" fill="currentColor" />
|
|
20
|
-
<rect x="10" y="6" width="1" height="1" fill="currentColor" />
|
|
21
|
-
<rect x="9" y="6" width="1" height="1" fill="currentColor" />
|
|
22
|
-
<rect x="8" y="7" width="1" height="1" fill="currentColor" />
|
|
23
|
-
<rect x="9" y="7" width="1" height="1" fill="currentColor" />
|
|
24
|
-
<rect x="12" y="4" width="1" height="1" fill="currentColor" />
|
|
25
|
-
<rect x="11" y="4" width="1" height="1" fill="currentColor" />
|
|
26
|
-
<rect x="7" y="9" width="1" height="1" fill="currentColor" />
|
|
27
|
-
<rect x="6" y="9" width="1" height="1" fill="currentColor" />
|
|
28
|
-
<rect x="6" y="10" width="1" height="1" fill="currentColor" />
|
|
29
|
-
<rect x="5" y="10" width="1" height="1" fill="currentColor" />
|
|
30
|
-
<rect x="8" y="8" width="1" height="1" fill="currentColor" />
|
|
31
|
-
<rect x="7" y="8" width="1" height="1" fill="currentColor" />
|
|
32
|
-
<rect x="4" y="12" width="1" height="1" fill="currentColor" />
|
|
33
|
-
<rect x="3" y="12" width="1" height="1" fill="currentColor" />
|
|
34
|
-
<rect x="3" y="13" width="1" height="1" fill="currentColor" />
|
|
35
|
-
<rect x="2" y="13" width="1" height="1" fill="currentColor" />
|
|
36
|
-
<rect x="1" y="14" width="1" height="1" fill="currentColor" />
|
|
37
|
-
<rect x="2" y="14" width="1" height="1" fill="currentColor" />
|
|
38
|
-
<rect y="15" width="1" height="1" fill="currentColor" />
|
|
39
|
-
<rect x="1" y="15" width="1" height="1" fill="currentColor" />
|
|
40
|
-
<rect x="5" y="11" width="1" height="1" fill="currentColor" />
|
|
41
|
-
<rect x="4" y="11" width="1" height="1" fill="currentColor" />
|
|
42
|
-
</pattern>
|
|
43
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalALoose)" />
|
|
44
|
-
</svg>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalARegular"
|
|
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="6" y="2" width="1" height="1" fill="currentColor" />
|
|
12
|
-
<rect x="5" y="2" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="5" y="3" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="4" y="3" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="7" width="1" height="1" fill="currentColor" />
|
|
16
|
-
<rect x="7" y="1" width="1" height="1" fill="currentColor" />
|
|
17
|
-
<rect x="6" y="1" width="1" height="1" fill="currentColor" />
|
|
18
|
-
<rect x="3" y="5" width="1" height="1" fill="currentColor" />
|
|
19
|
-
<rect x="2" y="5" width="1" height="1" fill="currentColor" />
|
|
20
|
-
<rect x="2" y="6" width="1" height="1" fill="currentColor" />
|
|
21
|
-
<rect x="1" y="6" width="1" height="1" fill="currentColor" />
|
|
22
|
-
<rect y="7" width="1" height="1" fill="currentColor" />
|
|
23
|
-
<rect x="1" y="7" width="1" height="1" fill="currentColor" />
|
|
24
|
-
<rect x="4" y="4" width="1" height="1" fill="currentColor" />
|
|
25
|
-
<rect x="3" y="4" width="1" height="1" fill="currentColor" />
|
|
26
|
-
</pattern>
|
|
27
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalARegular)" />
|
|
28
|
-
</svg>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<svg>
|
|
2
|
-
<pattern
|
|
3
|
-
id="diagonalBDense"
|
|
4
|
-
x="0"
|
|
5
|
-
y="0"
|
|
6
|
-
width="4"
|
|
7
|
-
height="4"
|
|
8
|
-
patternUnits="userSpaceOnUse"
|
|
9
|
-
>
|
|
10
|
-
<g clipPath="url(#clipDiagonalBDense)">
|
|
11
|
-
<rect width="4" height="4" fill="transparent" />
|
|
12
|
-
<rect y="3" width="1" height="1" fill="currentColor" />
|
|
13
|
-
<rect x="1" y="2" width="1" height="1" fill="currentColor" />
|
|
14
|
-
<rect x="2" y="1" width="1" height="1" fill="currentColor" />
|
|
15
|
-
<rect x="3" width="1" height="1" fill="currentColor" />
|
|
16
|
-
</g>
|
|
17
|
-
<defs>
|
|
18
|
-
<clipPath id="clipDiagonalBDense">
|
|
19
|
-
<rect width="4" height="4" fill="transparent" />
|
|
20
|
-
</clipPath>
|
|
21
|
-
</defs>
|
|
22
|
-
</pattern>
|
|
23
|
-
<rect x="0" y="0" width="100%" height="100%" fill="url(#diagonalBDense)" />
|
|
24
|
-
</svg>
|