@anker-in/headless-ui 0.0.13 → 0.0.14

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 (177) hide show
  1. package/package.json +1 -1
  2. package/src/components/heading.tsx +19 -1
  3. package/src/components/radio.tsx +14 -2
  4. package/src/components/text.tsx +19 -1
  5. package/src/stories/heading.stories.tsx +10 -0
  6. package/src/stories/popover.stories.tsx +19 -2
  7. package/src/stories/text.stories.tsx +10 -0
  8. package/dist/cjs/components/badge.d.ts +0 -9
  9. package/dist/cjs/components/badge.js +0 -2
  10. package/dist/cjs/components/badge.js.map +0 -7
  11. package/dist/cjs/components/button.d.ts +0 -20
  12. package/dist/cjs/components/button.js +0 -2
  13. package/dist/cjs/components/button.js.map +0 -7
  14. package/dist/cjs/components/checkbox.d.ts +0 -11
  15. package/dist/cjs/components/checkbox.js +0 -2
  16. package/dist/cjs/components/checkbox.js.map +0 -7
  17. package/dist/cjs/components/dialog.d.ts +0 -19
  18. package/dist/cjs/components/dialog.js +0 -2
  19. package/dist/cjs/components/dialog.js.map +0 -7
  20. package/dist/cjs/components/heading.d.ts +0 -15
  21. package/dist/cjs/components/heading.js +0 -2
  22. package/dist/cjs/components/heading.js.map +0 -7
  23. package/dist/cjs/components/index.d.ts +0 -12
  24. package/dist/cjs/components/index.js +0 -2
  25. package/dist/cjs/components/index.js.map +0 -7
  26. package/dist/cjs/components/input.d.ts +0 -21
  27. package/dist/cjs/components/input.js +0 -2
  28. package/dist/cjs/components/input.js.map +0 -7
  29. package/dist/cjs/components/popover.d.ts +0 -6
  30. package/dist/cjs/components/popover.js +0 -2
  31. package/dist/cjs/components/popover.js.map +0 -7
  32. package/dist/cjs/components/radio.d.ts +0 -16
  33. package/dist/cjs/components/radio.js +0 -2
  34. package/dist/cjs/components/radio.js.map +0 -7
  35. package/dist/cjs/components/skeleton.d.ts +0 -9
  36. package/dist/cjs/components/skeleton.js +0 -5
  37. package/dist/cjs/components/skeleton.js.map +0 -7
  38. package/dist/cjs/components/text.d.ts +0 -30
  39. package/dist/cjs/components/text.js +0 -2
  40. package/dist/cjs/components/text.js.map +0 -7
  41. package/dist/cjs/components/theme.d.ts +0 -13
  42. package/dist/cjs/components/theme.js +0 -2
  43. package/dist/cjs/components/theme.js.map +0 -7
  44. package/dist/cjs/helpers/component-props.d.ts +0 -7
  45. package/dist/cjs/helpers/component-props.js +0 -2
  46. package/dist/cjs/helpers/component-props.js.map +0 -7
  47. package/dist/cjs/helpers/constants.d.ts +0 -2
  48. package/dist/cjs/helpers/constants.js +0 -2
  49. package/dist/cjs/helpers/constants.js.map +0 -7
  50. package/dist/cjs/helpers/index.d.ts +0 -1
  51. package/dist/cjs/helpers/index.js +0 -2
  52. package/dist/cjs/helpers/index.js.map +0 -7
  53. package/dist/cjs/helpers/utils.d.ts +0 -2
  54. package/dist/cjs/helpers/utils.js +0 -2
  55. package/dist/cjs/helpers/utils.js.map +0 -7
  56. package/dist/cjs/icons/spinner.d.ts +0 -7
  57. package/dist/cjs/icons/spinner.js +0 -2
  58. package/dist/cjs/icons/spinner.js.map +0 -7
  59. package/dist/cjs/index.d.ts +0 -1
  60. package/dist/cjs/index.js +0 -2
  61. package/dist/cjs/index.js.map +0 -7
  62. package/dist/cjs/stories/badge.stories.d.ts +0 -26
  63. package/dist/cjs/stories/badge.stories.js +0 -2
  64. package/dist/cjs/stories/badge.stories.js.map +0 -7
  65. package/dist/cjs/stories/button.stories.d.ts +0 -47
  66. package/dist/cjs/stories/button.stories.js +0 -2
  67. package/dist/cjs/stories/button.stories.js.map +0 -7
  68. package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
  69. package/dist/cjs/stories/checkbox.stories.js +0 -2
  70. package/dist/cjs/stories/checkbox.stories.js.map +0 -7
  71. package/dist/cjs/stories/dialog.stories.d.ts +0 -20
  72. package/dist/cjs/stories/dialog.stories.js +0 -2
  73. package/dist/cjs/stories/dialog.stories.js.map +0 -7
  74. package/dist/cjs/stories/heading.stories.d.ts +0 -70
  75. package/dist/cjs/stories/heading.stories.js +0 -2
  76. package/dist/cjs/stories/heading.stories.js.map +0 -7
  77. package/dist/cjs/stories/input.stories.d.ts +0 -35
  78. package/dist/cjs/stories/input.stories.js +0 -2
  79. package/dist/cjs/stories/input.stories.js.map +0 -7
  80. package/dist/cjs/stories/popover.stories.d.ts +0 -5
  81. package/dist/cjs/stories/popover.stories.js +0 -2
  82. package/dist/cjs/stories/popover.stories.js.map +0 -7
  83. package/dist/cjs/stories/radio.stories.d.ts +0 -39
  84. package/dist/cjs/stories/radio.stories.js +0 -2
  85. package/dist/cjs/stories/radio.stories.js.map +0 -7
  86. package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
  87. package/dist/cjs/stories/skeleton.stories.js +0 -2
  88. package/dist/cjs/stories/skeleton.stories.js.map +0 -7
  89. package/dist/cjs/stories/text.stories.d.ts +0 -72
  90. package/dist/cjs/stories/text.stories.js +0 -10
  91. package/dist/cjs/stories/text.stories.js.map +0 -7
  92. package/dist/esm/components/badge.d.ts +0 -9
  93. package/dist/esm/components/badge.js +0 -2
  94. package/dist/esm/components/badge.js.map +0 -7
  95. package/dist/esm/components/button.d.ts +0 -20
  96. package/dist/esm/components/button.js +0 -2
  97. package/dist/esm/components/button.js.map +0 -7
  98. package/dist/esm/components/checkbox.d.ts +0 -11
  99. package/dist/esm/components/checkbox.js +0 -2
  100. package/dist/esm/components/checkbox.js.map +0 -7
  101. package/dist/esm/components/dialog.d.ts +0 -19
  102. package/dist/esm/components/dialog.js +0 -2
  103. package/dist/esm/components/dialog.js.map +0 -7
  104. package/dist/esm/components/heading.d.ts +0 -15
  105. package/dist/esm/components/heading.js +0 -2
  106. package/dist/esm/components/heading.js.map +0 -7
  107. package/dist/esm/components/index.d.ts +0 -12
  108. package/dist/esm/components/index.js +0 -2
  109. package/dist/esm/components/index.js.map +0 -7
  110. package/dist/esm/components/input.d.ts +0 -21
  111. package/dist/esm/components/input.js +0 -2
  112. package/dist/esm/components/input.js.map +0 -7
  113. package/dist/esm/components/popover.d.ts +0 -6
  114. package/dist/esm/components/popover.js +0 -2
  115. package/dist/esm/components/popover.js.map +0 -7
  116. package/dist/esm/components/radio.d.ts +0 -16
  117. package/dist/esm/components/radio.js +0 -2
  118. package/dist/esm/components/radio.js.map +0 -7
  119. package/dist/esm/components/skeleton.d.ts +0 -9
  120. package/dist/esm/components/skeleton.js +0 -5
  121. package/dist/esm/components/skeleton.js.map +0 -7
  122. package/dist/esm/components/text.d.ts +0 -30
  123. package/dist/esm/components/text.js +0 -2
  124. package/dist/esm/components/text.js.map +0 -7
  125. package/dist/esm/components/theme.d.ts +0 -13
  126. package/dist/esm/components/theme.js +0 -2
  127. package/dist/esm/components/theme.js.map +0 -7
  128. package/dist/esm/helpers/component-props.d.ts +0 -7
  129. package/dist/esm/helpers/component-props.js +0 -1
  130. package/dist/esm/helpers/component-props.js.map +0 -7
  131. package/dist/esm/helpers/constants.d.ts +0 -2
  132. package/dist/esm/helpers/constants.js +0 -2
  133. package/dist/esm/helpers/constants.js.map +0 -7
  134. package/dist/esm/helpers/index.d.ts +0 -1
  135. package/dist/esm/helpers/index.js +0 -2
  136. package/dist/esm/helpers/index.js.map +0 -7
  137. package/dist/esm/helpers/utils.d.ts +0 -2
  138. package/dist/esm/helpers/utils.js +0 -2
  139. package/dist/esm/helpers/utils.js.map +0 -7
  140. package/dist/esm/icons/spinner.d.ts +0 -7
  141. package/dist/esm/icons/spinner.js +0 -2
  142. package/dist/esm/icons/spinner.js.map +0 -7
  143. package/dist/esm/index.d.ts +0 -1
  144. package/dist/esm/index.js +0 -2
  145. package/dist/esm/index.js.map +0 -7
  146. package/dist/esm/package.json +0 -3
  147. package/dist/esm/stories/badge.stories.d.ts +0 -26
  148. package/dist/esm/stories/badge.stories.js +0 -2
  149. package/dist/esm/stories/badge.stories.js.map +0 -7
  150. package/dist/esm/stories/button.stories.d.ts +0 -47
  151. package/dist/esm/stories/button.stories.js +0 -2
  152. package/dist/esm/stories/button.stories.js.map +0 -7
  153. package/dist/esm/stories/checkbox.stories.d.ts +0 -46
  154. package/dist/esm/stories/checkbox.stories.js +0 -2
  155. package/dist/esm/stories/checkbox.stories.js.map +0 -7
  156. package/dist/esm/stories/dialog.stories.d.ts +0 -20
  157. package/dist/esm/stories/dialog.stories.js +0 -2
  158. package/dist/esm/stories/dialog.stories.js.map +0 -7
  159. package/dist/esm/stories/heading.stories.d.ts +0 -70
  160. package/dist/esm/stories/heading.stories.js +0 -2
  161. package/dist/esm/stories/heading.stories.js.map +0 -7
  162. package/dist/esm/stories/input.stories.d.ts +0 -35
  163. package/dist/esm/stories/input.stories.js +0 -2
  164. package/dist/esm/stories/input.stories.js.map +0 -7
  165. package/dist/esm/stories/popover.stories.d.ts +0 -5
  166. package/dist/esm/stories/popover.stories.js +0 -2
  167. package/dist/esm/stories/popover.stories.js.map +0 -7
  168. package/dist/esm/stories/radio.stories.d.ts +0 -39
  169. package/dist/esm/stories/radio.stories.js +0 -2
  170. package/dist/esm/stories/radio.stories.js.map +0 -7
  171. package/dist/esm/stories/skeleton.stories.d.ts +0 -20
  172. package/dist/esm/stories/skeleton.stories.js +0 -2
  173. package/dist/esm/stories/skeleton.stories.js.map +0 -7
  174. package/dist/esm/stories/text.stories.d.ts +0 -72
  175. package/dist/esm/stories/text.stories.js +0 -10
  176. package/dist/esm/stories/text.stories.js.map +0 -7
  177. package/style.css +0 -1342
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/skeleton.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\ntype SkeletonElement = React.ElementRef<'span'>\n\ninterface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {\n /** \u662F\u5426\u6B63\u5728\u52A0\u8F7D , \u9ED8\u8BA4\u662Ftrue*/\n loading?: boolean\n}\n\nconst Skeleton = React.forwardRef<SkeletonElement, SkeletonProps>((props, forwardedRef) => {\n const { children, className, loading = true, ...skeletonProps } = props\n\n if (!loading) return children\n const Tag = React.isValidElement(children) ? Slot : 'span'\n\n return (\n <Tag\n ref={forwardedRef}\n className={cn(\n `ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none \n !ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone\n after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible\n `,\n className\n )}\n data-inline-skeleton={React.isValidElement(children) ? undefined : true}\n tabIndex={-1}\n {...skeletonProps}\n >\n {children}\n </Tag>\n )\n})\n\nSkeleton.displayName = 'Skeleton'\n\nexport default Skeleton\nexport type { SkeletonProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmBI,IAAAI,EAAA,6BAnBJC,EAAuB,oBACvBC,EAAmB,+BACnBC,EAAqB,gCAUrB,MAAMC,EAAWH,EAAM,WAA2C,CAACI,EAAOC,IAAiB,CACzF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAc,EAAIL,EAElE,GAAI,CAACI,EAAS,OAAOF,EACrB,MAAMI,EAAMV,EAAM,eAAeM,CAAQ,EAAI,OAAO,OAEpD,SACE,OAACI,EAAA,CACC,IAAKL,EACL,aAAW,MACT;AAAA;AAAA;AAAA,UAIAE,CACF,EACA,uBAAsBP,EAAM,eAAeM,CAAQ,EAAI,OAAY,GACnE,SAAU,GACT,GAAGG,EAEH,SAAAH,EACH,CAEJ,CAAC,EAEDH,EAAS,YAAc,WAEvB,IAAON,EAAQM",
6
- "names": ["skeleton_exports", "__export", "skeleton_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_react_slot", "Skeleton", "props", "forwardedRef", "children", "className", "loading", "skeletonProps", "Tag"]
7
- }
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
4
- declare const textVariants: (props?: ({
5
- size?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
6
- weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
7
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
- type TextSpanProps = {
9
- as?: 'span';
10
- } & ComponentPropsWithout<'span', RemovedProps>;
11
- type TextDivProps = {
12
- as: 'div';
13
- } & ComponentPropsWithout<'div', RemovedProps>;
14
- type TextLabelProps = {
15
- as: 'label';
16
- } & ComponentPropsWithout<'label', RemovedProps>;
17
- type TextPProps = {
18
- as: 'p';
19
- } & ComponentPropsWithout<'p', RemovedProps>;
20
- interface CommonTextProps extends VariantProps<typeof textVariants> {
21
- as?: 'div' | 'label' | 'p' | 'span';
22
- asChild?: boolean;
23
- color?: string;
24
- /** 相当于 dangerouslySetInnerHTML */
25
- html?: string;
26
- }
27
- type TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);
28
- declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
29
- export { Text };
30
- export type { TextProps };
@@ -1,2 +0,0 @@
1
- "use strict";var v=Object.create;var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var S=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!R.call(t,s)&&s!==o&&p(t,s,{get:()=>e[s],enumerable:!(a=g(e,s))||a.enumerable});return t};var V=(t,e,o)=>(o=t!=null?v(b(t)):{},x(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),W=t=>x(p({},"__esModule",{value:!0}),t);var E={};S(E,{Text:()=>n});module.exports=W(E);var r=require("react/jsx-runtime"),w=V(require("react")),P=require("@radix-ui/react-slot"),d=require("../helpers/index.js"),T=require("class-variance-authority");const z=(0,T.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"}},defaultVariants:{size:"none",weights:"normal"}}),n=w.forwardRef((t,e)=>{const{children:o,size:a="none",weights:s,className:h,asChild:f,as:c="span",color:i,html:l,...y}=t,m=l?{dangerouslySetInnerHTML:{__html:l}}:null,u=i?{style:{color:i}}:null;return(0,r.jsx)(P.Slot,{...y,ref:e,className:(0,d.cn)(z({size:a,weights:s}),h),...m,...u,children:f?o:(0,r.jsx)(c,{children:m?null:o})})});n.displayName="Text";
2
- //# sourceMappingURL=text.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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 },\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 { children, size = 'none', weights, className, asChild, as: Tag = 'span', color, html, ...textProps } = 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 }),\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,GAgF4B,IAAAI,EAAA,6BAhF5BC,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,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,QACX,CACF,CAAC,EAkBKP,EAAOG,EAAM,WAAmC,CAACK,EAAOC,IAAiB,CAC7E,KAAM,CAAE,SAAAC,EAAU,KAAAC,EAAO,OAAQ,QAAAC,EAAS,UAAAC,EAAW,QAAAC,EAAS,GAAIC,EAAM,OAAQ,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAU,EAAIV,EAExGW,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,IAAKT,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,QAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUJ,KAAW,OAACK,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EACDV,EAAK,YAAc",
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", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
7
- }
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import type { Brand } from '../helpers/constants.js';
3
- interface ThemeProps {
4
- brand: Brand;
5
- children: React.ReactNode;
6
- }
7
- /**
8
- *
9
- * @param param
10
- * @returns
11
- */
12
- declare const Theme: ({ brand, children }: ThemeProps) => import("react/jsx-runtime.js").JSX.Element;
13
- export default Theme;
@@ -1,2 +0,0 @@
1
- "use strict";"use client";var d=Object.create;var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})},s=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of h(t))!u.call(e,a)&&a!==r&&o(e,a,{get:()=>t[a],enumerable:!(c=m(t,a))||c.enumerable});return e};var l=(e,t,r)=>(r=e!=null?d(p(e)):{},s(t||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e)),i=e=>s(o({},"__esModule",{value:!0}),e);var T={};f(T,{default:()=>R});module.exports=i(T);var n=require("react/jsx-runtime"),b=l(require("react"));const y=({brand:e,children:t})=>(b.useLayoutEffect(()=>{document.querySelector("html")?.setAttribute("data-brand-theme",e)},[]),(0,n.jsx)(n.Fragment,{children:t}));var R=y;
2
- //# sourceMappingURL=theme.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/theme.tsx"],
4
- "sourcesContent": ["'use client'\nimport * as React from 'react'\nimport type { Brand } from '../helpers/constants.js'\n\ninterface ThemeProps {\n brand: Brand\n children: React.ReactNode\n}\n/**\n *\n * @param param\n * @returns\n */\nconst Theme = ({ brand, children }: ThemeProps) => {\n React.useLayoutEffect(() => {\n document.querySelector('html')?.setAttribute('data-brand-theme', brand)\n }, [])\n return <>{children}</>\n}\n\nexport default Theme\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBS,IAAAI,EAAA,6BAhBTC,EAAuB,oBAYvB,MAAMC,EAAQ,CAAC,CAAE,MAAAC,EAAO,SAAAC,CAAS,KAC/BH,EAAM,gBAAgB,IAAM,CAC1B,SAAS,cAAc,MAAM,GAAG,aAAa,mBAAoBE,CAAK,CACxE,EAAG,CAAC,CAAC,KACE,mBAAG,SAAAC,EAAS,GAGrB,IAAON,EAAQI",
6
- "names": ["theme_exports", "__export", "theme_default", "__toCommonJS", "import_jsx_runtime", "React", "Theme", "brand", "children"]
7
- }
@@ -1,7 +0,0 @@
1
- import type React from 'react';
2
- type ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<Extract<React.ComponentPropsWithoutRef<C>, {
3
- as: T;
4
- }>, 'as' | 'asChild'>;
5
- type ComponentPropsWithout<T extends React.ElementType, O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>> = Omit<React.ComponentPropsWithoutRef<T>, O & string>;
6
- type RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color';
7
- export type { ComponentPropsAs, ComponentPropsWithout, RemovedProps };
@@ -1,2 +0,0 @@
1
- "use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var i=(t,e,s,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of r(e))!m.call(t,o)&&o!==s&&n(t,o,{get:()=>e[o],enumerable:!(p=a(e,o))||p.enumerable});return t};var C=t=>i(n({},"__esModule",{value:!0}),t);var R={};module.exports=C(R);
2
- //# sourceMappingURL=component-props.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/helpers/component-props.ts"],
4
- "sourcesContent": ["import type React from 'react'\n\ntype ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<\n Extract<React.ComponentPropsWithoutRef<C>, { as: T }>,\n 'as' | 'asChild'\n>\n\n// Omits the specified props from the component props. Autocomplete will suggest props\n// of the component, but won't restrict the omittable props to those that actually exist.\ntype ComponentPropsWithout<\n T extends React.ElementType,\n O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>,\n> = Omit<React.ComponentPropsWithoutRef<T>, O & string>\n\ntype RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color'\n\nexport type { ComponentPropsAs, ComponentPropsWithout, RemovedProps }\n"],
5
- "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
- "names": ["component_props_exports", "__toCommonJS"]
7
- }
@@ -1,2 +0,0 @@
1
- export declare const ALL_BRANDS: readonly ["anker", "eufy", "soundcore", "nebula", "ankerWork", "ankerMake"];
2
- export type Brand = (typeof ALL_BRANDS)[number];
@@ -1,2 +0,0 @@
1
- "use strict";var a=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(n,e)=>{for(var o in e)a(n,o,{get:e[o],enumerable:!0})},A=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!s.call(n,r)&&r!==o&&a(n,r,{get:()=>e[r],enumerable:!(t=k(e,r))||t.enumerable});return n};var L=n=>A(a({},"__esModule",{value:!0}),n);var y={};u(y,{ALL_BRANDS:()=>c});module.exports=L(y);const c=["anker","eufy","soundcore","nebula","ankerWork","ankerMake"];
2
- //# sourceMappingURL=constants.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/helpers/constants.ts"],
4
- "sourcesContent": ["export const ALL_BRANDS = ['anker', 'eufy', 'soundcore', 'nebula', 'ankerWork', 'ankerMake'] as const\n\nexport type Brand = (typeof ALL_BRANDS)[number]\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAa,CAAC,QAAS,OAAQ,YAAa,SAAU,YAAa,WAAW",
6
- "names": ["constants_exports", "__export", "ALL_BRANDS", "__toCommonJS"]
7
- }
@@ -1 +0,0 @@
1
- export { cn } from './utils.js';
@@ -1,2 +0,0 @@
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");
2
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["helpers_exports", "__export", "__toCommonJS", "import_utils"]
7
- }
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from 'clsx';
2
- export declare function cn(...inputs: ClassValue[]): string;
@@ -1,2 +0,0 @@
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))}
2
- //# sourceMappingURL=utils.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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"]
7
- }
@@ -1,7 +0,0 @@
1
- export interface SpinnerProps {
2
- /** loading 图标大小 */
3
- size?: 'sm' | 'md' | 'lg';
4
- color?: string;
5
- }
6
- declare const Spinner: ({ size, color }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
7
- export default Spinner;
@@ -1,2 +0,0 @@
1
- "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(s,e)=>{for(var i in e)r(s,i,{get:e[i],enumerable:!0})},l=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!a.call(s,n)&&n!==i&&r(s,n,{get:()=>e[n],enumerable:!(o=p(e,n))||o.enumerable});return s};var d=s=>l(r({},"__esModule",{value:!0}),s);var m={};g(m,{default:()=>w});module.exports=d(m);var t=require("react/jsx-runtime");const h=({size:s="sm",color:e="#ffffff"})=>(0,t.jsx)("svg",{className:"ai-animate-spin",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3",stroke:e,strokeWidth:"1.6",strokeLinecap:"round"})});var w=h;
2
- //# sourceMappingURL=spinner.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/icons/spinner.tsx"],
4
- "sourcesContent": ["export interface SpinnerProps {\n /** loading \u56FE\u6807\u5927\u5C0F */\n size?: 'sm' | 'md' | 'lg'\n color?: string\n}\n\n// eslint-disable-next-line no-unused-vars\nconst Spinner = ({ size = 'sm', color = '#ffffff' }: SpinnerProps) => {\n return (\n <svg\n className=\"ai-animate-spin\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3\"\n stroke={color}\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n />\n </svg>\n )\n}\n\nexport default Spinner\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBM,IAAAI,EAAA,6BAVN,MAAMC,EAAU,CAAC,CAAE,KAAAC,EAAO,KAAM,MAAAC,EAAQ,SAAU,OAE9C,OAAC,OACC,UAAU,kBACV,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BAEN,mBAAC,QACC,EAAE,qFACF,OAAQA,EACR,YAAY,MACZ,cAAc,QAChB,EACF,EAIJ,IAAOL,EAAQG",
6
- "names": ["spinner_exports", "__export", "spinner_default", "__toCommonJS", "import_jsx_runtime", "Spinner", "size", "color"]
7
- }
@@ -1 +0,0 @@
1
- export * from './components/index.js';
package/dist/cjs/index.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("./components/index.js"),module.exports);
2
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './components/index.js'\n"],
5
- "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,iCAAd",
6
- "names": ["src_exports", "__toCommonJS", "__reExport"]
7
- }
@@ -1,26 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import { Badge } from '../components/index';
3
- declare const meta: {
4
- title: string;
5
- component: typeof Badge;
6
- parameters: {
7
- layout: string;
8
- };
9
- tags: string[];
10
- argTypes: {
11
- variant: {
12
- control: {
13
- type: "select";
14
- };
15
- options: string[];
16
- };
17
- };
18
- args: {
19
- variant: "default";
20
- children: string;
21
- };
22
- };
23
- export default meta;
24
- type Story = StoryObj<typeof meta>;
25
- export declare const Default: Story;
26
- export declare const Examples: Story;
@@ -1,2 +0,0 @@
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"})]})}};
2
- //# sourceMappingURL=badge.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["badge_stories_exports", "__export", "Default", "Examples", "badge_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
- }
@@ -1,47 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import React from 'react';
3
- declare const meta: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/button").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
6
- parameters: {
7
- layout: string;
8
- };
9
- tags: string[];
10
- argTypes: {
11
- variant: {
12
- control: {
13
- type: "select";
14
- };
15
- options: string[];
16
- };
17
- size: {
18
- control: {
19
- type: "select";
20
- };
21
- options: string[];
22
- };
23
- hoverEffect: {
24
- description: string;
25
- control: {
26
- type: "select";
27
- };
28
- options: string[];
29
- };
30
- };
31
- args: {
32
- variant: "primary";
33
- size: "base";
34
- children: string;
35
- asChild: false;
36
- disabled: false;
37
- loading: false;
38
- hoverEffect: "none";
39
- };
40
- };
41
- export default meta;
42
- type Story = StoryObj<typeof meta>;
43
- export declare const Primary: Story;
44
- export declare const Secondary: Story;
45
- export declare const Link: Story;
46
- export declare const WithIcon: Story;
47
- export declare const Aschild: Story;
@@ -1,2 +0,0 @@
1
- "use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(o,t)=>{for(var a in t)s(o,a,{get:t[a],enumerable:!0})},m=(o,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!y.call(o,r)&&r!==a&&s(o,r,{get:()=>t[r],enumerable:!(n=l(t,r))||n.enumerable});return o};var h=o=>m(s({},"__esModule",{value:!0}),o);var x={};d(x,{Aschild:()=>b,Link:()=>u,Primary:()=>S,Secondary:()=>v,WithIcon:()=>z,default:()=>f});module.exports=h(x);var e=require("react/jsx-runtime"),i=require("@storybook/icons"),c=require("../components/index"),B=require("react");const g={title:"Components/Button",component:c.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=g;const S={args:{size:"lg",children:"Primary"}},v={args:{size:"lg",variant:"secondary",children:"Secondary"}},u={args:{size:"lg",variant:"link",children:"Link"}},z={args:{size:"lg",children:(0,e.jsxs)(e.Fragment,{children:["WithIcon ",(0,e.jsx)(i.SearchIcon,{className:"ai-ml-2"})]})}},b={args:{size:"lg",asChild:!0,children:(0,e.jsx)("a",{href:"http://example.com",children:"as a a tag"})}};
2
- //# sourceMappingURL=button.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAR,GAoFM,IAAAS,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,MAAMT,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,EAEaG,EAAkB,CAC7B,KAAM,CACJ,KAAM,KACN,YACE,oBAAE,yBACS,OAAC,cAAW,UAAU,UAAU,GAC3C,CAEJ,CACF,EAEaJ,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,YAAU,OAAC,KAAE,KAAK,qBAAqB,sBAAU,CACnD,CACF",
6
- "names": ["button_stories_exports", "__export", "Aschild", "Link", "Primary", "Secondary", "WithIcon", "button_stories_default", "__toCommonJS", "import_jsx_runtime", "import_icons", "import_components", "import_react", "meta"]
7
- }
@@ -1,46 +0,0 @@
1
- import type { StoryObj } from '@storybook/react/*';
2
- import React from 'react';
3
- declare const meta: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
6
- parameters: {
7
- layout: string;
8
- docs: {
9
- description: {
10
- component: string;
11
- };
12
- };
13
- };
14
- tags: string[];
15
- argTypes: {
16
- size: {
17
- control: {
18
- type: "select";
19
- };
20
- options: string[];
21
- description: string;
22
- table: {
23
- defaultValue: {
24
- summary: string;
25
- };
26
- };
27
- };
28
- };
29
- args: {
30
- size: "base";
31
- };
32
- };
33
- export default meta;
34
- type Story = StoryObj<typeof meta>;
35
- export declare const Default: Story;
36
- export declare const Sizes: {
37
- (): import("react/jsx-runtime").JSX.Element;
38
- parameters: {
39
- docs: {
40
- description: {
41
- story: string;
42
- };
43
- };
44
- };
45
- };
46
- export declare const Disabled: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
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"})]});
2
- //# sourceMappingURL=checkbox.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["checkbox_stories_exports", "__export", "Default", "Disabled", "Sizes", "checkbox_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
- }
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { Dialog } from '../components/index';
3
- import type { StoryObj } from '@storybook/react/*';
4
- declare const meta: {
5
- title: string;
6
- component: React.FC<import("@radix-ui/react-dialog").DialogProps>;
7
- subcomponents: any;
8
- parameters: {
9
- layout: string;
10
- docs: {
11
- description: {
12
- component: string;
13
- };
14
- };
15
- };
16
- tags: string[];
17
- };
18
- export default meta;
19
- type Story = StoryObj<typeof Dialog>;
20
- export declare const Default: Story;
@@ -1,2 +0,0 @@
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"})})]})]})}};
2
- //# sourceMappingURL=dialog.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["dialog_stories_exports", "__export", "Default", "dialog_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "meta"]
7
- }
@@ -1,70 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import React from 'react';
3
- declare const meta: {
4
- title: string;
5
- component: React.ForwardRefExoticComponent<import("../components/heading").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
6
- parameters: {
7
- layout: string;
8
- docs: {
9
- description: {
10
- component: string;
11
- };
12
- };
13
- };
14
- tags: string[];
15
- argTypes: {
16
- size: {
17
- control: {
18
- type: "select";
19
- };
20
- options: (string | number)[];
21
- description: string;
22
- table: {
23
- defaultValue: {
24
- summary: string;
25
- };
26
- };
27
- };
28
- weights: {
29
- control: {
30
- type: "select";
31
- };
32
- options: string[];
33
- table: {
34
- defaultValue: {
35
- summary: string;
36
- };
37
- };
38
- };
39
- color: {
40
- control: {
41
- type: "color";
42
- };
43
- };
44
- as: {
45
- control: {
46
- type: "select";
47
- };
48
- options: string[];
49
- description: string;
50
- table: {
51
- defaultValue: {
52
- summary: string;
53
- };
54
- };
55
- };
56
- html: {
57
- type: "string";
58
- description: string;
59
- };
60
- };
61
- args: {
62
- as: "h1";
63
- size: "none";
64
- weights: "normal";
65
- };
66
- };
67
- export default meta;
68
- type Story = StoryObj<typeof meta>;
69
- export declare const Default: Story;
70
- export declare const All: Story;
@@ -1,2 +0,0 @@
1
- "use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var h=(r,t)=>{for(var n in t)i(r,n,{get:t[n],enumerable:!0})},u=(r,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of d(t))!p.call(r,a)&&a!==n&&i(r,a,{get:()=>t[a],enumerable:!(s=l(t,a))||s.enumerable});return r};var c=r=>u(i({},"__esModule",{value:!0}),r);var z={};h(z,{All:()=>f,Default:()=>y,default:()=>m});module.exports=c(z);var e=require("react/jsx-runtime"),o=require("../components/index"),H=require("react");const g={title:"Typography/Heading",component:o.Heading,parameters:{layout:"centered",docs:{description:{component:"Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["none",1,2,3,4,5,6,7,8,9],description:"\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8",table:{defaultValue:{summary:"none"}}},weights:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},color:{control:{type:"color"}},as:{control:{type:"select"},options:["h1","h2","h3","h4","h5","h6"],description:"html \u6807\u7B7E\u7C7B\u578B",table:{defaultValue:{summary:"h1"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{as:"h1",size:"none",weights:"normal"}};var m=g;const y={args:{as:"h1",children:" The quick brown fox jumps over the lazy dog."}},f={render:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.Heading,{size:1,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:2,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:3,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:4,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:5,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:6,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:7,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:8,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})};
2
- //# sourceMappingURL=heading.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/stories/heading.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Heading } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Heading',\n component: Heading,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: 'Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\n description: '\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8',\n table: {\n defaultValue: { summary: 'none' },\n },\n },\n weights: {\n control: {\n type: 'select',\n },\n options: ['light', 'normal', 'medium', 'bold'],\n table: {\n defaultValue: { summary: 'normal' },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n table: {\n defaultValue: { summary: 'h1' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n as: 'h1',\n size: 'none',\n weights: 'normal',\n },\n} satisfies Meta<typeof Heading>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n as: 'h1',\n children: ' The quick brown fox jumps over the lazy dog.',\n },\n}\n\nexport const All: Story = {\n render: () => (\n <>\n <Heading size={1}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={2}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={3}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={4}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={5}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={6}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={7}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={8}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={9}>The quick brown fox jumps over the lazy dog.</Heading>\n </>\n ),\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,SAAAE,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GA6EI,IAAAM,EAAA,6BA3EJC,EAAwB,+BACxBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,qBACP,UAAW,UACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,qJACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,YAAa,6LACb,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,QAAS,SAAU,SAAU,MAAM,EAC7C,MAAO,CACL,aAAc,CAAE,QAAS,QAAS,CACpC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAC5C,YAAa,gCACb,MAAO,CACL,aAAc,CAAE,QAAS,IAAK,CAChC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,GAAI,KACJ,KAAM,OACN,QAAS,QACX,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,GAAI,KACJ,SAAU,+CACZ,CACF,EAEaD,EAAa,CACxB,OAAQ,OACN,oBACE,oBAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,GAChE,CAEJ",
6
- "names": ["heading_stories_exports", "__export", "All", "Default", "heading_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
- }
@@ -1,35 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import type { ComponentType } from 'react';
3
- import React from 'react';
4
- declare const meta: {
5
- title: string;
6
- component: React.ForwardRefExoticComponent<import("../components/input").InputProps & React.RefAttributes<HTMLInputElement>>;
7
- subcomponents: {
8
- InputSlot: ComponentType<unknown>;
9
- };
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- tags: string[];
19
- argTypes: {
20
- size: {
21
- control: {
22
- type: "select";
23
- };
24
- options: string[];
25
- };
26
- };
27
- args: {
28
- size: "base";
29
- };
30
- };
31
- export default meta;
32
- type Story = StoryObj<typeof meta>;
33
- export declare const Default: Story;
34
- export declare const WithButton: Story;
35
- export declare const WithIcon: Story;
@@ -1,2 +0,0 @@
1
- "use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var p in e)s(o,p,{get:e[p],enumerable:!0})},y=(o,e,p,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!m.call(o,r)&&r!==p&&s(o,r,{get:()=>e[r],enumerable:!(a=c(e,r))||a.enumerable});return o};var d=o=>y(s({},"__esModule",{value:!0}),o);var g={};l(g,{Default:()=>S,WithButton:()=>b,WithIcon:()=>h,default:()=>I});module.exports=d(g);var n=require("react/jsx-runtime"),t=require("../components/index"),i=require("@storybook/icons"),z=require("react");const f={title:"Components/Input",component:t.Input,subcomponents:{InputSlot:t.InputSlot},parameters:{layout:"centered",docs:{description:{component:"Input \u7EC4\u4EF6, \u7528\u4E8E\u8F93\u5165\u6846, \u53EF\u4EE5\u901A\u8FC7\u63D2\u69FD\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9, \u6BD4\u5982icon, \u6309\u94AE"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["sm","base","lg"]}},args:{size:"base"}};var I=f;const S={args:{}},b={render(){return(0,n.jsx)(t.Input,{className:"ai-rounded-3xl ai-pr-0",placeholder:"Enter your email",type:"text",children:(0,n.jsx)(t.InputSlot,{side:"right",children:(0,n.jsx)(t.Button,{className:"ai-h-full ai-rounded-none",size:"sm",children:"subscribe"})})})}},h={render(){return(0,n.jsx)(t.Input,{type:"text",placeholder:"search in site",children:(0,n.jsx)(t.InputSlot,{side:"left",children:(0,n.jsx)(i.SearchIcon,{})})})}};
2
- //# sourceMappingURL=input.stories.js.map