@codecademy/gamut-patterns 1.0.0-alpha.f6cb5a.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/patterns/CheckerDense.js +37 -39
- package/dist/patterns/CheckerLoose.js +37 -39
- package/dist/patterns/CheckerRegular.js +37 -39
- package/dist/patterns/DiagonalADense.js +71 -73
- package/dist/patterns/DiagonalALoose.js +215 -217
- package/dist/patterns/DiagonalARegular.js +119 -121
- package/dist/patterns/DiagonalBDense.js +53 -55
- package/dist/patterns/DiagonalBLoose.js +121 -123
- package/dist/patterns/DiagonalBRegular.js +77 -79
- package/dist/patterns/DotDense.js +32 -34
- package/dist/patterns/DotLoose.js +75 -77
- package/dist/patterns/DotRegular.js +32 -34
- package/dist/patterns/ExDense.js +54 -56
- package/dist/patterns/ExLoose.js +54 -56
- package/dist/patterns/ExRegular.js +54 -56
- package/dist/patterns/FlowerDense.js +48 -50
- package/dist/patterns/FlowerLoose.js +48 -50
- package/dist/patterns/FlowerRegular.js +48 -50
- package/dist/patterns/GridDense.js +47 -49
- package/dist/patterns/GridLoose.js +47 -49
- package/dist/patterns/GridRegular.js +47 -49
- package/dist/patterns/Herringbone.js +65 -67
- package/dist/patterns/RainDense.js +37 -39
- package/dist/patterns/RainLoose.js +37 -39
- package/dist/patterns/RainRegular.js +37 -39
- package/dist/patterns/StripeDense.js +69 -71
- package/dist/patterns/StripeLoose.js +201 -203
- package/dist/patterns/StripeRegular.js +113 -115
- package/dist/props.d.ts +141 -32
- package/dist/props.js +14 -6
- package/dist/types.js +1 -0
- package/dist/usePatternId.js +5 -8
- package/package.json +17 -30
- package/.svgo.yml +0 -11
- package/CHANGELOG.md +0 -329
- package/LICENSE +0 -21
- package/babel.config.js +0 -5
- 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/svgr.config.js +0 -29
- package/tsconfig.json +0 -12
|
@@ -1,123 +1,121 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
|
|
5
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
1
|
import * as React from 'react';
|
|
8
2
|
import { Svg } from '../props';
|
|
9
3
|
import { usePatternId } from '../usePatternId';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return /*#__PURE__*/
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export const StripeRegular = /*#__PURE__*/React.forwardRef(({
|
|
6
|
+
title = 'Stripe Regular',
|
|
7
|
+
titleId,
|
|
8
|
+
...props
|
|
9
|
+
}, svgRef) => {
|
|
10
|
+
const patternId = usePatternId('StripeRegular');
|
|
11
|
+
return /*#__PURE__*/_jsxs(Svg, {
|
|
18
12
|
fill: "currentColor",
|
|
19
13
|
role: "img",
|
|
20
14
|
"aria-hidden": "true",
|
|
21
15
|
ref: svgRef,
|
|
22
|
-
"aria-labelledby": titleId
|
|
23
|
-
|
|
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
|
-
|
|
16
|
+
"aria-labelledby": titleId,
|
|
17
|
+
...props,
|
|
18
|
+
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
19
|
+
id: titleId,
|
|
20
|
+
children: title
|
|
21
|
+
}) : null, /*#__PURE__*/_jsxs("pattern", {
|
|
22
|
+
id: patternId,
|
|
23
|
+
x: 0,
|
|
24
|
+
y: 0,
|
|
25
|
+
width: 8,
|
|
26
|
+
height: 8,
|
|
27
|
+
patternUnits: "userSpaceOnUse",
|
|
28
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
29
|
+
x: 1,
|
|
30
|
+
width: 1,
|
|
31
|
+
height: 1,
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
34
|
+
width: 1,
|
|
35
|
+
height: 1,
|
|
36
|
+
fill: "currentColor"
|
|
37
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
38
|
+
x: 2,
|
|
39
|
+
width: 1,
|
|
40
|
+
height: 1,
|
|
41
|
+
fill: "currentColor"
|
|
42
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
43
|
+
x: 3,
|
|
44
|
+
width: 1,
|
|
45
|
+
height: 1,
|
|
46
|
+
fill: "currentColor"
|
|
47
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
48
|
+
x: 1,
|
|
49
|
+
y: 4,
|
|
50
|
+
width: 1,
|
|
51
|
+
height: 1,
|
|
52
|
+
fill: "currentColor"
|
|
53
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
54
|
+
y: 4,
|
|
55
|
+
width: 1,
|
|
56
|
+
height: 1,
|
|
57
|
+
fill: "currentColor"
|
|
58
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
59
|
+
x: 2,
|
|
60
|
+
y: 4,
|
|
61
|
+
width: 1,
|
|
62
|
+
height: 1,
|
|
63
|
+
fill: "currentColor"
|
|
64
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
65
|
+
x: 3,
|
|
66
|
+
y: 4,
|
|
67
|
+
width: 1,
|
|
68
|
+
height: 1,
|
|
69
|
+
fill: "currentColor"
|
|
70
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
71
|
+
x: 5,
|
|
72
|
+
width: 1,
|
|
73
|
+
height: 1,
|
|
74
|
+
fill: "currentColor"
|
|
75
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
76
|
+
x: 4,
|
|
77
|
+
width: 1,
|
|
78
|
+
height: 1,
|
|
79
|
+
fill: "currentColor"
|
|
80
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
81
|
+
x: 6,
|
|
82
|
+
width: 1,
|
|
83
|
+
height: 1,
|
|
84
|
+
fill: "currentColor"
|
|
85
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
86
|
+
x: 7,
|
|
87
|
+
width: 1,
|
|
88
|
+
height: 1,
|
|
89
|
+
fill: "currentColor"
|
|
90
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
91
|
+
x: 5,
|
|
92
|
+
y: 4,
|
|
93
|
+
width: 1,
|
|
94
|
+
height: 1,
|
|
95
|
+
fill: "currentColor"
|
|
96
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
97
|
+
x: 4,
|
|
98
|
+
y: 4,
|
|
99
|
+
width: 1,
|
|
100
|
+
height: 1,
|
|
101
|
+
fill: "currentColor"
|
|
102
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
103
|
+
x: 6,
|
|
104
|
+
y: 4,
|
|
105
|
+
width: 1,
|
|
106
|
+
height: 1,
|
|
107
|
+
fill: "currentColor"
|
|
108
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
109
|
+
x: 7,
|
|
110
|
+
y: 4,
|
|
111
|
+
width: 1,
|
|
112
|
+
height: 1,
|
|
113
|
+
fill: "currentColor"
|
|
114
|
+
})]
|
|
115
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
116
|
+
width: "100%",
|
|
117
|
+
height: "100%",
|
|
118
|
+
fill: `url(#${patternId})`
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
123
121
|
});
|
package/dist/props.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StyleProps } from '@codecademy/variance';
|
|
3
2
|
declare const patternStyles: import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").Compose<[import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
4
3
|
readonly flexBasis: {
|
|
@@ -40,6 +39,9 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
40
39
|
readonly gridArea: {
|
|
41
40
|
readonly property: "gridArea";
|
|
42
41
|
};
|
|
42
|
+
readonly containerType: {
|
|
43
|
+
readonly property: "containerType";
|
|
44
|
+
};
|
|
43
45
|
readonly display: {
|
|
44
46
|
readonly property: "display";
|
|
45
47
|
};
|
|
@@ -47,66 +49,125 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
47
49
|
readonly property: "overflow";
|
|
48
50
|
};
|
|
49
51
|
readonly overflowX: {
|
|
50
|
-
readonly property:
|
|
52
|
+
readonly property: {
|
|
53
|
+
readonly physical: "overflowX";
|
|
54
|
+
readonly logical: "overflowInline";
|
|
55
|
+
};
|
|
56
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
51
57
|
};
|
|
52
58
|
readonly overflowY: {
|
|
53
|
-
readonly property:
|
|
59
|
+
readonly property: {
|
|
60
|
+
readonly physical: "overflowY";
|
|
61
|
+
readonly logical: "overflowBlock";
|
|
62
|
+
};
|
|
63
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
54
64
|
};
|
|
55
65
|
readonly dimensions: {
|
|
56
66
|
readonly property: "width";
|
|
57
|
-
readonly properties:
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly physical: readonly ["width", "height"];
|
|
69
|
+
readonly logical: readonly ["inlineSize", "blockSize"];
|
|
70
|
+
};
|
|
71
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
58
72
|
readonly transform: (value: string | number) => string | 0;
|
|
59
73
|
};
|
|
60
74
|
readonly width: {
|
|
61
|
-
readonly property:
|
|
75
|
+
readonly property: {
|
|
76
|
+
readonly physical: "width";
|
|
77
|
+
readonly logical: "inlineSize";
|
|
78
|
+
};
|
|
79
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
62
80
|
readonly transform: (value: string | number) => string | 0;
|
|
63
81
|
};
|
|
64
82
|
readonly minWidth: {
|
|
65
|
-
readonly property:
|
|
83
|
+
readonly property: {
|
|
84
|
+
readonly physical: "minWidth";
|
|
85
|
+
readonly logical: "minInlineSize";
|
|
86
|
+
};
|
|
87
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
66
88
|
readonly transform: (value: string | number) => string | 0;
|
|
67
89
|
};
|
|
68
90
|
readonly maxWidth: {
|
|
69
|
-
readonly property:
|
|
91
|
+
readonly property: {
|
|
92
|
+
readonly physical: "maxWidth";
|
|
93
|
+
readonly logical: "maxInlineSize";
|
|
94
|
+
};
|
|
95
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
70
96
|
readonly transform: (value: string | number) => string | 0;
|
|
71
97
|
};
|
|
72
98
|
readonly height: {
|
|
73
|
-
readonly property:
|
|
99
|
+
readonly property: {
|
|
100
|
+
readonly physical: "height";
|
|
101
|
+
readonly logical: "blockSize";
|
|
102
|
+
};
|
|
103
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
74
104
|
readonly transform: (value: string | number) => string | 0;
|
|
75
105
|
};
|
|
76
106
|
readonly minHeight: {
|
|
77
|
-
readonly property:
|
|
107
|
+
readonly property: {
|
|
108
|
+
readonly physical: "minHeight";
|
|
109
|
+
readonly logical: "minBlockSize";
|
|
110
|
+
};
|
|
111
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
78
112
|
readonly transform: (value: string | number) => string | 0;
|
|
79
113
|
};
|
|
80
114
|
readonly maxHeight: {
|
|
81
|
-
readonly property:
|
|
115
|
+
readonly property: {
|
|
116
|
+
readonly physical: "maxHeight";
|
|
117
|
+
readonly logical: "maxBlockSize";
|
|
118
|
+
};
|
|
119
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
82
120
|
readonly transform: (value: string | number) => string | 0;
|
|
83
121
|
};
|
|
84
122
|
readonly verticalAlign: {
|
|
85
123
|
readonly property: "verticalAlign";
|
|
86
124
|
};
|
|
125
|
+
readonly direction: {
|
|
126
|
+
readonly property: "direction";
|
|
127
|
+
};
|
|
87
128
|
}>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
88
129
|
readonly position: {
|
|
89
130
|
readonly property: "position";
|
|
90
131
|
};
|
|
91
132
|
readonly inset: {
|
|
92
133
|
readonly property: "inset";
|
|
93
|
-
readonly properties:
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly physical: readonly ["top", "right", "bottom", "left"];
|
|
136
|
+
readonly logical: readonly ["insetBlockStart", "insetInlineEnd", "insetBlockEnd", "insetInlineStart"];
|
|
137
|
+
};
|
|
138
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
94
139
|
readonly transform: (value: string | number) => string | 0;
|
|
95
140
|
};
|
|
96
141
|
readonly top: {
|
|
97
|
-
readonly property:
|
|
142
|
+
readonly property: {
|
|
143
|
+
readonly physical: "top";
|
|
144
|
+
readonly logical: "insetBlockStart";
|
|
145
|
+
};
|
|
146
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
98
147
|
readonly transform: (value: string | number) => string | 0;
|
|
99
148
|
};
|
|
100
149
|
readonly right: {
|
|
101
|
-
readonly property:
|
|
150
|
+
readonly property: {
|
|
151
|
+
readonly physical: "right";
|
|
152
|
+
readonly logical: "insetInlineEnd";
|
|
153
|
+
};
|
|
154
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
102
155
|
readonly transform: (value: string | number) => string | 0;
|
|
103
156
|
};
|
|
104
157
|
readonly bottom: {
|
|
105
|
-
readonly property:
|
|
158
|
+
readonly property: {
|
|
159
|
+
readonly physical: "bottom";
|
|
160
|
+
readonly logical: "insetBlockEnd";
|
|
161
|
+
};
|
|
162
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
106
163
|
readonly transform: (value: string | number) => string | 0;
|
|
107
164
|
};
|
|
108
165
|
readonly left: {
|
|
109
|
-
readonly property:
|
|
166
|
+
readonly property: {
|
|
167
|
+
readonly physical: "left";
|
|
168
|
+
readonly logical: "insetInlineStart";
|
|
169
|
+
};
|
|
170
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
110
171
|
readonly transform: (value: string | number) => string | 0;
|
|
111
172
|
};
|
|
112
173
|
readonly zIndex: {
|
|
@@ -122,29 +183,53 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
122
183
|
};
|
|
123
184
|
readonly px: {
|
|
124
185
|
readonly property: "padding";
|
|
125
|
-
readonly properties:
|
|
186
|
+
readonly properties: {
|
|
187
|
+
readonly physical: readonly ["paddingLeft", "paddingRight"];
|
|
188
|
+
readonly logical: readonly ["paddingInlineStart", "paddingInlineEnd"];
|
|
189
|
+
};
|
|
126
190
|
readonly scale: "spacing";
|
|
191
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
127
192
|
};
|
|
128
193
|
readonly py: {
|
|
129
194
|
readonly property: "padding";
|
|
130
|
-
readonly properties:
|
|
195
|
+
readonly properties: {
|
|
196
|
+
readonly physical: readonly ["paddingTop", "paddingBottom"];
|
|
197
|
+
readonly logical: readonly ["paddingBlockStart", "paddingBlockEnd"];
|
|
198
|
+
};
|
|
131
199
|
readonly scale: "spacing";
|
|
200
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
132
201
|
};
|
|
133
202
|
readonly pt: {
|
|
134
|
-
readonly property:
|
|
203
|
+
readonly property: {
|
|
204
|
+
readonly physical: "paddingTop";
|
|
205
|
+
readonly logical: "paddingBlockStart";
|
|
206
|
+
};
|
|
135
207
|
readonly scale: "spacing";
|
|
208
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
136
209
|
};
|
|
137
210
|
readonly pb: {
|
|
138
|
-
readonly property:
|
|
211
|
+
readonly property: {
|
|
212
|
+
readonly physical: "paddingBottom";
|
|
213
|
+
readonly logical: "paddingBlockEnd";
|
|
214
|
+
};
|
|
139
215
|
readonly scale: "spacing";
|
|
216
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
140
217
|
};
|
|
141
218
|
readonly pr: {
|
|
142
|
-
readonly property:
|
|
219
|
+
readonly property: {
|
|
220
|
+
readonly physical: "paddingRight";
|
|
221
|
+
readonly logical: "paddingInlineEnd";
|
|
222
|
+
};
|
|
143
223
|
readonly scale: "spacing";
|
|
224
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
144
225
|
};
|
|
145
226
|
readonly pl: {
|
|
146
|
-
readonly property:
|
|
227
|
+
readonly property: {
|
|
228
|
+
readonly physical: "paddingLeft";
|
|
229
|
+
readonly logical: "paddingInlineStart";
|
|
230
|
+
};
|
|
147
231
|
readonly scale: "spacing";
|
|
232
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
148
233
|
};
|
|
149
234
|
readonly m: {
|
|
150
235
|
readonly property: "margin";
|
|
@@ -152,32 +237,56 @@ declare const patternStyles: import("@codecademy/variance/dist/types/config").Pa
|
|
|
152
237
|
};
|
|
153
238
|
readonly mx: {
|
|
154
239
|
readonly property: "margin";
|
|
155
|
-
readonly properties:
|
|
240
|
+
readonly properties: {
|
|
241
|
+
readonly physical: readonly ["marginLeft", "marginRight"];
|
|
242
|
+
readonly logical: readonly ["marginInlineStart", "marginInlineEnd"];
|
|
243
|
+
};
|
|
244
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
156
245
|
readonly scale: "spacing";
|
|
157
246
|
};
|
|
158
247
|
readonly my: {
|
|
159
248
|
readonly property: "margin";
|
|
160
|
-
readonly properties:
|
|
249
|
+
readonly properties: {
|
|
250
|
+
readonly physical: readonly ["marginTop", "marginBottom"];
|
|
251
|
+
readonly logical: readonly ["marginBlockStart", "marginBlockEnd"];
|
|
252
|
+
};
|
|
253
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
161
254
|
readonly scale: "spacing";
|
|
162
255
|
};
|
|
163
256
|
readonly mt: {
|
|
164
|
-
readonly property:
|
|
257
|
+
readonly property: {
|
|
258
|
+
readonly physical: "marginTop";
|
|
259
|
+
readonly logical: "marginBlockStart";
|
|
260
|
+
};
|
|
165
261
|
readonly scale: "spacing";
|
|
262
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
166
263
|
};
|
|
167
264
|
readonly mb: {
|
|
168
|
-
readonly property:
|
|
265
|
+
readonly property: {
|
|
266
|
+
readonly physical: "marginBottom";
|
|
267
|
+
readonly logical: "marginBlockEnd";
|
|
268
|
+
};
|
|
169
269
|
readonly scale: "spacing";
|
|
270
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
170
271
|
};
|
|
171
272
|
readonly mr: {
|
|
172
|
-
readonly property:
|
|
273
|
+
readonly property: {
|
|
274
|
+
readonly physical: "marginRight";
|
|
275
|
+
readonly logical: "marginInlineEnd";
|
|
276
|
+
};
|
|
173
277
|
readonly scale: "spacing";
|
|
278
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
174
279
|
};
|
|
175
280
|
readonly ml: {
|
|
176
|
-
readonly property:
|
|
281
|
+
readonly property: {
|
|
282
|
+
readonly physical: "marginLeft";
|
|
283
|
+
readonly logical: "marginInlineStart";
|
|
284
|
+
};
|
|
177
285
|
readonly scale: "spacing";
|
|
286
|
+
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
178
287
|
};
|
|
179
288
|
}>>]>>;
|
|
180
|
-
export
|
|
289
|
+
export type PatternStyleProps = StyleProps<typeof patternStyles>;
|
|
181
290
|
export interface PatternProps extends Omit<React.SVGProps<SVGSVGElement>, keyof PatternStyleProps>, PatternStyleProps {
|
|
182
291
|
/**
|
|
183
292
|
* A suffix added to the end of the unique generated ID for the icon. This is useful if you have multiple of the same icon on the page and need to pass accessibility guidelines.
|
|
@@ -186,8 +295,8 @@ export interface PatternProps extends Omit<React.SVGProps<SVGSVGElement>, keyof
|
|
|
186
295
|
title?: string;
|
|
187
296
|
ref?: React.Ref<SVGSVGElement>;
|
|
188
297
|
}
|
|
189
|
-
export declare const Svg: import("
|
|
190
|
-
theme?: import("@emotion/react").Theme
|
|
191
|
-
as?:
|
|
192
|
-
} & PatternProps
|
|
298
|
+
export declare const Svg: import("react").ForwardRefExoticComponent<Omit<{
|
|
299
|
+
theme?: import("@emotion/react").Theme;
|
|
300
|
+
as?: React.ElementType;
|
|
301
|
+
} & PatternProps & Pick<import("react").SVGProps<SVGSVGElement>, "string" | "scale" | "filter" | "fill" | "values" | "spacing" | "name" | "alignmentBaseline" | "baselineShift" | "clipPath" | "clipRule" | "colorInterpolationFilters" | "cursor" | "cx" | "cy" | "d" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontSizeAdjust" | "fontVariant" | "imageRendering" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "paintOrder" | "pointerEvents" | "r" | "rotate" | "rx" | "ry" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textRendering" | "transform" | "transformOrigin" | "unicodeBidi" | "vectorEffect" | "visibility" | "wordSpacing" | "writingMode" | "x" | "y" | "mask" | "offset" | "min" | "max" | "end" | "clip" | "suppressHydrationWarning" | "className" | "id" | "lang" | "media" | "method" | "style" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolation" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "fontStretch" | "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" | "limitingConeAngle" | "local" | "markerHeight" | "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" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "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-rowindextext" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "ref" | "key">, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
193
302
|
export {};
|
package/dist/props.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { styledOptions, system } from '@codecademy/gamut-styles';
|
|
2
2
|
import { variance } from '@codecademy/variance';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const patternStyles = variance.compose(system.layout, system.positioning, system.space);
|
|
7
|
+
const StyledSvg = styled('svg', styledOptions())(patternStyles);
|
|
8
|
+
export const Svg = /*#__PURE__*/forwardRef(({
|
|
9
|
+
height = '100%',
|
|
10
|
+
width = '100%',
|
|
11
|
+
...rest
|
|
12
|
+
}, ref) => /*#__PURE__*/_jsx(StyledSvg, {
|
|
13
|
+
height: height,
|
|
14
|
+
ref: ref,
|
|
15
|
+
width: width,
|
|
16
|
+
...rest
|
|
17
|
+
}));
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/usePatternId.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
var counter = {};
|
|
1
|
+
import { useId, useMemo } from 'react';
|
|
3
2
|
export function usePatternId(id) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return "".concat(id, "-pattern-").concat(counter[key] += 1);
|
|
9
|
-
}, [id]);
|
|
3
|
+
const generatedId = useId();
|
|
4
|
+
return useMemo(() => {
|
|
5
|
+
return `${id}-pattern-${generatedId}`;
|
|
6
|
+
}, [id, generatedId]);
|
|
10
7
|
}
|