@beweco/aurora-ui 0.6.73 → 0.6.75
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 +135 -17
- package/dist/index.esm.js +130 -18
- package/dist/types/components/menu-claw/MenuClaw.d.ts.map +1 -1
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts +19 -0
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/MultiStepWizard.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/MultiStepWizard.types.d.ts +2 -0
- package/dist/types/components/multi-step-wizard/MultiStepWizard.types.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.types.d.ts +2 -0
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.types.d.ts.map +1 -1
- package/dist/types/components/tags-filter/TagsFilter.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/dismiss-control.d.ts +61 -0
- package/dist/types/utils/dismiss-control.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3936,8 +3936,10 @@ var DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
|
3936
3936
|
*/
|
|
3937
3937
|
var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
3938
3938
|
var _b, _c;
|
|
3939
|
-
var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
3940
|
-
var
|
|
3939
|
+
var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e, isCollapsedProp = _a.isCollapsed, onCollapsedChange = _a.onCollapsedChange, defaultCollapsed = _a.defaultCollapsed;
|
|
3940
|
+
var isControlled = isCollapsedProp !== undefined;
|
|
3941
|
+
var _f = React.useState(defaultCollapsed !== null && defaultCollapsed !== void 0 ? defaultCollapsed : false), internalCollapsed = _f[0], setInternalCollapsed = _f[1];
|
|
3942
|
+
var collapsed = isCollapsedProp !== null && isCollapsedProp !== void 0 ? isCollapsedProp : internalCollapsed;
|
|
3941
3943
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
|
|
3942
3944
|
var selectedKey = React.useMemo(function () {
|
|
3943
3945
|
var _a, _b, _c;
|
|
@@ -3986,8 +3988,12 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
3986
3988
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
3987
3989
|
}, [onOpenSidebarChange]);
|
|
3988
3990
|
var handleCollapseToggle = React.useCallback(function () {
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
+
var next = !collapsed;
|
|
3992
|
+
if (!isControlled) {
|
|
3993
|
+
setInternalCollapsed(next);
|
|
3994
|
+
}
|
|
3995
|
+
onCollapsedChange === null || onCollapsedChange === void 0 ? void 0 : onCollapsedChange(next);
|
|
3996
|
+
}, [collapsed, isControlled, onCollapsedChange]);
|
|
3991
3997
|
var handleHelpClick = React.useCallback(function () {
|
|
3992
3998
|
if (helpSection) {
|
|
3993
3999
|
window.open(helpSection.redirect, "_blank");
|
|
@@ -4006,14 +4012,104 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
4006
4012
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
4007
4013
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
4008
4014
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
4009
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showBottomBar ? (jsxRuntime.jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsxRuntime.jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsxRuntime.jsx("div", { className: react.cn("menu-claw",
|
|
4015
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showBottomBar ? (jsxRuntime.jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsxRuntime.jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsxRuntime.jsx("div", { className: react.cn("menu-claw", collapsed ? "menu-claw--collapsed" : "menu-claw--expanded", isOpenSidebar && "menu-claw--mobile-open"), "aria-hidden": !isOpenSidebar, children: jsxRuntime.jsxs("div", { className: "menu-claw__content", children: [jsxRuntime.jsxs("div", { className: react.cn("flex items-center", collapsed ? "justify-center" : "justify-end"), children: [jsxRuntime.jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "block cursor-pointer sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx("button", { type: "button", "aria-label": t.toggleSidebarAriaLabel, onClick: handleCollapseToggle, className: "hidden h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg text-default-500 transition-colors hover:bg-default-100 sm:flex", children: jsxRuntime.jsx(IconComponent, { icon: collapsed
|
|
4010
4016
|
? "solar:alt-arrow-right-linear"
|
|
4011
|
-
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxRuntime.jsxs("div", { className: react.cn("flex items-center py-3",
|
|
4017
|
+
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxRuntime.jsxs("div", { className: react.cn("flex items-center py-3", collapsed ? "justify-center gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "sm", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), !collapsed ? (jsxRuntime.jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsxRuntime.jsx("p", { className: "truncate text-small font-semibold text-foreground", children: userName }), jsxRuntime.jsx("p", { className: "truncate text-tiny text-default-400", children: userRole })] })) : null] }), jsxRuntime.jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history === null || history === void 0 ? void 0 : history.onNewConversation, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, onBeforeSelect: handleSidebarClose }), jsxRuntime.jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map(function (group) {
|
|
4012
4018
|
var _a;
|
|
4013
|
-
return (jsxRuntime.jsxs("div", { className: "mb-2", children: [group.title && !
|
|
4014
|
-
}) }), helpSection ? (jsxRuntime.jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly:
|
|
4019
|
+
return (jsxRuntime.jsxs("div", { className: "mb-2", children: [group.title && !collapsed ? (jsxRuntime.jsx("p", { className: "px-2 pb-1 pt-2 text-tiny font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsxRuntime.jsx("ul", { className: "flex flex-col gap-0.5", children: ((_a = group.items) !== null && _a !== void 0 ? _a : []).map(function (item) { return (jsxRuntime.jsx(MenuClawNavItem, { item: item, selectedKey: selectedKey, isCollapsed: collapsed, onSelect: handleMenuSelect }, item.key)); }) })] }, group.key));
|
|
4020
|
+
}) }), helpSection ? (jsxRuntime.jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: collapsed, children: !collapsed ? (jsxRuntime.jsx("span", { className: "menu-claw-collapsible truncate", children: helpSection.title })) : null }) })) : null] }) })] }));
|
|
4015
4021
|
});
|
|
4016
4022
|
|
|
4023
|
+
/**
|
|
4024
|
+
* Interacciones que un popover no-modal NO debe tratar como "clic fuera".
|
|
4025
|
+
*
|
|
4026
|
+
* El problema que resuelve: `useOverlay` de react-aria trata cualquier
|
|
4027
|
+
* pulsación fuera del popover como interacción externa y, cuando el popover es
|
|
4028
|
+
* el overlay visible más reciente, hace `stopPropagation()` + `preventDefault()`
|
|
4029
|
+
* sobre el `pointerdown` **y** sobre el `click`
|
|
4030
|
+
* (`@react-aria/overlays/useOverlay`). El evento nunca llega a su destino, así
|
|
4031
|
+
* que `usePress` no registra la pulsación y `onPress` no se dispara: el primer
|
|
4032
|
+
* clic solo cierra el desplegable.
|
|
4033
|
+
*
|
|
4034
|
+
* Para un clic en la página de fondo eso es lo correcto: descartar el
|
|
4035
|
+
* desplegable sin activar nada por debajo. Dentro del mismo diálogo no: ahí el
|
|
4036
|
+
* usuario está rellenando un formulario y espera que su clic llegue. Y como los
|
|
4037
|
+
* buscadores se reabren al recuperar el foco, el clic siguiente se volvía a
|
|
4038
|
+
* tragar — un callejón sin salida del que solo se salía vaciando el campo.
|
|
4039
|
+
*
|
|
4040
|
+
* La única palanca es `shouldCloseOnInteractOutside`: es el guardián de esos dos
|
|
4041
|
+
* `preventDefault`. Devolviendo `false` para lo que no es realmente "fuera", la
|
|
4042
|
+
* pulsación llega intacta. El desplegable sigue cerrándose igual, pero por
|
|
4043
|
+
* pérdida de foco (`shouldCloseOnBlur`) en vez de por interacción externa.
|
|
4044
|
+
*/
|
|
4045
|
+
var _a, _b;
|
|
4046
|
+
/**
|
|
4047
|
+
* Marca un botón como control de cierre de su contenedor. Los popovers de Aura
|
|
4048
|
+
* no lo cuentan como interacción externa, así que su pulsación no se pierde.
|
|
4049
|
+
*/
|
|
4050
|
+
var DISMISS_CONTROL_ATTRIBUTE = "data-aura-dismiss";
|
|
4051
|
+
/** Props a esparcir en un control de cierre: `<Button {...dismissControlProps} />`. */
|
|
4052
|
+
var dismissControlProps = (_a = {},
|
|
4053
|
+
_a[DISMISS_CONTROL_ATTRIBUTE] = "true",
|
|
4054
|
+
_a);
|
|
4055
|
+
/**
|
|
4056
|
+
* Marca el contenedor de una superficie modal propia (wizard, panel a medida).
|
|
4057
|
+
* No hace falta en `Modal` ni `Drawer`: los diálogos de HeroUI ya traen
|
|
4058
|
+
* `role="dialog"`, que cuenta igual.
|
|
4059
|
+
*/
|
|
4060
|
+
var CONTAINER_ATTRIBUTE = "data-aura-container";
|
|
4061
|
+
/** Props a esparcir en el contenedor: `<div {...containerProps}>`. */
|
|
4062
|
+
var containerProps = (_b = {},
|
|
4063
|
+
_b[CONTAINER_ATTRIBUTE] = "true",
|
|
4064
|
+
_b);
|
|
4065
|
+
/**
|
|
4066
|
+
* Selector de controles de cierre. Incluye `[aria-label="Close"]` para cubrir
|
|
4067
|
+
* los botones de cerrar internos de HeroUI (Modal, Drawer), que no admiten
|
|
4068
|
+
* atributos propios.
|
|
4069
|
+
*/
|
|
4070
|
+
var DISMISS_CONTROL_SELECTOR = "[".concat(DISMISS_CONTROL_ATTRIBUTE, "],[aria-label=\"Close\"]");
|
|
4071
|
+
/** Selector del contenedor modal: el marcado de Aura o un diálogo estándar. */
|
|
4072
|
+
var CONTAINER_SELECTOR = "[".concat(CONTAINER_ATTRIBUTE, "],[role=\"dialog\"],[role=\"alertdialog\"]");
|
|
4073
|
+
var matchesAncestor = function (element, selector) {
|
|
4074
|
+
if (!element || typeof element.closest !== "function") {
|
|
4075
|
+
return false;
|
|
4076
|
+
}
|
|
4077
|
+
return element.closest(selector) != null;
|
|
4078
|
+
};
|
|
4079
|
+
/** `true` si el elemento es un control de cierre (o está dentro de uno). */
|
|
4080
|
+
var isDismissControl = function (element) { return matchesAncestor(element, DISMISS_CONTROL_SELECTOR); };
|
|
4081
|
+
/**
|
|
4082
|
+
* Predicado listo para `popoverProps.shouldCloseOnInteractOutside` de un
|
|
4083
|
+
* componente con popover no-modal.
|
|
4084
|
+
*
|
|
4085
|
+
* Devuelve `false` —no es interacción externa— en tres casos:
|
|
4086
|
+
*
|
|
4087
|
+
* 1. Dentro del propio componente: el popover vive en un portal, así que el
|
|
4088
|
+
* campo de búsqueda queda fuera de él y una pulsación sobre el texto se
|
|
4089
|
+
* contaba como externa.
|
|
4090
|
+
* 2. Sobre un control de cierre del contenedor.
|
|
4091
|
+
* 3. Dentro del mismo diálogo/contenedor que el componente: seguir rellenando
|
|
4092
|
+
* el formulario no es descartar el desplegable.
|
|
4093
|
+
*
|
|
4094
|
+
* @param element Elemento donde ha empezado la interacción.
|
|
4095
|
+
* @param root Raíz del componente.
|
|
4096
|
+
*/
|
|
4097
|
+
var shouldClosePopoverOnInteractOutside = function (element, root) {
|
|
4098
|
+
var _a;
|
|
4099
|
+
if (root === null || root === void 0 ? void 0 : root.contains(element)) {
|
|
4100
|
+
return false;
|
|
4101
|
+
}
|
|
4102
|
+
if (isDismissControl(element)) {
|
|
4103
|
+
return false;
|
|
4104
|
+
}
|
|
4105
|
+
if (!matchesAncestor(element, CONTAINER_SELECTOR)) {
|
|
4106
|
+
return true;
|
|
4107
|
+
}
|
|
4108
|
+
// Solo exime el contenedor propio: un diálogo distinto sigue siendo externo.
|
|
4109
|
+
var container = (_a = root === null || root === void 0 ? void 0 : root.closest) === null || _a === void 0 ? void 0 : _a.call(root, CONTAINER_SELECTOR);
|
|
4110
|
+
return !(container === null || container === void 0 ? void 0 : container.contains(element));
|
|
4111
|
+
};
|
|
4112
|
+
|
|
4017
4113
|
var StepIndicator = function (_a) {
|
|
4018
4114
|
var currentStep = _a.currentStep, totalSteps = _a.totalSteps, _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.showStepText, showStepText = _c === void 0 ? true : _c, stepTextFormatter = _a.stepTextFormatter, className = _a.className, props = __rest(_a, ["currentStep", "totalSteps", "color", "showStepText", "stepTextFormatter", "className"]);
|
|
4019
4115
|
var progressPercentage = Math.min((currentStep / totalSteps) * 100, 100);
|
|
@@ -4197,7 +4293,7 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
4197
4293
|
VerticalSteps.displayName = "VerticalSteps";
|
|
4198
4294
|
|
|
4199
4295
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
4200
|
-
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,
|
|
4296
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var _b = _a.closeTranslation, closeTranslation = _b === void 0 ? "Close" : _b, onClose = _a.onClose, _c = _a.hideInactiveDescriptions, hideInactiveDescriptions = _c === void 0 ? false : _c, _d = _a.isDismissable, isDismissable = _d === void 0 ? true : _d, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "closeTranslation", "onClose", "hideInactiveDescriptions", "isDismissable"]);
|
|
4201
4297
|
var handleOverlayClick = function (e) {
|
|
4202
4298
|
if (!isDismissable) {
|
|
4203
4299
|
return;
|
|
@@ -4206,7 +4302,7 @@ var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
|
4206
4302
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
4207
4303
|
}
|
|
4208
4304
|
};
|
|
4209
|
-
return (jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsxRuntime.jsx("div", { className: react.cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsxRuntime.jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxRuntime.jsxs("div", { className: "relative flex w-full flex-col items-center justify-between gap-4 md:ml-[33.333333%] md:w-2/3 md:p-4 min-h-0", children: [jsxRuntime.jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsxRuntime.jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsxRuntime.jsx("div", { className: "flex w-full justify-center", children: jsxRuntime.jsx(StepIndicator, { className: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: "flex flex-col flex-1 w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) }));
|
|
4305
|
+
return (jsxRuntime.jsx("div", __assign({}, containerProps, { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsxRuntime.jsx("div", { className: react.cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsxRuntime.jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxRuntime.jsxs("div", { className: "relative flex w-full flex-col items-center justify-between gap-4 md:ml-[33.333333%] md:w-2/3 md:p-4 min-h-0", children: [jsxRuntime.jsx(Button, __assign({ isIconOnly: true }, dismissControlProps, { "aria-label": closeTranslation, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) })), jsxRuntime.jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsxRuntime.jsx("div", { className: "flex w-full justify-center", children: jsxRuntime.jsx(StepIndicator, { className: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: "flex flex-col flex-1 w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) })));
|
|
4210
4306
|
});
|
|
4211
4307
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
4212
4308
|
|
|
@@ -4233,6 +4329,7 @@ var MultiStepWizard = function (_a) {
|
|
|
4233
4329
|
cancel: "Cancel",
|
|
4234
4330
|
next: "Next",
|
|
4235
4331
|
complete: "Complete",
|
|
4332
|
+
close: "Close",
|
|
4236
4333
|
}, translations);
|
|
4237
4334
|
var paginate = React.useCallback(function (newDirection) {
|
|
4238
4335
|
setPage(function (prev) {
|
|
@@ -4284,14 +4381,11 @@ var MultiStepWizard = function (_a) {
|
|
|
4284
4381
|
if (!isOpen) {
|
|
4285
4382
|
return null;
|
|
4286
4383
|
}
|
|
4287
|
-
return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, isDismissable: isDismissable, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
4384
|
+
return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, closeTranslation: t.close, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, isDismissable: isDismissable, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
4288
4385
|
isDisabled: page === 0,
|
|
4289
4386
|
onPress: onBack,
|
|
4290
4387
|
children: t.goBack,
|
|
4291
|
-
}, cancelButtonProps: {
|
|
4292
|
-
onPress: onClose,
|
|
4293
|
-
children: t.cancel,
|
|
4294
|
-
}, nextButtonProps: {
|
|
4388
|
+
}, cancelButtonProps: __assign(__assign({}, dismissControlProps), { onPress: onClose, children: t.cancel }), nextButtonProps: {
|
|
4295
4389
|
children: getButtonText(),
|
|
4296
4390
|
onPress: handleNextAction,
|
|
4297
4391
|
isDisabled: steps[page].isStepValid === false,
|
|
@@ -8864,6 +8958,7 @@ function TagsFilter(_a) {
|
|
|
8864
8958
|
var _m = React.useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
|
|
8865
8959
|
var selectedList = value !== null && value !== void 0 ? value : [];
|
|
8866
8960
|
var _o = React.useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
|
|
8961
|
+
var rootRef = React.useRef(null);
|
|
8867
8962
|
React.useEffect(function () {
|
|
8868
8963
|
if (!onLoadMore || !sentinelNode || !hasMore) {
|
|
8869
8964
|
return;
|
|
@@ -8935,7 +9030,7 @@ function TagsFilter(_a) {
|
|
|
8935
9030
|
if (isLoading) {
|
|
8936
9031
|
return (jsxRuntime.jsx("div", { className: "flex flex-col gap-4 ".concat(className), children: jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: jsxRuntime.jsx(react.Spinner, { size: "sm" }) }) }));
|
|
8937
9032
|
}
|
|
8938
|
-
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxRuntime.jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsxRuntime.jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsxRuntime.jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
|
|
9033
|
+
return (jsxRuntime.jsxs("div", { ref: rootRef, className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxRuntime.jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsxRuntime.jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsxRuntime.jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
|
|
8939
9034
|
setInputValue(v);
|
|
8940
9035
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
|
|
8941
9036
|
}, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
|
|
@@ -8954,7 +9049,24 @@ function TagsFilter(_a) {
|
|
|
8954
9049
|
// intercepts pointer events, blocking the parent modal's close button.
|
|
8955
9050
|
// shouldCloseOnInteractOutside already handles closing on outside clicks.
|
|
8956
9051
|
isNonModal: true,
|
|
8957
|
-
|
|
9052
|
+
// El desplegable se renderiza en un portal, así que el campo de
|
|
9053
|
+
// búsqueda queda FUERA de él y una pulsación sobre el texto contaba
|
|
9054
|
+
// como interacción externa. Al cerrarse, el FocusScope devolvía el
|
|
9055
|
+
// foco con un `.focus()` que abortaba el gesto de selección que el
|
|
9056
|
+
// navegador acababa de iniciar: de ahí que arrastrar o hacer doble
|
|
9057
|
+
// clic no seleccionara nada y solo quedara borrar letra a letra
|
|
9058
|
+
// (con el teclado sí funcionaba, porque no pasa por aquí).
|
|
9059
|
+
// Las pulsaciones dentro del componente dejan de contar como
|
|
9060
|
+
// externas; las de fuera siguen cerrando el desplegable igual.
|
|
9061
|
+
//
|
|
9062
|
+
// Los controles de cierre del contenedor también quedan exentos:
|
|
9063
|
+
// react-aria hace `preventDefault()` sobre el pointerdown Y el
|
|
9064
|
+
// click de toda interacción externa, así que su `onPress` no se
|
|
9065
|
+
// disparaba y el contenedor no se podía cerrar mientras el
|
|
9066
|
+
// desplegable estuviera abierto (ver `shouldClosePopoverOnInteractOutside`).
|
|
9067
|
+
shouldCloseOnInteractOutside: function (element) {
|
|
9068
|
+
return shouldClosePopoverOnInteractOutside(element, rootRef.current);
|
|
9069
|
+
},
|
|
8958
9070
|
}, listboxProps: {
|
|
8959
9071
|
className: "max-h-[200px] overflow-y-auto",
|
|
8960
9072
|
}, className: "w-full", children: function (item) {
|
|
@@ -9719,6 +9831,7 @@ exports.AuraToastProvider = AuraToastProvider;
|
|
|
9719
9831
|
exports.BEWEOS_THEME_MODE_COOKIE_NAME = BEWEOS_THEME_MODE_COOKIE_NAME;
|
|
9720
9832
|
exports.BreadcrumbsComponent = BreadcrumbsComponent;
|
|
9721
9833
|
exports.Button = Button;
|
|
9834
|
+
exports.CONTAINER_ATTRIBUTE = CONTAINER_ATTRIBUTE;
|
|
9722
9835
|
exports.Card = Card;
|
|
9723
9836
|
exports.Chip = Chip;
|
|
9724
9837
|
exports.ColorPicker = ColorPicker;
|
|
@@ -9728,6 +9841,7 @@ exports.Currency = Currency;
|
|
|
9728
9841
|
exports.DEFAULT_DONUT_COLORS = DEFAULT_DONUT_COLORS;
|
|
9729
9842
|
exports.DEFAULT_PREDEFINED_COLORS = DEFAULT_PREDEFINED_COLORS;
|
|
9730
9843
|
exports.DEFAULT_RANKED_BAR_COLORS = DEFAULT_RANKED_BAR_COLORS;
|
|
9844
|
+
exports.DISMISS_CONTROL_ATTRIBUTE = DISMISS_CONTROL_ATTRIBUTE;
|
|
9731
9845
|
exports.DatePicker = DatePicker;
|
|
9732
9846
|
exports.DateRangePicker = DateRangePicker;
|
|
9733
9847
|
exports.DateSelector = DateSelector;
|
|
@@ -9801,10 +9915,12 @@ exports.computeBars = computeBars;
|
|
|
9801
9915
|
exports.computeMax = computeMax;
|
|
9802
9916
|
exports.computeSlices = computeSlices;
|
|
9803
9917
|
exports.computeTotal = computeTotal;
|
|
9918
|
+
exports.containerProps = containerProps;
|
|
9804
9919
|
exports.createCurrencyFormatter = createCurrencyFormatter;
|
|
9805
9920
|
exports.defaultCountries = uniqueCountries;
|
|
9806
9921
|
exports.defaultCurrencyOptions = defaultCurrencyOptions;
|
|
9807
9922
|
exports.defaultTranslations = defaultTranslations$5;
|
|
9923
|
+
exports.dismissControlProps = dismissControlProps;
|
|
9808
9924
|
exports.forceLightOnlyThemeBeforeReact = forceLightOnlyThemeBeforeReact;
|
|
9809
9925
|
exports.formatAuroraThemeTooltip = formatAuroraThemeTooltip;
|
|
9810
9926
|
exports.generateThemeColorScale = generateThemeColorScale;
|
|
@@ -9814,6 +9930,7 @@ exports.getSelectedKeyFromPath = getSelectedKeyFromPath;
|
|
|
9814
9930
|
exports.hexToThemeColor = hexToThemeColor;
|
|
9815
9931
|
exports.hslToCssValue = hslToCssValue;
|
|
9816
9932
|
exports.isAuroraFullThemeId = isAuroraFullThemeId;
|
|
9933
|
+
exports.isDismissControl = isDismissControl;
|
|
9817
9934
|
exports.isDonutEmpty = isDonutEmpty;
|
|
9818
9935
|
exports.isExactThemeColor = isExactThemeColor;
|
|
9819
9936
|
exports.isGroupState = isGroupState;
|
|
@@ -9821,6 +9938,7 @@ exports.isHexColor = isHexColor;
|
|
|
9821
9938
|
exports.isRankedBarListEmpty = isRankedBarListEmpty;
|
|
9822
9939
|
exports.isSegmentationGroup = isSegmentationGroup;
|
|
9823
9940
|
exports.removeCustomPrimaryColor = removeCustomPrimaryColor;
|
|
9941
|
+
exports.shouldClosePopoverOnInteractOutside = shouldClosePopoverOnInteractOutside;
|
|
9824
9942
|
exports.sizeMap = sizeMap;
|
|
9825
9943
|
exports.themeColors = themeColors;
|
|
9826
9944
|
exports.useAuraToast = useAuraToast;
|
package/dist/index.esm.js
CHANGED
|
@@ -3937,8 +3937,10 @@ var DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
|
3937
3937
|
*/
|
|
3938
3938
|
var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
3939
3939
|
var _b, _c;
|
|
3940
|
-
var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
3941
|
-
var
|
|
3940
|
+
var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e, isCollapsedProp = _a.isCollapsed, onCollapsedChange = _a.onCollapsedChange, defaultCollapsed = _a.defaultCollapsed;
|
|
3941
|
+
var isControlled = isCollapsedProp !== undefined;
|
|
3942
|
+
var _f = React.useState(defaultCollapsed !== null && defaultCollapsed !== void 0 ? defaultCollapsed : false), internalCollapsed = _f[0], setInternalCollapsed = _f[1];
|
|
3943
|
+
var collapsed = isCollapsedProp !== null && isCollapsedProp !== void 0 ? isCollapsedProp : internalCollapsed;
|
|
3942
3944
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
|
|
3943
3945
|
var selectedKey = useMemo(function () {
|
|
3944
3946
|
var _a, _b, _c;
|
|
@@ -3987,8 +3989,12 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
3987
3989
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
3988
3990
|
}, [onOpenSidebarChange]);
|
|
3989
3991
|
var handleCollapseToggle = useCallback(function () {
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
+
var next = !collapsed;
|
|
3993
|
+
if (!isControlled) {
|
|
3994
|
+
setInternalCollapsed(next);
|
|
3995
|
+
}
|
|
3996
|
+
onCollapsedChange === null || onCollapsedChange === void 0 ? void 0 : onCollapsedChange(next);
|
|
3997
|
+
}, [collapsed, isControlled, onCollapsedChange]);
|
|
3992
3998
|
var handleHelpClick = useCallback(function () {
|
|
3993
3999
|
if (helpSection) {
|
|
3994
4000
|
window.open(helpSection.redirect, "_blank");
|
|
@@ -4007,14 +4013,104 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
4007
4013
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
4008
4014
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
4009
4015
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
4010
|
-
return (jsxs(Fragment, { children: [showBottomBar ? (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: cn("menu-claw",
|
|
4016
|
+
return (jsxs(Fragment, { children: [showBottomBar ? (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: cn("menu-claw", collapsed ? "menu-claw--collapsed" : "menu-claw--expanded", isOpenSidebar && "menu-claw--mobile-open"), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "menu-claw__content", children: [jsxs("div", { className: cn("flex items-center", collapsed ? "justify-center" : "justify-end"), children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "block cursor-pointer sm:hidden", onClick: handleSidebarClose }), jsx("button", { type: "button", "aria-label": t.toggleSidebarAriaLabel, onClick: handleCollapseToggle, className: "hidden h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg text-default-500 transition-colors hover:bg-default-100 sm:flex", children: jsx(IconComponent, { icon: collapsed
|
|
4011
4017
|
? "solar:alt-arrow-right-linear"
|
|
4012
|
-
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3",
|
|
4018
|
+
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3", collapsed ? "justify-center gap-0" : "gap-3"), children: [jsx(Avatar, { size: "sm", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), !collapsed ? (jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "truncate text-small font-semibold text-foreground", children: userName }), jsx("p", { className: "truncate text-tiny text-default-400", children: userRole })] })) : null] }), jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history === null || history === void 0 ? void 0 : history.onNewConversation, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, onBeforeSelect: handleSidebarClose }), jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map(function (group) {
|
|
4013
4019
|
var _a;
|
|
4014
|
-
return (jsxs("div", { className: "mb-2", children: [group.title && !
|
|
4015
|
-
}) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button$1, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly:
|
|
4020
|
+
return (jsxs("div", { className: "mb-2", children: [group.title && !collapsed ? (jsx("p", { className: "px-2 pb-1 pt-2 text-tiny font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsx("ul", { className: "flex flex-col gap-0.5", children: ((_a = group.items) !== null && _a !== void 0 ? _a : []).map(function (item) { return (jsx(MenuClawNavItem, { item: item, selectedKey: selectedKey, isCollapsed: collapsed, onSelect: handleMenuSelect }, item.key)); }) })] }, group.key));
|
|
4021
|
+
}) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button$1, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: collapsed, children: !collapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: helpSection.title })) : null }) })) : null] }) })] }));
|
|
4016
4022
|
});
|
|
4017
4023
|
|
|
4024
|
+
/**
|
|
4025
|
+
* Interacciones que un popover no-modal NO debe tratar como "clic fuera".
|
|
4026
|
+
*
|
|
4027
|
+
* El problema que resuelve: `useOverlay` de react-aria trata cualquier
|
|
4028
|
+
* pulsación fuera del popover como interacción externa y, cuando el popover es
|
|
4029
|
+
* el overlay visible más reciente, hace `stopPropagation()` + `preventDefault()`
|
|
4030
|
+
* sobre el `pointerdown` **y** sobre el `click`
|
|
4031
|
+
* (`@react-aria/overlays/useOverlay`). El evento nunca llega a su destino, así
|
|
4032
|
+
* que `usePress` no registra la pulsación y `onPress` no se dispara: el primer
|
|
4033
|
+
* clic solo cierra el desplegable.
|
|
4034
|
+
*
|
|
4035
|
+
* Para un clic en la página de fondo eso es lo correcto: descartar el
|
|
4036
|
+
* desplegable sin activar nada por debajo. Dentro del mismo diálogo no: ahí el
|
|
4037
|
+
* usuario está rellenando un formulario y espera que su clic llegue. Y como los
|
|
4038
|
+
* buscadores se reabren al recuperar el foco, el clic siguiente se volvía a
|
|
4039
|
+
* tragar — un callejón sin salida del que solo se salía vaciando el campo.
|
|
4040
|
+
*
|
|
4041
|
+
* La única palanca es `shouldCloseOnInteractOutside`: es el guardián de esos dos
|
|
4042
|
+
* `preventDefault`. Devolviendo `false` para lo que no es realmente "fuera", la
|
|
4043
|
+
* pulsación llega intacta. El desplegable sigue cerrándose igual, pero por
|
|
4044
|
+
* pérdida de foco (`shouldCloseOnBlur`) en vez de por interacción externa.
|
|
4045
|
+
*/
|
|
4046
|
+
var _a, _b;
|
|
4047
|
+
/**
|
|
4048
|
+
* Marca un botón como control de cierre de su contenedor. Los popovers de Aura
|
|
4049
|
+
* no lo cuentan como interacción externa, así que su pulsación no se pierde.
|
|
4050
|
+
*/
|
|
4051
|
+
var DISMISS_CONTROL_ATTRIBUTE = "data-aura-dismiss";
|
|
4052
|
+
/** Props a esparcir en un control de cierre: `<Button {...dismissControlProps} />`. */
|
|
4053
|
+
var dismissControlProps = (_a = {},
|
|
4054
|
+
_a[DISMISS_CONTROL_ATTRIBUTE] = "true",
|
|
4055
|
+
_a);
|
|
4056
|
+
/**
|
|
4057
|
+
* Marca el contenedor de una superficie modal propia (wizard, panel a medida).
|
|
4058
|
+
* No hace falta en `Modal` ni `Drawer`: los diálogos de HeroUI ya traen
|
|
4059
|
+
* `role="dialog"`, que cuenta igual.
|
|
4060
|
+
*/
|
|
4061
|
+
var CONTAINER_ATTRIBUTE = "data-aura-container";
|
|
4062
|
+
/** Props a esparcir en el contenedor: `<div {...containerProps}>`. */
|
|
4063
|
+
var containerProps = (_b = {},
|
|
4064
|
+
_b[CONTAINER_ATTRIBUTE] = "true",
|
|
4065
|
+
_b);
|
|
4066
|
+
/**
|
|
4067
|
+
* Selector de controles de cierre. Incluye `[aria-label="Close"]` para cubrir
|
|
4068
|
+
* los botones de cerrar internos de HeroUI (Modal, Drawer), que no admiten
|
|
4069
|
+
* atributos propios.
|
|
4070
|
+
*/
|
|
4071
|
+
var DISMISS_CONTROL_SELECTOR = "[".concat(DISMISS_CONTROL_ATTRIBUTE, "],[aria-label=\"Close\"]");
|
|
4072
|
+
/** Selector del contenedor modal: el marcado de Aura o un diálogo estándar. */
|
|
4073
|
+
var CONTAINER_SELECTOR = "[".concat(CONTAINER_ATTRIBUTE, "],[role=\"dialog\"],[role=\"alertdialog\"]");
|
|
4074
|
+
var matchesAncestor = function (element, selector) {
|
|
4075
|
+
if (!element || typeof element.closest !== "function") {
|
|
4076
|
+
return false;
|
|
4077
|
+
}
|
|
4078
|
+
return element.closest(selector) != null;
|
|
4079
|
+
};
|
|
4080
|
+
/** `true` si el elemento es un control de cierre (o está dentro de uno). */
|
|
4081
|
+
var isDismissControl = function (element) { return matchesAncestor(element, DISMISS_CONTROL_SELECTOR); };
|
|
4082
|
+
/**
|
|
4083
|
+
* Predicado listo para `popoverProps.shouldCloseOnInteractOutside` de un
|
|
4084
|
+
* componente con popover no-modal.
|
|
4085
|
+
*
|
|
4086
|
+
* Devuelve `false` —no es interacción externa— en tres casos:
|
|
4087
|
+
*
|
|
4088
|
+
* 1. Dentro del propio componente: el popover vive en un portal, así que el
|
|
4089
|
+
* campo de búsqueda queda fuera de él y una pulsación sobre el texto se
|
|
4090
|
+
* contaba como externa.
|
|
4091
|
+
* 2. Sobre un control de cierre del contenedor.
|
|
4092
|
+
* 3. Dentro del mismo diálogo/contenedor que el componente: seguir rellenando
|
|
4093
|
+
* el formulario no es descartar el desplegable.
|
|
4094
|
+
*
|
|
4095
|
+
* @param element Elemento donde ha empezado la interacción.
|
|
4096
|
+
* @param root Raíz del componente.
|
|
4097
|
+
*/
|
|
4098
|
+
var shouldClosePopoverOnInteractOutside = function (element, root) {
|
|
4099
|
+
var _a;
|
|
4100
|
+
if (root === null || root === void 0 ? void 0 : root.contains(element)) {
|
|
4101
|
+
return false;
|
|
4102
|
+
}
|
|
4103
|
+
if (isDismissControl(element)) {
|
|
4104
|
+
return false;
|
|
4105
|
+
}
|
|
4106
|
+
if (!matchesAncestor(element, CONTAINER_SELECTOR)) {
|
|
4107
|
+
return true;
|
|
4108
|
+
}
|
|
4109
|
+
// Solo exime el contenedor propio: un diálogo distinto sigue siendo externo.
|
|
4110
|
+
var container = (_a = root === null || root === void 0 ? void 0 : root.closest) === null || _a === void 0 ? void 0 : _a.call(root, CONTAINER_SELECTOR);
|
|
4111
|
+
return !(container === null || container === void 0 ? void 0 : container.contains(element));
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4018
4114
|
var StepIndicator = function (_a) {
|
|
4019
4115
|
var currentStep = _a.currentStep, totalSteps = _a.totalSteps, _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.showStepText, showStepText = _c === void 0 ? true : _c, stepTextFormatter = _a.stepTextFormatter, className = _a.className, props = __rest(_a, ["currentStep", "totalSteps", "color", "showStepText", "stepTextFormatter", "className"]);
|
|
4020
4116
|
var progressPercentage = Math.min((currentStep / totalSteps) * 100, 100);
|
|
@@ -4198,7 +4294,7 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
4198
4294
|
VerticalSteps.displayName = "VerticalSteps";
|
|
4199
4295
|
|
|
4200
4296
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
4201
|
-
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,
|
|
4297
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var _b = _a.closeTranslation, closeTranslation = _b === void 0 ? "Close" : _b, onClose = _a.onClose, _c = _a.hideInactiveDescriptions, hideInactiveDescriptions = _c === void 0 ? false : _c, _d = _a.isDismissable, isDismissable = _d === void 0 ? true : _d, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "closeTranslation", "onClose", "hideInactiveDescriptions", "isDismissable"]);
|
|
4202
4298
|
var handleOverlayClick = function (e) {
|
|
4203
4299
|
if (!isDismissable) {
|
|
4204
4300
|
return;
|
|
@@ -4207,7 +4303,7 @@ var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
|
4207
4303
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
4208
4304
|
}
|
|
4209
4305
|
};
|
|
4210
|
-
return (jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsx("div", { className: cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxs("div", { className: "relative flex w-full flex-col items-center justify-between gap-4 md:ml-[33.333333%] md:w-2/3 md:p-4 min-h-0", children: [jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsx("div", { className: "flex w-full justify-center", children: jsx(StepIndicator, { className: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsx("div", { className: "flex flex-col flex-1 w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) }));
|
|
4306
|
+
return (jsx("div", __assign({}, containerProps, { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsx("div", { className: cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxs("div", { className: "relative flex w-full flex-col items-center justify-between gap-4 md:ml-[33.333333%] md:w-2/3 md:p-4 min-h-0", children: [jsx(Button, __assign({ isIconOnly: true }, dismissControlProps, { "aria-label": closeTranslation, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) })), jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsx("div", { className: "flex w-full justify-center", children: jsx(StepIndicator, { className: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsx("div", { className: "flex flex-col flex-1 w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) })));
|
|
4211
4307
|
});
|
|
4212
4308
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
4213
4309
|
|
|
@@ -4234,6 +4330,7 @@ var MultiStepWizard = function (_a) {
|
|
|
4234
4330
|
cancel: "Cancel",
|
|
4235
4331
|
next: "Next",
|
|
4236
4332
|
complete: "Complete",
|
|
4333
|
+
close: "Close",
|
|
4237
4334
|
}, translations);
|
|
4238
4335
|
var paginate = React.useCallback(function (newDirection) {
|
|
4239
4336
|
setPage(function (prev) {
|
|
@@ -4285,14 +4382,11 @@ var MultiStepWizard = function (_a) {
|
|
|
4285
4382
|
if (!isOpen) {
|
|
4286
4383
|
return null;
|
|
4287
4384
|
}
|
|
4288
|
-
return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, isDismissable: isDismissable, children: [jsxs("div", { children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
4385
|
+
return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, closeTranslation: t.close, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, isDismissable: isDismissable, children: [jsxs("div", { children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
4289
4386
|
isDisabled: page === 0,
|
|
4290
4387
|
onPress: onBack,
|
|
4291
4388
|
children: t.goBack,
|
|
4292
|
-
}, cancelButtonProps: {
|
|
4293
|
-
onPress: onClose,
|
|
4294
|
-
children: t.cancel,
|
|
4295
|
-
}, nextButtonProps: {
|
|
4389
|
+
}, cancelButtonProps: __assign(__assign({}, dismissControlProps), { onPress: onClose, children: t.cancel }), nextButtonProps: {
|
|
4296
4390
|
children: getButtonText(),
|
|
4297
4391
|
onPress: handleNextAction,
|
|
4298
4392
|
isDisabled: steps[page].isStepValid === false,
|
|
@@ -8865,6 +8959,7 @@ function TagsFilter(_a) {
|
|
|
8865
8959
|
var _m = useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
|
|
8866
8960
|
var selectedList = value !== null && value !== void 0 ? value : [];
|
|
8867
8961
|
var _o = useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
|
|
8962
|
+
var rootRef = useRef(null);
|
|
8868
8963
|
useEffect(function () {
|
|
8869
8964
|
if (!onLoadMore || !sentinelNode || !hasMore) {
|
|
8870
8965
|
return;
|
|
@@ -8936,7 +9031,7 @@ function TagsFilter(_a) {
|
|
|
8936
9031
|
if (isLoading) {
|
|
8937
9032
|
return (jsx("div", { className: "flex flex-col gap-4 ".concat(className), children: jsx("div", { className: "flex justify-center py-4", children: jsx(Spinner, { size: "sm" }) }) }));
|
|
8938
9033
|
}
|
|
8939
|
-
return (jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
|
|
9034
|
+
return (jsxs("div", { ref: rootRef, className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
|
|
8940
9035
|
setInputValue(v);
|
|
8941
9036
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
|
|
8942
9037
|
}, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
|
|
@@ -8955,7 +9050,24 @@ function TagsFilter(_a) {
|
|
|
8955
9050
|
// intercepts pointer events, blocking the parent modal's close button.
|
|
8956
9051
|
// shouldCloseOnInteractOutside already handles closing on outside clicks.
|
|
8957
9052
|
isNonModal: true,
|
|
8958
|
-
|
|
9053
|
+
// El desplegable se renderiza en un portal, así que el campo de
|
|
9054
|
+
// búsqueda queda FUERA de él y una pulsación sobre el texto contaba
|
|
9055
|
+
// como interacción externa. Al cerrarse, el FocusScope devolvía el
|
|
9056
|
+
// foco con un `.focus()` que abortaba el gesto de selección que el
|
|
9057
|
+
// navegador acababa de iniciar: de ahí que arrastrar o hacer doble
|
|
9058
|
+
// clic no seleccionara nada y solo quedara borrar letra a letra
|
|
9059
|
+
// (con el teclado sí funcionaba, porque no pasa por aquí).
|
|
9060
|
+
// Las pulsaciones dentro del componente dejan de contar como
|
|
9061
|
+
// externas; las de fuera siguen cerrando el desplegable igual.
|
|
9062
|
+
//
|
|
9063
|
+
// Los controles de cierre del contenedor también quedan exentos:
|
|
9064
|
+
// react-aria hace `preventDefault()` sobre el pointerdown Y el
|
|
9065
|
+
// click de toda interacción externa, así que su `onPress` no se
|
|
9066
|
+
// disparaba y el contenedor no se podía cerrar mientras el
|
|
9067
|
+
// desplegable estuviera abierto (ver `shouldClosePopoverOnInteractOutside`).
|
|
9068
|
+
shouldCloseOnInteractOutside: function (element) {
|
|
9069
|
+
return shouldClosePopoverOnInteractOutside(element, rootRef.current);
|
|
9070
|
+
},
|
|
8959
9071
|
}, listboxProps: {
|
|
8960
9072
|
className: "max-h-[200px] overflow-y-auto",
|
|
8961
9073
|
}, className: "w-full", children: function (item) {
|
|
@@ -9699,4 +9811,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9699
9811
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9700
9812
|
};
|
|
9701
9813
|
|
|
9702
|
-
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_DONUT_COLORS, DEFAULT_PREDEFINED_COLORS, DEFAULT_RANKED_BAR_COLORS, DatePicker, DateRangePicker, DateSelector, DonutChart, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, LindaIcon, MenuClaw, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RankedBarList, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StatTile, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, computeBars, computeMax, computeSlices, computeTotal, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
9814
|
+
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, CONTAINER_ATTRIBUTE, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_DONUT_COLORS, DEFAULT_PREDEFINED_COLORS, DEFAULT_RANKED_BAR_COLORS, DISMISS_CONTROL_ATTRIBUTE, DatePicker, DateRangePicker, DateSelector, DonutChart, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, LindaIcon, MenuClaw, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RankedBarList, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StatTile, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, computeBars, computeMax, computeSlices, computeTotal, containerProps, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, dismissControlProps, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDismissControl, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, removeCustomPrimaryColor, shouldClosePopoverOnInteractOutside, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAmB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAmB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsR3C,CAAC"}
|
|
@@ -96,6 +96,25 @@ export interface MenuClawProps {
|
|
|
96
96
|
history: MenuClawHistory;
|
|
97
97
|
isOpenSidebar?: boolean;
|
|
98
98
|
onOpenSidebarChange?: (open: boolean) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Estado de plegado, en modo controlado. Si se omite, `MenuClaw` gestiona su
|
|
101
|
+
* propio estado interno (arranca expandido, o por `defaultCollapsed` si se
|
|
102
|
+
* indica) — comportamiento idéntico al de antes de esta prop.
|
|
103
|
+
*/
|
|
104
|
+
isCollapsed?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Se invoca cuando el usuario pulsa el botón de comprimir/expandir, tanto en
|
|
107
|
+
* modo controlado como no controlado. En modo controlado el consumidor debe
|
|
108
|
+
* aplicar el nuevo valor a `isCollapsed`; en modo no controlado es solo un
|
|
109
|
+
* aviso (el componente ya actualizó su estado interno).
|
|
110
|
+
*/
|
|
111
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Estado de plegado inicial en modo no controlado (sin `isCollapsed`). Se
|
|
114
|
+
* ignora si `isCollapsed` está presente.
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
defaultCollapsed?: boolean;
|
|
99
118
|
/**
|
|
100
119
|
* Key del grupo cuyos ítems se muestran en la barra inferior móvil (hasta 4
|
|
101
120
|
* + hamburguesa). Sin este valor no se muestra la barra inferior.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,yDAAyD;IACzD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB;;;;WAIG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAC5B,IAAI,CAAC;KACV,CAAC;IACF,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iEAAiE;IACjE,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,yDAAyD;IACzD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB;;;;WAIG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAC5B,IAAI,CAAC;KACV,CAAC;IACF,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iEAAiE;IACjE,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,eAAO,MAAM,eAAe,GAAI,oHAS7B,oBAAoB,mDAmJtB,CAAC"}
|
|
@@ -30,5 +30,7 @@ export interface MultiStepWizardTranslations {
|
|
|
30
30
|
cancel?: string;
|
|
31
31
|
next?: string;
|
|
32
32
|
complete?: string;
|
|
33
|
+
/** Nombre accesible del botón de cerrar (solo icono). Por defecto `"Close"`. */
|
|
34
|
+
close?: string;
|
|
33
35
|
}
|
|
34
36
|
//# sourceMappingURL=MultiStepWizard.types.d.ts.map
|