@sproutsocial/racine 22.5.1 → 23.0.0

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 (168) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/__flow__/Toast/Toast.flow.js +4 -0
  3. package/commonjs/Avatar/Avatar.js +24 -16
  4. package/commonjs/Badge/Badge.js +20 -13
  5. package/commonjs/Banner/Banner.js +35 -25
  6. package/commonjs/Box/Box.js +7 -2
  7. package/commonjs/Breadcrumb/Breadcrumb.js +36 -23
  8. package/commonjs/Button/Button.js +11 -3
  9. package/commonjs/Card/Card.js +25 -18
  10. package/commonjs/Card/subComponents.js +32 -15
  11. package/commonjs/CharacterCounter/CharacterCounter.js +7 -3
  12. package/commonjs/ChartLegend/ChartLegend.js +10 -3
  13. package/commonjs/ChartLegend/useChartLabels.js +12 -10
  14. package/commonjs/Checkbox/Checkbox.js +55 -45
  15. package/commonjs/Checkbox/styles.js +20 -17
  16. package/commonjs/Collapsible/Collapsible.js +22 -16
  17. package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +26 -16
  18. package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.js +7 -2
  19. package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.js +24 -14
  20. package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +7 -2
  21. package/commonjs/DatePicker/common.js +8 -6
  22. package/commonjs/Drawer/Drawer.js +160 -113
  23. package/commonjs/EmptyState/EmptyState.js +44 -31
  24. package/commonjs/Fieldset/Fieldset.js +31 -14
  25. package/commonjs/FormField/FormField.js +37 -31
  26. package/commonjs/Icon/Icon.js +35 -30
  27. package/commonjs/Image/Image.js +5 -3
  28. package/commonjs/Indicator/Indicator.js +12 -6
  29. package/commonjs/Input/Input.js +57 -51
  30. package/commonjs/KeyboardKey/KeyboardKey.js +12 -3
  31. package/commonjs/Label/Label.js +15 -9
  32. package/commonjs/Link/Link.js +10 -3
  33. package/commonjs/Listbox/Listbox.js +16 -13
  34. package/commonjs/Loader/Loader.js +9 -3
  35. package/commonjs/LoaderButton/LoaderButton.js +28 -18
  36. package/commonjs/Menu/Menu.js +128 -107
  37. package/commonjs/Menu/utils/descendants.js +6 -6
  38. package/commonjs/Message/Message.js +79 -59
  39. package/commonjs/Modal/Modal.js +54 -31
  40. package/commonjs/Modal/styles.js +8 -4
  41. package/commonjs/Numeral/Numeral.js +27 -11
  42. package/commonjs/PartnerLogo/PartnerLogo.js +22 -12
  43. package/commonjs/Radio/Radio.js +28 -22
  44. package/commonjs/SegmentedControl/SegmentedControl.js +38 -24
  45. package/commonjs/Select/Select.js +32 -25
  46. package/commonjs/SpotIllustration/SpotIllustration.js +13 -5
  47. package/commonjs/Stack/Stack.js +15 -8
  48. package/commonjs/Switch/Switch.js +14 -7
  49. package/commonjs/Table/Table.js +65 -45
  50. package/commonjs/TableCell/TableCell.js +6 -3
  51. package/commonjs/TableHeaderCell/TableHeaderCell.js +20 -12
  52. package/commonjs/TableRowAccordion/TableRowAccordion.js +35 -29
  53. package/commonjs/Tabs/Tabs.js +37 -30
  54. package/commonjs/Text/Text.js +10 -3
  55. package/commonjs/Textarea/Textarea.js +37 -32
  56. package/commonjs/ThemeProvider/index.js +8 -5
  57. package/commonjs/Toast/Toast.js +127 -91
  58. package/commonjs/Toast/index.js +15 -15
  59. package/commonjs/Toast/styles.js +56 -30
  60. package/commonjs/ToggleHint/ToggleHint.js +11 -5
  61. package/commonjs/Token/Token.js +39 -25
  62. package/commonjs/TokenInput/TokenInput.js +55 -47
  63. package/commonjs/TokenInput/TokenScreenReaderStatus.js +5 -3
  64. package/commonjs/Tooltip/Tooltip.js +34 -27
  65. package/dist/types/Drawer/Drawer.d.ts.map +1 -1
  66. package/dist/types/Drawer/DrawerTypes.d.ts +6 -3
  67. package/dist/types/Drawer/DrawerTypes.d.ts.map +1 -1
  68. package/dist/types/Listbox/ListboxTypes.d.ts +1 -1
  69. package/dist/types/Listbox/ListboxTypes.d.ts.map +1 -1
  70. package/dist/types/Menu/MenuTypes.d.ts +4 -4
  71. package/dist/types/Menu/MenuTypes.d.ts.map +1 -1
  72. package/dist/types/ThemeProvider/index.d.ts +1 -1
  73. package/dist/types/ThemeProvider/index.d.ts.map +1 -1
  74. package/dist/types/Toast/Toast.d.ts +23 -2
  75. package/dist/types/Toast/Toast.d.ts.map +1 -1
  76. package/dist/types/Toast/ToastTypes.d.ts +27 -13
  77. package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
  78. package/dist/types/Toast/index.d.ts +2 -4
  79. package/dist/types/Toast/index.d.ts.map +1 -1
  80. package/dist/types/Toast/styles.d.ts +11 -15
  81. package/dist/types/Toast/styles.d.ts.map +1 -1
  82. package/dist/types/Tooltip/TooltipTypes.d.ts +2 -2
  83. package/dist/types/Tooltip/TooltipTypes.d.ts.map +1 -1
  84. package/dist/types/utils/react-testing-library.d.ts +61 -121
  85. package/dist/types/utils/react-testing-library.d.ts.map +1 -1
  86. package/lib/Avatar/Avatar.js +25 -16
  87. package/lib/Badge/Badge.js +22 -13
  88. package/lib/Banner/Banner.js +37 -25
  89. package/lib/Box/Box.js +8 -2
  90. package/lib/Breadcrumb/Breadcrumb.js +37 -23
  91. package/lib/Button/Button.js +11 -3
  92. package/lib/Card/Card.js +17 -8
  93. package/lib/Card/subComponents.js +35 -15
  94. package/lib/CharacterCounter/CharacterCounter.js +7 -3
  95. package/lib/ChartLegend/ChartLegend.js +11 -3
  96. package/lib/ChartLegend/useChartLabels.js +13 -10
  97. package/lib/Checkbox/Checkbox.js +56 -45
  98. package/lib/Checkbox/styles.js +20 -17
  99. package/lib/Collapsible/Collapsible.js +22 -16
  100. package/lib/DatePicker/DateRangePicker/DateRangePicker.js +29 -16
  101. package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.js +8 -2
  102. package/lib/DatePicker/SingleDatePicker/SingleDatePicker.js +27 -14
  103. package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +8 -2
  104. package/lib/DatePicker/common.js +8 -6
  105. package/lib/Drawer/Drawer.js +159 -111
  106. package/lib/EmptyState/EmptyState.js +46 -31
  107. package/lib/Fieldset/Fieldset.js +33 -14
  108. package/lib/FormField/FormField.js +38 -31
  109. package/lib/Icon/Icon.js +36 -30
  110. package/lib/Image/Image.js +5 -3
  111. package/lib/Indicator/Indicator.js +13 -6
  112. package/lib/Input/Input.js +57 -49
  113. package/lib/KeyboardKey/KeyboardKey.js +12 -3
  114. package/lib/Label/Label.js +16 -9
  115. package/lib/Link/Link.js +11 -3
  116. package/lib/Listbox/Listbox.js +17 -13
  117. package/lib/Loader/Loader.js +9 -3
  118. package/lib/LoaderButton/LoaderButton.js +30 -18
  119. package/lib/Menu/Menu.js +128 -104
  120. package/lib/Menu/utils/descendants.js +5 -4
  121. package/lib/Message/Message.js +80 -59
  122. package/lib/Modal/Modal.js +56 -31
  123. package/lib/Modal/styles.js +8 -2
  124. package/lib/Numeral/Numeral.js +30 -11
  125. package/lib/PartnerLogo/PartnerLogo.js +22 -12
  126. package/lib/Radio/Radio.js +29 -22
  127. package/lib/SegmentedControl/SegmentedControl.js +40 -24
  128. package/lib/Select/Select.js +33 -25
  129. package/lib/SpotIllustration/SpotIllustration.js +13 -5
  130. package/lib/Stack/Stack.js +17 -8
  131. package/lib/Switch/Switch.js +15 -7
  132. package/lib/Table/Table.js +65 -43
  133. package/lib/TableCell/TableCell.js +5 -2
  134. package/lib/TableHeaderCell/TableHeaderCell.js +20 -11
  135. package/lib/TableRowAccordion/TableRowAccordion.js +35 -28
  136. package/lib/Tabs/Tabs.js +37 -30
  137. package/lib/Text/Text.js +11 -3
  138. package/lib/Textarea/Textarea.js +37 -30
  139. package/lib/ThemeProvider/index.js +8 -3
  140. package/lib/Toast/Toast.js +130 -90
  141. package/lib/Toast/index.js +3 -5
  142. package/lib/Toast/styles.js +55 -26
  143. package/lib/ToggleHint/ToggleHint.js +12 -5
  144. package/lib/Token/Token.js +42 -25
  145. package/lib/TokenInput/TokenInput.js +56 -47
  146. package/lib/TokenInput/TokenScreenReaderStatus.js +5 -3
  147. package/lib/Tooltip/Tooltip.js +34 -27
  148. package/package.json +37 -33
  149. package/commonjs/Drawer/SlideTransition.js +0 -47
  150. package/commonjs/Popout/Popout.js +0 -313
  151. package/commonjs/Popout/PopoutTypes.js +0 -5
  152. package/commonjs/Popout/index.js +0 -30
  153. package/commonjs/Popout/styles.js +0 -13
  154. package/dist/types/Drawer/SlideTransition.d.ts +0 -15
  155. package/dist/types/Drawer/SlideTransition.d.ts.map +0 -1
  156. package/dist/types/Popout/Popout.d.ts +0 -14
  157. package/dist/types/Popout/Popout.d.ts.map +0 -1
  158. package/dist/types/Popout/PopoutTypes.d.ts +0 -90
  159. package/dist/types/Popout/PopoutTypes.d.ts.map +0 -1
  160. package/dist/types/Popout/index.d.ts +0 -5
  161. package/dist/types/Popout/index.d.ts.map +0 -1
  162. package/dist/types/Popout/styles.d.ts +0 -2
  163. package/dist/types/Popout/styles.d.ts.map +0 -1
  164. package/lib/Drawer/SlideTransition.js +0 -38
  165. package/lib/Popout/Popout.js +0 -303
  166. package/lib/Popout/PopoutTypes.js +0 -1
  167. package/lib/Popout/index.js +0 -4
  168. package/lib/Popout/styles.js +0 -6
@@ -1,28 +1,52 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  var _excluded = ["title", "id", "children", "render"],
3
2
  _excluded2 = ["children"],
4
- _excluded3 = ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets", "width", "focusLockExemptCheck"],
3
+ _excluded3 = ["id", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets", "width", "focusLockExemptCheck", "isOpen"],
5
4
  _excluded4 = ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets", "width"];
5
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
6
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
10
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
13
  import * as React from "react";
15
14
  import { useContext, useEffect, useRef } from "react";
16
15
  import FocusLock from "react-focus-lock";
17
- import { animated } from "react-spring";
16
+ import { animated, useTransition } from "@react-spring/web";
17
+ import { MOTION_DURATION_MEDIUM } from "@sproutsocial/seeds-motion/dist/seeds-motion-unitless";
18
18
  import Box from "../Box";
19
19
  import Button from "../Button";
20
20
  import Icon from "../Icon";
21
21
  // eslint-disable-next-line import/no-deprecated
22
22
  import Text from "../Text";
23
23
  import Portal from "../Portal";
24
- import { SlideTransition } from "./SlideTransition";
25
24
  import Container, { Content } from "./styles";
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
27
+ var useSlideTransition = function useSlideTransition(_ref) {
28
+ var isVisible = _ref.isVisible,
29
+ width = _ref.width,
30
+ direction = _ref.direction;
31
+ var offset = width * (direction === "left" ? -1 : 1);
32
+ return useTransition(isVisible, {
33
+ from: {
34
+ opacity: 0,
35
+ x: offset
36
+ },
37
+ enter: {
38
+ opacity: 1,
39
+ x: 0
40
+ },
41
+ leave: {
42
+ opacity: 0,
43
+ x: offset
44
+ },
45
+ config: {
46
+ duration: MOTION_DURATION_MEDIUM * 1000
47
+ }
48
+ });
49
+ };
26
50
  var AnimatedDrawer = animated(Container);
27
51
  var doesRefContainEventTarget = function doesRefContainEventTarget(ref, event) {
28
52
  return ref.current && event.target instanceof Node && ref.current.contains(event.target);
@@ -39,65 +63,65 @@ var DrawerCloseButton = function DrawerCloseButton(props) {
39
63
  closeButtonLabel: closeButtonLabel
40
64
  })) !== null && _props$render !== void 0 ? _props$render : null;
41
65
  }
42
- return /*#__PURE__*/React.createElement(Button, _extends({
66
+ return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
43
67
  appearance: "pill",
44
68
  "aria-label": closeButtonLabel,
45
69
  onClick: onClose
46
- }, props), props.children || /*#__PURE__*/React.createElement(Icon, {
47
- "aria-hidden": true,
48
- name: "x-outline"
70
+ }, props), {}, {
71
+ children: props.children || /*#__PURE__*/_jsx(Icon, {
72
+ "aria-hidden": true,
73
+ name: "x-outline"
74
+ })
49
75
  }));
50
76
  };
51
- var DrawerHeader = function DrawerHeader(_ref) {
52
- var _ref$title = _ref.title,
53
- title = _ref$title === void 0 ? "" : _ref$title,
54
- _ref$id = _ref.id,
55
- id = _ref$id === void 0 ? undefined : _ref$id,
56
- children = _ref.children,
57
- render = _ref.render,
58
- rest = _objectWithoutProperties(_ref, _excluded);
77
+ var DrawerHeader = function DrawerHeader(_ref2) {
78
+ var _ref2$title = _ref2.title,
79
+ title = _ref2$title === void 0 ? "" : _ref2$title,
80
+ _ref2$id = _ref2.id,
81
+ id = _ref2$id === void 0 ? undefined : _ref2$id,
82
+ children = _ref2.children,
83
+ render = _ref2.render,
84
+ rest = _objectWithoutProperties(_ref2, _excluded);
59
85
  var drawerContext = useContext(DrawerContext);
60
86
  if (render) {
61
87
  return render(drawerContext);
62
88
  }
63
- return /*#__PURE__*/React.createElement(Box, _extends({
89
+ return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
64
90
  display: "flex",
65
91
  flex: "0 0 auto",
66
92
  justifyContent: "space-between",
67
93
  alignItems: "center",
68
94
  pt: 400,
69
95
  px: 450
70
- }, rest), children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
71
- as: "h2",
72
- fontSize: 400,
73
- fontWeight: "semibold",
74
- color: "text.headline",
75
- id: id
76
- }, title), /*#__PURE__*/React.createElement(DrawerCloseButton, null)));
96
+ }, rest), {}, {
97
+ children: children || /*#__PURE__*/_jsxs(React.Fragment, {
98
+ children: [/*#__PURE__*/_jsx(Text, {
99
+ as: "h2",
100
+ fontSize: 400,
101
+ fontWeight: "semibold",
102
+ color: "text.headline",
103
+ id: id,
104
+ children: title
105
+ }), /*#__PURE__*/_jsx(DrawerCloseButton, {})]
106
+ })
107
+ }));
77
108
  };
78
- var DrawerContent = function DrawerContent(_ref2) {
79
- var children = _ref2.children,
80
- rest = _objectWithoutProperties(_ref2, _excluded2);
81
- return /*#__PURE__*/React.createElement(Content, _extends({
109
+ var DrawerContent = function DrawerContent(_ref3) {
110
+ var children = _ref3.children,
111
+ rest = _objectWithoutProperties(_ref3, _excluded2);
112
+ return /*#__PURE__*/_jsx(Content, _objectSpread(_objectSpread({
82
113
  height: "100%",
83
114
  p: 450,
84
115
  color: "text.body"
85
- }, rest), children);
116
+ }, rest), {}, {
117
+ children: children
118
+ }));
86
119
  };
87
- var Drawer = function Drawer(_ref3) {
88
- var id = _ref3.id,
89
- style = _ref3.style,
90
- offset = _ref3.offset,
91
- direction = _ref3.direction,
92
- children = _ref3.children,
93
- disableCloseOnClickOutside = _ref3.disableCloseOnClickOutside,
94
- onClose = _ref3.onClose,
95
- zIndex = _ref3.zIndex,
96
- closeTargets = _ref3.closeTargets,
97
- width = _ref3.width,
98
- focusLockExemptCheck = _ref3.focusLockExemptCheck,
99
- rest = _objectWithoutProperties(_ref3, _excluded3);
100
- var drawerRef = useRef(null);
120
+ var useCloseOnBodyClick = function useCloseOnBodyClick(_ref4) {
121
+ var ref = _ref4.ref,
122
+ disableCloseOnClickOutside = _ref4.disableCloseOnClickOutside,
123
+ onClose = _ref4.onClose,
124
+ closeTargets = _ref4.closeTargets;
101
125
  useEffect(function () {
102
126
  var documentBody = document.body;
103
127
  if (!documentBody) {
@@ -109,7 +133,7 @@ var Drawer = function Drawer(_ref3) {
109
133
  }
110
134
  };
111
135
  var bodyClick = function bodyClick(event) {
112
- if (!doesRefContainEventTarget(drawerRef, event) && !disableCloseOnClickOutside) {
136
+ if (!doesRefContainEventTarget(ref, event) && !disableCloseOnClickOutside) {
113
137
  onClose();
114
138
  }
115
139
  };
@@ -145,75 +169,99 @@ var Drawer = function Drawer(_ref3) {
145
169
  });
146
170
  }
147
171
  };
148
- }, [onClose, disableCloseOnClickOutside, closeTargets]);
149
- return /*#__PURE__*/React.createElement(FocusLock, {
150
- key: id,
172
+ }, [onClose, disableCloseOnClickOutside, closeTargets, ref]);
173
+ };
174
+ var Drawer = function Drawer(_ref5) {
175
+ var id = _ref5.id,
176
+ offset = _ref5.offset,
177
+ direction = _ref5.direction,
178
+ children = _ref5.children,
179
+ disableCloseOnClickOutside = _ref5.disableCloseOnClickOutside,
180
+ onClose = _ref5.onClose,
181
+ zIndex = _ref5.zIndex,
182
+ closeTargets = _ref5.closeTargets,
183
+ width = _ref5.width,
184
+ focusLockExemptCheck = _ref5.focusLockExemptCheck,
185
+ isOpen = _ref5.isOpen,
186
+ rest = _objectWithoutProperties(_ref5, _excluded3);
187
+ var ref = useRef(null);
188
+ useCloseOnBodyClick({
189
+ ref: ref,
190
+ disableCloseOnClickOutside: disableCloseOnClickOutside,
191
+ onClose: onClose,
192
+ closeTargets: closeTargets
193
+ });
194
+ var transition = useSlideTransition({
195
+ isVisible: isOpen,
196
+ width: width,
197
+ direction: direction
198
+ });
199
+ return /*#__PURE__*/_jsx(FocusLock, {
151
200
  autoFocus: true,
152
201
  returnFocus: true,
153
202
  whiteList: focusLockExemptCheck ? function (e) {
154
203
  return !focusLockExemptCheck(e);
155
- } : undefined
156
- }, /*#__PURE__*/React.createElement(AnimatedDrawer, _extends({
157
- ref: drawerRef,
158
- style: style,
159
- width: width,
160
- offset: offset,
161
- direction: direction,
162
- "data-qa-drawer": id,
163
- role: "dialog"
164
- }, rest), children));
204
+ } : undefined,
205
+ children: transition(function (style, isVisible) {
206
+ return isVisible ? /*#__PURE__*/_jsx(AnimatedDrawer, _objectSpread(_objectSpread({
207
+ ref: ref,
208
+ style: _objectSpread(_objectSpread({}, style), {}, {
209
+ zIndex: zIndex
210
+ }),
211
+ width: width,
212
+ offset: offset,
213
+ direction: direction,
214
+ "data-qa-drawer": id,
215
+ role: "dialog"
216
+ }, rest), {}, {
217
+ children: children
218
+ })) : null;
219
+ })
220
+ }, id);
165
221
  };
166
- var DrawerContainer = function DrawerContainer(_ref4) {
167
- var children = _ref4.children,
168
- closeButtonLabel = _ref4.closeButtonLabel,
169
- _ref4$direction = _ref4.direction,
170
- direction = _ref4$direction === void 0 ? "right" : _ref4$direction,
171
- _ref4$disableCloseOnC = _ref4.disableCloseOnClickOutside,
172
- disableCloseOnClickOutside = _ref4$disableCloseOnC === void 0 ? false : _ref4$disableCloseOnC,
173
- id = _ref4.id,
174
- isOpen = _ref4.isOpen,
175
- _ref4$offset = _ref4.offset,
176
- offset = _ref4$offset === void 0 ? 0 : _ref4$offset,
177
- onClose = _ref4.onClose,
178
- _ref4$zIndex = _ref4.zIndex,
179
- zIndex = _ref4$zIndex === void 0 ? 7 : _ref4$zIndex,
180
- _ref4$closeTargets = _ref4.closeTargets,
181
- closeTargets = _ref4$closeTargets === void 0 ? [] : _ref4$closeTargets,
182
- _ref4$width = _ref4.width,
183
- width = _ref4$width === void 0 ? 600 : _ref4$width,
184
- rest = _objectWithoutProperties(_ref4, _excluded4);
185
- return /*#__PURE__*/React.createElement(Portal, {
186
- id: id
187
- }, /*#__PURE__*/React.createElement(DrawerContext.Provider, {
188
- value: {
189
- onClose: onClose,
190
- closeButtonLabel: closeButtonLabel
191
- }
192
- }, /*#__PURE__*/React.createElement(SlideTransition, {
193
- width: width + offset,
194
- direction: direction,
195
- isVisible: isOpen
196
- }, function (_ref5) {
197
- var isVisible = _ref5.isVisible,
198
- style = _ref5.style,
199
- key = _ref5.key;
200
- return isVisible && /*#__PURE__*/React.createElement(Drawer, _extends({
201
- key: key,
202
- id: id,
203
- style: _objectSpread(_objectSpread({}, style), {}, {
204
- zIndex: zIndex
205
- }),
206
- offset: offset,
207
- direction: direction,
208
- disableCloseOnClickOutside: disableCloseOnClickOutside,
209
- onClose: onClose,
210
- zIndex: zIndex,
211
- closeTargets: closeTargets,
212
- width: width,
213
- "data-qa-drawer": id || "",
214
- "data-qa-drawer-isopen": isOpen === true
215
- }, rest), children);
216
- })));
222
+ var DrawerContainer = function DrawerContainer(_ref6) {
223
+ var children = _ref6.children,
224
+ closeButtonLabel = _ref6.closeButtonLabel,
225
+ _ref6$direction = _ref6.direction,
226
+ direction = _ref6$direction === void 0 ? "right" : _ref6$direction,
227
+ _ref6$disableCloseOnC = _ref6.disableCloseOnClickOutside,
228
+ disableCloseOnClickOutside = _ref6$disableCloseOnC === void 0 ? false : _ref6$disableCloseOnC,
229
+ id = _ref6.id,
230
+ isOpen = _ref6.isOpen,
231
+ _ref6$offset = _ref6.offset,
232
+ offset = _ref6$offset === void 0 ? 0 : _ref6$offset,
233
+ onClose = _ref6.onClose,
234
+ _ref6$zIndex = _ref6.zIndex,
235
+ zIndex = _ref6$zIndex === void 0 ? 7 : _ref6$zIndex,
236
+ _ref6$closeTargets = _ref6.closeTargets,
237
+ closeTargets = _ref6$closeTargets === void 0 ? [] : _ref6$closeTargets,
238
+ _ref6$width = _ref6.width,
239
+ width = _ref6$width === void 0 ? 600 : _ref6$width,
240
+ rest = _objectWithoutProperties(_ref6, _excluded4);
241
+ return /*#__PURE__*/_jsx(Portal, {
242
+ id: id,
243
+ children: /*#__PURE__*/_jsx(DrawerContext.Provider, {
244
+ value: {
245
+ onClose: onClose,
246
+ closeButtonLabel: closeButtonLabel
247
+ },
248
+ children: /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
249
+ isOpen: isOpen,
250
+ id: id,
251
+ offset: offset,
252
+ direction: direction,
253
+ disableCloseOnClickOutside: disableCloseOnClickOutside,
254
+ onClose: onClose,
255
+ zIndex: zIndex,
256
+ closeTargets: closeTargets,
257
+ width: width,
258
+ "data-qa-drawer": id || "",
259
+ "data-qa-drawer-isopen": isOpen
260
+ }, rest), {}, {
261
+ children: children
262
+ }))
263
+ })
264
+ });
217
265
  };
218
266
  DrawerHeader.displayName = "Drawer.Header";
219
267
  DrawerContent.displayName = "Drawer.Content";
@@ -1,11 +1,18 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1
2
  var _excluded = ["media", "headline", "subtext", "primaryAction", "secondaryAction"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
10
  import * as React from "react";
6
11
  import Box from "../Box";
7
12
  // eslint-disable-next-line import/no-deprecated
8
13
  import Text from "../Text";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
16
  var EmptyState = function EmptyState(_ref) {
10
17
  var media = _ref.media,
11
18
  headline = _ref.headline,
@@ -13,38 +20,46 @@ var EmptyState = function EmptyState(_ref) {
13
20
  primaryAction = _ref.primaryAction,
14
21
  secondaryAction = _ref.secondaryAction,
15
22
  rest = _objectWithoutProperties(_ref, _excluded);
16
- return /*#__PURE__*/React.createElement(Box, _extends({
23
+ return /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread({
17
24
  maxWidth: "400px",
18
25
  mx: "auto",
19
26
  "data-qa-emptystate": headline
20
- }, rest), media && /*#__PURE__*/React.createElement(Box, {
21
- display: "flex",
22
- flexDirection: "column",
23
- justifyContent: "center",
24
- mb: 450
25
- }, media), /*#__PURE__*/React.createElement(Text, {
26
- as: "div",
27
- textAlign: "center"
28
- }, /*#__PURE__*/React.createElement(Text, {
29
- as: "p",
30
- m: 0,
31
- color: "text.headline",
32
- fontWeight: "semibold",
33
- fontSize: 400
34
- }, headline), subtext && /*#__PURE__*/React.createElement(Text, {
35
- as: "p",
36
- color: "text.subtext",
37
- fontSize: 200,
38
- mb: 0,
39
- mt: 400
40
- }, subtext), /*#__PURE__*/React.createElement(Box, {
41
- mt: primaryAction || secondaryAction ? 450 : 0
42
- }, primaryAction && /*#__PURE__*/React.cloneElement(primaryAction, {
43
- appearance: "primary"
44
- }), secondaryAction && /*#__PURE__*/React.createElement(Box, {
45
- mt: 400
46
- }, /*#__PURE__*/React.cloneElement(secondaryAction, {
47
- appearance: "unstyled"
48
- })))));
27
+ }, rest), {}, {
28
+ children: [media && /*#__PURE__*/_jsx(Box, {
29
+ display: "flex",
30
+ flexDirection: "column",
31
+ justifyContent: "center",
32
+ mb: 450,
33
+ children: media
34
+ }), /*#__PURE__*/_jsxs(Text, {
35
+ as: "div",
36
+ textAlign: "center",
37
+ children: [/*#__PURE__*/_jsx(Text, {
38
+ as: "p",
39
+ m: 0,
40
+ color: "text.headline",
41
+ fontWeight: "semibold",
42
+ fontSize: 400,
43
+ children: headline
44
+ }), subtext && /*#__PURE__*/_jsx(Text, {
45
+ as: "p",
46
+ color: "text.subtext",
47
+ fontSize: 200,
48
+ mb: 0,
49
+ mt: 400,
50
+ children: subtext
51
+ }), /*#__PURE__*/_jsxs(Box, {
52
+ mt: primaryAction || secondaryAction ? 450 : 0,
53
+ children: [primaryAction && /*#__PURE__*/React.cloneElement(primaryAction, {
54
+ appearance: "primary"
55
+ }), secondaryAction && /*#__PURE__*/_jsx(Box, {
56
+ mt: 400,
57
+ children: /*#__PURE__*/React.cloneElement(secondaryAction, {
58
+ appearance: "unstyled"
59
+ })
60
+ })]
61
+ })]
62
+ })]
63
+ }));
49
64
  };
50
65
  export default EmptyState;
@@ -1,7 +1,12 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1
2
  var _excluded = ["layout", "label", "helperText", "children"],
2
3
  _excluded2 = ["children"],
3
4
  _excluded3 = ["children"];
4
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
10
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
12
  import * as React from "react";
@@ -9,6 +14,8 @@ import Box from "../Box";
9
14
  // eslint-disable-next-line import/no-deprecated
10
15
  import Text from "../Text";
11
16
  import { ChildContainer } from "./styles";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
19
  /**
13
20
  * Fieldset Component
14
21
  */
@@ -19,39 +26,51 @@ var Fieldset = function Fieldset(_ref) {
19
26
  helperText = _ref.helperText,
20
27
  children = _ref.children,
21
28
  rest = _objectWithoutProperties(_ref, _excluded);
22
- return /*#__PURE__*/React.createElement(Box, _extends({
29
+ return /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread({
23
30
  as: "fieldset",
24
31
  border: "none",
25
32
  p: 0,
26
33
  "data-qa-fieldset": ""
27
- }, rest), typeof label === "string" ? /*#__PURE__*/React.createElement(Fieldset.Legend, null, label) : label, typeof helperText === "string" ? /*#__PURE__*/React.createElement(Fieldset.HelperText, null, helperText) : helperText, /*#__PURE__*/React.createElement(Box, {
28
- display: "flex",
29
- flexDirection: layout === "vertical" ? "column" : "row"
30
- }, React.Children.map(children, function (child) {
31
- return /*#__PURE__*/React.createElement(ChildContainer, {
32
- layout: layout
33
- }, child);
34
- })));
34
+ }, rest), {}, {
35
+ children: [typeof label === "string" ? /*#__PURE__*/_jsx(Fieldset.Legend, {
36
+ children: label
37
+ }) : label, typeof helperText === "string" ? /*#__PURE__*/_jsx(Fieldset.HelperText, {
38
+ children: helperText
39
+ }) : helperText, /*#__PURE__*/_jsx(Box, {
40
+ display: "flex",
41
+ flexDirection: layout === "vertical" ? "column" : "row",
42
+ children: React.Children.map(children, function (child) {
43
+ return /*#__PURE__*/_jsx(ChildContainer, {
44
+ layout: layout,
45
+ children: child
46
+ });
47
+ })
48
+ })]
49
+ }));
35
50
  };
36
51
  var FieldsetLegend = function FieldsetLegend(_ref2) {
37
52
  var children = _ref2.children,
38
53
  rest = _objectWithoutProperties(_ref2, _excluded2);
39
- return /*#__PURE__*/React.createElement(Text, _extends({
54
+ return /*#__PURE__*/_jsx(Text, _objectSpread(_objectSpread({
40
55
  as: "legend",
41
56
  fontSize: 300,
42
57
  fontWeight: "semibold",
43
58
  color: "text.body",
44
59
  mb: 300
45
- }, rest), children);
60
+ }, rest), {}, {
61
+ children: children
62
+ }));
46
63
  };
47
64
  var FieldsetHelperText = function FieldsetHelperText(_ref3) {
48
65
  var children = _ref3.children,
49
66
  rest = _objectWithoutProperties(_ref3, _excluded3);
50
- return /*#__PURE__*/React.createElement(Text, _extends({
67
+ return /*#__PURE__*/_jsx(Text, _objectSpread(_objectSpread({
51
68
  as: "p",
52
69
  fontSize: 200,
53
70
  mb: 300
54
- }, rest), children);
71
+ }, rest), {}, {
72
+ children: children
73
+ }));
55
74
  };
56
75
  FieldsetLegend.displayName = "Fieldset.Legend";
57
76
  FieldsetHelperText.displayName = "Fieldset.HelperText";
@@ -1,6 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden", "required"];
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -20,6 +19,8 @@ import Box from "../Box";
20
19
  import Label from "../Label";
21
20
  import Text from "../Text";
22
21
  import { VisuallyHidden } from "../VisuallyHidden";
22
+ import { jsx as _jsx } from "react/jsx-runtime";
23
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
24
  var idCounter = 0;
24
25
  var FormField = function FormField(_ref) {
25
26
  var children = _ref.children,
@@ -42,37 +43,43 @@ var FormField = function FormField(_ref) {
42
43
  var errorId = "Error-".concat(id);
43
44
  var containerText = useTextContent("");
44
45
  var errorContainerText = useTextContent("");
45
- return /*#__PURE__*/React.createElement(Box, _extends({}, rest, qa, {
46
+ return /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread(_objectSpread({}, rest), qa), {}, {
46
47
  mb: mb,
47
48
  "data-qa-formfield": qa && qa["data-qa-formfield"] || id || containerText.current,
48
- "data-qa-formfield-isinvalid": isInvalid === true
49
- }), isLabelHidden ? /*#__PURE__*/React.createElement(VisuallyHidden, {
50
- "data-testid": "visually-hidden"
51
- }, /*#__PURE__*/React.createElement(Label, {
52
- htmlFor: id,
53
- required: required
54
- }, label)) : /*#__PURE__*/React.createElement(Label, {
55
- mb: helperText ? 100 : 300,
56
- htmlFor: id,
57
- required: required
58
- }, label), helperText && /*#__PURE__*/React.createElement(Text, {
59
- as: "p",
60
- fontSize: 200,
61
- mb: 300,
62
- color: "text.subtext"
63
- }, helperText), children(_objectSpread({
64
- id: id,
65
- isInvalid: isInvalid,
66
- ariaDescribedby: errorId
67
- }, required !== undefined && {
68
- required: required
69
- })), isInvalid && error && /*#__PURE__*/React.createElement(Text, {
70
- as: "div",
71
- fontSize: 200,
72
- color: "text.error",
73
- mt: 300,
74
- id: errorId,
75
- "data-qa-formfield-error": qa && qa["data-qa-formfield-error"] || errorContainerText.current
76
- }, error));
49
+ "data-qa-formfield-isinvalid": isInvalid === true,
50
+ children: [isLabelHidden ? /*#__PURE__*/_jsx(VisuallyHidden, {
51
+ "data-testid": "visually-hidden",
52
+ children: /*#__PURE__*/_jsx(Label, {
53
+ htmlFor: id,
54
+ required: required,
55
+ children: label
56
+ })
57
+ }) : /*#__PURE__*/_jsx(Label, {
58
+ mb: helperText ? 100 : 300,
59
+ htmlFor: id,
60
+ required: required,
61
+ children: label
62
+ }), helperText && /*#__PURE__*/_jsx(Text, {
63
+ as: "p",
64
+ fontSize: 200,
65
+ mb: 300,
66
+ color: "text.subtext",
67
+ children: helperText
68
+ }), children(_objectSpread({
69
+ id: id,
70
+ isInvalid: isInvalid,
71
+ ariaDescribedby: errorId
72
+ }, required !== undefined && {
73
+ required: required
74
+ })), isInvalid && error && /*#__PURE__*/_jsx(Text, {
75
+ as: "div",
76
+ fontSize: 200,
77
+ color: "text.error",
78
+ mt: 300,
79
+ id: errorId,
80
+ "data-qa-formfield-error": qa && qa["data-qa-formfield-error"] || errorContainerText.current,
81
+ children: error
82
+ })]
83
+ }));
77
84
  };
78
85
  export default FormField;