@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/dist/index.js CHANGED
@@ -2876,7 +2876,7 @@ var formatCurrencyMX = (value) => {
2876
2876
  };
2877
2877
  function ITTable({
2878
2878
  columns,
2879
- data,
2879
+ data = [],
2880
2880
  containerClassName,
2881
2881
  className,
2882
2882
  variant = "default",
@@ -2890,8 +2890,9 @@ function ITTable({
2890
2890
  const [filters, setFilters] = useState12({});
2891
2891
  const [sortConfig, setSortConfig] = useState12(null);
2892
2892
  const sortedData = React7.useMemo(() => {
2893
- if (!sortConfig) return data;
2894
- return [...data].sort((a, b) => {
2893
+ const safeData = Array.isArray(data) ? data : [];
2894
+ if (!sortConfig) return safeData;
2895
+ return [...safeData].sort((a, b) => {
2895
2896
  const aValue = getNestedValue(a, sortConfig.key);
2896
2897
  const bValue = getNestedValue(b, sortConfig.key);
2897
2898
  if (aValue == null || bValue == null) return 0;
@@ -4613,9 +4614,18 @@ import { useMemo as useMemo4 } from "react";
4613
4614
  import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
4614
4615
  function ITThemeProvider({ theme: theme2, children }) {
4615
4616
  const activeThemeContext = useMemo4(() => {
4617
+ const baseColors = {
4618
+ primary: palette.blue,
4619
+ secondary: palette.gray,
4620
+ success: palette.success,
4621
+ danger: palette.danger,
4622
+ warning: palette.warning,
4623
+ info: palette.cyan,
4624
+ purple: palette.purple
4625
+ };
4616
4626
  return {
4617
4627
  colors: {
4618
- ...theme.colors,
4628
+ ...baseColors,
4619
4629
  ...theme2?.colors
4620
4630
  },
4621
4631
  layout: {