@codecademy/gamut-patterns 0.8.12-alpha.4d61d4.0 → 0.8.12-alpha.ad9693.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.
@@ -1,209 +1,123 @@
1
- import _objectWithoutPropertiesLoose from "/home/circleci/repo/node_modules/@nrwl/web/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js";
2
- var _excluded = ["title", "titleId"];
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); }
3
2
 
4
- var _jsxFileName = "/home/circleci/repo/packages/gamut-patterns/src/patterns/StripeRegular.tsx",
5
- _this = this;
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
6
 
7
- import "core-js/modules/es.object.assign.js";
8
7
  import * as React from 'react';
9
8
  import { Svg } from '../props';
10
9
  import { usePatternId } from '../usePatternId';
11
- import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
12
10
  export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
13
11
  var _ref$title = _ref.title,
14
12
  title = _ref$title === void 0 ? 'Stripe Regular' : _ref$title,
15
13
  titleId = _ref.titleId,
16
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
14
+ props = _objectWithoutProperties(_ref, ["title", "titleId"]);
17
15
 
18
16
  var patternId = usePatternId('StripeRegular');
19
- return /*#__PURE__*/_jsxDEV(Svg, Object.assign({
17
+ return /*#__PURE__*/React.createElement(Svg, _extends({
20
18
  fill: "currentColor",
21
19
  role: "img",
22
20
  "aria-hidden": "true",
23
21
  ref: svgRef,
24
22
  "aria-labelledby": titleId
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);
23
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
24
+ id: titleId
25
+ }, title) : null, /*#__PURE__*/React.createElement("pattern", {
26
+ id: patternId,
27
+ x: 0,
28
+ y: 0,
29
+ width: 8,
30
+ height: 8,
31
+ patternUnits: "userSpaceOnUse"
32
+ }, /*#__PURE__*/React.createElement("rect", {
33
+ x: 1,
34
+ width: 1,
35
+ height: 1,
36
+ fill: "currentColor"
37
+ }), /*#__PURE__*/React.createElement("rect", {
38
+ width: 1,
39
+ height: 1,
40
+ fill: "currentColor"
41
+ }), /*#__PURE__*/React.createElement("rect", {
42
+ x: 2,
43
+ width: 1,
44
+ height: 1,
45
+ fill: "currentColor"
46
+ }), /*#__PURE__*/React.createElement("rect", {
47
+ x: 3,
48
+ width: 1,
49
+ height: 1,
50
+ fill: "currentColor"
51
+ }), /*#__PURE__*/React.createElement("rect", {
52
+ x: 1,
53
+ y: 4,
54
+ width: 1,
55
+ height: 1,
56
+ fill: "currentColor"
57
+ }), /*#__PURE__*/React.createElement("rect", {
58
+ y: 4,
59
+ width: 1,
60
+ height: 1,
61
+ fill: "currentColor"
62
+ }), /*#__PURE__*/React.createElement("rect", {
63
+ x: 2,
64
+ y: 4,
65
+ width: 1,
66
+ height: 1,
67
+ fill: "currentColor"
68
+ }), /*#__PURE__*/React.createElement("rect", {
69
+ x: 3,
70
+ y: 4,
71
+ width: 1,
72
+ height: 1,
73
+ fill: "currentColor"
74
+ }), /*#__PURE__*/React.createElement("rect", {
75
+ x: 5,
76
+ width: 1,
77
+ height: 1,
78
+ fill: "currentColor"
79
+ }), /*#__PURE__*/React.createElement("rect", {
80
+ x: 4,
81
+ width: 1,
82
+ height: 1,
83
+ fill: "currentColor"
84
+ }), /*#__PURE__*/React.createElement("rect", {
85
+ x: 6,
86
+ width: 1,
87
+ height: 1,
88
+ fill: "currentColor"
89
+ }), /*#__PURE__*/React.createElement("rect", {
90
+ x: 7,
91
+ width: 1,
92
+ height: 1,
93
+ fill: "currentColor"
94
+ }), /*#__PURE__*/React.createElement("rect", {
95
+ x: 5,
96
+ y: 4,
97
+ width: 1,
98
+ height: 1,
99
+ fill: "currentColor"
100
+ }), /*#__PURE__*/React.createElement("rect", {
101
+ x: 4,
102
+ y: 4,
103
+ width: 1,
104
+ height: 1,
105
+ fill: "currentColor"
106
+ }), /*#__PURE__*/React.createElement("rect", {
107
+ x: 6,
108
+ y: 4,
109
+ width: 1,
110
+ height: 1,
111
+ fill: "currentColor"
112
+ }), /*#__PURE__*/React.createElement("rect", {
113
+ x: 7,
114
+ y: 4,
115
+ width: 1,
116
+ height: 1,
117
+ fill: "currentColor"
118
+ })), /*#__PURE__*/React.createElement("rect", {
119
+ width: "100%",
120
+ height: "100%",
121
+ fill: "url(#".concat(patternId, ")")
122
+ }));
209
123
  });
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("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<{
3
+ 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
4
  readonly flexBasis: {
5
5
  readonly property: "flexBasis";
6
6
  };
@@ -84,7 +84,7 @@ declare const patternStyles: import("packages/variance/dist/types/config").Parse
84
84
  readonly verticalAlign: {
85
85
  readonly property: "verticalAlign";
86
86
  };
87
- }>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
87
+ }>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
88
88
  readonly position: {
89
89
  readonly property: "position";
90
90
  };
@@ -115,7 +115,7 @@ declare const patternStyles: import("packages/variance/dist/types/config").Parse
115
115
  readonly opacity: {
116
116
  readonly property: "opacity";
117
117
  };
118
- }>>, import("packages/variance/dist/types/config").Parser<import("packages/variance/dist/types/config").TransformerMap<{
118
+ }>>, import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
119
119
  readonly p: {
120
120
  readonly property: "padding";
121
121
  readonly scale: "spacing";
package/dist/types.js CHANGED
@@ -1 +0,0 @@
1
- export {};
@@ -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 == null ? void 0 : counter[key]) || 0;
6
+ var idCounter = (counter === null || counter === void 0 ? void 0 : counter[key]) || 0;
7
7
  counter[key] = idCounter;
8
- return id + "-pattern-" + (counter[key] += 1);
8
+ return "".concat(id, "-pattern-").concat(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": "14.0.3-alpha.4d61d4.0",
8
- "@codecademy/variance": "0.20.3-alpha.4d61d4.0",
7
+ "@codecademy/gamut-styles": "14.0.3-alpha.ad9693.0",
8
+ "@codecademy/variance": "0.20.3-alpha.ad9693.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.12-alpha.4d61d4.0",
42
- "gitHead": "6060cbb9e9243cdf361242feb2ca71f5212f6470"
41
+ "version": "0.8.12-alpha.ad9693.0",
42
+ "gitHead": "b91e62d02df70a64eb73db379e4623b7caf141d9"
43
43
  }