orcs-design-system 2.1.21 → 2.1.22

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.
@@ -24,8 +24,9 @@ var Item = styled("span").withConfig({
24
24
  fontWeight: themeGet("fontWeights.2")(props),
25
25
  display: "inline-block",
26
26
  position: "relative",
27
- py: 2,
28
- px: 3,
27
+ pt: themeGet("space.2")(props),
28
+ pb: "calc(".concat(themeGet("space.2")(props), " + 1px)"),
29
+ px: themeGet("space.3")(props),
29
30
  cursor: "default",
30
31
  borderRadius: 1,
31
32
  color: themeGet("colors.greyDarkest")(props),
@@ -165,6 +165,13 @@ export var withTagType = function withTagType() {
165
165
  tagType: "skill"
166
166
  }, "product design"));
167
167
  };
168
+ export var smallVariant = function smallVariant() {
169
+ return /*#__PURE__*/React.createElement(Tag, {
170
+ selected: true,
171
+ tagType: "specialist",
172
+ small: true
173
+ }, "Agile Coach");
174
+ };
168
175
  defaultTag.__docgenInfo = {
169
176
  "description": "",
170
177
  "methods": [],
@@ -204,4 +211,9 @@ withTagType.__docgenInfo = {
204
211
  "description": "",
205
212
  "methods": [],
206
213
  "displayName": "withTagType"
214
+ };
215
+ smallVariant.__docgenInfo = {
216
+ "description": "",
217
+ "methods": [],
218
+ "displayName": "smallVariant"
207
219
  };
@@ -13,8 +13,10 @@ var TagWrapper = styled.div.withConfig({
13
13
  var TagValue = styled.button.withConfig({
14
14
  displayName: "Tag__TagValue",
15
15
  componentId: "sc-1dh2aa8-1"
16
- })(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;display:flex;align-items:center;flex-wrap:nowrap;font-size:", ";font-weight:", ";white-space:nowrap;position:relative;z-index:1;transition:", ";cursor:", ";border-radius:", ";border:solid 1px ", ";padding:", ";background-color:", ";color:", ";", ""], function (props) {
16
+ })(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:", ";display:flex;align-items:center;flex-wrap:nowrap;font-size:", ";font-weight:", ";white-space:nowrap;position:relative;z-index:1;transition:", ";cursor:", ";border-radius:", ";border:solid 1px ", ";padding:", ";background-color:", ";color:", ";", ""], function (props) {
17
17
  return themeGet("fontSizes.1")(props);
18
+ }, function (props) {
19
+ return props.small ? themeGet("fontSizes.0")(props) : themeGet("fontSizes.1")(props);
18
20
  }, function (props) {
19
21
  return themeGet("fontWeights.2")(props);
20
22
  }, function (props) {
@@ -26,7 +28,7 @@ var TagValue = styled.button.withConfig({
26
28
  }, function (props) {
27
29
  return props.disabled ? themeGet("colors.greyLight")(props) : themeGet("colors.primary")(props);
28
30
  }, function (props) {
29
- return props.showEdit || props.showRemove ? "3px 4px 4px 10px" : "3px 10px 4px 10px";
31
+ return props.showEdit || props.showRemove ? "3px 4px 4px 10px" : props.small ? "calc(".concat(themeGet("space.2")(props), " - 1px)") + " " + themeGet("space.3")(props) + " " + themeGet("space.2")(props) + " " + themeGet("space.3")(props) : "3px 10px 4px 10px";
30
32
  }, function (props) {
31
33
  return props.selected ? themeGet("colors.primary")(props) : props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.white")(props);
32
34
  }, function (props) {
@@ -45,8 +47,10 @@ var TagValue = styled.button.withConfig({
45
47
  var TagValueText = styled.div.withConfig({
46
48
  displayName: "Tag__TagValueText",
47
49
  componentId: "sc-1dh2aa8-2"
48
- })(["text-decoration:", ";text-overflow:ellipsis;white-space:normal;text-align:left;"], function (props) {
50
+ })(["text-decoration:", ";text-overflow:ellipsis;white-space:normal;text-align:left;line-height:", ";"], function (props) {
49
51
  return props.showStrikeThrough ? "line-through" : "none";
52
+ }, function (props) {
53
+ return themeGet("fontSizes.1")(props);
50
54
  });
51
55
  var TagEdit = styled(TagValue).withConfig({
52
56
  displayName: "Tag__TagEdit",
@@ -67,12 +71,14 @@ var TagRemove = styled(TagValue).withConfig({
67
71
  var TagType = styled.div.withConfig({
68
72
  displayName: "Tag__TagType",
69
73
  componentId: "sc-1dh2aa8-5"
70
- })(["text-transform:uppercase;margin-left:", ";padding:3px;line-height:1;white-space:normal;text-align:left;flex:1 1 auto;border-radius:", ";font-size:", ";background-color:", ";color:", ";"], function (props) {
74
+ })(["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) {
71
75
  return themeGet("space.s")(props);
76
+ }, function (props) {
77
+ return props.small ? themeGet("space.1")(props) : themeGet("space.2")(props);
72
78
  }, function (props) {
73
79
  return themeGet("radii.1")(props);
74
80
  }, function (props) {
75
- return themeGet("fontSizes.0")(props);
81
+ return props.small ? "1rem" : themeGet("fontSizes.0")(props);
76
82
  }, function (props) {
77
83
  return props.selected ? themeGet("colors.primaryDark")(props) : props.disabled ? themeGet("colors.grey")(props) : themeGet("colors.primaryLightest")(props);
78
84
  }, function (props) {
@@ -97,19 +103,22 @@ export default function Tag(_ref) {
97
103
  showStrikeThrough = _ref.showStrikeThrough,
98
104
  children = _ref.children,
99
105
  isPending = _ref.isPending,
100
- props = _objectWithoutProperties(_ref, ["selected", "onSelect", "disabled", "showRemove", "onRemove", "theme", "tagType", "showEdit", "onEdit", "showStrikeThrough", "children", "isPending"]);
106
+ small = _ref.small,
107
+ props = _objectWithoutProperties(_ref, ["selected", "onSelect", "disabled", "showRemove", "onRemove", "theme", "tagType", "showEdit", "onEdit", "showStrikeThrough", "children", "isPending", "small"]);
101
108
 
102
109
  var component = /*#__PURE__*/React.createElement(TagWrapper, props, /*#__PURE__*/React.createElement(TagValue, {
103
110
  selected: selected,
104
111
  disabled: disabled,
105
112
  showEdit: showEdit,
106
113
  showRemove: showRemove,
107
- onClick: onSelect
114
+ onClick: onSelect,
115
+ small: small
108
116
  }, /*#__PURE__*/React.createElement(TagValueText, {
109
117
  showStrikeThrough: showStrikeThrough
110
118
  }, children), tagType && /*#__PURE__*/React.createElement(TagType, {
111
119
  selected: selected,
112
- disabled: disabled
120
+ disabled: disabled,
121
+ small: small
113
122
  }, tagType), isPending && /*#__PURE__*/React.createElement(Loading, {
114
123
  ml: "s"
115
124
  })), showEdit && /*#__PURE__*/React.createElement(TagEdit, {
@@ -166,10 +175,14 @@ Tag.propTypes = {
166
175
  theme: PropTypes.object,
167
176
 
168
177
  /** Add a strikethrough to a tag value text */
169
- showStrikeThrough: PropTypes.bool
178
+ showStrikeThrough: PropTypes.bool,
179
+
180
+ /** Applies the small variant styles */
181
+ small: PropTypes.bool
170
182
  };
171
183
  Tag.defaultProps = {
172
184
  selected: false,
185
+ small: false,
173
186
  disabled: false,
174
187
  showEdit: false,
175
188
  showRemove: false,
@@ -191,6 +204,17 @@ Tag.__docgenInfo = {
191
204
  "required": false,
192
205
  "description": "Adds selected styling to tag"
193
206
  },
207
+ "small": {
208
+ "defaultValue": {
209
+ "value": "false",
210
+ "computed": false
211
+ },
212
+ "type": {
213
+ "name": "bool"
214
+ },
215
+ "required": false,
216
+ "description": "Applies the small variant styles"
217
+ },
194
218
  "disabled": {
195
219
  "defaultValue": {
196
220
  "value": "false",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",