orcs-design-system 3.2.4 → 3.2.6

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.
Files changed (96) hide show
  1. package/es/GlobalStyles.js +1 -31
  2. package/es/SystemThemeProvider.js +11 -5
  3. package/es/assets/Colour/Colour.stories.js +211 -0
  4. package/es/assets/Colour/index.js +3 -3
  5. package/es/components/ActionsMenu/ActionsMenu.stories.js +260 -233
  6. package/es/components/ActionsMenu/index.js +144 -229
  7. package/es/components/Avatar/Avatar.stories.js +212 -196
  8. package/es/components/Avatar/index.js +280 -307
  9. package/es/components/Badge/Badge.stories.js +71 -46
  10. package/es/components/Badge/index.js +71 -74
  11. package/es/components/Box/Box.stories.js +51 -35
  12. package/es/components/Box/index.js +33 -34
  13. package/es/components/Button/Button.stories.js +161 -145
  14. package/es/components/Button/ButtonLink.stories.js +152 -139
  15. package/es/components/Button/index.js +79 -99
  16. package/es/components/ButtonGroup/ButtonGroup.stories.js +43 -42
  17. package/es/components/ButtonGroup/ButtonGroupItem.stories.js +11 -13
  18. package/es/components/ButtonGroup/index.js +103 -99
  19. package/es/components/Card/Card.stories.js +94 -62
  20. package/es/components/Card/index.js +50 -71
  21. package/es/components/Checkbox/Checkbox.stories.js +37 -43
  22. package/es/components/Checkbox/index.js +61 -76
  23. package/es/components/DatePicker/DatePicker.stories.js +86 -118
  24. package/es/components/DatePicker/index.js +71 -187
  25. package/es/components/Divider/Divider.stories.js +39 -42
  26. package/es/components/Divider/index.js +21 -27
  27. package/es/components/Expandable/Expandable.stories.js +46 -36
  28. package/es/components/Expandable/index.js +55 -82
  29. package/es/components/Flex/Flex.stories.js +19 -5
  30. package/es/components/Flex/FlexItem.stories.js +10 -9
  31. package/es/components/Flex/index.js +34 -27
  32. package/es/components/Grid/Grid.stories.js +129 -55
  33. package/es/components/Grid/index.js +25 -24
  34. package/es/components/Header/Header.stories.js +101 -92
  35. package/es/components/Header/index.js +433 -436
  36. package/es/components/HeaderSimple/HeaderSimple.stories.js +23 -27
  37. package/es/components/HeaderSimple/index.js +73 -68
  38. package/es/components/Icon/Icon.stories.js +58 -57
  39. package/es/components/Icon/index.js +48 -46
  40. package/es/components/Loading/Loading.stories.js +32 -39
  41. package/es/components/Loading/index.js +44 -51
  42. package/es/components/Modal/Modal.stories.js +172 -153
  43. package/es/components/Modal/index.js +126 -134
  44. package/es/components/Notification/Notification.stories.js +59 -58
  45. package/es/components/Notification/index.js +123 -133
  46. package/es/components/Popover/Popover.stories.js +134 -102
  47. package/es/components/Popover/index.js +65 -111
  48. package/es/components/ProgressBar/ProgressBar.stories.js +36 -39
  49. package/es/components/ProgressBar/index.js +29 -34
  50. package/es/components/RadioButton/RadioButton.stories.js +32 -37
  51. package/es/components/RadioButton/index.js +170 -184
  52. package/es/components/Range/Range.stories.js +19 -19
  53. package/es/components/Range/index.js +35 -45
  54. package/es/components/Select/Select.stories.js +107 -128
  55. package/es/components/Select/index.js +324 -336
  56. package/es/components/SideNav/NavItem.js +112 -122
  57. package/es/components/SideNav/SideNav.stories.js +84 -57
  58. package/es/components/SideNav/index.js +161 -185
  59. package/es/components/Sidebar/Sidebar.stories.js +50 -33
  60. package/es/components/Sidebar/index.js +152 -155
  61. package/es/components/Spacer/Spacer.stories.js +35 -32
  62. package/es/components/Spacer/index.js +20 -20
  63. package/es/components/StatusDot/StatusDot.stories.js +103 -90
  64. package/es/components/StatusDot/index.js +36 -38
  65. package/es/components/StyledLink/StyledLink.stories.js +68 -69
  66. package/es/components/StyledLink/index.js +47 -48
  67. package/es/components/Table/Table.stories.js +118 -112
  68. package/es/components/Table/getExpandColumnConfig.js +67 -62
  69. package/es/components/Table/index.js +24 -27
  70. package/es/components/Table/muiStyleOverrides.js +10 -8
  71. package/es/components/Tabs/Tab.stories.js +55 -38
  72. package/es/components/Tabs/TabsContainer.stories.js +30 -22
  73. package/es/components/Tabs/index.js +95 -92
  74. package/es/components/Tag/Tag.stories.js +250 -220
  75. package/es/components/Tag/index.js +118 -190
  76. package/es/components/TextArea/TextArea.stories.js +76 -89
  77. package/es/components/TextArea/index.js +117 -115
  78. package/es/components/TextInput/TextInput.stories.js +41 -61
  79. package/es/components/TextInput/index.js +127 -171
  80. package/es/components/Toggle/Toggle.stories.js +63 -62
  81. package/es/components/Toggle/index.js +43 -77
  82. package/es/components/TreeNav/TreeNav.stories.js +7 -8
  83. package/es/components/TreeNav/index.js +72 -69
  84. package/es/components/Typography/Typography.stories.js +174 -0
  85. package/es/components/Typography/index.js +252 -308
  86. package/es/components.test.js +1 -1
  87. package/es/hooks/isVisible.js +6 -10
  88. package/es/hooks/keepInView.js +27 -32
  89. package/es/hooks/keypress.js +14 -14
  90. package/es/hooks/useInputFocus.js +5 -5
  91. package/es/hooks/usePrevious.js +3 -3
  92. package/es/systemThemeCollapsed.js +53 -53
  93. package/es/systemtheme.js +53 -53
  94. package/es/utils/selectUtil.js +1 -1
  95. package/es/utils/selectUtil.test.js +6 -6
  96. package/package.json +29 -38
@@ -1,4 +1,3 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import React, { useRef, useState, useImperativeHandle } from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { Link } from "react-router-dom";
@@ -11,136 +10,145 @@ import Icon from "../Icon";
11
10
  import Box from "../Box";
12
11
  import Button from "../Button";
13
12
  import TextArea from "../TextArea";
13
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
14
14
  export default {
15
15
  title: "Components/ActionsMenu",
16
- decorators: [function (storyFn) {
17
- return /*#__PURE__*/React.createElement(Box, {
18
- pb: "150px"
19
- }, storyFn());
20
- }],
16
+ decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
17
+ pb: "150px",
18
+ children: storyFn()
19
+ })],
21
20
  component: ActionsMenu
22
21
  };
23
- export var defaultActionsMenu = function defaultActionsMenu() {
24
- return /*#__PURE__*/React.createElement(ActionsMenu, null, /*#__PURE__*/React.createElement(ActionsMenuItem, {
25
- href: "https://orchestrated.io/"
26
- }, "Open details page"), /*#__PURE__*/React.createElement(BrowserRouter, null, /*#__PURE__*/React.createElement(ActionsMenuItem, {
27
- as: Link,
28
- to: "/"
29
- }, "Edit")), /*#__PURE__*/React.createElement(ActionsMenuItem, {
30
- onClick: action("clicked")
31
- }, "Remove"));
32
- };
22
+ export const defaultActionsMenu = () => /*#__PURE__*/_jsxs(ActionsMenu, {
23
+ children: [/*#__PURE__*/_jsx(ActionsMenuItem, {
24
+ href: "https://orchestrated.io/",
25
+ children: "Open details page"
26
+ }), /*#__PURE__*/_jsx(BrowserRouter, {
27
+ children: /*#__PURE__*/_jsx(ActionsMenuItem, {
28
+ as: Link,
29
+ to: "/",
30
+ children: "Edit"
31
+ })
32
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
33
+ onClick: action("clicked"),
34
+ children: "Remove"
35
+ })]
36
+ });
33
37
  defaultActionsMenu.storyName = "Default";
34
- export var leftOffsetActionsMenu = function leftOffsetActionsMenu() {
35
- return /*#__PURE__*/React.createElement(Flex, {
36
- justifyContent: "flex-end"
37
- }, /*#__PURE__*/React.createElement(ActionsMenu, {
38
+ export const leftOffsetActionsMenu = () => /*#__PURE__*/_jsx(Flex, {
39
+ justifyContent: "flex-end",
40
+ children: /*#__PURE__*/_jsxs(ActionsMenu, {
38
41
  ariaLabel: "Options Menu",
39
- direction: "left"
40
- }, /*#__PURE__*/React.createElement(ActionsMenuItem, {
41
- href: "https://orchestrated.io/"
42
- }, "Open details page"), /*#__PURE__*/React.createElement(BrowserRouter, null, /*#__PURE__*/React.createElement(ActionsMenuItem, {
43
- as: Link,
44
- to: "/"
45
- }, "Edit")), /*#__PURE__*/React.createElement(ActionsMenuItem, {
46
- onClick: action("clicked")
47
- }, "Remove")));
48
- };
42
+ direction: "left",
43
+ children: [/*#__PURE__*/_jsx(ActionsMenuItem, {
44
+ href: "https://orchestrated.io/",
45
+ children: "Open details page"
46
+ }), /*#__PURE__*/_jsx(BrowserRouter, {
47
+ children: /*#__PURE__*/_jsx(ActionsMenuItem, {
48
+ as: Link,
49
+ to: "/",
50
+ children: "Edit"
51
+ })
52
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
53
+ onClick: action("clicked"),
54
+ children: "Remove"
55
+ })]
56
+ })
57
+ });
49
58
  leftOffsetActionsMenu.storyName = "Left offset";
50
- var MenuItems = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
51
- var closeMenu = _ref.closeMenu,
52
- reasons = _ref.reasons;
53
- var _useState = useState(false),
54
- _useState2 = _slicedToArray(_useState, 2),
55
- showOther = _useState2[0],
56
- setShowOther = _useState2[1];
57
- var _useState3 = useState(null),
58
- _useState4 = _slicedToArray(_useState3, 2),
59
- selectedReason = _useState4[0],
60
- setSelectedReason = _useState4[1];
61
- var _useState5 = useState(""),
62
- _useState6 = _slicedToArray(_useState5, 2),
63
- otherReason = _useState6[0],
64
- setOtherReason = _useState6[1];
65
- var reset = function reset() {
59
+ const MenuItems = /*#__PURE__*/React.forwardRef((_ref, ref) => {
60
+ let {
61
+ closeMenu,
62
+ reasons
63
+ } = _ref;
64
+ const [showOther, setShowOther] = useState(false);
65
+ const [selectedReason, setSelectedReason] = useState(null);
66
+ const [otherReason, setOtherReason] = useState("");
67
+ const reset = () => {
66
68
  setShowOther(false);
67
69
  };
68
- var resetAndCloseMenu = function resetAndCloseMenu() {
70
+ const resetAndCloseMenu = () => {
69
71
  reset();
70
72
  closeMenu();
71
73
  };
72
- useImperativeHandle(ref, function () {
73
- return {
74
- reset: reset
75
- };
76
- });
77
- var clickOther = function clickOther() {
74
+ useImperativeHandle(ref, () => ({
75
+ reset
76
+ }));
77
+ const clickOther = () => {
78
78
  setSelectedReason("other");
79
79
  setShowOther(true);
80
80
  };
81
- var setReason = function setReason(id) {
82
- return function () {
83
- // TODO: Make the call to back end
84
- setSelectedReason(id);
85
- setOtherReason("");
86
- resetAndCloseMenu();
87
- };
81
+ const setReason = id => () => {
82
+ // TODO: Make the call to back end
83
+ setSelectedReason(id);
84
+ setOtherReason("");
85
+ resetAndCloseMenu();
88
86
  };
89
- var onOtherReasonChange = function onOtherReasonChange(e) {
87
+ const onOtherReasonChange = e => {
90
88
  setOtherReason(e.target.value);
91
89
  };
92
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionsMenuHeading, {
93
- onClick: reset,
94
- canClick: showOther
95
- }, showOther && /*#__PURE__*/React.createElement(Icon, {
96
- icon: ["fas", "angle-left"],
97
- mr: "xs"
98
- }), " Select reason"), !showOther && /*#__PURE__*/React.createElement(React.Fragment, null, reasons.map(function (_ref2) {
99
- var id = _ref2.id,
100
- label = _ref2.label;
101
- if (id === "other") {
102
- return /*#__PURE__*/React.createElement(ActionsMenuItem, {
103
- key: id,
104
- type: "button",
105
- selected: selectedReason === id,
106
- onClick: clickOther
107
- }, /*#__PURE__*/React.createElement(Flex, {
108
- alignItems: "center",
109
- justifyContent: "space-between"
110
- }, label, /*#__PURE__*/React.createElement(Icon, {
111
- icon: ["fas", "pen"],
112
- size: "sm"
113
- })));
114
- }
115
- return /*#__PURE__*/React.createElement(ActionsMenuItem, {
116
- key: id,
117
- type: "button",
118
- selected: selectedReason === id,
119
- onClick: setReason(id)
120
- }, label);
121
- })), showOther && /*#__PURE__*/React.createElement(Box, {
122
- id: "editableContent",
123
- p: "s"
124
- }, /*#__PURE__*/React.createElement(TextArea, {
125
- inverted: true,
126
- id: "TextArea01",
127
- label: "Reason for rejection",
128
- cols: "35",
129
- rows: "3",
130
- defaultValue: otherReason,
131
- onChange: onOtherReasonChange
132
- }), /*#__PURE__*/React.createElement(Button, {
133
- onClick: resetAndCloseMenu,
134
- small: true,
135
- variant: "danger",
136
- mt: "s"
137
- }, "Reject request")));
90
+ return /*#__PURE__*/_jsxs(_Fragment, {
91
+ children: [/*#__PURE__*/_jsxs(ActionsMenuHeading, {
92
+ onClick: reset,
93
+ canClick: showOther,
94
+ children: [showOther && /*#__PURE__*/_jsx(Icon, {
95
+ icon: ["fas", "angle-left"],
96
+ mr: "xs"
97
+ }), " Select reason"]
98
+ }), !showOther && /*#__PURE__*/_jsx(_Fragment, {
99
+ children: reasons.map(_ref2 => {
100
+ let {
101
+ id,
102
+ label
103
+ } = _ref2;
104
+ if (id === "other") {
105
+ return /*#__PURE__*/_jsx(ActionsMenuItem, {
106
+ type: "button",
107
+ selected: selectedReason === id,
108
+ onClick: clickOther,
109
+ children: /*#__PURE__*/_jsxs(Flex, {
110
+ alignItems: "center",
111
+ justifyContent: "space-between",
112
+ children: [label, /*#__PURE__*/_jsx(Icon, {
113
+ icon: ["fas", "pen"],
114
+ size: "sm"
115
+ })]
116
+ })
117
+ }, id);
118
+ }
119
+ return /*#__PURE__*/_jsx(ActionsMenuItem, {
120
+ type: "button",
121
+ selected: selectedReason === id,
122
+ onClick: setReason(id),
123
+ children: label
124
+ }, id);
125
+ })
126
+ }), showOther && /*#__PURE__*/_jsxs(Box, {
127
+ id: "editableContent",
128
+ p: "s",
129
+ children: [/*#__PURE__*/_jsx(TextArea, {
130
+ inverted: true,
131
+ id: "TextArea01",
132
+ label: "Reason for rejection",
133
+ cols: "35",
134
+ rows: "3",
135
+ defaultValue: otherReason,
136
+ onChange: onOtherReasonChange
137
+ }), /*#__PURE__*/_jsx(Button, {
138
+ onClick: resetAndCloseMenu,
139
+ small: true,
140
+ variant: "danger",
141
+ mt: "s",
142
+ children: "Reject request"
143
+ })]
144
+ })]
145
+ });
138
146
  });
139
147
  MenuItems.propTypes = {
140
148
  closeMenu: PropTypes.bool,
141
149
  reasons: PropTypes.array
142
150
  };
143
- var Reasons = [{
151
+ const Reasons = [{
144
152
  id: "tooMany",
145
153
  label: "Too many people"
146
154
  }, {
@@ -153,173 +161,192 @@ var Reasons = [{
153
161
  id: "other",
154
162
  label: "Other"
155
163
  }];
156
- export var advancedActionsMenu = function advancedActionsMenu() {
157
- var ref = /*#__PURE__*/React.createRef(null);
158
- var closeMenu = function closeMenu() {
164
+ export const advancedActionsMenu = () => {
165
+ const ref = /*#__PURE__*/React.createRef(null);
166
+ const closeMenu = () => {
159
167
  if (ref.current) {
160
168
  ref.current.closeMenu();
161
169
  }
162
170
  };
163
- return /*#__PURE__*/React.createElement(Flex, {
164
- justifyContent: "flex-end"
165
- }, /*#__PURE__*/React.createElement(ActionsMenu, {
166
- ref: ref,
167
- direction: "left",
168
- className: "ignore-onclickoutside",
169
- customTriggerComponent: /*#__PURE__*/React.createElement(Button, {
170
- variant: "default",
171
- iconOnly: true,
172
- type: "button",
173
- width: "30px",
174
- height: "30px"
175
- }, /*#__PURE__*/React.createElement(Icon, {
176
- icon: ["fas", "pen"],
177
- size: "sm"
178
- })),
179
- closeOnClick: false
180
- }, /*#__PURE__*/React.createElement(MenuItems, {
181
- closeMenu: closeMenu,
182
- reasons: Reasons
183
- })));
171
+ return /*#__PURE__*/_jsx(Flex, {
172
+ justifyContent: "flex-end",
173
+ children: /*#__PURE__*/_jsx(ActionsMenu, {
174
+ ref: ref,
175
+ direction: "left",
176
+ className: "ignore-onclickoutside",
177
+ customTriggerComponent: /*#__PURE__*/_jsx(Button, {
178
+ variant: "default",
179
+ iconOnly: true,
180
+ type: "button",
181
+ width: "30px",
182
+ height: "30px",
183
+ children: /*#__PURE__*/_jsx(Icon, {
184
+ icon: ["fas", "pen"],
185
+ size: "sm"
186
+ })
187
+ }),
188
+ closeOnClick: false,
189
+ children: /*#__PURE__*/_jsx(MenuItems, {
190
+ closeMenu: closeMenu,
191
+ reasons: Reasons
192
+ })
193
+ })
194
+ });
184
195
  };
185
196
  advancedActionsMenu.storyName = "Advanced Actions Menu";
186
- export var customActionsMenu = function customActionsMenu() {
187
- var AdvancedActionsMenu = function AdvancedActionsMenu() {
188
- var _useState7 = useState(false),
189
- _useState8 = _slicedToArray(_useState7, 2),
190
- toggleState = _useState8[0],
191
- setToggle = _useState8[1];
192
- var menuItemsRef = useRef(null);
193
- var closeMenu = function closeMenu() {
197
+ export const customActionsMenu = () => {
198
+ const AdvancedActionsMenu = () => {
199
+ const [toggleState, setToggle] = useState(false);
200
+ const menuItemsRef = useRef(null);
201
+ const closeMenu = () => {
194
202
  setToggle(false);
195
203
  };
196
- var resetAndCloseMenu = function resetAndCloseMenu() {
204
+ const resetAndCloseMenu = () => {
197
205
  if (menuItemsRef.current) {
198
206
  menuItemsRef.current.reset();
199
207
  }
200
208
  closeMenu();
201
209
  };
202
- var menuRef = useOnclickOutside(resetAndCloseMenu, {
210
+ const menuRef = useOnclickOutside(resetAndCloseMenu, {
203
211
  disabled: !toggleState
204
212
  });
205
- var onToggle = function onToggle(e) {
213
+ const onToggle = e => {
206
214
  e.stopPropagation();
207
215
  setToggle(!toggleState);
208
216
  };
209
- return /*#__PURE__*/React.createElement("div", {
210
- ref: menuRef
211
- }, /*#__PURE__*/React.createElement(Flex, {
212
- justifyContent: "flex-end"
213
- }, /*#__PURE__*/React.createElement(ActionsMenuBody, {
214
- toggleState: toggleState,
215
- onToggle: onToggle,
216
- direction: "left",
217
- customTriggerComponent: /*#__PURE__*/React.createElement(Button, {
218
- variant: "danger",
219
- iconOnly: true,
220
- type: "button",
221
- width: "30px",
222
- height: "30px"
223
- }, /*#__PURE__*/React.createElement(Icon, {
224
- icon: ["fas", "times"]
225
- }))
226
- }, /*#__PURE__*/React.createElement(MenuItems, {
227
- ref: menuItemsRef,
228
- closeMenu: closeMenu,
229
- reasons: Reasons
230
- }))));
217
+ return /*#__PURE__*/_jsx("div", {
218
+ ref: menuRef,
219
+ children: /*#__PURE__*/_jsx(Flex, {
220
+ justifyContent: "flex-end",
221
+ children: /*#__PURE__*/_jsx(ActionsMenuBody, {
222
+ toggleState: toggleState,
223
+ onToggle: onToggle,
224
+ direction: "left",
225
+ customTriggerComponent: /*#__PURE__*/_jsx(Button, {
226
+ variant: "danger",
227
+ iconOnly: true,
228
+ type: "button",
229
+ width: "30px",
230
+ height: "30px",
231
+ children: /*#__PURE__*/_jsx(Icon, {
232
+ icon: ["fas", "times"]
233
+ })
234
+ }),
235
+ children: /*#__PURE__*/_jsx(MenuItems, {
236
+ ref: menuItemsRef,
237
+ closeMenu: closeMenu,
238
+ reasons: Reasons
239
+ })
240
+ })
241
+ })
242
+ });
231
243
  };
232
- return /*#__PURE__*/React.createElement(AdvancedActionsMenu, null);
244
+ return /*#__PURE__*/_jsx(AdvancedActionsMenu, {});
233
245
  };
234
246
  customActionsMenu.storyName = "Custom Actions Menu";
235
- export var textButtonActionsMenu = function textButtonActionsMenu() {
236
- var TextButtonActionsMenu = function TextButtonActionsMenu() {
237
- var _useState9 = useState(false),
238
- _useState10 = _slicedToArray(_useState9, 2),
239
- toggleState = _useState10[0],
240
- setToggle = _useState10[1];
241
- var menuItemsRef = useRef(null);
242
- var closeMenu = function closeMenu() {
247
+ export const textButtonActionsMenu = () => {
248
+ const TextButtonActionsMenu = () => {
249
+ const [toggleState, setToggle] = useState(false);
250
+ const menuItemsRef = useRef(null);
251
+ const closeMenu = () => {
243
252
  setToggle(false);
244
253
  };
245
- var resetAndCloseMenu = function resetAndCloseMenu() {
254
+ const resetAndCloseMenu = () => {
246
255
  if (menuItemsRef.current) {
247
256
  menuItemsRef.current.reset();
248
257
  }
249
258
  closeMenu();
250
259
  };
251
- var menuRef = useOnclickOutside(resetAndCloseMenu, {
260
+ const menuRef = useOnclickOutside(resetAndCloseMenu, {
252
261
  disabled: !toggleState
253
262
  });
254
- var onToggle = function onToggle(e) {
263
+ const onToggle = e => {
255
264
  e.stopPropagation();
256
265
  setToggle(!toggleState);
257
266
  };
258
- return /*#__PURE__*/React.createElement("div", {
259
- ref: menuRef
260
- }, /*#__PURE__*/React.createElement(ActionsMenuBody, {
261
- toggleState: toggleState,
262
- onToggle: onToggle,
263
- menuTopPosition: "30px",
264
- menuLeftPosition: "0",
265
- menuWidth: "120px",
266
- customTriggerComponent: /*#__PURE__*/React.createElement(Button, {
267
- variant: "ghost",
268
- type: "button",
269
- iconRight: true,
270
- small: true
271
- }, "Contact via...", /*#__PURE__*/React.createElement(Icon, {
272
- icon: ["fas", "chevron-down"]
273
- }))
274
- }, /*#__PURE__*/React.createElement(ActionsMenuItem, {
275
- href: "#"
276
- }, "Email"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
277
- href: "#"
278
- }, "Phone"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
279
- href: "#"
280
- }, "MS Teams"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
281
- href: "#"
282
- }, "Slack")));
267
+ return /*#__PURE__*/_jsx("div", {
268
+ ref: menuRef,
269
+ children: /*#__PURE__*/_jsxs(ActionsMenuBody, {
270
+ toggleState: toggleState,
271
+ onToggle: onToggle,
272
+ menuTopPosition: "30px",
273
+ menuLeftPosition: "0",
274
+ menuWidth: "120px",
275
+ customTriggerComponent: /*#__PURE__*/_jsxs(Button, {
276
+ variant: "ghost",
277
+ type: "button",
278
+ iconRight: true,
279
+ small: true,
280
+ children: ["Contact via...", /*#__PURE__*/_jsx(Icon, {
281
+ icon: ["fas", "chevron-down"]
282
+ })]
283
+ }),
284
+ children: [/*#__PURE__*/_jsx(ActionsMenuItem, {
285
+ href: "#",
286
+ children: "Email"
287
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
288
+ href: "#",
289
+ children: "Phone"
290
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
291
+ href: "#",
292
+ children: "MS Teams"
293
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
294
+ href: "#",
295
+ children: "Slack"
296
+ })]
297
+ })
298
+ });
283
299
  };
284
- return /*#__PURE__*/React.createElement(TextButtonActionsMenu, null);
300
+ return /*#__PURE__*/_jsx(TextButtonActionsMenu, {});
285
301
  };
286
302
  textButtonActionsMenu.storyName = "Text Button Actions Menu";
287
- export var keepInViewExample = function keepInViewExample() {
288
- return /*#__PURE__*/React.createElement(Flex, {
289
- alignItems: "flex-end",
290
- width: "100%",
291
- flexDirection: "column"
292
- }, /*#__PURE__*/React.createElement(ActionsMenu, {
293
- mb: "r"
294
- }, /*#__PURE__*/React.createElement(ActionsMenuItem, {
295
- href: "https://orchestrated.io/"
296
- }, "Open details page"), /*#__PURE__*/React.createElement(BrowserRouter, null, /*#__PURE__*/React.createElement(ActionsMenuItem, {
297
- as: Link,
298
- to: "/"
299
- }, "Edit")), /*#__PURE__*/React.createElement(ActionsMenuItem, {
300
- onClick: action("clicked")
301
- }, "Remove")), /*#__PURE__*/React.createElement(ActionsMenu, {
303
+ export const keepInViewExample = () => /*#__PURE__*/_jsxs(Flex, {
304
+ alignItems: "flex-end",
305
+ width: "100%",
306
+ flexDirection: "column",
307
+ children: [/*#__PURE__*/_jsxs(ActionsMenu, {
308
+ mb: "r",
309
+ children: [/*#__PURE__*/_jsx(ActionsMenuItem, {
310
+ href: "https://orchestrated.io/",
311
+ children: "Open details page"
312
+ }), /*#__PURE__*/_jsx(BrowserRouter, {
313
+ children: /*#__PURE__*/_jsx(ActionsMenuItem, {
314
+ as: Link,
315
+ to: "/",
316
+ children: "Edit"
317
+ })
318
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
319
+ onClick: action("clicked"),
320
+ children: "Remove"
321
+ })]
322
+ }), /*#__PURE__*/_jsxs(ActionsMenu, {
302
323
  menuTopPosition: "30px",
303
324
  menuLeftPosition: "0",
304
325
  menuWidth: "200px",
305
- customTriggerComponent: /*#__PURE__*/React.createElement(Button, {
326
+ customTriggerComponent: /*#__PURE__*/_jsxs(Button, {
306
327
  variant: "ghost",
307
328
  type: "button",
308
329
  iconRight: true,
309
- small: true
310
- }, "Contact via...", /*#__PURE__*/React.createElement(Icon, {
311
- icon: ["fas", "chevron-down"]
312
- }))
313
- }, /*#__PURE__*/React.createElement(ActionsMenuItem, {
314
- href: "#"
315
- }, "Email"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
316
- href: "#"
317
- }, "Phone"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
318
- href: "#"
319
- }, "MS Teams"), /*#__PURE__*/React.createElement(ActionsMenuItem, {
320
- href: "#"
321
- }, "Slack")));
322
- };
330
+ small: true,
331
+ children: ["Contact via...", /*#__PURE__*/_jsx(Icon, {
332
+ icon: ["fas", "chevron-down"]
333
+ })]
334
+ }),
335
+ children: [/*#__PURE__*/_jsx(ActionsMenuItem, {
336
+ href: "#",
337
+ children: "Email"
338
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
339
+ href: "#",
340
+ children: "Phone"
341
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
342
+ href: "#",
343
+ children: "MS Teams"
344
+ }), /*#__PURE__*/_jsx(ActionsMenuItem, {
345
+ href: "#",
346
+ children: "Slack"
347
+ })]
348
+ })]
349
+ });
323
350
  keepInViewExample.storyName = "Keep In View Example";
324
351
  defaultActionsMenu.__docgenInfo = {
325
352
  "description": "",