@beweco/aurora-ui 0.6.57-qa.61 → 0.6.57-qa.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1771,6 +1771,42 @@ var Chip = function (_a) {
1771
1771
  return (jsxRuntime.jsx(react.Chip, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
1772
1772
  };
1773
1773
 
1774
+ /**
1775
+ * Cierra un dropdown/popover porteado cuando un ancestro hace scroll.
1776
+ *
1777
+ * Los componentes que portean su contenido a `document.body` y lo posicionan
1778
+ * de forma absoluta con `getBoundingClientRect()` quedan "flotando" en la
1779
+ * posición original cuando un contenedor con scroll se desplaza, porque la
1780
+ * posición no se recalcula. En lugar de reposicionar en cada frame, se cierra
1781
+ * el dropdown ante el scroll de un ancestro (mismo comportamiento que los
1782
+ * overlays de React Aria/HeroUI).
1783
+ */
1784
+ var useCloseOnAncestorScroll = function (_a) {
1785
+ var isOpen = _a.isOpen, onClose = _a.onClose, contentRef = _a.contentRef;
1786
+ React.useEffect(function () {
1787
+ if (!isOpen) {
1788
+ return;
1789
+ }
1790
+ var handleAncestorScroll = function (event) {
1791
+ var _a;
1792
+ var target = event.target;
1793
+ // Permitir el scroll interno del propio contenido (la lista).
1794
+ if (target && ((_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.contains(target))) {
1795
+ return;
1796
+ }
1797
+ onClose();
1798
+ };
1799
+ // `capture` para detectar el scroll de cualquier ancestro, no solo window.
1800
+ window.addEventListener("scroll", handleAncestorScroll, {
1801
+ capture: true,
1802
+ passive: true,
1803
+ });
1804
+ return function () {
1805
+ window.removeEventListener("scroll", handleAncestorScroll, true);
1806
+ };
1807
+ }, [isOpen, onClose, contentRef]);
1808
+ };
1809
+
1774
1810
  // Lista de países con código telefónico y código ISO
1775
1811
  var countries = [
1776
1812
  { code: "+57", name: "Colombia", country: "CO" },
@@ -2426,6 +2462,13 @@ var Currency = function (_a) {
2426
2462
  document.removeEventListener("mousedown", handleClickOutside);
2427
2463
  };
2428
2464
  }, [isDropdownOpen]);
2465
+ // El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
2466
+ // un ancestro hace scroll para que no quede flotando fuera de lugar.
2467
+ useCloseOnAncestorScroll({
2468
+ isOpen: isDropdownOpen,
2469
+ onClose: function () { return setIsDropdownOpen(false); },
2470
+ contentRef: portalDropdownRef,
2471
+ });
2429
2472
  var emitChange = function (opt, amount) {
2430
2473
  if (showInput) {
2431
2474
  onChange === null || onChange === void 0 ? void 0 : onChange({
@@ -3829,8 +3872,11 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
3829
3872
  VerticalSteps.displayName = "VerticalSteps";
3830
3873
 
3831
3874
  var MultiStepSidebar = React.forwardRef(function (_a, ref) {
3832
- 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, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions"]);
3875
+ 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, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, _c = _a.isDismissable, isDismissable = _c === void 0 ? true : _c, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions", "isDismissable"]);
3833
3876
  var handleOverlayClick = function (e) {
3877
+ if (!isDismissable) {
3878
+ return;
3879
+ }
3834
3880
  if (e.target === e.currentTarget) {
3835
3881
  onClose === null || onClose === void 0 ? void 0 : onClose();
3836
3882
  }
@@ -3849,8 +3895,8 @@ var MultistepNavigationButtons = function (_a) {
3849
3895
  };
3850
3896
 
3851
3897
  var MultiStepWizard = function (_a) {
3852
- var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions;
3853
- var _b = React.useState(0), page = _b[0], setPage = _b[1];
3898
+ var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions, _b = _a.isDismissable, isDismissable = _b === void 0 ? true : _b;
3899
+ var _c = React.useState(0), page = _c[0], setPage = _c[1];
3854
3900
  React.useEffect(function () {
3855
3901
  if (isOpen) {
3856
3902
  setPage(0);
@@ -3913,7 +3959,7 @@ var MultiStepWizard = function (_a) {
3913
3959
  if (!isOpen) {
3914
3960
  return null;
3915
3961
  }
3916
- return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, 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: {
3962
+ 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: {
3917
3963
  isDisabled: page === 0,
3918
3964
  onPress: onBack,
3919
3965
  children: t.goBack,
@@ -3988,6 +4034,13 @@ var Phone = function (_a) {
3988
4034
  document.removeEventListener("mousedown", handleClickOutside);
3989
4035
  };
3990
4036
  }, [isDropdownOpen]);
4037
+ // El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
4038
+ // un ancestro hace scroll para que no quede flotando fuera de lugar.
4039
+ useCloseOnAncestorScroll({
4040
+ isOpen: isDropdownOpen,
4041
+ onClose: function () { return setIsDropdownOpen(false); },
4042
+ contentRef: portalDropdownRef,
4043
+ });
3991
4044
  var handleCountrySelect = function (country) {
3992
4045
  setSelectedCountry(country);
3993
4046
  setIsDropdownOpen(false);
@@ -9069,6 +9122,7 @@ exports.removeCustomPrimaryColor = removeCustomPrimaryColor;
9069
9122
  exports.sizeMap = sizeMap;
9070
9123
  exports.themeColors = themeColors;
9071
9124
  exports.useAuraToast = useAuraToast;
9125
+ exports.useCloseOnAncestorScroll = useCloseOnAncestorScroll;
9072
9126
  exports.useMediaQuery = useMediaQuery;
9073
9127
  exports.useNavigationLoading = useNavigationLoading;
9074
9128
  exports.useThemeContext = useThemeContext;
package/dist/index.esm.js CHANGED
@@ -1772,6 +1772,42 @@ var Chip = function (_a) {
1772
1772
  return (jsx(Chip$1, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
1773
1773
  };
1774
1774
 
1775
+ /**
1776
+ * Cierra un dropdown/popover porteado cuando un ancestro hace scroll.
1777
+ *
1778
+ * Los componentes que portean su contenido a `document.body` y lo posicionan
1779
+ * de forma absoluta con `getBoundingClientRect()` quedan "flotando" en la
1780
+ * posición original cuando un contenedor con scroll se desplaza, porque la
1781
+ * posición no se recalcula. En lugar de reposicionar en cada frame, se cierra
1782
+ * el dropdown ante el scroll de un ancestro (mismo comportamiento que los
1783
+ * overlays de React Aria/HeroUI).
1784
+ */
1785
+ var useCloseOnAncestorScroll = function (_a) {
1786
+ var isOpen = _a.isOpen, onClose = _a.onClose, contentRef = _a.contentRef;
1787
+ useEffect(function () {
1788
+ if (!isOpen) {
1789
+ return;
1790
+ }
1791
+ var handleAncestorScroll = function (event) {
1792
+ var _a;
1793
+ var target = event.target;
1794
+ // Permitir el scroll interno del propio contenido (la lista).
1795
+ if (target && ((_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.contains(target))) {
1796
+ return;
1797
+ }
1798
+ onClose();
1799
+ };
1800
+ // `capture` para detectar el scroll de cualquier ancestro, no solo window.
1801
+ window.addEventListener("scroll", handleAncestorScroll, {
1802
+ capture: true,
1803
+ passive: true,
1804
+ });
1805
+ return function () {
1806
+ window.removeEventListener("scroll", handleAncestorScroll, true);
1807
+ };
1808
+ }, [isOpen, onClose, contentRef]);
1809
+ };
1810
+
1775
1811
  // Lista de países con código telefónico y código ISO
1776
1812
  var countries = [
1777
1813
  { code: "+57", name: "Colombia", country: "CO" },
@@ -2427,6 +2463,13 @@ var Currency = function (_a) {
2427
2463
  document.removeEventListener("mousedown", handleClickOutside);
2428
2464
  };
2429
2465
  }, [isDropdownOpen]);
2466
+ // El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
2467
+ // un ancestro hace scroll para que no quede flotando fuera de lugar.
2468
+ useCloseOnAncestorScroll({
2469
+ isOpen: isDropdownOpen,
2470
+ onClose: function () { return setIsDropdownOpen(false); },
2471
+ contentRef: portalDropdownRef,
2472
+ });
2430
2473
  var emitChange = function (opt, amount) {
2431
2474
  if (showInput) {
2432
2475
  onChange === null || onChange === void 0 ? void 0 : onChange({
@@ -3830,8 +3873,11 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
3830
3873
  VerticalSteps.displayName = "VerticalSteps";
3831
3874
 
3832
3875
  var MultiStepSidebar = React.forwardRef(function (_a, ref) {
3833
- 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, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions"]);
3876
+ 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, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, _c = _a.isDismissable, isDismissable = _c === void 0 ? true : _c, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions", "isDismissable"]);
3834
3877
  var handleOverlayClick = function (e) {
3878
+ if (!isDismissable) {
3879
+ return;
3880
+ }
3835
3881
  if (e.target === e.currentTarget) {
3836
3882
  onClose === null || onClose === void 0 ? void 0 : onClose();
3837
3883
  }
@@ -3850,8 +3896,8 @@ var MultistepNavigationButtons = function (_a) {
3850
3896
  };
3851
3897
 
3852
3898
  var MultiStepWizard = function (_a) {
3853
- var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions;
3854
- var _b = React.useState(0), page = _b[0], setPage = _b[1];
3899
+ var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions, _b = _a.isDismissable, isDismissable = _b === void 0 ? true : _b;
3900
+ var _c = React.useState(0), page = _c[0], setPage = _c[1];
3855
3901
  React.useEffect(function () {
3856
3902
  if (isOpen) {
3857
3903
  setPage(0);
@@ -3914,7 +3960,7 @@ var MultiStepWizard = function (_a) {
3914
3960
  if (!isOpen) {
3915
3961
  return null;
3916
3962
  }
3917
- return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, 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: {
3963
+ 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: {
3918
3964
  isDisabled: page === 0,
3919
3965
  onPress: onBack,
3920
3966
  children: t.goBack,
@@ -3989,6 +4035,13 @@ var Phone = function (_a) {
3989
4035
  document.removeEventListener("mousedown", handleClickOutside);
3990
4036
  };
3991
4037
  }, [isDropdownOpen]);
4038
+ // El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
4039
+ // un ancestro hace scroll para que no quede flotando fuera de lugar.
4040
+ useCloseOnAncestorScroll({
4041
+ isOpen: isDropdownOpen,
4042
+ onClose: function () { return setIsDropdownOpen(false); },
4043
+ contentRef: portalDropdownRef,
4044
+ });
3992
4045
  var handleCountrySelect = function (country) {
3993
4046
  setSelectedCountry(country);
3994
4047
  setIsDropdownOpen(false);
@@ -8958,4 +9011,4 @@ var NavigationLoadingProvider = function (_a) {
8958
9011
  return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
8959
9012
  };
8960
9013
 
8961
- 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_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$4 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isExactThemeColor, isGroupState, isHexColor, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
9014
+ 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_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$4 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isExactThemeColor, isGroupState, isHexColor, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAkD1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmSjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/Currency.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAkD1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2SjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { MultiStepWizardProps } from "./MultiStepWizard.types";
2
- export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, onComplete, completeButtonText, hideInactiveDescriptions, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, onComplete, completeButtonText, hideInactiveDescriptions, isDismissable, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  //# sourceMappingURL=MultiStepWizard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,eAAO,MAAM,eAAe,GAAI,qGAQ7B,oBAAoB,mDA4ItB,CAAC"}
1
+ {"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,eAAO,MAAM,eAAe,GAAI,oHAS7B,oBAAoB,mDA6ItB,CAAC"}
@@ -17,6 +17,12 @@ export interface MultiStepWizardProps {
17
17
  completeButtonText?: string;
18
18
  /** Oculta las descripciones de los pasos no activos en el sidebar */
19
19
  hideInactiveDescriptions?: boolean;
20
+ /**
21
+ * Permite cerrar el wizard al hacer clic en el fondo (backdrop).
22
+ * Por defecto `true`. Pásalo como `false` para evitar cierres
23
+ * accidentales que descarten los datos del formulario.
24
+ */
25
+ isDismissable?: boolean;
20
26
  }
21
27
  export interface MultiStepWizardTranslations {
22
28
  continue?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepWizard.types.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,IAAI;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"MultiStepWizard.types.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,IAAI;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepSidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,eAAO,MAAM,gBAAgB,8FAyF5B,CAAC"}
1
+ {"version":3,"file":"MultiStepSidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,eAAO,MAAM,gBAAgB,8FA6F5B,CAAC"}
@@ -10,5 +10,7 @@ export interface MultiStepSidebarProps extends React.HTMLAttributes<HTMLDivEleme
10
10
  steps: Step[];
11
11
  goBackTranslation?: string;
12
12
  hideInactiveDescriptions?: boolean;
13
+ /** Permite cerrar al hacer clic en el backdrop. Por defecto `true`. */
14
+ isDismissable?: boolean;
13
15
  }
14
16
  //# sourceMappingURL=MultiStepSidebar.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepSidebar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,qBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC"}
1
+ {"version":3,"file":"MultiStepSidebar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,qBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,uEAAuE;IACvE,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/Phone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsO3C,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/Phone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8O3C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,2 +1,3 @@
1
+ export { useCloseOnAncestorScroll } from "./useCloseOnAncestorScroll";
1
2
  export { useMediaQuery } from "./useMediaQuery";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type RefObject } from "react";
2
+ interface UseCloseOnAncestorScrollOptions {
3
+ /** Si el dropdown/popover está abierto. */
4
+ isOpen: boolean;
5
+ /** Callback para cerrar el dropdown/popover. */
6
+ onClose: () => void;
7
+ /**
8
+ * Ref al contenido porteado (la lista). Si el scroll ocurre dentro de este
9
+ * elemento (p. ej. desplazar la lista de opciones) no se cierra.
10
+ */
11
+ contentRef?: RefObject<HTMLElement | null>;
12
+ }
13
+ /**
14
+ * Cierra un dropdown/popover porteado cuando un ancestro hace scroll.
15
+ *
16
+ * Los componentes que portean su contenido a `document.body` y lo posicionan
17
+ * de forma absoluta con `getBoundingClientRect()` quedan "flotando" en la
18
+ * posición original cuando un contenedor con scroll se desplaza, porque la
19
+ * posición no se recalcula. En lugar de reposicionar en cada frame, se cierra
20
+ * el dropdown ante el scroll de un ancestro (mismo comportamiento que los
21
+ * overlays de React Aria/HeroUI).
22
+ */
23
+ export declare const useCloseOnAncestorScroll: ({ isOpen, onClose, contentRef, }: UseCloseOnAncestorScrollOptions) => void;
24
+ export {};
25
+ //# sourceMappingURL=useCloseOnAncestorScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCloseOnAncestorScroll.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCloseOnAncestorScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAElD,UAAU,+BAA+B;IACxC,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,gDAAgD;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC3C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GAAI,kCAItC,+BAA+B,KAAG,IAwBpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.57-qa.61",
3
+ "version": "0.6.57-qa.63",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",