@flaqai/ui-flaq 0.2.0
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 +3 -0
- package/dist/index.d.mts +27 -0
- package/dist/index.mjs +1 -0
- package/dist/styles.css +48 -0
- package/package.json +53 -0
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Dialog as Dialog$1 } from "radix-ui";
|
|
3
|
+
import { ClassValue } from "clsx";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
5
|
+
//#region src/components/button.d.ts
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
8
|
+
variant?: "default" | "outline" | "secondary" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
type ButtonProps = ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function Button({ asChild, className, size, variant, ...props }: ButtonProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/dialog.d.ts
|
|
16
|
+
declare const Dialog: import("react").FC<Dialog$1.DialogProps>;
|
|
17
|
+
declare const DialogClose: import("react").ForwardRefExoticComponent<Dialog$1.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
declare const DialogDescription: import("react").ForwardRefExoticComponent<Dialog$1.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
declare const DialogTitle: import("react").ForwardRefExoticComponent<Dialog$1.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogTrigger: import("react").ForwardRefExoticComponent<Dialog$1.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
declare function DialogContent({ className, children, ...props }: ComponentProps<typeof Dialog$1.Content>): import("react").JSX.Element;
|
|
22
|
+
declare function DialogHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/lib/utils.d.ts
|
|
25
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, buttonVariants, cn };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cva as e}from"class-variance-authority";import{Dialog as t,Slot as n}from"radix-ui";import{clsx as r}from"clsx";import{twMerge as i}from"tailwind-merge";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{X as s}from"lucide-react";function c(...e){return i(r(e))}const l=e(`inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{default:`h-10 px-4 py-2`,lg:`h-11 px-8`,sm:`h-9 rounded-md px-3`},variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`}}});function u({asChild:e=!1,className:t,size:r,variant:i,...o}){return a(e?n.Root:`button`,{className:c(l({className:t,size:r,variant:i})),"data-slot":`button`,...o})}const d=t.Root,f=t.Close,p=t.Description,m=t.Title,h=t.Trigger;function g({className:e,...n}){return a(t.Overlay,{className:c(`fixed inset-0 z-50 bg-black/80`,e),"data-slot":`dialog-overlay`,...n})}function _({className:e,children:n,...r}){return o(t.Portal,{children:[a(g,{}),o(t.Content,{className:c(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg sm:rounded-lg`,e),"data-slot":`dialog-content`,...r,children:[n,o(t.Close,{className:`absolute top-4 right-4 rounded-sm opacity-70 hover:opacity-100 focus:ring-2 focus:ring-ring focus:outline-none`,children:[a(s,{className:`size-4`}),a(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function v({className:e,...t}){return a(`div`,{className:c(`flex flex-col space-y-1.5 text-center sm:text-left`,e),"data-slot":`dialog-header`,...t})}export{u as Button,d as Dialog,f as DialogClose,_ as DialogContent,p as DialogDescription,v as DialogHeader,m as DialogTitle,h as DialogTrigger,l as buttonVariants,c as cn};
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
|
|
4
|
+
@source "./*.mjs";
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--background: oklch(1 0 0);
|
|
10
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
11
|
+
--primary: oklch(0.21 0.006 285.885);
|
|
12
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
13
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
14
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
15
|
+
--accent: oklch(0.967 0.001 286.375);
|
|
16
|
+
--accent-foreground: oklch(0.21 0.006 285.885);
|
|
17
|
+
--border: oklch(0.92 0.004 286.32);
|
|
18
|
+
--input: oklch(0.92 0.004 286.32);
|
|
19
|
+
--ring: oklch(0.705 0.015 286.067);
|
|
20
|
+
--radius: 0.625rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@theme inline {
|
|
24
|
+
--color-accent: var(--accent);
|
|
25
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
26
|
+
--color-background: var(--background);
|
|
27
|
+
--color-border: var(--border);
|
|
28
|
+
--color-foreground: var(--foreground);
|
|
29
|
+
--color-input: var(--input);
|
|
30
|
+
--color-primary: var(--primary);
|
|
31
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
32
|
+
--color-ring: var(--ring);
|
|
33
|
+
--color-secondary: var(--secondary);
|
|
34
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
35
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
36
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
37
|
+
--radius-lg: var(--radius);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@layer base {
|
|
41
|
+
* {
|
|
42
|
+
@apply border-border;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body {
|
|
46
|
+
@apply bg-background text-foreground antialiased;
|
|
47
|
+
}
|
|
48
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flaqai/ui-flaq",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Reusable Flaq product UI components and design tokens.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/flaqai/flaq_root.git",
|
|
8
|
+
"directory": "packages/ui-flaq"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"./dist/styles.css"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.mts",
|
|
20
|
+
"import": "./dist/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./styles.css": "./dist/styles.css"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"class-variance-authority": "0.7.1",
|
|
29
|
+
"clsx": "2.1.1",
|
|
30
|
+
"lucide-react": "1.24.0",
|
|
31
|
+
"radix-ui": "1.6.2",
|
|
32
|
+
"tailwind-merge": "3.6.0",
|
|
33
|
+
"tw-animate-css": "1.4.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/react": "19.2.17",
|
|
37
|
+
"@types/react-dom": "19.2.3",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
39
|
+
"react": "19.2.7",
|
|
40
|
+
"react-dom": "19.2.7",
|
|
41
|
+
"tailwindcss": "4.3.2",
|
|
42
|
+
"tsdown": "0.22.7",
|
|
43
|
+
"typescript": "7.0.2"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^19.2.0",
|
|
47
|
+
"react-dom": "^19.2.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsdown && tsx ../../scripts/copy-ui-css.ts",
|
|
51
|
+
"typecheck": "tsgo --noEmit -p tsconfig.json"
|
|
52
|
+
}
|
|
53
|
+
}
|