@alexandregme/zljs 0.3.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.
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface RootLayoutProps {
5
+ children: ReactNode;
6
+ }
7
+
8
+ declare const RootLayout: ({ children }: RootLayoutProps) => react.JSX.Element;
9
+
10
+ interface NotFoundProps {
11
+ title?: string;
12
+ message?: string;
13
+ backHref?: string;
14
+ }
15
+
16
+ declare const NotFound: ({ title: notFoundTitle, message: notFoundMessage, backHref, }: NotFoundProps) => react.JSX.Element;
17
+
18
+ export { NotFound, RootLayout };
19
+ export type { NotFoundProps, RootLayoutProps };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+
3
+ // core/next/root-layout/root-layout.styles.ts
4
+ import { tv } from "tailwind-variants";
5
+ var body = tv({
6
+ base: "min-h-screen"
7
+ });
8
+
9
+ // core/next/root-layout/root-layout.tsx
10
+ import { jsx } from "react/jsx-runtime";
11
+ var RootLayout = ({ children }) => {
12
+ return /* @__PURE__ */ jsx("main", { className: body(), children });
13
+ };
14
+
15
+ // core/next/not-found/not-found.styles.ts
16
+ import { tv as tv2 } from "tailwind-variants";
17
+ var container = tv2({
18
+ base: "flex flex-col items-center justify-center min-h-screen p-4"
19
+ });
20
+ var code = tv2({
21
+ base: "text-6xl font-bold text-gray-300 mb-4"
22
+ });
23
+ var title = tv2({
24
+ base: "text-2xl font-semibold text-gray-900 mb-2"
25
+ });
26
+ var message = tv2({
27
+ base: "text-gray-600 mb-6 text-center max-w-md"
28
+ });
29
+ var link = tv2({
30
+ base: "text-blue-600 hover:text-blue-700 hover:underline"
31
+ });
32
+
33
+ // core/next/not-found/not-found.tsx
34
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
35
+ var NotFound = ({
36
+ title: notFoundTitle = "Page not found",
37
+ message: notFoundMessage = "The page you are looking for does not exist.",
38
+ backHref = "/"
39
+ }) => {
40
+ return /* @__PURE__ */ jsxs("div", { className: container(), children: [
41
+ /* @__PURE__ */ jsx2("span", { className: code(), children: "404" }),
42
+ /* @__PURE__ */ jsx2("h1", { className: title(), children: notFoundTitle }),
43
+ /* @__PURE__ */ jsx2("p", { className: message(), children: notFoundMessage }),
44
+ /* @__PURE__ */ jsx2("a", { href: backHref, className: link(), children: "Go back home" })
45
+ ] });
46
+ };
47
+ export {
48
+ NotFound,
49
+ RootLayout
50
+ };
@@ -0,0 +1,25 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { FieldValues, DefaultValues, Resolver } from 'react-hook-form';
4
+
5
+ interface FormProviderProps<T extends FieldValues> {
6
+ children: ReactNode;
7
+ onSubmit: (data: T) => void | Promise<void>;
8
+ defaultValues?: DefaultValues<T>;
9
+ resolver?: Resolver<T>;
10
+ }
11
+
12
+ declare const FormProvider: <T extends FieldValues>({ children, onSubmit, defaultValues, resolver, }: FormProviderProps<T>) => react.JSX.Element;
13
+
14
+ interface FormInputProps {
15
+ name: string;
16
+ label: string;
17
+ type?: "text" | "password" | "email";
18
+ placeholder?: string;
19
+ disabled?: boolean;
20
+ }
21
+
22
+ declare const FormInput: ({ name, label, type, placeholder, disabled, }: FormInputProps) => react.JSX.Element;
23
+
24
+ export { FormInput, FormProvider };
25
+ export type { FormInputProps, FormProviderProps };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ FormInput,
4
+ FormProvider
5
+ } from "../chunk-WAQLH7A5.js";
6
+ export {
7
+ FormInput,
8
+ FormProvider
9
+ };
@@ -0,0 +1,50 @@
1
+ /* Global Scrollbar */
2
+ ::-webkit-scrollbar {
3
+ width: 4px;
4
+ }
5
+
6
+ ::-webkit-scrollbar-track {
7
+ background: transparent;
8
+ }
9
+
10
+ ::-webkit-scrollbar-thumb {
11
+ background-color: rgba(228, 231, 234, 0.5);
12
+ border-radius: 2px;
13
+ }
14
+
15
+ ::-webkit-scrollbar-thumb:hover {
16
+ background-color: rgba(156, 163, 175, 0.75);
17
+ }
18
+
19
+ /* AG Grid Custom Styles */
20
+ .ag-theme-alpine {
21
+ --ag-header-background-color: #f8fafc;
22
+ --ag-header-foreground-color: #334155;
23
+ --ag-header-cell-hover-background-color: #e2e8f0;
24
+ --ag-odd-row-background-color: #f8fafc;
25
+ --ag-row-hover-color: #e0f2fe;
26
+ --ag-selected-row-background-color: #dbeafe;
27
+ --ag-border-color: #e2e8f0;
28
+ --ag-font-family: inherit;
29
+ --ag-font-size: 14px;
30
+ }
31
+
32
+ .ag-theme-alpine .ag-header-cell {
33
+ font-weight: 600;
34
+ text-transform: uppercase;
35
+ font-size: 12px;
36
+ letter-spacing: 0.05em;
37
+ border-right: 1px solid #475569;
38
+ }
39
+
40
+ .ag-theme-alpine .ag-header-cell:last-child {
41
+ border-right: none;
42
+ }
43
+
44
+ .ag-theme-alpine .ag-row {
45
+ border-bottom: 1px solid #f1f5f9;
46
+ }
47
+
48
+ .ag-theme-alpine .ag-row:hover {
49
+ background-color: var(--ag-row-hover-color);
50
+ }
package/package.json ADDED
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "@alexandregme/zljs",
3
+ "version": "0.3.1",
4
+ "description": "Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).",
5
+ "keywords": [
6
+ "react",
7
+ "nextjs",
8
+ "components",
9
+ "ui",
10
+ "tailwindcss",
11
+ "design-system"
12
+ ],
13
+ "license": "MIT",
14
+ "author": "Alexandre Mendes",
15
+ "homepage": "https://zljs.vercel.app",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/alexandregme/zljs.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/alexandregme/zljs/issues"
22
+ },
23
+ "type": "module",
24
+ "packageManager": "pnpm@11.9.0",
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js"
32
+ },
33
+ "./next": {
34
+ "types": "./dist/next/index.d.ts",
35
+ "import": "./dist/next/index.js"
36
+ },
37
+ "./rhf": {
38
+ "types": "./dist/rhf/index.d.ts",
39
+ "import": "./dist/rhf/index.js"
40
+ },
41
+ "./styles.css": "./dist/styles.css",
42
+ "./package.json": "./package.json"
43
+ },
44
+ "files": [
45
+ "dist"
46
+ ],
47
+ "sideEffects": [
48
+ "*.css"
49
+ ],
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "scripts": {
54
+ "test": "vitest run --coverage",
55
+ "lint": "tsc --noEmit && eslint . && prettier --check .",
56
+ "lint:fix": "eslint . --fix && prettier --write .",
57
+ "build": "storybook build",
58
+ "storybook": "storybook dev -p 6006",
59
+ "test:watch": "vitest --coverage",
60
+ "test:coverage": "vitest run --coverage",
61
+ "eslint": "eslint ./ --color --fix",
62
+ "prettier": "prettier --write .",
63
+ "stylelint": "stylelint '**/*.{css,scss}' --allow-empty-input",
64
+ "fresh": "rm -rf node_modules && rm -f pnpm-lock.yaml && pnpm install",
65
+ "prepare": "husky",
66
+ "agent:dev": "pnpm --filter @zljs/agent dev",
67
+ "build:lib": "tsup",
68
+ "prepublishOnly": "pnpm build:lib"
69
+ },
70
+ "dependencies": {
71
+ "@hookform/resolvers": "^5.2.2",
72
+ "@radix-ui/react-dialog": "^1.1.15",
73
+ "ag-grid-community": "^35.0.0",
74
+ "ag-grid-react": "^35.0.0",
75
+ "axios": "^1.13.5",
76
+ "lucide-react": "^0.563.0",
77
+ "react-hook-form": "^7.70.0",
78
+ "react-icons": "^5.5.0",
79
+ "sonner": "^2.0.7",
80
+ "tailwind-merge": "^3.4.0",
81
+ "tailwind-variants": "^3.2.2",
82
+ "zod": "^4.3.5",
83
+ "zustand": "^5.0.11"
84
+ },
85
+ "devDependencies": {
86
+ "@commitlint/cli": "^20.2.0",
87
+ "@commitlint/config-conventional": "^20.2.0",
88
+ "@eslint/js": "^9.39.1",
89
+ "@storybook/react-vite": "^10.2.8",
90
+ "@tailwindcss/vite": "^4.1.18",
91
+ "@testing-library/jest-dom": "^6.9.1",
92
+ "@testing-library/react": "^16.3.0",
93
+ "@types/react": "^19.2.7",
94
+ "@types/react-dom": "^19.2.3",
95
+ "@vitest/coverage-v8": "^4.0.18",
96
+ "autoprefixer": "^10.4.23",
97
+ "eslint": "^9.39.1",
98
+ "eslint-plugin-storybook": "10.1.11",
99
+ "globals": "^16.5.0",
100
+ "husky": "^9.1.7",
101
+ "jsdom": "^28.0.0",
102
+ "lint-staged": "^16.2.7",
103
+ "next": "^16.1.6",
104
+ "postcss": "^8.5.6",
105
+ "prettier": "^3.7.4",
106
+ "react": "^19.2.1",
107
+ "react-dom": "^19.2.1",
108
+ "storybook": "^10.4.6",
109
+ "stylelint": "^16.26.1",
110
+ "tailwindcss": "^4.1.18",
111
+ "tsup": "^9.0.0",
112
+ "typescript": "^5.9.3",
113
+ "typescript-eslint": "^8.49.0",
114
+ "vite": "^7.2.7",
115
+ "vitest": "^4.0.18"
116
+ },
117
+ "peerDependencies": {
118
+ "@reduxjs/toolkit": "^2.0.0",
119
+ "next": ">=16.0.0",
120
+ "next-auth": "^4.0.0",
121
+ "react": "^19.0.0",
122
+ "react-dom": "^19.0.0",
123
+ "react-redux": "^9.0.0"
124
+ },
125
+ "lint-staged": {
126
+ "*.{ts,tsx,js,json,md}": "pnpm lint"
127
+ }
128
+ }