orcs-design-system 3.1.10 → 3.1.12

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.
@@ -201,13 +201,11 @@ export var smallVariant = function smallVariant() {
201
201
  }, "Agile Coach");
202
202
  };
203
203
  export var highlightedVariant = function highlightedVariant() {
204
- return /*#__PURE__*/React.createElement(Spacer, {
205
- m: "2px"
206
- }, /*#__PURE__*/React.createElement(Tag, {
204
+ return /*#__PURE__*/React.createElement(Tag, {
207
205
  selected: true,
208
206
  highlighted: true,
209
207
  tagType: "specialist"
210
- }, "Agile Coach"));
208
+ }, "Agile Coach");
211
209
  };
212
210
  export var personTag = function personTag() {
213
211
  return /*#__PURE__*/React.createElement(Spacer, {
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
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";
@@ -11,7 +12,9 @@ import { themeGet } from "@styled-system/theme-get";
11
12
  var TagWrapper = styled.div.withConfig({
12
13
  displayName: "Tag__TagWrapper",
13
14
  componentId: "sc-1dh2aa8-0"
14
- })(["", " ", " 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 ? themeGet("tagScale.tagHeightSmall") : themeGet("tagScale.tagHeightDefault");
17
+ });
15
18
  var TagValue = styled.button.attrs(function (props) {
16
19
  return {
17
20
  "aria-pressed": props.selected
@@ -34,7 +37,7 @@ var TagValue = styled.button.attrs(function (props) {
34
37
  }, function (props) {
35
38
  return props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.warningDark")(props) : themeGet("colors.primary")(props);
36
39
  }, function (props) {
37
- 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";
40
+ return props.small ? themeGet("tagScale.tagPaddingSmall") : themeGet("tagScale.tagPaddingDefault");
38
41
  }, function (props) {
39
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);
40
43
  }, function (props) {
@@ -66,7 +69,7 @@ var TagActionIconWrapper = styled(TagValue).withConfig({
66
69
  })(["border-radius:", ";padding:", ";&:focus{z-index:2;}> span{line-height:0;}", ""], function (props) {
67
70
  return props.showRemove ? "0" : "0 15px 15px 0";
68
71
  }, function (props) {
69
- return props.showRemove ? "0 7px 0 7px" : props.showInfo ? "0 12px 0 11px" : "0 8px 0 8px";
72
+ return props.showRemove && props.small ? "0 5px 0 6px" : props.showRemove ? "0 7px 0 7px" : props.showInfo && props.small ? "0 10px 0 9px" : props.showInfo ? "0 12px 0 11px" : props.small ? "0 6px 0 6px" : "0 8px 0 8px";
70
73
  }, function (props) {
71
74
  return props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], function (props) {
72
75
  return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
@@ -77,7 +80,9 @@ var TagActionIconWrapper = styled(TagValue).withConfig({
77
80
  var TagRemoveIconWrapper = styled(TagValue).withConfig({
78
81
  displayName: "Tag__TagRemoveIconWrapper",
79
82
  componentId: "sc-1dh2aa8-4"
80
- })(["border-radius:0 15px 15px 0;padding:2px 10px 5px 9px;&:focus{z-index:2;}", ""], function (props) {
83
+ })(["border-radius:0 15px 15px 0;padding:", ";&:focus{z-index:2;}", ""], function (props) {
84
+ return props.small ? "0 8px 3px 7px" : "0 10px 3px 9px";
85
+ }, function (props) {
81
86
  return props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], function (props) {
82
87
  return props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props));
83
88
  }, function (props) {
@@ -90,7 +95,7 @@ var TagType = styled.div.withConfig({
90
95
  })(["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) {
91
96
  return props.small ? "6px" : "10px";
92
97
  }, function (props) {
93
- return props.small ? themeGet("space.1")(props) : themeGet("space.2")(props);
98
+ return props.small ? themeGet("space.2")(props) : themeGet("space.2")(props);
94
99
  }, function (props) {
95
100
  return themeGet("radii.1")(props);
96
101
  }, function (props) {
@@ -104,13 +109,13 @@ var TagAvatar = styled(Avatar).withConfig({
104
109
  displayName: "Tag__TagAvatar",
105
110
  componentId: "sc-1dh2aa8-6"
106
111
  })(["img[class*=\"Avatar__Image\"],div[class*=\"Avatar__Shape\"]{width:", ";height:", ";text-transform:uppercase;margin-right:", ";margin-left:", ";font-size:", ";background-color:", ";color:", ";}"], function (props) {
107
- return props.small ? "20px" : "22px";
112
+ return props.small ? themeGet("tagScale.tagAvatarSizeSmall") : themeGet("tagScale.tagAvatarSizeDefault");
108
113
  }, function (props) {
109
- return props.small ? "20px" : "22px";
114
+ return props.small ? themeGet("tagScale.tagAvatarSizeSmall") : themeGet("tagScale.tagAvatarSizeDefault");
110
115
  }, themeGet("space.xs"), function (props) {
111
- return props.small ? "-4px" : "-7px";
116
+ return props.small ? themeGet("tagScale.tagAvatarMarginLeftSmall") : themeGet("tagScale.tagAvatarMarginLeftDefault");
112
117
  }, function (props) {
113
- return props.small ? "0.9rem" : "1rem";
118
+ return props.small ? themeGet("tagScale.tagAvatarFontSizeSmall") : themeGet("tagScale.tagAvatarFontSizeDefault");
114
119
  }, function (props) {
115
120
  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);
116
121
  }, function (props) {
@@ -142,7 +147,9 @@ export default function Tag(_ref) {
142
147
  highlighted = _ref.highlighted,
143
148
  personEntity = _ref.personEntity,
144
149
  props = _objectWithoutProperties(_ref, _excluded);
145
- var component = /*#__PURE__*/React.createElement(TagWrapper, props, /*#__PURE__*/React.createElement(TagValue, {
150
+ var component = /*#__PURE__*/React.createElement(TagWrapper, _extends({
151
+ small: small
152
+ }, props), /*#__PURE__*/React.createElement(TagValue, {
146
153
  selected: selected,
147
154
  highlighted: highlighted,
148
155
  disabled: disabled,
@@ -150,7 +157,9 @@ export default function Tag(_ref) {
150
157
  showInfo: showInfo,
151
158
  showRemove: showRemove,
152
159
  onClick: onSelect,
153
- small: small
160
+ small: small,
161
+ "aria-label": "Navigate to tag",
162
+ title: "Navigate to tag"
154
163
  }, personEntity && /*#__PURE__*/React.createElement(TagAvatar, {
155
164
  selected: selected,
156
165
  highlighted: highlighted,
@@ -175,7 +184,10 @@ export default function Tag(_ref) {
175
184
  highlighted: highlighted,
176
185
  disabled: disabled,
177
186
  showRemove: showRemove,
178
- onClick: onEdit
187
+ onClick: onEdit,
188
+ small: small,
189
+ "aria-label": "Edit tag",
190
+ title: "Edit tag"
179
191
  }, /*#__PURE__*/React.createElement(Icon, {
180
192
  icon: ["fas", "pen"],
181
193
  size: "xs"
@@ -184,7 +196,10 @@ export default function Tag(_ref) {
184
196
  highlighted: highlighted,
185
197
  disabled: disabled,
186
198
  onClick: onInfo,
187
- showInfo: showInfo
199
+ showInfo: showInfo,
200
+ small: small,
201
+ "aria-label": "View tag details",
202
+ title: "View tag details"
188
203
  }, /*#__PURE__*/React.createElement(Icon, {
189
204
  icon: ["fas", "info"],
190
205
  size: "xs"
@@ -192,7 +207,10 @@ export default function Tag(_ref) {
192
207
  selected: selected,
193
208
  highlighted: highlighted,
194
209
  disabled: disabled,
195
- onClick: onRemove
210
+ onClick: onRemove,
211
+ small: small,
212
+ "aria-label": "Remove tag",
213
+ title: "Remove tag"
196
214
  }, /*#__PURE__*/React.createElement(Icon, {
197
215
  icon: ["fas", "times"],
198
216
  size: "xs"
@@ -235,6 +235,18 @@ export var appScale = {
235
235
  inputHeightDefault: "32px",
236
236
  inputHeightLarge: "52px"
237
237
  };
238
+ export var tagScale = {
239
+ tagHeightDefault: "22px",
240
+ tagHeightSmall: "18px",
241
+ tagPaddingDefault: "0 8px",
242
+ tagPaddingSmall: "0 6px",
243
+ tagAvatarSizeDefault: "16px",
244
+ tagAvatarSizeSmall: "14px",
245
+ tagAvatarMarginLeftDefault: "-6px",
246
+ tagAvatarMarginLeftSmall: "-5px",
247
+ tagAvatarFontSizeDefault: "0.8rem",
248
+ tagAvatarFontSizeSmall: "0.7rem"
249
+ };
238
250
  export default {
239
251
  fonts: fonts,
240
252
  font: font,
@@ -251,5 +263,6 @@ export default {
251
263
  breakpoints: breakpoints,
252
264
  transition: transition,
253
265
  zIndices: zIndices,
254
- appScale: appScale
266
+ appScale: appScale,
267
+ tagScale: tagScale
255
268
  };
package/es/systemtheme.js CHANGED
@@ -234,6 +234,18 @@ export var appScale = {
234
234
  inputHeightDefault: "38px",
235
235
  inputHeightLarge: "58px"
236
236
  };
237
+ export var tagScale = {
238
+ tagHeightDefault: "28px",
239
+ tagHeightSmall: "24px",
240
+ tagPaddingDefault: "0 10px",
241
+ tagPaddingSmall: "0 8px",
242
+ tagAvatarSizeDefault: "20px",
243
+ tagAvatarSizeSmall: "18px",
244
+ tagAvatarMarginLeftDefault: "-7px",
245
+ tagAvatarMarginLeftSmall: "-6px",
246
+ tagAvatarFontSizeDefault: "0.9rem",
247
+ tagAvatarFontSizeSmall: "0.8rem"
248
+ };
237
249
  export default {
238
250
  fonts: fonts,
239
251
  font: font,
@@ -250,5 +262,6 @@ export default {
250
262
  breakpoints: breakpoints,
251
263
  transition: transition,
252
264
  zIndices: zIndices,
253
- appScale: appScale
265
+ appScale: appScale,
266
+ tagScale: tagScale
254
267
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.1.10",
3
+ "version": "3.1.12",
4
4
  "engines": {
5
5
  "node": "18.17.1"
6
6
  },