@anker-in/headless-ui 0.0.21 → 0.0.23

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 (131) hide show
  1. package/CONTRIBUTING.md +16 -11
  2. package/dist/cjs/components/button.d.ts +1 -0
  3. package/dist/cjs/components/button.js +1 -1
  4. package/dist/cjs/components/button.js.map +3 -3
  5. package/dist/cjs/components/heading.js +1 -1
  6. package/dist/cjs/components/heading.js.map +2 -2
  7. package/dist/cjs/components/index.d.ts +1 -0
  8. package/dist/cjs/components/index.js +1 -1
  9. package/dist/cjs/components/index.js.map +3 -3
  10. package/dist/cjs/components/picture.d.ts +13 -0
  11. package/dist/cjs/components/picture.js +2 -0
  12. package/dist/cjs/components/picture.js.map +7 -0
  13. package/dist/cjs/components/text.js +1 -1
  14. package/dist/cjs/components/text.js.map +2 -2
  15. package/dist/cjs/helpers/index.d.ts +1 -0
  16. package/dist/cjs/helpers/index.js +1 -1
  17. package/dist/cjs/helpers/index.js.map +2 -2
  18. package/dist/cjs/helpers/utils.d.ts +1 -0
  19. package/dist/cjs/helpers/utils.js +1 -1
  20. package/dist/cjs/helpers/utils.js.map +3 -3
  21. package/dist/cjs/stories/badge.stories.d.ts +1 -1
  22. package/dist/cjs/stories/badge.stories.js +1 -1
  23. package/dist/cjs/stories/badge.stories.js.map +2 -2
  24. package/dist/cjs/stories/button.stories.d.ts +1 -1
  25. package/dist/cjs/stories/button.stories.js +1 -1
  26. package/dist/cjs/stories/button.stories.js.map +2 -2
  27. package/dist/cjs/stories/checkbox.stories.d.ts +3 -3
  28. package/dist/cjs/stories/checkbox.stories.js +1 -1
  29. package/dist/cjs/stories/checkbox.stories.js.map +2 -2
  30. package/dist/cjs/stories/dialog.stories.d.ts +1 -1
  31. package/dist/cjs/stories/dialog.stories.js +1 -1
  32. package/dist/cjs/stories/dialog.stories.js.map +2 -2
  33. package/dist/cjs/stories/heading.stories.d.ts +2 -2
  34. package/dist/cjs/stories/heading.stories.js +1 -1
  35. package/dist/cjs/stories/heading.stories.js.map +2 -2
  36. package/dist/cjs/stories/input.stories.d.ts +1 -1
  37. package/dist/cjs/stories/input.stories.js +1 -1
  38. package/dist/cjs/stories/input.stories.js.map +2 -2
  39. package/dist/cjs/stories/picture.stories.d.ts +18 -0
  40. package/dist/cjs/stories/picture.stories.js +4 -0
  41. package/dist/cjs/stories/picture.stories.js.map +7 -0
  42. package/dist/cjs/stories/popover.stories.d.ts +1 -1
  43. package/dist/cjs/stories/popover.stories.js +1 -1
  44. package/dist/cjs/stories/popover.stories.js.map +2 -2
  45. package/dist/cjs/stories/radio.stories.d.ts +4 -4
  46. package/dist/cjs/stories/radio.stories.js +1 -1
  47. package/dist/cjs/stories/radio.stories.js.map +2 -2
  48. package/dist/cjs/stories/skeleton.stories.d.ts +1 -1
  49. package/dist/cjs/stories/skeleton.stories.js +1 -1
  50. package/dist/cjs/stories/skeleton.stories.js.map +2 -2
  51. package/dist/cjs/stories/text.stories.d.ts +3 -2
  52. package/dist/cjs/stories/text.stories.js +1 -1
  53. package/dist/cjs/stories/text.stories.js.map +2 -2
  54. package/dist/cjs/tsconfig.tsbuildinfo +1 -0
  55. package/dist/esm/components/button.d.ts +1 -0
  56. package/dist/esm/components/button.js +1 -1
  57. package/dist/esm/components/button.js.map +3 -3
  58. package/dist/esm/components/heading.d.ts +1 -1
  59. package/dist/esm/components/heading.js +1 -1
  60. package/dist/esm/components/heading.js.map +2 -2
  61. package/dist/esm/components/index.d.ts +1 -0
  62. package/dist/esm/components/index.js +1 -1
  63. package/dist/esm/components/index.js.map +2 -2
  64. package/dist/esm/components/picture.d.ts +13 -0
  65. package/dist/esm/components/picture.js +2 -0
  66. package/dist/esm/components/picture.js.map +7 -0
  67. package/dist/esm/components/radio.d.ts +1 -1
  68. package/dist/esm/components/text.d.ts +1 -1
  69. package/dist/esm/components/text.js +1 -1
  70. package/dist/esm/components/text.js.map +2 -2
  71. package/dist/esm/helpers/index.d.ts +1 -0
  72. package/dist/esm/helpers/index.js +1 -1
  73. package/dist/esm/helpers/index.js.map +3 -3
  74. package/dist/esm/helpers/utils.d.ts +1 -0
  75. package/dist/esm/helpers/utils.js +1 -1
  76. package/dist/esm/helpers/utils.js.map +3 -3
  77. package/dist/esm/stories/badge.stories.d.ts +1 -1
  78. package/dist/esm/stories/badge.stories.js +1 -1
  79. package/dist/esm/stories/badge.stories.js.map +2 -2
  80. package/dist/esm/stories/button.stories.d.ts +1 -1
  81. package/dist/esm/stories/button.stories.js +1 -1
  82. package/dist/esm/stories/button.stories.js.map +2 -2
  83. package/dist/esm/stories/checkbox.stories.d.ts +3 -3
  84. package/dist/esm/stories/checkbox.stories.js +1 -1
  85. package/dist/esm/stories/checkbox.stories.js.map +2 -2
  86. package/dist/esm/stories/dialog.stories.d.ts +1 -1
  87. package/dist/esm/stories/dialog.stories.js +1 -1
  88. package/dist/esm/stories/dialog.stories.js.map +2 -2
  89. package/dist/esm/stories/heading.stories.d.ts +2 -2
  90. package/dist/esm/stories/heading.stories.js +1 -1
  91. package/dist/esm/stories/heading.stories.js.map +2 -2
  92. package/dist/esm/stories/input.stories.d.ts +1 -1
  93. package/dist/esm/stories/input.stories.js +1 -1
  94. package/dist/esm/stories/input.stories.js.map +2 -2
  95. package/dist/esm/stories/picture.stories.d.ts +18 -0
  96. package/dist/esm/stories/picture.stories.js +4 -0
  97. package/dist/esm/stories/picture.stories.js.map +7 -0
  98. package/dist/esm/stories/popover.stories.d.ts +1 -1
  99. package/dist/esm/stories/popover.stories.js +1 -1
  100. package/dist/esm/stories/popover.stories.js.map +2 -2
  101. package/dist/esm/stories/radio.stories.d.ts +4 -4
  102. package/dist/esm/stories/radio.stories.js +1 -1
  103. package/dist/esm/stories/radio.stories.js.map +2 -2
  104. package/dist/esm/stories/skeleton.stories.d.ts +1 -1
  105. package/dist/esm/stories/skeleton.stories.js +1 -1
  106. package/dist/esm/stories/skeleton.stories.js.map +2 -2
  107. package/dist/esm/stories/text.stories.d.ts +3 -2
  108. package/dist/esm/stories/text.stories.js +2 -2
  109. package/dist/esm/stories/text.stories.js.map +2 -2
  110. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  111. package/package.json +2 -1
  112. package/src/components/button.tsx +35 -11
  113. package/src/components/heading.tsx +1 -13
  114. package/src/components/index.ts +1 -0
  115. package/src/components/picture.tsx +99 -0
  116. package/src/components/text.tsx +1 -2
  117. package/src/helpers/index.ts +1 -0
  118. package/src/helpers/utils.ts +2 -0
  119. package/src/stories/badge.stories.tsx +1 -1
  120. package/src/stories/button.stories.tsx +1 -1
  121. package/src/stories/checkbox.stories.tsx +1 -1
  122. package/src/stories/dialog.stories.tsx +1 -1
  123. package/src/stories/heading.stories.tsx +3 -3
  124. package/src/stories/input.stories.tsx +1 -1
  125. package/src/stories/picture.stories.tsx +51 -0
  126. package/src/stories/popover.stories.tsx +1 -1
  127. package/src/stories/radio.stories.tsx +1 -1
  128. package/src/stories/skeleton.stories.tsx +1 -1
  129. package/src/stories/text.stories.tsx +5 -4
  130. package/src/styles/global.css +9 -9
  131. package/style.css +18 -17
package/CONTRIBUTING.md CHANGED
@@ -157,14 +157,19 @@ pnpm test
157
157
 
158
158
  # publish
159
159
 
160
- ```shell
161
- # 发布ui库
162
- cd packages/ui
163
- # 发布新版本需要提升版本号
164
- pnpm version (patch|minor|major)
165
- pnpm publish
166
-
167
- #发布文档
168
- cd packages/storybook
169
- netlify deploy --prod
170
- ```
160
+ 先从 master 分支checkout 出新的分支。
161
+
162
+ 在新的分支执行
163
+
164
+ `pnpm changeset add `
165
+ 空格选择要发布的包 @anker-in/headless-ui
166
+ 回车
167
+
168
+ 会依次出现要增加的语意版本号
169
+ `{major -> minor -> patch}`
170
+ 这里如果只增加patch 可以一路回车。
171
+
172
+ 然后提交代码,合并到`master`分支。
173
+
174
+ 最后到`coding`网站的持续集成找到项目,手动触发ci/cd。
175
+
@@ -7,6 +7,7 @@ declare const buttonVariants: (props?: ({
7
7
  variant?: "link" | "primary" | "secondary" | "ghost" | null | undefined;
8
8
  size?: "sm" | "base" | "lg" | "icon" | null | undefined;
9
9
  hoverEffect?: "none" | "slide" | null | undefined;
10
+ state?: "default" | "disabled" | "loading" | null | undefined;
10
11
  } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
11
12
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
12
13
  /** 设置按钮载入状态 */
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var B=Object.create;var n=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var N=(e,a)=>{for(var i in a)n(e,i,{get:a[i],enumerable:!0})},l=(e,a,i,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of z(a))!H.call(e,t)&&t!==i&&n(e,t,{get:()=>a[t],enumerable:!(o=k(a,t))||o.enumerable});return e};var p=(e,a,i)=>(i=e!=null?B(E(e)):{},l(a||!e||!e.__esModule?n(i,"default",{value:e,enumerable:!0}):i,e)),P=e=>l(n({},"__esModule",{value:!0}),e);var S={};N(S,{default:()=>M});module.exports=P(S);var r=require("react/jsx-runtime"),R=p(require("react")),u=require("@radix-ui/react-slot"),m=require("@radix-ui/react-visually-hidden"),s=require("class-variance-authority"),y=p(require("../icons/spinner.js")),v=require("../helpers/index.js");const C=(0,s.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"}}),L=(0,s.cva)("",{variants:{variant:{primary:"ai-stroke-btn-primary-foreground",secondary:"ai-stroke-btn-secondary-foreground",link:"ai-stroke-primary",ghost:"ai-stroke-primary"}}}),c=R.forwardRef(({asChild:e=!1,size:a="base",children:i,variant:o,hoverEffect:t="none",className:g,disabled:x=!1,loading:b=!1,spinner:d,...h},V)=>{const w=e?u.Slot:"button",f=x||b;return(0,r.jsx)(w,{disabled:f,className:(0,v.cn)(C({variant:o,size:a,hoverEffect:t}),{"ai-cursor-not-allowed":f},g),ref:V,...h,children:b?(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:d||(0,r.jsx)(y.default,{className:L({variant:o})})}),(0,r.jsx)(m.VisuallyHidden,{children:i})]}):i})});c.displayName="Button";var M=c;
1
+ "use strict";"use client";var V=Object.create;var n=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var E=(a,e)=>{for(var i in e)n(a,i,{get:e[i],enumerable:!0})},f=(a,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of B(e))!z.call(a,r)&&r!==i&&n(a,r,{get:()=>e[r],enumerable:!(o=w(e,r))||o.enumerable});return a};var c=(a,e,i)=>(i=a!=null?V(k(a)):{},f(e||!a||!a.__esModule?n(i,"default",{value:a,enumerable:!0}):i,a)),H=a=>f(n({},"__esModule",{value:!0}),a);var L={};E(L,{default:()=>C});module.exports=H(L);var t=require("react/jsx-runtime"),N=c(require("react")),u=require("@radix-ui/react-slot"),y=require("@radix-ui/react-visually-hidden"),d=require("class-variance-authority"),m=c(require("../icons/spinner.js")),v=require("../helpers/index.js");const P=(0,d.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",{variants:{variant:{primary:"ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active ",secondary:"ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary 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:""},state:{default:"",disabled:"!ai-cursor-not-allowed !ai-pointer-events-auto",loading:""}},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'},{variant:"primary",state:"loading",class:"ai-bg-btn-primary"},{variant:"secondary",state:"loading",class:"ai-bg-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground"},{variant:"primary",state:"disabled",class:"disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground"},{variant:"secondary",state:"disabled",class:"disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground"}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none",state:"default"}}),R=(0,d.cva)("",{variants:{variant:{primary:"ai-stroke-btn-primary-foreground",secondary:"ai-stroke-btn-secondary-foreground",link:"ai-stroke-primary",ghost:"ai-stroke-primary"}},defaultVariants:{variant:"primary"}}),p=N.forwardRef(({asChild:a=!1,size:e="base",children:i,variant:o,hoverEffect:r="none",className:g,disabled:b=!1,loading:s=!1,spinner:l,...x},h)=>(0,t.jsx)(a?u.Slot:"button",{disabled:b||s,className:(0,v.cn)(P({variant:o,size:e,hoverEffect:r,state:s?"loading":b?"disabled":"default"}),g),ref:h,...x,children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:i}),(0,t.jsx)("span",{className:"ai-absolute",children:l||(0,t.jsx)(m.default,{className:R({variant:o})})}),(0,t.jsx)(y.VisuallyHidden,{children:i})]}):i}));p.displayName="Button";var C=p;
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 '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\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'ai-stroke-btn-primary-foreground',\n secondary: 'ai-stroke-btn-secondary-foreground',\n link: 'ai-stroke-primary',\n ghost: 'ai-stroke-primary',\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 /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\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 spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(\n buttonVariants({ variant, size, hoverEffect }),\n {\n 'ai-cursor-not-allowed': isInactive,\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 spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\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,GAmHU,IAAAI,EAAA,6BAjHVC,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,EAEMC,KAAqB,OAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,QAAS,mCACT,UAAW,qCACX,KAAM,oBACN,MAAO,mBACT,CACF,CACF,CAAC,EAeKC,EAASR,EAAM,WACnB,CACE,CACE,QAAAS,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,EAAOX,EAAU,OAAO,SACxBY,EAAaN,GAAYC,EAE/B,SACE,OAACI,EAAA,CACC,SAAUC,EACV,aAAW,MACTf,EAAe,CAAE,QAAAM,EAAS,KAAAF,EAAM,YAAAG,CAAY,CAAC,EAC7C,CACE,wBAAyBQ,CAC3B,EACAP,CACF,EACA,IAAKK,EACJ,GAAGD,EAEH,SAAAF,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,cACb,SAAAM,MAGC,OAAC,EAAAK,QAAA,CACC,UAAWf,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAEJ,CACF,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
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", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Comp", "isInactive", "Spinner"]
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',\n {\n variants: {\n variant: {\n primary: 'ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active ',\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 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 state: {\n default: '',\n disabled: '!ai-cursor-not-allowed !ai-pointer-events-auto',\n loading: '',\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 variant: 'primary',\n state: 'loading',\n class: 'ai-bg-btn-primary',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'ai-bg-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class: 'disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class: 'disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'ai-stroke-btn-primary-foreground',\n secondary: 'ai-stroke-btn-secondary-foreground',\n link: 'ai-stroke-primary',\n ghost: 'ai-stroke-primary',\n },\n },\n defaultVariants: {\n variant: 'primary',\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 /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\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 spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n const state = loading ? 'loading' : disabled ? 'disabled' : 'default'\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(buttonVariants({ variant, size, hoverEffect, state }), className)}\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 spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\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,GA2IU,IAAAI,EAAA,6BAzIVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAKnB,MAAMC,KAAiB,OACrB,gTACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,mFACT,UACE,gKACF,KAAM,2DACN,MAAO,8DACT,EACA,KAAM,CACJ,GAAI,wCACJ,KAAM,yCACN,GAAI,iCACJ,KAAM,4BACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,EACA,MAAO,CACL,QAAS,GACT,SAAU,iDACV,QAAS,EACX,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,+VACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mWACJ,EACA,CACE,QAAS,UACT,MAAO,UACP,MAAO,mBACT,EACA,CACE,QAAS,YACT,MAAO,UACP,MACE,8GACJ,EACA,CACE,QAAS,UACT,MAAO,WACP,MAAO,sFACT,EACA,CACE,QAAS,YACT,MAAO,WACP,MAAO,0FACT,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,OACb,MAAO,SACT,CACF,CACF,EAEMC,KAAqB,OAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,QAAS,mCACT,UAAW,qCACX,KAAM,oBACN,MAAO,mBACT,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CAAC,EAeKC,EAASR,EAAM,WACnB,CACE,CACE,QAAAS,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,OAOE,OALWV,EAAU,OAAO,SAK3B,CACC,SALeM,GAAYC,EAM3B,aAAW,MAAGV,EAAe,CAAE,QAAAM,EAAS,KAAAF,EAAM,YAAAG,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,SAKS,CAAC,EAAGD,CAAS,EAC9E,IAAKK,EACJ,GAAGD,EAEH,SAAAF,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,cACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWb,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
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", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Spinner"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var V=Object.create;var o=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},m=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w(e))!z.call(t,i)&&i!==a&&o(t,i,{get:()=>e[i],enumerable:!(n=b(e,i))||n.enumerable});return t};var N=(t,e,a)=>(a=t!=null?V(C(t)):{},m(e||!t||!t.__esModule?o(a,"default",{value:t,enumerable:!0}):a,t)),S=t=>m(o({},"__esModule",{value:!0}),t);var v={};E(v,{Heading:()=>l});module.exports=S(v);var r=require("react/jsx-runtime"),d=require("../helpers/index.js"),p=require("@radix-ui/react-slot"),f=require("class-variance-authority"),x=N(require("react"));const T=(0,f.cva)("",{variants:{size:{none:"",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"},align:{left:"ai-text-left",center:"ai-text-center",right:"ai-text-right"}},defaultVariants:{size:"none",weights:"normal",align:"left"}}),l=x.default.forwardRef((t,e)=>{const{children:a,className:n,size:i,align:c="left",weights:P,asChild:u,as:y="h1",color:s,html:h,...H}=t,g=h?{dangerouslySetInnerHTML:{__html:h}}:null,R=s?{style:{color:s}}:null;return(0,r.jsx)(p.Slot,{...H,ref:e,className:(0,d.cn)(T({size:i,weights:P,align:c}),n),...g,...R,children:u?a:(0,r.jsx)(y,{children:g?null:a})})});l.displayName="Heading";
1
+ "use strict";var V=Object.create;var o=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},g=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w(e))!z.call(t,i)&&i!==a&&o(t,i,{get:()=>e[i],enumerable:!(n=b(e,i))||n.enumerable});return t};var N=(t,e,a)=>(a=t!=null?V(C(t)):{},g(e||!t||!t.__esModule?o(a,"default",{value:t,enumerable:!0}):a,t)),S=t=>g(o({},"__esModule",{value:!0}),t);var v={};E(v,{Heading:()=>l});module.exports=S(v);var r=require("react/jsx-runtime"),d=require("../helpers/index.js"),p=require("@radix-ui/react-slot"),x=require("class-variance-authority"),f=N(require("react"));const T=(0,x.cva)("",{variants:{size:{none:"",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"},align:{left:"ai-text-left",center:"ai-text-center",right:"ai-text-right"}},defaultVariants:{size:"none",weights:"normal"}}),l=f.default.forwardRef((t,e)=>{const{children:a,className:n,size:i,align:c,weights:P,asChild:u,as:y="h1",color:s,html:h,...H}=t,m=h?{dangerouslySetInnerHTML:{__html:h}}:null,R=s?{style:{color:s}}:null;return(0,r.jsx)(p.Slot,{...H,ref:e,className:(0,d.cn)(T({size:i,weights:P,align:c}),n),...m,...R,children:u?a:(0,r.jsx)(y,{children:m?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 { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('', {\n variants: {\n size: {\n none: '',\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 align: {\n left: 'ai-text-left',\n center: 'ai-text-center',\n right: 'ai-text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weights: 'normal',\n align: 'left',\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'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const {\n children,\n className,\n size,\n align = 'left',\n weights,\n asChild,\n as: Tag = 'h1',\n color,\n html,\n ...headingProps\n } = 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 align,\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,GAwF4B,IAAAI,EAAA,6BAxF5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,GAAI,CAC9B,SAAU,CACR,KAAM,CACJ,KAAM,GACN,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,EACA,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,eACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,SACT,MAAO,MACT,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CACJ,SAAAC,EACA,UAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,OACR,QAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,KACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EACEY,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,IAAKV,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,QAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
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 none: '',\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 align: {\n left: 'ai-text-left',\n center: 'ai-text-center',\n right: 'ai-text-right',\n },\n },\n defaultVariants: {\n size: 'none',\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'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size, align, 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 align,\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,GA4E4B,IAAAI,EAAA,6BA5E5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,GAAI,CAC9B,SAAU,CACR,KAAM,CACJ,KAAM,GACN,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,EACA,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,eACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,QACX,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAM,MAAAC,EAAO,QAAAC,EAAS,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EACvGY,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,IAAKV,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,QAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
6
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", "align", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -9,4 +9,5 @@ export * from './radio.js';
9
9
  export * from './dialog.js';
10
10
  export * from './text.js';
11
11
  export * from './heading.js';
12
+ export { default as Picture } from './picture.js';
12
13
  export { default as Theme } from './theme.js';
@@ -1,2 +1,2 @@
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"));
1
+ "use strict";var n=Object.create;var p=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var f in t)p(e,f,{get:t[f],enumerable:!0})},a=(e,t,f,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let x of b(t))!i.call(e,x)&&x!==f&&p(e,x,{get:()=>t[x],enumerable:!(u=B(t,x))||u.enumerable});return e},r=(e,t,f)=>(a(e,t,"default"),f&&a(f,t,"default")),m=(e,t,f)=>(f=e!=null?n(g(e)):{},a(t||!e||!e.__esModule?p(f,"default",{value:e,enumerable:!0}):f,e)),P=e=>a(p({},"__esModule",{value:!0}),e);var o={};C(o,{Badge:()=>l.default,Button:()=>d.default,Checkbox:()=>s.default,Picture:()=>h.default,Skeleton:()=>c.default,Theme:()=>k.default});module.exports=P(o);var d=m(require("./button.js")),l=m(require("./badge.js"));r(o,require("./input.js"),module.exports);var s=m(require("./checkbox.js")),c=m(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 h=m(require("./picture.js")),k=m(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 * 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
- "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "__reExport", "import_checkbox", "import_skeleton", "import_theme"]
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 Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\n"],
5
+ "mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mJAAAE,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,EAAmC,2BACnCC,EAAiC",
6
+ "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "__reExport", "import_checkbox", "import_skeleton", "import_picture", "import_theme"]
7
7
  }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {
3
+ /** picture 内部img 标签的类名 */
4
+ imgClassName?: string;
5
+ /** 图片url , 支持传入不同分辨率下的图片,比如,格式 "url1 1920, url2 1080, url3 767" */
6
+ source?: string;
7
+ /** 图片质量 */
8
+ quality?: number;
9
+ /** 响应式图片,对应picture 下source 的max-width */
10
+ deviceSizes?: number[];
11
+ }
12
+ declare const Picture: ({ imgClassName, source, quality, deviceSizes, ...rest }: PictureProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Picture;
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var f=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var c in t)f(e,c,{get:t[c],enumerable:!0})},E=(e,t,c,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of M(t))!_.call(e,n)&&n!==c&&f(e,n,{get:()=>t[n],enumerable:!(p=I(t,n))||p.enumerable});return e};var S=e=>E(f({},"__esModule",{value:!0}),e);var F={};x(F,{default:()=>y});module.exports=S(F);var g=require("react/jsx-runtime"),u=require("react");const $=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],A=3960,P=3980,L=e=>$.some(t=>e==t),N=(e="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(e),k=({imgClassName:e="",source:t="",quality:c=2,deviceSizes:p=[375,767,1023,1279,1439,1539,1919],...n})=>{const m=(0,u.useCallback)(({src:s,width:i})=>{const o=i;try{const r=new URL(s);if(!L(r.hostname))return s;const a=r.pathname.split("/").pop()||"";if(N(a)&&!/_[0-9]{2,4}x/.test(s)){const[h,l]=a.split(".");return`${r.origin}${r.pathname.replace(a,`${h}_${o<A?o:P}x.${l}`)}`}}catch{return s}},[]),d=(0,u.useCallback)(({srcArr:s,width:i})=>{const o=i*c,r=m({src:s[0][0],width:o});let a;return s.forEach(l=>{var b=l[0];l.length>1&&parseInt(l[1],10)>=i&&(a=m({src:b,width:o}))}),(0,g.jsx)("source",{srcSet:a||r,media:`(max-width: ${i}px)`},i)},[m,c]),w=(0,u.useMemo)(()=>{if(typeof t!="string"||!t)return[];let s;try{s=t.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(r=>r.split(" ").filter(Boolean))}catch(r){return console.log(r),[]}const i=p.map(r=>d({srcArr:s,width:r})),o=m({src:s[0][0],width:1920*c});return i.push((0,g.jsx)("img",{src:o,className:`ai-w-full ${e}`,...n},"default")),i},[p,e,m,c,n,t,d]);return(0,g.jsxs)("picture",{className:`ai-block ai-overflow-hidden ${n.className}`,children:[w,n.children]})};var y=k;
2
+ //# sourceMappingURL=picture.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/picture.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\nconst Picture = ({\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 767, 1023, 1279, 1439, 1539, 1919],\n ...rest\n}: PictureProps) => {\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n try {\n const parsedUrl = new URL(src)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return src\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName) && !/_[0-9]{2,4}x/.test(src)) {\n const [name, extension] = fileName.split('.')\n return `${parsedUrl.origin}${parsedUrl.pathname.replace(\n fileName,\n `${name}_${size < MAX_SIZE ? size : FIXED_MAX_SIZE}x.${extension}`\n )}`\n }\n } catch (error) {\n return src\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const def = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n let result\n srcArr.forEach(ele => {\n var img = ele[0]\n if (ele.length > 1 && parseInt(ele[1], 10) >= width) {\n result = imgSrcSetsize({ src: img, width: computedWidth })\n }\n })\n const srcset = result || def\n return <source key={width} srcSet={srcset} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n let srcArr\n try {\n srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n } catch (error) {\n console.log(error)\n return []\n }\n const sourceList = deviceSizes.map(width => {\n return sourceSrcSet({ srcArr, width })\n })\n\n const img = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n sourceList.push(<img key=\"default\" src={img} className={`ai-w-full ${imgClassName}`} {...rest} />)\n return sourceList\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, rest, source, sourceSrcSet])\n\n return (\n <picture className={`ai-block ai-overflow-hidden ${rest.className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n}\nexport default Picture\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+Da,IAAAI,EAAA,6BA9DbC,EAA4C,iBAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAiBC,GACdJ,EAAgC,KAAKK,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAEzGC,EAAU,CAAC,CACf,aAAAC,EAAe,GACf,OAAAC,EAAS,GACT,QAAAC,EAAU,EACV,YAAAC,EAAc,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,EACrD,GAAGC,CACL,IAAoB,CAClB,MAAMC,KAAgB,eAAY,CAAC,CAAE,IAAAC,EAAK,MAAAC,CAAM,IAAsC,CACpF,MAAMC,EAAOD,EACb,GAAI,CACF,MAAME,EAAY,IAAI,IAAIH,CAAG,EAC7B,GAAI,CAACZ,EAAce,EAAU,QAAQ,EACnC,OAAOH,EAET,MAAMR,EAAWW,EAAU,SAAS,MAAM,GAAG,EAAE,IAAI,GAAK,GACxD,GAAIZ,EAAsBC,CAAQ,GAAK,CAAC,eAAe,KAAKQ,CAAG,EAAG,CAChE,KAAM,CAACI,EAAMC,CAAS,EAAIb,EAAS,MAAM,GAAG,EAC5C,MAAO,GAAGW,EAAU,MAAM,GAAGA,EAAU,SAAS,QAC9CX,EACA,GAAGY,CAAI,IAAIF,EAAOhB,EAAWgB,EAAOf,CAAc,KAAKkB,CAAS,EAClE,CAAC,EACH,CACF,MAAgB,CACd,OAAOL,CACT,CACF,EAAG,CAAC,CAAC,EAECM,KAAe,eACnB,CAAC,CAAE,OAAAC,EAAQ,MAAAN,CAAM,IAA6C,CAC5D,MAAMO,EAAgBP,EAAQL,EACxBa,EAAMV,EAAc,CAAE,IAAKQ,EAAO,CAAC,EAAE,CAAC,EAAG,MAAOC,CAAc,CAAC,EACrE,IAAIE,EACJ,OAAAH,EAAO,QAAQI,GAAO,CACpB,IAAIC,EAAMD,EAAI,CAAC,EACXA,EAAI,OAAS,GAAK,SAASA,EAAI,CAAC,EAAG,EAAE,GAAKV,IAC5CS,EAASX,EAAc,CAAE,IAAKa,EAAK,MAAOJ,CAAc,CAAC,EAE7D,CAAC,KAEM,OAAC,UAAmB,OADZE,GAAUD,EACkB,MAAO,eAAeR,CAAK,OAAlDA,CAAyD,CAC/E,EACA,CAACF,EAAeH,CAAO,CACzB,EAEMiB,KAAa,WAAQ,IAAM,CAC/B,GAAI,OAAOlB,GAAW,UAAY,CAACA,EAAQ,MAAO,CAAC,EACnD,IAAIY,EACJ,GAAI,CACFA,EAASZ,EACN,QAAQ,UAAW,EAAE,EACrB,QAAQ,SAAU,GAAG,EACrB,MAAM,GAAG,EACT,IAAImB,GAAQA,EAAK,MAAM,GAAG,EAAE,OAAO,OAAO,CAAC,CAChD,OAASC,EAAO,CACd,eAAQ,IAAIA,CAAK,EACV,CAAC,CACV,CACA,MAAMF,EAAahB,EAAY,IAAII,GAC1BK,EAAa,CAAE,OAAAC,EAAQ,MAAAN,CAAM,CAAC,CACtC,EAEKW,EAAMb,EAAc,CAAE,IAAKQ,EAAO,CAAC,EAAE,CAAC,EAAG,MAAO,KAAOX,CAAQ,CAAC,EAEtE,OAAAiB,EAAW,QAAK,OAAC,OAAkB,IAAKD,EAAK,UAAW,aAAalB,CAAY,GAAK,GAAGI,GAAhE,SAAsE,CAAE,EAC1Fe,CACT,EAAG,CAAChB,EAAaH,EAAcK,EAAeH,EAASE,EAAMH,EAAQW,CAAY,CAAC,EAElF,SACE,QAAC,WAAQ,UAAW,+BAA+BR,EAAK,SAAS,GAC9D,UAAAe,EACAf,EAAK,UACR,CAEJ,EACA,IAAOjB,EAAQY",
6
+ "names": ["picture_exports", "__export", "picture_default", "__toCommonJS", "import_jsx_runtime", "import_react", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "Picture", "imgClassName", "source", "quality", "deviceSizes", "rest", "imgSrcSetsize", "src", "width", "size", "parsedUrl", "name", "extension", "sourceSrcSet", "srcArr", "computedWidth", "def", "result", "ele", "img", "sourceList", "item", "error"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.create;var n=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var V=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of b(e))!S.call(t,s)&&s!==o&&n(t,s,{get:()=>e[s],enumerable:!(a=C(e,s))||a.enumerable});return t};var W=(t,e,o)=>(o=t!=null?v(R(t)):{},x(e||!t||!t.__esModule?n(o,"default",{value:t,enumerable:!0}):o,t)),w=t=>x(n({},"__esModule",{value:!0}),t);var L={};V(L,{Text:()=>r});module.exports=w(L);var p=require("react/jsx-runtime"),z=W(require("react")),P=require("@radix-ui/react-slot"),d=require("../helpers/index.js"),f=require("class-variance-authority");const E=(0,f.cva)("",{variants:{size:{none:"",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"},align:{left:"ai-text-left",center:"ai-text-center",right:"ai-text-right"}},defaultVariants:{size:"none",weights:"normal",align:"left"}}),r=z.forwardRef((t,e)=>{const{children:o,size:a="none",weights:s,align:h="left",className:T,asChild:c,as:g="span",color:i,html:l,...y}=t,m=l?{dangerouslySetInnerHTML:{__html:l}}:null,u=i?{style:{color:i}}:null;return(0,p.jsx)(P.Slot,{...y,ref:e,className:(0,d.cn)(E({size:a,weights:s,align:h}),T),...m,...u,children:c?o:(0,p.jsx)(g,{children:m?null:o})})});r.displayName="Text";
1
+ "use strict";var v=Object.create;var n=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var V=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of b(e))!S.call(t,s)&&s!==o&&n(t,s,{get:()=>e[s],enumerable:!(a=C(e,s))||a.enumerable});return t};var W=(t,e,o)=>(o=t!=null?v(R(t)):{},x(e||!t||!t.__esModule?n(o,"default",{value:t,enumerable:!0}):o,t)),w=t=>x(n({},"__esModule",{value:!0}),t);var L={};V(L,{Text:()=>r});module.exports=w(L);var p=require("react/jsx-runtime"),z=W(require("react")),P=require("@radix-ui/react-slot"),d=require("../helpers/index.js"),h=require("class-variance-authority");const E=(0,h.cva)("",{variants:{size:{none:"",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"},align:{left:"ai-text-left",center:"ai-text-center",right:"ai-text-right"}},defaultVariants:{size:"none",weights:"normal"}}),r=z.forwardRef((t,e)=>{const{children:o,size:a="none",weights:s,align:T,className:f,asChild:c,as:g="span",color:i,html:l,...y}=t,m=l?{dangerouslySetInnerHTML:{__html:l}}:null,u=i?{style:{color:i}}:null;return(0,p.jsx)(P.Slot,{...y,ref:e,className:(0,d.cn)(E({size:a,weights:s,align:T}),f),...m,...u,children:c?o:(0,p.jsx)(g,{children:m?null:o})})});r.displayName="Text";
2
2
  //# sourceMappingURL=text.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/text.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('', {\n variants: {\n size: {\n none: '',\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 align: {\n left: 'ai-text-left',\n center: 'ai-text-center',\n right: 'ai-text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weights: 'normal',\n align: 'left',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>\n\ninterface CommonTextProps extends VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span'\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string\n}\n\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n size = 'none',\n weights,\n align = 'left',\n className,\n asChild,\n as: Tag = 'span',\n color,\n html,\n ...textProps\n } = props\n\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\n return (\n <Slot\n {...textProps}\n ref={forwardedRef}\n className={cn(\n textVariants({\n size,\n weights,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\nText.displayName = 'Text'\n\nexport { Text }\nexport type { TextProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,IAAA,eAAAC,EAAAH,GAkG4B,IAAAI,EAAA,6BAlG5BC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAmB,+BACnBC,EAAuC,oCAGvC,MAAMC,KAAe,OAAI,GAAI,CAC3B,SAAU,CACR,KAAM,CACJ,KAAM,GACN,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,EACA,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,eACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,SACT,MAAO,MACT,CACF,CAAC,EAkBKP,EAAOG,EAAM,WAAmC,CAACK,EAAOC,IAAiB,CAC7E,KAAM,CACJ,SAAAC,EACA,KAAAC,EAAO,OACP,QAAAC,EACA,MAAAC,EAAQ,OACR,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KAEJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,QAAAC,EACA,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDV,EAAK,YAAc",
4
+ "sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('', {\n variants: {\n size: {\n none: '',\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 align: {\n left: 'ai-text-left',\n center: 'ai-text-center',\n right: 'ai-text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weights: 'normal',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>\n\ninterface CommonTextProps extends VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span'\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string\n}\n\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n size = 'none',\n weights,\n align,\n className,\n asChild,\n as: Tag = 'span',\n color,\n html,\n ...textProps\n } = props\n\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\n return (\n <Slot\n {...textProps}\n ref={forwardedRef}\n className={cn(\n textVariants({\n size,\n weights,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\nText.displayName = 'Text'\n\nexport { Text }\nexport type { TextProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,IAAA,eAAAC,EAAAH,GAiG4B,IAAAI,EAAA,6BAjG5BC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAmB,+BACnBC,EAAuC,oCAGvC,MAAMC,KAAe,OAAI,GAAI,CAC3B,SAAU,CACR,KAAM,CACJ,KAAM,GACN,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,EACA,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,eACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,QACX,CACF,CAAC,EAkBKP,EAAOG,EAAM,WAAmC,CAACK,EAAOC,IAAiB,CAC7E,KAAM,CACJ,SAAAC,EACA,KAAAC,EAAO,OACP,QAAAC,EACA,MAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KAEJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,QAAAC,EACA,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDV,EAAK,YAAc",
6
6
  "names": ["text_exports", "__export", "Text", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_helpers", "import_class_variance_authority", "textVariants", "props", "forwardedRef", "children", "size", "weights", "align", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -1 +1,2 @@
1
1
  export { cn } from './utils.js';
2
+ export { noop } from './utils.js';
@@ -1,2 +1,2 @@
1
- "use strict";var f=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var a=(r,o)=>{for(var e in o)f(r,e,{get:o[e],enumerable:!0})},b=(r,o,e,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of t(o))!x.call(r,c)&&c!==e&&f(r,c,{get:()=>o[c],enumerable:!(m=p(o,c))||m.enumerable});return r};var d=r=>b(f({},"__esModule",{value:!0}),r);var g={};a(g,{cn:()=>n.cn});module.exports=d(g);var n=require("./utils.js");
1
+ "use strict";var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var b=(r,o)=>{for(var e in o)f(r,e,{get:o[e],enumerable:!0})},d=(r,o,e,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of c(o))!a.call(r,p)&&p!==e&&f(r,p,{get:()=>o[p],enumerable:!(m=x(o,p))||m.enumerable});return r};var g=r=>d(f({},"__esModule",{value:!0}),r);var h={};b(h,{cn:()=>n.cn,noop:()=>t.noop});module.exports=g(h);var n=require("./utils.js"),t=require("./utils.js");
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/index.ts"],
4
- "sourcesContent": ["export { cn } from './utils.js'\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAAF,GAAA,IAAAG,EAAmB",
4
+ "sourcesContent": ["export { cn } from './utils.js'\nexport { noop } from './utils.js'\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8CAAAE,EAAAF,GAAA,IAAAG,EAAmB,sBACnBA,EAAqB",
6
6
  "names": ["helpers_exports", "__export", "__toCommonJS", "import_utils"]
7
7
  }
@@ -1,2 +1,3 @@
1
1
  import { type ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
+ export declare function noop(): any;
@@ -1,2 +1,2 @@
1
- "use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var o in e)l(r,o,{get:e[o],enumerable:!0})},f=(r,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!u.call(r,t)&&t!==o&&l(r,t,{get:()=>e[t],enumerable:!(s=n(e,t))||s.enumerable});return r};var i=r=>f(l({},"__esModule",{value:!0}),r);var C={};c(C,{cn:()=>x});module.exports=i(C);var a=require("clsx"),m=require("tailwind-merge");function x(...r){return(0,m.twMerge)((0,a.clsx)(r))}
1
+ "use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(o,r)=>{for(var e in r)n(o,e,{get:r[e],enumerable:!0})},i=(o,r,e,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of u(r))!c.call(o,t)&&t!==e&&n(o,t,{get:()=>r[t],enumerable:!(p=s(r,t))||p.enumerable});return o};var m=o=>i(n({},"__esModule",{value:!0}),o);var C={};f(C,{cn:()=>x,noop:()=>y});module.exports=m(C);var a=require("clsx"),l=require("tailwind-merge");function x(...o){return(0,l.twMerge)((0,a.clsx)(o))}function y(){}
2
2
  //# sourceMappingURL=utils.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/utils.ts"],
4
- "sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,QAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASH,KAAMI,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B",
6
- "names": ["utils_exports", "__export", "cn", "__toCommonJS", "import_clsx", "import_tailwind_merge", "inputs"]
4
+ "sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function noop(): any {}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,QAAAE,EAAA,SAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASJ,KAAMK,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CAEO,SAASJ,GAAY,CAAC",
6
+ "names": ["utils_exports", "__export", "cn", "noop", "__toCommonJS", "import_clsx", "import_tailwind_merge", "inputs"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
- import { Badge } from '../components/index';
2
+ import { Badge } from '../components/index.js';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: typeof Badge;
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var i in e)n(t,i,{get:e[i],enumerable:!0})},y=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!l.call(t,r)&&r!==i&&n(t,r,{get:()=>e[r],enumerable:!(s=d(e,r))||s.enumerable});return t};var f=t=>y(n({},"__esModule",{value:!0}),t);var B={};p(B,{Default:()=>v,Examples:()=>g,default:()=>m});module.exports=f(B);var a=require("react/jsx-runtime"),o=require("../components/index"),x=require("react");const u={title:"Components/Badge",component:o.Badge,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["default","destructive","outline","secondary"]}},args:{variant:"default",children:"New"}};var m=u;const v={},g={render(){return(0,a.jsxs)("div",{className:"ai-flex ai-flex-col ai-space-y-4",children:[(0,a.jsx)(o.Badge,{variant:"default",children:"Default"}),(0,a.jsx)(o.Badge,{variant:"secondary",children:"Secondary"}),(0,a.jsx)(o.Badge,{variant:"destructive",children:"Destructive"}),(0,a.jsx)(o.Badge,{variant:"outline",children:"Outline"})]})}};
1
+ "use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var i in e)n(t,i,{get:e[i],enumerable:!0})},y=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!l.call(t,r)&&r!==i&&n(t,r,{get:()=>e[r],enumerable:!(s=d(e,r))||s.enumerable});return t};var f=t=>y(n({},"__esModule",{value:!0}),t);var B={};p(B,{Default:()=>v,Examples:()=>g,default:()=>m});module.exports=f(B);var a=require("react/jsx-runtime"),o=require("../components/index.js"),x=require("react");const u={title:"Components/Badge",component:o.Badge,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["default","destructive","outline","secondary"]}},args:{variant:"default",children:"New"}};var m=u;const v={},g={render(){return(0,a.jsxs)("div",{className:"ai-flex ai-flex-col ai-space-y-4",children:[(0,a.jsx)(o.Badge,{variant:"default",children:"Default"}),(0,a.jsx)(o.Badge,{variant:"secondary",children:"Secondary"}),(0,a.jsx)(o.Badge,{variant:"destructive",children:"Destructive"}),(0,a.jsx)(o.Badge,{variant:"outline",children:"Outline"})]})}};
2
2
  //# sourceMappingURL=badge.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/badge.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Badge } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Badge',\n component: Badge,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['default', 'destructive', 'outline', 'secondary'],\n },\n },\n args: {\n variant: 'default',\n children: 'New',\n },\n} satisfies Meta<typeof Badge>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {}\n\nexport const Examples: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col ai-space-y-4\">\n <Badge variant=\"default\">Default</Badge>\n <Badge variant=\"secondary\">Secondary</Badge>\n <Badge variant=\"destructive\">Destructive</Badge>\n <Badge variant=\"outline\">Outline</Badge>\n </div>\n )\n },\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GAmCM,IAAAM,EAAA,6BAjCNC,EAAsB,+BACtBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAW,QACX,WAAY,CACV,OAAQ,UACV,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,cAAe,UAAW,WAAW,CAC5D,CACF,EACA,KAAM,CACJ,QAAS,UACT,SAAU,KACZ,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMP,EAAiB,CAAC,EAElBC,EAAkB,CAC7B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,mCACb,oBAAC,SAAM,QAAQ,UAAU,mBAAO,KAChC,OAAC,SAAM,QAAQ,YAAY,qBAAS,KACpC,OAAC,SAAM,QAAQ,cAAc,uBAAW,KACxC,OAAC,SAAM,QAAQ,UAAU,mBAAO,GAClC,CAEJ,CACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Badge } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Badge',\n component: Badge,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['default', 'destructive', 'outline', 'secondary'],\n },\n },\n args: {\n variant: 'default',\n children: 'New',\n },\n} satisfies Meta<typeof Badge>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {}\n\nexport const Examples: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col ai-space-y-4\">\n <Badge variant=\"default\">Default</Badge>\n <Badge variant=\"secondary\">Secondary</Badge>\n <Badge variant=\"destructive\">Destructive</Badge>\n <Badge variant=\"outline\">Outline</Badge>\n </div>\n )\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GAmCM,IAAAM,EAAA,6BAjCNC,EAAsB,kCACtBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAW,QACX,WAAY,CACV,OAAQ,UACV,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,cAAe,UAAW,WAAW,CAC5D,CACF,EACA,KAAM,CACJ,QAAS,UACT,SAAU,KACZ,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMP,EAAiB,CAAC,EAElBC,EAAkB,CAC7B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,mCACb,oBAAC,SAAM,QAAQ,UAAU,mBAAO,KAChC,OAAC,SAAM,QAAQ,YAAY,qBAAS,KACpC,OAAC,SAAM,QAAQ,cAAc,uBAAW,KACxC,OAAC,SAAM,QAAQ,UAAU,mBAAO,GAClC,CAEJ,CACF",
6
6
  "names": ["badge_stories_exports", "__export", "Default", "Examples", "badge_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
7
  }
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react';
2
2
  import React from 'react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/button").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
5
+ component: React.ForwardRefExoticComponent<import("../components/button.js").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(o,t)=>{for(var a in t)n(o,a,{get:t[a],enumerable:!0})},m=(o,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!y.call(o,r)&&r!==a&&n(o,r,{get:()=>t[r],enumerable:!(s=c(t,r))||s.enumerable});return o};var g=o=>m(n({},"__esModule",{value:!0}),o);var k={};d(k,{Aschild:()=>z,Link:()=>v,Primary:()=>S,Secondary:()=>u,Spinner:()=>b,WithIcon:()=>x,default:()=>f});module.exports=g(k);var e=require("react/jsx-runtime"),i=require("@storybook/icons"),l=require("../components/index"),C=require("react");const h={title:"Components/Button",component:l.Button,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["primary","secondary","link","ghost"]},size:{control:{type:"select"},options:["sm","base","lg","icon"]},hoverEffect:{description:"hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548",control:{type:"select"},options:["none","slide"]}},args:{variant:"primary",size:"base",children:"Button",asChild:!1,disabled:!1,loading:!1,hoverEffect:"none"}};var f=h;const S={args:{size:"lg",children:"Primary"}},u={args:{size:"lg",variant:"secondary",children:"Secondary"}},v={args:{size:"lg",variant:"link",children:"Link"}},x={args:{size:"lg",children:(0,e.jsxs)(e.Fragment,{children:["WithIcon ",(0,e.jsx)(i.SearchIcon,{className:"ai-ml-2"})]})}},z={args:{size:"lg",asChild:!0,children:(0,e.jsx)("a",{href:"http://example.com",children:"as a a tag"})}},b={args:{size:"lg",loading:!0,spinner:(0,e.jsx)("span",{className:" ai-text-neutral-900 ai-animate-pulse ai-font-bold",children:"loading..."})}};
1
+ "use strict";var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(o,t)=>{for(var a in t)n(o,a,{get:t[a],enumerable:!0})},m=(o,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!y.call(o,r)&&r!==a&&n(o,r,{get:()=>t[r],enumerable:!(s=c(t,r))||s.enumerable});return o};var g=o=>m(n({},"__esModule",{value:!0}),o);var k={};d(k,{Aschild:()=>z,Link:()=>v,Primary:()=>S,Secondary:()=>u,Spinner:()=>b,WithIcon:()=>x,default:()=>f});module.exports=g(k);var e=require("react/jsx-runtime"),i=require("@storybook/icons"),l=require("../components/index.js"),C=require("react");const h={title:"Components/Button",component:l.Button,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["primary","secondary","link","ghost"]},size:{control:{type:"select"},options:["sm","base","lg","icon"]},hoverEffect:{description:"hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548",control:{type:"select"},options:["none","slide"]}},args:{variant:"primary",size:"base",children:"Button",asChild:!1,disabled:!1,loading:!1,hoverEffect:"none"}};var f=h;const S={args:{size:"lg",children:"Primary"}},u={args:{size:"lg",variant:"secondary",children:"Secondary"}},v={args:{size:"lg",variant:"link",children:"Link"}},x={args:{size:"lg",children:(0,e.jsxs)(e.Fragment,{children:["WithIcon ",(0,e.jsx)(i.SearchIcon,{className:"ai-ml-2"})]})}},z={args:{size:"lg",asChild:!0,children:(0,e.jsx)("a",{href:"http://example.com",children:"as a a tag"})}},b={args:{size:"lg",loading:!0,spinner:(0,e.jsx)("span",{className:" ai-text-neutral-900 ai-animate-pulse ai-font-bold",children:"loading..."})}};
2
2
  //# sourceMappingURL=button.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/button.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { SearchIcon } from '@storybook/icons'\n\nimport { Button } from '../components/index'\nimport React from 'react'\n\n// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export\nconst meta = {\n // \u540C\u65F6\u5B9A\u4E49\u4E86\u9875\u9762\u5DE6\u4FA7\u83DC\u5355\n title: 'Components/Button',\n component: Button,\n parameters: {\n // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout\n layout: 'centered',\n },\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n // More on argTypes: https://storybook.js.org/docs/api/argtypes\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['primary', 'secondary', 'link', 'ghost'],\n },\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg', 'icon'],\n },\n hoverEffect: {\n description: 'hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548',\n control: {\n type: 'select',\n },\n options: ['none', 'slide'],\n },\n },\n args: {\n variant: 'primary',\n size: 'base',\n children: 'Button',\n asChild: false,\n disabled: false,\n loading: false,\n hoverEffect: 'none',\n },\n} satisfies Meta<typeof Button>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\n// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args\n// args \u4F1A\u4F5C\u4E3A props \u4F20\u9012\u7ED9\u7EC4\u4EF6\n// Story\u7684\u540D\u4F1A\u4F5C\u4E3A\u83DC\u5355\u7684\u540D\u79F0 \u81EA\u52A8\u9996\u5B57\u6BCD\u5927\u5199\u5E76\u6309\u7167\u5927\u5199\u5B57\u6BCD\u62C6\u5206 UseAsButton => Use As Button\n\nexport const Primary: Story = {\n args: {\n size: 'lg',\n children: 'Primary',\n },\n}\n\nexport const Secondary: Story = {\n args: {\n size: 'lg',\n variant: 'secondary',\n children: 'Secondary',\n },\n}\n\nexport const Link: Story = {\n args: {\n size: 'lg',\n variant: 'link',\n children: 'Link',\n },\n}\n\nexport const WithIcon: Story = {\n args: {\n size: 'lg',\n children: (\n <>\n WithIcon <SearchIcon className=\"ai-ml-2\" />\n </>\n ),\n },\n}\n\nexport const Aschild: Story = {\n args: {\n size: 'lg',\n asChild: true,\n children: <a href=\"http://example.com\">as a a tag</a>,\n },\n}\n\nexport const Spinner: Story = {\n args: {\n size: 'lg',\n loading: true,\n spinner: <span className=\" ai-text-neutral-900 ai-animate-pulse ai-font-bold\">loading...</span>,\n },\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,YAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAT,GAoFM,IAAAU,EAAA,6BAnFNC,EAA2B,4BAE3BC,EAAuB,+BACvBC,EAAkB,iBAGlB,MAAMC,EAAO,CAEX,MAAO,oBACP,UAAW,SACX,WAAY,CAEV,OAAQ,UACV,EAEA,KAAM,CAAC,UAAU,EAEjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,YAAa,OAAQ,OAAO,CACnD,EACA,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,KAAM,MAAM,CACtC,EACA,YAAa,CACX,YAAa,mIACb,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,OAAO,CAC3B,CACF,EACA,KAAM,CACJ,QAAS,UACT,KAAM,OACN,SAAU,SACV,QAAS,GACT,SAAU,GACV,QAAS,GACT,YAAa,MACf,CACF,EAEA,IAAON,EAAQM,EAOR,MAAMV,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,SAAU,SACZ,CACF,EAEaC,EAAmB,CAC9B,KAAM,CACJ,KAAM,KACN,QAAS,YACT,SAAU,WACZ,CACF,EAEaF,EAAc,CACzB,KAAM,CACJ,KAAM,KACN,QAAS,OACT,SAAU,MACZ,CACF,EAEaI,EAAkB,CAC7B,KAAM,CACJ,KAAM,KACN,YACE,oBAAE,yBACS,OAAC,cAAW,UAAU,UAAU,GAC3C,CAEJ,CACF,EAEaL,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,YAAU,OAAC,KAAE,KAAK,qBAAqB,sBAAU,CACnD,CACF,EAEaI,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,WAAS,OAAC,QAAK,UAAU,qDAAqD,sBAAU,CAC1F,CACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { SearchIcon } from '@storybook/icons'\n\nimport { Button } from '../components/index.js'\nimport React from 'react'\n\n// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export\nconst meta = {\n // \u540C\u65F6\u5B9A\u4E49\u4E86\u9875\u9762\u5DE6\u4FA7\u83DC\u5355\n title: 'Components/Button',\n component: Button,\n parameters: {\n // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout\n layout: 'centered',\n },\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n // More on argTypes: https://storybook.js.org/docs/api/argtypes\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['primary', 'secondary', 'link', 'ghost'],\n },\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg', 'icon'],\n },\n hoverEffect: {\n description: 'hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548',\n control: {\n type: 'select',\n },\n options: ['none', 'slide'],\n },\n },\n args: {\n variant: 'primary',\n size: 'base',\n children: 'Button',\n asChild: false,\n disabled: false,\n loading: false,\n hoverEffect: 'none',\n },\n} satisfies Meta<typeof Button>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\n// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args\n// args \u4F1A\u4F5C\u4E3A props \u4F20\u9012\u7ED9\u7EC4\u4EF6\n// Story\u7684\u540D\u4F1A\u4F5C\u4E3A\u83DC\u5355\u7684\u540D\u79F0 \u81EA\u52A8\u9996\u5B57\u6BCD\u5927\u5199\u5E76\u6309\u7167\u5927\u5199\u5B57\u6BCD\u62C6\u5206 UseAsButton => Use As Button\n\nexport const Primary: Story = {\n args: {\n size: 'lg',\n children: 'Primary',\n },\n}\n\nexport const Secondary: Story = {\n args: {\n size: 'lg',\n variant: 'secondary',\n children: 'Secondary',\n },\n}\n\nexport const Link: Story = {\n args: {\n size: 'lg',\n variant: 'link',\n children: 'Link',\n },\n}\n\nexport const WithIcon: Story = {\n args: {\n size: 'lg',\n children: (\n <>\n WithIcon <SearchIcon className=\"ai-ml-2\" />\n </>\n ),\n },\n}\n\nexport const Aschild: Story = {\n args: {\n size: 'lg',\n asChild: true,\n children: <a href=\"http://example.com\">as a a tag</a>,\n },\n}\n\nexport const Spinner: Story = {\n args: {\n size: 'lg',\n loading: true,\n spinner: <span className=\" ai-text-neutral-900 ai-animate-pulse ai-font-bold\">loading...</span>,\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,YAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAT,GAoFM,IAAAU,EAAA,6BAnFNC,EAA2B,4BAE3BC,EAAuB,kCACvBC,EAAkB,iBAGlB,MAAMC,EAAO,CAEX,MAAO,oBACP,UAAW,SACX,WAAY,CAEV,OAAQ,UACV,EAEA,KAAM,CAAC,UAAU,EAEjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,YAAa,OAAQ,OAAO,CACnD,EACA,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,KAAM,MAAM,CACtC,EACA,YAAa,CACX,YAAa,mIACb,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,OAAO,CAC3B,CACF,EACA,KAAM,CACJ,QAAS,UACT,KAAM,OACN,SAAU,SACV,QAAS,GACT,SAAU,GACV,QAAS,GACT,YAAa,MACf,CACF,EAEA,IAAON,EAAQM,EAOR,MAAMV,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,SAAU,SACZ,CACF,EAEaC,EAAmB,CAC9B,KAAM,CACJ,KAAM,KACN,QAAS,YACT,SAAU,WACZ,CACF,EAEaF,EAAc,CACzB,KAAM,CACJ,KAAM,KACN,QAAS,OACT,SAAU,MACZ,CACF,EAEaI,EAAkB,CAC7B,KAAM,CACJ,KAAM,KACN,YACE,oBAAE,yBACS,OAAC,cAAW,UAAU,UAAU,GAC3C,CAEJ,CACF,EAEaL,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,YAAU,OAAC,KAAE,KAAK,qBAAqB,sBAAU,CACnD,CACF,EAEaI,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,WAAS,OAAC,QAAK,UAAU,qDAAqD,sBAAU,CAC1F,CACF",
6
6
  "names": ["button_stories_exports", "__export", "Aschild", "Link", "Primary", "Secondary", "Spinner", "WithIcon", "button_stories_default", "__toCommonJS", "import_jsx_runtime", "import_icons", "import_components", "import_react", "meta"]
7
7
  }
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react/*';
2
2
  import React from 'react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
5
+ component: React.ForwardRefExoticComponent<import("../components/checkbox.js").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  parameters: {
7
7
  layout: string;
8
8
  docs: {
@@ -34,7 +34,7 @@ export default meta;
34
34
  type Story = StoryObj<typeof meta>;
35
35
  export declare const Default: Story;
36
36
  export declare const Sizes: {
37
- (): import("react/jsx-runtime").JSX.Element;
37
+ (): import("react/jsx-runtime.js").JSX.Element;
38
38
  parameters: {
39
39
  docs: {
40
40
  description: {
@@ -43,4 +43,4 @@ export declare const Sizes: {
43
43
  };
44
44
  };
45
45
  };
46
- export declare const Disabled: () => import("react/jsx-runtime").JSX.Element;
46
+ export declare const Disabled: () => import("react/jsx-runtime.js").JSX.Element;
@@ -1,2 +1,2 @@
1
- "use strict";var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(i,a)=>{for(var o in a)l(i,o,{get:a[o],enumerable:!0})},b=(i,a,o,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of m(a))!n.call(i,s)&&s!==o&&l(i,s,{get:()=>a[s],enumerable:!(r=d(a,s))||r.enumerable});return i};var x=i=>b(l({},"__esModule",{value:!0}),i);var v={};p(v,{Default:()=>u,Disabled:()=>g,Sizes:()=>c,default:()=>y});module.exports=x(v);var e=require("react/jsx-runtime"),t=require("../components/index"),N=require("react");const f={title:"Components/Checkbox",component:t.Checkbox,parameters:{layout:"centered",docs:{description:{component:"\u590D\u9009\u6846, \u57FA\u4E8E@radix-ui/react-checkbox https://www.radix-ui.com/primitives/docs/components/checkbox"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["sm","base","lg"],description:"\u5C3A\u5BF8",table:{defaultValue:{summary:"base"}}}},args:{size:"base"}};var y=f;const u={args:{size:"base"}},c=()=>(0,e.jsxs)("div",{className:"ai-flex ai-flex-col ai-gap-2",children:[(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms",size:"sm"}),(0,e.jsx)("label",{htmlFor:"terms",className:"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]}),(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms1",size:"base"}),(0,e.jsx)("label",{htmlFor:"terms1",className:"ai-text-base ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]}),(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms2",size:"lg"}),(0,e.jsx)("label",{htmlFor:"terms2",className:"ai-text-lg ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]})]});c.parameters={docs:{description:{story:"\u4E0D\u540C\u7684\u5C3A\u5BF8"}}};const g=()=>(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms",disabled:!0}),(0,e.jsx)("label",{htmlFor:"terms",className:"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]});
1
+ "use strict";var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(i,a)=>{for(var o in a)l(i,o,{get:a[o],enumerable:!0})},b=(i,a,o,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of m(a))!n.call(i,s)&&s!==o&&l(i,s,{get:()=>a[s],enumerable:!(r=d(a,s))||r.enumerable});return i};var x=i=>b(l({},"__esModule",{value:!0}),i);var v={};p(v,{Default:()=>u,Disabled:()=>g,Sizes:()=>c,default:()=>y});module.exports=x(v);var e=require("react/jsx-runtime"),t=require("../components/index.js"),N=require("react");const f={title:"Components/Checkbox",component:t.Checkbox,parameters:{layout:"centered",docs:{description:{component:"\u590D\u9009\u6846, \u57FA\u4E8E@radix-ui/react-checkbox https://www.radix-ui.com/primitives/docs/components/checkbox"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["sm","base","lg"],description:"\u5C3A\u5BF8",table:{defaultValue:{summary:"base"}}}},args:{size:"base"}};var y=f;const u={args:{size:"base"}},c=()=>(0,e.jsxs)("div",{className:"ai-flex ai-flex-col ai-gap-2",children:[(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms",size:"sm"}),(0,e.jsx)("label",{htmlFor:"terms",className:"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]}),(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms1",size:"base"}),(0,e.jsx)("label",{htmlFor:"terms1",className:"ai-text-base ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]}),(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms2",size:"lg"}),(0,e.jsx)("label",{htmlFor:"terms2",className:"ai-text-lg ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]})]});c.parameters={docs:{description:{story:"\u4E0D\u540C\u7684\u5C3A\u5BF8"}}};const g=()=>(0,e.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,e.jsx)(t.Checkbox,{id:"terms",disabled:!0}),(0,e.jsx)("label",{htmlFor:"terms",className:"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70",children:"Accept terms and conditions"})]});
2
2
  //# sourceMappingURL=checkbox.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/checkbox.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react/*'\nimport { Checkbox } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Checkbox',\n component: Checkbox,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u590D\u9009\u6846, \u57FA\u4E8E@radix-ui/react-checkbox https://www.radix-ui.com/primitives/docs/components/checkbox',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg'],\n description: '\u5C3A\u5BF8',\n table: {\n defaultValue: { summary: 'base' },\n },\n },\n },\n args: {\n size: 'base',\n },\n} satisfies Meta<typeof Checkbox>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n size: 'base',\n },\n}\n\nexport const Sizes = () => (\n <div className=\"ai-flex ai-flex-col ai-gap-2\">\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms\" size=\"sm\" />\n <label\n htmlFor=\"terms\"\n className=\"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms1\" size=\"base\" />\n <label\n htmlFor=\"terms1\"\n className=\"ai-text-base ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms2\" size=\"lg\" />\n <label\n htmlFor=\"terms2\"\n className=\"ai-text-lg ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n </div>\n)\nSizes.parameters = {\n docs: {\n description: {\n story: '\u4E0D\u540C\u7684\u5C3A\u5BF8',\n },\n },\n}\n\nexport const Disabled = () => (\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms\" disabled />\n <label\n htmlFor=\"terms\"\n className=\"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n)\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GA6CI,IAAAO,EAAA,6BA5CJC,EAAyB,+BACzBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,sBACP,UAAW,WACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,uHACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,IAAI,EAC5B,YAAa,eACb,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,CACF,EACA,KAAM,CACJ,KAAM,MACR,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMR,EAAiB,CAC5B,KAAM,CACJ,KAAM,MACR,CACF,EAEaE,EAAQ,OACnB,QAAC,OAAI,UAAU,+BACb,qBAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,QAAQ,KAAK,KAAK,KAC/B,OAAC,SACC,QAAQ,QACR,UAAU,4GACX,uCAED,GACF,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,SAAS,KAAK,OAAO,KAClC,OAAC,SACC,QAAQ,SACR,UAAU,8GACX,uCAED,GACF,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,SAAS,KAAK,KAAK,KAChC,OAAC,SACC,QAAQ,SACR,UAAU,4GACX,uCAED,GACF,GACF,EAEFA,EAAM,WAAa,CACjB,KAAM,CACJ,YAAa,CACX,MAAO,gCACT,CACF,CACF,EAEO,MAAMD,EAAW,OACtB,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,QAAQ,SAAQ,GAAC,KAC9B,OAAC,SACC,QAAQ,QACR,UAAU,4GACX,uCAED,GACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react/*'\nimport { Checkbox } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Checkbox',\n component: Checkbox,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u590D\u9009\u6846, \u57FA\u4E8E@radix-ui/react-checkbox https://www.radix-ui.com/primitives/docs/components/checkbox',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg'],\n description: '\u5C3A\u5BF8',\n table: {\n defaultValue: { summary: 'base' },\n },\n },\n },\n args: {\n size: 'base',\n },\n} satisfies Meta<typeof Checkbox>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n size: 'base',\n },\n}\n\nexport const Sizes = () => (\n <div className=\"ai-flex ai-flex-col ai-gap-2\">\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms\" size=\"sm\" />\n <label\n htmlFor=\"terms\"\n className=\"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms1\" size=\"base\" />\n <label\n htmlFor=\"terms1\"\n className=\"ai-text-base ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms2\" size=\"lg\" />\n <label\n htmlFor=\"terms2\"\n className=\"ai-text-lg ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n </div>\n)\nSizes.parameters = {\n docs: {\n description: {\n story: '\u4E0D\u540C\u7684\u5C3A\u5BF8',\n },\n },\n}\n\nexport const Disabled = () => (\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <Checkbox id=\"terms\" disabled />\n <label\n htmlFor=\"terms\"\n className=\"ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70\"\n >\n Accept terms and conditions\n </label>\n </div>\n)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GA6CI,IAAAO,EAAA,6BA5CJC,EAAyB,kCACzBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,sBACP,UAAW,WACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,uHACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,IAAI,EAC5B,YAAa,eACb,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,CACF,EACA,KAAM,CACJ,KAAM,MACR,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMR,EAAiB,CAC5B,KAAM,CACJ,KAAM,MACR,CACF,EAEaE,EAAQ,OACnB,QAAC,OAAI,UAAU,+BACb,qBAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,QAAQ,KAAK,KAAK,KAC/B,OAAC,SACC,QAAQ,QACR,UAAU,4GACX,uCAED,GACF,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,SAAS,KAAK,OAAO,KAClC,OAAC,SACC,QAAQ,SACR,UAAU,8GACX,uCAED,GACF,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,SAAS,KAAK,KAAK,KAChC,OAAC,SACC,QAAQ,SACR,UAAU,4GACX,uCAED,GACF,GACF,EAEFA,EAAM,WAAa,CACjB,KAAM,CACJ,YAAa,CACX,MAAO,gCACT,CACF,CACF,EAEO,MAAMD,EAAW,OACtB,QAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,GAAG,QAAQ,SAAQ,GAAC,KAC9B,OAAC,SACC,QAAQ,QACR,UAAU,4GACX,uCAED,GACF",
6
6
  "names": ["checkbox_stories_exports", "__export", "Default", "Disabled", "Sizes", "checkbox_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Dialog } from '../components/index';
2
+ import { Dialog } from '../components/index.js';
3
3
  import type { StoryObj } from '@storybook/react/*';
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(o,i)=>{for(var l in i)r(o,l,{get:i[l],enumerable:!0})},d=(o,i,l,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of g(i))!m.call(o,t)&&t!==l&&r(o,t,{get:()=>i[t],enumerable:!(s=n(i,t))||s.enumerable});return o};var p=o=>d(r({},"__esModule",{value:!0}),o);var f={};c(f,{Default:()=>y,default:()=>D});module.exports=p(f);var e=require("react/jsx-runtime"),h=require("react"),a=require("../components/index");const u={title:"Components/Dialog",component:a.Dialog,subcomponents:{DialogTrigger:a.DialogTrigger,DialogContent:a.DialogContent,DialogHeader:a.DialogHeader,DialogTitle:a.DialogTitle,DialogDescription:a.DialogDescription,DialogFooter:a.DialogFooter},parameters:{layout:"centered",docs:{description:{component:"\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog "}}},tags:["autodocs"]};var D=u;const y={args:{children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.DialogTrigger,{asChild:!0,children:(0,e.jsx)("button",{children:"Edit Profile"})}),(0,e.jsxs)(a.DialogContent,{className:"sm:ai-max-w-[425px]",children:[(0,e.jsxs)(a.DialogHeader,{children:[(0,e.jsx)(a.DialogTitle,{children:"Edit profile"}),(0,e.jsx)(a.DialogDescription,{children:"Make changes to your profile here. Click save when you're done."})]}),(0,e.jsxs)("div",{className:"ai-grid ai-gap-4 ai-py-4",children:[(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"name",className:"ai-text-right",children:"Name"}),(0,e.jsx)(a.Input,{id:"name",defaultValue:"Pedro Duarte",className:"ai-col-span-3"})]}),(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"username",className:"ai-text-right",children:"Username"}),(0,e.jsx)(a.Input,{id:"username",defaultValue:"@peduarte",className:"ai-col-span-3"})]})]}),(0,e.jsx)(a.DialogFooter,{children:(0,e.jsx)(a.Button,{type:"submit",children:"Save changes"})})]})]})}};
1
+ "use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(o,i)=>{for(var l in i)r(o,l,{get:i[l],enumerable:!0})},d=(o,i,l,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of g(i))!m.call(o,t)&&t!==l&&r(o,t,{get:()=>i[t],enumerable:!(s=n(i,t))||s.enumerable});return o};var p=o=>d(r({},"__esModule",{value:!0}),o);var f={};c(f,{Default:()=>y,default:()=>D});module.exports=p(f);var e=require("react/jsx-runtime"),h=require("react"),a=require("../components/index.js");const u={title:"Components/Dialog",component:a.Dialog,subcomponents:{DialogTrigger:a.DialogTrigger,DialogContent:a.DialogContent,DialogHeader:a.DialogHeader,DialogTitle:a.DialogTitle,DialogDescription:a.DialogDescription,DialogFooter:a.DialogFooter},parameters:{layout:"centered",docs:{description:{component:"\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog "}}},tags:["autodocs"]};var D=u;const y={args:{children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.DialogTrigger,{asChild:!0,children:(0,e.jsx)("button",{children:"Edit Profile"})}),(0,e.jsxs)(a.DialogContent,{className:"sm:ai-max-w-[425px]",children:[(0,e.jsxs)(a.DialogHeader,{children:[(0,e.jsx)(a.DialogTitle,{children:"Edit profile"}),(0,e.jsx)(a.DialogDescription,{children:"Make changes to your profile here. Click save when you're done."})]}),(0,e.jsxs)("div",{className:"ai-grid ai-gap-4 ai-py-4",children:[(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"name",className:"ai-text-right",children:"Name"}),(0,e.jsx)(a.Input,{id:"name",defaultValue:"Pedro Duarte",className:"ai-col-span-3"})]}),(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"username",className:"ai-text-right",children:"Username"}),(0,e.jsx)(a.Input,{id:"username",defaultValue:"@peduarte",className:"ai-col-span-3"})]})]}),(0,e.jsx)(a.DialogFooter,{children:(0,e.jsx)(a.Button,{type:"submit",children:"Save changes"})})]})]})}};
2
2
  //# sourceMappingURL=dialog.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/dialog.stories.tsx"],
4
- "sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index'\nimport type { Meta, StoryObj } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Dialog',\n component: Dialog,\n subcomponents: {\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog ',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Dialog>\n\nexport default meta\n\ntype Story = StoryObj<typeof Dialog>\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <DialogTrigger asChild>\n <button>Edit Profile</button>\n </DialogTrigger>\n <DialogContent className=\"sm:ai-max-w-[425px]\">\n <DialogHeader>\n <DialogTitle>Edit profile</DialogTitle>\n <DialogDescription>Make changes to your profile here. Click save when you're done.</DialogDescription>\n </DialogHeader>\n <div className=\"ai-grid ai-gap-4 ai-py-4\">\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"name\" className=\"ai-text-right\">\n Name\n </label>\n <Input id=\"name\" defaultValue=\"Pedro Duarte\" className=\"ai-col-span-3\" />\n </div>\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"username\" className=\"ai-text-right\">\n Username\n </label>\n <Input id=\"username\" defaultValue=\"@peduarte\" className=\"ai-col-span-3\" />\n </div>\n </div>\n <DialogFooter>\n <Button type=\"submit\">Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </>\n ),\n },\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GA2CM,IAAAK,EAAA,6BA3CNC,EAAkB,iBAClBC,EAUO,+BAGP,MAAMC,EAAO,CACX,MAAO,oBACP,UAAW,SACX,cAAe,CACb,8BACA,8BACA,4BACA,0BACA,sCACA,2BACF,EACA,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAIR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,YACE,oBACE,oBAAC,iBAAc,QAAO,GACpB,mBAAC,UAAO,wBAAY,EACtB,KACA,QAAC,iBAAc,UAAU,sBACvB,qBAAC,gBACC,oBAAC,eAAY,wBAAY,KACzB,OAAC,qBAAkB,2EAA+D,GACpF,KACA,QAAC,OAAI,UAAU,2BACb,qBAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,OAAO,UAAU,gBAAgB,gBAEhD,KACA,OAAC,SAAM,GAAG,OAAO,aAAa,eAAe,UAAU,gBAAgB,GACzE,KACA,QAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,WAAW,UAAU,gBAAgB,oBAEpD,KACA,OAAC,SAAM,GAAG,WAAW,aAAa,YAAY,UAAU,gBAAgB,GAC1E,GACF,KACA,OAAC,gBACC,mBAAC,UAAO,KAAK,SAAS,wBAAY,EACpC,GACF,GACF,CAEJ,CACF",
4
+ "sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index.js'\nimport type { Meta, StoryObj } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Dialog',\n component: Dialog,\n subcomponents: {\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog ',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Dialog>\n\nexport default meta\n\ntype Story = StoryObj<typeof Dialog>\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <DialogTrigger asChild>\n <button>Edit Profile</button>\n </DialogTrigger>\n <DialogContent className=\"sm:ai-max-w-[425px]\">\n <DialogHeader>\n <DialogTitle>Edit profile</DialogTitle>\n <DialogDescription>Make changes to your profile here. Click save when you're done.</DialogDescription>\n </DialogHeader>\n <div className=\"ai-grid ai-gap-4 ai-py-4\">\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"name\" className=\"ai-text-right\">\n Name\n </label>\n <Input id=\"name\" defaultValue=\"Pedro Duarte\" className=\"ai-col-span-3\" />\n </div>\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"username\" className=\"ai-text-right\">\n Username\n </label>\n <Input id=\"username\" defaultValue=\"@peduarte\" className=\"ai-col-span-3\" />\n </div>\n </div>\n <DialogFooter>\n <Button type=\"submit\">Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </>\n ),\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GA2CM,IAAAK,EAAA,6BA3CNC,EAAkB,iBAClBC,EAUO,kCAGP,MAAMC,EAAO,CACX,MAAO,oBACP,UAAW,SACX,cAAe,CACb,8BACA,8BACA,4BACA,0BACA,sCACA,2BACF,EACA,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAIR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,YACE,oBACE,oBAAC,iBAAc,QAAO,GACpB,mBAAC,UAAO,wBAAY,EACtB,KACA,QAAC,iBAAc,UAAU,sBACvB,qBAAC,gBACC,oBAAC,eAAY,wBAAY,KACzB,OAAC,qBAAkB,2EAA+D,GACpF,KACA,QAAC,OAAI,UAAU,2BACb,qBAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,OAAO,UAAU,gBAAgB,gBAEhD,KACA,OAAC,SAAM,GAAG,OAAO,aAAa,eAAe,UAAU,gBAAgB,GACzE,KACA,QAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,WAAW,UAAU,gBAAgB,oBAEpD,KACA,OAAC,SAAM,GAAG,WAAW,aAAa,YAAY,UAAU,gBAAgB,GAC1E,GACF,KACA,OAAC,gBACC,mBAAC,UAAO,KAAK,SAAS,wBAAY,EACpC,GACF,GACF,CAEJ,CACF",
6
6
  "names": ["dialog_stories_exports", "__export", "Default", "dialog_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "meta"]
7
7
  }
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react';
2
2
  import React from 'react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/heading").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
5
+ component: React.ForwardRefExoticComponent<import("../components/heading.js").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
6
6
  parameters: {
7
7
  layout: string;
8
8
  docs: {
@@ -43,7 +43,7 @@ declare const meta: {
43
43
  options: string[];
44
44
  table: {
45
45
  defaultValue: {
46
- summary: string;
46
+ summary: undefined;
47
47
  };
48
48
  };
49
49
  };