@customafk/lunas-ui 0.0.1-e → 0.0.1

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/README.md CHANGED
@@ -1,49 +1,29 @@
1
- # E-Commerce UI
1
+ # react-components-starter
2
2
 
3
- ## 🤔 What is this project?
3
+ A starter for creating a React component library.
4
4
 
5
- This is a component library for any e-commerce web project.
5
+ ## Development
6
6
 
7
- ## Installation
7
+ - Install dependencies:
8
8
 
9
- 1. Prerequisites
10
-
11
- - `Node.js >= 20.x`
12
- - `Yarn >= 4.x`
13
-
14
- 2. Clone repository
15
-
16
- - `git clone https://github.com/QuangPhamvt/e-commerce-ui.git`
17
-
18
- 3. Install packages
19
-
20
- - `yarn`
21
-
22
- 4. Run
9
+ ```bash
10
+ npm install
11
+ ```
23
12
 
24
- - `yarn run sb`
25
- - Go to [localhost:6006](http://localhost:6006)
13
+ - Run the playground:
26
14
 
27
- ## ❔ How to push
15
+ ```bash
16
+ npm run playground
17
+ ```
28
18
 
29
- - Role commit: `{type}: {subject}`
19
+ - Run the unit tests:
30
20
 
31
- - type: feature (feat) | fix | style | refactor | documentation (doc) | test | build
32
- - subject: write a concise description of the change
33
- <!-- - # (TODO) Automatic: check lint and format pre-commit -->
21
+ ```bash
22
+ npm run test
23
+ ```
34
24
 
35
- - Example:
25
+ - Build the library:
36
26
 
37
27
  ```bash
38
- git commit -m "{type}: {subject}"
28
+ npm run build
39
29
  ```
40
-
41
- | **Type** | **Description** |
42
- | :------------ | :----------------------------------------------------------------------------------------------------- |
43
- | feature | A new feature |
44
- | fix | A bug fix |
45
- | style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
46
- | refactor | Changes that restructure the code without adding new features |
47
- | documentation | Changes to documentation only |
48
- | test | Changes that add or modify existing tests |
49
- | build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
package/dist/alert.cjs ADDED
@@ -0,0 +1,2 @@
1
+ const e=require(`./utils-Bo7GM4B-.cjs`);require(`react`);const t=e.__toESM(require(`class-variance-authority`)),n=e.__toESM(require(`react/jsx-runtime`)),r=(0,t.cva)([`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm`,`has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4`,`[&>svg]:translate-y-0.5 [&>svg]:text-current`],{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}});function i({className:t,variant:i,...a}){return(0,n.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:e.cn(r({variant:i}),t),...a})}function a({className:t,...r}){return(0,n.jsx)(`div`,{"data-slot":`alert-title`,className:e.cn(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,t),...r})}function o({className:t,...r}){return(0,n.jsx)(`div`,{"data-slot":`alert-description`,className:e.cn(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,t),...r})}exports.Alert=i,exports.AlertDescription=o,exports.AlertTitle=a;
2
+ //# sourceMappingURL=alert.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.cjs","names":["cn"],"sources":["../packages/components/ui/alert.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n [\n \"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm\",\n \"has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4\",\n \"[&>svg]:translate-y-0.5 [&>svg]:text-current\",\n ],\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"mappings":"0JAKM,GAAA,EAAA,EAAA,KACJ,CACE,mGACA,sFACA,+CACD,CACD,CACE,SAAU,CACR,QAAS,CACP,QAAS,+BACT,YACE,oGACH,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,EAGH,SAAS,EAAM,CACb,YACA,UACA,GAAG,EAC8D,CAAE,CACnE,OACE,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,QACV,KAAK,QACL,UAAWA,EAAAA,GAAG,EAAc,CAAE,UAAS,EAAG,GAC1C,GAAI,GAGT,CAED,SAAS,EAAW,CAAE,YAAW,GAAG,EAAoC,CAAE,CACxE,OACE,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,cACV,UAAWA,EAAAA,GACT,8DACA,GAEF,GAAI,GAGT,CAED,SAAS,EAAiB,CACxB,YACA,GAAG,EACyB,CAAE,CAC9B,OACE,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,oBACV,UAAWA,EAAAA,GACT,iGACA,GAEF,GAAI,GAGT"}
@@ -0,0 +1,24 @@
1
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
2
+ import React from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+
5
+ //#region packages/components/ui/alert.d.ts
6
+ declare const alertVariants: (props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ declare function Alert({
10
+ className,
11
+ variant,
12
+ ...props
13
+ }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
14
+ declare function AlertTitle({
15
+ className,
16
+ ...props
17
+ }: React.ComponentProps<"div">): React.JSX.Element;
18
+ declare function AlertDescription({
19
+ className,
20
+ ...props
21
+ }: React.ComponentProps<"div">): React.JSX.Element;
22
+ //#endregion
23
+ export { Alert, AlertDescription, AlertTitle };
24
+ //# sourceMappingURL=alert.d.cts.map
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region packages/components/ui/alert.d.ts
6
+ declare const alertVariants: (props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ declare function Alert({
10
+ className,
11
+ variant,
12
+ ...props
13
+ }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
14
+ declare function AlertTitle({
15
+ className,
16
+ ...props
17
+ }: React.ComponentProps<"div">): React.JSX.Element;
18
+ declare function AlertDescription({
19
+ className,
20
+ ...props
21
+ }: React.ComponentProps<"div">): React.JSX.Element;
22
+ //#endregion
23
+ export { Alert, AlertDescription, AlertTitle };
24
+ //# sourceMappingURL=alert.d.ts.map
package/dist/alert.js ADDED
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"./utils-CGQEF8PW.js";import t from"react";import{cva as n}from"class-variance-authority";import{jsx as r}from"react/jsx-runtime";const i=n([`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm`,`has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4`,`[&>svg]:translate-y-0.5 [&>svg]:text-current`],{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}});function a({className:t,variant:n,...a}){return r(`div`,{"data-slot":`alert`,role:`alert`,className:e(i({variant:n}),t),...a})}function o({className:t,...n}){return r(`div`,{"data-slot":`alert-title`,className:e(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,t),...n})}function s({className:t,...n}){return r(`div`,{"data-slot":`alert-description`,className:e(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,t),...n})}export{a as Alert,s as AlertDescription,o as AlertTitle};
2
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","names":[],"sources":["../packages/components/ui/alert.tsx"],"sourcesContent":["import React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n [\n \"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm\",\n \"has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4\",\n \"[&>svg]:translate-y-0.5 [&>svg]:text-current\",\n ],\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"mappings":"qJAKA,MAAM,EAAgB,EACpB,CACE,mGACA,sFACA,+CACD,CACD,CACE,SAAU,CACR,QAAS,CACP,QAAS,+BACT,YACE,oGACH,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,EAGH,SAAS,EAAM,CACb,YACA,UACA,GAAG,EAC8D,CAAE,CACnE,OACE,EAAC,MAAA,CACC,YAAU,QACV,KAAK,QACL,UAAW,EAAG,EAAc,CAAE,UAAS,EAAG,GAC1C,GAAI,GAGT,CAED,SAAS,EAAW,CAAE,YAAW,GAAG,EAAoC,CAAE,CACxE,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,8DACA,GAEF,GAAI,GAGT,CAED,SAAS,EAAiB,CACxB,YACA,GAAG,EACyB,CAAE,CAC9B,OACE,EAAC,MAAA,CACC,YAAU,oBACV,UAAW,EACT,iGACA,GAEF,GAAI,GAGT"}
@@ -0,0 +1,2 @@
1
+ const e=require(`./utils-Bo7GM4B-.cjs`);require(`react`);const t=e.__toESM(require(`class-variance-authority`)),n=e.__toESM(require(`react/jsx-runtime`)),r=e.__toESM(require(`radix-ui`)),i=(0,t.cva)(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function a({className:t,variant:a,size:o,asChild:s=!1,...c}){let l=s?r.Slot.Slot:`button`;return(0,n.jsx)(l,{"data-slot":`button`,className:e.cn(i({variant:a,size:o,className:t})),...c})}exports.Button=a,exports.buttonVariants=i;
2
+ //# sourceMappingURL=button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.cjs","names":["SlotPrimitive","cn"],"sources":["../packages/components/ui/button.tsx"],"sourcesContent":["import React from \"react\";\nimport { Slot as SlotPrimitive } from \"radix-ui\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? SlotPrimitive.Slot : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"2LAMM,GAAA,EAAA,EAAA,KACJ,8bACA,CACE,SAAU,CACR,QAAS,CACP,QACE,mEACF,YACE,8JACF,QACE,wIACF,UACE,yEACF,MACE,uEACF,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACP,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,EAGH,SAAS,EAAO,CACd,YACA,UACA,OACA,UAAU,GACV,GAAG,EAIF,CAAE,CACH,IAAM,EAAO,EAAUA,EAAAA,KAAc,KAAO,SAE5C,OACE,EAAA,EAAA,KAAC,EAAA,CACC,YAAU,SACV,UAAWC,EAAAA,GAAG,EAAe,CAAE,UAAS,OAAM,YAAW,GACzD,GAAI,GAGT"}
@@ -0,0 +1,21 @@
1
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
2
+ import React from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+
5
+ //#region packages/components/ui/button.d.ts
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
9
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ declare function Button({
11
+ className,
12
+ variant,
13
+ size,
14
+ asChild,
15
+ ...props
16
+ }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
17
+ asChild?: boolean;
18
+ }): React.JSX.Element;
19
+ //#endregion
20
+ export { Button, buttonVariants };
21
+ //# sourceMappingURL=button.d.cts.map
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region packages/components/ui/button.d.ts
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
9
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ declare function Button({
11
+ className,
12
+ variant,
13
+ size,
14
+ asChild,
15
+ ...props
16
+ }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
17
+ asChild?: boolean;
18
+ }): React.JSX.Element;
19
+ //#endregion
20
+ export { Button, buttonVariants };
21
+ //# sourceMappingURL=button.d.ts.map
package/dist/button.js ADDED
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"./utils-CGQEF8PW.js";import t from"react";import{cva as n}from"class-variance-authority";import{jsx as r}from"react/jsx-runtime";import{Slot as i}from"radix-ui";const a=n(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function o({className:t,variant:n,size:o,asChild:s=!1,...c}){let l=s?i.Slot:`button`;return r(l,{"data-slot":`button`,className:e(a({variant:n,size:o,className:t})),...c})}export{o as Button,a as buttonVariants};
2
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","names":["SlotPrimitive"],"sources":["../packages/components/ui/button.tsx"],"sourcesContent":["import React from \"react\";\nimport { Slot as SlotPrimitive } from \"radix-ui\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? SlotPrimitive.Slot : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"qLAMA,MAAM,EAAiB,EACrB,8bACA,CACE,SAAU,CACR,QAAS,CACP,QACE,mEACF,YACE,8JACF,QACE,wIACF,UACE,yEACF,MACE,uEACF,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACP,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,EAGH,SAAS,EAAO,CACd,YACA,UACA,OACA,UAAU,GACV,GAAG,EAIF,CAAE,CACH,IAAM,EAAO,EAAUA,EAAc,KAAO,SAE5C,OACE,EAAC,EAAA,CACC,YAAU,SACV,UAAW,EAAG,EAAe,CAAE,UAAS,OAAM,YAAW,GACzD,GAAI,GAGT"}
@@ -0,0 +1,2 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=s(require(`clsx`)),l=s(require(`tailwind-merge`));function u(...e){return(0,l.twMerge)((0,c.clsx)(e))}Object.defineProperty(exports,`__toESM`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`cn`,{enumerable:!0,get:function(){return u}});
2
+ //# sourceMappingURL=utils-Bo7GM4B-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-Bo7GM4B-.cjs","names":[],"sources":["../packages/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"whBAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAoB,GACrB"}
@@ -0,0 +1,2 @@
1
+ import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(...n){return t(e(n))}export{n as cn};
2
+ //# sourceMappingURL=utils-CGQEF8PW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-CGQEF8PW.js","names":[],"sources":["../packages/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"qEAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,GACrB"}
package/package.json CHANGED
@@ -1,137 +1,62 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
- "private": false,
4
- "version": "0.0.1-e",
3
+ "version": "0.0.1",
4
+ "description": "UI library for Lunas Enterprise",
5
5
  "type": "module",
6
- "homepage": "https://docs.customafk.com",
6
+ "author": "CustomAFK",
7
+ "license": "ISC",
8
+ "homepage": "https://github.com/author/library#readme",
7
9
  "repository": {
8
- "url": "git+https://github.com/QuangPhamvt/lunas-ui.git"
10
+ "type": "git",
11
+ "url": "git+https://github.com/QuangPhamvt/lunas-enterprise-ui-package.git"
9
12
  },
10
13
  "files": [
11
14
  "dist"
12
15
  ],
13
- "main": "./dist/Atoms/index.js",
14
- "module": "./dist/Atoms/index.js",
15
- "types": "./dist/Atoms/index.d.ts",
16
16
  "exports": {
17
- "./hooks": {
18
- "types": "./dist/hooks/index.d.ts",
19
- "import": "./dist/hooks/index.js",
20
- "require": "./dist/hooks/index.js"
21
- },
22
- "./Icons": {
23
- "types": "./dist/Icons/index.d.ts",
24
- "import": "./dist/Icons/index.js",
25
- "require": "./dist/Icons/index.js"
26
- },
27
- "./Layout": {
28
- "types": "./dist/Layout/index.d.ts",
29
- "import": "./dist/Layout/index.js",
30
- "require": "./dist/Layout/index.js"
17
+ "./alert": {
18
+ "import": "./dist/alert.js",
19
+ "require": "./dist/alert.cjs"
31
20
  },
32
- "./Atoms": {
33
- "types": "./dist/Atoms/index.d.ts",
34
- "import": "./dist/Atoms/index.js",
35
- "require": "./dist/Atoms/index.js"
21
+ "./button": {
22
+ "import": "./dist/button.js",
23
+ "require": "./dist/button.cjs"
36
24
  },
37
- "./Molecules": {
38
- "types": "./dist/Molecules/index.d.ts",
39
- "import": "./dist/Molecules/index.js",
40
- "require": "./dist/Molecules/index.js"
41
- },
42
- "./Organisms": {
43
- "types": "./dist/Organisms/index.d.ts",
44
- "import": "./dist/Organisms/index.js",
45
- "require": "./dist/Organisms/index.js"
46
- },
47
- "./tailwindTheme": {
48
- "types": "./dist/tailwindTheme.d.ts",
49
- "import": "./dist/tailwindTheme.js",
50
- "require": "./dist/tailwindTheme.js"
51
- }
52
- },
53
- "scripts": {
54
- "build": "tsup",
55
- "lint": "eslint ./packages --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
56
- "lint:fix": "eslint ./packages --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
57
- "fmt": "prettier --check \"./packages/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
58
- "fmt:fix": "prettier --write \"./packages/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
59
- "sb": "storybook dev -p 6006",
60
- "build-sb": "storybook build"
25
+ "./package.json": "./package.json"
61
26
  },
62
- "devDependencies": {
63
- "@chromatic-com/storybook": "^1.6.1",
64
- "@shopify/eslint-plugin": "^46.0.0",
65
- "@storybook/addon-essentials": "^8.3.1",
66
- "@storybook/addon-interactions": "^8.3.1",
67
- "@storybook/addon-links": "^8.3.1",
68
- "@storybook/addon-onboarding": "^8.3.1",
69
- "@storybook/addon-themes": "^8.3.1",
70
- "@storybook/blocks": "^8.3.1",
71
- "@storybook/react": "^8.3.1",
72
- "@storybook/react-vite": "^8.3.1",
73
- "@storybook/test": "^8.3.1",
74
- "@types/bun": "latest",
75
- "@types/react": "^18.3.3",
76
- "@types/react-dom": "^18.3.0",
77
- "@typescript-eslint/eslint-plugin": "^6.21.0",
78
- "@typescript-eslint/parser": "^6.21.0",
79
- "@vitejs/plugin-react": "^4.3.0",
80
- "autoprefixer": "^10.4.20",
81
- "eslint": "^8.57.1",
82
- "eslint-config-prettier": "^9.1.0",
83
- "eslint-plugin-import": "^2.30.0",
84
- "eslint-plugin-jsx-a11y": "^6.10.0",
85
- "eslint-plugin-react": "^7.36.1",
86
- "eslint-plugin-react-form-fields": "^1.2.22",
87
- "eslint-plugin-react-hook-form": "^0.3.0",
88
- "eslint-plugin-react-hooks": "^4.6.2",
89
- "eslint-plugin-react-perf": "^3.3.2",
90
- "eslint-plugin-react-prefer-function-component": "^3.3.0",
91
- "eslint-plugin-react-refresh": "^0.4.7",
92
- "eslint-plugin-sonar": "^0.13.2",
93
- "eslint-plugin-ssr-friendly": "^1.3.0",
94
- "eslint-plugin-storybook": "^0.8.0",
95
- "eslint-plugin-unicorn": "^55.0.0",
96
- "eslint-plugin-validate-jsx-nesting": "^0.1.1",
97
- "postcss": "^8.4.40",
98
- "prettier": "^3.3.3",
99
- "prettier-plugin-tailwindcss": "^0.6.5",
100
- "storybook": "^8.3.1",
101
- "tailwindcss": "^3.4.7",
102
- "tailwindcss-animate": "^1.0.7",
103
- "tsup": "^8.2.4",
104
- "typescript": "^5.2.2",
105
- "vite": "^5.2.13",
106
- "vite-tsconfig-paths": "^4.3.2"
27
+ "publishConfig": {
28
+ "access": "public"
107
29
  },
108
- "description": "This is a e-commerce UI library for CustomAFK",
109
- "bugs": {
110
- "url": "https://github.com/QuangPhamvt/e-commerce-ui/issues"
30
+ "scripts": {
31
+ "build": "tsdown",
32
+ "dev": "tsdown --watch",
33
+ "typecheck": "tsc --noEmit"
111
34
  },
112
- "author": "CustomAFK",
113
- "license": "ISC",
114
- "dependencies": {
115
- "@hookform/resolvers": "^3.9.0",
116
- "@radix-ui/react-alert-dialog": "^1.1.2",
117
- "@radix-ui/react-dialog": "^1.1.2",
118
- "@radix-ui/react-dropdown-menu": "^2.1.1",
119
- "@radix-ui/react-label": "^2.1.0",
120
- "@radix-ui/react-scroll-area": "^1.2.0",
121
- "@radix-ui/react-select": "^2.1.2",
122
- "@radix-ui/react-slot": "^1.1.0",
123
- "@radix-ui/react-toast": "^1.2.1",
124
- "class-variance-authority": "^0.7.0",
35
+ "peerDependencies": {
36
+ "@tailwindcss/vite": "^4.1.10",
37
+ "@types/react": "*",
38
+ "@types/react-dom": "*",
39
+ "class-variance-authority": "^0.7.1",
125
40
  "clsx": "^2.1.1",
126
- "cmdk": "^1.0.0",
127
- "embla-carousel-react": "^8.3.0",
128
- "framer-motion": "^11.11.8",
129
- "lucide-react": "^0.424.0",
130
- "react": "^18.3.1",
131
- "react-dom": "^18.3.1",
132
- "react-hook-form": "^7.53.0",
133
- "react-spinners": "^0.14.1",
134
- "tailwind-merge": "^2.4.0",
135
- "zod": "^3.23.8"
41
+ "lucide-react": "^0.541.0",
42
+ "radix-ui": "^1.4.3",
43
+ "react": "16.8 || ^17.0 || ^18.0 || ^19.0",
44
+ "react-dom": "16.8 || ^17.0 || ^18.0 || ^19.0",
45
+ "tailwind-merge": "^3.3.1",
46
+ "tailwindcss": "^4.1.10",
47
+ "tw-animate-css": "^1.3.7"
48
+ },
49
+ "devDependencies": {
50
+ "@storybook/addon-a11y": "^9.1.3",
51
+ "@storybook/addon-docs": "^9.1.3",
52
+ "@storybook/addon-onboarding": "^9.1.3",
53
+ "@storybook/addon-themes": "^9.1.3",
54
+ "@storybook/react-vite": "^9.1.3",
55
+ "@types/node": "^24.0.3",
56
+ "@vitejs/plugin-react": "^4.4.1",
57
+ "tsdown": "^0.14.1",
58
+ "typescript": "^5.8.3",
59
+ "vite": "^6.3.5",
60
+ "vitest": "^3.2.4"
136
61
  }
137
62
  }