@anker-in/headless-ui 0.0.11 → 0.0.13
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 +20 -1
- package/README.md +1 -1
- package/dist/cjs/components/checkbox.d.ts +8 -1
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/heading.d.ts +10 -2
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/input.d.ts +1 -1
- package/dist/cjs/components/input.js.map +1 -1
- package/dist/cjs/components/radio.d.ts +13 -2
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +3 -3
- package/dist/cjs/components/skeleton.d.ts +6 -3
- package/dist/cjs/components/skeleton.js +4 -1
- package/dist/cjs/components/skeleton.js.map +3 -3
- package/dist/cjs/components/text.d.ts +17 -3
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +3 -3
- package/dist/cjs/stories/checkbox.stories.d.ts +44 -3
- package/dist/cjs/stories/checkbox.stories.js +1 -1
- package/dist/cjs/stories/checkbox.stories.js.map +3 -3
- package/dist/cjs/stories/dialog.stories.d.ts +18 -3
- package/dist/cjs/stories/dialog.stories.js +1 -1
- package/dist/cjs/stories/dialog.stories.js.map +3 -3
- package/dist/cjs/stories/heading.stories.d.ts +70 -0
- package/dist/cjs/stories/heading.stories.js +2 -0
- package/dist/cjs/stories/heading.stories.js.map +7 -0
- package/dist/cjs/stories/input.stories.d.ts +5 -0
- package/dist/cjs/stories/input.stories.js +1 -1
- package/dist/cjs/stories/input.stories.js.map +2 -2
- package/dist/cjs/stories/radio.stories.d.ts +37 -3
- package/dist/cjs/stories/radio.stories.js +1 -1
- package/dist/cjs/stories/radio.stories.js.map +3 -3
- package/dist/cjs/stories/skeleton.stories.d.ts +9 -3
- package/dist/cjs/stories/skeleton.stories.js +1 -1
- package/dist/cjs/stories/skeleton.stories.js.map +3 -3
- package/dist/cjs/stories/text.stories.d.ts +38 -3
- package/dist/cjs/stories/text.stories.js +9 -1
- package/dist/cjs/stories/text.stories.js.map +3 -3
- package/dist/esm/components/checkbox.d.ts +8 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/heading.d.ts +10 -2
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/input.d.ts +1 -1
- package/dist/esm/components/input.js.map +1 -1
- package/dist/esm/components/radio.d.ts +13 -2
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.js.map +3 -3
- package/dist/esm/components/skeleton.d.ts +6 -3
- package/dist/esm/components/skeleton.js +4 -1
- package/dist/esm/components/skeleton.js.map +3 -3
- package/dist/esm/components/text.d.ts +17 -3
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.js.map +3 -3
- package/dist/esm/stories/checkbox.stories.d.ts +44 -3
- package/dist/esm/stories/checkbox.stories.js +1 -1
- package/dist/esm/stories/checkbox.stories.js.map +3 -3
- package/dist/esm/stories/dialog.stories.d.ts +18 -3
- package/dist/esm/stories/dialog.stories.js +1 -1
- package/dist/esm/stories/dialog.stories.js.map +3 -3
- package/dist/esm/stories/heading.stories.d.ts +70 -0
- package/dist/esm/stories/heading.stories.js +2 -0
- package/dist/esm/stories/heading.stories.js.map +7 -0
- package/dist/esm/stories/input.stories.d.ts +5 -0
- package/dist/esm/stories/input.stories.js +1 -1
- package/dist/esm/stories/input.stories.js.map +2 -2
- package/dist/esm/stories/radio.stories.d.ts +37 -3
- package/dist/esm/stories/radio.stories.js +1 -1
- package/dist/esm/stories/radio.stories.js.map +3 -3
- package/dist/esm/stories/skeleton.stories.d.ts +9 -3
- package/dist/esm/stories/skeleton.stories.js +1 -1
- package/dist/esm/stories/skeleton.stories.js.map +3 -3
- package/dist/esm/stories/text.stories.d.ts +38 -3
- package/dist/esm/stories/text.stories.js +9 -1
- package/dist/esm/stories/text.stories.js.map +3 -3
- package/package.json +1 -1
- package/src/components/checkbox.tsx +34 -18
- package/src/components/dialog.tsx +1 -0
- package/src/components/heading.tsx +61 -5
- package/src/components/index.ts +1 -0
- package/src/components/input.tsx +1 -1
- package/src/components/radio.tsx +63 -28
- package/src/components/skeleton.tsx +33 -2
- package/src/components/text.tsx +25 -7
- package/src/stories/checkbox.stories.tsx +80 -3
- package/src/stories/dialog.stories.tsx +60 -31
- package/src/stories/heading.stories.tsx +90 -0
- package/src/stories/input.stories.tsx +5 -0
- package/src/stories/radio.stories.tsx +52 -16
- package/src/stories/skeleton.stories.tsx +36 -2
- package/src/stories/text.stories.tsx +74 -13
- package/src/styles/global.css +5 -5
- package/style.css +70 -19
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '../components/index';
|
|
3
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
4
|
+
declare const meta: {
|
|
2
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[];
|
|
3
17
|
};
|
|
4
|
-
export default
|
|
5
|
-
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof Dialog>;
|
|
20
|
+
export declare const Default: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(o,i)=>{for(var l in i)r(o,l,{get:i[l],enumerable:!0})},d=(o,i,l,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of g(i))!m.call(o,t)&&t!==l&&r(o,t,{get:()=>i[t],enumerable:!(s=n(i,t))||s.enumerable});return o};var p=o=>d(r({},"__esModule",{value:!0}),o);var f={};c(f,{Default:()=>y,default:()=>D});module.exports=p(f);var e=require("react/jsx-runtime"),h=require("react"),a=require("../components/index");const u={title:"Components/Dialog",component:a.Dialog,subcomponents:{DialogTrigger:a.DialogTrigger,DialogContent:a.DialogContent,DialogHeader:a.DialogHeader,DialogTitle:a.DialogTitle,DialogDescription:a.DialogDescription,DialogFooter:a.DialogFooter},parameters:{layout:"centered",docs:{description:{component:"\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog "}}},tags:["autodocs"]};var D=u;const y={args:{children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a.DialogTrigger,{asChild:!0,children:(0,e.jsx)("button",{children:"Edit Profile"})}),(0,e.jsxs)(a.DialogContent,{className:"sm:ai-max-w-[425px]",children:[(0,e.jsxs)(a.DialogHeader,{children:[(0,e.jsx)(a.DialogTitle,{children:"Edit profile"}),(0,e.jsx)(a.DialogDescription,{children:"Make changes to your profile here. Click save when you're done."})]}),(0,e.jsxs)("div",{className:"ai-grid ai-gap-4 ai-py-4",children:[(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"name",className:"ai-text-right",children:"Name"}),(0,e.jsx)(a.Input,{id:"name",defaultValue:"Pedro Duarte",className:"ai-col-span-3"})]}),(0,e.jsxs)("div",{className:"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4",children:[(0,e.jsx)("label",{htmlFor:"username",className:"ai-text-right",children:"Username"}),(0,e.jsx)(a.Input,{id:"username",defaultValue:"@peduarte",className:"ai-col-span-3"})]})]}),(0,e.jsx)(a.DialogFooter,{children:(0,e.jsx)(a.Button,{type:"submit",children:"Save changes"})})]})]})}};
|
|
2
2
|
//# sourceMappingURL=dialog.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/dialog.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index'\n\
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,
|
|
6
|
-
"names": ["dialog_stories_exports", "__export", "Default", "dialog_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components"]
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n Input,\n} from '../components/index'\nimport type { Meta, StoryObj } from '@storybook/react/*'\n\nconst meta = {\n title: 'Components/Dialog',\n component: Dialog,\n subcomponents: {\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n } as any,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u5F39\u7A97\u7EC4\u4EF6\uFF0C\u57FA\u4E8E@radix-ui/react-dialog\uFF0Chttps://www.radix-ui.com/primitives/docs/components/dialog ',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Dialog>\n\nexport default meta\n\ntype Story = StoryObj<typeof Dialog>\n\nexport const Default: Story = {\n args: {\n children: (\n <>\n <DialogTrigger asChild>\n <button>Edit Profile</button>\n </DialogTrigger>\n <DialogContent className=\"sm:ai-max-w-[425px]\">\n <DialogHeader>\n <DialogTitle>Edit profile</DialogTitle>\n <DialogDescription>Make changes to your profile here. Click save when you're done.</DialogDescription>\n </DialogHeader>\n <div className=\"ai-grid ai-gap-4 ai-py-4\">\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"name\" className=\"ai-text-right\">\n Name\n </label>\n <Input id=\"name\" defaultValue=\"Pedro Duarte\" className=\"ai-col-span-3\" />\n </div>\n <div className=\"ai-grid ai-grid-cols-4 ai-items-center ai-gap-4\">\n <label htmlFor=\"username\" className=\"ai-text-right\">\n Username\n </label>\n <Input id=\"username\" defaultValue=\"@peduarte\" className=\"ai-col-span-3\" />\n </div>\n </div>\n <DialogFooter>\n <Button type=\"submit\">Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </>\n ),\n },\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GA2CM,IAAAK,EAAA,6BA3CNC,EAAkB,iBAClBC,EAUO,+BAGP,MAAMC,EAAO,CACX,MAAO,oBACP,UAAW,SACX,cAAe,CACb,8BACA,8BACA,4BACA,0BACA,sCACA,2BACF,EACA,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAIR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,YACE,oBACE,oBAAC,iBAAc,QAAO,GACpB,mBAAC,UAAO,wBAAY,EACtB,KACA,QAAC,iBAAc,UAAU,sBACvB,qBAAC,gBACC,oBAAC,eAAY,wBAAY,KACzB,OAAC,qBAAkB,2EAA+D,GACpF,KACA,QAAC,OAAI,UAAU,2BACb,qBAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,OAAO,UAAU,gBAAgB,gBAEhD,KACA,OAAC,SAAM,GAAG,OAAO,aAAa,eAAe,UAAU,gBAAgB,GACzE,KACA,QAAC,OAAI,UAAU,kDACb,oBAAC,SAAM,QAAQ,WAAW,UAAU,gBAAgB,oBAEpD,KACA,OAAC,SAAM,GAAG,WAAW,aAAa,YAAY,UAAU,gBAAgB,GAC1E,GACF,KACA,OAAC,gBACC,mBAAC,UAAO,KAAK,SAAS,wBAAY,EACpC,GACF,GACF,CAEJ,CACF",
|
|
6
|
+
"names": ["dialog_stories_exports", "__export", "Default", "dialog_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "meta"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/heading").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: (string | number)[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
weights: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select";
|
|
31
|
+
};
|
|
32
|
+
options: string[];
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
color: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "color";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
as: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "select";
|
|
47
|
+
};
|
|
48
|
+
options: string[];
|
|
49
|
+
description: string;
|
|
50
|
+
table: {
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
html: {
|
|
57
|
+
type: "string";
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
args: {
|
|
62
|
+
as: "h1";
|
|
63
|
+
size: "none";
|
|
64
|
+
weights: "normal";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default meta;
|
|
68
|
+
type Story = StoryObj<typeof meta>;
|
|
69
|
+
export declare const Default: Story;
|
|
70
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var h=(r,t)=>{for(var n in t)i(r,n,{get:t[n],enumerable:!0})},u=(r,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of d(t))!p.call(r,a)&&a!==n&&i(r,a,{get:()=>t[a],enumerable:!(s=l(t,a))||s.enumerable});return r};var c=r=>u(i({},"__esModule",{value:!0}),r);var z={};h(z,{All:()=>f,Default:()=>y,default:()=>m});module.exports=c(z);var e=require("react/jsx-runtime"),o=require("../components/index"),H=require("react");const g={title:"Typography/Heading",component:o.Heading,parameters:{layout:"centered",docs:{description:{component:"Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["none",1,2,3,4,5,6,7,8,9],description:"\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8",table:{defaultValue:{summary:"none"}}},weights:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},color:{control:{type:"color"}},as:{control:{type:"select"},options:["h1","h2","h3","h4","h5","h6"],description:"html \u6807\u7B7E\u7C7B\u578B",table:{defaultValue:{summary:"h1"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{as:"h1",size:"none",weights:"normal"}};var m=g;const y={args:{as:"h1",children:" The quick brown fox jumps over the lazy dog."}},f={render:()=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.Heading,{size:1,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:2,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:3,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:4,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:5,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:6,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:7,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:8,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Heading,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})};
|
|
2
|
+
//# sourceMappingURL=heading.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/stories/heading.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Heading } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Heading',\n component: Heading,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: 'Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\n description: '\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8',\n table: {\n defaultValue: { summary: 'none' },\n },\n },\n weights: {\n control: {\n type: 'select',\n },\n options: ['light', 'normal', 'medium', 'bold'],\n table: {\n defaultValue: { summary: 'normal' },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n table: {\n defaultValue: { summary: 'h1' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n as: 'h1',\n size: 'none',\n weights: 'normal',\n },\n} satisfies Meta<typeof Heading>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n as: 'h1',\n children: ' The quick brown fox jumps over the lazy dog.',\n },\n}\n\nexport const All: Story = {\n render: () => (\n <>\n <Heading size={1}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={2}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={3}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={4}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={5}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={6}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={7}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={8}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={9}>The quick brown fox jumps over the lazy dog.</Heading>\n </>\n ),\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,SAAAE,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GA6EI,IAAAM,EAAA,6BA3EJC,EAAwB,+BACxBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,qBACP,UAAW,UACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,qJACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,YAAa,6LACb,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,QAAS,SAAU,SAAU,MAAM,EAC7C,MAAO,CACL,aAAc,CAAE,QAAS,QAAS,CACpC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAC5C,YAAa,gCACb,MAAO,CACL,aAAc,CAAE,QAAS,IAAK,CAChC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,GAAI,KACJ,KAAM,OACN,QAAS,QACX,CACF,EAEA,IAAOL,EAAQK,EAIR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,GAAI,KACJ,SAAU,+CACZ,CACF,EAEaD,EAAa,CACxB,OAAQ,OACN,oBACE,oBAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,KAC9D,OAAC,WAAQ,KAAM,EAAG,wDAA4C,GAChE,CAEJ",
|
|
6
|
+
"names": ["heading_stories_exports", "__export", "All", "Default", "heading_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var p in e)s(o,p,{get:e[p],enumerable:!0})},y=(o,e,p,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!m.call(o,r)&&r!==p&&s(o,r,{get:()=>e[r],enumerable:!(a=c(e,r))||a.enumerable});return o};var d=o=>y(s({},"__esModule",{value:!0}),o);var g={};l(g,{Default:()=>S,WithButton:()=>b,WithIcon:()=>h,default:()=>I});module.exports=d(g);var n=require("react/jsx-runtime"),t=require("../components/index"),i=require("@storybook/icons"),z=require("react");const f={title:"Components/Input",component:t.Input,subcomponents:{InputSlot:t.InputSlot},parameters:{layout:"centered",docs:{description:{component:"Input \u7EC4\u4EF6, \u7528\u4E8E\u8F93\u5165\u6846, \u53EF\u4EE5\u901A\u8FC7\u63D2\u69FD\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9, \u6BD4\u5982icon, \u6309\u94AE"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["sm","base","lg"]}},args:{size:"base"}};var I=f;const S={args:{}},b={render(){return(0,n.jsx)(t.Input,{className:"ai-rounded-3xl ai-pr-0",placeholder:"Enter your email",type:"text",children:(0,n.jsx)(t.InputSlot,{side:"right",children:(0,n.jsx)(t.Button,{className:"ai-h-full ai-rounded-none",size:"sm",children:"subscribe"})})})}},h={render(){return(0,n.jsx)(t.Input,{type:"text",placeholder:"search in site",children:(0,n.jsx)(t.InputSlot,{side:"left",children:(0,n.jsx)(i.SearchIcon,{})})})}};
|
|
2
2
|
//# sourceMappingURL=input.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/input.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport type { ComponentType } from 'react'\nimport { Button, Input, InputSlot } from '../components/index'\nimport { SearchIcon } from '@storybook/icons'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Input',\n component: Input,\n subcomponents: { InputSlot: InputSlot as ComponentType<unknown> }, // TODO: \u68C0\u67E5type , \u53BB\u6389as\u7C7B\u578B\u8F6C\u6362\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg'],\n },\n },\n args: {\n size: 'base',\n },\n} satisfies Meta<typeof Input>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {},\n}\n\nexport const WithButton: Story = {\n render() {\n return (\n <Input className=\"ai-rounded-3xl ai-pr-0\" placeholder=\"Enter your email\" type=\"text\">\n <InputSlot side=\"right\">\n <Button className=\"ai-h-full ai-rounded-none\" size=\"sm\">\n subscribe\n </Button>\n </InputSlot>\n </Input>\n )\n },\n}\nexport const WithIcon: Story = {\n render() {\n return (\n <Input type=\"text\" placeholder=\"search in site\">\n <InputSlot side=\"left\">\n <SearchIcon />\n </InputSlot>\n </Input>\n )\n },\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,eAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport type { ComponentType } from 'react'\nimport { Button, Input, InputSlot } from '../components/index'\nimport { SearchIcon } from '@storybook/icons'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Input',\n component: Input,\n subcomponents: { InputSlot: InputSlot as ComponentType<unknown> }, // TODO: \u68C0\u67E5type , \u53BB\u6389as\u7C7B\u578B\u8F6C\u6362\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: 'Input \u7EC4\u4EF6, \u7528\u4E8E\u8F93\u5165\u6846, \u53EF\u4EE5\u901A\u8FC7\u63D2\u69FD\u63D2\u5165\u989D\u5916\u7684\u5185\u5BB9, \u6BD4\u5982icon, \u6309\u94AE',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg'],\n },\n },\n args: {\n size: 'base',\n },\n} satisfies Meta<typeof Input>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {},\n}\n\nexport const WithButton: Story = {\n render() {\n return (\n <Input className=\"ai-rounded-3xl ai-pr-0\" placeholder=\"Enter your email\" type=\"text\">\n <InputSlot side=\"right\">\n <Button className=\"ai-h-full ai-rounded-none\" size=\"sm\">\n subscribe\n </Button>\n </InputSlot>\n </Input>\n )\n },\n}\nexport const WithIcon: Story = {\n render() {\n return (\n <Input type=\"text\" placeholder=\"search in site\">\n <InputSlot side=\"left\">\n <SearchIcon />\n </InputSlot>\n </Input>\n )\n },\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,eAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GA6CU,IAAAO,EAAA,6BA3CVC,EAAyC,+BACzCC,EAA2B,4BAC3BC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,mBACP,UAAW,QACX,cAAe,CAAE,UAAW,WAAoC,EAChE,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,oKACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,IAAI,CAC9B,CACF,EACA,KAAM,CACJ,KAAM,MACR,CACF,EAEA,IAAON,EAAQM,EAIR,MAAMT,EAAiB,CAC5B,KAAM,CAAC,CACT,EAEaC,EAAoB,CAC/B,QAAS,CACP,SACE,OAAC,SAAM,UAAU,yBAAyB,YAAY,mBAAmB,KAAK,OAC5E,mBAAC,aAAU,KAAK,QACd,mBAAC,UAAO,UAAU,4BAA4B,KAAK,KAAK,qBAExD,EACF,EACF,CAEJ,CACF,EACaC,EAAkB,CAC7B,QAAS,CACP,SACE,OAAC,SAAM,KAAK,OAAO,YAAY,iBAC7B,mBAAC,aAAU,KAAK,OACd,mBAAC,eAAW,EACd,EACF,CAEJ,CACF",
|
|
6
6
|
"names": ["input_stories_exports", "__export", "Default", "WithButton", "WithIcon", "input_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_icons", "import_react", "meta"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RadioGroup } from '../components/index';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const meta: {
|
|
2
5
|
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("../components/radio").RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
subcomponents: {
|
|
8
|
+
RadioGroupItem: React.ComponentType<unknown>;
|
|
9
|
+
};
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
tags: string[];
|
|
19
|
+
argTypes: {
|
|
20
|
+
size: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select";
|
|
23
|
+
};
|
|
24
|
+
options: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
table: {
|
|
27
|
+
defaultValue: {
|
|
28
|
+
summary: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
args: {
|
|
34
|
+
size: "base";
|
|
35
|
+
};
|
|
3
36
|
};
|
|
4
|
-
export default
|
|
5
|
-
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<typeof RadioGroup>;
|
|
39
|
+
export declare const Default: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var p in e)r(t,p,{get:e[p],enumerable:!0})},c=(t,e,p,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of l(e))!m.call(t,i)&&i!==p&&r(t,i,{get:()=>e[i],enumerable:!(s=n(e,i))||s.enumerable});return t};var u=t=>c(r({},"__esModule",{value:!0}),t);var w={};d(w,{Default:()=>f,default:()=>b});module.exports=u(w);var o=require("react/jsx-runtime"),a=require("../components/index"),v=require("react");const y={title:"Components/RadioGroup",component:a.RadioGroup,subcomponents:{RadioGroupItem:a.RadioGroupItem},parameters:{layout:"centered",docs:{description:{component:"\u5355\u9009\u6846, \u57FA\u4E8E@radix-ui/react-radio-group https://www.radix-ui.com/primitives/docs/components/radio-group"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:["sm","base","lg"],description:"\u5C3A\u5BF8",table:{defaultValue:{summary:"base"}}}},args:{size:"base"}};var b=y;const f={args:{size:"base",children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,o.jsx)(a.RadioGroupItem,{value:"option-one",id:"option-one"}),(0,o.jsx)("label",{htmlFor:"option-one",children:"Option One"})]}),(0,o.jsxs)("div",{className:"ai-flex ai-items-center ai-space-x-2",children:[(0,o.jsx)(a.RadioGroupItem,{value:"option-two",id:"option-two"}),(0,o.jsx)("label",{htmlFor:"option-two",children:"Option Two"})]})]})}};
|
|
2
2
|
//# sourceMappingURL=radio.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/radio.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import { RadioGroup, RadioGroupItem } from '../components/index'\nimport React from 'react'\n\
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,
|
|
6
|
-
"names": ["radio_stories_exports", "__export", "Default", "radio_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react"]
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react/*'\nimport { RadioGroup, RadioGroupItem } from '../components/index'\nimport React, { type ComponentType } from 'react'\n\nconst meta = {\n title: 'Components/RadioGroup',\n component: RadioGroup,\n subcomponents: { RadioGroupItem: RadioGroupItem as ComponentType<unknown> },\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component:\n '\u5355\u9009\u6846, \u57FA\u4E8E@radix-ui/react-radio-group https://www.radix-ui.com/primitives/docs/components/radio-group',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg'],\n description: '\u5C3A\u5BF8',\n table: {\n defaultValue: { summary: 'base' },\n },\n },\n },\n args: {\n size: 'base',\n },\n} satisfies Meta<typeof RadioGroup>\n\nexport default meta\n\ntype Story = StoryObj<typeof RadioGroup>\nexport const Default: Story = {\n args: {\n size: 'base',\n children: (\n <>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <RadioGroupItem value=\"option-one\" id=\"option-one\" />\n <label htmlFor=\"option-one\">Option One</label>\n </div>\n <div className=\"ai-flex ai-items-center ai-space-x-2\">\n <RadioGroupItem value=\"option-two\" id=\"option-two\" />\n <label htmlFor=\"option-two\">Option Two</label>\n </div>\n </>\n ),\n },\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GA0CM,IAAAK,EAAA,6BAzCNC,EAA2C,+BAC3CC,EAA0C,iBAE1C,MAAMC,EAAO,CACX,MAAO,wBACP,UAAW,aACX,cAAe,CAAE,eAAgB,gBAAyC,EAC1E,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UACE,6HACJ,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,IAAI,EAC5B,YAAa,eACb,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,CACF,EACA,KAAM,CACJ,KAAM,MACR,CACF,EAEA,IAAOL,EAAQK,EAGR,MAAMN,EAAiB,CAC5B,KAAM,CACJ,KAAM,OACN,YACE,oBACE,qBAAC,OAAI,UAAU,uCACb,oBAAC,kBAAe,MAAM,aAAa,GAAG,aAAa,KACnD,OAAC,SAAM,QAAQ,aAAa,sBAAU,GACxC,KACA,QAAC,OAAI,UAAU,uCACb,oBAAC,kBAAe,MAAM,aAAa,GAAG,aAAa,KACnD,OAAC,SAAM,QAAQ,aAAa,sBAAU,GACxC,GACF,CAEJ,CACF",
|
|
6
|
+
"names": ["radio_stories_exports", "__export", "Default", "radio_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
|
|
7
7
|
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/skeleton").SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
14
|
tags: string[];
|
|
10
15
|
};
|
|
11
16
|
export default meta;
|
|
12
17
|
type Story = StoryObj<typeof meta>;
|
|
13
18
|
export declare const Default: Story;
|
|
14
|
-
export declare const
|
|
19
|
+
export declare const Multiple: Story;
|
|
20
|
+
export declare const WithText: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(o,a)=>{for(var s in a)r(o,s,{get:a[s],enumerable:!0})},m=(o,a,s,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of c(a))!d.call(o,i)&&i!==s&&r(o,i,{get:()=>a[i],enumerable:!(l=n(a,i))||l.enumerable});return o};var y=o=>m(r({},"__esModule",{value:!0}),o);var g={};p(g,{Default:()=>h,Multiple:()=>x,WithText:()=>S,default:()=>u});module.exports=y(g);var e=require("react/jsx-runtime"),t=require("../components/index"),b=require("react");const f={title:"Components/Skeleton",component:t.Skeleton,parameters:{layout:"centered",docs:{description:{component:"\u9AA8\u67B6\u5C4F\u7EC4\u4EF6,\u7528\u6765\u5728\u6570\u636E\u52A0\u8F7D\u65F6\u5C55\u793A\u4E00\u4E2A\u5360\u4F4D\u56FE, \u53EF\u4EE5\u5305\u5728dom \u5916\u4F7F\u7528\uFF0C\u901A\u8FC7loading \u63A7\u5236\u663E\u793A\u9690\u85CF, \u4E5F\u53EF\u4EE5\u5355\u72EC\u4F7F\u7528\uFF0C\u901A\u8FC7\u81EA\u5B9A\u4E49class\u63A7\u5236\u6837\u5F0F, \u7EC4\u5408\u6210\u60F3\u8981\u7684\u5F62\u72B6"}}},tags:["autodocs"]};var u=f;const h={args:{loading:!0,children:(0,e.jsx)("div",{className:"ai-h-14 ai-rounded-3xl ai-overflow-hidden ai-px-4 ai-py-4 w-full",children:"Fog creeps across moors, hills, and rivers. It adds an eerie charm to the landscape, but also complicates driving."})}},x={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col ai-items-center ai-justify-center",children:[(0,e.jsxs)("div",{className:"ai-flex ai-w-full ai-justify-between",children:[(0,e.jsx)(t.Skeleton,{className:"ai-size-12 ai-rounded-full"}),(0,e.jsx)(t.Skeleton,{className:"ai-h-12 ai-w-[70%] "})]}),(0,e.jsx)(t.Skeleton,{className:"ai-mt-2 ai-h-40 ai-w-[200px]"})]})}},S={render(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(t.Skeleton,{loading:!0,children:"Rainfall is a constant companion. Umbrellas are practically a national accessory. Expect drizzles, showers, and downpours, often accompanied by gray skies."}),(0,e.jsx)("hr",{}),(0,e.jsx)(t.Skeleton,{loading:!1,children:"Rainfall is a constant companion. Umbrellas are practically a national accessory. Expect drizzles, showers, and downpours, often accompanied by gray skies."})]})}};
|
|
2
2
|
//# sourceMappingURL=skeleton.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/skeleton.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Skeleton } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Skeleton',\n component: Skeleton,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Skeleton>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {}\n\nexport const
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,
|
|
6
|
-
"names": ["skeleton_stories_exports", "__export", "Default", "
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Skeleton } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Components/Skeleton',\n component: Skeleton,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component:\n '\u9AA8\u67B6\u5C4F\u7EC4\u4EF6,\u7528\u6765\u5728\u6570\u636E\u52A0\u8F7D\u65F6\u5C55\u793A\u4E00\u4E2A\u5360\u4F4D\u56FE, \u53EF\u4EE5\u5305\u5728dom \u5916\u4F7F\u7528\uFF0C\u901A\u8FC7loading \u63A7\u5236\u663E\u793A\u9690\u85CF, \u4E5F\u53EF\u4EE5\u5355\u72EC\u4F7F\u7528\uFF0C\u901A\u8FC7\u81EA\u5B9A\u4E49class\u63A7\u5236\u6837\u5F0F, \u7EC4\u5408\u6210\u60F3\u8981\u7684\u5F62\u72B6',\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Skeleton>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n loading: true,\n children: (\n <div className=\"ai-h-14 ai-rounded-3xl ai-overflow-hidden ai-px-4 ai-py-4 w-full\">\n Fog creeps across moors, hills, and rivers. It adds an eerie charm to the landscape, but also complicates\n driving.\n </div>\n ),\n },\n}\n\nexport const Multiple: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col ai-items-center ai-justify-center\">\n <div className=\"ai-flex ai-w-full ai-justify-between\">\n <Skeleton className=\"ai-size-12 ai-rounded-full\" />\n <Skeleton className=\"ai-h-12 ai-w-[70%] \" />\n </div>\n <Skeleton className=\"ai-mt-2 ai-h-40 ai-w-[200px]\" />\n </div>\n )\n },\n}\n\nexport const WithText: Story = {\n render() {\n return (\n <>\n <Skeleton loading={true}>\n Rainfall is a constant companion. Umbrellas are practically a national accessory. Expect drizzles, showers,\n and downpours, often accompanied by gray skies.\n </Skeleton>\n <hr />\n <Skeleton loading={false}>\n Rainfall is a constant companion. Umbrellas are practically a national accessory. Expect drizzles, showers,\n and downpours, often accompanied by gray skies.\n </Skeleton>\n </>\n )\n },\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,aAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GA4BM,IAAAO,EAAA,6BA1BNC,EAAyB,+BACzBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,sBACP,UAAW,WACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UACE,wYACJ,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAIR,MAAMR,EAAiB,CAC5B,KAAM,CACJ,QAAS,GACT,YACE,OAAC,OAAI,UAAU,mEAAmE,8HAGlF,CAEJ,CACF,EAEaC,EAAkB,CAC7B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,wDACb,qBAAC,OAAI,UAAU,uCACb,oBAAC,YAAS,UAAU,6BAA6B,KACjD,OAAC,YAAS,UAAU,sBAAsB,GAC5C,KACA,OAAC,YAAS,UAAU,+BAA+B,GACrD,CAEJ,CACF,EAEaC,EAAkB,CAC7B,QAAS,CACP,SACE,oBACE,oBAAC,YAAS,QAAS,GAAM,uKAGzB,KACA,OAAC,OAAG,KACJ,OAAC,YAAS,QAAS,GAAO,uKAG1B,GACF,CAEJ,CACF",
|
|
6
|
+
"names": ["skeleton_stories_exports", "__export", "Default", "Multiple", "WithText", "skeleton_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
|
|
7
7
|
}
|
|
@@ -5,6 +5,11 @@ declare const meta: {
|
|
|
5
5
|
component: React.ForwardRefExoticComponent<import("../components/text").TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
14
|
tags: string[];
|
|
10
15
|
argTypes: {
|
|
@@ -12,13 +17,41 @@ declare const meta: {
|
|
|
12
17
|
control: {
|
|
13
18
|
type: "select";
|
|
14
19
|
};
|
|
15
|
-
|
|
20
|
+
description: string;
|
|
21
|
+
options: (string | number)[];
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
16
27
|
};
|
|
17
28
|
weights: {
|
|
18
29
|
control: {
|
|
19
30
|
type: "select";
|
|
20
31
|
};
|
|
21
32
|
options: string[];
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
color: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "color";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
as: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "select";
|
|
47
|
+
};
|
|
48
|
+
description: string;
|
|
49
|
+
options: string[];
|
|
50
|
+
table: {
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
22
55
|
};
|
|
23
56
|
html: {
|
|
24
57
|
type: "string";
|
|
@@ -26,7 +59,7 @@ declare const meta: {
|
|
|
26
59
|
};
|
|
27
60
|
};
|
|
28
61
|
args: {
|
|
29
|
-
size:
|
|
62
|
+
size: "none";
|
|
30
63
|
weights: "normal";
|
|
31
64
|
html: string;
|
|
32
65
|
};
|
|
@@ -34,4 +67,6 @@ declare const meta: {
|
|
|
34
67
|
export default meta;
|
|
35
68
|
type Story = StoryObj<typeof meta>;
|
|
36
69
|
export declare const Default: Story;
|
|
37
|
-
export declare const
|
|
70
|
+
export declare const Sizes: Story;
|
|
71
|
+
export declare const Weights: Story;
|
|
72
|
+
export declare const Html: Story;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,t)=>{for(var i in t)n(r,i,{get:t[i],enumerable:!0})},f=(r,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of p(t))!u.call(r,s)&&s!==i&&n(r,s,{get:()=>t[s],enumerable:!(a=l(t,s))||a.enumerable});return r};var h=r=>f(n({},"__esModule",{value:!0}),r);var b={};c(b,{Default:()=>x,Html:()=>T,Sizes:()=>y,Weights:()=>g,default:()=>d});module.exports=h(b);var e=require("react/jsx-runtime"),o=require("../components/index"),w=require("react");const m={title:"Typography/Text",component:o.Text,parameters:{layout:"centered",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},description:"\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8",options:["none",1,2,3,4,5,6,7,8,9],table:{defaultValue:{summary:"none"}}},weights:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},color:{control:{type:"color"}},as:{control:{type:"select"},description:"html \u6807\u7B7E\u7C7B\u578B",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:"none",weights:"normal",html:""}};var d=m;const x={args:{children:" The quick brown fox jumps over the lazy dog.",size:"none",weights:"normal"}},y={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{size:1,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:2,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:3,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:4,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:5,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:6,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:7,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:8,children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{size:9,children:"The quick brown fox jumps over the lazy dog."})]})}},g={render(){return(0,e.jsxs)("div",{className:"ai-flex ai-flex-col",children:[(0,e.jsx)(o.Text,{weights:"light",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"normal",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"medium",children:"The quick brown fox jumps over the lazy dog."}),(0,e.jsx)(o.Text,{weights:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},T={render(){return(0,e.jsx)(o.Text,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
|
|
2
|
+
to right,
|
|
3
|
+
#00ff00, /* \u7EFF\u8272 */
|
|
4
|
+
#00ff99, /* \u6D45\u7EFF\u8272 */
|
|
5
|
+
#00ffff, /* \u9752\u8272 */
|
|
6
|
+
#0099ff, /* \u6D45\u84DD\u8272 */
|
|
7
|
+
#8000ff, /* \u7D2B\u8272 */
|
|
8
|
+
#ff00ff /* \u7C89\u8272 */
|
|
9
|
+
);color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`})}};
|
|
2
10
|
//# sourceMappingURL=text.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/text.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: '
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["text_stories_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'centered',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7B80\u5355\u5C01\u88C5\u4E86\u5E38\u7528\u7684\u6837\u5F0F\u5B57\u6BB5\uFF0C\u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n description: '\u6587\u672C\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4\u4E3Anone\uFF0C\u6D4F\u89C8\u5668\u9ED8\u8BA4\u5927\u5C0F\u548C\u884C\u9AD8\uFF0C1\uFF5E9\u9884\u8BBE\u5B57\u4F53\u5927\u5C0F\u548C\u884C\u9AD8',\n options: ['none', 1, 2, 3, 4, 5, 6, 7, 8, 9],\n table: {\n defaultValue: { summary: 'none' },\n },\n },\n weights: {\n control: {\n type: 'select',\n },\n options: ['light', 'normal', 'medium', 'bold'],\n table: {\n defaultValue: { summary: 'normal' },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 'none',\n weights: 'normal',\n html: '',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 'none',\n weights: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={4}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={5}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={6}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={7}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={8}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={9}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Weights: Story = {\n render() {\n return (\n <div className=\"ai-flex ai-flex-col\">\n <Text weights=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weights=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,GA8EM,IAAAQ,EAAA,6BA5ENC,EAAqB,+BACrBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAW,OACX,WAAY,CACV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,2JACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,6LACb,QAAS,CAAC,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAC3C,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,QAAS,SAAU,SAAU,MAAM,EAC7C,MAAO,CACL,aAAc,CAAE,QAAS,QAAS,CACpC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,YAAa,gCACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,OACN,QAAS,SACT,KAAM,EACR,CACF,EAEA,IAAOL,EAAQK,EAGR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,OACN,QAAS,QACX,CACF,EAEaE,EAAe,CAC1B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,KAC3D,OAAC,QAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaC,EAAiB,CAC5B,QAAS,CACP,SACE,QAAC,OAAI,UAAU,sBACb,oBAAC,QAAK,QAAQ,QAAQ,wDAA4C,KAClE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,SAAS,wDAA4C,KACnE,OAAC,QAAK,QAAQ,OAAO,wDAA4C,GACnE,CAEJ,CACF,EAEaF,EAAc,CACzB,QAAS,CACP,SACE,OAAC,QACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
|
|
6
|
+
"names": ["text_stories_exports", "__export", "Default", "Html", "Sizes", "Weights", "text_stories_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_react", "meta"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
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
|
+
declare const checkboxVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "lg" | "base" | 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>>;
|
|
4
10
|
export default Checkbox;
|
|
11
|
+
export type { CheckboxProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as i}from"react/jsx-runtime";import*as n from"react";import*as e from"@radix-ui/react-checkbox";import{CheckIcon as f}from"@radix-ui/react-icons";import{cn as a}from"../helpers/index.js";import{cva as b}from"class-variance-authority";const p=b("ai-border-primary ai-ring-offset-background focus-visible:ai-ring-ring data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground ai-peer ai-shrink-0 ai-rounded-sm ai-border focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 disabled:ai-bg-btn-primary-disabled",{variants:{size:{sm:"ai-size-[14px]",base:"ai-size-4",lg:"ai-size-5"}},defaultVariants:{size:"base"}}),o=n.forwardRef(({className:r,size:t,...s},c)=>i(e.Root,{ref:c,className:a(p({size:t}),r),...s,children:i(e.Indicator,{className:a("ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full"),children:i(f,{})})}));o.displayName="Checkbox";var h=o;export{h as default};
|
|
2
2
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/checkbox.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "React", "CheckboxPrimitive", "CheckIcon", "cn", "Checkbox", "className", "props", "ref", "checkbox_default"]
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nconst checkboxVariants = cva(\n 'ai-border-primary ai-ring-offset-background focus-visible:ai-ring-ring data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground ai-peer ai-shrink-0 ai-rounded-sm ai-border focus-visible:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 disabled:ai-bg-btn-primary-disabled',\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 CheckboxProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size, ...props }, ref) => (\n <CheckboxPrimitive.Root ref={ref} className={cn(checkboxVariants({ size }), className)} {...props}>\n <CheckboxPrimitive.Indicator\n className={cn('ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full')}\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\nexport type { CheckboxProps }\n"],
|
|
5
|
+
"mappings": "aAmCQ,cAAAA,MAAA,oBAjCR,UAAYC,MAAW,QACvB,UAAYC,MAAuB,2BACnC,OAAS,aAAAC,MAAiB,wBAE1B,OAAS,MAAAC,MAAU,sBACnB,OAAS,OAAAC,MAA8B,2BAEvC,MAAMC,EAAmBD,EACvB,uXACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,iBACJ,KAAM,YACN,GAAI,WACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAMME,EAAWN,EAAM,WACrB,CAAC,CAAE,UAAAO,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAC9BX,EAACE,EAAkB,KAAlB,CAAuB,IAAKS,EAAK,UAAWP,EAAGE,EAAiB,CAAE,KAAAG,CAAK,CAAC,EAAGD,CAAS,EAAI,GAAGE,EAC1F,SAAAV,EAACE,EAAkB,UAAlB,CACC,UAAWE,EAAG,+EAA+E,EAE7F,SAAAJ,EAACG,EAAA,EAAU,EACb,EACF,CAEJ,EACAI,EAAS,YAAc,WAEvB,IAAOK,EAAQL",
|
|
6
|
+
"names": ["jsx", "React", "CheckboxPrimitive", "CheckIcon", "cn", "cva", "checkboxVariants", "Checkbox", "className", "size", "props", "ref", "checkbox_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as r}from"react/jsx-runtime";import*as l from"react";import*as a from"@radix-ui/react-dialog";import{Cross2Icon as u}from"@radix-ui/react-icons";import{cn as s}from"../helpers/index.js";const
|
|
1
|
+
"use client";import{jsx as t,jsxs as r}from"react/jsx-runtime";import*as l from"react";import*as a from"@radix-ui/react-dialog";import{Cross2Icon as u}from"@radix-ui/react-icons";import{cn as s}from"../helpers/index.js";const d=a.Root;d.displayName="Dialog";const R=a.Trigger,m=a.Portal,v=a.Close,n=l.forwardRef(({className:e,...i},o)=>t(a.Overlay,{ref:o,className:s("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",e),...i}));n.displayName=a.Overlay.displayName;const c=l.forwardRef(({className:e,children:i,...o},y)=>r(m,{children:[t(n,{}),r(a.Content,{ref:y,className:s("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",e),...o,children:[i,r(a.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:[t(u,{className:"ai-size-4"}),t("span",{className:"ai-sr-only",children:"Close"})]})]})]}));c.displayName=a.Content.displayName;const f=({className:e,...i})=>t("div",{className:s("ai-flex ai-flex-col ai-space-y-1.5 ai-text-center sm:ai-text-left",e),...i});f.displayName="DialogHeader";const p=({className:e,...i})=>t("div",{className:s("ai-flex ai-flex-col-reverse sm:ai-flex-row sm:ai-justify-end sm:ai-space-x-2",e),...i});p.displayName="DialogFooter";const g=l.forwardRef(({className:e,...i},o)=>t(a.Title,{ref:o,className:s("ai-text-lg ai-font-semibold ai-leading-none ai-tracking-tight",e),...i}));g.displayName=a.Title.displayName;const D=l.forwardRef(({className:e,...i},o)=>t(a.Description,{ref:o,className:s("ai-text-muted-foreground ai-text-sm",e),...i}));D.displayName=a.Description.displayName;export{d as Dialog,v as DialogClose,c as DialogContent,D as DialogDescription,p as DialogFooter,f as DialogHeader,n as DialogOverlay,m as DialogPortal,g as DialogTitle,R as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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": "
|
|
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\nDialog.displayName = 'Dialog'\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": "aAqBE,cAAAA,EA0BI,QAAAC,MA1BJ,oBAnBF,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBAE3B,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAASH,EAAgB,KAC/BG,EAAO,YAAc,SAErB,MAAMC,EAAgBJ,EAAgB,QAEhCK,EAAeL,EAAgB,OAE/BM,EAAcN,EAAgB,MAE9BO,EAAgBR,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,kLACAM,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAAcP,EAAgB,QAAQ,YAEpD,MAAMW,EAAgBZ,EAAM,WAG1B,CAAC,CAAE,UAAAS,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IACpCZ,EAACO,EAAA,CACC,UAAAR,EAACU,EAAA,EAAc,EACfT,EAACE,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,okBACAM,CACF,EACC,GAAGC,EAEH,UAAAG,EACDd,EAACE,EAAgB,MAAhB,CAAsB,UAAU,6TAC/B,UAAAH,EAACI,EAAA,CAAW,UAAU,YAAY,EAClCJ,EAAC,QAAK,UAAU,aAAa,iBAAK,GACpC,GACF,GACF,CACD,EACDc,EAAc,YAAcX,EAAgB,QAAQ,YAEpD,MAAMa,EAAe,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OAAI,UAAWK,EAAG,oEAAqEM,CAAS,EAAI,GAAGC,EAAO,EAEjHI,EAAa,YAAc,eAE3B,MAAMC,EAAe,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OACC,UAAWK,EAAG,+EAAgFM,CAAS,EACtG,GAAGC,EACN,EAEFK,EAAa,YAAc,eAE3B,MAAMC,EAAchB,EAAM,WAGxB,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,MAAhB,CACC,IAAKU,EACL,UAAWR,EAAG,gEAAiEM,CAAS,EACvF,GAAGC,EACN,CACD,EACDM,EAAY,YAAcf,EAAgB,MAAM,YAEhD,MAAMgB,EAAoBjB,EAAM,WAG9B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,YAAhB,CAA4B,IAAKU,EAAK,UAAWR,EAAG,sCAAuCM,CAAS,EAAI,GAAGC,EAAO,CACpH,EACDO,EAAkB,YAAchB,EAAgB,YAAY",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "DialogPrimitive", "Cross2Icon", "cn", "Dialog", "DialogTrigger", "DialogPortal", "DialogClose", "DialogOverlay", "className", "props", "ref", "DialogContent", "children", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription"]
|
|
7
7
|
}
|