@redis-ui/components 47.3.3 → 47.5.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/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/MultiSelect/components/Content/components/SelectAll/SelectAll.cjs +11 -7
- package/dist/MultiSelect/components/Content/components/SelectAll/SelectAll.js +12 -8
- 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/@tanstack/hotkeys/dist/constants.cjs +389 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/constants.js +383 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/format.cjs +22 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/format.js +22 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/hotkey-manager.cjs +363 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/hotkey-manager.js +363 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/manager.utils.cjs +111 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/manager.utils.js +107 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/match.cjs +59 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/match.js +59 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/parse.cjs +143 -0
- package/dist/node_modules/@tanstack/hotkeys/dist/parse.js +141 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/HotkeysProvider.cjs +10 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/HotkeysProvider.js +8 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs +121 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/useHotkey.js +120 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/utils.cjs +9 -0
- package/dist/node_modules/@tanstack/react-hotkeys/dist/utils.js +9 -0
- package/dist/node_modules/@tanstack/store/dist/alien.cjs +183 -0
- package/dist/node_modules/@tanstack/store/dist/alien.js +182 -0
- package/dist/node_modules/@tanstack/store/dist/atom.cjs +161 -0
- package/dist/node_modules/@tanstack/store/dist/atom.js +160 -0
- package/dist/node_modules/@tanstack/store/dist/store.cjs +25 -0
- package/dist/node_modules/@tanstack/store/dist/store.js +25 -0
- 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 +19 -15
- 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
- package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.cjs +0 -289
- package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js +0 -288
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createAtom, toObserver } from "./atom.js";
|
|
2
|
+
//#region ../../node_modules/@tanstack/store/dist/store.js
|
|
3
|
+
var Store = class {
|
|
4
|
+
constructor(valueOrFn, actionsFactory) {
|
|
5
|
+
this.atom = createAtom(valueOrFn);
|
|
6
|
+
this.get = this.get.bind(this);
|
|
7
|
+
this.setState = this.setState.bind(this);
|
|
8
|
+
this.subscribe = this.subscribe.bind(this);
|
|
9
|
+
if (actionsFactory) this.actions = actionsFactory(this);
|
|
10
|
+
}
|
|
11
|
+
setState(updater) {
|
|
12
|
+
this.atom.set(updater);
|
|
13
|
+
}
|
|
14
|
+
get state() {
|
|
15
|
+
return this.atom.get();
|
|
16
|
+
}
|
|
17
|
+
get() {
|
|
18
|
+
return this.state;
|
|
19
|
+
}
|
|
20
|
+
subscribe(observerOrFn) {
|
|
21
|
+
return this.atom.subscribe(toObserver(observerOrFn));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Store };
|
|
@@ -56,7 +56,7 @@ function RemoveScrollSideCar(props) {
|
|
|
56
56
|
props.shards
|
|
57
57
|
]);
|
|
58
58
|
var shouldCancelEvent = react.useCallback(function(event, parent) {
|
|
59
|
-
if ("touches" in event && event.touches.length === 2) return !lastProps.current.allowPinchZoom;
|
|
59
|
+
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
|
|
60
60
|
var touch = getTouchXY(event);
|
|
61
61
|
var touchStart = touchStartRef.current;
|
|
62
62
|
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
@@ -65,6 +65,9 @@ function RemoveScrollSideCar(props) {
|
|
|
65
65
|
var target = event.target;
|
|
66
66
|
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
67
67
|
if ("touches" in event && moveDirection === "h" && target.type === "range") return false;
|
|
68
|
+
var selection = window.getSelection();
|
|
69
|
+
var anchorNode = selection && selection.anchorNode;
|
|
70
|
+
if (anchorNode ? anchorNode === target || anchorNode.contains(target) : false) return false;
|
|
68
71
|
var canBeScrolledInMainDirection = require_handleScroll.locationCouldBeScrolled(moveDirection, target);
|
|
69
72
|
if (!canBeScrolledInMainDirection) return true;
|
|
70
73
|
if (canBeScrolledInMainDirection) currentAxis = moveDirection;
|
|
@@ -143,7 +146,10 @@ function RemoveScrollSideCar(props) {
|
|
|
143
146
|
};
|
|
144
147
|
}, []);
|
|
145
148
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
146
|
-
return react.createElement(react.Fragment, null, inert ? react.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? react.createElement(require_component$1.RemoveScrollBar, {
|
|
149
|
+
return react.createElement(react.Fragment, null, inert ? react.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? react.createElement(require_component$1.RemoveScrollBar, {
|
|
150
|
+
noRelative: props.noRelative,
|
|
151
|
+
gapMode: props.gapMode
|
|
152
|
+
}) : null);
|
|
147
153
|
}
|
|
148
154
|
function getOutermostShadowParent(node) {
|
|
149
155
|
var shadowParent = null;
|
|
@@ -54,7 +54,7 @@ function RemoveScrollSideCar(props) {
|
|
|
54
54
|
props.shards
|
|
55
55
|
]);
|
|
56
56
|
var shouldCancelEvent = React$1.useCallback(function(event, parent) {
|
|
57
|
-
if ("touches" in event && event.touches.length === 2) return !lastProps.current.allowPinchZoom;
|
|
57
|
+
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
|
|
58
58
|
var touch = getTouchXY(event);
|
|
59
59
|
var touchStart = touchStartRef.current;
|
|
60
60
|
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
@@ -63,6 +63,9 @@ function RemoveScrollSideCar(props) {
|
|
|
63
63
|
var target = event.target;
|
|
64
64
|
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
65
65
|
if ("touches" in event && moveDirection === "h" && target.type === "range") return false;
|
|
66
|
+
var selection = window.getSelection();
|
|
67
|
+
var anchorNode = selection && selection.anchorNode;
|
|
68
|
+
if (anchorNode ? anchorNode === target || anchorNode.contains(target) : false) return false;
|
|
66
69
|
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
67
70
|
if (!canBeScrolledInMainDirection) return true;
|
|
68
71
|
if (canBeScrolledInMainDirection) currentAxis = moveDirection;
|
|
@@ -141,7 +144,10 @@ function RemoveScrollSideCar(props) {
|
|
|
141
144
|
};
|
|
142
145
|
}, []);
|
|
143
146
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
144
|
-
return React$1.createElement(React$1.Fragment, null, inert ? React$1.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? React$1.createElement(RemoveScrollBar, {
|
|
147
|
+
return React$1.createElement(React$1.Fragment, null, inert ? React$1.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? React$1.createElement(RemoveScrollBar, {
|
|
148
|
+
noRelative: props.noRelative,
|
|
149
|
+
gapMode: props.gapMode
|
|
150
|
+
}) : null);
|
|
145
151
|
}
|
|
146
152
|
function getOutermostShadowParent(node) {
|
|
147
153
|
var shadowParent = null;
|
|
@@ -17,7 +17,7 @@ var RemoveScroll = react.forwardRef(function(props, parentRef) {
|
|
|
17
17
|
onWheelCapture: nothing,
|
|
18
18
|
onTouchMoveCapture: nothing
|
|
19
19
|
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
20
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = require_tslib_es6.__rest(props, [
|
|
20
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = require_tslib_es6.__rest(props, [
|
|
21
21
|
"forwardProps",
|
|
22
22
|
"children",
|
|
23
23
|
"className",
|
|
@@ -25,6 +25,7 @@ var RemoveScroll = react.forwardRef(function(props, parentRef) {
|
|
|
25
25
|
"enabled",
|
|
26
26
|
"shards",
|
|
27
27
|
"sideCar",
|
|
28
|
+
"noRelative",
|
|
28
29
|
"noIsolation",
|
|
29
30
|
"inert",
|
|
30
31
|
"allowPinchZoom",
|
|
@@ -38,6 +39,7 @@ var RemoveScroll = react.forwardRef(function(props, parentRef) {
|
|
|
38
39
|
sideCar: require_medium.effectCar,
|
|
39
40
|
removeScrollBar,
|
|
40
41
|
shards,
|
|
42
|
+
noRelative,
|
|
41
43
|
noIsolation,
|
|
42
44
|
inert,
|
|
43
45
|
setCallbacks,
|
|
@@ -15,7 +15,7 @@ var RemoveScroll = React$1.forwardRef(function(props, parentRef) {
|
|
|
15
15
|
onWheelCapture: nothing,
|
|
16
16
|
onTouchMoveCapture: nothing
|
|
17
17
|
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
18
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, [
|
|
18
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, [
|
|
19
19
|
"forwardProps",
|
|
20
20
|
"children",
|
|
21
21
|
"className",
|
|
@@ -23,6 +23,7 @@ var RemoveScroll = React$1.forwardRef(function(props, parentRef) {
|
|
|
23
23
|
"enabled",
|
|
24
24
|
"shards",
|
|
25
25
|
"sideCar",
|
|
26
|
+
"noRelative",
|
|
26
27
|
"noIsolation",
|
|
27
28
|
"inert",
|
|
28
29
|
"allowPinchZoom",
|
|
@@ -36,6 +37,7 @@ var RemoveScroll = React$1.forwardRef(function(props, parentRef) {
|
|
|
36
37
|
sideCar: effectCar,
|
|
37
38
|
removeScrollBar,
|
|
38
39
|
shards,
|
|
40
|
+
noRelative,
|
|
39
41
|
noIsolation,
|
|
40
42
|
inert,
|
|
41
43
|
setCallbacks,
|
|
@@ -3,6 +3,7 @@ var alwaysContainsScroll = function(node) {
|
|
|
3
3
|
return node.tagName === "TEXTAREA";
|
|
4
4
|
};
|
|
5
5
|
var elementCanBeScrolled = function(node, overflow) {
|
|
6
|
+
if (!(node instanceof Element)) return false;
|
|
6
7
|
var styles = window.getComputedStyle(node);
|
|
7
8
|
return styles[overflow] !== "hidden" && !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible");
|
|
8
9
|
};
|
|
@@ -63,6 +64,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
63
64
|
var availableScroll = 0;
|
|
64
65
|
var availableScrollTop = 0;
|
|
65
66
|
do {
|
|
67
|
+
if (!target) break;
|
|
66
68
|
var _a = getScrollVariables(axis, target), position = _a[0];
|
|
67
69
|
var elementScroll = _a[1] - _a[2] - directionFactor * position;
|
|
68
70
|
if (position || elementScroll) {
|
|
@@ -71,8 +73,8 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
71
73
|
availableScrollTop += position;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
var parent_1 = target.parentNode;
|
|
77
|
+
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
76
78
|
} while (!targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
77
79
|
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) shouldCancelScroll = true;
|
|
78
80
|
else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) shouldCancelScroll = true;
|
|
@@ -3,6 +3,7 @@ var alwaysContainsScroll = function(node) {
|
|
|
3
3
|
return node.tagName === "TEXTAREA";
|
|
4
4
|
};
|
|
5
5
|
var elementCanBeScrolled = function(node, overflow) {
|
|
6
|
+
if (!(node instanceof Element)) return false;
|
|
6
7
|
var styles = window.getComputedStyle(node);
|
|
7
8
|
return styles[overflow] !== "hidden" && !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible");
|
|
8
9
|
};
|
|
@@ -63,6 +64,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
63
64
|
var availableScroll = 0;
|
|
64
65
|
var availableScrollTop = 0;
|
|
65
66
|
do {
|
|
67
|
+
if (!target) break;
|
|
66
68
|
var _a = getScrollVariables(axis, target), position = _a[0];
|
|
67
69
|
var elementScroll = _a[1] - _a[2] - directionFactor * position;
|
|
68
70
|
if (position || elementScroll) {
|
|
@@ -71,8 +73,8 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
71
73
|
availableScrollTop += position;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
var parent_1 = target.parentNode;
|
|
77
|
+
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
76
78
|
} while (!targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
77
79
|
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) shouldCancelScroll = true;
|
|
78
80
|
else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) shouldCancelScroll = true;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_runtime = require("
|
|
1
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_index = require("../../react-slot/dist/index.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_runtime.__toESM(react, 1);
|
|
6
6
|
let react_dom = require("react-dom");
|
|
7
7
|
react_dom = require_runtime.__toESM(react_dom, 1);
|
|
8
|
-
//#region
|
|
8
|
+
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
9
9
|
var Primitive = [
|
|
10
10
|
"a",
|
|
11
11
|
"button",
|
|
@@ -20,13 +20,15 @@ var Primitive = [
|
|
|
20
20
|
"nav",
|
|
21
21
|
"ol",
|
|
22
22
|
"p",
|
|
23
|
+
"select",
|
|
23
24
|
"span",
|
|
24
25
|
"svg",
|
|
25
26
|
"ul"
|
|
26
27
|
].reduce((primitive, node) => {
|
|
28
|
+
const Slot = require_index.createSlot(`Primitive.${node}`);
|
|
27
29
|
const Node = react.forwardRef((props, forwardedRef) => {
|
|
28
30
|
const { asChild, ...primitiveProps } = props;
|
|
29
|
-
const Comp = asChild ?
|
|
31
|
+
const Comp = asChild ? Slot : node;
|
|
30
32
|
if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
|
|
31
33
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {
|
|
32
34
|
...primitiveProps,
|
|
@@ -2,7 +2,7 @@ import { createSlot } from "../../react-slot/dist/index.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
//#region
|
|
5
|
+
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
6
6
|
var Primitive = [
|
|
7
7
|
"a",
|
|
8
8
|
"button",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_index = require("../../../../../../node_modules/@radix-ui/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-slot/dist/index.mjs
|
|
7
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
8
|
+
var use = react[" use ".trim().toString()];
|
|
9
|
+
function isPromiseLike(value) {
|
|
10
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
11
|
+
}
|
|
12
|
+
function isLazyComponent(element) {
|
|
13
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
14
|
+
}
|
|
15
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
16
|
+
function createSlot(ownerName) {
|
|
17
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
18
|
+
const Slot2 = react.forwardRef((props, forwardedRef) => {
|
|
19
|
+
let { children, ...slotProps } = props;
|
|
20
|
+
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
21
|
+
const childrenArray = react.Children.toArray(children);
|
|
22
|
+
const slottable = childrenArray.find(isSlottable);
|
|
23
|
+
if (slottable) {
|
|
24
|
+
const newElement = slottable.props.children;
|
|
25
|
+
const newChildren = childrenArray.map((child) => {
|
|
26
|
+
if (child === slottable) {
|
|
27
|
+
if (react.Children.count(newElement) > 1) return react.Children.only(null);
|
|
28
|
+
return react.isValidElement(newElement) ? newElement.props.children : null;
|
|
29
|
+
} else return child;
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
|
|
32
|
+
...slotProps,
|
|
33
|
+
ref: forwardedRef,
|
|
34
|
+
children: react.isValidElement(newElement) ? react.cloneElement(newElement, void 0, newChildren) : null
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
|
|
38
|
+
...slotProps,
|
|
39
|
+
ref: forwardedRef,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
44
|
+
return Slot2;
|
|
45
|
+
}
|
|
46
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
47
|
+
function createSlotClone(ownerName) {
|
|
48
|
+
const SlotClone = react.forwardRef((props, forwardedRef) => {
|
|
49
|
+
let { children, ...slotProps } = props;
|
|
50
|
+
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
51
|
+
if (react.isValidElement(children)) {
|
|
52
|
+
const childrenRef = getElementRef(children);
|
|
53
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
54
|
+
if (children.type !== react.Fragment) props2.ref = forwardedRef ? require_index.composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
55
|
+
return react.cloneElement(children, props2);
|
|
56
|
+
}
|
|
57
|
+
return react.Children.count(children) > 1 ? react.Children.only(null) : null;
|
|
58
|
+
});
|
|
59
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
60
|
+
return SlotClone;
|
|
61
|
+
}
|
|
62
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
63
|
+
function isSlottable(child) {
|
|
64
|
+
return react.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
65
|
+
}
|
|
66
|
+
function mergeProps(slotProps, childProps) {
|
|
67
|
+
const overrideProps = { ...childProps };
|
|
68
|
+
for (const propName in childProps) {
|
|
69
|
+
const slotPropValue = slotProps[propName];
|
|
70
|
+
const childPropValue = childProps[propName];
|
|
71
|
+
if (/^on[A-Z]/.test(propName)) {
|
|
72
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
|
|
73
|
+
const result = childPropValue(...args);
|
|
74
|
+
slotPropValue(...args);
|
|
75
|
+
return result;
|
|
76
|
+
};
|
|
77
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
78
|
+
} else if (propName === "style") overrideProps[propName] = {
|
|
79
|
+
...slotPropValue,
|
|
80
|
+
...childPropValue
|
|
81
|
+
};
|
|
82
|
+
else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
...slotProps,
|
|
86
|
+
...overrideProps
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function getElementRef(element) {
|
|
90
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
91
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
92
|
+
if (mayWarn) return element.ref;
|
|
93
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
94
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
95
|
+
if (mayWarn) return element.props.ref;
|
|
96
|
+
return element.props.ref || element.ref;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
exports.createSlot = createSlot;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { composeRefs } from "
|
|
1
|
+
import { composeRefs } from "../../../../../../node_modules/@radix-ui/react-compose-refs/dist/index.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
-
//#region
|
|
4
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
5
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
6
|
+
var use = React$1[" use ".trim().toString()];
|
|
7
|
+
function isPromiseLike(value) {
|
|
8
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
9
|
+
}
|
|
10
|
+
function isLazyComponent(element) {
|
|
11
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
12
|
+
}
|
|
5
13
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6
14
|
function createSlot(ownerName) {
|
|
7
15
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
8
16
|
const Slot2 = React$1.forwardRef((props, forwardedRef) => {
|
|
9
|
-
|
|
17
|
+
let { children, ...slotProps } = props;
|
|
18
|
+
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
10
19
|
const childrenArray = React$1.Children.toArray(children);
|
|
11
20
|
const slottable = childrenArray.find(isSlottable);
|
|
12
21
|
if (slottable) {
|
|
@@ -35,7 +44,8 @@ function createSlot(ownerName) {
|
|
|
35
44
|
/* @__NO_SIDE_EFFECTS__ */
|
|
36
45
|
function createSlotClone(ownerName) {
|
|
37
46
|
const SlotClone = React$1.forwardRef((props, forwardedRef) => {
|
|
38
|
-
|
|
47
|
+
let { children, ...slotProps } = props;
|
|
48
|
+
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
39
49
|
if (React$1.isValidElement(children)) {
|
|
40
50
|
const childrenRef = getElementRef(children);
|
|
41
51
|
const props2 = mergeProps(slotProps, children.props);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_index = require("../../react-primitive/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-visually-hidden/dist/index.mjs
|
|
7
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
8
|
+
position: "absolute",
|
|
9
|
+
border: 0,
|
|
10
|
+
width: 1,
|
|
11
|
+
height: 1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
margin: -1,
|
|
14
|
+
overflow: "hidden",
|
|
15
|
+
clip: "rect(0, 0, 0, 0)",
|
|
16
|
+
whiteSpace: "nowrap",
|
|
17
|
+
wordWrap: "normal"
|
|
18
|
+
});
|
|
19
|
+
var NAME = "VisuallyHidden";
|
|
20
|
+
var VisuallyHidden = react.forwardRef((props, forwardedRef) => {
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.Primitive.span, {
|
|
22
|
+
...props,
|
|
23
|
+
ref: forwardedRef,
|
|
24
|
+
style: {
|
|
25
|
+
...VISUALLY_HIDDEN_STYLES,
|
|
26
|
+
...props.style
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
VisuallyHidden.displayName = NAME;
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.VisuallyHidden = VisuallyHidden;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Primitive } from "../../react-primitive/dist/index.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
//#region node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
5
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
6
|
+
position: "absolute",
|
|
7
|
+
border: 0,
|
|
8
|
+
width: 1,
|
|
9
|
+
height: 1,
|
|
10
|
+
padding: 0,
|
|
11
|
+
margin: -1,
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
clip: "rect(0, 0, 0, 0)",
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
wordWrap: "normal"
|
|
16
|
+
});
|
|
17
|
+
var NAME = "VisuallyHidden";
|
|
18
|
+
var VisuallyHidden = React$1.forwardRef((props, forwardedRef) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
20
|
+
...props,
|
|
21
|
+
ref: forwardedRef,
|
|
22
|
+
style: {
|
|
23
|
+
...VISUALLY_HIDDEN_STYLES,
|
|
24
|
+
...props.style
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
VisuallyHidden.displayName = NAME;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { VisuallyHidden };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_runtime = require("
|
|
3
|
-
const require_clsx = require("
|
|
2
|
+
const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_clsx = require("../../../../../node_modules/clsx/dist/clsx.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_runtime.__toESM(react, 1);
|
|
6
|
-
//#region
|
|
6
|
+
//#region node_modules/react-toastify/dist/react-toastify.esm.mjs
|
|
7
7
|
var c = (e) => "number" == typeof e && !isNaN(e), d = (e) => "string" == typeof e, u = (e) => "function" == typeof e, p = (e) => d(e) || u(e) ? e : null, m = (e) => (0, react.isValidElement)(e) || d(e) || u(e) || c(e);
|
|
8
8
|
function f(e, t, n) {
|
|
9
9
|
void 0 === n && (n = 300);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import clsx from "
|
|
2
|
+
import clsx from "../../../../../node_modules/clsx/dist/clsx.js";
|
|
3
3
|
import React, { cloneElement, isValidElement, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
4
|
-
//#region
|
|
4
|
+
//#region node_modules/react-toastify/dist/react-toastify.esm.mjs
|
|
5
5
|
var c = (e) => "number" == typeof e && !isNaN(e), d = (e) => "string" == typeof e, u = (e) => "function" == typeof e, p = (e) => d(e) || u(e) ? e : null, m = (e) => isValidElement(e) || d(e) || u(e) || c(e);
|
|
6
6
|
function f(e, t, n) {
|
|
7
7
|
void 0 === n && (n = 300);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redis-ui/components",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "47.
|
|
4
|
+
"version": "47.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"repository": "git@github.com:redislabsdev/redis-ui.git",
|
|
@@ -36,23 +36,27 @@
|
|
|
36
36
|
"styled-components": "^5.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@radix-ui/react-checkbox": "^1.
|
|
40
|
-
"@radix-ui/react-collapsible": "^1.
|
|
41
|
-
"@radix-ui/react-
|
|
42
|
-
"@radix-ui/react-
|
|
43
|
-
"@radix-ui/react-
|
|
44
|
-
"@radix-ui/react-
|
|
45
|
-
"@radix-ui/react-
|
|
46
|
-
"@radix-ui/react-
|
|
47
|
-
"@radix-ui/react-
|
|
39
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
40
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
41
|
+
"@radix-ui/react-compose-refs": "^1.1.2",
|
|
42
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
43
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
44
|
+
"@radix-ui/react-id": "^1.1.1",
|
|
45
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
46
|
+
"@radix-ui/react-popper": "^1.2.8",
|
|
47
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
48
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
49
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
48
50
|
"@radix-ui/react-slider": "^1.3.6",
|
|
49
|
-
"@radix-ui/react-switch": "^1.
|
|
50
|
-
"@radix-ui/react-tabs": "^1.
|
|
51
|
-
"@radix-ui/react-toggle": "^1.
|
|
52
|
-
"@radix-ui/react-tooltip": "^1.
|
|
51
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
52
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
53
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
54
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
|
+
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
56
|
+
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
53
57
|
"@react-hook/resize-observer": "^2.0.2",
|
|
58
|
+
"@tanstack/react-hotkeys": "^0.10.0",
|
|
54
59
|
"react-children-utilities": "2.9.0",
|
|
55
|
-
"react-hotkeys-hook": "^4.6.1",
|
|
56
60
|
"react-loading-skeleton": "^3.5.0",
|
|
57
61
|
"react-toastify": "10.0.4",
|
|
58
62
|
"type-fest": "^5.4.4",
|
package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
typeof window !== "undefined" && window.document && window.document.createElement;
|
|
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-slider/node_modules/@radix-ui/primitive/dist/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
typeof window !== "undefined" && window.document && window.document.createElement;
|
|
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,81 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
const require_index = require("../../react-compose-refs/dist/index.cjs");
|
|
4
|
-
const require_index$1 = require("../../react-context/dist/index.cjs");
|
|
5
|
-
const require_index$2 = require("../../react-slot/dist/index.cjs");
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let react = require("react");
|
|
8
|
-
react = require_runtime.__toESM(react, 1);
|
|
9
|
-
//#region ../../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
10
|
-
function createCollection(name) {
|
|
11
|
-
const PROVIDER_NAME = name + "CollectionProvider";
|
|
12
|
-
const [createCollectionContext, createCollectionScope] = require_index$1.createContextScope(PROVIDER_NAME);
|
|
13
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
14
|
-
collectionRef: { current: null },
|
|
15
|
-
itemMap: /* @__PURE__ */ new Map()
|
|
16
|
-
});
|
|
17
|
-
const CollectionProvider = (props) => {
|
|
18
|
-
const { scope, children } = props;
|
|
19
|
-
const ref = react.default.useRef(null);
|
|
20
|
-
const itemMap = react.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
21
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollectionProviderImpl, {
|
|
22
|
-
scope,
|
|
23
|
-
itemMap,
|
|
24
|
-
collectionRef: ref,
|
|
25
|
-
children
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
CollectionProvider.displayName = PROVIDER_NAME;
|
|
29
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
30
|
-
const CollectionSlotImpl = require_index$2.createSlot(COLLECTION_SLOT_NAME);
|
|
31
|
-
const CollectionSlot = react.default.forwardRef((props, forwardedRef) => {
|
|
32
|
-
const { scope, children } = props;
|
|
33
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollectionSlotImpl, {
|
|
34
|
-
ref: require_index.useComposedRefs(forwardedRef, useCollectionContext(COLLECTION_SLOT_NAME, scope).collectionRef),
|
|
35
|
-
children
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
39
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
40
|
-
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
41
|
-
const CollectionItemSlotImpl = require_index$2.createSlot(ITEM_SLOT_NAME);
|
|
42
|
-
const CollectionItemSlot = react.default.forwardRef((props, forwardedRef) => {
|
|
43
|
-
const { scope, children, ...itemData } = props;
|
|
44
|
-
const ref = react.default.useRef(null);
|
|
45
|
-
const composedRefs = require_index.useComposedRefs(forwardedRef, ref);
|
|
46
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
47
|
-
react.default.useEffect(() => {
|
|
48
|
-
context.itemMap.set(ref, {
|
|
49
|
-
ref,
|
|
50
|
-
...itemData
|
|
51
|
-
});
|
|
52
|
-
return () => void context.itemMap.delete(ref);
|
|
53
|
-
});
|
|
54
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollectionItemSlotImpl, {
|
|
55
|
-
[ITEM_DATA_ATTR]: "",
|
|
56
|
-
ref: composedRefs,
|
|
57
|
-
children
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
61
|
-
function useCollection(scope) {
|
|
62
|
-
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
63
|
-
return react.default.useCallback(() => {
|
|
64
|
-
const collectionNode = context.collectionRef.current;
|
|
65
|
-
if (!collectionNode) return [];
|
|
66
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
67
|
-
return Array.from(context.itemMap.values()).sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
|
|
68
|
-
}, [context.collectionRef, context.itemMap]);
|
|
69
|
-
}
|
|
70
|
-
return [
|
|
71
|
-
{
|
|
72
|
-
Provider: CollectionProvider,
|
|
73
|
-
Slot: CollectionSlot,
|
|
74
|
-
ItemSlot: CollectionItemSlot
|
|
75
|
-
},
|
|
76
|
-
useCollection,
|
|
77
|
-
createCollectionScope
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
//#endregion
|
|
81
|
-
exports.createCollection = createCollection;
|