asterui 0.12.32 → 0.12.35

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.
@@ -0,0 +1,75 @@
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import R, { forwardRef as k } from "react";
3
+ const I = k(
4
+ ({
5
+ children: n,
6
+ sidebar: i,
7
+ open: s = !1,
8
+ onOpenChange: c,
9
+ end: r = !1,
10
+ width: a = 320,
11
+ responsive: l,
12
+ className: m = "",
13
+ sidebarClassName: w = "",
14
+ contentClassName: p = "",
15
+ overlayClassName: g = "",
16
+ id: f,
17
+ "data-testid": h,
18
+ ...b
19
+ }, v) => {
20
+ const x = R.useId(), o = f || x, y = (B) => {
21
+ c?.(B.target.checked);
22
+ }, C = [
23
+ "drawer",
24
+ r && "drawer-end",
25
+ l && {
26
+ sm: "sm:drawer-open",
27
+ md: "md:drawer-open",
28
+ lg: "lg:drawer-open",
29
+ xl: "xl:drawer-open",
30
+ "2xl": "2xl:drawer-open"
31
+ }[l],
32
+ m
33
+ ].filter(Boolean).join(" "), N = ["bg-base-200 min-h-full p-4", w].filter(Boolean).join(" "), j = ["drawer-content", p].filter(Boolean).join(" "), u = ["drawer-overlay", g].filter(Boolean).join(" "), t = typeof a == "number" ? `${a}px` : a;
34
+ return /* @__PURE__ */ d(
35
+ "div",
36
+ {
37
+ ref: v,
38
+ className: C,
39
+ "data-state": s ? "open" : "closed",
40
+ "data-testid": h,
41
+ ...b,
42
+ children: [
43
+ /* @__PURE__ */ e(
44
+ "input",
45
+ {
46
+ id: o,
47
+ type: "checkbox",
48
+ className: "drawer-toggle",
49
+ checked: s,
50
+ onChange: y,
51
+ "aria-label": r ? "Toggle right sidebar" : "Toggle sidebar"
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e("div", { className: j, children: n }),
55
+ /* @__PURE__ */ d("div", { className: "drawer-side", style: { "--drawer-width": t }, children: [
56
+ /* @__PURE__ */ e(
57
+ "label",
58
+ {
59
+ htmlFor: o,
60
+ "aria-label": "Close sidebar",
61
+ className: u
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e("div", { className: N, style: { width: t }, children: i })
65
+ ] })
66
+ ]
67
+ }
68
+ );
69
+ }
70
+ );
71
+ I.displayName = "ResponsiveDrawer";
72
+ export {
73
+ I as ResponsiveDrawer
74
+ };
75
+ //# sourceMappingURL=ResponsiveDrawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponsiveDrawer.js","sources":["../../src/components/ResponsiveDrawer.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nexport type ResponsiveDrawerBreakpoint = 'sm' | 'md' | 'lg' | 'xl' | '2xl'\n\nexport interface ResponsiveDrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Main content area */\n children: React.ReactNode\n /** Sidebar content */\n sidebar: React.ReactNode\n /** Controlled open state */\n open?: boolean\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void\n /** Position sidebar on the right side */\n end?: boolean\n /** Width of the sidebar */\n width?: number | string\n /** Breakpoint at which sidebar becomes always visible (e.g., 'lg' for lg:drawer-open) */\n responsive?: ResponsiveDrawerBreakpoint\n /** Additional classes for sidebar container */\n sidebarClassName?: string\n /** Additional classes for content area */\n contentClassName?: string\n /** Additional classes for the overlay */\n overlayClassName?: string\n /** Unique ID for the drawer (auto-generated if not provided) */\n id?: string\n /** Test ID for testing */\n 'data-testid'?: string\n}\n\n/**\n * ResponsiveDrawer - A responsive sidebar layout using DaisyUI's drawer.\n * Use for navigation sidebars that toggle on mobile but can be always visible on larger screens.\n * For overlay panel drawers (forms, details), use the Drawer component instead.\n */\nexport const ResponsiveDrawer = forwardRef<HTMLDivElement, ResponsiveDrawerProps>(\n (\n {\n children,\n sidebar,\n open = false,\n onOpenChange,\n end = false,\n width = 320,\n responsive,\n className = '',\n sidebarClassName = '',\n contentClassName = '',\n overlayClassName = '',\n id,\n 'data-testid': testId,\n ...rest\n },\n ref\n ) => {\n const autoId = React.useId()\n const drawerId = id || autoId\n\n const handleToggle = (e: React.ChangeEvent<HTMLInputElement>) => {\n onOpenChange?.(e.target.checked)\n }\n\n // Build responsive class if specified\n const responsiveClasses: Record<ResponsiveDrawerBreakpoint, string> = {\n sm: 'sm:drawer-open',\n md: 'md:drawer-open',\n lg: 'lg:drawer-open',\n xl: 'xl:drawer-open',\n '2xl': '2xl:drawer-open',\n }\n\n const drawerClasses = [\n 'drawer',\n end && 'drawer-end',\n responsive && responsiveClasses[responsive],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const sidebarClasses = ['bg-base-200 min-h-full p-4', sidebarClassName]\n .filter(Boolean)\n .join(' ')\n\n const contentClasses = ['drawer-content', contentClassName]\n .filter(Boolean)\n .join(' ')\n\n const overlayClasses = ['drawer-overlay', overlayClassName]\n .filter(Boolean)\n .join(' ')\n\n // Calculate width style\n const widthStyle = typeof width === 'number' ? `${width}px` : width\n\n return (\n <div\n ref={ref}\n className={drawerClasses}\n data-state={open ? 'open' : 'closed'}\n data-testid={testId}\n {...rest}\n >\n <input\n id={drawerId}\n type=\"checkbox\"\n className=\"drawer-toggle\"\n checked={open}\n onChange={handleToggle}\n aria-label={end ? 'Toggle right sidebar' : 'Toggle sidebar'}\n />\n <div className={contentClasses}>{children}</div>\n <div className=\"drawer-side\" style={{ '--drawer-width': widthStyle } as React.CSSProperties}>\n <label\n htmlFor={drawerId}\n aria-label=\"Close sidebar\"\n className={overlayClasses}\n />\n <div className={sidebarClasses} style={{ width: widthStyle }}>\n {sidebar}\n </div>\n </div>\n </div>\n )\n }\n)\n\nResponsiveDrawer.displayName = 'ResponsiveDrawer'\n"],"names":["ResponsiveDrawer","forwardRef","children","sidebar","open","onOpenChange","end","width","responsive","className","sidebarClassName","contentClassName","overlayClassName","id","testId","rest","ref","autoId","React","drawerId","handleToggle","e","drawerClasses","sidebarClasses","contentClasses","overlayClasses","widthStyle","jsxs","jsx"],"mappings":";;AAoCO,MAAMA,IAAmBC;AAAA,EAC9B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,cAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,YAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,kBAAAC,IAAmB;AAAA,IACnB,kBAAAC,IAAmB;AAAA,IACnB,kBAAAC,IAAmB;AAAA,IACnB,IAAAC;AAAA,IACA,eAAeC;AAAA,IACf,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAASC,EAAM,MAAA,GACfC,IAAWN,KAAMI,GAEjBG,IAAe,CAACC,MAA2C;AAC/D,MAAAhB,IAAegB,EAAE,OAAO,OAAO;AAAA,IACjC,GAWMC,IAAgB;AAAA,MACpB;AAAA,MACAhB,KAAO;AAAA,MACPE,KAXoE;AAAA,QACpE,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA,EAMyBA,CAAU;AAAA,MAC1CC;AAAA,IAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GAELc,IAAiB,CAAC,8BAA8Bb,CAAgB,EACnE,OAAO,OAAO,EACd,KAAK,GAAG,GAELc,IAAiB,CAAC,kBAAkBb,CAAgB,EACvD,OAAO,OAAO,EACd,KAAK,GAAG,GAELc,IAAiB,CAAC,kBAAkBb,CAAgB,EACvD,OAAO,OAAO,EACd,KAAK,GAAG,GAGLc,IAAa,OAAOnB,KAAU,WAAW,GAAGA,CAAK,OAAOA;AAE9D,WACE,gBAAAoB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAX;AAAA,QACA,WAAWM;AAAA,QACX,cAAYlB,IAAO,SAAS;AAAA,QAC5B,eAAaU;AAAA,QACZ,GAAGC;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAa;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,IAAIT;AAAA,cACJ,MAAK;AAAA,cACL,WAAU;AAAA,cACV,SAASf;AAAA,cACT,UAAUgB;AAAA,cACV,cAAYd,IAAM,yBAAyB;AAAA,YAAA;AAAA,UAAA;AAAA,UAE7C,gBAAAsB,EAAC,OAAA,EAAI,WAAWJ,GAAiB,UAAAtB,EAAA,CAAS;AAAA,UAC1C,gBAAAyB,EAAC,SAAI,WAAU,eAAc,OAAO,EAAE,kBAAkBD,KACtD,UAAA;AAAA,YAAA,gBAAAE;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,SAAST;AAAA,gBACT,cAAW;AAAA,gBACX,WAAWM;AAAA,cAAA;AAAA,YAAA;AAAA,YAEb,gBAAAG,EAAC,SAAI,WAAWL,GAAgB,OAAO,EAAE,OAAOG,EAAA,GAC7C,UAAAvB,EAAA,CACH;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAH,EAAiB,cAAc;"}
@@ -21,13 +21,13 @@ const w = {
21
21
  evenly: "justify-evenly"
22
22
  }, E = ({
23
23
  direction: r = "horizontal",
24
- size: s = "md",
24
+ size: s = "sm",
25
25
  align: p,
26
26
  justify: a,
27
27
  wrap: u = !1,
28
28
  split: l,
29
- className: d = "",
30
- style: m,
29
+ className: m = "",
30
+ style: d,
31
31
  children: e,
32
32
  ...g
33
33
  }) => {
@@ -38,9 +38,9 @@ const w = {
38
38
  y,
39
39
  C,
40
40
  u ? "flex-wrap" : "",
41
- d
41
+ m
42
42
  ].filter(Boolean).join(" "), x = {
43
- ...m,
43
+ ...d,
44
44
  ...o ? { gap: `${s}px` } : {}
45
45
  };
46
46
  return /* @__PURE__ */ f("div", { className: j, style: x, ...g, children: (() => {
@@ -1 +1 @@
1
- {"version":3,"file":"Space.js","sources":["../../src/components/Space.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {\n direction?: 'horizontal' | 'vertical'\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number\n align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'\n justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'\n wrap?: boolean\n split?: React.ReactNode\n children: React.ReactNode\n}\n\nconst gapClasses = {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n} as const\n\nconst alignClasses = {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n} as const\n\nconst justifyClasses = {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n} as const\n\nexport const Space: React.FC<SpaceProps> = ({\n direction = 'horizontal',\n size = 'md',\n align,\n justify,\n wrap = false,\n split,\n className = '',\n style,\n children,\n ...rest\n}) => {\n const isNumericSize = typeof size === 'number'\n const gapClass = isNumericSize ? '' : gapClasses[size]\n const effectiveAlign = align ?? (direction === 'vertical' ? 'start' : undefined)\n const alignClass = effectiveAlign ? alignClasses[effectiveAlign] : ''\n const justifyClass = justify ? justifyClasses[justify] : ''\n const wrapClass = wrap ? 'flex-wrap' : ''\n const directionClass = direction === 'horizontal' ? 'flex-row' : 'flex-col'\n\n const classes = [\n 'flex',\n directionClass,\n gapClass,\n alignClass,\n justifyClass,\n wrapClass,\n className\n ].filter(Boolean).join(' ')\n\n const combinedStyle: React.CSSProperties = {\n ...style,\n ...(isNumericSize ? { gap: `${size}px` } : {}),\n }\n\n // If split is provided, interleave separator between children\n const renderChildren = () => {\n if (!split) return children\n\n const childArray = React.Children.toArray(children).filter(Boolean)\n if (childArray.length <= 1) return children\n\n const result: React.ReactNode[] = []\n childArray.forEach((child, index) => {\n result.push(child)\n if (index < childArray.length - 1) {\n result.push(\n <span key={`split-${index}`} className=\"flex-shrink-0\">\n {split}\n </span>\n )\n }\n })\n return result\n }\n\n return <div className={classes} style={combinedStyle} {...rest}>{renderChildren()}</div>\n}\n"],"names":["gapClasses","alignClasses","justifyClasses","Space","direction","size","align","justify","wrap","split","className","style","children","rest","isNumericSize","gapClass","effectiveAlign","alignClass","justifyClass","classes","combinedStyle","jsx","childArray","React","result","child","index"],"mappings":";;AAYA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAe;AAAA,EACnB,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AACX,GAEMC,IAAiB;AAAA,EACrB,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAA8B,CAAC;AAAA,EAC1C,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAgB,OAAOT,KAAS,UAChCU,IAAWD,IAAgB,KAAKd,EAAWK,CAAI,GAC/CW,IAAiBV,MAAUF,MAAc,aAAa,UAAU,SAChEa,IAAaD,IAAiBf,EAAae,CAAc,IAAI,IAC7DE,IAAeX,IAAUL,EAAeK,CAAO,IAAI,IAInDY,IAAU;AAAA,IACd;AAAA,IAHqBf,MAAc,eAAe,aAAa;AAAA,IAK/DW;AAAA,IACAE;AAAA,IACAC;AAAA,IARgBV,IAAO,cAAc;AAAA,IAUrCE;AAAA,EAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG,GAEpBU,IAAqC;AAAA,IACzC,GAAGT;AAAA,IACH,GAAIG,IAAgB,EAAE,KAAK,GAAGT,CAAI,SAAS,CAAA;AAAA,EAAC;AAwB9C,SAAO,gBAAAgB,EAAC,SAAI,WAAWF,GAAS,OAAOC,GAAgB,GAAGP,GAAO,WApB1C,MAAM;AAC3B,QAAI,CAACJ,EAAO,QAAOG;AAEnB,UAAMU,IAAaC,EAAM,SAAS,QAAQX,CAAQ,EAAE,OAAO,OAAO;AAClE,QAAIU,EAAW,UAAU,EAAG,QAAOV;AAEnC,UAAMY,IAA4B,CAAA;AAClC,WAAAF,EAAW,QAAQ,CAACG,GAAOC,MAAU;AACnC,MAAAF,EAAO,KAAKC,CAAK,GACbC,IAAQJ,EAAW,SAAS,KAC9BE,EAAO;AAAA,0BACJ,QAAA,EAA4B,WAAU,iBACpC,UAAAf,KADQ,SAASiB,CAAK,EAEzB;AAAA,MAAA;AAAA,IAGN,CAAC,GACMF;AAAA,EACT,GAEiE,EAAe,CAAE;AACpF;"}
1
+ {"version":3,"file":"Space.js","sources":["../../src/components/Space.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {\n direction?: 'horizontal' | 'vertical'\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number\n align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'\n justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'\n wrap?: boolean\n split?: React.ReactNode\n children: React.ReactNode\n}\n\nconst gapClasses = {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n} as const\n\nconst alignClasses = {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n} as const\n\nconst justifyClasses = {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n} as const\n\nexport const Space: React.FC<SpaceProps> = ({\n direction = 'horizontal',\n size = 'sm',\n align,\n justify,\n wrap = false,\n split,\n className = '',\n style,\n children,\n ...rest\n}) => {\n const isNumericSize = typeof size === 'number'\n const gapClass = isNumericSize ? '' : gapClasses[size]\n const effectiveAlign = align ?? (direction === 'vertical' ? 'start' : undefined)\n const alignClass = effectiveAlign ? alignClasses[effectiveAlign] : ''\n const justifyClass = justify ? justifyClasses[justify] : ''\n const wrapClass = wrap ? 'flex-wrap' : ''\n const directionClass = direction === 'horizontal' ? 'flex-row' : 'flex-col'\n\n const classes = [\n 'flex',\n directionClass,\n gapClass,\n alignClass,\n justifyClass,\n wrapClass,\n className\n ].filter(Boolean).join(' ')\n\n const combinedStyle: React.CSSProperties = {\n ...style,\n ...(isNumericSize ? { gap: `${size}px` } : {}),\n }\n\n // If split is provided, interleave separator between children\n const renderChildren = () => {\n if (!split) return children\n\n const childArray = React.Children.toArray(children).filter(Boolean)\n if (childArray.length <= 1) return children\n\n const result: React.ReactNode[] = []\n childArray.forEach((child, index) => {\n result.push(child)\n if (index < childArray.length - 1) {\n result.push(\n <span key={`split-${index}`} className=\"flex-shrink-0\">\n {split}\n </span>\n )\n }\n })\n return result\n }\n\n return <div className={classes} style={combinedStyle} {...rest}>{renderChildren()}</div>\n}\n"],"names":["gapClasses","alignClasses","justifyClasses","Space","direction","size","align","justify","wrap","split","className","style","children","rest","isNumericSize","gapClass","effectiveAlign","alignClass","justifyClass","classes","combinedStyle","jsx","childArray","React","result","child","index"],"mappings":";;AAYA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAe;AAAA,EACnB,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AACX,GAEMC,IAAiB;AAAA,EACrB,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAA8B,CAAC;AAAA,EAC1C,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAgB,OAAOT,KAAS,UAChCU,IAAWD,IAAgB,KAAKd,EAAWK,CAAI,GAC/CW,IAAiBV,MAAUF,MAAc,aAAa,UAAU,SAChEa,IAAaD,IAAiBf,EAAae,CAAc,IAAI,IAC7DE,IAAeX,IAAUL,EAAeK,CAAO,IAAI,IAInDY,IAAU;AAAA,IACd;AAAA,IAHqBf,MAAc,eAAe,aAAa;AAAA,IAK/DW;AAAA,IACAE;AAAA,IACAC;AAAA,IARgBV,IAAO,cAAc;AAAA,IAUrCE;AAAA,EAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG,GAEpBU,IAAqC;AAAA,IACzC,GAAGT;AAAA,IACH,GAAIG,IAAgB,EAAE,KAAK,GAAGT,CAAI,SAAS,CAAA;AAAA,EAAC;AAwB9C,SAAO,gBAAAgB,EAAC,SAAI,WAAWF,GAAS,OAAOC,GAAgB,GAAGP,GAAO,WApB1C,MAAM;AAC3B,QAAI,CAACJ,EAAO,QAAOG;AAEnB,UAAMU,IAAaC,EAAM,SAAS,QAAQX,CAAQ,EAAE,OAAO,OAAO;AAClE,QAAIU,EAAW,UAAU,EAAG,QAAOV;AAEnC,UAAMY,IAA4B,CAAA;AAClC,WAAAF,EAAW,QAAQ,CAACG,GAAOC,MAAU;AACnC,MAAAF,EAAO,KAAKC,CAAK,GACbC,IAAQJ,EAAW,SAAS,KAC9BE,EAAO;AAAA,0BACJ,QAAA,EAA4B,WAAU,iBACpC,UAAAf,KADQ,SAASiB,CAAK,EAEzB;AAAA,MAAA;AAAA,IAGN,CAAC,GACMF;AAAA,EACT,GAEiE,EAAe,CAAE;AACpF;"}
package/dist/index.d.ts CHANGED
@@ -47,9 +47,9 @@ export type { DockProps, DockItemProps, DockItemConfig } from './components/Dock
47
47
  export { Divider } from './components/Divider';
48
48
  export type { DividerProps } from './components/Divider';
49
49
  export { Drawer } from './components/Drawer';
50
- export type { DrawerProps, DrawerPlacement, DrawerSize } from './components/Drawer';
51
- export { SidebarDrawer } from './components/SidebarDrawer';
52
- export type { SidebarDrawerProps } from './components/SidebarDrawer';
50
+ export type { DrawerProps, DrawerRef, DrawerPlacement, DrawerSize, DrawerPushConfig } from './components/Drawer';
51
+ export { ResponsiveDrawer } from './components/ResponsiveDrawer';
52
+ export type { ResponsiveDrawerProps, ResponsiveDrawerBreakpoint } from './components/ResponsiveDrawer';
53
53
  export { Fieldset } from './components/Fieldset';
54
54
  export type { FieldsetProps, FieldsetLegendProps } from './components/Fieldset';
55
55
  export { FileInput } from './components/FileInput';
@@ -85,7 +85,7 @@ export type { JoinProps } from './components/Join';
85
85
  export { Kbd } from './components/Kbd';
86
86
  export type { KbdProps } from './components/Kbd';
87
87
  export { Layout, useSiderContext } from './components/Layout';
88
- export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps } from './components/Layout';
88
+ export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps, SiderTheme, SiderCollapsedType } from './components/Layout';
89
89
  export { List } from './components/List';
90
90
  export type { ListProps, ListRowProps, ListItemProps, ListItemMetaProps, ListPaginationConfig, ListGridConfig } from './components/List';
91
91
  export { Loading } from './components/Loading';
@@ -116,8 +116,6 @@ export { OTPInput } from './components/OTPInput';
116
116
  export type { OTPInputProps, OTPInputRef } from './components/OTPInput';
117
117
  export { Pagination } from './components/Pagination';
118
118
  export type { PaginationProps } from './components/Pagination';
119
- export { PageLayout } from './components/PageLayout';
120
- export type { PageLayoutProps } from './components/PageLayout';
121
119
  export { Popconfirm } from './components/Popconfirm';
122
120
  export type { PopconfirmProps } from './components/Popconfirm';
123
121
  export { Popover } from './components/Popover';
package/dist/index.js CHANGED
@@ -3,17 +3,17 @@ import { Anchor as p } from "./components/Anchor.js";
3
3
  import { Alert as f } from "./components/Alert.js";
4
4
  import { Autocomplete as a } from "./components/Autocomplete.js";
5
5
  import { Avatar as n, AvatarGroup as s } from "./components/Avatar.js";
6
- import { Badge as l } from "./components/Badge.js";
7
- import { Breadcrumb as c } from "./components/Breadcrumb.js";
6
+ import { Badge as u } from "./components/Badge.js";
7
+ import { Breadcrumb as d } from "./components/Breadcrumb.js";
8
8
  import { Button as T } from "./components/Button.js";
9
9
  import { CopyButton as S } from "./components/CopyButton.js";
10
- import { Checkbox as b } from "./components/Checkbox.js";
11
- import { Chat as y } from "./components/Chat.js";
12
- import { ColorPicker as v } from "./components/ColorPicker.js";
13
- import { Card as h } from "./components/Card.js";
14
- import { Cascader as R } from "./components/Cascader.js";
10
+ import { Checkbox as k } from "./components/Checkbox.js";
11
+ import { Chat as v } from "./components/Chat.js";
12
+ import { ColorPicker as w } from "./components/ColorPicker.js";
13
+ import { Card as R } from "./components/Card.js";
14
+ import { Cascader as F } from "./components/Cascader.js";
15
15
  import { Carousel as A } from "./components/Carousel.js";
16
- import { Collapse as L } from "./components/Collapse.js";
16
+ import { Collapse as M } from "./components/Collapse.js";
17
17
  import { Container as H } from "./components/Container.js";
18
18
  import { ContextMenu as K } from "./components/ContextMenu.js";
19
19
  import { Countdown as N } from "./components/Countdown.js";
@@ -23,22 +23,22 @@ import { Diff as j } from "./components/Diff.js";
23
23
  import { Dock as Q } from "./components/Dock.js";
24
24
  import { Divider as X } from "./components/Divider.js";
25
25
  import { Drawer as Z } from "./components/Drawer.js";
26
- import { SidebarDrawer as $ } from "./components/SidebarDrawer.js";
26
+ import { ResponsiveDrawer as $ } from "./components/ResponsiveDrawer.js";
27
27
  import { Fieldset as ro } from "./components/Fieldset.js";
28
28
  import { FileInput as to } from "./components/FileInput.js";
29
29
  import { Filter as mo } from "./components/Filter.js";
30
30
  import { Flex as xo } from "./components/Flex.js";
31
31
  import { FloatButton as io } from "./components/FloatButton.js";
32
32
  import { Footer as so } from "./components/Footer.js";
33
- import { Form as lo, useFormInstance as co } from "./components/Form.js";
33
+ import { Form as uo, useFormInstance as co } from "./components/Form.js";
34
34
  import { Col as To, Grid as go, Row as So } from "./components/Grid.js";
35
- import { Hero as bo } from "./components/Hero.js";
36
- import { HoverGallery as yo } from "./components/HoverGallery.js";
37
- import { Image as vo } from "./components/Image.js";
38
- import { Dropdown as ho } from "./components/Dropdown.js";
39
- import { Empty as Ro } from "./components/Empty.js";
35
+ import { Hero as ko } from "./components/Hero.js";
36
+ import { HoverGallery as vo } from "./components/HoverGallery.js";
37
+ import { Image as wo } from "./components/Image.js";
38
+ import { Dropdown as Ro } from "./components/Dropdown.js";
39
+ import { Empty as Fo } from "./components/Empty.js";
40
40
  import { Input as Ao } from "./components/Input.js";
41
- import { InputNumber as Lo } from "./components/InputNumber.js";
41
+ import { InputNumber as Mo } from "./components/InputNumber.js";
42
42
  import { Join as Ho } from "./components/Join.js";
43
43
  import { Kbd as Ko } from "./components/Kbd.js";
44
44
  import { Layout as No, useSiderContext as Oo } from "./components/Layout.js";
@@ -54,54 +54,53 @@ import { Phone as pr } from "./components/Phone.js";
54
54
  import { Window as fr } from "./components/Window.js";
55
55
  import { Modal as ar } from "./components/Modal.js";
56
56
  import { Navbar as nr } from "./components/Navbar.js";
57
- import { notification as ur } from "./components/Notification.js";
58
- import { OTPInput as dr } from "./components/OTPInput.js";
57
+ import { notification as lr } from "./components/Notification.js";
58
+ import { OTPInput as cr } from "./components/OTPInput.js";
59
59
  import { Pagination as Cr } from "./components/Pagination.js";
60
- import { PageLayout as gr } from "./components/PageLayout.js";
61
- import { Popconfirm as Pr } from "./components/Popconfirm.js";
62
- import { Popover as kr } from "./components/Popover.js";
63
- import { Progress as Dr } from "./components/Progress.js";
64
- import { Radio as wr } from "./components/Radio.js";
65
- import { RadialProgress as Fr } from "./components/RadialProgress.js";
66
- import { Range as Br } from "./components/Range.js";
67
- import { Rating as Ir } from "./components/Rating.js";
68
- import { Result as Mr } from "./components/Result.js";
69
- import { Select as Gr } from "./components/Select.js";
70
- import { Segmented as Wr } from "./components/Segmented.js";
71
- import { Skeleton as Or } from "./components/Skeleton.js";
72
- import { Space as Er } from "./components/Space.js";
73
- import { Splitter as Ur } from "./components/Splitter.js";
74
- import { Stats as qr } from "./components/Stat.js";
75
- import { Status as Vr } from "./components/Status.js";
76
- import { Steps as Yr } from "./components/Steps.js";
77
- import { Table as _r } from "./components/Table.js";
78
- import { Tabs as oe } from "./components/Tabs.js";
79
- import { Textarea as ee } from "./components/Textarea.js";
80
- import { TextRotate as pe } from "./components/TextRotate.js";
81
- import { CheckableTag as fe, Tag as xe, TagLiveRegion as ae } from "./components/Tag.js";
82
- import { ThemeController as ne } from "./components/ThemeController.js";
83
- import { TimePicker as ue } from "./components/TimePicker.js";
84
- import { Timeline as de } from "./components/Timeline.js";
85
- import { Toggle as Ce } from "./components/Toggle.js";
86
- import { Tour as ge } from "./components/Tour.js";
87
- import { Tooltip as Pe } from "./components/Tooltip.js";
88
- import { Transfer as ke } from "./components/Transfer.js";
89
- import { Tree as De } from "./components/Tree.js";
90
- import { TreeSelect as we, TreeSelectComponent as he } from "./components/TreeSelect.js";
60
+ import { Popconfirm as gr } from "./components/Popconfirm.js";
61
+ import { Popover as Pr } from "./components/Popover.js";
62
+ import { Progress as br } from "./components/Progress.js";
63
+ import { Radio as Dr } from "./components/Radio.js";
64
+ import { RadialProgress as yr } from "./components/RadialProgress.js";
65
+ import { Range as hr } from "./components/Range.js";
66
+ import { Rating as Br } from "./components/Rating.js";
67
+ import { Result as Ir } from "./components/Result.js";
68
+ import { Select as Lr } from "./components/Select.js";
69
+ import { Segmented as Gr } from "./components/Segmented.js";
70
+ import { Skeleton as Wr } from "./components/Skeleton.js";
71
+ import { Space as Or } from "./components/Space.js";
72
+ import { Splitter as Er } from "./components/Splitter.js";
73
+ import { Stats as Ur } from "./components/Stat.js";
74
+ import { Status as qr } from "./components/Status.js";
75
+ import { Steps as Vr } from "./components/Steps.js";
76
+ import { Table as Yr } from "./components/Table.js";
77
+ import { Tabs as _r } from "./components/Tabs.js";
78
+ import { Textarea as oe } from "./components/Textarea.js";
79
+ import { TextRotate as ee } from "./components/TextRotate.js";
80
+ import { CheckableTag as pe, Tag as me, TagLiveRegion as fe } from "./components/Tag.js";
81
+ import { ThemeController as ae } from "./components/ThemeController.js";
82
+ import { TimePicker as ne } from "./components/TimePicker.js";
83
+ import { Timeline as le } from "./components/Timeline.js";
84
+ import { Toggle as ce } from "./components/Toggle.js";
85
+ import { Tour as Ce } from "./components/Tour.js";
86
+ import { Tooltip as ge } from "./components/Tooltip.js";
87
+ import { Transfer as Pe } from "./components/Transfer.js";
88
+ import { Tree as be } from "./components/Tree.js";
89
+ import { TreeSelect as De, TreeSelectComponent as we } from "./components/TreeSelect.js";
91
90
  import { Typography as Re } from "./components/Typography.js";
92
- import { Upload as Ae } from "./components/Upload.js";
93
- import { Watermark as Le } from "./components/Watermark.js";
94
- import { Hide as He, Show as Ge } from "./components/Responsive.js";
95
- import { useBreakpoint as We } from "./hooks/useBreakpoint.js";
96
- import { useDisclosure as Oe } from "./hooks/useDisclosure.js";
97
- import { useClipboard as Ee } from "./hooks/useClipboard.js";
98
- import { useLocalStorage as Ue } from "./hooks/useLocalStorage.js";
99
- import { useDebounce as qe } from "./hooks/useDebounce.js";
100
- import { useClickOutside as Ve } from "./hooks/useClickOutside.js";
101
- import { usePrevious as Ye } from "./hooks/usePrevious.js";
102
- import { useHover as _e } from "./hooks/useHover.js";
103
- import { useKeyPress as ot, useKeyPressCallback as rt } from "./hooks/useKeyPress.js";
104
- import { useWindowSize as tt } from "./hooks/useWindowSize.js";
91
+ import { Upload as Fe } from "./components/Upload.js";
92
+ import { Watermark as Ae } from "./components/Watermark.js";
93
+ import { Hide as Me, Show as Le } from "./components/Responsive.js";
94
+ import { useBreakpoint as Ge } from "./hooks/useBreakpoint.js";
95
+ import { useDisclosure as We } from "./hooks/useDisclosure.js";
96
+ import { useClipboard as Oe } from "./hooks/useClipboard.js";
97
+ import { useLocalStorage as Ee } from "./hooks/useLocalStorage.js";
98
+ import { useDebounce as Ue } from "./hooks/useDebounce.js";
99
+ import { useClickOutside as qe } from "./hooks/useClickOutside.js";
100
+ import { usePrevious as Ve } from "./hooks/usePrevious.js";
101
+ import { useHover as Ye } from "./hooks/useHover.js";
102
+ import { useKeyPress as _e, useKeyPressCallback as $e } from "./hooks/useKeyPress.js";
103
+ import { useWindowSize as rt } from "./hooks/useWindowSize.js";
105
104
  export {
106
105
  e as Affix,
107
106
  f as Alert,
@@ -109,20 +108,20 @@ export {
109
108
  a as Autocomplete,
110
109
  n as Avatar,
111
110
  s as AvatarGroup,
112
- l as Badge,
113
- c as Breadcrumb,
111
+ u as Badge,
112
+ d as Breadcrumb,
114
113
  or as Browser,
115
114
  T as Button,
116
- h as Card,
115
+ R as Card,
117
116
  A as Carousel,
118
- R as Cascader,
119
- y as Chat,
120
- fe as CheckableTag,
121
- b as Checkbox,
117
+ F as Cascader,
118
+ v as Chat,
119
+ pe as CheckableTag,
120
+ k as Checkbox,
122
121
  er as Code,
123
122
  To as Col,
124
- L as Collapse,
125
- v as ColorPicker,
123
+ M as Collapse,
124
+ w as ColorPicker,
126
125
  H as Container,
127
126
  K as ContextMenu,
128
127
  S as CopyButton,
@@ -133,22 +132,22 @@ export {
133
132
  X as Divider,
134
133
  Q as Dock,
135
134
  Z as Drawer,
136
- ho as Dropdown,
137
- Ro as Empty,
135
+ Ro as Dropdown,
136
+ Fo as Empty,
138
137
  ro as Fieldset,
139
138
  to as FileInput,
140
139
  mo as Filter,
141
140
  xo as Flex,
142
141
  io as FloatButton,
143
142
  so as Footer,
144
- lo as Form,
143
+ uo as Form,
145
144
  go as Grid,
146
- bo as Hero,
147
- He as Hide,
148
- yo as HoverGallery,
149
- vo as Image,
145
+ ko as Hero,
146
+ Me as Hide,
147
+ vo as HoverGallery,
148
+ wo as Image,
150
149
  Ao as Input,
151
- Lo as InputNumber,
150
+ Mo as InputNumber,
152
151
  Ho as Join,
153
152
  Ko as Kbd,
154
153
  No as Layout,
@@ -160,62 +159,61 @@ export {
160
159
  _o as Menu,
161
160
  ar as Modal,
162
161
  nr as Navbar,
163
- dr as OTPInput,
164
- gr as PageLayout,
162
+ cr as OTPInput,
165
163
  Cr as Pagination,
166
164
  pr as Phone,
167
- Pr as Popconfirm,
168
- kr as Popover,
169
- Dr as Progress,
170
- Fr as RadialProgress,
171
- wr as Radio,
172
- Br as Range,
173
- Ir as Rating,
174
- Mr as Result,
165
+ gr as Popconfirm,
166
+ Pr as Popover,
167
+ br as Progress,
168
+ yr as RadialProgress,
169
+ Dr as Radio,
170
+ hr as Range,
171
+ Br as Rating,
172
+ $ as ResponsiveDrawer,
173
+ Ir as Result,
175
174
  So as Row,
176
- Wr as Segmented,
177
- Gr as Select,
178
- Ge as Show,
179
- $ as SidebarDrawer,
180
- Or as Skeleton,
181
- Er as Space,
182
- Ur as Splitter,
183
- qr as Stats,
184
- Vr as Status,
185
- Yr as Steps,
186
- _r as Table,
187
- oe as Tabs,
188
- xe as Tag,
189
- ae as TagLiveRegion,
190
- pe as TextRotate,
191
- ee as Textarea,
192
- ne as ThemeController,
193
- ue as TimePicker,
194
- de as Timeline,
195
- Ce as Toggle,
196
- Pe as Tooltip,
197
- ge as Tour,
198
- ke as Transfer,
199
- De as Tree,
200
- we as TreeSelect,
201
- he as TreeSelectComponent,
175
+ Gr as Segmented,
176
+ Lr as Select,
177
+ Le as Show,
178
+ Wr as Skeleton,
179
+ Or as Space,
180
+ Er as Splitter,
181
+ Ur as Stats,
182
+ qr as Status,
183
+ Vr as Steps,
184
+ Yr as Table,
185
+ _r as Tabs,
186
+ me as Tag,
187
+ fe as TagLiveRegion,
188
+ ee as TextRotate,
189
+ oe as Textarea,
190
+ ae as ThemeController,
191
+ ne as TimePicker,
192
+ le as Timeline,
193
+ ce as Toggle,
194
+ ge as Tooltip,
195
+ Ce as Tour,
196
+ Pe as Transfer,
197
+ be as Tree,
198
+ De as TreeSelect,
199
+ we as TreeSelectComponent,
202
200
  Re as Typography,
203
- Ae as Upload,
204
- Le as Watermark,
201
+ Fe as Upload,
202
+ Ae as Watermark,
205
203
  fr as Window,
206
- ur as notification,
207
- We as useBreakpoint,
208
- Ve as useClickOutside,
209
- Ee as useClipboard,
210
- qe as useDebounce,
211
- Oe as useDisclosure,
204
+ lr as notification,
205
+ Ge as useBreakpoint,
206
+ qe as useClickOutside,
207
+ Oe as useClipboard,
208
+ Ue as useDebounce,
209
+ We as useDisclosure,
212
210
  co as useFormInstance,
213
- _e as useHover,
214
- ot as useKeyPress,
215
- rt as useKeyPressCallback,
216
- Ue as useLocalStorage,
217
- Ye as usePrevious,
211
+ Ye as useHover,
212
+ _e as useKeyPress,
213
+ $e as useKeyPressCallback,
214
+ Ee as useLocalStorage,
215
+ Ve as usePrevious,
218
216
  Oo as useSiderContext,
219
- tt as useWindowSize
217
+ rt as useWindowSize
220
218
  };
221
219
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asterui",
3
- "version": "0.12.32",
3
+ "version": "0.12.35",
4
4
  "description": "React UI component library with DaisyUI",
5
5
  "homepage": "https://asterui.com",
6
6
  "repository": {
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface PageLayoutProps {
3
- children: React.ReactNode;
4
- background?: 'base-100' | 'base-200' | 'base-300' | 'neutral';
5
- padding?: 'none' | 'sm' | 'md' | 'lg';
6
- minHeight?: 'screen' | 'full' | 'auto';
7
- className?: string;
8
- }
9
- export declare const PageLayout: React.FC<PageLayoutProps>;
@@ -1,35 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- const i = ({
3
- children: s,
4
- background: e = "base-200",
5
- padding: a = "md",
6
- minHeight: n = "screen",
7
- className: t = ""
8
- }) => {
9
- const o = {
10
- "base-100": "bg-base-100",
11
- "base-200": "bg-base-200",
12
- "base-300": "bg-base-300",
13
- neutral: "bg-neutral"
14
- }, l = {
15
- none: "",
16
- sm: "p-4",
17
- md: "p-8",
18
- lg: "p-12"
19
- }, b = {
20
- screen: "min-h-screen",
21
- full: "min-h-full",
22
- auto: ""
23
- }, c = [
24
- o[e],
25
- l[a],
26
- b[n],
27
- "text-base-content",
28
- t
29
- ].filter(Boolean).join(" ");
30
- return /* @__PURE__ */ r("div", { className: c, children: s });
31
- };
32
- export {
33
- i as PageLayout
34
- };
35
- //# sourceMappingURL=PageLayout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageLayout.js","sources":["../../src/components/PageLayout.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface PageLayoutProps {\n children: React.ReactNode\n background?: 'base-100' | 'base-200' | 'base-300' | 'neutral'\n padding?: 'none' | 'sm' | 'md' | 'lg'\n minHeight?: 'screen' | 'full' | 'auto'\n className?: string\n}\n\nexport const PageLayout: React.FC<PageLayoutProps> = ({\n children,\n background = 'base-200',\n padding = 'md',\n minHeight = 'screen',\n className = '',\n}) => {\n const backgroundClasses = {\n 'base-100': 'bg-base-100',\n 'base-200': 'bg-base-200',\n 'base-300': 'bg-base-300',\n neutral: 'bg-neutral',\n }\n\n const paddingClasses = {\n none: '',\n sm: 'p-4',\n md: 'p-8',\n lg: 'p-12',\n }\n\n const minHeightClasses = {\n screen: 'min-h-screen',\n full: 'min-h-full',\n auto: '',\n }\n\n const classes = [\n backgroundClasses[background],\n paddingClasses[padding],\n minHeightClasses[minHeight],\n 'text-base-content',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <div className={classes}>{children}</div>\n}\n"],"names":["PageLayout","children","background","padding","minHeight","className","backgroundClasses","paddingClasses","minHeightClasses","classes","jsx"],"mappings":";AAUO,MAAMA,IAAwC,CAAC;AAAA,EACpD,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AACd,MAAM;AACJ,QAAMC,IAAoB;AAAA,IACxB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,SAAS;AAAA,EAAA,GAGLC,IAAiB;AAAA,IACrB,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,GAGAC,IAAmB;AAAA,IACvB,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,EAAA,GAGFC,IAAU;AAAA,IACdH,EAAkBJ,CAAU;AAAA,IAC5BK,EAAeJ,CAAO;AAAA,IACtBK,EAAiBJ,CAAS;AAAA,IAC1B;AAAA,IACAC;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SAAO,gBAAAK,EAAC,OAAA,EAAI,WAAWD,GAAU,UAAAR,EAAA,CAAS;AAC5C;"}
@@ -1,21 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface SidebarDrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
3
- /** Main content area */
4
- children: React.ReactNode;
5
- /** Sidebar content */
6
- sidebar: React.ReactNode;
7
- /** Controlled open state */
8
- open?: boolean;
9
- /** Callback when open state changes */
10
- onOpenChange?: (open: boolean) => void;
11
- /** Position sidebar on the right side */
12
- end?: boolean;
13
- /** Additional classes for sidebar container */
14
- sidebarClassName?: string;
15
- }
16
- /**
17
- * SidebarDrawer - A responsive sidebar layout component using DaisyUI's drawer.
18
- * Use for navigation sidebars that toggle on mobile.
19
- * For overlay panel drawers (forms, details), use the Drawer component instead.
20
- */
21
- export declare const SidebarDrawer: React.FC<SidebarDrawerProps>;
@@ -1,44 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import f from "react";
3
- const N = ({
4
- children: l,
5
- sidebar: d,
6
- open: a = !1,
7
- onOpenChange: o,
8
- end: c = !1,
9
- className: t = "",
10
- sidebarClassName: n = "",
11
- ...i
12
- }) => {
13
- const r = f.useId(), m = (b) => {
14
- o?.(b.target.checked);
15
- }, h = ["drawer", c && "drawer-end", t].filter(Boolean).join(" "), w = ["menu bg-base-200 min-h-full w-80 p-4", n].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ s("div", { className: h, "data-state": a ? "open" : "closed", ...i, children: [
17
- /* @__PURE__ */ e(
18
- "input",
19
- {
20
- id: r,
21
- type: "checkbox",
22
- className: "drawer-toggle",
23
- checked: a,
24
- onChange: m
25
- }
26
- ),
27
- /* @__PURE__ */ e("div", { className: "drawer-content", children: l }),
28
- /* @__PURE__ */ s("div", { className: "drawer-side", children: [
29
- /* @__PURE__ */ e(
30
- "label",
31
- {
32
- htmlFor: r,
33
- "aria-label": "close sidebar",
34
- className: "drawer-overlay"
35
- }
36
- ),
37
- /* @__PURE__ */ e("div", { className: w, children: d })
38
- ] })
39
- ] });
40
- };
41
- export {
42
- N as SidebarDrawer
43
- };
44
- //# sourceMappingURL=SidebarDrawer.js.map