@seeqdev/qomponents 0.0.155-react-19-v9 → 0.0.155-react-19-v10
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.
- package/dist/Accordion/Accordion.js +9 -0
- package/dist/Accordion/Accordion.js.map +1 -0
- package/dist/Accordion/Accordion.stories.js +115 -0
- package/dist/Accordion/Accordion.stories.js.map +1 -0
- package/dist/Accordion/Accordion.test.js +55 -0
- package/dist/Accordion/Accordion.test.js.map +1 -0
- package/dist/Accordion/Accordion.types.js +2 -0
- package/dist/Accordion/Accordion.types.js.map +1 -0
- package/dist/Accordion/index.js +2 -0
- package/dist/Accordion/index.js.map +1 -0
- package/dist/Alert/Alert.js +34 -0
- package/dist/Alert/Alert.js.map +1 -0
- package/dist/Alert/Alert.stories.js +52 -0
- package/dist/Alert/Alert.stories.js.map +1 -0
- package/dist/Alert/Alert.test.js +51 -0
- package/dist/Alert/Alert.test.js.map +1 -0
- package/dist/Alert/Alert.types.js +2 -0
- package/dist/Alert/Alert.types.js.map +1 -0
- package/dist/Alert/index.js +2 -0
- package/dist/Alert/index.js.map +1 -0
- package/dist/Button/Button.js +92 -0
- package/dist/Button/Button.js.map +1 -0
- package/dist/Button/Button.stories.js +100 -0
- package/dist/Button/Button.stories.js.map +1 -0
- package/dist/Button/Button.test.js +49 -0
- package/dist/Button/Button.test.js.map +1 -0
- package/dist/Button/Button.types.js +5 -0
- package/dist/Button/Button.types.js.map +1 -0
- package/dist/Button/index.js +2 -0
- package/dist/Button/index.js.map +1 -0
- package/dist/ButtonGroup/ButtonGroup.js +35 -0
- package/dist/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/ButtonGroup/ButtonGroup.stories.js +385 -0
- package/dist/ButtonGroup/ButtonGroup.stories.js.map +1 -0
- package/dist/ButtonGroup/ButtonGroup.test.js +67 -0
- package/dist/ButtonGroup/ButtonGroup.test.js.map +1 -0
- package/dist/ButtonGroup/ButtonGroup.types.js +2 -0
- package/dist/ButtonGroup/ButtonGroup.types.js.map +1 -0
- package/dist/ButtonGroup/index.js +2 -0
- package/dist/ButtonGroup/index.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js +60 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +143 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +93 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +2 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +1 -0
- package/dist/ButtonWithDropdown/index.js +2 -0
- package/dist/ButtonWithDropdown/index.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.js +62 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +75 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +82 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js +2 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +1 -0
- package/dist/ButtonWithPopover/index.js +2 -0
- package/dist/ButtonWithPopover/index.js.map +1 -0
- package/dist/Carousel/Carousel.js +70 -0
- package/dist/Carousel/Carousel.js.map +1 -0
- package/dist/Carousel/Carousel.stories.js +115 -0
- package/dist/Carousel/Carousel.stories.js.map +1 -0
- package/dist/Carousel/Carousel.test.js +48 -0
- package/dist/Carousel/Carousel.test.js.map +1 -0
- package/dist/Carousel/Carousel.types.js +2 -0
- package/dist/Carousel/Carousel.types.js.map +1 -0
- package/dist/Carousel/index.js +2 -0
- package/dist/Carousel/index.js.map +1 -0
- package/dist/Checkbox/Checkbox.js +26 -0
- package/dist/Checkbox/Checkbox.js.map +1 -0
- package/dist/Checkbox/Checkbox.stories.js +34 -0
- package/dist/Checkbox/Checkbox.stories.js.map +1 -0
- package/dist/Checkbox/Checkbox.test.js +94 -0
- package/dist/Checkbox/Checkbox.test.js.map +1 -0
- package/dist/Checkbox/Checkbox.types.js +2 -0
- package/dist/Checkbox/Checkbox.types.js.map +1 -0
- package/dist/Checkbox/index.js +2 -0
- package/dist/Checkbox/index.js.map +1 -0
- package/dist/Collapse/Collapse.js +15 -0
- package/dist/Collapse/Collapse.js.map +1 -0
- package/dist/Collapse/Collapse.stories.js +37 -0
- package/dist/Collapse/Collapse.stories.js.map +1 -0
- package/dist/Collapse/Collapse.test.js +19 -0
- package/dist/Collapse/Collapse.test.js.map +1 -0
- package/dist/Collapse/Collapse.types.js +2 -0
- package/dist/Collapse/Collapse.types.js.map +1 -0
- package/dist/Collapse/index.js +2 -0
- package/dist/Collapse/index.js.map +1 -0
- package/dist/Icon/Icon.js +55 -0
- package/dist/Icon/Icon.js.map +1 -0
- package/dist/Icon/Icon.stories.js +49 -0
- package/dist/Icon/Icon.stories.js.map +1 -0
- package/dist/Icon/Icon.test.js +55 -0
- package/dist/Icon/Icon.test.js.map +1 -0
- package/dist/Icon/Icon.types.js +16 -0
- package/dist/Icon/Icon.types.js.map +1 -0
- package/dist/Icon/index.js +2 -0
- package/dist/Icon/index.js.map +1 -0
- package/dist/InputGroup/InputGroup.js +35 -0
- package/dist/InputGroup/InputGroup.js.map +1 -0
- package/dist/InputGroup/InputGroup.stories.js +176 -0
- package/dist/InputGroup/InputGroup.stories.js.map +1 -0
- package/dist/InputGroup/InputGroup.test.js +43 -0
- package/dist/InputGroup/InputGroup.test.js.map +1 -0
- package/dist/InputGroup/InputGroup.types.js +2 -0
- package/dist/InputGroup/InputGroup.types.js.map +1 -0
- package/dist/InputGroup/index.js +2 -0
- package/dist/InputGroup/index.js.map +1 -0
- package/dist/Modal/Modal.js +102 -0
- package/dist/Modal/Modal.js.map +1 -0
- package/dist/Modal/Modal.stories.js +127 -0
- package/dist/Modal/Modal.stories.js.map +1 -0
- package/dist/Modal/Modal.test.js +108 -0
- package/dist/Modal/Modal.test.js.map +1 -0
- package/dist/Modal/Modal.types.js +2 -0
- package/dist/Modal/Modal.types.js.map +1 -0
- package/dist/Modal/index.js +2 -0
- package/dist/Modal/index.js.map +1 -0
- package/dist/ProgressBar/ProgressBar.js +70 -0
- package/dist/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/ProgressBar/ProgressBar.stories.js +83 -0
- package/dist/ProgressBar/ProgressBar.stories.js.map +1 -0
- package/dist/ProgressBar/ProgressBar.test.js +44 -0
- package/dist/ProgressBar/ProgressBar.test.js.map +1 -0
- package/dist/ProgressBar/ProgressBar.types.js +2 -0
- package/dist/ProgressBar/ProgressBar.types.js.map +1 -0
- package/dist/ProgressBar/index.js +2 -0
- package/dist/ProgressBar/index.js.map +1 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js +48 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js.map +1 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +87 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js.map +1 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +73 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js.map +1 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +2 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js.map +1 -0
- package/dist/SeeqActionDropdown/index.js +2 -0
- package/dist/SeeqActionDropdown/index.js.map +1 -0
- package/dist/SeeqActionDropdown/variants.js +38 -0
- package/dist/SeeqActionDropdown/variants.js.map +1 -0
- package/dist/Select/Select.js +177 -0
- package/dist/Select/Select.js.map +1 -0
- package/dist/Select/Select.stories.js +82 -0
- package/dist/Select/Select.stories.js.map +1 -0
- package/dist/Select/Select.test.js +182 -0
- package/dist/Select/Select.test.js.map +1 -0
- package/dist/Select/Select.types.js +2 -0
- package/dist/Select/Select.types.js.map +1 -0
- package/dist/Select/index.js +3 -0
- package/dist/Select/index.js.map +1 -0
- package/dist/Slider/Slider.js +13 -0
- package/dist/Slider/Slider.js.map +1 -0
- package/dist/Slider/Slider.stories.js +58 -0
- package/dist/Slider/Slider.stories.js.map +1 -0
- package/dist/Slider/Slider.test.js +33 -0
- package/dist/Slider/Slider.test.js.map +1 -0
- package/dist/Slider/Slider.types.js +2 -0
- package/dist/Slider/Slider.types.js.map +1 -0
- package/dist/Slider/index.js +2 -0
- package/dist/Slider/index.js.map +1 -0
- package/dist/SvgIcon/SvgIcon.js +30 -0
- package/dist/SvgIcon/SvgIcon.js.map +1 -0
- package/dist/SvgIcon/SvgIcon.stories.js +42 -0
- package/dist/SvgIcon/SvgIcon.stories.js.map +1 -0
- package/dist/SvgIcon/SvgIcon.test.js +41 -0
- package/dist/SvgIcon/SvgIcon.test.js.map +1 -0
- package/dist/SvgIcon/SvgIcon.types.js +6 -0
- package/dist/SvgIcon/SvgIcon.types.js.map +1 -0
- package/dist/SvgIcon/index.js +2 -0
- package/dist/SvgIcon/index.js.map +1 -0
- package/dist/Tabs/Tabs.js +22 -0
- package/dist/Tabs/Tabs.js.map +1 -0
- package/dist/Tabs/Tabs.stories.js +91 -0
- package/dist/Tabs/Tabs.stories.js.map +1 -0
- package/dist/Tabs/Tabs.test.js +91 -0
- package/dist/Tabs/Tabs.test.js.map +1 -0
- package/dist/Tabs/Tabs.types.js +2 -0
- package/dist/Tabs/Tabs.types.js.map +1 -0
- package/dist/Tabs/index.js +2 -0
- package/dist/Tabs/index.js.map +1 -0
- package/dist/TextArea/TextArea.js +25 -0
- package/dist/TextArea/TextArea.js.map +1 -0
- package/dist/TextArea/TextArea.stories.js +46 -0
- package/dist/TextArea/TextArea.stories.js.map +1 -0
- package/dist/TextArea/TextArea.test.js +68 -0
- package/dist/TextArea/TextArea.test.js.map +1 -0
- package/dist/TextArea/TextArea.types.js +2 -0
- package/dist/TextArea/TextArea.types.js.map +1 -0
- package/dist/TextArea/index.js +2 -0
- package/dist/TextArea/index.js.map +1 -0
- package/dist/TextField/TextField.js +86 -0
- package/dist/TextField/TextField.js.map +1 -0
- package/dist/TextField/TextField.stories.js +70 -0
- package/dist/TextField/TextField.stories.js.map +1 -0
- package/dist/TextField/TextField.test.js +41 -0
- package/dist/TextField/TextField.test.js.map +1 -0
- package/dist/TextField/TextField.types.js +2 -0
- package/dist/TextField/TextField.types.js.map +1 -0
- package/dist/TextField/index.js +2 -0
- package/dist/TextField/index.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.js +69 -0
- package/dist/ToolbarButton/ToolbarButton.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.stories.js +97 -0
- package/dist/ToolbarButton/ToolbarButton.stories.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.test.js +93 -0
- package/dist/ToolbarButton/ToolbarButton.test.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.types.js +2 -0
- package/dist/ToolbarButton/ToolbarButton.types.js.map +1 -0
- package/dist/ToolbarButton/index.js +2 -0
- package/dist/ToolbarButton/index.js.map +1 -0
- package/dist/Tooltip/QTip.stories.js +45 -0
- package/dist/Tooltip/QTip.stories.js.map +1 -0
- package/dist/Tooltip/QTip.types.js +2 -0
- package/dist/Tooltip/QTip.types.js.map +1 -0
- package/dist/Tooltip/QTipPerformance.stories.js +30 -0
- package/dist/Tooltip/QTipPerformance.stories.js.map +1 -0
- package/dist/Tooltip/Qtip.js +170 -0
- package/dist/Tooltip/Qtip.js.map +1 -0
- package/dist/Tooltip/Tooltip.js +36 -0
- package/dist/Tooltip/Tooltip.js.map +1 -0
- package/dist/Tooltip/Tooltip.stories.js +32 -0
- package/dist/Tooltip/Tooltip.stories.js.map +1 -0
- package/dist/Tooltip/Tooltip.types.js +3 -0
- package/dist/Tooltip/Tooltip.types.js.map +1 -0
- package/dist/Tooltip/TooltipPerformance.stories.js +30 -0
- package/dist/Tooltip/TooltipPerformance.stories.js.map +1 -0
- package/dist/Tooltip/index.js +3 -0
- package/dist/Tooltip/index.js.map +1 -0
- package/dist/Tooltip/qTip.utilities.js +11 -0
- package/dist/Tooltip/qTip.utilities.js.map +1 -0
- package/dist/index.esm.js +135 -198
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +123 -186
- package/dist/index.js.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/browserId.js +29 -0
- package/dist/utils/browserId.js.map +1 -0
- package/dist/utils/svg.js +20 -0
- package/dist/utils/svg.js.map +1 -0
- package/dist/utils/validateStyleDimension.js +14 -0
- package/dist/utils/validateStyleDimension.js.map +1 -0
- package/dist/utils/validateStyleDimension.test.js +20 -0
- package/dist/utils/validateStyleDimension.test.js.map +1 -0
- package/package.json +8 -8
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useLayoutEffect, useState, useRef, useEffect, useCallback, forwardRef, useContext, useMemo, createContext, Component, Fragment, useId as useId$1, useInsertionEffect as useInsertionEffect$
|
|
3
|
-
import { jsx as jsx$1,
|
|
2
|
+
import React__default, { useLayoutEffect, useState, useRef, useEffect, useCallback, forwardRef, useContext, useMemo, createContext, Component, Fragment as Fragment$1, useId as useId$1, useInsertionEffect as useInsertionEffect$1, Children, isValidElement, createElement } from 'react';
|
|
3
|
+
import { jsx as jsx$1, Fragment, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default, { createPortal } from 'react-dom';
|
|
6
6
|
|
|
@@ -191,7 +191,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
// packages/react/compose-refs/src/
|
|
194
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
195
195
|
function setRef(ref, value) {
|
|
196
196
|
if (typeof ref === "function") {
|
|
197
197
|
return ref(value);
|
|
@@ -227,7 +227,7 @@ function useComposedRefs(...refs) {
|
|
|
227
227
|
return React.useCallback(composeRefs(...refs), refs);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
// packages/react/context/src/
|
|
230
|
+
// packages/react/context/src/createContext.tsx
|
|
231
231
|
function createContext2(rootComponentName, defaultContext) {
|
|
232
232
|
const Context = React.createContext(defaultContext);
|
|
233
233
|
const Provider = (props) => {
|
|
@@ -302,51 +302,44 @@ function composeContextScopes(...scopes) {
|
|
|
302
302
|
return createScope;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
// src/slot.tsx
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
319
|
-
} else {
|
|
320
|
-
return child;
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
324
|
-
}
|
|
325
|
-
return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
326
|
-
});
|
|
327
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
328
|
-
return Slot2;
|
|
329
|
-
}
|
|
330
|
-
// @__NO_SIDE_EFFECTS__
|
|
331
|
-
function createSlotClone(ownerName) {
|
|
332
|
-
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
333
|
-
const { children, ...slotProps } = props;
|
|
334
|
-
if (React.isValidElement(children)) {
|
|
335
|
-
const childrenRef = getElementRef$1(children);
|
|
336
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
337
|
-
if (children.type !== React.Fragment) {
|
|
338
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
305
|
+
// packages/react/slot/src/slot.tsx
|
|
306
|
+
var Slot = React.forwardRef((props, forwardedRef) => {
|
|
307
|
+
const { children, ...slotProps } = props;
|
|
308
|
+
const childrenArray = React.Children.toArray(children);
|
|
309
|
+
const slottable = childrenArray.find(isSlottable);
|
|
310
|
+
if (slottable) {
|
|
311
|
+
const newElement = slottable.props.children;
|
|
312
|
+
const newChildren = childrenArray.map((child) => {
|
|
313
|
+
if (child === slottable) {
|
|
314
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
315
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
316
|
+
} else {
|
|
317
|
+
return child;
|
|
339
318
|
}
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
319
|
+
});
|
|
320
|
+
return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
321
|
+
}
|
|
322
|
+
return /* @__PURE__ */ jsx$1(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
323
|
+
});
|
|
324
|
+
Slot.displayName = "Slot";
|
|
325
|
+
var SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
326
|
+
const { children, ...slotProps } = props;
|
|
327
|
+
if (React.isValidElement(children)) {
|
|
328
|
+
const childrenRef = getElementRef$1(children);
|
|
329
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
330
|
+
if (children.type !== React.Fragment) {
|
|
331
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
332
|
+
}
|
|
333
|
+
return React.cloneElement(children, props2);
|
|
334
|
+
}
|
|
335
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
336
|
+
});
|
|
337
|
+
SlotClone.displayName = "SlotClone";
|
|
338
|
+
var Slottable = ({ children }) => {
|
|
339
|
+
return /* @__PURE__ */ jsx$1(Fragment, { children });
|
|
340
|
+
};
|
|
348
341
|
function isSlottable(child) {
|
|
349
|
-
return React.isValidElement(child) &&
|
|
342
|
+
return React.isValidElement(child) && child.type === Slottable;
|
|
350
343
|
}
|
|
351
344
|
function mergeProps(slotProps, childProps) {
|
|
352
345
|
const overrideProps = { ...childProps };
|
|
@@ -357,9 +350,8 @@ function mergeProps(slotProps, childProps) {
|
|
|
357
350
|
if (isHandler) {
|
|
358
351
|
if (slotPropValue && childPropValue) {
|
|
359
352
|
overrideProps[propName] = (...args) => {
|
|
360
|
-
|
|
353
|
+
childPropValue(...args);
|
|
361
354
|
slotPropValue(...args);
|
|
362
|
-
return result;
|
|
363
355
|
};
|
|
364
356
|
} else if (slotPropValue) {
|
|
365
357
|
overrideProps[propName] = slotPropValue;
|
|
@@ -386,7 +378,7 @@ function getElementRef$1(element) {
|
|
|
386
378
|
return element.props.ref || element.ref;
|
|
387
379
|
}
|
|
388
380
|
|
|
389
|
-
// src/primitive.tsx
|
|
381
|
+
// packages/react/primitive/src/primitive.tsx
|
|
390
382
|
var NODES = [
|
|
391
383
|
"a",
|
|
392
384
|
"button",
|
|
@@ -401,13 +393,11 @@ var NODES = [
|
|
|
401
393
|
"nav",
|
|
402
394
|
"ol",
|
|
403
395
|
"p",
|
|
404
|
-
"select",
|
|
405
396
|
"span",
|
|
406
397
|
"svg",
|
|
407
398
|
"ul"
|
|
408
399
|
];
|
|
409
400
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
410
|
-
const Slot = createSlot(`Primitive.${node}`);
|
|
411
401
|
const Node = React.forwardRef((props, forwardedRef) => {
|
|
412
402
|
const { asChild, ...primitiveProps } = props;
|
|
413
403
|
const Comp = asChild ? Slot : node;
|
|
@@ -423,7 +413,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
423
413
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
424
414
|
}
|
|
425
415
|
|
|
426
|
-
// packages/react/use-callback-ref/src/
|
|
416
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
427
417
|
function useCallbackRef$1(callback) {
|
|
428
418
|
const callbackRef = React.useRef(callback);
|
|
429
419
|
React.useEffect(() => {
|
|
@@ -432,7 +422,7 @@ function useCallbackRef$1(callback) {
|
|
|
432
422
|
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
433
423
|
}
|
|
434
424
|
|
|
435
|
-
// packages/react/use-escape-keydown/src/
|
|
425
|
+
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
436
426
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
437
427
|
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
438
428
|
React.useEffect(() => {
|
|
@@ -874,12 +864,12 @@ function removeLinks(items) {
|
|
|
874
864
|
return items.filter((item) => item.tagName !== "A");
|
|
875
865
|
}
|
|
876
866
|
|
|
877
|
-
// packages/react/use-layout-effect/src/
|
|
878
|
-
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
|
|
867
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
868
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {
|
|
879
869
|
};
|
|
880
870
|
|
|
881
871
|
// packages/react/id/src/id.tsx
|
|
882
|
-
var useReactId = React["
|
|
872
|
+
var useReactId = React["useId".toString()] || (() => void 0);
|
|
883
873
|
var count = 0;
|
|
884
874
|
function useId(deterministicId) {
|
|
885
875
|
const [id, setId] = React.useState(useReactId());
|
|
@@ -2867,7 +2857,7 @@ const arrow = (options, deps) => ({
|
|
|
2867
2857
|
options: [options, deps]
|
|
2868
2858
|
});
|
|
2869
2859
|
|
|
2870
|
-
// src/arrow.tsx
|
|
2860
|
+
// packages/react/arrow/src/arrow.tsx
|
|
2871
2861
|
var NAME = "Arrow";
|
|
2872
2862
|
var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
2873
2863
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
@@ -2887,7 +2877,7 @@ var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
2887
2877
|
Arrow$1.displayName = NAME;
|
|
2888
2878
|
var Root$5 = Arrow$1;
|
|
2889
2879
|
|
|
2890
|
-
// packages/react/use-size/src/
|
|
2880
|
+
// packages/react/use-size/src/useSize.tsx
|
|
2891
2881
|
function useSize(element) {
|
|
2892
2882
|
const [size, setSize] = React.useState(void 0);
|
|
2893
2883
|
useLayoutEffect2(() => {
|
|
@@ -3205,7 +3195,7 @@ function useStateMachine(initialState, machine) {
|
|
|
3205
3195
|
}, initialState);
|
|
3206
3196
|
}
|
|
3207
3197
|
|
|
3208
|
-
// src/
|
|
3198
|
+
// packages/react/presence/src/Presence.tsx
|
|
3209
3199
|
var Presence = (props) => {
|
|
3210
3200
|
const { present, children } = props;
|
|
3211
3201
|
const presence = usePresence$1(present);
|
|
@@ -3217,7 +3207,7 @@ var Presence = (props) => {
|
|
|
3217
3207
|
Presence.displayName = "Presence";
|
|
3218
3208
|
function usePresence$1(present) {
|
|
3219
3209
|
const [node, setNode] = React.useState();
|
|
3220
|
-
const stylesRef = React.useRef(
|
|
3210
|
+
const stylesRef = React.useRef({});
|
|
3221
3211
|
const prevPresentRef = React.useRef(present);
|
|
3222
3212
|
const prevAnimationNameRef = React.useRef("none");
|
|
3223
3213
|
const initialState = present ? "mounted" : "unmounted";
|
|
@@ -3301,7 +3291,7 @@ function usePresence$1(present) {
|
|
|
3301
3291
|
return {
|
|
3302
3292
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
3303
3293
|
ref: React.useCallback((node2) => {
|
|
3304
|
-
stylesRef.current =
|
|
3294
|
+
if (node2) stylesRef.current = getComputedStyle(node2);
|
|
3305
3295
|
setNode(node2);
|
|
3306
3296
|
}, [])
|
|
3307
3297
|
};
|
|
@@ -3323,47 +3313,28 @@ function getElementRef(element) {
|
|
|
3323
3313
|
return element.props.ref || element.ref;
|
|
3324
3314
|
}
|
|
3325
3315
|
|
|
3326
|
-
//
|
|
3327
|
-
var useInsertionEffect$1 = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3316
|
+
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
3328
3317
|
function useControllableState({
|
|
3329
3318
|
prop,
|
|
3330
3319
|
defaultProp,
|
|
3331
3320
|
onChange = () => {
|
|
3332
|
-
}
|
|
3333
|
-
caller
|
|
3321
|
+
}
|
|
3334
3322
|
}) {
|
|
3335
|
-
const [uncontrolledProp, setUncontrolledProp
|
|
3336
|
-
defaultProp,
|
|
3337
|
-
onChange
|
|
3338
|
-
});
|
|
3323
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
3339
3324
|
const isControlled = prop !== void 0;
|
|
3340
3325
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3341
|
-
|
|
3342
|
-
const isControlledRef = React.useRef(prop !== void 0);
|
|
3343
|
-
React.useEffect(() => {
|
|
3344
|
-
const wasControlled = isControlledRef.current;
|
|
3345
|
-
if (wasControlled !== isControlled) {
|
|
3346
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
3347
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
3348
|
-
console.warn(
|
|
3349
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
3350
|
-
);
|
|
3351
|
-
}
|
|
3352
|
-
isControlledRef.current = isControlled;
|
|
3353
|
-
}, [isControlled, caller]);
|
|
3354
|
-
}
|
|
3326
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
3355
3327
|
const setValue = React.useCallback(
|
|
3356
3328
|
(nextValue) => {
|
|
3357
3329
|
if (isControlled) {
|
|
3358
|
-
const
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
}
|
|
3330
|
+
const setter = nextValue;
|
|
3331
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
3332
|
+
if (value2 !== prop) handleChange(value2);
|
|
3362
3333
|
} else {
|
|
3363
3334
|
setUncontrolledProp(nextValue);
|
|
3364
3335
|
}
|
|
3365
3336
|
},
|
|
3366
|
-
[isControlled, prop, setUncontrolledProp,
|
|
3337
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
3367
3338
|
);
|
|
3368
3339
|
return [value, setValue];
|
|
3369
3340
|
}
|
|
@@ -3371,22 +3342,17 @@ function useUncontrolledState({
|
|
|
3371
3342
|
defaultProp,
|
|
3372
3343
|
onChange
|
|
3373
3344
|
}) {
|
|
3374
|
-
const
|
|
3345
|
+
const uncontrolledState = React.useState(defaultProp);
|
|
3346
|
+
const [value] = uncontrolledState;
|
|
3375
3347
|
const prevValueRef = React.useRef(value);
|
|
3376
|
-
const
|
|
3377
|
-
useInsertionEffect$1(() => {
|
|
3378
|
-
onChangeRef.current = onChange;
|
|
3379
|
-
}, [onChange]);
|
|
3348
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
3380
3349
|
React.useEffect(() => {
|
|
3381
3350
|
if (prevValueRef.current !== value) {
|
|
3382
|
-
|
|
3351
|
+
handleChange(value);
|
|
3383
3352
|
prevValueRef.current = value;
|
|
3384
3353
|
}
|
|
3385
|
-
}, [value, prevValueRef]);
|
|
3386
|
-
return
|
|
3387
|
-
}
|
|
3388
|
-
function isFunction(value) {
|
|
3389
|
-
return typeof value === "function";
|
|
3354
|
+
}, [value, prevValueRef, handleChange]);
|
|
3355
|
+
return uncontrolledState;
|
|
3390
3356
|
}
|
|
3391
3357
|
|
|
3392
3358
|
var getDefaultParent = function (originalTarget) {
|
|
@@ -4290,11 +4256,10 @@ var Popover = (props) => {
|
|
|
4290
4256
|
const popperScope = usePopperScope$1(__scopePopover);
|
|
4291
4257
|
const triggerRef = React.useRef(null);
|
|
4292
4258
|
const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
|
|
4293
|
-
const [open, setOpen] = useControllableState({
|
|
4259
|
+
const [open = false, setOpen] = useControllableState({
|
|
4294
4260
|
prop: openProp,
|
|
4295
|
-
defaultProp: defaultOpen
|
|
4296
|
-
onChange: onOpenChange
|
|
4297
|
-
caller: POPOVER_NAME
|
|
4261
|
+
defaultProp: defaultOpen,
|
|
4262
|
+
onChange: onOpenChange
|
|
4298
4263
|
});
|
|
4299
4264
|
return /* @__PURE__ */ jsx$1(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsx$1(
|
|
4300
4265
|
PopoverProvider,
|
|
@@ -4373,7 +4338,6 @@ var PopoverContent$1 = React.forwardRef(
|
|
|
4373
4338
|
}
|
|
4374
4339
|
);
|
|
4375
4340
|
PopoverContent$1.displayName = CONTENT_NAME$6;
|
|
4376
|
-
var Slot$2 = createSlot("PopoverContent.RemoveScroll");
|
|
4377
4341
|
var PopoverContentModal = React.forwardRef(
|
|
4378
4342
|
(props, forwardedRef) => {
|
|
4379
4343
|
const context = usePopoverContext(CONTENT_NAME$6, props.__scopePopover);
|
|
@@ -4384,7 +4348,7 @@ var PopoverContentModal = React.forwardRef(
|
|
|
4384
4348
|
const content = contentRef.current;
|
|
4385
4349
|
if (content) return hideOthers(content);
|
|
4386
4350
|
}, []);
|
|
4387
|
-
return /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot
|
|
4351
|
+
return /* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx$1(
|
|
4388
4352
|
PopoverContentImpl,
|
|
4389
4353
|
{
|
|
4390
4354
|
...props,
|
|
@@ -11267,7 +11231,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
11267
11231
|
}
|
|
11268
11232
|
return guidanceMsg;
|
|
11269
11233
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
11270
|
-
var ScreenReaderText = jsx(Fragment, null, jsx("span", {
|
|
11234
|
+
var ScreenReaderText = jsx(Fragment$1, null, jsx("span", {
|
|
11271
11235
|
id: "aria-selection"
|
|
11272
11236
|
}, ariaSelected), jsx("span", {
|
|
11273
11237
|
id: "aria-focused"
|
|
@@ -11276,7 +11240,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
11276
11240
|
}, ariaResults), jsx("span", {
|
|
11277
11241
|
id: "aria-guidance"
|
|
11278
11242
|
}, ariaGuidance));
|
|
11279
|
-
return jsx(Fragment, null, jsx(A11yText$1, {
|
|
11243
|
+
return jsx(Fragment$1, null, jsx(A11yText$1, {
|
|
11280
11244
|
id: id
|
|
11281
11245
|
}, isInitialFocus && ScreenReaderText), jsx(A11yText$1, {
|
|
11282
11246
|
"aria-live": ariaLive,
|
|
@@ -11888,7 +11852,7 @@ function ScrollManager(_ref) {
|
|
|
11888
11852
|
setScrollCaptureTarget(element);
|
|
11889
11853
|
setScrollLockTarget(element);
|
|
11890
11854
|
};
|
|
11891
|
-
return jsx(Fragment, null, lockEnabled && jsx("div", {
|
|
11855
|
+
return jsx(Fragment$1, null, lockEnabled && jsx("div", {
|
|
11892
11856
|
onClick: blurSelectInput,
|
|
11893
11857
|
css: _ref2$1
|
|
11894
11858
|
}), children(targetRef));
|
|
@@ -13989,11 +13953,10 @@ var Dialog$1 = (props) => {
|
|
|
13989
13953
|
} = props;
|
|
13990
13954
|
const triggerRef = React.useRef(null);
|
|
13991
13955
|
const contentRef = React.useRef(null);
|
|
13992
|
-
const [open, setOpen] = useControllableState({
|
|
13956
|
+
const [open = false, setOpen] = useControllableState({
|
|
13993
13957
|
prop: openProp,
|
|
13994
|
-
defaultProp: defaultOpen
|
|
13995
|
-
onChange: onOpenChange
|
|
13996
|
-
caller: DIALOG_NAME
|
|
13958
|
+
defaultProp: defaultOpen,
|
|
13959
|
+
onChange: onOpenChange
|
|
13997
13960
|
});
|
|
13998
13961
|
return /* @__PURE__ */ jsx$1(
|
|
13999
13962
|
DialogProvider,
|
|
@@ -14055,7 +14018,6 @@ var DialogOverlay = React.forwardRef(
|
|
|
14055
14018
|
}
|
|
14056
14019
|
);
|
|
14057
14020
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
14058
|
-
var Slot$1 = createSlot("DialogOverlay.RemoveScroll");
|
|
14059
14021
|
var DialogOverlayImpl = React.forwardRef(
|
|
14060
14022
|
(props, forwardedRef) => {
|
|
14061
14023
|
const { __scopeDialog, ...overlayProps } = props;
|
|
@@ -14063,7 +14025,7 @@ var DialogOverlayImpl = React.forwardRef(
|
|
|
14063
14025
|
return (
|
|
14064
14026
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
14065
14027
|
// ie. when `Overlay` and `Content` are siblings
|
|
14066
|
-
/* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot
|
|
14028
|
+
/* @__PURE__ */ jsx$1(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx$1(
|
|
14067
14029
|
Primitive.div,
|
|
14068
14030
|
{
|
|
14069
14031
|
"data-state": getState$2(context.open),
|
|
@@ -14166,7 +14128,7 @@ var DialogContentImpl = React.forwardRef(
|
|
|
14166
14128
|
const contentRef = React.useRef(null);
|
|
14167
14129
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
14168
14130
|
useFocusGuards();
|
|
14169
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
14131
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14170
14132
|
/* @__PURE__ */ jsx$1(
|
|
14171
14133
|
FocusScope,
|
|
14172
14134
|
{
|
|
@@ -14190,7 +14152,7 @@ var DialogContentImpl = React.forwardRef(
|
|
|
14190
14152
|
)
|
|
14191
14153
|
}
|
|
14192
14154
|
),
|
|
14193
|
-
/* @__PURE__ */ jsxs(Fragment
|
|
14155
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14194
14156
|
/* @__PURE__ */ jsx$1(TitleWarning, { titleId: context.titleId }),
|
|
14195
14157
|
/* @__PURE__ */ jsx$1(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
14196
14158
|
] })
|
|
@@ -14450,19 +14412,17 @@ function createCollection(name) {
|
|
|
14450
14412
|
};
|
|
14451
14413
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
14452
14414
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
14453
|
-
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
14454
14415
|
const CollectionSlot = React__default.forwardRef(
|
|
14455
14416
|
(props, forwardedRef) => {
|
|
14456
14417
|
const { scope, children } = props;
|
|
14457
14418
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
14458
14419
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
14459
|
-
return /* @__PURE__ */ jsx$1(
|
|
14420
|
+
return /* @__PURE__ */ jsx$1(Slot, { ref: composedRefs, children });
|
|
14460
14421
|
}
|
|
14461
14422
|
);
|
|
14462
14423
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14463
14424
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
14464
14425
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
14465
|
-
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
14466
14426
|
const CollectionItemSlot = React__default.forwardRef(
|
|
14467
14427
|
(props, forwardedRef) => {
|
|
14468
14428
|
const { scope, children, ...itemData } = props;
|
|
@@ -14473,7 +14433,7 @@ function createCollection(name) {
|
|
|
14473
14433
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
14474
14434
|
return () => void context.itemMap.delete(ref);
|
|
14475
14435
|
});
|
|
14476
|
-
return /* @__PURE__ */ jsx$1(
|
|
14436
|
+
return /* @__PURE__ */ jsx$1(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
14477
14437
|
}
|
|
14478
14438
|
);
|
|
14479
14439
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -14498,7 +14458,7 @@ function createCollection(name) {
|
|
|
14498
14458
|
];
|
|
14499
14459
|
}
|
|
14500
14460
|
|
|
14501
|
-
// packages/react/direction/src/
|
|
14461
|
+
// packages/react/direction/src/Direction.tsx
|
|
14502
14462
|
var DirectionContext = React.createContext(void 0);
|
|
14503
14463
|
function useDirection(localDir) {
|
|
14504
14464
|
const globalDir = React.useContext(DirectionContext);
|
|
@@ -14536,11 +14496,10 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
14536
14496
|
const ref = React.useRef(null);
|
|
14537
14497
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
14538
14498
|
const direction = useDirection(dir);
|
|
14539
|
-
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
14499
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
14540
14500
|
prop: currentTabStopIdProp,
|
|
14541
|
-
defaultProp: defaultCurrentTabStopId
|
|
14542
|
-
onChange: onCurrentTabStopIdChange
|
|
14543
|
-
caller: GROUP_NAME$2
|
|
14501
|
+
defaultProp: defaultCurrentTabStopId,
|
|
14502
|
+
onChange: onCurrentTabStopIdChange
|
|
14544
14503
|
});
|
|
14545
14504
|
const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
|
|
14546
14505
|
const handleEntryFocus = useCallbackRef$1(onEntryFocus);
|
|
@@ -14618,7 +14577,6 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
14618
14577
|
focusable = true,
|
|
14619
14578
|
active = false,
|
|
14620
14579
|
tabStopId,
|
|
14621
|
-
children,
|
|
14622
14580
|
...itemProps
|
|
14623
14581
|
} = props;
|
|
14624
14582
|
const autoId = useId();
|
|
@@ -14626,7 +14584,7 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
14626
14584
|
const context = useRovingFocusContext(ITEM_NAME$3, __scopeRovingFocusGroup);
|
|
14627
14585
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
14628
14586
|
const getItems = useCollection$3(__scopeRovingFocusGroup);
|
|
14629
|
-
const { onFocusableItemAdd, onFocusableItemRemove
|
|
14587
|
+
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
14630
14588
|
React.useEffect(() => {
|
|
14631
14589
|
if (focusable) {
|
|
14632
14590
|
onFocusableItemAdd();
|
|
@@ -14672,8 +14630,7 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
14672
14630
|
}
|
|
14673
14631
|
setTimeout(() => focusFirst$1(candidateNodes));
|
|
14674
14632
|
}
|
|
14675
|
-
})
|
|
14676
|
-
children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
|
|
14633
|
+
})
|
|
14677
14634
|
}
|
|
14678
14635
|
)
|
|
14679
14636
|
}
|
|
@@ -14737,8 +14694,7 @@ var Tabs$1 = React.forwardRef(
|
|
|
14737
14694
|
const [value, setValue] = useControllableState({
|
|
14738
14695
|
prop: valueProp,
|
|
14739
14696
|
onChange: onValueChange,
|
|
14740
|
-
defaultProp: defaultValue
|
|
14741
|
-
caller: TABS_NAME
|
|
14697
|
+
defaultProp: defaultValue
|
|
14742
14698
|
});
|
|
14743
14699
|
return /* @__PURE__ */ jsx$1(
|
|
14744
14700
|
TabsProvider,
|
|
@@ -14921,11 +14877,10 @@ var Collapsible = React.forwardRef(
|
|
|
14921
14877
|
onOpenChange,
|
|
14922
14878
|
...collapsibleProps
|
|
14923
14879
|
} = props;
|
|
14924
|
-
const [open, setOpen] = useControllableState({
|
|
14880
|
+
const [open = false, setOpen] = useControllableState({
|
|
14925
14881
|
prop: openProp,
|
|
14926
|
-
defaultProp: defaultOpen
|
|
14927
|
-
onChange: onOpenChange
|
|
14928
|
-
caller: COLLAPSIBLE_NAME
|
|
14882
|
+
defaultProp: defaultOpen,
|
|
14883
|
+
onChange: onOpenChange
|
|
14929
14884
|
});
|
|
14930
14885
|
return /* @__PURE__ */ jsx$1(
|
|
14931
14886
|
CollapsibleProvider,
|
|
@@ -15075,15 +15030,14 @@ var AccordionImplSingle = React__default.forwardRef(
|
|
|
15075
15030
|
} = props;
|
|
15076
15031
|
const [value, setValue] = useControllableState({
|
|
15077
15032
|
prop: valueProp,
|
|
15078
|
-
defaultProp: defaultValue
|
|
15079
|
-
onChange: onValueChange
|
|
15080
|
-
caller: ACCORDION_NAME
|
|
15033
|
+
defaultProp: defaultValue,
|
|
15034
|
+
onChange: onValueChange
|
|
15081
15035
|
});
|
|
15082
15036
|
return /* @__PURE__ */ jsx$1(
|
|
15083
15037
|
AccordionValueProvider,
|
|
15084
15038
|
{
|
|
15085
15039
|
scope: props.__scopeAccordion,
|
|
15086
|
-
value:
|
|
15040
|
+
value: value ? [value] : [],
|
|
15087
15041
|
onItemOpen: setValue,
|
|
15088
15042
|
onItemClose: React__default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
|
15089
15043
|
children: /* @__PURE__ */ jsx$1(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx$1(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
@@ -15099,11 +15053,10 @@ var AccordionImplMultiple = React__default.forwardRef((props, forwardedRef) => {
|
|
|
15099
15053
|
},
|
|
15100
15054
|
...accordionMultipleProps
|
|
15101
15055
|
} = props;
|
|
15102
|
-
const [value, setValue] = useControllableState({
|
|
15056
|
+
const [value = [], setValue] = useControllableState({
|
|
15103
15057
|
prop: valueProp,
|
|
15104
|
-
defaultProp: defaultValue
|
|
15105
|
-
onChange: onValueChange
|
|
15106
|
-
caller: ACCORDION_NAME
|
|
15058
|
+
defaultProp: defaultValue,
|
|
15059
|
+
onChange: onValueChange
|
|
15107
15060
|
});
|
|
15108
15061
|
const handleItemOpen = React__default.useCallback(
|
|
15109
15062
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
@@ -15533,7 +15486,6 @@ var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
|
15533
15486
|
}
|
|
15534
15487
|
);
|
|
15535
15488
|
});
|
|
15536
|
-
var Slot = createSlot("MenuContent.ScrollLock");
|
|
15537
15489
|
var MenuContentImpl = React.forwardRef(
|
|
15538
15490
|
(props, forwardedRef) => {
|
|
15539
15491
|
const {
|
|
@@ -16171,12 +16123,10 @@ function isPointInPolygon(point, polygon) {
|
|
|
16171
16123
|
const { x, y } = point;
|
|
16172
16124
|
let inside = false;
|
|
16173
16125
|
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
16174
|
-
const
|
|
16175
|
-
const
|
|
16176
|
-
const
|
|
16177
|
-
const
|
|
16178
|
-
const xj = jj.x;
|
|
16179
|
-
const yj = jj.y;
|
|
16126
|
+
const xi = polygon[i].x;
|
|
16127
|
+
const yi = polygon[i].y;
|
|
16128
|
+
const xj = polygon[j].x;
|
|
16129
|
+
const yj = polygon[j].y;
|
|
16180
16130
|
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
16181
16131
|
if (intersect) inside = !inside;
|
|
16182
16132
|
}
|
|
@@ -16226,11 +16176,10 @@ var DropdownMenu = (props) => {
|
|
|
16226
16176
|
} = props;
|
|
16227
16177
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16228
16178
|
const triggerRef = React.useRef(null);
|
|
16229
|
-
const [open, setOpen] = useControllableState({
|
|
16179
|
+
const [open = false, setOpen] = useControllableState({
|
|
16230
16180
|
prop: openProp,
|
|
16231
|
-
defaultProp: defaultOpen
|
|
16232
|
-
onChange: onOpenChange
|
|
16233
|
-
caller: DROPDOWN_MENU_NAME
|
|
16181
|
+
defaultProp: defaultOpen,
|
|
16182
|
+
onChange: onOpenChange
|
|
16234
16183
|
});
|
|
16235
16184
|
return /* @__PURE__ */ jsx$1(
|
|
16236
16185
|
DropdownMenuProvider,
|
|
@@ -16407,11 +16356,10 @@ DropdownMenuArrow.displayName = ARROW_NAME;
|
|
|
16407
16356
|
var DropdownMenuSub = (props) => {
|
|
16408
16357
|
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
16409
16358
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16410
|
-
const [open, setOpen] = useControllableState({
|
|
16359
|
+
const [open = false, setOpen] = useControllableState({
|
|
16411
16360
|
prop: openProp,
|
|
16412
|
-
defaultProp: defaultOpen
|
|
16413
|
-
onChange: onOpenChange
|
|
16414
|
-
caller: "DropdownMenuSub"
|
|
16361
|
+
defaultProp: defaultOpen,
|
|
16362
|
+
onChange: onOpenChange
|
|
16415
16363
|
});
|
|
16416
16364
|
return /* @__PURE__ */ jsx$1(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
16417
16365
|
};
|
|
@@ -20486,7 +20434,7 @@ function PopChild({ children, isPresent, anchorX }) {
|
|
|
20486
20434
|
* styles directly on the DOM node, we might be overwriting
|
|
20487
20435
|
* styles set via the style prop.
|
|
20488
20436
|
*/
|
|
20489
|
-
useInsertionEffect$
|
|
20437
|
+
useInsertionEffect$1(() => {
|
|
20490
20438
|
const { width, height, top, left, right } = size.current;
|
|
20491
20439
|
if (isPresent || !ref.current || !width || !height)
|
|
20492
20440
|
return;
|
|
@@ -20746,7 +20694,7 @@ const AnimatePresence = ({ children, custom, initial = true, onExitComplete, pre
|
|
|
20746
20694
|
* all components have finished animating out.
|
|
20747
20695
|
*/
|
|
20748
20696
|
const { forceRender } = useContext(LayoutGroupContext);
|
|
20749
|
-
return (jsx$1(Fragment
|
|
20697
|
+
return (jsx$1(Fragment, { children: renderedChildren.map((child) => {
|
|
20750
20698
|
const key = getChildKey(child);
|
|
20751
20699
|
const isPresent = propagate && !isParentPresent
|
|
20752
20700
|
? false
|
|
@@ -21107,7 +21055,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
21107
21055
|
createProjectionNode$1(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
|
|
21108
21056
|
}
|
|
21109
21057
|
const isMounted = useRef(false);
|
|
21110
|
-
useInsertionEffect$
|
|
21058
|
+
useInsertionEffect$1(() => {
|
|
21111
21059
|
/**
|
|
21112
21060
|
* Check the component has already mounted before calling
|
|
21113
21061
|
* `update` unnecessarily. This ensures we skip the initial update.
|
|
@@ -21638,7 +21586,7 @@ function createUseRender(forwardMotionProps = false) {
|
|
|
21638
21586
|
: useHTMLProps;
|
|
21639
21587
|
const visualProps = useVisualProps(props, latestValues, isStatic, Component);
|
|
21640
21588
|
const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
|
|
21641
|
-
const elementProps = Component !== Fragment
|
|
21589
|
+
const elementProps = Component !== Fragment$1
|
|
21642
21590
|
? { ...filteredProps, ...visualProps, ref }
|
|
21643
21591
|
: {};
|
|
21644
21592
|
/**
|
|
@@ -26804,7 +26752,7 @@ const createDomVisualElement = (Component, options) => {
|
|
|
26804
26752
|
return isSVGComponent(Component)
|
|
26805
26753
|
? new SVGVisualElement(options)
|
|
26806
26754
|
: new HTMLVisualElement(options, {
|
|
26807
|
-
allowProjection: Component !== Fragment,
|
|
26755
|
+
allowProjection: Component !== Fragment$1,
|
|
26808
26756
|
});
|
|
26809
26757
|
};
|
|
26810
26758
|
|
|
@@ -26822,10 +26770,12 @@ const Collapse = ({ isVisible, children }) => {
|
|
|
26822
26770
|
const [contentHeight, setContentHeight] = useState(0);
|
|
26823
26771
|
useEffect(() => {
|
|
26824
26772
|
if (contentRef.current) {
|
|
26825
|
-
|
|
26773
|
+
setTimeout(() => {
|
|
26774
|
+
setContentHeight((contentRef.current?.scrollHeight ?? 0) + 5);
|
|
26775
|
+
}, 0);
|
|
26826
26776
|
}
|
|
26827
26777
|
}, [children]);
|
|
26828
|
-
return (React__default.createElement(AnimatePresence, { initial: false }, isVisible && (React__default.createElement(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: contentHeight, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: 'spring', damping: 20, stiffness: 100 }
|
|
26778
|
+
return (React__default.createElement(AnimatePresence, { initial: false }, isVisible && (React__default.createElement(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: contentHeight, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: 'spring', damping: 20, stiffness: 100 } },
|
|
26829
26779
|
React__default.createElement("div", { ref: contentRef }, children)))));
|
|
26830
26780
|
};
|
|
26831
26781
|
|
|
@@ -26834,7 +26784,7 @@ function clamp(value, [min, max]) {
|
|
|
26834
26784
|
return Math.min(max, Math.max(min, value));
|
|
26835
26785
|
}
|
|
26836
26786
|
|
|
26837
|
-
// packages/react/use-previous/src/
|
|
26787
|
+
// packages/react/use-previous/src/usePrevious.tsx
|
|
26838
26788
|
function usePrevious(value) {
|
|
26839
26789
|
const ref = React.useRef({ value, previous: value });
|
|
26840
26790
|
return React.useMemo(() => {
|
|
@@ -27280,7 +27230,7 @@ var SliderThumbImpl = React.forwardRef(
|
|
|
27280
27230
|
}
|
|
27281
27231
|
) }),
|
|
27282
27232
|
isFormControl && /* @__PURE__ */ jsx$1(
|
|
27283
|
-
|
|
27233
|
+
BubbleInput,
|
|
27284
27234
|
{
|
|
27285
27235
|
name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0),
|
|
27286
27236
|
form: context.form,
|
|
@@ -27294,36 +27244,23 @@ var SliderThumbImpl = React.forwardRef(
|
|
|
27294
27244
|
}
|
|
27295
27245
|
);
|
|
27296
27246
|
SliderThumb.displayName = THUMB_NAME;
|
|
27297
|
-
var
|
|
27298
|
-
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
|
|
27302
|
-
const
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27307
|
-
const
|
|
27308
|
-
|
|
27309
|
-
|
|
27310
|
-
|
|
27311
|
-
|
|
27312
|
-
|
|
27313
|
-
|
|
27314
|
-
}, [prevValue, value]);
|
|
27315
|
-
return /* @__PURE__ */ jsx$1(
|
|
27316
|
-
Primitive.input,
|
|
27317
|
-
{
|
|
27318
|
-
style: { display: "none" },
|
|
27319
|
-
...props,
|
|
27320
|
-
ref: composedRefs,
|
|
27321
|
-
defaultValue: value
|
|
27322
|
-
}
|
|
27323
|
-
);
|
|
27324
|
-
}
|
|
27325
|
-
);
|
|
27326
|
-
SliderBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
27247
|
+
var BubbleInput = (props) => {
|
|
27248
|
+
const { value, ...inputProps } = props;
|
|
27249
|
+
const ref = React.useRef(null);
|
|
27250
|
+
const prevValue = usePrevious(value);
|
|
27251
|
+
React.useEffect(() => {
|
|
27252
|
+
const input = ref.current;
|
|
27253
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
27254
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
|
|
27255
|
+
const setValue = descriptor.set;
|
|
27256
|
+
if (prevValue !== value && setValue) {
|
|
27257
|
+
const event = new Event("input", { bubbles: true });
|
|
27258
|
+
setValue.call(input, value);
|
|
27259
|
+
input.dispatchEvent(event);
|
|
27260
|
+
}
|
|
27261
|
+
}, [prevValue, value]);
|
|
27262
|
+
return /* @__PURE__ */ jsx$1("input", { style: { display: "none" }, ...inputProps, ref, defaultValue: value });
|
|
27263
|
+
};
|
|
27327
27264
|
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
|
|
27328
27265
|
const nextValues = [...prevValues];
|
|
27329
27266
|
nextValues[atIndex] = nextValue;
|