@anker-in/headless-ui 0.0.10 → 0.0.12

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 (140) hide show
  1. package/CONTRIBUTING.md +6 -1
  2. package/dist/cjs/components/badge.js +1 -1
  3. package/dist/cjs/components/badge.js.map +2 -2
  4. package/dist/cjs/components/button.js +1 -1
  5. package/dist/cjs/components/button.js.map +2 -2
  6. package/dist/cjs/components/checkbox.d.ts +8 -1
  7. package/dist/cjs/components/checkbox.js +1 -1
  8. package/dist/cjs/components/checkbox.js.map +3 -3
  9. package/dist/cjs/components/dialog.js +1 -1
  10. package/dist/cjs/components/dialog.js.map +2 -2
  11. package/dist/cjs/components/heading.d.ts +9 -1
  12. package/dist/cjs/components/heading.js +1 -1
  13. package/dist/cjs/components/heading.js.map +3 -3
  14. package/dist/cjs/components/index.d.ts +1 -0
  15. package/dist/cjs/components/index.js +1 -1
  16. package/dist/cjs/components/index.js.map +2 -2
  17. package/dist/cjs/components/input.d.ts +1 -1
  18. package/dist/cjs/components/input.js +1 -1
  19. package/dist/cjs/components/input.js.map +2 -2
  20. package/dist/cjs/components/popover.js +1 -1
  21. package/dist/cjs/components/popover.js.map +2 -2
  22. package/dist/cjs/components/radio.d.ts +13 -2
  23. package/dist/cjs/components/radio.js +1 -1
  24. package/dist/cjs/components/radio.js.map +3 -3
  25. package/dist/cjs/components/skeleton.d.ts +6 -3
  26. package/dist/cjs/components/skeleton.js +4 -1
  27. package/dist/cjs/components/skeleton.js.map +3 -3
  28. package/dist/cjs/components/text.d.ts +8 -4
  29. package/dist/cjs/components/text.js +1 -1
  30. package/dist/cjs/components/text.js.map +3 -3
  31. package/dist/cjs/icons/spinner.js +1 -1
  32. package/dist/cjs/icons/spinner.js.map +2 -2
  33. package/dist/cjs/stories/badge.stories.js +1 -1
  34. package/dist/cjs/stories/badge.stories.js.map +2 -2
  35. package/dist/cjs/stories/button.stories.js +1 -1
  36. package/dist/cjs/stories/button.stories.js.map +2 -2
  37. package/dist/cjs/stories/checkbox.stories.d.ts +44 -3
  38. package/dist/cjs/stories/checkbox.stories.js +1 -1
  39. package/dist/cjs/stories/checkbox.stories.js.map +3 -3
  40. package/dist/cjs/stories/dialog.stories.js +1 -1
  41. package/dist/cjs/stories/dialog.stories.js.map +2 -2
  42. package/dist/cjs/stories/heading.stories.d.ts +68 -0
  43. package/dist/cjs/stories/heading.stories.js +2 -0
  44. package/dist/cjs/stories/heading.stories.js.map +7 -0
  45. package/dist/cjs/stories/input.stories.js +1 -1
  46. package/dist/cjs/stories/input.stories.js.map +2 -2
  47. package/dist/cjs/stories/popover.stories.js +1 -1
  48. package/dist/cjs/stories/popover.stories.js.map +2 -2
  49. package/dist/cjs/stories/radio.stories.d.ts +34 -3
  50. package/dist/cjs/stories/radio.stories.js +1 -1
  51. package/dist/cjs/stories/radio.stories.js.map +3 -3
  52. package/dist/cjs/stories/skeleton.stories.d.ts +9 -3
  53. package/dist/cjs/stories/skeleton.stories.js +1 -1
  54. package/dist/cjs/stories/skeleton.stories.js.map +3 -3
  55. package/dist/cjs/stories/text.stories.d.ts +57 -4
  56. package/dist/cjs/stories/text.stories.js +9 -1
  57. package/dist/cjs/stories/text.stories.js.map +3 -3
  58. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  59. package/dist/esm/components/badge.js +1 -1
  60. package/dist/esm/components/badge.js.map +2 -2
  61. package/dist/esm/components/button.js +1 -1
  62. package/dist/esm/components/button.js.map +2 -2
  63. package/dist/esm/components/checkbox.d.ts +8 -1
  64. package/dist/esm/components/checkbox.js +1 -1
  65. package/dist/esm/components/checkbox.js.map +3 -3
  66. package/dist/esm/components/dialog.js +1 -1
  67. package/dist/esm/components/dialog.js.map +2 -2
  68. package/dist/esm/components/heading.d.ts +9 -1
  69. package/dist/esm/components/heading.js +1 -1
  70. package/dist/esm/components/heading.js.map +3 -3
  71. package/dist/esm/components/index.d.ts +1 -0
  72. package/dist/esm/components/index.js +1 -1
  73. package/dist/esm/components/index.js.map +2 -2
  74. package/dist/esm/components/input.d.ts +1 -1
  75. package/dist/esm/components/input.js +1 -1
  76. package/dist/esm/components/input.js.map +2 -2
  77. package/dist/esm/components/popover.js +1 -1
  78. package/dist/esm/components/popover.js.map +2 -2
  79. package/dist/esm/components/radio.d.ts +13 -2
  80. package/dist/esm/components/radio.js +1 -1
  81. package/dist/esm/components/radio.js.map +3 -3
  82. package/dist/esm/components/skeleton.d.ts +6 -3
  83. package/dist/esm/components/skeleton.js +4 -1
  84. package/dist/esm/components/skeleton.js.map +3 -3
  85. package/dist/esm/components/text.d.ts +8 -4
  86. package/dist/esm/components/text.js +1 -1
  87. package/dist/esm/components/text.js.map +3 -3
  88. package/dist/esm/icons/spinner.js +1 -1
  89. package/dist/esm/icons/spinner.js.map +2 -2
  90. package/dist/esm/stories/badge.stories.js +1 -1
  91. package/dist/esm/stories/badge.stories.js.map +2 -2
  92. package/dist/esm/stories/button.stories.js +1 -1
  93. package/dist/esm/stories/button.stories.js.map +2 -2
  94. package/dist/esm/stories/checkbox.stories.d.ts +44 -3
  95. package/dist/esm/stories/checkbox.stories.js +1 -1
  96. package/dist/esm/stories/checkbox.stories.js.map +3 -3
  97. package/dist/esm/stories/dialog.stories.js +1 -1
  98. package/dist/esm/stories/dialog.stories.js.map +2 -2
  99. package/dist/esm/stories/heading.stories.d.ts +68 -0
  100. package/dist/esm/stories/heading.stories.js +2 -0
  101. package/dist/esm/stories/heading.stories.js.map +7 -0
  102. package/dist/esm/stories/input.stories.js +1 -1
  103. package/dist/esm/stories/input.stories.js.map +2 -2
  104. package/dist/esm/stories/popover.stories.js +1 -1
  105. package/dist/esm/stories/popover.stories.js.map +2 -2
  106. package/dist/esm/stories/radio.stories.d.ts +34 -3
  107. package/dist/esm/stories/radio.stories.js +1 -1
  108. package/dist/esm/stories/radio.stories.js.map +3 -3
  109. package/dist/esm/stories/skeleton.stories.d.ts +9 -3
  110. package/dist/esm/stories/skeleton.stories.js +1 -1
  111. package/dist/esm/stories/skeleton.stories.js.map +3 -3
  112. package/dist/esm/stories/text.stories.d.ts +57 -4
  113. package/dist/esm/stories/text.stories.js +9 -1
  114. package/dist/esm/stories/text.stories.js.map +3 -3
  115. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  116. package/package.json +1 -1
  117. package/src/components/badge.tsx +5 -5
  118. package/src/components/button.tsx +14 -14
  119. package/src/components/checkbox.tsx +33 -17
  120. package/src/components/dialog.tsx +12 -9
  121. package/src/components/heading.tsx +59 -4
  122. package/src/components/index.ts +1 -0
  123. package/src/components/input.tsx +9 -9
  124. package/src/components/popover.tsx +1 -1
  125. package/src/components/radio.tsx +60 -25
  126. package/src/components/skeleton.tsx +33 -2
  127. package/src/components/text.tsx +45 -16
  128. package/src/icons/spinner.tsx +1 -1
  129. package/src/stories/badge.stories.tsx +1 -1
  130. package/src/stories/button.stories.tsx +1 -1
  131. package/src/stories/checkbox.stories.tsx +82 -5
  132. package/src/stories/dialog.stories.tsx +8 -8
  133. package/src/stories/heading.stories.tsx +88 -0
  134. package/src/stories/input.stories.tsx +2 -2
  135. package/src/stories/popover.stories.tsx +2 -2
  136. package/src/stories/radio.stories.tsx +51 -15
  137. package/src/stories/skeleton.stories.tsx +41 -7
  138. package/src/stories/text.stories.tsx +93 -10
  139. package/src/styles/global.css +5 -5
  140. package/style.css +246 -186
package/CONTRIBUTING.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  # 关于
4
4
 
5
+ 这是一个基于@radix-ui/primitive 二次封装的组件库,目标是通过 css 变量的形式,实现多主题,以达到同时支持多品牌站点开发的能力。
6
+
5
7
  # 代码文件结构
6
8
 
7
9
  ```shell
@@ -68,7 +70,10 @@ pnpm run dev
68
70
  # 如何新增组件
69
71
 
70
72
  新增组件之前先看下仓库有没有类似的组件已经存在。
71
- 如果不存在,需要新增,建议新组件基于 [@radix-ui/primitive](https://www.radix-ui.com/primitives) 或者手动复制[shadcn](https://ui.shadcn.com/) 的组件 进行二次封装。
73
+ 如果不存在,需要新增组件,
74
+
75
+ **建议新组件基于 [@radix-ui/primitive](https://www.radix-ui.com/primitives) 或者手动复制[shadcn](https://ui.shadcn.com/) 的组件 进行二次封装。**
76
+
72
77
  组件目录位于`packages/ui/src`。
73
78
 
74
79
  运行`pnpm run dev` 之后,会运行storybook 和 playground 项目,在storybook 中测试组件的功能,编写文档。
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},g=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of u(e))!f.call(t,a)&&a!==r&&n(t,a,{get:()=>e[a],enumerable:!(o=p(e,a))||o.enumerable});return t};var b=t=>g(n({},"__esModule",{value:!0}),t);var v={};c(v,{default:()=>m});module.exports=b(v);var i=require("react/jsx-runtime"),V=require("react"),d=require("class-variance-authority"),s=require("../helpers/index.js");const x=(0,d.cva)("inline-flex items-center rounded-[20px] border px-[10px] py-1 text-xs font-medium transition-colors focus:outline-none",{variants:{variant:{default:"bg-badge text-badge-foreground border-transparent",secondary:"bg-secondary text-secondary-foreground border-transparent",destructive:"bg-destructive text-destructive-foreground border-transparent",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:t,variant:e,...r}){return(0,i.jsx)("div",{className:(0,s.cn)(x({variant:e}),t),...r})}var m=l;
1
+ "use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(e,a)=>{for(var t in a)i(e,t,{get:a[t],enumerable:!0})},g=(e,a,t,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of u(a))!f.call(e,r)&&r!==t&&i(e,r,{get:()=>a[r],enumerable:!(n=p(a,r))||n.enumerable});return e};var b=e=>g(i({},"__esModule",{value:!0}),e);var v={};c(v,{default:()=>m});module.exports=b(v);var s=require("react/jsx-runtime"),V=require("react"),o=require("class-variance-authority"),d=require("../helpers/index.js");const x=(0,o.cva)("ai-inline-flex ai-items-center ai-font-medium ai-rounded-[20px] ai-border ai-px-[10px] ai-py-1 ai-text-xs ai-transition-colors focus:ai-outline-none",{variants:{variant:{default:"ai-bg-badge ai-text-badge-foreground ai-border-transparent",secondary:"ai-bg-secondary ai-text-secondary-foreground ai-border-transparent",destructive:"ai-bg-destructive ai-text-destructive-foreground ai-border-transparent",outline:"ai-text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:a,...t}){return(0,s.jsx)("div",{className:(0,d.cn)(x({variant:a}),e),...t})}var m=l;
2
2
  //# sourceMappingURL=badge.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/badge.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '../helpers/index.js'\n\nconst badgeVariants = cva(\n 'inline-flex items-center rounded-[20px] border px-[10px] py-1 text-xs font-medium transition-colors focus:outline-none',\n {\n variants: {\n variant: {\n default: 'bg-badge text-badge-foreground border-transparent',\n secondary: 'bg-secondary text-secondary-foreground border-transparent',\n destructive: 'bg-destructive text-destructive-foreground border-transparent',\n outline: 'text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport default Badge\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyBS,IAAAI,EAAA,6BAzBTC,EAAuB,iBACvBC,EAAuC,oCAEvCC,EAAmB,+BAEnB,MAAMC,KAAgB,OACpB,yHACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,oDACT,UAAW,4DACX,YAAa,gEACb,QAAS,iBACX,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAIA,SAASC,EAAM,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAe,CAC3D,SAAO,OAAC,OAAI,aAAW,MAAGJ,EAAc,CAAE,QAAAG,CAAQ,CAAC,EAAGD,CAAS,EAAI,GAAGE,EAAO,CAC/E,CAEA,IAAOV,EAAQO",
4
+ "sourcesContent": ["import * as React from 'react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '../helpers/index.js'\n\nconst badgeVariants = cva(\n 'ai-inline-flex ai-items-center ai-font-medium ai-rounded-[20px] ai-border ai-px-[10px] ai-py-1 ai-text-xs ai-transition-colors focus:ai-outline-none',\n {\n variants: {\n variant: {\n default: 'ai-bg-badge ai-text-badge-foreground ai-border-transparent',\n secondary: 'ai-bg-secondary ai-text-secondary-foreground ai-border-transparent',\n destructive: 'ai-bg-destructive ai-text-destructive-foreground ai-border-transparent',\n outline: 'ai-text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport default Badge\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyBS,IAAAI,EAAA,6BAzBTC,EAAuB,iBACvBC,EAAuC,oCAEvCC,EAAmB,+BAEnB,MAAMC,KAAgB,OACpB,uJACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6DACT,UAAW,qEACX,YAAa,yEACb,QAAS,oBACX,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAIA,SAASC,EAAM,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAe,CAC3D,SAAO,OAAC,OAAI,aAAW,MAAGJ,EAAc,CAAE,QAAAG,CAAQ,CAAC,EAAGD,CAAS,EAAI,GAAGE,EAAO,CAC/E,CAEA,IAAOV,EAAQO",
6
6
  "names": ["badge_exports", "__export", "badge_default", "__toCommonJS", "import_jsx_runtime", "React", "import_class_variance_authority", "import_helpers", "badgeVariants", "Badge", "className", "variant", "props"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var H=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:!0})},b=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of B(r))!E.call(e,n)&&n!==o&&i(e,n,{get:()=>r[n],enumerable:!(a=w(r,n))||a.enumerable});return e};var d=(e,r,o)=>(o=e!=null?x(V(e)):{},b(r||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),P=e=>b(i({},"__esModule",{value:!0}),e);var L={};H(L,{default:()=>N});module.exports=P(L);var t=require("react/jsx-runtime"),z=d(require("react")),f=require("@radix-ui/react-slot"),p=require("@radix-ui/react-visually-hidden"),u=require("class-variance-authority"),c=d(require("../icons/spinner.js")),m=require("../helpers/index.js");const C=(0,u.cva)("ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground",secondary:"bg-btn-secondary border-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground border border-solid",link:"text-primary underline-offset-4 hover:underline",ghost:"hover:bg-btn-primary hover:text-btn-primary-foreground"},size:{sm:"h-8 px-3 py-1",base:"h-10 px-4 py-2",lg:"h-11 px-8",icon:"size-10 rounded-full"},hoverEffect:{none:"",slide:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'before:rounded-btn hover:bg-btn-primary before:bg-btn-primary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'},{variant:"secondary",hoverEffect:"slide",class:'before:rounded-btn hover:bg-btn-secondary before:bg-btn-secondary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none"}}),l=z.forwardRef(({asChild:e=!1,size:r="base",children:o,variant:a,hoverEffect:n="none",className:y,disabled:s=!1,loading:v=!1,...g},h)=>(0,t.jsx)(e?f.Slot:"button",{disabled:s,className:(0,m.cn)(C({variant:a,size:r,hoverEffect:n}),{"cursor-not-allowed":s},y),ref:h,...g,children:v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:o}),(0,t.jsx)("span",{className:"absolute",children:(0,t.jsx)(c.default,{})}),(0,t.jsx)(p.VisuallyHidden,{children:o})]}):(0,t.jsx)("span",{className:"z-[1]",children:o})}));l.displayName="Button";var N=l;
1
+ "use strict";"use client";var h=Object.create;var n=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var E=(e,a)=>{for(var i in a)n(e,i,{get:a[i],enumerable:!0})},b=(e,a,i,t)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of B(a))!z.call(e,o)&&o!==i&&n(e,o,{get:()=>a[o],enumerable:!(t=w(a,o))||t.enumerable});return e};var d=(e,a,i)=>(i=e!=null?h(V(e)):{},b(a||!e||!e.__esModule?n(i,"default",{value:e,enumerable:!0}):i,e)),H=e=>b(n({},"__esModule",{value:!0}),e);var M={};E(M,{default:()=>L});module.exports=H(M);var r=require("react/jsx-runtime"),P=d(require("react")),l=require("@radix-ui/react-slot"),p=require("@radix-ui/react-visually-hidden"),u=require("class-variance-authority"),c=d(require("../icons/spinner.js")),m=require("../helpers/index.js");const C=(0,u.cva)("ai-ring-offset-background focus-visible:ai-ring-ring ai-rounded-btn ai-inline-flex ai-items-center ai-justify-center ai-whitespace-nowrap ai-text-sm ai-font-medium ai-transition-colors focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-pointer-events-none disabled:ai-opacity-50",{variants:{variant:{primary:"ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground",secondary:"ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground ai-border ai-border-solid",link:"ai-text-primary ai-underline-offset-4 hover:ai-underline",ghost:"hover:ai-bg-btn-primary hover:ai-text-btn-primary-foreground"},size:{sm:"ai-h-8 ai-px-3 ai-py-1 ai-text-[12px]",base:"ai-h-10 ai-px-4 ai-py-2 ai-text-[14px]",lg:"ai-h-11 ai-px-8 ai-text-[16px]",icon:"ai-size-10 ai-rounded-full"},hoverEffect:{none:"",slide:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-primary before:ai-bg-btn-primary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[""] hover:before:ai-translate-x-0'},{variant:"secondary",hoverEffect:"slide",class:'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-secondary before:ai-bg-btn-secondary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[""] hover:before:ai-translate-x-0'}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none"}}),f=P.forwardRef(({asChild:e=!1,size:a="base",children:i,variant:t,hoverEffect:o="none",className:y,disabled:s=!1,loading:v=!1,...g},x)=>(0,r.jsx)(e?l.Slot:"button",{disabled:s,className:(0,m.cn)(C({variant:t,size:a,hoverEffect:o}),{"ai-cursor-not-allowed":s},y),ref:x,...g,children:v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:i}),(0,r.jsx)("span",{className:"ai-absolute",children:(0,r.jsx)(c.default,{})}),(0,r.jsx)(p.VisuallyHidden,{children:i})]}):i}));f.displayName="Button";var L=f;
2
2
  //# sourceMappingURL=button.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/button.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground',\n secondary:\n 'bg-btn-secondary border-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground border border-solid',\n link: 'text-primary underline-offset-4 hover:underline',\n ghost: 'hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'h-8 px-3 py-1',\n base: 'h-10 px-4 py-2',\n lg: 'h-11 px-8',\n icon: 'size-10 rounded-full',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:bg-btn-primary before:bg-btn-primary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:bg-btn-secondary before:bg-btn-secondary-active relative overflow-hidden before:absolute before:inset-y-0 before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n disabled={disabled}\n className={cn(\n buttonVariants({ variant, size, hoverEffect }),\n {\n 'cursor-not-allowed': disabled,\n },\n className\n )}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"absolute\">\n <Spinner />\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n <span className=\"z-[1]\">{children}</span>\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoGU,IAAAI,EAAA,6BAlGVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAKnB,MAAMC,KAAiB,OACrB,0RACA,CACE,SAAU,CACR,QAAS,CACP,QACE,wJACF,UACE,8NACF,KAAM,kDACN,MAAO,wDACT,EACA,KAAM,CACJ,GAAI,gBACJ,KAAM,iBACN,GAAI,YACJ,KAAM,sBACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,0RACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,8RACJ,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,MACf,CACF,CACF,EAaMC,EAASP,EAAM,WACnB,CACE,CACE,QAAAQ,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,OAKE,OAHWT,EAAU,OAAO,SAG3B,CACC,SAAUM,EACV,aAAW,MACTR,EAAe,CAAE,QAAAK,EAAS,KAAAF,EAAM,YAAAG,CAAY,CAAC,EAC7C,CACE,qBAAsBE,CACxB,EACAD,CACF,EACA,IAAKI,EACJ,GAAGD,EAEH,SAAAD,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACd,mBAAC,EAAAQ,QAAA,EAAQ,EACX,KACA,OAAC,kBAAgB,SAAAR,EAAS,GAC5B,KAEA,OAAC,QAAK,UAAU,QAAS,SAAAA,EAAS,EAEtC,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOV,EAAQU",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ai-ring-offset-background focus-visible:ai-ring-ring ai-rounded-btn ai-inline-flex ai-items-center ai-justify-center ai-whitespace-nowrap ai-text-sm ai-font-medium ai-transition-colors focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-pointer-events-none disabled:ai-opacity-50',\n {\n variants: {\n variant: {\n primary:\n 'ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground',\n secondary:\n 'ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground ai-border ai-border-solid',\n link: 'ai-text-primary ai-underline-offset-4 hover:ai-underline',\n ghost: 'hover:ai-bg-btn-primary hover:ai-text-btn-primary-foreground',\n },\n size: {\n sm: 'ai-h-8 ai-px-3 ai-py-1 ai-text-[12px]',\n base: 'ai-h-10 ai-px-4 ai-py-2 ai-text-[14px]',\n lg: 'ai-h-11 ai-px-8 ai-text-[16px]',\n icon: 'ai-size-10 ai-rounded-full',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-primary before:ai-bg-btn-primary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-secondary before:ai-bg-btn-secondary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n disabled={disabled}\n className={cn(\n buttonVariants({ variant, size, hoverEffect }),\n {\n 'ai-cursor-not-allowed': disabled,\n },\n className\n )}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"ai-absolute\">\n <Spinner />\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n children\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoGU,IAAAI,EAAA,6BAlGVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAKnB,MAAMC,KAAiB,OACrB,uUACA,CACE,SAAU,CACR,QAAS,CACP,QACE,uKACF,UACE,yPACF,KAAM,2DACN,MAAO,8DACT,EACA,KAAM,CACJ,GAAI,wCACJ,KAAM,yCACN,GAAI,iCACJ,KAAM,4BACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,+VACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mWACJ,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,MACf,CACF,CACF,EAaMC,EAASP,EAAM,WACnB,CACE,CACE,QAAAQ,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,OAKE,OAHWT,EAAU,OAAO,SAG3B,CACC,SAAUM,EACV,aAAW,MACTR,EAAe,CAAE,QAAAK,EAAS,KAAAF,EAAM,YAAAG,CAAY,CAAC,EAC7C,CACE,wBAAyBE,CAC3B,EACAD,CACF,EACA,IAAKI,EACJ,GAAGD,EAEH,SAAAD,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,cACd,mBAAC,EAAAQ,QAAA,EAAQ,EACX,KACA,OAAC,kBAAgB,SAAAR,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOV,EAAQU",
6
6
  "names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "buttonVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "props", "ref", "Spinner"]
7
7
  }
@@ -1,4 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ declare const checkboxVariants: (props?: ({
5
+ size?: "sm" | "lg" | "base" | null | undefined;
6
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
+ interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
8
+ }
9
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
4
10
  export default Checkbox;
11
+ export type { CheckboxProps };
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var b=Object.create;var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var i in o)r(e,i,{get:o[i],enumerable:!0})},n=(e,o,i,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of u(o))!k.call(e,t)&&t!==i&&r(e,t,{get:()=>o[t],enumerable:!(m=p(o,t))||m.enumerable});return e};var f=(e,o,i)=>(i=e!=null?b(h(e)):{},n(o||!e||!e.__esModule?r(i,"default",{value:e,enumerable:!0}):i,e)),v=e=>n(r({},"__esModule",{value:!0}),e);var g={};R(g,{default:()=>y});module.exports=v(g);var s=require("react/jsx-runtime"),x=f(require("react")),a=f(require("@radix-ui/react-checkbox")),l=require("@radix-ui/react-icons"),c=require("../helpers/index.js");const d=x.forwardRef(({className:e,...o},i)=>(0,s.jsx)(a.Root,{ref:i,className:(0,c.cn)("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer size-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...o,children:(0,s.jsx)(a.Indicator,{className:(0,c.cn)("flex items-center justify-center text-current"),children:(0,s.jsx)(l.CheckIcon,{className:"size-4"})})}));d.displayName=a.Root.displayName;var y=d;
1
+ "use strict";"use client";var l=Object.create;var r=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var y=(i,e)=>{for(var a in e)r(i,a,{get:e[a],enumerable:!0})},f=(i,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of x(e))!u.call(i,o)&&o!==a&&r(i,o,{get:()=>e[o],enumerable:!(t=h(e,o))||t.enumerable});return i};var p=(i,e,a)=>(a=i!=null?l(k(i)):{},f(e||!i||!i.__esModule?r(a,"default",{value:i,enumerable:!0}):a,i)),v=i=>f(r({},"__esModule",{value:!0}),i);var g={};y(g,{default:()=>R});module.exports=v(g);var s=require("react/jsx-runtime"),C=p(require("react")),c=p(require("@radix-ui/react-checkbox")),d=require("@radix-ui/react-icons"),n=require("../helpers/index.js"),m=require("class-variance-authority");const P=(0,m.cva)("ai-border-primary ai-ring-offset-background focus-visible:ai-ring-ring data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground ai-peer ai-shrink-0 ai-rounded-sm ai-border focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 disabled:ai-bg-btn-primary-disabled",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),b=C.forwardRef(({className:i,size:e,...a},t)=>(0,s.jsx)(c.Root,{ref:t,className:(0,n.cn)(P({size:e}),i),...a,children:(0,s.jsx)(c.Indicator,{className:(0,n.cn)("ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full"),children:(0,s.jsx)(d.CheckIcon,{})})}));b.displayName=c.Root.displayName;var R=b;
2
2
  //# sourceMappingURL=checkbox.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/checkbox.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer size-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>\n <CheckIcon className=\"size-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport default Checkbox\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqBM,IAAAI,EAAA,6BAnBNC,EAAuB,oBACvBC,EAAmC,uCACnCC,EAA0B,iCAE1BC,EAAmB,+BAEnB,MAAMC,EAAWJ,EAAM,WAGrB,CAAC,CAAE,UAAAK,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACN,EAAkB,KAAlB,CACC,IAAKM,EACL,aAAW,MACT,gTACAF,CACF,EACC,GAAGC,EAEJ,mBAACL,EAAkB,UAAlB,CAA4B,aAAW,MAAG,+CAA+C,EACxF,mBAAC,aAAU,UAAU,SAAS,EAChC,EACF,CACD,EACDG,EAAS,YAAcH,EAAkB,KAAK,YAE9C,IAAOJ,EAAQO",
6
- "names": ["checkbox_exports", "__export", "checkbox_default", "__toCommonJS", "import_jsx_runtime", "React", "CheckboxPrimitive", "import_react_icons", "import_helpers", "Checkbox", "className", "props", "ref"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst checkboxVariants = cva(\n 'ai-border-primary ai-ring-offset-background focus-visible:ai-ring-ring data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground ai-peer ai-shrink-0 ai-rounded-sm ai-border focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 disabled:ai-bg-btn-primary-disabled',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface CheckboxProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size, ...props }, ref) => (\n <CheckboxPrimitive.Root ref={ref} className={cn(checkboxVariants({ size }), className)} {...props}>\n <CheckboxPrimitive.Indicator\n className={cn('ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full')}\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport default Checkbox\nexport type { CheckboxProps }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmCQ,IAAAI,EAAA,6BAjCRC,EAAuB,oBACvBC,EAAmC,uCACnCC,EAA0B,iCAE1BC,EAAmB,+BACnBC,EAAuC,oCAEvC,MAAMC,KAAmB,OACvB,uXACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAMMC,EAAWN,EAAM,WACrB,CAAC,CAAE,UAAAO,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAC9B,OAACT,EAAkB,KAAlB,CAAuB,IAAKS,EAAK,aAAW,MAAGL,EAAiB,CAAE,KAAAG,CAAK,CAAC,EAAGD,CAAS,EAAI,GAAGE,EAC1F,mBAACR,EAAkB,UAAlB,CACC,aAAW,MAAG,+EAA+E,EAE7F,mBAAC,cAAU,EACb,EACF,CAEJ,EACAK,EAAS,YAAcL,EAAkB,KAAK,YAE9C,IAAOJ,EAAQS",
6
+ "names": ["checkbox_exports", "__export", "checkbox_default", "__toCommonJS", "import_jsx_runtime", "React", "CheckboxPrimitive", "import_react_icons", "import_helpers", "import_class_variance_authority", "checkboxVariants", "Checkbox", "className", "size", "props", "ref"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var C=Object.create;var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},y=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of T(t))!w.call(e,l)&&l!==a&&r(e,l,{get:()=>t[l],enumerable:!(n=b(t,l))||n.enumerable});return e};var R=(e,t,a)=>(a=e!=null?C(h(e)):{},y(t||!e||!e.__esModule?r(a,"default",{value:e,enumerable:!0}):a,e)),H=e=>y(r({},"__esModule",{value:!0}),e);var z={};E(z,{Dialog:()=>N,DialogClose:()=>x,DialogContent:()=>f,DialogDescription:()=>u,DialogFooter:()=>g,DialogHeader:()=>p,DialogOverlay:()=>m,DialogPortal:()=>c,DialogTitle:()=>D,DialogTrigger:()=>P});module.exports=H(z);var i=require("react/jsx-runtime"),d=R(require("react")),o=R(require("@radix-ui/react-dialog")),v=require("@radix-ui/react-icons"),s=require("../helpers/index.js");const N=o.Root,P=o.Trigger,c=o.Portal,x=o.Close,m=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Overlay,{ref:a,className:(0,s.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=o.Overlay.displayName;const f=d.forwardRef(({className:e,children:t,...a},n)=>(0,i.jsxs)(c,{children:[(0,i.jsx)(m,{}),(0,i.jsxs)(o.Content,{ref:n,className:(0,s.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...a,children:[t,(0,i.jsxs)(o.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[(0,i.jsx)(v.Cross2Icon,{className:"size-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=o.Content.displayName;const p=({className:e,...t})=>(0,i.jsx)("div",{className:(0,s.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});p.displayName="DialogHeader";const g=({className:e,...t})=>(0,i.jsx)("div",{className:(0,s.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});g.displayName="DialogFooter";const D=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Title,{ref:a,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));D.displayName=o.Title.displayName;const u=d.forwardRef(({className:e,...t},a)=>(0,i.jsx)(o.Description,{ref:a,className:(0,s.cn)("text-muted-foreground text-sm",e),...t}));u.displayName=o.Description.displayName;
1
+ "use strict";"use client";var C=Object.create;var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(a,e)=>{for(var i in e)r(a,i,{get:e[i],enumerable:!0})},y=(a,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of T(e))!w.call(a,l)&&l!==i&&r(a,l,{get:()=>e[l],enumerable:!(n=b(e,l))||n.enumerable});return a};var R=(a,e,i)=>(i=a!=null?C(h(a)):{},y(e||!a||!a.__esModule?r(i,"default",{value:a,enumerable:!0}):i,a)),H=a=>y(r({},"__esModule",{value:!0}),a);var z={};E(z,{Dialog:()=>N,DialogClose:()=>x,DialogContent:()=>f,DialogDescription:()=>u,DialogFooter:()=>g,DialogHeader:()=>p,DialogOverlay:()=>m,DialogPortal:()=>c,DialogTitle:()=>D,DialogTrigger:()=>P});module.exports=H(z);var o=require("react/jsx-runtime"),d=R(require("react")),t=R(require("@radix-ui/react-dialog")),v=require("@radix-ui/react-icons"),s=require("../helpers/index.js");const N=t.Root,P=t.Trigger,c=t.Portal,x=t.Close,m=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Overlay,{ref:i,className:(0,s.cn)("data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 ai-fixed ai-inset-0 ai-z-50 ai-bg-black/80",a),...e}));m.displayName=t.Overlay.displayName;const f=d.forwardRef(({className:a,children:e,...i},n)=>(0,o.jsxs)(c,{children:[(0,o.jsx)(m,{}),(0,o.jsxs)(t.Content,{ref:n,className:(0,s.cn)("ai-bg-background data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[state=closed]:ai-slide-out-to-left-1/2 data-[state=closed]:ai-slide-out-to-top-[48%] data-[state=open]:ai-slide-in-from-left-1/2 data-[state=open]:ai-slide-in-from-top-[48%] ai-fixed ai-left-1/2 ai-top-1/2 ai-z-50 ai-grid ai-w-full ai-max-w-lg -ai-translate-x-1/2 -ai-translate-y-1/2 ai-gap-4 ai-border ai-p-6 ai-shadow-lg ai-duration-200 sm:ai-rounded-lg",a),...i,children:[e,(0,o.jsxs)(t.Close,{className:"ai-ring-offset-background focus:ai-ring-ring data-[state=open]:ai-bg-accent data-[state=open]:ai-text-muted-foreground ai-absolute ai-right-4 ai-top-4 ai-rounded-sm ai-opacity-70 ai-transition-opacity hover:ai-opacity-100 focus:ai-outline-none focus:ai-ring-2 focus:ai-ring-offset-2 disabled:ai-pointer-events-none",children:[(0,o.jsx)(v.Cross2Icon,{className:"ai-size-4"}),(0,o.jsx)("span",{className:"ai-sr-only",children:"Close"})]})]})]}));f.displayName=t.Content.displayName;const p=({className:a,...e})=>(0,o.jsx)("div",{className:(0,s.cn)("ai-flex ai-flex-col ai-space-y-1.5 ai-text-center sm:ai-text-left",a),...e});p.displayName="DialogHeader";const g=({className:a,...e})=>(0,o.jsx)("div",{className:(0,s.cn)("ai-flex ai-flex-col-reverse sm:ai-flex-row sm:ai-justify-end sm:ai-space-x-2",a),...e});g.displayName="DialogFooter";const D=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Title,{ref:i,className:(0,s.cn)("ai-text-lg ai-font-semibold ai-leading-none ai-tracking-tight",a),...e}));D.displayName=t.Title.displayName;const u=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Description,{ref:i,className:(0,s.cn)("ai-text-muted-foreground ai-text-sm",a),...e}));u.displayName=t.Description.displayName;
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/dialog.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAoBE,IAAAa,EAAA,6BAlBFC,EAAuB,oBACvBC,EAAiC,qCACjCC,EAA2B,iCAE3BC,EAAmB,+BAEnB,MAAMf,EAASa,EAAgB,KAEzBJ,EAAgBI,EAAgB,QAEhCN,EAAeM,EAAgB,OAE/BZ,EAAcY,EAAgB,MAE9BP,EAAgBM,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,0JACAF,CACF,EACC,GAAGC,EACN,CACD,EACDX,EAAc,YAAcO,EAAgB,QAAQ,YAEpD,MAAMX,EAAgBU,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OACpC,QAACX,EAAA,CACC,oBAACD,EAAA,EAAc,KACf,QAACO,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,sfACAF,CACF,EACC,GAAGC,EAEH,UAAAE,KACD,QAACN,EAAgB,MAAhB,CAAsB,UAAU,gRAC/B,oBAAC,cAAW,UAAU,SAAS,KAC/B,OAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDX,EAAc,YAAcW,EAAgB,QAAQ,YAEpD,MAAMR,EAAe,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,qDAAsDD,CAAS,EAAI,GAAGC,EAAO,EAElGZ,EAAa,YAAc,eAE3B,MAAMD,EAAe,CAAC,CAAE,UAAAY,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,gEAAiED,CAAS,EAAI,GAAGC,EAAO,EAE7Gb,EAAa,YAAc,eAE3B,MAAMI,EAAcI,EAAM,WAGxB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,MAAhB,CACC,IAAKK,EACL,aAAW,MAAG,oDAAqDF,CAAS,EAC3E,GAAGC,EACN,CACD,EACDT,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMV,EAAoBS,EAAM,WAG9B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,YAAhB,CAA4B,IAAKK,EAAK,aAAW,MAAG,gCAAiCF,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDd,EAAkB,YAAcU,EAAgB,YAAY",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 ai-fixed ai-inset-0 ai-z-50 ai-bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'ai-bg-background data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[state=closed]:ai-slide-out-to-left-1/2 data-[state=closed]:ai-slide-out-to-top-[48%] data-[state=open]:ai-slide-in-from-left-1/2 data-[state=open]:ai-slide-in-from-top-[48%] ai-fixed ai-left-1/2 ai-top-1/2 ai-z-50 ai-grid ai-w-full ai-max-w-lg -ai-translate-x-1/2 -ai-translate-y-1/2 ai-gap-4 ai-border ai-p-6 ai-shadow-lg ai-duration-200 sm:ai-rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ai-ring-offset-background focus:ai-ring-ring data-[state=open]:ai-bg-accent data-[state=open]:ai-text-muted-foreground ai-absolute ai-right-4 ai-top-4 ai-rounded-sm ai-opacity-70 ai-transition-opacity hover:ai-opacity-100 focus:ai-outline-none focus:ai-ring-2 focus:ai-ring-offset-2 disabled:ai-pointer-events-none\">\n <Cross2Icon className=\"ai-size-4\" />\n <span className=\"ai-sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('ai-flex ai-flex-col ai-space-y-1.5 ai-text-center sm:ai-text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('ai-flex ai-flex-col-reverse sm:ai-flex-row sm:ai-justify-end sm:ai-space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('ai-text-lg ai-font-semibold ai-leading-none ai-tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('ai-text-muted-foreground ai-text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAoBE,IAAAa,EAAA,6BAlBFC,EAAuB,oBACvBC,EAAiC,qCACjCC,EAA2B,iCAE3BC,EAAmB,+BAEnB,MAAMf,EAASa,EAAgB,KAEzBJ,EAAgBI,EAAgB,QAEhCN,EAAeM,EAAgB,OAE/BZ,EAAcY,EAAgB,MAE9BP,EAAgBM,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,kLACAF,CACF,EACC,GAAGC,EACN,CACD,EACDX,EAAc,YAAcO,EAAgB,QAAQ,YAEpD,MAAMX,EAAgBU,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OACpC,QAACX,EAAA,CACC,oBAACD,EAAA,EAAc,KACf,QAACO,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,okBACAF,CACF,EACC,GAAGC,EAEH,UAAAE,KACD,QAACN,EAAgB,MAAhB,CAAsB,UAAU,6TAC/B,oBAAC,cAAW,UAAU,YAAY,KAClC,OAAC,QAAK,UAAU,aAAa,iBAAK,GACpC,GACF,GACF,CACD,EACDX,EAAc,YAAcW,EAAgB,QAAQ,YAEpD,MAAMR,EAAe,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,oEAAqED,CAAS,EAAI,GAAGC,EAAO,EAEjHZ,EAAa,YAAc,eAE3B,MAAMD,EAAe,CAAC,CAAE,UAAAY,EAAW,GAAGC,CAAM,OAC1C,OAAC,OACC,aAAW,MAAG,+EAAgFD,CAAS,EACtG,GAAGC,EACN,EAEFb,EAAa,YAAc,eAE3B,MAAMI,EAAcI,EAAM,WAGxB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,MAAhB,CACC,IAAKK,EACL,aAAW,MAAG,gEAAiEF,CAAS,EACvF,GAAGC,EACN,CACD,EACDT,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMV,EAAoBS,EAAM,WAG9B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,YAAhB,CAA4B,IAAKK,EAAK,aAAW,MAAG,sCAAuCF,CAAS,EAAI,GAAGC,EAAO,CACpH,EACDd,EAAkB,YAAcU,EAAgB,YAAY",
6
6
  "names": ["dialog_exports", "__export", "Dialog", "DialogClose", "DialogContent", "DialogDescription", "DialogFooter", "DialogHeader", "DialogOverlay", "DialogPortal", "DialogTitle", "DialogTrigger", "__toCommonJS", "import_jsx_runtime", "React", "DialogPrimitive", "import_react_icons", "import_helpers", "className", "props", "ref", "children"]
7
7
  }
@@ -1,7 +1,15 @@
1
+ import { type VariantProps } from 'class-variance-authority';
1
2
  import React from 'react';
2
- interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'> {
3
+ declare const headingVariants: (props?: ({
4
+ size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
5
+ weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
6
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
+ interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
3
8
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined;
4
9
  asChild?: boolean;
10
+ color?: string;
11
+ html?: string;
5
12
  }
6
13
  declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
7
14
  export { Heading };
15
+ export type { HeadingProps };
@@ -1,2 +1,2 @@
1
- "use strict";var g=Object.create;var d=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var C=(e,a)=>{for(var o in a)d(e,o,{get:a[o],enumerable:!0})},s=(e,a,o,t)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of R(a))!u.call(e,n)&&n!==o&&d(e,n,{get:()=>a[n],enumerable:!(t=H(a,n))||t.enumerable});return e};var E=(e,a,o)=>(o=e!=null?g(P(e)):{},s(a||!e||!e.__esModule?d(o,"default",{value:e,enumerable:!0}):o,e)),N=e=>s(d({},"__esModule",{value:!0}),e);var y={};C(y,{Heading:()=>r});module.exports=N(y);var i=require("react/jsx-runtime"),h=require("../helpers/index.js"),l=require("@radix-ui/react-slot"),c=E(require("react"));const r=c.default.forwardRef((e,a)=>{const{children:o,className:t,asChild:n,as:m="h1",color:f,...p}=e;return(0,i.jsx)(l.Slot,{"data-accent-color":f||void 0,...p,ref:a,className:(0,h.cn)("",t),children:n?o:(0,i.jsx)(m,{children:o})})});r.displayName="Heading";
1
+ "use strict";var R=Object.create;var o=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b(e))!C.call(t,i)&&i!==a&&o(t,i,{get:()=>e[i],enumerable:!(n=V(e,i))||n.enumerable});return t};var E=(t,e,a)=>(a=t!=null?R(w(t)):{},d(e||!t||!t.__esModule?o(a,"default",{value:t,enumerable:!0}):a,t)),N=t=>d(o({},"__esModule",{value:!0}),t);var T={};z(T,{Heading:()=>l});module.exports=N(T);var s=require("react/jsx-runtime"),g=require("../helpers/index.js"),p=require("@radix-ui/react-slot"),f=require("class-variance-authority"),x=E(require("react"));const S=(0,f.cva)("",{variants:{size:{1:"ai-text-xs",2:"ai-text-sm",3:"ai-text-base",4:"ai-text-lg",5:"ai-text-xl",6:"ai-text-2xl",7:"ai-text-3xl",8:"ai-text-4xl",9:"ai-text-5xl"},weights:{light:"ai-font-light",normal:"ai-font-normal",medium:"ai-font-medium",bold:"ai-font-bold"}},defaultVariants:{size:3,weights:"normal"}}),l=x.default.forwardRef((t,e)=>{const{children:a,className:n,size:i,weights:c,asChild:u,as:P="h1",color:r,html:m,...y}=t,h=m?{dangerouslySetInnerHTML:{__html:m}}:null,H=r?{style:{color:r}}:null;return(0,s.jsx)(p.Slot,{...y,ref:e,className:(0,g.cn)(S({size:i,weights:c}),n),...h,...H,children:u?a:(0,s.jsx)(P,{children:h?null:a})})});l.displayName="Heading";
2
2
  //# sourceMappingURL=heading.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/heading.tsx"],
4
- "sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport React from 'react'\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined\n asChild?: boolean\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, asChild, as: Tag = 'h1', color, ...headingProps } = props\n return (\n <Slot data-accent-color={color || undefined} {...headingProps} ref={forwardedRef} className={cn('', className)}>\n {asChild ? children : <Tag>{children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAe4B,IAAAI,EAAA,6BAf5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAkB,oBASlB,MAAML,EAAU,EAAAM,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,GAAGC,CAAa,EAAIP,EACjF,SACE,OAAC,QAAK,oBAAmBM,GAAS,OAAY,GAAGC,EAAc,IAAKN,EAAc,aAAW,MAAG,GAAIE,CAAS,EAC1G,SAAAC,EAAUF,KAAW,OAACG,EAAA,CAAK,SAAAH,EAAS,EACvC,CAEJ,CAAC,EAEDT,EAAQ,YAAc",
6
- "names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_react", "React", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "headingProps"]
4
+ "sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('', {\n variants: {\n size: {\n 1: 'ai-text-xs',\n 2: 'ai-text-sm',\n 3: 'ai-text-base',\n 4: 'ai-text-lg',\n 5: 'ai-text-xl',\n 6: 'ai-text-2xl',\n 7: 'ai-text-3xl',\n 8: 'ai-text-4xl',\n 9: 'ai-text-5xl',\n },\n weights: {\n light: 'ai-font-light',\n normal: 'ai-font-normal',\n medium: 'ai-font-medium',\n bold: 'ai-font-bold',\n },\n },\n defaultVariants: {\n size: 3,\n weights: 'normal',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size, weights, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weights,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqE4B,IAAAI,EAAA,6BArE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,GAAI,CAC9B,SAAU,CACR,KAAM,CACJ,EAAG,aACH,EAAG,aACH,EAAG,eACH,EAAG,aACH,EAAG,aACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,aACL,EACA,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,OAAQ,iBACR,KAAM,cACR,CACF,EACA,gBAAiB,CACf,KAAM,EACN,QAAS,QACX,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAM,QAAAC,EAAS,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIV,EAChGW,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKT,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,QAAAC,CACF,CAAC,EACDF,CACF,EACC,GAAGQ,EACH,GAAGC,EAEH,SAAAN,EAAUJ,KAAW,OAACK,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
6
+ "names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -8,4 +8,5 @@ export * from './popover.js';
8
8
  export * from './radio.js';
9
9
  export * from './dialog.js';
10
10
  export * from './text.js';
11
+ export * from './heading.js';
11
12
  export { default as Theme } from './theme.js';
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.create;var p=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var C=(r,t)=>{for(var f in t)p(r,f,{get:t[f],enumerable:!0})},a=(r,t,f,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of b(t))!g.call(r,m)&&m!==f&&p(r,m,{get:()=>t[m],enumerable:!(d=B(t,m))||d.enumerable});return r},e=(r,t,f)=>(a(r,t,"default"),f&&a(f,t,"default")),x=(r,t,f)=>(f=r!=null?n(c(r)):{},a(t||!r||!r.__esModule?p(f,"default",{value:r,enumerable:!0}):f,r)),S=r=>a(p({},"__esModule",{value:!0}),r);var o={};C(o,{Badge:()=>u.default,Button:()=>l.default,Checkbox:()=>s.default,Skeleton:()=>h.default,Theme:()=>k.default});module.exports=S(o);var l=x(require("./button.js")),u=x(require("./badge.js"));e(o,require("./input.js"),module.exports);var s=x(require("./checkbox.js")),h=x(require("./skeleton.js"));e(o,require("./dialog.js"),module.exports);e(o,require("./popover.js"),module.exports);e(o,require("./radio.js"),module.exports);e(o,require("./dialog.js"),module.exports);e(o,require("./text.js"),module.exports);var k=x(require("./theme.js"));
1
+ "use strict";var n=Object.create;var a=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var f in t)a(e,f,{get:t[f],enumerable:!0})},p=(e,t,f,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of b(t))!g.call(e,m)&&m!==f&&a(e,m,{get:()=>t[m],enumerable:!(d=B(t,m))||d.enumerable});return e},r=(e,t,f)=>(p(e,t,"default"),f&&p(f,t,"default")),x=(e,t,f)=>(f=e!=null?n(c(e)):{},p(t||!e||!e.__esModule?a(f,"default",{value:e,enumerable:!0}):f,e)),S=e=>p(a({},"__esModule",{value:!0}),e);var o={};C(o,{Badge:()=>u.default,Button:()=>l.default,Checkbox:()=>s.default,Skeleton:()=>h.default,Theme:()=>k.default});module.exports=S(o);var l=x(require("./button.js")),u=x(require("./badge.js"));r(o,require("./input.js"),module.exports);var s=x(require("./checkbox.js")),h=x(require("./skeleton.js"));r(o,require("./dialog.js"),module.exports);r(o,require("./popover.js"),module.exports);r(o,require("./radio.js"),module.exports);r(o,require("./dialog.js"),module.exports);r(o,require("./text.js"),module.exports);r(o,require("./heading.js"),module.exports);var k=x(require("./theme.js"));
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["// theme\n// export { default as Theme } from './theme'\n\n// components\nexport { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport * from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport * from './dialog.js'\nexport * from './popover.js'\nexport * from './radio.js'\nexport * from './dialog.js'\nexport * from './text.js'\nexport { default as Theme } from './theme.js'\n"],
5
- "mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6HAAAE,EAAAF,GAIA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAAL,EAAc,sBANd,gBAQA,IAAAM,EAAoC,4BAEpCC,EAAoC,4BACpCF,EAAAL,EAAc,uBAXd,gBAYAK,EAAAL,EAAc,wBAZd,gBAaAK,EAAAL,EAAc,sBAbd,gBAcAK,EAAAL,EAAc,uBAdd,gBAeAK,EAAAL,EAAc,qBAfd,gBAgBA,IAAAQ,EAAiC",
4
+ "sourcesContent": ["// theme\n// export { default as Theme } from './theme'\n\n// components\nexport { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport * from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport * from './dialog.js'\nexport * from './popover.js'\nexport * from './radio.js'\nexport * from './dialog.js'\nexport * from './text.js'\nexport * from './heading.js'\nexport { default as Theme } from './theme.js'\n"],
5
+ "mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6HAAAE,EAAAF,GAIA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAAL,EAAc,sBANd,gBAQA,IAAAM,EAAoC,4BAEpCC,EAAoC,4BACpCF,EAAAL,EAAc,uBAXd,gBAYAK,EAAAL,EAAc,wBAZd,gBAaAK,EAAAL,EAAc,sBAbd,gBAcAK,EAAAL,EAAc,uBAdd,gBAeAK,EAAAL,EAAc,qBAfd,gBAgBAK,EAAAL,EAAc,wBAhBd,gBAiBA,IAAAQ,EAAiC",
6
6
  "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "__reExport", "import_checkbox", "import_skeleton", "import_theme"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { ComponentPropsWithout, RemovedProps } from '@/helpers/component-props';
2
+ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
3
3
  import { type VariantProps } from 'class-variance-authority';
4
4
  declare const inputVariants: (props?: ({
5
5
  size?: "sm" | "lg" | "base" | null | undefined;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var c=Object.create;var s=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of v(t))!g.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(n=b(t,r))||n.enumerable});return e};var P=(e,t,o)=>(o=e!=null?c(h(e)):{},f(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),I=e=>f(s({},"__esModule",{value:!0}),e);var y={};x(y,{Input:()=>d,InputSlot:()=>a});module.exports=I(y);var i=require("react/jsx-runtime"),u=P(require("react")),p=require("../helpers/index.js"),m=require("class-variance-authority");const R=(0,m.cva)("border-input bg-background focus-visible:ring-ring ring-offset-background flex h-2 flex-row items-center overflow-hidden rounded-md border px-3 focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{size:{sm:"h-8",base:"h-10",lg:"h-12"}},defaultVariants:{size:"base"}}),a=u.forwardRef((e,t)=>{const{className:o,side:n,children:r,...l}=e;return(0,i.jsx)("div",{ref:t,...l,className:(0,p.cn)("flex h-full items-center px-2",o,{"-order-1 pl-0":n==="left","order-2 pr-0":n==="right"}),children:r})}),d=u.forwardRef(({className:e,type:t,size:o,children:n,...r},l)=>(0,i.jsxs)("div",{className:(0,p.cn)(R({size:o}),e),children:[(0,i.jsx)("input",{type:t,className:(0,p.cn)("placeholder:text-muted-foreground flex size-full text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:l,...r}),n]}));d.displayName="Input",a.displayName="InputSlot";
1
+ "use strict";"use client";var c=Object.create;var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var x=(e,i)=>{for(var t in i)n(e,t,{get:i[t],enumerable:!0})},f=(e,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of v(i))!h.call(e,a)&&a!==t&&n(e,a,{get:()=>i[a],enumerable:!(o=b(i,a))||o.enumerable});return e};var P=(e,i,t)=>(t=e!=null?c(g(e)):{},f(i||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>f(n({},"__esModule",{value:!0}),e);var y={};x(y,{Input:()=>d,InputSlot:()=>l});module.exports=I(y);var r=require("react/jsx-runtime"),u=P(require("react")),s=require("../helpers/index.js"),m=require("class-variance-authority");const R=(0,m.cva)("ai-border-input ai-bg-background focus-visible:ai-ring-ring ai-ring-offset-background ai-flex ai-flex-row ai-items-center ai-overflow-hidden ai-rounded-md ai-border ai-px-3 focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2",{variants:{size:{sm:"ai-h-8",base:"ai-h-10",lg:"ai-h-12"}},defaultVariants:{size:"base"}}),l=u.forwardRef((e,i)=>{const{className:t,side:o,children:a,...p}=e;return(0,r.jsx)("div",{ref:i,...p,className:(0,s.cn)("ai-flex ai-h-full ai-items-center ai-px-2",t,{"-ai-order-1 ai-pl-0":o==="left","ai-order-2 ai-pr-0":o==="right"}),children:a})}),d=u.forwardRef(({className:e,type:i,size:t,children:o,...a},p)=>(0,r.jsxs)("div",{className:(0,s.cn)(R({size:t}),e),children:[(0,r.jsx)("input",{type:i,className:(0,s.cn)("placeholder:ai-text-muted-foreground ai-flex ai-size-full ai-text-sm file:ai-border-0 file:ai-bg-transparent file:ai-text-sm file:ai-font-medium focus-visible:ai-outline-none disabled:ai-cursor-not-allowed disabled:ai-opacity-50"),ref:p,...a}),o]}));d.displayName="Input",l.displayName="InputSlot";
2
2
  //# sourceMappingURL=input.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/input.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '@/helpers/component-props'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'border-input bg-background focus-visible:ring-ring ring-offset-background flex h-2 flex-row items-center overflow-hidden rounded-md border px-3 focus-visible:ring-2 focus-visible:ring-offset-2',\n {\n variants: {\n size: {\n sm: 'h-8',\n base: 'h-10',\n lg: 'h-12',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n */\n side: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side, children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('flex h-full items-center px-2', className, {\n '-order-1 pl-0': side === 'left',\n 'order-2 pr-0': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:text-muted-foreground flex size-full text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,cAAAC,IAAA,eAAAC,EAAAJ,GAyCI,IAAAK,EAAA,6BAvCJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAAuC,oCAEvC,MAAMC,KAAgB,OACpB,mMACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,MACJ,KAAM,OACN,GAAI,MACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAgBMN,EAAYG,EAAM,WAA6C,CAACI,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAEpD,SACE,OAAC,OACC,IAAKC,EACJ,GAAGI,EACJ,aAAW,MAAG,gCAAiCH,EAAW,CACxD,gBAAiBC,IAAS,OAC1B,eAAgBA,IAAS,OAC3B,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAEKZ,EAAQI,EAAM,WAClB,CAAC,CAAE,UAAAM,EAAW,KAAAI,EAAM,KAAAC,EAAM,SAAAH,EAAU,GAAGJ,CAAM,EAAGQ,OAE5C,QAAC,OAAI,aAAW,MAAGT,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAGL,CAAS,EACnD,oBAAC,SACC,KAAMI,EACN,aAAW,MACT,qMACF,EACA,IAAKE,EACJ,GAAGR,EACN,EACCI,GACH,CAGN,EACAZ,EAAM,YAAc,QACpBC,EAAU,YAAc",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'ai-border-input ai-bg-background focus-visible:ai-ring-ring ai-ring-offset-background ai-flex ai-flex-row ai-items-center ai-overflow-hidden ai-rounded-md ai-border ai-px-3 focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2',\n {\n variants: {\n size: {\n sm: 'ai-h-8',\n base: 'ai-h-10',\n lg: 'ai-h-12',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n */\n side: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side, children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('ai-flex ai-h-full ai-items-center ai-px-2', className, {\n '-ai-order-1 ai-pl-0': side === 'left',\n 'ai-order-2 ai-pr-0': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:ai-text-muted-foreground ai-flex ai-size-full ai-text-sm file:ai-border-0 file:ai-bg-transparent file:ai-text-sm file:ai-font-medium focus-visible:ai-outline-none disabled:ai-cursor-not-allowed disabled:ai-opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,cAAAC,IAAA,eAAAC,EAAAJ,GAyCI,IAAAK,EAAA,6BAvCJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAAuC,oCAEvC,MAAMC,KAAgB,OACpB,sOACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,KAAM,UACN,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAgBMN,EAAYG,EAAM,WAA6C,CAACI,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAEpD,SACE,OAAC,OACC,IAAKC,EACJ,GAAGI,EACJ,aAAW,MAAG,4CAA6CH,EAAW,CACpE,sBAAuBC,IAAS,OAChC,qBAAsBA,IAAS,OACjC,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAEKZ,EAAQI,EAAM,WAClB,CAAC,CAAE,UAAAM,EAAW,KAAAI,EAAM,KAAAC,EAAM,SAAAH,EAAU,GAAGJ,CAAM,EAAGQ,OAE5C,QAAC,OAAI,aAAW,MAAGT,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAGL,CAAS,EACnD,oBAAC,SACC,KAAMI,EACN,aAAW,MACT,sOACF,EACA,IAAKE,EACJ,GAAGR,EACN,EACCI,GACH,CAGN,EACAZ,EAAM,YAAc,QACpBC,EAAU,YAAc",
6
6
  "names": ["input_exports", "__export", "Input", "InputSlot", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_class_variance_authority", "inputVariants", "props", "forwardedRef", "className", "side", "children", "slotProps", "type", "size", "ref"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var v=Object.create;var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var C=(o,t)=>{for(var e in t)n(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of g(t))!R.call(o,a)&&a!==e&&n(o,a,{get:()=>t[a],enumerable:!(r=c(t,a))||r.enumerable});return o};var m=(o,t,e)=>(e=o!=null?v(u(o)):{},p(t||!o||!o.__esModule?n(e,"default",{value:o,enumerable:!0}):e,o)),b=o=>p(n({},"__esModule",{value:!0}),o);var y={};C(y,{Popover:()=>l,PopoverContent:()=>d,PopoverTrigger:()=>P});module.exports=b(y);var s=require("react/jsx-runtime"),h=m(require("react")),i=m(require("@radix-ui/react-popover")),f=require("../helpers/utils.js");const l=i.Root,P=i.Trigger,d=h.forwardRef(({className:o,align:t="center",sideOffset:e=4,...r},a)=>(0,s.jsx)(i.Portal,{children:(0,s.jsx)(i.Content,{ref:a,align:t,sideOffset:e,className:(0,f.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",o),...r})}));d.displayName=i.Content.displayName;
1
+ "use strict";"use client";var v=Object.create;var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var C=(o,t)=>{for(var e in t)n(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of g(t))!R.call(o,a)&&a!==e&&n(o,a,{get:()=>t[a],enumerable:!(r=c(t,a))||r.enumerable});return o};var m=(o,t,e)=>(e=o!=null?v(u(o)):{},p(t||!o||!o.__esModule?n(e,"default",{value:o,enumerable:!0}):e,o)),b=o=>p(n({},"__esModule",{value:!0}),o);var y={};C(y,{Popover:()=>l,PopoverContent:()=>d,PopoverTrigger:()=>P});module.exports=b(y);var s=require("react/jsx-runtime"),h=m(require("react")),i=m(require("@radix-ui/react-popover")),f=require("../helpers/utils.js");const l=i.Root,P=i.Trigger,d=h.forwardRef(({className:o,align:t="center",sideOffset:e=4,...r},a)=>(0,s.jsx)(i.Portal,{children:(0,s.jsx)(i.Content,{ref:a,align:t,sideOffset:e,className:(0,f.cn)("ai-bg-popover ai-text-popover-foreground data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[side=bottom]:ai-slide-in-from-top-2 data-[side=left]:ai-slide-in-from-right-2 data-[side=right]:ai-slide-in-from-left-2 data-[side=top]:ai-slide-in-from-bottom-2 ai-z-50 ai-w-72 ai-rounded-md ai-border ai-p-4 ai-shadow-md ai-outline-none",o),...r})}));d.displayName=i.Content.displayName;
2
2
  //# sourceMappingURL=popover.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/popover.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '../helpers/utils.js'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAgBI,IAAAM,EAAA,6BAdJC,EAAuB,oBACvBC,EAAkC,sCAElCC,EAAmB,+BAEnB,MAAMP,EAAUM,EAAiB,KAE3BJ,EAAiBI,EAAiB,QAElCL,EAAiBI,EAAM,WAG3B,CAAC,CAAE,UAAAG,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC5D,OAACN,EAAiB,OAAjB,CACC,mBAACA,EAAiB,QAAjB,CACC,IAAKM,EACL,MAAOH,EACP,WAAYC,EACZ,aAAW,MACT,6aACAF,CACF,EACC,GAAGG,EACN,EACF,CACD,EACDV,EAAe,YAAcK,EAAiB,QAAQ",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '../helpers/utils.js'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'ai-bg-popover ai-text-popover-foreground data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[side=bottom]:ai-slide-in-from-top-2 data-[side=left]:ai-slide-in-from-right-2 data-[side=right]:ai-slide-in-from-left-2 data-[side=top]:ai-slide-in-from-bottom-2 ai-z-50 ai-w-72 ai-rounded-md ai-border ai-p-4 ai-shadow-md ai-outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAgBI,IAAAM,EAAA,6BAdJC,EAAuB,oBACvBC,EAAkC,sCAElCC,EAAmB,+BAEnB,MAAMP,EAAUM,EAAiB,KAE3BJ,EAAiBI,EAAiB,QAElCL,EAAiBI,EAAM,WAG3B,CAAC,CAAE,UAAAG,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC5D,OAACN,EAAiB,OAAjB,CACC,mBAACA,EAAiB,QAAjB,CACC,IAAKM,EACL,MAAOH,EACP,WAAYC,EACZ,aAAW,MACT,seACAF,CACF,EACC,GAAGG,EACN,EACF,CACD,EACDV,EAAe,YAAcK,EAAiB,QAAQ",
6
6
  "names": ["popover_exports", "__export", "Popover", "PopoverContent", "PopoverTrigger", "__toCommonJS", "import_jsx_runtime", "React", "PopoverPrimitive", "import_utils", "className", "align", "sideOffset", "props", "ref"]
7
7
  }
@@ -1,5 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
- declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ declare const radioGroupVariants: (props?: ({
5
+ size?: "sm" | "lg" | "base" | null | undefined;
6
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
+ interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
8
+ /** 尺寸 */
9
+ size?: 'sm' | 'base' | 'lg';
10
+ }
11
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
12
+ interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioGroupVariants> {
13
+ }
14
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
5
15
  export { RadioGroup, RadioGroupItem };
16
+ export type { RadioGroupProps, RadioGroupItemProps };
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var R=Object.create;var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var P=(e,o)=>{for(var i in o)m(e,i,{get:o[i],enumerable:!0})},n=(e,o,i,d)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of v(o))!I.call(e,r)&&r!==i&&m(e,r,{get:()=>o[r],enumerable:!(d=y(o,r))||d.enumerable});return e};var c=(e,o,i)=>(i=e!=null?R(G(e)):{},n(o||!e||!e.__esModule?m(i,"default",{value:e,enumerable:!0}):i,e)),b=e=>n(m({},"__esModule",{value:!0}),e);var g={};P(g,{RadioGroup:()=>p,RadioGroupItem:()=>f});module.exports=b(g);var a=require("react/jsx-runtime"),u=c(require("react")),t=c(require("@radix-ui/react-radio-group")),l=require("@radix-ui/react-icons"),s=require("../helpers/index.js");const p=u.forwardRef(({className:e,...o},i)=>(0,a.jsx)(t.Root,{className:(0,s.cn)("grid gap-2",e),...o,ref:i}));p.displayName=t.Root.displayName;const f=u.forwardRef(({className:e,...o},i)=>(0,a.jsx)(t.Item,{ref:i,className:(0,s.cn)("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square size-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...o,children:(0,a.jsx)(t.Indicator,{className:"flex items-center justify-center",children:(0,a.jsx)(l.CheckIcon,{className:"text-primary size-2.5 fill-current"})})}));f.displayName=t.Item.displayName;
1
+ "use strict";"use client";var G=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var x=(e,i)=>{for(var o in i)p(e,o,{get:i[o],enumerable:!0})},c=(e,i,o,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of v(i))!g.call(e,a)&&a!==o&&p(e,a,{get:()=>i[a],enumerable:!(r=y(i,a))||r.enumerable});return e};var f=(e,i,o)=>(o=e!=null?G(b(e)):{},c(i||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),I=e=>c(p({},"__esModule",{value:!0}),e);var C={};x(C,{RadioGroup:()=>m,RadioGroupItem:()=>u});module.exports=I(C);var t=require("react/jsx-runtime"),d=f(require("react")),s=f(require("@radix-ui/react-radio-group")),l=require("@radix-ui/react-icons"),P=require("class-variance-authority"),n=require("../helpers/index.js");const R=d.createContext({size:"base"}),z=(0,P.cva)("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),m=d.forwardRef(({className:e,children:i,size:o,...r},a)=>(0,t.jsx)(s.Root,{className:(0,n.cn)("grid gap-2",e),...r,ref:a,children:(0,t.jsx)(R.Provider,{value:{size:o},children:i})}));m.displayName=s.Root.displayName;const u=d.forwardRef(({className:e,size:i,...o},r)=>{const{size:a}=d.useContext(R);return(0,t.jsx)(s.Item,{ref:r,className:(0,n.cn)(z({size:i??a}),e),...o,children:(0,t.jsx)(s.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:(0,t.jsx)(l.CheckIcon,{})})})});u.displayName=s.Item.displayName;
2
2
  //# sourceMappingURL=radio.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/radio.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square size-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <CheckIcon className=\"text-primary size-2.5 fill-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAYS,IAAAK,EAAA,6BAVTC,EAAuB,oBACvBC,EAAqC,0CACrCC,EAA0B,iCAE1BC,EAAmB,+BAEnB,MAAMP,EAAaI,EAAM,WAGvB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OACnB,OAACL,EAAoB,KAApB,CAAyB,aAAW,MAAG,aAAcG,CAAS,EAAI,GAAGC,EAAO,IAAKC,EAAK,CAC/F,EACDV,EAAW,YAAcK,EAAoB,KAAK,YAElD,MAAMJ,EAAiBG,EAAM,WAG3B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAExB,OAACL,EAAoB,KAApB,CACC,IAAKK,EACL,aAAW,MACT,0OACAF,CACF,EACC,GAAGC,EAEJ,mBAACJ,EAAoB,UAApB,CAA8B,UAAU,mCACvC,mBAAC,aAAU,UAAU,qCAAqC,EAC5D,EACF,CAEH,EACDJ,EAAe,YAAcI,EAAoB,KAAK",
6
- "names": ["radio_exports", "__export", "RadioGroup", "RadioGroupItem", "__toCommonJS", "import_jsx_runtime", "React", "RadioGroupPrimitive", "import_react_icons", "import_helpers", "className", "props", "ref"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CheckIcon } from '@radix-ui/react-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\nconst RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({\n size: 'base',\n})\n\nconst radioGroupVariants = cva(\n 'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** \u5C3A\u5BF8 */\n size?: 'sm' | 'base' | 'lg'\n}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, children, size, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>\n <RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>\n </RadioGroupPrimitive.Root>\n )\n }\n)\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n }\n)\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAqCQ,IAAAK,EAAA,6BAnCRC,EAAuB,oBACvBC,EAAqC,0CACrCC,EAA0B,iCAC1BC,EAAuC,oCACvCC,EAAmB,+BAEnB,MAAMC,EAAeL,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKM,KAAqB,OACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMV,EAAaI,EAAM,WACvB,CAAC,CAAE,UAAAO,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAEtC,OAACV,EAAoB,KAApB,CAAyB,aAAW,MAAG,aAAcM,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,mBAACN,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAI,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAZ,EAAW,YAAcK,EAAoB,KAAK,YAMlD,MAAMJ,EAAiBG,EAAM,WAC3B,CAAC,CAAE,UAAAO,EAAW,KAAAE,EAAM,GAAGC,CAAM,EAAGC,IAAQ,CACtC,KAAM,CAAE,KAAMC,CAAe,EAAIZ,EAAM,WAAWK,CAAY,EAC9D,SACE,OAACJ,EAAoB,KAApB,CACC,IAAKU,EACL,aAAW,MACTL,EAAmB,CACjB,KAAMG,GAAQG,CAChB,CAAC,EACDL,CACF,EACC,GAAGG,EAEJ,mBAACT,EAAoB,UAApB,CAA8B,UAAU,gFACvC,mBAAC,cAAU,EACb,EACF,CAEJ,CACF,EACAJ,EAAe,YAAcI,EAAoB,KAAK",
6
+ "names": ["radio_exports", "__export", "RadioGroup", "RadioGroupItem", "__toCommonJS", "import_jsx_runtime", "React", "RadioGroupPrimitive", "import_react_icons", "import_class_variance_authority", "import_helpers", "RadioContext", "radioGroupVariants", "className", "children", "size", "props", "ref", "sizeFromParent"]
7
7
  }
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
- declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element;
3
- declare namespace Skeleton {
4
- var displayName: string;
2
+ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
3
+ interface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {
4
+ /** 是否正在加载 */
5
+ loading?: boolean;
5
6
  }
7
+ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
6
8
  export default Skeleton;
9
+ export type { SkeletonProps };
@@ -1,2 +1,5 @@
1
- "use strict";var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!c.call(t,a)&&a!==o&&i(t,a,{get:()=>e[a],enumerable:!(l=r(e,a))||l.enumerable});return t};var d=t=>u(i({},"__esModule",{value:!0}),t);var b={};f(b,{default:()=>k});module.exports=d(b);var s=require("react/jsx-runtime"),H=require("react"),m=require("../helpers/index.js");function n({className:t,...e}){return(0,s.jsx)("div",{className:(0,m.cn)("bg-skeleton size-12 animate-pulse",t),...e})}n.displayName="Skeleton";var k=n;
1
+ "use strict";var b=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var S=(e,n)=>{for(var o in n)i(e,o,{get:n[o],enumerable:!0})},l=(e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of u(n))!P.call(e,t)&&t!==o&&i(e,t,{get:()=>n[t],enumerable:!(a=k(n,t))||a.enumerable});return e};var v=(e,n,o)=>(o=e!=null?b(g(e)):{},l(n||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),R=e=>l(i({},"__esModule",{value:!0}),e);var y={};S(y,{default:()=>h});module.exports=R(y);var m=require("react/jsx-runtime"),r=v(require("react")),p=require("../helpers/index.js"),d=require("@radix-ui/react-slot");const s=r.forwardRef((e,n)=>{const{children:o,className:a,loading:t=!0,...c}=e;if(!t)return o;const f=r.isValidElement(o)?d.Slot:"span";return(0,m.jsx)(f,{ref:n,className:(0,p.cn)(`ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none
2
+ !ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone
3
+ after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible
4
+ `,a),"data-inline-skeleton":r.isValidElement(o)?void 0:!0,tabIndex:-1,...c,children:o})});s.displayName="Skeleton";var h=s;
2
5
  //# sourceMappingURL=skeleton.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/skeleton.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport { cn } from '../helpers/index.js'\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('bg-skeleton size-12 animate-pulse', className)} {...props} />\n}\n\nSkeleton.displayName = 'Skeleton'\n\nexport default Skeleton\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAIS,IAAAI,EAAA,6BAJTC,EAAuB,iBACvBC,EAAmB,+BAEnB,SAASC,EAAS,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAyC,CAC/E,SAAO,OAAC,OAAI,aAAW,MAAG,oCAAqCD,CAAS,EAAI,GAAGC,EAAO,CACxF,CAEAF,EAAS,YAAc,WAEvB,IAAOL,EAAQK",
6
- "names": ["skeleton_exports", "__export", "skeleton_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "Skeleton", "className", "props"]
4
+ "sourcesContent": ["import * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\ntype SkeletonElement = React.ElementRef<'span'>\n\ninterface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {\n /** \u662F\u5426\u6B63\u5728\u52A0\u8F7D */\n loading?: boolean\n}\n\nconst Skeleton = React.forwardRef<SkeletonElement, SkeletonProps>((props, forwardedRef) => {\n const { children, className, loading = true, ...skeletonProps } = props\n\n if (!loading) return children\n const Tag = React.isValidElement(children) ? Slot : 'span'\n\n return (\n <Tag\n ref={forwardedRef}\n className={cn(\n `ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none \n !ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone\n after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible\n `,\n className\n )}\n data-inline-skeleton={React.isValidElement(children) ? undefined : true}\n tabIndex={-1}\n {...skeletonProps}\n >\n {children}\n </Tag>\n )\n})\n\nSkeleton.displayName = 'Skeleton'\n\nexport default Skeleton\nexport type { SkeletonProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmBI,IAAAI,EAAA,6BAnBJC,EAAuB,oBACvBC,EAAmB,+BACnBC,EAAqB,gCAUrB,MAAMC,EAAWH,EAAM,WAA2C,CAACI,EAAOC,IAAiB,CACzF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAc,EAAIL,EAElE,GAAI,CAACI,EAAS,OAAOF,EACrB,MAAMI,EAAMV,EAAM,eAAeM,CAAQ,EAAI,OAAO,OAEpD,SACE,OAACI,EAAA,CACC,IAAKL,EACL,aAAW,MACT;AAAA;AAAA;AAAA,UAIAE,CACF,EACA,uBAAsBP,EAAM,eAAeM,CAAQ,EAAI,OAAY,GACnE,SAAU,GACT,GAAGG,EAEH,SAAAH,EACH,CAEJ,CAAC,EAEDH,EAAS,YAAc,WAEvB,IAAON,EAAQM",
6
+ "names": ["skeleton_exports", "__export", "skeleton_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_react_slot", "Skeleton", "props", "forwardedRef", "children", "className", "loading", "skeletonProps", "Tag"]
7
7
  }
@@ -1,12 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
- interface TextProps extends React.ComponentPropsWithoutRef<'span'> {
3
+ declare const textVariants: (props?: ({
4
+ size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
5
+ weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
6
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
+ interface TextProps extends React.ComponentPropsWithoutRef<'span'>, VariantProps<typeof textVariants> {
4
8
  as?: 'div' | 'label' | 'p' | 'span' | undefined;
5
9
  asChild?: boolean;
6
10
  color?: string;
11
+ /** 相当于 dangerouslySetInnerHTML */
12
+ html?: string;
7
13
  }
8
- declare const Text: React.ForwardRefExoticComponent<TextProps & VariantProps<(props?: ({
9
- size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
10
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string> & React.RefAttributes<HTMLSpanElement>>;
14
+ declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
11
15
  export { Text };
12
16
  export type { TextProps };
@@ -1,2 +1,2 @@
1
- "use strict";var P=Object.create;var r=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var V=(t,e)=>{for(var a in e)r(t,a,{get:e[a],enumerable:!0})},p=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of y(e))!h.call(t,s)&&s!==a&&r(t,s,{get:()=>e[s],enumerable:!(o=R(e,s))||o.enumerable});return t};var b=(t,e,a)=>(a=t!=null?P(g(t)):{},p(e||!t||!t.__esModule?r(a,"default",{value:t,enumerable:!0}):a,t)),v=t=>p(r({},"__esModule",{value:!0}),t);var E={};V(E,{Text:()=>x});module.exports=v(E);var n=require("react/jsx-runtime"),z=b(require("react")),l=require("@radix-ui/react-slot"),i=require("../helpers/index.js"),m=require("class-variance-authority");const C=(0,m.cva)("",{variants:{size:{1:"text-xs",2:"text-sm",3:"text-base",4:"text-lg",5:"text-xl",6:"text-2xl",7:"text-3xl",8:"text-4xl",9:"text-5xl"}}}),x=z.forwardRef((t,e)=>{const{children:a,size:o,className:s,asChild:c,as:f="span",color:d,...T}=t;return(0,n.jsx)(l.Slot,{...T,ref:e,className:(0,i.cn)(C({size:o}),s,d),children:c?a:(0,n.jsx)(f,{children:a})})});x.displayName="Text";
1
+ "use strict";var y=Object.create;var n=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var C=(t,e)=>{for(var a in e)n(t,a,{get:e[a],enumerable:!0})},p=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(s=R(e,o))||s.enumerable});return t};var v=(t,e,a)=>(a=t!=null?y(V(t)):{},p(e||!t||!t.__esModule?n(a,"default",{value:t,enumerable:!0}):a,t)),z=t=>p(n({},"__esModule",{value:!0}),t);var S={};C(S,{Text:()=>l});module.exports=z(S);var i=require("react/jsx-runtime"),E=v(require("react")),f=require("@radix-ui/react-slot"),c=require("../helpers/index.js"),d=require("class-variance-authority");const N=(0,d.cva)("",{variants:{size:{1:"ai-text-xs",2:"ai-text-sm",3:"ai-text-base",4:"ai-text-lg",5:"ai-text-xl",6:"ai-text-2xl",7:"ai-text-3xl",8:"ai-text-4xl",9:"ai-text-5xl"},weights:{light:"ai-font-light",normal:"ai-font-normal",medium:"ai-font-medium",bold:"ai-font-bold"}},defaultVariants:{size:3,weights:"normal"}}),l=E.forwardRef((t,e)=>{const{children:a,size:s,weights:o,className:h,asChild:g,as:T="span",color:r,html:x,...u}=t,m=x?{dangerouslySetInnerHTML:{__html:x}}:null,P=r?{style:{color:r}}:null;return(0,i.jsx)(f.Slot,{...u,ref:e,className:(0,c.cn)(N({size:s,weights:o}),h),...m,...P,children:g?a:(0,i.jsx)(T,{children:m?null:a})})});l.displayName="Text";
2
2
  //# sourceMappingURL=text.js.map