@addsign/moje-agenda-shared-lib 1.0.60 → 2.0.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/Dialog-DZMfjbGC.js +421 -0
- package/dist/Dialog-DZMfjbGC.js.map +1 -0
- package/dist/assets/style.css +4369 -0
- package/dist/assets/tailwind.css +1365 -1193
- package/dist/check-B7dJm08z.js +12 -0
- package/dist/check-B7dJm08z.js.map +1 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/datatable/DataTable.js +6 -2
- package/dist/components/datatable/DataTable.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +6 -2
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBar.js +6 -2
- package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBarServer.js +6 -2
- package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
- package/dist/components/form/FileInput.js +7 -3
- package/dist/components/form/FileInput.js.map +1 -1
- package/dist/components/form/FileInputMultiple.js +7 -3
- package/dist/components/form/FileInputMultiple.js.map +1 -1
- package/dist/components/form/FormField.js +6 -2
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/PositionsSelectorSingle.js +6 -2
- package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
- package/dist/components/form/SelectField.js +6 -2
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/profiles/ProfileOverview.js +6 -2
- package/dist/components/profiles/ProfileOverview.js.map +1 -1
- package/dist/components/ui/Combobox.d.ts +1 -0
- package/dist/components/ui/Combobox.js +138 -0
- package/dist/components/ui/Combobox.js.map +1 -0
- package/dist/components/ui/DateTimePicker.js +19 -5
- package/dist/components/ui/DateTimePicker.js.map +1 -1
- package/dist/components/ui/Dialog.js +15 -413
- package/dist/components/ui/Dialog.js.map +1 -1
- package/dist/components/ui/ScrollArea.js +2 -1
- package/dist/components/ui/ScrollArea.js.map +1 -1
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/command.js +643 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/datepicker.js +14 -1
- package/dist/components/ui/datepicker.js.map +1 -1
- package/dist/components/ui/popover.js +3 -2
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/radioGroup.d.ts +5 -0
- package/dist/components/ui/radioGroup.js +586 -0
- package/dist/components/ui/radioGroup.js.map +1 -0
- package/dist/components/ui/select.js +9 -144
- package/dist/components/ui/select.js.map +1 -1
- package/dist/index-BXrwe-_7.js +1395 -0
- package/dist/index-BXrwe-_7.js.map +1 -0
- package/dist/index-Bk8dRTPE.js +11 -0
- package/dist/index-Bk8dRTPE.js.map +1 -0
- package/dist/index-BlzC-wss.js +140 -0
- package/dist/index-BlzC-wss.js.map +1 -0
- package/dist/index-Bp9GiUkg.js +2266 -0
- package/dist/index-Bp9GiUkg.js.map +1 -0
- package/dist/index-BzVVosDl.js +57 -0
- package/dist/index-BzVVosDl.js.map +1 -0
- package/dist/index-CbAQSs_C.js +40 -0
- package/dist/index-CbAQSs_C.js.map +1 -0
- package/dist/index-Dz_fWpFA.js +2203 -0
- package/dist/index-Dz_fWpFA.js.map +1 -0
- package/dist/index-IXOTxK3N.js +7 -0
- package/dist/index-IXOTxK3N.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +29 -12
- package/dist/main.js.map +1 -1
- package/dist/parse-D2yb8751.js +1727 -0
- package/dist/parse-D2yb8751.js.map +1 -0
- package/dist/tailwind-l0sNRNKZ.js +2 -0
- package/dist/tailwind-l0sNRNKZ.js.map +1 -0
- package/lib/components/Button.tsx +57 -0
- package/lib/components/Calendar.tsx +242 -0
- package/lib/components/ConfirmationModalDialog.tsx +115 -0
- package/lib/components/Modal.tsx +73 -0
- package/lib/components/ModalDialog.tsx +63 -0
- package/lib/components/Spinner.tsx +25 -0
- package/lib/components/SpinnerIcon.tsx +12 -0
- package/lib/components/datatable/DataTable.tsx +442 -0
- package/lib/components/datatable/DataTableServer.tsx +939 -0
- package/lib/components/datatable/DatatableSettings.tsx +48 -0
- package/lib/components/datatable/Resizable.tsx +99 -0
- package/lib/components/datatable/types.ts +33 -0
- package/lib/components/form/AutocompleteSearchBar.tsx +424 -0
- package/lib/components/form/AutocompleteSearchBarServer.tsx +257 -0
- package/lib/components/form/DateField.tsx +124 -0
- package/lib/components/form/DateRangeField.tsx +116 -0
- package/lib/components/form/FileInput.tsx +188 -0
- package/lib/components/form/FileInputMultiple.tsx +186 -0
- package/lib/components/form/FormField.tsx +371 -0
- package/lib/components/form/InputField.tsx +230 -0
- package/lib/components/form/PositionsSelectorSingle.tsx +266 -0
- package/lib/components/form/RadioGroup.tsx +64 -0
- package/lib/components/form/SelectField.tsx +267 -0
- package/lib/components/layout/IconInCircle.tsx +29 -0
- package/lib/components/layout/PageTitle.tsx +19 -0
- package/lib/components/layout/SectionTitle.tsx +22 -0
- package/lib/components/profiles/ProfileOverview.tsx +212 -0
- package/lib/components/ui/Calendar.tsx +68 -0
- package/lib/components/ui/Combobox.tsx +122 -0
- package/lib/components/ui/DatePicker.tsx +124 -0
- package/lib/components/ui/DateTimePicker.tsx +187 -0
- package/lib/components/ui/Dialog.tsx +118 -0
- package/lib/components/ui/ScrollArea.tsx +45 -0
- package/lib/components/ui/button.tsx +56 -0
- package/lib/components/ui/command.tsx +153 -0
- package/lib/components/ui/form.tsx +177 -0
- package/lib/components/ui/input.tsx +22 -0
- package/lib/components/ui/label.tsx +24 -0
- package/lib/components/ui/popover.tsx +31 -0
- package/lib/components/ui/radioGroup.tsx +44 -0
- package/lib/components/ui/select.tsx +158 -0
- package/lib/contexts/FederationContext.tsx +28 -0
- package/lib/contexts/useFederationContext.ts +4 -0
- package/lib/css/tailwind.css +10 -0
- package/lib/fonts/arial.ts +3 -0
- package/lib/fonts/arialBold.ts +4 -0
- package/lib/main.ts +64 -0
- package/lib/types.ts +492 -0
- package/lib/utils/PdfManager.ts +224 -0
- package/lib/utils/getFullName.tsx +83 -0
- package/lib/utils/getIntersectingDays.ts +28 -0
- package/lib/utils/handleErrors.ts +28 -0
- package/lib/utils/hasRightInModule.ts +17 -0
- package/lib/utils/hasRole.ts +12 -0
- package/lib/utils/utils.ts +6 -0
- package/lib/vite-env.d.ts +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { d as useCallbackRef, a as composeEventHandlers, c as createContextScope$1 } from "../../index-BpHbTxNe.js";
|
|
4
|
+
import { u as useComposedRefs } from "../../index-CS99lEeB.js";
|
|
5
|
+
import { P as Primitive } from "../../index-DvR8HKPa.js";
|
|
6
|
+
import { c as createCollection, u as usePrevious } from "../../index-BlzC-wss.js";
|
|
7
|
+
import { u as useControllableState, a as useId } from "../../index-BzVVosDl.js";
|
|
8
|
+
import { u as useDirection } from "../../index-Bk8dRTPE.js";
|
|
9
|
+
import { u as useSize } from "../../index-CbAQSs_C.js";
|
|
10
|
+
import { P as Presence } from "../../index-D0ipc4Xc.js";
|
|
11
|
+
import { cn } from "../../utils/utils.js";
|
|
12
|
+
import { c as createLucideIcon } from "../../createLucideIcon-KSoQd4Wi.js";
|
|
13
|
+
/**
|
|
14
|
+
* @license lucide-react v0.456.0 - ISC
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the ISC license.
|
|
17
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
const Circle = createLucideIcon("Circle", [
|
|
20
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
21
|
+
]);
|
|
22
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
23
|
+
let defaultContexts = [];
|
|
24
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
25
|
+
const BaseContext = React.createContext(defaultContext);
|
|
26
|
+
const index = defaultContexts.length;
|
|
27
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
28
|
+
function Provider(props) {
|
|
29
|
+
const { scope, children, ...context } = props;
|
|
30
|
+
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
31
|
+
const value = React.useMemo(() => context, Object.values(context));
|
|
32
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
33
|
+
}
|
|
34
|
+
function useContext2(consumerName, scope) {
|
|
35
|
+
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
36
|
+
const context = React.useContext(Context);
|
|
37
|
+
if (context)
|
|
38
|
+
return context;
|
|
39
|
+
if (defaultContext !== void 0)
|
|
40
|
+
return defaultContext;
|
|
41
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
42
|
+
}
|
|
43
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
44
|
+
return [Provider, useContext2];
|
|
45
|
+
}
|
|
46
|
+
const createScope = () => {
|
|
47
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
48
|
+
return React.createContext(defaultContext);
|
|
49
|
+
});
|
|
50
|
+
return function useScope(scope) {
|
|
51
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
52
|
+
return React.useMemo(
|
|
53
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
54
|
+
[scope, contexts]
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
createScope.scopeName = scopeName;
|
|
59
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
60
|
+
}
|
|
61
|
+
function composeContextScopes(...scopes) {
|
|
62
|
+
const baseScope = scopes[0];
|
|
63
|
+
if (scopes.length === 1)
|
|
64
|
+
return baseScope;
|
|
65
|
+
const createScope = () => {
|
|
66
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
67
|
+
useScope: createScope2(),
|
|
68
|
+
scopeName: createScope2.scopeName
|
|
69
|
+
}));
|
|
70
|
+
return function useComposedScopes(overrideScopes) {
|
|
71
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
72
|
+
const scopeProps = useScope(overrideScopes);
|
|
73
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
74
|
+
return { ...nextScopes2, ...currentScope };
|
|
75
|
+
}, {});
|
|
76
|
+
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
createScope.scopeName = baseScope.scopeName;
|
|
80
|
+
return createScope;
|
|
81
|
+
}
|
|
82
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
83
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
84
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
85
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
86
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
87
|
+
GROUP_NAME,
|
|
88
|
+
[createCollectionScope]
|
|
89
|
+
);
|
|
90
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
91
|
+
var RovingFocusGroup = React.forwardRef(
|
|
92
|
+
(props, forwardedRef) => {
|
|
93
|
+
return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
RovingFocusGroup.displayName = GROUP_NAME;
|
|
97
|
+
var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
98
|
+
const {
|
|
99
|
+
__scopeRovingFocusGroup,
|
|
100
|
+
orientation,
|
|
101
|
+
loop = false,
|
|
102
|
+
dir,
|
|
103
|
+
currentTabStopId: currentTabStopIdProp,
|
|
104
|
+
defaultCurrentTabStopId,
|
|
105
|
+
onCurrentTabStopIdChange,
|
|
106
|
+
onEntryFocus,
|
|
107
|
+
preventScrollOnEntryFocus = false,
|
|
108
|
+
...groupProps
|
|
109
|
+
} = props;
|
|
110
|
+
const ref = React.useRef(null);
|
|
111
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
112
|
+
const direction = useDirection(dir);
|
|
113
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
114
|
+
prop: currentTabStopIdProp,
|
|
115
|
+
defaultProp: defaultCurrentTabStopId,
|
|
116
|
+
onChange: onCurrentTabStopIdChange
|
|
117
|
+
});
|
|
118
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
|
|
119
|
+
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
120
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
121
|
+
const isClickFocusRef = React.useRef(false);
|
|
122
|
+
const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
|
|
123
|
+
React.useEffect(() => {
|
|
124
|
+
const node = ref.current;
|
|
125
|
+
if (node) {
|
|
126
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
127
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
128
|
+
}
|
|
129
|
+
}, [handleEntryFocus]);
|
|
130
|
+
return /* @__PURE__ */ jsx(
|
|
131
|
+
RovingFocusProvider,
|
|
132
|
+
{
|
|
133
|
+
scope: __scopeRovingFocusGroup,
|
|
134
|
+
orientation,
|
|
135
|
+
dir: direction,
|
|
136
|
+
loop,
|
|
137
|
+
currentTabStopId,
|
|
138
|
+
onItemFocus: React.useCallback(
|
|
139
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
140
|
+
[setCurrentTabStopId]
|
|
141
|
+
),
|
|
142
|
+
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
|
|
143
|
+
onFocusableItemAdd: React.useCallback(
|
|
144
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
145
|
+
[]
|
|
146
|
+
),
|
|
147
|
+
onFocusableItemRemove: React.useCallback(
|
|
148
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
149
|
+
[]
|
|
150
|
+
),
|
|
151
|
+
children: /* @__PURE__ */ jsx(
|
|
152
|
+
Primitive.div,
|
|
153
|
+
{
|
|
154
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
155
|
+
"data-orientation": orientation,
|
|
156
|
+
...groupProps,
|
|
157
|
+
ref: composedRefs,
|
|
158
|
+
style: { outline: "none", ...props.style },
|
|
159
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
160
|
+
isClickFocusRef.current = true;
|
|
161
|
+
}),
|
|
162
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
163
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
164
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
165
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
166
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
167
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
168
|
+
const items = getItems().filter((item) => item.focusable);
|
|
169
|
+
const activeItem = items.find((item) => item.active);
|
|
170
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
171
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
172
|
+
Boolean
|
|
173
|
+
);
|
|
174
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
175
|
+
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
isClickFocusRef.current = false;
|
|
179
|
+
}),
|
|
180
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
});
|
|
186
|
+
var ITEM_NAME$1 = "RovingFocusGroupItem";
|
|
187
|
+
var RovingFocusGroupItem = React.forwardRef(
|
|
188
|
+
(props, forwardedRef) => {
|
|
189
|
+
const {
|
|
190
|
+
__scopeRovingFocusGroup,
|
|
191
|
+
focusable = true,
|
|
192
|
+
active = false,
|
|
193
|
+
tabStopId,
|
|
194
|
+
...itemProps
|
|
195
|
+
} = props;
|
|
196
|
+
const autoId = useId();
|
|
197
|
+
const id = tabStopId || autoId;
|
|
198
|
+
const context = useRovingFocusContext(ITEM_NAME$1, __scopeRovingFocusGroup);
|
|
199
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
200
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
201
|
+
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
202
|
+
React.useEffect(() => {
|
|
203
|
+
if (focusable) {
|
|
204
|
+
onFocusableItemAdd();
|
|
205
|
+
return () => onFocusableItemRemove();
|
|
206
|
+
}
|
|
207
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
208
|
+
return /* @__PURE__ */ jsx(
|
|
209
|
+
Collection.ItemSlot,
|
|
210
|
+
{
|
|
211
|
+
scope: __scopeRovingFocusGroup,
|
|
212
|
+
id,
|
|
213
|
+
focusable,
|
|
214
|
+
active,
|
|
215
|
+
children: /* @__PURE__ */ jsx(
|
|
216
|
+
Primitive.span,
|
|
217
|
+
{
|
|
218
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
219
|
+
"data-orientation": context.orientation,
|
|
220
|
+
...itemProps,
|
|
221
|
+
ref: forwardedRef,
|
|
222
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
223
|
+
if (!focusable)
|
|
224
|
+
event.preventDefault();
|
|
225
|
+
else
|
|
226
|
+
context.onItemFocus(id);
|
|
227
|
+
}),
|
|
228
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
229
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
230
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
231
|
+
context.onItemShiftTab();
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (event.target !== event.currentTarget)
|
|
235
|
+
return;
|
|
236
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
237
|
+
if (focusIntent !== void 0) {
|
|
238
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)
|
|
239
|
+
return;
|
|
240
|
+
event.preventDefault();
|
|
241
|
+
const items = getItems().filter((item) => item.focusable);
|
|
242
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
243
|
+
if (focusIntent === "last")
|
|
244
|
+
candidateNodes.reverse();
|
|
245
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
246
|
+
if (focusIntent === "prev")
|
|
247
|
+
candidateNodes.reverse();
|
|
248
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
249
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
250
|
+
}
|
|
251
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
RovingFocusGroupItem.displayName = ITEM_NAME$1;
|
|
261
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
262
|
+
ArrowLeft: "prev",
|
|
263
|
+
ArrowUp: "prev",
|
|
264
|
+
ArrowRight: "next",
|
|
265
|
+
ArrowDown: "next",
|
|
266
|
+
PageUp: "first",
|
|
267
|
+
Home: "first",
|
|
268
|
+
PageDown: "last",
|
|
269
|
+
End: "last"
|
|
270
|
+
};
|
|
271
|
+
function getDirectionAwareKey(key, dir) {
|
|
272
|
+
if (dir !== "rtl")
|
|
273
|
+
return key;
|
|
274
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
275
|
+
}
|
|
276
|
+
function getFocusIntent(event, orientation, dir) {
|
|
277
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
278
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key))
|
|
279
|
+
return void 0;
|
|
280
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key))
|
|
281
|
+
return void 0;
|
|
282
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
283
|
+
}
|
|
284
|
+
function focusFirst(candidates, preventScroll = false) {
|
|
285
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
286
|
+
for (const candidate of candidates) {
|
|
287
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)
|
|
288
|
+
return;
|
|
289
|
+
candidate.focus({ preventScroll });
|
|
290
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function wrapArray(array, startIndex) {
|
|
295
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
296
|
+
}
|
|
297
|
+
var Root = RovingFocusGroup;
|
|
298
|
+
var Item = RovingFocusGroupItem;
|
|
299
|
+
var RADIO_NAME = "Radio";
|
|
300
|
+
var [createRadioContext, createRadioScope] = createContextScope$1(RADIO_NAME);
|
|
301
|
+
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
302
|
+
var Radio = React.forwardRef(
|
|
303
|
+
(props, forwardedRef) => {
|
|
304
|
+
const {
|
|
305
|
+
__scopeRadio,
|
|
306
|
+
name,
|
|
307
|
+
checked = false,
|
|
308
|
+
required,
|
|
309
|
+
disabled,
|
|
310
|
+
value = "on",
|
|
311
|
+
onCheck,
|
|
312
|
+
form,
|
|
313
|
+
...radioProps
|
|
314
|
+
} = props;
|
|
315
|
+
const [button, setButton] = React.useState(null);
|
|
316
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
317
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
318
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
319
|
+
return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
|
320
|
+
/* @__PURE__ */ jsx(
|
|
321
|
+
Primitive.button,
|
|
322
|
+
{
|
|
323
|
+
type: "button",
|
|
324
|
+
role: "radio",
|
|
325
|
+
"aria-checked": checked,
|
|
326
|
+
"data-state": getState(checked),
|
|
327
|
+
"data-disabled": disabled ? "" : void 0,
|
|
328
|
+
disabled,
|
|
329
|
+
value,
|
|
330
|
+
...radioProps,
|
|
331
|
+
ref: composedRefs,
|
|
332
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
333
|
+
if (!checked)
|
|
334
|
+
onCheck == null ? void 0 : onCheck();
|
|
335
|
+
if (isFormControl) {
|
|
336
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
337
|
+
if (!hasConsumerStoppedPropagationRef.current)
|
|
338
|
+
event.stopPropagation();
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
isFormControl && /* @__PURE__ */ jsx(
|
|
344
|
+
BubbleInput,
|
|
345
|
+
{
|
|
346
|
+
control: button,
|
|
347
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
348
|
+
name,
|
|
349
|
+
value,
|
|
350
|
+
checked,
|
|
351
|
+
required,
|
|
352
|
+
disabled,
|
|
353
|
+
form,
|
|
354
|
+
style: { transform: "translateX(-100%)" }
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] });
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
Radio.displayName = RADIO_NAME;
|
|
361
|
+
var INDICATOR_NAME = "RadioIndicator";
|
|
362
|
+
var RadioIndicator = React.forwardRef(
|
|
363
|
+
(props, forwardedRef) => {
|
|
364
|
+
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
365
|
+
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
366
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(
|
|
367
|
+
Primitive.span,
|
|
368
|
+
{
|
|
369
|
+
"data-state": getState(context.checked),
|
|
370
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
371
|
+
...indicatorProps,
|
|
372
|
+
ref: forwardedRef
|
|
373
|
+
}
|
|
374
|
+
) });
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
RadioIndicator.displayName = INDICATOR_NAME;
|
|
378
|
+
var BubbleInput = (props) => {
|
|
379
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
380
|
+
const ref = React.useRef(null);
|
|
381
|
+
const prevChecked = usePrevious(checked);
|
|
382
|
+
const controlSize = useSize(control);
|
|
383
|
+
React.useEffect(() => {
|
|
384
|
+
const input = ref.current;
|
|
385
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
386
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
387
|
+
const setChecked = descriptor.set;
|
|
388
|
+
if (prevChecked !== checked && setChecked) {
|
|
389
|
+
const event = new Event("click", { bubbles });
|
|
390
|
+
setChecked.call(input, checked);
|
|
391
|
+
input.dispatchEvent(event);
|
|
392
|
+
}
|
|
393
|
+
}, [prevChecked, checked, bubbles]);
|
|
394
|
+
return /* @__PURE__ */ jsx(
|
|
395
|
+
"input",
|
|
396
|
+
{
|
|
397
|
+
type: "radio",
|
|
398
|
+
"aria-hidden": true,
|
|
399
|
+
defaultChecked: checked,
|
|
400
|
+
...inputProps,
|
|
401
|
+
tabIndex: -1,
|
|
402
|
+
ref,
|
|
403
|
+
style: {
|
|
404
|
+
...props.style,
|
|
405
|
+
...controlSize,
|
|
406
|
+
position: "absolute",
|
|
407
|
+
pointerEvents: "none",
|
|
408
|
+
opacity: 0,
|
|
409
|
+
margin: 0
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
};
|
|
414
|
+
function getState(checked) {
|
|
415
|
+
return checked ? "checked" : "unchecked";
|
|
416
|
+
}
|
|
417
|
+
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
418
|
+
var RADIO_GROUP_NAME = "RadioGroup";
|
|
419
|
+
var [createRadioGroupContext, createRadioGroupScope] = createContextScope$1(RADIO_GROUP_NAME, [
|
|
420
|
+
createRovingFocusGroupScope,
|
|
421
|
+
createRadioScope
|
|
422
|
+
]);
|
|
423
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
424
|
+
var useRadioScope = createRadioScope();
|
|
425
|
+
var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
|
|
426
|
+
var RadioGroup$1 = React.forwardRef(
|
|
427
|
+
(props, forwardedRef) => {
|
|
428
|
+
const {
|
|
429
|
+
__scopeRadioGroup,
|
|
430
|
+
name,
|
|
431
|
+
defaultValue,
|
|
432
|
+
value: valueProp,
|
|
433
|
+
required = false,
|
|
434
|
+
disabled = false,
|
|
435
|
+
orientation,
|
|
436
|
+
dir,
|
|
437
|
+
loop = true,
|
|
438
|
+
onValueChange,
|
|
439
|
+
...groupProps
|
|
440
|
+
} = props;
|
|
441
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
442
|
+
const direction = useDirection(dir);
|
|
443
|
+
const [value, setValue] = useControllableState({
|
|
444
|
+
prop: valueProp,
|
|
445
|
+
defaultProp: defaultValue,
|
|
446
|
+
onChange: onValueChange
|
|
447
|
+
});
|
|
448
|
+
return /* @__PURE__ */ jsx(
|
|
449
|
+
RadioGroupProvider,
|
|
450
|
+
{
|
|
451
|
+
scope: __scopeRadioGroup,
|
|
452
|
+
name,
|
|
453
|
+
required,
|
|
454
|
+
disabled,
|
|
455
|
+
value,
|
|
456
|
+
onValueChange: setValue,
|
|
457
|
+
children: /* @__PURE__ */ jsx(
|
|
458
|
+
Root,
|
|
459
|
+
{
|
|
460
|
+
asChild: true,
|
|
461
|
+
...rovingFocusGroupScope,
|
|
462
|
+
orientation,
|
|
463
|
+
dir: direction,
|
|
464
|
+
loop,
|
|
465
|
+
children: /* @__PURE__ */ jsx(
|
|
466
|
+
Primitive.div,
|
|
467
|
+
{
|
|
468
|
+
role: "radiogroup",
|
|
469
|
+
"aria-required": required,
|
|
470
|
+
"aria-orientation": orientation,
|
|
471
|
+
"data-disabled": disabled ? "" : void 0,
|
|
472
|
+
dir: direction,
|
|
473
|
+
...groupProps,
|
|
474
|
+
ref: forwardedRef
|
|
475
|
+
}
|
|
476
|
+
)
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
RadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
484
|
+
var ITEM_NAME = "RadioGroupItem";
|
|
485
|
+
var RadioGroupItem$1 = React.forwardRef(
|
|
486
|
+
(props, forwardedRef) => {
|
|
487
|
+
const { __scopeRadioGroup, disabled, ...itemProps } = props;
|
|
488
|
+
const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
|
|
489
|
+
const isDisabled = context.disabled || disabled;
|
|
490
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
491
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
492
|
+
const ref = React.useRef(null);
|
|
493
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
494
|
+
const checked = context.value === itemProps.value;
|
|
495
|
+
const isArrowKeyPressedRef = React.useRef(false);
|
|
496
|
+
React.useEffect(() => {
|
|
497
|
+
const handleKeyDown = (event) => {
|
|
498
|
+
if (ARROW_KEYS.includes(event.key)) {
|
|
499
|
+
isArrowKeyPressedRef.current = true;
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
const handleKeyUp = () => isArrowKeyPressedRef.current = false;
|
|
503
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
504
|
+
document.addEventListener("keyup", handleKeyUp);
|
|
505
|
+
return () => {
|
|
506
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
507
|
+
document.removeEventListener("keyup", handleKeyUp);
|
|
508
|
+
};
|
|
509
|
+
}, []);
|
|
510
|
+
return /* @__PURE__ */ jsx(
|
|
511
|
+
Item,
|
|
512
|
+
{
|
|
513
|
+
asChild: true,
|
|
514
|
+
...rovingFocusGroupScope,
|
|
515
|
+
focusable: !isDisabled,
|
|
516
|
+
active: checked,
|
|
517
|
+
children: /* @__PURE__ */ jsx(
|
|
518
|
+
Radio,
|
|
519
|
+
{
|
|
520
|
+
disabled: isDisabled,
|
|
521
|
+
required: context.required,
|
|
522
|
+
checked,
|
|
523
|
+
...radioScope,
|
|
524
|
+
...itemProps,
|
|
525
|
+
name: context.name,
|
|
526
|
+
ref: composedRefs,
|
|
527
|
+
onCheck: () => context.onValueChange(itemProps.value),
|
|
528
|
+
onKeyDown: composeEventHandlers((event) => {
|
|
529
|
+
if (event.key === "Enter")
|
|
530
|
+
event.preventDefault();
|
|
531
|
+
}),
|
|
532
|
+
onFocus: composeEventHandlers(itemProps.onFocus, () => {
|
|
533
|
+
var _a;
|
|
534
|
+
if (isArrowKeyPressedRef.current)
|
|
535
|
+
(_a = ref.current) == null ? void 0 : _a.click();
|
|
536
|
+
})
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
);
|
|
543
|
+
RadioGroupItem$1.displayName = ITEM_NAME;
|
|
544
|
+
var INDICATOR_NAME2 = "RadioGroupIndicator";
|
|
545
|
+
var RadioGroupIndicator = React.forwardRef(
|
|
546
|
+
(props, forwardedRef) => {
|
|
547
|
+
const { __scopeRadioGroup, ...indicatorProps } = props;
|
|
548
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
549
|
+
return /* @__PURE__ */ jsx(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
RadioGroupIndicator.displayName = INDICATOR_NAME2;
|
|
553
|
+
var Root2 = RadioGroup$1;
|
|
554
|
+
var Item2 = RadioGroupItem$1;
|
|
555
|
+
var Indicator = RadioGroupIndicator;
|
|
556
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
557
|
+
return /* @__PURE__ */ jsx(
|
|
558
|
+
Root2,
|
|
559
|
+
{
|
|
560
|
+
className: cn("grid gap-2", className),
|
|
561
|
+
...props,
|
|
562
|
+
ref
|
|
563
|
+
}
|
|
564
|
+
);
|
|
565
|
+
});
|
|
566
|
+
RadioGroup.displayName = Root2.displayName;
|
|
567
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
568
|
+
return /* @__PURE__ */ jsx(
|
|
569
|
+
Item2,
|
|
570
|
+
{
|
|
571
|
+
ref,
|
|
572
|
+
className: cn(
|
|
573
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
574
|
+
className
|
|
575
|
+
),
|
|
576
|
+
...props,
|
|
577
|
+
children: /* @__PURE__ */ jsx(Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
});
|
|
581
|
+
RadioGroupItem.displayName = Item2.displayName;
|
|
582
|
+
export {
|
|
583
|
+
RadioGroup as RadioGroupCN,
|
|
584
|
+
RadioGroupItem
|
|
585
|
+
};
|
|
586
|
+
//# sourceMappingURL=radioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radioGroup.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/circle.js","../../../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs","../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../../node_modules/@radix-ui/react-radio-group/dist/index.mjs","../../../lib/components/ui/radioGroup.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.456.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Circle = createLucideIcon(\"Circle\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n]);\n\nexport { Circle as default };\n//# sourceMappingURL=circle.js.map\n","// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/roving-focus/src/RovingFocusGroup.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/radio-group/src/RadioGroup.tsx\nimport * as React2 from \"react\";\nimport { composeEventHandlers as composeEventHandlers2 } from \"@radix-ui/primitive\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { Primitive as Primitive2 } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\n\n// packages/react/radio-group/src/Radio.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar RADIO_NAME = \"Radio\";\nvar [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\nvar [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\nvar Radio = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = \"on\",\n onCheck,\n form,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": checked,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...radioProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n BubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nRadio.displayName = RADIO_NAME;\nvar INDICATOR_NAME = \"RadioIndicator\";\nvar RadioIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nRadioIndicator.displayName = INDICATOR_NAME;\nvar BubbleInput = (props) => {\n const { control, checked, bubbles = true, ...inputProps } = props;\n const ref = React.useRef(null);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, \"checked\");\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"radio\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...inputProps,\n tabIndex: -1,\n ref,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n};\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n\n// packages/react/radio-group/src/RadioGroup.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nvar RADIO_GROUP_NAME = \"RadioGroup\";\nvar [createRadioGroupContext, createRadioGroupScope] = createContextScope2(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar useRadioScope = createRadioScope();\nvar [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);\nvar RadioGroup = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange\n });\n return /* @__PURE__ */ jsx2(\n RadioGroupProvider,\n {\n scope: __scopeRadioGroup,\n name,\n required,\n disabled,\n value,\n onValueChange: setValue,\n children: /* @__PURE__ */ jsx2(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation,\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx2(\n Primitive2.div,\n {\n role: \"radiogroup\",\n \"aria-required\": required,\n \"aria-orientation\": orientation,\n \"data-disabled\": disabled ? \"\" : void 0,\n dir: direction,\n ...groupProps,\n ref: forwardedRef\n }\n )\n }\n )\n }\n );\n }\n);\nRadioGroup.displayName = RADIO_GROUP_NAME;\nvar ITEM_NAME = \"RadioGroupItem\";\nvar RadioGroupItem = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React2.useRef(false);\n React2.useEffect(() => {\n const handleKeyDown = (event) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => isArrowKeyPressedRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown);\n document.addEventListener(\"keyup\", handleKeyUp);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n document.removeEventListener(\"keyup\", handleKeyUp);\n };\n }, []);\n return /* @__PURE__ */ jsx2(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !isDisabled,\n active: checked,\n children: /* @__PURE__ */ jsx2(\n Radio,\n {\n disabled: isDisabled,\n required: context.required,\n checked,\n ...radioScope,\n ...itemProps,\n name: context.name,\n ref: composedRefs,\n onCheck: () => context.onValueChange(itemProps.value),\n onKeyDown: composeEventHandlers2((event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onFocus: composeEventHandlers2(itemProps.onFocus, () => {\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })\n }\n )\n }\n );\n }\n);\nRadioGroupItem.displayName = ITEM_NAME;\nvar INDICATOR_NAME2 = \"RadioGroupIndicator\";\nvar RadioGroupIndicator = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return /* @__PURE__ */ jsx2(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });\n }\n);\nRadioGroupIndicator.displayName = INDICATOR_NAME2;\nvar Root2 = RadioGroup;\nvar Item2 = RadioGroupItem;\nvar Indicator = RadioGroupIndicator;\nexport {\n Indicator,\n Item2 as Item,\n RadioGroup,\n RadioGroupIndicator,\n RadioGroupItem,\n Root2 as Root,\n createRadioGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\r\nimport { Circle } from \"lucide-react\";\r\n\r\nimport { cn } from \"../../utils/utils\";\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Root\r\n className={cn(\"grid gap-2\", className)}\r\n {...props}\r\n ref={ref}\r\n />\r\n );\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\r\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\r\n </RadioGroupPrimitive.Indicator>\r\n </RadioGroupPrimitive.Item>\r\n );\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nexport { RadioGroup as RadioGroupCN, RadioGroupItem };\r\n"],"names":["ITEM_NAME","createContextScope","createContextScope2","RadioGroup","React2","jsx2","RovingFocusGroup.Root","Primitive2","RadioGroupItem","useComposedRefs2","RovingFocusGroup.Item","composeEventHandlers2","RadioGroupPrimitive.Root","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator"],"mappings":";;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,SAAS,iBAAiB,UAAU;AAAA,EACxC,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAC3D,CAAC;ACQD,SAAS,mBAAmB,WAAW,yBAAyB,IAAI;AAClE,MAAI,kBAAkB,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