@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 +61 -37
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,50 +1,74 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AXZY UI System
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @axzydev/axzy_ui_system
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Basic Setup
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Then, you must tell your own `tailwind.config.ts` to scan the library for its dynamic classes:
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
```ts
|
|
16
|
+
// tailwind.config.ts
|
|
17
|
+
import type { Config } from 'tailwindcss'
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
|
|
33
|
-
// eslint.config.js
|
|
34
|
-
import react from 'eslint-plugin-react'
|
|
34
|
+
## Dynamic Theming (ITThemeProvider)
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
...
|
|
4662
|
+
...baseColors,
|
|
4654
4663
|
...theme2?.colors
|
|
4655
4664
|
},
|
|
4656
4665
|
layout: {
|