@beweco/aurora-ui 0.6.57-qa.66 → 0.6.58
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 +0 -44
- package/dist/index.esm.js +1 -44
- package/dist/types/components/currency/Currency.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/hooks/useCloseOnAncestorScroll.d.ts +0 -25
- package/dist/types/hooks/useCloseOnAncestorScroll.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1771,42 +1771,6 @@ 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
|
-
|
|
1810
1774
|
// Lista de países con código telefónico y código ISO
|
|
1811
1775
|
var countries = [
|
|
1812
1776
|
{ code: "+57", name: "Colombia", country: "CO" },
|
|
@@ -2462,13 +2426,6 @@ var Currency = function (_a) {
|
|
|
2462
2426
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2463
2427
|
};
|
|
2464
2428
|
}, [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
|
-
});
|
|
2472
2429
|
var emitChange = function (opt, amount) {
|
|
2473
2430
|
if (showInput) {
|
|
2474
2431
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
@@ -9126,7 +9083,6 @@ exports.removeCustomPrimaryColor = removeCustomPrimaryColor;
|
|
|
9126
9083
|
exports.sizeMap = sizeMap;
|
|
9127
9084
|
exports.themeColors = themeColors;
|
|
9128
9085
|
exports.useAuraToast = useAuraToast;
|
|
9129
|
-
exports.useCloseOnAncestorScroll = useCloseOnAncestorScroll;
|
|
9130
9086
|
exports.useMediaQuery = useMediaQuery;
|
|
9131
9087
|
exports.useNavigationLoading = useNavigationLoading;
|
|
9132
9088
|
exports.useThemeContext = useThemeContext;
|
package/dist/index.esm.js
CHANGED
|
@@ -1772,42 +1772,6 @@ 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
|
-
|
|
1811
1775
|
// Lista de países con código telefónico y código ISO
|
|
1812
1776
|
var countries = [
|
|
1813
1777
|
{ code: "+57", name: "Colombia", country: "CO" },
|
|
@@ -2463,13 +2427,6 @@ var Currency = function (_a) {
|
|
|
2463
2427
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2464
2428
|
};
|
|
2465
2429
|
}, [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
|
-
});
|
|
2473
2430
|
var emitChange = function (opt, amount) {
|
|
2474
2431
|
if (showInput) {
|
|
2475
2432
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
@@ -9015,4 +8972,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9015
8972
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9016
8973
|
};
|
|
9017
8974
|
|
|
9018
|
-
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,
|
|
8975
|
+
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 };
|
|
@@ -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;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|