orcs-design-system 3.1.9 → 3.1.11
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.
|
@@ -14,7 +14,7 @@ export var defaultAvatar = function defaultAvatar() {
|
|
|
14
14
|
title: "Ayden Lundgre",
|
|
15
15
|
initials: "AL",
|
|
16
16
|
subtitle: "Senior Business Analyst",
|
|
17
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
17
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
defaultAvatar.storyName = "Default";
|
|
@@ -37,7 +37,7 @@ export var imageOnly = function imageOnly() {
|
|
|
37
37
|
return /*#__PURE__*/React.createElement(Spacer, {
|
|
38
38
|
my: 4
|
|
39
39
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
40
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
40
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
41
41
|
imageAlt: "Ayden Lundgre"
|
|
42
42
|
}));
|
|
43
43
|
};
|
|
@@ -58,7 +58,7 @@ export var nameLink = function nameLink() {
|
|
|
58
58
|
}, "Ayden Lundgre"),
|
|
59
59
|
subtitle: "Senior Business Analyst",
|
|
60
60
|
initials: "AL",
|
|
61
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
61
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
62
62
|
imageAlt: "Ayden Lundgre"
|
|
63
63
|
});
|
|
64
64
|
};
|
|
@@ -76,7 +76,7 @@ export var small = function small() {
|
|
|
76
76
|
title: "Ayden Lundgre",
|
|
77
77
|
subtitle: "Senior Business Analyst",
|
|
78
78
|
initials: "AL",
|
|
79
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
79
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
80
80
|
}), /*#__PURE__*/React.createElement(Avatar, {
|
|
81
81
|
sizing: "small",
|
|
82
82
|
title: /*#__PURE__*/React.createElement(StyledLink, {
|
|
@@ -84,7 +84,7 @@ export var small = function small() {
|
|
|
84
84
|
}, "Ayden Lundgre"),
|
|
85
85
|
subtitle: "Senior Business Analyst",
|
|
86
86
|
initials: "AL",
|
|
87
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
87
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
88
88
|
}));
|
|
89
89
|
};
|
|
90
90
|
small.storyName = "Small";
|
|
@@ -102,7 +102,7 @@ export var large = function large() {
|
|
|
102
102
|
title: "Ayden Lundgre",
|
|
103
103
|
subtitle: "Senior Business Analyst",
|
|
104
104
|
initials: "AL",
|
|
105
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
105
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
106
106
|
}), /*#__PURE__*/React.createElement(Avatar, {
|
|
107
107
|
sizing: "large",
|
|
108
108
|
title: /*#__PURE__*/React.createElement(StyledLink, {
|
|
@@ -110,7 +110,7 @@ export var large = function large() {
|
|
|
110
110
|
}, "Ayden Lundgre"),
|
|
111
111
|
subtitle: "Senior Business Analyst",
|
|
112
112
|
initials: "AL",
|
|
113
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
113
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
114
114
|
}));
|
|
115
115
|
};
|
|
116
116
|
large.storyName = "Large";
|
|
@@ -135,7 +135,7 @@ export var subtitleContent = function subtitleContent() {
|
|
|
135
135
|
href: "#"
|
|
136
136
|
}, "Ayden Lundgre"),
|
|
137
137
|
initials: "AL",
|
|
138
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
138
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
139
139
|
subtitleContent: /*#__PURE__*/React.createElement(Badge, {
|
|
140
140
|
mt: "xs"
|
|
141
141
|
}, "Senior Business Analyst")
|
|
@@ -145,7 +145,7 @@ export var subtitleContent = function subtitleContent() {
|
|
|
145
145
|
href: "#"
|
|
146
146
|
}, "Ayden Lundgre"),
|
|
147
147
|
initials: "AL",
|
|
148
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
148
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
149
149
|
imageAlt: "Ayden Lundgre",
|
|
150
150
|
subtitleContent: /*#__PURE__*/React.createElement(Flex, {
|
|
151
151
|
flexWrap: "wrap"
|
|
@@ -167,7 +167,7 @@ export var localTime = function localTime() {
|
|
|
167
167
|
href: "#"
|
|
168
168
|
}, "Ayden Lundgre"),
|
|
169
169
|
initials: "AL",
|
|
170
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
170
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
171
171
|
imageAlt: "Ayden Lundgre",
|
|
172
172
|
subtitleContent: /*#__PURE__*/React.createElement(Badge, {
|
|
173
173
|
mt: "xs"
|
|
@@ -187,7 +187,7 @@ export var inverted = function inverted() {
|
|
|
187
187
|
title: "Ayden Lundgre",
|
|
188
188
|
subtitle: "Senior Business Analyst",
|
|
189
189
|
initials: "AL",
|
|
190
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
190
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png"
|
|
191
191
|
}), /*#__PURE__*/React.createElement(Avatar, {
|
|
192
192
|
type: "inverted",
|
|
193
193
|
title: /*#__PURE__*/React.createElement(StyledLink, {
|
|
@@ -195,7 +195,7 @@ export var inverted = function inverted() {
|
|
|
195
195
|
}, "Ayden Lundgre"),
|
|
196
196
|
subtitle: "Senior Business Analyst",
|
|
197
197
|
initials: "AL",
|
|
198
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
198
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
199
199
|
imageAlt: "Ayden Lundgre"
|
|
200
200
|
}), /*#__PURE__*/React.createElement(Avatar, {
|
|
201
201
|
type: "inverted",
|
|
@@ -213,7 +213,7 @@ export var inverted = function inverted() {
|
|
|
213
213
|
}, "Ayden Lundgre"),
|
|
214
214
|
subtitle: "Senior Business Analyst",
|
|
215
215
|
initials: "AL",
|
|
216
|
-
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
216
|
+
image: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85f6932722401c73ad_ethan.png",
|
|
217
217
|
imageAlt: "Ayden Lundgre"
|
|
218
218
|
})));
|
|
219
219
|
};
|
|
@@ -9,7 +9,7 @@ export var defaultHeader = function defaultHeader() {
|
|
|
9
9
|
return /*#__PURE__*/React.createElement(HeaderSimple, {
|
|
10
10
|
appName: "App Name",
|
|
11
11
|
userName: "Michael",
|
|
12
|
-
avatarSource: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
12
|
+
avatarSource: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85368bfb13dac1205e_harry.png",
|
|
13
13
|
currentWorskapce: "Org Design Workspace"
|
|
14
14
|
});
|
|
15
15
|
};
|
|
@@ -19,7 +19,7 @@ export var headerWithSearch = function headerWithSearch() {
|
|
|
19
19
|
variant: "search",
|
|
20
20
|
appName: "App Name",
|
|
21
21
|
userName: "Michael",
|
|
22
|
-
avatarSource: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/
|
|
22
|
+
avatarSource: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85368bfb13dac1205e_harry.png",
|
|
23
23
|
currentWorskapce: "Org Design Workspace",
|
|
24
24
|
searchComponent: /*#__PURE__*/React.createElement(TextInput, {
|
|
25
25
|
fullWidth: true,
|
|
@@ -45,17 +45,17 @@ export var showInfo = function showInfo() {
|
|
|
45
45
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
46
46
|
selected: true,
|
|
47
47
|
showInfo: true,
|
|
48
|
-
tagType: "
|
|
48
|
+
tagType: "Skill"
|
|
49
49
|
}, "devops"), /*#__PURE__*/React.createElement(Tag, {
|
|
50
50
|
selected: true,
|
|
51
51
|
showInfo: true,
|
|
52
|
-
tagType: "
|
|
52
|
+
tagType: "Skill"
|
|
53
53
|
}, "software engineering"), /*#__PURE__*/React.createElement(Tag, {
|
|
54
54
|
showInfo: true,
|
|
55
|
-
tagType: "
|
|
55
|
+
tagType: "Skill"
|
|
56
56
|
}, "product design"), /*#__PURE__*/React.createElement(Tag, {
|
|
57
57
|
showInfo: true,
|
|
58
|
-
tagType: "
|
|
58
|
+
tagType: "Skill"
|
|
59
59
|
}, "digital transformation"));
|
|
60
60
|
};
|
|
61
61
|
export var showEdit = function showEdit() {
|
|
@@ -201,11 +201,139 @@ export var smallVariant = function smallVariant() {
|
|
|
201
201
|
}, "Agile Coach");
|
|
202
202
|
};
|
|
203
203
|
export var highlightedVariant = function highlightedVariant() {
|
|
204
|
-
return /*#__PURE__*/React.createElement(
|
|
204
|
+
return /*#__PURE__*/React.createElement(Spacer, {
|
|
205
|
+
m: "2px"
|
|
206
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
205
207
|
selected: true,
|
|
206
208
|
highlighted: true,
|
|
207
209
|
tagType: "specialist"
|
|
208
|
-
}, "Agile Coach");
|
|
210
|
+
}, "Agile Coach"));
|
|
211
|
+
};
|
|
212
|
+
export var personTag = function personTag() {
|
|
213
|
+
return /*#__PURE__*/React.createElement(Spacer, {
|
|
214
|
+
m: "2px"
|
|
215
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
216
|
+
disabled: true,
|
|
217
|
+
personEntity: {
|
|
218
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
219
|
+
}
|
|
220
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
221
|
+
disabled: true,
|
|
222
|
+
personEntity: {
|
|
223
|
+
initials: "MD"
|
|
224
|
+
}
|
|
225
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
226
|
+
disabled: true,
|
|
227
|
+
personEntity: true
|
|
228
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
229
|
+
personEntity: {
|
|
230
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
231
|
+
}
|
|
232
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
233
|
+
personEntity: {
|
|
234
|
+
initials: "MD"
|
|
235
|
+
}
|
|
236
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
237
|
+
personEntity: true
|
|
238
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
239
|
+
selected: true,
|
|
240
|
+
personEntity: {
|
|
241
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
242
|
+
}
|
|
243
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
244
|
+
selected: true,
|
|
245
|
+
personEntity: {
|
|
246
|
+
initials: "MD"
|
|
247
|
+
}
|
|
248
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
249
|
+
selected: true,
|
|
250
|
+
personEntity: true
|
|
251
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
252
|
+
selected: true,
|
|
253
|
+
highlighted: true,
|
|
254
|
+
personEntity: {
|
|
255
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
256
|
+
}
|
|
257
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
258
|
+
selected: true,
|
|
259
|
+
highlighted: true,
|
|
260
|
+
personEntity: {
|
|
261
|
+
initials: "MD"
|
|
262
|
+
}
|
|
263
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
264
|
+
selected: true,
|
|
265
|
+
highlighted: true,
|
|
266
|
+
personEntity: true
|
|
267
|
+
}, "Maximillian Dubois"));
|
|
268
|
+
};
|
|
269
|
+
export var personTagSmall = function personTagSmall() {
|
|
270
|
+
return /*#__PURE__*/React.createElement(Spacer, {
|
|
271
|
+
m: "2px"
|
|
272
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
273
|
+
small: true,
|
|
274
|
+
disabled: true,
|
|
275
|
+
personEntity: {
|
|
276
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
277
|
+
}
|
|
278
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
279
|
+
small: true,
|
|
280
|
+
disabled: true,
|
|
281
|
+
personEntity: {
|
|
282
|
+
initials: "MD"
|
|
283
|
+
}
|
|
284
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
285
|
+
small: true,
|
|
286
|
+
disabled: true,
|
|
287
|
+
personEntity: true
|
|
288
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
289
|
+
small: true,
|
|
290
|
+
personEntity: {
|
|
291
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
292
|
+
}
|
|
293
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
294
|
+
small: true,
|
|
295
|
+
personEntity: {
|
|
296
|
+
initials: "MD"
|
|
297
|
+
}
|
|
298
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
299
|
+
small: true,
|
|
300
|
+
personEntity: true
|
|
301
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
302
|
+
small: true,
|
|
303
|
+
selected: true,
|
|
304
|
+
personEntity: {
|
|
305
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
306
|
+
}
|
|
307
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
308
|
+
small: true,
|
|
309
|
+
selected: true,
|
|
310
|
+
personEntity: {
|
|
311
|
+
initials: "MD"
|
|
312
|
+
}
|
|
313
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
314
|
+
small: true,
|
|
315
|
+
selected: true,
|
|
316
|
+
personEntity: true
|
|
317
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
318
|
+
small: true,
|
|
319
|
+
selected: true,
|
|
320
|
+
highlighted: true,
|
|
321
|
+
personEntity: {
|
|
322
|
+
avatarSrc: "https://uploads-ssl.webflow.com/5f4852427e784b4cada3e0d0/65389e85af9ec00f6c03f592_kai.png"
|
|
323
|
+
}
|
|
324
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
325
|
+
small: true,
|
|
326
|
+
selected: true,
|
|
327
|
+
highlighted: true,
|
|
328
|
+
personEntity: {
|
|
329
|
+
initials: "MD"
|
|
330
|
+
}
|
|
331
|
+
}, "Maximillian Dubois"), /*#__PURE__*/React.createElement(Tag, {
|
|
332
|
+
small: true,
|
|
333
|
+
selected: true,
|
|
334
|
+
highlighted: true,
|
|
335
|
+
personEntity: true
|
|
336
|
+
}, "Maximillian Dubois"));
|
|
209
337
|
};
|
|
210
338
|
defaultTag.__docgenInfo = {
|
|
211
339
|
"description": "",
|
|
@@ -261,4 +389,14 @@ highlightedVariant.__docgenInfo = {
|
|
|
261
389
|
"description": "",
|
|
262
390
|
"methods": [],
|
|
263
391
|
"displayName": "highlightedVariant"
|
|
392
|
+
};
|
|
393
|
+
personTag.__docgenInfo = {
|
|
394
|
+
"description": "",
|
|
395
|
+
"methods": [],
|
|
396
|
+
"displayName": "personTag"
|
|
397
|
+
};
|
|
398
|
+
personTagSmall.__docgenInfo = {
|
|
399
|
+
"description": "",
|
|
400
|
+
"methods": [],
|
|
401
|
+
"displayName": "personTagSmall"
|
|
264
402
|
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["selected", "onSelect", "disabled", "showRemove", "onRemove", "theme", "tagType", "showEdit", "onEdit", "showInfo", "onInfo", "showStrikeThrough", "children", "isPending", "small", "highlighted"];
|
|
3
|
+
var _excluded = ["selected", "onSelect", "disabled", "showRemove", "onRemove", "theme", "tagType", "showEdit", "onEdit", "showInfo", "onInfo", "showStrikeThrough", "children", "isPending", "small", "highlighted", "personEntity"];
|
|
3
4
|
import React from "react";
|
|
4
5
|
import styled, { css, ThemeProvider } from "styled-components";
|
|
5
6
|
import PropTypes from "prop-types";
|
|
6
7
|
import { space, layout } from "styled-system";
|
|
8
|
+
import Avatar from "../Avatar";
|
|
7
9
|
import Icon from "../Icon";
|
|
8
10
|
import Loading from "../Loading";
|
|
9
11
|
import { themeGet } from "@styled-system/theme-get";
|
|
10
12
|
var TagWrapper = styled.div.withConfig({
|
|
11
13
|
displayName: "Tag__TagWrapper",
|
|
12
14
|
componentId: "sc-1dh2aa8-0"
|
|
13
|
-
})(["", " ", " display:flex;align-items:stretch;height:100%;justify-content:center;> button{margin:0;}"], space, layout)
|
|
15
|
+
})(["", " ", " display:flex;align-items:stretch;height:100%;min-height:", ";justify-content:center;> button{margin:0;}"], space, layout, function (props) {
|
|
16
|
+
return props.small ? "26px" : "30px";
|
|
17
|
+
});
|
|
14
18
|
var TagValue = styled.button.attrs(function (props) {
|
|
15
19
|
return {
|
|
16
20
|
"aria-pressed": props.selected
|
|
@@ -33,7 +37,7 @@ var TagValue = styled.button.attrs(function (props) {
|
|
|
33
37
|
}, function (props) {
|
|
34
38
|
return props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.warningDark")(props) : themeGet("colors.primary")(props);
|
|
35
39
|
}, function (props) {
|
|
36
|
-
return props.showEdit || props.showInfo || props.showRemove ? "
|
|
40
|
+
return (props.showEdit || props.showInfo || props.showRemove) && props.small ? "2px 4px 2px 6px" : props.showEdit || props.showInfo || props.showRemove ? "3px 4px 3px 10px" : props.small ? "2px 6px 2px 6px" : "3px 10px 3px 10px";
|
|
37
41
|
}, function (props) {
|
|
38
42
|
return props.disabled ? themeGet("colors.greyLighter")(props) : props.selected && props.highlighted ? themeGet("colors.warningDark")(props) : props.selected ? themeGet("colors.primary")(props) : themeGet("colors.white")(props);
|
|
39
43
|
}, function (props) {
|
|
@@ -54,18 +58,18 @@ var TagValue = styled.button.attrs(function (props) {
|
|
|
54
58
|
var TagValueText = styled.div.withConfig({
|
|
55
59
|
displayName: "Tag__TagValueText",
|
|
56
60
|
componentId: "sc-1dh2aa8-2"
|
|
57
|
-
})(["text-decoration:", ";text-overflow:ellipsis;white-space:normal;text-align:left;line-height:", ";"], function (props) {
|
|
61
|
+
})(["text-decoration:", ";text-overflow:ellipsis;white-space:normal;text-align:left;line-height:", ";padding-bottom:1px;"], function (props) {
|
|
58
62
|
return props.showStrikeThrough ? "line-through" : "none";
|
|
59
63
|
}, function (props) {
|
|
60
|
-
return themeGet("fontSizes.1")(props);
|
|
64
|
+
return props.small ? themeGet("fontSizes.0")(props) : themeGet("fontSizes.1")(props);
|
|
61
65
|
});
|
|
62
66
|
var TagActionIconWrapper = styled(TagValue).withConfig({
|
|
63
67
|
displayName: "Tag__TagActionIconWrapper",
|
|
64
68
|
componentId: "sc-1dh2aa8-3"
|
|
65
|
-
})(["border-radius:", ";padding:", ";&:focus{z-index:2;}", ""], function (props) {
|
|
69
|
+
})(["border-radius:", ";padding:", ";&:focus{z-index:2;}> span{line-height:0;}", ""], function (props) {
|
|
66
70
|
return props.showRemove ? "0" : "0 15px 15px 0";
|
|
67
71
|
}, function (props) {
|
|
68
|
-
return props.showRemove ? "
|
|
72
|
+
return props.showRemove ? "0 7px 0 7px" : props.showInfo ? "0 12px 0 11px" : "0 8px 0 8px";
|
|
69
73
|
}, function (props) {
|
|
70
74
|
return props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], function (props) {
|
|
71
75
|
return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
|
|
@@ -87,7 +91,7 @@ var TagType = styled.div.withConfig({
|
|
|
87
91
|
displayName: "Tag__TagType",
|
|
88
92
|
componentId: "sc-1dh2aa8-5"
|
|
89
93
|
})(["text-transform:uppercase;margin-left:", ";padding:", ";line-height:1;white-space:normal;text-align:left;flex:1 1 auto;border-radius:", ";font-size:", ";background-color:", ";color:", ";"], function (props) {
|
|
90
|
-
return
|
|
94
|
+
return props.small ? "6px" : "10px";
|
|
91
95
|
}, function (props) {
|
|
92
96
|
return props.small ? themeGet("space.1")(props) : themeGet("space.2")(props);
|
|
93
97
|
}, function (props) {
|
|
@@ -99,6 +103,22 @@ var TagType = styled.div.withConfig({
|
|
|
99
103
|
}, function (props) {
|
|
100
104
|
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
|
|
101
105
|
});
|
|
106
|
+
var TagAvatar = styled(Avatar).withConfig({
|
|
107
|
+
displayName: "Tag__TagAvatar",
|
|
108
|
+
componentId: "sc-1dh2aa8-6"
|
|
109
|
+
})(["img[class*=\"Avatar__Image\"],div[class*=\"Avatar__Shape\"]{width:", ";height:", ";text-transform:uppercase;margin-right:", ";margin-left:", ";font-size:", ";background-color:", ";color:", ";}"], function (props) {
|
|
110
|
+
return props.small ? "20px" : "22px";
|
|
111
|
+
}, function (props) {
|
|
112
|
+
return props.small ? "20px" : "22px";
|
|
113
|
+
}, themeGet("space.xs"), function (props) {
|
|
114
|
+
return props.small ? "-4px" : "-7px";
|
|
115
|
+
}, function (props) {
|
|
116
|
+
return props.small ? "0.9rem" : "1rem";
|
|
117
|
+
}, function (props) {
|
|
118
|
+
return props.disabled ? themeGet("colors.grey")(props) : props.selected && props.highlighted ? "rgba(0,0,0,0.2)" : props.selected ? "rgba(0,0,0,0.25)" : themeGet("colors.primaryLightest")(props);
|
|
119
|
+
}, function (props) {
|
|
120
|
+
return props.disabled ? themeGet("colors.white")(props) : props.selected && props.highlighted ? themeGet("colors.white")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props);
|
|
121
|
+
});
|
|
102
122
|
|
|
103
123
|
/**
|
|
104
124
|
* The top two rows are an example of how tags should be used when they are selectable/unselectable. There is the option to display the cross icon or not.
|
|
@@ -123,8 +143,11 @@ export default function Tag(_ref) {
|
|
|
123
143
|
isPending = _ref.isPending,
|
|
124
144
|
small = _ref.small,
|
|
125
145
|
highlighted = _ref.highlighted,
|
|
146
|
+
personEntity = _ref.personEntity,
|
|
126
147
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
127
|
-
var component = /*#__PURE__*/React.createElement(TagWrapper,
|
|
148
|
+
var component = /*#__PURE__*/React.createElement(TagWrapper, _extends({
|
|
149
|
+
small: small
|
|
150
|
+
}, props), /*#__PURE__*/React.createElement(TagValue, {
|
|
128
151
|
selected: selected,
|
|
129
152
|
highlighted: highlighted,
|
|
130
153
|
disabled: disabled,
|
|
@@ -133,8 +156,16 @@ export default function Tag(_ref) {
|
|
|
133
156
|
showRemove: showRemove,
|
|
134
157
|
onClick: onSelect,
|
|
135
158
|
small: small
|
|
136
|
-
}, /*#__PURE__*/React.createElement(
|
|
137
|
-
|
|
159
|
+
}, personEntity && /*#__PURE__*/React.createElement(TagAvatar, {
|
|
160
|
+
selected: selected,
|
|
161
|
+
highlighted: highlighted,
|
|
162
|
+
disabled: disabled,
|
|
163
|
+
small: small,
|
|
164
|
+
image: personEntity.avatarSrc,
|
|
165
|
+
initials: personEntity.initials
|
|
166
|
+
}), /*#__PURE__*/React.createElement(TagValueText, {
|
|
167
|
+
showStrikeThrough: showStrikeThrough,
|
|
168
|
+
small: small
|
|
138
169
|
}, showStrikeThrough && /*#__PURE__*/React.createElement("span", {
|
|
139
170
|
className: "sr-only"
|
|
140
171
|
}, "Striked out:"), children), tagType && /*#__PURE__*/React.createElement(TagType, {
|
|
@@ -195,6 +226,8 @@ Tag.propTypes = {
|
|
|
195
226
|
onInfo: PropTypes.func,
|
|
196
227
|
/** Can add a type to a tag as text */
|
|
197
228
|
tagType: PropTypes.string,
|
|
229
|
+
/** Can add an img url for showing a person's avatar if the tag is used for a person */
|
|
230
|
+
personAvatar: PropTypes.string,
|
|
198
231
|
/** Adds disabled attribute and styling to tag */
|
|
199
232
|
disabled: PropTypes.bool,
|
|
200
233
|
/** Adds loading spinner to tag to indicate awaiting an action to complete */
|
|
@@ -206,7 +239,9 @@ Tag.propTypes = {
|
|
|
206
239
|
/** Applies the small variant styles */
|
|
207
240
|
small: PropTypes.bool,
|
|
208
241
|
/** Applies a highlighted style and colour to the tag */
|
|
209
|
-
highlighted: PropTypes.bool
|
|
242
|
+
highlighted: PropTypes.bool,
|
|
243
|
+
/** Allows you to set a person avatar image or initials */
|
|
244
|
+
personEntity: PropTypes.object
|
|
210
245
|
};
|
|
211
246
|
Tag.defaultProps = {
|
|
212
247
|
selected: false,
|
|
@@ -361,6 +396,13 @@ Tag.__docgenInfo = {
|
|
|
361
396
|
},
|
|
362
397
|
"required": false
|
|
363
398
|
},
|
|
399
|
+
"personAvatar": {
|
|
400
|
+
"description": "Can add an img url for showing a person's avatar if the tag is used for a person",
|
|
401
|
+
"type": {
|
|
402
|
+
"name": "string"
|
|
403
|
+
},
|
|
404
|
+
"required": false
|
|
405
|
+
},
|
|
364
406
|
"isPending": {
|
|
365
407
|
"description": "Adds loading spinner to tag to indicate awaiting an action to complete",
|
|
366
408
|
"type": {
|
|
@@ -374,6 +416,13 @@ Tag.__docgenInfo = {
|
|
|
374
416
|
"name": "object"
|
|
375
417
|
},
|
|
376
418
|
"required": false
|
|
419
|
+
},
|
|
420
|
+
"personEntity": {
|
|
421
|
+
"description": "Allows you to set a person avatar image or initials",
|
|
422
|
+
"type": {
|
|
423
|
+
"name": "object"
|
|
424
|
+
},
|
|
425
|
+
"required": false
|
|
377
426
|
}
|
|
378
427
|
}
|
|
379
428
|
};
|