@docubook/ui-react 0.1.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 (80) hide show
  1. package/README.md +126 -0
  2. package/dist/breadcrumbs.cjs +13 -0
  3. package/dist/breadcrumbs.d.cts +19 -0
  4. package/dist/breadcrumbs.d.ts +19 -0
  5. package/dist/breadcrumbs.js +14 -0
  6. package/dist/chunk-42YUT467.cjs +41 -0
  7. package/dist/chunk-4DCBYM74.js +42 -0
  8. package/dist/chunk-54N6HTQV.cjs +49 -0
  9. package/dist/chunk-7HHY2WDF.cjs +43 -0
  10. package/dist/chunk-ACEM5N2Y.cjs +123 -0
  11. package/dist/chunk-BCJ3FW3Y.cjs +66 -0
  12. package/dist/chunk-EJCGJCVK.cjs +89 -0
  13. package/dist/chunk-EN2X23AN.cjs +330 -0
  14. package/dist/chunk-FGJ6EYLA.js +90 -0
  15. package/dist/chunk-HTNZRBKW.js +67 -0
  16. package/dist/chunk-I4CZWV3M.js +124 -0
  17. package/dist/chunk-IBKH77YN.js +50 -0
  18. package/dist/chunk-KHU72DOY.cjs +25 -0
  19. package/dist/chunk-LJV3UIMK.cjs +53 -0
  20. package/dist/chunk-LUO4YXRQ.js +38 -0
  21. package/dist/chunk-NJKWNMJF.js +44 -0
  22. package/dist/chunk-OB6B2KN5.js +54 -0
  23. package/dist/chunk-OKMEBWPL.cjs +133 -0
  24. package/dist/chunk-PB4SHWMJ.cjs +101 -0
  25. package/dist/chunk-Q55KNNKE.js +26 -0
  26. package/dist/chunk-QZH7EIFW.js +134 -0
  27. package/dist/chunk-VRODU4ZV.cjs +37 -0
  28. package/dist/chunk-W5G2ZBYA.js +102 -0
  29. package/dist/chunk-ZMIZV66S.js +331 -0
  30. package/dist/cn.cjs +6 -0
  31. package/dist/cn.d.cts +4 -0
  32. package/dist/cn.d.ts +4 -0
  33. package/dist/cn.js +7 -0
  34. package/dist/collapse.cjs +12 -0
  35. package/dist/collapse.d.cts +31 -0
  36. package/dist/collapse.d.ts +31 -0
  37. package/dist/collapse.js +13 -0
  38. package/dist/drawer.cjs +16 -0
  39. package/dist/drawer.d.cts +44 -0
  40. package/dist/drawer.d.ts +44 -0
  41. package/dist/drawer.js +17 -0
  42. package/dist/dropdown.cjs +12 -0
  43. package/dist/dropdown.d.cts +20 -0
  44. package/dist/dropdown.d.ts +20 -0
  45. package/dist/dropdown.js +13 -0
  46. package/dist/index.cjs +96 -0
  47. package/dist/index.d.cts +15 -0
  48. package/dist/index.d.ts +15 -0
  49. package/dist/index.js +97 -0
  50. package/dist/input.cjs +9 -0
  51. package/dist/input.d.cts +17 -0
  52. package/dist/input.d.ts +17 -0
  53. package/dist/input.js +10 -0
  54. package/dist/kbd.cjs +9 -0
  55. package/dist/kbd.d.cts +27 -0
  56. package/dist/kbd.d.ts +27 -0
  57. package/dist/kbd.js +10 -0
  58. package/dist/modal.cjs +10 -0
  59. package/dist/modal.d.cts +17 -0
  60. package/dist/modal.d.ts +17 -0
  61. package/dist/modal.js +11 -0
  62. package/dist/navbar.cjs +13 -0
  63. package/dist/navbar.d.cts +36 -0
  64. package/dist/navbar.d.ts +36 -0
  65. package/dist/navbar.js +14 -0
  66. package/dist/pagination.cjs +20 -0
  67. package/dist/pagination.d.cts +88 -0
  68. package/dist/pagination.d.ts +88 -0
  69. package/dist/pagination.js +21 -0
  70. package/dist/theme-controller.cjs +8 -0
  71. package/dist/theme-controller.d.cts +21 -0
  72. package/dist/theme-controller.d.ts +21 -0
  73. package/dist/theme-controller.js +9 -0
  74. package/dist/toggle.cjs +10 -0
  75. package/dist/toggle.d.cts +36 -0
  76. package/dist/toggle.d.ts +36 -0
  77. package/dist/toggle.js +11 -0
  78. package/dist/types-BZI5Cv8-.d.cts +6 -0
  79. package/dist/types-BZI5Cv8-.d.ts +6 -0
  80. package/package.json +200 -0
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-NJKWNMJF.js";
5
+
6
+ // src/base/drawer.tsx
7
+ import { useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ function Drawer({
10
+ id,
11
+ children,
12
+ defaultOpen = false,
13
+ side = "left",
14
+ breakpoint = "lg",
15
+ withOverlay = true,
16
+ overlayClassName,
17
+ sideClassName,
18
+ contentClassName,
19
+ className
20
+ }) {
21
+ const [isOpen, setIsOpen] = useState(defaultOpen);
22
+ return /* @__PURE__ */ jsxs(
23
+ "div",
24
+ {
25
+ className: cn(
26
+ "drawer",
27
+ breakpoint && `${breakpoint}:drawer-open`,
28
+ side === "right" && "drawer-end",
29
+ className
30
+ ),
31
+ children: [
32
+ /* @__PURE__ */ jsx(
33
+ "input",
34
+ {
35
+ id,
36
+ type: "checkbox",
37
+ className: "drawer-toggle",
38
+ checked: isOpen,
39
+ onChange: () => setIsOpen(!isOpen),
40
+ "aria-label": "Toggle drawer"
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx("div", { className: cn("drawer-content flex flex-col", contentClassName), children }),
44
+ /* @__PURE__ */ jsx("div", { className: cn("drawer-side", sideClassName), children: withOverlay && /* @__PURE__ */ jsx(
45
+ "label",
46
+ {
47
+ htmlFor: id,
48
+ "aria-label": "Close sidebar",
49
+ className: cn("drawer-overlay", overlayClassName),
50
+ onClick: () => setIsOpen(false)
51
+ }
52
+ ) })
53
+ ]
54
+ }
55
+ );
56
+ }
57
+ function useDrawerState(initialState = false) {
58
+ const [isOpen, setIsOpen] = useState(initialState);
59
+ return {
60
+ isOpen,
61
+ open: () => setIsOpen(true),
62
+ close: () => setIsOpen(false),
63
+ toggle: () => setIsOpen((prev) => !prev)
64
+ };
65
+ }
66
+ function DrawerTrigger({ drawerId, children, className }) {
67
+ return /* @__PURE__ */ jsx("label", { htmlFor: drawerId, className: cn("label cursor-pointer", className), children });
68
+ }
69
+ function DrawerSidePanel({
70
+ id,
71
+ children,
72
+ side = "left",
73
+ withOverlay = true,
74
+ overlayClassName,
75
+ className
76
+ }) {
77
+ return /* @__PURE__ */ jsxs("div", { className: cn("drawer-side", side === "right" && "drawer-end", className), children: [
78
+ withOverlay && /* @__PURE__ */ jsx(
79
+ "label",
80
+ {
81
+ htmlFor: id,
82
+ "aria-label": "Close sidebar",
83
+ className: cn("drawer-overlay", overlayClassName)
84
+ }
85
+ ),
86
+ children
87
+ ] });
88
+ }
89
+ function DrawerContent({
90
+ children,
91
+ className
92
+ }) {
93
+ return /* @__PURE__ */ jsx("div", { className: cn("drawer-content", className), children });
94
+ }
95
+
96
+ export {
97
+ Drawer,
98
+ useDrawerState,
99
+ DrawerTrigger,
100
+ DrawerSidePanel,
101
+ DrawerContent
102
+ };
@@ -0,0 +1,331 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-NJKWNMJF.js";
5
+
6
+ // src/base/pagination.tsx
7
+ import { useMemo } from "react";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ function getPaginationRange({
10
+ totalCount,
11
+ pageSize,
12
+ siblingCount = 1,
13
+ currentPage
14
+ }) {
15
+ const totalPages = Math.ceil(totalCount / pageSize);
16
+ if (totalPages <= 1) return [1];
17
+ const totalPageNumbers = siblingCount + 5;
18
+ if (totalPages < totalPageNumbers) return Array.from({ length: totalPages }, (_, i) => i + 1);
19
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
20
+ const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
21
+ const showLeftDots = leftSiblingIndex > 2;
22
+ const showRightDots = rightSiblingIndex < totalPages - 1;
23
+ if (!showLeftDots && showRightDots)
24
+ return [...Array.from({ length: 3 }, (_, i) => i + 1), "ellipsis", totalPages - 1, totalPages];
25
+ if (showLeftDots && !showRightDots)
26
+ return [1, 2, "ellipsis", ...Array.from({ length: 3 }, (_, i) => totalPages - 2 + i)];
27
+ if (showLeftDots && showRightDots) {
28
+ const middle = Array.from(
29
+ { length: rightSiblingIndex - leftSiblingIndex + 1 },
30
+ (_, i) => leftSiblingIndex + i
31
+ );
32
+ return [1, 2, "ellipsis", ...middle, "ellipsis", totalPages - 1, totalPages];
33
+ }
34
+ return [1];
35
+ }
36
+ function variantClass(variant) {
37
+ if (variant === "square") return "[&_.join-item]:btn-square";
38
+ if (variant === "rounded") return "[&_.join-item]:btn-circle";
39
+ return "";
40
+ }
41
+ function PaginationItem({
42
+ children,
43
+ active,
44
+ disabled,
45
+ onClick,
46
+ className,
47
+ size = "md",
48
+ "aria-label": ariaLabel
49
+ }) {
50
+ const sizeClass = size === "lg" ? "btn-lg" : size === "sm" ? "btn-sm" : size === "xs" ? "btn-xs" : "";
51
+ return /* @__PURE__ */ jsx(
52
+ "button",
53
+ {
54
+ type: "button",
55
+ className: cn(
56
+ "join-item btn",
57
+ sizeClass,
58
+ active && "btn-active",
59
+ disabled && "btn-disabled",
60
+ className
61
+ ),
62
+ onClick,
63
+ disabled,
64
+ "aria-label": ariaLabel,
65
+ "aria-current": active ? "page" : void 0,
66
+ children
67
+ }
68
+ );
69
+ }
70
+ function PaginationButtons({
71
+ page,
72
+ totalPages,
73
+ onPageChange,
74
+ className,
75
+ size = "md",
76
+ showFirstLast = false,
77
+ showPrevNext = true,
78
+ prevLabel,
79
+ nextLabel,
80
+ firstLabel,
81
+ lastLabel,
82
+ disabled = false
83
+ }) {
84
+ const sizeClass = size !== "md" ? `btn-${size}` : "";
85
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
86
+ showFirstLast && /* @__PURE__ */ jsx(
87
+ "button",
88
+ {
89
+ type: "button",
90
+ className: cn("join-item btn", sizeClass, className),
91
+ onClick: () => onPageChange(1),
92
+ disabled: disabled || page <= 1,
93
+ "aria-label": firstLabel != null ? firstLabel : "First page",
94
+ children: firstLabel != null ? firstLabel : "\xAB"
95
+ }
96
+ ),
97
+ showPrevNext && /* @__PURE__ */ jsx(
98
+ "button",
99
+ {
100
+ type: "button",
101
+ className: cn("join-item btn", sizeClass, className),
102
+ onClick: () => onPageChange(page - 1),
103
+ disabled: disabled || page <= 1,
104
+ "aria-label": prevLabel != null ? prevLabel : "Previous page",
105
+ children: prevLabel != null ? prevLabel : "\u2039"
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsxs("span", { className: "join-item btn btn-disabled no-animation cursor-default", children: [
109
+ page,
110
+ " / ",
111
+ totalPages
112
+ ] }),
113
+ showPrevNext && /* @__PURE__ */ jsx(
114
+ "button",
115
+ {
116
+ type: "button",
117
+ className: cn("join-item btn", sizeClass, className),
118
+ onClick: () => onPageChange(page + 1),
119
+ disabled: disabled || page >= totalPages,
120
+ "aria-label": nextLabel != null ? nextLabel : "Next page",
121
+ children: nextLabel != null ? nextLabel : "\u203A"
122
+ }
123
+ ),
124
+ showFirstLast && /* @__PURE__ */ jsx(
125
+ "button",
126
+ {
127
+ type: "button",
128
+ className: cn("join-item btn", sizeClass, className),
129
+ onClick: () => onPageChange(totalPages),
130
+ disabled: disabled || page >= totalPages,
131
+ "aria-label": lastLabel != null ? lastLabel : "Last page",
132
+ children: lastLabel != null ? lastLabel : "\xBB"
133
+ }
134
+ )
135
+ ] });
136
+ }
137
+ function PaginationRange({
138
+ start,
139
+ end,
140
+ total,
141
+ current,
142
+ onPageChange,
143
+ siblingCount = 1,
144
+ className,
145
+ size = "md",
146
+ variant
147
+ }) {
148
+ const range = useMemo(
149
+ () => getPaginationRange({
150
+ totalCount: total,
151
+ pageSize: end - start + 1,
152
+ siblingCount,
153
+ currentPage: current
154
+ }),
155
+ [total, start, end, siblingCount, current]
156
+ );
157
+ const sizeClass = size === "lg" ? "join-lg" : size === "sm" ? "join-sm" : size === "xs" ? "join-xs" : "";
158
+ return /* @__PURE__ */ jsx("div", { className: cn("join", sizeClass, variantClass(variant), className), children: range.map(
159
+ (item, i) => item === "ellipsis" ? /* @__PURE__ */ jsx("span", { className: "join-item btn btn-disabled no-animation", children: "..." }, `e-${i}`) : /* @__PURE__ */ jsx(
160
+ "button",
161
+ {
162
+ type: "button",
163
+ className: cn(
164
+ "join-item btn",
165
+ item === current && "btn-active",
166
+ size !== "md" && `btn-${size}`
167
+ ),
168
+ onClick: () => onPageChange(item),
169
+ "aria-current": item === current ? "page" : void 0,
170
+ children: item
171
+ },
172
+ item
173
+ )
174
+ ) });
175
+ }
176
+ function PaginationInfo({
177
+ current,
178
+ total,
179
+ pageSize = 10,
180
+ className,
181
+ label = "Showing",
182
+ showTotal = true
183
+ }) {
184
+ const start = (current - 1) * pageSize + 1;
185
+ const end = Math.min(current * pageSize, total);
186
+ return /* @__PURE__ */ jsxs("div", { className: cn("text-base-content/70 text-sm", className), children: [
187
+ label,
188
+ " ",
189
+ start,
190
+ "-",
191
+ end,
192
+ showTotal && ` of ${total}`
193
+ ] });
194
+ }
195
+ function PaginationFull({
196
+ current,
197
+ total,
198
+ pageSize = 10,
199
+ onPageChange,
200
+ siblingCount = 1,
201
+ className,
202
+ size = "md",
203
+ variant,
204
+ showFirstLast = true,
205
+ showPrevNext = true,
206
+ infoClassName
207
+ }) {
208
+ const totalPages = Math.ceil(total / pageSize);
209
+ const range = useMemo(
210
+ () => getPaginationRange({ totalCount: total, pageSize, siblingCount, currentPage: current }),
211
+ [total, pageSize, siblingCount, current]
212
+ );
213
+ const sizeClass = size === "lg" ? "join-lg" : size === "sm" ? "join-sm" : size === "xs" ? "join-xs" : "";
214
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center justify-between gap-4 sm:flex-row", className), children: [
215
+ /* @__PURE__ */ jsx(
216
+ PaginationInfo,
217
+ {
218
+ current,
219
+ total,
220
+ pageSize,
221
+ className: infoClassName
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsxs("div", { className: cn("join", sizeClass, variantClass(variant)), children: [
225
+ showFirstLast && /* @__PURE__ */ jsx(
226
+ "button",
227
+ {
228
+ type: "button",
229
+ className: cn("join-item btn", size !== "md" && `btn-${size}`),
230
+ onClick: () => onPageChange(1),
231
+ disabled: current <= 1,
232
+ "aria-label": "First page",
233
+ children: "\xAB"
234
+ }
235
+ ),
236
+ showPrevNext && /* @__PURE__ */ jsx(
237
+ "button",
238
+ {
239
+ type: "button",
240
+ className: cn("join-item btn", size !== "md" && `btn-${size}`),
241
+ onClick: () => onPageChange(current - 1),
242
+ disabled: current <= 1,
243
+ "aria-label": "Previous page",
244
+ children: "\u2039"
245
+ }
246
+ ),
247
+ range.map(
248
+ (item, i) => item === "ellipsis" ? /* @__PURE__ */ jsx("span", { className: "join-item btn btn-disabled no-animation", children: "..." }, `e-${i}`) : /* @__PURE__ */ jsx(
249
+ "button",
250
+ {
251
+ type: "button",
252
+ className: cn(
253
+ "join-item btn",
254
+ item === current && "btn-active",
255
+ size !== "md" && `btn-${size}`
256
+ ),
257
+ onClick: () => onPageChange(item),
258
+ "aria-current": item === current ? "page" : void 0,
259
+ children: item
260
+ },
261
+ item
262
+ )
263
+ ),
264
+ showPrevNext && /* @__PURE__ */ jsx(
265
+ "button",
266
+ {
267
+ type: "button",
268
+ className: cn("join-item btn", size !== "md" && `btn-${size}`),
269
+ onClick: () => onPageChange(current + 1),
270
+ disabled: current >= totalPages,
271
+ "aria-label": "Next page",
272
+ children: "\u203A"
273
+ }
274
+ ),
275
+ showFirstLast && /* @__PURE__ */ jsx(
276
+ "button",
277
+ {
278
+ type: "button",
279
+ className: cn("join-item btn", size !== "md" && `btn-${size}`),
280
+ onClick: () => onPageChange(totalPages),
281
+ disabled: current >= totalPages,
282
+ "aria-label": "Last page",
283
+ children: "\xBB"
284
+ }
285
+ )
286
+ ] })
287
+ ] });
288
+ }
289
+ function PaginationDocs({
290
+ prev,
291
+ next,
292
+ className,
293
+ prevIcon,
294
+ nextIcon,
295
+ linkClassName
296
+ }) {
297
+ const linkBase = "flex flex-col no-underline rounded-lg border border-base-300 bg-base-100 transition-colors hover:bg-base-200 hover:border-base-300";
298
+ return /* @__PURE__ */ jsxs("div", { className: cn("grid grow grid-cols-1 gap-4 py-8 sm:grid-cols-2", className), children: [
299
+ /* @__PURE__ */ jsx("div", { children: prev && /* @__PURE__ */ jsxs("a", { href: prev.href, className: cn(linkBase, "items-start px-4 py-4", linkClassName), children: [
300
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground flex items-center justify-start text-xs", children: [
301
+ prevIcon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: prevIcon }),
302
+ "Previous"
303
+ ] }),
304
+ /* @__PURE__ */ jsx("span", { className: "text-base-content mt-1 text-sm font-medium", children: prev.title })
305
+ ] }) }),
306
+ /* @__PURE__ */ jsx("div", { children: next && /* @__PURE__ */ jsxs(
307
+ "a",
308
+ {
309
+ href: next.href,
310
+ className: cn(linkBase, "items-end px-4 py-4 text-right", linkClassName),
311
+ children: [
312
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground flex items-center justify-end text-xs", children: [
313
+ "Next",
314
+ nextIcon && /* @__PURE__ */ jsx("span", { className: "ml-1", children: nextIcon })
315
+ ] }),
316
+ /* @__PURE__ */ jsx("span", { className: "text-base-content mt-1 text-sm font-medium", children: next.title })
317
+ ]
318
+ }
319
+ ) })
320
+ ] });
321
+ }
322
+
323
+ export {
324
+ getPaginationRange,
325
+ PaginationItem,
326
+ PaginationButtons,
327
+ PaginationRange,
328
+ PaginationInfo,
329
+ PaginationFull,
330
+ PaginationDocs
331
+ };
package/dist/cn.cjs ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk7HHY2WDFcjs = require('./chunk-7HHY2WDF.cjs');
4
+
5
+
6
+ exports.cn = _chunk7HHY2WDFcjs.cn;
package/dist/cn.d.cts ADDED
@@ -0,0 +1,4 @@
1
+ type ClassValue = string | number | boolean | undefined | null;
2
+ declare function cn(...inputs: ClassValue[]): string;
3
+
4
+ export { cn };
package/dist/cn.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ type ClassValue = string | number | boolean | undefined | null;
2
+ declare function cn(...inputs: ClassValue[]): string;
3
+
4
+ export { cn };
package/dist/cn.js ADDED
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-NJKWNMJF.js";
5
+ export {
6
+ cn
7
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+ var _chunkOKMEBWPLcjs = require('./chunk-OKMEBWPL.cjs');
7
+ require('./chunk-7HHY2WDF.cjs');
8
+
9
+
10
+
11
+
12
+ exports.Accordion = _chunkOKMEBWPLcjs.Accordion; exports.Collapse = _chunkOKMEBWPLcjs.Collapse; exports.default = _chunkOKMEBWPLcjs.collapse_default;
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type CollapseVariant = "arrow" | "plus";
5
+ interface CollapseProps {
6
+ title: ReactNode;
7
+ children: ReactNode;
8
+ defaultOpen?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ variant?: CollapseVariant;
11
+ className?: string;
12
+ titleClassName?: string;
13
+ contentClassName?: string;
14
+ disabled?: boolean;
15
+ }
16
+ declare function Collapse({ title, children, defaultOpen, onOpenChange, variant, className, titleClassName, contentClassName, disabled, }: CollapseProps): react_jsx_runtime.JSX.Element;
17
+ interface AccordionItem {
18
+ id: string;
19
+ title: ReactNode;
20
+ content: ReactNode;
21
+ }
22
+ interface AccordionProps {
23
+ items: AccordionItem[];
24
+ defaultOpen?: string;
25
+ variant?: CollapseVariant;
26
+ className?: string;
27
+ allowMultiple?: boolean;
28
+ }
29
+ declare function Accordion({ items, defaultOpen, variant, className, allowMultiple, }: AccordionProps): react_jsx_runtime.JSX.Element;
30
+
31
+ export { Accordion, type AccordionItem, type AccordionProps, Collapse, type CollapseProps, type CollapseVariant, Collapse as default };
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type CollapseVariant = "arrow" | "plus";
5
+ interface CollapseProps {
6
+ title: ReactNode;
7
+ children: ReactNode;
8
+ defaultOpen?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ variant?: CollapseVariant;
11
+ className?: string;
12
+ titleClassName?: string;
13
+ contentClassName?: string;
14
+ disabled?: boolean;
15
+ }
16
+ declare function Collapse({ title, children, defaultOpen, onOpenChange, variant, className, titleClassName, contentClassName, disabled, }: CollapseProps): react_jsx_runtime.JSX.Element;
17
+ interface AccordionItem {
18
+ id: string;
19
+ title: ReactNode;
20
+ content: ReactNode;
21
+ }
22
+ interface AccordionProps {
23
+ items: AccordionItem[];
24
+ defaultOpen?: string;
25
+ variant?: CollapseVariant;
26
+ className?: string;
27
+ allowMultiple?: boolean;
28
+ }
29
+ declare function Accordion({ items, defaultOpen, variant, className, allowMultiple, }: AccordionProps): react_jsx_runtime.JSX.Element;
30
+
31
+ export { Accordion, type AccordionItem, type AccordionProps, Collapse, type CollapseProps, type CollapseVariant, Collapse as default };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ "use client";
3
+ import {
4
+ Accordion,
5
+ Collapse,
6
+ collapse_default
7
+ } from "./chunk-QZH7EIFW.js";
8
+ import "./chunk-NJKWNMJF.js";
9
+ export {
10
+ Accordion,
11
+ Collapse,
12
+ collapse_default as default
13
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+
7
+
8
+ var _chunkPB4SHWMJcjs = require('./chunk-PB4SHWMJ.cjs');
9
+ require('./chunk-7HHY2WDF.cjs');
10
+
11
+
12
+
13
+
14
+
15
+
16
+ exports.Drawer = _chunkPB4SHWMJcjs.Drawer; exports.DrawerContent = _chunkPB4SHWMJcjs.DrawerContent; exports.DrawerSidePanel = _chunkPB4SHWMJcjs.DrawerSidePanel; exports.DrawerTrigger = _chunkPB4SHWMJcjs.DrawerTrigger; exports.useDrawerState = _chunkPB4SHWMJcjs.useDrawerState;
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { S as Side } from './types-BZI5Cv8-.cjs';
4
+
5
+ interface DrawerProps {
6
+ id: string;
7
+ children: ReactNode;
8
+ defaultOpen?: boolean;
9
+ side?: Side;
10
+ breakpoint?: string;
11
+ withOverlay?: boolean;
12
+ overlayClassName?: string;
13
+ sideClassName?: string;
14
+ contentClassName?: string;
15
+ className?: string;
16
+ }
17
+ declare function Drawer({ id, children, defaultOpen, side, breakpoint, withOverlay, overlayClassName, sideClassName, contentClassName, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
18
+ declare function useDrawerState(initialState?: boolean): {
19
+ isOpen: boolean;
20
+ open: () => void;
21
+ close: () => void;
22
+ toggle: () => void;
23
+ };
24
+ interface DrawerTriggerProps {
25
+ drawerId: string;
26
+ children: ReactNode;
27
+ className?: string;
28
+ }
29
+ declare function DrawerTrigger({ drawerId, children, className }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
30
+ interface DrawerSidePanelProps {
31
+ id: string;
32
+ children: ReactNode;
33
+ side?: Side;
34
+ withOverlay?: boolean;
35
+ overlayClassName?: string;
36
+ className?: string;
37
+ }
38
+ declare function DrawerSidePanel({ id, children, side, withOverlay, overlayClassName, className, }: DrawerSidePanelProps): react_jsx_runtime.JSX.Element;
39
+ declare function DrawerContent({ children, className, }: {
40
+ children: React.ReactNode;
41
+ className?: string;
42
+ }): react_jsx_runtime.JSX.Element;
43
+
44
+ export { Drawer, DrawerContent, type DrawerProps, DrawerSidePanel, type DrawerSidePanelProps, DrawerTrigger, type DrawerTriggerProps, useDrawerState };
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { S as Side } from './types-BZI5Cv8-.js';
4
+
5
+ interface DrawerProps {
6
+ id: string;
7
+ children: ReactNode;
8
+ defaultOpen?: boolean;
9
+ side?: Side;
10
+ breakpoint?: string;
11
+ withOverlay?: boolean;
12
+ overlayClassName?: string;
13
+ sideClassName?: string;
14
+ contentClassName?: string;
15
+ className?: string;
16
+ }
17
+ declare function Drawer({ id, children, defaultOpen, side, breakpoint, withOverlay, overlayClassName, sideClassName, contentClassName, className, }: DrawerProps): react_jsx_runtime.JSX.Element;
18
+ declare function useDrawerState(initialState?: boolean): {
19
+ isOpen: boolean;
20
+ open: () => void;
21
+ close: () => void;
22
+ toggle: () => void;
23
+ };
24
+ interface DrawerTriggerProps {
25
+ drawerId: string;
26
+ children: ReactNode;
27
+ className?: string;
28
+ }
29
+ declare function DrawerTrigger({ drawerId, children, className }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
30
+ interface DrawerSidePanelProps {
31
+ id: string;
32
+ children: ReactNode;
33
+ side?: Side;
34
+ withOverlay?: boolean;
35
+ overlayClassName?: string;
36
+ className?: string;
37
+ }
38
+ declare function DrawerSidePanel({ id, children, side, withOverlay, overlayClassName, className, }: DrawerSidePanelProps): react_jsx_runtime.JSX.Element;
39
+ declare function DrawerContent({ children, className, }: {
40
+ children: React.ReactNode;
41
+ className?: string;
42
+ }): react_jsx_runtime.JSX.Element;
43
+
44
+ export { Drawer, DrawerContent, type DrawerProps, DrawerSidePanel, type DrawerSidePanelProps, DrawerTrigger, type DrawerTriggerProps, useDrawerState };
package/dist/drawer.js ADDED
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ "use client";
3
+ import {
4
+ Drawer,
5
+ DrawerContent,
6
+ DrawerSidePanel,
7
+ DrawerTrigger,
8
+ useDrawerState
9
+ } from "./chunk-W5G2ZBYA.js";
10
+ import "./chunk-NJKWNMJF.js";
11
+ export {
12
+ Drawer,
13
+ DrawerContent,
14
+ DrawerSidePanel,
15
+ DrawerTrigger,
16
+ useDrawerState
17
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+ var _chunkEJCGJCVKcjs = require('./chunk-EJCGJCVK.cjs');
7
+ require('./chunk-7HHY2WDF.cjs');
8
+
9
+
10
+
11
+
12
+ exports.Dropdown = _chunkEJCGJCVKcjs.Dropdown; exports.DropdownItem = _chunkEJCGJCVKcjs.DropdownItem; exports.DropdownLink = _chunkEJCGJCVKcjs.DropdownLink;