@pingux/astro 2.84.0-alpha.9 → 2.85.0-alpha.14

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.
Files changed (35) hide show
  1. package/lib/cjs/components/Avatar/Avatar.js +43 -8
  2. package/lib/cjs/components/Avatar/Avatar.test.js +10 -1
  3. package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +1 -1
  4. package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +2 -2
  5. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
  6. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +64 -31
  7. package/lib/cjs/styles/themes/next-gen/next-gen.js +4 -11
  8. package/lib/cjs/styles/themes/next-gen/sizes.d.ts +18 -0
  9. package/lib/cjs/styles/themes/next-gen/sizes.js +27 -0
  10. package/lib/cjs/styles/themes/next-gen/text.d.ts +6 -0
  11. package/lib/cjs/styles/themes/next-gen/text.js +14 -6
  12. package/lib/cjs/styles/themes/next-gen/variants/cards.js +1 -1
  13. package/lib/cjs/styles/themes/next-gen/variants/images.d.ts +4 -0
  14. package/lib/cjs/styles/themes/next-gen/variants/images.js +12 -0
  15. package/lib/cjs/styles/themes/next-gen/variants/links.js +4 -4
  16. package/lib/cjs/styles/themes/next-gen/variants/text.js +1 -1
  17. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +48 -30
  18. package/lib/cjs/styles/themes/next-gen/variants/variants.js +51 -26
  19. package/lib/cjs/types/avatar.d.ts +5 -1
  20. package/lib/components/Avatar/Avatar.js +44 -7
  21. package/lib/components/Avatar/Avatar.test.js +10 -1
  22. package/lib/styles/themes/next-gen/codeView/codeView.js +2 -2
  23. package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
  24. package/lib/styles/themes/next-gen/next-gen.js +4 -11
  25. package/lib/styles/themes/next-gen/sizes.js +19 -0
  26. package/lib/styles/themes/next-gen/text.js +14 -6
  27. package/lib/styles/themes/next-gen/variants/cards.js +1 -1
  28. package/lib/styles/themes/next-gen/variants/images.js +4 -0
  29. package/lib/styles/themes/next-gen/variants/links.js +4 -4
  30. package/lib/styles/themes/next-gen/variants/text.js +1 -1
  31. package/lib/styles/themes/next-gen/variants/variants.js +51 -26
  32. package/package.json +1 -1
  33. package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.d.ts +0 -6
  34. package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.js +0 -41
  35. package/lib/recipes/NextGen/DefaultAvatar.stories.js +0 -31
@@ -1,28 +1,63 @@
1
1
  "use strict";
2
2
 
3
3
  var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
- var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
5
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
5
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
6
+ var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
6
7
  var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
8
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
9
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
10
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
11
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
12
+ var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
7
13
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
8
14
  _Object$defineProperty(exports, "__esModule", {
9
15
  value: true
10
16
  });
11
17
  exports["default"] = void 0;
12
18
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
19
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
20
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
13
21
  var _react = _interopRequireWildcard(require("react"));
14
22
  var _themeUi = require("theme-ui");
23
+ var _hooks = require("../../hooks");
15
24
  var _react2 = require("@emotion/react");
25
+ var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx"];
16
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
27
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
18
30
  var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
19
- return (0, _react2.jsx)(_themeUi.Avatar, (0, _extends2["default"])({
20
- ref: ref
21
- }, props));
31
+ var _props$alt = props.alt,
32
+ alt = _props$alt === void 0 ? 'Avatar' : _props$alt,
33
+ defaultText = props.defaultText,
34
+ color = props.color,
35
+ className = props.className,
36
+ size = props.size,
37
+ src = props.src,
38
+ sx = props.sx,
39
+ others = (0, _objectWithoutProperties2["default"])(props, _excluded);
40
+ var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (0, _defineProperty2["default"])({}, "is-".concat(color), true)),
41
+ classNames = _useStatusClasses.classNames;
42
+ if (src) {
43
+ return (0, _react2.jsx)(_themeUi.Avatar, (0, _extends2["default"])({
44
+ ref: ref,
45
+ alt: alt,
46
+ src: src,
47
+ sx: _objectSpread({
48
+ size: size
49
+ }, sx)
50
+ }, others));
51
+ }
52
+ return (0, _react2.jsx)(_themeUi.Box, (0, _extends2["default"])({
53
+ variant: "avatar",
54
+ className: classNames,
55
+ sx: _objectSpread({
56
+ size: size,
57
+ fontSize: size
58
+ }, sx)
59
+ }, others), defaultText);
22
60
  });
23
- Avatar.defaultProps = {
24
- alt: 'Avatar'
25
- };
26
61
  Avatar.displayName = 'Avatar';
27
62
  var _default = Avatar;
28
63
  exports["default"] = _default;
@@ -8,8 +8,9 @@ var _testWrapper = require("../../utils/testUtils/testWrapper");
8
8
  var _universalComponentTest = require("../../utils/testUtils/universalComponentTest");
9
9
  var _ = _interopRequireDefault(require("."));
10
10
  var _react2 = require("@emotion/react");
11
+ var src = _faker.faker.image.lorempicsum.imageUrl(150, 150, false, undefined, '1');
11
12
  var defaultProps = {
12
- src: _faker.faker.image.lorempicsum.imageUrl(150, 150, false, undefined, '1')
13
+ src: src
13
14
  };
14
15
  var getComponent = function getComponent() {
15
16
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -34,4 +35,12 @@ test('an avatar is rendered with custom alt', function () {
34
35
  });
35
36
  var img = _testWrapper.screen.getByRole('img');
36
37
  expect(img).toHaveAttribute('alt', 'Custom Alt');
38
+ });
39
+ test('an avatar is rendered with custom alt', function () {
40
+ getComponent({
41
+ src: undefined,
42
+ defaultText: 'KL'
43
+ });
44
+ var avatar = _testWrapper.screen.getByText('KL');
45
+ expect(avatar).toBeInTheDocument();
37
46
  });
@@ -68,7 +68,7 @@ declare const _default: {
68
68
  };
69
69
  };
70
70
  fontFamily: string;
71
- lineHeight: number;
71
+ lineHeight: string;
72
72
  };
73
73
  '&.has-no-copy-button': {
74
74
  pre: {
@@ -92,8 +92,8 @@ var nextGenCodeViewWrapper = {
92
92
  wordBreak: 'break-all'
93
93
  }
94
94
  },
95
- fontFamily: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace',
96
- lineHeight: 1.75
95
+ fontFamily: 'codeView',
96
+ lineHeight: 'md'
97
97
  },
98
98
  '&.has-no-copy-button': {
99
99
  pre: {
@@ -5,6 +5,6 @@ _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports["default"] = void 0;
8
- var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'MultivaluesField', 'Text', 'Link', 'Card'];
8
+ var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card'];
9
9
  var _default = nextGenConvertedComponents;
10
10
  exports["default"] = _default;
@@ -973,6 +973,12 @@ declare const _default: {
973
973
  };
974
974
  };
975
975
  fontSizes: {
976
+ avatar: {
977
+ sm: string;
978
+ md: string;
979
+ lg: string;
980
+ xl: string;
981
+ };
976
982
  xs: string;
977
983
  sm: string;
978
984
  md: string;
@@ -1062,6 +1068,12 @@ declare const _default: {
1062
1068
  codeView: string;
1063
1069
  };
1064
1070
  sizes: {
1071
+ avatar: {
1072
+ sm: string;
1073
+ md: string;
1074
+ lg: string;
1075
+ xl: string;
1076
+ };
1065
1077
  container: {
1066
1078
  xs: string[];
1067
1079
  sm: string[];
@@ -1578,38 +1590,47 @@ declare const _default: {
1578
1590
  };
1579
1591
  };
1580
1592
  avatar: {
1581
- xl: {
1582
- borderRadius: string;
1583
- textAlign: string;
1584
- justifyContent: string;
1585
- fontFamily: string;
1586
- size: string;
1587
- fontSize: string;
1593
+ backgroundColor: string;
1594
+ color: string;
1595
+ cursor: string;
1596
+ '&.is-orange': {
1597
+ backgroundColor: string;
1598
+ color: string;
1588
1599
  };
1589
- lg: {
1590
- fontSize: string;
1591
- borderRadius: string;
1592
- textAlign: string;
1593
- justifyContent: string;
1594
- fontFamily: string;
1595
- size: string;
1600
+ '&.is-green': {
1601
+ backgroundColor: string;
1602
+ color: string;
1596
1603
  };
1597
- md: {
1598
- fontSize: string;
1599
- borderRadius: string;
1600
- textAlign: string;
1601
- justifyContent: string;
1602
- fontFamily: string;
1603
- size: string;
1604
+ '&.is-purple': {
1605
+ backgroundColor: string;
1606
+ color: string;
1604
1607
  };
1605
- sm: {
1606
- fontSize: string;
1607
- borderRadius: string;
1608
- textAlign: string;
1609
- justifyContent: string;
1610
- fontFamily: string;
1611
- size: string;
1608
+ '&.is-pink': {
1609
+ backgroundColor: string;
1610
+ color: string;
1611
+ };
1612
+ '&.is-red': {
1613
+ backgroundColor: string;
1614
+ color: string;
1612
1615
  };
1616
+ '&.is-yellow': {
1617
+ backgroundColor: string;
1618
+ color: string;
1619
+ };
1620
+ '&.is-cyan': {
1621
+ backgroundColor: string;
1622
+ color: string;
1623
+ };
1624
+ '&.is-teal': {
1625
+ backgroundColor: string;
1626
+ color: string;
1627
+ };
1628
+ display: string;
1629
+ borderRadius: string;
1630
+ textAlign: string;
1631
+ alignItems: string;
1632
+ justifyContent: string;
1633
+ fontFamily: string;
1613
1634
  };
1614
1635
  listViewItem: {
1615
1636
  rightOfData: {
@@ -1678,8 +1699,17 @@ declare const _default: {
1678
1699
  borderRadius: string;
1679
1700
  border: string;
1680
1701
  borderColor: string;
1681
- '& > div': {
1682
- borderRadius: string;
1702
+ '& > div > div': {
1703
+ '& > div:first-of-type': {
1704
+ '& > div > div': {
1705
+ borderRadius: string;
1706
+ };
1707
+ };
1708
+ '& > div:last-of-type': {
1709
+ '& > div > div': {
1710
+ borderRadius: string;
1711
+ };
1712
+ };
1683
1713
  };
1684
1714
  };
1685
1715
  };
@@ -1734,6 +1764,9 @@ declare const _default: {
1734
1764
  borderColor: string;
1735
1765
  };
1736
1766
  };
1767
+ images: {
1768
+ avatar: {};
1769
+ };
1737
1770
  overrides: {
1738
1771
  codeView: {
1739
1772
  theme: {
@@ -1805,7 +1838,7 @@ declare const _default: {
1805
1838
  };
1806
1839
  };
1807
1840
  fontFamily: string;
1808
- lineHeight: number;
1841
+ lineHeight: string;
1809
1842
  };
1810
1843
  '&.has-no-copy-button': {
1811
1844
  pre: {
@@ -22,10 +22,12 @@ var _codeView = _interopRequireDefault(require("./codeView/codeView"));
22
22
  var _colors = _interopRequireDefault(require("./colors/colors"));
23
23
  var _button = _interopRequireDefault(require("./variants/button"));
24
24
  var _cards = _interopRequireDefault(require("./variants/cards"));
25
+ var _images = _interopRequireDefault(require("./variants/images"));
25
26
  var _links = _interopRequireDefault(require("./variants/links"));
26
27
  var _text = require("./variants/text");
27
28
  var _variants = _interopRequireWildcard(require("./variants/variants"));
28
29
  var _forms = _interopRequireDefault(require("./forms"));
30
+ var _sizes = _interopRequireDefault(require("./sizes"));
29
31
  var _spacing = _interopRequireDefault(require("./spacing"));
30
32
  var _text2 = require("./text");
31
33
  require("./open_sans.css");
@@ -53,22 +55,13 @@ var nextGenTheme = {
53
55
  heading: '"Open Sans", sans-serif',
54
56
  codeView: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace'
55
57
  },
56
- sizes: {
57
- container: {
58
- xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
59
- sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
60
- md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
61
- lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
62
- xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
63
- xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
64
- fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
65
- }
66
- },
58
+ sizes: _sizes["default"],
67
59
  badges: _variants.badges,
68
60
  space: _spacing["default"],
69
61
  links: _links["default"],
70
62
  cards: _cards["default"],
71
63
  variants: _variants["default"],
64
+ images: _images["default"],
72
65
  overrides: {
73
66
  codeView: _codeView["default"]
74
67
  }
@@ -0,0 +1,18 @@
1
+ declare const _default: {
2
+ avatar: {
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ };
8
+ container: {
9
+ xs: string[];
10
+ sm: string[];
11
+ md: string[];
12
+ lg: string[];
13
+ xl: string[];
14
+ xx: string[];
15
+ fluid: string[];
16
+ };
17
+ };
18
+ export default _default;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var avatar = {
9
+ sm: '24px',
10
+ md: '34px',
11
+ lg: '72px',
12
+ xl: '104px'
13
+ };
14
+ var container = {
15
+ xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
16
+ sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
17
+ md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
18
+ lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
19
+ xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
20
+ xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
21
+ fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
22
+ };
23
+ var _default = {
24
+ avatar: avatar,
25
+ container: container
26
+ };
27
+ exports["default"] = _default;
@@ -1,4 +1,10 @@
1
1
  export declare const fontSizes: {
2
+ avatar: {
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ };
2
8
  xs: string;
3
9
  sm: string;
4
10
  md: string;
@@ -7,15 +7,23 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.fontWeights = exports.fontSizes = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
10
+ var _sizes = _interopRequireDefault(require("./sizes"));
10
11
  var _fontWeights;
12
+ var fontSizeBase = 0.9375;
11
13
  var fontSizes = {
12
- 'xs': '0.75rem',
14
+ avatar: {
15
+ 'sm': "calc(".concat(_sizes["default"].avatar.sm, " * .4)"),
16
+ 'md': "calc(".concat(_sizes["default"].avatar.md, " * .4)"),
17
+ 'lg': "calc(".concat(_sizes["default"].avatar.lg, " * .4)"),
18
+ 'xl': "calc(".concat(_sizes["default"].avatar.xl, " * .4)")
19
+ },
20
+ 'xs': "".concat(fontSizeBase * 0.8, "rem"),
13
21
  'sm': '0.875rem',
14
- 'md': '.9375rem',
15
- 'lg': '1.171875rem',
16
- 'xl': '1.40625rem',
17
- 'xx': '1.640625rem',
18
- 'xxx': '2.109375rem'
22
+ 'md': "".concat(fontSizeBase * 1, "rem"),
23
+ 'lg': "".concat(fontSizeBase * 1.25, "rem"),
24
+ 'xl': "".concat(fontSizeBase * 1.5, "rem"),
25
+ 'xx': "".concat(fontSizeBase * 1.75, "rem"),
26
+ 'xxx': "".concat(fontSizeBase * 2.25, "rem")
19
27
  };
20
28
  exports.fontSizes = fontSizes;
21
29
  var fontWeights = (_fontWeights = {}, (0, _defineProperty2["default"])(_fontWeights, -1, 300), (0, _defineProperty2["default"])(_fontWeights, 0, 400), (0, _defineProperty2["default"])(_fontWeights, 1, 400), (0, _defineProperty2["default"])(_fontWeights, 2, 600), (0, _defineProperty2["default"])(_fontWeights, 3, 600), _fontWeights);
@@ -7,7 +7,7 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  exports["default"] = void 0;
8
8
  var interactive = {
9
9
  boxShadow: 'none',
10
- borderRadius: '24px',
10
+ borderRadius: '1rem',
11
11
  border: '1px solid',
12
12
  borderColor: 'gray-300',
13
13
  transition: 'border-color .15s ease-in',
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ avatar: {};
3
+ };
4
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var avatar = {};
9
+ var _default = {
10
+ avatar: avatar
11
+ };
12
+ exports["default"] = _default;
@@ -23,14 +23,14 @@ var nextGen = {
23
23
  px: 'md',
24
24
  textDecoration: 'none',
25
25
  borderRadius: '4px',
26
- lineHeight: '22.5px',
26
+ lineHeight: '1.5',
27
27
  minHeight: '22.5px',
28
28
  fontFamily: 'standard',
29
29
  '&.is-hovered': {
30
- color: '#155cba'
30
+ color: 'blue-600'
31
31
  },
32
32
  '&.is-pressed': {
33
- color: '#155cba'
33
+ color: 'blue-600'
34
34
  }
35
35
  };
36
36
  var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
@@ -49,7 +49,7 @@ var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
49
49
  transition: 'background-color .15s ease'
50
50
  },
51
51
  '&.is-selected': {
52
- color: '#155cba',
52
+ color: 'blue-600',
53
53
  '&:before': {
54
54
  backgroundColor: 'active_light'
55
55
  }
@@ -78,7 +78,7 @@ var text = _objectSpread({
78
78
  fontSize: 'sm',
79
79
  color: 'gray-500',
80
80
  fontFamily: 'standard',
81
- lineHeight: '1.75rem'
81
+ lineHeight: 'md'
82
82
  }
83
83
  }, hTags);
84
84
  exports.text = text;
@@ -454,38 +454,47 @@ declare const _default: {
454
454
  };
455
455
  };
456
456
  avatar: {
457
- xl: {
458
- borderRadius: string;
459
- textAlign: string;
460
- justifyContent: string;
461
- fontFamily: string;
462
- size: string;
463
- fontSize: string;
457
+ backgroundColor: string;
458
+ color: string;
459
+ cursor: string;
460
+ '&.is-orange': {
461
+ backgroundColor: string;
462
+ color: string;
464
463
  };
465
- lg: {
466
- fontSize: string;
467
- borderRadius: string;
468
- textAlign: string;
469
- justifyContent: string;
470
- fontFamily: string;
471
- size: string;
464
+ '&.is-green': {
465
+ backgroundColor: string;
466
+ color: string;
472
467
  };
473
- md: {
474
- fontSize: string;
475
- borderRadius: string;
476
- textAlign: string;
477
- justifyContent: string;
478
- fontFamily: string;
479
- size: string;
468
+ '&.is-purple': {
469
+ backgroundColor: string;
470
+ color: string;
480
471
  };
481
- sm: {
482
- fontSize: string;
483
- borderRadius: string;
484
- textAlign: string;
485
- justifyContent: string;
486
- fontFamily: string;
487
- size: string;
472
+ '&.is-pink': {
473
+ backgroundColor: string;
474
+ color: string;
475
+ };
476
+ '&.is-red': {
477
+ backgroundColor: string;
478
+ color: string;
479
+ };
480
+ '&.is-yellow': {
481
+ backgroundColor: string;
482
+ color: string;
483
+ };
484
+ '&.is-cyan': {
485
+ backgroundColor: string;
486
+ color: string;
488
487
  };
488
+ '&.is-teal': {
489
+ backgroundColor: string;
490
+ color: string;
491
+ };
492
+ display: string;
493
+ borderRadius: string;
494
+ textAlign: string;
495
+ alignItems: string;
496
+ justifyContent: string;
497
+ fontFamily: string;
489
498
  };
490
499
  listViewItem: {
491
500
  rightOfData: {
@@ -554,8 +563,17 @@ declare const _default: {
554
563
  borderRadius: string;
555
564
  border: string;
556
565
  borderColor: string;
557
- '& > div': {
558
- borderRadius: string;
566
+ '& > div > div': {
567
+ '& > div:first-of-type': {
568
+ '& > div > div': {
569
+ borderRadius: string;
570
+ };
571
+ };
572
+ '& > div:last-of-type': {
573
+ '& > div > div': {
574
+ borderRadius: string;
575
+ };
576
+ };
559
577
  };
560
578
  };
561
579
  };
@@ -248,33 +248,49 @@ var separator = {
248
248
  bg: 'gray-300'
249
249
  }
250
250
  };
251
- var avatarBase = {
251
+ var avatar = {
252
+ backgroundColor: 'lightcyan',
253
+ color: 'darkcyan',
254
+ cursor: 'pointer',
255
+ '&.is-orange': {
256
+ backgroundColor: 'lightorange',
257
+ color: 'darkorange'
258
+ },
259
+ '&.is-green': {
260
+ backgroundColor: 'lightgreen',
261
+ color: 'darkgreen'
262
+ },
263
+ '&.is-purple': {
264
+ backgroundColor: 'lightpurple',
265
+ color: 'darkpurple'
266
+ },
267
+ '&.is-pink': {
268
+ backgroundColor: 'lightpink',
269
+ color: 'darkpink'
270
+ },
271
+ '&.is-red': {
272
+ backgroundColor: 'lightred',
273
+ color: 'darkred'
274
+ },
275
+ '&.is-yellow': {
276
+ backgroundColor: 'lightyellow',
277
+ color: 'darkyellow'
278
+ },
279
+ '&.is-cyan': {
280
+ backgroundColor: 'lightcyan',
281
+ color: 'darkcyan'
282
+ },
283
+ '&.is-teal': {
284
+ backgroundColor: 'lightteal',
285
+ color: 'darkteal'
286
+ },
287
+ display: 'flex',
252
288
  borderRadius: '50%',
253
289
  textAlign: 'center',
290
+ alignItems: 'center',
254
291
  justifyContent: 'center',
255
292
  fontFamily: 'standard'
256
293
  };
257
- var avatar = {
258
- xl: _objectSpread({
259
- size: '104px',
260
- fontSize: 'calc(104px * .4)'
261
- }, avatarBase),
262
- lg: _objectSpread(_objectSpread({
263
- size: '72px'
264
- }, avatarBase), {}, {
265
- fontSize: 'calc(72px * .4)'
266
- }),
267
- md: _objectSpread(_objectSpread({
268
- size: '34px'
269
- }, avatarBase), {}, {
270
- fontSize: 'calc(34px * .4)'
271
- }),
272
- sm: _objectSpread(_objectSpread({
273
- size: '24px'
274
- }, avatarBase), {}, {
275
- fontSize: 'calc(24px * .4)'
276
- })
277
- };
278
294
  var progressBarContainer = {
279
295
  backgroundColor: 'gray-200',
280
296
  borderRadius: '.5rem',
@@ -314,8 +330,8 @@ var listViewItem = {
314
330
  }
315
331
  },
316
332
  styledContainer: {
317
- py: '1rem',
318
- px: '1.5rem',
333
+ py: 'md',
334
+ px: 'lg',
319
335
  bg: 'transparent',
320
336
  '&.is-hovered': {
321
337
  bg: 'transparent',
@@ -437,8 +453,17 @@ var listView = {
437
453
  borderRadius: '16px',
438
454
  border: '1px solid',
439
455
  borderColor: '#e7eef4',
440
- '& > div': {
441
- borderRadius: '16px'
456
+ '& > div > div': {
457
+ '& > div:first-of-type': {
458
+ '& > div > div': {
459
+ borderRadius: '16px 16px 0 0'
460
+ }
461
+ },
462
+ '& > div:last-of-type': {
463
+ '& > div > div': {
464
+ borderRadius: ' 0 0 16px 16px'
465
+ }
466
+ }
442
467
  }
443
468
  }
444
469
  };
@@ -1,9 +1,13 @@
1
1
  import { AvatarProps as ThemeUIAvatarProps, ThemeUICSSObject } from 'theme-ui';
2
2
  export interface AvatarProps extends ThemeUIAvatarProps {
3
3
  /** Source of avatar. */
4
- src: string;
4
+ src?: string;
5
5
  /** Alternative text for avatar. */
6
6
  alt?: string;
7
7
  /** Inline styling prop */
8
8
  sx?: ThemeUICSSObject;
9
+ /** If no image src is supplied, this text will render inside of a styled div */
10
+ defaultText?: string;
11
+ size?: string;
12
+ color?: string;
9
13
  }
@@ -1,14 +1,51 @@
1
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
1
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
12
+ var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx"];
13
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
2
15
  import React, { forwardRef } from 'react';
3
- import { Avatar as ThemeUIAvatar } from 'theme-ui';
16
+ import { Avatar as ThemeUIAvatar, Box } from 'theme-ui';
17
+ import { useStatusClasses } from '../../hooks';
4
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
19
  var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
6
- return ___EmotionJSX(ThemeUIAvatar, _extends({
7
- ref: ref
8
- }, props));
20
+ var _props$alt = props.alt,
21
+ alt = _props$alt === void 0 ? 'Avatar' : _props$alt,
22
+ defaultText = props.defaultText,
23
+ color = props.color,
24
+ className = props.className,
25
+ size = props.size,
26
+ src = props.src,
27
+ sx = props.sx,
28
+ others = _objectWithoutProperties(props, _excluded);
29
+ var _useStatusClasses = useStatusClasses(className, _defineProperty({}, "is-".concat(color), true)),
30
+ classNames = _useStatusClasses.classNames;
31
+ if (src) {
32
+ return ___EmotionJSX(ThemeUIAvatar, _extends({
33
+ ref: ref,
34
+ alt: alt,
35
+ src: src,
36
+ sx: _objectSpread({
37
+ size: size
38
+ }, sx)
39
+ }, others));
40
+ }
41
+ return ___EmotionJSX(Box, _extends({
42
+ variant: "avatar",
43
+ className: classNames,
44
+ sx: _objectSpread({
45
+ size: size,
46
+ fontSize: size
47
+ }, sx)
48
+ }, others), defaultText);
9
49
  });
10
- Avatar.defaultProps = {
11
- alt: 'Avatar'
12
- };
13
50
  Avatar.displayName = 'Avatar';
14
51
  export default Avatar;
@@ -5,8 +5,9 @@ import { render, screen } from '../../utils/testUtils/testWrapper';
5
5
  import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
6
6
  import Avatar from '.';
7
7
  import { jsx as ___EmotionJSX } from "@emotion/react";
8
+ var src = faker.image.lorempicsum.imageUrl(150, 150, false, undefined, '1');
8
9
  var defaultProps = {
9
- src: faker.image.lorempicsum.imageUrl(150, 150, false, undefined, '1')
10
+ src: src
10
11
  };
11
12
  var getComponent = function getComponent() {
12
13
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -31,4 +32,12 @@ test('an avatar is rendered with custom alt', function () {
31
32
  });
32
33
  var img = screen.getByRole('img');
33
34
  expect(img).toHaveAttribute('alt', 'Custom Alt');
35
+ });
36
+ test('an avatar is rendered with custom alt', function () {
37
+ getComponent({
38
+ src: undefined,
39
+ defaultText: 'KL'
40
+ });
41
+ var avatar = screen.getByText('KL');
42
+ expect(avatar).toBeInTheDocument();
34
43
  });
@@ -85,8 +85,8 @@ var nextGenCodeViewWrapper = {
85
85
  wordBreak: 'break-all'
86
86
  }
87
87
  },
88
- fontFamily: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace',
89
- lineHeight: 1.75
88
+ fontFamily: 'codeView',
89
+ lineHeight: 'md'
90
90
  },
91
91
  '&.has-no-copy-button': {
92
92
  pre: {
@@ -1,2 +1,2 @@
1
- var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'MultivaluesField', 'Text', 'Link', 'Card'];
1
+ var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card'];
2
2
  export default nextGenConvertedComponents;
@@ -15,10 +15,12 @@ import codeView from './codeView/codeView';
15
15
  import colors from './colors/colors';
16
16
  import buttons from './variants/button';
17
17
  import cards from './variants/cards';
18
+ import images from './variants/images';
18
19
  import links from './variants/links';
19
20
  import { text as newText } from './variants/text';
20
21
  import variants, { badges } from './variants/variants';
21
22
  import forms from './forms';
23
+ import sizes from './sizes';
22
24
  import spacing from './spacing';
23
25
  import { fontSizes, fontWeights } from './text';
24
26
  import './open_sans.css';
@@ -42,22 +44,13 @@ var nextGenTheme = {
42
44
  heading: '"Open Sans", sans-serif',
43
45
  codeView: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace'
44
46
  },
45
- sizes: {
46
- container: {
47
- xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
48
- sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
49
- md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
50
- lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
51
- xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
52
- xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
53
- fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
54
- }
55
- },
47
+ sizes: sizes,
56
48
  badges: badges,
57
49
  space: spacing,
58
50
  links: links,
59
51
  cards: cards,
60
52
  variants: variants,
53
+ images: images,
61
54
  overrides: {
62
55
  codeView: codeView
63
56
  }
@@ -0,0 +1,19 @@
1
+ var avatar = {
2
+ sm: '24px',
3
+ md: '34px',
4
+ lg: '72px',
5
+ xl: '104px'
6
+ };
7
+ var container = {
8
+ xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
9
+ sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
10
+ md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
11
+ lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
12
+ xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
13
+ xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
14
+ fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
15
+ };
16
+ export default {
17
+ avatar: avatar,
18
+ container: container
19
+ };
@@ -1,12 +1,20 @@
1
1
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
2
  var _fontWeights;
3
+ import sizes from './sizes';
4
+ var fontSizeBase = 0.9375;
3
5
  export var fontSizes = {
4
- 'xs': '0.75rem',
6
+ avatar: {
7
+ 'sm': "calc(".concat(sizes.avatar.sm, " * .4)"),
8
+ 'md': "calc(".concat(sizes.avatar.md, " * .4)"),
9
+ 'lg': "calc(".concat(sizes.avatar.lg, " * .4)"),
10
+ 'xl': "calc(".concat(sizes.avatar.xl, " * .4)")
11
+ },
12
+ 'xs': "".concat(fontSizeBase * 0.8, "rem"),
5
13
  'sm': '0.875rem',
6
- 'md': '.9375rem',
7
- 'lg': '1.171875rem',
8
- 'xl': '1.40625rem',
9
- 'xx': '1.640625rem',
10
- 'xxx': '2.109375rem'
14
+ 'md': "".concat(fontSizeBase * 1, "rem"),
15
+ 'lg': "".concat(fontSizeBase * 1.25, "rem"),
16
+ 'xl': "".concat(fontSizeBase * 1.5, "rem"),
17
+ 'xx': "".concat(fontSizeBase * 1.75, "rem"),
18
+ 'xxx': "".concat(fontSizeBase * 2.25, "rem")
11
19
  };
12
20
  export var fontWeights = (_fontWeights = {}, _defineProperty(_fontWeights, -1, 300), _defineProperty(_fontWeights, 0, 400), _defineProperty(_fontWeights, 1, 400), _defineProperty(_fontWeights, 2, 600), _defineProperty(_fontWeights, 3, 600), _fontWeights);
@@ -1,6 +1,6 @@
1
1
  var interactive = {
2
2
  boxShadow: 'none',
3
- borderRadius: '24px',
3
+ borderRadius: '1rem',
4
4
  border: '1px solid',
5
5
  borderColor: 'gray-300',
6
6
  transition: 'border-color .15s ease-in',
@@ -0,0 +1,4 @@
1
+ var avatar = {};
2
+ export default {
3
+ avatar: avatar
4
+ };
@@ -16,14 +16,14 @@ var nextGen = {
16
16
  px: 'md',
17
17
  textDecoration: 'none',
18
18
  borderRadius: '4px',
19
- lineHeight: '22.5px',
19
+ lineHeight: '1.5',
20
20
  minHeight: '22.5px',
21
21
  fontFamily: 'standard',
22
22
  '&.is-hovered': {
23
- color: '#155cba'
23
+ color: 'blue-600'
24
24
  },
25
25
  '&.is-pressed': {
26
- color: '#155cba'
26
+ color: 'blue-600'
27
27
  }
28
28
  };
29
29
  var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
@@ -42,7 +42,7 @@ var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
42
42
  transition: 'background-color .15s ease'
43
43
  },
44
44
  '&.is-selected': {
45
- color: '#155cba',
45
+ color: 'blue-600',
46
46
  '&:before': {
47
47
  backgroundColor: 'active_light'
48
48
  }
@@ -71,6 +71,6 @@ export var text = _objectSpread({
71
71
  fontSize: 'sm',
72
72
  color: 'gray-500',
73
73
  fontFamily: 'standard',
74
- lineHeight: '1.75rem'
74
+ lineHeight: 'md'
75
75
  }
76
76
  }, hTags);
@@ -239,33 +239,49 @@ var separator = {
239
239
  bg: 'gray-300'
240
240
  }
241
241
  };
242
- var avatarBase = {
242
+ var avatar = {
243
+ backgroundColor: 'lightcyan',
244
+ color: 'darkcyan',
245
+ cursor: 'pointer',
246
+ '&.is-orange': {
247
+ backgroundColor: 'lightorange',
248
+ color: 'darkorange'
249
+ },
250
+ '&.is-green': {
251
+ backgroundColor: 'lightgreen',
252
+ color: 'darkgreen'
253
+ },
254
+ '&.is-purple': {
255
+ backgroundColor: 'lightpurple',
256
+ color: 'darkpurple'
257
+ },
258
+ '&.is-pink': {
259
+ backgroundColor: 'lightpink',
260
+ color: 'darkpink'
261
+ },
262
+ '&.is-red': {
263
+ backgroundColor: 'lightred',
264
+ color: 'darkred'
265
+ },
266
+ '&.is-yellow': {
267
+ backgroundColor: 'lightyellow',
268
+ color: 'darkyellow'
269
+ },
270
+ '&.is-cyan': {
271
+ backgroundColor: 'lightcyan',
272
+ color: 'darkcyan'
273
+ },
274
+ '&.is-teal': {
275
+ backgroundColor: 'lightteal',
276
+ color: 'darkteal'
277
+ },
278
+ display: 'flex',
243
279
  borderRadius: '50%',
244
280
  textAlign: 'center',
281
+ alignItems: 'center',
245
282
  justifyContent: 'center',
246
283
  fontFamily: 'standard'
247
284
  };
248
- var avatar = {
249
- xl: _objectSpread({
250
- size: '104px',
251
- fontSize: 'calc(104px * .4)'
252
- }, avatarBase),
253
- lg: _objectSpread(_objectSpread({
254
- size: '72px'
255
- }, avatarBase), {}, {
256
- fontSize: 'calc(72px * .4)'
257
- }),
258
- md: _objectSpread(_objectSpread({
259
- size: '34px'
260
- }, avatarBase), {}, {
261
- fontSize: 'calc(34px * .4)'
262
- }),
263
- sm: _objectSpread(_objectSpread({
264
- size: '24px'
265
- }, avatarBase), {}, {
266
- fontSize: 'calc(24px * .4)'
267
- })
268
- };
269
285
  var progressBarContainer = {
270
286
  backgroundColor: 'gray-200',
271
287
  borderRadius: '.5rem',
@@ -305,8 +321,8 @@ var listViewItem = {
305
321
  }
306
322
  },
307
323
  styledContainer: {
308
- py: '1rem',
309
- px: '1.5rem',
324
+ py: 'md',
325
+ px: 'lg',
310
326
  bg: 'transparent',
311
327
  '&.is-hovered': {
312
328
  bg: 'transparent',
@@ -428,8 +444,17 @@ var listView = {
428
444
  borderRadius: '16px',
429
445
  border: '1px solid',
430
446
  borderColor: '#e7eef4',
431
- '& > div': {
432
- borderRadius: '16px'
447
+ '& > div > div': {
448
+ '& > div:first-of-type': {
449
+ '& > div > div': {
450
+ borderRadius: '16px 16px 0 0'
451
+ }
452
+ },
453
+ '& > div:last-of-type': {
454
+ '& > div > div': {
455
+ borderRadius: ' 0 0 16px 16px'
456
+ }
457
+ }
433
458
  }
434
459
  }
435
460
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.84.0-alpha.9",
3
+ "version": "2.85.0-alpha.14",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const Default: () => React.JSX.Element;
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = exports.Default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _ = require("../..");
11
- var _react2 = require("@emotion/react");
12
- var _default = {
13
- title: 'Next Gen Recipes/Default Avatar'
14
- };
15
- exports["default"] = _default;
16
- var Default = function Default() {
17
- return (0, _react2.jsx)(_.AstroProvider, {
18
- themeOverrides: [_.NextGenTheme]
19
- }, (0, _react2.jsx)(_.Box, {
20
- isRow: true,
21
- gap: "md",
22
- alignItems: "center"
23
- }, (0, _react2.jsx)(_.Box, {
24
- variant: "avatar.sm",
25
- backgroundColor: "green-100",
26
- color: "green-800"
27
- }, "AT"), (0, _react2.jsx)(_.Box, {
28
- variant: "avatar.md",
29
- backgroundColor: "blue-100",
30
- color: "blue-800"
31
- }, "LP"), (0, _react2.jsx)(_.Box, {
32
- variant: "avatar.lg",
33
- backgroundColor: "teal-100",
34
- color: "teal-800"
35
- }, "WP"), (0, _react2.jsx)(_.Box, {
36
- variant: "avatar.xl",
37
- backgroundColor: "red-100",
38
- color: "red-800"
39
- }, "JS")));
40
- };
41
- exports.Default = Default;
@@ -1,31 +0,0 @@
1
- import React from 'react';
2
- import { AstroProvider, Box, NextGenTheme } from '../..';
3
- import { jsx as ___EmotionJSX } from "@emotion/react";
4
- export default {
5
- title: 'Next Gen Recipes/Default Avatar'
6
- };
7
- export var Default = function Default() {
8
- return ___EmotionJSX(AstroProvider, {
9
- themeOverrides: [NextGenTheme]
10
- }, ___EmotionJSX(Box, {
11
- isRow: true,
12
- gap: "md",
13
- alignItems: "center"
14
- }, ___EmotionJSX(Box, {
15
- variant: "avatar.sm",
16
- backgroundColor: "green-100",
17
- color: "green-800"
18
- }, "AT"), ___EmotionJSX(Box, {
19
- variant: "avatar.md",
20
- backgroundColor: "blue-100",
21
- color: "blue-800"
22
- }, "LP"), ___EmotionJSX(Box, {
23
- variant: "avatar.lg",
24
- backgroundColor: "teal-100",
25
- color: "teal-800"
26
- }, "WP"), ___EmotionJSX(Box, {
27
- variant: "avatar.xl",
28
- backgroundColor: "red-100",
29
- color: "red-800"
30
- }, "JS")));
31
- };