@vritti/quantum-ui 0.3.3 → 0.3.4
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/Alert.js +1 -1
- package/dist/Avatar.js +4 -4
- package/dist/Badge2.js +2 -2
- package/dist/Breadcrumb.js +1 -1
- package/dist/Button2.js +2 -2
- package/dist/Checkbox2.js +6 -6
- package/dist/Combination.js +3 -3
- package/dist/DateTimePicker.js +2 -2
- package/dist/Dialog.js +1 -1
- package/dist/Label.js +1 -1
- package/dist/Progress.js +2 -2
- package/dist/RadioGroup.js +8 -8
- package/dist/Select.js +2 -2
- package/dist/SelectFilter.js +2 -2
- package/dist/Sidebar.js +3 -3
- package/dist/SingleSelect.js +1 -1
- package/dist/Sonner.js +1 -1
- package/dist/Switch.js +5 -5
- package/dist/TabsSkeleton.js +1 -1
- package/dist/Toggle.js +2 -2
- package/dist/assets/quantum-ui.css +286 -392
- package/dist/calendar2.js +1 -1
- package/dist/cells.js +2 -2
- package/dist/collapsible2.js +1 -1
- package/dist/components/FormattedDate.js +2 -2
- package/dist/components/RichTextEditor.js +1 -1
- package/dist/components/Select.js +4 -4
- package/dist/components/TreeView.js +7 -7
- package/dist/dropdown-menu.js +9 -9
- package/dist/field.js +1 -1
- package/dist/image-component.js +1 -1
- package/dist/index.js +4 -4
- package/dist/index10.js +1499 -102
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +37 -1499
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +476 -29
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +230 -426
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +1073 -214
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +14 -1139
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +20 -14
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +180 -25
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +201 -173
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +69 -203
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +211 -70
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +117 -207
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +71 -123
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +11 -74
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +1134 -13
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +2733 -1103
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +24 -2755
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +4 -32
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +37 -4
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +310 -36
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +7 -309
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +30 -8
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +59 -29
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +10 -59
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +35 -10
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +36810 -27
- package/dist/index35.js.map +1 -1
- package/dist/index4.js +136 -86
- package/dist/index4.js.map +1 -1
- package/dist/index5.js +315 -36745
- package/dist/index5.js.map +1 -1
- package/dist/index6.js +12 -141
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +82 -382
- package/dist/index7.js.map +1 -1
- package/dist/index8.js +42 -12
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +102 -42
- package/dist/index9.js.map +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/select2.js +1 -1
- package/dist/separator2.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/useTimer.js +1 -1
- package/dist/utils/axios.js +1 -1
- package/dist/utils/currency.js +2 -2
- package/dist/utils/format.js +2 -2
- package/dist/utils/money.js +1 -1
- package/dist/utils/timezone.js +1 -1
- package/package.json +1 -1
package/dist/index18.js
CHANGED
|
@@ -1,186 +1,214 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as useDirection } from './index23.js';
|
|
7
|
-
import { u as useId } from './index24.js';
|
|
8
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as ReactDOM from 'react-dom';
|
|
3
|
+
import { c as composeRefs } from './index11.js';
|
|
4
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { u as useLayoutEffect2 } from './index27.js';
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
7
|
+
// src/primitive.tsx
|
|
8
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9
|
+
return function handleEvent(event) {
|
|
10
|
+
originalEventHandler?.(event);
|
|
11
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
12
|
+
return ourEventHandler?.(event);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// src/slot.tsx
|
|
18
|
+
// @__NO_SIDE_EFFECTS__
|
|
19
|
+
function createSlot(ownerName) {
|
|
20
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
21
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
22
|
+
const { children, ...slotProps } = props;
|
|
23
|
+
const childrenArray = React.Children.toArray(children);
|
|
24
|
+
const slottable = childrenArray.find(isSlottable);
|
|
25
|
+
if (slottable) {
|
|
26
|
+
const newElement = slottable.props.children;
|
|
27
|
+
const newChildren = childrenArray.map((child) => {
|
|
28
|
+
if (child === slottable) {
|
|
29
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
30
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
31
|
+
} else {
|
|
32
|
+
return child;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
38
|
+
});
|
|
39
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
40
|
+
return Slot2;
|
|
41
|
+
}
|
|
42
|
+
// @__NO_SIDE_EFFECTS__
|
|
43
|
+
function createSlotClone(ownerName) {
|
|
44
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
45
|
+
const { children, ...slotProps } = props;
|
|
46
|
+
if (React.isValidElement(children)) {
|
|
47
|
+
const childrenRef = getElementRef(children);
|
|
48
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
49
|
+
if (children.type !== React.Fragment) {
|
|
50
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
54
51
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
52
|
+
return React.cloneElement(children, props2);
|
|
53
|
+
}
|
|
54
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
55
|
+
});
|
|
56
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
57
|
+
return SlotClone;
|
|
58
|
+
}
|
|
59
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
60
|
+
// @__NO_SIDE_EFFECTS__
|
|
61
|
+
function createSlottable(ownerName) {
|
|
62
|
+
const Slottable2 = ({ children }) => {
|
|
63
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
64
|
+
};
|
|
65
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
66
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
67
|
+
return Slottable2;
|
|
68
|
+
}
|
|
69
|
+
function isSlottable(child) {
|
|
70
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
71
|
+
}
|
|
72
|
+
function mergeProps(slotProps, childProps) {
|
|
73
|
+
const overrideProps = { ...childProps };
|
|
74
|
+
for (const propName in childProps) {
|
|
75
|
+
const slotPropValue = slotProps[propName];
|
|
76
|
+
const childPropValue = childProps[propName];
|
|
77
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
78
|
+
if (isHandler) {
|
|
79
|
+
if (slotPropValue && childPropValue) {
|
|
80
|
+
overrideProps[propName] = (...args) => {
|
|
81
|
+
const result = childPropValue(...args);
|
|
82
|
+
slotPropValue(...args);
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
} else if (slotPropValue) {
|
|
86
|
+
overrideProps[propName] = slotPropValue;
|
|
82
87
|
}
|
|
83
|
-
)
|
|
88
|
+
} else if (propName === "style") {
|
|
89
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
90
|
+
} else if (propName === "className") {
|
|
91
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
92
|
+
}
|
|
84
93
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return
|
|
97
|
-
Item,
|
|
98
|
-
{
|
|
99
|
-
asChild: true,
|
|
100
|
-
...rovingFocusGroupScope,
|
|
101
|
-
focusable: !disabled,
|
|
102
|
-
active: isSelected,
|
|
103
|
-
children: /* @__PURE__ */ jsx(
|
|
104
|
-
Primitive.button,
|
|
105
|
-
{
|
|
106
|
-
type: "button",
|
|
107
|
-
role: "tab",
|
|
108
|
-
"aria-selected": isSelected,
|
|
109
|
-
"aria-controls": contentId,
|
|
110
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
111
|
-
"data-disabled": disabled ? "" : void 0,
|
|
112
|
-
disabled,
|
|
113
|
-
id: triggerId,
|
|
114
|
-
...triggerProps,
|
|
115
|
-
ref: forwardedRef,
|
|
116
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
117
|
-
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
118
|
-
context.onValueChange(value);
|
|
119
|
-
} else {
|
|
120
|
-
event.preventDefault();
|
|
121
|
-
}
|
|
122
|
-
}),
|
|
123
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
124
|
-
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
|
|
125
|
-
}),
|
|
126
|
-
onFocus: composeEventHandlers(props.onFocus, () => {
|
|
127
|
-
const isAutomaticActivation = context.activationMode !== "manual";
|
|
128
|
-
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
129
|
-
context.onValueChange(value);
|
|
130
|
-
}
|
|
131
|
-
})
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
);
|
|
94
|
+
return { ...slotProps, ...overrideProps };
|
|
95
|
+
}
|
|
96
|
+
function getElementRef(element) {
|
|
97
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
98
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
99
|
+
if (mayWarn) {
|
|
100
|
+
return element.ref;
|
|
101
|
+
}
|
|
102
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
103
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
104
|
+
if (mayWarn) {
|
|
105
|
+
return element.props.ref;
|
|
136
106
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
107
|
+
return element.props.ref || element.ref;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/primitive.tsx
|
|
111
|
+
var NODES = [
|
|
112
|
+
"a",
|
|
113
|
+
"button",
|
|
114
|
+
"div",
|
|
115
|
+
"form",
|
|
116
|
+
"h2",
|
|
117
|
+
"h3",
|
|
118
|
+
"img",
|
|
119
|
+
"input",
|
|
120
|
+
"label",
|
|
121
|
+
"li",
|
|
122
|
+
"nav",
|
|
123
|
+
"ol",
|
|
124
|
+
"p",
|
|
125
|
+
"select",
|
|
126
|
+
"span",
|
|
127
|
+
"svg",
|
|
128
|
+
"ul"
|
|
129
|
+
];
|
|
130
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
131
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
132
|
+
const Node = React.forwardRef((props, forwardedRef) => {
|
|
133
|
+
const { asChild, ...primitiveProps } = props;
|
|
134
|
+
const Comp = asChild ? Slot : node;
|
|
135
|
+
if (typeof window !== "undefined") {
|
|
136
|
+
window[Symbol.for("radix-ui")] = true;
|
|
137
|
+
}
|
|
138
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
139
|
+
});
|
|
140
|
+
Node.displayName = `Primitive.${node}`;
|
|
141
|
+
return { ...primitive, [node]: Node };
|
|
142
|
+
}, {});
|
|
143
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
|
144
|
+
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/use-controllable-state.tsx
|
|
148
|
+
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
149
|
+
function useControllableState({
|
|
150
|
+
prop,
|
|
151
|
+
defaultProp,
|
|
152
|
+
onChange = () => {
|
|
153
|
+
},
|
|
154
|
+
caller
|
|
155
|
+
}) {
|
|
156
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
157
|
+
defaultProp,
|
|
158
|
+
onChange
|
|
159
|
+
});
|
|
160
|
+
const isControlled = prop !== void 0;
|
|
161
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
162
|
+
{
|
|
163
|
+
const isControlledRef = React.useRef(prop !== void 0);
|
|
148
164
|
React.useEffect(() => {
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"data-orientation": context.orientation,
|
|
157
|
-
role: "tabpanel",
|
|
158
|
-
"aria-labelledby": triggerId,
|
|
159
|
-
hidden: !present,
|
|
160
|
-
id: contentId,
|
|
161
|
-
tabIndex: 0,
|
|
162
|
-
...contentProps,
|
|
163
|
-
ref: forwardedRef,
|
|
164
|
-
style: {
|
|
165
|
-
...props.style,
|
|
166
|
-
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
|
|
167
|
-
},
|
|
168
|
-
children: present && children
|
|
165
|
+
const wasControlled = isControlledRef.current;
|
|
166
|
+
if (wasControlled !== isControlled) {
|
|
167
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
168
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
169
|
+
console.warn(
|
|
170
|
+
`${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.`
|
|
171
|
+
);
|
|
169
172
|
}
|
|
170
|
-
|
|
173
|
+
isControlledRef.current = isControlled;
|
|
174
|
+
}, [isControlled, caller]);
|
|
171
175
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
const setValue = React.useCallback(
|
|
177
|
+
(nextValue) => {
|
|
178
|
+
if (isControlled) {
|
|
179
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
180
|
+
if (value2 !== prop) {
|
|
181
|
+
onChangeRef.current?.(value2);
|
|
182
|
+
}
|
|
183
|
+
} else {
|
|
184
|
+
setUncontrolledProp(nextValue);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
188
|
+
);
|
|
189
|
+
return [value, setValue];
|
|
190
|
+
}
|
|
191
|
+
function useUncontrolledState({
|
|
192
|
+
defaultProp,
|
|
193
|
+
onChange
|
|
194
|
+
}) {
|
|
195
|
+
const [value, setValue] = React.useState(defaultProp);
|
|
196
|
+
const prevValueRef = React.useRef(value);
|
|
197
|
+
const onChangeRef = React.useRef(onChange);
|
|
198
|
+
useInsertionEffect(() => {
|
|
199
|
+
onChangeRef.current = onChange;
|
|
200
|
+
}, [onChange]);
|
|
201
|
+
React.useEffect(() => {
|
|
202
|
+
if (prevValueRef.current !== value) {
|
|
203
|
+
onChangeRef.current?.(value);
|
|
204
|
+
prevValueRef.current = value;
|
|
205
|
+
}
|
|
206
|
+
}, [value, prevValueRef]);
|
|
207
|
+
return [value, setValue, onChangeRef];
|
|
176
208
|
}
|
|
177
|
-
function
|
|
178
|
-
return
|
|
209
|
+
function isFunction(value) {
|
|
210
|
+
return typeof value === "function";
|
|
179
211
|
}
|
|
180
|
-
var Root2 = Tabs;
|
|
181
|
-
var List = TabsList;
|
|
182
|
-
var Trigger = TabsTrigger;
|
|
183
|
-
var Content = TabsContent;
|
|
184
212
|
|
|
185
|
-
export {
|
|
213
|
+
export { Primitive as P, createSlottable as a, createSlot as b, composeEventHandlers as c, dispatchDiscreteCustomEvent as d, useControllableState as u };
|
|
186
214
|
//# sourceMappingURL=index18.js.map
|
package/dist/index18.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index18.js","sources":["../node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_e008f0e4fc672c31835825b04751cf55/node_modules/@radix-ui/react-tabs/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["RovingFocusGroup.Root","RovingFocusGroup.Item"],"mappings":";;;;;;;;;AAcA,IAAI,SAAS,GAAG,MAAM;AACtB,IAAI,CAAC,iBAAkC,CAAC,GAAG,kBAAkB,CAAC,SAAS,EAAE;AACzE,EAAE;AACF,CAAC,CAAC;AACF,IAAI,wBAAwB,GAAG,2BAA2B,EAAE;AAC5D,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACjE,IAAI,IAAI,GAAG,KAAK,CAAC,UAAU;AAC3B,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM;AACV,MAAM,WAAW;AACjB,MAAM,KAAK,EAAE,SAAS;AACtB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,WAAW,GAAG,YAAY;AAChC,MAAM,GAAG;AACT,MAAM,cAAc,GAAG,WAAW;AAClC,MAAM,GAAG;AACT,KAAK,GAAG,KAAK;AACb,IAAI,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC;AACvC,IAAI,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,oBAAoB,CAAC;AACnD,MAAM,IAAI,EAAE,SAAS;AACrB,MAAM,QAAQ,EAAE,aAAa;AAC7B,MAAM,WAAW,EAAE,YAAY,IAAI,EAAE;AACrC,MAAM,MAAM,EAAE;AACd,KAAK,CAAC;AACN,IAAI,uBAAuB,GAAG;AAC9B,MAAM,YAAY;AAClB,MAAM;AACN,QAAQ,KAAK,EAA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AACF,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,YAAY;AACtC,SAAS,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACrC;AACA,SAAS,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACrC;AACG,IAAC,KAAK,GAAG;AACT,IAAC,IAAI,GAAG;AACR,IAAC,OAAO,GAAG;AACX,IAAC,OAAO,GAAG;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index18.js","sources":["../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_412fca877c3e29a339aeb07f39bb1abf/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${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.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Fragment2","useLayoutEffect"],"mappings":";;;;;;AAAA;AAEA,SAAS,oBAAoB,CAAC,oBAAoB,EAAE,eAAe,EAAE,EAAE,wBAAwB,GAAG,IAAI,EAAE,GAAG,EAAE,EAAE;AAC/G,EAAE,OAAO,SAAS,WAAW,CAAC,KAAK,EAAE;AACrC,IAAI,oBAAoB,GAAG,KAAK,CAAC;AACjC,IAAI,IAAI,wBAAwB,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;AACvE,MAAM,OAAO,eAAe,GAAG,KAAK,CAAC;AACrC,IAAI;AACJ,EAAE,CAAC;AACH;;ACTA;AAIA;AACA,SAAS,U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