orcs-design-system 2.0.87 → 2.0.89

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";
@@ -90,6 +92,62 @@ export var small = function small() {
90
92
  }));
91
93
  };
92
94
  small.storyName = "Small";
95
+ export var large = function large() {
96
+ return /*#__PURE__*/React.createElement(Spacer, {
97
+ my: 4
98
+ }, /*#__PURE__*/React.createElement(Avatar, {
99
+ sizing: "large",
100
+ title: "Ayden Lundgre",
101
+ subtitle: "Senior Business Analyst",
102
+ initials: "AL"
103
+ }), /*#__PURE__*/React.createElement(Avatar, {
104
+ sizing: "large",
105
+ title: "Ayden Lundgre",
106
+ subtitle: "Senior Business Analyst",
107
+ initials: "AL",
108
+ image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/62f1f587bc47b25676f9ed1d_bw_avatar_adam.png"
109
+ }), /*#__PURE__*/React.createElement(Avatar, {
110
+ sizing: "large",
111
+ title: /*#__PURE__*/React.createElement(StyledLink, {
112
+ href: "#"
113
+ }, "Ayden Lundgre"),
114
+ subtitle: "Senior Business Analyst",
115
+ initials: "AL",
116
+ image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/62f1f587bc47b25676f9ed1d_bw_avatar_adam.png"
117
+ }));
118
+ };
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";
93
151
  export var inverted = function inverted() {
94
152
  return /*#__PURE__*/React.createElement(Box, {
95
153
  bg: "greyDarkest",
@@ -210,6 +268,16 @@ small.__docgenInfo = {
210
268
  "methods": [],
211
269
  "displayName": "small"
212
270
  };
271
+ large.__docgenInfo = {
272
+ "description": "",
273
+ "methods": [],
274
+ "displayName": "large"
275
+ };
276
+ subtitleContent.__docgenInfo = {
277
+ "description": "",
278
+ "methods": [],
279
+ "displayName": "subtitleContent"
280
+ };
213
281
  inverted.__docgenInfo = {
214
282
  "description": "",
215
283
  "methods": [],
@@ -22,6 +22,9 @@ var AvatarWrapper = styled("div").withConfig({
22
22
  small: {
23
23
  fontSize: themeGet("fontSizes.1")(props)
24
24
  },
25
+ large: {
26
+ fontSize: themeGet("fontSizes.2")(props)
27
+ },
25
28
  "default": {}
26
29
  }
27
30
  });
@@ -43,6 +46,9 @@ var TextContent = styled("div").withConfig({
43
46
  variants: {
44
47
  small: {
45
48
  fontSize: themeGet("fontSizes.1")(props)
49
+ },
50
+ large: {
51
+ fontSize: themeGet("fontSizes.2")(props)
46
52
  }
47
53
  }
48
54
  });
@@ -75,6 +81,10 @@ var Image = styled("img").withConfig({
75
81
  small: {
76
82
  width: "38px",
77
83
  height: "38px"
84
+ },
85
+ large: {
86
+ width: "70px",
87
+ height: "70px"
78
88
  }
79
89
  }
80
90
  }), variant({
@@ -124,6 +134,10 @@ var Shape = styled("div").withConfig({
124
134
  width: "38px",
125
135
  height: "38px"
126
136
  },
137
+ large: {
138
+ width: "70px",
139
+ height: "70px"
140
+ },
127
141
  "default": {}
128
142
  }
129
143
  }), function (props) {
@@ -159,7 +173,16 @@ var Title = styled(H3).withConfig({
159
173
  prop: "sizing",
160
174
  variants: {
161
175
  small: {
162
- fontSize: themeGet("fontSizes.2")(props)
176
+ fontSize: themeGet("fontSizes.2")(props),
177
+ a: {
178
+ fontSize: themeGet("fontSizes.2")(props)
179
+ }
180
+ },
181
+ large: {
182
+ fontSize: themeGet("fontSizes.4")(props),
183
+ a: {
184
+ fontSize: themeGet("fontSizes.4")(props)
185
+ }
163
186
  }
164
187
  }
165
188
  });
@@ -187,6 +210,10 @@ var Subtitle = styled(Text).withConfig({
187
210
  small: {
188
211
  fontSize: themeGet("fontSizes.1")(props),
189
212
  fontWeight: themeGet("fontWeights.1")(props)
213
+ },
214
+ large: {
215
+ fontSize: themeGet("fontSizes.2")(props),
216
+ fontWeight: themeGet("fontWeights.1")(props)
190
217
  }
191
218
  }
192
219
  });
@@ -208,16 +235,18 @@ var Avatar = function Avatar(_ref) {
208
235
  initials = _ref.initials,
209
236
  title = _ref.title,
210
237
  subtitle = _ref.subtitle,
238
+ subtitleContent = _ref.subtitleContent,
211
239
  type = _ref.type,
212
240
  theme = _ref.theme,
213
241
  shape = _ref.shape,
214
242
  _ref$uppercase = _ref.uppercase,
215
243
  uppercase = _ref$uppercase === void 0 ? true : _ref$uppercase,
216
244
  whiteInitials = _ref.whiteInitials,
217
- props = _objectWithoutProperties(_ref, ["sizing", "image", "initials", "title", "subtitle", "type", "theme", "shape", "uppercase", "whiteInitials"]);
245
+ props = _objectWithoutProperties(_ref, ["sizing", "image", "initials", "title", "subtitle", "subtitleContent", "type", "theme", "shape", "uppercase", "whiteInitials"]);
218
246
 
219
247
  var hasTitle = !!title;
220
248
  var hasSubtitle = !!subtitle;
249
+ var hasSubtitleContent = !!subtitleContent;
221
250
  var component = /*#__PURE__*/React.createElement(AvatarWrapper, _extends({}, props, {
222
251
  type: type,
223
252
  sizing: sizing
@@ -249,7 +278,7 @@ var Avatar = function Avatar(_ref) {
249
278
  }, title), hasSubtitle && /*#__PURE__*/React.createElement(Subtitle, {
250
279
  type: type,
251
280
  sizing: sizing
252
- }, subtitle)));
281
+ }, subtitle), hasSubtitleContent && subtitleContent));
253
282
  return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
254
283
  theme: theme
255
284
  }, component) : component;
@@ -257,7 +286,7 @@ var Avatar = function Avatar(_ref) {
257
286
 
258
287
  Avatar.propTypes = {
259
288
  /** Changes the sizing of the Avatar component */
260
- sizing: PropTypes.oneOf(["small", "default"]),
289
+ sizing: PropTypes.oneOf(["small", "large", "default"]),
261
290
 
262
291
  /** Changes the shape of the Avatar component */
263
292
  shape: PropTypes.oneOf(["hexagon", "tag", "default"]),
@@ -271,6 +300,9 @@ Avatar.propTypes = {
271
300
  /** Specifies initials of person if available */
272
301
  initials: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
273
302
 
303
+ /** Specifies custom content for avatar subtitle */
304
+ subtitleContent: PropTypes.oneOfType([PropTypes.element, PropTypes.node]),
305
+
274
306
  /** Turns white initials on for custom `Circle` backgrounds */
275
307
  whiteInitials: PropTypes.bool,
276
308
 
@@ -308,6 +340,9 @@ Avatar.__docgenInfo = {
308
340
  "value": [{
309
341
  "value": "\"small\"",
310
342
  "computed": false
343
+ }, {
344
+ "value": "\"large\"",
345
+ "computed": false
311
346
  }, {
312
347
  "value": "\"default\"",
313
348
  "computed": false
@@ -366,6 +401,18 @@ Avatar.__docgenInfo = {
366
401
  "required": false,
367
402
  "description": "Specifies initials of person if available"
368
403
  },
404
+ "subtitleContent": {
405
+ "type": {
406
+ "name": "union",
407
+ "value": [{
408
+ "name": "element"
409
+ }, {
410
+ "name": "node"
411
+ }]
412
+ },
413
+ "required": false,
414
+ "description": "Specifies custom content for avatar subtitle"
415
+ },
369
416
  "whiteInitials": {
370
417
  "type": {
371
418
  "name": "bool"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.0.87",
3
+ "version": "2.0.89",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",