orcs-design-system 2.0.88 → 2.0.90

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,4 +1,6 @@
1
1
  import React from "react";
2
+ import Badge from "../Badge";
3
+ import Flex from "../Flex";
2
4
  import Box from "../Box";
3
5
  import Spacer from "../Spacer";
4
6
  import StyledLink from "../StyledLink";
@@ -115,6 +117,37 @@ export var large = function large() {
115
117
  }));
116
118
  };
117
119
  large.storyName = "Large";
120
+ export var subtitleContent = function subtitleContent() {
121
+ return /*#__PURE__*/React.createElement(Spacer, {
122
+ my: 4
123
+ }, /*#__PURE__*/React.createElement(Avatar, {
124
+ sizing: "large",
125
+ title: /*#__PURE__*/React.createElement(StyledLink, {
126
+ href: "#"
127
+ }, "Ayden Lundgre"),
128
+ initials: "AL",
129
+ image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/62f1f587bc47b25676f9ed1d_bw_avatar_adam.png",
130
+ subtitleContent: /*#__PURE__*/React.createElement(Badge, {
131
+ mt: "xs"
132
+ }, "Senior Business Analyst")
133
+ }), /*#__PURE__*/React.createElement(Avatar, {
134
+ sizing: "large",
135
+ title: /*#__PURE__*/React.createElement(StyledLink, {
136
+ href: "#"
137
+ }, "Ayden Lundgre"),
138
+ initials: "AL",
139
+ image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/62f1f587bc47b25676f9ed1d_bw_avatar_adam.png",
140
+ subtitleContent: /*#__PURE__*/React.createElement(Flex, {
141
+ flexWrap: "wrap"
142
+ }, /*#__PURE__*/React.createElement(Spacer, {
143
+ mr: "xs",
144
+ mt: "xs"
145
+ }, /*#__PURE__*/React.createElement(Badge, null, "Senior Business Analyst"), /*#__PURE__*/React.createElement(Badge, {
146
+ variant: "warning"
147
+ }, "Scrum Master")))
148
+ }));
149
+ };
150
+ subtitleContent.storyName = "Alternative subtitle content";
118
151
  export var inverted = function inverted() {
119
152
  return /*#__PURE__*/React.createElement(Box, {
120
153
  bg: "greyDarkest",
@@ -240,6 +273,11 @@ large.__docgenInfo = {
240
273
  "methods": [],
241
274
  "displayName": "large"
242
275
  };
276
+ subtitleContent.__docgenInfo = {
277
+ "description": "",
278
+ "methods": [],
279
+ "displayName": "subtitleContent"
280
+ };
243
281
  inverted.__docgenInfo = {
244
282
  "description": "",
245
283
  "methods": [],
@@ -48,6 +48,7 @@ var TextContent = styled("div").withConfig({
48
48
  fontSize: themeGet("fontSizes.1")(props)
49
49
  },
50
50
  large: {
51
+ marginLeft: "16px",
51
52
  fontSize: themeGet("fontSizes.2")(props)
52
53
  }
53
54
  }
@@ -83,8 +84,8 @@ var Image = styled("img").withConfig({
83
84
  height: "38px"
84
85
  },
85
86
  large: {
86
- width: "70px",
87
- height: "70px"
87
+ width: "80px",
88
+ height: "80px"
88
89
  }
89
90
  }
90
91
  }), variant({
@@ -135,8 +136,8 @@ var Shape = styled("div").withConfig({
135
136
  height: "38px"
136
137
  },
137
138
  large: {
138
- width: "70px",
139
- height: "70px"
139
+ width: "80px",
140
+ height: "80px"
140
141
  },
141
142
  "default": {}
142
143
  }
@@ -235,16 +236,18 @@ var Avatar = function Avatar(_ref) {
235
236
  initials = _ref.initials,
236
237
  title = _ref.title,
237
238
  subtitle = _ref.subtitle,
239
+ subtitleContent = _ref.subtitleContent,
238
240
  type = _ref.type,
239
241
  theme = _ref.theme,
240
242
  shape = _ref.shape,
241
243
  _ref$uppercase = _ref.uppercase,
242
244
  uppercase = _ref$uppercase === void 0 ? true : _ref$uppercase,
243
245
  whiteInitials = _ref.whiteInitials,
244
- props = _objectWithoutProperties(_ref, ["sizing", "image", "initials", "title", "subtitle", "type", "theme", "shape", "uppercase", "whiteInitials"]);
246
+ props = _objectWithoutProperties(_ref, ["sizing", "image", "initials", "title", "subtitle", "subtitleContent", "type", "theme", "shape", "uppercase", "whiteInitials"]);
245
247
 
246
248
  var hasTitle = !!title;
247
249
  var hasSubtitle = !!subtitle;
250
+ var hasSubtitleContent = !!subtitleContent;
248
251
  var component = /*#__PURE__*/React.createElement(AvatarWrapper, _extends({}, props, {
249
252
  type: type,
250
253
  sizing: sizing
@@ -276,7 +279,7 @@ var Avatar = function Avatar(_ref) {
276
279
  }, title), hasSubtitle && /*#__PURE__*/React.createElement(Subtitle, {
277
280
  type: type,
278
281
  sizing: sizing
279
- }, subtitle)));
282
+ }, subtitle), hasSubtitleContent && subtitleContent));
280
283
  return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
281
284
  theme: theme
282
285
  }, component) : component;
@@ -298,6 +301,9 @@ Avatar.propTypes = {
298
301
  /** Specifies initials of person if available */
299
302
  initials: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
300
303
 
304
+ /** Specifies custom content for avatar subtitle */
305
+ subtitleContent: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
306
+
301
307
  /** Turns white initials on for custom `Circle` backgrounds */
302
308
  whiteInitials: PropTypes.bool,
303
309
 
@@ -396,6 +402,18 @@ Avatar.__docgenInfo = {
396
402
  "required": false,
397
403
  "description": "Specifies initials of person if available"
398
404
  },
405
+ "subtitleContent": {
406
+ "type": {
407
+ "name": "union",
408
+ "value": [{
409
+ "name": "element"
410
+ }, {
411
+ "name": "node"
412
+ }]
413
+ },
414
+ "required": false,
415
+ "description": "Specifies custom content for avatar subtitle"
416
+ },
399
417
  "whiteInitials": {
400
418
  "type": {
401
419
  "name": "bool"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.0.88",
3
+ "version": "2.0.90",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",