@axzydev/axzy_ui_system 1.2.3 → 1.2.4
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.cjs +98 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +98 -87
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/layout/layout.tsx +2 -1
- package/src/components/page/page.props.ts +2 -0
- package/src/components/page/page.tsx +52 -47
- package/src/components/page-header/page-header.tsx +1 -2
package/dist/index.d.cts
CHANGED
|
@@ -812,6 +812,8 @@ interface ITPageProps {
|
|
|
812
812
|
backAction?: () => void;
|
|
813
813
|
loading?: boolean;
|
|
814
814
|
error?: string | null;
|
|
815
|
+
errorTitle?: string;
|
|
816
|
+
errorActionLabel?: string;
|
|
815
817
|
onRetry?: () => void;
|
|
816
818
|
empty?: boolean;
|
|
817
819
|
emptyTitle?: string;
|
|
@@ -821,7 +823,7 @@ interface ITPageProps {
|
|
|
821
823
|
children: ReactNode;
|
|
822
824
|
}
|
|
823
825
|
|
|
824
|
-
declare function ITPage(
|
|
826
|
+
declare function ITPage(props: ITPageProps): react_jsx_runtime.JSX.Element;
|
|
825
827
|
|
|
826
828
|
interface ITPageHeaderProps {
|
|
827
829
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -812,6 +812,8 @@ interface ITPageProps {
|
|
|
812
812
|
backAction?: () => void;
|
|
813
813
|
loading?: boolean;
|
|
814
814
|
error?: string | null;
|
|
815
|
+
errorTitle?: string;
|
|
816
|
+
errorActionLabel?: string;
|
|
815
817
|
onRetry?: () => void;
|
|
816
818
|
empty?: boolean;
|
|
817
819
|
emptyTitle?: string;
|
|
@@ -821,7 +823,7 @@ interface ITPageProps {
|
|
|
821
823
|
children: ReactNode;
|
|
822
824
|
}
|
|
823
825
|
|
|
824
|
-
declare function ITPage(
|
|
826
|
+
declare function ITPage(props: ITPageProps): react_jsx_runtime.JSX.Element;
|
|
825
827
|
|
|
826
828
|
interface ITPageHeaderProps {
|
|
827
829
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -6579,10 +6579,9 @@ function ITNavbar({
|
|
|
6579
6579
|
}
|
|
6580
6580
|
|
|
6581
6581
|
// src/components/page/page.tsx
|
|
6582
|
-
import
|
|
6582
|
+
import clsx28 from "clsx";
|
|
6583
6583
|
|
|
6584
6584
|
// src/components/page-header/page-header.tsx
|
|
6585
|
-
import clsx26 from "clsx";
|
|
6586
6585
|
import { FaChevronLeft as FaChevronLeft3 } from "react-icons/fa";
|
|
6587
6586
|
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6588
6587
|
function ITPageHeader({
|
|
@@ -6594,7 +6593,7 @@ function ITPageHeader({
|
|
|
6594
6593
|
className
|
|
6595
6594
|
}) {
|
|
6596
6595
|
const showTopRow = breadcrumbs?.length || backAction;
|
|
6597
|
-
return /* @__PURE__ */ jsxs25("div", { className
|
|
6596
|
+
return /* @__PURE__ */ jsxs25("div", { className, children: [
|
|
6598
6597
|
showTopRow && /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
|
|
6599
6598
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6600
6599
|
backAction && /* @__PURE__ */ jsx33(
|
|
@@ -6621,7 +6620,7 @@ function ITPageHeader({
|
|
|
6621
6620
|
}
|
|
6622
6621
|
|
|
6623
6622
|
// src/components/skeleton/skeleton.tsx
|
|
6624
|
-
import
|
|
6623
|
+
import clsx26 from "clsx";
|
|
6625
6624
|
import { Fragment as Fragment6, jsx as jsx34 } from "react/jsx-runtime";
|
|
6626
6625
|
var variantClasses = {
|
|
6627
6626
|
text: "rounded-md h-4 w-full",
|
|
@@ -6645,7 +6644,7 @@ function ITSkeleton({
|
|
|
6645
6644
|
return /* @__PURE__ */ jsx34(Fragment6, { children: items.map((i) => /* @__PURE__ */ jsx34(
|
|
6646
6645
|
"div",
|
|
6647
6646
|
{
|
|
6648
|
-
className:
|
|
6647
|
+
className: clsx26(
|
|
6649
6648
|
"animate-pulse bg-slate-200 dark:bg-slate-700",
|
|
6650
6649
|
variantClasses[variant],
|
|
6651
6650
|
variant === "text" && count > 1 && i < count - 1 && "mb-2",
|
|
@@ -6661,7 +6660,7 @@ function ITSkeleton({
|
|
|
6661
6660
|
}
|
|
6662
6661
|
|
|
6663
6662
|
// src/components/stack/stack.tsx
|
|
6664
|
-
import
|
|
6663
|
+
import clsx27 from "clsx";
|
|
6665
6664
|
import { Children, cloneElement, isValidElement, Fragment as Fragment7 } from "react";
|
|
6666
6665
|
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6667
6666
|
var directionMap2 = {
|
|
@@ -6711,7 +6710,7 @@ function ITStack({
|
|
|
6711
6710
|
return /* @__PURE__ */ jsx35(
|
|
6712
6711
|
Component,
|
|
6713
6712
|
{
|
|
6714
|
-
className:
|
|
6713
|
+
className: clsx27(
|
|
6715
6714
|
"flex",
|
|
6716
6715
|
directionMap2[direction],
|
|
6717
6716
|
alignItems && alignMap2[alignItems],
|
|
@@ -6730,48 +6729,68 @@ function ITStack({
|
|
|
6730
6729
|
|
|
6731
6730
|
// src/components/page/page.tsx
|
|
6732
6731
|
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6732
|
+
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction);
|
|
6733
|
+
var renderHeader = (props) => {
|
|
6734
|
+
if (!hasHeader(props)) return null;
|
|
6735
|
+
return /* @__PURE__ */ jsx36(
|
|
6736
|
+
ITPageHeader,
|
|
6737
|
+
{
|
|
6738
|
+
title: props.title || "",
|
|
6739
|
+
description: props.description,
|
|
6740
|
+
breadcrumbs: props.breadcrumbs,
|
|
6741
|
+
actions: props.actions,
|
|
6742
|
+
backAction: props.backAction
|
|
6743
|
+
}
|
|
6744
|
+
);
|
|
6745
|
+
};
|
|
6746
|
+
function ITPage(props) {
|
|
6747
|
+
const {
|
|
6748
|
+
loading = false,
|
|
6749
|
+
error = null,
|
|
6750
|
+
errorTitle,
|
|
6751
|
+
errorActionLabel,
|
|
6752
|
+
onRetry,
|
|
6753
|
+
empty = false,
|
|
6754
|
+
emptyTitle,
|
|
6755
|
+
emptyDescription,
|
|
6756
|
+
emptyAction,
|
|
6757
|
+
className,
|
|
6758
|
+
children
|
|
6759
|
+
} = props;
|
|
6760
|
+
const wrapperClass = clsx28("space-y-6", className);
|
|
6749
6761
|
if (loading) {
|
|
6750
|
-
return /* @__PURE__ */ jsxs27("div", { className, children: [
|
|
6751
|
-
|
|
6752
|
-
/* @__PURE__ */
|
|
6762
|
+
return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
|
|
6763
|
+
renderHeader(props),
|
|
6764
|
+
/* @__PURE__ */ jsxs27(ITStack, { spacing: 4, children: [
|
|
6753
6765
|
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 40, width: "40%" }),
|
|
6754
6766
|
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 }),
|
|
6755
6767
|
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 })
|
|
6756
|
-
] })
|
|
6768
|
+
] })
|
|
6757
6769
|
] });
|
|
6758
6770
|
}
|
|
6759
6771
|
if (error) {
|
|
6760
|
-
return /* @__PURE__ */ jsxs27("div", { className, children: [
|
|
6761
|
-
|
|
6772
|
+
return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
|
|
6773
|
+
renderHeader(props),
|
|
6762
6774
|
/* @__PURE__ */ jsx36(
|
|
6763
6775
|
ITEmptyState,
|
|
6764
6776
|
{
|
|
6765
|
-
title: "Error",
|
|
6777
|
+
title: errorTitle || "Error",
|
|
6766
6778
|
description: error,
|
|
6767
|
-
action: onRetry ? /* @__PURE__ */ jsx36(
|
|
6779
|
+
action: onRetry ? /* @__PURE__ */ jsx36(
|
|
6780
|
+
ITButton,
|
|
6781
|
+
{
|
|
6782
|
+
label: errorActionLabel || "Reintentar",
|
|
6783
|
+
onClick: onRetry,
|
|
6784
|
+
size: "small"
|
|
6785
|
+
}
|
|
6786
|
+
) : void 0
|
|
6768
6787
|
}
|
|
6769
6788
|
)
|
|
6770
6789
|
] });
|
|
6771
6790
|
}
|
|
6772
6791
|
if (empty) {
|
|
6773
|
-
return /* @__PURE__ */ jsxs27("div", { className, children: [
|
|
6774
|
-
|
|
6792
|
+
return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
|
|
6793
|
+
renderHeader(props),
|
|
6775
6794
|
/* @__PURE__ */ jsx36(
|
|
6776
6795
|
ITEmptyState,
|
|
6777
6796
|
{
|
|
@@ -6782,24 +6801,15 @@ function ITPage({
|
|
|
6782
6801
|
)
|
|
6783
6802
|
] });
|
|
6784
6803
|
}
|
|
6785
|
-
return /* @__PURE__ */ jsxs27("div", { className:
|
|
6786
|
-
(
|
|
6787
|
-
ITPageHeader,
|
|
6788
|
-
{
|
|
6789
|
-
title: title || "",
|
|
6790
|
-
description,
|
|
6791
|
-
breadcrumbs,
|
|
6792
|
-
actions,
|
|
6793
|
-
backAction
|
|
6794
|
-
}
|
|
6795
|
-
),
|
|
6804
|
+
return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
|
|
6805
|
+
renderHeader(props),
|
|
6796
6806
|
children
|
|
6797
6807
|
] });
|
|
6798
6808
|
}
|
|
6799
6809
|
|
|
6800
6810
|
// src/components/popover/popover.tsx
|
|
6801
6811
|
import { useState as useState18, useRef as useRef10 } from "react";
|
|
6802
|
-
import
|
|
6812
|
+
import clsx29 from "clsx";
|
|
6803
6813
|
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6804
6814
|
var positionClasses = {
|
|
6805
6815
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
@@ -6823,14 +6833,14 @@ function ITPopover({
|
|
|
6823
6833
|
if (isControlled) onClose?.();
|
|
6824
6834
|
else setInternalOpen(false);
|
|
6825
6835
|
});
|
|
6826
|
-
return /* @__PURE__ */ jsxs28("div", { ref, className:
|
|
6836
|
+
return /* @__PURE__ */ jsxs28("div", { ref, className: clsx29("relative inline-flex", className), children: [
|
|
6827
6837
|
/* @__PURE__ */ jsx37("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
|
|
6828
|
-
open && /* @__PURE__ */ jsx37("div", { className:
|
|
6838
|
+
open && /* @__PURE__ */ jsx37("div", { className: clsx29("absolute z-[200]", positionClasses[position]), children: /* @__PURE__ */ jsx37("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
|
|
6829
6839
|
] });
|
|
6830
6840
|
}
|
|
6831
6841
|
|
|
6832
6842
|
// src/components/progress/progress.tsx
|
|
6833
|
-
import
|
|
6843
|
+
import clsx30 from "clsx";
|
|
6834
6844
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
6835
6845
|
var colorMap = {
|
|
6836
6846
|
primary: "bg-primary-500",
|
|
@@ -6861,7 +6871,7 @@ function ITProgress({
|
|
|
6861
6871
|
return /* @__PURE__ */ jsx38(
|
|
6862
6872
|
"div",
|
|
6863
6873
|
{
|
|
6864
|
-
className:
|
|
6874
|
+
className: clsx30("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap3[size], className),
|
|
6865
6875
|
style,
|
|
6866
6876
|
role: "progressbar",
|
|
6867
6877
|
"aria-valuenow": variant === "determinate" ? value : void 0,
|
|
@@ -6869,7 +6879,7 @@ function ITProgress({
|
|
|
6869
6879
|
children: /* @__PURE__ */ jsx38(
|
|
6870
6880
|
"div",
|
|
6871
6881
|
{
|
|
6872
|
-
className:
|
|
6882
|
+
className: clsx30(
|
|
6873
6883
|
"h-full rounded-full transition-all duration-500",
|
|
6874
6884
|
colorMap[color],
|
|
6875
6885
|
variant === "indeterminate" && "animate-pulse w-1/2"
|
|
@@ -6882,7 +6892,7 @@ function ITProgress({
|
|
|
6882
6892
|
}
|
|
6883
6893
|
|
|
6884
6894
|
// src/components/radio/radio.tsx
|
|
6885
|
-
import
|
|
6895
|
+
import clsx31 from "clsx";
|
|
6886
6896
|
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6887
6897
|
function ITRadioGroup({
|
|
6888
6898
|
name,
|
|
@@ -6896,7 +6906,7 @@ function ITRadioGroup({
|
|
|
6896
6906
|
return /* @__PURE__ */ jsx39(
|
|
6897
6907
|
"div",
|
|
6898
6908
|
{
|
|
6899
|
-
className:
|
|
6909
|
+
className: clsx31(
|
|
6900
6910
|
"flex gap-3",
|
|
6901
6911
|
direction === "row" ? "flex-row flex-wrap" : "flex-col",
|
|
6902
6912
|
className
|
|
@@ -6906,7 +6916,7 @@ function ITRadioGroup({
|
|
|
6906
6916
|
return /* @__PURE__ */ jsxs29(
|
|
6907
6917
|
"label",
|
|
6908
6918
|
{
|
|
6909
|
-
className:
|
|
6919
|
+
className: clsx31(
|
|
6910
6920
|
"inline-flex items-center gap-2 cursor-pointer select-none",
|
|
6911
6921
|
disabled && "opacity-50 cursor-not-allowed"
|
|
6912
6922
|
),
|
|
@@ -6926,7 +6936,7 @@ function ITRadioGroup({
|
|
|
6926
6936
|
/* @__PURE__ */ jsx39(
|
|
6927
6937
|
"div",
|
|
6928
6938
|
{
|
|
6929
|
-
className:
|
|
6939
|
+
className: clsx31(
|
|
6930
6940
|
"w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all",
|
|
6931
6941
|
isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
|
|
6932
6942
|
!disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
|
|
@@ -6946,7 +6956,7 @@ function ITRadioGroup({
|
|
|
6946
6956
|
|
|
6947
6957
|
// src/components/search-select/search-select.tsx
|
|
6948
6958
|
import { useState as useState19, useEffect as useEffect13, useRef as useRef11, useMemo as useMemo6 } from "react";
|
|
6949
|
-
import
|
|
6959
|
+
import clsx32 from "clsx";
|
|
6950
6960
|
import { FaSearch } from "react-icons/fa";
|
|
6951
6961
|
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6952
6962
|
function ITSearchSelect({
|
|
@@ -7065,12 +7075,12 @@ function ITSearchSelect({
|
|
|
7065
7075
|
}
|
|
7066
7076
|
return style;
|
|
7067
7077
|
};
|
|
7068
|
-
return /* @__PURE__ */ jsxs30("div", { className:
|
|
7078
|
+
return /* @__PURE__ */ jsxs30("div", { className: clsx32("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
|
|
7069
7079
|
label && /* @__PURE__ */ jsxs30(
|
|
7070
7080
|
ITText,
|
|
7071
7081
|
{
|
|
7072
7082
|
as: "label",
|
|
7073
|
-
className:
|
|
7083
|
+
className: clsx32("text-sm font-medium text-gray-700 dark:text-slate-300", {
|
|
7074
7084
|
"text-red-500": hasError
|
|
7075
7085
|
}),
|
|
7076
7086
|
children: [
|
|
@@ -7100,7 +7110,7 @@ function ITSearchSelect({
|
|
|
7100
7110
|
),
|
|
7101
7111
|
/* @__PURE__ */ jsxs30("div", { className: "absolute right-3 flex items-center gap-2 text-gray-400 pointer-events-none", children: [
|
|
7102
7112
|
isLoading && /* @__PURE__ */ jsx40("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
|
|
7103
|
-
!isLoading && /* @__PURE__ */ jsx40(FaSearch, { size: 14, className:
|
|
7113
|
+
!isLoading && /* @__PURE__ */ jsx40(FaSearch, { size: 14, className: clsx32({ "text-primary-500": isFocused }) })
|
|
7104
7114
|
] })
|
|
7105
7115
|
] }),
|
|
7106
7116
|
isOpen && /* @__PURE__ */ jsx40("div", { className: "absolute z-50 w-full mt-1 bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top", children: /* @__PURE__ */ jsx40("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx40(
|
|
@@ -7108,7 +7118,7 @@ function ITSearchSelect({
|
|
|
7108
7118
|
{
|
|
7109
7119
|
as: "div",
|
|
7110
7120
|
onClick: () => handleSelect(option),
|
|
7111
|
-
className:
|
|
7121
|
+
className: clsx32(
|
|
7112
7122
|
"px-4 py-2 text-sm cursor-pointer transition-colors",
|
|
7113
7123
|
value === option[valueField] ? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium" : "hover:bg-gray-50 dark:hover:bg-slate-800 text-gray-700 dark:text-slate-300"
|
|
7114
7124
|
),
|
|
@@ -7122,7 +7132,7 @@ function ITSearchSelect({
|
|
|
7122
7132
|
}
|
|
7123
7133
|
|
|
7124
7134
|
// src/components/searchTable/searchTable.tsx
|
|
7125
|
-
import
|
|
7135
|
+
import clsx34 from "clsx";
|
|
7126
7136
|
import { useState as useState20 } from "react";
|
|
7127
7137
|
|
|
7128
7138
|
// src/components/searchTable/components/SearchInput.tsx
|
|
@@ -7269,7 +7279,7 @@ var getNestedValue4 = (obj, path) => {
|
|
|
7269
7279
|
};
|
|
7270
7280
|
|
|
7271
7281
|
// src/components/searchTable/components/TableRow.tsx
|
|
7272
|
-
import
|
|
7282
|
+
import clsx33 from "clsx";
|
|
7273
7283
|
import { FaCheck as FaCheck3, FaTimes as FaTimes7 } from "react-icons/fa";
|
|
7274
7284
|
|
|
7275
7285
|
// src/components/searchTable/components/EditableCell.tsx
|
|
@@ -7465,7 +7475,7 @@ function TableRow({
|
|
|
7465
7475
|
children: columns.map((col) => /* @__PURE__ */ jsx47(
|
|
7466
7476
|
"td",
|
|
7467
7477
|
{
|
|
7468
|
-
className:
|
|
7478
|
+
className: clsx33("pl-5 py-2", col.className, {
|
|
7469
7479
|
"text-center": col.type === "actions" || col.type === "boolean"
|
|
7470
7480
|
}),
|
|
7471
7481
|
children: isEditing && col.editable ? /* @__PURE__ */ jsx47(
|
|
@@ -7480,7 +7490,7 @@ function TableRow({
|
|
|
7480
7490
|
) : /* @__PURE__ */ jsx47(
|
|
7481
7491
|
"div",
|
|
7482
7492
|
{
|
|
7483
|
-
className:
|
|
7493
|
+
className: clsx33({
|
|
7484
7494
|
"flex flex-col items-center justify-center gap-1 ": col.type === "actions"
|
|
7485
7495
|
}),
|
|
7486
7496
|
children: renderCellContent(
|
|
@@ -7665,7 +7675,7 @@ function ITSearchTable({
|
|
|
7665
7675
|
handleClearSearch();
|
|
7666
7676
|
onClearSearch?.();
|
|
7667
7677
|
};
|
|
7668
|
-
return /* @__PURE__ */ jsxs38("div", { className:
|
|
7678
|
+
return /* @__PURE__ */ jsxs38("div", { className: clsx34("space-y-4 w-full", containerClassName), children: [
|
|
7669
7679
|
/* @__PURE__ */ jsxs38("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7670
7680
|
title && /* @__PURE__ */ jsx50("div", { className: "bg-teal-500 text-white px-6 py-4", children: /* @__PURE__ */ jsx50(ITText, { as: "h2", className: "text-xl font-bold text-center whitespace-nowrap", children: title }) }),
|
|
7671
7681
|
/* @__PURE__ */ jsxs38("div", { className: "bg-white", children: [
|
|
@@ -7683,7 +7693,7 @@ function ITSearchTable({
|
|
|
7683
7693
|
/* @__PURE__ */ jsx50("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs38(
|
|
7684
7694
|
"table",
|
|
7685
7695
|
{
|
|
7686
|
-
className:
|
|
7696
|
+
className: clsx34(
|
|
7687
7697
|
"min-w-full text-sm text-left bg-white text-gray-900 table-auto",
|
|
7688
7698
|
variantStyles[variant],
|
|
7689
7699
|
sizeStyles[size]
|
|
@@ -8031,7 +8041,7 @@ function ITSidebar({
|
|
|
8031
8041
|
|
|
8032
8042
|
// src/components/slide/slide.tsx
|
|
8033
8043
|
import { useState as useState22, useEffect as useEffect15 } from "react";
|
|
8034
|
-
import
|
|
8044
|
+
import clsx35 from "clsx";
|
|
8035
8045
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
8036
8046
|
function ITSlideToggle({
|
|
8037
8047
|
onToggle,
|
|
@@ -8089,7 +8099,7 @@ function ITSlideToggle({
|
|
|
8089
8099
|
"div",
|
|
8090
8100
|
{
|
|
8091
8101
|
onClick: toggleSwitch,
|
|
8092
|
-
className:
|
|
8102
|
+
className: clsx35(
|
|
8093
8103
|
"flex items-center rounded-full p-1 transition-colors duration-300",
|
|
8094
8104
|
container,
|
|
8095
8105
|
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
@@ -8108,7 +8118,7 @@ function ITSlideToggle({
|
|
|
8108
8118
|
children: /* @__PURE__ */ jsx52(
|
|
8109
8119
|
"div",
|
|
8110
8120
|
{
|
|
8111
|
-
className:
|
|
8121
|
+
className: clsx35(
|
|
8112
8122
|
"bg-white rounded-full shadow-md transform transition-transform duration-300 pointer-events-none",
|
|
8113
8123
|
knob,
|
|
8114
8124
|
isOn ? translate : "translate-x-0"
|
|
@@ -8120,7 +8130,7 @@ function ITSlideToggle({
|
|
|
8120
8130
|
}
|
|
8121
8131
|
|
|
8122
8132
|
// src/components/slider/slider.tsx
|
|
8123
|
-
import
|
|
8133
|
+
import clsx36 from "clsx";
|
|
8124
8134
|
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8125
8135
|
function ITSlider({
|
|
8126
8136
|
value,
|
|
@@ -8132,7 +8142,7 @@ function ITSlider({
|
|
|
8132
8142
|
disabled = false,
|
|
8133
8143
|
className
|
|
8134
8144
|
}) {
|
|
8135
|
-
return /* @__PURE__ */ jsxs40("div", { className:
|
|
8145
|
+
return /* @__PURE__ */ jsxs40("div", { className: clsx36("flex flex-col gap-1.5", className), children: [
|
|
8136
8146
|
label && /* @__PURE__ */ jsxs40(ITText, { as: "label", className: "text-xs font-semibold text-gray-600 dark:text-gray-400", children: [
|
|
8137
8147
|
label,
|
|
8138
8148
|
": ",
|
|
@@ -8148,7 +8158,7 @@ function ITSlider({
|
|
|
8148
8158
|
value,
|
|
8149
8159
|
onChange: (e) => onChange(Number(e.target.value)),
|
|
8150
8160
|
disabled,
|
|
8151
|
-
className:
|
|
8161
|
+
className: clsx36(
|
|
8152
8162
|
"w-full h-1.5 appearance-none rounded-full outline-none cursor-pointer",
|
|
8153
8163
|
"bg-gray-200 dark:bg-gray-700",
|
|
8154
8164
|
"accent-primary-500",
|
|
@@ -8168,7 +8178,7 @@ function ITSlider({
|
|
|
8168
8178
|
}
|
|
8169
8179
|
|
|
8170
8180
|
// src/components/stat-card/stat-card.tsx
|
|
8171
|
-
import
|
|
8181
|
+
import clsx37 from "clsx";
|
|
8172
8182
|
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8173
8183
|
var trendColors = {
|
|
8174
8184
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
@@ -8189,7 +8199,7 @@ function ITStatCard({
|
|
|
8189
8199
|
return /* @__PURE__ */ jsxs41(
|
|
8190
8200
|
"div",
|
|
8191
8201
|
{
|
|
8192
|
-
className:
|
|
8202
|
+
className: clsx37("rounded-xl p-4 border border-slate-100 dark:border-slate-800", color, className),
|
|
8193
8203
|
style,
|
|
8194
8204
|
onClick,
|
|
8195
8205
|
role: onClick ? "button" : void 0,
|
|
@@ -8201,7 +8211,7 @@ function ITStatCard({
|
|
|
8201
8211
|
] }),
|
|
8202
8212
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-baseline gap-2", children: [
|
|
8203
8213
|
/* @__PURE__ */ jsx54(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8204
|
-
trend && /* @__PURE__ */ jsx54(ITText, { as: "span", className:
|
|
8214
|
+
trend && /* @__PURE__ */ jsx54(ITText, { as: "span", className: clsx37("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
8205
8215
|
] })
|
|
8206
8216
|
]
|
|
8207
8217
|
}
|
|
@@ -8209,7 +8219,7 @@ function ITStatCard({
|
|
|
8209
8219
|
}
|
|
8210
8220
|
|
|
8211
8221
|
// src/components/textarea/textarea.tsx
|
|
8212
|
-
import
|
|
8222
|
+
import clsx38 from "clsx";
|
|
8213
8223
|
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8214
8224
|
var resizeMap = {
|
|
8215
8225
|
none: "resize-none",
|
|
@@ -8230,7 +8240,7 @@ function ITTextarea({
|
|
|
8230
8240
|
maxLength,
|
|
8231
8241
|
resize = "vertical"
|
|
8232
8242
|
}) {
|
|
8233
|
-
return /* @__PURE__ */ jsxs42("div", { className:
|
|
8243
|
+
return /* @__PURE__ */ jsxs42("div", { className: clsx38("flex flex-col gap-1.5", className), children: [
|
|
8234
8244
|
label && /* @__PURE__ */ jsx55(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8235
8245
|
/* @__PURE__ */ jsx55(
|
|
8236
8246
|
"textarea",
|
|
@@ -8243,7 +8253,7 @@ function ITTextarea({
|
|
|
8243
8253
|
rows,
|
|
8244
8254
|
disabled,
|
|
8245
8255
|
maxLength,
|
|
8246
|
-
className:
|
|
8256
|
+
className: clsx38(
|
|
8247
8257
|
"w-full border border-solid transition-all duration-200 rounded-lg px-3 py-2 text-sm outline-none",
|
|
8248
8258
|
"focus:ring-2",
|
|
8249
8259
|
resizeMap[resize],
|
|
@@ -8257,7 +8267,7 @@ function ITTextarea({
|
|
|
8257
8267
|
}
|
|
8258
8268
|
|
|
8259
8269
|
// src/components/triple-filter/tripleFilter.tsx
|
|
8260
|
-
import
|
|
8270
|
+
import clsx39 from "clsx";
|
|
8261
8271
|
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
8262
8272
|
var colorMap2 = {
|
|
8263
8273
|
primary: "text-primary-600",
|
|
@@ -8280,14 +8290,14 @@ var ITTripleFilter = ({
|
|
|
8280
8290
|
return /* @__PURE__ */ jsx56(
|
|
8281
8291
|
"div",
|
|
8282
8292
|
{
|
|
8283
|
-
className:
|
|
8293
|
+
className: clsx39("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8284
8294
|
children: options.map((option) => /* @__PURE__ */ jsx56(
|
|
8285
8295
|
"button",
|
|
8286
8296
|
{
|
|
8287
8297
|
onClick: () => onChange(option.value),
|
|
8288
|
-
className:
|
|
8298
|
+
className: clsx39(
|
|
8289
8299
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8290
|
-
value === option.value ?
|
|
8300
|
+
value === option.value ? clsx39("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8291
8301
|
),
|
|
8292
8302
|
children: /* @__PURE__ */ jsx56(ITText, { as: "span", children: option.label })
|
|
8293
8303
|
},
|
|
@@ -8309,7 +8319,7 @@ var positionStyles = {
|
|
|
8309
8319
|
};
|
|
8310
8320
|
|
|
8311
8321
|
// src/components/toast/toast.tsx
|
|
8312
|
-
import
|
|
8322
|
+
import clsx40 from "clsx";
|
|
8313
8323
|
import { useEffect as useEffect16, useState as useState23 } from "react";
|
|
8314
8324
|
import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes8 } from "react-icons/fa";
|
|
8315
8325
|
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
@@ -8355,7 +8365,7 @@ function ITToast({
|
|
|
8355
8365
|
return /* @__PURE__ */ jsxs43(
|
|
8356
8366
|
"div",
|
|
8357
8367
|
{
|
|
8358
|
-
className:
|
|
8368
|
+
className: clsx40(
|
|
8359
8369
|
"fixed z-50 p-4 rounded-xl shadow-xl flex items-center justify-between gap-4 transition-all duration-300 text-white min-w-[300px]",
|
|
8360
8370
|
positionStyles[position],
|
|
8361
8371
|
{
|
|
@@ -8389,7 +8399,7 @@ function ITToast({
|
|
|
8389
8399
|
// src/components/dropfile/dropfile.tsx
|
|
8390
8400
|
import { useState as useState24, useEffect as useEffect17, useRef as useRef13 } from "react";
|
|
8391
8401
|
import { useDropzone } from "react-dropzone";
|
|
8392
|
-
import
|
|
8402
|
+
import clsx41 from "clsx";
|
|
8393
8403
|
import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
8394
8404
|
var FileTypeEnum = /* @__PURE__ */ ((FileTypeEnum2) => {
|
|
8395
8405
|
FileTypeEnum2["PDF"] = "application/pdf";
|
|
@@ -8594,7 +8604,7 @@ var ITDropfile = ({
|
|
|
8594
8604
|
handleCancel();
|
|
8595
8605
|
};
|
|
8596
8606
|
const isImage = fileType && fileType.startsWith("image/");
|
|
8597
|
-
return /* @__PURE__ */ jsxs44("div", { className:
|
|
8607
|
+
return /* @__PURE__ */ jsxs44("div", { className: clsx41("w-full transition-all duration-300", containerClassName), children: [
|
|
8598
8608
|
/* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between mb-2", children: [
|
|
8599
8609
|
/* @__PURE__ */ jsxs44("label", { className: "block text-sm font-semibold text-gray-700", children: [
|
|
8600
8610
|
/* @__PURE__ */ jsx58(ITText, { as: "span", children: "Subir archivo " }),
|
|
@@ -8638,7 +8648,7 @@ var ITDropfile = ({
|
|
|
8638
8648
|
/* @__PURE__ */ jsx58(ITText, { as: "p", className: "text-[10px] text-gray-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
8639
8649
|
] })
|
|
8640
8650
|
] }) }),
|
|
8641
|
-
/* @__PURE__ */ jsx58("div", { className:
|
|
8651
|
+
/* @__PURE__ */ jsx58("div", { className: clsx41("relative bg-gray-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx58(
|
|
8642
8652
|
"img",
|
|
8643
8653
|
{
|
|
8644
8654
|
src: imagePreview,
|
|
@@ -8700,6 +8710,7 @@ var dropfile_default = ITDropfile;
|
|
|
8700
8710
|
|
|
8701
8711
|
// src/components/layout/layout.tsx
|
|
8702
8712
|
import { useState as useState26 } from "react";
|
|
8713
|
+
import clsx42 from "clsx";
|
|
8703
8714
|
|
|
8704
8715
|
// src/components/topbar/topbar.tsx
|
|
8705
8716
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
@@ -8936,7 +8947,7 @@ function ITLayout({
|
|
|
8936
8947
|
)
|
|
8937
8948
|
}
|
|
8938
8949
|
),
|
|
8939
|
-
/* @__PURE__ */ jsx60("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx60("div", { className:
|
|
8950
|
+
/* @__PURE__ */ jsx60("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx60("div", { className: clsx42("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
8940
8951
|
] })
|
|
8941
8952
|
] });
|
|
8942
8953
|
}
|