@beweco/aurora-ui 0.6.76 → 0.6.78
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 +230 -106
- package/dist/index.esm.js +229 -107
- package/dist/types/components/autocomplete/AutoComplete.d.ts +16 -0
- package/dist/types/components/autocomplete/AutoComplete.d.ts.map +1 -1
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts +12 -0
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts.map +1 -1
- package/dist/types/components/currency/Currency.d.ts.map +1 -1
- package/dist/types/components/currency/currency.constants.d.ts.map +1 -1
- package/dist/types/components/phone/Phone.d.ts.map +1 -1
- package/dist/types/components/phone/flags/Canada.d.ts +2 -0
- package/dist/types/components/phone/flags/Canada.d.ts.map +1 -0
- package/dist/types/components/phone/flags/FlagIcon.d.ts.map +1 -1
- package/dist/types/components/phone/flags/index.d.ts +1 -0
- package/dist/types/components/phone/flags/index.d.ts.map +1 -1
- package/dist/types/components/phone/phone.constants.d.ts.map +1 -1
- package/dist/types/components/tags-filter/TagsFilter.d.ts.map +1 -1
- package/dist/types/utils/dismiss-control.d.ts +47 -1
- package/dist/types/utils/dismiss-control.d.ts.map +1 -1
- package/dist/types/utils/text-search.d.ts +18 -0
- package/dist/types/utils/text-search.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -614,6 +614,139 @@ function AreaLineChart(_a) {
|
|
|
614
614
|
return jsx("div", { className: className, children: content });
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
+
/**
|
|
618
|
+
* Interacciones que un popover no-modal NO debe tratar como "clic fuera".
|
|
619
|
+
*
|
|
620
|
+
* El problema que resuelve: `useOverlay` de react-aria trata cualquier
|
|
621
|
+
* pulsación fuera del popover como interacción externa y, cuando el popover es
|
|
622
|
+
* el overlay visible más reciente, hace `stopPropagation()` + `preventDefault()`
|
|
623
|
+
* sobre el `pointerdown` **y** sobre el `click`
|
|
624
|
+
* (`@react-aria/overlays/useOverlay`). El evento nunca llega a su destino, así
|
|
625
|
+
* que `usePress` no registra la pulsación y `onPress` no se dispara: el primer
|
|
626
|
+
* clic solo cierra el desplegable.
|
|
627
|
+
*
|
|
628
|
+
* Para un clic en la página de fondo eso es lo correcto: descartar el
|
|
629
|
+
* desplegable sin activar nada por debajo. Dentro del mismo diálogo no: ahí el
|
|
630
|
+
* usuario está rellenando un formulario y espera que su clic llegue. Y como los
|
|
631
|
+
* buscadores se reabren al recuperar el foco, el clic siguiente se volvía a
|
|
632
|
+
* tragar — un callejón sin salida del que solo se salía vaciando el campo.
|
|
633
|
+
*
|
|
634
|
+
* La única palanca es `shouldCloseOnInteractOutside`: es el guardián de esos dos
|
|
635
|
+
* `preventDefault`. Devolviendo `false` para lo que no es realmente "fuera", la
|
|
636
|
+
* pulsación llega intacta. El desplegable sigue cerrándose igual, pero por
|
|
637
|
+
* pérdida de foco (`shouldCloseOnBlur`) en vez de por interacción externa.
|
|
638
|
+
*/
|
|
639
|
+
var _a, _b;
|
|
640
|
+
/**
|
|
641
|
+
* Marca un botón como control de cierre de su contenedor. Los popovers de Aura
|
|
642
|
+
* no lo cuentan como interacción externa, así que su pulsación no se pierde.
|
|
643
|
+
*/
|
|
644
|
+
var DISMISS_CONTROL_ATTRIBUTE = "data-aura-dismiss";
|
|
645
|
+
/** Props a esparcir en un control de cierre: `<Button {...dismissControlProps} />`. */
|
|
646
|
+
var dismissControlProps = (_a = {},
|
|
647
|
+
_a[DISMISS_CONTROL_ATTRIBUTE] = "true",
|
|
648
|
+
_a);
|
|
649
|
+
/**
|
|
650
|
+
* Marca el contenedor de una superficie modal propia (wizard, panel a medida).
|
|
651
|
+
* No hace falta en `Modal` ni `Drawer`: los diálogos de HeroUI ya traen
|
|
652
|
+
* `role="dialog"`, que cuenta igual.
|
|
653
|
+
*/
|
|
654
|
+
var CONTAINER_ATTRIBUTE = "data-aura-container";
|
|
655
|
+
/** Props a esparcir en el contenedor: `<div {...containerProps}>`. */
|
|
656
|
+
var containerProps = (_b = {},
|
|
657
|
+
_b[CONTAINER_ATTRIBUTE] = "true",
|
|
658
|
+
_b);
|
|
659
|
+
/**
|
|
660
|
+
* Selector de controles de cierre. Incluye `[aria-label="Close"]` para cubrir
|
|
661
|
+
* los botones de cerrar internos de HeroUI (Modal, Drawer), que no admiten
|
|
662
|
+
* atributos propios.
|
|
663
|
+
*/
|
|
664
|
+
var DISMISS_CONTROL_SELECTOR = "[".concat(DISMISS_CONTROL_ATTRIBUTE, "],[aria-label=\"Close\"]");
|
|
665
|
+
/** Selector del contenedor modal: el marcado de Aura o un diálogo estándar. */
|
|
666
|
+
var CONTAINER_SELECTOR = "[".concat(CONTAINER_ATTRIBUTE, "],[role=\"dialog\"],[role=\"alertdialog\"]");
|
|
667
|
+
var matchesAncestor = function (element, selector) {
|
|
668
|
+
if (!element || typeof element.closest !== "function") {
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
return element.closest(selector) != null;
|
|
672
|
+
};
|
|
673
|
+
/** `true` si el elemento es un control de cierre (o está dentro de uno). */
|
|
674
|
+
var isDismissControl = function (element) { return matchesAncestor(element, DISMISS_CONTROL_SELECTOR); };
|
|
675
|
+
/**
|
|
676
|
+
* `true` si el elemento vive dentro de una superficie modal: un diálogo estándar
|
|
677
|
+
* o un contenedor marcado con `containerProps`.
|
|
678
|
+
*
|
|
679
|
+
* Es la condición que decide si un componente con popover no-modal necesita el
|
|
680
|
+
* predicado de más abajo. Fuera de una superficie así, HeroUI ya resuelve el
|
|
681
|
+
* caso por su cuenta (`ariaShouldCloseOnInteractOutside` cierra el desplegable
|
|
682
|
+
* y devuelve `false`, de modo que la pulsación llega a su destino); solo falla
|
|
683
|
+
* cuando hay un diálogo de por medio, y ahí entra el nuestro.
|
|
684
|
+
*/
|
|
685
|
+
var isInsideDismissContainer = function (element) { return matchesAncestor(element, CONTAINER_SELECTOR); };
|
|
686
|
+
/**
|
|
687
|
+
* Predicado listo para `popoverProps.shouldCloseOnInteractOutside` de un
|
|
688
|
+
* componente con popover no-modal.
|
|
689
|
+
*
|
|
690
|
+
* Devuelve `false` —no es interacción externa— en tres casos:
|
|
691
|
+
*
|
|
692
|
+
* 1. Dentro del propio componente: el popover vive en un portal, así que el
|
|
693
|
+
* campo de búsqueda queda fuera de él y una pulsación sobre el texto se
|
|
694
|
+
* contaba como externa.
|
|
695
|
+
* 2. Sobre un control de cierre del contenedor propio.
|
|
696
|
+
* 3. Dentro del mismo diálogo/contenedor que el componente: seguir rellenando
|
|
697
|
+
* el formulario no es descartar el desplegable.
|
|
698
|
+
*
|
|
699
|
+
* Las exenciones 2 y 3 se limitan al contenedor del propio componente. Un
|
|
700
|
+
* control de cierre suelto en la página —la X de un toast, la de un banner— no
|
|
701
|
+
* tiene nada que ver con este desplegable, así que sigue contando como externo
|
|
702
|
+
* y lo cierra.
|
|
703
|
+
*
|
|
704
|
+
* @param element Elemento donde ha empezado la interacción.
|
|
705
|
+
* @param root Raíz del componente.
|
|
706
|
+
*/
|
|
707
|
+
var shouldClosePopoverOnInteractOutside = function (element, root) {
|
|
708
|
+
var _a;
|
|
709
|
+
if (root === null || root === void 0 ? void 0 : root.contains(element)) {
|
|
710
|
+
return false;
|
|
711
|
+
}
|
|
712
|
+
var container = (_a = root === null || root === void 0 ? void 0 : root.closest) === null || _a === void 0 ? void 0 : _a.call(root, CONTAINER_SELECTOR);
|
|
713
|
+
if (isDismissControl(element)) {
|
|
714
|
+
// Sin contenedor propio no hay a quién eximir: el control de cierre es
|
|
715
|
+
// de otra cosa y su pulsación descarta el desplegable como cualquier otra.
|
|
716
|
+
return container ? !container.contains(element) : true;
|
|
717
|
+
}
|
|
718
|
+
if (!matchesAncestor(element, CONTAINER_SELECTOR)) {
|
|
719
|
+
return true;
|
|
720
|
+
}
|
|
721
|
+
// Solo exime el contenedor propio: un diálogo distinto sigue siendo externo.
|
|
722
|
+
return !(container === null || container === void 0 ? void 0 : container.contains(element));
|
|
723
|
+
};
|
|
724
|
+
/**
|
|
725
|
+
* Mezcla las `popoverProps` de un consumidor con el predicado por defecto, para
|
|
726
|
+
* que un componente con popover no-modal no trate como "clic fuera" lo que no lo
|
|
727
|
+
* es (ver `shouldClosePopoverOnInteractOutside`).
|
|
728
|
+
*
|
|
729
|
+
* Llamar solo cuando el componente está dentro de una superficie modal
|
|
730
|
+
* (`isInsideDismissContainer`). Fuera de ella HeroUI trae su propio default y
|
|
731
|
+
* hay que dejárselo: instalar cualquier predicado lo desactiva, porque su mezcla
|
|
732
|
+
* es por truthiness (`@heroui/autocomplete` → `use-autocomplete`).
|
|
733
|
+
*
|
|
734
|
+
* El consumidor puede sustituir el predicado pasando el suyo — es la salida para
|
|
735
|
+
* casos a medida, no la puerta a `() => true`. Pasar `shouldCloseOnInteractOutside:
|
|
736
|
+
* undefined` NO desactiva el default: para eso hay que pasar un predicado propio.
|
|
737
|
+
*
|
|
738
|
+
* @param popoverProps Las que llegan del consumidor, si las hay.
|
|
739
|
+
* @param getRoot Lector de la raíz del componente. Es una función y no un
|
|
740
|
+
* valor porque el `ref` todavía es `null` en el primer
|
|
741
|
+
* render: hay que leerlo cuando ocurre la interacción.
|
|
742
|
+
*/
|
|
743
|
+
var withPopoverDismissDefaults = function (popoverProps, getRoot) {
|
|
744
|
+
var _a;
|
|
745
|
+
return (__assign(__assign({}, popoverProps), { shouldCloseOnInteractOutside: (_a = popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.shouldCloseOnInteractOutside) !== null && _a !== void 0 ? _a : (function (element) {
|
|
746
|
+
return shouldClosePopoverOnInteractOutside(element, getRoot());
|
|
747
|
+
}) }));
|
|
748
|
+
};
|
|
749
|
+
|
|
617
750
|
/** Clases del wrapper del icono: margen derecho y alineación igual para lupa e iconos custom */
|
|
618
751
|
var ICON_WRAPPER_CLASSNAME = "mr-2 flex shrink-0 items-center [&_svg]:shrink-0";
|
|
619
752
|
var DEFAULT_ICON = (jsx(IconComponent, { icon: "solar:magnifer-outline", className: "text-default-400 pointer-events-none shrink-0", size: "sm", "aria-hidden": true }));
|
|
@@ -626,15 +759,39 @@ var DEFAULT_ICON = (jsx(IconComponent, { icon: "solar:magnifer-outline", classNa
|
|
|
626
759
|
* - labelPlacement: Outside
|
|
627
760
|
* - Size: sm, md, lg (configurable)
|
|
628
761
|
* - Icono: lupa por defecto; acepta prop icon para personalizar u ocultar (null).
|
|
762
|
+
*
|
|
763
|
+
* **Dentro de un modal, drawer o contenedor marcado con `containerProps`**, el
|
|
764
|
+
* desplegable deja de contar como "clic fuera" lo que ocurre dentro del propio
|
|
765
|
+
* componente, sobre un control de cierre del contenedor o dentro de ese mismo
|
|
766
|
+
* contenedor: react-aria hace `preventDefault()` sobre esas pulsaciones y el
|
|
767
|
+
* control de destino nunca llegaba a recibir su `onPress` (ver
|
|
768
|
+
* `shouldClosePopoverOnInteractOutside`). Sigue cerrándose, por la vía del
|
|
769
|
+
* `shouldCloseOnBlur` del combobox de HeroUI — no por `onBlurWithin` del
|
|
770
|
+
* overlay, que está gateado por el mismo predicado.
|
|
771
|
+
*
|
|
772
|
+
* **Fuera de un contenedor así no se instala nada**: HeroUI ya resuelve ese caso
|
|
773
|
+
* con `ariaShouldCloseOnInteractOutside`, y como su mezcla es por truthiness,
|
|
774
|
+
* poner un predicado propio lo desactivaría y volvería a tragarse la pulsación.
|
|
775
|
+
*
|
|
776
|
+
* Un consumidor puede sustituir el predicado con su propio
|
|
777
|
+
* `popoverProps.shouldCloseOnInteractOutside`; entonces manda el suyo siempre.
|
|
629
778
|
*/
|
|
630
779
|
var AuraAutocomplete = function (_a) {
|
|
631
|
-
var label = _a.label, id = _a.id, icon = _a.icon, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "icon", "size", "variant", "radius"]);
|
|
780
|
+
var label = _a.label, id = _a.id, icon = _a.icon, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, popoverProps = _a.popoverProps, props = __rest(_a, ["label", "id", "icon", "size", "variant", "radius", "popoverProps"]);
|
|
632
781
|
var generatedId = useId();
|
|
782
|
+
// El desplegable se renderiza en un portal, así que el campo de búsqueda
|
|
783
|
+
// queda fuera de él. Sin esta raíz el predicado no puede distinguir lo que
|
|
784
|
+
// pasa dentro del componente de un clic real de fuera. Se guarda en estado
|
|
785
|
+
// —y no en un ref— porque de ella depende SI se instala el predicado, y eso
|
|
786
|
+
// hay que decidirlo en render: un ref no dispara el re-render que hace falta.
|
|
787
|
+
var _e = useState(null), root = _e[0], setRoot = _e[1];
|
|
633
788
|
var autoId = id || generatedId;
|
|
634
789
|
var resolvedIcon = icon === undefined ? DEFAULT_ICON : icon;
|
|
635
790
|
var hasIcon = resolvedIcon != null;
|
|
636
791
|
var endContent = hasIcon ? (jsx("span", { className: ICON_WRAPPER_CLASSNAME, children: resolvedIcon })) : null;
|
|
637
|
-
return (jsxs("div", { children: [label && (jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsx(Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, endContent: endContent,
|
|
792
|
+
return (jsxs("div", { ref: setRoot, children: [label && (jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsx(Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, endContent: endContent, popoverProps: isInsideDismissContainer(root)
|
|
793
|
+
? withPopoverDismissDefaults(popoverProps, function () { return root; })
|
|
794
|
+
: popoverProps, classNames: __assign({ base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500", popoverContent: "aura-popover-content [&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500" }, (hasIcon && { selectorButton: "!hidden" })) }))] }));
|
|
638
795
|
};
|
|
639
796
|
|
|
640
797
|
/**
|
|
@@ -1826,6 +1983,34 @@ var useCloseOnAncestorScroll = function (_a) {
|
|
|
1826
1983
|
}, [isOpen, onClose, contentRef]);
|
|
1827
1984
|
};
|
|
1828
1985
|
|
|
1986
|
+
/**
|
|
1987
|
+
* Comparación de texto para los buscadores de los desplegables (país, moneda).
|
|
1988
|
+
*
|
|
1989
|
+
* El problema que resuelve: los nombres de la lista de países mezclan idiomas y
|
|
1990
|
+
* algunos llevan tilde ("Canadá", "República Dominicana"). Un `includes` crudo
|
|
1991
|
+
* exige que quien busca escriba la tilde, así que teclear "canada" no encontraba
|
|
1992
|
+
* Canadá y "republica" no encontraba República Dominicana — el desplegable
|
|
1993
|
+
* respondía "No se encontraron países" con el país delante.
|
|
1994
|
+
*/
|
|
1995
|
+
/** Minúsculas y sin diacríticos, para comparar lo que se escribe con lo que se muestra. */
|
|
1996
|
+
var normalizeForSearch = function (value) {
|
|
1997
|
+
return value
|
|
1998
|
+
.normalize("NFD")
|
|
1999
|
+
// Rango de marcas combinantes (tildes, diéresis, cedilla) que deja NFD.
|
|
2000
|
+
// Se usa en vez de \p{Diacritic} porque el flag `u` exige target es6+.
|
|
2001
|
+
.replace(/[̀-ͯ]/g, "")
|
|
2002
|
+
.toLowerCase();
|
|
2003
|
+
};
|
|
2004
|
+
/**
|
|
2005
|
+
* `true` si el término aparece en alguno de los campos, ignorando tildes y
|
|
2006
|
+
* mayúsculas. Los campos ausentes se descartan. Un término vacío casa siempre,
|
|
2007
|
+
* igual que el `includes` que sustituye.
|
|
2008
|
+
*/
|
|
2009
|
+
var matchesSearchTerm = function (fields, term) {
|
|
2010
|
+
var needle = normalizeForSearch(term);
|
|
2011
|
+
return fields.some(function (field) { return field != null && normalizeForSearch(field).includes(needle); });
|
|
2012
|
+
};
|
|
2013
|
+
|
|
1829
2014
|
// Lista de países con código telefónico y código ISO
|
|
1830
2015
|
var countries = [
|
|
1831
2016
|
{ code: "+57", name: "Colombia", country: "CO" },
|
|
@@ -1835,6 +2020,8 @@ var countries = [
|
|
|
1835
2020
|
{ code: "+503", name: "El Salvador", country: "SV" },
|
|
1836
2021
|
{ code: "+507", name: "Panama", country: "PA" },
|
|
1837
2022
|
{ code: "+506", name: "Costa Rica", country: "CR" },
|
|
2023
|
+
{ code: "+504", name: "Honduras", country: "HN" },
|
|
2024
|
+
{ code: "+505", name: "Nicaragua", country: "NI" },
|
|
1838
2025
|
{ code: "+51", name: "Peru", country: "PE" },
|
|
1839
2026
|
{ code: "+56", name: "Chile", country: "CL" },
|
|
1840
2027
|
{ code: "+591", name: "Bolivia", country: "BO" },
|
|
@@ -1847,6 +2034,9 @@ var countries = [
|
|
|
1847
2034
|
{ code: "+598", name: "Uruguay", country: "UY" },
|
|
1848
2035
|
{ code: "+58", name: "Venezuela", country: "VE" },
|
|
1849
2036
|
{ code: "+1", name: "United States", country: "US" },
|
|
2037
|
+
// Canadá va detrás del resto de países con +1: para values legacy sin ISO
|
|
2038
|
+
// gana el primer +1 de la lista y ese comportamiento no debe cambiar.
|
|
2039
|
+
{ code: "+1", name: "Canadá", country: "CA" },
|
|
1850
2040
|
{ code: "+7", name: "Russia", country: "RU" },
|
|
1851
2041
|
{ code: "+20", name: "Egypt", country: "EG" },
|
|
1852
2042
|
{ code: "+27", name: "South Africa", country: "ZA" },
|
|
@@ -1874,6 +2064,7 @@ var defaultTranslations$d = {
|
|
|
1874
2064
|
selectCountryAriaLabel: "Seleccionar país",
|
|
1875
2065
|
expandListAriaLabel: "Desplegar lista de países",
|
|
1876
2066
|
noCountriesFound: "No se encontraron países",
|
|
2067
|
+
countries: {},
|
|
1877
2068
|
};
|
|
1878
2069
|
|
|
1879
2070
|
/**
|
|
@@ -1901,11 +2092,14 @@ var currencyByCountry = {
|
|
|
1901
2092
|
DO: "DOP",
|
|
1902
2093
|
EC: "USD",
|
|
1903
2094
|
GT: "GTQ",
|
|
2095
|
+
HN: "HNL",
|
|
2096
|
+
NI: "NIO",
|
|
1904
2097
|
PR: "USD",
|
|
1905
2098
|
PY: "PYG",
|
|
1906
2099
|
UY: "UYU",
|
|
1907
2100
|
VE: "VES",
|
|
1908
2101
|
US: "USD",
|
|
2102
|
+
CA: "CAD",
|
|
1909
2103
|
RU: "RUB",
|
|
1910
2104
|
EG: "EGP",
|
|
1911
2105
|
ZA: "ZAR",
|
|
@@ -2009,6 +2203,10 @@ var Bulgaria = function () {
|
|
|
2009
2203
|
return (jsxs("svg", { width: "50", height: "40", viewBox: "0 0 21 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxs("g", { clipPath: "url(#clip0_13_10424)", children: [jsx("path", { d: "M21 0H0V14H21V0Z", fill: "white" }), jsx("path", { d: "M21 4.66669H0V14H21V4.66669Z", fill: "#00966E" }), jsx("path", { d: "M21 9.33331H0V14H21V9.33331Z", fill: "#D62612" })] }), jsx("defs", { children: jsx("clipPath", { id: "clip0_13_10424", children: jsx("rect", { width: "21", height: "14", fill: "white" }) }) })] }));
|
|
2010
2204
|
};
|
|
2011
2205
|
|
|
2206
|
+
var Canada = function () {
|
|
2207
|
+
return (jsxs("svg", { width: "50", height: "40", viewBox: "0 0 21 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("rect", { width: "21", height: "14", fill: "white" }), jsx("rect", { width: "5.25", height: "14", fill: "#D80621" }), jsx("rect", { x: "15.75", width: "5.25", height: "14", fill: "#D80621" }), jsx("path", { d: "M10.50 2.90 L10.92 4.25 L11.75 3.95 L11.45 5.30 L13.30 4.95 L12.85 5.95 L13.20 6.60 L12.00 7.45 L12.30 8.10 L10.95 8.05 L10.50 9.90 L10.05 8.05 L8.70 8.10 L9.00 7.45 L7.80 6.60 L8.15 5.95 L7.70 4.95 L9.55 5.30 L9.25 3.95 L10.08 4.25 Z", fill: "#D80621" }), jsx("rect", { x: "10.34", y: "9.7", width: "0.32", height: "1.5", fill: "#D80621" })] }));
|
|
2208
|
+
};
|
|
2209
|
+
|
|
2012
2210
|
var Chile = function () {
|
|
2013
2211
|
return (jsxs("svg", { width: "50", height: "40", viewBox: "0 0 21 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxs("g", { clipPath: "url(#clip0_13_10428)", children: [jsx("path", { d: "M0 0H21V14H0V0Z", fill: "white" }), jsx("path", { d: "M0 7V0H7V10.5L0 7Z", fill: "#0039A6" }), jsx("path", { d: "M0 7H21V14H0V7Z", fill: "#D72B1F" }), jsx("path", { d: "M3.5 1.75L4.52865 4.91575L1.83575 2.95925H5.16425L2.47135 4.91575L3.5 1.75Z", fill: "white" })] }), jsx("defs", { children: jsx("clipPath", { id: "clip0_13_10428", children: jsx("rect", { width: "21", height: "14", fill: "white" }) }) })] }));
|
|
2014
2212
|
};
|
|
@@ -2281,6 +2479,7 @@ var flagsMap = {
|
|
|
2281
2479
|
BO: Bolivia,
|
|
2282
2480
|
BR: Brasil,
|
|
2283
2481
|
BG: Bulgaria,
|
|
2482
|
+
CA: Canada,
|
|
2284
2483
|
CL: Chile,
|
|
2285
2484
|
CN: China,
|
|
2286
2485
|
CO: Colombia,
|
|
@@ -2522,12 +2721,14 @@ var Currency = function (_a) {
|
|
|
2522
2721
|
!currencySelectorLocked &&
|
|
2523
2722
|
!disabled &&
|
|
2524
2723
|
createPortal(jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", role: "listbox", children: [jsx("div", { className: "p-2", children: jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
|
|
2525
|
-
var searchTerm = e.target.value
|
|
2724
|
+
var searchTerm = e.target.value;
|
|
2526
2725
|
var filtered = options.filter(function (opt) {
|
|
2527
|
-
return
|
|
2528
|
-
opt
|
|
2529
|
-
opt.
|
|
2530
|
-
opt.
|
|
2726
|
+
return matchesSearchTerm([
|
|
2727
|
+
getCountryName(opt),
|
|
2728
|
+
opt.name,
|
|
2729
|
+
opt.currency,
|
|
2730
|
+
opt.country,
|
|
2731
|
+
], searchTerm);
|
|
2531
2732
|
});
|
|
2532
2733
|
setFilteredOptions(filtered);
|
|
2533
2734
|
} }) }), jsx("div", { className: "".concat(listMaxHeight, " overflow-y-auto"), children: filteredOptions.length > 0 ? (filteredOptions.map(function (opt) { return (jsxs("button", { type: "button", role: "option", "aria-selected": opt.country === selected.country &&
|
|
@@ -4039,96 +4240,6 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
4039
4240
|
}) }), 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] }) })] }));
|
|
4040
4241
|
});
|
|
4041
4242
|
|
|
4042
|
-
/**
|
|
4043
|
-
* Interacciones que un popover no-modal NO debe tratar como "clic fuera".
|
|
4044
|
-
*
|
|
4045
|
-
* El problema que resuelve: `useOverlay` de react-aria trata cualquier
|
|
4046
|
-
* pulsación fuera del popover como interacción externa y, cuando el popover es
|
|
4047
|
-
* el overlay visible más reciente, hace `stopPropagation()` + `preventDefault()`
|
|
4048
|
-
* sobre el `pointerdown` **y** sobre el `click`
|
|
4049
|
-
* (`@react-aria/overlays/useOverlay`). El evento nunca llega a su destino, así
|
|
4050
|
-
* que `usePress` no registra la pulsación y `onPress` no se dispara: el primer
|
|
4051
|
-
* clic solo cierra el desplegable.
|
|
4052
|
-
*
|
|
4053
|
-
* Para un clic en la página de fondo eso es lo correcto: descartar el
|
|
4054
|
-
* desplegable sin activar nada por debajo. Dentro del mismo diálogo no: ahí el
|
|
4055
|
-
* usuario está rellenando un formulario y espera que su clic llegue. Y como los
|
|
4056
|
-
* buscadores se reabren al recuperar el foco, el clic siguiente se volvía a
|
|
4057
|
-
* tragar — un callejón sin salida del que solo se salía vaciando el campo.
|
|
4058
|
-
*
|
|
4059
|
-
* La única palanca es `shouldCloseOnInteractOutside`: es el guardián de esos dos
|
|
4060
|
-
* `preventDefault`. Devolviendo `false` para lo que no es realmente "fuera", la
|
|
4061
|
-
* pulsación llega intacta. El desplegable sigue cerrándose igual, pero por
|
|
4062
|
-
* pérdida de foco (`shouldCloseOnBlur`) en vez de por interacción externa.
|
|
4063
|
-
*/
|
|
4064
|
-
var _a, _b;
|
|
4065
|
-
/**
|
|
4066
|
-
* Marca un botón como control de cierre de su contenedor. Los popovers de Aura
|
|
4067
|
-
* no lo cuentan como interacción externa, así que su pulsación no se pierde.
|
|
4068
|
-
*/
|
|
4069
|
-
var DISMISS_CONTROL_ATTRIBUTE = "data-aura-dismiss";
|
|
4070
|
-
/** Props a esparcir en un control de cierre: `<Button {...dismissControlProps} />`. */
|
|
4071
|
-
var dismissControlProps = (_a = {},
|
|
4072
|
-
_a[DISMISS_CONTROL_ATTRIBUTE] = "true",
|
|
4073
|
-
_a);
|
|
4074
|
-
/**
|
|
4075
|
-
* Marca el contenedor de una superficie modal propia (wizard, panel a medida).
|
|
4076
|
-
* No hace falta en `Modal` ni `Drawer`: los diálogos de HeroUI ya traen
|
|
4077
|
-
* `role="dialog"`, que cuenta igual.
|
|
4078
|
-
*/
|
|
4079
|
-
var CONTAINER_ATTRIBUTE = "data-aura-container";
|
|
4080
|
-
/** Props a esparcir en el contenedor: `<div {...containerProps}>`. */
|
|
4081
|
-
var containerProps = (_b = {},
|
|
4082
|
-
_b[CONTAINER_ATTRIBUTE] = "true",
|
|
4083
|
-
_b);
|
|
4084
|
-
/**
|
|
4085
|
-
* Selector de controles de cierre. Incluye `[aria-label="Close"]` para cubrir
|
|
4086
|
-
* los botones de cerrar internos de HeroUI (Modal, Drawer), que no admiten
|
|
4087
|
-
* atributos propios.
|
|
4088
|
-
*/
|
|
4089
|
-
var DISMISS_CONTROL_SELECTOR = "[".concat(DISMISS_CONTROL_ATTRIBUTE, "],[aria-label=\"Close\"]");
|
|
4090
|
-
/** Selector del contenedor modal: el marcado de Aura o un diálogo estándar. */
|
|
4091
|
-
var CONTAINER_SELECTOR = "[".concat(CONTAINER_ATTRIBUTE, "],[role=\"dialog\"],[role=\"alertdialog\"]");
|
|
4092
|
-
var matchesAncestor = function (element, selector) {
|
|
4093
|
-
if (!element || typeof element.closest !== "function") {
|
|
4094
|
-
return false;
|
|
4095
|
-
}
|
|
4096
|
-
return element.closest(selector) != null;
|
|
4097
|
-
};
|
|
4098
|
-
/** `true` si el elemento es un control de cierre (o está dentro de uno). */
|
|
4099
|
-
var isDismissControl = function (element) { return matchesAncestor(element, DISMISS_CONTROL_SELECTOR); };
|
|
4100
|
-
/**
|
|
4101
|
-
* Predicado listo para `popoverProps.shouldCloseOnInteractOutside` de un
|
|
4102
|
-
* componente con popover no-modal.
|
|
4103
|
-
*
|
|
4104
|
-
* Devuelve `false` —no es interacción externa— en tres casos:
|
|
4105
|
-
*
|
|
4106
|
-
* 1. Dentro del propio componente: el popover vive en un portal, así que el
|
|
4107
|
-
* campo de búsqueda queda fuera de él y una pulsación sobre el texto se
|
|
4108
|
-
* contaba como externa.
|
|
4109
|
-
* 2. Sobre un control de cierre del contenedor.
|
|
4110
|
-
* 3. Dentro del mismo diálogo/contenedor que el componente: seguir rellenando
|
|
4111
|
-
* el formulario no es descartar el desplegable.
|
|
4112
|
-
*
|
|
4113
|
-
* @param element Elemento donde ha empezado la interacción.
|
|
4114
|
-
* @param root Raíz del componente.
|
|
4115
|
-
*/
|
|
4116
|
-
var shouldClosePopoverOnInteractOutside = function (element, root) {
|
|
4117
|
-
var _a;
|
|
4118
|
-
if (root === null || root === void 0 ? void 0 : root.contains(element)) {
|
|
4119
|
-
return false;
|
|
4120
|
-
}
|
|
4121
|
-
if (isDismissControl(element)) {
|
|
4122
|
-
return false;
|
|
4123
|
-
}
|
|
4124
|
-
if (!matchesAncestor(element, CONTAINER_SELECTOR)) {
|
|
4125
|
-
return true;
|
|
4126
|
-
}
|
|
4127
|
-
// Solo exime el contenedor propio: un diálogo distinto sigue siendo externo.
|
|
4128
|
-
var container = (_a = root === null || root === void 0 ? void 0 : root.closest) === null || _a === void 0 ? void 0 : _a.call(root, CONTAINER_SELECTOR);
|
|
4129
|
-
return !(container === null || container === void 0 ? void 0 : container.contains(element));
|
|
4130
|
-
};
|
|
4131
|
-
|
|
4132
4243
|
var StepIndicator = function (_a) {
|
|
4133
4244
|
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"]);
|
|
4134
4245
|
var progressPercentage = Math.min((currentStep / totalSteps) * 100, 100);
|
|
@@ -4514,11 +4625,13 @@ var Phone = function (_a) {
|
|
|
4514
4625
|
};
|
|
4515
4626
|
return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 ".concat(error ? "!border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsx(FlagIcon, { countryCode: selectedCountry.country, size: "md" }), jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsx("title", { children: t.expandListAriaLabel }), jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsx(Input$1, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsx("span", { className: " text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
|
|
4516
4627
|
createPortal(jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg", "data-react-aria-top-layer": "true", children: [jsx("div", { className: "p-2", children: jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
|
|
4517
|
-
var searchTerm = e.target.value
|
|
4628
|
+
var searchTerm = e.target.value;
|
|
4518
4629
|
var filtered = uniqueCountries.filter(function (country) {
|
|
4519
|
-
return
|
|
4520
|
-
country
|
|
4521
|
-
country.
|
|
4630
|
+
return matchesSearchTerm([
|
|
4631
|
+
getCountryName(country),
|
|
4632
|
+
country.name,
|
|
4633
|
+
country.code,
|
|
4634
|
+
], searchTerm);
|
|
4522
4635
|
});
|
|
4523
4636
|
setFilteredCountries(filtered);
|
|
4524
4637
|
} }) }), jsx("div", { className: "max-h-60 overflow-y-auto", children: filteredCountries.length > 0 ? (filteredCountries.map(function (country) { return (jsxs("button", { type: "button", className: "flex items-center w-full px-4 py-2.5 text-sm hover:bg-default-200 ".concat(country.country === selectedCountry.country
|
|
@@ -8977,7 +9090,9 @@ function TagsFilter(_a) {
|
|
|
8977
9090
|
var _m = useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
|
|
8978
9091
|
var selectedList = value !== null && value !== void 0 ? value : [];
|
|
8979
9092
|
var _o = useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
|
|
8980
|
-
|
|
9093
|
+
// En estado y no en un ref: de la raíz depende SI se instala el predicado
|
|
9094
|
+
// (solo dentro de una superficie modal), y eso se decide en render.
|
|
9095
|
+
var _p = useState(null), root = _p[0], setRoot = _p[1];
|
|
8981
9096
|
useEffect(function () {
|
|
8982
9097
|
if (!onLoadMore || !sentinelNode || !hasMore) {
|
|
8983
9098
|
return;
|
|
@@ -9049,7 +9164,7 @@ function TagsFilter(_a) {
|
|
|
9049
9164
|
if (isLoading) {
|
|
9050
9165
|
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" }) }) }));
|
|
9051
9166
|
}
|
|
9052
|
-
return (jsxs("div", { ref:
|
|
9167
|
+
return (jsxs("div", { ref: setRoot, 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) {
|
|
9053
9168
|
setInputValue(v);
|
|
9054
9169
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
|
|
9055
9170
|
}, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
|
|
@@ -9083,9 +9198,16 @@ function TagsFilter(_a) {
|
|
|
9083
9198
|
// click de toda interacción externa, así que su `onPress` no se
|
|
9084
9199
|
// disparaba y el contenedor no se podía cerrar mientras el
|
|
9085
9200
|
// desplegable estuviera abierto (ver `shouldClosePopoverOnInteractOutside`).
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9201
|
+
//
|
|
9202
|
+
// Solo dentro de una superficie modal: fuera de ella HeroUI ya
|
|
9203
|
+
// resuelve el caso por su cuenta, y como su mezcla es por
|
|
9204
|
+
// truthiness, instalar cualquier predicado lo desactivaría y la
|
|
9205
|
+
// pulsación volvería a perderse.
|
|
9206
|
+
shouldCloseOnInteractOutside: isInsideDismissContainer(root)
|
|
9207
|
+
? function (element) {
|
|
9208
|
+
return shouldClosePopoverOnInteractOutside(element, root);
|
|
9209
|
+
}
|
|
9210
|
+
: undefined,
|
|
9089
9211
|
}, listboxProps: {
|
|
9090
9212
|
className: "max-h-[200px] overflow-y-auto",
|
|
9091
9213
|
}, className: "w-full", children: function (item) {
|
|
@@ -9974,4 +10096,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9974
10096
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9975
10097
|
};
|
|
9976
10098
|
|
|
9977
|
-
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, LINDA_TONE_PROPERTIES, 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, applyLindaTones, computeBars, computeMax, computeSlices, computeTotal, containerProps, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, deriveLindaTones, dismissControlProps, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDismissControl, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, parseHslTriplet, removeCustomPrimaryColor, removeLindaTones, shouldClosePopoverOnInteractOutside, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
10099
|
+
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, LINDA_TONE_PROPERTIES, 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, applyLindaTones, computeBars, computeMax, computeSlices, computeTotal, containerProps, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, deriveLindaTones, dismissControlProps, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDismissControl, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isInsideDismissContainer, isRankedBarListEmpty, isSegmentationGroup, parseHslTriplet, removeCustomPrimaryColor, removeLindaTones, shouldClosePopoverOnInteractOutside, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext, withPopoverDismissDefaults };
|
|
@@ -9,6 +9,22 @@ import type { AuraAutocompleteProps } from "./AutoComplete.types";
|
|
|
9
9
|
* - labelPlacement: Outside
|
|
10
10
|
* - Size: sm, md, lg (configurable)
|
|
11
11
|
* - Icono: lupa por defecto; acepta prop icon para personalizar u ocultar (null).
|
|
12
|
+
*
|
|
13
|
+
* **Dentro de un modal, drawer o contenedor marcado con `containerProps`**, el
|
|
14
|
+
* desplegable deja de contar como "clic fuera" lo que ocurre dentro del propio
|
|
15
|
+
* componente, sobre un control de cierre del contenedor o dentro de ese mismo
|
|
16
|
+
* contenedor: react-aria hace `preventDefault()` sobre esas pulsaciones y el
|
|
17
|
+
* control de destino nunca llegaba a recibir su `onPress` (ver
|
|
18
|
+
* `shouldClosePopoverOnInteractOutside`). Sigue cerrándose, por la vía del
|
|
19
|
+
* `shouldCloseOnBlur` del combobox de HeroUI — no por `onBlurWithin` del
|
|
20
|
+
* overlay, que está gateado por el mismo predicado.
|
|
21
|
+
*
|
|
22
|
+
* **Fuera de un contenedor así no se instala nada**: HeroUI ya resuelve ese caso
|
|
23
|
+
* con `ariaShouldCloseOnInteractOutside`, y como su mezcla es por truthiness,
|
|
24
|
+
* poner un predicado propio lo desactivaría y volvería a tragarse la pulsación.
|
|
25
|
+
*
|
|
26
|
+
* Un consumidor puede sustituir el predicado con su propio
|
|
27
|
+
* `popoverProps.shouldCloseOnInteractOutside`; entonces manda el suyo siempre.
|
|
12
28
|
*/
|
|
13
29
|
export declare const AuraAutocomplete: React.FC<AuraAutocompleteProps>;
|
|
14
30
|
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAelE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0D5D,CAAC"}
|
|
@@ -10,6 +10,18 @@ export type AuraAutocompleteProps = Omit<HeroUIAutocompleteProps, "size" | "vari
|
|
|
10
10
|
* Por defecto se muestra una lupa. Pasa `null` para ocultar o un nodo para personalizar.
|
|
11
11
|
*/
|
|
12
12
|
icon?: React.ReactNode | null;
|
|
13
|
+
/**
|
|
14
|
+
* Props del popover del desplegable (se reenvían al Autocomplete de HeroUI).
|
|
15
|
+
*
|
|
16
|
+
* Dentro de un modal, drawer o contenedor marcado con `containerProps`, el
|
|
17
|
+
* componente rellena `shouldCloseOnInteractOutside` con su predicado por
|
|
18
|
+
* defecto para que las pulsaciones dentro del contenedor no se pierdan; fuera
|
|
19
|
+
* de una superficie así no toca nada y manda el default de HeroUI.
|
|
20
|
+
*
|
|
21
|
+
* Pasar un `shouldCloseOnInteractOutside` propio sustituye al predicado.
|
|
22
|
+
* Pasarlo como `undefined` NO lo desactiva.
|
|
23
|
+
*/
|
|
24
|
+
popoverProps?: HeroUIAutocompleteProps["popoverProps"];
|
|
13
25
|
/** Controla si el listado está abierto (se reenvía al Autocomplete de HeroUI). */
|
|
14
26
|
isOpen?: boolean;
|
|
15
27
|
/** Callback cuando cambia el estado de apertura (se reenvía al Autocomplete de HeroUI). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.types.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACvC,uBAAuB,EACvB,MAAM,GAAG,SAAS,GAAG,QAAQ,CAC7B,GAAG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC9B,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"AutoComplete.types.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACvC,uBAAuB,EACvB,MAAM,GAAG,SAAS,GAAG,QAAQ,CAC7B,GAAG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;IACvD,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,CAAC"}
|
|
@@ -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;AAM/B,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,kBAAkB,CAAC;AAkD1F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+SjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/currency.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"currency.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/currency/currency.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAqE7E,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAsB/C,CAAC;AAEL,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,oBAAoB,CAQ9D,CAAC"}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/Phone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+P3C,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Canada.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone/flags/Canada.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,+CAoBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlagIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone/flags/FlagIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FlagIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone/flags/FlagIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkF/B,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CA+EtC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1B;AAQD;;;GAGG;AACH,eAAO,MAAM,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Ac,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/phone.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"phone.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/phone.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,SAAS;;;;GA0CrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;GAE3B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,iBAAiB,CAQ3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/tags-filter/TagsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TagsFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/tags-filter/TagsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EACX,eAAe,EAEf,MAAM,oBAAoB,CAAC;AAuC5B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,EACpE,KAAK,EACL,KAAK,EACL,QAAQ,EACR,YAAiB,EACjB,KAAK,EACL,SAAiB,EACjB,SAAc,EACd,YAAY,EAAE,SAAS,EACvB,QAAgB,EAChB,WAA2D,EAC3D,SAAkD,EAClD,aAAa,EACb,OAAe,EACf,aAAqB,EACrB,UAAU,EACV,kBAA0B,GAC1B,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CA2QzC;yBA5Re,UAAU"}
|