@beweco/aurora-ui 0.1.9 → 0.1.11
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +133 -8
- package/dist/index.esm.js +129 -11
- package/dist/types/components/autocomplete/AutoComplete.d.ts +3 -3
- package/dist/types/components/autocomplete/AutoComplete.d.ts.map +1 -1
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts +1 -1
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts.map +1 -1
- package/dist/types/components/autocomplete/index.d.ts +2 -2
- package/dist/types/components/autocomplete/index.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +29 -0
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/types/components/breadcrumbs/Breadcrumbs.types.d.ts +43 -0
- package/dist/types/components/breadcrumbs/Breadcrumbs.types.d.ts.map +1 -0
- package/dist/types/components/breadcrumbs/index.d.ts +3 -0
- package/dist/types/components/breadcrumbs/index.d.ts.map +1 -0
- package/dist/types/components/chip/Chip.d.ts +8 -0
- package/dist/types/components/chip/Chip.d.ts.map +1 -0
- package/dist/types/components/chip/Chip.types.d.ts +7 -0
- package/dist/types/components/chip/Chip.types.d.ts.map +1 -0
- package/dist/types/components/chip/index.d.ts +3 -0
- package/dist/types/components/chip/index.d.ts.map +1 -0
- package/dist/types/components/header/Header.d.ts.map +1 -1
- package/dist/types/components/header/Header.types.d.ts +5 -0
- package/dist/types/components/header/Header.types.d.ts.map +1 -1
- package/dist/types/components/header/index.d.ts +1 -1
- package/dist/types/components/header/index.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.d.ts.map +1 -1
- package/dist/types/components/navigation-loading-overlay/NavigationLoadingOverlay.d.ts +8 -0
- package/dist/types/components/navigation-loading-overlay/NavigationLoadingOverlay.d.ts.map +1 -0
- package/dist/types/components/navigation-loading-overlay/NavigationLoadingOverlay.types.d.ts +4 -0
- package/dist/types/components/navigation-loading-overlay/NavigationLoadingOverlay.types.d.ts.map +1 -0
- package/dist/types/components/navigation-loading-overlay/index.d.ts +3 -0
- package/dist/types/components/navigation-loading-overlay/index.d.ts.map +1 -0
- package/dist/types/components/search-input/SearchInput.d.ts +14 -0
- package/dist/types/components/search-input/SearchInput.d.ts.map +1 -0
- package/dist/types/components/search-input/SearchInput.types.d.ts +15 -0
- package/dist/types/components/search-input/SearchInput.types.d.ts.map +1 -0
- package/dist/types/components/search-input/index.d.ts +3 -0
- package/dist/types/components/search-input/index.d.ts.map +1 -0
- package/dist/types/contexts/navigation-loading/index.d.ts +3 -0
- package/dist/types/contexts/navigation-loading/index.d.ts.map +1 -0
- package/dist/types/contexts/navigation-loading/navigation-loading.context.d.ts +4 -0
- package/dist/types/contexts/navigation-loading/navigation-loading.context.d.ts.map +1 -0
- package/dist/types/contexts/navigation-loading/navigation-loading.context.type.d.ts +6 -0
- package/dist/types/contexts/navigation-loading/navigation-loading.context.type.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/providers/navigation-loading/index.d.ts +2 -0
- package/dist/types/providers/navigation-loading/index.d.ts.map +1 -0
- package/dist/types/providers/navigation-loading/navigation-loading-provider.d.ts +6 -0
- package/dist/types/providers/navigation-loading/navigation-loading-provider.d.ts.map +1 -0
- package/package.json +2 -4
package/dist/index.cjs.js
CHANGED
|
@@ -230,7 +230,7 @@ var H2 = function (_a) {
|
|
|
230
230
|
|
|
231
231
|
var P = function (_a) {
|
|
232
232
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
233
|
-
return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-
|
|
233
|
+
return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-tiny text-default-500 font-normal", className) }, props, { children: children })));
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
var defaultTranslations$6 = {
|
|
@@ -360,7 +360,7 @@ var AnalyticsCard = function (_a) {
|
|
|
360
360
|
};
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
|
-
*
|
|
363
|
+
* AuraAutocomplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
364
364
|
*
|
|
365
365
|
* Reglas aplicadas:
|
|
366
366
|
* - Variant: Bordered (por defecto)
|
|
@@ -368,7 +368,7 @@ var AnalyticsCard = function (_a) {
|
|
|
368
368
|
* - labelPlacement: Outside
|
|
369
369
|
* - Size: sm, md, lg (configurable)
|
|
370
370
|
*/
|
|
371
|
-
var
|
|
371
|
+
var AuraAutocomplete = function (_a) {
|
|
372
372
|
var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "size", "variant", "radius"]);
|
|
373
373
|
var generatedId = React.useId();
|
|
374
374
|
var autoId = id || generatedId;
|
|
@@ -920,6 +920,37 @@ var ColorSelector = function (_a) {
|
|
|
920
920
|
: "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
|
|
921
921
|
};
|
|
922
922
|
|
|
923
|
+
/**
|
|
924
|
+
* Chip - Componente para mostrar etiquetas o badges
|
|
925
|
+
* basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
926
|
+
*/
|
|
927
|
+
var Chip = function (_a) {
|
|
928
|
+
var _b = _a.color, color = _b === void 0 ? "default" : _b, props = __rest(_a, ["color"]);
|
|
929
|
+
// Colores estándar de HeroUI
|
|
930
|
+
var standardColors = [
|
|
931
|
+
"default",
|
|
932
|
+
"primary",
|
|
933
|
+
"secondary",
|
|
934
|
+
"success",
|
|
935
|
+
"warning",
|
|
936
|
+
"danger",
|
|
937
|
+
];
|
|
938
|
+
// Si es un color estándar, usar HeroUI normalmente
|
|
939
|
+
if (standardColors.includes(color)) {
|
|
940
|
+
return (jsxRuntime.jsx(react.Chip, __assign({}, props, { color: color, onClose: props.onClose })));
|
|
941
|
+
}
|
|
942
|
+
// Si es un color personalizado, aplicar clases CSS específicas
|
|
943
|
+
var customColorClasses = {
|
|
944
|
+
red: "bg-red-100 text-red-500",
|
|
945
|
+
purple: "bg-purple-100 text-purple-500",
|
|
946
|
+
blue: "bg-blue-100 text-blue-500",
|
|
947
|
+
green: "bg-green-100 text-green-500",
|
|
948
|
+
orange: "bg-orange-100 text-orange-500",
|
|
949
|
+
};
|
|
950
|
+
var colorClasses = customColorClasses[color];
|
|
951
|
+
return (jsxRuntime.jsx(react.Chip, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
|
|
952
|
+
};
|
|
953
|
+
|
|
923
954
|
// Traducciones por defecto en español
|
|
924
955
|
var defaultTranslations$5 = {
|
|
925
956
|
dayOption: "Día específico",
|
|
@@ -991,6 +1022,38 @@ var H4 = function (_a) {
|
|
|
991
1022
|
return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium ", className) }, props, { children: children })));
|
|
992
1023
|
};
|
|
993
1024
|
|
|
1025
|
+
/**
|
|
1026
|
+
* Breadcrumbs - Wrapper simple del componente HeroUI Breadcrumbs
|
|
1027
|
+
*
|
|
1028
|
+
* Este componente es un wrapper directo del componente Breadcrumbs de HeroUI,
|
|
1029
|
+
* proporcionando una interfaz simplificada y consistente con el resto de la librería.
|
|
1030
|
+
*
|
|
1031
|
+
* @example
|
|
1032
|
+
* ```tsx
|
|
1033
|
+
* // Uso básico
|
|
1034
|
+
* <Breadcrumbs>
|
|
1035
|
+
* <BreadcrumbItem href="/">Inicio</BreadcrumbItem>
|
|
1036
|
+
* <BreadcrumbItem href="/products">Productos</BreadcrumbItem>
|
|
1037
|
+
* <BreadcrumbItem>Detalle</BreadcrumbItem>
|
|
1038
|
+
* </Breadcrumbs>
|
|
1039
|
+
*
|
|
1040
|
+
* // Con items como prop
|
|
1041
|
+
* <Breadcrumbs
|
|
1042
|
+
* items={[
|
|
1043
|
+
* { label: "Inicio", href: "/" },
|
|
1044
|
+
* { label: "Productos", href: "/products" },
|
|
1045
|
+
* { label: "Detalle", isCurrent: true }
|
|
1046
|
+
* ]}
|
|
1047
|
+
* />
|
|
1048
|
+
* ```
|
|
1049
|
+
*/
|
|
1050
|
+
var BreadcrumbsComponent = function (_a) {
|
|
1051
|
+
var items = _a.items, children = _a.children, heroUIProps = __rest(_a, ["items", "children"]);
|
|
1052
|
+
return (jsxRuntime.jsx(react.Breadcrumbs, __assign({}, heroUIProps, { children: items
|
|
1053
|
+
? items.map(function (item, index) { return (jsxRuntime.jsx(react.BreadcrumbItem, { href: item.href, isCurrent: item.isCurrent, children: item.label }, "".concat(item.href || item.label, "-").concat(index))); })
|
|
1054
|
+
: children })));
|
|
1055
|
+
};
|
|
1056
|
+
|
|
994
1057
|
var ConfigMenu = function (_a) {
|
|
995
1058
|
var _b;
|
|
996
1059
|
var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
|
|
@@ -1009,8 +1072,8 @@ var NotificationButton = function (_a) {
|
|
|
1009
1072
|
NotificationButton.displayName = "NotificationButton";
|
|
1010
1073
|
|
|
1011
1074
|
var HeaderComponent = function (_a) {
|
|
1012
|
-
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations;
|
|
1013
|
-
return (jsxRuntime.
|
|
1075
|
+
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations, breadcrumbs = _a.breadcrumbs;
|
|
1076
|
+
return (jsxRuntime.jsx("header", { className: "header__container", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(BreadcrumbsComponent, { items: breadcrumbs }))] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }) }));
|
|
1014
1077
|
};
|
|
1015
1078
|
HeaderComponent.displayName = "Header";
|
|
1016
1079
|
|
|
@@ -1381,7 +1444,7 @@ var stepperClasses = react.cn(
|
|
|
1381
1444
|
// dark
|
|
1382
1445
|
"dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
|
|
1383
1446
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
1384
|
-
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
1447
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
1385
1448
|
var handleOverlayClick = function (e) {
|
|
1386
1449
|
if (e.target === e.currentTarget) {
|
|
1387
1450
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
@@ -2020,6 +2083,23 @@ var ScheduleRow = function (_a) {
|
|
|
2020
2083
|
return (jsxRuntime.jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsxRuntime.jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsxRuntime.jsx(react.Chip, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? translations.open : translations.closed })] }), jsxRuntime.jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsxRuntime.jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), jsxRuntime.jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: translations.copyToAll })] })] }), daySchedule.isOpen && (jsxRuntime.jsxs("div", { className: "flex flex-col justify-around gap-y-3 ", children: [daySchedule.timeSlots.map(function (slot, index) { return (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-1", children: [jsxRuntime.jsx(TimeInput, { label: translations.from, className: "w-full", value: toTimeValue(slot.from), onChange: function (value) { return handleTimeChange(index, "from", value); }, isInvalid: !!slot.error }), jsxRuntime.jsx("span", { className: "text-default-900 xs:hidden xl:block", children: "-" }), jsxRuntime.jsx(TimeInput, { label: translations.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), jsxRuntime.jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: daySchedule.timeSlots.length === 1, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline" }) })] }, "".concat(day, "-timeslot-").concat(slot.from, "-").concat(slot.to, "-").concat(index))); }), daySchedule.timeSlots.length < 2 && (jsxRuntime.jsx(Button, { size: "sm", variant: "flat", onPress: function () { return handleAddTimeSlot(); }, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-outline" }), children: translations.addTimeSlot }))] }))] }, day));
|
|
2021
2084
|
};
|
|
2022
2085
|
|
|
2086
|
+
/**
|
|
2087
|
+
* SearchInput component - A specialized input field for search functionality
|
|
2088
|
+
*
|
|
2089
|
+
* Features:
|
|
2090
|
+
* - Built on top of the base Input component
|
|
2091
|
+
* - Includes a search icon by default
|
|
2092
|
+
* - Optimized for search use cases
|
|
2093
|
+
* - Follows BeweOS design guidelines
|
|
2094
|
+
*/
|
|
2095
|
+
var SearchInput = function (_a) {
|
|
2096
|
+
var _b = _a.searchPlaceholder, searchPlaceholder = _b === void 0 ? "Buscar..." : _b, _c = _a.searchIcon, searchIcon = _c === void 0 ? "solar:magnifer-outline" : _c, iconProps = _a.iconProps, onSearchChange = _a.onSearchChange, searchValue = _a.searchValue, value = _a.value, onValueChange = _a.onValueChange, placeholder = _a.placeholder, _d = _a.size, size = _d === void 0 ? "sm" : _d, _e = _a.className, className = _e === void 0 ? "flex-1 max-w-xs min-w-52" : _e, props = __rest(_a, ["searchPlaceholder", "searchIcon", "iconProps", "onSearchChange", "searchValue", "value", "onValueChange", "placeholder", "size", "className"]);
|
|
2097
|
+
// Use searchValue/onSearchChange if provided, otherwise fall back to value/onValueChange
|
|
2098
|
+
var inputValue = searchValue !== null && searchValue !== void 0 ? searchValue : value;
|
|
2099
|
+
var handleValueChange = onSearchChange !== null && onSearchChange !== void 0 ? onSearchChange : onValueChange;
|
|
2100
|
+
return (jsxRuntime.jsx(Input, __assign({}, props, { className: className, size: size, placeholder: placeholder || searchPlaceholder, value: inputValue, onValueChange: handleValueChange, endContent: jsxRuntime.jsx(IconComponent, __assign({ icon: searchIcon, className: "text-default-400", size: "sm" }, iconProps)) })));
|
|
2101
|
+
};
|
|
2102
|
+
|
|
2023
2103
|
/**
|
|
2024
2104
|
* Select genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
2025
2105
|
*
|
|
@@ -2615,6 +2695,18 @@ var UploadFile = function (_a) {
|
|
|
2615
2695
|
};
|
|
2616
2696
|
UploadFile.displayName = "UploadFile";
|
|
2617
2697
|
|
|
2698
|
+
/**
|
|
2699
|
+
* Loading overlay elegante que bloquea la interacción durante la navegación
|
|
2700
|
+
* Proporciona feedback visual moderno y no intrusivo
|
|
2701
|
+
*/
|
|
2702
|
+
var NavigationLoadingOverlay = function (_a) {
|
|
2703
|
+
var isVisible = _a.isVisible;
|
|
2704
|
+
if (!isVisible) {
|
|
2705
|
+
return null;
|
|
2706
|
+
}
|
|
2707
|
+
return (jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [jsxRuntime.jsx("div", { className: "absolute inset-0 bg-black/10 backdrop-blur-sm" }), jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-4", children: jsxRuntime.jsx(react.Spinner, { size: "lg", color: "primary", className: "drop-shadow-sm" }) })] }));
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2618
2710
|
var Modal = function (props) {
|
|
2619
2711
|
return (jsxRuntime.jsx(react.Modal, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
|
|
2620
2712
|
};
|
|
@@ -2728,7 +2820,7 @@ var AuraToastProvider = function (_a) {
|
|
|
2728
2820
|
title: "",
|
|
2729
2821
|
description: "",
|
|
2730
2822
|
color: "primary",
|
|
2731
|
-
duration:
|
|
2823
|
+
duration: 8000,
|
|
2732
2824
|
}), toast = _b[0], setToast = _b[1];
|
|
2733
2825
|
var timerRef = React.useRef(null);
|
|
2734
2826
|
var hideToast = React.useCallback(function () {
|
|
@@ -2760,13 +2852,41 @@ var AuraToastProvider = function (_a) {
|
|
|
2760
2852
|
return (jsxRuntime.jsx(ToastContext.Provider, { value: { toast: toast, showToast: showToast, hideToast: hideToast }, children: children }));
|
|
2761
2853
|
};
|
|
2762
2854
|
|
|
2855
|
+
var NavigationLoadingContext = React.createContext(undefined);
|
|
2856
|
+
var useNavigationLoading = function () {
|
|
2857
|
+
var context = React.useContext(NavigationLoadingContext);
|
|
2858
|
+
if (!context) {
|
|
2859
|
+
throw new Error("useNavigationLoading must be used within a NavigationLoadingProvider");
|
|
2860
|
+
}
|
|
2861
|
+
return context;
|
|
2862
|
+
};
|
|
2863
|
+
|
|
2864
|
+
var NavigationLoadingProvider = function (_a) {
|
|
2865
|
+
var children = _a.children;
|
|
2866
|
+
var _b = React.useState(false), isVisible = _b[0], setIsVisible = _b[1];
|
|
2867
|
+
var showNavigationLoading = React.useCallback(function (_loadingMessage) {
|
|
2868
|
+
setIsVisible(true);
|
|
2869
|
+
}, []);
|
|
2870
|
+
var hideNavigationLoading = React.useCallback(function () {
|
|
2871
|
+
setIsVisible(false);
|
|
2872
|
+
}, []);
|
|
2873
|
+
var value = {
|
|
2874
|
+
showNavigationLoading: showNavigationLoading,
|
|
2875
|
+
hideNavigationLoading: hideNavigationLoading,
|
|
2876
|
+
isNavigationLoading: isVisible,
|
|
2877
|
+
};
|
|
2878
|
+
return (jsxRuntime.jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsxRuntime.jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2763
2881
|
exports.AddHolidayForm = AddHolidayForm;
|
|
2764
2882
|
exports.AnalyticsCard = AnalyticsCard;
|
|
2883
|
+
exports.AuraAutocomplete = AuraAutocomplete;
|
|
2765
2884
|
exports.AuraTable = AuraTable;
|
|
2766
2885
|
exports.AuraToastProvider = AuraToastProvider;
|
|
2767
|
-
exports.
|
|
2886
|
+
exports.BreadcrumbsComponent = BreadcrumbsComponent;
|
|
2768
2887
|
exports.Button = Button;
|
|
2769
2888
|
exports.Card = Card;
|
|
2889
|
+
exports.Chip = Chip;
|
|
2770
2890
|
exports.ColorSelector = ColorSelector;
|
|
2771
2891
|
exports.DatePicker = DatePicker;
|
|
2772
2892
|
exports.DateRangePicker = DateRangePicker;
|
|
@@ -2786,12 +2906,16 @@ exports.ModalContent = ModalContent;
|
|
|
2786
2906
|
exports.ModalFooter = ModalFooter;
|
|
2787
2907
|
exports.ModalHeader = ModalHeader;
|
|
2788
2908
|
exports.MultiStepWizard = MultiStepWizard;
|
|
2909
|
+
exports.NavigationLoadingContext = NavigationLoadingContext;
|
|
2910
|
+
exports.NavigationLoadingOverlay = NavigationLoadingOverlay;
|
|
2911
|
+
exports.NavigationLoadingProvider = NavigationLoadingProvider;
|
|
2789
2912
|
exports.P = P;
|
|
2790
2913
|
exports.Pagination = Pagination;
|
|
2791
2914
|
exports.Phone = Phone;
|
|
2792
2915
|
exports.PromotionalBanner = PromotionalBanner;
|
|
2793
2916
|
exports.RowSteps = RowSteps;
|
|
2794
2917
|
exports.ScheduleRow = ScheduleRow;
|
|
2918
|
+
exports.SearchInput = SearchInput;
|
|
2795
2919
|
exports.Select = Select;
|
|
2796
2920
|
exports.StepIndicator = StepIndicator;
|
|
2797
2921
|
exports.SwitchComponent = Switch;
|
|
@@ -2806,6 +2930,7 @@ exports.VerticalSteps = VerticalSteps;
|
|
|
2806
2930
|
exports.sizeMap = sizeMap;
|
|
2807
2931
|
exports.themeColors = themeColors;
|
|
2808
2932
|
exports.useAuraToast = useAuraToast;
|
|
2933
|
+
exports.useNavigationLoading = useNavigationLoading;
|
|
2809
2934
|
exports.useThemeContext = useThemeContext;
|
|
2810
2935
|
Object.keys(react).forEach(function (k) {
|
|
2811
2936
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button as Button$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Chip, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, DropdownSection, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, Accordion, AccordionItem, ListboxSection, Avatar, CardBody, CardFooter, Pagination as Pagination$1, Link, Switch as Switch$1, TimeInput as TimeInput$1, Select as Select$1, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Textarea as Textarea$1, Alert, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, Slider, ModalFooter as ModalFooter$1 } from '@heroui/react';
|
|
1
|
+
import { Button as Button$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Chip as Chip$1, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, Breadcrumbs, BreadcrumbItem, DropdownSection, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, Accordion, AccordionItem, ListboxSection, Avatar, CardBody, CardFooter, Pagination as Pagination$1, Link, Switch as Switch$1, TimeInput as TimeInput$1, Select as Select$1, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Textarea as Textarea$1, Alert, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, Slider, ModalFooter as ModalFooter$1, Spinner } from '@heroui/react';
|
|
2
2
|
export * from '@heroui/react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import React, { useId, useState, useCallback, useMemo, createContext, useContext, createElement, useRef, useEffect, useLayoutEffect } from 'react';
|
|
@@ -229,7 +229,7 @@ var H2 = function (_a) {
|
|
|
229
229
|
|
|
230
230
|
var P = function (_a) {
|
|
231
231
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
232
|
-
return (jsx("p", __assign({ className: cn("text-
|
|
232
|
+
return (jsx("p", __assign({ className: cn("text-tiny text-default-500 font-normal", className) }, props, { children: children })));
|
|
233
233
|
};
|
|
234
234
|
|
|
235
235
|
var defaultTranslations$6 = {
|
|
@@ -319,7 +319,7 @@ var AnalyticsCard = function (_a) {
|
|
|
319
319
|
"bg-default-100": activeChart === key,
|
|
320
320
|
}), onClick: function () { return handleChartChange(key); }, children: [jsx("span", { className: cn("text-small text-default-500 font-medium transition-colors", {
|
|
321
321
|
"text-primary": activeChart === key,
|
|
322
|
-
}), children: title }), jsxs("div", { className: "flex items-center gap-x-3", children: [jsx("span", { className: "text-foreground text-2xl font-bold", children: formatValue(value, type) }), jsx(Chip, { classNames: {
|
|
322
|
+
}), children: title }), jsxs("div", { className: "flex items-center gap-x-3", children: [jsx("span", { className: "text-foreground text-2xl font-bold", children: formatValue(value, type) }), jsx(Chip$1, { classNames: {
|
|
323
323
|
content: "font-medium",
|
|
324
324
|
}, color: changeType === "positive"
|
|
325
325
|
? "success"
|
|
@@ -359,7 +359,7 @@ var AnalyticsCard = function (_a) {
|
|
|
359
359
|
};
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
|
-
*
|
|
362
|
+
* AuraAutocomplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
363
363
|
*
|
|
364
364
|
* Reglas aplicadas:
|
|
365
365
|
* - Variant: Bordered (por defecto)
|
|
@@ -367,7 +367,7 @@ var AnalyticsCard = function (_a) {
|
|
|
367
367
|
* - labelPlacement: Outside
|
|
368
368
|
* - Size: sm, md, lg (configurable)
|
|
369
369
|
*/
|
|
370
|
-
var
|
|
370
|
+
var AuraAutocomplete = function (_a) {
|
|
371
371
|
var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "size", "variant", "radius"]);
|
|
372
372
|
var generatedId = useId();
|
|
373
373
|
var autoId = id || generatedId;
|
|
@@ -919,6 +919,37 @@ var ColorSelector = function (_a) {
|
|
|
919
919
|
: "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
|
|
920
920
|
};
|
|
921
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Chip - Componente para mostrar etiquetas o badges
|
|
924
|
+
* basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
925
|
+
*/
|
|
926
|
+
var Chip = function (_a) {
|
|
927
|
+
var _b = _a.color, color = _b === void 0 ? "default" : _b, props = __rest(_a, ["color"]);
|
|
928
|
+
// Colores estándar de HeroUI
|
|
929
|
+
var standardColors = [
|
|
930
|
+
"default",
|
|
931
|
+
"primary",
|
|
932
|
+
"secondary",
|
|
933
|
+
"success",
|
|
934
|
+
"warning",
|
|
935
|
+
"danger",
|
|
936
|
+
];
|
|
937
|
+
// Si es un color estándar, usar HeroUI normalmente
|
|
938
|
+
if (standardColors.includes(color)) {
|
|
939
|
+
return (jsx(Chip$1, __assign({}, props, { color: color, onClose: props.onClose })));
|
|
940
|
+
}
|
|
941
|
+
// Si es un color personalizado, aplicar clases CSS específicas
|
|
942
|
+
var customColorClasses = {
|
|
943
|
+
red: "bg-red-100 text-red-500",
|
|
944
|
+
purple: "bg-purple-100 text-purple-500",
|
|
945
|
+
blue: "bg-blue-100 text-blue-500",
|
|
946
|
+
green: "bg-green-100 text-green-500",
|
|
947
|
+
orange: "bg-orange-100 text-orange-500",
|
|
948
|
+
};
|
|
949
|
+
var colorClasses = customColorClasses[color];
|
|
950
|
+
return (jsx(Chip$1, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
|
|
951
|
+
};
|
|
952
|
+
|
|
922
953
|
// Traducciones por defecto en español
|
|
923
954
|
var defaultTranslations$5 = {
|
|
924
955
|
dayOption: "Día específico",
|
|
@@ -990,6 +1021,38 @@ var H4 = function (_a) {
|
|
|
990
1021
|
return (jsx("h4", __assign({ className: cn("text-sm font-medium ", className) }, props, { children: children })));
|
|
991
1022
|
};
|
|
992
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* Breadcrumbs - Wrapper simple del componente HeroUI Breadcrumbs
|
|
1026
|
+
*
|
|
1027
|
+
* Este componente es un wrapper directo del componente Breadcrumbs de HeroUI,
|
|
1028
|
+
* proporcionando una interfaz simplificada y consistente con el resto de la librería.
|
|
1029
|
+
*
|
|
1030
|
+
* @example
|
|
1031
|
+
* ```tsx
|
|
1032
|
+
* // Uso básico
|
|
1033
|
+
* <Breadcrumbs>
|
|
1034
|
+
* <BreadcrumbItem href="/">Inicio</BreadcrumbItem>
|
|
1035
|
+
* <BreadcrumbItem href="/products">Productos</BreadcrumbItem>
|
|
1036
|
+
* <BreadcrumbItem>Detalle</BreadcrumbItem>
|
|
1037
|
+
* </Breadcrumbs>
|
|
1038
|
+
*
|
|
1039
|
+
* // Con items como prop
|
|
1040
|
+
* <Breadcrumbs
|
|
1041
|
+
* items={[
|
|
1042
|
+
* { label: "Inicio", href: "/" },
|
|
1043
|
+
* { label: "Productos", href: "/products" },
|
|
1044
|
+
* { label: "Detalle", isCurrent: true }
|
|
1045
|
+
* ]}
|
|
1046
|
+
* />
|
|
1047
|
+
* ```
|
|
1048
|
+
*/
|
|
1049
|
+
var BreadcrumbsComponent = function (_a) {
|
|
1050
|
+
var items = _a.items, children = _a.children, heroUIProps = __rest(_a, ["items", "children"]);
|
|
1051
|
+
return (jsx(Breadcrumbs, __assign({}, heroUIProps, { children: items
|
|
1052
|
+
? items.map(function (item, index) { return (jsx(BreadcrumbItem, { href: item.href, isCurrent: item.isCurrent, children: item.label }, "".concat(item.href || item.label, "-").concat(index))); })
|
|
1053
|
+
: children })));
|
|
1054
|
+
};
|
|
1055
|
+
|
|
993
1056
|
var ConfigMenu = function (_a) {
|
|
994
1057
|
var _b;
|
|
995
1058
|
var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
|
|
@@ -1008,8 +1071,8 @@ var NotificationButton = function (_a) {
|
|
|
1008
1071
|
NotificationButton.displayName = "NotificationButton";
|
|
1009
1072
|
|
|
1010
1073
|
var HeaderComponent = function (_a) {
|
|
1011
|
-
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations;
|
|
1012
|
-
return (
|
|
1074
|
+
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations, breadcrumbs = _a.breadcrumbs;
|
|
1075
|
+
return (jsx("header", { className: "header__container", children: jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxs("div", { className: "flex items-center gap-4", children: [jsx(Button$1, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsx(BreadcrumbsComponent, { items: breadcrumbs }))] }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(NotificationButton, { notificationCount: notificationCount }), jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }) }));
|
|
1013
1076
|
};
|
|
1014
1077
|
HeaderComponent.displayName = "Header";
|
|
1015
1078
|
|
|
@@ -1380,7 +1443,7 @@ var stepperClasses = cn(
|
|
|
1380
1443
|
// dark
|
|
1381
1444
|
"dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
|
|
1382
1445
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
1383
|
-
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
1446
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
1384
1447
|
var handleOverlayClick = function (e) {
|
|
1385
1448
|
if (e.target === e.currentTarget) {
|
|
1386
1449
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
@@ -2016,7 +2079,24 @@ var ScheduleRow = function (_a) {
|
|
|
2016
2079
|
var newTimeSlots = daySchedule.timeSlots.filter(function (_, i) { return i !== index; });
|
|
2017
2080
|
onChange(__assign(__assign({}, daySchedule), { timeSlots: newTimeSlots }));
|
|
2018
2081
|
};
|
|
2019
|
-
return (jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsx(Chip, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? translations.open : translations.closed })] }), jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: translations.copyToAll })] })] }), daySchedule.isOpen && (jsxs("div", { className: "flex flex-col justify-around gap-y-3 ", children: [daySchedule.timeSlots.map(function (slot, index) { return (jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [jsxs("div", { className: "flex items-center justify-between gap-1", children: [jsx(TimeInput, { label: translations.from, className: "w-full", value: toTimeValue(slot.from), onChange: function (value) { return handleTimeChange(index, "from", value); }, isInvalid: !!slot.error }), jsx("span", { className: "text-default-900 xs:hidden xl:block", children: "-" }), jsx(TimeInput, { label: translations.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: daySchedule.timeSlots.length === 1, startContent: jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline" }) })] }, "".concat(day, "-timeslot-").concat(slot.from, "-").concat(slot.to, "-").concat(index))); }), daySchedule.timeSlots.length < 2 && (jsx(Button, { size: "sm", variant: "flat", onPress: function () { return handleAddTimeSlot(); }, startContent: jsx(IconComponent, { icon: "solar:add-circle-outline" }), children: translations.addTimeSlot }))] }))] }, day));
|
|
2082
|
+
return (jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsx(Chip$1, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? translations.open : translations.closed })] }), jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: translations.copyToAll })] })] }), daySchedule.isOpen && (jsxs("div", { className: "flex flex-col justify-around gap-y-3 ", children: [daySchedule.timeSlots.map(function (slot, index) { return (jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [jsxs("div", { className: "flex items-center justify-between gap-1", children: [jsx(TimeInput, { label: translations.from, className: "w-full", value: toTimeValue(slot.from), onChange: function (value) { return handleTimeChange(index, "from", value); }, isInvalid: !!slot.error }), jsx("span", { className: "text-default-900 xs:hidden xl:block", children: "-" }), jsx(TimeInput, { label: translations.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: daySchedule.timeSlots.length === 1, startContent: jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline" }) })] }, "".concat(day, "-timeslot-").concat(slot.from, "-").concat(slot.to, "-").concat(index))); }), daySchedule.timeSlots.length < 2 && (jsx(Button, { size: "sm", variant: "flat", onPress: function () { return handleAddTimeSlot(); }, startContent: jsx(IconComponent, { icon: "solar:add-circle-outline" }), children: translations.addTimeSlot }))] }))] }, day));
|
|
2083
|
+
};
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* SearchInput component - A specialized input field for search functionality
|
|
2087
|
+
*
|
|
2088
|
+
* Features:
|
|
2089
|
+
* - Built on top of the base Input component
|
|
2090
|
+
* - Includes a search icon by default
|
|
2091
|
+
* - Optimized for search use cases
|
|
2092
|
+
* - Follows BeweOS design guidelines
|
|
2093
|
+
*/
|
|
2094
|
+
var SearchInput = function (_a) {
|
|
2095
|
+
var _b = _a.searchPlaceholder, searchPlaceholder = _b === void 0 ? "Buscar..." : _b, _c = _a.searchIcon, searchIcon = _c === void 0 ? "solar:magnifer-outline" : _c, iconProps = _a.iconProps, onSearchChange = _a.onSearchChange, searchValue = _a.searchValue, value = _a.value, onValueChange = _a.onValueChange, placeholder = _a.placeholder, _d = _a.size, size = _d === void 0 ? "sm" : _d, _e = _a.className, className = _e === void 0 ? "flex-1 max-w-xs min-w-52" : _e, props = __rest(_a, ["searchPlaceholder", "searchIcon", "iconProps", "onSearchChange", "searchValue", "value", "onValueChange", "placeholder", "size", "className"]);
|
|
2096
|
+
// Use searchValue/onSearchChange if provided, otherwise fall back to value/onValueChange
|
|
2097
|
+
var inputValue = searchValue !== null && searchValue !== void 0 ? searchValue : value;
|
|
2098
|
+
var handleValueChange = onSearchChange !== null && onSearchChange !== void 0 ? onSearchChange : onValueChange;
|
|
2099
|
+
return (jsx(Input, __assign({}, props, { className: className, size: size, placeholder: placeholder || searchPlaceholder, value: inputValue, onValueChange: handleValueChange, endContent: jsx(IconComponent, __assign({ icon: searchIcon, className: "text-default-400", size: "sm" }, iconProps)) })));
|
|
2020
2100
|
};
|
|
2021
2101
|
|
|
2022
2102
|
/**
|
|
@@ -2614,6 +2694,18 @@ var UploadFile = function (_a) {
|
|
|
2614
2694
|
};
|
|
2615
2695
|
UploadFile.displayName = "UploadFile";
|
|
2616
2696
|
|
|
2697
|
+
/**
|
|
2698
|
+
* Loading overlay elegante que bloquea la interacción durante la navegación
|
|
2699
|
+
* Proporciona feedback visual moderno y no intrusivo
|
|
2700
|
+
*/
|
|
2701
|
+
var NavigationLoadingOverlay = function (_a) {
|
|
2702
|
+
var isVisible = _a.isVisible;
|
|
2703
|
+
if (!isVisible) {
|
|
2704
|
+
return null;
|
|
2705
|
+
}
|
|
2706
|
+
return (jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [jsx("div", { className: "absolute inset-0 bg-black/10 backdrop-blur-sm" }), jsx("div", { className: "flex flex-col items-center gap-4", children: jsx(Spinner, { size: "lg", color: "primary", className: "drop-shadow-sm" }) })] }));
|
|
2707
|
+
};
|
|
2708
|
+
|
|
2617
2709
|
var Modal = function (props) {
|
|
2618
2710
|
return (jsx(Modal$1, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
|
|
2619
2711
|
};
|
|
@@ -2727,7 +2819,7 @@ var AuraToastProvider = function (_a) {
|
|
|
2727
2819
|
title: "",
|
|
2728
2820
|
description: "",
|
|
2729
2821
|
color: "primary",
|
|
2730
|
-
duration:
|
|
2822
|
+
duration: 8000,
|
|
2731
2823
|
}), toast = _b[0], setToast = _b[1];
|
|
2732
2824
|
var timerRef = useRef(null);
|
|
2733
2825
|
var hideToast = useCallback(function () {
|
|
@@ -2759,4 +2851,30 @@ var AuraToastProvider = function (_a) {
|
|
|
2759
2851
|
return (jsx(ToastContext.Provider, { value: { toast: toast, showToast: showToast, hideToast: hideToast }, children: children }));
|
|
2760
2852
|
};
|
|
2761
2853
|
|
|
2762
|
-
|
|
2854
|
+
var NavigationLoadingContext = createContext(undefined);
|
|
2855
|
+
var useNavigationLoading = function () {
|
|
2856
|
+
var context = useContext(NavigationLoadingContext);
|
|
2857
|
+
if (!context) {
|
|
2858
|
+
throw new Error("useNavigationLoading must be used within a NavigationLoadingProvider");
|
|
2859
|
+
}
|
|
2860
|
+
return context;
|
|
2861
|
+
};
|
|
2862
|
+
|
|
2863
|
+
var NavigationLoadingProvider = function (_a) {
|
|
2864
|
+
var children = _a.children;
|
|
2865
|
+
var _b = useState(false), isVisible = _b[0], setIsVisible = _b[1];
|
|
2866
|
+
var showNavigationLoading = useCallback(function (_loadingMessage) {
|
|
2867
|
+
setIsVisible(true);
|
|
2868
|
+
}, []);
|
|
2869
|
+
var hideNavigationLoading = useCallback(function () {
|
|
2870
|
+
setIsVisible(false);
|
|
2871
|
+
}, []);
|
|
2872
|
+
var value = {
|
|
2873
|
+
showNavigationLoading: showNavigationLoading,
|
|
2874
|
+
hideNavigationLoading: hideNavigationLoading,
|
|
2875
|
+
isNavigationLoading: isVisible,
|
|
2876
|
+
};
|
|
2877
|
+
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
2878
|
+
};
|
|
2879
|
+
|
|
2880
|
+
export { AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorSelector, DatePicker, DateRangePicker, DateSelector, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, Input, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RowSteps, ScheduleRow, SearchInput, Select, StepIndicator, Switch as SwitchComponent, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, UploadFile, VerticalSteps, sizeMap, themeColors, useAuraToast, useNavigationLoading, useThemeContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AuraAutocompleteProps } from "./AutoComplete.types";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* AuraAutocomplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
5
5
|
*
|
|
6
6
|
* Reglas aplicadas:
|
|
7
7
|
* - Variant: Bordered (por defecto)
|
|
@@ -9,5 +9,5 @@ import type { AutoCompleteProps } from "./AutoComplete.types";
|
|
|
9
9
|
* - labelPlacement: Outside
|
|
10
10
|
* - Size: sm, md, lg (configurable)
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const AuraAutocomplete: React.FC<AuraAutocompleteProps>;
|
|
13
13
|
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsC5D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AutocompleteProps as HeroUIAutocompleteProps } from "@heroui/react";
|
|
2
|
-
export type
|
|
2
|
+
export type AuraAutocompleteProps = Omit<HeroUIAutocompleteProps, "size" | "variant" | "radius"> & {
|
|
3
3
|
label?: string;
|
|
4
4
|
size?: "sm" | "md" | "lg";
|
|
5
5
|
variant?: "flat" | "bordered" | "faded" | "underlined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.types.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"AutoComplete.types.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACvC,uBAAuB,EACvB,MAAM,GAAG,SAAS,GAAG,QAAQ,CAC7B,GAAG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CAC9C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { AuraAutocomplete } from "./AutoComplete";
|
|
2
|
+
export type { AuraAutocompleteProps } from "./AutoComplete.types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { BreadcrumbsComponentProps } from "./Breadcrumbs.types";
|
|
3
|
+
/**
|
|
4
|
+
* Breadcrumbs - Wrapper simple del componente HeroUI Breadcrumbs
|
|
5
|
+
*
|
|
6
|
+
* Este componente es un wrapper directo del componente Breadcrumbs de HeroUI,
|
|
7
|
+
* proporcionando una interfaz simplificada y consistente con el resto de la librería.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Uso básico
|
|
12
|
+
* <Breadcrumbs>
|
|
13
|
+
* <BreadcrumbItem href="/">Inicio</BreadcrumbItem>
|
|
14
|
+
* <BreadcrumbItem href="/products">Productos</BreadcrumbItem>
|
|
15
|
+
* <BreadcrumbItem>Detalle</BreadcrumbItem>
|
|
16
|
+
* </Breadcrumbs>
|
|
17
|
+
*
|
|
18
|
+
* // Con items como prop
|
|
19
|
+
* <Breadcrumbs
|
|
20
|
+
* items={[
|
|
21
|
+
* { label: "Inicio", href: "/" },
|
|
22
|
+
* { label: "Productos", href: "/products" },
|
|
23
|
+
* { label: "Detalle", isCurrent: true }
|
|
24
|
+
* ]}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const BreadcrumbsComponent: React.FC<BreadcrumbsComponentProps>;
|
|
29
|
+
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoBpE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BreadcrumbItemProps as HeroUIBreadcrumbItemProps, BreadcrumbsProps as HeroUIBreadcrumbsProps } from "@heroui/react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Representa un elemento individual del breadcrumb
|
|
5
|
+
* Extiende las props básicas del BreadcrumbItem de HeroUI con propiedades personalizadas
|
|
6
|
+
*/
|
|
7
|
+
export interface BreadcrumbItemComponentProps extends Omit<HeroUIBreadcrumbItemProps, "children"> {
|
|
8
|
+
/**
|
|
9
|
+
* Texto a mostrar en el breadcrumb
|
|
10
|
+
* @example "Dashboard", "Usuarios", "Configuración"
|
|
11
|
+
*/
|
|
12
|
+
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* URL del breadcrumb (opcional para el último item que está activo)
|
|
15
|
+
* @example "/dashboard", "/dashboard/users"
|
|
16
|
+
*/
|
|
17
|
+
href?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Indica si es el breadcrumb actual (último en la cadena)
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
isCurrent?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The content of the breadcrumb (optional, uses label if not provided)
|
|
25
|
+
*/
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props del componente Breadcrumbs
|
|
30
|
+
* Extiende todas las props de HeroUI Breadcrumbs
|
|
31
|
+
*/
|
|
32
|
+
export interface BreadcrumbsComponentProps extends HeroUIBreadcrumbsProps {
|
|
33
|
+
/**
|
|
34
|
+
* Items de breadcrumb a mostrar
|
|
35
|
+
* Si se proporciona, se renderizarán estos items en lugar de los children
|
|
36
|
+
*/
|
|
37
|
+
items?: BreadcrumbItemComponentProps[];
|
|
38
|
+
/**
|
|
39
|
+
* Elementos hijo (BreadcrumbItem components)
|
|
40
|
+
*/
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=Breadcrumbs.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.types.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumbs/Breadcrumbs.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,IAAI,yBAAyB,EAChD,gBAAgB,IAAI,sBAAsB,EAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,WAAW,4BAChB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC;IACnD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACxE;;;OAGG;IACH,KAAK,CAAC,EAAE,4BAA4B,EAAE,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACX,yBAAyB,EACzB,4BAA4B,GAC5B,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ChipProps } from "./Chip.types";
|
|
3
|
+
/**
|
|
4
|
+
* Chip - Componente para mostrar etiquetas o badges
|
|
5
|
+
* basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Chip: React.FC<ChipProps>;
|
|
8
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/Chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4CpC,CAAC"}
|