@redis-ui/components 47.3.2 → 47.4.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.
- package/dist/AppSelectionMenu/components/Compose/Compose.cjs +1 -1
- package/dist/AppSelectionMenu/components/Compose/Compose.js +1 -1
- package/dist/Banner/components/BannerSemanticComponents/SemanticCloseButton/SemanticCloseButton.style.cjs +1 -1
- package/dist/Banner/components/BannerSemanticComponents/SemanticCloseButton/SemanticCloseButton.style.js +1 -1
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.cjs +1 -1
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.js +1 -1
- package/dist/Checkbox/components/Compose/Compose.cjs +1 -1
- package/dist/Checkbox/components/Compose/Compose.js +1 -1
- package/dist/Checkbox/components/Indicator/Indicator.style.cjs +2 -2
- package/dist/Checkbox/components/Indicator/Indicator.style.js +3 -3
- package/dist/Drawer/components/Description/Description.cjs +1 -1
- package/dist/Drawer/components/Description/Description.js +1 -1
- package/dist/Drawer/components/Header/components/Title/Title.cjs +1 -1
- package/dist/Drawer/components/Header/components/Title/Title.js +1 -1
- package/dist/Inputs/PasswordInput/components/PasswordInput.context.cjs +1 -1
- package/dist/Inputs/PasswordInput/components/PasswordInput.context.js +1 -1
- package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.cjs +1 -1
- package/dist/Inputs/TextArea/components/TextAreaTag/TextAreaTag.js +1 -1
- package/dist/Inputs/components/Context/InputValue.context.d.ts +1 -1
- package/dist/Inputs/components/Context/InputValueProvider.cjs +1 -1
- package/dist/Inputs/components/Context/InputValueProvider.js +1 -1
- package/dist/Inputs/components/Context/NumericInputValueProvider.cjs +1 -1
- package/dist/Inputs/components/Context/NumericInputValueProvider.js +1 -1
- package/dist/Inputs/components/InputTag/InputTag.cjs +1 -1
- package/dist/Inputs/components/InputTag/InputTag.js +1 -1
- package/dist/Loader/Loader.cjs +1 -1
- package/dist/Loader/Loader.js +1 -1
- package/dist/Modal/components/Content/components/Description/Description.cjs +1 -1
- package/dist/Modal/components/Content/components/Description/Description.js +1 -1
- package/dist/Modal/components/Content/components/Header/components/Title/Title.cjs +1 -1
- package/dist/Modal/components/Content/components/Header/components/Title/Title.js +1 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.cjs +1 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.d.ts +1 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.js +1 -1
- package/dist/RadioGroup/components/Compose/Compose.cjs +2 -2
- package/dist/RadioGroup/components/Compose/Compose.js +2 -2
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.cjs +1 -1
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.js +1 -1
- package/dist/Section/components/Compose/Compose.cjs +1 -1
- package/dist/Section/components/Compose/Compose.js +1 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.cjs +1 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.js +1 -1
- package/dist/Select/components/Context/hooks/useSelectContextApi.d.ts +1 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.cjs +1 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.js +1 -1
- package/dist/Slider/components/Compose/Compose.cjs +1 -1
- package/dist/Slider/components/Compose/Compose.js +1 -1
- package/dist/Switch/components/Compose/Compose.cjs +1 -1
- package/dist/Switch/components/Compose/Compose.js +1 -1
- package/dist/Toast/Toaster.style.cjs +2 -2
- package/dist/Toast/Toaster.style.js +2 -2
- package/dist/Toast/core/mapping.helpers.cjs +1 -1
- package/dist/Toast/core/mapping.helpers.js +1 -1
- package/dist/Typography/hooks/useEllipsisTooltip.d.ts +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.cjs +108 -62
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +108 -62
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.cjs +5 -4
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +5 -4
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +4 -2
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +5 -3
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +16 -2
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +16 -2
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +8 -8
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +6 -4
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +6 -4
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +4 -3
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +4 -3
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +4 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +4 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +8 -5
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +8 -5
- package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +6 -4
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +6 -4
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +4 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +4 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +16 -6
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -5
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +3 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +3 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index.cjs +2 -2
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/{react-slider → react-progress}/node_modules/@radix-ui/react-context/dist/index.cjs +2 -1
- package/dist/node_modules/@radix-ui/{react-switch → react-progress}/node_modules/@radix-ui/react-context/dist/index.js +2 -1
- package/dist/node_modules/@radix-ui/{react-slider → react-progress}/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/{react-switch → react-progress}/node_modules/@radix-ui/react-primitive/dist/index.js +4 -2
- package/dist/node_modules/@radix-ui/{react-slider → react-progress}/node_modules/@radix-ui/react-slot/dist/index.cjs +14 -4
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +97 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.cjs +16 -11
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +16 -11
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +11 -6
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +11 -6
- package/dist/node_modules/@radix-ui/react-select/dist/index.cjs +56 -35
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +57 -36
- package/dist/node_modules/@radix-ui/react-slider/dist/index.cjs +35 -35
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +55 -39
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +54 -38
- package/dist/node_modules/@radix-ui/react-switch/dist/index.cjs +27 -23
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +17 -13
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.cjs +2 -1
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +2 -1
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.cjs +4 -3
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +4 -3
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +33 -17
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +33 -17
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +29 -16
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +29 -16
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +14 -11
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +14 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +8 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +8 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +3 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +3 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +4 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +4 -2
- package/dist/{node_modules/@radix-ui/react-switch → packages/components}/node_modules/@radix-ui/react-primitive/dist/index.cjs +5 -3
- package/dist/{node_modules/@radix-ui/react-slider → packages/components}/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/packages/components/node_modules/@radix-ui/react-slot/dist/index.cjs +99 -0
- package/dist/{node_modules/@radix-ui/react-slider → packages/components}/node_modules/@radix-ui/react-slot/dist/index.js +14 -4
- package/dist/packages/components/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +32 -0
- package/dist/packages/components/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
- package/dist/{node_modules → packages/components/node_modules}/react-toastify/dist/react-toastify.esm.cjs +3 -3
- package/dist/{node_modules → packages/components/node_modules}/react-toastify/dist/react-toastify.esm.js +2 -2
- package/package.json +18 -14
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/number/dist/index.cjs +0 -6
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/number/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.cjs +0 -9
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.cjs +0 -81
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -79
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -31
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -28
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-context/dist/index.js +0 -67
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -12
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -57
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -7
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -5
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -19
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size/dist/index.cjs +0 -41
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.cjs +0 -9
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -31
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -28
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-context/dist/index.cjs +0 -69
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -82
- package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.js +0 -80
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
const require_index = require("../../react-use-layout-effect/dist/index.cjs");
|
|
3
|
-
let react = require("react");
|
|
4
|
-
react = require_runtime.__toESM(react, 1);
|
|
5
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
6
|
-
var useInsertionEffect = react[" useInsertionEffect ".trim().toString()] || require_index.useLayoutEffect2;
|
|
7
|
-
function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
|
|
8
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
9
|
-
defaultProp,
|
|
10
|
-
onChange
|
|
11
|
-
});
|
|
12
|
-
const isControlled = prop !== void 0;
|
|
13
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
14
|
-
{
|
|
15
|
-
const isControlledRef = react.useRef(prop !== void 0);
|
|
16
|
-
react.useEffect(() => {
|
|
17
|
-
const wasControlled = isControlledRef.current;
|
|
18
|
-
if (wasControlled !== isControlled) console.warn(`${caller} is changing from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. 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.`);
|
|
19
|
-
isControlledRef.current = isControlled;
|
|
20
|
-
}, [isControlled, caller]);
|
|
21
|
-
}
|
|
22
|
-
return [value, react.useCallback((nextValue) => {
|
|
23
|
-
if (isControlled) {
|
|
24
|
-
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
25
|
-
if (value2 !== prop) onChangeRef.current?.(value2);
|
|
26
|
-
} else setUncontrolledProp(nextValue);
|
|
27
|
-
}, [
|
|
28
|
-
isControlled,
|
|
29
|
-
prop,
|
|
30
|
-
setUncontrolledProp,
|
|
31
|
-
onChangeRef
|
|
32
|
-
])];
|
|
33
|
-
}
|
|
34
|
-
function useUncontrolledState({ defaultProp, onChange }) {
|
|
35
|
-
const [value, setValue] = react.useState(defaultProp);
|
|
36
|
-
const prevValueRef = react.useRef(value);
|
|
37
|
-
const onChangeRef = react.useRef(onChange);
|
|
38
|
-
useInsertionEffect(() => {
|
|
39
|
-
onChangeRef.current = onChange;
|
|
40
|
-
}, [onChange]);
|
|
41
|
-
react.useEffect(() => {
|
|
42
|
-
if (prevValueRef.current !== value) {
|
|
43
|
-
onChangeRef.current?.(value);
|
|
44
|
-
prevValueRef.current = value;
|
|
45
|
-
}
|
|
46
|
-
}, [value, prevValueRef]);
|
|
47
|
-
return [
|
|
48
|
-
value,
|
|
49
|
-
setValue,
|
|
50
|
-
onChangeRef
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
function isFunction(value) {
|
|
54
|
-
return typeof value === "function";
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
exports.useControllableState = useControllableState;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
4
|
-
var useInsertionEffect = React$1[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
5
|
-
function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
|
|
6
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
7
|
-
defaultProp,
|
|
8
|
-
onChange
|
|
9
|
-
});
|
|
10
|
-
const isControlled = prop !== void 0;
|
|
11
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
12
|
-
{
|
|
13
|
-
const isControlledRef = React$1.useRef(prop !== void 0);
|
|
14
|
-
React$1.useEffect(() => {
|
|
15
|
-
const wasControlled = isControlledRef.current;
|
|
16
|
-
if (wasControlled !== isControlled) console.warn(`${caller} is changing from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. 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.`);
|
|
17
|
-
isControlledRef.current = isControlled;
|
|
18
|
-
}, [isControlled, caller]);
|
|
19
|
-
}
|
|
20
|
-
return [value, React$1.useCallback((nextValue) => {
|
|
21
|
-
if (isControlled) {
|
|
22
|
-
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
23
|
-
if (value2 !== prop) onChangeRef.current?.(value2);
|
|
24
|
-
} else setUncontrolledProp(nextValue);
|
|
25
|
-
}, [
|
|
26
|
-
isControlled,
|
|
27
|
-
prop,
|
|
28
|
-
setUncontrolledProp,
|
|
29
|
-
onChangeRef
|
|
30
|
-
])];
|
|
31
|
-
}
|
|
32
|
-
function useUncontrolledState({ defaultProp, onChange }) {
|
|
33
|
-
const [value, setValue] = React$1.useState(defaultProp);
|
|
34
|
-
const prevValueRef = React$1.useRef(value);
|
|
35
|
-
const onChangeRef = React$1.useRef(onChange);
|
|
36
|
-
useInsertionEffect(() => {
|
|
37
|
-
onChangeRef.current = onChange;
|
|
38
|
-
}, [onChange]);
|
|
39
|
-
React$1.useEffect(() => {
|
|
40
|
-
if (prevValueRef.current !== value) {
|
|
41
|
-
onChangeRef.current?.(value);
|
|
42
|
-
prevValueRef.current = value;
|
|
43
|
-
}
|
|
44
|
-
}, [value, prevValueRef]);
|
|
45
|
-
return [
|
|
46
|
-
value,
|
|
47
|
-
setValue,
|
|
48
|
-
onChangeRef
|
|
49
|
-
];
|
|
50
|
-
}
|
|
51
|
-
function isFunction(value) {
|
|
52
|
-
return typeof value === "function";
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { useControllableState };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
let react = require("react");
|
|
3
|
-
react = require_runtime.__toESM(react, 1);
|
|
4
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
5
|
-
var useLayoutEffect2 = globalThis?.document ? react.useLayoutEffect : () => {};
|
|
6
|
-
//#endregion
|
|
7
|
-
exports.useLayoutEffect2 = useLayoutEffect2;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
3
|
-
var useLayoutEffect2 = globalThis?.document ? React$1.useLayoutEffect : () => {};
|
|
4
|
-
//#endregion
|
|
5
|
-
export { useLayoutEffect2 };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
let react = require("react");
|
|
3
|
-
react = require_runtime.__toESM(react, 1);
|
|
4
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
5
|
-
function usePrevious(value) {
|
|
6
|
-
const ref = react.useRef({
|
|
7
|
-
value,
|
|
8
|
-
previous: value
|
|
9
|
-
});
|
|
10
|
-
return react.useMemo(() => {
|
|
11
|
-
if (ref.current.value !== value) {
|
|
12
|
-
ref.current.previous = ref.current.value;
|
|
13
|
-
ref.current.value = value;
|
|
14
|
-
}
|
|
15
|
-
return ref.current.previous;
|
|
16
|
-
}, [value]);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
exports.usePrevious = usePrevious;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
3
|
-
function usePrevious(value) {
|
|
4
|
-
const ref = React$1.useRef({
|
|
5
|
-
value,
|
|
6
|
-
previous: value
|
|
7
|
-
});
|
|
8
|
-
return React$1.useMemo(() => {
|
|
9
|
-
if (ref.current.value !== value) {
|
|
10
|
-
ref.current.previous = ref.current.value;
|
|
11
|
-
ref.current.value = value;
|
|
12
|
-
}
|
|
13
|
-
return ref.current.previous;
|
|
14
|
-
}, [value]);
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { usePrevious };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
const require_index = require("../../react-use-layout-effect/dist/index.cjs");
|
|
3
|
-
let react = require("react");
|
|
4
|
-
react = require_runtime.__toESM(react, 1);
|
|
5
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
6
|
-
function useSize(element) {
|
|
7
|
-
const [size, setSize] = react.useState(void 0);
|
|
8
|
-
require_index.useLayoutEffect2(() => {
|
|
9
|
-
if (element) {
|
|
10
|
-
setSize({
|
|
11
|
-
width: element.offsetWidth,
|
|
12
|
-
height: element.offsetHeight
|
|
13
|
-
});
|
|
14
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
15
|
-
if (!Array.isArray(entries)) return;
|
|
16
|
-
if (!entries.length) return;
|
|
17
|
-
const entry = entries[0];
|
|
18
|
-
let width;
|
|
19
|
-
let height;
|
|
20
|
-
if ("borderBoxSize" in entry) {
|
|
21
|
-
const borderSizeEntry = entry["borderBoxSize"];
|
|
22
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
23
|
-
width = borderSize["inlineSize"];
|
|
24
|
-
height = borderSize["blockSize"];
|
|
25
|
-
} else {
|
|
26
|
-
width = element.offsetWidth;
|
|
27
|
-
height = element.offsetHeight;
|
|
28
|
-
}
|
|
29
|
-
setSize({
|
|
30
|
-
width,
|
|
31
|
-
height
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
resizeObserver.observe(element, { box: "border-box" });
|
|
35
|
-
return () => resizeObserver.unobserve(element);
|
|
36
|
-
} else setSize(void 0);
|
|
37
|
-
}, [element]);
|
|
38
|
-
return size;
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
exports.useSize = useSize;
|
package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size/dist/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
4
|
-
function useSize(element) {
|
|
5
|
-
const [size, setSize] = React$1.useState(void 0);
|
|
6
|
-
useLayoutEffect2(() => {
|
|
7
|
-
if (element) {
|
|
8
|
-
setSize({
|
|
9
|
-
width: element.offsetWidth,
|
|
10
|
-
height: element.offsetHeight
|
|
11
|
-
});
|
|
12
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
13
|
-
if (!Array.isArray(entries)) return;
|
|
14
|
-
if (!entries.length) return;
|
|
15
|
-
const entry = entries[0];
|
|
16
|
-
let width;
|
|
17
|
-
let height;
|
|
18
|
-
if ("borderBoxSize" in entry) {
|
|
19
|
-
const borderSizeEntry = entry["borderBoxSize"];
|
|
20
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
21
|
-
width = borderSize["inlineSize"];
|
|
22
|
-
height = borderSize["blockSize"];
|
|
23
|
-
} else {
|
|
24
|
-
width = element.offsetWidth;
|
|
25
|
-
height = element.offsetHeight;
|
|
26
|
-
}
|
|
27
|
-
setSize({
|
|
28
|
-
width,
|
|
29
|
-
height
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
resizeObserver.observe(element, { box: "border-box" });
|
|
33
|
-
return () => resizeObserver.unobserve(element);
|
|
34
|
-
} else setSize(void 0);
|
|
35
|
-
}, [element]);
|
|
36
|
-
return size;
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { useSize };
|
package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3
|
-
return function handleEvent(event) {
|
|
4
|
-
originalEventHandler?.(event);
|
|
5
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
exports.composeEventHandlers = composeEventHandlers;
|
package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3
|
-
return function handleEvent(event) {
|
|
4
|
-
originalEventHandler?.(event);
|
|
5
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
export { composeEventHandlers };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
let react = require("react");
|
|
3
|
-
react = require_runtime.__toESM(react, 1);
|
|
4
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
5
|
-
function setRef(ref, value) {
|
|
6
|
-
if (typeof ref === "function") return ref(value);
|
|
7
|
-
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
8
|
-
}
|
|
9
|
-
function composeRefs(...refs) {
|
|
10
|
-
return (node) => {
|
|
11
|
-
let hasCleanup = false;
|
|
12
|
-
const cleanups = refs.map((ref) => {
|
|
13
|
-
const cleanup = setRef(ref, node);
|
|
14
|
-
if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
|
|
15
|
-
return cleanup;
|
|
16
|
-
});
|
|
17
|
-
if (hasCleanup) return () => {
|
|
18
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
19
|
-
const cleanup = cleanups[i];
|
|
20
|
-
if (typeof cleanup == "function") cleanup();
|
|
21
|
-
else setRef(refs[i], null);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function useComposedRefs(...refs) {
|
|
27
|
-
return react.useCallback(composeRefs(...refs), refs);
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
exports.composeRefs = composeRefs;
|
|
31
|
-
exports.useComposedRefs = useComposedRefs;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
3
|
-
function setRef(ref, value) {
|
|
4
|
-
if (typeof ref === "function") return ref(value);
|
|
5
|
-
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
6
|
-
}
|
|
7
|
-
function composeRefs(...refs) {
|
|
8
|
-
return (node) => {
|
|
9
|
-
let hasCleanup = false;
|
|
10
|
-
const cleanups = refs.map((ref) => {
|
|
11
|
-
const cleanup = setRef(ref, node);
|
|
12
|
-
if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
|
|
13
|
-
return cleanup;
|
|
14
|
-
});
|
|
15
|
-
if (hasCleanup) return () => {
|
|
16
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
17
|
-
const cleanup = cleanups[i];
|
|
18
|
-
if (typeof cleanup == "function") cleanup();
|
|
19
|
-
else setRef(refs[i], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function useComposedRefs(...refs) {
|
|
25
|
-
return React$1.useCallback(composeRefs(...refs), refs);
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { composeRefs, useComposedRefs };
|
package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-context/dist/index.cjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
let react = require("react");
|
|
4
|
-
react = require_runtime.__toESM(react, 1);
|
|
5
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
6
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
7
|
-
let defaultContexts = [];
|
|
8
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
9
|
-
const BaseContext = react.createContext(defaultContext);
|
|
10
|
-
const index = defaultContexts.length;
|
|
11
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
12
|
-
const Provider = (props) => {
|
|
13
|
-
const { scope, children, ...context } = props;
|
|
14
|
-
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
15
|
-
const value = react.useMemo(() => context, Object.values(context));
|
|
16
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Context.Provider, {
|
|
17
|
-
value,
|
|
18
|
-
children
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
22
|
-
function useContext2(consumerName, scope) {
|
|
23
|
-
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
24
|
-
const context = react.useContext(Context);
|
|
25
|
-
if (context) return context;
|
|
26
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
27
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
28
|
-
}
|
|
29
|
-
return [Provider, useContext2];
|
|
30
|
-
}
|
|
31
|
-
const createScope = () => {
|
|
32
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
33
|
-
return react.createContext(defaultContext);
|
|
34
|
-
});
|
|
35
|
-
return function useScope(scope) {
|
|
36
|
-
const contexts = scope?.[scopeName] || scopeContexts;
|
|
37
|
-
return react.useMemo(() => ({ [`__scope${scopeName}`]: {
|
|
38
|
-
...scope,
|
|
39
|
-
[scopeName]: contexts
|
|
40
|
-
} }), [scope, contexts]);
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
createScope.scopeName = scopeName;
|
|
44
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
45
|
-
}
|
|
46
|
-
function composeContextScopes(...scopes) {
|
|
47
|
-
const baseScope = scopes[0];
|
|
48
|
-
if (scopes.length === 1) return baseScope;
|
|
49
|
-
const createScope = () => {
|
|
50
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
51
|
-
useScope: createScope2(),
|
|
52
|
-
scopeName: createScope2.scopeName
|
|
53
|
-
}));
|
|
54
|
-
return function useComposedScopes(overrideScopes) {
|
|
55
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
56
|
-
const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
|
|
57
|
-
return {
|
|
58
|
-
...nextScopes2,
|
|
59
|
-
...currentScope
|
|
60
|
-
};
|
|
61
|
-
}, {});
|
|
62
|
-
return react.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
createScope.scopeName = baseScope.scopeName;
|
|
66
|
-
return createScope;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
exports.createContextScope = createContextScope;
|
package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.cjs
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
const require_index = require("../../react-compose-refs/dist/index.cjs");
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_runtime.__toESM(react, 1);
|
|
6
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
7
|
-
var Slot = react.forwardRef((props, forwardedRef) => {
|
|
8
|
-
const { children, ...slotProps } = props;
|
|
9
|
-
const childrenArray = react.Children.toArray(children);
|
|
10
|
-
const slottable = childrenArray.find(isSlottable);
|
|
11
|
-
if (slottable) {
|
|
12
|
-
const newElement = slottable.props.children;
|
|
13
|
-
const newChildren = childrenArray.map((child) => {
|
|
14
|
-
if (child === slottable) {
|
|
15
|
-
if (react.Children.count(newElement) > 1) return react.Children.only(null);
|
|
16
|
-
return react.isValidElement(newElement) ? newElement.props.children : null;
|
|
17
|
-
} else return child;
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
|
|
20
|
-
...slotProps,
|
|
21
|
-
ref: forwardedRef,
|
|
22
|
-
children: react.isValidElement(newElement) ? react.cloneElement(newElement, void 0, newChildren) : null
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
|
|
26
|
-
...slotProps,
|
|
27
|
-
ref: forwardedRef,
|
|
28
|
-
children
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
Slot.displayName = "Slot";
|
|
32
|
-
var SlotClone = react.forwardRef((props, forwardedRef) => {
|
|
33
|
-
const { children, ...slotProps } = props;
|
|
34
|
-
if (react.isValidElement(children)) {
|
|
35
|
-
const childrenRef = getElementRef(children);
|
|
36
|
-
return react.cloneElement(children, {
|
|
37
|
-
...mergeProps(slotProps, children.props),
|
|
38
|
-
ref: forwardedRef ? require_index.composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return react.Children.count(children) > 1 ? react.Children.only(null) : null;
|
|
42
|
-
});
|
|
43
|
-
SlotClone.displayName = "SlotClone";
|
|
44
|
-
var Slottable = ({ children }) => {
|
|
45
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
46
|
-
};
|
|
47
|
-
function isSlottable(child) {
|
|
48
|
-
return react.isValidElement(child) && child.type === Slottable;
|
|
49
|
-
}
|
|
50
|
-
function mergeProps(slotProps, childProps) {
|
|
51
|
-
const overrideProps = { ...childProps };
|
|
52
|
-
for (const propName in childProps) {
|
|
53
|
-
const slotPropValue = slotProps[propName];
|
|
54
|
-
const childPropValue = childProps[propName];
|
|
55
|
-
if (/^on[A-Z]/.test(propName)) {
|
|
56
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
|
|
57
|
-
childPropValue(...args);
|
|
58
|
-
slotPropValue(...args);
|
|
59
|
-
};
|
|
60
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
61
|
-
} else if (propName === "style") overrideProps[propName] = {
|
|
62
|
-
...slotPropValue,
|
|
63
|
-
...childPropValue
|
|
64
|
-
};
|
|
65
|
-
else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
...slotProps,
|
|
69
|
-
...overrideProps
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function getElementRef(element) {
|
|
73
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
74
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
75
|
-
if (mayWarn) return element.ref;
|
|
76
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
77
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
78
|
-
if (mayWarn) return element.props.ref;
|
|
79
|
-
return element.props.ref || element.ref;
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
exports.Slot = Slot;
|
package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { composeRefs } from "../../react-compose-refs/dist/index.js";
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React$1 from "react";
|
|
4
|
-
//#region ../../node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
5
|
-
var Slot = React$1.forwardRef((props, forwardedRef) => {
|
|
6
|
-
const { children, ...slotProps } = props;
|
|
7
|
-
const childrenArray = React$1.Children.toArray(children);
|
|
8
|
-
const slottable = childrenArray.find(isSlottable);
|
|
9
|
-
if (slottable) {
|
|
10
|
-
const newElement = slottable.props.children;
|
|
11
|
-
const newChildren = childrenArray.map((child) => {
|
|
12
|
-
if (child === slottable) {
|
|
13
|
-
if (React$1.Children.count(newElement) > 1) return React$1.Children.only(null);
|
|
14
|
-
return React$1.isValidElement(newElement) ? newElement.props.children : null;
|
|
15
|
-
} else return child;
|
|
16
|
-
});
|
|
17
|
-
return /* @__PURE__ */ jsx(SlotClone, {
|
|
18
|
-
...slotProps,
|
|
19
|
-
ref: forwardedRef,
|
|
20
|
-
children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return /* @__PURE__ */ jsx(SlotClone, {
|
|
24
|
-
...slotProps,
|
|
25
|
-
ref: forwardedRef,
|
|
26
|
-
children
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
Slot.displayName = "Slot";
|
|
30
|
-
var SlotClone = React$1.forwardRef((props, forwardedRef) => {
|
|
31
|
-
const { children, ...slotProps } = props;
|
|
32
|
-
if (React$1.isValidElement(children)) {
|
|
33
|
-
const childrenRef = getElementRef(children);
|
|
34
|
-
return React$1.cloneElement(children, {
|
|
35
|
-
...mergeProps(slotProps, children.props),
|
|
36
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
|
|
40
|
-
});
|
|
41
|
-
SlotClone.displayName = "SlotClone";
|
|
42
|
-
var Slottable = ({ children }) => {
|
|
43
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
44
|
-
};
|
|
45
|
-
function isSlottable(child) {
|
|
46
|
-
return React$1.isValidElement(child) && child.type === Slottable;
|
|
47
|
-
}
|
|
48
|
-
function mergeProps(slotProps, childProps) {
|
|
49
|
-
const overrideProps = { ...childProps };
|
|
50
|
-
for (const propName in childProps) {
|
|
51
|
-
const slotPropValue = slotProps[propName];
|
|
52
|
-
const childPropValue = childProps[propName];
|
|
53
|
-
if (/^on[A-Z]/.test(propName)) {
|
|
54
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
|
|
55
|
-
childPropValue(...args);
|
|
56
|
-
slotPropValue(...args);
|
|
57
|
-
};
|
|
58
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
59
|
-
} else if (propName === "style") overrideProps[propName] = {
|
|
60
|
-
...slotPropValue,
|
|
61
|
-
...childPropValue
|
|
62
|
-
};
|
|
63
|
-
else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
...slotProps,
|
|
67
|
-
...overrideProps
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function getElementRef(element) {
|
|
71
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
72
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
73
|
-
if (mayWarn) return element.ref;
|
|
74
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
75
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
76
|
-
if (mayWarn) return element.props.ref;
|
|
77
|
-
return element.props.ref || element.ref;
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Slot };
|