@authdog/react-elements 0.0.4 → 0.0.9
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/.eslintrc.js +9 -0
- package/.turbo/turbo-build.log +34 -0
- package/CHANGELOG.md +37 -0
- package/README.md +1 -5
- package/components.json +20 -0
- package/dist/components/ui/button.d.mts +14 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.js +2 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/button.mjs +2 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/global.css +81 -0
- package/dist/index.d.mts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/lib/utils.d.mts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +2 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/postcss.config.mjs +9 -0
- package/dist/tailwind.config.ts +82 -0
- package/package.json +33 -27
- package/postcss.config.mjs +9 -0
- package/src/components/ui/button.tsx +56 -0
- package/src/global.css +81 -0
- package/src/index.ts +1 -0
- package/src/lib/utils.ts +6 -0
- package/tailwind.config.ts +82 -0
- package/tsconfig.json +11 -0
- package/tsup.config.ts +23 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
> @authdog/react-elements@0.0.9 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
|
|
3
|
+
> pnpm tsup
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts, src/lib/utils.ts, src/components/ui/button.tsx
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.3.5
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/web-sdk/web-sdk/packages/react-elements/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es2020
|
|
10
|
+
[34mCLI[39m Cleaning output folder
|
|
11
|
+
[34mCJS[39m Build start
|
|
12
|
+
[34mESM[39m Build start
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m1.93 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/lib/utils.js [22m[32m606.00 B[39m
|
|
15
|
+
[32mCJS[39m [1mdist/components/ui/button.js [22m[32m1.93 KB[39m
|
|
16
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m3.24 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/lib/utils.js.map [22m[32m519.00 B[39m
|
|
18
|
+
[32mCJS[39m [1mdist/components/ui/button.js.map [22m[32m3.19 KB[39m
|
|
19
|
+
[32mCJS[39m ⚡️ Build success in 70ms
|
|
20
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.35 KB[39m
|
|
21
|
+
[32mESM[39m [1mdist/lib/utils.mjs [22m[32m152.00 B[39m
|
|
22
|
+
[32mESM[39m [1mdist/components/ui/button.mjs [22m[32m1.35 KB[39m
|
|
23
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m3.02 KB[39m
|
|
24
|
+
[32mESM[39m [1mdist/lib/utils.mjs.map [22m[32m414.00 B[39m
|
|
25
|
+
[32mESM[39m [1mdist/components/ui/button.mjs.map [22m[32m3.03 KB[39m
|
|
26
|
+
[32mESM[39m ⚡️ Build success in 72ms
|
|
27
|
+
[34mDTS[39m Build start
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 10599ms
|
|
29
|
+
[32mDTS[39m [1mdist/lib/utils.d.ts [22m[32m106.00 B[39m
|
|
30
|
+
[32mDTS[39m [1mdist/components/ui/button.d.ts [22m[32m756.00 B[39m
|
|
31
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m173.00 B[39m
|
|
32
|
+
[32mDTS[39m [1mdist/lib/utils.d.mts [22m[32m106.00 B[39m
|
|
33
|
+
[32mDTS[39m [1mdist/components/ui/button.d.mts [22m[32m756.00 B[39m
|
|
34
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m174.00 B[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @authdog/react-elements
|
|
2
|
+
|
|
3
|
+
## 0.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 352d31e: replace css filepath
|
|
8
|
+
|
|
9
|
+
## 0.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 57c41ef: add publish config
|
|
14
|
+
|
|
15
|
+
## 0.0.8
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 30fdfe6: bump
|
|
20
|
+
|
|
21
|
+
## 0.0.7
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 6c41c4d: bump version
|
|
26
|
+
|
|
27
|
+
## 0.0.2
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- d6ac8e7: ensure all exports are available
|
|
32
|
+
|
|
33
|
+
## 0.0.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 8d5f1a9: adjust config to export tailwinded components and style
|
package/README.md
CHANGED
package/components.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "default",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "tailwind.config.ts",
|
|
8
|
+
"css": "src/globals.css",
|
|
9
|
+
"baseColor": "zinc",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@authdog/react-elements/components",
|
|
15
|
+
"ui": "@authdog/react-elements/components/ui",
|
|
16
|
+
"utils": "@authdog/react-elements/lib/utils",
|
|
17
|
+
"lib": "@authdog/react-elements/lib",
|
|
18
|
+
"hooks": "@authdog/react-elements/hooks"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const buttonVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export { Button, type ButtonProps, buttonVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const buttonVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export { Button, type ButtonProps, buttonVariants };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var v=Object.create;var i=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},a=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of x(t))!B.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=h(t,o))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?v(y(e)):{},a(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),C=e=>a(i({},"__esModule",{value:!0}),e);var M={};V(M,{Button:()=>m,buttonVariants:()=>p});module.exports=C(M);var c=w(require("react")),f=require("@radix-ui/react-slot"),l=require("class-variance-authority");var s=require("clsx"),u=require("tailwind-merge");function d(...e){return(0,u.twMerge)((0,s.clsx)(e))}var b=require("react/jsx-runtime"),p=(0,l.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),m=c.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},g)=>(0,b.jsx)(n?f.Slot:"button",{className:d(p({variant:t,size:r,className:e})),ref:g,...o}));m.displayName="Button";
|
|
2
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@authdog/react-elements/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,KAAiB,OACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["button_exports","__export","Button","buttonVariants","__toCommonJS","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","asChild","props","ref","cn"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as r from"react";import{Slot as c}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{clsx as u}from"clsx";import{twMerge as d}from"tailwind-merge";function t(...e){return d(u(e))}import{jsx as m}from"react/jsx-runtime";var l=f("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),p=r.forwardRef(({className:e,variant:o,size:n,asChild:i=!1,...a},s)=>m(i?c:"button",{className:t(l({variant:o,size:n,className:e})),ref:s,...a}));p.displayName="Button";export{p as Button,l as buttonVariants};
|
|
2
|
+
//# sourceMappingURL=button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@authdog/react-elements/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,MAAA,oBAvCN,IAAMC,EAAiBC,EACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn"]}
|
package/dist/global.css
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--background: 0 0% 100%;
|
|
8
|
+
--foreground: 222.2 47.4% 11.2%;
|
|
9
|
+
|
|
10
|
+
--muted: 210 40% 96.1%;
|
|
11
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
12
|
+
|
|
13
|
+
--popover: 0 0% 100%;
|
|
14
|
+
--popover-foreground: 222.2 47.4% 11.2%;
|
|
15
|
+
|
|
16
|
+
--card: 0 0% 100%;
|
|
17
|
+
--card-foreground: 222.2 47.4% 11.2%;
|
|
18
|
+
|
|
19
|
+
--border: 214.3 31.8% 91.4%;
|
|
20
|
+
--input: 214.3 31.8% 91.4%;
|
|
21
|
+
|
|
22
|
+
--primary: 222.2 47.4% 11.2%;
|
|
23
|
+
--primary-foreground: 210 40% 98%;
|
|
24
|
+
|
|
25
|
+
--secondary: 210 40% 96.1%;
|
|
26
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
27
|
+
|
|
28
|
+
--accent: 210 40% 96.1%;
|
|
29
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
30
|
+
|
|
31
|
+
--destructive: 0 100% 50%;
|
|
32
|
+
--destructive-foreground: 210 40% 98%;
|
|
33
|
+
|
|
34
|
+
--ring: 215 20.2% 65.1%;
|
|
35
|
+
|
|
36
|
+
--radius: 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dark {
|
|
40
|
+
--background: 224 71% 4%;
|
|
41
|
+
--foreground: 213 31% 91%;
|
|
42
|
+
|
|
43
|
+
--muted: 223 47% 11%;
|
|
44
|
+
--muted-foreground: 215.4 16.3% 56.9%;
|
|
45
|
+
|
|
46
|
+
--popover: 224 71% 4%;
|
|
47
|
+
--popover-foreground: 215 20.2% 65.1%;
|
|
48
|
+
|
|
49
|
+
--card: 224 71% 4%;
|
|
50
|
+
--card-foreground: 213 31% 91%;
|
|
51
|
+
|
|
52
|
+
--border: 216 34% 17%;
|
|
53
|
+
--input: 216 34% 17%;
|
|
54
|
+
|
|
55
|
+
--primary: 210 40% 98%;
|
|
56
|
+
--primary-foreground: 222.2 47.4% 1.2%;
|
|
57
|
+
|
|
58
|
+
--secondary: 222.2 47.4% 11.2%;
|
|
59
|
+
--secondary-foreground: 210 40% 98%;
|
|
60
|
+
|
|
61
|
+
--accent: 216 34% 17%;
|
|
62
|
+
--accent-foreground: 210 40% 98%;
|
|
63
|
+
|
|
64
|
+
--destructive: 0 63% 31%;
|
|
65
|
+
--destructive-foreground: 210 40% 98%;
|
|
66
|
+
|
|
67
|
+
--ring: 216 34% 17%;
|
|
68
|
+
|
|
69
|
+
--radius: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@layer base {
|
|
74
|
+
* {
|
|
75
|
+
@apply border-border;
|
|
76
|
+
}
|
|
77
|
+
body {
|
|
78
|
+
@apply bg-background text-foreground;
|
|
79
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare const Navbar: ({ siteName }: INavbarProps) => react_jsx_runtime.JSX.Element;
|
|
7
|
-
|
|
8
|
-
export { Navbar };
|
|
1
|
+
export { Button, ButtonProps, buttonVariants } from './components/ui/button.mjs';
|
|
2
|
+
import 'class-variance-authority/types';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'class-variance-authority';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare const Navbar: ({ siteName }: INavbarProps) => react_jsx_runtime.JSX.Element;
|
|
7
|
-
|
|
8
|
-
export { Navbar };
|
|
1
|
+
export { Button, ButtonProps, buttonVariants } from './components/ui/button.js';
|
|
2
|
+
import 'class-variance-authority/types';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'class-variance-authority';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var
|
|
1
|
+
"use strict";var v=Object.create;var i=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},a=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of h(t))!B.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=x(t,o))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?v(y(e)):{},a(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),C=e=>a(i({},"__esModule",{value:!0}),e);var M={};V(M,{Button:()=>m,buttonVariants:()=>p});module.exports=C(M);var c=w(require("react")),f=require("@radix-ui/react-slot"),l=require("class-variance-authority");var s=require("clsx"),u=require("tailwind-merge");function d(...e){return(0,u.twMerge)((0,s.clsx)(e))}var b=require("react/jsx-runtime"),p=(0,l.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),m=c.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},g)=>(0,b.jsx)(n?f.Slot:"button",{className:d(p({variant:t,size:r,className:e})),ref:g,...o}));m.displayName="Button";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/ui/button.tsx","../src/lib/utils.ts"],"sourcesContent":["export * from \"./components/ui/button\";\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@authdog/react-elements/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,KAAiB,OACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["index_exports","__export","Button","buttonVariants","__toCommonJS","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","asChild","props","ref","cn"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import*as r from"react";import{Slot as c}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{clsx as u}from"clsx";import{twMerge as d}from"tailwind-merge";function t(...e){return d(u(e))}import{jsx as m}from"react/jsx-runtime";var l=f("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),p=r.forwardRef(({className:e,variant:o,size:n,asChild:i=!1,...a},s)=>m(i?c:"button",{className:t(l({variant:o,size:n,className:e})),ref:s,...a}));p.displayName="Button";export{p as Button,l as buttonVariants};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/button.tsx","../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@authdog/react-elements/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,MAAA,oBAvCN,IAAMC,EAAiBC,EACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var l=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var o in e)l(r,o,{get:e[o],enumerable:!0})},f=(r,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!u.call(r,t)&&t!==o&&l(r,t,{get:()=>e[t],enumerable:!(s=n(e,t))||s.enumerable});return r};var i=r=>f(l({},"__esModule",{value:!0}),r);var C={};c(C,{cn:()=>x});module.exports=i(C);var a=require("clsx"),m=require("tailwind-merge");function x(...r){return(0,m.twMerge)((0,a.clsx)(r))}
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,QAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASH,KAAMI,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B","names":["utils_exports","__export","cn","__toCommonJS","import_clsx","import_tailwind_merge","inputs"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,OAA0B,QAAAA,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B","names":["clsx","twMerge","cn","inputs"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
import tailwindcssAnimate from "tailwindcss-animate";
|
|
3
|
+
|
|
4
|
+
const config = {
|
|
5
|
+
darkMode: ["class", ""],
|
|
6
|
+
content: [
|
|
7
|
+
"./pages/**/*.{ts,tsx}",
|
|
8
|
+
"./components/**/*.{ts,tsx}",
|
|
9
|
+
"./components/**/**/*.{ts,tsx}",
|
|
10
|
+
"./app/**/*.{ts,tsx}",
|
|
11
|
+
"./src/**/*.{ts,tsx}"
|
|
12
|
+
],
|
|
13
|
+
prefix: "",
|
|
14
|
+
theme: {
|
|
15
|
+
container: {
|
|
16
|
+
center: true,
|
|
17
|
+
padding: "2rem",
|
|
18
|
+
screens: {
|
|
19
|
+
"2xl": "1400px",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
extend: {
|
|
23
|
+
colors: {
|
|
24
|
+
border: "hsl(var(--border))",
|
|
25
|
+
input: "hsl(var(--input))",
|
|
26
|
+
ring: "hsl(var(--ring))",
|
|
27
|
+
background: "hsl(var(--background))",
|
|
28
|
+
foreground: "hsl(var(--foreground))",
|
|
29
|
+
primary: {
|
|
30
|
+
DEFAULT: "hsl(var(--primary))",
|
|
31
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
32
|
+
},
|
|
33
|
+
secondary: {
|
|
34
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
35
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
36
|
+
},
|
|
37
|
+
destructive: {
|
|
38
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
39
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
40
|
+
},
|
|
41
|
+
muted: {
|
|
42
|
+
DEFAULT: "hsl(var(--muted))",
|
|
43
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
44
|
+
},
|
|
45
|
+
accent: {
|
|
46
|
+
DEFAULT: "hsl(var(--accent))",
|
|
47
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
48
|
+
},
|
|
49
|
+
popover: {
|
|
50
|
+
DEFAULT: "hsl(var(--popover))",
|
|
51
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
52
|
+
},
|
|
53
|
+
card: {
|
|
54
|
+
DEFAULT: "hsl(var(--card))",
|
|
55
|
+
foreground: "hsl(var(--card-foreground))",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
borderRadius: {
|
|
59
|
+
lg: "var(--radius)",
|
|
60
|
+
md: "calc(var(--radius) - 2px)",
|
|
61
|
+
sm: "calc(var(--radius) - 4px)",
|
|
62
|
+
},
|
|
63
|
+
keyframes: {
|
|
64
|
+
"accordion-down": {
|
|
65
|
+
from: { height: "0" },
|
|
66
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
67
|
+
},
|
|
68
|
+
"accordion-up": {
|
|
69
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
70
|
+
to: { height: "0" },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
animation: {
|
|
74
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
75
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
plugins: [tailwindcssAnimate],
|
|
80
|
+
} satisfies Config;
|
|
81
|
+
|
|
82
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authdog/react-elements",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"react": "^18.3.1"
|
|
6
|
+
},
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/node": "^20",
|
|
9
|
+
"@types/react": "^18.3.11",
|
|
10
|
+
"autoprefixer": "^10",
|
|
11
|
+
"postcss": "^8",
|
|
12
|
+
"postcss-load-config": "^6",
|
|
13
|
+
"tailwindcss": "3.4.17",
|
|
14
|
+
"typescript": "^5.6.3",
|
|
15
|
+
"@authdog/eslint-config": "0.0.0",
|
|
16
|
+
"@authdog/typescript-config": "0.0.0"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
20
|
+
"class-variance-authority": "^0.7.0",
|
|
21
|
+
"clsx": "^2.1.1",
|
|
22
|
+
"lucide-react": "^0.451.0",
|
|
23
|
+
"tailwind-merge": "^2.3.0",
|
|
24
|
+
"tailwindcss-animate": "^1.0.7"
|
|
25
|
+
},
|
|
9
26
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
27
|
+
".": "./dist/index.js",
|
|
28
|
+
"./global.css": "./dist/global.css",
|
|
29
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
30
|
+
"./tailwind.config": "./tailwind.config.ts",
|
|
31
|
+
"./lib/*": "./dist/lib/*.js",
|
|
32
|
+
"./components/*": "./dist/components/ui/*.js",
|
|
33
|
+
"./tailwind.preset": "./dist/tailwind.preset.js"
|
|
15
34
|
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist/"
|
|
18
|
-
],
|
|
19
35
|
"publishConfig": {
|
|
20
36
|
"registry": "https://registry.npmjs.org/",
|
|
21
37
|
"access": "public"
|
|
22
38
|
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"react": "^18.2.0",
|
|
25
|
-
"@authdog/node-commons": "0.0.21"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.14.1",
|
|
29
|
-
"@types/react": "^18.2.0"
|
|
30
|
-
},
|
|
31
39
|
"scripts": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"build": "pnpm clean && tsup",
|
|
36
|
-
"ship": "pnpm build && pnpm publish --access public --no-git-checks"
|
|
40
|
+
"ui": "pnpm dlx shadcn@latest",
|
|
41
|
+
"lint": "eslint .",
|
|
42
|
+
"build": "pnpm tsup"
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@authdog/react-elements/lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive:
|
|
14
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
15
|
+
outline:
|
|
16
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
secondary:
|
|
18
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "h-10 px-4 py-2",
|
|
24
|
+
sm: "h-9 rounded-md px-3",
|
|
25
|
+
lg: "h-11 rounded-md px-8",
|
|
26
|
+
icon: "h-10 w-10",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export interface ButtonProps
|
|
37
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
38
|
+
VariantProps<typeof buttonVariants> {
|
|
39
|
+
asChild?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
43
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
return (
|
|
46
|
+
<Comp
|
|
47
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
48
|
+
ref={ref}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
);
|
|
54
|
+
Button.displayName = "Button";
|
|
55
|
+
|
|
56
|
+
export { Button, buttonVariants };
|
package/src/global.css
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--background: 0 0% 100%;
|
|
8
|
+
--foreground: 222.2 47.4% 11.2%;
|
|
9
|
+
|
|
10
|
+
--muted: 210 40% 96.1%;
|
|
11
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
12
|
+
|
|
13
|
+
--popover: 0 0% 100%;
|
|
14
|
+
--popover-foreground: 222.2 47.4% 11.2%;
|
|
15
|
+
|
|
16
|
+
--card: 0 0% 100%;
|
|
17
|
+
--card-foreground: 222.2 47.4% 11.2%;
|
|
18
|
+
|
|
19
|
+
--border: 214.3 31.8% 91.4%;
|
|
20
|
+
--input: 214.3 31.8% 91.4%;
|
|
21
|
+
|
|
22
|
+
--primary: 222.2 47.4% 11.2%;
|
|
23
|
+
--primary-foreground: 210 40% 98%;
|
|
24
|
+
|
|
25
|
+
--secondary: 210 40% 96.1%;
|
|
26
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
27
|
+
|
|
28
|
+
--accent: 210 40% 96.1%;
|
|
29
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
30
|
+
|
|
31
|
+
--destructive: 0 100% 50%;
|
|
32
|
+
--destructive-foreground: 210 40% 98%;
|
|
33
|
+
|
|
34
|
+
--ring: 215 20.2% 65.1%;
|
|
35
|
+
|
|
36
|
+
--radius: 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dark {
|
|
40
|
+
--background: 224 71% 4%;
|
|
41
|
+
--foreground: 213 31% 91%;
|
|
42
|
+
|
|
43
|
+
--muted: 223 47% 11%;
|
|
44
|
+
--muted-foreground: 215.4 16.3% 56.9%;
|
|
45
|
+
|
|
46
|
+
--popover: 224 71% 4%;
|
|
47
|
+
--popover-foreground: 215 20.2% 65.1%;
|
|
48
|
+
|
|
49
|
+
--card: 224 71% 4%;
|
|
50
|
+
--card-foreground: 213 31% 91%;
|
|
51
|
+
|
|
52
|
+
--border: 216 34% 17%;
|
|
53
|
+
--input: 216 34% 17%;
|
|
54
|
+
|
|
55
|
+
--primary: 210 40% 98%;
|
|
56
|
+
--primary-foreground: 222.2 47.4% 1.2%;
|
|
57
|
+
|
|
58
|
+
--secondary: 222.2 47.4% 11.2%;
|
|
59
|
+
--secondary-foreground: 210 40% 98%;
|
|
60
|
+
|
|
61
|
+
--accent: 216 34% 17%;
|
|
62
|
+
--accent-foreground: 210 40% 98%;
|
|
63
|
+
|
|
64
|
+
--destructive: 0 63% 31%;
|
|
65
|
+
--destructive-foreground: 210 40% 98%;
|
|
66
|
+
|
|
67
|
+
--ring: 216 34% 17%;
|
|
68
|
+
|
|
69
|
+
--radius: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@layer base {
|
|
74
|
+
* {
|
|
75
|
+
@apply border-border;
|
|
76
|
+
}
|
|
77
|
+
body {
|
|
78
|
+
@apply bg-background text-foreground;
|
|
79
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/ui/button";
|
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
import tailwindcssAnimate from "tailwindcss-animate";
|
|
3
|
+
|
|
4
|
+
const config = {
|
|
5
|
+
darkMode: ["class", ""],
|
|
6
|
+
content: [
|
|
7
|
+
"./pages/**/*.{ts,tsx}",
|
|
8
|
+
"./components/**/*.{ts,tsx}",
|
|
9
|
+
"./components/**/**/*.{ts,tsx}",
|
|
10
|
+
"./app/**/*.{ts,tsx}",
|
|
11
|
+
"./src/**/*.{ts,tsx}"
|
|
12
|
+
],
|
|
13
|
+
prefix: "",
|
|
14
|
+
theme: {
|
|
15
|
+
container: {
|
|
16
|
+
center: true,
|
|
17
|
+
padding: "2rem",
|
|
18
|
+
screens: {
|
|
19
|
+
"2xl": "1400px",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
extend: {
|
|
23
|
+
colors: {
|
|
24
|
+
border: "hsl(var(--border))",
|
|
25
|
+
input: "hsl(var(--input))",
|
|
26
|
+
ring: "hsl(var(--ring))",
|
|
27
|
+
background: "hsl(var(--background))",
|
|
28
|
+
foreground: "hsl(var(--foreground))",
|
|
29
|
+
primary: {
|
|
30
|
+
DEFAULT: "hsl(var(--primary))",
|
|
31
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
32
|
+
},
|
|
33
|
+
secondary: {
|
|
34
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
35
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
36
|
+
},
|
|
37
|
+
destructive: {
|
|
38
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
39
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
40
|
+
},
|
|
41
|
+
muted: {
|
|
42
|
+
DEFAULT: "hsl(var(--muted))",
|
|
43
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
44
|
+
},
|
|
45
|
+
accent: {
|
|
46
|
+
DEFAULT: "hsl(var(--accent))",
|
|
47
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
48
|
+
},
|
|
49
|
+
popover: {
|
|
50
|
+
DEFAULT: "hsl(var(--popover))",
|
|
51
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
52
|
+
},
|
|
53
|
+
card: {
|
|
54
|
+
DEFAULT: "hsl(var(--card))",
|
|
55
|
+
foreground: "hsl(var(--card-foreground))",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
borderRadius: {
|
|
59
|
+
lg: "var(--radius)",
|
|
60
|
+
md: "calc(var(--radius) - 2px)",
|
|
61
|
+
sm: "calc(var(--radius) - 4px)",
|
|
62
|
+
},
|
|
63
|
+
keyframes: {
|
|
64
|
+
"accordion-down": {
|
|
65
|
+
from: { height: "0" },
|
|
66
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
67
|
+
},
|
|
68
|
+
"accordion-up": {
|
|
69
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
70
|
+
to: { height: "0" },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
animation: {
|
|
74
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
75
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
plugins: [tailwindcssAnimate],
|
|
80
|
+
} satisfies Config;
|
|
81
|
+
|
|
82
|
+
export default config;
|
package/tsconfig.json
ADDED
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineConfig } from "tsup";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: [
|
|
5
|
+
"src/index.ts",
|
|
6
|
+
"src/components/ui/*.tsx",
|
|
7
|
+
"src/lib/*.ts"
|
|
8
|
+
], // Build all entry points
|
|
9
|
+
format: ["cjs", "esm"],
|
|
10
|
+
dts: true,
|
|
11
|
+
splitting: false,
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
minify: true,
|
|
14
|
+
clean: true,
|
|
15
|
+
target: "es2020",
|
|
16
|
+
external: ["react", "react-dom"],
|
|
17
|
+
outDir: "dist",
|
|
18
|
+
platform: "browser",
|
|
19
|
+
outExtension: ({ format }) => ({
|
|
20
|
+
js: format === "esm" ? ".mjs" : ".js",
|
|
21
|
+
}),
|
|
22
|
+
onSuccess: "cp src/global.css dist/global.css && cp postcss.config.mjs dist/postcss.config.mjs && cp tailwind.config.ts dist/tailwind.config.ts"
|
|
23
|
+
});
|