@axzydev/axzy_ui_system 1.0.159 → 1.0.161
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 +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -4
- 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
|
@@ -2911,7 +2911,7 @@ var formatCurrencyMX = (value) => {
|
|
|
2911
2911
|
};
|
|
2912
2912
|
function ITTable({
|
|
2913
2913
|
columns,
|
|
2914
|
-
data,
|
|
2914
|
+
data = [],
|
|
2915
2915
|
containerClassName,
|
|
2916
2916
|
className,
|
|
2917
2917
|
variant = "default",
|
|
@@ -2925,8 +2925,9 @@ function ITTable({
|
|
|
2925
2925
|
const [filters, setFilters] = (0, import_react16.useState)({});
|
|
2926
2926
|
const [sortConfig, setSortConfig] = (0, import_react16.useState)(null);
|
|
2927
2927
|
const sortedData = import_react16.default.useMemo(() => {
|
|
2928
|
-
|
|
2929
|
-
|
|
2928
|
+
const safeData = Array.isArray(data) ? data : [];
|
|
2929
|
+
if (!sortConfig) return safeData;
|
|
2930
|
+
return [...safeData].sort((a, b) => {
|
|
2930
2931
|
const aValue = getNestedValue(a, sortConfig.key);
|
|
2931
2932
|
const bValue = getNestedValue(b, sortConfig.key);
|
|
2932
2933
|
if (aValue == null || bValue == null) return 0;
|
|
@@ -4648,9 +4649,18 @@ var import_react25 = require("react");
|
|
|
4648
4649
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4649
4650
|
function ITThemeProvider({ theme: theme2, children }) {
|
|
4650
4651
|
const activeThemeContext = (0, import_react25.useMemo)(() => {
|
|
4652
|
+
const baseColors = {
|
|
4653
|
+
primary: palette.blue,
|
|
4654
|
+
secondary: palette.gray,
|
|
4655
|
+
success: palette.success,
|
|
4656
|
+
danger: palette.danger,
|
|
4657
|
+
warning: palette.warning,
|
|
4658
|
+
info: palette.cyan,
|
|
4659
|
+
purple: palette.purple
|
|
4660
|
+
};
|
|
4651
4661
|
return {
|
|
4652
4662
|
colors: {
|
|
4653
|
-
...
|
|
4663
|
+
...baseColors,
|
|
4654
4664
|
...theme2?.colors
|
|
4655
4665
|
},
|
|
4656
4666
|
layout: {
|