@addsign/moje-agenda-shared-lib 2.0.43 → 2.0.44

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 (32) hide show
  1. package/dist/Combination-B9IT4KW2.js +1162 -0
  2. package/dist/Combination-B9IT4KW2.js.map +1 -0
  3. package/dist/DataTableServer-BTH3lxJi.js +23012 -0
  4. package/dist/DataTableServer-BTH3lxJi.js.map +1 -0
  5. package/dist/DataTableServer-C_N4I0CU.js +23008 -0
  6. package/dist/DataTableServer-C_N4I0CU.js.map +1 -0
  7. package/dist/DataTableServer-D6wHH3q2.js +23062 -0
  8. package/dist/DataTableServer-D6wHH3q2.js.map +1 -0
  9. package/dist/DataTableServer-DfbNQxQu.js +23007 -0
  10. package/dist/DataTableServer-DfbNQxQu.js.map +1 -0
  11. package/dist/DataTableServer-vC-bfyeH.js +23062 -0
  12. package/dist/DataTableServer-vC-bfyeH.js.map +1 -0
  13. package/dist/Dialog-xljhzarH.js +424 -0
  14. package/dist/Dialog-xljhzarH.js.map +1 -0
  15. package/dist/components/datatable/DataTableBody.d.ts +3 -0
  16. package/dist/components/datatable/DataTableHeader.d.ts +3 -0
  17. package/dist/components/datatable/DataTableServer.js +6 -11
  18. package/dist/components/datatable/DataTableServer.js.map +1 -1
  19. package/dist/index-B8g-BAKV.js +64 -0
  20. package/dist/index-B8g-BAKV.js.map +1 -0
  21. package/dist/index-BXWe9Hgo.js +2203 -0
  22. package/dist/index-BXWe9Hgo.js.map +1 -0
  23. package/dist/index-DGUInIB2.js +18 -0
  24. package/dist/index-DGUInIB2.js.map +1 -0
  25. package/dist/index-T0re1j1b.js +2220 -0
  26. package/dist/index-T0re1j1b.js.map +1 -0
  27. package/dist/index-uV4rgVyx.js +234 -0
  28. package/dist/index-uV4rgVyx.js.map +1 -0
  29. package/dist/popover-Z8s3r67G.js +319 -0
  30. package/dist/popover-Z8s3r67G.js.map +1 -0
  31. package/lib/components/datatable/DataTableServer.tsx +7 -9
  32. package/package.json +1 -1
@@ -0,0 +1,424 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { c as createContextScope, b as composeEventHandlers, d as createContext2 } from "./index-NZPkObcw.js";
4
+ import { u as useComposedRefs, S as Slot } from "./index-D9mvqz1C.js";
5
+ import { u as useId } from "./index-DzfDO78K.js";
6
+ import { u as useControllableState } from "./index-B0wyIFEr.js";
7
+ import { D as DismissableLayer } from "./index-uV4rgVyx.js";
8
+ import { R as ReactRemoveScroll, h as hideOthers, u as useFocusGuards, F as FocusScope } from "./Combination-B9IT4KW2.js";
9
+ import { P as Portal$1 } from "./index-DGUInIB2.js";
10
+ import { P as Presence } from "./index-wO-IHm1z.js";
11
+ import { P as Primitive } from "./index-DoYsULhE.js";
12
+ import { cn } from "./utils/utils.js";
13
+ import { X } from "./x-DciOkaU0.js";
14
+ var DIALOG_NAME = "Dialog";
15
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
16
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
17
+ var Dialog$1 = (props) => {
18
+ const {
19
+ __scopeDialog,
20
+ children,
21
+ open: openProp,
22
+ defaultOpen,
23
+ onOpenChange,
24
+ modal = true
25
+ } = props;
26
+ const triggerRef = React.useRef(null);
27
+ const contentRef = React.useRef(null);
28
+ const [open = false, setOpen] = useControllableState({
29
+ prop: openProp,
30
+ defaultProp: defaultOpen,
31
+ onChange: onOpenChange
32
+ });
33
+ return /* @__PURE__ */ jsx(
34
+ DialogProvider,
35
+ {
36
+ scope: __scopeDialog,
37
+ triggerRef,
38
+ contentRef,
39
+ contentId: useId(),
40
+ titleId: useId(),
41
+ descriptionId: useId(),
42
+ open,
43
+ onOpenChange: setOpen,
44
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
45
+ modal,
46
+ children
47
+ }
48
+ );
49
+ };
50
+ Dialog$1.displayName = DIALOG_NAME;
51
+ var TRIGGER_NAME = "DialogTrigger";
52
+ var DialogTrigger$1 = React.forwardRef(
53
+ (props, forwardedRef) => {
54
+ const { __scopeDialog, ...triggerProps } = props;
55
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
56
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
57
+ return /* @__PURE__ */ jsx(
58
+ Primitive.button,
59
+ {
60
+ type: "button",
61
+ "aria-haspopup": "dialog",
62
+ "aria-expanded": context.open,
63
+ "aria-controls": context.contentId,
64
+ "data-state": getState(context.open),
65
+ ...triggerProps,
66
+ ref: composedTriggerRef,
67
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
68
+ }
69
+ );
70
+ }
71
+ );
72
+ DialogTrigger$1.displayName = TRIGGER_NAME;
73
+ var PORTAL_NAME = "DialogPortal";
74
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
75
+ forceMount: void 0
76
+ });
77
+ var DialogPortal$1 = (props) => {
78
+ const { __scopeDialog, forceMount, children, container } = props;
79
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
80
+ 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 }) })) });
81
+ };
82
+ DialogPortal$1.displayName = PORTAL_NAME;
83
+ var OVERLAY_NAME = "DialogOverlay";
84
+ var DialogOverlay$1 = React.forwardRef(
85
+ (props, forwardedRef) => {
86
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
87
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
88
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
89
+ return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
90
+ }
91
+ );
92
+ DialogOverlay$1.displayName = OVERLAY_NAME;
93
+ var DialogOverlayImpl = React.forwardRef(
94
+ (props, forwardedRef) => {
95
+ const { __scopeDialog, ...overlayProps } = props;
96
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
97
+ return (
98
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
99
+ // ie. when `Overlay` and `Content` are siblings
100
+ /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
101
+ Primitive.div,
102
+ {
103
+ "data-state": getState(context.open),
104
+ ...overlayProps,
105
+ ref: forwardedRef,
106
+ style: { pointerEvents: "auto", ...overlayProps.style }
107
+ }
108
+ ) })
109
+ );
110
+ }
111
+ );
112
+ var CONTENT_NAME = "DialogContent";
113
+ var DialogContent$1 = React.forwardRef(
114
+ (props, forwardedRef) => {
115
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
116
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
117
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
118
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
119
+ }
120
+ );
121
+ DialogContent$1.displayName = CONTENT_NAME;
122
+ var DialogContentModal = React.forwardRef(
123
+ (props, forwardedRef) => {
124
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
125
+ const contentRef = React.useRef(null);
126
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
127
+ React.useEffect(() => {
128
+ const content = contentRef.current;
129
+ if (content)
130
+ return hideOthers(content);
131
+ }, []);
132
+ return /* @__PURE__ */ jsx(
133
+ DialogContentImpl,
134
+ {
135
+ ...props,
136
+ ref: composedRefs,
137
+ trapFocus: context.open,
138
+ disableOutsidePointerEvents: true,
139
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
140
+ var _a;
141
+ event.preventDefault();
142
+ (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
143
+ }),
144
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
145
+ const originalEvent = event.detail.originalEvent;
146
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
147
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
148
+ if (isRightClick)
149
+ event.preventDefault();
150
+ }),
151
+ onFocusOutside: composeEventHandlers(
152
+ props.onFocusOutside,
153
+ (event) => event.preventDefault()
154
+ )
155
+ }
156
+ );
157
+ }
158
+ );
159
+ var DialogContentNonModal = React.forwardRef(
160
+ (props, forwardedRef) => {
161
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
162
+ const hasInteractedOutsideRef = React.useRef(false);
163
+ const hasPointerDownOutsideRef = React.useRef(false);
164
+ return /* @__PURE__ */ jsx(
165
+ DialogContentImpl,
166
+ {
167
+ ...props,
168
+ ref: forwardedRef,
169
+ trapFocus: false,
170
+ disableOutsidePointerEvents: false,
171
+ onCloseAutoFocus: (event) => {
172
+ var _a, _b;
173
+ (_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
174
+ if (!event.defaultPrevented) {
175
+ if (!hasInteractedOutsideRef.current)
176
+ (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
177
+ event.preventDefault();
178
+ }
179
+ hasInteractedOutsideRef.current = false;
180
+ hasPointerDownOutsideRef.current = false;
181
+ },
182
+ onInteractOutside: (event) => {
183
+ var _a, _b;
184
+ (_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
185
+ if (!event.defaultPrevented) {
186
+ hasInteractedOutsideRef.current = true;
187
+ if (event.detail.originalEvent.type === "pointerdown") {
188
+ hasPointerDownOutsideRef.current = true;
189
+ }
190
+ }
191
+ const target = event.target;
192
+ const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
193
+ if (targetIsTrigger)
194
+ event.preventDefault();
195
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
196
+ event.preventDefault();
197
+ }
198
+ }
199
+ }
200
+ );
201
+ }
202
+ );
203
+ var DialogContentImpl = React.forwardRef(
204
+ (props, forwardedRef) => {
205
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
206
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
207
+ const contentRef = React.useRef(null);
208
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
209
+ useFocusGuards();
210
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
211
+ /* @__PURE__ */ jsx(
212
+ FocusScope,
213
+ {
214
+ asChild: true,
215
+ loop: true,
216
+ trapped: trapFocus,
217
+ onMountAutoFocus: onOpenAutoFocus,
218
+ onUnmountAutoFocus: onCloseAutoFocus,
219
+ children: /* @__PURE__ */ jsx(
220
+ DismissableLayer,
221
+ {
222
+ role: "dialog",
223
+ id: context.contentId,
224
+ "aria-describedby": context.descriptionId,
225
+ "aria-labelledby": context.titleId,
226
+ "data-state": getState(context.open),
227
+ ...contentProps,
228
+ ref: composedRefs,
229
+ onDismiss: () => context.onOpenChange(false)
230
+ }
231
+ )
232
+ }
233
+ ),
234
+ /* @__PURE__ */ jsxs(Fragment, { children: [
235
+ /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
236
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
237
+ ] })
238
+ ] });
239
+ }
240
+ );
241
+ var TITLE_NAME = "DialogTitle";
242
+ var DialogTitle$1 = React.forwardRef(
243
+ (props, forwardedRef) => {
244
+ const { __scopeDialog, ...titleProps } = props;
245
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
246
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
247
+ }
248
+ );
249
+ DialogTitle$1.displayName = TITLE_NAME;
250
+ var DESCRIPTION_NAME = "DialogDescription";
251
+ var DialogDescription$1 = React.forwardRef(
252
+ (props, forwardedRef) => {
253
+ const { __scopeDialog, ...descriptionProps } = props;
254
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
255
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
256
+ }
257
+ );
258
+ DialogDescription$1.displayName = DESCRIPTION_NAME;
259
+ var CLOSE_NAME = "DialogClose";
260
+ var DialogClose$1 = React.forwardRef(
261
+ (props, forwardedRef) => {
262
+ const { __scopeDialog, ...closeProps } = props;
263
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
264
+ return /* @__PURE__ */ jsx(
265
+ Primitive.button,
266
+ {
267
+ type: "button",
268
+ ...closeProps,
269
+ ref: forwardedRef,
270
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
271
+ }
272
+ );
273
+ }
274
+ );
275
+ DialogClose$1.displayName = CLOSE_NAME;
276
+ function getState(open) {
277
+ return open ? "open" : "closed";
278
+ }
279
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
280
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
281
+ contentName: CONTENT_NAME,
282
+ titleName: TITLE_NAME,
283
+ docsSlug: "dialog"
284
+ });
285
+ var TitleWarning = ({ titleId }) => {
286
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
287
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
288
+
289
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
290
+
291
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
292
+ React.useEffect(() => {
293
+ if (titleId) {
294
+ const hasTitle = document.getElementById(titleId);
295
+ if (!hasTitle)
296
+ console.error(MESSAGE);
297
+ }
298
+ }, [MESSAGE, titleId]);
299
+ return null;
300
+ };
301
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
302
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
303
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
304
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
305
+ React.useEffect(() => {
306
+ var _a;
307
+ const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
308
+ if (descriptionId && describedById) {
309
+ const hasDescription = document.getElementById(descriptionId);
310
+ if (!hasDescription)
311
+ console.warn(MESSAGE);
312
+ }
313
+ }, [MESSAGE, contentRef, descriptionId]);
314
+ return null;
315
+ };
316
+ var Root = Dialog$1;
317
+ var Trigger = DialogTrigger$1;
318
+ var Portal = DialogPortal$1;
319
+ var Overlay = DialogOverlay$1;
320
+ var Content = DialogContent$1;
321
+ var Title = DialogTitle$1;
322
+ var Description = DialogDescription$1;
323
+ var Close = DialogClose$1;
324
+ const Dialog = Root;
325
+ const DialogTrigger = Trigger;
326
+ const DialogPortal = Portal;
327
+ const DialogClose = Close;
328
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
329
+ Overlay,
330
+ {
331
+ ref,
332
+ className: cn(
333
+ "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",
334
+ className
335
+ ),
336
+ ...props
337
+ }
338
+ ));
339
+ DialogOverlay.displayName = Overlay.displayName;
340
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
341
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
342
+ /* @__PURE__ */ jsxs(
343
+ Content,
344
+ {
345
+ ref,
346
+ className: cn(
347
+ "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",
348
+ className
349
+ ),
350
+ ...props,
351
+ children: [
352
+ children,
353
+ /* @__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: [
354
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
355
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
356
+ ] })
357
+ ]
358
+ }
359
+ )
360
+ ] }));
361
+ DialogContent.displayName = Content.displayName;
362
+ const DialogHeader = ({
363
+ className,
364
+ ...props
365
+ }) => /* @__PURE__ */ jsx(
366
+ "div",
367
+ {
368
+ className: cn("flex flex-col space-y-1.5 sm:text-left", className),
369
+ ...props
370
+ }
371
+ );
372
+ DialogHeader.displayName = "DialogHeader";
373
+ const DialogFooter = ({
374
+ className,
375
+ ...props
376
+ }) => /* @__PURE__ */ jsx(
377
+ "div",
378
+ {
379
+ className: cn(
380
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
381
+ className
382
+ ),
383
+ ...props
384
+ }
385
+ );
386
+ DialogFooter.displayName = "DialogFooter";
387
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
388
+ Title,
389
+ {
390
+ ref,
391
+ className: cn(
392
+ "text-lg font-semibold leading-none tracking-tight",
393
+ className
394
+ ),
395
+ ...props
396
+ }
397
+ ));
398
+ DialogTitle.displayName = Title.displayName;
399
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
400
+ Description,
401
+ {
402
+ ref,
403
+ className: cn("text-sm text-muted-foreground", className),
404
+ ...props
405
+ }
406
+ ));
407
+ DialogDescription.displayName = Description.displayName;
408
+ export {
409
+ Content as C,
410
+ Dialog as D,
411
+ Overlay as O,
412
+ Portal as P,
413
+ Root as R,
414
+ DialogPortal as a,
415
+ DialogOverlay as b,
416
+ DialogClose as c,
417
+ DialogTrigger as d,
418
+ DialogContent as e,
419
+ DialogHeader as f,
420
+ DialogFooter as g,
421
+ DialogTitle as h,
422
+ DialogDescription as i
423
+ };
424
+ //# sourceMappingURL=Dialog-xljhzarH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog-xljhzarH.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,MAChB,eAAe,MAAO;AAAA,MACtB;AAAA,MACA,cAAc;AAAA,MACd,cAAc,MAAM,YAAY,MAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ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AAA,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]}
@@ -0,0 +1,3 @@
1
+ import { DataTableBodyProps, DataTableInternalItems } from './types';
2
+
3
+ export declare function DataTableBody<T extends DataTableInternalItems>({ id, url, columns, filters, selectedItemKey, rowAction, bulkAction, columnFilters, showColFilters, sortConfig, itemsPerPage, currentPage, fulltextSearch, onPageChange, onItemsPerPageChange, }: DataTableBodyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { DataTableHeaderProps, DataTableInternalItems } from './types';
2
+
3
+ export declare function DataTableHeader<T extends DataTableInternalItems>({ id, columns, title, subtitle, allowSearch, filters, itemsPerPageOptions, onExport, onRerender, onFilterChange, onSortChange, onItemsPerPageChange, onSearchChange, columnFilters, showColFilters, sortConfig, itemsPerPage, fulltextSearch, }: DataTableHeaderProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -22239,8 +22239,7 @@ function DataTableServer({
22239
22239
  disabled: Object.keys(
22240
22240
  filters || {}
22241
22241
  ).includes(String(filterParam))
22242
- },
22243
- JSON.stringify(mergedFilters)
22242
+ }
22244
22243
  ) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
22245
22244
  MultiSelect,
22246
22245
  {
@@ -22256,8 +22255,7 @@ function DataTableServer({
22256
22255
  filters || {}
22257
22256
  ).includes(String(filterParam)),
22258
22257
  variant: "secondary"
22259
- },
22260
- JSON.stringify(mergedFilters)
22258
+ }
22261
22259
  ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22262
22260
  DateRangeField,
22263
22261
  {
@@ -22279,8 +22277,7 @@ function DataTableServer({
22279
22277
  disabled: Object.keys(
22280
22278
  filters || {}
22281
22279
  ).includes(String(filterParam))
22282
- },
22283
- JSON.stringify(mergedFilters)
22280
+ }
22284
22281
  ) : filterType === "date" ? /* @__PURE__ */ jsx(
22285
22282
  DateField,
22286
22283
  {
@@ -22298,8 +22295,7 @@ function DataTableServer({
22298
22295
  disabled: Object.keys(
22299
22296
  filters || {}
22300
22297
  ).includes(String(filterParam))
22301
- },
22302
- JSON.stringify(mergedFilters)
22298
+ }
22303
22299
  ) : filterType === "text" ? /* @__PURE__ */ jsx(
22304
22300
  InputField,
22305
22301
  {
@@ -22318,8 +22314,7 @@ function DataTableServer({
22318
22314
  rounded: true,
22319
22315
  placeholder: "Zadejte filtr",
22320
22316
  debounceTimeout: 1e3
22321
- },
22322
- filterParam
22317
+ }
22323
22318
  ) : null
22324
22319
  }
22325
22320
  )
@@ -22350,7 +22345,7 @@ function DataTableServer({
22350
22345
  "td",
22351
22346
  {
22352
22347
  onClick: rowAction ? () => rowAction(item) : void 0,
22353
- className: `px-3 py-2 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium text-muted-foreground" : "text-gray-700"} ${classes || ""}`,
22348
+ className: `px-3 py-2text-gray-700 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium " : ""} ${classes || ""}`,
22354
22349
  children: [
22355
22350
  render ? render(item) : "",
22356
22351
  actions && actions.filter((it) => {