@kopexa/sight 17.12.1 → 17.13.1

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 (132) hide show
  1. package/dist/chunk-5LLYOCGQ.mjs +153 -0
  2. package/dist/chunk-6IAHC3UK.mjs +1 -0
  3. package/dist/chunk-6XUZNN3X.mjs +1 -0
  4. package/dist/chunk-7KISSD3Q.mjs +1 -0
  5. package/dist/chunk-BJ7QPNKW.mjs +242 -0
  6. package/dist/chunk-CZNF6WPR.mjs +33 -0
  7. package/dist/chunk-DU3OVIBY.mjs +16 -0
  8. package/dist/chunk-DWZQIPCX.mjs +301 -0
  9. package/dist/chunk-EAJ3DTJ3.mjs +59 -0
  10. package/dist/chunk-FBTSAODG.mjs +25 -0
  11. package/dist/chunk-G57FFIKP.mjs +48 -0
  12. package/dist/chunk-GR3VEF4M.mjs +1 -0
  13. package/dist/chunk-HISY6ZIK.mjs +1 -0
  14. package/dist/chunk-HUHVPC6T.mjs +17 -0
  15. package/dist/chunk-HVOS7SXF.mjs +15 -0
  16. package/dist/chunk-PKG2E3MX.mjs +1 -0
  17. package/dist/chunk-POVIOFVF.mjs +18 -0
  18. package/dist/chunk-RK7G2GYB.mjs +45 -0
  19. package/dist/chunk-SHETEVHO.mjs +178 -0
  20. package/dist/chunk-UWC3Z7SY.mjs +1 -0
  21. package/dist/chunk-UWQG4HGJ.mjs +13 -0
  22. package/dist/chunk-XL2RCXMY.mjs +26 -0
  23. package/dist/chunk-XPDEN2RV.mjs +1 -0
  24. package/dist/components/blankstate/blankstate.d.mts +14 -0
  25. package/dist/components/blankstate/blankstate.d.ts +14 -0
  26. package/dist/components/blankstate/blankstate.js +69 -0
  27. package/dist/components/blankstate/blankstate.mjs +7 -0
  28. package/dist/components/blankstate/index.d.mts +4 -0
  29. package/dist/components/blankstate/index.d.ts +4 -0
  30. package/dist/components/blankstate/index.js +71 -0
  31. package/dist/components/blankstate/index.mjs +8 -0
  32. package/dist/components/code/code.d.mts +9 -0
  33. package/dist/components/code/code.d.ts +9 -0
  34. package/dist/components/code/code.js +49 -0
  35. package/dist/components/code/code.mjs +7 -0
  36. package/dist/components/code/index.d.mts +4 -0
  37. package/dist/components/code/index.d.ts +4 -0
  38. package/dist/components/code/index.js +51 -0
  39. package/dist/components/code/index.mjs +8 -0
  40. package/dist/components/dialog/dialog.d.mts +44 -0
  41. package/dist/components/dialog/dialog.d.ts +44 -0
  42. package/dist/components/dialog/dialog.js +213 -0
  43. package/dist/components/dialog/dialog.mjs +31 -0
  44. package/dist/components/dialog/index.d.mts +22 -0
  45. package/dist/components/dialog/index.d.ts +22 -0
  46. package/dist/components/dialog/index.js +232 -0
  47. package/dist/components/dialog/index.mjs +35 -0
  48. package/dist/components/dialog/namespace.d.mts +5 -0
  49. package/dist/components/dialog/namespace.d.ts +5 -0
  50. package/dist/components/dialog/namespace.js +213 -0
  51. package/dist/components/dialog/namespace.mjs +29 -0
  52. package/dist/components/dialog/transition.d.mts +5 -0
  53. package/dist/components/dialog/transition.d.ts +5 -0
  54. package/dist/components/dialog/transition.js +132 -0
  55. package/dist/components/dialog/transition.mjs +106 -0
  56. package/dist/components/file-upload/avatar-upload.d.mts +54 -0
  57. package/dist/components/file-upload/avatar-upload.d.ts +54 -0
  58. package/dist/components/file-upload/avatar-upload.js +841 -0
  59. package/dist/components/file-upload/avatar-upload.mjs +15 -0
  60. package/dist/components/file-upload/index.d.mts +5 -0
  61. package/dist/components/file-upload/index.d.ts +5 -0
  62. package/dist/components/file-upload/index.js +843 -0
  63. package/dist/components/file-upload/index.mjs +16 -0
  64. package/dist/components/file-upload/messages.d.mts +39 -0
  65. package/dist/components/file-upload/messages.d.ts +39 -0
  66. package/dist/components/file-upload/messages.js +68 -0
  67. package/dist/components/file-upload/messages.mjs +7 -0
  68. package/dist/components/file-upload/utils/data-url-to-file.d.mts +3 -0
  69. package/dist/components/file-upload/utils/data-url-to-file.d.ts +3 -0
  70. package/dist/components/file-upload/utils/data-url-to-file.js +38 -0
  71. package/dist/components/file-upload/utils/data-url-to-file.mjs +7 -0
  72. package/dist/components/file-upload/utils/format-accept-types.d.mts +8 -0
  73. package/dist/components/file-upload/utils/format-accept-types.d.ts +8 -0
  74. package/dist/components/file-upload/utils/format-accept-types.js +82 -0
  75. package/dist/components/file-upload/utils/format-accept-types.mjs +7 -0
  76. package/dist/components/file-upload/utils/is-image-like.d.mts +3 -0
  77. package/dist/components/file-upload/utils/is-image-like.d.ts +3 -0
  78. package/dist/components/file-upload/utils/is-image-like.js +36 -0
  79. package/dist/components/file-upload/utils/is-image-like.mjs +7 -0
  80. package/dist/components/index.d.mts +67 -0
  81. package/dist/components/index.d.ts +67 -0
  82. package/dist/components/index.js +1137 -0
  83. package/dist/components/index.mjs +92 -0
  84. package/dist/components/skeleton/index.d.mts +5 -0
  85. package/dist/components/skeleton/index.d.ts +5 -0
  86. package/dist/components/skeleton/index.js +53 -0
  87. package/dist/components/skeleton/index.mjs +12 -0
  88. package/dist/components/skeleton/skeleton-avatar.d.mts +9 -0
  89. package/dist/components/skeleton/skeleton-avatar.d.ts +9 -0
  90. package/dist/components/skeleton/skeleton-avatar.js +51 -0
  91. package/dist/components/skeleton/skeleton-avatar.mjs +8 -0
  92. package/dist/components/skeleton/skeleton.d.mts +7 -0
  93. package/dist/components/skeleton/skeleton.d.ts +7 -0
  94. package/dist/components/skeleton/skeleton.js +39 -0
  95. package/dist/components/skeleton/skeleton.mjs +7 -0
  96. package/dist/components/stat/index.d.mts +4 -0
  97. package/dist/components/stat/index.d.ts +4 -0
  98. package/dist/components/stat/index.js +186 -0
  99. package/dist/components/stat/index.mjs +24 -0
  100. package/dist/components/stat/stat.d.mts +36 -0
  101. package/dist/components/stat/stat.d.ts +36 -0
  102. package/dist/components/stat/stat.js +185 -0
  103. package/dist/components/stat/stat.mjs +24 -0
  104. package/dist/components/textarea/index.d.mts +4 -0
  105. package/dist/components/textarea/index.d.ts +4 -0
  106. package/dist/components/textarea/index.js +42 -0
  107. package/dist/components/textarea/index.mjs +8 -0
  108. package/dist/components/textarea/textarea.d.mts +8 -0
  109. package/dist/components/textarea/textarea.d.ts +8 -0
  110. package/dist/components/textarea/textarea.js +40 -0
  111. package/dist/components/textarea/textarea.mjs +7 -0
  112. package/dist/hooks/index.d.mts +2 -0
  113. package/dist/hooks/index.d.ts +2 -0
  114. package/dist/hooks/index.js +341 -0
  115. package/dist/hooks/index.mjs +9 -0
  116. package/dist/hooks/use-file-upload/index.d.mts +47 -0
  117. package/dist/hooks/use-file-upload/index.d.ts +47 -0
  118. package/dist/hooks/use-file-upload/index.js +340 -0
  119. package/dist/hooks/use-file-upload/index.mjs +9 -0
  120. package/dist/hooks/use-file-upload/messages.d.mts +19 -0
  121. package/dist/hooks/use-file-upload/messages.d.ts +19 -0
  122. package/dist/hooks/use-file-upload/messages.js +48 -0
  123. package/dist/hooks/use-file-upload/messages.mjs +7 -0
  124. package/dist/index.d.mts +14 -8
  125. package/dist/index.d.ts +14 -8
  126. package/dist/index.js +1108 -32
  127. package/dist/index.mjs +82 -18
  128. package/dist/index.ts.backup.d.mts +14 -8
  129. package/dist/index.ts.backup.d.ts +14 -8
  130. package/dist/index.ts.backup.js +1108 -32
  131. package/dist/index.ts.backup.mjs +82 -18
  132. package/package.json +60 -64
@@ -0,0 +1,213 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/dialog/dialog.tsx
22
+ var dialog_exports = {};
23
+ __export(dialog_exports, {
24
+ DialogBody: () => DialogBody,
25
+ DialogClose: () => DialogClose,
26
+ DialogCloseTrigger: () => DialogCloseTrigger,
27
+ DialogContent: () => DialogContent,
28
+ DialogDescription: () => DialogDescription,
29
+ DialogFooter: () => DialogFooter,
30
+ DialogHeader: () => DialogHeader,
31
+ DialogOverlay: () => DialogOverlay,
32
+ DialogPortal: () => DialogPortal,
33
+ DialogRoot: () => DialogRoot,
34
+ DialogTitle: () => DialogTitle,
35
+ DialogTrigger: () => DialogTrigger,
36
+ useDialogContext: () => useDialogContext
37
+ });
38
+ module.exports = __toCommonJS(dialog_exports);
39
+ var import_dialog = require("@base-ui/react/dialog");
40
+ var import_icons = require("@kopexa/icons");
41
+ var import_react_utils = require("@kopexa/react-utils");
42
+ var import_shared_utils = require("@kopexa/shared-utils");
43
+ var import_theme = require("@kopexa/theme");
44
+ var import_use_controllable_state = require("@kopexa/use-controllable-state");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ var [DialogProvider, useDialogContext] = (0, import_react_utils.createContext)();
47
+ var DialogRoot = (props) => {
48
+ const {
49
+ open: openProp,
50
+ onOpenChange,
51
+ size,
52
+ radius,
53
+ placement,
54
+ scrollBehavior,
55
+ ...restProps
56
+ } = props;
57
+ const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
58
+ value: openProp,
59
+ onChange: onOpenChange,
60
+ defaultValue: false
61
+ });
62
+ const styles = (0, import_theme.dialog)({ size, radius, placement, scrollBehavior });
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, { value: { styles, open, placement, size, radius }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ import_dialog.Dialog.Root,
65
+ {
66
+ "data-slot": "dialog",
67
+ open,
68
+ onOpenChange: (open2) => setOpen(open2),
69
+ ...restProps
70
+ }
71
+ ) });
72
+ };
73
+ function DialogTrigger({ ...props }) {
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
75
+ }
76
+ function DialogPortal({ ...props }) {
77
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
78
+ }
79
+ function DialogClose({ ...props }) {
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
81
+ }
82
+ function DialogOverlay({ className, ...props }) {
83
+ const { styles } = useDialogContext();
84
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
+ import_dialog.Dialog.Backdrop,
86
+ {
87
+ "data-slot": "dialog-overlay",
88
+ className: (0, import_shared_utils.cn)(styles.overlay(), className),
89
+ ...props
90
+ }
91
+ );
92
+ }
93
+ function DialogContent({
94
+ className,
95
+ children,
96
+ showCloseButton = true,
97
+ ...props
98
+ }) {
99
+ const { styles } = useDialogContext();
100
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
103
+ import_dialog.Dialog.Popup,
104
+ {
105
+ "data-slot": "dialog-content",
106
+ className: (0, import_shared_utils.cn)(styles.content(), className),
107
+ ...props,
108
+ children: [
109
+ children,
110
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
111
+ import_dialog.Dialog.Close,
112
+ {
113
+ "data-slot": "dialog-close",
114
+ className: styles.close(),
115
+ children: [
116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
118
+ ]
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ )
124
+ ] });
125
+ }
126
+ function DialogHeader({ className, ...props }) {
127
+ const { styles } = useDialogContext();
128
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
+ "div",
130
+ {
131
+ "data-slot": "dialog-header",
132
+ className: styles.header({ className }),
133
+ ...props
134
+ }
135
+ );
136
+ }
137
+ function DialogFooter({ className, ...props }) {
138
+ const { styles } = useDialogContext();
139
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
+ "div",
141
+ {
142
+ "data-slot": "dialog-footer",
143
+ className: styles.footer({ className }),
144
+ ...props
145
+ }
146
+ );
147
+ }
148
+ function DialogBody({ className, ...props }) {
149
+ const { styles } = useDialogContext();
150
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
151
+ "div",
152
+ {
153
+ "data-slot": "dialog-body",
154
+ className: styles.body({ className }),
155
+ ...props
156
+ }
157
+ );
158
+ }
159
+ function DialogTitle({ className, ...props }) {
160
+ const { styles } = useDialogContext();
161
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
162
+ import_dialog.Dialog.Title,
163
+ {
164
+ "data-slot": "dialog-title",
165
+ className: (0, import_shared_utils.cn)(styles.title(), className),
166
+ ...props
167
+ }
168
+ );
169
+ }
170
+ function DialogDescription({
171
+ className,
172
+ ...props
173
+ }) {
174
+ const { styles } = useDialogContext();
175
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
176
+ import_dialog.Dialog.Description,
177
+ {
178
+ "data-slot": "dialog-description",
179
+ className: (0, import_shared_utils.cn)(styles.description(), className),
180
+ ...props
181
+ }
182
+ );
183
+ }
184
+ function DialogCloseTrigger({
185
+ className,
186
+ ...props
187
+ }) {
188
+ const { styles } = useDialogContext();
189
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
190
+ import_dialog.Dialog.Close,
191
+ {
192
+ "data-slot": "dialog-close-trigger",
193
+ className: (0, import_shared_utils.cn)(styles.closeTrigger(), className),
194
+ ...props
195
+ }
196
+ );
197
+ }
198
+ // Annotate the CommonJS export names for ESM import in node:
199
+ 0 && (module.exports = {
200
+ DialogBody,
201
+ DialogClose,
202
+ DialogCloseTrigger,
203
+ DialogContent,
204
+ DialogDescription,
205
+ DialogFooter,
206
+ DialogHeader,
207
+ DialogOverlay,
208
+ DialogPortal,
209
+ DialogRoot,
210
+ DialogTitle,
211
+ DialogTrigger,
212
+ useDialogContext
213
+ });
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import {
3
+ DialogBody,
4
+ DialogClose,
5
+ DialogCloseTrigger,
6
+ DialogContent,
7
+ DialogDescription,
8
+ DialogFooter,
9
+ DialogHeader,
10
+ DialogOverlay,
11
+ DialogPortal,
12
+ DialogRoot,
13
+ DialogTitle,
14
+ DialogTrigger,
15
+ useDialogContext
16
+ } from "../../chunk-SHETEVHO.mjs";
17
+ export {
18
+ DialogBody,
19
+ DialogClose,
20
+ DialogCloseTrigger,
21
+ DialogContent,
22
+ DialogDescription,
23
+ DialogFooter,
24
+ DialogHeader,
25
+ DialogOverlay,
26
+ DialogPortal,
27
+ DialogRoot,
28
+ DialogTitle,
29
+ DialogTrigger,
30
+ useDialogContext
31
+ };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { DialogRootProps, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './dialog.mjs';
3
+ export { DialogBodyProps, DialogClose, DialogCloseProps, DialogCloseTriggerProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogPortalProps, DialogRoot, DialogTitleProps, DialogTriggerProps, useDialogContext } from './dialog.mjs';
4
+ import '@base-ui/react/dialog';
5
+ import '@kopexa/theme';
6
+ import 'react';
7
+
8
+ declare const Dialog: ((props: DialogRootProps) => react_jsx_runtime.JSX.Element) & {
9
+ Root: (props: DialogRootProps) => react_jsx_runtime.JSX.Element;
10
+ Body: typeof DialogBody;
11
+ CloseTrigger: typeof DialogCloseTrigger;
12
+ Content: typeof DialogContent;
13
+ Description: typeof DialogDescription;
14
+ Footer: typeof DialogFooter;
15
+ Header: typeof DialogHeader;
16
+ Overlay: typeof DialogOverlay;
17
+ Portal: typeof DialogPortal;
18
+ Title: typeof DialogTitle;
19
+ Trigger: typeof DialogTrigger;
20
+ };
21
+
22
+ export { Dialog, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRootProps, DialogTitle, DialogTrigger };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { DialogRootProps, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './dialog.js';
3
+ export { DialogBodyProps, DialogClose, DialogCloseProps, DialogCloseTriggerProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogPortalProps, DialogRoot, DialogTitleProps, DialogTriggerProps, useDialogContext } from './dialog.js';
4
+ import '@base-ui/react/dialog';
5
+ import '@kopexa/theme';
6
+ import 'react';
7
+
8
+ declare const Dialog: ((props: DialogRootProps) => react_jsx_runtime.JSX.Element) & {
9
+ Root: (props: DialogRootProps) => react_jsx_runtime.JSX.Element;
10
+ Body: typeof DialogBody;
11
+ CloseTrigger: typeof DialogCloseTrigger;
12
+ Content: typeof DialogContent;
13
+ Description: typeof DialogDescription;
14
+ Footer: typeof DialogFooter;
15
+ Header: typeof DialogHeader;
16
+ Overlay: typeof DialogOverlay;
17
+ Portal: typeof DialogPortal;
18
+ Title: typeof DialogTitle;
19
+ Trigger: typeof DialogTrigger;
20
+ };
21
+
22
+ export { Dialog, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRootProps, DialogTitle, DialogTrigger };
@@ -0,0 +1,232 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/dialog/index.ts
22
+ var dialog_exports = {};
23
+ __export(dialog_exports, {
24
+ Dialog: () => Dialog,
25
+ DialogBody: () => DialogBody,
26
+ DialogClose: () => DialogClose,
27
+ DialogCloseTrigger: () => DialogCloseTrigger,
28
+ DialogContent: () => DialogContent,
29
+ DialogDescription: () => DialogDescription,
30
+ DialogFooter: () => DialogFooter,
31
+ DialogHeader: () => DialogHeader,
32
+ DialogOverlay: () => DialogOverlay,
33
+ DialogPortal: () => DialogPortal,
34
+ DialogRoot: () => DialogRoot,
35
+ DialogTitle: () => DialogTitle,
36
+ DialogTrigger: () => DialogTrigger,
37
+ useDialogContext: () => useDialogContext
38
+ });
39
+ module.exports = __toCommonJS(dialog_exports);
40
+
41
+ // src/components/dialog/dialog.tsx
42
+ var import_dialog = require("@base-ui/react/dialog");
43
+ var import_icons = require("@kopexa/icons");
44
+ var import_react_utils = require("@kopexa/react-utils");
45
+ var import_shared_utils = require("@kopexa/shared-utils");
46
+ var import_theme = require("@kopexa/theme");
47
+ var import_use_controllable_state = require("@kopexa/use-controllable-state");
48
+ var import_jsx_runtime = require("react/jsx-runtime");
49
+ var [DialogProvider, useDialogContext] = (0, import_react_utils.createContext)();
50
+ var DialogRoot = (props) => {
51
+ const {
52
+ open: openProp,
53
+ onOpenChange,
54
+ size,
55
+ radius,
56
+ placement,
57
+ scrollBehavior,
58
+ ...restProps
59
+ } = props;
60
+ const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
61
+ value: openProp,
62
+ onChange: onOpenChange,
63
+ defaultValue: false
64
+ });
65
+ const styles = (0, import_theme.dialog)({ size, radius, placement, scrollBehavior });
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, { value: { styles, open, placement, size, radius }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ import_dialog.Dialog.Root,
68
+ {
69
+ "data-slot": "dialog",
70
+ open,
71
+ onOpenChange: (open2) => setOpen(open2),
72
+ ...restProps
73
+ }
74
+ ) });
75
+ };
76
+ function DialogTrigger({ ...props }) {
77
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
78
+ }
79
+ function DialogPortal({ ...props }) {
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
81
+ }
82
+ function DialogClose({ ...props }) {
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
84
+ }
85
+ function DialogOverlay({ className, ...props }) {
86
+ const { styles } = useDialogContext();
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ import_dialog.Dialog.Backdrop,
89
+ {
90
+ "data-slot": "dialog-overlay",
91
+ className: (0, import_shared_utils.cn)(styles.overlay(), className),
92
+ ...props
93
+ }
94
+ );
95
+ }
96
+ function DialogContent({
97
+ className,
98
+ children,
99
+ showCloseButton = true,
100
+ ...props
101
+ }) {
102
+ const { styles } = useDialogContext();
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
106
+ import_dialog.Dialog.Popup,
107
+ {
108
+ "data-slot": "dialog-content",
109
+ className: (0, import_shared_utils.cn)(styles.content(), className),
110
+ ...props,
111
+ children: [
112
+ children,
113
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
114
+ import_dialog.Dialog.Close,
115
+ {
116
+ "data-slot": "dialog-close",
117
+ className: styles.close(),
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
120
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
121
+ ]
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ )
127
+ ] });
128
+ }
129
+ function DialogHeader({ className, ...props }) {
130
+ const { styles } = useDialogContext();
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
+ "div",
133
+ {
134
+ "data-slot": "dialog-header",
135
+ className: styles.header({ className }),
136
+ ...props
137
+ }
138
+ );
139
+ }
140
+ function DialogFooter({ className, ...props }) {
141
+ const { styles } = useDialogContext();
142
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
143
+ "div",
144
+ {
145
+ "data-slot": "dialog-footer",
146
+ className: styles.footer({ className }),
147
+ ...props
148
+ }
149
+ );
150
+ }
151
+ function DialogBody({ className, ...props }) {
152
+ const { styles } = useDialogContext();
153
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
154
+ "div",
155
+ {
156
+ "data-slot": "dialog-body",
157
+ className: styles.body({ className }),
158
+ ...props
159
+ }
160
+ );
161
+ }
162
+ function DialogTitle({ className, ...props }) {
163
+ const { styles } = useDialogContext();
164
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
+ import_dialog.Dialog.Title,
166
+ {
167
+ "data-slot": "dialog-title",
168
+ className: (0, import_shared_utils.cn)(styles.title(), className),
169
+ ...props
170
+ }
171
+ );
172
+ }
173
+ function DialogDescription({
174
+ className,
175
+ ...props
176
+ }) {
177
+ const { styles } = useDialogContext();
178
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
179
+ import_dialog.Dialog.Description,
180
+ {
181
+ "data-slot": "dialog-description",
182
+ className: (0, import_shared_utils.cn)(styles.description(), className),
183
+ ...props
184
+ }
185
+ );
186
+ }
187
+ function DialogCloseTrigger({
188
+ className,
189
+ ...props
190
+ }) {
191
+ const { styles } = useDialogContext();
192
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
193
+ import_dialog.Dialog.Close,
194
+ {
195
+ "data-slot": "dialog-close-trigger",
196
+ className: (0, import_shared_utils.cn)(styles.closeTrigger(), className),
197
+ ...props
198
+ }
199
+ );
200
+ }
201
+
202
+ // src/components/dialog/index.ts
203
+ var Dialog = Object.assign(DialogRoot, {
204
+ Root: DialogRoot,
205
+ Body: DialogBody,
206
+ CloseTrigger: DialogCloseTrigger,
207
+ Content: DialogContent,
208
+ Description: DialogDescription,
209
+ Footer: DialogFooter,
210
+ Header: DialogHeader,
211
+ Overlay: DialogOverlay,
212
+ Portal: DialogPortal,
213
+ Title: DialogTitle,
214
+ Trigger: DialogTrigger
215
+ });
216
+ // Annotate the CommonJS export names for ESM import in node:
217
+ 0 && (module.exports = {
218
+ Dialog,
219
+ DialogBody,
220
+ DialogClose,
221
+ DialogCloseTrigger,
222
+ DialogContent,
223
+ DialogDescription,
224
+ DialogFooter,
225
+ DialogHeader,
226
+ DialogOverlay,
227
+ DialogPortal,
228
+ DialogRoot,
229
+ DialogTitle,
230
+ DialogTrigger,
231
+ useDialogContext
232
+ });
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import {
3
+ Dialog
4
+ } from "../../chunk-CZNF6WPR.mjs";
5
+ import {
6
+ DialogBody,
7
+ DialogClose,
8
+ DialogCloseTrigger,
9
+ DialogContent,
10
+ DialogDescription,
11
+ DialogFooter,
12
+ DialogHeader,
13
+ DialogOverlay,
14
+ DialogPortal,
15
+ DialogRoot,
16
+ DialogTitle,
17
+ DialogTrigger,
18
+ useDialogContext
19
+ } from "../../chunk-SHETEVHO.mjs";
20
+ export {
21
+ Dialog,
22
+ DialogBody,
23
+ DialogClose,
24
+ DialogCloseTrigger,
25
+ DialogContent,
26
+ DialogDescription,
27
+ DialogFooter,
28
+ DialogHeader,
29
+ DialogOverlay,
30
+ DialogPortal,
31
+ DialogRoot,
32
+ DialogTitle,
33
+ DialogTrigger,
34
+ useDialogContext
35
+ };
@@ -0,0 +1,5 @@
1
+ export { DialogBody as Body, DialogBodyProps as BodyProps, DialogClose as Close, DialogCloseProps as CloseProps, DialogCloseTrigger as CloseTrigger, DialogCloseTriggerProps as CloseTriggerProps, DialogContent as Content, DialogContentProps as ContentProps, DialogDescription as Description, DialogDescriptionProps as DescriptionProps, DialogFooter as Footer, DialogFooterProps as FooterProps, DialogHeader as Header, DialogHeaderProps as HeaderProps, DialogOverlay as Overlay, DialogOverlayProps as OverlayProps, DialogPortal as Portal, DialogPortalProps as PortalProps, DialogRoot as Root, DialogRootProps as RootProps, DialogTitle as Title, DialogTitleProps as TitleProps, DialogTrigger as Trigger, DialogTriggerProps as TriggerProps } from './dialog.mjs';
2
+ import 'react/jsx-runtime';
3
+ import '@base-ui/react/dialog';
4
+ import '@kopexa/theme';
5
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { DialogBody as Body, DialogBodyProps as BodyProps, DialogClose as Close, DialogCloseProps as CloseProps, DialogCloseTrigger as CloseTrigger, DialogCloseTriggerProps as CloseTriggerProps, DialogContent as Content, DialogContentProps as ContentProps, DialogDescription as Description, DialogDescriptionProps as DescriptionProps, DialogFooter as Footer, DialogFooterProps as FooterProps, DialogHeader as Header, DialogHeaderProps as HeaderProps, DialogOverlay as Overlay, DialogOverlayProps as OverlayProps, DialogPortal as Portal, DialogPortalProps as PortalProps, DialogRoot as Root, DialogRootProps as RootProps, DialogTitle as Title, DialogTitleProps as TitleProps, DialogTrigger as Trigger, DialogTriggerProps as TriggerProps } from './dialog.js';
2
+ import 'react/jsx-runtime';
3
+ import '@base-ui/react/dialog';
4
+ import '@kopexa/theme';
5
+ import 'react';