@react-fabric/core 1.0.0-beta.19 → 1.0.0-beta.20

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.
@@ -91,7 +91,7 @@ var Panel = function Panel(_ref) {
91
91
  className: classNames(titleClassName, "flex-1 select-none truncate", title && "py-1 first:px-2"),
92
92
  children: title
93
93
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
94
- className: "px-1",
94
+ className: "px-1 leading-none",
95
95
  children: actions
96
96
  }), hasTools && /*#__PURE__*/jsxRuntime.jsxs("div", {
97
97
  role: "none",
@@ -47,6 +47,7 @@ var Flyout = function Flyout(_ref) {
47
47
  context = _useFloating.context;
48
48
  var dismiss = react.useDismiss(context, {
49
49
  outsidePressEvent: "mousedown",
50
+ outsidePress: !hideMask,
50
51
  escapeKey: true
51
52
  });
52
53
  var role = react.useRole(context);
@@ -73,9 +74,7 @@ var Flyout = function Flyout(_ref) {
73
74
  }, [onBeforeClose, onClose]);
74
75
  react$1.useEffect(function () {
75
76
  setTimeout(function () {
76
- var _refs$floating$curren2;
77
77
  refs.floating.current && (refs.floating.current.dataset.show = "true");
78
- (_refs$floating$curren2 = refs.floating.current) === null || _refs$floating$curren2 === void 0 || (_refs$floating$curren2 = _refs$floating$curren2.querySelector('[role="dialog"]')) === null || _refs$floating$curren2 === void 0 || _refs$floating$curren2.focus();
79
78
  }, 50);
80
79
  }, []);
81
80
  var tryClosing = react$1.useCallback(function (e) {
@@ -103,47 +102,45 @@ var Flyout = function Flyout(_ref) {
103
102
  children: /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
104
103
  children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
105
104
  context: context,
106
- children: /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
107
- children: /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread(_objectSpread(_objectSpread({
108
- "data-align": align,
109
- className: classNames(Flyout_module.flyout, "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl", align === "start" ? "start-0" : "end-0", size === "sm" && "w-[20rem]", size === "md" && "w-[40rem]", size === "lg" && "w-[60vw]", size === "xl" && "w-[80vw]"),
110
- style: {
111
- width: width,
112
- minWidth: minWidth
113
- },
114
- onMouseUpCapture: tryClosing,
115
- ref: refs.setFloating
116
- }, getFloatingProps()), aria), aria), {}, {
117
- children: /*#__PURE__*/jsxRuntime.jsxs(HotKeyWrapper.HotKeyWrapper, {
118
- children: [/*#__PURE__*/jsxRuntime.jsxs(HeadFoot.Header, {
119
- flex: true,
120
- className: classNames(Flyout_module.flyoutHeader, headerClassName),
121
- children: [icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
122
- icon: icon,
123
- bg: iconBg,
124
- color: iconColor,
125
- className: classNames(iconClassName, "p-1"),
126
- rtlFlip: rtlFlip
127
- }), /*#__PURE__*/jsxRuntime.jsx("label", {
128
- className: "flex-1 truncate py-2 px-1",
129
- children: title
130
- }), actions, /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
131
- "data-ref": "panelClose",
132
- className: classNames(Flyout_module.panelAction, "cursor-pointer p-1 text-xl self-stretch"),
133
- icon: icons.CoreIcons.close,
134
- onClick: function onClick() {
135
- return handleClose(false);
136
- }
137
- })]
138
- }), loading && /*#__PURE__*/jsxRuntime.jsx(Animations.Loading, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
139
- role: "dialog",
140
- className: classNames(Flyout_module.flyoutBody, "flex-1 grid overflow-hidden"),
141
- tabIndex: 0,
142
- children: children
105
+ children: /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread(_objectSpread(_objectSpread({
106
+ "data-align": align,
107
+ className: classNames(Flyout_module.flyout, "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl", align === "start" ? "start-0" : "end-0", size === "sm" && "w-[20rem]", size === "md" && "w-[40rem]", size === "lg" && "w-[60vw]", size === "xl" && "w-[80vw]"),
108
+ style: {
109
+ width: width,
110
+ minWidth: minWidth
111
+ },
112
+ onMouseUpCapture: tryClosing,
113
+ ref: refs.setFloating
114
+ }, getFloatingProps()), aria), aria), {}, {
115
+ children: /*#__PURE__*/jsxRuntime.jsxs(HotKeyWrapper.HotKeyWrapper, {
116
+ children: [/*#__PURE__*/jsxRuntime.jsxs(HeadFoot.Header, {
117
+ flex: true,
118
+ className: classNames(Flyout_module.flyoutHeader, headerClassName),
119
+ children: [icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
120
+ icon: icon,
121
+ bg: iconBg,
122
+ color: iconColor,
123
+ className: classNames(iconClassName, "p-1"),
124
+ rtlFlip: rtlFlip
125
+ }), /*#__PURE__*/jsxRuntime.jsx("label", {
126
+ className: "flex-1 truncate py-2 px-1",
127
+ children: title
128
+ }), actions, /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
129
+ "data-ref": "panelClose",
130
+ className: classNames(Flyout_module.panelAction, "cursor-pointer p-1 text-xl self-stretch"),
131
+ icon: icons.CoreIcons.close,
132
+ onClick: function onClick() {
133
+ return handleClose(false);
134
+ }
143
135
  })]
144
- })
145
- }))
146
- })
136
+ }), loading && /*#__PURE__*/jsxRuntime.jsx(Animations.Loading, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
137
+ role: "dialog",
138
+ className: classNames(Flyout_module.flyoutBody, "flex-1 grid overflow-hidden"),
139
+ tabIndex: 0,
140
+ children: children
141
+ })]
142
+ })
143
+ }))
147
144
  })
148
145
  })
149
146
  });
@@ -71,9 +71,7 @@ var Modal = function Modal(_ref) {
71
71
  }, [onBeforeClose, onClose]);
72
72
  react$1.useEffect(function () {
73
73
  setTimeout(function () {
74
- var _refs$floating$curren2;
75
74
  refs.floating.current && (refs.floating.current.dataset.show = "true");
76
- (_refs$floating$curren2 = refs.floating.current) === null || _refs$floating$curren2 === void 0 || (_refs$floating$curren2 = _refs$floating$curren2.querySelector("[role='dialog']")) === null || _refs$floating$curren2 === void 0 || _refs$floating$curren2.focus();
77
75
  }, 50);
78
76
  }, []);
79
77
  return /*#__PURE__*/jsxRuntime.jsx(react.FloatingPortal, {
@@ -91,7 +91,7 @@ var Panel = function Panel(_ref) {
91
91
  className: classNames(titleClassName, "flex-1 select-none truncate", title && "py-1 first:px-2"),
92
92
  children: title
93
93
  }), /*#__PURE__*/jsx("div", {
94
- className: "px-1",
94
+ className: "px-1 leading-none",
95
95
  children: actions
96
96
  }), hasTools && /*#__PURE__*/jsxs("div", {
97
97
  role: "none",
@@ -47,6 +47,7 @@ var Flyout = function Flyout(_ref) {
47
47
  context = _useFloating.context;
48
48
  var dismiss = useDismiss(context, {
49
49
  outsidePressEvent: "mousedown",
50
+ outsidePress: !hideMask,
50
51
  escapeKey: true
51
52
  });
52
53
  var role = useRole(context);
@@ -73,9 +74,7 @@ var Flyout = function Flyout(_ref) {
73
74
  }, [onBeforeClose, onClose]);
74
75
  useEffect(function () {
75
76
  setTimeout(function () {
76
- var _refs$floating$curren2;
77
77
  refs.floating.current && (refs.floating.current.dataset.show = "true");
78
- (_refs$floating$curren2 = refs.floating.current) === null || _refs$floating$curren2 === void 0 || (_refs$floating$curren2 = _refs$floating$curren2.querySelector('[role="dialog"]')) === null || _refs$floating$curren2 === void 0 || _refs$floating$curren2.focus();
79
78
  }, 50);
80
79
  }, []);
81
80
  var tryClosing = useCallback(function (e) {
@@ -103,47 +102,45 @@ var Flyout = function Flyout(_ref) {
103
102
  children: /*#__PURE__*/jsx(Wrapper, {
104
103
  children: /*#__PURE__*/jsx(FloatingFocusManager, {
105
104
  context: context,
106
- children: /*#__PURE__*/jsx(Wrapper, {
107
- children: /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread(_objectSpread({
108
- "data-align": align,
109
- className: classNames(classes.flyout, "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl", align === "start" ? "start-0" : "end-0", size === "sm" && "w-[20rem]", size === "md" && "w-[40rem]", size === "lg" && "w-[60vw]", size === "xl" && "w-[80vw]"),
110
- style: {
111
- width: width,
112
- minWidth: minWidth
113
- },
114
- onMouseUpCapture: tryClosing,
115
- ref: refs.setFloating
116
- }, getFloatingProps()), aria), aria), {}, {
117
- children: /*#__PURE__*/jsxs(HotKeyWrapper, {
118
- children: [/*#__PURE__*/jsxs(Header, {
119
- flex: true,
120
- className: classNames(classes.flyoutHeader, headerClassName),
121
- children: [icon && /*#__PURE__*/jsx(Icon, {
122
- icon: icon,
123
- bg: iconBg,
124
- color: iconColor,
125
- className: classNames(iconClassName, "p-1"),
126
- rtlFlip: rtlFlip
127
- }), /*#__PURE__*/jsx("label", {
128
- className: "flex-1 truncate py-2 px-1",
129
- children: title
130
- }), actions, /*#__PURE__*/jsx(Icon, {
131
- "data-ref": "panelClose",
132
- className: classNames(classes.panelAction, "cursor-pointer p-1 text-xl self-stretch"),
133
- icon: CoreIcons.close,
134
- onClick: function onClick() {
135
- return handleClose(false);
136
- }
137
- })]
138
- }), loading && /*#__PURE__*/jsx(Loading, {}), /*#__PURE__*/jsx("div", {
139
- role: "dialog",
140
- className: classNames(classes.flyoutBody, "flex-1 grid overflow-hidden"),
141
- tabIndex: 0,
142
- children: children
105
+ children: /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread(_objectSpread({
106
+ "data-align": align,
107
+ className: classNames(classes.flyout, "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl", align === "start" ? "start-0" : "end-0", size === "sm" && "w-[20rem]", size === "md" && "w-[40rem]", size === "lg" && "w-[60vw]", size === "xl" && "w-[80vw]"),
108
+ style: {
109
+ width: width,
110
+ minWidth: minWidth
111
+ },
112
+ onMouseUpCapture: tryClosing,
113
+ ref: refs.setFloating
114
+ }, getFloatingProps()), aria), aria), {}, {
115
+ children: /*#__PURE__*/jsxs(HotKeyWrapper, {
116
+ children: [/*#__PURE__*/jsxs(Header, {
117
+ flex: true,
118
+ className: classNames(classes.flyoutHeader, headerClassName),
119
+ children: [icon && /*#__PURE__*/jsx(Icon, {
120
+ icon: icon,
121
+ bg: iconBg,
122
+ color: iconColor,
123
+ className: classNames(iconClassName, "p-1"),
124
+ rtlFlip: rtlFlip
125
+ }), /*#__PURE__*/jsx("label", {
126
+ className: "flex-1 truncate py-2 px-1",
127
+ children: title
128
+ }), actions, /*#__PURE__*/jsx(Icon, {
129
+ "data-ref": "panelClose",
130
+ className: classNames(classes.panelAction, "cursor-pointer p-1 text-xl self-stretch"),
131
+ icon: CoreIcons.close,
132
+ onClick: function onClick() {
133
+ return handleClose(false);
134
+ }
143
135
  })]
144
- })
145
- }))
146
- })
136
+ }), loading && /*#__PURE__*/jsx(Loading, {}), /*#__PURE__*/jsx("div", {
137
+ role: "dialog",
138
+ className: classNames(classes.flyoutBody, "flex-1 grid overflow-hidden"),
139
+ tabIndex: 0,
140
+ children: children
141
+ })]
142
+ })
143
+ }))
147
144
  })
148
145
  })
149
146
  });
@@ -71,9 +71,7 @@ var Modal = function Modal(_ref) {
71
71
  }, [onBeforeClose, onClose]);
72
72
  useEffect(function () {
73
73
  setTimeout(function () {
74
- var _refs$floating$curren2;
75
74
  refs.floating.current && (refs.floating.current.dataset.show = "true");
76
- (_refs$floating$curren2 = refs.floating.current) === null || _refs$floating$curren2 === void 0 || (_refs$floating$curren2 = _refs$floating$curren2.querySelector("[role='dialog']")) === null || _refs$floating$curren2 === void 0 || _refs$floating$curren2.focus();
77
75
  }, 50);
78
76
  }, []);
79
77
  return /*#__PURE__*/jsx(FloatingPortal, {
@@ -1,4 +1,4 @@
1
- import { type ReactElement } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import { type CallbackReturn, type ChildrenProp } from "../../types";
3
3
  import { Tab } from "./Tab";
4
4
  export interface TabPanelProps extends ChildrenProp<typeof Tab> {
@@ -33,11 +33,11 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
33
33
  /**
34
34
  * append element
35
35
  */
36
- append?: ReactElement;
36
+ append?: ReactNode;
37
37
  /**
38
38
  * prepend element
39
39
  */
40
- prepend?: ReactElement;
40
+ prepend?: ReactNode;
41
41
  /**
42
42
  * change handler
43
43
  */
@@ -15,5 +15,6 @@ export * from "./hooks/useResizeObserver";
15
15
  export * from "./hooks/useStorage";
16
16
  export { HotKey } from "./hotkeys/HotKey";
17
17
  export { HotKeyLabel } from "./hotkeys/HotKeyLabel";
18
+ export { type ModalProps } from "./types";
18
19
  export { CoreIcons } from "./types/icons";
19
20
  export { ApplicationProvider, useApplicationContext, useGlobals, useNotificationService, } from "./context/Global";
@@ -1,5 +1,8 @@
1
1
  import { type Placement } from "@floating-ui/react";
2
2
  import { type JSXElementConstructor, type Ref } from "react";
3
+ export type ModalProps<P = unknown> = P & {
4
+ onClose?: (...args: AnyObject) => void;
5
+ };
3
6
  export type SizeType = "xs" | "sm" | "md" | "lg" | "xl";
4
7
  export type SizeTypeWithZero = "xs" | "sm" | "md" | "lg" | "xl" | 0;
5
8
  export type ColorType = "primary" | "accent" | "info" | "danger" | "success" | "warning";
@@ -54,7 +57,7 @@ export interface TestProps {
54
57
  */
55
58
  "data-test-value"?: AnyObject;
56
59
  }
57
- export type Elements<T> = React.ReactElement<T> | React.ReactPortal | React.ReactNode | string | number | boolean | null | undefined;
60
+ export type Elements<T> = React.ReactElement<T> | React.ReactNode;
58
61
  export type AriaProps = React.AriaAttributes;
59
62
  /**
60
63
  * For wrapping components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/core",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.20",
4
4
  "description": "RUF: Core package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@floating-ui/react": "^0.26.24",
39
- "@react-fabric/utilities": "^1.0.0-beta.19",
39
+ "@react-fabric/utilities": "^1.0.0-beta.20",
40
40
  "@tailwindcss/container-queries": "^0.1.1",
41
41
  "@tailwindcss/forms": "^0.5.7",
42
42
  "@tailwindcss/typography": "^0.5.13",
@@ -56,5 +56,5 @@
56
56
  "node": ">=18.12.0",
57
57
  "npm": ">=8.19.0"
58
58
  },
59
- "gitHead": "1757660f7f30590d1bf5c7f2bd3526f6052dccd5"
59
+ "gitHead": "b265afe1779c1654fc9cf8d9de6e7396b64515d3"
60
60
  }
@@ -205,7 +205,7 @@ export const Panel = ({
205
205
  >
206
206
  {title}
207
207
  </div>
208
- <div className="px-1">{actions}</div>
208
+ <div className="px-1 leading-none">{actions}</div>
209
209
  {hasTools && (
210
210
  <div
211
211
  role="none"
@@ -25,7 +25,7 @@ import classNames from "classnames";
25
25
  import {
26
26
  Children,
27
27
  cloneElement,
28
- type ReactElement,
28
+ type ReactNode,
29
29
  useCallback,
30
30
  useEffect,
31
31
  useMemo,
@@ -68,11 +68,11 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
68
68
  /**
69
69
  * append element
70
70
  */
71
- append?: ReactElement;
71
+ append?: ReactNode;
72
72
  /**
73
73
  * prepend element
74
74
  */
75
- prepend?: ReactElement;
75
+ prepend?: ReactNode;
76
76
  /**
77
77
  * change handler
78
78
  */
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ export * from "./hooks/useStorage";
41
41
  export { HotKey } from "./hotkeys/HotKey";
42
42
  export { HotKeyLabel } from "./hotkeys/HotKeyLabel";
43
43
 
44
+ export { type ModalProps } from "./types";
44
45
  export { CoreIcons } from "./types/icons";
45
46
 
46
47
  export {
@@ -140,6 +140,7 @@ export const Flyout = ({
140
140
  });
141
141
  const dismiss = useDismiss(context, {
142
142
  outsidePressEvent: "mousedown",
143
+ outsidePress: !hideMask,
143
144
  escapeKey: true,
144
145
  });
145
146
  const role = useRole(context);
@@ -173,9 +174,6 @@ export const Flyout = ({
173
174
  useEffect(() => {
174
175
  setTimeout(() => {
175
176
  refs.floating.current && (refs.floating.current.dataset.show = "true");
176
- refs.floating.current
177
- ?.querySelector<HTMLElement>('[role="dialog"]')
178
- ?.focus();
179
177
  }, 50);
180
178
  }, []);
181
179
 
@@ -214,68 +212,66 @@ export const Flyout = ({
214
212
  <FloatingPortal>
215
213
  <Wrapper>
216
214
  <FloatingFocusManager context={context}>
217
- <Wrapper>
218
- <div
219
- data-align={align}
220
- className={classNames(
221
- classes.flyout,
222
- "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl",
223
- align === "start" ? "start-0" : "end-0",
224
- size === "sm" && "w-[20rem]",
225
- size === "md" && "w-[40rem]",
226
- size === "lg" && "w-[60vw]",
227
- size === "xl" && "w-[80vw]",
228
- )}
229
- style={{
230
- width,
231
- minWidth,
232
- }}
233
- onMouseUpCapture={tryClosing}
234
- ref={refs.setFloating}
235
- {...getFloatingProps()}
236
- {...aria}
237
- {...aria}
238
- >
239
- <HotKeyWrapper>
240
- <Header
241
- flex
242
- className={classNames(classes.flyoutHeader, headerClassName)}
243
- >
244
- {icon && (
245
- <Icon
246
- icon={icon}
247
- bg={iconBg}
248
- color={iconColor}
249
- className={classNames(iconClassName, "p-1")}
250
- rtlFlip={rtlFlip}
251
- />
252
- )}
253
- <label className="flex-1 truncate py-2 px-1">{title}</label>
254
- {actions}
215
+ <div
216
+ data-align={align}
217
+ className={classNames(
218
+ classes.flyout,
219
+ "fixed inset-y-0 overflow-hidden flex flex-col flex-nowrap pointer-events-auto shadow-xl",
220
+ align === "start" ? "start-0" : "end-0",
221
+ size === "sm" && "w-[20rem]",
222
+ size === "md" && "w-[40rem]",
223
+ size === "lg" && "w-[60vw]",
224
+ size === "xl" && "w-[80vw]",
225
+ )}
226
+ style={{
227
+ width,
228
+ minWidth,
229
+ }}
230
+ onMouseUpCapture={tryClosing}
231
+ ref={refs.setFloating}
232
+ {...getFloatingProps()}
233
+ {...aria}
234
+ {...aria}
235
+ >
236
+ <HotKeyWrapper>
237
+ <Header
238
+ flex
239
+ className={classNames(classes.flyoutHeader, headerClassName)}
240
+ >
241
+ {icon && (
255
242
  <Icon
256
- data-ref="panelClose"
257
- className={classNames(
258
- classes.panelAction,
259
- "cursor-pointer p-1 text-xl self-stretch",
260
- )}
261
- icon={CoreIcons.close}
262
- onClick={() => handleClose(false)}
243
+ icon={icon}
244
+ bg={iconBg}
245
+ color={iconColor}
246
+ className={classNames(iconClassName, "p-1")}
247
+ rtlFlip={rtlFlip}
263
248
  />
264
- </Header>
265
- {loading && <Loading />}
266
- <div
267
- role="dialog"
249
+ )}
250
+ <label className="flex-1 truncate py-2 px-1">{title}</label>
251
+ {actions}
252
+ <Icon
253
+ data-ref="panelClose"
268
254
  className={classNames(
269
- classes.flyoutBody,
270
- "flex-1 grid overflow-hidden",
255
+ classes.panelAction,
256
+ "cursor-pointer p-1 text-xl self-stretch",
271
257
  )}
272
- {...({ tabIndex: 0 } as AnyObject)}
273
- >
274
- {children}
275
- </div>
276
- </HotKeyWrapper>
277
- </div>
278
- </Wrapper>
258
+ icon={CoreIcons.close}
259
+ onClick={() => handleClose(false)}
260
+ />
261
+ </Header>
262
+ {loading && <Loading />}
263
+ <div
264
+ role="dialog"
265
+ className={classNames(
266
+ classes.flyoutBody,
267
+ "flex-1 grid overflow-hidden",
268
+ )}
269
+ {...({ tabIndex: 0 } as AnyObject)}
270
+ >
271
+ {children}
272
+ </div>
273
+ </HotKeyWrapper>
274
+ </div>
279
275
  </FloatingFocusManager>
280
276
  </Wrapper>
281
277
  </FloatingPortal>
@@ -163,9 +163,6 @@ export const Modal = ({
163
163
  useEffect(() => {
164
164
  setTimeout(() => {
165
165
  refs.floating.current && (refs.floating.current.dataset.show = "true");
166
- refs.floating.current
167
- ?.querySelector<HTMLElement>("[role='dialog']")
168
- ?.focus();
169
166
  }, 50);
170
167
  }, []);
171
168
 
@@ -25,6 +25,10 @@
25
25
  import { type Placement } from "@floating-ui/react";
26
26
  import { type JSXElementConstructor, type Ref } from "react";
27
27
 
28
+ export type ModalProps<P = unknown> = P & {
29
+ onClose?: (...args: AnyObject) => void;
30
+ };
31
+
28
32
  export type SizeType = "xs" | "sm" | "md" | "lg" | "xl";
29
33
 
30
34
  export type SizeTypeWithZero = "xs" | "sm" | "md" | "lg" | "xl" | 0;
@@ -122,15 +126,7 @@ export interface TestProps {
122
126
  "data-test-value"?: AnyObject;
123
127
  }
124
128
 
125
- export type Elements<T> =
126
- | React.ReactElement<T>
127
- | React.ReactPortal
128
- | React.ReactNode
129
- | string
130
- | number
131
- | boolean
132
- | null
133
- | undefined;
129
+ export type Elements<T> = React.ReactElement<T> | React.ReactNode;
134
130
 
135
131
  export type AriaProps = React.AriaAttributes;
136
132