@anker-in/headless-ui 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +14 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/components/checkbox.tsx +1 -1
- package/src/components/dialog.tsx +1 -0
- package/src/components/heading.tsx +22 -3
- package/src/components/radio.tsx +16 -4
- package/src/components/skeleton.tsx +1 -1
- package/src/components/text.tsx +31 -4
- package/src/stories/dialog.stories.tsx +60 -31
- package/src/stories/heading.stories.tsx +17 -5
- package/src/stories/input.stories.tsx +5 -0
- package/src/stories/popover.stories.tsx +19 -2
- package/src/stories/radio.stories.tsx +3 -3
- package/src/stories/text.stories.tsx +18 -5
- package/dist/cjs/components/badge.d.ts +0 -9
- package/dist/cjs/components/badge.js +0 -2
- package/dist/cjs/components/badge.js.map +0 -7
- package/dist/cjs/components/button.d.ts +0 -20
- package/dist/cjs/components/button.js +0 -2
- package/dist/cjs/components/button.js.map +0 -7
- package/dist/cjs/components/checkbox.d.ts +0 -11
- package/dist/cjs/components/checkbox.js +0 -2
- package/dist/cjs/components/checkbox.js.map +0 -7
- package/dist/cjs/components/dialog.d.ts +0 -19
- package/dist/cjs/components/dialog.js +0 -2
- package/dist/cjs/components/dialog.js.map +0 -7
- package/dist/cjs/components/heading.d.ts +0 -15
- package/dist/cjs/components/heading.js +0 -2
- package/dist/cjs/components/heading.js.map +0 -7
- package/dist/cjs/components/index.d.ts +0 -12
- package/dist/cjs/components/index.js +0 -2
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/cjs/components/input.d.ts +0 -21
- package/dist/cjs/components/input.js +0 -2
- package/dist/cjs/components/input.js.map +0 -7
- package/dist/cjs/components/popover.d.ts +0 -6
- package/dist/cjs/components/popover.js +0 -2
- package/dist/cjs/components/popover.js.map +0 -7
- package/dist/cjs/components/radio.d.ts +0 -16
- package/dist/cjs/components/radio.js +0 -2
- package/dist/cjs/components/radio.js.map +0 -7
- package/dist/cjs/components/skeleton.d.ts +0 -9
- package/dist/cjs/components/skeleton.js +0 -5
- package/dist/cjs/components/skeleton.js.map +0 -7
- package/dist/cjs/components/text.d.ts +0 -16
- package/dist/cjs/components/text.js +0 -2
- package/dist/cjs/components/text.js.map +0 -7
- package/dist/cjs/components/theme.d.ts +0 -13
- package/dist/cjs/components/theme.js +0 -2
- package/dist/cjs/components/theme.js.map +0 -7
- package/dist/cjs/helpers/component-props.d.ts +0 -7
- package/dist/cjs/helpers/component-props.js +0 -2
- package/dist/cjs/helpers/component-props.js.map +0 -7
- package/dist/cjs/helpers/constants.d.ts +0 -2
- package/dist/cjs/helpers/constants.js +0 -2
- package/dist/cjs/helpers/constants.js.map +0 -7
- package/dist/cjs/helpers/index.d.ts +0 -1
- package/dist/cjs/helpers/index.js +0 -2
- package/dist/cjs/helpers/index.js.map +0 -7
- package/dist/cjs/helpers/utils.d.ts +0 -2
- package/dist/cjs/helpers/utils.js +0 -2
- package/dist/cjs/helpers/utils.js.map +0 -7
- package/dist/cjs/icons/spinner.d.ts +0 -7
- package/dist/cjs/icons/spinner.js +0 -2
- package/dist/cjs/icons/spinner.js.map +0 -7
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/stories/badge.stories.d.ts +0 -26
- package/dist/cjs/stories/badge.stories.js +0 -2
- package/dist/cjs/stories/badge.stories.js.map +0 -7
- package/dist/cjs/stories/button.stories.d.ts +0 -47
- package/dist/cjs/stories/button.stories.js +0 -2
- package/dist/cjs/stories/button.stories.js.map +0 -7
- package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
- package/dist/cjs/stories/checkbox.stories.js +0 -2
- package/dist/cjs/stories/checkbox.stories.js.map +0 -7
- package/dist/cjs/stories/dialog.stories.d.ts +0 -5
- package/dist/cjs/stories/dialog.stories.js +0 -2
- package/dist/cjs/stories/dialog.stories.js.map +0 -7
- package/dist/cjs/stories/heading.stories.d.ts +0 -68
- package/dist/cjs/stories/heading.stories.js +0 -2
- package/dist/cjs/stories/heading.stories.js.map +0 -7
- package/dist/cjs/stories/input.stories.d.ts +0 -30
- package/dist/cjs/stories/input.stories.js +0 -2
- package/dist/cjs/stories/input.stories.js.map +0 -7
- package/dist/cjs/stories/popover.stories.d.ts +0 -5
- package/dist/cjs/stories/popover.stories.js +0 -2
- package/dist/cjs/stories/popover.stories.js.map +0 -7
- package/dist/cjs/stories/radio.stories.d.ts +0 -36
- package/dist/cjs/stories/radio.stories.js +0 -2
- package/dist/cjs/stories/radio.stories.js.map +0 -7
- package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
- package/dist/cjs/stories/skeleton.stories.js +0 -2
- package/dist/cjs/stories/skeleton.stories.js.map +0 -7
- package/dist/cjs/stories/text.stories.d.ts +0 -69
- package/dist/cjs/stories/text.stories.js +0 -10
- package/dist/cjs/stories/text.stories.js.map +0 -7
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/components/badge.d.ts +0 -9
- package/dist/esm/components/badge.js +0 -2
- package/dist/esm/components/badge.js.map +0 -7
- package/dist/esm/components/button.d.ts +0 -20
- package/dist/esm/components/button.js +0 -2
- package/dist/esm/components/button.js.map +0 -7
- package/dist/esm/components/checkbox.d.ts +0 -11
- package/dist/esm/components/checkbox.js +0 -2
- package/dist/esm/components/checkbox.js.map +0 -7
- package/dist/esm/components/dialog.d.ts +0 -19
- package/dist/esm/components/dialog.js +0 -2
- package/dist/esm/components/dialog.js.map +0 -7
- package/dist/esm/components/heading.d.ts +0 -15
- package/dist/esm/components/heading.js +0 -2
- package/dist/esm/components/heading.js.map +0 -7
- package/dist/esm/components/index.d.ts +0 -12
- package/dist/esm/components/index.js +0 -2
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/components/input.d.ts +0 -21
- package/dist/esm/components/input.js +0 -2
- package/dist/esm/components/input.js.map +0 -7
- package/dist/esm/components/popover.d.ts +0 -6
- package/dist/esm/components/popover.js +0 -2
- package/dist/esm/components/popover.js.map +0 -7
- package/dist/esm/components/radio.d.ts +0 -16
- package/dist/esm/components/radio.js +0 -2
- package/dist/esm/components/radio.js.map +0 -7
- package/dist/esm/components/skeleton.d.ts +0 -9
- package/dist/esm/components/skeleton.js +0 -5
- package/dist/esm/components/skeleton.js.map +0 -7
- package/dist/esm/components/text.d.ts +0 -16
- package/dist/esm/components/text.js +0 -2
- package/dist/esm/components/text.js.map +0 -7
- package/dist/esm/components/theme.d.ts +0 -13
- package/dist/esm/components/theme.js +0 -2
- package/dist/esm/components/theme.js.map +0 -7
- package/dist/esm/helpers/component-props.d.ts +0 -7
- package/dist/esm/helpers/component-props.js +0 -1
- package/dist/esm/helpers/component-props.js.map +0 -7
- package/dist/esm/helpers/constants.d.ts +0 -2
- package/dist/esm/helpers/constants.js +0 -2
- package/dist/esm/helpers/constants.js.map +0 -7
- package/dist/esm/helpers/index.d.ts +0 -1
- package/dist/esm/helpers/index.js +0 -2
- package/dist/esm/helpers/index.js.map +0 -7
- package/dist/esm/helpers/utils.d.ts +0 -2
- package/dist/esm/helpers/utils.js +0 -2
- package/dist/esm/helpers/utils.js.map +0 -7
- package/dist/esm/icons/spinner.d.ts +0 -7
- package/dist/esm/icons/spinner.js +0 -2
- package/dist/esm/icons/spinner.js.map +0 -7
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/package.json +0 -3
- package/dist/esm/stories/badge.stories.d.ts +0 -26
- package/dist/esm/stories/badge.stories.js +0 -2
- package/dist/esm/stories/badge.stories.js.map +0 -7
- package/dist/esm/stories/button.stories.d.ts +0 -47
- package/dist/esm/stories/button.stories.js +0 -2
- package/dist/esm/stories/button.stories.js.map +0 -7
- package/dist/esm/stories/checkbox.stories.d.ts +0 -46
- package/dist/esm/stories/checkbox.stories.js +0 -2
- package/dist/esm/stories/checkbox.stories.js.map +0 -7
- package/dist/esm/stories/dialog.stories.d.ts +0 -5
- package/dist/esm/stories/dialog.stories.js +0 -2
- package/dist/esm/stories/dialog.stories.js.map +0 -7
- package/dist/esm/stories/heading.stories.d.ts +0 -68
- package/dist/esm/stories/heading.stories.js +0 -2
- package/dist/esm/stories/heading.stories.js.map +0 -7
- package/dist/esm/stories/input.stories.d.ts +0 -30
- package/dist/esm/stories/input.stories.js +0 -2
- package/dist/esm/stories/input.stories.js.map +0 -7
- package/dist/esm/stories/popover.stories.d.ts +0 -5
- package/dist/esm/stories/popover.stories.js +0 -2
- package/dist/esm/stories/popover.stories.js.map +0 -7
- package/dist/esm/stories/radio.stories.d.ts +0 -36
- package/dist/esm/stories/radio.stories.js +0 -2
- package/dist/esm/stories/radio.stories.js.map +0 -7
- package/dist/esm/stories/skeleton.stories.d.ts +0 -20
- package/dist/esm/stories/skeleton.stories.js +0 -2
- package/dist/esm/stories/skeleton.stories.js.map +0 -7
- package/dist/esm/stories/text.stories.d.ts +0 -69
- package/dist/esm/stories/text.stories.js +0 -10
- package/dist/esm/stories/text.stories.js.map +0 -7
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
- package/style.css +0 -1342
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const DialogHeader: {
|
|
10
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
declare const DialogFooter: {
|
|
14
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element;
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
17
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var C=Object.create;var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(a,e)=>{for(var i in e)r(a,i,{get:e[i],enumerable:!0})},y=(a,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of T(e))!w.call(a,l)&&l!==i&&r(a,l,{get:()=>e[l],enumerable:!(n=b(e,l))||n.enumerable});return a};var R=(a,e,i)=>(i=a!=null?C(h(a)):{},y(e||!a||!a.__esModule?r(i,"default",{value:a,enumerable:!0}):i,a)),H=a=>y(r({},"__esModule",{value:!0}),a);var z={};E(z,{Dialog:()=>N,DialogClose:()=>x,DialogContent:()=>f,DialogDescription:()=>u,DialogFooter:()=>g,DialogHeader:()=>p,DialogOverlay:()=>m,DialogPortal:()=>c,DialogTitle:()=>D,DialogTrigger:()=>P});module.exports=H(z);var o=require("react/jsx-runtime"),d=R(require("react")),t=R(require("@radix-ui/react-dialog")),v=require("@radix-ui/react-icons"),s=require("../helpers/index.js");const N=t.Root,P=t.Trigger,c=t.Portal,x=t.Close,m=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Overlay,{ref:i,className:(0,s.cn)("data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 ai-fixed ai-inset-0 ai-z-50 ai-bg-black/80",a),...e}));m.displayName=t.Overlay.displayName;const f=d.forwardRef(({className:a,children:e,...i},n)=>(0,o.jsxs)(c,{children:[(0,o.jsx)(m,{}),(0,o.jsxs)(t.Content,{ref:n,className:(0,s.cn)("ai-bg-background data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[state=closed]:ai-slide-out-to-left-1/2 data-[state=closed]:ai-slide-out-to-top-[48%] data-[state=open]:ai-slide-in-from-left-1/2 data-[state=open]:ai-slide-in-from-top-[48%] ai-fixed ai-left-1/2 ai-top-1/2 ai-z-50 ai-grid ai-w-full ai-max-w-lg -ai-translate-x-1/2 -ai-translate-y-1/2 ai-gap-4 ai-border ai-p-6 ai-shadow-lg ai-duration-200 sm:ai-rounded-lg",a),...i,children:[e,(0,o.jsxs)(t.Close,{className:"ai-ring-offset-background focus:ai-ring-ring data-[state=open]:ai-bg-accent data-[state=open]:ai-text-muted-foreground ai-absolute ai-right-4 ai-top-4 ai-rounded-sm ai-opacity-70 ai-transition-opacity hover:ai-opacity-100 focus:ai-outline-none focus:ai-ring-2 focus:ai-ring-offset-2 disabled:ai-pointer-events-none",children:[(0,o.jsx)(v.Cross2Icon,{className:"ai-size-4"}),(0,o.jsx)("span",{className:"ai-sr-only",children:"Close"})]})]})]}));f.displayName=t.Content.displayName;const p=({className:a,...e})=>(0,o.jsx)("div",{className:(0,s.cn)("ai-flex ai-flex-col ai-space-y-1.5 ai-text-center sm:ai-text-left",a),...e});p.displayName="DialogHeader";const g=({className:a,...e})=>(0,o.jsx)("div",{className:(0,s.cn)("ai-flex ai-flex-col-reverse sm:ai-flex-row sm:ai-justify-end sm:ai-space-x-2",a),...e});g.displayName="DialogFooter";const D=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Title,{ref:i,className:(0,s.cn)("ai-text-lg ai-font-semibold ai-leading-none ai-tracking-tight",a),...e}));D.displayName=t.Title.displayName;const u=d.forwardRef(({className:a,...e},i)=>(0,o.jsx)(t.Description,{ref:i,className:(0,s.cn)("ai-text-muted-foreground ai-text-sm",a),...e}));u.displayName=t.Description.displayName;
|
|
2
|
-
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/dialog.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 ai-fixed ai-inset-0 ai-z-50 ai-bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'ai-bg-background data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[state=closed]:ai-slide-out-to-left-1/2 data-[state=closed]:ai-slide-out-to-top-[48%] data-[state=open]:ai-slide-in-from-left-1/2 data-[state=open]:ai-slide-in-from-top-[48%] ai-fixed ai-left-1/2 ai-top-1/2 ai-z-50 ai-grid ai-w-full ai-max-w-lg -ai-translate-x-1/2 -ai-translate-y-1/2 ai-gap-4 ai-border ai-p-6 ai-shadow-lg ai-duration-200 sm:ai-rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ai-ring-offset-background focus:ai-ring-ring data-[state=open]:ai-bg-accent data-[state=open]:ai-text-muted-foreground ai-absolute ai-right-4 ai-top-4 ai-rounded-sm ai-opacity-70 ai-transition-opacity hover:ai-opacity-100 focus:ai-outline-none focus:ai-ring-2 focus:ai-ring-offset-2 disabled:ai-pointer-events-none\">\n <Cross2Icon className=\"ai-size-4\" />\n <span className=\"ai-sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('ai-flex ai-flex-col ai-space-y-1.5 ai-text-center sm:ai-text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('ai-flex ai-flex-col-reverse sm:ai-flex-row sm:ai-justify-end sm:ai-space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('ai-text-lg ai-font-semibold ai-leading-none ai-tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('ai-text-muted-foreground ai-text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAoBE,IAAAa,EAAA,6BAlBFC,EAAuB,oBACvBC,EAAiC,qCACjCC,EAA2B,iCAE3BC,EAAmB,+BAEnB,MAAMf,EAASa,EAAgB,KAEzBJ,EAAgBI,EAAgB,QAEhCN,EAAeM,EAAgB,OAE/BZ,EAAcY,EAAgB,MAE9BP,EAAgBM,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,kLACAF,CACF,EACC,GAAGC,EACN,CACD,EACDX,EAAc,YAAcO,EAAgB,QAAQ,YAEpD,MAAMX,EAAgBU,EAAM,WAG1B,CAAC,CAAE,UAAAI,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OACpC,QAACX,EAAA,CACC,oBAACD,EAAA,EAAc,KACf,QAACO,EAAgB,QAAhB,CACC,IAAKK,EACL,aAAW,MACT,okBACAF,CACF,EACC,GAAGC,EAEH,UAAAE,KACD,QAACN,EAAgB,MAAhB,CAAsB,UAAU,6TAC/B,oBAAC,cAAW,UAAU,YAAY,KAClC,OAAC,QAAK,UAAU,aAAa,iBAAK,GACpC,GACF,GACF,CACD,EACDX,EAAc,YAAcW,EAAgB,QAAQ,YAEpD,MAAMR,EAAe,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,OAC1C,OAAC,OAAI,aAAW,MAAG,oEAAqED,CAAS,EAAI,GAAGC,EAAO,EAEjHZ,EAAa,YAAc,eAE3B,MAAMD,EAAe,CAAC,CAAE,UAAAY,EAAW,GAAGC,CAAM,OAC1C,OAAC,OACC,aAAW,MAAG,+EAAgFD,CAAS,EACtG,GAAGC,EACN,EAEFb,EAAa,YAAc,eAE3B,MAAMI,EAAcI,EAAM,WAGxB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,MAAhB,CACC,IAAKK,EACL,aAAW,MAAG,gEAAiEF,CAAS,EACvF,GAAGC,EACN,CACD,EACDT,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMV,EAAoBS,EAAM,WAG9B,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAACL,EAAgB,YAAhB,CAA4B,IAAKK,EAAK,aAAW,MAAG,sCAAuCF,CAAS,EAAI,GAAGC,EAAO,CACpH,EACDd,EAAkB,YAAcU,EAAgB,YAAY",
|
|
6
|
-
"names": ["dialog_exports", "__export", "Dialog", "DialogClose", "DialogContent", "DialogDescription", "DialogFooter", "DialogHeader", "DialogOverlay", "DialogPortal", "DialogTitle", "DialogTrigger", "__toCommonJS", "import_jsx_runtime", "React", "DialogPrimitive", "import_react_icons", "import_helpers", "className", "props", "ref", "children"]
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const headingVariants: (props?: ({
|
|
4
|
-
size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
5
|
-
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
-
interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
|
|
8
|
-
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined;
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
color?: string;
|
|
11
|
-
html?: string;
|
|
12
|
-
}
|
|
13
|
-
declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
-
export { Heading };
|
|
15
|
-
export type { HeadingProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var R=Object.create;var o=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b(e))!C.call(t,i)&&i!==a&&o(t,i,{get:()=>e[i],enumerable:!(n=V(e,i))||n.enumerable});return t};var E=(t,e,a)=>(a=t!=null?R(w(t)):{},d(e||!t||!t.__esModule?o(a,"default",{value:t,enumerable:!0}):a,t)),N=t=>d(o({},"__esModule",{value:!0}),t);var T={};z(T,{Heading:()=>l});module.exports=N(T);var s=require("react/jsx-runtime"),g=require("../helpers/index.js"),p=require("@radix-ui/react-slot"),f=require("class-variance-authority"),x=E(require("react"));const S=(0,f.cva)("",{variants:{size:{1:"ai-text-xs",2:"ai-text-sm",3:"ai-text-base",4:"ai-text-lg",5:"ai-text-xl",6:"ai-text-2xl",7:"ai-text-3xl",8:"ai-text-4xl",9:"ai-text-5xl"},weights:{light:"ai-font-light",normal:"ai-font-normal",medium:"ai-font-medium",bold:"ai-font-bold"}},defaultVariants:{size:3,weights:"normal"}}),l=x.default.forwardRef((t,e)=>{const{children:a,className:n,size:i,weights:c,asChild:u,as:P="h1",color:r,html:m,...y}=t,h=m?{dangerouslySetInnerHTML:{__html:m}}:null,H=r?{style:{color:r}}:null;return(0,s.jsx)(p.Slot,{...y,ref:e,className:(0,g.cn)(S({size:i,weights:c}),n),...h,...H,children:u?a:(0,s.jsx)(P,{children:h?null:a})})});l.displayName="Heading";
|
|
2
|
-
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 1: 'ai-text-xs',\n 2: 'ai-text-sm',\n 3: 'ai-text-base',\n 4: 'ai-text-lg',\n 5: 'ai-text-xl',\n 6: 'ai-text-2xl',\n 7: 'ai-text-3xl',\n 8: 'ai-text-4xl',\n 9: 'ai-text-5xl',\n },\n weights: {\n light: 'ai-font-light',\n normal: 'ai-font-normal',\n medium: 'ai-font-medium',\n bold: 'ai-font-bold',\n },\n },\n defaultVariants: {\n size: 3,\n weights: 'normal',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size, weights, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weights,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqE4B,IAAAI,EAAA,6BArE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,GAAI,CAC9B,SAAU,CACR,KAAM,CACJ,EAAG,aACH,EAAG,aACH,EAAG,eACH,EAAG,aACH,EAAG,aACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,aACL,EACA,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,OAAQ,iBACR,KAAM,cACR,CACF,EACA,gBAAiB,CACf,KAAM,EACN,QAAS,QACX,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAM,QAAAC,EAAS,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIV,EAChGW,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKT,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,QAAAC,CACF,CAAC,EACDF,CACF,EACC,GAAGQ,EACH,GAAGC,EAEH,SAAAN,EAAUJ,KAAW,OAACK,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
|
|
6
|
-
"names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "weights", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './button.js';
|
|
2
|
-
export { default as Badge } from './badge.js';
|
|
3
|
-
export * from './input.js';
|
|
4
|
-
export { default as Checkbox } from './checkbox.js';
|
|
5
|
-
export { default as Skeleton } from './skeleton.js';
|
|
6
|
-
export * from './dialog.js';
|
|
7
|
-
export * from './popover.js';
|
|
8
|
-
export * from './radio.js';
|
|
9
|
-
export * from './dialog.js';
|
|
10
|
-
export * from './text.js';
|
|
11
|
-
export * from './heading.js';
|
|
12
|
-
export { default as Theme } from './theme.js';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.create;var a=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var f in t)a(e,f,{get:t[f],enumerable:!0})},p=(e,t,f,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of b(t))!g.call(e,m)&&m!==f&&a(e,m,{get:()=>t[m],enumerable:!(d=B(t,m))||d.enumerable});return e},r=(e,t,f)=>(p(e,t,"default"),f&&p(f,t,"default")),x=(e,t,f)=>(f=e!=null?n(c(e)):{},p(t||!e||!e.__esModule?a(f,"default",{value:e,enumerable:!0}):f,e)),S=e=>p(a({},"__esModule",{value:!0}),e);var o={};C(o,{Badge:()=>u.default,Button:()=>l.default,Checkbox:()=>s.default,Skeleton:()=>h.default,Theme:()=>k.default});module.exports=S(o);var l=x(require("./button.js")),u=x(require("./badge.js"));r(o,require("./input.js"),module.exports);var s=x(require("./checkbox.js")),h=x(require("./skeleton.js"));r(o,require("./dialog.js"),module.exports);r(o,require("./popover.js"),module.exports);r(o,require("./radio.js"),module.exports);r(o,require("./dialog.js"),module.exports);r(o,require("./text.js"),module.exports);r(o,require("./heading.js"),module.exports);var k=x(require("./theme.js"));
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["// theme\n// export { default as Theme } from './theme'\n\n// components\nexport { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport * from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport * from './dialog.js'\nexport * from './popover.js'\nexport * from './radio.js'\nexport * from './dialog.js'\nexport * from './text.js'\nexport * from './heading.js'\nexport { default as Theme } from './theme.js'\n"],
|
|
5
|
-
"mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6HAAAE,EAAAF,GAIA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAAL,EAAc,sBANd,gBAQA,IAAAM,EAAoC,4BAEpCC,EAAoC,4BACpCF,EAAAL,EAAc,uBAXd,gBAYAK,EAAAL,EAAc,wBAZd,gBAaAK,EAAAL,EAAc,sBAbd,gBAcAK,EAAAL,EAAc,uBAdd,gBAeAK,EAAAL,EAAc,qBAfd,gBAgBAK,EAAAL,EAAc,wBAhBd,gBAiBA,IAAAQ,EAAiC",
|
|
6
|
-
"names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "__reExport", "import_checkbox", "import_skeleton", "import_theme"]
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const inputVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "lg" | "base" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
-
export interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {
|
|
8
|
-
}
|
|
9
|
-
interface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {
|
|
10
|
-
/**
|
|
11
|
-
* 插槽的位置
|
|
12
|
-
*/
|
|
13
|
-
side: 'left' | 'right';
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* InputSlot
|
|
17
|
-
* 用来在 Input 组件中插入额外的内容,比如icon ,按钮
|
|
18
|
-
*/
|
|
19
|
-
declare const InputSlot: React.ForwardRefExoticComponent<InputSlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
-
export { Input, InputSlot };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var c=Object.create;var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var x=(e,i)=>{for(var t in i)n(e,t,{get:i[t],enumerable:!0})},f=(e,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of v(i))!h.call(e,a)&&a!==t&&n(e,a,{get:()=>i[a],enumerable:!(o=b(i,a))||o.enumerable});return e};var P=(e,i,t)=>(t=e!=null?c(g(e)):{},f(i||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>f(n({},"__esModule",{value:!0}),e);var y={};x(y,{Input:()=>d,InputSlot:()=>l});module.exports=I(y);var r=require("react/jsx-runtime"),u=P(require("react")),s=require("../helpers/index.js"),m=require("class-variance-authority");const R=(0,m.cva)("ai-border-input ai-bg-background focus-visible:ai-ring-ring ai-ring-offset-background ai-flex ai-flex-row ai-items-center ai-overflow-hidden ai-rounded-md ai-border ai-px-3 focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2",{variants:{size:{sm:"ai-h-8",base:"ai-h-10",lg:"ai-h-12"}},defaultVariants:{size:"base"}}),l=u.forwardRef((e,i)=>{const{className:t,side:o,children:a,...p}=e;return(0,r.jsx)("div",{ref:i,...p,className:(0,s.cn)("ai-flex ai-h-full ai-items-center ai-px-2",t,{"-ai-order-1 ai-pl-0":o==="left","ai-order-2 ai-pr-0":o==="right"}),children:a})}),d=u.forwardRef(({className:e,type:i,size:t,children:o,...a},p)=>(0,r.jsxs)("div",{className:(0,s.cn)(R({size:t}),e),children:[(0,r.jsx)("input",{type:i,className:(0,s.cn)("placeholder:ai-text-muted-foreground ai-flex ai-size-full ai-text-sm file:ai-border-0 file:ai-bg-transparent file:ai-text-sm file:ai-font-medium focus-visible:ai-outline-none disabled:ai-cursor-not-allowed disabled:ai-opacity-50"),ref:p,...a}),o]}));d.displayName="Input",l.displayName="InputSlot";
|
|
2
|
-
//# sourceMappingURL=input.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 'ai-border-input ai-bg-background focus-visible:ai-ring-ring ai-ring-offset-background ai-flex ai-flex-row ai-items-center ai-overflow-hidden ai-rounded-md ai-border ai-px-3 focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2',\n {\n variants: {\n size: {\n sm: 'ai-h-8',\n base: 'ai-h-10',\n lg: 'ai-h-12',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\nexport interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {}\n\ntype InputSlotElement = React.ElementRef<'div'>\ninterface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {\n /**\n * \u63D2\u69FD\u7684\u4F4D\u7F6E\n */\n side: 'left' | 'right'\n}\n\n/**\n * InputSlot\n * \u7528\u6765\u5728 Input \u7EC4\u4EF6\u4E2D\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9\uFF0C\u6BD4\u5982icon \uFF0C\u6309\u94AE\n */\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>((props, forwardedRef) => {\n const { className, side, children, ...slotProps } = props\n\n return (\n <div\n ref={forwardedRef}\n {...slotProps}\n className={cn('ai-flex ai-h-full ai-items-center ai-px-2', className, {\n '-ai-order-1 ai-pl-0': side === 'left',\n 'ai-order-2 ai-pr-0': side === 'right',\n })}\n >\n {children}\n </div>\n )\n})\n\nconst Input = React.forwardRef<React.ElementRef<'input'>, InputProps>(\n ({ className, type, size, children, ...props }, ref) => {\n return (\n <div className={cn(inputVariants({ size }), className)}>\n <input\n type={type}\n className={cn(\n 'placeholder:ai-text-muted-foreground ai-flex ai-size-full ai-text-sm file:ai-border-0 file:ai-bg-transparent file:ai-text-sm file:ai-font-medium focus-visible:ai-outline-none disabled:ai-cursor-not-allowed disabled:ai-opacity-50'\n )}\n ref={ref}\n {...props}\n />\n {children}\n </div>\n )\n }\n)\nInput.displayName = 'Input'\nInputSlot.displayName = 'InputSlot'\n\nexport { Input, InputSlot }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,cAAAC,IAAA,eAAAC,EAAAJ,GAyCI,IAAAK,EAAA,6BAvCJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAAuC,oCAEvC,MAAMC,KAAgB,OACpB,sOACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,KAAM,UACN,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAgBMN,EAAYG,EAAM,WAA6C,CAACI,EAAOC,IAAiB,CAC5F,KAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,SAAAC,EAAU,GAAGC,CAAU,EAAIL,EAEpD,SACE,OAAC,OACC,IAAKC,EACJ,GAAGI,EACJ,aAAW,MAAG,4CAA6CH,EAAW,CACpE,sBAAuBC,IAAS,OAChC,qBAAsBA,IAAS,OACjC,CAAC,EAEA,SAAAC,EACH,CAEJ,CAAC,EAEKZ,EAAQI,EAAM,WAClB,CAAC,CAAE,UAAAM,EAAW,KAAAI,EAAM,KAAAC,EAAM,SAAAH,EAAU,GAAGJ,CAAM,EAAGQ,OAE5C,QAAC,OAAI,aAAW,MAAGT,EAAc,CAAE,KAAAQ,CAAK,CAAC,EAAGL,CAAS,EACnD,oBAAC,SACC,KAAMI,EACN,aAAW,MACT,sOACF,EACA,IAAKE,EACJ,GAAGR,EACN,EACCI,GACH,CAGN,EACAZ,EAAM,YAAc,QACpBC,EAAU,YAAc",
|
|
6
|
-
"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
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
-
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var v=Object.create;var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var C=(o,t)=>{for(var e in t)n(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of g(t))!R.call(o,a)&&a!==e&&n(o,a,{get:()=>t[a],enumerable:!(r=c(t,a))||r.enumerable});return o};var m=(o,t,e)=>(e=o!=null?v(u(o)):{},p(t||!o||!o.__esModule?n(e,"default",{value:o,enumerable:!0}):e,o)),b=o=>p(n({},"__esModule",{value:!0}),o);var y={};C(y,{Popover:()=>l,PopoverContent:()=>d,PopoverTrigger:()=>P});module.exports=b(y);var s=require("react/jsx-runtime"),h=m(require("react")),i=m(require("@radix-ui/react-popover")),f=require("../helpers/utils.js");const l=i.Root,P=i.Trigger,d=h.forwardRef(({className:o,align:t="center",sideOffset:e=4,...r},a)=>(0,s.jsx)(i.Portal,{children:(0,s.jsx)(i.Content,{ref:a,align:t,sideOffset:e,className:(0,f.cn)("ai-bg-popover ai-text-popover-foreground data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[side=bottom]:ai-slide-in-from-top-2 data-[side=left]:ai-slide-in-from-right-2 data-[side=right]:ai-slide-in-from-left-2 data-[side=top]:ai-slide-in-from-bottom-2 ai-z-50 ai-w-72 ai-rounded-md ai-border ai-p-4 ai-shadow-md ai-outline-none",o),...r})}));d.displayName=i.Content.displayName;
|
|
2
|
-
//# sourceMappingURL=popover.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/popover.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '../helpers/utils.js'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'ai-bg-popover ai-text-popover-foreground data-[state=open]:ai-animate-in data-[state=closed]:ai-animate-out data-[state=closed]:ai-fade-out-0 data-[state=open]:ai-fade-in-0 data-[state=closed]:ai-zoom-out-95 data-[state=open]:ai-zoom-in-95 data-[side=bottom]:ai-slide-in-from-top-2 data-[side=left]:ai-slide-in-from-right-2 data-[side=right]:ai-slide-in-from-left-2 data-[side=top]:ai-slide-in-from-bottom-2 ai-z-50 ai-w-72 ai-rounded-md ai-border ai-p-4 ai-shadow-md ai-outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAgBI,IAAAM,EAAA,6BAdJC,EAAuB,oBACvBC,EAAkC,sCAElCC,EAAmB,+BAEnB,MAAMP,EAAUM,EAAiB,KAE3BJ,EAAiBI,EAAiB,QAElCL,EAAiBI,EAAM,WAG3B,CAAC,CAAE,UAAAG,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC5D,OAACN,EAAiB,OAAjB,CACC,mBAACA,EAAiB,QAAjB,CACC,IAAKM,EACL,MAAOH,EACP,WAAYC,EACZ,aAAW,MACT,seACAF,CACF,EACC,GAAGG,EACN,EACF,CACD,EACDV,EAAe,YAAcK,EAAiB,QAAQ",
|
|
6
|
-
"names": ["popover_exports", "__export", "Popover", "PopoverContent", "PopoverTrigger", "__toCommonJS", "import_jsx_runtime", "React", "PopoverPrimitive", "import_utils", "className", "align", "sideOffset", "props", "ref"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const radioGroupVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "lg" | "base" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
-
interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
8
|
-
/** 尺寸 */
|
|
9
|
-
size?: 'sm' | 'base' | 'lg';
|
|
10
|
-
}
|
|
11
|
-
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioGroupVariants> {
|
|
13
|
-
}
|
|
14
|
-
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
-
export { RadioGroup, RadioGroupItem };
|
|
16
|
-
export type { RadioGroupProps, RadioGroupItemProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var G=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var x=(e,i)=>{for(var o in i)p(e,o,{get:i[o],enumerable:!0})},c=(e,i,o,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of v(i))!g.call(e,a)&&a!==o&&p(e,a,{get:()=>i[a],enumerable:!(r=y(i,a))||r.enumerable});return e};var f=(e,i,o)=>(o=e!=null?G(b(e)):{},c(i||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),I=e=>c(p({},"__esModule",{value:!0}),e);var C={};x(C,{RadioGroup:()=>m,RadioGroupItem:()=>u});module.exports=I(C);var t=require("react/jsx-runtime"),d=f(require("react")),s=f(require("@radix-ui/react-radio-group")),l=require("@radix-ui/react-icons"),P=require("class-variance-authority"),n=require("../helpers/index.js");const R=d.createContext({size:"base"}),z=(0,P.cva)("ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),m=d.forwardRef(({className:e,children:i,size:o,...r},a)=>(0,t.jsx)(s.Root,{className:(0,n.cn)("grid gap-2",e),...r,ref:a,children:(0,t.jsx)(R.Provider,{value:{size:o},children:i})}));m.displayName=s.Root.displayName;const u=d.forwardRef(({className:e,size:i,...o},r)=>{const{size:a}=d.useContext(R);return(0,t.jsx)(s.Item,{ref:r,className:(0,n.cn)(z({size:i??a}),e),...o,children:(0,t.jsx)(s.Indicator,{className:"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full",children:(0,t.jsx)(l.CheckIcon,{})})})});u.displayName=s.Item.displayName;
|
|
2
|
-
//# sourceMappingURL=radio.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 = RadioGroupPrimitive.Root.displayName\n\ninterface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n VariantProps<typeof radioGroupVariants> {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, size, ...props }, ref) => {\n const { size: sizeFromParent } = React.useContext(RadioContext)\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n radioGroupVariants({\n size: size ?? sizeFromParent,\n }),\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full\">\n <CheckIcon />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n }\n)\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\nexport type { RadioGroupProps, RadioGroupItemProps }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAqCQ,IAAAK,EAAA,6BAnCRC,EAAuB,oBACvBC,EAAqC,0CACrCC,EAA0B,iCAC1BC,EAAuC,oCACvCC,EAAmB,+BAEnB,MAAMC,EAAeL,EAAM,cAA+C,CACxE,KAAM,MACR,CAAC,EAEKM,KAAqB,OACzB,0VACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAOMV,EAAaI,EAAM,WACvB,CAAC,CAAE,UAAAO,EAAW,SAAAC,EAAU,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAEtC,OAACV,EAAoB,KAApB,CAAyB,aAAW,MAAG,aAAcM,CAAS,EAAI,GAAGG,EAAO,IAAKC,EAChF,mBAACN,EAAa,SAAb,CAAsB,MAAO,CAAE,KAAAI,CAAK,EAAI,SAAAD,EAAS,EACpD,CAGN,EACAZ,EAAW,YAAcK,EAAoB,KAAK,YAMlD,MAAMJ,EAAiBG,EAAM,WAC3B,CAAC,CAAE,UAAAO,EAAW,KAAAE,EAAM,GAAGC,CAAM,EAAGC,IAAQ,CACtC,KAAM,CAAE,KAAMC,CAAe,EAAIZ,EAAM,WAAWK,CAAY,EAC9D,SACE,OAACJ,EAAoB,KAApB,CACC,IAAKU,EACL,aAAW,MACTL,EAAmB,CACjB,KAAMG,GAAQG,CAChB,CAAC,EACDL,CACF,EACC,GAAGG,EAEJ,mBAACT,EAAoB,UAApB,CAA8B,UAAU,gFACvC,mBAAC,cAAU,EACb,EACF,CAEJ,CACF,EACAJ,EAAe,YAAcI,EAAoB,KAAK",
|
|
6
|
-
"names": ["radio_exports", "__export", "RadioGroup", "RadioGroupItem", "__toCommonJS", "import_jsx_runtime", "React", "RadioGroupPrimitive", "import_react_icons", "import_class_variance_authority", "import_helpers", "RadioContext", "radioGroupVariants", "className", "children", "size", "props", "ref", "sizeFromParent"]
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
|
-
interface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {
|
|
4
|
-
/** 是否正在加载 */
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
-
export default Skeleton;
|
|
9
|
-
export type { SkeletonProps };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var S=(e,n)=>{for(var o in n)i(e,o,{get:n[o],enumerable:!0})},l=(e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of u(n))!P.call(e,t)&&t!==o&&i(e,t,{get:()=>n[t],enumerable:!(a=k(n,t))||a.enumerable});return e};var v=(e,n,o)=>(o=e!=null?b(g(e)):{},l(n||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),R=e=>l(i({},"__esModule",{value:!0}),e);var y={};S(y,{default:()=>h});module.exports=R(y);var m=require("react/jsx-runtime"),r=v(require("react")),p=require("../helpers/index.js"),d=require("@radix-ui/react-slot");const s=r.forwardRef((e,n)=>{const{children:o,className:a,loading:t=!0,...c}=e;if(!t)return o;const f=r.isValidElement(o)?d.Slot:"span";return(0,m.jsx)(f,{ref:n,className:(0,p.cn)(`ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none
|
|
2
|
-
!ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone
|
|
3
|
-
after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible
|
|
4
|
-
`,a),"data-inline-skeleton":r.isValidElement(o)?void 0:!0,tabIndex:-1,...c,children:o})});s.displayName="Skeleton";var h=s;
|
|
5
|
-
//# sourceMappingURL=skeleton.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/skeleton.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\ntype SkeletonElement = React.ElementRef<'span'>\n\ninterface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {\n /** \u662F\u5426\u6B63\u5728\u52A0\u8F7D */\n loading?: boolean\n}\n\nconst Skeleton = React.forwardRef<SkeletonElement, SkeletonProps>((props, forwardedRef) => {\n const { children, className, loading = true, ...skeletonProps } = props\n\n if (!loading) return children\n const Tag = React.isValidElement(children) ? Slot : 'span'\n\n return (\n <Tag\n ref={forwardedRef}\n className={cn(\n `ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none \n !ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone\n after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible\n `,\n className\n )}\n data-inline-skeleton={React.isValidElement(children) ? undefined : true}\n tabIndex={-1}\n {...skeletonProps}\n >\n {children}\n </Tag>\n )\n})\n\nSkeleton.displayName = 'Skeleton'\n\nexport default Skeleton\nexport type { SkeletonProps }\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmBI,IAAAI,EAAA,6BAnBJC,EAAuB,oBACvBC,EAAmB,+BACnBC,EAAqB,gCAUrB,MAAMC,EAAWH,EAAM,WAA2C,CAACI,EAAOC,IAAiB,CACzF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAc,EAAIL,EAElE,GAAI,CAACI,EAAS,OAAOF,EACrB,MAAMI,EAAMV,EAAM,eAAeM,CAAQ,EAAI,OAAO,OAEpD,SACE,OAACI,EAAA,CACC,IAAKL,EACL,aAAW,MACT;AAAA;AAAA;AAAA,UAIAE,CACF,EACA,uBAAsBP,EAAM,eAAeM,CAAQ,EAAI,OAAY,GACnE,SAAU,GACT,GAAGG,EAEH,SAAAH,EACH,CAEJ,CAAC,EAEDH,EAAS,YAAc,WAEvB,IAAON,EAAQM",
|
|
6
|
-
"names": ["skeleton_exports", "__export", "skeleton_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_react_slot", "Skeleton", "props", "forwardedRef", "children", "className", "loading", "skeletonProps", "Tag"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const textVariants: (props?: ({
|
|
4
|
-
size?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
5
|
-
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
-
interface TextProps extends React.ComponentPropsWithoutRef<'span'>, VariantProps<typeof textVariants> {
|
|
8
|
-
as?: 'div' | 'label' | 'p' | 'span' | undefined;
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
color?: string;
|
|
11
|
-
/** 相当于 dangerouslySetInnerHTML */
|
|
12
|
-
html?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
-
export { Text };
|
|
16
|
-
export type { TextProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var y=Object.create;var n=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var C=(t,e)=>{for(var a in e)n(t,a,{get:e[a],enumerable:!0})},p=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(s=R(e,o))||s.enumerable});return t};var v=(t,e,a)=>(a=t!=null?y(V(t)):{},p(e||!t||!t.__esModule?n(a,"default",{value:t,enumerable:!0}):a,t)),z=t=>p(n({},"__esModule",{value:!0}),t);var S={};C(S,{Text:()=>l});module.exports=z(S);var i=require("react/jsx-runtime"),E=v(require("react")),f=require("@radix-ui/react-slot"),c=require("../helpers/index.js"),d=require("class-variance-authority");const N=(0,d.cva)("",{variants:{size:{1:"ai-text-xs",2:"ai-text-sm",3:"ai-text-base",4:"ai-text-lg",5:"ai-text-xl",6:"ai-text-2xl",7:"ai-text-3xl",8:"ai-text-4xl",9:"ai-text-5xl"},weights:{light:"ai-font-light",normal:"ai-font-normal",medium:"ai-font-medium",bold:"ai-font-bold"}},defaultVariants:{size:3,weights:"normal"}}),l=E.forwardRef((t,e)=>{const{children:a,size:s,weights:o,className:h,asChild:g,as:T="span",color:r,html:x,...u}=t,m=x?{dangerouslySetInnerHTML:{__html:x}}:null,P=r?{style:{color:r}}:null;return(0,i.jsx)(f.Slot,{...u,ref:e,className:(0,c.cn)(N({size:s,weights:o}),h),...m,...P,children:g?a:(0,i.jsx)(T,{children:m?null:a})})});l.displayName="Text";
|
|
2
|
-
//# sourceMappingURL=text.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/text.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nconst textVariants = cva('', {\n variants: {\n size: {\n 1: 'ai-text-xs',\n 2: 'ai-text-sm',\n 3: 'ai-text-base',\n 4: 'ai-text-lg',\n 5: 'ai-text-xl',\n 6: 'ai-text-2xl',\n 7: 'ai-text-3xl',\n 8: 'ai-text-4xl',\n 9: 'ai-text-5xl',\n },\n weights: {\n light: 'ai-font-light',\n normal: 'ai-font-normal',\n medium: 'ai-font-medium',\n bold: 'ai-font-bold',\n },\n },\n defaultVariants: {\n size: 3,\n weights: 'normal',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ninterface TextProps extends React.ComponentPropsWithoutRef<'span'>, VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span' | undefined\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string\n}\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const { children, size, 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,GAuE4B,IAAAI,EAAA,6BAvE5BC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAmB,+BACnBC,EAAuC,oCAEvC,MAAMC,KAAe,OAAI,GAAI,CAC3B,SAAU,CACR,KAAM,CACJ,EAAG,aACH,EAAG,aACH,EAAG,eACH,EAAG,aACH,EAAG,aACH,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,aACL,EACA,QAAS,CACP,MAAO,gBACP,OAAQ,iBACR,OAAQ,iBACR,KAAM,cACR,CACF,EACA,gBAAiB,CACf,KAAM,EACN,QAAS,QACX,CACF,CAAC,EAWKP,EAAOG,EAAM,WAAmC,CAACK,EAAOC,IAAiB,CAC7E,KAAM,CAAE,SAAAC,EAAU,KAAAC,EAAM,QAAAC,EAAS,UAAAC,EAAW,QAAAC,EAAS,GAAIC,EAAM,OAAQ,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAU,EAAIV,EAE/FW,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KAEJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKT,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,QAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUJ,KAAW,OAACK,EAAA,CAAK,SAAAI,EAAmB,KAAOT,EAAS,EACjE,CAEJ,CAAC,EACDV,EAAK,YAAc",
|
|
6
|
-
"names": ["text_exports", "__export", "Text", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_helpers", "import_class_variance_authority", "textVariants", "props", "forwardedRef", "children", "size", "weights", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Brand } from '../helpers/constants.js';
|
|
3
|
-
interface ThemeProps {
|
|
4
|
-
brand: Brand;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param param
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
declare const Theme: ({ brand, children }: ThemeProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
-
export default Theme;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";"use client";var d=Object.create;var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})},s=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of h(t))!u.call(e,a)&&a!==r&&o(e,a,{get:()=>t[a],enumerable:!(c=m(t,a))||c.enumerable});return e};var l=(e,t,r)=>(r=e!=null?d(p(e)):{},s(t||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e)),i=e=>s(o({},"__esModule",{value:!0}),e);var T={};f(T,{default:()=>R});module.exports=i(T);var n=require("react/jsx-runtime"),b=l(require("react"));const y=({brand:e,children:t})=>(b.useLayoutEffect(()=>{document.querySelector("html")?.setAttribute("data-brand-theme",e)},[]),(0,n.jsx)(n.Fragment,{children:t}));var R=y;
|
|
2
|
-
//# sourceMappingURL=theme.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/theme.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport * as React from 'react'\nimport type { Brand } from '../helpers/constants.js'\n\ninterface ThemeProps {\n brand: Brand\n children: React.ReactNode\n}\n/**\n *\n * @param param\n * @returns\n */\nconst Theme = ({ brand, children }: ThemeProps) => {\n React.useLayoutEffect(() => {\n document.querySelector('html')?.setAttribute('data-brand-theme', brand)\n }, [])\n return <>{children}</>\n}\n\nexport default Theme\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBS,IAAAI,EAAA,6BAhBTC,EAAuB,oBAYvB,MAAMC,EAAQ,CAAC,CAAE,MAAAC,EAAO,SAAAC,CAAS,KAC/BH,EAAM,gBAAgB,IAAM,CAC1B,SAAS,cAAc,MAAM,GAAG,aAAa,mBAAoBE,CAAK,CACxE,EAAG,CAAC,CAAC,KACE,mBAAG,SAAAC,EAAS,GAGrB,IAAON,EAAQI",
|
|
6
|
-
"names": ["theme_exports", "__export", "theme_default", "__toCommonJS", "import_jsx_runtime", "React", "Theme", "brand", "children"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
type ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<Extract<React.ComponentPropsWithoutRef<C>, {
|
|
3
|
-
as: T;
|
|
4
|
-
}>, 'as' | 'asChild'>;
|
|
5
|
-
type ComponentPropsWithout<T extends React.ElementType, O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>> = Omit<React.ComponentPropsWithoutRef<T>, O & string>;
|
|
6
|
-
type RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color';
|
|
7
|
-
export type { ComponentPropsAs, ComponentPropsWithout, RemovedProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var i=(t,e,s,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of r(e))!m.call(t,o)&&o!==s&&n(t,o,{get:()=>e[o],enumerable:!(p=a(e,o))||p.enumerable});return t};var C=t=>i(n({},"__esModule",{value:!0}),t);var R={};module.exports=C(R);
|
|
2
|
-
//# sourceMappingURL=component-props.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/component-props.ts"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react'\n\ntype ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<\n Extract<React.ComponentPropsWithoutRef<C>, { as: T }>,\n 'as' | 'asChild'\n>\n\n// Omits the specified props from the component props. Autocomplete will suggest props\n// of the component, but won't restrict the omittable props to those that actually exist.\ntype ComponentPropsWithout<\n T extends React.ElementType,\n O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>,\n> = Omit<React.ComponentPropsWithoutRef<T>, O & string>\n\ntype RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color'\n\nexport type { ComponentPropsAs, ComponentPropsWithout, RemovedProps }\n"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["component_props_exports", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(n,e)=>{for(var o in e)a(n,o,{get:e[o],enumerable:!0})},A=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!s.call(n,r)&&r!==o&&a(n,r,{get:()=>e[r],enumerable:!(t=k(e,r))||t.enumerable});return n};var L=n=>A(a({},"__esModule",{value:!0}),n);var y={};u(y,{ALL_BRANDS:()=>c});module.exports=L(y);const c=["anker","eufy","soundcore","nebula","ankerWork","ankerMake"];
|
|
2
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const ALL_BRANDS = ['anker', 'eufy', 'soundcore', 'nebula', 'ankerWork', 'ankerMake'] as const\n\nexport type Brand = (typeof ALL_BRANDS)[number]\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAa,CAAC,QAAS,OAAQ,YAAa,SAAU,YAAa,WAAW",
|
|
6
|
-
"names": ["constants_exports", "__export", "ALL_BRANDS", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cn } from './utils.js';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var a=(r,o)=>{for(var e in o)f(r,e,{get:o[e],enumerable:!0})},b=(r,o,e,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of t(o))!x.call(r,c)&&c!==e&&f(r,c,{get:()=>o[c],enumerable:!(m=p(o,c))||m.enumerable});return r};var d=r=>b(f({},"__esModule",{value:!0}),r);var g={};a(g,{cn:()=>n.cn});module.exports=d(g);var n=require("./utils.js");
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { cn } from './utils.js'\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAAF,GAAA,IAAAG,EAAmB",
|
|
6
|
-
"names": ["helpers_exports", "__export", "__toCommonJS", "import_utils"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var o in e)l(r,o,{get:e[o],enumerable:!0})},f=(r,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!u.call(r,t)&&t!==o&&l(r,t,{get:()=>e[t],enumerable:!(s=n(e,t))||s.enumerable});return r};var i=r=>f(l({},"__esModule",{value:!0}),r);var C={};c(C,{cn:()=>x});module.exports=i(C);var a=require("clsx"),m=require("tailwind-merge");function x(...r){return(0,m.twMerge)((0,a.clsx)(r))}
|
|
2
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/utils.ts"],
|
|
4
|
-
"sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,QAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASH,KAAMI,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B",
|
|
6
|
-
"names": ["utils_exports", "__export", "cn", "__toCommonJS", "import_clsx", "import_tailwind_merge", "inputs"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(s,e)=>{for(var i in e)r(s,i,{get:e[i],enumerable:!0})},l=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!a.call(s,n)&&n!==i&&r(s,n,{get:()=>e[n],enumerable:!(o=p(e,n))||o.enumerable});return s};var d=s=>l(r({},"__esModule",{value:!0}),s);var m={};g(m,{default:()=>w});module.exports=d(m);var t=require("react/jsx-runtime");const h=({size:s="sm",color:e="#ffffff"})=>(0,t.jsx)("svg",{className:"ai-animate-spin",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3",stroke:e,strokeWidth:"1.6",strokeLinecap:"round"})});var w=h;
|
|
2
|
-
//# sourceMappingURL=spinner.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/icons/spinner.tsx"],
|
|
4
|
-
"sourcesContent": ["export interface SpinnerProps {\n /** loading \u56FE\u6807\u5927\u5C0F */\n size?: 'sm' | 'md' | 'lg'\n color?: string\n}\n\n// eslint-disable-next-line no-unused-vars\nconst Spinner = ({ size = 'sm', color = '#ffffff' }: SpinnerProps) => {\n return (\n <svg\n className=\"ai-animate-spin\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3\"\n stroke={color}\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n />\n </svg>\n )\n}\n\nexport default Spinner\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBM,IAAAI,EAAA,6BAVN,MAAMC,EAAU,CAAC,CAAE,KAAAC,EAAO,KAAM,MAAAC,EAAQ,SAAU,OAE9C,OAAC,OACC,UAAU,kBACV,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BAEN,mBAAC,QACC,EAAE,qFACF,OAAQA,EACR,YAAY,MACZ,cAAc,QAChB,EACF,EAIJ,IAAOL,EAAQG",
|
|
6
|
-
"names": ["spinner_exports", "__export", "spinner_default", "__toCommonJS", "import_jsx_runtime", "Spinner", "size", "color"]
|
|
7
|
-
}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/index.js';
|
package/dist/cjs/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("./components/index.js"),module.exports);
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Badge } from '../components/index';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Badge;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
tags: string[];
|
|
10
|
-
argTypes: {
|
|
11
|
-
variant: {
|
|
12
|
-
control: {
|
|
13
|
-
type: "select";
|
|
14
|
-
};
|
|
15
|
-
options: string[];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
args: {
|
|
19
|
-
variant: "default";
|
|
20
|
-
children: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default meta;
|
|
24
|
-
type Story = StoryObj<typeof meta>;
|
|
25
|
-
export declare const Default: Story;
|
|
26
|
-
export declare const Examples: Story;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var i in e)n(t,i,{get:e[i],enumerable:!0})},y=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!l.call(t,r)&&r!==i&&n(t,r,{get:()=>e[r],enumerable:!(s=d(e,r))||s.enumerable});return t};var f=t=>y(n({},"__esModule",{value:!0}),t);var B={};p(B,{Default:()=>v,Examples:()=>g,default:()=>m});module.exports=f(B);var a=require("react/jsx-runtime"),o=require("../components/index"),x=require("react");const u={title:"Components/Badge",component:o.Badge,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["default","destructive","outline","secondary"]}},args:{variant:"default",children:"New"}};var m=u;const v={},g={render(){return(0,a.jsxs)("div",{className:"ai-flex ai-flex-col ai-space-y-4",children:[(0,a.jsx)(o.Badge,{variant:"default",children:"Default"}),(0,a.jsx)(o.Badge,{variant:"secondary",children:"Secondary"}),(0,a.jsx)(o.Badge,{variant:"destructive",children:"Destructive"}),(0,a.jsx)(o.Badge,{variant:"outline",children:"Outline"})]})}};
|
|
2
|
-
//# sourceMappingURL=badge.stories.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/stories/badge.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Badge } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Badge',\n component: Badge,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['default', 'destructive', 'outline', 'secondary'],\n },\n },\n args: {\n variant: 'default',\n children: 'New',\n },\n} satisfies Meta<typeof Badge>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {}\n\nexport const Examples: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col ai-space-y-4\">\n <Badge variant=\"default\">Default</Badge>\n <Badge variant=\"secondary\">Secondary</Badge>\n <Badge variant=\"destructive\">Destructive</Badge>\n <Badge variant=\"outline\">Outline</Badge>\n </div>\n )\n },\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GAmCM,IAAAM,EAAA,6BAjCNC,EAAsB,+BACtBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAW,QACX,WAAY,CACV,OAAQ,UACV,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,cAAe,UAAW,WAAW,CAC5D,CACF,EACA,KAAM,CACJ,QAAS,UACT,SAAU,KACZ,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMP,EAAiB,CAAC,EAElBC,EAAkB,CAC7B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,mCACb,oBAAC,SAAM,QAAQ,UAAU,mBAAO,KAChC,OAAC,SAAM,QAAQ,YAAY,qBAAS,KACpC,OAAC,SAAM,QAAQ,cAAc,uBAAW,KACxC,OAAC,SAAM,QAAQ,UAAU,mBAAO,GAClC,CAEJ,CACF",
|
|
6
|
-
"names": ["badge_stories_exports", "__export", "Default", "Examples", "badge_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
|
|
7
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<import("../components/button").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
tags: string[];
|
|
10
|
-
argTypes: {
|
|
11
|
-
variant: {
|
|
12
|
-
control: {
|
|
13
|
-
type: "select";
|
|
14
|
-
};
|
|
15
|
-
options: string[];
|
|
16
|
-
};
|
|
17
|
-
size: {
|
|
18
|
-
control: {
|
|
19
|
-
type: "select";
|
|
20
|
-
};
|
|
21
|
-
options: string[];
|
|
22
|
-
};
|
|
23
|
-
hoverEffect: {
|
|
24
|
-
description: string;
|
|
25
|
-
control: {
|
|
26
|
-
type: "select";
|
|
27
|
-
};
|
|
28
|
-
options: string[];
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
args: {
|
|
32
|
-
variant: "primary";
|
|
33
|
-
size: "base";
|
|
34
|
-
children: string;
|
|
35
|
-
asChild: false;
|
|
36
|
-
disabled: false;
|
|
37
|
-
loading: false;
|
|
38
|
-
hoverEffect: "none";
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export default meta;
|
|
42
|
-
type Story = StoryObj<typeof meta>;
|
|
43
|
-
export declare const Primary: Story;
|
|
44
|
-
export declare const Secondary: Story;
|
|
45
|
-
export declare const Link: Story;
|
|
46
|
-
export declare const WithIcon: Story;
|
|
47
|
-
export declare const Aschild: Story;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(o,t)=>{for(var a in t)s(o,a,{get:t[a],enumerable:!0})},m=(o,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!y.call(o,r)&&r!==a&&s(o,r,{get:()=>t[r],enumerable:!(n=l(t,r))||n.enumerable});return o};var h=o=>m(s({},"__esModule",{value:!0}),o);var x={};d(x,{Aschild:()=>b,Link:()=>u,Primary:()=>S,Secondary:()=>v,WithIcon:()=>z,default:()=>f});module.exports=h(x);var e=require("react/jsx-runtime"),i=require("@storybook/icons"),c=require("../components/index"),B=require("react");const g={title:"Components/Button",component:c.Button,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["primary","secondary","link","ghost"]},size:{control:{type:"select"},options:["sm","base","lg","icon"]},hoverEffect:{description:"hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548",control:{type:"select"},options:["none","slide"]}},args:{variant:"primary",size:"base",children:"Button",asChild:!1,disabled:!1,loading:!1,hoverEffect:"none"}};var f=g;const S={args:{size:"lg",children:"Primary"}},v={args:{size:"lg",variant:"secondary",children:"Secondary"}},u={args:{size:"lg",variant:"link",children:"Link"}},z={args:{size:"lg",children:(0,e.jsxs)(e.Fragment,{children:["WithIcon ",(0,e.jsx)(i.SearchIcon,{className:"ai-ml-2"})]})}},b={args:{size:"lg",asChild:!0,children:(0,e.jsx)("a",{href:"http://example.com",children:"as a a tag"})}};
|
|
2
|
-
//# sourceMappingURL=button.stories.js.map
|