@anker-in/headless-ui 0.0.17 → 0.0.18
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/dist/cjs/components/button.d.ts +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/checkbox.d.ts +1 -1
- package/dist/cjs/components/heading.d.ts +1 -1
- package/dist/cjs/components/input.d.ts +1 -1
- package/dist/cjs/components/radio.d.ts +1 -1
- package/dist/cjs/components/text.d.ts +1 -1
- package/dist/cjs/icons/spinner.d.ts +2 -4
- package/dist/cjs/icons/spinner.js +1 -1
- package/dist/cjs/icons/spinner.js.map +3 -3
- package/dist/cjs/src/components/badge.d.ts +9 -0
- package/dist/cjs/src/components/button.d.ts +20 -0
- package/dist/cjs/src/components/checkbox.d.ts +11 -0
- package/dist/cjs/src/components/dialog.d.ts +19 -0
- package/dist/cjs/src/components/heading.d.ts +16 -0
- package/dist/cjs/src/components/index.d.ts +12 -0
- package/dist/cjs/src/components/input.d.ts +22 -0
- package/dist/cjs/src/components/popover.d.ts +6 -0
- package/dist/cjs/src/components/radio.d.ts +16 -0
- package/dist/cjs/src/components/skeleton.d.ts +9 -0
- package/dist/cjs/src/components/text.d.ts +31 -0
- package/dist/cjs/src/components/theme.d.ts +13 -0
- package/dist/cjs/src/helpers/component-props.d.ts +7 -0
- package/dist/cjs/src/helpers/constants.d.ts +2 -0
- package/dist/cjs/src/helpers/index.d.ts +1 -0
- package/dist/cjs/src/helpers/utils.d.ts +2 -0
- package/dist/cjs/src/icons/spinner.d.ts +5 -0
- package/dist/cjs/src/index.d.ts +1 -0
- package/dist/cjs/src/stories/badge.stories.d.ts +26 -0
- package/dist/cjs/src/stories/button.stories.d.ts +47 -0
- package/dist/cjs/src/stories/checkbox.stories.d.ts +46 -0
- package/dist/cjs/src/stories/dialog.stories.d.ts +20 -0
- package/dist/cjs/src/stories/heading.stories.d.ts +82 -0
- package/dist/cjs/src/stories/input.stories.d.ts +35 -0
- package/dist/cjs/src/stories/popover.stories.d.ts +17 -0
- package/dist/cjs/src/stories/radio.stories.d.ts +39 -0
- package/dist/cjs/src/stories/skeleton.stories.d.ts +20 -0
- package/dist/cjs/src/stories/text.stories.d.ts +84 -0
- package/dist/cjs/tests/badge.test.d.ts +1 -0
- package/dist/cjs/tests/button.test.d.ts +1 -0
- package/dist/cjs/tests/heading.test.d.ts +1 -0
- package/dist/cjs/tests/input.test.d.ts +1 -0
- package/dist/cjs/tests/jest.setup.d.ts +1 -0
- package/dist/cjs/tests/text.test.d.ts +1 -0
- package/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/components/button.d.ts +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +3 -3
- package/dist/esm/components/checkbox.d.ts +1 -1
- package/dist/esm/components/heading.d.ts +1 -1
- package/dist/esm/components/input.d.ts +1 -1
- package/dist/esm/components/radio.d.ts +1 -1
- package/dist/esm/components/text.d.ts +1 -1
- package/dist/esm/icons/spinner.d.ts +2 -4
- package/dist/esm/icons/spinner.js +1 -1
- package/dist/esm/icons/spinner.js.map +3 -3
- package/dist/esm/src/components/badge.d.ts +9 -0
- package/dist/esm/src/components/button.d.ts +20 -0
- package/dist/esm/src/components/checkbox.d.ts +11 -0
- package/dist/esm/src/components/dialog.d.ts +19 -0
- package/dist/esm/src/components/heading.d.ts +16 -0
- package/dist/esm/src/components/index.d.ts +12 -0
- package/dist/esm/src/components/input.d.ts +22 -0
- package/dist/esm/src/components/popover.d.ts +6 -0
- package/dist/esm/src/components/radio.d.ts +16 -0
- package/dist/esm/src/components/skeleton.d.ts +9 -0
- package/dist/esm/src/components/text.d.ts +31 -0
- package/dist/esm/src/components/theme.d.ts +13 -0
- package/dist/esm/src/helpers/component-props.d.ts +7 -0
- package/dist/esm/src/helpers/constants.d.ts +2 -0
- package/dist/esm/src/helpers/index.d.ts +1 -0
- package/dist/esm/src/helpers/utils.d.ts +2 -0
- package/dist/esm/src/icons/spinner.d.ts +5 -0
- package/dist/esm/src/index.d.ts +1 -0
- package/dist/esm/src/stories/badge.stories.d.ts +26 -0
- package/dist/esm/src/stories/button.stories.d.ts +47 -0
- package/dist/esm/src/stories/checkbox.stories.d.ts +46 -0
- package/dist/esm/src/stories/dialog.stories.d.ts +20 -0
- package/dist/esm/src/stories/heading.stories.d.ts +82 -0
- package/dist/esm/src/stories/input.stories.d.ts +35 -0
- package/dist/esm/src/stories/popover.stories.d.ts +17 -0
- package/dist/esm/src/stories/radio.stories.d.ts +39 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +20 -19
- package/src/components/button.tsx +16 -1
- package/src/icons/spinner.tsx +5 -6
- package/src/styles/global.css +1 -1
- package/style.css +10 -1
- package/src/.DS_Store +0 -0
|
@@ -5,7 +5,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
*/
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
7
|
variant?: "link" | "primary" | "secondary" | "ghost" | null | undefined;
|
|
8
|
-
size?: "sm" | "
|
|
8
|
+
size?: "sm" | "base" | "lg" | "icon" | null | undefined;
|
|
9
9
|
hoverEffect?: "none" | "slide" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
11
11
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var w=Object.create;var n=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var H=(a,e)=>{for(var i in e)n(a,i,{get:e[i],enumerable:!0})},f=(a,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of k(e))!E.call(a,o)&&o!==i&&n(a,o,{get:()=>e[o],enumerable:!(t=B(e,o))||t.enumerable});return a};var l=(a,e,i)=>(i=a!=null?w(z(a)):{},f(e||!a||!a.__esModule?n(i,"default",{value:a,enumerable:!0}):i,a)),P=a=>f(n({},"__esModule",{value:!0}),a);var R={};H(R,{default:()=>M});module.exports=P(R);var r=require("react/jsx-runtime"),N=l(require("react")),u=require("@radix-ui/react-slot"),c=require("@radix-ui/react-visually-hidden"),s=require("class-variance-authority"),m=l(require("../icons/spinner.js")),y=require("../helpers/index.js");const C=(0,s.cva)("ai-ring-offset-background focus-visible:ai-ring-ring ai-rounded-btn ai-inline-flex ai-items-center ai-justify-center ai-whitespace-nowrap ai-text-sm ai-font-medium ai-transition-colors focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-pointer-events-none disabled:ai-opacity-50",{variants:{variant:{primary:"ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground",secondary:"ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground ai-border ai-border-solid",link:"ai-text-primary ai-underline-offset-4 hover:ai-underline",ghost:"hover:ai-bg-btn-primary hover:ai-text-btn-primary-foreground"},size:{sm:"ai-h-8 ai-px-3 ai-py-1 ai-text-[12px]",base:"ai-h-10 ai-px-4 ai-py-2 ai-text-[14px]",lg:"ai-h-11 ai-px-8 ai-text-[16px]",icon:"ai-size-10 ai-rounded-full"},hoverEffect:{none:"",slide:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-primary before:ai-bg-btn-primary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[""] hover:before:ai-translate-x-0'},{variant:"secondary",hoverEffect:"slide",class:'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-secondary before:ai-bg-btn-secondary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[""] hover:before:ai-translate-x-0'}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none"}}),L=(0,s.cva)("",{variants:{variant:{primary:"ai-stroke-btn-primary-foreground",secondary:"ai-stroke-btn-secondary-foreground",link:"ai-stroke-primary",ghost:"ai-stroke-primary"}}}),p=N.forwardRef(({asChild:a=!1,size:e="base",children:i,variant:t,hoverEffect:o="none",className:v,disabled:g=!1,loading:b=!1,...x},h)=>{const V=a?u.Slot:"button",d=g||b;return(0,r.jsx)(V,{disabled:d,className:(0,y.cn)(C({variant:t,size:e,hoverEffect:o}),{"ai-cursor-not-allowed":d},v),ref:h,...x,children:b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:i}),(0,r.jsx)("span",{className:"ai-absolute",children:(0,r.jsx)(m.default,{className:L({variant:t})})}),(0,r.jsx)(c.VisuallyHidden,{children:i})]}):i})});p.displayName="Button";var M=p;
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/button.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ai-ring-offset-background focus-visible:ai-ring-ring ai-rounded-btn ai-inline-flex ai-items-center ai-justify-center ai-whitespace-nowrap ai-text-sm ai-font-medium ai-transition-colors focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-pointer-events-none disabled:ai-opacity-50',\n {\n variants: {\n variant: {\n primary:\n 'ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground',\n secondary:\n 'ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground ai-border ai-border-solid',\n link: 'ai-text-primary ai-underline-offset-4 hover:ai-underline',\n ghost: 'hover:ai-bg-btn-primary hover:ai-text-btn-primary-foreground',\n },\n size: {\n sm: 'ai-h-8 ai-px-3 ai-py-1 ai-text-[12px]',\n base: 'ai-h-10 ai-px-4 ai-py-2 ai-text-[14px]',\n lg: 'ai-h-11 ai-px-8 ai-text-[16px]',\n icon: 'ai-size-10 ai-rounded-full',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-primary before:ai-bg-btn-primary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-secondary before:ai-bg-btn-secondary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(\n buttonVariants({ variant, size, hoverEffect }),\n {\n 'ai-cursor-not-allowed': isInactive,\n },\n className\n )}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"ai-absolute\">\n <Spinner
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "buttonVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "props", "ref", "Comp", "isInactive", "Spinner"]
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\n/**\n * Button Variants\n */\nconst buttonVariants = cva(\n 'ai-ring-offset-background focus-visible:ai-ring-ring ai-rounded-btn ai-inline-flex ai-items-center ai-justify-center ai-whitespace-nowrap ai-text-sm ai-font-medium ai-transition-colors focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-pointer-events-none disabled:ai-opacity-50',\n {\n variants: {\n variant: {\n primary:\n 'ai-bg-btn-primary ai-text-btn-primary-foreground hover:ai-bg-btn-primary-active disabled:ai-bg-btn-primary-disabled disabled:ai-text-btn-primary-disabled-foreground',\n secondary:\n 'ai-bg-btn-secondary ai-border-primary ai-text-btn-secondary-foreground hover:ai-bg-btn-secondary-active hover:ai-text-btn-secondary disabled:ai-bg-btn-secondary-disabled disabled:ai-text-btn-secondary-disabled-foreground ai-border ai-border-solid',\n link: 'ai-text-primary ai-underline-offset-4 hover:ai-underline',\n ghost: 'hover:ai-bg-btn-primary hover:ai-text-btn-primary-foreground',\n },\n size: {\n sm: 'ai-h-8 ai-px-3 ai-py-1 ai-text-[12px]',\n base: 'ai-h-10 ai-px-4 ai-py-2 ai-text-[14px]',\n lg: 'ai-h-11 ai-px-8 ai-text-[16px]',\n icon: 'ai-size-10 ai-rounded-full',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-primary before:ai-bg-btn-primary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'ai-z-[1] before:-ai-z-[1] before:ai-rounded-btn hover:!ai-bg-btn-secondary before:ai-bg-btn-secondary-active ai-relative ai-overflow-hidden before:ai-absolute before:ai-inset-y-0 before:ai-w-full before:-ai-translate-x-full before:ai-transition-transform before:ai-duration-300 before:ai-ease-in-out before:ai-content-[\"\"] hover:before:ai-translate-x-0',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'ai-stroke-btn-primary-foreground',\n secondary: 'ai-stroke-btn-secondary-foreground',\n link: 'ai-stroke-primary',\n ghost: 'ai-stroke-primary',\n },\n },\n})\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(\n buttonVariants({ variant, size, hoverEffect }),\n {\n 'ai-cursor-not-allowed': isInactive,\n },\n className\n )}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"ai-absolute\">\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n children\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgHU,IAAAI,EAAA,6BA9GVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAKnB,MAAMC,KAAiB,OACrB,uUACA,CACE,SAAU,CACR,QAAS,CACP,QACE,uKACF,UACE,yPACF,KAAM,2DACN,MAAO,8DACT,EACA,KAAM,CACJ,GAAI,wCACJ,KAAM,yCACN,GAAI,iCACJ,KAAM,4BACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,+VACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mWACJ,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,MACf,CACF,CACF,EAEMC,KAAqB,OAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,QAAS,mCACT,UAAW,qCACX,KAAM,oBACN,MAAO,mBACT,CACF,CACF,CAAC,EAaKC,EAASR,EAAM,WACnB,CACE,CACE,QAAAS,EAAU,GACV,KAAAC,EAAO,OACP,SAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,EAAOV,EAAU,OAAO,SACxBW,EAAaL,GAAYC,EAE/B,SACE,OAACG,EAAA,CACC,SAAUC,EACV,aAAW,MACTd,EAAe,CAAE,QAAAM,EAAS,KAAAF,EAAM,YAAAG,CAAY,CAAC,EAC7C,CACE,wBAAyBO,CAC3B,EACAN,CACF,EACA,IAAKI,EACJ,GAAGD,EAEH,SAAAD,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,cACd,mBAAC,EAAAU,QAAA,CACC,UAAWd,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EACF,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAEJ,CACF,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
|
|
6
|
+
"names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "props", "ref", "Comp", "isInactive", "Spinner"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare const checkboxVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
7
|
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const headingVariants: (props?: ({
|
|
4
|
-
size?: "none" |
|
|
4
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
5
5
|
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
6
6
|
align?: "center" | "left" | "right" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare const inputVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
7
|
export interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare const radioGroupVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
7
|
interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
8
8
|
/** 尺寸 */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
4
4
|
declare const textVariants: (props?: ({
|
|
5
|
-
size?: "none" |
|
|
5
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
6
6
|
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
7
7
|
align?: "center" | "left" | "right" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export interface SpinnerProps {
|
|
2
|
-
|
|
3
|
-
size?: 'sm' | 'md' | 'lg';
|
|
4
|
-
color?: string;
|
|
2
|
+
className?: string;
|
|
5
3
|
}
|
|
6
|
-
declare const Spinner: (
|
|
4
|
+
declare const Spinner: (props: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export default Spinner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},h=(e,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of l(n))!c.call(e,s)&&s!==r&&t(e,s,{get:()=>n[s],enumerable:!(o=p(n,s))||o.enumerable});return e};var m=e=>h(t({},"__esModule",{value:!0}),e);var f={};g(f,{default:()=>d});module.exports=m(f);var i=require("react/jsx-runtime"),a=require("../helpers");const w=e=>(0,i.jsx)("svg",{className:(0,a.cn)("ai-animate-spin",e.className),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.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",strokeWidth:"1.6",strokeLinecap:"round"})});var d=w;
|
|
2
2
|
//# sourceMappingURL=spinner.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/icons/spinner.tsx"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBM,IAAAI,EAAA,
|
|
6
|
-
"names": ["spinner_exports", "__export", "spinner_default", "__toCommonJS", "import_jsx_runtime", "
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers'\n\nexport interface SpinnerProps {\n className?: string\n}\n\n// eslint-disable-next-line no-unused-vars\nconst Spinner = (props: SpinnerProps) => {\n return (\n <svg\n className={cn('ai-animate-spin', props.className)}\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 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,6BAjBNC,EAAmB,sBAOnB,MAAMC,EAAWC,MAEb,OAAC,OACC,aAAW,MAAG,kBAAmBA,EAAM,SAAS,EAChD,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BAEN,mBAAC,QACC,EAAE,qFACF,YAAY,MACZ,cAAc,QAChB,EACF,EAIJ,IAAOL,EAAQI",
|
|
6
|
+
"names": ["spinner_exports", "__export", "spinner_default", "__toCommonJS", "import_jsx_runtime", "import_helpers", "Spinner", "props"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime.js").JSX.Element;
|
|
9
|
+
export default Badge;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Button Variants
|
|
5
|
+
*/
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "link" | "primary" | "secondary" | "ghost" | null | undefined;
|
|
8
|
+
size?: "sm" | "base" | "lg" | "icon" | null | undefined;
|
|
9
|
+
hoverEffect?: "none" | "slide" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
11
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
12
|
+
/** 设置按钮载入状态 */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** 设置按钮失效状态 */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** 定义自组件作为父组件的类型, 详细使用方式请参考radix-ui */
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export default Button;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const checkboxVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
+
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default Checkbox;
|
|
11
|
+
export type { CheckboxProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
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, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const headingVariants: (props?: ({
|
|
4
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
5
|
+
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
6
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
8
|
+
interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
|
|
9
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
html?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
export { Heading };
|
|
16
|
+
export type { HeadingProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
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';
|
|
@@ -0,0 +1,22 @@
|
|
|
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" | "base" | "lg" | 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
|
+
* default: right
|
|
13
|
+
*/
|
|
14
|
+
side?: 'left' | 'right';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* InputSlot
|
|
18
|
+
* 用来在 Input 组件中插入额外的内容,比如icon ,按钮
|
|
19
|
+
*/
|
|
20
|
+
declare const InputSlot: React.ForwardRefExoticComponent<InputSlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
export { Input, InputSlot };
|
|
@@ -0,0 +1,6 @@
|
|
|
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 };
|
|
@@ -0,0 +1,16 @@
|
|
|
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" | "base" | "lg" | 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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
|
+
interface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {
|
|
4
|
+
/** 是否正在加载 , 默认是true*/
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export default Skeleton;
|
|
9
|
+
export type { SkeletonProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
4
|
+
declare const textVariants: (props?: ({
|
|
5
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
6
|
+
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
7
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
9
|
+
type TextSpanProps = {
|
|
10
|
+
as?: 'span';
|
|
11
|
+
} & ComponentPropsWithout<'span', RemovedProps>;
|
|
12
|
+
type TextDivProps = {
|
|
13
|
+
as: 'div';
|
|
14
|
+
} & ComponentPropsWithout<'div', RemovedProps>;
|
|
15
|
+
type TextLabelProps = {
|
|
16
|
+
as: 'label';
|
|
17
|
+
} & ComponentPropsWithout<'label', RemovedProps>;
|
|
18
|
+
type TextPProps = {
|
|
19
|
+
as: 'p';
|
|
20
|
+
} & ComponentPropsWithout<'p', RemovedProps>;
|
|
21
|
+
interface CommonTextProps extends VariantProps<typeof textVariants> {
|
|
22
|
+
as?: 'div' | 'label' | 'p' | 'span';
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
color?: string;
|
|
25
|
+
/** 相当于 dangerouslySetInnerHTML */
|
|
26
|
+
html?: string;
|
|
27
|
+
}
|
|
28
|
+
type TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);
|
|
29
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
export { Text };
|
|
31
|
+
export type { TextProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from './utils.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
@@ -0,0 +1,47 @@
|
|
|
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;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
args: {
|
|
30
|
+
size: "base";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Default: Story;
|
|
36
|
+
export declare const Sizes: {
|
|
37
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
parameters: {
|
|
39
|
+
docs: {
|
|
40
|
+
description: {
|
|
41
|
+
story: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const Disabled: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '../components/index';
|
|
3
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("@radix-ui/react-dialog").DialogProps>;
|
|
7
|
+
subcomponents: any;
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof Dialog>;
|
|
20
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/heading").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: (string | number)[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
weights: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select";
|
|
31
|
+
};
|
|
32
|
+
options: string[];
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
align: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "select";
|
|
42
|
+
};
|
|
43
|
+
options: string[];
|
|
44
|
+
table: {
|
|
45
|
+
defaultValue: {
|
|
46
|
+
summary: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
color: {
|
|
51
|
+
control: {
|
|
52
|
+
type: "color";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
as: {
|
|
56
|
+
control: {
|
|
57
|
+
type: "select";
|
|
58
|
+
};
|
|
59
|
+
options: string[];
|
|
60
|
+
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: {
|
|
63
|
+
summary: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
html: {
|
|
68
|
+
type: "string";
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
args: {
|
|
73
|
+
as: "h1";
|
|
74
|
+
size: "none";
|
|
75
|
+
weights: "normal";
|
|
76
|
+
align: "left";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
type Story = StoryObj<typeof meta>;
|
|
81
|
+
export declare const Default: Story;
|
|
82
|
+
export declare const All: Story;
|