@betterlb/kapwa 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +121 -0
  2. package/README.md +177 -0
  3. package/dist/index.cjs +2 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +6 -0
  6. package/dist/index.js +22 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/jsx-runtime-DdAyboqB.js +282 -0
  9. package/dist/jsx-runtime-DdAyboqB.js.map +1 -0
  10. package/dist/jsx-runtime-KWq1EBG2.cjs +23 -0
  11. package/dist/jsx-runtime-KWq1EBG2.cjs.map +1 -0
  12. package/dist/kapwa/banner/index.d.ts +26 -0
  13. package/dist/kapwa/banner/index.tsx.cjs +2 -0
  14. package/dist/kapwa/banner/index.tsx.cjs.map +1 -0
  15. package/dist/kapwa/banner/index.tsx.js +309 -0
  16. package/dist/kapwa/banner/index.tsx.js.map +1 -0
  17. package/dist/kapwa/button/hooks/index.d.ts +1 -0
  18. package/dist/kapwa/button/hooks/index.ts.cjs +2 -0
  19. package/dist/kapwa/button/hooks/index.ts.cjs.map +1 -0
  20. package/dist/kapwa/button/hooks/index.ts.js +6 -0
  21. package/dist/kapwa/button/hooks/index.ts.js.map +1 -0
  22. package/dist/kapwa/button/index.d.ts +12 -0
  23. package/dist/kapwa/button/index.tsx.cjs +2 -0
  24. package/dist/kapwa/button/index.tsx.cjs.map +1 -0
  25. package/dist/kapwa/button/index.tsx.js +82 -0
  26. package/dist/kapwa/button/index.tsx.js.map +1 -0
  27. package/dist/kapwa/card/index.d.ts +27 -0
  28. package/dist/kapwa/card/index.tsx.cjs +2 -0
  29. package/dist/kapwa/card/index.tsx.cjs.map +1 -0
  30. package/dist/kapwa/card/index.tsx.js +64 -0
  31. package/dist/kapwa/card/index.tsx.js.map +1 -0
  32. package/dist/kapwa/input/index.d.ts +3 -0
  33. package/dist/kapwa/input/index.tsx.cjs +2 -0
  34. package/dist/kapwa/input/index.tsx.cjs.map +1 -0
  35. package/dist/kapwa/input/index.tsx.js +22 -0
  36. package/dist/kapwa/input/index.tsx.js.map +1 -0
  37. package/dist/kapwa/label/index.d.ts +5 -0
  38. package/dist/kapwa/label/index.tsx.cjs +2 -0
  39. package/dist/kapwa/label/index.tsx.cjs.map +1 -0
  40. package/dist/kapwa/label/index.tsx.js +121 -0
  41. package/dist/kapwa/label/index.tsx.js.map +1 -0
  42. package/dist/kapwa.css +612 -0
  43. package/dist/lib/utils.cjs +2 -0
  44. package/dist/lib/utils.cjs.map +1 -0
  45. package/dist/lib/utils.d.ts +5 -0
  46. package/dist/lib/utils.js +8 -0
  47. package/dist/lib/utils.js.map +1 -0
  48. package/dist/utils-BWXuiikn.js +2293 -0
  49. package/dist/utils-BWXuiikn.js.map +1 -0
  50. package/dist/utils-GVl92sVg.cjs +2 -0
  51. package/dist/utils-GVl92sVg.cjs.map +1 -0
  52. package/package.json +219 -0
@@ -0,0 +1,82 @@
1
+ import { j as r } from "../../jsx-runtime-DdAyboqB.js";
2
+ import { c as g } from "../../utils-BWXuiikn.js";
3
+ const h = ({
4
+ children: n,
5
+ className: i,
6
+ variant: s = "primary",
7
+ size: c = "md",
8
+ fullWidth: l = !1,
9
+ isLoading: e = !1,
10
+ leftIcon: t,
11
+ rightIcon: a,
12
+ disabled: m,
13
+ ...p
14
+ }) => {
15
+ const x = {
16
+ primary: "bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500",
17
+ secondary: "bg-secondary-500 text-white hover:bg-secondary-600 focus:ring-secondary-500",
18
+ outline: "bg-transparent border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-primary-500",
19
+ ghost: "bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500",
20
+ link: "bg-transparent text-primary-500 hover:underline p-0 h-auto focus:ring-0"
21
+ }, y = {
22
+ sm: "text-sm px-3 py-1.5 h-8",
23
+ md: "text-base px-4 py-2 h-10",
24
+ lg: "text-lg px-6 py-3 h-12"
25
+ }, o = m || e;
26
+ return /* @__PURE__ */ r.jsxs(
27
+ "button",
28
+ {
29
+ className: g(
30
+ "inline-flex items-center justify-center rounded-md font-medium transition-colors",
31
+ "focus:outline-hidden focus:ring-2 focus:ring-offset-2",
32
+ x[s],
33
+ y[c],
34
+ l ? "w-full" : "",
35
+ o ? "opacity-60 cursor-not-allowed" : "",
36
+ s !== "link" && "shadow-xs",
37
+ i
38
+ ),
39
+ disabled: o,
40
+ ...p,
41
+ children: [
42
+ e && /* @__PURE__ */ r.jsxs(
43
+ "svg",
44
+ {
45
+ className: "animate-spin -ml-1 mr-2 h-4 w-4 text-current",
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ fill: "none",
48
+ viewBox: "0 0 24 24",
49
+ children: [
50
+ /* @__PURE__ */ r.jsx(
51
+ "circle",
52
+ {
53
+ className: "opacity-25",
54
+ cx: "12",
55
+ cy: "12",
56
+ r: "10",
57
+ stroke: "currentColor",
58
+ strokeWidth: "4"
59
+ }
60
+ ),
61
+ /* @__PURE__ */ r.jsx(
62
+ "path",
63
+ {
64
+ className: "opacity-75",
65
+ fill: "currentColor",
66
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
67
+ }
68
+ )
69
+ ]
70
+ }
71
+ ),
72
+ !e && t && /* @__PURE__ */ r.jsx("span", { className: "mr-2", children: t }),
73
+ n,
74
+ !e && a && /* @__PURE__ */ r.jsx("span", { className: "ml-2", children: a })
75
+ ]
76
+ }
77
+ );
78
+ };
79
+ export {
80
+ h as Button
81
+ };
82
+ //# sourceMappingURL=index.tsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.js","sources":["../../../src/kapwa/button/index.tsx"],"sourcesContent":["import React from 'react';\nimport { cn } from '@lib/utils';\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n children: React.ReactNode;\n variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'link';\n size?: 'sm' | 'md' | 'lg';\n fullWidth?: boolean;\n isLoading?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n}\n\nconst Button = ({\n children,\n className,\n variant = 'primary',\n size = 'md',\n fullWidth = false,\n isLoading = false,\n leftIcon,\n rightIcon,\n disabled,\n ...props\n}: ButtonProps) => {\n const variants = {\n primary:\n 'bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500',\n secondary:\n 'bg-secondary-500 text-white hover:bg-secondary-600 focus:ring-secondary-500',\n outline:\n 'bg-transparent border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-primary-500',\n ghost: 'bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500',\n link: 'bg-transparent text-primary-500 hover:underline p-0 h-auto focus:ring-0',\n };\n\n const sizes = {\n sm: 'text-sm px-3 py-1.5 h-8',\n md: 'text-base px-4 py-2 h-10',\n lg: 'text-lg px-6 py-3 h-12',\n };\n\n const isDisabled = disabled || isLoading;\n\n return (\n <button\n className={cn(\n 'inline-flex items-center justify-center rounded-md font-medium transition-colors',\n 'focus:outline-hidden focus:ring-2 focus:ring-offset-2',\n variants[variant],\n sizes[size],\n fullWidth ? 'w-full' : '',\n isDisabled ? 'opacity-60 cursor-not-allowed' : '',\n variant !== 'link' && 'shadow-xs',\n className\n )}\n disabled={isDisabled}\n {...props}\n >\n {isLoading && (\n <svg\n className='animate-spin -ml-1 mr-2 h-4 w-4 text-current'\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n viewBox='0 0 24 24'\n >\n <circle\n className='opacity-25'\n cx='12'\n cy='12'\n r='10'\n stroke='currentColor'\n strokeWidth='4'\n ></circle>\n <path\n className='opacity-75'\n fill='currentColor'\n d='M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z'\n ></path>\n </svg>\n )}\n {!isLoading && leftIcon && <span className='mr-2'>{leftIcon}</span>}\n {children}\n {!isLoading && rightIcon && <span className='ml-2'>{rightIcon}</span>}\n </button>\n );\n};\n\nexport { Button };\n"],"names":["Button","children","className","variant","size","fullWidth","isLoading","leftIcon","rightIcon","disabled","props","variants","sizes","isDisabled","jsxs","cn","jsx"],"mappings":";;AAaA,MAAMA,IAAS,CAAC;AAAA,EACd,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAMC,IAAW;AAAA,IACf,SACE;AAAA,IACF,WACE;AAAA,IACF,SACE;AAAA,IACF,OAAO;AAAA,IACP,MAAM;AAAA,EAAA,GAGFC,IAAQ;AAAA,IACZ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,GAGAC,IAAaJ,KAAYH;AAE/B,SACEQ,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACAJ,EAASR,CAAO;AAAA,QAChBS,EAAMR,CAAI;AAAA,QACVC,IAAY,WAAW;AAAA,QACvBQ,IAAa,kCAAkC;AAAA,QAC/CV,MAAY,UAAU;AAAA,QACtBD;AAAA,MAAA;AAAA,MAEF,UAAUW;AAAA,MACT,GAAGH;AAAA,MAEH,UAAA;AAAA,QAAAJ,KACCQ,gBAAAA,EAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAM;AAAA,YACN,MAAK;AAAA,YACL,SAAQ;AAAA,YAER,UAAA;AAAA,cAAAE,gBAAAA,EAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,IAAG;AAAA,kBACH,IAAG;AAAA,kBACH,GAAE;AAAA,kBACF,QAAO;AAAA,kBACP,aAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEdA,gBAAAA,EAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,MAAK;AAAA,kBACL,GAAE;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJ,CAACV,KAAaC,2BAAa,QAAA,EAAK,WAAU,QAAQ,UAAAA,GAAS;AAAA,QAC3DN;AAAA,QACA,CAACK,KAAaE,2BAAc,QAAA,EAAK,WAAU,QAAQ,UAAAA,EAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGpE;"}
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ hoverable?: boolean;
6
+ }
7
+ declare const Card: ({ children, className, hoverable, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
8
+ interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ children: React.ReactNode;
10
+ className?: string;
11
+ }
12
+ declare const CardHeader: ({ children, className, ...props }: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
13
+ interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {
14
+ children: React.ReactNode;
15
+ className?: string;
16
+ }
17
+ declare const CardContent: ({ children, className, ...props }: CardContentProps) => import("react/jsx-runtime").JSX.Element;
18
+ interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ children: React.ReactNode;
20
+ className?: string;
21
+ }
22
+ declare const CardFooter: ({ children, className, ...props }: CardFooterProps) => import("react/jsx-runtime").JSX.Element;
23
+ interface CardImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
24
+ className?: string;
25
+ }
26
+ declare const CardImage: ({ className, ...props }: CardImageProps) => import("react/jsx-runtime").JSX.Element;
27
+ export { Card, CardHeader, CardContent, CardFooter, CardImage };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-KWq1EBG2.cjs"),s=require("../../utils-GVl92sVg.cjs"),d=({children:r,className:e,hoverable:a=!1,...o})=>t.jsxRuntimeExports.jsx("div",{className:s.cn("bg-white rounded-lg border border-gray-200 shadow-xs overflow-hidden",a&&"transition-all duration-300 hover:shadow-md hover:-translate-y-1",e),role:"article","aria-label":"Service card",...o,children:r}),n=({children:r,className:e,...a})=>t.jsxRuntimeExports.jsx("div",{className:s.cn("p-4 md:p-6 border-b border-gray-200",e),role:"heading","aria-level":2,...a,children:r}),l=({children:r,className:e,...a})=>t.jsxRuntimeExports.jsx("div",{className:s.cn("p-4 md:p-6",e),role:"region","aria-label":"Service details",...a,children:r}),i=({children:r,className:e,...a})=>t.jsxRuntimeExports.jsx("div",{className:s.cn("p-4 md:p-6 border-t border-gray-200 bg-gray-50",e),...a,children:r}),c=({className:r,...e})=>t.jsxRuntimeExports.jsx("div",{className:"relative w-full h-48 overflow-hidden",children:t.jsxRuntimeExports.jsx("img",{className:s.cn("w-full h-full object-cover",r),...e,alt:e.alt||"Card image"})});exports.Card=d;exports.CardContent=l;exports.CardFooter=i;exports.CardHeader=n;exports.CardImage=c;
2
+ //# sourceMappingURL=index.tsx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.cjs","sources":["../../../src/kapwa/card/index.tsx"],"sourcesContent":["import React from 'react';\nimport { cn } from '@lib/utils';\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n hoverable?: boolean;\n}\n\nconst Card = ({\n children,\n className,\n hoverable = false,\n ...props\n}: CardProps) => {\n return (\n <div\n className={cn(\n 'bg-white rounded-lg border border-gray-200 shadow-xs overflow-hidden',\n hoverable &&\n 'transition-all duration-300 hover:shadow-md hover:-translate-y-1',\n className\n )}\n role='article'\n aria-label='Service card'\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardHeader = ({ children, className, ...props }: CardHeaderProps) => {\n return (\n <div\n className={cn('p-4 md:p-6 border-b border-gray-200', className)}\n role='heading'\n aria-level={2}\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardContent = ({ children, className, ...props }: CardContentProps) => {\n return (\n <div\n className={cn('p-4 md:p-6', className)}\n role='region'\n aria-label='Service details'\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardFooter = ({ children, className, ...props }: CardFooterProps) => {\n return (\n <div\n className={cn(\n 'p-4 md:p-6 border-t border-gray-200 bg-gray-50',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n className?: string;\n}\n\nconst CardImage = ({ className, ...props }: CardImageProps) => {\n return (\n <div className='relative w-full h-48 overflow-hidden'>\n <img\n className={cn('w-full h-full object-cover', className)}\n {...props}\n alt={props.alt || 'Card image'}\n />\n </div>\n );\n};\n\nexport { Card, CardHeader, CardContent, CardFooter, CardImage };\n"],"names":["Card","children","className","hoverable","props","jsx","cn","CardHeader","CardContent","CardFooter","CardImage"],"mappings":"wKASMA,EAAO,CAAC,CACZ,SAAAC,EACA,UAAAC,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,IAEIC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACT,uEACAH,GACE,mEACFD,CAAA,EAEF,KAAK,UACL,aAAW,eACV,GAAGE,EAEH,SAAAH,CAAA,CAAA,EAUDM,EAAa,CAAC,CAAE,SAAAN,EAAU,UAAAC,EAAW,GAAGE,KAE1CC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,sCAAuCJ,CAAS,EAC9D,KAAK,UACL,aAAY,EACX,GAAGE,EAEH,SAAAH,CAAA,CAAA,EAUDO,EAAc,CAAC,CAAE,SAAAP,EAAU,UAAAC,EAAW,GAAGE,KAE3CC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,aAAcJ,CAAS,EACrC,KAAK,SACL,aAAW,kBACV,GAAGE,EAEH,SAAAH,CAAA,CAAA,EAUDQ,EAAa,CAAC,CAAE,SAAAR,EAAU,UAAAC,EAAW,GAAGE,KAE1CC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACT,iDACAJ,CAAA,EAED,GAAGE,EAEH,SAAAH,CAAA,CAAA,EASDS,EAAY,CAAC,CAAE,UAAAR,EAAW,GAAGE,KAE/BC,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,uCACb,SAAAA,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EACpD,GAAGE,EACJ,IAAKA,EAAM,KAAO,YAAA,CAAA,EAEtB"}
@@ -0,0 +1,64 @@
1
+ import { j as o } from "../../jsx-runtime-DdAyboqB.js";
2
+ import { c as d } from "../../utils-BWXuiikn.js";
3
+ const i = ({
4
+ children: e,
5
+ className: r,
6
+ hoverable: a = !1,
7
+ ...l
8
+ }) => /* @__PURE__ */ o.jsx(
9
+ "div",
10
+ {
11
+ className: d(
12
+ "bg-white rounded-lg border border-gray-200 shadow-xs overflow-hidden",
13
+ a && "transition-all duration-300 hover:shadow-md hover:-translate-y-1",
14
+ r
15
+ ),
16
+ role: "article",
17
+ "aria-label": "Service card",
18
+ ...l,
19
+ children: e
20
+ }
21
+ ), n = ({ children: e, className: r, ...a }) => /* @__PURE__ */ o.jsx(
22
+ "div",
23
+ {
24
+ className: d("p-4 md:p-6 border-b border-gray-200", r),
25
+ role: "heading",
26
+ "aria-level": 2,
27
+ ...a,
28
+ children: e
29
+ }
30
+ ), c = ({ children: e, className: r, ...a }) => /* @__PURE__ */ o.jsx(
31
+ "div",
32
+ {
33
+ className: d("p-4 md:p-6", r),
34
+ role: "region",
35
+ "aria-label": "Service details",
36
+ ...a,
37
+ children: e
38
+ }
39
+ ), m = ({ children: e, className: r, ...a }) => /* @__PURE__ */ o.jsx(
40
+ "div",
41
+ {
42
+ className: d(
43
+ "p-4 md:p-6 border-t border-gray-200 bg-gray-50",
44
+ r
45
+ ),
46
+ ...a,
47
+ children: e
48
+ }
49
+ ), v = ({ className: e, ...r }) => /* @__PURE__ */ o.jsx("div", { className: "relative w-full h-48 overflow-hidden", children: /* @__PURE__ */ o.jsx(
50
+ "img",
51
+ {
52
+ className: d("w-full h-full object-cover", e),
53
+ ...r,
54
+ alt: r.alt || "Card image"
55
+ }
56
+ ) });
57
+ export {
58
+ i as Card,
59
+ c as CardContent,
60
+ m as CardFooter,
61
+ n as CardHeader,
62
+ v as CardImage
63
+ };
64
+ //# sourceMappingURL=index.tsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.js","sources":["../../../src/kapwa/card/index.tsx"],"sourcesContent":["import React from 'react';\nimport { cn } from '@lib/utils';\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n hoverable?: boolean;\n}\n\nconst Card = ({\n children,\n className,\n hoverable = false,\n ...props\n}: CardProps) => {\n return (\n <div\n className={cn(\n 'bg-white rounded-lg border border-gray-200 shadow-xs overflow-hidden',\n hoverable &&\n 'transition-all duration-300 hover:shadow-md hover:-translate-y-1',\n className\n )}\n role='article'\n aria-label='Service card'\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardHeader = ({ children, className, ...props }: CardHeaderProps) => {\n return (\n <div\n className={cn('p-4 md:p-6 border-b border-gray-200', className)}\n role='heading'\n aria-level={2}\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardContent = ({ children, className, ...props }: CardContentProps) => {\n return (\n <div\n className={cn('p-4 md:p-6', className)}\n role='region'\n aria-label='Service details'\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nconst CardFooter = ({ children, className, ...props }: CardFooterProps) => {\n return (\n <div\n className={cn(\n 'p-4 md:p-6 border-t border-gray-200 bg-gray-50',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n};\n\ninterface CardImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n className?: string;\n}\n\nconst CardImage = ({ className, ...props }: CardImageProps) => {\n return (\n <div className='relative w-full h-48 overflow-hidden'>\n <img\n className={cn('w-full h-full object-cover', className)}\n {...props}\n alt={props.alt || 'Card image'}\n />\n </div>\n );\n};\n\nexport { Card, CardHeader, CardContent, CardFooter, CardImage };\n"],"names":["Card","children","className","hoverable","props","jsx","cn","CardHeader","CardContent","CardFooter","CardImage"],"mappings":";;AASA,MAAMA,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAEIC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAH,KACE;AAAA,MACFD;AAAA,IAAA;AAAA,IAEF,MAAK;AAAA,IACL,cAAW;AAAA,IACV,GAAGE;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA,GAUDM,IAAa,CAAC,EAAE,UAAAN,GAAU,WAAAC,GAAW,GAAGE,QAE1CC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,uCAAuCJ,CAAS;AAAA,IAC9D,MAAK;AAAA,IACL,cAAY;AAAA,IACX,GAAGE;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA,GAUDO,IAAc,CAAC,EAAE,UAAAP,GAAU,WAAAC,GAAW,GAAGE,QAE3CC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,cAAcJ,CAAS;AAAA,IACrC,MAAK;AAAA,IACL,cAAW;AAAA,IACV,GAAGE;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA,GAUDQ,IAAa,CAAC,EAAE,UAAAR,GAAU,WAAAC,GAAW,GAAGE,QAE1CC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA,GASDS,IAAY,CAAC,EAAE,WAAAR,GAAW,GAAGE,QAE/BC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,wCACb,UAAAA,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,8BAA8BJ,CAAS;AAAA,IACpD,GAAGE;AAAA,IACJ,KAAKA,EAAM,OAAO;AAAA,EAAA;AAAA,GAEtB;"}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ export { Input };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../jsx-runtime-KWq1EBG2.cjs"),s=require("react"),u=require("../../utils-GVl92sVg.cjs");function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=l(s),o=a.forwardRef(({className:e,type:r,...t},n)=>i.jsxRuntimeExports.jsx("input",{type:r,className:u.cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));o.displayName="Input";exports.Input=o;
2
+ //# sourceMappingURL=index.tsx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.cjs","sources":["../../../src/kapwa/input/index.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@lib/utils';\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["Input","React","className","type","props","ref","jsx","cn"],"mappings":"qdAIMA,EAAQC,EAAM,WAClB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAA,EAASC,IAE5BC,EAAAA,kBAAAA,IAAC,QAAA,CACC,KAAAH,EACA,UAAWI,EAAAA,GACT,0WACAL,CAAA,EAEF,IAAAG,EACC,GAAGD,CAAA,CAAA,CAIZ,EACAJ,EAAM,YAAc"}
@@ -0,0 +1,22 @@
1
+ import { j as i } from "../../jsx-runtime-DdAyboqB.js";
2
+ import * as s from "react";
3
+ import { c as n } from "../../utils-BWXuiikn.js";
4
+ const a = s.forwardRef(
5
+ ({ className: e, type: r, ...t }, o) => /* @__PURE__ */ i.jsx(
6
+ "input",
7
+ {
8
+ type: r,
9
+ className: n(
10
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
+ e
12
+ ),
13
+ ref: o,
14
+ ...t
15
+ }
16
+ )
17
+ );
18
+ a.displayName = "Input";
19
+ export {
20
+ a as Input
21
+ };
22
+ //# sourceMappingURL=index.tsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.js","sources":["../../../src/kapwa/input/index.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@lib/utils';\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["Input","React","className","type","props","ref","jsx","cn"],"mappings":";;;AAIA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAE5BC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAH;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAEF,KAAAG;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAJ,EAAM,cAAc;"}
@@ -0,0 +1,5 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../jsx-runtime-KWq1EBG2.cjs"),R=require("react");require("react-dom");const m=require("../../utils-GVl92sVg.cjs");function v(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=v(R);function p(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function j(...e){return n=>{let t=!1;const o=e.map(r=>{const i=p(r,n);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():p(e[r],null)}}}}function E(e){const n=S(e),t=l.forwardRef((o,r)=>{const{children:i,...a}=o,s=l.Children.toArray(i),c=s.find(N);if(c){const u=c.props.children,x=s.map(d=>d===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:d);return f.jsxRuntimeExports.jsx(n,{...a,ref:r,children:l.isValidElement(u)?l.cloneElement(u,void 0,x):null})}return f.jsxRuntimeExports.jsx(n,{...a,ref:r,children:i})});return t.displayName=`${e}.Slot`,t}function S(e){const n=l.forwardRef((t,o)=>{const{children:r,...i}=t;if(l.isValidElement(r)){const a=C(r),s=h(i,r.props);return r.type!==l.Fragment&&(s.ref=o?j(o,a):a),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var w=Symbol("radix.slottable");function N(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===w}function h(e,n){const t={...n};for(const o in n){const r=e[o],i=n[o];/^on[A-Z]/.test(o)?r&&i?t[o]=(...s)=>{const c=i(...s);return r(...s),c}:r&&(t[o]=r):o==="style"?t[o]={...r,...i}:o==="className"&&(t[o]=[r,i].filter(Boolean).join(" "))}return{...e,...t}}function C(e){var o,r;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=P.reduce((e,n)=>{const t=E(`Primitive.${n}`),o=l.forwardRef((r,i)=>{const{asChild:a,...s}=r,c=a?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsxRuntimeExports.jsx(c,{...s,ref:i})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),D="Label",y=l.forwardRef((e,n)=>f.jsxRuntimeExports.jsx(O.label,{...e,ref:n,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));y.displayName=D;var b=y;const _=m.clsx,V=(e,n)=>t=>_(e,t==null?void 0:t.class,t==null?void 0:t.className),L=V("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),g=l.forwardRef(({className:e,...n},t)=>f.jsxRuntimeExports.jsx(b,{ref:t,className:m.cn(L(),e),...n}));g.displayName=b.displayName;exports.Label=g;
2
+ //# sourceMappingURL=index.tsx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.cjs","sources":["../../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../../node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../node_modules/@radix-ui/react-label/dist/index.mjs","../../../node_modules/class-variance-authority/dist/index.mjs","../../../src/kapwa/label/index.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","cx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A,kBAAAA,IACrBmB,EAAU,MACV,CACE,GAAG7B,EACH,IAAKC,EACL,YAAcqC,GAAU,OACPA,EAAM,OACV,QAAQ,iCAAiC,KACpDb,EAAAzB,EAAM,cAAN,MAAAyB,EAAA,KAAAzB,EAAoBsC,GAChB,CAACA,EAAM,kBAAoBA,EAAM,OAAS,GAAGA,EAAM,eAAc,EACvE,CACN,CACA,CACC,EACDD,EAAM,YAAcD,EACpB,IAAIG,EAAOF,ECPJ,MAAMG,EAAKC,EAAAA,KACLC,EAAM,CAACC,EAAMC,IAAU5C,GAE0DwC,EAAGG,EAAM3C,GAAU,KAA2B,OAASA,EAAM,MAAOA,GAAU,KAA2B,OAASA,EAAM,SAAS,ECbzN6C,EAAgBH,EACpB,4FACF,EAEML,EAAQtC,EAAM,WAIlB,CAAC,CAAE,UAAA+C,EAAW,GAAG9C,CAAA,EAASf,IAC1ByB,EAAAA,kBAAAA,IAACqC,EAAA,CACC,IAAA9D,EACA,UAAW+D,EAAAA,GAAGH,EAAA,EAAiBC,CAAS,EACvC,GAAG9C,CAAA,CACN,CACD,EACDqC,EAAM,YAAcU,EAAoB","x_google_ignoreList":[0,1,2,3,4]}
@@ -0,0 +1,121 @@
1
+ import { j as f } from "../../jsx-runtime-DdAyboqB.js";
2
+ import * as l from "react";
3
+ import "react-dom";
4
+ import { a as v, c as b } from "../../utils-BWXuiikn.js";
5
+ function p(e, n) {
6
+ if (typeof e == "function")
7
+ return e(n);
8
+ e != null && (e.current = n);
9
+ }
10
+ function x(...e) {
11
+ return (n) => {
12
+ let t = !1;
13
+ const o = e.map((r) => {
14
+ const i = p(r, n);
15
+ return !t && typeof i == "function" && (t = !0), i;
16
+ });
17
+ if (t)
18
+ return () => {
19
+ for (let r = 0; r < o.length; r++) {
20
+ const i = o[r];
21
+ typeof i == "function" ? i() : p(e[r], null);
22
+ }
23
+ };
24
+ };
25
+ }
26
+ // @__NO_SIDE_EFFECTS__
27
+ function R(e) {
28
+ const n = /* @__PURE__ */ E(e), t = l.forwardRef((o, r) => {
29
+ const { children: i, ...a } = o, s = l.Children.toArray(i), c = s.find(w);
30
+ if (c) {
31
+ const u = c.props.children, g = s.map((d) => d === c ? l.Children.count(u) > 1 ? l.Children.only(null) : l.isValidElement(u) ? u.props.children : null : d);
32
+ return /* @__PURE__ */ f.jsx(n, { ...a, ref: r, children: l.isValidElement(u) ? l.cloneElement(u, void 0, g) : null });
33
+ }
34
+ return /* @__PURE__ */ f.jsx(n, { ...a, ref: r, children: i });
35
+ });
36
+ return t.displayName = `${e}.Slot`, t;
37
+ }
38
+ // @__NO_SIDE_EFFECTS__
39
+ function E(e) {
40
+ const n = l.forwardRef((t, o) => {
41
+ const { children: r, ...i } = t;
42
+ if (l.isValidElement(r)) {
43
+ const a = N(r), s = C(i, r.props);
44
+ return r.type !== l.Fragment && (s.ref = o ? x(o, a) : a), l.cloneElement(r, s);
45
+ }
46
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
47
+ });
48
+ return n.displayName = `${e}.SlotClone`, n;
49
+ }
50
+ var h = Symbol("radix.slottable");
51
+ function w(e) {
52
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === h;
53
+ }
54
+ function C(e, n) {
55
+ const t = { ...n };
56
+ for (const o in n) {
57
+ const r = e[o], i = n[o];
58
+ /^on[A-Z]/.test(o) ? r && i ? t[o] = (...s) => {
59
+ const c = i(...s);
60
+ return r(...s), c;
61
+ } : r && (t[o] = r) : o === "style" ? t[o] = { ...r, ...i } : o === "className" && (t[o] = [r, i].filter(Boolean).join(" "));
62
+ }
63
+ return { ...e, ...t };
64
+ }
65
+ function N(e) {
66
+ var o, r;
67
+ let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = n && "isReactWarning" in n && n.isReactWarning;
68
+ return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
69
+ }
70
+ var S = [
71
+ "a",
72
+ "button",
73
+ "div",
74
+ "form",
75
+ "h2",
76
+ "h3",
77
+ "img",
78
+ "input",
79
+ "label",
80
+ "li",
81
+ "nav",
82
+ "ol",
83
+ "p",
84
+ "select",
85
+ "span",
86
+ "svg",
87
+ "ul"
88
+ ], j = S.reduce((e, n) => {
89
+ const t = /* @__PURE__ */ R(`Primitive.${n}`), o = l.forwardRef((r, i) => {
90
+ const { asChild: a, ...s } = r, c = a ? t : n;
91
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f.jsx(c, { ...s, ref: i });
92
+ });
93
+ return o.displayName = `Primitive.${n}`, { ...e, [n]: o };
94
+ }, {}), P = "Label", m = l.forwardRef((e, n) => /* @__PURE__ */ f.jsx(
95
+ j.label,
96
+ {
97
+ ...e,
98
+ ref: n,
99
+ onMouseDown: (t) => {
100
+ var r;
101
+ t.target.closest("button, input, select, textarea") || ((r = e.onMouseDown) == null || r.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
102
+ }
103
+ }
104
+ ));
105
+ m.displayName = P;
106
+ var y = m;
107
+ const D = v, V = (e, n) => (t) => D(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className), O = V(
108
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
109
+ ), A = l.forwardRef(({ className: e, ...n }, t) => /* @__PURE__ */ f.jsx(
110
+ y,
111
+ {
112
+ ref: t,
113
+ className: b(O(), e),
114
+ ...n
115
+ }
116
+ ));
117
+ A.displayName = y.displayName;
118
+ export {
119
+ A as Label
120
+ };
121
+ //# sourceMappingURL=index.tsx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tsx.js","sources":["../../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../../node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../node_modules/@radix-ui/react-label/dist/index.mjs","../../../node_modules/class-variance-authority/dist/index.mjs","../../../src/kapwa/label/index.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","cx","clsx","cva","base","config","labelVariants","className","LabelPrimitive.Root","cn"],"mappings":";;;;AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAA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