@sonamu-kit/react-components 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/components/ui/alert-dialog.d.ts +1 -1
  2. package/dist/components/ui/alert-dialog.js +40 -31
  3. package/dist/components/ui/alert-dialog.js.map +1 -1
  4. package/dist/components/ui/context-menu.d.ts +1 -1
  5. package/dist/components/ui/context-menu.js +45 -36
  6. package/dist/components/ui/context-menu.js.map +1 -1
  7. package/dist/components/ui/dialog.d.ts +1 -1
  8. package/dist/components/ui/dialog.js +33 -24
  9. package/dist/components/ui/dialog.js.map +1 -1
  10. package/dist/components/ui/drawer.d.ts +1 -1
  11. package/dist/components/ui/drawer.js +36 -31
  12. package/dist/components/ui/drawer.js.map +1 -1
  13. package/dist/components/ui/dropdown-menu.d.ts +1 -1
  14. package/dist/components/ui/dropdown-menu.js +45 -36
  15. package/dist/components/ui/dropdown-menu.js.map +1 -1
  16. package/dist/components/ui/menubar.d.ts +1 -1
  17. package/dist/components/ui/menubar.js +55 -50
  18. package/dist/components/ui/menubar.js.map +1 -1
  19. package/dist/components/ui/pagination.js +2 -2
  20. package/dist/components/ui/pagination.js.map +1 -1
  21. package/dist/components/ui/popover.js +22 -17
  22. package/dist/components/ui/popover.js.map +1 -1
  23. package/dist/components/ui/sheet.d.ts +1 -1
  24. package/dist/components/ui/sheet.js +36 -27
  25. package/dist/components/ui/sheet.js.map +1 -1
  26. package/dist/contexts/index.d.ts +1 -0
  27. package/dist/contexts/index.js +3 -1
  28. package/dist/contexts/portal-container.d.ts +18 -0
  29. package/dist/contexts/portal-container.js +16 -0
  30. package/dist/contexts/portal-container.js.map +1 -0
  31. package/dist/index.js +66 -65
  32. package/package.json +3 -2
@@ -1,59 +1,68 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
- import t from "../../_virtual/~icons/lucide/x.js";
3
- import * as n from "react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { cva as a } from "class-variance-authority";
6
- import * as o from "@radix-ui/react-dialog";
2
+ import { usePortalContainer as t } from "../../contexts/portal-container.js";
3
+ import n from "../../_virtual/~icons/lucide/x.js";
4
+ import * as r from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { cva as o } from "class-variance-authority";
7
+ import * as s from "@radix-ui/react-dialog";
7
8
  // src/components/ui/sheet.tsx
8
- var s = o.Root, c = o.Trigger, l = o.Close, u = o.Portal, d = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(o.Overlay, {
9
+ var c = s.Root, l = s.Trigger, u = s.Close;
10
+ function d({ container: e, ...n }) {
11
+ let r = t();
12
+ return /* @__PURE__ */ i(s.Portal, {
13
+ container: e ?? r,
14
+ ...n
15
+ });
16
+ }
17
+ var f = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Overlay, {
9
18
  className: e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t),
10
19
  ...n,
11
- ref: i
20
+ ref: r
12
21
  }));
13
- d.displayName = o.Overlay.displayName;
14
- var f = { side: {
22
+ f.displayName = s.Overlay.displayName;
23
+ var p = { side: {
15
24
  top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
16
25
  bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
17
26
  left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
18
27
  right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
19
- } }, p = a("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
20
- variants: f,
28
+ } }, m = o("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
29
+ variants: p,
21
30
  defaultVariants: { side: "right" }
22
- }), m = n.forwardRef(({ side: n = "right", className: a, children: s, ...c }, l) => /* @__PURE__ */ i(u, { children: [/* @__PURE__ */ r(d, {}), /* @__PURE__ */ i(o.Content, {
31
+ }), h = r.forwardRef(({ side: t = "right", className: r, children: o, ...c }, l) => /* @__PURE__ */ a(d, { children: [/* @__PURE__ */ i(f, {}), /* @__PURE__ */ a(s.Content, {
23
32
  ref: l,
24
- className: e(p({ side: n }), a),
33
+ className: e(m({ side: t }), r),
25
34
  ...c,
26
- children: [s, /* @__PURE__ */ i(o.Close, {
35
+ children: [o, /* @__PURE__ */ a(s.Close, {
27
36
  className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
28
- children: [/* @__PURE__ */ r(t, { className: "h-4 w-4" }), /* @__PURE__ */ r("span", {
37
+ children: [/* @__PURE__ */ i(n, { className: "h-4 w-4" }), /* @__PURE__ */ i("span", {
29
38
  className: "sr-only",
30
39
  children: "Close"
31
40
  })]
32
41
  })]
33
42
  })] }));
34
- m.displayName = o.Content.displayName;
35
- var h = ({ className: t, ...n }) => /* @__PURE__ */ r("div", {
43
+ h.displayName = s.Content.displayName;
44
+ var g = ({ className: t, ...n }) => /* @__PURE__ */ i("div", {
36
45
  className: e("flex flex-col space-y-2 text-center sm:text-left", t),
37
46
  ...n
38
47
  });
39
- h.displayName = "SheetHeader";
40
- var g = ({ className: t, ...n }) => /* @__PURE__ */ r("div", {
48
+ g.displayName = "SheetHeader";
49
+ var _ = ({ className: t, ...n }) => /* @__PURE__ */ i("div", {
41
50
  className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
42
51
  ...n
43
52
  });
44
- g.displayName = "SheetFooter";
45
- var _ = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(o.Title, {
46
- ref: i,
53
+ _.displayName = "SheetFooter";
54
+ var v = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Title, {
55
+ ref: r,
47
56
  className: e("text-lg font-semibold text-foreground", t),
48
57
  ...n
49
58
  }));
50
- _.displayName = o.Title.displayName;
51
- var v = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(o.Description, {
52
- ref: i,
59
+ v.displayName = s.Title.displayName;
60
+ var y = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Description, {
61
+ ref: r,
53
62
  className: e("text-sm text-muted-foreground", t),
54
63
  ...n
55
64
  }));
56
- v.displayName = o.Description.displayName;
57
- export { s as Sheet, l as SheetClose, m as SheetContent, v as SheetDescription, g as SheetFooter, h as SheetHeader, d as SheetOverlay, u as SheetPortal, _ as SheetTitle, c as SheetTrigger, f as sheetVariantsConfig };
65
+ y.displayName = s.Description.displayName;
66
+ export { c as Sheet, u as SheetClose, h as SheetContent, y as SheetDescription, _ as SheetFooter, g as SheetHeader, f as SheetOverlay, d as SheetPortal, v as SheetTitle, l as SheetTrigger, p as sheetVariantsConfig };
58
67
 
59
68
  //# sourceMappingURL=sheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.js","names":["React","XIcon","ForwardRef","React$1","SheetPrimitive","Sheet","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","props","cn","className","sheetVariantsConfig","sheetVariants","cva","SheetContent","children","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["import * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva } from \"class-variance-authority\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport XIcon from \"~icons/lucide/x\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariantsConfig = {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n} as const;\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: sheetVariantsConfig,\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\ninterface SheetContentProps\n extends\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n sheetVariantsConfig,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":";;;;;;;AAQA,IAAMK,IAAQD,EAAe,MAEvBE,IAAeF,EAAe,SAE9BG,IAAaH,EAAe,OAE5BI,IAAcJ,EAAe,QAE7BK,IAAeT,EAAM,YAGxB,EAAE,cAAW,GAAGU,KAAS,MAC1B,kBAACN,EAAe,SAAhB;CACE,WAAWO,EACT,2JACAC,CACF;CACA,GAAIF;CACC;AACN,CAAA,CACF;AACD,EAAa,cAAcN,EAAe,QAAQ;AAElD,IAAMS,IAAsB,EAC1B,MAAM;CACJ,KAAK;CACL,QACE;CACF,MAAM;CACN,OACE;AACJ,EACF,GAEMC,IAAgBC,EACpB,oMACA;CACE,UAAUF;CACV,iBAAiB,EACf,MAAM,QACR;AACF,CACF,GAOMG,IAAehB,EAAM,YAGxB,EAAE,UAAO,SAAS,cAAW,aAAU,GAAGU,KAAS,MACpD,kBAACF,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,CAAe,CAAA,GACf,kBAACL,EAAe,SAAhB;CAA6B;CAAK,WAAWO,EAAGG,EAAc,EAAE,QAAK,CAAC,GAAGF,CAAS;CAAG,GAAIF;CAAzF,UAAA,CACGO,GACD,kBAACb,EAAe,OAAhB;EAAsB,WAAU;EAAhC,UAAA,CACE,kBAACH,GAAD,EAAO,WAAU,UAAW,CAAA,GAC5B,kBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAAW,CAAA,CACjB;CACA,CAAA,CAAA;AACb,CAAA,CAAA,EAAA,CAAA,CACd;AACD,EAAa,cAAcG,EAAe,QAAQ;AAElD,IAAMc,KAAe,EAAE,cAAW,GAAGR,QACnC,kBAAC,OAAD;CAAK,WAAWC,EAAG,oDAAoDC,CAAS;CAAG,GAAIF;AAAQ,CAAA;AAEjG,EAAY,cAAc;AAE1B,IAAMS,KAAe,EAAE,cAAW,GAAGT,QACnC,kBAAC,OAAD;CACE,WAAWC,EAAG,iEAAiEC,CAAS;CACxF,GAAIF;AACL,CAAA;AAEH,EAAY,cAAc;AAE1B,IAAMU,IAAapB,EAAM,YAGtB,EAAE,cAAW,GAAGU,KAAS,MAC1B,kBAACN,EAAe,OAAhB;CACO;CACL,WAAWO,EAAG,yCAAyCC,CAAS;CAChE,GAAIF;AACL,CAAA,CACF;AACD,EAAW,cAAcN,EAAe,MAAM;AAE9C,IAAMiB,IAAmBrB,EAAM,YAG5B,EAAE,cAAW,GAAGU,KAAS,MAC1B,kBAACN,EAAe,aAAhB;CACO;CACL,WAAWO,EAAG,iCAAiCC,CAAS;CACxD,GAAIF;AACL,CAAA,CACF;AACD,EAAiB,cAAcN,EAAe,YAAY"}
1
+ {"version":3,"file":"sheet.js","names":["React","XIcon","ForwardRef","React$1","SheetPrimitive","Sheet","SheetTrigger","SheetClose","SheetPortal","props","fallback","usePortalContainer","container","SheetOverlay","cn","className","sheetVariantsConfig","sheetVariants","cva","SheetContent","children","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["import * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva } from \"class-variance-authority\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport XIcon from \"~icons/lucide/x\";\n\nimport { usePortalContainer } from \"../../contexts/portal-container\";\nimport { cn } from \"../../lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nfunction SheetPortal({ container, ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n const fallback = usePortalContainer();\n return <SheetPrimitive.Portal container={container ?? fallback} {...props} />;\n}\n\nconst SheetOverlay = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariantsConfig = {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n} as const;\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: sheetVariantsConfig,\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\ninterface SheetContentProps\n extends\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n sheetVariantsConfig,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":";;;;;;;;AASA,IAAMK,IAAQD,EAAe,MAEvBE,IAAeF,EAAe,SAE9BG,IAAaH,EAAe;AAElC,SAASI,EAAY,EAAE,cAAW,GAAGC,KAA6D;CAChG,IAAMC,IAAWC,EAAmB;CACpC,OAAO,kBAACP,EAAe,QAAhB;EAAuB,WAAWQ,KAAaF;EAAU,GAAID;CAAQ,CAAA;AAC9E;AAEA,IAAMI,IAAeb,EAAM,YAGxB,EAAE,cAAW,GAAGS,KAAS,MAC1B,kBAACL,EAAe,SAAhB;CACE,WAAWU,EACT,2JACAC,CACF;CACA,GAAIN;CACC;AACN,CAAA,CACF;AACD,EAAa,cAAcL,EAAe,QAAQ;AAElD,IAAMY,IAAsB,EAC1B,MAAM;CACJ,KAAK;CACL,QACE;CACF,MAAM;CACN,OACE;AACJ,EACF,GAEMC,IAAgBC,EACpB,oMACA;CACE,UAAUF;CACV,iBAAiB,EACf,MAAM,QACR;AACF,CACF,GAOMG,IAAenB,EAAM,YAGxB,EAAE,UAAO,SAAS,cAAW,aAAU,GAAGS,KAAS,MACpD,kBAACD,GAAD,EAAA,UAAA,CACE,kBAACK,GAAD,CAAe,CAAA,GACf,kBAACT,EAAe,SAAhB;CAA6B;CAAK,WAAWU,EAAGG,EAAc,EAAE,QAAK,CAAC,GAAGF,CAAS;CAAG,GAAIN;CAAzF,UAAA,CACGW,GACD,kBAAChB,EAAe,OAAhB;EAAsB,WAAU;EAAhC,UAAA,CACE,kBAACH,GAAD,EAAO,WAAU,UAAW,CAAA,GAC5B,kBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAAW,CAAA,CACjB;CACA,CAAA,CAAA;AACb,CAAA,CAAA,EAAA,CAAA,CACd;AACD,EAAa,cAAcG,EAAe,QAAQ;AAElD,IAAMiB,KAAe,EAAE,cAAW,GAAGZ,QACnC,kBAAC,OAAD;CAAK,WAAWK,EAAG,oDAAoDC,CAAS;CAAG,GAAIN;AAAQ,CAAA;AAEjG,EAAY,cAAc;AAE1B,IAAMa,KAAe,EAAE,cAAW,GAAGb,QACnC,kBAAC,OAAD;CACE,WAAWK,EAAG,iEAAiEC,CAAS;CACxF,GAAIN;AACL,CAAA;AAEH,EAAY,cAAc;AAE1B,IAAMc,IAAavB,EAAM,YAGtB,EAAE,cAAW,GAAGS,KAAS,MAC1B,kBAACL,EAAe,OAAhB;CACO;CACL,WAAWU,EAAG,yCAAyCC,CAAS;CAChE,GAAIN;AACL,CAAA,CACF;AACD,EAAW,cAAcL,EAAe,MAAM;AAE9C,IAAMoB,IAAmBxB,EAAM,YAG5B,EAAE,cAAW,GAAGS,KAAS,MAC1B,kBAACL,EAAe,aAAhB;CACO;CACL,WAAWU,EAAG,iCAAiCC,CAAS;CACxD,GAAIN;AACL,CAAA,CACF;AACD,EAAiB,cAAcL,EAAe,YAAY"}
@@ -1,2 +1,3 @@
1
1
  export { type SonamuAuthClient, type SonamuContextValue, SonamuProvider, useSonamuBaseContext, } from './sonamu-context';
2
+ export { PortalContainerProvider, usePortalContainer } from './portal-container';
2
3
  export * from './types';
@@ -1 +1,3 @@
1
- export { SonamuProvider, useSonamuBaseContext } from "./sonamu-context.js";
1
+ import { PortalContainerProvider as e, usePortalContainer as t } from "./portal-container.js";
2
+ import { SonamuProvider as n, useSonamuBaseContext as r } from "./sonamu-context.js";
3
+ export { e as PortalContainerProvider, n as SonamuProvider, t as usePortalContainer, r as useSonamuBaseContext };
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * 아래 트리의 팝오버, 메뉴, 대화상자, 시트, 드로어가 포털로 붙을 요소를 정합니다.
4
+ * 주지 않거나 null이면 지금처럼 document.body에 붙습니다. 부품의 Portal이나 Root에 직접 준 container가 이깁니다.
5
+ * 확대·축소한 미리보기나 섀도 DOM처럼 body로 나가면 자리가 어긋나는 영역을 감쌉니다.
6
+ *
7
+ * @example
8
+ * const [box, setBox] = useState<HTMLElement | null>(null);
9
+ * <div ref={setBox}>
10
+ * <PortalContainerProvider container={box}>{children}</PortalContainerProvider>
11
+ * </div>
12
+ */
13
+ export declare function PortalContainerProvider({ container, children, }: {
14
+ container: HTMLElement | null;
15
+ children: ReactNode;
16
+ }): import('react').JSX.Element;
17
+ /** 가장 가까운 PortalContainerProvider가 준 요소입니다. 없으면 null입니다. */
18
+ export declare function usePortalContainer(): HTMLElement | null;
@@ -0,0 +1,16 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ // src/contexts/portal-container.tsx
4
+ var r = e(null);
5
+ function i({ container: e, children: t }) {
6
+ return /* @__PURE__ */ n(r.Provider, {
7
+ value: e,
8
+ children: t
9
+ });
10
+ }
11
+ function a() {
12
+ return t(r);
13
+ }
14
+ export { i as PortalContainerProvider, a as usePortalContainer };
15
+
16
+ //# sourceMappingURL=portal-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-container.js","names":["PortalContainerContext","createContext","PortalContainerProvider","container","usePortalContainer","useContext"],"sources":["../../src/contexts/portal-container.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport { type ReactNode } from \"react\";\n\nconst PortalContainerContext = createContext<HTMLElement | null>(null);\n\n/**\n * 아래 트리의 팝오버, 메뉴, 대화상자, 시트, 드로어가 포털로 붙을 요소를 정합니다.\n * 주지 않거나 null이면 지금처럼 document.body에 붙습니다. 부품의 Portal이나 Root에 직접 준 container가 이깁니다.\n * 확대·축소한 미리보기나 섀도 DOM처럼 body로 나가면 자리가 어긋나는 영역을 감쌉니다.\n *\n * @example\n * const [box, setBox] = useState<HTMLElement | null>(null);\n * <div ref={setBox}>\n * <PortalContainerProvider container={box}>{children}</PortalContainerProvider>\n * </div>\n */\nexport function PortalContainerProvider({\n container,\n children,\n}: {\n container: HTMLElement | null;\n children: ReactNode;\n}) {\n return (\n <PortalContainerContext.Provider value={container}>{children}</PortalContainerContext.Provider>\n );\n}\n\n/** 가장 가까운 PortalContainerProvider가 준 요소입니다. 없으면 null입니다. */\nexport function usePortalContainer() {\n return useContext(PortalContainerContext);\n}\n"],"mappings":";;;AAGA,IAAMA,IAAyBC,EAAkC,IAAI;AAarE,SAAgBC,EAAwB,EACtC,cACA,eAIC;CACD,OACE,kBAACF,EAAuB,UAAxB;EAAiC,OAAOG;EAAY;CAA0C,CAAA;AAElG;AAGA,SAAgBC,IAAqB;CACnC,OAAOC,EAAWL,CAAsB;AAC1C"}
package/dist/index.js CHANGED
@@ -2,69 +2,70 @@ import { toast as ee, useToast as te } from "./hooks/use-toast.js";
2
2
  import { cn as ne } from "./lib/utils.js";
3
3
  import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r } from "./components/ui/accordion.js";
4
4
  import { Alert as i, AlertDescription as a, AlertTitle as o } from "./components/ui/alert.js";
5
- import { Button as s, buttonVariants as c } from "./components/ui/button.js";
6
- import { AlertDialog as l, AlertDialogAction as u, AlertDialogCancel as d, AlertDialogContent as f, AlertDialogDescription as p, AlertDialogFooter as m, AlertDialogHeader as h, AlertDialogOverlay as g, AlertDialogPortal as _, AlertDialogTitle as v, AlertDialogTrigger as y } from "./components/ui/alert-dialog.js";
7
- import { AspectRatio as b } from "./components/ui/aspect-ratio.js";
8
- import { Avatar as x, AvatarFallback as S, AvatarImage as C } from "./components/ui/avatar.js";
9
- import { Badge as w, badgeVariants as T } from "./components/ui/badge.js";
10
- import { Breadcrumb as E, BreadcrumbEllipsis as D, BreadcrumbItem as O, BreadcrumbLink as k, BreadcrumbList as A, BreadcrumbPage as j, BreadcrumbSeparator as M } from "./components/ui/breadcrumb.js";
11
- import { Calendar as N } from "./components/ui/calendar.js";
12
- import { Card as P, CardAction as F, CardContent as I, CardDescription as L, CardFooter as R, CardHeader as z, CardTitle as B } from "./components/ui/card.js";
13
- import { Carousel as V, CarouselContent as H, CarouselItem as U, CarouselNext as W, CarouselPrevious as G } from "./components/ui/carousel.js";
14
- import { Checkbox as K } from "./components/ui/checkbox.js";
15
- import { Collapsible as q, CollapsibleContent as J, CollapsibleTrigger as Y } from "./components/ui/collapsible.js";
16
- import { SonamuProvider as X, useSonamuBaseContext as Z } from "./contexts/sonamu-context.js";
17
- import { Dialog as re, DialogClose as ie, DialogContent as ae, DialogDescription as oe, DialogFooter as se, DialogHeader as ce, DialogOverlay as le, DialogPortal as ue, DialogTitle as de, DialogTrigger as fe } from "./components/ui/dialog.js";
18
- import { Command as pe, CommandDialog as me, CommandEmpty as he, CommandGroup as ge, CommandInput as _e, CommandItem as ve, CommandList as ye, CommandSeparator as be, CommandShortcut as xe } from "./components/ui/command.js";
19
- import { Popover as Se, PopoverAnchor as Ce, PopoverContent as we, PopoverTrigger as Te } from "./components/ui/popover.js";
20
- import { Combobox as Ee } from "./components/ui/combobox.js";
21
- import { CommonModal as De, commonModalAtom as Oe, useCommonModal as ke } from "./components/ui/common-modal.js";
22
- import { ContextMenu as Ae, ContextMenuCheckboxItem as je, ContextMenuContent as Me, ContextMenuGroup as Ne, ContextMenuItem as Pe, ContextMenuLabel as Fe, ContextMenuPortal as Ie, ContextMenuRadioGroup as Le, ContextMenuRadioItem as Re, ContextMenuSeparator as ze, ContextMenuShortcut as Be, ContextMenuSub as Ve, ContextMenuSubContent as He, ContextMenuSubTrigger as Ue, ContextMenuTrigger as We } from "./components/ui/context-menu.js";
23
- import { Input as Ge } from "./components/ui/input.js";
24
- import { DateInput as Ke } from "./components/ui/date-input.js";
25
- import { DatePicker as qe, DatePickerWithDropdown as Je, DatePickerWithRange as Ye } from "./components/ui/date-picker.js";
26
- import { Drawer as Xe, DrawerClose as Ze, DrawerContent as Qe, DrawerDescription as $e, DrawerFooter as et, DrawerHeader as tt, DrawerOverlay as nt, DrawerPortal as rt, DrawerTitle as it, DrawerTrigger as at } from "./components/ui/drawer.js";
27
- import { DropdownMenu as ot, DropdownMenuCheckboxItem as st, DropdownMenuContent as ct, DropdownMenuGroup as lt, DropdownMenuItem as ut, DropdownMenuLabel as dt, DropdownMenuPortal as ft, DropdownMenuRadioGroup as pt, DropdownMenuRadioItem as mt, DropdownMenuSeparator as ht, DropdownMenuShortcut as gt, DropdownMenuSub as _t, DropdownMenuSubContent as vt, DropdownMenuSubTrigger as yt, DropdownMenuTrigger as bt } from "./components/ui/dropdown-menu.js";
28
- import { FileInput as xt } from "./components/ui/file-input.js";
29
- import { Label as St } from "./components/ui/label.js";
30
- import { Form as Ct, FormControl as wt, FormDescription as Tt, FormField as Et, FormItem as Dt, FormLabel as Ot, FormMessage as kt, useFormField as At } from "./components/ui/form.js";
31
- import { HoverCard as jt, HoverCardContent as Mt, HoverCardTrigger as Nt } from "./components/ui/hover-card.js";
32
- import { InputOTP as Pt, InputOTPGroup as Ft, InputOTPSeparator as It, InputOTPSlot as Lt } from "./components/ui/input-otp.js";
33
- import { Menubar as Rt, MenubarCheckboxItem as zt, MenubarContent as Bt, MenubarGroup as Vt, MenubarItem as Ht, MenubarLabel as Ut, MenubarMenu as Wt, MenubarPortal as Gt, MenubarRadioGroup as Q, MenubarRadioItem as Kt, MenubarSeparator as qt, MenubarShortcut as Jt, MenubarSub as Yt, MenubarSubContent as Xt, MenubarSubTrigger as Zt, MenubarTrigger as Qt } from "./components/ui/menubar.js";
34
- import { Separator as $t } from "./components/ui/separator.js";
35
- import { Select as en } from "./components/ui/select/select.js";
36
- import { MonthPickerMultiple as tn } from "./components/ui/month-picker-multiple.js";
37
- import { NavigationMenu as nn, NavigationMenuContent as rn, NavigationMenuIndicator as an, NavigationMenuItem as on, NavigationMenuLink as sn, NavigationMenuList as cn, NavigationMenuTrigger as ln, NavigationMenuViewport as un, navigationMenuTriggerStyle as dn } from "./components/ui/navigation-menu.js";
38
- import { Pagination as fn } from "./components/ui/pagination.js";
39
- import { Progress as pn } from "./components/ui/progress.js";
40
- import { RadioGroup as mn, RadioGroupItem as hn } from "./components/ui/radio-group.js";
41
- import { RangeNumberInput as gn } from "./components/ui/range-number-input.js";
42
- import { ResizableHandle as _n, ResizablePanel as vn, ResizablePanelGroup as yn } from "./components/ui/resizable.js";
43
- import { ScrollArea as bn, ScrollBar as xn } from "./components/ui/scroll-area.js";
44
- import { EnumSelect as Sn } from "./components/ui/select/enum-select.js";
45
- import { IdAsyncSelect as Cn } from "./components/ui/select/id-async-select.js";
46
- import { Sheet as wn, SheetClose as Tn, SheetContent as En, SheetDescription as Dn, SheetFooter as On, SheetHeader as kn, SheetOverlay as An, SheetPortal as jn, SheetTitle as Mn, SheetTrigger as Nn } from "./components/ui/sheet.js";
47
- import { useIsMobile as Pn } from "./lib/use-mobile.js";
48
- import { Skeleton as Fn } from "./components/ui/skeleton.js";
49
- import { Tooltip as In, TooltipContent as Ln, TooltipProvider as Rn, TooltipTrigger as zn } from "./components/ui/tooltip.js";
50
- import { Sidebar as Bn, SidebarContent as Vn, SidebarFooter as Hn, SidebarGroup as Un, SidebarGroupAction as Wn, SidebarGroupContent as Gn, SidebarGroupLabel as Kn, SidebarHeader as qn, SidebarInput as Jn, SidebarInset as Yn, SidebarMenu as Xn, SidebarMenuAction as Zn, SidebarMenuBadge as Qn, SidebarMenuButton as $n, SidebarMenuItem as er, SidebarMenuSkeleton as tr, SidebarMenuSub as nr, SidebarMenuSubButton as rr, SidebarMenuSubItem as ir, SidebarProvider as ar, SidebarRail as or, SidebarSeparator as sr, SidebarTrigger as cr, useSidebar as lr } from "./components/ui/sidebar.js";
51
- import { Slider as ur } from "./components/ui/slider.js";
52
- import { defaultOperatorByPropType as dr, operatorsByPropType as fr } from "./lib/types.js";
53
- import { TagInput as pr } from "./components/ui/tag-input.js";
54
- import { extractFieldMetaFromSchema as mr } from "./components/ui/sonamu-filter/utils.js";
55
- import { SonamuFilterModal as hr } from "./components/ui/sonamu-filter/sonamu-filter-modal.js";
56
- import { caster as gr, fastifyCaster as _r } from "./lib/caster.js";
57
- import { arrayableToArray as vr, caller as yr, dateF as br, datetimeF as xr, hidden as Sr, numF as Cr, paramsToSearchParams as wr, searchParamsToParams as Tr, sqlDateToDateString as Er } from "./lib/base-helpers.js";
5
+ import { PortalContainerProvider as s, usePortalContainer as c } from "./contexts/portal-container.js";
6
+ import { Button as l, buttonVariants as u } from "./components/ui/button.js";
7
+ import { AlertDialog as d, AlertDialogAction as f, AlertDialogCancel as p, AlertDialogContent as m, AlertDialogDescription as h, AlertDialogFooter as g, AlertDialogHeader as _, AlertDialogOverlay as v, AlertDialogPortal as y, AlertDialogTitle as b, AlertDialogTrigger as x } from "./components/ui/alert-dialog.js";
8
+ import { AspectRatio as S } from "./components/ui/aspect-ratio.js";
9
+ import { Avatar as C, AvatarFallback as w, AvatarImage as T } from "./components/ui/avatar.js";
10
+ import { Badge as E, badgeVariants as D } from "./components/ui/badge.js";
11
+ import { Breadcrumb as O, BreadcrumbEllipsis as k, BreadcrumbItem as A, BreadcrumbLink as j, BreadcrumbList as M, BreadcrumbPage as N, BreadcrumbSeparator as P } from "./components/ui/breadcrumb.js";
12
+ import { Calendar as F } from "./components/ui/calendar.js";
13
+ import { Card as I, CardAction as L, CardContent as R, CardDescription as z, CardFooter as B, CardHeader as V, CardTitle as H } from "./components/ui/card.js";
14
+ import { Carousel as U, CarouselContent as W, CarouselItem as G, CarouselNext as K, CarouselPrevious as q } from "./components/ui/carousel.js";
15
+ import { Checkbox as J } from "./components/ui/checkbox.js";
16
+ import { Collapsible as Y, CollapsibleContent as X, CollapsibleTrigger as Z } from "./components/ui/collapsible.js";
17
+ import { SonamuProvider as re, useSonamuBaseContext as ie } from "./contexts/sonamu-context.js";
18
+ import { Dialog as ae, DialogClose as oe, DialogContent as se, DialogDescription as ce, DialogFooter as le, DialogHeader as ue, DialogOverlay as de, DialogPortal as fe, DialogTitle as pe, DialogTrigger as me } from "./components/ui/dialog.js";
19
+ import { Command as he, CommandDialog as ge, CommandEmpty as _e, CommandGroup as ve, CommandInput as ye, CommandItem as be, CommandList as xe, CommandSeparator as Se, CommandShortcut as Ce } from "./components/ui/command.js";
20
+ import { Popover as we, PopoverAnchor as Te, PopoverContent as Ee, PopoverTrigger as De } from "./components/ui/popover.js";
21
+ import { Combobox as Oe } from "./components/ui/combobox.js";
22
+ import { CommonModal as ke, commonModalAtom as Ae, useCommonModal as je } from "./components/ui/common-modal.js";
23
+ import { ContextMenu as Me, ContextMenuCheckboxItem as Ne, ContextMenuContent as Pe, ContextMenuGroup as Fe, ContextMenuItem as Ie, ContextMenuLabel as Le, ContextMenuPortal as Re, ContextMenuRadioGroup as ze, ContextMenuRadioItem as Be, ContextMenuSeparator as Ve, ContextMenuShortcut as He, ContextMenuSub as Ue, ContextMenuSubContent as We, ContextMenuSubTrigger as Ge, ContextMenuTrigger as Ke } from "./components/ui/context-menu.js";
24
+ import { Input as qe } from "./components/ui/input.js";
25
+ import { DateInput as Je } from "./components/ui/date-input.js";
26
+ import { DatePicker as Ye, DatePickerWithDropdown as Xe, DatePickerWithRange as Ze } from "./components/ui/date-picker.js";
27
+ import { Drawer as Qe, DrawerClose as $e, DrawerContent as et, DrawerDescription as tt, DrawerFooter as nt, DrawerHeader as rt, DrawerOverlay as it, DrawerPortal as at, DrawerTitle as ot, DrawerTrigger as st } from "./components/ui/drawer.js";
28
+ import { DropdownMenu as ct, DropdownMenuCheckboxItem as lt, DropdownMenuContent as ut, DropdownMenuGroup as dt, DropdownMenuItem as ft, DropdownMenuLabel as pt, DropdownMenuPortal as mt, DropdownMenuRadioGroup as ht, DropdownMenuRadioItem as gt, DropdownMenuSeparator as _t, DropdownMenuShortcut as vt, DropdownMenuSub as yt, DropdownMenuSubContent as bt, DropdownMenuSubTrigger as xt, DropdownMenuTrigger as St } from "./components/ui/dropdown-menu.js";
29
+ import { FileInput as Ct } from "./components/ui/file-input.js";
30
+ import { Label as wt } from "./components/ui/label.js";
31
+ import { Form as Tt, FormControl as Et, FormDescription as Dt, FormField as Ot, FormItem as kt, FormLabel as At, FormMessage as jt, useFormField as Mt } from "./components/ui/form.js";
32
+ import { HoverCard as Nt, HoverCardContent as Pt, HoverCardTrigger as Ft } from "./components/ui/hover-card.js";
33
+ import { InputOTP as It, InputOTPGroup as Lt, InputOTPSeparator as Rt, InputOTPSlot as zt } from "./components/ui/input-otp.js";
34
+ import { Menubar as Bt, MenubarCheckboxItem as Vt, MenubarContent as Ht, MenubarGroup as Ut, MenubarItem as Wt, MenubarLabel as Gt, MenubarMenu as Q, MenubarPortal as Kt, MenubarRadioGroup as qt, MenubarRadioItem as Jt, MenubarSeparator as Yt, MenubarShortcut as Xt, MenubarSub as Zt, MenubarSubContent as Qt, MenubarSubTrigger as $t, MenubarTrigger as en } from "./components/ui/menubar.js";
35
+ import { Separator as tn } from "./components/ui/separator.js";
36
+ import { Select as nn } from "./components/ui/select/select.js";
37
+ import { MonthPickerMultiple as rn } from "./components/ui/month-picker-multiple.js";
38
+ import { NavigationMenu as an, NavigationMenuContent as on, NavigationMenuIndicator as sn, NavigationMenuItem as cn, NavigationMenuLink as ln, NavigationMenuList as un, NavigationMenuTrigger as dn, NavigationMenuViewport as fn, navigationMenuTriggerStyle as pn } from "./components/ui/navigation-menu.js";
39
+ import { Pagination as mn } from "./components/ui/pagination.js";
40
+ import { Progress as hn } from "./components/ui/progress.js";
41
+ import { RadioGroup as gn, RadioGroupItem as _n } from "./components/ui/radio-group.js";
42
+ import { RangeNumberInput as vn } from "./components/ui/range-number-input.js";
43
+ import { ResizableHandle as yn, ResizablePanel as bn, ResizablePanelGroup as xn } from "./components/ui/resizable.js";
44
+ import { ScrollArea as Sn, ScrollBar as Cn } from "./components/ui/scroll-area.js";
45
+ import { EnumSelect as wn } from "./components/ui/select/enum-select.js";
46
+ import { IdAsyncSelect as Tn } from "./components/ui/select/id-async-select.js";
47
+ import { Sheet as En, SheetClose as Dn, SheetContent as On, SheetDescription as kn, SheetFooter as An, SheetHeader as jn, SheetOverlay as Mn, SheetPortal as Nn, SheetTitle as Pn, SheetTrigger as Fn } from "./components/ui/sheet.js";
48
+ import { useIsMobile as In } from "./lib/use-mobile.js";
49
+ import { Skeleton as Ln } from "./components/ui/skeleton.js";
50
+ import { Tooltip as Rn, TooltipContent as zn, TooltipProvider as Bn, TooltipTrigger as Vn } from "./components/ui/tooltip.js";
51
+ import { Sidebar as Hn, SidebarContent as Un, SidebarFooter as Wn, SidebarGroup as Gn, SidebarGroupAction as Kn, SidebarGroupContent as qn, SidebarGroupLabel as Jn, SidebarHeader as Yn, SidebarInput as Xn, SidebarInset as Zn, SidebarMenu as Qn, SidebarMenuAction as $n, SidebarMenuBadge as er, SidebarMenuButton as tr, SidebarMenuItem as nr, SidebarMenuSkeleton as rr, SidebarMenuSub as ir, SidebarMenuSubButton as ar, SidebarMenuSubItem as or, SidebarProvider as sr, SidebarRail as cr, SidebarSeparator as lr, SidebarTrigger as ur, useSidebar as dr } from "./components/ui/sidebar.js";
52
+ import { Slider as fr } from "./components/ui/slider.js";
53
+ import { defaultOperatorByPropType as pr, operatorsByPropType as mr } from "./lib/types.js";
54
+ import { TagInput as hr } from "./components/ui/tag-input.js";
55
+ import { extractFieldMetaFromSchema as gr } from "./components/ui/sonamu-filter/utils.js";
56
+ import { SonamuFilterModal as _r } from "./components/ui/sonamu-filter/sonamu-filter-modal.js";
57
+ import { caster as vr, fastifyCaster as yr } from "./lib/caster.js";
58
+ import { arrayableToArray as br, caller as xr, dateF as Sr, datetimeF as Cr, hidden as wr, numF as Tr, paramsToSearchParams as Er, searchParamsToParams as Dr, sqlDateToDateString as Or } from "./lib/base-helpers.js";
58
59
  import { SonamuFilterPopover as $ } from "./components/ui/sonamu-filter/sonamu-filter-popover.js";
59
- import { Switch as Dr } from "./components/ui/switch.js";
60
- import { Table as Or, TableBody as kr, TableCaption as Ar, TableCell as jr, TableFooter as Mr, TableHead as Nr, TableHeader as Pr, TableRow as Fr } from "./components/ui/table.js";
61
- import { Tabs as Ir, TabsContent as Lr, TabsList as Rr, TabsTrigger as zr } from "./components/ui/tabs.js";
62
- import { Textarea as Br } from "./components/ui/textarea.js";
63
- import { Toast as Vr, ToastAction as Hr, ToastClose as Ur, ToastDescription as Wr, ToastProvider as Gr, ToastTitle as Kr, ToastViewport as qr } from "./components/ui/toast.js";
64
- import { Toaster as Jr } from "./components/ui/toaster.js";
65
- import { Toggle as Yr, toggleVariants as Xr } from "./components/ui/toggle.js";
66
- import { ToggleGroup as Zr, ToggleGroupItem as Qr } from "./components/ui/toggle-group.js";
67
- import { useTypeForm as $r } from "./lib/form-helpers.js";
68
- import { useListParams as ei, useSelection as ti } from "./lib/list-helpers.js";
69
- import { useModal as ni } from "./lib/modal-helpers.js";
70
- export { e as Accordion, t as AccordionContent, n as AccordionItem, r as AccordionTrigger, i as Alert, a as AlertDescription, l as AlertDialog, u as AlertDialogAction, d as AlertDialogCancel, f as AlertDialogContent, p as AlertDialogDescription, m as AlertDialogFooter, h as AlertDialogHeader, g as AlertDialogOverlay, _ as AlertDialogPortal, v as AlertDialogTitle, y as AlertDialogTrigger, o as AlertTitle, b as AspectRatio, x as Avatar, S as AvatarFallback, C as AvatarImage, w as Badge, E as Breadcrumb, D as BreadcrumbEllipsis, O as BreadcrumbItem, k as BreadcrumbLink, A as BreadcrumbList, j as BreadcrumbPage, M as BreadcrumbSeparator, s as Button, N as Calendar, P as Card, F as CardAction, I as CardContent, L as CardDescription, R as CardFooter, z as CardHeader, B as CardTitle, V as Carousel, H as CarouselContent, U as CarouselItem, W as CarouselNext, G as CarouselPrevious, K as Checkbox, q as Collapsible, J as CollapsibleContent, Y as CollapsibleTrigger, Ee as Combobox, pe as Command, me as CommandDialog, he as CommandEmpty, ge as CommandGroup, _e as CommandInput, ve as CommandItem, ye as CommandList, be as CommandSeparator, xe as CommandShortcut, De as CommonModal, Ae as ContextMenu, je as ContextMenuCheckboxItem, Me as ContextMenuContent, Ne as ContextMenuGroup, Pe as ContextMenuItem, Fe as ContextMenuLabel, Ie as ContextMenuPortal, Le as ContextMenuRadioGroup, Re as ContextMenuRadioItem, ze as ContextMenuSeparator, Be as ContextMenuShortcut, Ve as ContextMenuSub, He as ContextMenuSubContent, Ue as ContextMenuSubTrigger, We as ContextMenuTrigger, Ke as DateInput, qe as DatePicker, Je as DatePickerWithDropdown, Ye as DatePickerWithRange, re as Dialog, ie as DialogClose, ae as DialogContent, oe as DialogDescription, se as DialogFooter, ce as DialogHeader, le as DialogOverlay, ue as DialogPortal, de as DialogTitle, fe as DialogTrigger, Xe as Drawer, Ze as DrawerClose, Qe as DrawerContent, $e as DrawerDescription, et as DrawerFooter, tt as DrawerHeader, nt as DrawerOverlay, rt as DrawerPortal, it as DrawerTitle, at as DrawerTrigger, ot as DropdownMenu, st as DropdownMenuCheckboxItem, ct as DropdownMenuContent, lt as DropdownMenuGroup, ut as DropdownMenuItem, dt as DropdownMenuLabel, ft as DropdownMenuPortal, pt as DropdownMenuRadioGroup, mt as DropdownMenuRadioItem, ht as DropdownMenuSeparator, gt as DropdownMenuShortcut, _t as DropdownMenuSub, vt as DropdownMenuSubContent, yt as DropdownMenuSubTrigger, bt as DropdownMenuTrigger, Sn as EnumSelect, xt as FileInput, Ct as Form, wt as FormControl, Tt as FormDescription, Et as FormField, Dt as FormItem, Ot as FormLabel, kt as FormMessage, jt as HoverCard, Mt as HoverCardContent, Nt as HoverCardTrigger, Cn as IdAsyncSelect, Ge as Input, Pt as InputOTP, Ft as InputOTPGroup, It as InputOTPSeparator, Lt as InputOTPSlot, St as Label, Rt as Menubar, zt as MenubarCheckboxItem, Bt as MenubarContent, Vt as MenubarGroup, Ht as MenubarItem, Ut as MenubarLabel, Wt as MenubarMenu, Gt as MenubarPortal, Q as MenubarRadioGroup, Kt as MenubarRadioItem, qt as MenubarSeparator, Jt as MenubarShortcut, Yt as MenubarSub, Xt as MenubarSubContent, Zt as MenubarSubTrigger, Qt as MenubarTrigger, tn as MonthPickerMultiple, nn as NavigationMenu, rn as NavigationMenuContent, an as NavigationMenuIndicator, on as NavigationMenuItem, sn as NavigationMenuLink, cn as NavigationMenuList, ln as NavigationMenuTrigger, un as NavigationMenuViewport, fn as Pagination, Se as Popover, Ce as PopoverAnchor, we as PopoverContent, Te as PopoverTrigger, pn as Progress, mn as RadioGroup, hn as RadioGroupItem, gn as RangeNumberInput, _n as ResizableHandle, vn as ResizablePanel, yn as ResizablePanelGroup, bn as ScrollArea, xn as ScrollBar, en as Select, $t as Separator, wn as Sheet, Tn as SheetClose, En as SheetContent, Dn as SheetDescription, On as SheetFooter, kn as SheetHeader, An as SheetOverlay, jn as SheetPortal, Mn as SheetTitle, Nn as SheetTrigger, Bn as Sidebar, Vn as SidebarContent, Hn as SidebarFooter, Un as SidebarGroup, Wn as SidebarGroupAction, Gn as SidebarGroupContent, Kn as SidebarGroupLabel, qn as SidebarHeader, Jn as SidebarInput, Yn as SidebarInset, Xn as SidebarMenu, Zn as SidebarMenuAction, Qn as SidebarMenuBadge, $n as SidebarMenuButton, er as SidebarMenuItem, tr as SidebarMenuSkeleton, nr as SidebarMenuSub, rr as SidebarMenuSubButton, ir as SidebarMenuSubItem, ar as SidebarProvider, or as SidebarRail, sr as SidebarSeparator, cr as SidebarTrigger, Fn as Skeleton, ur as Slider, hr as SonamuFilterModal, $ as SonamuFilterPopover, $ as SonamuFilterTooltip, X as SonamuProvider, Dr as Switch, Or as Table, kr as TableBody, Ar as TableCaption, jr as TableCell, Mr as TableFooter, Nr as TableHead, Pr as TableHeader, Fr as TableRow, Ir as Tabs, Lr as TabsContent, Rr as TabsList, zr as TabsTrigger, pr as TagInput, Br as Textarea, Vr as Toast, Hr as ToastAction, Ur as ToastClose, Wr as ToastDescription, Gr as ToastProvider, Kr as ToastTitle, qr as ToastViewport, Jr as Toaster, Yr as Toggle, Zr as ToggleGroup, Qr as ToggleGroupItem, In as Tooltip, Ln as TooltipContent, Rn as TooltipProvider, zn as TooltipTrigger, vr as arrayableToArray, T as badgeVariants, c as buttonVariants, yr as caller, gr as caster, ne as cn, Oe as commonModalAtom, br as dateF, xr as datetimeF, dr as defaultOperatorByPropType, mr as extractFieldMetaFromSchema, _r as fastifyCaster, Sr as hidden, dn as navigationMenuTriggerStyle, Cr as numF, fr as operatorsByPropType, wr as paramsToSearchParams, Tr as searchParamsToParams, Er as sqlDateToDateString, ee as toast, Xr as toggleVariants, ke as useCommonModal, At as useFormField, Pn as useIsMobile, ei as useListParams, ni as useModal, ti as useSelection, lr as useSidebar, Z as useSonamuBaseContext, te as useToast, $r as useTypeForm };
60
+ import { Switch as kr } from "./components/ui/switch.js";
61
+ import { Table as Ar, TableBody as jr, TableCaption as Mr, TableCell as Nr, TableFooter as Pr, TableHead as Fr, TableHeader as Ir, TableRow as Lr } from "./components/ui/table.js";
62
+ import { Tabs as Rr, TabsContent as zr, TabsList as Br, TabsTrigger as Vr } from "./components/ui/tabs.js";
63
+ import { Textarea as Hr } from "./components/ui/textarea.js";
64
+ import { Toast as Ur, ToastAction as Wr, ToastClose as Gr, ToastDescription as Kr, ToastProvider as qr, ToastTitle as Jr, ToastViewport as Yr } from "./components/ui/toast.js";
65
+ import { Toaster as Xr } from "./components/ui/toaster.js";
66
+ import { Toggle as Zr, toggleVariants as Qr } from "./components/ui/toggle.js";
67
+ import { ToggleGroup as $r, ToggleGroupItem as ei } from "./components/ui/toggle-group.js";
68
+ import { useTypeForm as ti } from "./lib/form-helpers.js";
69
+ import { useListParams as ni, useSelection as ri } from "./lib/list-helpers.js";
70
+ import { useModal as ii } from "./lib/modal-helpers.js";
71
+ export { e as Accordion, t as AccordionContent, n as AccordionItem, r as AccordionTrigger, i as Alert, a as AlertDescription, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, o as AlertTitle, S as AspectRatio, C as Avatar, w as AvatarFallback, T as AvatarImage, E as Badge, O as Breadcrumb, k as BreadcrumbEllipsis, A as BreadcrumbItem, j as BreadcrumbLink, M as BreadcrumbList, N as BreadcrumbPage, P as BreadcrumbSeparator, l as Button, F as Calendar, I as Card, L as CardAction, R as CardContent, z as CardDescription, B as CardFooter, V as CardHeader, H as CardTitle, U as Carousel, W as CarouselContent, G as CarouselItem, K as CarouselNext, q as CarouselPrevious, J as Checkbox, Y as Collapsible, X as CollapsibleContent, Z as CollapsibleTrigger, Oe as Combobox, he as Command, ge as CommandDialog, _e as CommandEmpty, ve as CommandGroup, ye as CommandInput, be as CommandItem, xe as CommandList, Se as CommandSeparator, Ce as CommandShortcut, ke as CommonModal, Me as ContextMenu, Ne as ContextMenuCheckboxItem, Pe as ContextMenuContent, Fe as ContextMenuGroup, Ie as ContextMenuItem, Le as ContextMenuLabel, Re as ContextMenuPortal, ze as ContextMenuRadioGroup, Be as ContextMenuRadioItem, Ve as ContextMenuSeparator, He as ContextMenuShortcut, Ue as ContextMenuSub, We as ContextMenuSubContent, Ge as ContextMenuSubTrigger, Ke as ContextMenuTrigger, Je as DateInput, Ye as DatePicker, Xe as DatePickerWithDropdown, Ze as DatePickerWithRange, ae as Dialog, oe as DialogClose, se as DialogContent, ce as DialogDescription, le as DialogFooter, ue as DialogHeader, de as DialogOverlay, fe as DialogPortal, pe as DialogTitle, me as DialogTrigger, Qe as Drawer, $e as DrawerClose, et as DrawerContent, tt as DrawerDescription, nt as DrawerFooter, rt as DrawerHeader, it as DrawerOverlay, at as DrawerPortal, ot as DrawerTitle, st as DrawerTrigger, ct as DropdownMenu, lt as DropdownMenuCheckboxItem, ut as DropdownMenuContent, dt as DropdownMenuGroup, ft as DropdownMenuItem, pt as DropdownMenuLabel, mt as DropdownMenuPortal, ht as DropdownMenuRadioGroup, gt as DropdownMenuRadioItem, _t as DropdownMenuSeparator, vt as DropdownMenuShortcut, yt as DropdownMenuSub, bt as DropdownMenuSubContent, xt as DropdownMenuSubTrigger, St as DropdownMenuTrigger, wn as EnumSelect, Ct as FileInput, Tt as Form, Et as FormControl, Dt as FormDescription, Ot as FormField, kt as FormItem, At as FormLabel, jt as FormMessage, Nt as HoverCard, Pt as HoverCardContent, Ft as HoverCardTrigger, Tn as IdAsyncSelect, qe as Input, It as InputOTP, Lt as InputOTPGroup, Rt as InputOTPSeparator, zt as InputOTPSlot, wt as Label, Bt as Menubar, Vt as MenubarCheckboxItem, Ht as MenubarContent, Ut as MenubarGroup, Wt as MenubarItem, Gt as MenubarLabel, Q as MenubarMenu, Kt as MenubarPortal, qt as MenubarRadioGroup, Jt as MenubarRadioItem, Yt as MenubarSeparator, Xt as MenubarShortcut, Zt as MenubarSub, Qt as MenubarSubContent, $t as MenubarSubTrigger, en as MenubarTrigger, rn as MonthPickerMultiple, an as NavigationMenu, on as NavigationMenuContent, sn as NavigationMenuIndicator, cn as NavigationMenuItem, ln as NavigationMenuLink, un as NavigationMenuList, dn as NavigationMenuTrigger, fn as NavigationMenuViewport, mn as Pagination, we as Popover, Te as PopoverAnchor, Ee as PopoverContent, De as PopoverTrigger, s as PortalContainerProvider, hn as Progress, gn as RadioGroup, _n as RadioGroupItem, vn as RangeNumberInput, yn as ResizableHandle, bn as ResizablePanel, xn as ResizablePanelGroup, Sn as ScrollArea, Cn as ScrollBar, nn as Select, tn as Separator, En as Sheet, Dn as SheetClose, On as SheetContent, kn as SheetDescription, An as SheetFooter, jn as SheetHeader, Mn as SheetOverlay, Nn as SheetPortal, Pn as SheetTitle, Fn as SheetTrigger, Hn as Sidebar, Un as SidebarContent, Wn as SidebarFooter, Gn as SidebarGroup, Kn as SidebarGroupAction, qn as SidebarGroupContent, Jn as SidebarGroupLabel, Yn as SidebarHeader, Xn as SidebarInput, Zn as SidebarInset, Qn as SidebarMenu, $n as SidebarMenuAction, er as SidebarMenuBadge, tr as SidebarMenuButton, nr as SidebarMenuItem, rr as SidebarMenuSkeleton, ir as SidebarMenuSub, ar as SidebarMenuSubButton, or as SidebarMenuSubItem, sr as SidebarProvider, cr as SidebarRail, lr as SidebarSeparator, ur as SidebarTrigger, Ln as Skeleton, fr as Slider, _r as SonamuFilterModal, $ as SonamuFilterPopover, $ as SonamuFilterTooltip, re as SonamuProvider, kr as Switch, Ar as Table, jr as TableBody, Mr as TableCaption, Nr as TableCell, Pr as TableFooter, Fr as TableHead, Ir as TableHeader, Lr as TableRow, Rr as Tabs, zr as TabsContent, Br as TabsList, Vr as TabsTrigger, hr as TagInput, Hr as Textarea, Ur as Toast, Wr as ToastAction, Gr as ToastClose, Kr as ToastDescription, qr as ToastProvider, Jr as ToastTitle, Yr as ToastViewport, Xr as Toaster, Zr as Toggle, $r as ToggleGroup, ei as ToggleGroupItem, Rn as Tooltip, zn as TooltipContent, Bn as TooltipProvider, Vn as TooltipTrigger, br as arrayableToArray, D as badgeVariants, u as buttonVariants, xr as caller, vr as caster, ne as cn, Ae as commonModalAtom, Sr as dateF, Cr as datetimeF, pr as defaultOperatorByPropType, gr as extractFieldMetaFromSchema, yr as fastifyCaster, wr as hidden, pn as navigationMenuTriggerStyle, Tr as numF, mr as operatorsByPropType, Er as paramsToSearchParams, Dr as searchParamsToParams, Or as sqlDateToDateString, ee as toast, Qr as toggleVariants, je as useCommonModal, Mt as useFormField, In as useIsMobile, ni as useListParams, ii as useModal, c as usePortalContainer, ri as useSelection, dr as useSidebar, ie as useSonamuBaseContext, te as useToast, ti as useTypeForm };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonamu-kit/react-components",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "license": "MIT",
5
5
  "author": "CartaNova <dev@cartanova.ai>",
6
6
  "repository": {
@@ -125,7 +125,7 @@
125
125
  },
126
126
  "peerDependencies": {
127
127
  "@tanstack/react-query": "^5.104.5",
128
- "@tanstack/react-router": "1.170.45",
128
+ "@tanstack/react-router": "^1.143.11",
129
129
  "better-auth": "~1.7.11",
130
130
  "react": "^19.3.1",
131
131
  "react-dom": "^19.3.1"
@@ -134,6 +134,7 @@
134
134
  "dev": "vite",
135
135
  "build": "vite build",
136
136
  "lint": "oxlint src",
137
+ "typecheck": "tsc --noEmit",
137
138
  "test": "vitest run --config vitest.config.ts",
138
139
  "test:exports": "node --test tests/package-exports.test.mjs",
139
140
  "preview": "vite preview",