orcs-design-system 2.0.72 → 2.0.73

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.
@@ -66,14 +66,32 @@ export var showEditAndRemove = function showEditAndRemove() {
66
66
  }, /*#__PURE__*/React.createElement(Tag, {
67
67
  selected: true,
68
68
  showEdit: true,
69
- showRemove: true
69
+ showRemove: true,
70
+ onSelect: function onSelect() {
71
+ return console.log("select");
72
+ },
73
+ onEdit: function onEdit() {
74
+ return console.log("edit");
75
+ },
76
+ onRemove: function onRemove() {
77
+ return console.log("remove");
78
+ }
70
79
  }, "devops"), /*#__PURE__*/React.createElement(Tag, {
71
80
  selected: true,
72
81
  showEdit: true,
73
82
  showRemove: true
74
83
  }, "software engineering"), /*#__PURE__*/React.createElement(Tag, {
75
84
  showEdit: true,
76
- showRemove: true
85
+ showRemove: true,
86
+ onSelect: function onSelect() {
87
+ return console.log("select");
88
+ },
89
+ onEdit: function onEdit() {
90
+ return console.log("edit");
91
+ },
92
+ onRemove: function onRemove() {
93
+ return console.log("remove");
94
+ }
77
95
  }, "product design"), /*#__PURE__*/React.createElement(Tag, {
78
96
  showEdit: true,
79
97
  showRemove: true
@@ -72,13 +72,16 @@ var TagType = styled.div.withConfig({
72
72
 
73
73
  export default function Tag(_ref) {
74
74
  var selected = _ref.selected,
75
+ onSelect = _ref.onSelect,
75
76
  disabled = _ref.disabled,
76
77
  showRemove = _ref.showRemove,
78
+ onRemove = _ref.onRemove,
77
79
  theme = _ref.theme,
78
80
  tagType = _ref.tagType,
79
81
  showEdit = _ref.showEdit,
82
+ onEdit = _ref.onEdit,
80
83
  children = _ref.children,
81
- props = _objectWithoutProperties(_ref, ["selected", "disabled", "showRemove", "theme", "tagType", "showEdit", "children"]);
84
+ props = _objectWithoutProperties(_ref, ["selected", "onSelect", "disabled", "showRemove", "onRemove", "theme", "tagType", "showEdit", "onEdit", "children"]);
82
85
 
83
86
  return /*#__PURE__*/React.createElement(ThemeProvider, {
84
87
  theme: theme
@@ -86,20 +89,23 @@ export default function Tag(_ref) {
86
89
  selected: selected,
87
90
  disabled: disabled,
88
91
  showEdit: showEdit,
89
- showRemove: showRemove
92
+ showRemove: showRemove,
93
+ onClick: onSelect
90
94
  }, children, tagType ? /*#__PURE__*/React.createElement(TagType, {
91
95
  selected: selected,
92
96
  disabled: disabled
93
97
  }, tagType) : null), showEdit ? /*#__PURE__*/React.createElement(TagEdit, {
94
98
  selected: selected,
95
99
  disabled: disabled,
96
- showRemove: showRemove
100
+ showRemove: showRemove,
101
+ onClick: onEdit
97
102
  }, /*#__PURE__*/React.createElement(Icon, {
98
103
  icon: ["fas", "pen"],
99
104
  size: "xs"
100
105
  })) : null, showRemove ? /*#__PURE__*/React.createElement(TagRemove, {
101
106
  selected: selected,
102
- disabled: disabled
107
+ disabled: disabled,
108
+ onClick: onRemove
103
109
  }, /*#__PURE__*/React.createElement(Icon, {
104
110
  icon: ["fas", "times"],
105
111
  size: "xs"
@@ -109,12 +115,21 @@ Tag.propTypes = {
109
115
  /** Adds selected styling to tag */
110
116
  selected: PropTypes.bool,
111
117
 
118
+ /** On tag selected */
119
+ onSelect: PropTypes.func,
120
+
112
121
  /** Shows the remove button */
113
122
  showRemove: PropTypes.bool,
114
123
 
124
+ /** On tag remove button clicked */
125
+ onRemove: PropTypes.func,
126
+
115
127
  /** Shows edit button */
116
128
  showEdit: PropTypes.bool,
117
129
 
130
+ /** On tag edit button clicked */
131
+ onEdit: PropTypes.func,
132
+
118
133
  /** Can add a type to a tag as text */
119
134
  tagType: PropTypes.string,
120
135
 
@@ -191,6 +206,27 @@ Tag.__docgenInfo = {
191
206
  "required": false,
192
207
  "description": "Specifies the design theme"
193
208
  },
209
+ "onSelect": {
210
+ "type": {
211
+ "name": "func"
212
+ },
213
+ "required": false,
214
+ "description": "On tag selected"
215
+ },
216
+ "onRemove": {
217
+ "type": {
218
+ "name": "func"
219
+ },
220
+ "required": false,
221
+ "description": "On tag remove button clicked"
222
+ },
223
+ "onEdit": {
224
+ "type": {
225
+ "name": "func"
226
+ },
227
+ "required": false,
228
+ "description": "On tag edit button clicked"
229
+ },
194
230
  "tagType": {
195
231
  "type": {
196
232
  "name": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.0.72",
3
+ "version": "2.0.73",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",