@anker-in/headless-ui 0.0.13 → 0.0.15

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 (42) hide show
  1. package/dist/cjs/components/heading.d.ts +1 -0
  2. package/dist/cjs/components/heading.js +1 -1
  3. package/dist/cjs/components/heading.js.map +3 -3
  4. package/dist/cjs/components/radio.js +1 -1
  5. package/dist/cjs/components/radio.js.map +3 -3
  6. package/dist/cjs/components/text.d.ts +1 -0
  7. package/dist/cjs/components/text.js +1 -1
  8. package/dist/cjs/components/text.js.map +3 -3
  9. package/dist/cjs/stories/heading.stories.d.ts +12 -0
  10. package/dist/cjs/stories/heading.stories.js +1 -1
  11. package/dist/cjs/stories/heading.stories.js.map +2 -2
  12. package/dist/cjs/stories/popover.stories.d.ts +14 -2
  13. package/dist/cjs/stories/popover.stories.js +1 -1
  14. package/dist/cjs/stories/popover.stories.js.map +3 -3
  15. package/dist/cjs/stories/text.stories.d.ts +12 -0
  16. package/dist/cjs/stories/text.stories.js +1 -1
  17. package/dist/cjs/stories/text.stories.js.map +2 -2
  18. package/dist/esm/components/heading.d.ts +1 -0
  19. package/dist/esm/components/heading.js +1 -1
  20. package/dist/esm/components/heading.js.map +3 -3
  21. package/dist/esm/components/radio.js +1 -1
  22. package/dist/esm/components/radio.js.map +3 -3
  23. package/dist/esm/components/text.d.ts +1 -0
  24. package/dist/esm/components/text.js +1 -1
  25. package/dist/esm/components/text.js.map +3 -3
  26. package/dist/esm/stories/heading.stories.d.ts +12 -0
  27. package/dist/esm/stories/heading.stories.js +1 -1
  28. package/dist/esm/stories/heading.stories.js.map +2 -2
  29. package/dist/esm/stories/popover.stories.d.ts +14 -2
  30. package/dist/esm/stories/popover.stories.js +1 -1
  31. package/dist/esm/stories/popover.stories.js.map +3 -3
  32. package/dist/esm/stories/text.stories.d.ts +12 -0
  33. package/dist/esm/stories/text.stories.js +2 -2
  34. package/dist/esm/stories/text.stories.js.map +2 -2
  35. package/package.json +1 -1
  36. package/src/components/heading.tsx +19 -1
  37. package/src/components/radio.tsx +14 -2
  38. package/src/components/text.tsx +19 -1
  39. package/src/stories/heading.stories.tsx +10 -0
  40. package/src/stories/popover.stories.tsx +19 -2
  41. package/src/stories/text.stories.tsx +10 -0
  42. package/style.css +9 -0
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  declare const headingVariants: (props?: ({
4
4
  size?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
5
5
  weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
6
+ align?: "center" | "left" | "right" | null | undefined;
6
7
  } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
8
  interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
8
9
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -1,2 +1,2 @@
1
- "use strict";var R=Object.create;var o=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of b(e))!C.call(t,n)&&n!==a&&o(t,n,{get:()=>e[n],enumerable:!(i=V(e,n))||i.enumerable});return t};var E=(t,e,a)=>(a=t!=null?R(w(t)):{},d(e||!t||!t.__esModule?o(a,"default",{value:t,enumerable:!0}):a,t)),N=t=>d(o({},"__esModule",{value:!0}),t);var T={};z(T,{Heading:()=>l});module.exports=N(T);var s=require("react/jsx-runtime"),g=require("../helpers/index.js"),p=require("@radix-ui/react-slot"),x=require("class-variance-authority"),f=E(require("react"));const S=(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"}},defaultVariants:{size:"none",weights:"normal"}}),l=f.default.forwardRef((t,e)=>{const{children:a,className:i,size:n,weights:c,asChild:P,as:u="h1",color:r,html:m,...y}=t,h=m?{dangerouslySetInnerHTML:{__html:m}}:null,H=r?{style:{color:r}}:null;return(0,s.jsx)(p.Slot,{...y,ref:e,className:(0,g.cn)(S({size:n,weights:c}),i),...h,...H,children:P?a:(0,s.jsx)(u,{children:h?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})},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";
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 },\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, weights, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weights,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsE4B,IAAAI,EAAA,6BAtE5BC,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,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,QAAAC,EAAS,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIV,EAChGW,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKT,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,QAAAC,CACF,CAAC,EACDF,CACF,EACC,GAAGQ,EACH,GAAGC,EAEH,SAAAN,EAAUJ,KAAW,OAACK,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
6
- "names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
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",
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
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var G=Object.create;var s=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var x=(i,e)=>{for(var o in e)s(i,o,{get:e[o],enumerable:!0})},c=(i,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of y(e))!g.call(i,a)&&a!==o&&s(i,a,{get:()=>e[a],enumerable:!(r=v(e,a))||r.enumerable});return i};var f=(i,e,o)=>(o=i!=null?G(b(i)):{},c(e||!i||!i.__esModule?s(o,"default",{value:i,enumerable:!0}):o,i)),I=i=>c(s({},"__esModule",{value:!0}),i);var C={};x(C,{RadioGroup:()=>m,RadioGroupItem:()=>u});module.exports=I(C);var t=require("react/jsx-runtime"),p=f(require("react")),d=f(require("@radix-ui/react-radio-group")),l=require("@radix-ui/react-icons"),P=require("class-variance-authority"),n=require("../helpers/index.js");const R=p.createContext({size:"base"}),z=(0,P.cva)("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),m=p.forwardRef(({className:i,children:e,size:o,...r},a)=>(0,t.jsx)(d.Root,{className:(0,n.cn)("grid gap-2",i),...r,ref:a,children:(0,t.jsx)(R.Provider,{value:{size:o},children:e})}));m.displayName="RadioGroup";const u=p.forwardRef(({className:i,size:e,...o},r)=>{const{size:a}=p.useContext(R);return(0,t.jsx)(d.Item,{ref:r,className:(0,n.cn)(z({size:e??a}),i),...o,children:(0,t.jsx)(d.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:(0,t.jsx)(l.CheckIcon,{})})})});u.displayName="RadioGroupItem";
1
+ "use strict";"use client";var x=Object.create;var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var C=(e,i)=>{for(var o in i)s(e,o,{get:i[o],enumerable:!0})},c=(e,i,o,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of g(i))!z.call(e,a)&&a!==o&&s(e,a,{get:()=>i[a],enumerable:!(t=y(i,a))||t.enumerable});return e};var R=(e,i,o)=>(o=e!=null?x(I(e)):{},c(i||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>c(s({},"__esModule",{value:!0}),e);var V={};C(V,{RadioGroup:()=>m,RadioGroupItem:()=>u});module.exports=h(V);var r=require("react/jsx-runtime"),p=R(require("react")),n=R(require("@radix-ui/react-radio-group")),P=require("./text.js"),G=require("@radix-ui/react-icons"),v=require("class-variance-authority"),d=require("../helpers/index.js");const l=p.createContext({size:"base"}),N=(0,v.cva)("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),m=p.forwardRef(({className:e,children:i,size:o,...t},a)=>(0,r.jsx)(n.Root,{className:(0,d.cn)("grid gap-2",e),...t,ref:a,children:(0,r.jsx)(l.Provider,{value:{size:o},children:i})}));m.displayName="RadioGroup";const u=p.forwardRef(({className:e,size:i,children:o,...t},a)=>{const{size:b}=p.useContext(l),f=(0,r.jsx)(n.Item,{ref:a,className:(0,d.cn)(N({size:i??b}),e),...t,children:(0,r.jsx)(n.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:(0,r.jsx)(G.CheckIcon,{})})});return o?(0,r.jsxs)(P.Text,{as:"label",className:(0,d.cn)("ai-flex ai-items-center ai-gap-1",e),children:[f,o]}):f});u.displayName="RadioGroupItem";
2
2
  //# sourceMappingURL=radio.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/radio.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CheckIcon } from '@radix-ui/react-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\nconst RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({\n size: 'base',\n})\n\nconst radioGroupVariants = cva(\n 'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** \u5C3A\u5BF8 */\n size?: 'sm' | 'base' | 'lg'\n}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, children, size, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>\n <RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>\n </RadioGroupPrimitive.Root>\n )\n }\n)\nRadioGroup.displayName = 'RadioGroup'\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n }\n)\nRadioGroupItem.displayName = 'RadioGroupItem'\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAqCQ,IAAAK,EAAA,6BAnCRC,EAAuB,oBACvBC,EAAqC,0CACrCC,EAA0B,iCAC1BC,EAAuC,oCACvCC,EAAmB,+BAEnB,MAAMC,EAAeL,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKM,KAAqB,OACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMV,EAAaI,EAAM,WACvB,CAAC,CAAE,UAAAO,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAEtC,OAACV,EAAoB,KAApB,CAAyB,aAAW,MAAG,aAAcM,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,mBAACN,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAI,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAZ,EAAW,YAAc,aAMzB,MAAMC,EAAiBG,EAAM,WAC3B,CAAC,CAAE,UAAAO,EAAW,KAAAE,EAAM,GAAGC,CAAM,EAAGC,IAAQ,CACtC,KAAM,CAAE,KAAMC,CAAe,EAAIZ,EAAM,WAAWK,CAAY,EAC9D,SACE,OAACJ,EAAoB,KAApB,CACC,IAAKU,EACL,aAAW,MACTL,EAAmB,CACjB,KAAMG,GAAQG,CAChB,CAAC,EACDL,CACF,EACC,GAAGG,EAEJ,mBAACT,EAAoB,UAApB,CAA8B,UAAU,gFACvC,mBAAC,cAAU,EACb,EACF,CAEJ,CACF,EACAJ,EAAe,YAAc",
6
- "names": ["radio_exports", "__export", "RadioGroup", "RadioGroupItem", "__toCommonJS", "import_jsx_runtime", "React", "RadioGroupPrimitive", "import_react_icons", "import_class_variance_authority", "import_helpers", "RadioContext", "radioGroupVariants", "className", "children", "size", "props", "ref", "sizeFromParent"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { Text } from './text.js'\nimport { CheckIcon } from '@radix-ui/react-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\nconst RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({\n size: 'base',\n})\n\nconst radioGroupVariants = cva(\n 'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** \u5C3A\u5BF8 */\n size?: 'sm' | 'base' | 'lg'\n}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, children, size, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>\n <RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>\n </RadioGroupPrimitive.Root>\n )\n }\n)\nRadioGroup.displayName = 'RadioGroup'\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, children, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n\n const ItemRadio = (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (children) {\n return (\n <Text as=\"label\" className={cn('ai-flex ai-items-center ai-gap-1', className)}>\n {ItemRadio}\n {children}\n </Text>\n )\n }\n return ItemRadio\n }\n)\nRadioGroupItem.displayName = 'RadioGroupItem'\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAsCQ,IAAAK,EAAA,6BApCRC,EAAuB,oBACvBC,EAAqC,0CACrCC,EAAqB,qBACrBC,EAA0B,iCAC1BC,EAAuC,oCACvCC,EAAmB,+BAEnB,MAAMC,EAAeN,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKO,KAAqB,OACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMX,EAAaI,EAAM,WACvB,CAAC,CAAE,UAAAQ,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAEtC,OAACX,EAAoB,KAApB,CAAyB,aAAW,MAAG,aAAcO,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,mBAACN,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAI,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAb,EAAW,YAAc,aAMzB,MAAMC,EAAiBG,EAAM,WAC3B,CAAC,CAAE,UAAAQ,EAAW,KAAAE,EAAM,SAAAD,EAAU,GAAGE,CAAM,EAAGC,IAAQ,CAChD,KAAM,CAAE,KAAMC,CAAe,EAAIb,EAAM,WAAWM,CAAY,EAExDQ,KACJ,OAACb,EAAoB,KAApB,CACC,IAAKW,EACL,aAAW,MACTL,EAAmB,CACjB,KAAMG,GAAQG,CAChB,CAAC,EACDL,CACF,EACC,GAAGG,EAEJ,mBAACV,EAAoB,UAApB,CAA8B,UAAU,gFACvC,mBAAC,cAAU,EACb,EACF,EAGF,OAAIQ,KAEA,QAAC,QAAK,GAAG,QAAQ,aAAW,MAAG,mCAAoCD,CAAS,EACzE,UAAAM,EACAL,GACH,EAGGK,CACT,CACF,EACAjB,EAAe,YAAc",
6
+ "names": ["radio_exports", "__export", "RadioGroup", "RadioGroupItem", "__toCommonJS", "import_jsx_runtime", "React", "RadioGroupPrimitive", "import_text", "import_react_icons", "import_class_variance_authority", "import_helpers", "RadioContext", "radioGroupVariants", "className", "children", "size", "props", "ref", "sizeFromParent", "ItemRadio"]
7
7
  }
@@ -4,6 +4,7 @@ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-p
4
4
  declare const textVariants: (props?: ({
5
5
  size?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
6
6
  weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
7
+ align?: "center" | "left" | "right" | null | undefined;
7
8
  } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
9
  type TextSpanProps = {
9
10
  as?: 'span';
@@ -1,2 +1,2 @@
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";
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";
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 },\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"]
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",
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
  }
@@ -36,6 +36,17 @@ declare const meta: {
36
36
  };
37
37
  };
38
38
  };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: string;
47
+ };
48
+ };
49
+ };
39
50
  color: {
40
51
  control: {
41
52
  type: "color";
@@ -62,6 +73,7 @@ declare const meta: {
62
73
  as: "h1";
63
74
  size: "none";
64
75
  weights: "normal";
76
+ align: "left";
65
77
  };
66
78
  };
67
79
  export default meta;
@@ -1,2 +1,2 @@
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."})]})};
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"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:"left"}}},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",align:"left"}};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
2
  //# sourceMappingURL=heading.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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",
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 align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: 'left' },\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 align: 'left',\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,GAuFI,IAAAM,EAAA,6BArFJC,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,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,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,SACT,MAAO,MACT,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
6
  "names": ["heading_stories_exports", "__export", "All", "Default", "heading_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
7
  }
@@ -1,5 +1,17 @@
1
- declare const _default: {
1
+ import React from 'react';
2
+ declare const meta: {
2
3
  title: string;
4
+ component: React.FC<import("@radix-ui/react-popover").PopoverProps>;
5
+ subcomponents: any;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
3
15
  };
4
- export default _default;
16
+ export default meta;
5
17
  export declare const Default: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var i in e)r(o,i,{get:e[i],enumerable:!0})},u=(o,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!l.call(o,s)&&s!==i&&r(o,s,{get:()=>e[s],enumerable:!(a=p(e,s))||a.enumerable});return o};var g=o=>u(r({},"__esModule",{value:!0}),o);var c={};d(c,{Default:()=>v,default:()=>h});module.exports=g(c);var t=require("react/jsx-runtime"),f=require("react"),n=require("../components/index"),h={title:"Components/Popover"};const v=()=>(0,t.jsxs)(n.Popover,{children:[(0,t.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,t.jsx)("button",{children:"Open popover"})}),(0,t.jsx)(n.PopoverContent,{className:"ai-w-80",children:(0,t.jsx)("div",{className:"ai-grid ai-gap-4",children:(0,t.jsx)("p",{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})})})]});
1
+ "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(s,t)=>{for(var n in t)r(s,n,{get:t[n],enumerable:!0})},u=(s,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of m(t))!d.call(s,i)&&i!==n&&r(s,i,{get:()=>t[i],enumerable:!(a=p(t,i))||a.enumerable});return s};var l=s=>u(r({},"__esModule",{value:!0}),s);var y={};c(y,{Default:()=>h,default:()=>v});module.exports=l(y);var o=require("react/jsx-runtime"),w=require("react"),e=require("../components/index");const g={title:"Components/Popover",component:e.Popover,subcomponents:{Popover:e.Popover,PopoverTrigger:e.PopoverTrigger,PopoverContent:e.PopoverContent},parameters:{layout:"centered",docs:{description:{component:"popover\u7EC4\u4EF6\uFF0C\u5728\u4E00\u4E2Aportal\u5C55\u793A\u590D\u6742ui, \u57FA\u4E8E@radix-ui/react-popover, https://www.radix-ui.com/primitives/docs/components/popover"}}},tags:["autodocs"]};var v=g;const h=()=>(0,o.jsxs)(e.Popover,{children:[(0,o.jsx)(e.PopoverTrigger,{asChild:!0,children:(0,o.jsx)("button",{children:"Open popover"})}),(0,o.jsx)(e.PopoverContent,{className:"ai-w-80 ai-bg-white",side:"right",children:(0,o.jsx)("div",{className:"ai-grid ai-gap-4",children:(0,o.jsx)("p",{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})})})]});
2
2
  //# sourceMappingURL=popover.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/popover.stories.tsx"],
4
- "sourcesContent": ["import React from 'react'\nimport { Popover, PopoverContent, PopoverTrigger } from '../components/index'\n\nexport default { title: 'Components/Popover' }\n\nexport const Default = () => (\n <Popover>\n <PopoverTrigger asChild>\n <button>Open popover</button>\n </PopoverTrigger>\n <PopoverContent className=\"ai-w-80\">\n <div className=\"ai-grid ai-gap-4\">\n <p>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to\n make a type specimen book. It has survived not only five centuries, but also the leap into electronic\n typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset\n sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus\n PageMaker including versions of Lorem Ipsum.\n </p>\n </div>\n </PopoverContent>\n </Popover>\n)\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAME,IAAAK,EAAA,6BANFC,EAAkB,iBAClBC,EAAwD,+BAEjDJ,EAAQ,CAAE,MAAO,oBAAqB,EAEtC,MAAMD,EAAU,OACrB,QAAC,WACC,oBAAC,kBAAe,QAAO,GACrB,mBAAC,UAAO,wBAAY,EACtB,KACA,OAAC,kBAAe,UAAU,UACxB,mBAAC,OAAI,UAAU,mBACb,mBAAC,KAAE,0kBAOH,EACF,EACF,GACF",
6
- "names": ["popover_stories_exports", "__export", "Default", "popover_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components"]
4
+ "sourcesContent": ["import React from 'react'\nimport { Popover, PopoverContent, PopoverTrigger } from '../components/index'\nimport type { Meta } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Popover',\n component: Popover,\n subcomponents: { Popover, PopoverTrigger, PopoverContent } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component:\n 'popover\u7EC4\u4EF6\uFF0C\u5728\u4E00\u4E2Aportal\u5C55\u793A\u590D\u6742ui, \u57FA\u4E8E@radix-ui/react-popover, https://www.radix-ui.com/primitives/docs/components/popover',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Popover>\n\nexport default meta\n\nexport const Default = () => (\n <Popover>\n <PopoverTrigger asChild>\n <button>Open popover</button>\n </PopoverTrigger>\n <PopoverContent className=\"ai-w-80 ai-bg-white\" side=\"right\">\n <div className=\"ai-grid ai-gap-4\">\n <p>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to\n make a type specimen book. It has survived not only five centuries, but also the leap into electronic\n typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset\n sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus\n PageMaker including versions of Lorem Ipsum.\n </p>\n </div>\n </PopoverContent>\n </Popover>\n)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAuBE,IAAAK,EAAA,6BAvBFC,EAAkB,iBAClBC,EAAwD,+BAGxD,MAAMC,EAAO,CACX,MAAO,qBACP,UAAW,UACX,cAAe,CAAE,kBAAS,gCAAgB,+BAAe,EACzD,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UACE,+KACJ,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAER,MAAMN,EAAU,OACrB,QAAC,WACC,oBAAC,kBAAe,QAAO,GACrB,mBAAC,UAAO,wBAAY,EACtB,KACA,OAAC,kBAAe,UAAU,sBAAsB,KAAK,QACnD,mBAAC,OAAI,UAAU,mBACb,mBAAC,KAAE,0kBAOH,EACF,EACF,GACF",
6
+ "names": ["popover_stories_exports", "__export", "Default", "popover_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "meta"]
7
7
  }
@@ -36,6 +36,17 @@ declare const meta: {
36
36
  };
37
37
  };
38
38
  };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: string;
47
+ };
48
+ };
49
+ };
39
50
  color: {
40
51
  control: {
41
52
  type: "color";
@@ -61,6 +72,7 @@ declare const meta: {
61
72
  args: {
62
73
  size: "none";
63
74
  weights: "normal";
75
+ align: "left";
64
76
  html: string;
65
77
  };
66
78
  };
@@ -1,4 +1,4 @@
1
- "use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,t)=>{for(var i in t)n(r,i,{get:t[i],enumerable:!0})},f=(r,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of p(t))!u.call(r,s)&&s!==i&&n(r,s,{get:()=>t[s],enumerable:!(a=l(t,s))||a.enumerable});return r};var h=r=>f(n({},"__esModule",{value:!0}),r);var b={};c(b,{Default:()=>x,Html:()=>T,Sizes:()=>y,Weights:()=>g,default:()=>d});module.exports=h(b);var e=require("react/jsx-runtime"),o=require("../components/index"),w=require("react");const m={title:"Typography/Text",component:o.Text,parameters:{layout:"centered",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},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",options:["none",1,2,3,4,5,6,7,8,9],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"},description:"html \u6807\u7B7E\u7C7B\u578B",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:"none",weights:"normal",html:""}};var d=m;const x={args:{children:" The quick brown fox jumps over the lazy dog.",size:"none",weights:"normal"}},y={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{size:1,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:2,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:3,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:4,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:5,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:6,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:7,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:8,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})}},g={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{weights:"light",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"normal",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"medium",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},T={render(){return(0,e.jsx)(o.Text,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
1
+ "use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,t)=>{for(var l in t)n(r,l,{get:t[l],enumerable:!0})},f=(r,t,l,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of p(t))!u.call(r,s)&&s!==l&&n(r,s,{get:()=>t[s],enumerable:!(i=a(t,s))||i.enumerable});return r};var m=r=>f(n({},"__esModule",{value:!0}),r);var b={};c(b,{Default:()=>y,Html:()=>T,Sizes:()=>x,Weights:()=>g,default:()=>d});module.exports=m(b);var e=require("react/jsx-runtime"),o=require("../components/index"),w=require("react");const h={title:"Typography/Text",component:o.Text,parameters:{layout:"centered",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},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",options:["none",1,2,3,4,5,6,7,8,9],table:{defaultValue:{summary:"none"}}},weights:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:"left"}}},color:{control:{type:"color"}},as:{control:{type:"select"},description:"html \u6807\u7B7E\u7C7B\u578B",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:"none",weights:"normal",align:"left",html:""}};var d=h;const y={args:{children:" The quick brown fox jumps over the lazy dog.",size:"none",weights:"normal"}},x={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{size:1,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:2,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:3,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:4,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:5,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:6,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:7,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:8,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})}},g={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{weights:"light",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"normal",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"medium",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},T={render(){return(0,e.jsx)(o.Text,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
2
2
  to right,
3
3
  #00ff00, /* \u7EFF\u8272 */
4
4
  #00ff99, /* \u6D45\u7EFF\u8272 */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/text.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\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 options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\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 description: 'html \u6807\u7B7E\u7C7B\u578B',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 'none',\n weights: 'normal',\n html: '',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 'none',\n weights: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={4}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={5}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={6}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={7}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={8}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={9}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Weights: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text weights=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,GA8EM,IAAAQ,EAAA,6BA5ENC,EAAqB,+BACrBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAW,OACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,2JACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,6LACb,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,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,YAAa,gCACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,OACN,QAAS,SACT,KAAM,EACR,CACF,EAEA,IAAOL,EAAQK,EAGR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,OACN,QAAS,QACX,CACF,EAEaE,EAAe,CAC1B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaC,EAAiB,CAC5B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,QAAQ,QAAQ,wDAA4C,KAClE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,OAAO,wDAA4C,GACnE,CAEJ,CACF,EAEaF,EAAc,CACzB,QAAS,CACP,SACE,OAAC,QACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\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 options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\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 align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: 'left' },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 'none',\n weights: 'normal',\n align: 'left',\n html: '',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 'none',\n weights: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={4}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={5}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={6}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={7}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={8}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={9}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Weights: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text weights=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,GAwFM,IAAAQ,EAAA,6BAtFNC,EAAqB,+BACrBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAW,OACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,2JACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,6LACb,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,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,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,YAAa,gCACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,OACN,QAAS,SACT,MAAO,OACP,KAAM,EACR,CACF,EAEA,IAAOL,EAAQK,EAGR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,OACN,QAAS,QACX,CACF,EAEaE,EAAe,CAC1B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaC,EAAiB,CAC5B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,QAAQ,QAAQ,wDAA4C,KAClE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,OAAO,wDAA4C,GACnE,CAEJ,CACF,EAEaF,EAAc,CACzB,QAAS,CACP,SACE,OAAC,QACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
6
6
  "names": ["text_stories_exports", "__export", "Default", "Html", "Sizes", "Weights", "text_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
7
7
  }
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  declare const headingVariants: (props?: ({
4
4
  size?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
5
5
  weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
6
+ align?: "center" | "left" | "right" | null | undefined;
6
7
  } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
7
8
  interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
8
9
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import{cn as f}from"../helpers/index.js";import{Slot as c}from"@radix-ui/react-slot";import{cva as P}from"class-variance-authority";import u from"react";const y=P("",{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"}}),i=u.forwardRef((l,s)=>{const{children:t,className:r,size:m,weights:h,asChild:d,as:g="h1",color:e,html:a,...p}=l,n=a?{dangerouslySetInnerHTML:{__html:a}}:null,x=e?{style:{color:e}}:null;return o(c,{...p,ref:s,className:f(y({size:m,weights:h}),r),...n,...x,children:d?t:o(g,{children:n?null:t})})});i.displayName="Heading";export{i as Heading};
1
+ import{jsx as o}from"react/jsx-runtime";import{cn as c}from"../helpers/index.js";import{Slot as P}from"@radix-ui/react-slot";import{cva as u}from"class-variance-authority";import y from"react";const H=u("",{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"}}),n=y.forwardRef((l,r)=>{const{children:t,className:s,size:h,align:g="left",weights:m,asChild:d,as:p="h1",color:e,html:a,...f}=l,i=a?{dangerouslySetInnerHTML:{__html:a}}:null,x=e?{style:{color:e}}:null;return o(P,{...f,ref:r,className:c(H({size:h,weights:m,align:g}),s),...i,...x,children:d?t:o(p,{children:i?null:t})})});n.displayName="Heading";export{n as 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 },\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, weights, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weights,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
5
- "mappings": "AAsE4B,cAAAA,MAAA,oBAtE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,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,CACF,EACA,gBAAiB,CACf,KAAM,OACN,QAAS,QACX,CACF,CAAC,EAWKG,EAAUF,EAAM,WAAyC,CAACG,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAM,QAAAC,EAAS,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIV,EAChGW,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,OACEf,EAACE,EAAA,CACE,GAAGe,EACJ,IAAKT,EACL,UAAWP,EACTI,EAAgB,CACd,KAAAM,EACA,QAAAC,CACF,CAAC,EACDF,CACF,EACC,GAAGQ,EACH,GAAGC,EAEH,SAAAN,EAAUJ,EAAWT,EAACc,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EAEDH,EAAQ,YAAc",
6
- "names": ["jsx", "cn", "Slot", "cva", "React", "headingVariants", "Heading", "props", "forwardedRef", "children", "className", "size", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
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": "AAwF4B,cAAAA,MAAA,oBAxF5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,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,EAWKG,EAAUF,EAAM,WAAyC,CAACG,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,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWP,EACTI,EAAgB,CACd,KAAAM,EACA,QAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDH,EAAQ,YAAc",
6
+ "names": ["jsx", "cn", "Slot", "cva", "React", "headingVariants", "Heading", "props", "forwardedRef", "children", "className", "size", "align", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as i}from"react/jsx-runtime";import*as e from"react";import*as p from"@radix-ui/react-radio-group";import{CheckIcon as c}from"@radix-ui/react-icons";import{cva as f}from"class-variance-authority";import{cn as d}from"../helpers/index.js";const n=e.createContext({size:"base"}),R=f("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),m=e.forwardRef(({className:o,children:a,size:r,...t},s)=>i(p.Root,{className:d("grid gap-2",o),...t,ref:s,children:i(n.Provider,{value:{size:r},children:a})}));m.displayName="RadioGroup";const u=e.forwardRef(({className:o,size:a,...r},t)=>{const{size:s}=e.useContext(n);return i(p.Item,{ref:t,className:d(R({size:a??s}),o),...r,children:i(p.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:i(c,{})})})});u.displayName="RadioGroupItem";export{m as RadioGroup,u as RadioGroupItem};
1
+ "use client";import{jsx as e,jsxs as v}from"react/jsx-runtime";import*as a from"react";import*as p from"@radix-ui/react-radio-group";import{Text as R}from"./text.js";import{CheckIcon as l}from"@radix-ui/react-icons";import{cva as P}from"class-variance-authority";import{cn as d}from"../helpers/index.js";const m=a.createContext({size:"base"}),G=P("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),u=a.forwardRef(({className:i,children:r,size:o,...t},s)=>e(p.Root,{className:d("grid gap-2",i),...t,ref:s,children:e(m.Provider,{value:{size:o},children:r})}));u.displayName="RadioGroup";const f=a.forwardRef(({className:i,size:r,children:o,...t},s)=>{const{size:c}=a.useContext(m),n=e(p.Item,{ref:s,className:d(G({size:r??c}),i),...t,children:e(p.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:e(l,{})})});return o?v(R,{as:"label",className:d("ai-flex ai-items-center ai-gap-1",i),children:[n,o]}):n});f.displayName="RadioGroupItem";export{u as RadioGroup,f as RadioGroupItem};
2
2
  //# sourceMappingURL=radio.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/radio.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CheckIcon } from '@radix-ui/react-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\nconst RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({\n size: 'base',\n})\n\nconst radioGroupVariants = cva(\n 'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** \u5C3A\u5BF8 */\n size?: 'sm' | 'base' | 'lg'\n}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, children, size, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>\n <RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>\n </RadioGroupPrimitive.Root>\n )\n }\n)\nRadioGroup.displayName = 'RadioGroup'\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n }\n)\nRadioGroupItem.displayName = 'RadioGroupItem'\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
5
- "mappings": "aAqCQ,cAAAA,MAAA,oBAnCR,UAAYC,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,aAAAC,MAAiB,wBAC1B,OAAS,OAAAC,MAA8B,2BACvC,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAAeL,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKM,EAAqBH,EACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMI,EAAaP,EAAM,WACvB,CAAC,CAAE,UAAAQ,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAEtCb,EAACE,EAAoB,KAApB,CAAyB,UAAWG,EAAG,aAAcI,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,SAAAb,EAACM,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAK,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAF,EAAW,YAAc,aAMzB,MAAMM,EAAiBb,EAAM,WAC3B,CAAC,CAAE,UAAAQ,EAAW,KAAAE,EAAM,GAAGC,CAAM,EAAGC,IAAQ,CACtC,KAAM,CAAE,KAAME,CAAe,EAAId,EAAM,WAAWK,CAAY,EAC9D,OACEN,EAACE,EAAoB,KAApB,CACC,IAAKW,EACL,UAAWR,EACTE,EAAmB,CACjB,KAAMI,GAAQI,CAChB,CAAC,EACDN,CACF,EACC,GAAGG,EAEJ,SAAAZ,EAACE,EAAoB,UAApB,CAA8B,UAAU,gFACvC,SAAAF,EAACG,EAAA,EAAU,EACb,EACF,CAEJ,CACF,EACAW,EAAe,YAAc",
6
- "names": ["jsx", "React", "RadioGroupPrimitive", "CheckIcon", "cva", "cn", "RadioContext", "radioGroupVariants", "RadioGroup", "className", "children", "size", "props", "ref", "RadioGroupItem", "sizeFromParent"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { Text } from './text.js'\nimport { CheckIcon } from '@radix-ui/react-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\nconst RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({\n size: 'base',\n})\n\nconst radioGroupVariants = cva(\n 'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',\n {\n variants: {\n size: {\n sm: 'ai-size-[14px]',\n base: 'ai-size-4',\n lg: 'ai-size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /** \u5C3A\u5BF8 */\n size?: 'sm' | 'base' | 'lg'\n}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, children, size, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>\n <RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>\n </RadioGroupPrimitive.Root>\n )\n }\n)\nRadioGroup.displayName = 'RadioGroup'\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, children, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n\n const ItemRadio = (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (children) {\n return (\n <Text as=\"label\" className={cn('ai-flex ai-items-center ai-gap-1', className)}>\n {ItemRadio}\n {children}\n </Text>\n )\n }\n return ItemRadio\n }\n)\nRadioGroupItem.displayName = 'RadioGroupItem'\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
5
+ "mappings": "aAsCQ,cAAAA,EAkCA,QAAAC,MAlCA,oBApCR,UAAYC,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,QAAAC,MAAY,YACrB,OAAS,aAAAC,MAAiB,wBAC1B,OAAS,OAAAC,MAA8B,2BACvC,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAAeN,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKO,EAAqBH,EACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMI,EAAaR,EAAM,WACvB,CAAC,CAAE,UAAAS,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAEtCf,EAACG,EAAoB,KAApB,CAAyB,UAAWI,EAAG,aAAcI,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,SAAAf,EAACQ,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAK,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAF,EAAW,YAAc,aAMzB,MAAMM,EAAiBd,EAAM,WAC3B,CAAC,CAAE,UAAAS,EAAW,KAAAE,EAAM,SAAAD,EAAU,GAAGE,CAAM,EAAGC,IAAQ,CAChD,KAAM,CAAE,KAAME,CAAe,EAAIf,EAAM,WAAWM,CAAY,EAExDU,EACJlB,EAACG,EAAoB,KAApB,CACC,IAAKY,EACL,UAAWR,EACTE,EAAmB,CACjB,KAAMI,GAAQI,CAChB,CAAC,EACDN,CACF,EACC,GAAGG,EAEJ,SAAAd,EAACG,EAAoB,UAApB,CAA8B,UAAU,gFACvC,SAAAH,EAACK,EAAA,EAAU,EACb,EACF,EAGF,OAAIO,EAEAX,EAACG,EAAA,CAAK,GAAG,QAAQ,UAAWG,EAAG,mCAAoCI,CAAS,EACzE,UAAAO,EACAN,GACH,EAGGM,CACT,CACF,EACAF,EAAe,YAAc",
6
+ "names": ["jsx", "jsxs", "React", "RadioGroupPrimitive", "Text", "CheckIcon", "cva", "cn", "RadioContext", "radioGroupVariants", "RadioGroup", "className", "children", "size", "props", "ref", "RadioGroupItem", "sizeFromParent", "ItemRadio"]
7
7
  }
@@ -4,6 +4,7 @@ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-p
4
4
  declare const textVariants: (props?: ({
5
5
  size?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
6
6
  weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
7
+ align?: "center" | "left" | "right" | null | undefined;
7
8
  } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
9
  type TextSpanProps = {
9
10
  as?: 'span';
@@ -1,2 +1,2 @@
1
- import{jsx as p}from"react/jsx-runtime";import*as h from"react";import{Slot as f}from"@radix-ui/react-slot";import{cn as c}from"../helpers/index.js";import{cva as y}from"class-variance-authority";const u=y("",{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"}}),a=h.forwardRef((n,r)=>{const{children:t,size:i="none",weights:l,className:m,asChild:x,as:P="span",color:e,html:o,...d}=n,s=o?{dangerouslySetInnerHTML:{__html:o}}:null,T=e?{style:{color:e}}:null;return p(f,{...d,ref:r,className:c(u({size:i,weights:l}),m),...s,...T,children:x?t:p(P,{children:s?null:t})})});a.displayName="Text";export{a as Text};
1
+ import{jsx as n}from"react/jsx-runtime";import*as T from"react";import{Slot as c}from"@radix-ui/react-slot";import{cn as g}from"../helpers/index.js";import{cva as y}from"class-variance-authority";const u=y("",{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"}}),a=T.forwardRef((r,p)=>{const{children:t,size:i="none",weights:l,align:m="left",className:x,asChild:P,as:d="span",color:e,html:o,...f}=r,s=o?{dangerouslySetInnerHTML:{__html:o}}:null,h=e?{style:{color:e}}:null;return n(c,{...f,ref:p,className:g(u({size:i,weights:l,align:m}),x),...s,...h,children:P?t:n(d,{children:s?null:t})})});a.displayName="Text";export{a as 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 },\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": "AAgF4B,cAAAA,MAAA,oBAhF5B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,MAAAC,MAAU,sBACnB,OAA4B,OAAAC,MAAW,2BAGvC,MAAMC,EAAeD,EAAI,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,EAkBKE,EAAOL,EAAM,WAAmC,CAACM,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,OACEf,EAACE,EAAA,CACE,GAAGe,EACJ,IAAKT,EACL,UAAWL,EACTE,EAAa,CACX,KAAAK,EACA,QAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUJ,EAAWT,EAACc,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EACDH,EAAK,YAAc",
6
- "names": ["jsx", "React", "Slot", "cn", "cva", "textVariants", "Text", "props", "forwardedRef", "children", "size", "weights", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
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": "AAkG4B,cAAAA,MAAA,oBAlG5B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,MAAAC,MAAU,sBACnB,OAA4B,OAAAC,MAAW,2BAGvC,MAAMC,EAAeD,EAAI,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,EAkBKE,EAAOL,EAAM,WAAmC,CAACM,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,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWL,EACTE,EAAa,CACX,KAAAK,EACA,QAAAC,EACA,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDH,EAAK,YAAc",
6
+ "names": ["jsx", "React", "Slot", "cn", "cva", "textVariants", "Text", "props", "forwardedRef", "children", "size", "weights", "align", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -36,6 +36,17 @@ declare const meta: {
36
36
  };
37
37
  };
38
38
  };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: string;
47
+ };
48
+ };
49
+ };
39
50
  color: {
40
51
  control: {
41
52
  type: "color";
@@ -62,6 +73,7 @@ declare const meta: {
62
73
  as: "h1";
63
74
  size: "none";
64
75
  weights: "normal";
76
+ align: "left";
65
77
  };
66
78
  };
67
79
  export default meta;
@@ -1,2 +1,2 @@
1
- import{Fragment as r,jsx as o,jsxs as a}from"react/jsx-runtime";import{Heading as e}from"../components/index";import"react";const t={title:"Typography/Heading",component:e,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 l=t;const d={args:{as:"h1",children:" The quick brown fox jumps over the lazy dog."}},p={render:()=>a(r,{children:[o(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:3,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:4,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:5,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:6,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:7,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:8,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})};export{p as All,d as Default,l as default};
1
+ import{Fragment as r,jsx as o,jsxs as a}from"react/jsx-runtime";import{Heading as e}from"../components/index";import"react";const t={title:"Typography/Heading",component:e,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"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:"left"}}},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",align:"left"}};var l=t;const d={args:{as:"h1",children:" The quick brown fox jumps over the lazy dog."}},p={render:()=>a(r,{children:[o(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:3,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:4,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:5,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:6,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:7,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:8,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})};export{p as All,d as Default,l as default};
2
2
  //# sourceMappingURL=heading.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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": "AA6EI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBA3EJ,OAAS,WAAAC,MAAe,sBACxB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,qBACP,UAAWD,EACX,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,IAAOE,EAAQD,EAIR,MAAME,EAAiB,CAC5B,KAAM,CACJ,GAAI,KACJ,SAAU,+CACZ,CACF,EAEaC,EAAa,CACxB,OAAQ,IACNL,EAAAF,EAAA,CACE,UAAAC,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,GAChE,CAEJ",
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 align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: 'left' },\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 align: 'left',\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": "AAuFI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBArFJ,OAAS,WAAAC,MAAe,sBACxB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,qBACP,UAAWD,EACX,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,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,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,SACT,MAAO,MACT,CACF,EAEA,IAAOE,EAAQD,EAIR,MAAME,EAAiB,CAC5B,KAAM,CACJ,GAAI,KACJ,SAAU,+CACZ,CACF,EAEaC,EAAa,CACxB,OAAQ,IACNL,EAAAF,EAAA,CACE,UAAAC,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,GAChE,CAEJ",
6
6
  "names": ["Fragment", "jsx", "jsxs", "Heading", "meta", "heading_stories_default", "Default", "All"]
7
7
  }
@@ -1,5 +1,17 @@
1
- declare const _default: {
1
+ import React from 'react';
2
+ declare const meta: {
2
3
  title: string;
4
+ component: React.FC<import("@radix-ui/react-popover").PopoverProps>;
5
+ subcomponents: any;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
3
15
  };
4
- export default _default;
16
+ export default meta;
5
17
  export declare const Default: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as s}from"react/jsx-runtime";import"react";import{Popover as t,PopoverContent as o,PopoverTrigger as n}from"../components/index";var p={title:"Components/Popover"};const m=()=>s(t,{children:[e(n,{asChild:!0,children:e("button",{children:"Open popover"})}),e(o,{className:"ai-w-80",children:e("div",{className:"ai-grid ai-gap-4",children:e("p",{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})})})]});export{m as Default,p as default};
1
+ import{jsx as e,jsxs as n}from"react/jsx-runtime";import"react";import{Popover as t,PopoverContent as o,PopoverTrigger as s}from"../components/index";const i={title:"Components/Popover",component:t,subcomponents:{Popover:t,PopoverTrigger:s,PopoverContent:o},parameters:{layout:"centered",docs:{description:{component:"popover\u7EC4\u4EF6\uFF0C\u5728\u4E00\u4E2Aportal\u5C55\u793A\u590D\u6742ui, \u57FA\u4E8E@radix-ui/react-popover, https://www.radix-ui.com/primitives/docs/components/popover"}}},tags:["autodocs"]};var m=i;const d=()=>n(t,{children:[e(s,{asChild:!0,children:e("button",{children:"Open popover"})}),e(o,{className:"ai-w-80 ai-bg-white",side:"right",children:e("div",{className:"ai-grid ai-gap-4",children:e("p",{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})})})]});export{d as Default,m as default};
2
2
  //# sourceMappingURL=popover.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/popover.stories.tsx"],
4
- "sourcesContent": ["import React from 'react'\nimport { Popover, PopoverContent, PopoverTrigger } from '../components/index'\n\nexport default { title: 'Components/Popover' }\n\nexport const Default = () => (\n <Popover>\n <PopoverTrigger asChild>\n <button>Open popover</button>\n </PopoverTrigger>\n <PopoverContent className=\"ai-w-80\">\n <div className=\"ai-grid ai-gap-4\">\n <p>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to\n make a type specimen book. It has survived not only five centuries, but also the leap into electronic\n typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset\n sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus\n PageMaker including versions of Lorem Ipsum.\n </p>\n </div>\n </PopoverContent>\n </Popover>\n)\n"],
5
- "mappings": "AAME,OAEI,OAAAA,EAFJ,QAAAC,MAAA,oBANF,MAAkB,QAClB,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,sBAExD,IAAOC,EAAQ,CAAE,MAAO,oBAAqB,EAEtC,MAAMC,EAAU,IACrBL,EAACC,EAAA,CACC,UAAAF,EAACI,EAAA,CAAe,QAAO,GACrB,SAAAJ,EAAC,UAAO,wBAAY,EACtB,EACAA,EAACG,EAAA,CAAe,UAAU,UACxB,SAAAH,EAAC,OAAI,UAAU,mBACb,SAAAA,EAAC,KAAE,0kBAOH,EACF,EACF,GACF",
6
- "names": ["jsx", "jsxs", "Popover", "PopoverContent", "PopoverTrigger", "popover_stories_default", "Default"]
4
+ "sourcesContent": ["import React from 'react'\nimport { Popover, PopoverContent, PopoverTrigger } from '../components/index'\nimport type { Meta } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Popover',\n component: Popover,\n subcomponents: { Popover, PopoverTrigger, PopoverContent } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component:\n 'popover\u7EC4\u4EF6\uFF0C\u5728\u4E00\u4E2Aportal\u5C55\u793A\u590D\u6742ui, \u57FA\u4E8E@radix-ui/react-popover, https://www.radix-ui.com/primitives/docs/components/popover',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Popover>\n\nexport default meta\n\nexport const Default = () => (\n <Popover>\n <PopoverTrigger asChild>\n <button>Open popover</button>\n </PopoverTrigger>\n <PopoverContent className=\"ai-w-80 ai-bg-white\" side=\"right\">\n <div className=\"ai-grid ai-gap-4\">\n <p>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to\n make a type specimen book. It has survived not only five centuries, but also the leap into electronic\n typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset\n sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus\n PageMaker including versions of Lorem Ipsum.\n </p>\n </div>\n </PopoverContent>\n </Popover>\n)\n"],
5
+ "mappings": "AAuBE,OAEI,OAAAA,EAFJ,QAAAC,MAAA,oBAvBF,MAAkB,QAClB,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,sBAGxD,MAAMC,EAAO,CACX,MAAO,qBACP,UAAWH,EACX,cAAe,CAAE,QAAAA,EAAS,eAAAE,EAAgB,eAAAD,CAAe,EACzD,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UACE,+KACJ,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOG,EAAQD,EAER,MAAME,EAAU,IACrBN,EAACC,EAAA,CACC,UAAAF,EAACI,EAAA,CAAe,QAAO,GACrB,SAAAJ,EAAC,UAAO,wBAAY,EACtB,EACAA,EAACG,EAAA,CAAe,UAAU,sBAAsB,KAAK,QACnD,SAAAH,EAAC,OAAI,UAAU,mBACb,SAAAA,EAAC,KAAE,0kBAOH,EACF,EACF,GACF",
6
+ "names": ["jsx", "jsxs", "Popover", "PopoverContent", "PopoverTrigger", "meta", "popover_stories_default", "Default"]
7
7
  }
@@ -36,6 +36,17 @@ declare const meta: {
36
36
  };
37
37
  };
38
38
  };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: string;
47
+ };
48
+ };
49
+ };
39
50
  color: {
40
51
  control: {
41
52
  type: "color";
@@ -61,6 +72,7 @@ declare const meta: {
61
72
  args: {
62
73
  size: "none";
63
74
  weights: "normal";
75
+ align: "left";
64
76
  html: string;
65
77
  };
66
78
  };
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as t}from"react/jsx-runtime";import{Text as e}from"../components/index";import"react";const r={title:"Typography/Text",component:e,parameters:{layout:"centered",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},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",options:["none",1,2,3,4,5,6,7,8,9],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"},description:"html \u6807\u7B7E\u7C7B\u578B",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:"none",weights:"normal",html:""}};var a=r;const l={args:{children:" The quick brown fox jumps over the lazy dog.",size:"none",weights:"normal"}},p={render(){return t("div",{className:"ai-flex ai-flex-col",children:[o(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:3,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:4,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:5,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:6,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:7,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:8,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})}},u={render(){return t("div",{className:"ai-flex ai-flex-col",children:[o(e,{weights:"light",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"normal",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"medium",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},c={render(){return o(e,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
1
+ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{Text as e}from"../components/index";import"react";const r={title:"Typography/Text",component:e,parameters:{layout:"centered",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},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",options:["none",1,2,3,4,5,6,7,8,9],table:{defaultValue:{summary:"none"}}},weights:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:"left"}}},color:{control:{type:"color"}},as:{control:{type:"select"},description:"html \u6807\u7B7E\u7C7B\u578B",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:"none",weights:"normal",align:"left",html:""}};var i=r;const a={args:{children:" The quick brown fox jumps over the lazy dog.",size:"none",weights:"normal"}},p={render(){return t("div",{className:"ai-flex ai-flex-col",children:[o(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:3,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:4,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:5,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:6,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:7,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:8,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})}},u={render(){return t("div",{className:"ai-flex ai-flex-col",children:[o(e,{weights:"light",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"normal",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"medium",children:"The quick brown fox jumps over the lazy dog."}),o(e,{weights:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},c={render(){return o(e,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
2
2
  to right,
3
3
  #00ff00, /* \u7EFF\u8272 */
4
4
  #00ff99, /* \u6D45\u7EFF\u8272 */
@@ -6,5 +6,5 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{Text as e}from"../compo
6
6
  #0099ff, /* \u6D45\u84DD\u8272 */
7
7
  #8000ff, /* \u7D2B\u8272 */
8
8
  #ff00ff /* \u7C89\u8272 */
9
- );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`})}};export{l as Default,c as Html,p as Sizes,u as Weights,a as default};
9
+ );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`})}};export{a as Default,c as Html,p as Sizes,u as Weights,i as default};
10
10
  //# sourceMappingURL=text.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/text.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\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 options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\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 description: 'html \u6807\u7B7E\u7C7B\u578B',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 'none',\n weights: 'normal',\n html: '',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 'none',\n weights: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={4}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={5}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={6}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={7}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={8}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={9}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Weights: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text weights=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
5
- "mappings": "AA8EM,OACE,OAAAA,EADF,QAAAC,MAAA,oBA5EN,OAAS,QAAAC,MAAY,sBACrB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAWD,EACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,2JACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,6LACb,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,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,YAAa,gCACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,OACN,QAAS,SACT,KAAM,EACR,CACF,EAEA,IAAOE,EAAQD,EAGR,MAAME,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,OACN,QAAS,QACX,CACF,EAEaC,EAAe,CAC1B,QAAS,CACP,OACEL,EAAC,OAAI,UAAU,sBACb,UAAAD,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaK,EAAiB,CAC5B,QAAS,CACP,OACEN,EAAC,OAAI,UAAU,sBACb,UAAAD,EAACE,EAAA,CAAK,QAAQ,QAAQ,wDAA4C,EAClEF,EAACE,EAAA,CAAK,QAAQ,SAAS,wDAA4C,EACnEF,EAACE,EAAA,CAAK,QAAQ,SAAS,wDAA4C,EACnEF,EAACE,EAAA,CAAK,QAAQ,OAAO,wDAA4C,GACnE,CAEJ,CACF,EAEaM,EAAc,CACzB,QAAS,CACP,OACER,EAACE,EAAA,CACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\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 options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\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 align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: 'left' },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 'none',\n weights: 'normal',\n align: 'left',\n html: '',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 'none',\n weights: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={4}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={5}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={6}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={7}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={8}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={9}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Weights: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text weights=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
5
+ "mappings": "AAwFM,OACE,OAAAA,EADF,QAAAC,MAAA,oBAtFN,OAAS,QAAAC,MAAY,sBACrB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAWD,EACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,2JACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,6LACb,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,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,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,YAAa,gCACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,OACN,QAAS,SACT,MAAO,OACP,KAAM,EACR,CACF,EAEA,IAAOE,EAAQD,EAGR,MAAME,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,OACN,QAAS,QACX,CACF,EAEaC,EAAe,CAC1B,QAAS,CACP,OACEL,EAAC,OAAI,UAAU,sBACb,UAAAD,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaK,EAAiB,CAC5B,QAAS,CACP,OACEN,EAAC,OAAI,UAAU,sBACb,UAAAD,EAACE,EAAA,CAAK,QAAQ,QAAQ,wDAA4C,EAClEF,EAACE,EAAA,CAAK,QAAQ,SAAS,wDAA4C,EACnEF,EAACE,EAAA,CAAK,QAAQ,SAAS,wDAA4C,EACnEF,EAACE,EAAA,CAAK,QAAQ,OAAO,wDAA4C,GACnE,CAEJ,CACF,EAEaM,EAAc,CACzB,QAAS,CACP,OACER,EAACE,EAAA,CACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
6
6
  "names": ["jsx", "jsxs", "Text", "meta", "text_stories_default", "Default", "Sizes", "Weights", "Html"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
@@ -23,10 +23,16 @@ const headingVariants = cva('', {
23
23
  medium: 'ai-font-medium',
24
24
  bold: 'ai-font-bold',
25
25
  },
26
+ align: {
27
+ left: 'ai-text-left',
28
+ center: 'ai-text-center',
29
+ right: 'ai-text-right',
30
+ },
26
31
  },
27
32
  defaultVariants: {
28
33
  size: 'none',
29
34
  weights: 'normal',
35
+ align: 'left',
30
36
  },
31
37
  })
32
38
 
@@ -40,7 +46,18 @@ interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProp
40
46
  }
41
47
 
42
48
  const Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {
43
- const { children, className, size, weights, asChild, as: Tag = 'h1', color, html, ...headingProps } = props
49
+ const {
50
+ children,
51
+ className,
52
+ size,
53
+ align = 'left',
54
+ weights,
55
+ asChild,
56
+ as: Tag = 'h1',
57
+ color,
58
+ html,
59
+ ...headingProps
60
+ } = props
44
61
  const htmlContentProps = html
45
62
  ? {
46
63
  dangerouslySetInnerHTML: { __html: html },
@@ -62,6 +79,7 @@ const Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwarded
62
79
  headingVariants({
63
80
  size,
64
81
  weights,
82
+ align,
65
83
  }),
66
84
  className
67
85
  )}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'
5
+ import { Text } from './text.js'
5
6
  import { CheckIcon } from '@radix-ui/react-icons'
6
7
  import { cva, type VariantProps } from 'class-variance-authority'
7
8
  import { cn } from '../helpers/index.js'
@@ -47,9 +48,10 @@ interface RadioGroupItemProps
47
48
  VariantProps<typeof radioGroupVariants> {}
48
49
 
49
50
  const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
50
- ({ className, size, ...props }, ref) => {
51
+ ({ className, size, children, ...props }, ref) => {
51
52
  const { size: sizeFromParent } = React.useContext(RadioContext)
52
- return (
53
+
54
+ const ItemRadio = (
53
55
  <RadioGroupPrimitive.Item
54
56
  ref={ref}
55
57
  className={cn(
@@ -65,6 +67,16 @@ const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimit
65
67
  </RadioGroupPrimitive.Indicator>
66
68
  </RadioGroupPrimitive.Item>
67
69
  )
70
+
71
+ if (children) {
72
+ return (
73
+ <Text as="label" className={cn('ai-flex ai-items-center ai-gap-1', className)}>
74
+ {ItemRadio}
75
+ {children}
76
+ </Text>
77
+ )
78
+ }
79
+ return ItemRadio
68
80
  }
69
81
  )
70
82
  RadioGroupItem.displayName = 'RadioGroupItem'
@@ -24,10 +24,16 @@ const textVariants = cva('', {
24
24
  medium: 'ai-font-medium',
25
25
  bold: 'ai-font-bold',
26
26
  },
27
+ align: {
28
+ left: 'ai-text-left',
29
+ center: 'ai-text-center',
30
+ right: 'ai-text-right',
31
+ },
27
32
  },
28
33
  defaultVariants: {
29
34
  size: 'none',
30
35
  weights: 'normal',
36
+ align: 'left',
31
37
  },
32
38
  })
33
39
 
@@ -48,7 +54,18 @@ interface CommonTextProps extends VariantProps<typeof textVariants> {
48
54
  type TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)
49
55
 
50
56
  const Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {
51
- const { children, size = 'none', weights, className, asChild, as: Tag = 'span', color, html, ...textProps } = props
57
+ const {
58
+ children,
59
+ size = 'none',
60
+ weights,
61
+ align = 'left',
62
+ className,
63
+ asChild,
64
+ as: Tag = 'span',
65
+ color,
66
+ html,
67
+ ...textProps
68
+ } = props
52
69
 
53
70
  const htmlContentProps = html
54
71
  ? {
@@ -72,6 +89,7 @@ const Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {
72
89
  textVariants({
73
90
  size,
74
91
  weights,
92
+ align,
75
93
  }),
76
94
  className
77
95
  )}
@@ -35,6 +35,15 @@ const meta = {
35
35
  defaultValue: { summary: 'normal' },
36
36
  },
37
37
  },
38
+ align: {
39
+ control: {
40
+ type: 'select',
41
+ },
42
+ options: ['left', 'center', 'right'],
43
+ table: {
44
+ defaultValue: { summary: 'left' },
45
+ },
46
+ },
38
47
  color: {
39
48
  control: {
40
49
  type: 'color',
@@ -59,6 +68,7 @@ const meta = {
59
68
  as: 'h1',
60
69
  size: 'none',
61
70
  weights: 'normal',
71
+ align: 'left',
62
72
  },
63
73
  } satisfies Meta<typeof Heading>
64
74
 
@@ -1,14 +1,31 @@
1
1
  import React from 'react'
2
2
  import { Popover, PopoverContent, PopoverTrigger } from '../components/index'
3
+ import type { Meta } from '@storybook/react/*'
3
4
 
4
- export default { title: 'Components/Popover' }
5
+ const meta = {
6
+ title: 'Components/Popover',
7
+ component: Popover,
8
+ subcomponents: { Popover, PopoverTrigger, PopoverContent } as any,
9
+ parameters: {
10
+ layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'popover组件,在一个portal展示复杂ui, 基于@radix-ui/react-popover, https://www.radix-ui.com/primitives/docs/components/popover',
15
+ },
16
+ },
17
+ },
18
+ tags: ['autodocs'],
19
+ } satisfies Meta<typeof Popover>
20
+
21
+ export default meta
5
22
 
6
23
  export const Default = () => (
7
24
  <Popover>
8
25
  <PopoverTrigger asChild>
9
26
  <button>Open popover</button>
10
27
  </PopoverTrigger>
11
- <PopoverContent className="ai-w-80">
28
+ <PopoverContent className="ai-w-80 ai-bg-white" side="right">
12
29
  <div className="ai-grid ai-gap-4">
13
30
  <p>
14
31
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
@@ -35,6 +35,15 @@ const meta = {
35
35
  defaultValue: { summary: 'normal' },
36
36
  },
37
37
  },
38
+ align: {
39
+ control: {
40
+ type: 'select',
41
+ },
42
+ options: ['left', 'center', 'right'],
43
+ table: {
44
+ defaultValue: { summary: 'left' },
45
+ },
46
+ },
38
47
  color: {
39
48
  control: {
40
49
  type: 'color',
@@ -58,6 +67,7 @@ const meta = {
58
67
  args: {
59
68
  size: 'none',
60
69
  weights: 'normal',
70
+ align: 'left',
61
71
  html: '',
62
72
  },
63
73
  } satisfies Meta<typeof Text>
package/style.css CHANGED
@@ -662,6 +662,9 @@ video {
662
662
  .ai-justify-center {
663
663
  justify-content: center;
664
664
  }
665
+ .ai-gap-1 {
666
+ gap: 0.25rem;
667
+ }
665
668
  .ai-gap-4 {
666
669
  gap: 1rem;
667
670
  }
@@ -779,9 +782,15 @@ video {
779
782
  .ai-pr-0 {
780
783
  padding-right: 0px;
781
784
  }
785
+ .ai-text-left {
786
+ text-align: left;
787
+ }
782
788
  .ai-text-center {
783
789
  text-align: center;
784
790
  }
791
+ .ai-text-right {
792
+ text-align: right;
793
+ }
785
794
  .ai-text-2xl {
786
795
  font-size: 1.5rem;
787
796
  line-height: 2rem;