@codecademy/gamut-patterns 0.9.9-alpha.cd6532.0 → 0.9.9
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 +19 -12
- package/dist/patterns/CheckerLoose.js +19 -12
- package/dist/patterns/CheckerRegular.js +19 -12
- package/dist/patterns/DiagonalADense.js +19 -12
- package/dist/patterns/DiagonalALoose.js +19 -12
- package/dist/patterns/DiagonalARegular.js +19 -12
- package/dist/patterns/DiagonalBDense.js +19 -12
- package/dist/patterns/DiagonalBLoose.js +19 -12
- package/dist/patterns/DiagonalBRegular.js +19 -12
- package/dist/patterns/DotDense.js +19 -12
- package/dist/patterns/DotLoose.js +19 -12
- package/dist/patterns/DotRegular.js +19 -12
- package/dist/patterns/ExDense.js +19 -12
- package/dist/patterns/ExLoose.js +19 -12
- package/dist/patterns/ExRegular.js +19 -12
- package/dist/patterns/FlowerDense.js +19 -12
- package/dist/patterns/FlowerLoose.js +19 -12
- package/dist/patterns/FlowerRegular.js +19 -12
- package/dist/patterns/GridDense.js +19 -12
- package/dist/patterns/GridLoose.js +19 -12
- package/dist/patterns/GridRegular.js +19 -12
- package/dist/patterns/Herringbone.js +19 -12
- package/dist/patterns/RainDense.js +19 -12
- package/dist/patterns/RainLoose.js +19 -12
- package/dist/patterns/RainRegular.js +19 -12
- package/dist/patterns/StripeDense.js +19 -12
- package/dist/patterns/StripeLoose.js +19 -12
- package/dist/patterns/StripeRegular.js +19 -12
- package/dist/props.js +3 -7
- package/dist/usePatternId.js +3 -3
- package/package.json +4 -4
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Rain Dense',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -41,7 +48,7 @@ export const RainDense = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
41
48
|
}), /*#__PURE__*/_jsx("rect", {
|
|
42
49
|
width: "100%",
|
|
43
50
|
height: "100%",
|
|
44
|
-
fill:
|
|
51
|
+
fill: "url(#".concat(patternId, ")")
|
|
45
52
|
})]
|
|
46
|
-
});
|
|
53
|
+
}));
|
|
47
54
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Rain Loose',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -41,7 +48,7 @@ export const RainLoose = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
41
48
|
}), /*#__PURE__*/_jsx("rect", {
|
|
42
49
|
width: "100%",
|
|
43
50
|
height: "100%",
|
|
44
|
-
fill:
|
|
51
|
+
fill: "url(#".concat(patternId, ")")
|
|
45
52
|
})]
|
|
46
|
-
});
|
|
53
|
+
}));
|
|
47
54
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Rain Regular',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -41,7 +48,7 @@ export const RainRegular = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
41
48
|
}), /*#__PURE__*/_jsx("rect", {
|
|
42
49
|
width: "100%",
|
|
43
50
|
height: "100%",
|
|
44
|
-
fill:
|
|
51
|
+
fill: "url(#".concat(patternId, ")")
|
|
45
52
|
})]
|
|
46
|
-
});
|
|
53
|
+
}));
|
|
47
54
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Stripe Dense',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -73,7 +80,7 @@ export const StripeDense = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
73
80
|
}), /*#__PURE__*/_jsx("rect", {
|
|
74
81
|
width: "100%",
|
|
75
82
|
height: "100%",
|
|
76
|
-
fill:
|
|
83
|
+
fill: "url(#".concat(patternId, ")")
|
|
77
84
|
})]
|
|
78
|
-
});
|
|
85
|
+
}));
|
|
79
86
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Stripe Loose',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -205,7 +212,7 @@ export const StripeLoose = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
205
212
|
}), /*#__PURE__*/_jsx("rect", {
|
|
206
213
|
width: "100%",
|
|
207
214
|
height: "100%",
|
|
208
|
-
fill:
|
|
215
|
+
fill: "url(#".concat(patternId, ")")
|
|
209
216
|
})]
|
|
210
|
-
});
|
|
217
|
+
}));
|
|
211
218
|
});
|
|
@@ -1,22 +1,29 @@
|
|
|
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; }
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
import { Svg } from '../props';
|
|
3
11
|
import { usePatternId } from '../usePatternId';
|
|
4
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
title = 'Stripe Regular',
|
|
9
|
-
titleId,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
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({
|
|
14
21
|
fill: "currentColor",
|
|
15
22
|
role: "img",
|
|
16
23
|
"aria-hidden": "true",
|
|
17
24
|
ref: svgRef,
|
|
18
|
-
"aria-labelledby": titleId
|
|
19
|
-
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), {}, {
|
|
20
27
|
children: [title ? /*#__PURE__*/_jsx("title", {
|
|
21
28
|
id: titleId,
|
|
22
29
|
children: title
|
|
@@ -117,7 +124,7 @@ export const StripeRegular = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
|
|
|
117
124
|
}), /*#__PURE__*/_jsx("rect", {
|
|
118
125
|
width: "100%",
|
|
119
126
|
height: "100%",
|
|
120
|
-
fill:
|
|
127
|
+
fill: "url(#".concat(patternId, ")")
|
|
121
128
|
})]
|
|
122
|
-
});
|
|
129
|
+
}));
|
|
123
130
|
});
|
package/dist/props.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
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); }
|
|
3
1
|
import { styledOptions, system } from '@codecademy/gamut-styles';
|
|
4
2
|
import { variance } from '@codecademy/variance';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
label: "Svg"
|
|
9
|
-
}, styledOptions()))(patternStyles, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQm1CIiwiZmlsZSI6Ii4uL3NyYy9wcm9wcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHN0eWxlZE9wdGlvbnMsIHN5c3RlbSB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0LXN0eWxlcyc7XG5pbXBvcnQgeyBTdHlsZVByb3BzLCB2YXJpYW5jZSB9IGZyb20gJ0Bjb2RlY2FkZW15L3ZhcmlhbmNlJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgcGF0dGVyblN0eWxlcyA9IHZhcmlhbmNlLmNvbXBvc2UoXG4gIHN5c3RlbS5sYXlvdXQsXG4gIHN5c3RlbS5wb3NpdGlvbmluZyxcbiAgc3lzdGVtLnNwYWNlXG4pO1xuXG5leHBvcnQgdHlwZSBQYXR0ZXJuU3R5bGVQcm9wcyA9IFN0eWxlUHJvcHM8dHlwZW9mIHBhdHRlcm5TdHlsZXM+O1xuZXhwb3J0IGludGVyZmFjZSBQYXR0ZXJuUHJvcHNcbiAgZXh0ZW5kcyBPbWl0PFJlYWN0LlNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+LCBrZXlvZiBQYXR0ZXJuU3R5bGVQcm9wcz4sXG4gICAgUGF0dGVyblN0eWxlUHJvcHMge1xuICAvKipcbiAgICogQSBzdWZmaXggYWRkZWQgdG8gdGhlIGVuZCBvZiB0aGUgdW5pcXVlIGdlbmVyYXRlZCBJRCBmb3IgdGhlIGljb24uIFRoaXMgaXMgdXNlZnVsIGlmIHlvdSBoYXZlIG11bHRpcGxlIG9mIHRoZSBzYW1lIGljb24gb24gdGhlIHBhZ2UgYW5kIG5lZWQgdG8gcGFzcyBhY2Nlc3NpYmlsaXR5IGd1aWRlbGluZXMuXG4gICAqL1xuICB0aXRsZUlkPzogc3RyaW5nO1xuICB0aXRsZT86IHN0cmluZztcbiAgcmVmPzogUmVhY3QuUmVmPFNWR1NWR0VsZW1lbnQ+O1xufVxuXG5leHBvcnQgY29uc3QgU3ZnID0gc3R5bGVkKFxuICAnc3ZnJyxcbiAgc3R5bGVkT3B0aW9uczwnc3ZnJz4oKVxuKTxQYXR0ZXJuUHJvcHM+KHBhdHRlcm5TdHlsZXMpO1xuXG5TdmcuZGVmYXVsdFByb3BzID0ge1xuICB3aWR0aDogJzEwMCUnLFxuICBoZWlnaHQ6ICcxMDAlJyxcbn07XG4iXX0= */");
|
|
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);
|
|
10
6
|
Svg.defaultProps = {
|
|
11
7
|
width: '100%',
|
|
12
8
|
height: '100%'
|
package/dist/usePatternId.js
CHANGED
|
@@ -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
|
-
|
|
5
|
-
return useMemo(()
|
|
6
|
-
return
|
|
4
|
+
var generatedId = useId();
|
|
5
|
+
return useMemo(function () {
|
|
6
|
+
return "".concat(id, "-pattern-").concat(generatedId);
|
|
7
7
|
}, [id, generatedId]);
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut-patterns",
|
|
3
3
|
"description": "Pattern library for Codecademy",
|
|
4
|
-
"version": "0.9.9
|
|
4
|
+
"version": "0.9.9",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"bugs": "https://github.com/Codecademy/gamut/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@codecademy/gamut-styles": "16.1.4
|
|
9
|
-
"@codecademy/variance": "0.21.2
|
|
8
|
+
"@codecademy/gamut-styles": "16.1.4",
|
|
9
|
+
"@codecademy/variance": "0.21.2",
|
|
10
10
|
"classnames": "^2.2.5"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "211364c302abe4d75af11ecabd79c9507284abdc"
|
|
36
36
|
}
|