@codecademy/gamut-patterns 0.9.8 → 0.9.9-alpha.ab0105.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,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var RainDense = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Rain Dense' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('RainDense');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const RainDense = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Rain Dense',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('RainDense');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -48,7 +41,7 @@ export var RainDense = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
48
41
  }), /*#__PURE__*/_jsx("rect", {
49
42
  width: "100%",
50
43
  height: "100%",
51
- fill: "url(#".concat(patternId, ")")
44
+ fill: `url(#${patternId})`
52
45
  })]
53
- }));
46
+ });
54
47
  });
@@ -1,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var RainLoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Rain Loose' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('RainLoose');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const RainLoose = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Rain Loose',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('RainLoose');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -48,7 +41,7 @@ export var RainLoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
48
41
  }), /*#__PURE__*/_jsx("rect", {
49
42
  width: "100%",
50
43
  height: "100%",
51
- fill: "url(#".concat(patternId, ")")
44
+ fill: `url(#${patternId})`
52
45
  })]
53
- }));
46
+ });
54
47
  });
@@ -1,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var RainRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Rain Regular' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('RainRegular');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const RainRegular = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Rain Regular',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('RainRegular');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -48,7 +41,7 @@ export var RainRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
48
41
  }), /*#__PURE__*/_jsx("rect", {
49
42
  width: "100%",
50
43
  height: "100%",
51
- fill: "url(#".concat(patternId, ")")
44
+ fill: `url(#${patternId})`
52
45
  })]
53
- }));
46
+ });
54
47
  });
@@ -1,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var StripeDense = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Stripe Dense' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('StripeDense');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const StripeDense = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Stripe Dense',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('StripeDense');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -80,7 +73,7 @@ export var StripeDense = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
80
73
  }), /*#__PURE__*/_jsx("rect", {
81
74
  width: "100%",
82
75
  height: "100%",
83
- fill: "url(#".concat(patternId, ")")
76
+ fill: `url(#${patternId})`
84
77
  })]
85
- }));
78
+ });
86
79
  });
@@ -1,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var StripeLoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Stripe Loose' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('StripeLoose');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const StripeLoose = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Stripe Loose',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('StripeLoose');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -212,7 +205,7 @@ export var StripeLoose = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
212
205
  }), /*#__PURE__*/_jsx("rect", {
213
206
  width: "100%",
214
207
  height: "100%",
215
- fill: "url(#".concat(patternId, ")")
208
+ fill: `url(#${patternId})`
216
209
  })]
217
- }));
210
+ });
218
211
  });
@@ -1,29 +1,22 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- 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; }
8
- 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; }
9
1
  import * as React from 'react';
10
2
  import { Svg } from '../props';
11
3
  import { usePatternId } from '../usePatternId';
12
4
  import { jsx as _jsx } from "react/jsx-runtime";
13
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
15
- var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? 'Stripe Regular' : _ref$title,
17
- titleId = _ref.titleId,
18
- props = _objectWithoutProperties(_ref, ["title", "titleId"]);
19
- var patternId = usePatternId('StripeRegular');
20
- return /*#__PURE__*/_jsxs(Svg, _objectSpread(_objectSpread({
6
+ export const StripeRegular = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
7
+ let {
8
+ title = 'Stripe Regular',
9
+ titleId,
10
+ ...props
11
+ } = _ref;
12
+ const patternId = usePatternId('StripeRegular');
13
+ return /*#__PURE__*/_jsxs(Svg, {
21
14
  fill: "currentColor",
22
15
  role: "img",
23
16
  "aria-hidden": "true",
24
17
  ref: svgRef,
25
- "aria-labelledby": titleId
26
- }, props), {}, {
18
+ "aria-labelledby": titleId,
19
+ ...props,
27
20
  children: [title ? /*#__PURE__*/_jsx("title", {
28
21
  id: titleId,
29
22
  children: title
@@ -124,7 +117,7 @@ export var StripeRegular = /*#__PURE__*/React.forwardRef(function (_ref, svgRef)
124
117
  }), /*#__PURE__*/_jsx("rect", {
125
118
  width: "100%",
126
119
  height: "100%",
127
- fill: "url(#".concat(patternId, ")")
120
+ fill: `url(#${patternId})`
128
121
  })]
129
- }));
122
+ });
130
123
  });
package/dist/props.js CHANGED
@@ -1,8 +1,12 @@
1
+ import _styled from "@emotion/styled/base";
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
1
3
  import { styledOptions, system } from '@codecademy/gamut-styles';
2
4
  import { variance } from '@codecademy/variance';
3
- import styled from '@emotion/styled';
4
- var patternStyles = variance.compose(system.layout, system.positioning, system.space);
5
- export var Svg = styled('svg', styledOptions())(patternStyles);
5
+ const patternStyles = variance.compose(system.layout, system.positioning, system.space);
6
+ export const Svg = /*#__PURE__*/_styled('svg', _extends({}, {
7
+ target: "e1dw7vog0",
8
+ label: "Svg"
9
+ }, styledOptions()))(patternStyles, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQm1CIiwiZmlsZSI6Ii4uL3NyYy9wcm9wcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHN0eWxlZE9wdGlvbnMsIHN5c3RlbSB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgeyBTdHlsZVByb3BzLCB2YXJpYW5jZSB9IGZyb20gJ0Bjb2RlY2FkZW15L3ZhcmlhbmNlJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgcGF0dGVyblN0eWxlcyA9IHZhcmlhbmNlLmNvbXBvc2UoXG4gIHN5c3RlbS5sYXlvdXQsXG4gIHN5c3RlbS5wb3NpdGlvbmluZyxcbiAgc3lzdGVtLnNwYWNlXG4pO1xuXG5leHBvcnQgdHlwZSBQYXR0ZXJuU3R5bGVQcm9wcyA9IFN0eWxlUHJvcHM8dHlwZW9mIHBhdHRlcm5TdHlsZXM+O1xuZXhwb3J0IGludGVyZmFjZSBQYXR0ZXJuUHJvcHNcbiAgZXh0ZW5kcyBPbWl0PFJlYWN0LlNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+LCBrZXlvZiBQYXR0ZXJuU3R5bGVQcm9wcz4sXG4gICAgUGF0dGVyblN0eWxlUHJvcHMge1xuICAvKipcbiAgICogQSBzdWZmaXggYWRkZWQgdG8gdGhlIGVuZCBvZiB0aGUgdW5pcXVlIGdlbmVyYXRlZCBJRCBmb3IgdGhlIGljb24uIFRoaXMgaXMgdXNlZnVsIGlmIHlvdSBoYXZlIG11bHRpcGxlIG9mIHRoZSBzYW1lIGljb24gb24gdGhlIHBhZ2UgYW5kIG5lZWQgdG8gcGFzcyBhY2Nlc3NpYmlsaXR5IGd1aWRlbGluZXMuXG4gICAqL1xuICB0aXRsZUlkPzogc3RyaW5nO1xuICB0aXRsZT86IHN0cmluZztcbiAgcmVmPzogUmVhY3QuUmVmPFNWR1NWR0VsZW1lbnQ+O1xufVxuXG5leHBvcnQgY29uc3QgU3ZnID0gc3R5bGVkKFxuICAnc3ZnJyxcbiAgc3R5bGVkT3B0aW9uczwnc3ZnJz4oKVxuKTxQYXR0ZXJuUHJvcHM+KHBhdHRlcm5TdHlsZXMpO1xuXG5TdmcuZGVmYXVsdFByb3BzID0ge1xuICB3aWR0aDogJzEwMCUnLFxuICBoZWlnaHQ6ICcxMDAlJyxcbn07XG4iXX0= */");
6
10
  Svg.defaultProps = {
7
11
  width: '100%',
8
12
  height: '100%'
@@ -1,8 +1,8 @@
1
1
  import { useId } from '@reach/auto-id';
2
2
  import { useMemo } from 'react';
3
3
  export function usePatternId(id) {
4
- var generatedId = useId();
5
- return useMemo(function () {
6
- return "".concat(id, "-pattern-").concat(generatedId);
4
+ const generatedId = useId();
5
+ return useMemo(() => {
6
+ return `${id}-pattern-${generatedId}`;
7
7
  }, [id, generatedId]);
8
8
  }
package/package.json CHANGED
@@ -1,23 +1,21 @@
1
1
  {
2
+ "name": "@codecademy/gamut-patterns",
3
+ "description": "Pattern library for Codecademy",
4
+ "version": "0.9.9-alpha.ab0105.0",
2
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
3
- "bugs": {
4
- "url": "https://github.com/Codecademy/gamut/issues"
5
- },
6
+ "bugs": "https://github.com/Codecademy/gamut/issues",
6
7
  "dependencies": {
7
- "@codecademy/gamut-styles": "16.1.3",
8
- "@codecademy/variance": "0.21.1",
8
+ "@codecademy/gamut-styles": "16.1.4-alpha.ab0105.0",
9
+ "@codecademy/variance": "0.21.2-alpha.ab0105.0",
9
10
  "classnames": "^2.2.5"
10
11
  },
11
- "description": "Pattern library for Codecademy",
12
- "homepage": "https://github.com/Codecademy/gamut#readme",
13
- "name": "@codecademy/gamut-patterns",
14
- "module": "dist/index.js",
15
- "types": "dist/index.d.ts",
16
- "main": "dist/index.js",
17
12
  "files": [
18
13
  "dist"
19
14
  ],
15
+ "homepage": "https://github.com/Codecademy/gamut#readme",
20
16
  "license": "MIT",
17
+ "main": "dist/index.js",
18
+ "module": "dist/index.js",
21
19
  "peerDependencies": {
22
20
  "@emotion/react": "^11.4.0",
23
21
  "@emotion/styled": "^11.3.0",
@@ -27,15 +25,12 @@
27
25
  "publishConfig": {
28
26
  "access": "public"
29
27
  },
30
- "repository": {
31
- "type": "git",
32
- "url": "git+ssh://git@github.com/Codecademy/gamut.git"
33
- },
28
+ "repository": "Codecademy/gamut.git",
34
29
  "scripts": {
35
- "format": "svgo -f ./src/svg --pretty --config=.svgo.yml",
36
- "build": "nx build @codecademy/gamut-patterns"
30
+ "build": "nx build @codecademy/gamut-patterns",
31
+ "format": "svgo -f ./src/svg --pretty --config=.svgo.yml"
37
32
  },
38
33
  "sideEffects": false,
39
- "version": "0.9.8",
40
- "gitHead": "baa23988e9eb59834cafd89bbfd7923dfe1039d9"
34
+ "types": "dist/index.d.ts",
35
+ "gitHead": "65f4a4ec3d2cc7ff219edacc40de7bf02dcef79b"
41
36
  }