@hari_digitus/sms-ui-library 2.0.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.
@@ -0,0 +1,21 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ export declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "save" | "delete" | "update" | "cancel" | "outline" | null | undefined;
5
+ size?: "default" | "icon" | "sm" | "lg" | "xs" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ loading?: boolean;
9
+ leftIcon?: ReactNode;
10
+ rightIcon?: ReactNode;
11
+ iconButton?: boolean;
12
+ tooltipLabel?: string;
13
+ datatestid?: string;
14
+ saveColor?: string;
15
+ deleteColor?: string;
16
+ updateColor?: string;
17
+ cancelColor?: string;
18
+ outlineColor?: string;
19
+ }
20
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
21
+ export { Button };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { buttonVariants } from './Button';
4
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
5
+ loading?: boolean;
6
+ asChild?: boolean;
7
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ExportButtonProps } from "../../components/types/export.types";
3
+ declare const ExportButton: React.FC<ExportButtonProps>;
4
+ export default ExportButton;
@@ -0,0 +1,3 @@
1
+ import { ExportDropdownProps } from "../../components/types/export.types";
2
+ declare const ExportDropdown: ({ items, onExport, onClose, style, }: ExportDropdownProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ExportDropdown;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
5
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ export interface ExportItemConfig {
3
+ type: string;
4
+ label: string;
5
+ icon: React.ReactNode;
6
+ iconClassName?: string;
7
+ textClassName?: string;
8
+ iconWidth?: string;
9
+ iconHeight?: string;
10
+ }
11
+ export interface ExportDropdownProps {
12
+ items: ExportItemConfig[];
13
+ onExport: (type: string) => void;
14
+ onClose: () => void;
15
+ style?: React.CSSProperties;
16
+ }
17
+ export interface ExportButtonProps {
18
+ items: ExportItemConfig[];
19
+ onExport: (type: string) => void;
20
+ buttonIcon?: React.ReactNode;
21
+ className?: string;
22
+ buttonClassName?: string;
23
+ open: boolean;
24
+ setOpen: React.Dispatch<React.SetStateAction<boolean>>;
25
+ }
@@ -0,0 +1,5 @@
1
+ export { Button, buttonVariants } from "./components/Button/Button";
2
+ export type { ButtonProps } from "./components/Button/Button";
3
+ export { cn } from "./lib/utils";
4
+ export { default as ExportButton } from "./components/Button/ExportButton";
5
+ export type { ExportButtonProps, ExportDropdownProps, ExportItemConfig, } from "./components/types/export.types";
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@hari_digitus/sms-ui-library",
3
+ "version": "2.0.0",
4
+ "main": "dist/button.cjs.js",
5
+ "module": "dist/button.es.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/button.es.js",
10
+ "require": "./dist/button.cjs.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "build": "vite build && npx tsc --emitDeclarationOnly",
18
+ "dev": "vite build --watch"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/digitus-git/AFCI_OffAuto/tree/develop_rel_phase1/packages"
23
+
24
+ },
25
+
26
+ "peerDependencies": {
27
+ "react": "^18.3.1",
28
+ "react-dom": "^18.3.1"
29
+ },
30
+ "devDependencies": {
31
+ "@types/react": "18.3.1",
32
+ "@types/react-dom": "18.3.1",
33
+ "@vitejs/plugin-react": "^4.0.0",
34
+ "autoprefixer": "^10.5.0",
35
+ "postcss": "^8.5.15",
36
+ "tailwindcss": "^4.3.0",
37
+ "typescript": "^4.9.5",
38
+ "vite": "^6.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@radix-ui/react-select": "^2.2.6",
42
+ "@radix-ui/react-tooltip": "^1.2.8",
43
+ "class-variance-authority": "^0.7.0",
44
+ "clsx": "2.1.1",
45
+ "lucide-react": "^1.16.0",
46
+ "tailwind-merge": "3.2.0"
47
+ }
48
+ }