@anker-in/headless-ui 1.3.5 → 1.3.6

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.
@@ -9,9 +9,10 @@ export type GraphicMoreDataType = {
9
9
  fullWidth: 'true' | 'false';
10
10
  span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
11
11
  };
12
- interface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement>, ContainerProps {
12
+ interface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement> {
13
13
  data: {
14
14
  shape?: 'rounded' | 'square';
15
+ container?: ContainerProps['container'];
15
16
  productsTab: GraphicMoreDataType[];
16
17
  };
17
18
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var c=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var k=(l,o)=>{for(var a in o)c(l,a,{get:o[a],enumerable:!0})},v=(l,o,a,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of x(o))!h.call(l,s)&&s!==a&&c(l,s,{get:()=>o[s],enumerable:!(i=f(o,s))||i.enumerable});return l};var b=l=>v(c({},"__esModule",{value:!0}),l);var T={};k(T,{default:()=>w});module.exports=b(T);var e=require("react/jsx-runtime"),r=require("../../helpers/utils.js"),g=require("../../shared/Styles.js"),p=require("../../components/grid.js"),d=require("../../components/index.js");const N={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},y=({data:l,className:o,container:a,...i})=>{const{productsTab:s,shape:m}=l,u=a?.desktopSpan??12;return(0,e.jsxs)("div",{...i,className:(0,r.cn)(o),children:[(0,e.jsx)("div",{className:(0,r.cn)("creativeModuleBlock","tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]"),children:(0,e.jsx)(p.Grid,{className:(0,r.cn)("laptop:gap-4 grid gap-3",N[u],o),children:s?.map((t,n)=>(0,e.jsxs)(p.GridItem,{span:t.span,className:(0,r.cn)("text-info-primary relative w-full overflow-hidden",m==="rounded"?"rounded-2xl":"rounded-none","",{"aiui-dark":t?.theme==="dark"}),children:[(0,e.jsx)(d.Picture,{source:t?.img?.url,className:"size-full",imgClassName:""}),(0,e.jsxs)("div",{className:"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[t?.title&&(0,e.jsx)(d.Text,{html:t?.title,as:"p",className:"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]"}),t?.description&&(0,e.jsx)(d.Text,{html:t?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold"})]})]},n))})}),(0,e.jsx)("div",{className:"tablet:hidden block text-[#080A0F]",children:(0,e.jsx)("div",{className:" flex flex-wrap gap-[12px]",children:s?.map((t,n)=>(0,e.jsxs)("div",{className:(0,r.cn)("text-info-primary relative overflow-hidden",m==="rounded"?"rounded-xl":"rounded-none",{"aiui-dark":t?.theme==="dark"},t?.fullWidth==="true"?"w-full flex-none":" w-[calc(50%-6px)]"),children:[(0,e.jsx)(d.Picture,{source:t?.mobileImg?.url,className:"size-full",imgClassName:"h-full object-cover"}),(0,e.jsxs)("div",{className:"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[t?.title&&(0,e.jsx)(d.Text,{html:t?.title,as:"p",className:"lg-desktop:text-2xl text-xl font-bold leading-[1.2]"}),t?.description&&(0,e.jsx)(d.Text,{html:t?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]"})]})]},n))})})]})};var w=(0,g.withLayout)(y);
1
+ "use strict";"use client";var c=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var k=(o,l)=>{for(var a in l)c(o,a,{get:l[a],enumerable:!0})},v=(o,l,a,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let s of x(l))!h.call(o,s)&&s!==a&&c(o,s,{get:()=>l[s],enumerable:!(i=f(l,s))||i.enumerable});return o};var b=o=>v(c({},"__esModule",{value:!0}),o);var T={};k(T,{default:()=>S});module.exports=b(T);var e=require("react/jsx-runtime"),d=require("../../helpers/utils.js"),m=require("../../shared/Styles.js"),p=require("../../components/grid.js"),r=require("../../components/index.js");const N={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},y=o=>{const l=o&&o>=1&&o<=12?o:12;return N[l]},w=({data:o,className:l,...a})=>{const{productsTab:i,shape:s,container:g}=o,u=y(g?.desktopSpan);return(0,e.jsxs)("div",{...a,className:(0,d.cn)(l),children:[(0,e.jsx)("div",{className:(0,d.cn)("creativeModuleBlock","tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]"),children:(0,e.jsx)(p.Grid,{className:(0,d.cn)("laptop:gap-4 grid gap-3",u,l),children:i?.map((t,n)=>(0,e.jsxs)(p.GridItem,{span:t.span,className:(0,d.cn)("text-info-primary relative w-full overflow-hidden",s==="rounded"?"rounded-2xl":"rounded-none","",{"aiui-dark":t?.theme==="dark"}),children:[(0,e.jsx)(r.Picture,{source:t?.img?.url,className:"size-full",imgClassName:""}),(0,e.jsxs)("div",{className:"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[t?.title&&(0,e.jsx)(r.Text,{html:t?.title,as:"p",className:"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]"}),t?.description&&(0,e.jsx)(r.Text,{html:t?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold"})]})]},n))})}),(0,e.jsx)("div",{className:"tablet:hidden block text-[#080A0F]",children:(0,e.jsx)("div",{className:" flex flex-wrap gap-[12px]",children:i?.map((t,n)=>(0,e.jsxs)("div",{className:(0,d.cn)("text-info-primary relative overflow-hidden",s==="rounded"?"rounded-xl":"rounded-none",{"aiui-dark":t?.theme==="dark"},t?.fullWidth==="true"?"w-full flex-none":" w-[calc(50%-6px)]"),children:[(0,e.jsx)(r.Picture,{source:t?.mobileImg?.url,className:"size-full",imgClassName:"h-full object-cover"}),(0,e.jsxs)("div",{className:"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[t?.title&&(0,e.jsx)(r.Text,{html:t?.title,as:"p",className:"lg-desktop:text-2xl text-xl font-bold leading-[1.2]"}),t?.description&&(0,e.jsx)(r.Text,{html:t?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]"})]})]},n))})})]})};var S=(0,m.withLayout)(w);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/GraphicMore/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout, type ContainerProps } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type GraphicMoreDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n fullWidth: 'true' | 'false'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\ntype DesktopSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\nconst DESKTOP_SPAN_CLASS: Record<DesktopSpan, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 5: 'grid-cols-5',\n 6: 'grid-cols-6',\n 7: 'grid-cols-7',\n 8: 'grid-cols-8',\n 9: 'grid-cols-9',\n 10: 'grid-cols-10',\n 11: 'grid-cols-11',\n 12: 'grid-cols-12',\n}\n\ninterface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement>, ContainerProps {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: GraphicMoreDataType[]\n }\n}\n\nconst GraphicMore = ({ data, className, container, ...rest }: GraphicMoreType) => {\n const { productsTab, shape } = data\n const desktopSpan = (container?.desktopSpan as DesktopSpan) ?? 12\n\n return (\n <div {...rest} className={cn(className)}>\n <div\n className={cn('creativeModuleBlock', 'tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]')}\n >\n <Grid className={cn('laptop:gap-4 grid gap-3', DESKTOP_SPAN_CLASS[desktopSpan], className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n '',\n {\n 'aiui-dark': item?.theme === 'dark',\n }\n )}\n >\n <Picture source={item?.img?.url} className=\"size-full\" imgClassName=\"\" />\n <div className=\"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {item?.title && (\n <Text\n html={item?.title}\n as=\"p\"\n className=\"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]\"\n />\n )}\n {item?.description && (\n <Text\n html={item?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold\"\n />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"tablet:hidden block text-[#080A0F]\">\n <div className=\" flex flex-wrap gap-[12px]\">\n {productsTab?.map((it, ind) => {\n return (\n <div\n key={ind}\n className={cn(\n 'text-info-primary relative overflow-hidden',\n shape === 'rounded' ? 'rounded-xl' : 'rounded-none',\n { 'aiui-dark': it?.theme === 'dark' },\n it?.fullWidth === 'true'\n ? 'w-full flex-none' // \u5360\u6EE1\u6574\u884C\n : ' w-[calc(50%-6px)]' // \u666E\u901A\u5143\u7D20\n )}\n >\n <Picture source={it?.mobileImg?.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {it?.title && (\n <Text html={it?.title} as=\"p\" className=\"lg-desktop:text-2xl text-xl font-bold leading-[1.2]\" />\n )}\n {it?.description && (\n <Text\n html={it?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]\"\n />\n )}\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(GraphicMore)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+DgB,IAAAI,EAAA,6BA9DhBC,EAAmB,kCAEnBC,EAAgD,kCAChDC,EAA+B,oCAC/BC,EAA8B,qCAY9B,MAAMC,EAAkD,CACtD,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EASMC,EAAc,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAK,IAAuB,CAChF,KAAM,CAAE,YAAAC,EAAa,MAAAC,CAAM,EAAIL,EACzBM,EAAeJ,GAAW,aAA+B,GAE/D,SACE,QAAC,OAAK,GAAGC,EAAM,aAAW,MAAGF,CAAS,EACpC,oBAAC,OACC,aAAW,MAAG,sBAAuB,sEAAsE,EAE3G,mBAAC,QAAK,aAAW,MAAG,0BAA2BH,EAAmBQ,CAAW,EAAGL,CAAS,EACtF,SAAAG,GAAa,IAAI,CAACG,EAAMC,OAErB,QAAC,YAEC,KAAMD,EAAK,KACX,aAAW,MACT,oDACAF,IAAU,UAAY,cAAgB,eACtC,GACA,CACE,YAAaE,GAAM,QAAU,MAC/B,CACF,EAEA,oBAAC,WAAQ,OAAQA,GAAM,KAAK,IAAK,UAAU,YAAY,aAAa,GAAG,KACvE,QAAC,OAAI,UAAU,kFACZ,UAAAA,GAAM,UACL,OAAC,QACC,KAAMA,GAAM,MACZ,GAAG,IACH,UAAU,gEACZ,EAEDA,GAAM,gBACL,OAAC,QACC,KAAMA,GAAM,YACZ,UAAU,2EACZ,GAEJ,IA1BKC,CA2BP,CAEH,EACH,EACF,KACA,OAAC,OAAI,UAAU,qCACb,mBAAC,OAAI,UAAU,6BACZ,SAAAJ,GAAa,IAAI,CAACK,EAAIC,OAEnB,QAAC,OAEC,aAAW,MACT,6CACAL,IAAU,UAAY,aAAe,eACrC,CAAE,YAAaI,GAAI,QAAU,MAAO,EACpCA,GAAI,YAAc,OACd,mBACA,oBACN,EAEA,oBAAC,WAAQ,OAAQA,GAAI,WAAW,IAAK,UAAU,YAAY,aAAa,sBAAsB,KAC9F,QAAC,OAAI,UAAU,qFACZ,UAAAA,GAAI,UACH,OAAC,QAAK,KAAMA,GAAI,MAAO,GAAG,IAAI,UAAU,sDAAsD,EAE/FA,GAAI,gBACH,OAAC,QACC,KAAMA,GAAI,YACV,UAAU,yFACZ,GAEJ,IArBKC,CAsBP,CAEH,EACH,EACF,GACF,CAEJ,EAEA,IAAOnB,KAAQ,cAAWQ,CAAW",
6
- "names": ["GraphicMore_exports", "__export", "GraphicMore_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_Styles", "import_grid", "import_components", "DESKTOP_SPAN_CLASS", "GraphicMore", "data", "className", "container", "rest", "productsTab", "shape", "desktopSpan", "item", "index", "it", "ind"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout, type ContainerProps } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type GraphicMoreDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n fullWidth: 'true' | 'false'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\ntype DesktopSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\nconst DESKTOP_SPAN_CLASS: Record<DesktopSpan, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 5: 'grid-cols-5',\n 6: 'grid-cols-6',\n 7: 'grid-cols-7',\n 8: 'grid-cols-8',\n 9: 'grid-cols-9',\n 10: 'grid-cols-10',\n 11: 'grid-cols-11',\n 12: 'grid-cols-12',\n}\n\ninterface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n shape?: 'rounded' | 'square'\n container?: ContainerProps['container']\n productsTab: GraphicMoreDataType[]\n }\n}\n\nconst getDesktopSpanClass = (span?: number): string => {\n const validSpan = (span && span >= 1 && span <= 12 ? span : 12) as DesktopSpan\n return DESKTOP_SPAN_CLASS[validSpan]\n}\n\nconst GraphicMore = ({ data, className, ...rest }: GraphicMoreType) => {\n const { productsTab, shape, container } = data\n const desktopSpanClass = getDesktopSpanClass(container?.desktopSpan)\n\n return (\n <div {...rest} className={cn(className)}>\n <div\n className={cn('creativeModuleBlock', 'tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]')}\n >\n <Grid className={cn('laptop:gap-4 grid gap-3', desktopSpanClass, className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n '',\n {\n 'aiui-dark': item?.theme === 'dark',\n }\n )}\n >\n <Picture source={item?.img?.url} className=\"size-full\" imgClassName=\"\" />\n <div className=\"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {item?.title && (\n <Text\n html={item?.title}\n as=\"p\"\n className=\"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]\"\n />\n )}\n {item?.description && (\n <Text\n html={item?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold\"\n />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"tablet:hidden block text-[#080A0F]\">\n <div className=\" flex flex-wrap gap-[12px]\">\n {productsTab?.map((it, ind) => {\n return (\n <div\n key={ind}\n className={cn(\n 'text-info-primary relative overflow-hidden',\n shape === 'rounded' ? 'rounded-xl' : 'rounded-none',\n { 'aiui-dark': it?.theme === 'dark' },\n it?.fullWidth === 'true'\n ? 'w-full flex-none' // \u5360\u6EE1\u6574\u884C\n : ' w-[calc(50%-6px)]' // \u666E\u901A\u5143\u7D20\n )}\n >\n <Picture source={it?.mobileImg?.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {it?.title && (\n <Text html={it?.title} as=\"p\" className=\"lg-desktop:text-2xl text-xl font-bold leading-[1.2]\" />\n )}\n {it?.description && (\n <Text\n html={it?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]\"\n />\n )}\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(GraphicMore)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqEgB,IAAAI,EAAA,6BApEhBC,EAAmB,kCAEnBC,EAAgD,kCAChDC,EAA+B,oCAC/BC,EAA8B,qCAY9B,MAAMC,EAAkD,CACtD,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EAUMC,EAAuBC,GAA0B,CACrD,MAAMC,EAAaD,GAAQA,GAAQ,GAAKA,GAAQ,GAAKA,EAAO,GAC5D,OAAOF,EAAmBG,CAAS,CACrC,EAEMC,EAAc,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAK,IAAuB,CACrE,KAAM,CAAE,YAAAC,EAAa,MAAAC,EAAO,UAAAC,CAAU,EAAIL,EACpCM,EAAmBV,EAAoBS,GAAW,WAAW,EAEnE,SACE,QAAC,OAAK,GAAGH,EAAM,aAAW,MAAGD,CAAS,EACpC,oBAAC,OACC,aAAW,MAAG,sBAAuB,sEAAsE,EAE3G,mBAAC,QAAK,aAAW,MAAG,0BAA2BK,EAAkBL,CAAS,EACvE,SAAAE,GAAa,IAAI,CAACI,EAAMC,OAErB,QAAC,YAEC,KAAMD,EAAK,KACX,aAAW,MACT,oDACAH,IAAU,UAAY,cAAgB,eACtC,GACA,CACE,YAAaG,GAAM,QAAU,MAC/B,CACF,EAEA,oBAAC,WAAQ,OAAQA,GAAM,KAAK,IAAK,UAAU,YAAY,aAAa,GAAG,KACvE,QAAC,OAAI,UAAU,kFACZ,UAAAA,GAAM,UACL,OAAC,QACC,KAAMA,GAAM,MACZ,GAAG,IACH,UAAU,gEACZ,EAEDA,GAAM,gBACL,OAAC,QACC,KAAMA,GAAM,YACZ,UAAU,2EACZ,GAEJ,IA1BKC,CA2BP,CAEH,EACH,EACF,KACA,OAAC,OAAI,UAAU,qCACb,mBAAC,OAAI,UAAU,6BACZ,SAAAL,GAAa,IAAI,CAACM,EAAIC,OAEnB,QAAC,OAEC,aAAW,MACT,6CACAN,IAAU,UAAY,aAAe,eACrC,CAAE,YAAaK,GAAI,QAAU,MAAO,EACpCA,GAAI,YAAc,OACd,mBACA,oBACN,EAEA,oBAAC,WAAQ,OAAQA,GAAI,WAAW,IAAK,UAAU,YAAY,aAAa,sBAAsB,KAC9F,QAAC,OAAI,UAAU,qFACZ,UAAAA,GAAI,UACH,OAAC,QAAK,KAAMA,GAAI,MAAO,GAAG,IAAI,UAAU,sDAAsD,EAE/FA,GAAI,gBACH,OAAC,QACC,KAAMA,GAAI,YACV,UAAU,yFACZ,GAEJ,IArBKC,CAsBP,CAEH,EACH,EACF,GACF,CAEJ,EAEA,IAAOtB,KAAQ,cAAWW,CAAW",
6
+ "names": ["GraphicMore_exports", "__export", "GraphicMore_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_Styles", "import_grid", "import_components", "DESKTOP_SPAN_CLASS", "getDesktopSpanClass", "span", "validSpan", "GraphicMore", "data", "className", "rest", "productsTab", "shape", "container", "desktopSpanClass", "item", "index", "it", "ind"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var h=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of x(t))!P.call(e,r)&&r!==o&&l(e,r,{get:()=>t[r],enumerable:!(n=v(t,r))||n.enumerable});return e};var g=(e,t,o)=>(o=e!=null?h(b(e)):{},f(t||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>f(l({},"__esModule",{value:!0}),e);var R={};I(R,{Input:()=>u,InputSlot:()=>d});module.exports=y(R);var i=require("react/jsx-runtime"),a=g(require("react")),s=require("../helpers/index.js"),c=require("class-variance-authority");const m=(0,c.cva)("border-input text-info-primary bg-background flex w-full flex-row items-center overflow-hidden rounded-md border focus-visible:outline-none",{variants:{size:{sm:"h-8 text-sm",base:"h-10",lg:"h-12 text-lg"}},defaultVariants:{size:"base"}}),d=a.forwardRef((e,t)=>{const{className:o,side:n="right",children:r,...p}=e;return(0,i.jsx)("div",{ref:t,...p,className:(0,s.cn)("flex h-full items-center",o,{"-order-1":n==="left","order-2":n==="right"}),children:r})}),u=a.forwardRef(({className:e,type:t,size:o,children:n,...r},p)=>a.isValidElement(n)?(0,i.jsxs)("div",{className:(0,s.cn)(m({size:o}),e),children:[(0,i.jsx)("input",{type:t,className:(0,s.cn)("placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:p,...r}),n]}):(0,i.jsx)("input",{type:t,className:(0,s.cn)(m({size:o}),"px-3",e),ref:p,...r}));u.displayName="Input",d.displayName="InputSlot";
1
+ "use strict";"use client";var x=Object.create;var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of h(t))!P.call(e,r)&&r!==o&&l(e,r,{get:()=>t[r],enumerable:!(n=b(t,r))||n.enumerable});return e};var g=(e,t,o)=>(o=e!=null?x(v(e)):{},f(t||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>f(l({},"__esModule",{value:!0}),e);var R={};I(R,{Input:()=>u,InputSlot:()=>d});module.exports=y(R);var i=require("react/jsx-runtime"),a=g(require("react")),s=require("../helpers/index.js"),c=require("class-variance-authority");const m=(0,c.cva)("border-input text-info-primary bg-background rounded-box-small flex w-full flex-row items-center overflow-hidden border focus-visible:outline-none",{variants:{size:{sm:"h-8 text-sm",base:"h-10",lg:"h-12 text-lg"}},defaultVariants:{size:"base"}}),d=a.forwardRef((e,t)=>{const{className:o,side:n="right",children:r,...p}=e;return(0,i.jsx)("div",{ref:t,...p,className:(0,s.cn)("flex h-full items-center",o,{"-order-1":n==="left","order-2":n==="right"}),children:r})}),u=a.forwardRef(({className:e,type:t,size:o,children:n,...r},p)=>a.isValidElement(n)?(0,i.jsxs)("div",{className:(0,s.cn)(m({size:o}),e),children:[(0,i.jsx)("input",{type:t,className:(0,s.cn)("placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:p,...r}),n]}):(0,i.jsx)("input",{type:t,className:(0,s.cn)(m({size:o}),"px-3",e),ref:p,...r}));u.displayName="Input",d.displayName="InputSlot";
2
2
  //# sourceMappingURL=input.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/input.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'border-input text-info-primary bg-background flex w-full flex-row items-center overflow-hidden rounded-md border focus-visible:outline-none',\n {\n variants: {\n size: {\n sm: 'h-8 text-sm',\n base: 'h-10',\n lg: 'h-12 text-lg',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n * default: right\n */\n side?: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side = 'right', children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('flex h-full items-center', className, {\n '-order-1': side === 'left',\n 'order-2': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\n/**\n * Input - \u8F93\u5165\u6846\n *\n * @description \u6587\u672C\u8F93\u5165\u7EC4\u4EF6\uFF0C\u652F\u6301\u5404\u79CD\u8F93\u5165\u7C7B\u578B\u3001\u4E0D\u540C\u5C3A\u5BF8\u548C\u63D2\u69FD\u529F\u80FD\n */\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n if (!React.isValidElement(children)) {\n return <input type={type} className={cn(inputVariants({ size }), 'px-3', className)} ref={ref} {...props} />\n }\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,cAAAC,IAAA,eAAAC,EAAAJ,GA0CI,IAAAK,EAAA,6BAxCJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAAuC,oCAEvC,MAAMC,KAAgB,OACpB,8IACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,KAAM,OACN,GAAI,cACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAiBMN,EAAYG,EAAM,WAA6C,CAACI,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAAS,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAE9D,SACE,OAAC,OACC,IAAKC,EACJ,GAAGI,EACJ,aAAW,MAAG,2BAA4BH,EAAW,CACnD,WAAYC,IAAS,OACrB,UAAWA,IAAS,OACtB,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAOKZ,EAAQI,EAAM,WAClB,CAAC,CAAE,UAAAM,EAAW,KAAAI,EAAM,KAAAC,EAAM,SAAAH,EAAU,GAAGJ,CAAM,EAAGQ,IACzCZ,EAAM,eAAeQ,CAAQ,KAIhC,QAAC,OAAI,aAAW,MAAGL,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAGL,CAAS,EACnD,oBAAC,SACC,KAAMI,EACN,aAAW,MACT,qLACF,EACA,IAAKE,EACJ,GAAGR,EACN,EACCI,GACH,KAbO,OAAC,SAAM,KAAME,EAAM,aAAW,MAAGP,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAG,OAAQL,CAAS,EAAG,IAAKM,EAAM,GAAGR,EAAO,CAgBhH,EACAR,EAAM,YAAc,QACpBC,EAAU,YAAc",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'border-input text-info-primary bg-background rounded-box-small flex w-full flex-row items-center overflow-hidden border focus-visible:outline-none',\n {\n variants: {\n size: {\n sm: 'h-8 text-sm',\n base: 'h-10',\n lg: 'h-12 text-lg',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n * default: right\n */\n side?: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side = 'right', children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('flex h-full items-center', className, {\n '-order-1': side === 'left',\n 'order-2': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\n/**\n * Input - \u8F93\u5165\u6846\n *\n * @description \u6587\u672C\u8F93\u5165\u7EC4\u4EF6\uFF0C\u652F\u6301\u5404\u79CD\u8F93\u5165\u7C7B\u578B\u3001\u4E0D\u540C\u5C3A\u5BF8\u548C\u63D2\u69FD\u529F\u80FD\n */\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n if (!React.isValidElement(children)) {\n return <input type={type} className={cn(inputVariants({ size }), 'px-3', className)} ref={ref} {...props} />\n }\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,cAAAC,IAAA,eAAAC,EAAAJ,GA0CI,IAAAK,EAAA,6BAxCJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAAuC,oCAEvC,MAAMC,KAAgB,OACpB,qJACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,KAAM,OACN,GAAI,cACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAiBMN,EAAYG,EAAM,WAA6C,CAACI,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAAS,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAE9D,SACE,OAAC,OACC,IAAKC,EACJ,GAAGI,EACJ,aAAW,MAAG,2BAA4BH,EAAW,CACnD,WAAYC,IAAS,OACrB,UAAWA,IAAS,OACtB,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAOKZ,EAAQI,EAAM,WAClB,CAAC,CAAE,UAAAM,EAAW,KAAAI,EAAM,KAAAC,EAAM,SAAAH,EAAU,GAAGJ,CAAM,EAAGQ,IACzCZ,EAAM,eAAeQ,CAAQ,KAIhC,QAAC,OAAI,aAAW,MAAGL,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAGL,CAAS,EACnD,oBAAC,SACC,KAAMI,EACN,aAAW,MACT,qLACF,EACA,IAAKE,EACJ,GAAGR,EACN,EACCI,GACH,KAbO,OAAC,SAAM,KAAME,EAAM,aAAW,MAAGP,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAG,OAAQL,CAAS,EAAG,IAAKM,EAAM,GAAGR,EAAO,CAgBhH,EACAR,EAAM,YAAc,QACpBC,EAAU,YAAc",
6
6
  "names": ["input_exports", "__export", "Input", "InputSlot", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_class_variance_authority", "inputVariants", "props", "forwardedRef", "className", "side", "children", "slotProps", "type", "size", "ref"]
7
7
  }
@@ -9,9 +9,10 @@ export type GraphicMoreDataType = {
9
9
  fullWidth: 'true' | 'false';
10
10
  span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
11
11
  };
12
- interface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement>, ContainerProps {
12
+ interface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement> {
13
13
  data: {
14
14
  shape?: 'rounded' | 'square';
15
+ container?: ContainerProps['container'];
15
16
  productsTab: GraphicMoreDataType[];
16
17
  };
17
18
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{cn as o}from"../../helpers/utils.js";import{withLayout as u}from"../../shared/Styles.js";import{Grid as f,GridItem as x}from"../../components/grid.js";import{Picture as p,Text as s}from"../../components/index.js";const h={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},k=({data:n,className:a,container:c,...m})=>{const{productsTab:r,shape:i}=n,g=c?.desktopSpan??12;return l("div",{...m,className:o(a),children:[t("div",{className:o("creativeModuleBlock","tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]"),children:t(f,{className:o("laptop:gap-4 grid gap-3",h[g],a),children:r?.map((e,d)=>l(x,{span:e.span,className:o("text-info-primary relative w-full overflow-hidden",i==="rounded"?"rounded-2xl":"rounded-none","",{"aiui-dark":e?.theme==="dark"}),children:[t(p,{source:e?.img?.url,className:"size-full",imgClassName:""}),l("div",{className:"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[e?.title&&t(s,{html:e?.title,as:"p",className:"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]"}),e?.description&&t(s,{html:e?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold"})]})]},d))})}),t("div",{className:"tablet:hidden block text-[#080A0F]",children:t("div",{className:" flex flex-wrap gap-[12px]",children:r?.map((e,d)=>l("div",{className:o("text-info-primary relative overflow-hidden",i==="rounded"?"rounded-xl":"rounded-none",{"aiui-dark":e?.theme==="dark"},e?.fullWidth==="true"?"w-full flex-none":" w-[calc(50%-6px)]"),children:[t(p,{source:e?.mobileImg?.url,className:"size-full",imgClassName:"h-full object-cover"}),l("div",{className:"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[e?.title&&t(s,{html:e?.title,as:"p",className:"lg-desktop:text-2xl text-xl font-bold leading-[1.2]"}),e?.description&&t(s,{html:e?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]"})]})]},d))})})]})};var w=u(k);export{w as default};
1
+ "use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import{cn as l}from"../../helpers/utils.js";import{withLayout as u}from"../../shared/Styles.js";import{Grid as f,GridItem as x}from"../../components/grid.js";import{Picture as n,Text as a}from"../../components/index.js";const h={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},k=o=>{const r=o&&o>=1&&o<=12?o:12;return h[r]},v=({data:o,className:r,...c})=>{const{productsTab:i,shape:p,container:m}=o,g=k(m?.desktopSpan);return s("div",{...c,className:l(r),children:[t("div",{className:l("creativeModuleBlock","tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]"),children:t(f,{className:l("laptop:gap-4 grid gap-3",g,r),children:i?.map((e,d)=>s(x,{span:e.span,className:l("text-info-primary relative w-full overflow-hidden",p==="rounded"?"rounded-2xl":"rounded-none","",{"aiui-dark":e?.theme==="dark"}),children:[t(n,{source:e?.img?.url,className:"size-full",imgClassName:""}),s("div",{className:"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[e?.title&&t(a,{html:e?.title,as:"p",className:"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]"}),e?.description&&t(a,{html:e?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold"})]})]},d))})}),t("div",{className:"tablet:hidden block text-[#080A0F]",children:t("div",{className:" flex flex-wrap gap-[12px]",children:i?.map((e,d)=>s("div",{className:l("text-info-primary relative overflow-hidden",p==="rounded"?"rounded-xl":"rounded-none",{"aiui-dark":e?.theme==="dark"},e?.fullWidth==="true"?"w-full flex-none":" w-[calc(50%-6px)]"),children:[t(n,{source:e?.mobileImg?.url,className:"size-full",imgClassName:"h-full object-cover"}),s("div",{className:"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4",children:[e?.title&&t(a,{html:e?.title,as:"p",className:"lg-desktop:text-2xl text-xl font-bold leading-[1.2]"}),e?.description&&t(a,{html:e?.description,className:"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]"})]})]},d))})})]})};var S=u(v);export{S as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/GraphicMore/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout, type ContainerProps } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type GraphicMoreDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n fullWidth: 'true' | 'false'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\ntype DesktopSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\nconst DESKTOP_SPAN_CLASS: Record<DesktopSpan, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 5: 'grid-cols-5',\n 6: 'grid-cols-6',\n 7: 'grid-cols-7',\n 8: 'grid-cols-8',\n 9: 'grid-cols-9',\n 10: 'grid-cols-10',\n 11: 'grid-cols-11',\n 12: 'grid-cols-12',\n}\n\ninterface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement>, ContainerProps {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: GraphicMoreDataType[]\n }\n}\n\nconst GraphicMore = ({ data, className, container, ...rest }: GraphicMoreType) => {\n const { productsTab, shape } = data\n const desktopSpan = (container?.desktopSpan as DesktopSpan) ?? 12\n\n return (\n <div {...rest} className={cn(className)}>\n <div\n className={cn('creativeModuleBlock', 'tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]')}\n >\n <Grid className={cn('laptop:gap-4 grid gap-3', DESKTOP_SPAN_CLASS[desktopSpan], className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n '',\n {\n 'aiui-dark': item?.theme === 'dark',\n }\n )}\n >\n <Picture source={item?.img?.url} className=\"size-full\" imgClassName=\"\" />\n <div className=\"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {item?.title && (\n <Text\n html={item?.title}\n as=\"p\"\n className=\"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]\"\n />\n )}\n {item?.description && (\n <Text\n html={item?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold\"\n />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"tablet:hidden block text-[#080A0F]\">\n <div className=\" flex flex-wrap gap-[12px]\">\n {productsTab?.map((it, ind) => {\n return (\n <div\n key={ind}\n className={cn(\n 'text-info-primary relative overflow-hidden',\n shape === 'rounded' ? 'rounded-xl' : 'rounded-none',\n { 'aiui-dark': it?.theme === 'dark' },\n it?.fullWidth === 'true'\n ? 'w-full flex-none' // \u5360\u6EE1\u6574\u884C\n : ' w-[calc(50%-6px)]' // \u666E\u901A\u5143\u7D20\n )}\n >\n <Picture source={it?.mobileImg?.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {it?.title && (\n <Text html={it?.title} as=\"p\" className=\"lg-desktop:text-2xl text-xl font-bold leading-[1.2]\" />\n )}\n {it?.description && (\n <Text\n html={it?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]\"\n />\n )}\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(GraphicMore)\n"],
5
- "mappings": "aA+DgB,cAAAA,EACA,QAAAC,MADA,oBA9DhB,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,MAAuC,yBAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAY9B,MAAMC,EAAkD,CACtD,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EASMC,EAAc,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAK,IAAuB,CAChF,KAAM,CAAE,YAAAC,EAAa,MAAAC,CAAM,EAAIL,EACzBM,EAAeJ,GAAW,aAA+B,GAE/D,OACEX,EAAC,OAAK,GAAGY,EAAM,UAAWX,EAAGS,CAAS,EACpC,UAAAX,EAAC,OACC,UAAWE,EAAG,sBAAuB,sEAAsE,EAE3G,SAAAF,EAACI,EAAA,CAAK,UAAWF,EAAG,0BAA2BM,EAAmBQ,CAAW,EAAGL,CAAS,EACtF,SAAAG,GAAa,IAAI,CAACG,EAAMC,IAErBjB,EAACI,EAAA,CAEC,KAAMY,EAAK,KACX,UAAWf,EACT,oDACAa,IAAU,UAAY,cAAgB,eACtC,GACA,CACE,YAAaE,GAAM,QAAU,MAC/B,CACF,EAEA,UAAAjB,EAACM,EAAA,CAAQ,OAAQW,GAAM,KAAK,IAAK,UAAU,YAAY,aAAa,GAAG,EACvEhB,EAAC,OAAI,UAAU,kFACZ,UAAAgB,GAAM,OACLjB,EAACO,EAAA,CACC,KAAMU,GAAM,MACZ,GAAG,IACH,UAAU,gEACZ,EAEDA,GAAM,aACLjB,EAACO,EAAA,CACC,KAAMU,GAAM,YACZ,UAAU,2EACZ,GAEJ,IA1BKC,CA2BP,CAEH,EACH,EACF,EACAlB,EAAC,OAAI,UAAU,qCACb,SAAAA,EAAC,OAAI,UAAU,6BACZ,SAAAc,GAAa,IAAI,CAACK,EAAIC,IAEnBnB,EAAC,OAEC,UAAWC,EACT,6CACAa,IAAU,UAAY,aAAe,eACrC,CAAE,YAAaI,GAAI,QAAU,MAAO,EACpCA,GAAI,YAAc,OACd,mBACA,oBACN,EAEA,UAAAnB,EAACM,EAAA,CAAQ,OAAQa,GAAI,WAAW,IAAK,UAAU,YAAY,aAAa,sBAAsB,EAC9FlB,EAAC,OAAI,UAAU,qFACZ,UAAAkB,GAAI,OACHnB,EAACO,EAAA,CAAK,KAAMY,GAAI,MAAO,GAAG,IAAI,UAAU,sDAAsD,EAE/FA,GAAI,aACHnB,EAACO,EAAA,CACC,KAAMY,GAAI,YACV,UAAU,yFACZ,GAEJ,IArBKC,CAsBP,CAEH,EACH,EACF,GACF,CAEJ,EAEA,IAAOC,EAAQlB,EAAWM,CAAW",
6
- "names": ["jsx", "jsxs", "cn", "withLayout", "Grid", "GridItem", "Picture", "Text", "DESKTOP_SPAN_CLASS", "GraphicMore", "data", "className", "container", "rest", "productsTab", "shape", "desktopSpan", "item", "index", "it", "ind", "GraphicMore_default"]
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout, type ContainerProps } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type GraphicMoreDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n fullWidth: 'true' | 'false'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\ntype DesktopSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\nconst DESKTOP_SPAN_CLASS: Record<DesktopSpan, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 5: 'grid-cols-5',\n 6: 'grid-cols-6',\n 7: 'grid-cols-7',\n 8: 'grid-cols-8',\n 9: 'grid-cols-9',\n 10: 'grid-cols-10',\n 11: 'grid-cols-11',\n 12: 'grid-cols-12',\n}\n\ninterface GraphicMoreType extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n shape?: 'rounded' | 'square'\n container?: ContainerProps['container']\n productsTab: GraphicMoreDataType[]\n }\n}\n\nconst getDesktopSpanClass = (span?: number): string => {\n const validSpan = (span && span >= 1 && span <= 12 ? span : 12) as DesktopSpan\n return DESKTOP_SPAN_CLASS[validSpan]\n}\n\nconst GraphicMore = ({ data, className, ...rest }: GraphicMoreType) => {\n const { productsTab, shape, container } = data\n const desktopSpanClass = getDesktopSpanClass(container?.desktopSpan)\n\n return (\n <div {...rest} className={cn(className)}>\n <div\n className={cn('creativeModuleBlock', 'tablet:block box-border hidden w-full overflow-hidden text-[#080A0F]')}\n >\n <Grid className={cn('laptop:gap-4 grid gap-3', desktopSpanClass, className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n '',\n {\n 'aiui-dark': item?.theme === 'dark',\n }\n )}\n >\n <Picture source={item?.img?.url} className=\"size-full\" imgClassName=\"\" />\n <div className=\"footBottom desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {item?.title && (\n <Text\n html={item?.title}\n as=\"p\"\n className=\"desktop:text-2xl line-clamp-2 text-xl font-bold leading-[1.2]\"\n />\n )}\n {item?.description && (\n <Text\n html={item?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold\"\n />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"tablet:hidden block text-[#080A0F]\">\n <div className=\" flex flex-wrap gap-[12px]\">\n {productsTab?.map((it, ind) => {\n return (\n <div\n key={ind}\n className={cn(\n 'text-info-primary relative overflow-hidden',\n shape === 'rounded' ? 'rounded-xl' : 'rounded-none',\n { 'aiui-dark': it?.theme === 'dark' },\n it?.fullWidth === 'true'\n ? 'w-full flex-none' // \u5360\u6EE1\u6574\u884C\n : ' w-[calc(50%-6px)]' // \u666E\u901A\u5143\u7D20\n )}\n >\n <Picture source={it?.mobileImg?.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"footBottomMob desktop:p-6 lg-desktop:p-8 absolute inset-0 z-10 overflow-hidden p-4\">\n {it?.title && (\n <Text html={it?.title} as=\"p\" className=\"lg-desktop:text-2xl text-xl font-bold leading-[1.2]\" />\n )}\n {it?.description && (\n <Text\n html={it?.description}\n className=\"desktop:text-base lg-desktop:text-lg mt-1 line-clamp-2 text-sm font-bold leading-[1.4]\"\n />\n )}\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n\nexport default withLayout(GraphicMore)\n"],
5
+ "mappings": "aAqEgB,cAAAA,EACA,QAAAC,MADA,oBApEhB,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,MAAuC,yBAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAY9B,MAAMC,EAAkD,CACtD,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,GAAI,eACJ,GAAI,eACJ,GAAI,cACN,EAUMC,EAAuBC,GAA0B,CACrD,MAAMC,EAAaD,GAAQA,GAAQ,GAAKA,GAAQ,GAAKA,EAAO,GAC5D,OAAOF,EAAmBG,CAAS,CACrC,EAEMC,EAAc,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAK,IAAuB,CACrE,KAAM,CAAE,YAAAC,EAAa,MAAAC,EAAO,UAAAC,CAAU,EAAIL,EACpCM,EAAmBV,EAAoBS,GAAW,WAAW,EAEnE,OACEjB,EAAC,OAAK,GAAGc,EAAM,UAAWb,EAAGY,CAAS,EACpC,UAAAd,EAAC,OACC,UAAWE,EAAG,sBAAuB,sEAAsE,EAE3G,SAAAF,EAACI,EAAA,CAAK,UAAWF,EAAG,0BAA2BiB,EAAkBL,CAAS,EACvE,SAAAE,GAAa,IAAI,CAACI,EAAMC,IAErBpB,EAACI,EAAA,CAEC,KAAMe,EAAK,KACX,UAAWlB,EACT,oDACAe,IAAU,UAAY,cAAgB,eACtC,GACA,CACE,YAAaG,GAAM,QAAU,MAC/B,CACF,EAEA,UAAApB,EAACM,EAAA,CAAQ,OAAQc,GAAM,KAAK,IAAK,UAAU,YAAY,aAAa,GAAG,EACvEnB,EAAC,OAAI,UAAU,kFACZ,UAAAmB,GAAM,OACLpB,EAACO,EAAA,CACC,KAAMa,GAAM,MACZ,GAAG,IACH,UAAU,gEACZ,EAEDA,GAAM,aACLpB,EAACO,EAAA,CACC,KAAMa,GAAM,YACZ,UAAU,2EACZ,GAEJ,IA1BKC,CA2BP,CAEH,EACH,EACF,EACArB,EAAC,OAAI,UAAU,qCACb,SAAAA,EAAC,OAAI,UAAU,6BACZ,SAAAgB,GAAa,IAAI,CAACM,EAAIC,IAEnBtB,EAAC,OAEC,UAAWC,EACT,6CACAe,IAAU,UAAY,aAAe,eACrC,CAAE,YAAaK,GAAI,QAAU,MAAO,EACpCA,GAAI,YAAc,OACd,mBACA,oBACN,EAEA,UAAAtB,EAACM,EAAA,CAAQ,OAAQgB,GAAI,WAAW,IAAK,UAAU,YAAY,aAAa,sBAAsB,EAC9FrB,EAAC,OAAI,UAAU,qFACZ,UAAAqB,GAAI,OACHtB,EAACO,EAAA,CAAK,KAAMe,GAAI,MAAO,GAAG,IAAI,UAAU,sDAAsD,EAE/FA,GAAI,aACHtB,EAACO,EAAA,CACC,KAAMe,GAAI,YACV,UAAU,yFACZ,GAEJ,IArBKC,CAsBP,CAEH,EACH,EACF,GACF,CAEJ,EAEA,IAAOC,EAAQrB,EAAWS,CAAW",
6
+ "names": ["jsx", "jsxs", "cn", "withLayout", "Grid", "GridItem", "Picture", "Text", "DESKTOP_SPAN_CLASS", "getDesktopSpanClass", "span", "validSpan", "GraphicMore", "data", "className", "rest", "productsTab", "shape", "container", "desktopSpanClass", "item", "index", "it", "ind", "GraphicMore_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as l,jsxs as m}from"react/jsx-runtime";import*as p from"react";import{cn as s}from"../helpers/index.js";import{cva as f}from"class-variance-authority";const a=f("border-input text-info-primary bg-background flex w-full flex-row items-center overflow-hidden rounded-md border focus-visible:outline-none",{variants:{size:{sm:"h-8 text-sm",base:"h-10",lg:"h-12 text-lg"}},defaultVariants:{size:"base"}}),d=p.forwardRef((t,o)=>{const{className:r,side:e="right",children:n,...i}=t;return l("div",{ref:o,...i,className:s("flex h-full items-center",r,{"-order-1":e==="left","order-2":e==="right"}),children:n})}),u=p.forwardRef(({className:t,type:o,size:r,children:e,...n},i)=>p.isValidElement(e)?m("div",{className:s(a({size:r}),t),children:[l("input",{type:o,className:s("placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:i,...n}),e]}):l("input",{type:o,className:s(a({size:r}),"px-3",t),ref:i,...n}));u.displayName="Input",d.displayName="InputSlot";export{u as Input,d as InputSlot};
1
+ "use client";import{jsx as l,jsxs as m}from"react/jsx-runtime";import*as p from"react";import{cn as s}from"../helpers/index.js";import{cva as f}from"class-variance-authority";const a=f("border-input text-info-primary bg-background rounded-box-small flex w-full flex-row items-center overflow-hidden border focus-visible:outline-none",{variants:{size:{sm:"h-8 text-sm",base:"h-10",lg:"h-12 text-lg"}},defaultVariants:{size:"base"}}),d=p.forwardRef((t,o)=>{const{className:r,side:e="right",children:n,...i}=t;return l("div",{ref:o,...i,className:s("flex h-full items-center",r,{"-order-1":e==="left","order-2":e==="right"}),children:n})}),u=p.forwardRef(({className:t,type:o,size:r,children:e,...n},i)=>p.isValidElement(e)?m("div",{className:s(a({size:r}),t),children:[l("input",{type:o,className:s("placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:i,...n}),e]}):l("input",{type:o,className:s(a({size:r}),"px-3",t),ref:i,...n}));u.displayName="Input",d.displayName="InputSlot";export{u as Input,d as InputSlot};
2
2
  //# sourceMappingURL=input.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/input.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'border-input text-info-primary bg-background flex w-full flex-row items-center overflow-hidden rounded-md border focus-visible:outline-none',\n {\n variants: {\n size: {\n sm: 'h-8 text-sm',\n base: 'h-10',\n lg: 'h-12 text-lg',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n * default: right\n */\n side?: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side = 'right', children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('flex h-full items-center', className, {\n '-order-1': side === 'left',\n 'order-2': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\n/**\n * Input - \u8F93\u5165\u6846\n *\n * @description \u6587\u672C\u8F93\u5165\u7EC4\u4EF6\uFF0C\u652F\u6301\u5404\u79CD\u8F93\u5165\u7C7B\u578B\u3001\u4E0D\u540C\u5C3A\u5BF8\u548C\u63D2\u69FD\u529F\u80FD\n */\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n if (!React.isValidElement(children)) {\n return <input type={type} className={cn(inputVariants({ size }), 'px-3', className)} ref={ref} {...props} />\n }\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
- "mappings": "aA0CI,cAAAA,EAwBE,QAAAC,MAxBF,oBAxCJ,UAAYC,MAAW,QACvB,OAAS,MAAAC,MAAU,sBAEnB,OAAS,OAAAC,MAA8B,2BAEvC,MAAMC,EAAgBD,EACpB,8IACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,KAAM,OACN,GAAI,cACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAiBME,EAAYJ,EAAM,WAA6C,CAACK,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAAS,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAE9D,OACEP,EAAC,OACC,IAAKQ,EACJ,GAAGI,EACJ,UAAWT,EAAG,2BAA4BM,EAAW,CACnD,WAAYC,IAAS,OACrB,UAAWA,IAAS,OACtB,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAOKE,EAAQX,EAAM,WAClB,CAAC,CAAE,UAAAO,EAAW,KAAAK,EAAM,KAAAC,EAAM,SAAAJ,EAAU,GAAGJ,CAAM,EAAGS,IACzCd,EAAM,eAAeS,CAAQ,EAIhCV,EAAC,OAAI,UAAWE,EAAGE,EAAc,CAAE,KAAAU,CAAK,CAAC,EAAGN,CAAS,EACnD,UAAAT,EAAC,SACC,KAAMc,EACN,UAAWX,EACT,qLACF,EACA,IAAKa,EACJ,GAAGT,EACN,EACCI,GACH,EAbOX,EAAC,SAAM,KAAMc,EAAM,UAAWX,EAAGE,EAAc,CAAE,KAAAU,CAAK,CAAC,EAAG,OAAQN,CAAS,EAAG,IAAKO,EAAM,GAAGT,EAAO,CAgBhH,EACAM,EAAM,YAAc,QACpBP,EAAU,YAAc",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst inputVariants = cva(\n 'border-input text-info-primary bg-background rounded-box-small flex w-full flex-row items-center overflow-hidden border focus-visible:outline-none',\n {\n variants: {\n size: {\n sm: 'h-8 text-sm',\n base: 'h-10',\n lg: 'h-12 text-lg',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n * default: right\n */\n side?: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side = 'right', children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('flex h-full items-center', className, {\n '-order-1': side === 'left',\n 'order-2': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\n/**\n * Input - \u8F93\u5165\u6846\n *\n * @description \u6587\u672C\u8F93\u5165\u7EC4\u4EF6\uFF0C\u652F\u6301\u5404\u79CD\u8F93\u5165\u7C7B\u578B\u3001\u4E0D\u540C\u5C3A\u5BF8\u548C\u63D2\u69FD\u529F\u80FD\n */\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n if (!React.isValidElement(children)) {\n return <input type={type} className={cn(inputVariants({ size }), 'px-3', className)} ref={ref} {...props} />\n }\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
5
+ "mappings": "aA0CI,cAAAA,EAwBE,QAAAC,MAxBF,oBAxCJ,UAAYC,MAAW,QACvB,OAAS,MAAAC,MAAU,sBAEnB,OAAS,OAAAC,MAA8B,2BAEvC,MAAMC,EAAgBD,EACpB,qJACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,KAAM,OACN,GAAI,cACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAiBME,EAAYJ,EAAM,WAA6C,CAACK,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAAS,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAE9D,OACEP,EAAC,OACC,IAAKQ,EACJ,GAAGI,EACJ,UAAWT,EAAG,2BAA4BM,EAAW,CACnD,WAAYC,IAAS,OACrB,UAAWA,IAAS,OACtB,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAOKE,EAAQX,EAAM,WAClB,CAAC,CAAE,UAAAO,EAAW,KAAAK,EAAM,KAAAC,EAAM,SAAAJ,EAAU,GAAGJ,CAAM,EAAGS,IACzCd,EAAM,eAAeS,CAAQ,EAIhCV,EAAC,OAAI,UAAWE,EAAGE,EAAc,CAAE,KAAAU,CAAK,CAAC,EAAGN,CAAS,EACnD,UAAAT,EAAC,SACC,KAAMc,EACN,UAAWX,EACT,qLACF,EACA,IAAKa,EACJ,GAAGT,EACN,EACCI,GACH,EAbOX,EAAC,SAAM,KAAMc,EAAM,UAAWX,EAAGE,EAAc,CAAE,KAAAU,CAAK,CAAC,EAAG,OAAQN,CAAS,EAAG,IAAKO,EAAM,GAAGT,EAAO,CAgBhH,EACAM,EAAM,YAAc,QACpBP,EAAU,YAAc",
6
6
  "names": ["jsx", "jsxs", "React", "cn", "cva", "inputVariants", "InputSlot", "props", "forwardedRef", "className", "side", "children", "slotProps", "Input", "type", "size", "ref"]
7
7
  }
@@ -0,0 +1,19 @@
1
+ :root {
2
+ --btn-bg-active-color: var(--brand-color-0);
3
+
4
+ --brand-gradient-color-0: linear-gradient(90deg, var(--brand-color-0) 0%, var(--brand-color-0) 100%);
5
+
6
+ --btn-radius: 24px;
7
+ --box-radius: 16px;
8
+ --box-radius-small: 8px;
9
+
10
+ --radius: 40px;
11
+ --brand-color-0: #00CBEB;
12
+ --tabs-radius: 28px;
13
+ }
14
+
15
+ .aiui-dark {
16
+ --brand-color-0: ##00CBEB;
17
+ --btn-bg-active-color: var(--brand-color-0);
18
+ --brand-gradient-color-0: linear-gradient(90deg, var(--brand-color-0) 0%, var(--brand-color-0) 100%);
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",