@lgsm/modules 1.0.2 → 1.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.
@@ -0,0 +1,8 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ declare const apiService: {
3
+ get: (url: string, config?: AxiosRequestConfig) => Promise<import('axios').AxiosResponse<any, any, {}>>;
4
+ post: (url: string, payload: any, config?: AxiosRequestConfig) => Promise<import('axios').AxiosResponse<any, any, {}>>;
5
+ patch: (url: string, payload: any, config?: AxiosRequestConfig) => Promise<import('axios').AxiosResponse<any, any, {}>>;
6
+ delete: (url: string, config?: AxiosRequestConfig) => Promise<import('axios').AxiosResponse<any, any, {}>>;
7
+ };
8
+ export default apiService;
@@ -0,0 +1,4 @@
1
+ import { AxiosInstance } from 'axios';
2
+ declare let axiosInstance: AxiosInstance;
3
+ export declare function setupBaseURL(baseUrl: string): void;
4
+ export { axiosInstance };
@@ -0,0 +1,9 @@
1
+ import { JSX } from 'react';
2
+ interface ComponentProps extends React.ComponentProps<'button'> {
3
+ primary: boolean;
4
+ size?: 'small' | 'medium' | 'large';
5
+ label: string;
6
+ icon?: JSX.Element;
7
+ }
8
+ export declare function Button({ primary, size, label, icon, ...props }: ComponentProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function NotificationContainer(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ interface ComponentProps {
2
+ type?: string;
3
+ title: string;
4
+ message: string;
5
+ onClose: () => void;
6
+ duration?: number;
7
+ }
8
+ export declare function Notification({ type, title, message, onClose, duration }: ComponentProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ThreeDotsLoader: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const ButtonLib: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { ButtonLib, buttonVariants };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@lgsm/modules",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "build": "tsc && vite build",
6
+ "build": "vite build",
7
7
  "lint": "eslint . --ext ts,tsx",
8
8
  "lint:fix": "eslint . --ext ts,tsx --fix",
9
9
  "format": "prettier --check .",
@@ -15,7 +15,7 @@
15
15
  "test": "vitest",
16
16
  "test:ui": "vitest --ui",
17
17
  "coverage": "vitest run --coverage",
18
- "prepublishOnly": "vitest run && npm run build"
18
+ "prepublishOnly": "npm run build"
19
19
  },
20
20
  "module": "./dist/main.js",
21
21
  "exports": "./dist/main.js",
@@ -39,14 +39,14 @@
39
39
  "@storybook/react-vite": "8.6.3",
40
40
  "@storybook/test": "8.6.3",
41
41
  "@testing-library/react": "16.2.0",
42
- "@types/node": "22.13.8",
42
+ "@types/node": "^22.13.8",
43
43
  "@types/react": "19.0.10",
44
44
  "@types/react-dom": "19.0.4",
45
45
  "@vitejs/plugin-react": "4.3.4",
46
46
  "@vitest/coverage-v8": "3.0.7",
47
47
  "@vitest/ui": "3.0.7",
48
48
  "autoprefixer": "10.4.20",
49
- "clsx": "2.1.1",
49
+ "clsx": "^2.1.1",
50
50
  "eslint": "9.21.0",
51
51
  "eslint-config-prettier": "10.0.2",
52
52
  "eslint-plugin-react-hooks": "5.2.0",
@@ -59,11 +59,23 @@
59
59
  "storybook": "8.6.3",
60
60
  "stylelint": "16.15.0",
61
61
  "stylelint-config-standard": "37.0.0",
62
+ "tailwindcss": "^4.1.13",
63
+ "tw-animate-css": "^1.3.8",
62
64
  "typescript": "5.7.3",
63
65
  "typescript-eslint": "8.25.0",
64
66
  "vite": "6.2.0",
65
67
  "vite-plugin-dts": "4.5.1",
66
68
  "vite-plugin-lib-inject-css": "2.2.1",
67
69
  "vitest": "3.0.7"
70
+ },
71
+ "dependencies": {
72
+ "@radix-ui/react-slot": "^1.2.3",
73
+ "@tailwindcss/vite": "^4.1.13",
74
+ "axios": "^1.12.2",
75
+ "class-variance-authority": "^0.7.1",
76
+ "lucide-react": "^0.544.0",
77
+ "tailwind-merge": "^3.3.1",
78
+ "tailwindcss-animate": "^1.0.7",
79
+ "zustand": "^5.0.8"
68
80
  }
69
81
  }
@@ -1 +0,0 @@
1
- ._title_izbg1_1{--color: black;color:var(--color)}._title--primary_izbg1_13{--color: crimson}
@@ -1 +0,0 @@
1
- ._container_rjlrw_1{text-align:center;font-family:system-ui}._text_rjlrw_11{font-size:1.5rem;margin-bottom:10px}
@@ -1 +0,0 @@
1
- ._button_31ovf_1{--bg-color: none;background-color:var(--bg-color);border-radius:6px}._button--primary_31ovf_15{--bg-color: crimson;-webkit-backdrop-filter:sepia(90%);backdrop-filter:sepia(90%)}._button--small_31ovf_27{font-size:1rem;padding:.4rem .6rem}._button--medium_31ovf_37{font-size:1.2rem;padding:.6rem .8rem}._button--large_31ovf_47{font-size:1.4rem;padding:.8rem 1rem}
@@ -1,16 +0,0 @@
1
- function a(r) {
2
- var f, n, t = "";
3
- if (typeof r == "string" || typeof r == "number") t += r;
4
- else if (typeof r == "object") if (Array.isArray(r)) {
5
- var o = r.length;
6
- for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
7
- } else for (n in r) r[n] && (t && (t += " "), t += n);
8
- return t;
9
- }
10
- function i() {
11
- for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
12
- return t;
13
- }
14
- export {
15
- i as c
16
- };
@@ -1,7 +0,0 @@
1
- interface ComponentProps extends React.ComponentProps<'button'> {
2
- primary?: boolean;
3
- size?: 'small' | 'medium' | 'large';
4
- label: string;
5
- }
6
- export declare function MyButton({ primary, size, label, ...props }: ComponentProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,27 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { c as _ } from "../../clsx-OuTLNxxd.js";
3
- import '../../assets/index3.css';const s = "_button_31ovf_1", t = {
4
- button: s,
5
- "button--primary": "_button--primary_31ovf_15",
6
- "button--small": "_button--small_31ovf_27",
7
- "button--medium": "_button--medium_31ovf_37",
8
- "button--large": "_button--large_31ovf_47"
9
- };
10
- function a({ primary: n = !1, size: o = "medium", label: u, ...b }) {
11
- const m = _(t.button, {
12
- [t["button--primary"]]: n,
13
- [t[`button--${o}`]]: o
14
- });
15
- return /* @__PURE__ */ r(
16
- "button",
17
- {
18
- type: "button",
19
- className: m,
20
- ...b,
21
- children: u
22
- }
23
- );
24
- }
25
- export {
26
- a as MyButton
27
- };
@@ -1,54 +0,0 @@
1
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { useState as f } from "react";
3
- import { MyButton as r } from "../MyButton/index.js";
4
- import '../../assets/index2.css';const y = "_container_rjlrw_1", C = "_text_rjlrw_11", m = {
5
- container: y,
6
- text: C
7
- };
8
- function h({
9
- initialValue: c = 0,
10
- step: s = 1,
11
- min: i = -1 / 0,
12
- max: l = 1 / 0
13
- }) {
14
- const [t, e] = f(c), u = () => {
15
- e((n) => Math.min(n + s, l));
16
- }, d = () => {
17
- e((n) => Math.max(n - s, i));
18
- }, x = () => {
19
- e(c);
20
- };
21
- return /* @__PURE__ */ a("section", { className: m.container, children: [
22
- /* @__PURE__ */ a("p", { className: m.text, children: [
23
- "Count: ",
24
- t
25
- ] }),
26
- /* @__PURE__ */ o(
27
- r,
28
- {
29
- label: "Increment",
30
- onClick: u,
31
- disabled: t >= l
32
- }
33
- ),
34
- /* @__PURE__ */ o(
35
- r,
36
- {
37
- label: "Decrement",
38
- onClick: d,
39
- disabled: t <= i
40
- }
41
- ),
42
- /* @__PURE__ */ o(
43
- r,
44
- {
45
- label: "Reset",
46
- onClick: x,
47
- primary: !0
48
- }
49
- )
50
- ] });
51
- }
52
- export {
53
- h as MyCounter
54
- };
@@ -1,22 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { c as o } from "../../clsx-OuTLNxxd.js";
3
- import '../../assets/index.css';const c = "_title_izbg1_1", t = {
4
- title: c,
5
- "title--primary": "_title--primary_izbg1_13"
6
- };
7
- function n({ primary: i = !1, title: e, ...l }) {
8
- const r = o(t.title, {
9
- [t["title--primary"]]: i
10
- });
11
- return /* @__PURE__ */ s(
12
- "h1",
13
- {
14
- className: r,
15
- ...l,
16
- children: e
17
- }
18
- );
19
- }
20
- export {
21
- n as MyTitle
22
- };