@axzydev/axzy_ui_system 1.4.1 → 1.4.3
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 +2 -2
- package/dist/index.cjs +422 -259
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +169 -70
- package/dist/index.d.ts +169 -70
- package/dist/index.js +324 -162
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +3 -0
- package/src/components/molecules/card/card.tsx +22 -9
- package/src/components/organisms/page-header/page-header.tsx +14 -3
- package/src/components/organisms/sidebar/sidebar.doc.mdx +48 -2
- package/src/components/organisms/sidebar/sidebar.props.ts +58 -3
- package/src/components/organisms/sidebar/sidebar.stories.tsx +59 -1
- package/src/components/organisms/sidebar/sidebar.tsx +141 -25
- package/src/components/organisms/topbar/topbar.props.ts +7 -0
- package/src/components/organisms/topbar/topbar.tsx +31 -8
- package/src/components/templates/layout/layout.props.ts +8 -0
- package/src/components/templates/layout/layout.tsx +101 -54
- package/src/components/theme-provider/themeProvider.doc.mdx +1 -0
- package/src/components/theme-provider/themeProvider.props.ts +6 -0
- package/src/components/theme-provider/themeProvider.tsx +11 -1
- package/src/index.ts +6 -5
- package/src/sandbox/LandingShowcase.tsx +1 -1
- package/src/sandbox/navigation.ts +1 -0
- package/src/showcases/HelpShowcase.tsx +497 -0
- package/src/showcases/StructureShowcases.tsx +58 -5
- package/src/theme/theme-context.ts +11 -1
- package/src/theme/theme.types.ts +7 -0
package/dist/index.cjs
CHANGED
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
useDebouncedSearch: () => useDebouncedSearch,
|
|
99
99
|
useEditableRow: () => useEditableRow,
|
|
100
100
|
useFloatingPanel: () => useFloatingPanel,
|
|
101
|
+
useITFlatAppearance: () => useITFlatAppearance,
|
|
101
102
|
useITTheme: () => useITTheme,
|
|
102
103
|
useITThemeSafe: () => useITThemeSafe,
|
|
103
104
|
useTableState: () => useTableState
|
|
@@ -1896,7 +1897,26 @@ var calendar_default = ITCalendar;
|
|
|
1896
1897
|
|
|
1897
1898
|
// src/components/molecules/card/card.tsx
|
|
1898
1899
|
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
1900
|
+
var import_react10 = require("react");
|
|
1901
|
+
|
|
1902
|
+
// src/theme/theme-context.ts
|
|
1899
1903
|
var import_react9 = require("react");
|
|
1904
|
+
var ITThemeContext = (0, import_react9.createContext)(void 0);
|
|
1905
|
+
var useITTheme = () => {
|
|
1906
|
+
const context = (0, import_react9.useContext)(ITThemeContext);
|
|
1907
|
+
if (!context) {
|
|
1908
|
+
throw new Error("useITTheme must be used within an ITThemeProvider");
|
|
1909
|
+
}
|
|
1910
|
+
return context;
|
|
1911
|
+
};
|
|
1912
|
+
var useITThemeSafe = () => {
|
|
1913
|
+
return (0, import_react9.useContext)(ITThemeContext);
|
|
1914
|
+
};
|
|
1915
|
+
var useITFlatAppearance = () => {
|
|
1916
|
+
return (0, import_react9.useContext)(ITThemeContext)?.appearance === "flat";
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
// src/components/molecules/card/card.tsx
|
|
1900
1920
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1901
1921
|
function ITCard({
|
|
1902
1922
|
title,
|
|
@@ -1911,17 +1931,21 @@ function ITCard({
|
|
|
1911
1931
|
actionClassName,
|
|
1912
1932
|
onClick
|
|
1913
1933
|
}) {
|
|
1914
|
-
const [isHovered, setIsHovered] = (0,
|
|
1934
|
+
const [isHovered, setIsHovered] = (0, import_react10.useState)(false);
|
|
1935
|
+
const flat = useITFlatAppearance();
|
|
1915
1936
|
const containerStyle = {
|
|
1916
1937
|
backgroundColor: "var(--it-card-bg, #ffffff)",
|
|
1917
|
-
borderColor: "var(--it-card-border, rgba(15, 23, 42, 0.06))",
|
|
1938
|
+
borderColor: flat ? "var(--it-card-flat-border, var(--color-secondary-200))" : "var(--it-card-border, rgba(15, 23, 42, 0.06))",
|
|
1918
1939
|
borderWidth: "1px",
|
|
1919
|
-
|
|
1940
|
+
borderStyle: "solid",
|
|
1941
|
+
borderRadius: flat ? "var(--it-card-radius, var(--radius-lg))" : "var(--it-card-radius, var(--radius-2xl))",
|
|
1920
1942
|
// Soft depth: every card floats a little at rest; interactive cards
|
|
1921
1943
|
// gain visual weight on hover instead of appearing flat until clicked.
|
|
1922
|
-
|
|
1944
|
+
// Flat appearance: the hairline border carries the surface, so a card
|
|
1945
|
+
// only gets a shadow as hover feedback when it is clickable.
|
|
1946
|
+
boxShadow: flat ? onClick && isHovered ? "var(--shadow-sm)" : "none" : onClick ? isHovered ? "var(--shadow-lg)" : "var(--shadow-sm)" : "var(--shadow-sm)",
|
|
1923
1947
|
transition: onClick ? "box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out" : "none",
|
|
1924
|
-
transform: onClick && isHovered ? "translateY(-2px)" : "translateY(0)",
|
|
1948
|
+
transform: onClick && isHovered && !flat ? "translateY(-2px)" : "translateY(0)",
|
|
1925
1949
|
cursor: onClick ? "pointer" : "default"
|
|
1926
1950
|
};
|
|
1927
1951
|
const bodyStyle = {
|
|
@@ -1949,7 +1973,7 @@ function ITCard({
|
|
|
1949
1973
|
ITText,
|
|
1950
1974
|
{
|
|
1951
1975
|
as: "h3",
|
|
1952
|
-
className: (0, import_clsx8.default)("text-xl font-semibold mb-2", titleClassName),
|
|
1976
|
+
className: (0, import_clsx8.default)(flat ? "text-base font-semibold mb-3" : "text-xl font-semibold mb-2", titleClassName),
|
|
1953
1977
|
children: title
|
|
1954
1978
|
}
|
|
1955
1979
|
),
|
|
@@ -2123,7 +2147,7 @@ function ITChip({
|
|
|
2123
2147
|
|
|
2124
2148
|
// src/components/molecules/chip-input/chip-input.tsx
|
|
2125
2149
|
var import_clsx12 = __toESM(require("clsx"), 1);
|
|
2126
|
-
var
|
|
2150
|
+
var import_react11 = require("react");
|
|
2127
2151
|
|
|
2128
2152
|
// src/utils/styles.ts
|
|
2129
2153
|
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
@@ -2255,11 +2279,11 @@ function ITChipInput({
|
|
|
2255
2279
|
helpText,
|
|
2256
2280
|
className
|
|
2257
2281
|
}) {
|
|
2258
|
-
const [inputValue, setInputValue] = (0,
|
|
2259
|
-
const [localTouched, setLocalTouched] = (0,
|
|
2260
|
-
const [localError, setLocalError] = (0,
|
|
2261
|
-
const [isFocused, setIsFocused] = (0,
|
|
2262
|
-
const inputRef = (0,
|
|
2282
|
+
const [inputValue, setInputValue] = (0, import_react11.useState)("");
|
|
2283
|
+
const [localTouched, setLocalTouched] = (0, import_react11.useState)(false);
|
|
2284
|
+
const [localError, setLocalError] = (0, import_react11.useState)(void 0);
|
|
2285
|
+
const [isFocused, setIsFocused] = (0, import_react11.useState)(false);
|
|
2286
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
2263
2287
|
const inputTheme = theme.input || {};
|
|
2264
2288
|
const isTouched = touched !== void 0 ? touched : localTouched;
|
|
2265
2289
|
const externalError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && value.length === 0 ? "Este campo es requerido" : void 0;
|
|
@@ -2400,7 +2424,7 @@ function ITChipInput({
|
|
|
2400
2424
|
|
|
2401
2425
|
// src/components/molecules/dropdown-menu/dropdown-menu.tsx
|
|
2402
2426
|
var import_clsx13 = __toESM(require("clsx"), 1);
|
|
2403
|
-
var
|
|
2427
|
+
var import_react12 = require("react");
|
|
2404
2428
|
var import_react_dom = require("react-dom");
|
|
2405
2429
|
var import_fa6 = require("react-icons/fa");
|
|
2406
2430
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
@@ -2414,20 +2438,20 @@ function ITDropdownMenu({
|
|
|
2414
2438
|
className,
|
|
2415
2439
|
menuClassName
|
|
2416
2440
|
}) {
|
|
2417
|
-
const [isOpen, setIsOpen] = (0,
|
|
2418
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
2419
|
-
const triggerRef = (0,
|
|
2420
|
-
const itemRefs = (0,
|
|
2441
|
+
const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
|
|
2442
|
+
const [activeIndex, setActiveIndex] = (0, import_react12.useState)(-1);
|
|
2443
|
+
const triggerRef = (0, import_react12.useRef)(null);
|
|
2444
|
+
const itemRefs = (0, import_react12.useRef)([]);
|
|
2421
2445
|
const { panelRef, style: panelStyle } = useFloatingPanel(triggerRef, isOpen, {
|
|
2422
2446
|
estimatedHeight: Math.max(items.length * 40, 120),
|
|
2423
2447
|
matchWidth: false,
|
|
2424
2448
|
align: placement.endsWith("end") ? "end" : "start"
|
|
2425
2449
|
});
|
|
2426
|
-
const enabledIndexes = (0,
|
|
2450
|
+
const enabledIndexes = (0, import_react12.useMemo)(
|
|
2427
2451
|
() => items.map((item, i) => item.disabled ? -1 : i).filter((i) => i >= 0),
|
|
2428
2452
|
[items]
|
|
2429
2453
|
);
|
|
2430
|
-
(0,
|
|
2454
|
+
(0, import_react12.useEffect)(() => {
|
|
2431
2455
|
if (!isOpen) return;
|
|
2432
2456
|
function handleClickOutside(event) {
|
|
2433
2457
|
const target = event.target;
|
|
@@ -2438,7 +2462,7 @@ function ITDropdownMenu({
|
|
|
2438
2462
|
document.addEventListener("mousedown", handleClickOutside);
|
|
2439
2463
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2440
2464
|
}, [isOpen, panelRef]);
|
|
2441
|
-
(0,
|
|
2465
|
+
(0, import_react12.useEffect)(() => {
|
|
2442
2466
|
if (isOpen) {
|
|
2443
2467
|
setActiveIndex(enabledIndexes[0] ?? -1);
|
|
2444
2468
|
requestAnimationFrame(() => {
|
|
@@ -2610,12 +2634,12 @@ function ITField({
|
|
|
2610
2634
|
}
|
|
2611
2635
|
|
|
2612
2636
|
// src/components/molecules/masked-input/masked-input.tsx
|
|
2613
|
-
var
|
|
2637
|
+
var import_react14 = require("react");
|
|
2614
2638
|
var import_clsx16 = __toESM(require("clsx"), 1);
|
|
2615
2639
|
|
|
2616
2640
|
// src/components/atoms/input/input.tsx
|
|
2617
2641
|
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
2618
|
-
var
|
|
2642
|
+
var import_react13 = require("react");
|
|
2619
2643
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2620
2644
|
function ITInput({
|
|
2621
2645
|
name,
|
|
@@ -2655,12 +2679,12 @@ function ITInput({
|
|
|
2655
2679
|
const isNumberType = type === "number";
|
|
2656
2680
|
const isTextArea = type === "textarea";
|
|
2657
2681
|
const decimalPlaces = decimals ?? (currencyFormat ? 2 : 0);
|
|
2658
|
-
const [displayValue, setDisplayValue] = (0,
|
|
2659
|
-
const [isFocused, setIsFocused] = (0,
|
|
2660
|
-
const [hasSelectedAll, setHasSelectedAll] = (0,
|
|
2661
|
-
const [showPassword, setShowPassword] = (0,
|
|
2662
|
-
const [localTouched, setLocalTouched] = (0,
|
|
2663
|
-
const inputRef = (0,
|
|
2682
|
+
const [displayValue, setDisplayValue] = (0, import_react13.useState)("");
|
|
2683
|
+
const [isFocused, setIsFocused] = (0, import_react13.useState)(false);
|
|
2684
|
+
const [hasSelectedAll, setHasSelectedAll] = (0, import_react13.useState)(false);
|
|
2685
|
+
const [showPassword, setShowPassword] = (0, import_react13.useState)(false);
|
|
2686
|
+
const [localTouched, setLocalTouched] = (0, import_react13.useState)(false);
|
|
2687
|
+
const inputRef = (0, import_react13.useRef)(null);
|
|
2664
2688
|
const inputTheme = theme.input || {};
|
|
2665
2689
|
const getStyle = () => {
|
|
2666
2690
|
const style = inputFieldStyle(inputTheme, size);
|
|
@@ -2699,7 +2723,7 @@ function ITInput({
|
|
|
2699
2723
|
setHasSelectedAll(true);
|
|
2700
2724
|
}
|
|
2701
2725
|
};
|
|
2702
|
-
const formatValue = (0,
|
|
2726
|
+
const formatValue = (0, import_react13.useCallback)(
|
|
2703
2727
|
(val) => {
|
|
2704
2728
|
const num = typeof val === "string" ? parseFloat(val.replace(/,/g, "")) : val;
|
|
2705
2729
|
if (num == null || isNaN(num)) {
|
|
@@ -2718,14 +2742,14 @@ function ITInput({
|
|
|
2718
2742
|
},
|
|
2719
2743
|
[currencyFormat, decimalPlaces]
|
|
2720
2744
|
);
|
|
2721
|
-
const unformatValue = (0,
|
|
2745
|
+
const unformatValue = (0, import_react13.useCallback)(
|
|
2722
2746
|
(val) => {
|
|
2723
2747
|
if (val == null) return "";
|
|
2724
2748
|
return String(val).replace(/,/g, "");
|
|
2725
2749
|
},
|
|
2726
2750
|
[]
|
|
2727
2751
|
);
|
|
2728
|
-
(0,
|
|
2752
|
+
(0, import_react13.useEffect)(() => {
|
|
2729
2753
|
if (!isFocused) {
|
|
2730
2754
|
if (isNumberType) {
|
|
2731
2755
|
if (formatNumber) {
|
|
@@ -3193,15 +3217,15 @@ function ITMaskedInput({
|
|
|
3193
3217
|
iconRight,
|
|
3194
3218
|
autoFocus = false
|
|
3195
3219
|
}) {
|
|
3196
|
-
const containerRef = (0,
|
|
3197
|
-
const rawRef = (0,
|
|
3220
|
+
const containerRef = (0, import_react14.useRef)(null);
|
|
3221
|
+
const rawRef = (0, import_react14.useRef)(value ?? "");
|
|
3198
3222
|
const isControlled = value !== void 0;
|
|
3199
|
-
const [internalRaw, setInternalRaw] = (0,
|
|
3200
|
-
const [invalidPattern, setInvalidPattern] = (0,
|
|
3201
|
-
const rules = (0,
|
|
3202
|
-
const tokenCount = (0,
|
|
3223
|
+
const [internalRaw, setInternalRaw] = (0, import_react14.useState)(value ?? "");
|
|
3224
|
+
const [invalidPattern, setInvalidPattern] = (0, import_react14.useState)(false);
|
|
3225
|
+
const rules = (0, import_react14.useMemo)(() => parseMask(mask), [mask]);
|
|
3226
|
+
const tokenCount = (0, import_react14.useMemo)(() => rules.filter((r) => r.type === "token").length, [rules]);
|
|
3203
3227
|
const raw = isControlled ? value ?? "" : internalRaw;
|
|
3204
|
-
const display = (0,
|
|
3228
|
+
const display = (0, import_react14.useMemo)(() => format2(raw, rules, placeholderChar), [raw, rules, placeholderChar]);
|
|
3205
3229
|
const scheduleCaret = (caret) => {
|
|
3206
3230
|
const inputEl = containerRef.current?.querySelector("input");
|
|
3207
3231
|
if (!inputEl) return;
|
|
@@ -3265,7 +3289,7 @@ function ITMaskedInput({
|
|
|
3265
3289
|
|
|
3266
3290
|
// src/components/molecules/multi-select/multi-select.tsx
|
|
3267
3291
|
var import_clsx17 = __toESM(require("clsx"), 1);
|
|
3268
|
-
var
|
|
3292
|
+
var import_react15 = require("react");
|
|
3269
3293
|
var import_react_dom2 = require("react-dom");
|
|
3270
3294
|
var import_fa7 = require("react-icons/fa");
|
|
3271
3295
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -3294,32 +3318,32 @@ function ITMultiSelect({
|
|
|
3294
3318
|
renderOption,
|
|
3295
3319
|
className
|
|
3296
3320
|
}) {
|
|
3297
|
-
const [isOpen, setIsOpen] = (0,
|
|
3298
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
3299
|
-
const [isFocused, setIsFocused] = (0,
|
|
3300
|
-
const [localTouched, setLocalTouched] = (0,
|
|
3301
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
3302
|
-
const containerRef = (0,
|
|
3303
|
-
const controlRef = (0,
|
|
3304
|
-
const inputRef = (0,
|
|
3305
|
-
const optionRefs = (0,
|
|
3306
|
-
const timeoutRef = (0,
|
|
3321
|
+
const [isOpen, setIsOpen] = (0, import_react15.useState)(false);
|
|
3322
|
+
const [searchTerm, setSearchTerm] = (0, import_react15.useState)("");
|
|
3323
|
+
const [isFocused, setIsFocused] = (0, import_react15.useState)(false);
|
|
3324
|
+
const [localTouched, setLocalTouched] = (0, import_react15.useState)(false);
|
|
3325
|
+
const [activeIndex, setActiveIndex] = (0, import_react15.useState)(-1);
|
|
3326
|
+
const containerRef = (0, import_react15.useRef)(null);
|
|
3327
|
+
const controlRef = (0, import_react15.useRef)(null);
|
|
3328
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
3329
|
+
const optionRefs = (0, import_react15.useRef)([]);
|
|
3330
|
+
const timeoutRef = (0, import_react15.useRef)(null);
|
|
3307
3331
|
const { panelRef, style: panelStyle } = useFloatingPanel(controlRef, isOpen, {
|
|
3308
3332
|
estimatedHeight: 260,
|
|
3309
3333
|
matchWidth: true
|
|
3310
3334
|
});
|
|
3311
|
-
const selectedOptions = (0,
|
|
3335
|
+
const selectedOptions = (0, import_react15.useMemo)(
|
|
3312
3336
|
() => options.filter((opt) => value.includes(opt[valueField])),
|
|
3313
3337
|
[options, value, valueField]
|
|
3314
3338
|
);
|
|
3315
|
-
const filteredOptions = (0,
|
|
3339
|
+
const filteredOptions = (0, import_react15.useMemo)(() => {
|
|
3316
3340
|
if (onSearch) return options;
|
|
3317
3341
|
if (!searchTerm) return options;
|
|
3318
3342
|
return options.filter(
|
|
3319
3343
|
(opt) => String(opt[labelField]).toLowerCase().includes(searchTerm.toLowerCase())
|
|
3320
3344
|
);
|
|
3321
3345
|
}, [options, searchTerm, onSearch, labelField]);
|
|
3322
|
-
(0,
|
|
3346
|
+
(0, import_react15.useEffect)(() => {
|
|
3323
3347
|
function handleClickOutside(event) {
|
|
3324
3348
|
const target = event.target;
|
|
3325
3349
|
if (!containerRef.current?.contains(target) && !panelRef.current?.contains(target)) {
|
|
@@ -3618,11 +3642,11 @@ function ITConfirmDialog({
|
|
|
3618
3642
|
}
|
|
3619
3643
|
|
|
3620
3644
|
// src/hooks/useElementSize.ts
|
|
3621
|
-
var
|
|
3645
|
+
var import_react16 = require("react");
|
|
3622
3646
|
function useElementSize() {
|
|
3623
|
-
const ref = (0,
|
|
3624
|
-
const [size, setSize] = (0,
|
|
3625
|
-
(0,
|
|
3647
|
+
const ref = (0, import_react16.useRef)(null);
|
|
3648
|
+
const [size, setSize] = (0, import_react16.useState)({ width: 0, height: 0 });
|
|
3649
|
+
(0, import_react16.useLayoutEffect)(() => {
|
|
3626
3650
|
const element = ref.current;
|
|
3627
3651
|
if (!element) return;
|
|
3628
3652
|
const update = () => {
|
|
@@ -3638,7 +3662,7 @@ function useElementSize() {
|
|
|
3638
3662
|
}
|
|
3639
3663
|
|
|
3640
3664
|
// src/hooks/useVirtualRows.ts
|
|
3641
|
-
var
|
|
3665
|
+
var import_react17 = require("react");
|
|
3642
3666
|
function useVirtualRows({
|
|
3643
3667
|
count,
|
|
3644
3668
|
rowHeight,
|
|
@@ -3646,15 +3670,15 @@ function useVirtualRows({
|
|
|
3646
3670
|
enabled = true,
|
|
3647
3671
|
resetKey
|
|
3648
3672
|
}) {
|
|
3649
|
-
const scrollRef = (0,
|
|
3650
|
-
const [scrollTop, setScrollTop] = (0,
|
|
3651
|
-
const [viewportHeight, setViewportHeight] = (0,
|
|
3652
|
-
const scrollToTop = (0,
|
|
3673
|
+
const scrollRef = (0, import_react17.useRef)(null);
|
|
3674
|
+
const [scrollTop, setScrollTop] = (0, import_react17.useState)(0);
|
|
3675
|
+
const [viewportHeight, setViewportHeight] = (0, import_react17.useState)(0);
|
|
3676
|
+
const scrollToTop = (0, import_react17.useCallback)(() => {
|
|
3653
3677
|
setScrollTop(0);
|
|
3654
3678
|
const element = scrollRef.current;
|
|
3655
3679
|
if (element) element.scrollTop = 0;
|
|
3656
3680
|
}, []);
|
|
3657
|
-
(0,
|
|
3681
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3658
3682
|
if (!enabled) return;
|
|
3659
3683
|
const element = scrollRef.current;
|
|
3660
3684
|
if (!element) return;
|
|
@@ -3670,7 +3694,7 @@ function useVirtualRows({
|
|
|
3670
3694
|
observer.disconnect();
|
|
3671
3695
|
};
|
|
3672
3696
|
}, [enabled]);
|
|
3673
|
-
(0,
|
|
3697
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3674
3698
|
if (!enabled) return;
|
|
3675
3699
|
const element = scrollRef.current;
|
|
3676
3700
|
if (element) element.scrollTop = 0;
|
|
@@ -3698,18 +3722,18 @@ function useVirtualRows({
|
|
|
3698
3722
|
|
|
3699
3723
|
// src/components/organisms/data-table/dataTable.tsx
|
|
3700
3724
|
var import_clsx23 = __toESM(require("clsx"), 1);
|
|
3701
|
-
var
|
|
3725
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
3702
3726
|
var import_fa13 = require("react-icons/fa");
|
|
3703
3727
|
var import_md = require("react-icons/md");
|
|
3704
3728
|
|
|
3705
3729
|
// src/components/molecules/pagination/pagination.tsx
|
|
3706
|
-
var
|
|
3730
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
3707
3731
|
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
3708
3732
|
var import_fa10 = require("react-icons/fa");
|
|
3709
3733
|
|
|
3710
3734
|
// src/components/molecules/select/select.tsx
|
|
3711
3735
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
3712
|
-
var
|
|
3736
|
+
var import_react18 = require("react");
|
|
3713
3737
|
var import_fa9 = require("react-icons/fa");
|
|
3714
3738
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3715
3739
|
function ITSelect({
|
|
@@ -3730,8 +3754,8 @@ function ITSelect({
|
|
|
3730
3754
|
readOnly = false,
|
|
3731
3755
|
size = "md"
|
|
3732
3756
|
}) {
|
|
3733
|
-
const [isFocused, setIsFocused] = (0,
|
|
3734
|
-
const [localTouched, setLocalTouched] = (0,
|
|
3757
|
+
const [isFocused, setIsFocused] = (0, import_react18.useState)(false);
|
|
3758
|
+
const [localTouched, setLocalTouched] = (0, import_react18.useState)(false);
|
|
3735
3759
|
const inputTheme = theme.input || {};
|
|
3736
3760
|
const isTouched = touched !== void 0 ? touched : localTouched;
|
|
3737
3761
|
const isEmpty = value === void 0 || value === null || String(value).trim() === "";
|
|
@@ -3825,7 +3849,7 @@ var usePagination = ({
|
|
|
3825
3849
|
currentPage,
|
|
3826
3850
|
siblingCount = 1
|
|
3827
3851
|
}) => {
|
|
3828
|
-
return
|
|
3852
|
+
return import_react19.default.useMemo(() => {
|
|
3829
3853
|
const totalPageNumbers = siblingCount + 5;
|
|
3830
3854
|
if (totalPageNumbers >= totalPages) {
|
|
3831
3855
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
@@ -3993,7 +4017,7 @@ function ITPagination({
|
|
|
3993
4017
|
}
|
|
3994
4018
|
|
|
3995
4019
|
// src/components/molecules/search-select/search-select.tsx
|
|
3996
|
-
var
|
|
4020
|
+
var import_react20 = require("react");
|
|
3997
4021
|
var import_react_dom3 = require("react-dom");
|
|
3998
4022
|
var import_clsx21 = __toESM(require("clsx"), 1);
|
|
3999
4023
|
var import_fa11 = require("react-icons/fa");
|
|
@@ -4022,26 +4046,26 @@ function ITSearchSelect({
|
|
|
4022
4046
|
clearable = true,
|
|
4023
4047
|
onClear
|
|
4024
4048
|
}) {
|
|
4025
|
-
const [isOpen, setIsOpen] = (0,
|
|
4026
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
4027
|
-
const [isFocused, setIsFocused] = (0,
|
|
4028
|
-
const [localTouched, setLocalTouched] = (0,
|
|
4029
|
-
const containerRef = (0,
|
|
4030
|
-
const inputWrapperRef = (0,
|
|
4031
|
-
const timeoutRef = (0,
|
|
4049
|
+
const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
|
|
4050
|
+
const [searchTerm, setSearchTerm] = (0, import_react20.useState)("");
|
|
4051
|
+
const [isFocused, setIsFocused] = (0, import_react20.useState)(false);
|
|
4052
|
+
const [localTouched, setLocalTouched] = (0, import_react20.useState)(false);
|
|
4053
|
+
const containerRef = (0, import_react20.useRef)(null);
|
|
4054
|
+
const inputWrapperRef = (0, import_react20.useRef)(null);
|
|
4055
|
+
const timeoutRef = (0, import_react20.useRef)(null);
|
|
4032
4056
|
const { panelRef, style: panelStyle } = useFloatingPanel(inputWrapperRef, isOpen, {
|
|
4033
4057
|
estimatedHeight: 260,
|
|
4034
4058
|
matchWidth: true
|
|
4035
4059
|
});
|
|
4036
|
-
const selectedOption = (0,
|
|
4060
|
+
const selectedOption = (0, import_react20.useMemo)(() => {
|
|
4037
4061
|
return options.find((opt) => opt[valueField] === value);
|
|
4038
4062
|
}, [options, value, valueField]);
|
|
4039
|
-
(0,
|
|
4063
|
+
(0, import_react20.useEffect)(() => {
|
|
4040
4064
|
if (!isFocused) {
|
|
4041
4065
|
setSearchTerm(selectedOption ? String(selectedOption[labelField]) : "");
|
|
4042
4066
|
}
|
|
4043
4067
|
}, [selectedOption, isFocused, labelField]);
|
|
4044
|
-
(0,
|
|
4068
|
+
(0, import_react20.useEffect)(() => {
|
|
4045
4069
|
function handleClickOutside(event) {
|
|
4046
4070
|
const target = event.target;
|
|
4047
4071
|
const inContainer = containerRef.current?.contains(target);
|
|
@@ -4054,7 +4078,7 @@ function ITSearchSelect({
|
|
|
4054
4078
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4055
4079
|
}, []);
|
|
4056
4080
|
const selectedLabel = selectedOption ? String(selectedOption[labelField]) : "";
|
|
4057
|
-
const filteredOptions = (0,
|
|
4081
|
+
const filteredOptions = (0, import_react20.useMemo)(() => {
|
|
4058
4082
|
if (onSearch) return options;
|
|
4059
4083
|
if (!searchTerm || !isFocused || searchTerm === selectedLabel) return options;
|
|
4060
4084
|
return options.filter(
|
|
@@ -4225,7 +4249,7 @@ function ITSearchSelect({
|
|
|
4225
4249
|
|
|
4226
4250
|
// src/components/molecules/date-picker/datePicker.tsx
|
|
4227
4251
|
var import_clsx22 = __toESM(require("clsx"), 1);
|
|
4228
|
-
var
|
|
4252
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
4229
4253
|
var import_react_dom4 = require("react-dom");
|
|
4230
4254
|
var import_fa12 = require("react-icons/fa");
|
|
4231
4255
|
var import_date_fns2 = require("date-fns");
|
|
@@ -4249,16 +4273,16 @@ function ITDatePicker({
|
|
|
4249
4273
|
maxDate,
|
|
4250
4274
|
range = false
|
|
4251
4275
|
}) {
|
|
4252
|
-
const [isOpen, setIsOpen] = (0,
|
|
4253
|
-
const [inputValue, setInputValue] = (0,
|
|
4254
|
-
const [isValidDate, setIsValidDate] = (0,
|
|
4255
|
-
const [internalRange, setInternalRange] = (0,
|
|
4256
|
-
const wrapperRef = (0,
|
|
4276
|
+
const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
|
|
4277
|
+
const [inputValue, setInputValue] = (0, import_react21.useState)("");
|
|
4278
|
+
const [isValidDate, setIsValidDate] = (0, import_react21.useState)(true);
|
|
4279
|
+
const [internalRange, setInternalRange] = (0, import_react21.useState)([null, null]);
|
|
4280
|
+
const wrapperRef = (0, import_react21.useRef)(null);
|
|
4257
4281
|
const { panelRef, style: panelStyle } = useFloatingPanel(wrapperRef, isOpen, {
|
|
4258
4282
|
estimatedHeight: 360,
|
|
4259
4283
|
matchWidth: false
|
|
4260
4284
|
});
|
|
4261
|
-
const dateRange =
|
|
4285
|
+
const dateRange = import_react21.default.useMemo(() => {
|
|
4262
4286
|
if (range) {
|
|
4263
4287
|
if (Array.isArray(value)) return value;
|
|
4264
4288
|
return internalRange;
|
|
@@ -4266,7 +4290,7 @@ function ITDatePicker({
|
|
|
4266
4290
|
return [value instanceof Date ? value : null, null];
|
|
4267
4291
|
}, [value, range, internalRange]);
|
|
4268
4292
|
const [startDate, endDate] = dateRange;
|
|
4269
|
-
(0,
|
|
4293
|
+
(0, import_react21.useEffect)(() => {
|
|
4270
4294
|
if (range) {
|
|
4271
4295
|
if (startDate && endDate) {
|
|
4272
4296
|
setInputValue(`${formatDate(startDate)} - ${formatDate(endDate)}`);
|
|
@@ -4283,7 +4307,7 @@ function ITDatePicker({
|
|
|
4283
4307
|
}
|
|
4284
4308
|
}
|
|
4285
4309
|
}, [startDate, endDate, range]);
|
|
4286
|
-
(0,
|
|
4310
|
+
(0, import_react21.useEffect)(() => {
|
|
4287
4311
|
const handleClickOutside = (event) => {
|
|
4288
4312
|
const target = event.target;
|
|
4289
4313
|
const inWrapper = wrapperRef.current?.contains(target);
|
|
@@ -4557,11 +4581,11 @@ function ITDataTable({
|
|
|
4557
4581
|
overscan = 5,
|
|
4558
4582
|
stickyHeader = false
|
|
4559
4583
|
}) {
|
|
4560
|
-
const [viewMode, setViewMode] = (0,
|
|
4584
|
+
const [viewMode, setViewMode] = (0, import_react22.useState)(defaultView || "table");
|
|
4561
4585
|
const { ref: rootRef, width: containerWidth } = useElementSize();
|
|
4562
|
-
const [data, setData] = (0,
|
|
4563
|
-
const [totalItems, setTotalItems] = (0,
|
|
4564
|
-
const [isLoading, setIsLoading] = (0,
|
|
4586
|
+
const [data, setData] = (0, import_react22.useState)([]);
|
|
4587
|
+
const [totalItems, setTotalItems] = (0, import_react22.useState)(0);
|
|
4588
|
+
const [isLoading, setIsLoading] = (0, import_react22.useState)(fetchOnMount);
|
|
4565
4589
|
const isFixed = layout === "fixed";
|
|
4566
4590
|
const forcedCards = autoCardBreakpoint > 0 && containerWidth > 0 && containerWidth < autoCardBreakpoint;
|
|
4567
4591
|
const effectiveView = forcedCards ? "cards" : viewMode;
|
|
@@ -4571,7 +4595,7 @@ function ITDataTable({
|
|
|
4571
4595
|
const isStickyHeader = stickyHeader && isTableVirtual;
|
|
4572
4596
|
const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
|
|
4573
4597
|
const columnCount = columns.length;
|
|
4574
|
-
const pinnedMeta =
|
|
4598
|
+
const pinnedMeta = import_react22.default.useMemo(() => getPinnedColumnMeta(columns), [columns]);
|
|
4575
4599
|
const scrollOuterClass = isTableVirtual ? "relative min-h-[200px]" : "overflow-x-auto relative min-h-[200px]";
|
|
4576
4600
|
const {
|
|
4577
4601
|
currentPage,
|
|
@@ -4597,15 +4621,15 @@ function ITDataTable({
|
|
|
4597
4621
|
resetKey: `${currentPage}-${itemsPerPage}`
|
|
4598
4622
|
});
|
|
4599
4623
|
const windowData = isTableVirtual ? data.slice(startIndex, endIndex + 1) : data;
|
|
4600
|
-
const debounceTimerRef = (0,
|
|
4601
|
-
const hasFetchedRef = (0,
|
|
4602
|
-
const fetchDataRef = (0,
|
|
4624
|
+
const debounceTimerRef = (0, import_react22.useRef)(null);
|
|
4625
|
+
const hasFetchedRef = (0, import_react22.useRef)(false);
|
|
4626
|
+
const fetchDataRef = (0, import_react22.useRef)(fetchData);
|
|
4603
4627
|
fetchDataRef.current = fetchData;
|
|
4604
|
-
const externalFiltersRef = (0,
|
|
4628
|
+
const externalFiltersRef = (0, import_react22.useRef)(externalFilters);
|
|
4605
4629
|
externalFiltersRef.current = externalFilters;
|
|
4606
4630
|
const externalKey = JSON.stringify(externalFilters);
|
|
4607
4631
|
const computedTotalPages = Math.ceil(totalItems / itemsPerPage) || 1;
|
|
4608
|
-
const performFetch = (0,
|
|
4632
|
+
const performFetch = (0, import_react22.useCallback)(async () => {
|
|
4609
4633
|
setIsLoading(true);
|
|
4610
4634
|
try {
|
|
4611
4635
|
const response = await fetchDataRef.current({
|
|
@@ -4626,9 +4650,9 @@ function ITDataTable({
|
|
|
4626
4650
|
setIsLoading(false);
|
|
4627
4651
|
}
|
|
4628
4652
|
}, [currentPage, itemsPerPage, filters, sortConfig]);
|
|
4629
|
-
const performFetchRef = (0,
|
|
4653
|
+
const performFetchRef = (0, import_react22.useRef)(performFetch);
|
|
4630
4654
|
performFetchRef.current = performFetch;
|
|
4631
|
-
(0,
|
|
4655
|
+
(0, import_react22.useEffect)(() => {
|
|
4632
4656
|
if (!fetchOnMount && !hasFetchedRef.current) return;
|
|
4633
4657
|
if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);
|
|
4634
4658
|
debounceTimerRef.current = setTimeout(() => {
|
|
@@ -5028,20 +5052,6 @@ var import_fa15 = require("react-icons/fa");
|
|
|
5028
5052
|
// src/components/molecules/form-header/form-header.tsx
|
|
5029
5053
|
var import_fa14 = require("react-icons/fa");
|
|
5030
5054
|
|
|
5031
|
-
// src/theme/theme-context.ts
|
|
5032
|
-
var import_react22 = require("react");
|
|
5033
|
-
var ITThemeContext = (0, import_react22.createContext)(void 0);
|
|
5034
|
-
var useITTheme = () => {
|
|
5035
|
-
const context = (0, import_react22.useContext)(ITThemeContext);
|
|
5036
|
-
if (!context) {
|
|
5037
|
-
throw new Error("useITTheme must be used within an ITThemeProvider");
|
|
5038
|
-
}
|
|
5039
|
-
return context;
|
|
5040
|
-
};
|
|
5041
|
-
var useITThemeSafe = () => {
|
|
5042
|
-
return (0, import_react22.useContext)(ITThemeContext);
|
|
5043
|
-
};
|
|
5044
|
-
|
|
5045
5055
|
// src/utils/color.utils.ts
|
|
5046
5056
|
var isLightColor = (hex) => {
|
|
5047
5057
|
if (!hex || typeof hex !== "string") return false;
|
|
@@ -6607,6 +6617,7 @@ function ITPageHeader({
|
|
|
6607
6617
|
className
|
|
6608
6618
|
}) {
|
|
6609
6619
|
const showTopRow = breadcrumbs?.length || backAction;
|
|
6620
|
+
const flat = useITFlatAppearance();
|
|
6610
6621
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `${className} space-y-3`, children: [
|
|
6611
6622
|
showTopRow && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6612
6623
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
@@ -6625,7 +6636,7 @@ function ITPageHeader({
|
|
|
6625
6636
|
] }),
|
|
6626
6637
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6627
6638
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6628
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6639
|
+
icon && !flat && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6629
6640
|
"div",
|
|
6630
6641
|
{
|
|
6631
6642
|
className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
|
|
@@ -6638,7 +6649,7 @@ function ITPageHeader({
|
|
|
6638
6649
|
ITText,
|
|
6639
6650
|
{
|
|
6640
6651
|
as: "h1",
|
|
6641
|
-
className: "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
|
|
6652
|
+
className: flat ? "text-[1.625rem] font-bold text-slate-900 dark:text-white tracking-tight leading-tight" : "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
|
|
6642
6653
|
children: title
|
|
6643
6654
|
}
|
|
6644
6655
|
),
|
|
@@ -6646,7 +6657,7 @@ function ITPageHeader({
|
|
|
6646
6657
|
ITText,
|
|
6647
6658
|
{
|
|
6648
6659
|
as: "p",
|
|
6649
|
-
className: "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
|
|
6660
|
+
className: flat ? "text-sm font-normal text-slate-500 dark:text-slate-400 mt-0.5 leading-relaxed" : "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
|
|
6650
6661
|
children: description
|
|
6651
6662
|
}
|
|
6652
6663
|
)
|
|
@@ -7663,6 +7674,7 @@ function ITSegmentedControl({
|
|
|
7663
7674
|
|
|
7664
7675
|
// src/components/organisms/sidebar/sidebar.tsx
|
|
7665
7676
|
var import_react35 = require("react");
|
|
7677
|
+
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
7666
7678
|
var import_fa26 = require("react-icons/fa");
|
|
7667
7679
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7668
7680
|
function isSubItemGroup(entry) {
|
|
@@ -7681,8 +7693,11 @@ function ITSidebar({
|
|
|
7681
7693
|
onItemClick,
|
|
7682
7694
|
onSubItemClick,
|
|
7683
7695
|
subitemConnector = "dot",
|
|
7684
|
-
header
|
|
7696
|
+
header,
|
|
7697
|
+
notification,
|
|
7698
|
+
brand
|
|
7685
7699
|
}) {
|
|
7700
|
+
const flat = useITFlatAppearance();
|
|
7686
7701
|
const [expandedItems, setExpandedItems] = (0, import_react35.useState)(/* @__PURE__ */ new Set());
|
|
7687
7702
|
const [isHovering, setIsHovering] = (0, import_react35.useState)(false);
|
|
7688
7703
|
const sidebarRef = (0, import_react35.useRef)(null);
|
|
@@ -7751,7 +7766,7 @@ function ITSidebar({
|
|
|
7751
7766
|
}
|
|
7752
7767
|
};
|
|
7753
7768
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
7754
|
-
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
7769
|
+
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : flat ? "w-[248px]" : "w-[280px]";
|
|
7755
7770
|
const renderSubItem = (subitem) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7756
7771
|
"button",
|
|
7757
7772
|
{
|
|
@@ -7826,6 +7841,87 @@ function ITSidebar({
|
|
|
7826
7841
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { "aria-labelledby": headingId, className: "flex flex-col gap-0", children: group.items.map(renderSubItem) })
|
|
7827
7842
|
] }, group.id);
|
|
7828
7843
|
};
|
|
7844
|
+
const renderNotification = () => {
|
|
7845
|
+
if (!notification) return null;
|
|
7846
|
+
const {
|
|
7847
|
+
count,
|
|
7848
|
+
icon,
|
|
7849
|
+
label = "Notificaciones",
|
|
7850
|
+
onClick,
|
|
7851
|
+
badgeProps
|
|
7852
|
+
} = notification;
|
|
7853
|
+
const { className: badgeClassName, ...badgeRest } = badgeProps ?? {};
|
|
7854
|
+
const badge = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7855
|
+
ITBadget,
|
|
7856
|
+
{
|
|
7857
|
+
color: "danger",
|
|
7858
|
+
size: "sm",
|
|
7859
|
+
...badgeRest,
|
|
7860
|
+
className: (0, import_clsx40.default)("shadow-md", badgeClassName),
|
|
7861
|
+
children: String(count)
|
|
7862
|
+
}
|
|
7863
|
+
);
|
|
7864
|
+
if (isSidebarCollapsed) {
|
|
7865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7866
|
+
"button",
|
|
7867
|
+
{
|
|
7868
|
+
type: "button",
|
|
7869
|
+
"aria-label": label,
|
|
7870
|
+
title: label,
|
|
7871
|
+
onClick,
|
|
7872
|
+
className: "relative flex items-center justify-center w-full p-2 mb-1 rounded-xl transition-all duration-300",
|
|
7873
|
+
style: { color: "var(--it-sidebar-icon-color, var(--color-secondary-500))" },
|
|
7874
|
+
onMouseEnter: (e) => {
|
|
7875
|
+
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7876
|
+
},
|
|
7877
|
+
onMouseLeave: (e) => {
|
|
7878
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
7879
|
+
},
|
|
7880
|
+
children: [
|
|
7881
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "flex items-center justify-center text-[1.05rem]", children: icon }),
|
|
7882
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "absolute top-0.5 right-0.5 pointer-events-none", children: badge })
|
|
7883
|
+
]
|
|
7884
|
+
}
|
|
7885
|
+
);
|
|
7886
|
+
}
|
|
7887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7888
|
+
"button",
|
|
7889
|
+
{
|
|
7890
|
+
type: "button",
|
|
7891
|
+
"aria-label": label,
|
|
7892
|
+
title: label,
|
|
7893
|
+
onClick,
|
|
7894
|
+
className: "flex items-center gap-2.5 w-full text-left px-3 py-2 mb-1 rounded-xl transition-all duration-300",
|
|
7895
|
+
style: { color: "var(--it-sidebar-label-color, var(--color-secondary-600))" },
|
|
7896
|
+
onMouseEnter: (e) => {
|
|
7897
|
+
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7898
|
+
},
|
|
7899
|
+
onMouseLeave: (e) => {
|
|
7900
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
7901
|
+
},
|
|
7902
|
+
children: [
|
|
7903
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7904
|
+
"span",
|
|
7905
|
+
{
|
|
7906
|
+
className: "flex-shrink-0 flex items-center justify-center text-[1.05rem]",
|
|
7907
|
+
style: { color: "var(--it-sidebar-icon-color, #9ca3af)" },
|
|
7908
|
+
children: icon
|
|
7909
|
+
}
|
|
7910
|
+
),
|
|
7911
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7912
|
+
ITText,
|
|
7913
|
+
{
|
|
7914
|
+
as: "span",
|
|
7915
|
+
className: "truncate tracking-wide",
|
|
7916
|
+
style: { fontSize: "0.8rem", fontWeight: 500 },
|
|
7917
|
+
children: label
|
|
7918
|
+
}
|
|
7919
|
+
),
|
|
7920
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ml-auto flex-shrink-0", children: badge })
|
|
7921
|
+
]
|
|
7922
|
+
}
|
|
7923
|
+
);
|
|
7924
|
+
};
|
|
7829
7925
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7830
7926
|
"aside",
|
|
7831
7927
|
{
|
|
@@ -7836,20 +7932,39 @@ function ITSidebar({
|
|
|
7836
7932
|
${sidebarWidth}
|
|
7837
7933
|
${className}
|
|
7838
7934
|
${!visibleOnMobile ? "hidden lg:flex" : "flex"}
|
|
7839
|
-
shadow-[4px_0_32px_rgba(15,23,42,0.04)]
|
|
7935
|
+
${flat ? "" : "shadow-[4px_0_32px_rgba(15,23,42,0.04)]"}
|
|
7840
7936
|
`,
|
|
7841
7937
|
style: {
|
|
7842
7938
|
zIndex: 50,
|
|
7843
7939
|
backgroundColor: "var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))",
|
|
7844
7940
|
borderRight: "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
|
|
7845
|
-
WebkitBackdropFilter: "blur(12px)",
|
|
7846
|
-
backdropFilter: "blur(12px)"
|
|
7941
|
+
...flat ? {} : { WebkitBackdropFilter: "blur(12px)", backdropFilter: "blur(12px)" }
|
|
7847
7942
|
},
|
|
7848
7943
|
children: [
|
|
7944
|
+
brand && (brand.logo || brand.text) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7945
|
+
"div",
|
|
7946
|
+
{
|
|
7947
|
+
className: `flex items-center flex-shrink-0 h-[64px] ${isSidebarCollapsed ? "justify-center px-2" : "gap-2.5 px-7"}`,
|
|
7948
|
+
children: [
|
|
7949
|
+
brand.logo && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex-shrink-0 flex items-center", children: brand.logo }),
|
|
7950
|
+
brand.text && !isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7951
|
+
ITText,
|
|
7952
|
+
{
|
|
7953
|
+
as: "span",
|
|
7954
|
+
className: "text-[1.05rem] font-bold tracking-tight truncate",
|
|
7955
|
+
style: { color: "var(--it-sidebar-brand-color, var(--it-sidebar-label-color, var(--color-secondary-900)))" },
|
|
7956
|
+
children: brand.text
|
|
7957
|
+
}
|
|
7958
|
+
)
|
|
7959
|
+
]
|
|
7960
|
+
}
|
|
7961
|
+
),
|
|
7849
7962
|
header && !isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-4 pt-4 pb-1 flex-shrink-0", children: header }),
|
|
7963
|
+
notification && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-4 pt-3 flex-shrink-0", children: renderNotification() }),
|
|
7850
7964
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("nav", { "aria-label": "Componentes de la librer\xEDa", className: "flex-1 py-4 overflow-y-auto overflow-x-hidden custom-scrollbar px-4", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
7851
7965
|
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
7852
7966
|
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
7967
|
+
const { className: badgeClassName, ...badgeRest } = item.badgeProps ?? {};
|
|
7853
7968
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { className: "relative group/navitem", children: [
|
|
7854
7969
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7855
7970
|
"div",
|
|
@@ -7866,8 +7981,8 @@ function ITSidebar({
|
|
|
7866
7981
|
`,
|
|
7867
7982
|
style: {
|
|
7868
7983
|
backgroundColor: item.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
7869
|
-
boxShadow: item.isActive ? "var(--shadow-xs)" : "none",
|
|
7870
|
-
border: item.isActive ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "1px solid transparent"
|
|
7984
|
+
boxShadow: item.isActive && !flat ? "var(--shadow-xs)" : "none",
|
|
7985
|
+
border: item.isActive && !flat ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "1px solid transparent"
|
|
7871
7986
|
},
|
|
7872
7987
|
onMouseEnter: (e) => {
|
|
7873
7988
|
if (!item.isActive) e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
@@ -7883,7 +7998,7 @@ function ITSidebar({
|
|
|
7883
7998
|
}
|
|
7884
7999
|
},
|
|
7885
8000
|
children: [
|
|
7886
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8001
|
+
item.isActive && !isSidebarCollapsed && !flat && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7887
8002
|
"div",
|
|
7888
8003
|
{
|
|
7889
8004
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
@@ -7898,8 +8013,8 @@ function ITSidebar({
|
|
|
7898
8013
|
style: {
|
|
7899
8014
|
color: item.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, #9ca3af)",
|
|
7900
8015
|
opacity: item.isActive ? 1 : 0.8,
|
|
7901
|
-
fontSize: item.isActive ? "1.12rem" : "1.05rem",
|
|
7902
|
-
filter: item.isActive ? "drop-shadow(0 0 8px rgba(255,255,255,0.2))" : "none"
|
|
8016
|
+
fontSize: flat ? "1rem" : item.isActive ? "1.12rem" : "1.05rem",
|
|
8017
|
+
filter: item.isActive && !flat ? "drop-shadow(0 0 8px rgba(255,255,255,0.2))" : "none"
|
|
7903
8018
|
},
|
|
7904
8019
|
children: item.icon
|
|
7905
8020
|
}
|
|
@@ -7911,7 +8026,7 @@ function ITSidebar({
|
|
|
7911
8026
|
className: `transition-all duration-300 truncate tracking-wide`,
|
|
7912
8027
|
style: {
|
|
7913
8028
|
color: item.isActive ? "var(--it-sidebar-active-color, #ffffff)" : "var(--it-sidebar-label-color, var(--color-secondary-300))",
|
|
7914
|
-
fontSize: "0.8rem",
|
|
8029
|
+
fontSize: flat ? "0.875rem" : "0.8rem",
|
|
7915
8030
|
fontWeight: item.isActive ? "600" : "500"
|
|
7916
8031
|
},
|
|
7917
8032
|
children: item.label
|
|
@@ -7926,19 +8041,18 @@ function ITSidebar({
|
|
|
7926
8041
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_fa26.FaChevronDown, { className: "w-3 h-3" })
|
|
7927
8042
|
}
|
|
7928
8043
|
),
|
|
7929
|
-
item.badge && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7930
|
-
|
|
8044
|
+
item.badge != null && item.badge !== "" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
8045
|
+
ITBadget,
|
|
7931
8046
|
{
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
children: isSidebarCollapsed ? "" : item.badge
|
|
8047
|
+
color: "primary",
|
|
8048
|
+
size: "sm",
|
|
8049
|
+
...badgeRest,
|
|
8050
|
+
className: (0, import_clsx40.default)(
|
|
8051
|
+
"absolute shadow-md",
|
|
8052
|
+
isSidebarCollapsed ? "top-0.5 right-0.5" : "right-3 top-1/2 -translate-y-1/2",
|
|
8053
|
+
badgeClassName
|
|
8054
|
+
),
|
|
8055
|
+
children: String(item.badge)
|
|
7942
8056
|
}
|
|
7943
8057
|
)
|
|
7944
8058
|
]
|
|
@@ -8004,7 +8118,7 @@ function ITSidebar({
|
|
|
8004
8118
|
|
|
8005
8119
|
// src/components/atoms/slide/slide.tsx
|
|
8006
8120
|
var import_react36 = require("react");
|
|
8007
|
-
var
|
|
8121
|
+
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
8008
8122
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
8009
8123
|
function ITSlideToggle({
|
|
8010
8124
|
onToggle,
|
|
@@ -8062,7 +8176,7 @@ function ITSlideToggle({
|
|
|
8062
8176
|
"div",
|
|
8063
8177
|
{
|
|
8064
8178
|
onClick: toggleSwitch,
|
|
8065
|
-
className: (0,
|
|
8179
|
+
className: (0, import_clsx41.default)(
|
|
8066
8180
|
"flex items-center rounded-full p-1 transition-colors duration-300",
|
|
8067
8181
|
container,
|
|
8068
8182
|
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
@@ -8081,7 +8195,7 @@ function ITSlideToggle({
|
|
|
8081
8195
|
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8082
8196
|
"div",
|
|
8083
8197
|
{
|
|
8084
|
-
className: (0,
|
|
8198
|
+
className: (0, import_clsx41.default)(
|
|
8085
8199
|
"bg-white rounded-full shadow-md transform transition-transform duration-300 pointer-events-none",
|
|
8086
8200
|
knob,
|
|
8087
8201
|
isOn ? translate : "translate-x-0"
|
|
@@ -8093,7 +8207,7 @@ function ITSlideToggle({
|
|
|
8093
8207
|
}
|
|
8094
8208
|
|
|
8095
8209
|
// src/components/atoms/slider/slider.tsx
|
|
8096
|
-
var
|
|
8210
|
+
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
8097
8211
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
8098
8212
|
function ITSlider({
|
|
8099
8213
|
value,
|
|
@@ -8105,7 +8219,7 @@ function ITSlider({
|
|
|
8105
8219
|
disabled = false,
|
|
8106
8220
|
className
|
|
8107
8221
|
}) {
|
|
8108
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: (0,
|
|
8222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: (0, import_clsx42.default)("flex flex-col gap-1.5", className), children: [
|
|
8109
8223
|
label && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ITText, { as: "label", className: "text-xs font-semibold text-secondary-600 dark:text-secondary-400", children: [
|
|
8110
8224
|
label,
|
|
8111
8225
|
": ",
|
|
@@ -8121,7 +8235,7 @@ function ITSlider({
|
|
|
8121
8235
|
value,
|
|
8122
8236
|
onChange: (e) => onChange(Number(e.target.value)),
|
|
8123
8237
|
disabled,
|
|
8124
|
-
className: (0,
|
|
8238
|
+
className: (0, import_clsx42.default)(
|
|
8125
8239
|
"w-full h-1.5 appearance-none rounded-full outline-none cursor-pointer",
|
|
8126
8240
|
"bg-secondary-200 dark:bg-secondary-700",
|
|
8127
8241
|
"accent-primary-500",
|
|
@@ -8141,7 +8255,7 @@ function ITSlider({
|
|
|
8141
8255
|
}
|
|
8142
8256
|
|
|
8143
8257
|
// src/components/molecules/stat-card/stat-card.tsx
|
|
8144
|
-
var
|
|
8258
|
+
var import_clsx43 = __toESM(require("clsx"), 1);
|
|
8145
8259
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
8146
8260
|
var trendColors = {
|
|
8147
8261
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
@@ -8162,7 +8276,7 @@ function ITStatCard({
|
|
|
8162
8276
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
8163
8277
|
"div",
|
|
8164
8278
|
{
|
|
8165
|
-
className: (0,
|
|
8279
|
+
className: (0, import_clsx43.default)("rounded-xl p-4 border border-slate-100 dark:border-slate-800", color, className),
|
|
8166
8280
|
style,
|
|
8167
8281
|
onClick,
|
|
8168
8282
|
role: onClick ? "button" : void 0,
|
|
@@ -8174,7 +8288,7 @@ function ITStatCard({
|
|
|
8174
8288
|
] }),
|
|
8175
8289
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-baseline gap-2", children: [
|
|
8176
8290
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8177
|
-
trend && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: (0,
|
|
8291
|
+
trend && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: (0, import_clsx43.default)("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
8178
8292
|
] })
|
|
8179
8293
|
]
|
|
8180
8294
|
}
|
|
@@ -8182,7 +8296,7 @@ function ITStatCard({
|
|
|
8182
8296
|
}
|
|
8183
8297
|
|
|
8184
8298
|
// src/components/molecules/table/table.tsx
|
|
8185
|
-
var
|
|
8299
|
+
var import_clsx44 = __toESM(require("clsx"), 1);
|
|
8186
8300
|
var import_react37 = __toESM(require("react"), 1);
|
|
8187
8301
|
var import_fa27 = require("react-icons/fa");
|
|
8188
8302
|
var import_md2 = require("react-icons/md");
|
|
@@ -8353,7 +8467,7 @@ function ITTable({
|
|
|
8353
8467
|
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8354
8468
|
"div",
|
|
8355
8469
|
{
|
|
8356
|
-
className: (0,
|
|
8470
|
+
className: (0, import_clsx44.default)(
|
|
8357
8471
|
"absolute top-0.5 w-4 h-4 rounded-full transition-all duration-300 shadow-sm",
|
|
8358
8472
|
{
|
|
8359
8473
|
"left-0.5 bg-secondary-400": currentValue === void 0,
|
|
@@ -8544,7 +8658,7 @@ function ITTable({
|
|
|
8544
8658
|
event.preventDefault();
|
|
8545
8659
|
onRowClick(row, event);
|
|
8546
8660
|
};
|
|
8547
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ref: rootRef, className: (0,
|
|
8661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ref: rootRef, className: (0, import_clsx44.default)("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: tableContainer, style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8548
8662
|
title && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8549
8663
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8550
8664
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
@@ -8601,7 +8715,7 @@ function ITTable({
|
|
|
8601
8715
|
effectiveView === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8602
8716
|
"div",
|
|
8603
8717
|
{
|
|
8604
|
-
className: (0,
|
|
8718
|
+
className: (0, import_clsx44.default)(tableCardHover, onRowClick && tableCardClickable),
|
|
8605
8719
|
role: onRowClick ? "button" : void 0,
|
|
8606
8720
|
tabIndex: onRowClick ? 0 : void 0,
|
|
8607
8721
|
onClick: onRowClick ? handleRowClick(row) : void 0,
|
|
@@ -8609,7 +8723,7 @@ function ITTable({
|
|
|
8609
8723
|
children: renderCard ? renderCard(row) : renderDefaultCard(row)
|
|
8610
8724
|
},
|
|
8611
8725
|
i
|
|
8612
|
-
)) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0,
|
|
8726
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0, import_clsx44.default)(tableEmptyContent, "py-12"), children: [
|
|
8613
8727
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8614
8728
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8615
8729
|
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -8621,7 +8735,7 @@ function ITTable({
|
|
|
8621
8735
|
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8622
8736
|
"table",
|
|
8623
8737
|
{
|
|
8624
|
-
className: (0,
|
|
8738
|
+
className: (0, import_clsx44.default)(
|
|
8625
8739
|
tableLayoutClass,
|
|
8626
8740
|
showVerticalBorder && "[&_th]:border-r [&_th:last-child]:border-r-0 [&_td]:border-r [&_td:last-child]:border-r-0",
|
|
8627
8741
|
showVerticalBorder && (verticalBorderClassname || "[&_th]:border-slate-100 dark:[&_th]:border-slate-700/30 [&_td]:border-slate-100 dark:[&_td]:border-slate-700/30"),
|
|
@@ -8641,7 +8755,7 @@ function ITTable({
|
|
|
8641
8755
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8642
8756
|
"tr",
|
|
8643
8757
|
{
|
|
8644
|
-
className: (0,
|
|
8758
|
+
className: (0, import_clsx44.default)(tableHeaderRow, "dark:text-slate-200"),
|
|
8645
8759
|
"aria-rowindex": isTableVirtual ? 1 : void 0,
|
|
8646
8760
|
children: columns.map((col) => {
|
|
8647
8761
|
const pin = pinnedMeta[col.key];
|
|
@@ -8650,7 +8764,7 @@ function ITTable({
|
|
|
8650
8764
|
"th",
|
|
8651
8765
|
{
|
|
8652
8766
|
scope: "col",
|
|
8653
|
-
className: (0,
|
|
8767
|
+
className: (0, import_clsx44.default)(
|
|
8654
8768
|
tableHeaderCell(col.className, density),
|
|
8655
8769
|
col.align && tableAlignClasses[col.align],
|
|
8656
8770
|
isPinned && "sticky",
|
|
@@ -8684,7 +8798,7 @@ function ITTable({
|
|
|
8684
8798
|
})
|
|
8685
8799
|
}
|
|
8686
8800
|
) }),
|
|
8687
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tbody", { className: (0,
|
|
8801
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tbody", { className: (0, import_clsx44.default)(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
8688
8802
|
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8689
8803
|
windowData.map((row, windowIndex) => {
|
|
8690
8804
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
@@ -8692,7 +8806,7 @@ function ITTable({
|
|
|
8692
8806
|
"tr",
|
|
8693
8807
|
{
|
|
8694
8808
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
8695
|
-
className: (0,
|
|
8809
|
+
className: (0, import_clsx44.default)(
|
|
8696
8810
|
tableRow,
|
|
8697
8811
|
variant === "striped" && absoluteIndex % 2 === 0 && "bg-secondary-50/40 dark:bg-slate-800/20",
|
|
8698
8812
|
onRowClick && tableRowClickable
|
|
@@ -8708,7 +8822,7 @@ function ITTable({
|
|
|
8708
8822
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8709
8823
|
"td",
|
|
8710
8824
|
{
|
|
8711
|
-
className: (0,
|
|
8825
|
+
className: (0, import_clsx44.default)(
|
|
8712
8826
|
tableCell(col.className, density),
|
|
8713
8827
|
col.align && tableAlignClasses[col.align],
|
|
8714
8828
|
isPinned && "sticky bg-[var(--color-table-rowBg,white)] group-hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))]",
|
|
@@ -8720,7 +8834,7 @@ function ITTable({
|
|
|
8720
8834
|
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8721
8835
|
} : void 0,
|
|
8722
8836
|
title: truncateTitle,
|
|
8723
|
-
children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0,
|
|
8837
|
+
children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_clsx44.default)(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
8724
8838
|
},
|
|
8725
8839
|
`${absoluteIndex}-${col.key}`
|
|
8726
8840
|
);
|
|
@@ -8756,7 +8870,7 @@ function ITTable({
|
|
|
8756
8870
|
}
|
|
8757
8871
|
|
|
8758
8872
|
// src/components/atoms/textarea/textarea.tsx
|
|
8759
|
-
var
|
|
8873
|
+
var import_clsx45 = __toESM(require("clsx"), 1);
|
|
8760
8874
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8761
8875
|
var resizeMap = {
|
|
8762
8876
|
none: "resize-none",
|
|
@@ -8777,7 +8891,7 @@ function ITTextarea({
|
|
|
8777
8891
|
maxLength,
|
|
8778
8892
|
resize = "vertical"
|
|
8779
8893
|
}) {
|
|
8780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: (0,
|
|
8894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: (0, import_clsx45.default)("flex flex-col gap-1.5", className), children: [
|
|
8781
8895
|
label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8782
8896
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8783
8897
|
"textarea",
|
|
@@ -8790,7 +8904,7 @@ function ITTextarea({
|
|
|
8790
8904
|
rows,
|
|
8791
8905
|
disabled,
|
|
8792
8906
|
maxLength,
|
|
8793
|
-
className: (0,
|
|
8907
|
+
className: (0, import_clsx45.default)(
|
|
8794
8908
|
"w-full border border-solid transition-all duration-200 rounded-lg px-3 py-2 text-sm outline-none",
|
|
8795
8909
|
"focus:ring-2",
|
|
8796
8910
|
resizeMap[resize],
|
|
@@ -8805,7 +8919,7 @@ function ITTextarea({
|
|
|
8805
8919
|
|
|
8806
8920
|
// src/components/molecules/tabs/tabs.tsx
|
|
8807
8921
|
var import_react38 = require("react");
|
|
8808
|
-
var
|
|
8922
|
+
var import_clsx46 = require("clsx");
|
|
8809
8923
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8810
8924
|
var ITTabs = ({
|
|
8811
8925
|
items,
|
|
@@ -8822,8 +8936,8 @@ var ITTabs = ({
|
|
|
8822
8936
|
if (onChange) onChange(id);
|
|
8823
8937
|
};
|
|
8824
8938
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8825
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0,
|
|
8826
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0,
|
|
8939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0, import_clsx46.clsx)("w-full", containerClassName), children: [
|
|
8940
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx46.clsx)(
|
|
8827
8941
|
"flex border-secondary-200 mb-4",
|
|
8828
8942
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8829
8943
|
className
|
|
@@ -8834,7 +8948,7 @@ var ITTabs = ({
|
|
|
8834
8948
|
{
|
|
8835
8949
|
onClick: () => handleTabClick(item.id, item.disabled),
|
|
8836
8950
|
disabled: item.disabled,
|
|
8837
|
-
className: (0,
|
|
8951
|
+
className: (0, import_clsx46.clsx)(
|
|
8838
8952
|
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
|
|
8839
8953
|
// LINE VARIANT
|
|
8840
8954
|
variant === "line" && [
|
|
@@ -8862,7 +8976,7 @@ var ITTabs = ({
|
|
|
8862
8976
|
var tabs_default = ITTabs;
|
|
8863
8977
|
|
|
8864
8978
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8865
|
-
var
|
|
8979
|
+
var import_clsx47 = __toESM(require("clsx"), 1);
|
|
8866
8980
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8867
8981
|
var colorMap2 = {
|
|
8868
8982
|
primary: "text-primary-600",
|
|
@@ -8885,14 +8999,14 @@ var ITTripleFilter = ({
|
|
|
8885
8999
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8886
9000
|
"div",
|
|
8887
9001
|
{
|
|
8888
|
-
className: (0,
|
|
9002
|
+
className: (0, import_clsx47.default)("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8889
9003
|
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8890
9004
|
"button",
|
|
8891
9005
|
{
|
|
8892
9006
|
onClick: () => onChange(option.value),
|
|
8893
|
-
className: (0,
|
|
9007
|
+
className: (0, import_clsx47.default)(
|
|
8894
9008
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8895
|
-
value === option.value ? (0,
|
|
9009
|
+
value === option.value ? (0, import_clsx47.default)("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8896
9010
|
),
|
|
8897
9011
|
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ITText, { as: "span", children: option.label })
|
|
8898
9012
|
},
|
|
@@ -8914,7 +9028,7 @@ var positionStyles = {
|
|
|
8914
9028
|
};
|
|
8915
9029
|
|
|
8916
9030
|
// src/components/organisms/toast/toast.tsx
|
|
8917
|
-
var
|
|
9031
|
+
var import_clsx48 = __toESM(require("clsx"), 1);
|
|
8918
9032
|
var import_react39 = require("react");
|
|
8919
9033
|
var import_fa28 = require("react-icons/fa");
|
|
8920
9034
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
@@ -8960,7 +9074,7 @@ function ITToast({
|
|
|
8960
9074
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
8961
9075
|
"div",
|
|
8962
9076
|
{
|
|
8963
|
-
className: (0,
|
|
9077
|
+
className: (0, import_clsx48.default)(
|
|
8964
9078
|
"fixed z-[80] p-4 rounded-xl shadow-xl flex items-center justify-between gap-4 transition-all duration-300 text-white min-w-[300px]",
|
|
8965
9079
|
positionStyles[position],
|
|
8966
9080
|
{
|
|
@@ -8993,7 +9107,7 @@ function ITToast({
|
|
|
8993
9107
|
|
|
8994
9108
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
8995
9109
|
var import_react41 = require("react");
|
|
8996
|
-
var
|
|
9110
|
+
var import_clsx50 = __toESM(require("clsx"), 1);
|
|
8997
9111
|
var import_fa29 = require("react-icons/fa");
|
|
8998
9112
|
|
|
8999
9113
|
// src/components/molecules/wysiwyg/wysiwyg.props.ts
|
|
@@ -9009,7 +9123,7 @@ var toolbarActions = [
|
|
|
9009
9123
|
|
|
9010
9124
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
9011
9125
|
var import_react40 = require("react");
|
|
9012
|
-
var
|
|
9126
|
+
var import_clsx49 = __toESM(require("clsx"), 1);
|
|
9013
9127
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
9014
9128
|
var positionClasses2 = {
|
|
9015
9129
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
@@ -9042,14 +9156,14 @@ function ITTooltip({
|
|
|
9042
9156
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
9043
9157
|
"div",
|
|
9044
9158
|
{
|
|
9045
|
-
className: (0,
|
|
9159
|
+
className: (0, import_clsx49.default)("relative inline-flex", className),
|
|
9046
9160
|
onMouseEnter: handleMouseEnter,
|
|
9047
9161
|
onMouseLeave: handleMouseLeave,
|
|
9048
9162
|
children: [
|
|
9049
9163
|
children,
|
|
9050
|
-
visible && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0,
|
|
9164
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx49.default)("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
9051
9165
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "bg-slate-800 dark:bg-slate-700 text-white text-xs rounded-lg px-2.5 py-1.5 whitespace-nowrap shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ITText, { as: "span", children: content }) }),
|
|
9052
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0,
|
|
9166
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0, import_clsx49.default)("absolute", arrowClasses[position]) })
|
|
9053
9167
|
] })
|
|
9054
9168
|
]
|
|
9055
9169
|
}
|
|
@@ -9493,7 +9607,7 @@ function ITWysiwyg({
|
|
|
9493
9607
|
"aria-pressed": isActive,
|
|
9494
9608
|
onMouseDown: (e) => e.preventDefault(),
|
|
9495
9609
|
onClick: () => runAction(action),
|
|
9496
|
-
className: (0,
|
|
9610
|
+
className: (0, import_clsx50.default)(
|
|
9497
9611
|
"flex h-8 w-8 items-center justify-center rounded-md text-[13px] transition-colors",
|
|
9498
9612
|
isActive ? "bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300" : "text-secondary-500 hover:bg-secondary-200/70 hover:text-secondary-800 dark:text-secondary-400 dark:hover:bg-slate-700 dark:hover:text-secondary-200",
|
|
9499
9613
|
isLocked && "cursor-not-allowed opacity-40"
|
|
@@ -9507,7 +9621,7 @@ function ITWysiwyg({
|
|
|
9507
9621
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
9508
9622
|
"div",
|
|
9509
9623
|
{
|
|
9510
|
-
className: (0,
|
|
9624
|
+
className: (0, import_clsx50.default)(
|
|
9511
9625
|
"w-full border border-solid rounded-lg overflow-hidden transition-all duration-200",
|
|
9512
9626
|
error ? "ring-2 ring-danger-100 border-danger-500" : "border-secondary-300 focus-within:ring-2 focus-within:border-primary-500 focus-within:ring-primary-100",
|
|
9513
9627
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
@@ -9516,7 +9630,7 @@ function ITWysiwyg({
|
|
|
9516
9630
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
9517
9631
|
"div",
|
|
9518
9632
|
{
|
|
9519
|
-
className: (0,
|
|
9633
|
+
className: (0, import_clsx50.default)(
|
|
9520
9634
|
"flex flex-wrap items-center gap-0.5 px-1.5 py-1 border-b border-secondary-200 bg-secondary-50 dark:bg-slate-800",
|
|
9521
9635
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9522
9636
|
),
|
|
@@ -9543,7 +9657,7 @@ function ITWysiwyg({
|
|
|
9543
9657
|
focusedRef.current = false;
|
|
9544
9658
|
emitChange();
|
|
9545
9659
|
},
|
|
9546
|
-
className: (0,
|
|
9660
|
+
className: (0, import_clsx50.default)(
|
|
9547
9661
|
"outline-none bg-white dark:bg-slate-900 text-secondary-800 dark:text-secondary-200",
|
|
9548
9662
|
"empty:before:content-[attr(data-placeholder)] empty:before:text-secondary-400 empty:before:pointer-events-none empty:before:select-none",
|
|
9549
9663
|
"[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-5 [&_ol]:pl-5 [&_li]:ml-4",
|
|
@@ -9567,7 +9681,7 @@ function ITWysiwyg({
|
|
|
9567
9681
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9568
9682
|
var import_react42 = require("react");
|
|
9569
9683
|
var import_react_dropzone = require("react-dropzone");
|
|
9570
|
-
var
|
|
9684
|
+
var import_clsx51 = __toESM(require("clsx"), 1);
|
|
9571
9685
|
|
|
9572
9686
|
// src/components/organisms/dropfile/dropfile.props.ts
|
|
9573
9687
|
var FileTypeEnum = /* @__PURE__ */ ((FileTypeEnum2) => {
|
|
@@ -9870,7 +9984,7 @@ var ITDropfile = ({
|
|
|
9870
9984
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9871
9985
|
] })
|
|
9872
9986
|
] }) }),
|
|
9873
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: (0,
|
|
9987
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: (0, import_clsx51.default)("relative bg-secondary-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9874
9988
|
"img",
|
|
9875
9989
|
{
|
|
9876
9990
|
src: imagePreview,
|
|
@@ -9934,7 +10048,7 @@ var ITDropfile = ({
|
|
|
9934
10048
|
] }) });
|
|
9935
10049
|
if (view === "button") {
|
|
9936
10050
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9937
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0,
|
|
10051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx51.default)("inline-block", containerClassName), children: [
|
|
9938
10052
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9939
10053
|
ITButton,
|
|
9940
10054
|
{
|
|
@@ -9956,7 +10070,7 @@ var ITDropfile = ({
|
|
|
9956
10070
|
] }) })
|
|
9957
10071
|
] });
|
|
9958
10072
|
}
|
|
9959
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0,
|
|
10073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx51.default)("w-full transition-all duration-300", containerClassName), children: [
|
|
9960
10074
|
headerRow,
|
|
9961
10075
|
dropZoneOrPreview
|
|
9962
10076
|
] });
|
|
@@ -9965,7 +10079,7 @@ var dropfile_default = ITDropfile;
|
|
|
9965
10079
|
|
|
9966
10080
|
// src/components/templates/layout/layout.tsx
|
|
9967
10081
|
var import_react44 = require("react");
|
|
9968
|
-
var
|
|
10082
|
+
var import_clsx52 = __toESM(require("clsx"), 1);
|
|
9969
10083
|
|
|
9970
10084
|
// src/components/organisms/topbar/topbar.tsx
|
|
9971
10085
|
var import_fa30 = require("react-icons/fa");
|
|
@@ -9980,21 +10094,24 @@ function ITTopBar({
|
|
|
9980
10094
|
showMobileMenuButton,
|
|
9981
10095
|
onToggleMobileMenu,
|
|
9982
10096
|
navItems,
|
|
9983
|
-
onNavItemClick
|
|
10097
|
+
onNavItemClick,
|
|
10098
|
+
hideBrandOnDesktop = false
|
|
9984
10099
|
}) {
|
|
10100
|
+
const flat = useITFlatAppearance();
|
|
10101
|
+
const initials = (userMenu?.userName ?? "").trim().split(/\s+/).slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
|
|
9985
10102
|
const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react43.useState)(false);
|
|
9986
10103
|
const userMenuRef = (0, import_react43.useRef)(null);
|
|
9987
10104
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9988
10105
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9989
10106
|
"header",
|
|
9990
10107
|
{
|
|
9991
|
-
className:
|
|
10108
|
+
className: `sticky top-0 z-40 transition-all duration-300 ${flat ? "" : "backdrop-blur-md"}`,
|
|
9992
10109
|
style: {
|
|
9993
10110
|
backgroundColor: "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
|
|
9994
10111
|
borderBottom: "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
|
|
9995
|
-
boxShadow: "var(--shadow-xs)"
|
|
10112
|
+
boxShadow: flat ? "none" : "var(--shadow-xs)"
|
|
9996
10113
|
},
|
|
9997
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className:
|
|
10114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `flex items-center justify-between px-6 lg:px-8 ${flat ? "h-[64px]" : "h-[72px]"}`, children: [
|
|
9998
10115
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-5", children: [
|
|
9999
10116
|
showMobileMenuButton && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10000
10117
|
"button",
|
|
@@ -10009,7 +10126,7 @@ function ITTopBar({
|
|
|
10009
10126
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_fa30.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
10010
10127
|
}
|
|
10011
10128
|
),
|
|
10012
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className:
|
|
10129
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `items-center gap-3 ${hideBrandOnDesktop ? "flex lg:hidden" : "flex"}`, children: [
|
|
10013
10130
|
logo && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
10014
10131
|
logoText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10015
10132
|
ITText,
|
|
@@ -10043,7 +10160,7 @@ function ITTopBar({
|
|
|
10043
10160
|
item.id
|
|
10044
10161
|
)) })
|
|
10045
10162
|
] }),
|
|
10046
|
-
centerContent && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className:
|
|
10163
|
+
centerContent && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: `hidden lg:flex flex-1 min-w-0 items-center ${hideBrandOnDesktop ? "justify-start pr-4" : "justify-center px-4"}`, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
|
|
10047
10164
|
(children || userMenu) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10048
10165
|
children,
|
|
10049
10166
|
userMenu && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "relative", children: [
|
|
@@ -10051,7 +10168,7 @@ function ITTopBar({
|
|
|
10051
10168
|
"button",
|
|
10052
10169
|
{
|
|
10053
10170
|
type: "button",
|
|
10054
|
-
className:
|
|
10171
|
+
className: `flex items-center gap-3 rounded-full py-1.5 transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)] border border-transparent hover:border-secondary-200 ${flat ? "flex-row-reverse pl-4 pr-2" : "pl-2 pr-4"}`,
|
|
10055
10172
|
style: {
|
|
10056
10173
|
backgroundColor: isUserMenuOpen ? "var(--it-topbar-user-hover, #f1f5f9)" : "transparent"
|
|
10057
10174
|
},
|
|
@@ -10071,10 +10188,21 @@ function ITTopBar({
|
|
|
10071
10188
|
src: userMenu.userImage,
|
|
10072
10189
|
alt: "Current user"
|
|
10073
10190
|
}
|
|
10191
|
+
) : flat && initials ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10192
|
+
"div",
|
|
10193
|
+
{
|
|
10194
|
+
"aria-hidden": "true",
|
|
10195
|
+
className: "w-9 h-9 rounded-full flex items-center justify-center text-[0.8rem] font-semibold",
|
|
10196
|
+
style: {
|
|
10197
|
+
backgroundColor: "color-mix(in srgb, var(--color-primary, #3b82f6) 14%, transparent)",
|
|
10198
|
+
color: "var(--color-primary, #2563eb)"
|
|
10199
|
+
},
|
|
10200
|
+
children: initials
|
|
10201
|
+
}
|
|
10074
10202
|
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_fa30.FaUserCircle, { className: "w-6 h-6", style: { color: "var(--it-topbar-icon, #94a3b8)" } }) }),
|
|
10075
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
10203
|
+
!flat && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
10076
10204
|
] }),
|
|
10077
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className:
|
|
10205
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `hidden sm:flex flex-col py-0.5 ${flat ? "text-right" : "text-left"}`, children: [
|
|
10078
10206
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
10079
10207
|
ITText,
|
|
10080
10208
|
{
|
|
@@ -10155,75 +10283,102 @@ function ITLayout({
|
|
|
10155
10283
|
sidebar,
|
|
10156
10284
|
children,
|
|
10157
10285
|
className = "",
|
|
10158
|
-
contentClassName = ""
|
|
10286
|
+
contentClassName = "",
|
|
10287
|
+
sidebarFullHeight = false
|
|
10159
10288
|
}) {
|
|
10160
10289
|
const [internalCollapsed, setInternalCollapsed] = (0, import_react44.useState)(true);
|
|
10161
10290
|
const [mobileSidebarOpen, setMobileSidebarOpen] = (0, import_react44.useState)(false);
|
|
10291
|
+
const flat = useITFlatAppearance();
|
|
10162
10292
|
const isControlled = sidebar.isCollapsed !== void 0;
|
|
10163
10293
|
const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
|
|
10164
10294
|
const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
|
|
10165
10295
|
}) : () => setInternalCollapsed((v) => !v);
|
|
10166
10296
|
const layoutTokens = theme.layout;
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10297
|
+
const reservedWidth = desktopCollapsed ? "w-[88px]" : flat ? "w-[248px]" : "w-[280px]";
|
|
10298
|
+
const brand = sidebarFullHeight ? sidebar.brand ?? { logo: topBar.logo, text: topBar.logoText } : sidebar.brand;
|
|
10299
|
+
const topBarNode = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10300
|
+
ITTopBar,
|
|
10301
|
+
{
|
|
10302
|
+
...topBar,
|
|
10303
|
+
hideBrandOnDesktop: sidebarFullHeight || topBar.hideBrandOnDesktop,
|
|
10304
|
+
showMobileMenuButton: true,
|
|
10305
|
+
onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
|
|
10306
|
+
}
|
|
10307
|
+
);
|
|
10308
|
+
const desktopSidebar = (
|
|
10309
|
+
// Full-height: the sidebar sits beside the top bar, so it needs to win the
|
|
10310
|
+
// stacking order when the collapsed rail expands over the content on hover.
|
|
10311
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `hidden lg:block relative h-full ${sidebarFullHeight ? "z-50" : "z-40"}`, children: [
|
|
10312
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `${reservedWidth} h-full flex-shrink-0` }),
|
|
10313
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10314
|
+
ITSidebar,
|
|
10315
|
+
{
|
|
10316
|
+
...sidebar,
|
|
10317
|
+
brand,
|
|
10318
|
+
isCollapsed: desktopCollapsed,
|
|
10319
|
+
onToggleCollapse: handleToggleCollapse,
|
|
10320
|
+
visibleOnMobile: false,
|
|
10321
|
+
className: `h-full ${flat ? "" : "drop-shadow-2xl"} transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0`
|
|
10322
|
+
}
|
|
10323
|
+
) })
|
|
10324
|
+
] })
|
|
10325
|
+
);
|
|
10326
|
+
const mobileSidebar = mobileSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10327
|
+
"div",
|
|
10328
|
+
{
|
|
10329
|
+
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10330
|
+
onClick: () => setMobileSidebarOpen(false),
|
|
10331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10332
|
+
"div",
|
|
10333
|
+
{
|
|
10334
|
+
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10335
|
+
onClick: (e) => e.stopPropagation(),
|
|
10336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10337
|
+
ITSidebar,
|
|
10338
|
+
{
|
|
10339
|
+
...sidebar,
|
|
10340
|
+
brand,
|
|
10341
|
+
isCollapsed: false,
|
|
10342
|
+
visibleOnMobile: true,
|
|
10343
|
+
className: "h-full shadow-2xl relative z-[60]",
|
|
10344
|
+
onToggleCollapse: () => setMobileSidebarOpen(false),
|
|
10345
|
+
onItemClick: () => setMobileSidebarOpen(false),
|
|
10346
|
+
onSubItemClick: () => setMobileSidebarOpen(false)
|
|
10347
|
+
}
|
|
10348
|
+
)
|
|
10349
|
+
}
|
|
10350
|
+
)
|
|
10351
|
+
}
|
|
10352
|
+
);
|
|
10353
|
+
const main = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: (0, import_clsx52.default)("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) });
|
|
10354
|
+
if (sidebarFullHeight) {
|
|
10355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
10356
|
+
"div",
|
|
10170
10357
|
{
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10358
|
+
className: `flex h-screen overflow-hidden w-full relative ${className}`,
|
|
10359
|
+
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10360
|
+
children: [
|
|
10361
|
+
desktopSidebar,
|
|
10362
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 overflow-hidden", children: [
|
|
10363
|
+
topBarNode,
|
|
10364
|
+
main
|
|
10365
|
+
] }),
|
|
10366
|
+
mobileSidebar
|
|
10367
|
+
]
|
|
10174
10368
|
}
|
|
10175
|
-
)
|
|
10369
|
+
);
|
|
10370
|
+
}
|
|
10371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
10372
|
+
topBarNode,
|
|
10176
10373
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
10177
10374
|
"div",
|
|
10178
10375
|
{
|
|
10179
10376
|
className: "flex flex-1 overflow-hidden relative",
|
|
10180
10377
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10181
10378
|
children: [
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
{
|
|
10186
|
-
className: `${desktopCollapsed ? "w-[88px]" : "w-[280px]"} h-full flex-shrink-0`
|
|
10187
|
-
}
|
|
10188
|
-
),
|
|
10189
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10190
|
-
ITSidebar,
|
|
10191
|
-
{
|
|
10192
|
-
...sidebar,
|
|
10193
|
-
isCollapsed: desktopCollapsed,
|
|
10194
|
-
onToggleCollapse: handleToggleCollapse,
|
|
10195
|
-
visibleOnMobile: false,
|
|
10196
|
-
className: "h-full drop-shadow-2xl transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0"
|
|
10197
|
-
}
|
|
10198
|
-
) })
|
|
10199
|
-
] }),
|
|
10200
|
-
mobileSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10201
|
-
"div",
|
|
10202
|
-
{
|
|
10203
|
-
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10204
|
-
onClick: () => setMobileSidebarOpen(false),
|
|
10205
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10206
|
-
"div",
|
|
10207
|
-
{
|
|
10208
|
-
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10209
|
-
onClick: (e) => e.stopPropagation(),
|
|
10210
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10211
|
-
ITSidebar,
|
|
10212
|
-
{
|
|
10213
|
-
...sidebar,
|
|
10214
|
-
isCollapsed: false,
|
|
10215
|
-
visibleOnMobile: true,
|
|
10216
|
-
className: "h-full shadow-2xl relative z-[60]",
|
|
10217
|
-
onToggleCollapse: () => setMobileSidebarOpen(false),
|
|
10218
|
-
onItemClick: () => setMobileSidebarOpen(false),
|
|
10219
|
-
onSubItemClick: () => setMobileSidebarOpen(false)
|
|
10220
|
-
}
|
|
10221
|
-
)
|
|
10222
|
-
}
|
|
10223
|
-
)
|
|
10224
|
-
}
|
|
10225
|
-
),
|
|
10226
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: (0, import_clsx51.default)("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
10379
|
+
desktopSidebar,
|
|
10380
|
+
mobileSidebar,
|
|
10381
|
+
main
|
|
10227
10382
|
]
|
|
10228
10383
|
}
|
|
10229
10384
|
)
|
|
@@ -10316,7 +10471,7 @@ function ITLoader({
|
|
|
10316
10471
|
}
|
|
10317
10472
|
|
|
10318
10473
|
// src/components/molecules/stepper/stepper.tsx
|
|
10319
|
-
var
|
|
10474
|
+
var import_clsx53 = __toESM(require("clsx"), 1);
|
|
10320
10475
|
var import_react45 = require("react");
|
|
10321
10476
|
var import_fa31 = require("react-icons/fa");
|
|
10322
10477
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
@@ -10393,7 +10548,7 @@ function ITStepper({
|
|
|
10393
10548
|
}
|
|
10394
10549
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10395
10550
|
};
|
|
10396
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: (0,
|
|
10551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: (0, import_clsx53.default)("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10397
10552
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "relative mb-8", children: [
|
|
10398
10553
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10399
10554
|
"div",
|
|
@@ -10428,7 +10583,7 @@ function ITStepper({
|
|
|
10428
10583
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10429
10584
|
"div",
|
|
10430
10585
|
{
|
|
10431
|
-
className: (0,
|
|
10586
|
+
className: (0, import_clsx53.default)(
|
|
10432
10587
|
"flex items-center justify-center w-11 h-11 rounded-full border-2 transition-all duration-300 transform",
|
|
10433
10588
|
hasIcon && "p-2",
|
|
10434
10589
|
isCompleted && "bg-slate-400 border-slate-400 text-white scale-100 shadow",
|
|
@@ -10443,7 +10598,7 @@ function ITStepper({
|
|
|
10443
10598
|
ITText,
|
|
10444
10599
|
{
|
|
10445
10600
|
as: "span",
|
|
10446
|
-
className: (0,
|
|
10601
|
+
className: (0, import_clsx53.default)(
|
|
10447
10602
|
"mt-2 text-xs sm:text-sm font-medium transition-colors text-center",
|
|
10448
10603
|
isCompleted ? "text-slate-400" : !isActive && "text-secondary-400"
|
|
10449
10604
|
),
|
|
@@ -10464,7 +10619,7 @@ function ITStepper({
|
|
|
10464
10619
|
tabIndex: -1,
|
|
10465
10620
|
role: "region",
|
|
10466
10621
|
"aria-labelledby": `step-${currentStep}`,
|
|
10467
|
-
className: (0,
|
|
10622
|
+
className: (0, import_clsx53.default)(
|
|
10468
10623
|
stepClassName,
|
|
10469
10624
|
"bg-white border border-secondary-100 rounded-2xl shadow-lg min-h-[280px] transition-transform duration-400 no-scrollbar p-6",
|
|
10470
10625
|
scrollableContent && "overflow-y-auto hide-scrollbar"
|
|
@@ -10783,7 +10938,8 @@ function ITThemeProvider({
|
|
|
10783
10938
|
showFab = true,
|
|
10784
10939
|
density = 1,
|
|
10785
10940
|
radius,
|
|
10786
|
-
shadow
|
|
10941
|
+
shadow,
|
|
10942
|
+
appearance = "soft"
|
|
10787
10943
|
}) {
|
|
10788
10944
|
const [palette2, setPaletteState] = (0, import_react46.useState)(() => {
|
|
10789
10945
|
const basePalette = {
|
|
@@ -10896,6 +11052,11 @@ function ITThemeProvider({
|
|
|
10896
11052
|
root.style.fontSize = "";
|
|
10897
11053
|
};
|
|
10898
11054
|
}, [density]);
|
|
11055
|
+
(0, import_react46.useLayoutEffect)(() => {
|
|
11056
|
+
const root = document.documentElement;
|
|
11057
|
+
root.setAttribute("data-it-appearance", appearance);
|
|
11058
|
+
return () => root.removeAttribute("data-it-appearance");
|
|
11059
|
+
}, [appearance]);
|
|
10899
11060
|
(0, import_react46.useLayoutEffect)(() => {
|
|
10900
11061
|
const root = document.documentElement;
|
|
10901
11062
|
const radiusTokens = ["xs", "sm", "md", "lg", "xl", "2xl", "3xl"];
|
|
@@ -12177,7 +12338,8 @@ function ITThemeProvider({
|
|
|
12177
12338
|
applyPreset,
|
|
12178
12339
|
resolvedTheme,
|
|
12179
12340
|
darkModeMode,
|
|
12180
|
-
setDarkModeMode
|
|
12341
|
+
setDarkModeMode,
|
|
12342
|
+
appearance
|
|
12181
12343
|
},
|
|
12182
12344
|
children: [
|
|
12183
12345
|
children,
|
|
@@ -12438,6 +12600,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
|
|
|
12438
12600
|
useDebouncedSearch,
|
|
12439
12601
|
useEditableRow,
|
|
12440
12602
|
useFloatingPanel,
|
|
12603
|
+
useITFlatAppearance,
|
|
12441
12604
|
useITTheme,
|
|
12442
12605
|
useITThemeSafe,
|
|
12443
12606
|
useTableState
|