@axzydev/axzy_ui_system 1.0.159 → 1.0.160

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 CHANGED
@@ -1,50 +1,74 @@
1
- # React + TypeScript + Vite
1
+ # AXZY UI System
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ A modern, enterprise-ready React component library powered by Tailwind CSS. Built specifically for high-density data applications, hospital management software, and complex dashboards.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## Installation
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+ ```bash
8
+ npm install @axzydev/axzy_ui_system
9
+ ```
9
10
 
10
- ## Expanding the ESLint configuration
11
+ ## Basic Setup
11
12
 
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+ Then, you must tell your own `tailwind.config.ts` to scan the library for its dynamic classes:
13
14
 
14
- - Configure the top-level `parserOptions` property like this:
15
+ ```ts
16
+ // tailwind.config.ts
17
+ import type { Config } from 'tailwindcss'
15
18
 
16
- ```js
17
- export default tseslint.config({
18
- languageOptions: {
19
- // other options...
20
- parserOptions: {
21
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
- tsconfigRootDir: import.meta.dirname,
23
- },
19
+ export default {
20
+ content: [
21
+ "./index.html",
22
+ "./src/**/*.{js,ts,jsx,tsx}",
23
+ "./node_modules/@axzydev/axzy_ui_system/dist/**/*.{js,ts,jsx,tsx}" // <--- ADD THIS LINE
24
+ ],
25
+ theme: {
26
+ extend: {},
24
27
  },
25
- })
28
+ plugins: [],
29
+ }
26
30
  ```
27
31
 
28
- - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
- - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
32
+ ---
31
33
 
32
- ```js
33
- // eslint.config.js
34
- import react from 'eslint-plugin-react'
34
+ ## Dynamic Theming (ITThemeProvider)
35
35
 
36
- export default tseslint.config({
37
- // Set the react version
38
- settings: { react: { version: '18.3' } },
39
- plugins: {
40
- // Add the react plugin
41
- react,
42
- },
43
- rules: {
44
- // other rules...
45
- // Enable its recommended rules
46
- ...react.configs.recommended.rules,
47
- ...react.configs['jsx-runtime'].rules,
48
- },
49
- })
36
+ `AXZY_UI_SYSTEM` uses a powerful CSS Variables engine under the hood. You can override the entire color palette of all components instantly without recompiling the library by using the `<ITThemeProvider>`.
37
+
38
+ Wrap your application root with the provider and pass your custom brand JSON object:
39
+
40
+ ```tsx
41
+ import React from 'react';
42
+ import { ITThemeProvider } from '@axzydev/axzy_ui_system';
43
+ import App from './App';
44
+
45
+ // Define your custom brand palette mapping
46
+ const myEnterpriseTheme = {
47
+ colors: {
48
+ primary: {
49
+ 50: "#fef2f2",
50
+ 100: "#fee2e2",
51
+ 200: "#fecaca",
52
+ 300: "#fca5a5",
53
+ 400: "#f87171",
54
+ 500: "#ef4444", // Your Main Brand Color
55
+ 600: "#dc2626",
56
+ 700: "#b91c1c",
57
+ 800: "#991b1b",
58
+ 900: "#7f1d1d",
59
+ 950: "#450a0a",
60
+ },
61
+ // You can optionally override secondary, success, danger, warning, purple, info
62
+ }
63
+ };
64
+
65
+ export default function Main() {
66
+ return (
67
+ <ITThemeProvider theme={myEnterpriseTheme}>
68
+ <App />
69
+ </ITThemeProvider>
70
+ );
71
+ }
50
72
  ```
73
+
74
+ > **Note:** You do not need to provide all colors. Only provide the scales (e.g., `primary`) that you wish to override. Unprovided scales will gracefully fallback to the default AXZY palette.
package/dist/index.cjs CHANGED
@@ -4648,9 +4648,18 @@ var import_react25 = require("react");
4648
4648
  var import_jsx_runtime27 = require("react/jsx-runtime");
4649
4649
  function ITThemeProvider({ theme: theme2, children }) {
4650
4650
  const activeThemeContext = (0, import_react25.useMemo)(() => {
4651
+ const baseColors = {
4652
+ primary: palette.blue,
4653
+ secondary: palette.gray,
4654
+ success: palette.success,
4655
+ danger: palette.danger,
4656
+ warning: palette.warning,
4657
+ info: palette.cyan,
4658
+ purple: palette.purple
4659
+ };
4651
4660
  return {
4652
4661
  colors: {
4653
- ...theme.colors,
4662
+ ...baseColors,
4654
4663
  ...theme2?.colors
4655
4664
  },
4656
4665
  layout: {