@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.
Files changed (128) hide show
  1. package/dist/Dialog-DZMfjbGC.js +421 -0
  2. package/dist/Dialog-DZMfjbGC.js.map +1 -0
  3. package/dist/assets/style.css +4369 -0
  4. package/dist/assets/tailwind.css +1365 -1193
  5. package/dist/check-B7dJm08z.js +12 -0
  6. package/dist/check-B7dJm08z.js.map +1 -0
  7. package/dist/components/Button.js +1 -1
  8. package/dist/components/datatable/DataTable.js +6 -2
  9. package/dist/components/datatable/DataTable.js.map +1 -1
  10. package/dist/components/datatable/DataTableServer.js +6 -2
  11. package/dist/components/datatable/DataTableServer.js.map +1 -1
  12. package/dist/components/form/AutocompleteSearchBar.js +6 -2
  13. package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
  14. package/dist/components/form/AutocompleteSearchBarServer.js +6 -2
  15. package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
  16. package/dist/components/form/FileInput.js +7 -3
  17. package/dist/components/form/FileInput.js.map +1 -1
  18. package/dist/components/form/FileInputMultiple.js +7 -3
  19. package/dist/components/form/FileInputMultiple.js.map +1 -1
  20. package/dist/components/form/FormField.js +6 -2
  21. package/dist/components/form/FormField.js.map +1 -1
  22. package/dist/components/form/PositionsSelectorSingle.js +6 -2
  23. package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
  24. package/dist/components/form/SelectField.js +6 -2
  25. package/dist/components/form/SelectField.js.map +1 -1
  26. package/dist/components/profiles/ProfileOverview.js +6 -2
  27. package/dist/components/profiles/ProfileOverview.js.map +1 -1
  28. package/dist/components/ui/Combobox.d.ts +1 -0
  29. package/dist/components/ui/Combobox.js +138 -0
  30. package/dist/components/ui/Combobox.js.map +1 -0
  31. package/dist/components/ui/DateTimePicker.js +19 -5
  32. package/dist/components/ui/DateTimePicker.js.map +1 -1
  33. package/dist/components/ui/Dialog.js +15 -413
  34. package/dist/components/ui/Dialog.js.map +1 -1
  35. package/dist/components/ui/ScrollArea.js +2 -1
  36. package/dist/components/ui/ScrollArea.js.map +1 -1
  37. package/dist/components/ui/command.d.ts +80 -0
  38. package/dist/components/ui/command.js +643 -0
  39. package/dist/components/ui/command.js.map +1 -0
  40. package/dist/components/ui/datepicker.js +14 -1
  41. package/dist/components/ui/datepicker.js.map +1 -1
  42. package/dist/components/ui/popover.js +3 -2
  43. package/dist/components/ui/popover.js.map +1 -1
  44. package/dist/components/ui/radioGroup.d.ts +5 -0
  45. package/dist/components/ui/radioGroup.js +586 -0
  46. package/dist/components/ui/radioGroup.js.map +1 -0
  47. package/dist/components/ui/select.js +9 -144
  48. package/dist/components/ui/select.js.map +1 -1
  49. package/dist/index-BXrwe-_7.js +1395 -0
  50. package/dist/index-BXrwe-_7.js.map +1 -0
  51. package/dist/index-Bk8dRTPE.js +11 -0
  52. package/dist/index-Bk8dRTPE.js.map +1 -0
  53. package/dist/index-BlzC-wss.js +140 -0
  54. package/dist/index-BlzC-wss.js.map +1 -0
  55. package/dist/index-Bp9GiUkg.js +2266 -0
  56. package/dist/index-Bp9GiUkg.js.map +1 -0
  57. package/dist/index-BzVVosDl.js +57 -0
  58. package/dist/index-BzVVosDl.js.map +1 -0
  59. package/dist/index-CbAQSs_C.js +40 -0
  60. package/dist/index-CbAQSs_C.js.map +1 -0
  61. package/dist/index-Dz_fWpFA.js +2203 -0
  62. package/dist/index-Dz_fWpFA.js.map +1 -0
  63. package/dist/index-IXOTxK3N.js +7 -0
  64. package/dist/index-IXOTxK3N.js.map +1 -0
  65. package/dist/main.d.ts +3 -0
  66. package/dist/main.js +29 -12
  67. package/dist/main.js.map +1 -1
  68. package/dist/parse-D2yb8751.js +1727 -0
  69. package/dist/parse-D2yb8751.js.map +1 -0
  70. package/dist/tailwind-l0sNRNKZ.js +2 -0
  71. package/dist/tailwind-l0sNRNKZ.js.map +1 -0
  72. package/lib/components/Button.tsx +57 -0
  73. package/lib/components/Calendar.tsx +242 -0
  74. package/lib/components/ConfirmationModalDialog.tsx +115 -0
  75. package/lib/components/Modal.tsx +73 -0
  76. package/lib/components/ModalDialog.tsx +63 -0
  77. package/lib/components/Spinner.tsx +25 -0
  78. package/lib/components/SpinnerIcon.tsx +12 -0
  79. package/lib/components/datatable/DataTable.tsx +442 -0
  80. package/lib/components/datatable/DataTableServer.tsx +939 -0
  81. package/lib/components/datatable/DatatableSettings.tsx +48 -0
  82. package/lib/components/datatable/Resizable.tsx +99 -0
  83. package/lib/components/datatable/types.ts +33 -0
  84. package/lib/components/form/AutocompleteSearchBar.tsx +424 -0
  85. package/lib/components/form/AutocompleteSearchBarServer.tsx +257 -0
  86. package/lib/components/form/DateField.tsx +124 -0
  87. package/lib/components/form/DateRangeField.tsx +116 -0
  88. package/lib/components/form/FileInput.tsx +188 -0
  89. package/lib/components/form/FileInputMultiple.tsx +186 -0
  90. package/lib/components/form/FormField.tsx +371 -0
  91. package/lib/components/form/InputField.tsx +230 -0
  92. package/lib/components/form/PositionsSelectorSingle.tsx +266 -0
  93. package/lib/components/form/RadioGroup.tsx +64 -0
  94. package/lib/components/form/SelectField.tsx +267 -0
  95. package/lib/components/layout/IconInCircle.tsx +29 -0
  96. package/lib/components/layout/PageTitle.tsx +19 -0
  97. package/lib/components/layout/SectionTitle.tsx +22 -0
  98. package/lib/components/profiles/ProfileOverview.tsx +212 -0
  99. package/lib/components/ui/Calendar.tsx +68 -0
  100. package/lib/components/ui/Combobox.tsx +122 -0
  101. package/lib/components/ui/DatePicker.tsx +124 -0
  102. package/lib/components/ui/DateTimePicker.tsx +187 -0
  103. package/lib/components/ui/Dialog.tsx +118 -0
  104. package/lib/components/ui/ScrollArea.tsx +45 -0
  105. package/lib/components/ui/button.tsx +56 -0
  106. package/lib/components/ui/command.tsx +153 -0
  107. package/lib/components/ui/form.tsx +177 -0
  108. package/lib/components/ui/input.tsx +22 -0
  109. package/lib/components/ui/label.tsx +24 -0
  110. package/lib/components/ui/popover.tsx +31 -0
  111. package/lib/components/ui/radioGroup.tsx +44 -0
  112. package/lib/components/ui/select.tsx +158 -0
  113. package/lib/contexts/FederationContext.tsx +28 -0
  114. package/lib/contexts/useFederationContext.ts +4 -0
  115. package/lib/css/tailwind.css +10 -0
  116. package/lib/fonts/arial.ts +3 -0
  117. package/lib/fonts/arialBold.ts +4 -0
  118. package/lib/main.ts +64 -0
  119. package/lib/types.ts +492 -0
  120. package/lib/utils/PdfManager.ts +224 -0
  121. package/lib/utils/getFullName.tsx +83 -0
  122. package/lib/utils/getIntersectingDays.ts +28 -0
  123. package/lib/utils/handleErrors.ts +28 -0
  124. package/lib/utils/hasRightInModule.ts +17 -0
  125. package/lib/utils/hasRole.ts +12 -0
  126. package/lib/utils/utils.ts +6 -0
  127. package/lib/vite-env.d.ts +1 -0
  128. package/package.json +5 -2
@@ -1,416 +1,18 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { c as createContextScope, a as composeEventHandlers, b as createContext2 } from "../../index-BpHbTxNe.js";
4
- import { u as useComposedRefs, S as Slot } from "../../index-CS99lEeB.js";
5
- import { R as ReactRemoveScroll, h as hideOthers, u as useFocusGuards, F as FocusScope, D as DismissableLayer, a as useControllableState, b as useId, P as Portal$1 } from "../../index-Bvtl_PyD.js";
6
- import { P as Presence } from "../../index-D0ipc4Xc.js";
7
- import { P as Primitive } from "../../index-DvR8HKPa.js";
8
- import { cn } from "../../utils/utils.js";
9
- import { X } from "../../x-DciOkaU0.js";
10
- var DIALOG_NAME = "Dialog";
11
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
12
- var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
13
- var Dialog$1 = (props) => {
14
- const {
15
- __scopeDialog,
16
- children,
17
- open: openProp,
18
- defaultOpen,
19
- onOpenChange,
20
- modal = true
21
- } = props;
22
- const triggerRef = React.useRef(null);
23
- const contentRef = React.useRef(null);
24
- const [open = false, setOpen] = useControllableState({
25
- prop: openProp,
26
- defaultProp: defaultOpen,
27
- onChange: onOpenChange
28
- });
29
- return /* @__PURE__ */ jsx(
30
- DialogProvider,
31
- {
32
- scope: __scopeDialog,
33
- triggerRef,
34
- contentRef,
35
- contentId: useId(),
36
- titleId: useId(),
37
- descriptionId: useId(),
38
- open,
39
- onOpenChange: setOpen,
40
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
41
- modal,
42
- children
43
- }
44
- );
45
- };
46
- Dialog$1.displayName = DIALOG_NAME;
47
- var TRIGGER_NAME = "DialogTrigger";
48
- var DialogTrigger$1 = React.forwardRef(
49
- (props, forwardedRef) => {
50
- const { __scopeDialog, ...triggerProps } = props;
51
- const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
52
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
53
- return /* @__PURE__ */ jsx(
54
- Primitive.button,
55
- {
56
- type: "button",
57
- "aria-haspopup": "dialog",
58
- "aria-expanded": context.open,
59
- "aria-controls": context.contentId,
60
- "data-state": getState(context.open),
61
- ...triggerProps,
62
- ref: composedTriggerRef,
63
- onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
64
- }
65
- );
66
- }
67
- );
68
- DialogTrigger$1.displayName = TRIGGER_NAME;
69
- var PORTAL_NAME = "DialogPortal";
70
- var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
71
- forceMount: void 0
72
- });
73
- var DialogPortal$1 = (props) => {
74
- const { __scopeDialog, forceMount, children, container } = props;
75
- const context = useDialogContext(PORTAL_NAME, __scopeDialog);
76
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children: child }) })) });
77
- };
78
- DialogPortal$1.displayName = PORTAL_NAME;
79
- var OVERLAY_NAME = "DialogOverlay";
80
- var DialogOverlay$1 = React.forwardRef(
81
- (props, forwardedRef) => {
82
- const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
83
- const { forceMount = portalContext.forceMount, ...overlayProps } = props;
84
- const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
85
- return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
86
- }
87
- );
88
- DialogOverlay$1.displayName = OVERLAY_NAME;
89
- var DialogOverlayImpl = React.forwardRef(
90
- (props, forwardedRef) => {
91
- const { __scopeDialog, ...overlayProps } = props;
92
- const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
93
- return (
94
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
95
- // ie. when `Overlay` and `Content` are siblings
96
- /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
97
- Primitive.div,
98
- {
99
- "data-state": getState(context.open),
100
- ...overlayProps,
101
- ref: forwardedRef,
102
- style: { pointerEvents: "auto", ...overlayProps.style }
103
- }
104
- ) })
105
- );
106
- }
107
- );
108
- var CONTENT_NAME = "DialogContent";
109
- var DialogContent$1 = React.forwardRef(
110
- (props, forwardedRef) => {
111
- const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
112
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
113
- const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
114
- return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
115
- }
116
- );
117
- DialogContent$1.displayName = CONTENT_NAME;
118
- var DialogContentModal = React.forwardRef(
119
- (props, forwardedRef) => {
120
- const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
121
- const contentRef = React.useRef(null);
122
- const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
123
- React.useEffect(() => {
124
- const content = contentRef.current;
125
- if (content)
126
- return hideOthers(content);
127
- }, []);
128
- return /* @__PURE__ */ jsx(
129
- DialogContentImpl,
130
- {
131
- ...props,
132
- ref: composedRefs,
133
- trapFocus: context.open,
134
- disableOutsidePointerEvents: true,
135
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
136
- var _a;
137
- event.preventDefault();
138
- (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
139
- }),
140
- onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
141
- const originalEvent = event.detail.originalEvent;
142
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
143
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
144
- if (isRightClick)
145
- event.preventDefault();
146
- }),
147
- onFocusOutside: composeEventHandlers(
148
- props.onFocusOutside,
149
- (event) => event.preventDefault()
150
- )
151
- }
152
- );
153
- }
154
- );
155
- var DialogContentNonModal = React.forwardRef(
156
- (props, forwardedRef) => {
157
- const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
158
- const hasInteractedOutsideRef = React.useRef(false);
159
- const hasPointerDownOutsideRef = React.useRef(false);
160
- return /* @__PURE__ */ jsx(
161
- DialogContentImpl,
162
- {
163
- ...props,
164
- ref: forwardedRef,
165
- trapFocus: false,
166
- disableOutsidePointerEvents: false,
167
- onCloseAutoFocus: (event) => {
168
- var _a, _b;
169
- (_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
170
- if (!event.defaultPrevented) {
171
- if (!hasInteractedOutsideRef.current)
172
- (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
173
- event.preventDefault();
174
- }
175
- hasInteractedOutsideRef.current = false;
176
- hasPointerDownOutsideRef.current = false;
177
- },
178
- onInteractOutside: (event) => {
179
- var _a, _b;
180
- (_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
181
- if (!event.defaultPrevented) {
182
- hasInteractedOutsideRef.current = true;
183
- if (event.detail.originalEvent.type === "pointerdown") {
184
- hasPointerDownOutsideRef.current = true;
185
- }
186
- }
187
- const target = event.target;
188
- const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
189
- if (targetIsTrigger)
190
- event.preventDefault();
191
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
192
- event.preventDefault();
193
- }
194
- }
195
- }
196
- );
197
- }
198
- );
199
- var DialogContentImpl = React.forwardRef(
200
- (props, forwardedRef) => {
201
- const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
202
- const context = useDialogContext(CONTENT_NAME, __scopeDialog);
203
- const contentRef = React.useRef(null);
204
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
205
- useFocusGuards();
206
- return /* @__PURE__ */ jsxs(Fragment, { children: [
207
- /* @__PURE__ */ jsx(
208
- FocusScope,
209
- {
210
- asChild: true,
211
- loop: true,
212
- trapped: trapFocus,
213
- onMountAutoFocus: onOpenAutoFocus,
214
- onUnmountAutoFocus: onCloseAutoFocus,
215
- children: /* @__PURE__ */ jsx(
216
- DismissableLayer,
217
- {
218
- role: "dialog",
219
- id: context.contentId,
220
- "aria-describedby": context.descriptionId,
221
- "aria-labelledby": context.titleId,
222
- "data-state": getState(context.open),
223
- ...contentProps,
224
- ref: composedRefs,
225
- onDismiss: () => context.onOpenChange(false)
226
- }
227
- )
228
- }
229
- ),
230
- /* @__PURE__ */ jsxs(Fragment, { children: [
231
- /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
232
- /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
233
- ] })
234
- ] });
235
- }
236
- );
237
- var TITLE_NAME = "DialogTitle";
238
- var DialogTitle$1 = React.forwardRef(
239
- (props, forwardedRef) => {
240
- const { __scopeDialog, ...titleProps } = props;
241
- const context = useDialogContext(TITLE_NAME, __scopeDialog);
242
- return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
243
- }
244
- );
245
- DialogTitle$1.displayName = TITLE_NAME;
246
- var DESCRIPTION_NAME = "DialogDescription";
247
- var DialogDescription$1 = React.forwardRef(
248
- (props, forwardedRef) => {
249
- const { __scopeDialog, ...descriptionProps } = props;
250
- const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
251
- return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
252
- }
253
- );
254
- DialogDescription$1.displayName = DESCRIPTION_NAME;
255
- var CLOSE_NAME = "DialogClose";
256
- var DialogClose$1 = React.forwardRef(
257
- (props, forwardedRef) => {
258
- const { __scopeDialog, ...closeProps } = props;
259
- const context = useDialogContext(CLOSE_NAME, __scopeDialog);
260
- return /* @__PURE__ */ jsx(
261
- Primitive.button,
262
- {
263
- type: "button",
264
- ...closeProps,
265
- ref: forwardedRef,
266
- onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
267
- }
268
- );
269
- }
270
- );
271
- DialogClose$1.displayName = CLOSE_NAME;
272
- function getState(open) {
273
- return open ? "open" : "closed";
274
- }
275
- var TITLE_WARNING_NAME = "DialogTitleWarning";
276
- var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
277
- contentName: CONTENT_NAME,
278
- titleName: TITLE_NAME,
279
- docsSlug: "dialog"
280
- });
281
- var TitleWarning = ({ titleId }) => {
282
- const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
283
- const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
284
-
285
- If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
286
-
287
- For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
288
- React.useEffect(() => {
289
- if (titleId) {
290
- const hasTitle = document.getElementById(titleId);
291
- if (!hasTitle)
292
- console.error(MESSAGE);
293
- }
294
- }, [MESSAGE, titleId]);
295
- return null;
296
- };
297
- var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
298
- var DescriptionWarning = ({ contentRef, descriptionId }) => {
299
- const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
300
- const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
301
- React.useEffect(() => {
302
- var _a;
303
- const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
304
- if (descriptionId && describedById) {
305
- const hasDescription = document.getElementById(descriptionId);
306
- if (!hasDescription)
307
- console.warn(MESSAGE);
308
- }
309
- }, [MESSAGE, contentRef, descriptionId]);
310
- return null;
311
- };
312
- var Root = Dialog$1;
313
- var Trigger = DialogTrigger$1;
314
- var Portal = DialogPortal$1;
315
- var Overlay = DialogOverlay$1;
316
- var Content = DialogContent$1;
317
- var Title = DialogTitle$1;
318
- var Description = DialogDescription$1;
319
- var Close = DialogClose$1;
320
- const Dialog = Root;
321
- const DialogTrigger = Trigger;
322
- const DialogPortal = Portal;
323
- const DialogClose = Close;
324
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
325
- Overlay,
326
- {
327
- ref,
328
- className: cn(
329
- "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
330
- className
331
- ),
332
- ...props
333
- }
334
- ));
335
- DialogOverlay.displayName = Overlay.displayName;
336
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
337
- /* @__PURE__ */ jsx(DialogOverlay, {}),
338
- /* @__PURE__ */ jsxs(
339
- Content,
340
- {
341
- ref,
342
- className: cn(
343
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
344
- className
345
- ),
346
- ...props,
347
- children: [
348
- children,
349
- /* @__PURE__ */ jsxs(Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
350
- /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
351
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
352
- ] })
353
- ]
354
- }
355
- )
356
- ] }));
357
- DialogContent.displayName = Content.displayName;
358
- const DialogHeader = ({
359
- className,
360
- ...props
361
- }) => /* @__PURE__ */ jsx(
362
- "div",
363
- {
364
- className: cn("flex flex-col space-y-1.5 sm:text-left", className),
365
- ...props
366
- }
367
- );
368
- DialogHeader.displayName = "DialogHeader";
369
- const DialogFooter = ({
370
- className,
371
- ...props
372
- }) => /* @__PURE__ */ jsx(
373
- "div",
374
- {
375
- className: cn(
376
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
377
- className
378
- ),
379
- ...props
380
- }
381
- );
382
- DialogFooter.displayName = "DialogFooter";
383
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
384
- Title,
385
- {
386
- ref,
387
- className: cn(
388
- "text-lg font-semibold leading-none tracking-tight",
389
- className
390
- ),
391
- ...props
392
- }
393
- ));
394
- DialogTitle.displayName = Title.displayName;
395
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
396
- Description,
397
- {
398
- ref,
399
- className: cn("text-sm text-muted-foreground", className),
400
- ...props
401
- }
402
- ));
403
- DialogDescription.displayName = Description.displayName;
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import { D, c, e, i, g, f, b, a, h, d } from "../../Dialog-DZMfjbGC.js";
4
+ import "../../utils/utils.js";
5
+ import "../../x-DciOkaU0.js";
404
6
  export {
405
- Dialog,
406
- DialogClose,
407
- DialogContent,
408
- DialogDescription,
409
- DialogFooter,
410
- DialogHeader,
411
- DialogOverlay,
412
- DialogPortal,
413
- DialogTitle,
414
- DialogTrigger
7
+ D as Dialog,
8
+ c as DialogClose,
9
+ e as DialogContent,
10
+ i as DialogDescription,
11
+ g as DialogFooter,
12
+ f as DialogHeader,
13
+ b as DialogOverlay,
14
+ a as DialogPortal,
15
+ h as DialogTitle,
16
+ d as DialogTrigger
415
17
  };
416
18
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../../node_modules/@radix-ui/react-dialog/dist/index.mjs","../../../lib/components/ui/Dialog.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport { X } from \"lucide-react\";\r\nimport { cn } from \"../../utils/utils\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\r\n <X className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\r\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\r\n \"text-lg font-semibold leading-none tracking-tight\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogClose,\r\n DialogTrigger,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n};\r\n"],"names":["Dialog","DialogTrigger","DialogPortal","PortalPrimitive","DialogOverlay","RemoveScroll","DialogContent","DialogTitle","DialogDescription","DialogClose","createContext","DialogPrimitive.Root","DialogPrimitive.Trigger","DialogPrimitive.Portal","DialogPrimitive.Close","DialogPrimitive.Overlay","DialogPrimitive.Content","DialogPrimitive.Title","DialogPrimitive.Description"],"mappings":";;;;;;;;;AAmBA,IAAI,cAAc;AAClB,IAAI,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAC7E,IAAI,CAAC,gBAAgB,gBAAgB,IAAI,oBAAoB,WAAW;AACxE,IAAIA,WAAS,CAAC,UAAU;AACtB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACT,IAAG;AACJ,QAAM,aAAa,MAAM,OAAO,IAAI;AACpC,QAAM,aAAa,MAAM,OAAO,IAAI;AACpC,QAAM,CAAC,OAAO,OAAO,OAAO,IAAI,qBAAqB;AAAA,IACnD,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,EACd,CAAG;AACD,SAAuB;AAAA,IACrB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,WAAW,MAAO;AAAA,MAClB,SAAS,MAAO;AAAA,M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;AAAA,EAAA;AACN;AAEF,aAAa,cAAc;AAErB,MAAA,cAAc,MAAM,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN,CACD;AACD,YAAY,cAAcA,MAAsB;AAE1C,MAAA,oBAAoB,MAAM,WAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA,EAAA;AACN,CACD;AACD,kBAAkB,cAAcA,YAA4B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Dialog.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -4,7 +4,8 @@ import { P as Primitive } from "../../index-DvR8HKPa.js";
4
4
  import { P as Presence } from "../../index-D0ipc4Xc.js";
5
5
  import { c as createContextScope, a as composeEventHandlers, d as useCallbackRef, u as useLayoutEffect2 } from "../../index-BpHbTxNe.js";
6
6
  import { u as useComposedRefs } from "../../index-CS99lEeB.js";
7
- import { u as useDirection, c as clamp } from "../../index-BBN2TLxK.js";
7
+ import { u as useDirection } from "../../index-Bk8dRTPE.js";
8
+ import { c as clamp } from "../../index-IXOTxK3N.js";
8
9
  import { cn } from "../../utils/utils.js";
9
10
  function useStateMachine(initialState, machine) {
10
11
  return React.useReducer((state, event) => {