@beweco/aurora-ui 0.6.69-qa.90 → 0.6.69-qa.92

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
@@ -8836,6 +8836,7 @@ function TagsFilter(_a) {
8836
8836
  var _m = React.useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
8837
8837
  var selectedList = value !== null && value !== void 0 ? value : [];
8838
8838
  var _o = React.useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
8839
+ var rootRef = React.useRef(null);
8839
8840
  React.useEffect(function () {
8840
8841
  if (!onLoadMore || !sentinelNode || !hasMore) {
8841
8842
  return;
@@ -8907,7 +8908,7 @@ function TagsFilter(_a) {
8907
8908
  if (isLoading) {
8908
8909
  return (jsxRuntime.jsx("div", { className: "flex flex-col gap-4 ".concat(className), children: jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: jsxRuntime.jsx(react.Spinner, { size: "sm" }) }) }));
8909
8910
  }
8910
- return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxRuntime.jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsxRuntime.jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsxRuntime.jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8911
+ return (jsxRuntime.jsxs("div", { ref: rootRef, className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxRuntime.jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsxRuntime.jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsxRuntime.jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8911
8912
  setInputValue(v);
8912
8913
  onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
8913
8914
  }, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
@@ -8926,7 +8927,16 @@ function TagsFilter(_a) {
8926
8927
  // intercepts pointer events, blocking the parent modal's close button.
8927
8928
  // shouldCloseOnInteractOutside already handles closing on outside clicks.
8928
8929
  isNonModal: true,
8929
- shouldCloseOnInteractOutside: function () { return true; },
8930
+ // El desplegable se renderiza en un portal, así que el campo de
8931
+ // búsqueda queda FUERA de él y una pulsación sobre el texto contaba
8932
+ // como interacción externa. Al cerrarse, el FocusScope devolvía el
8933
+ // foco con un `.focus()` que abortaba el gesto de selección que el
8934
+ // navegador acababa de iniciar: de ahí que arrastrar o hacer doble
8935
+ // clic no seleccionara nada y solo quedara borrar letra a letra
8936
+ // (con el teclado sí funcionaba, porque no pasa por aquí).
8937
+ // Las pulsaciones dentro del componente dejan de contar como
8938
+ // externas; las de fuera siguen cerrando el desplegable igual.
8939
+ shouldCloseOnInteractOutside: function (element) { var _a; return !((_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.contains(element)); },
8930
8940
  }, listboxProps: {
8931
8941
  className: "max-h-[200px] overflow-y-auto",
8932
8942
  }, className: "w-full", children: function (item) {
package/dist/index.esm.js CHANGED
@@ -8837,6 +8837,7 @@ function TagsFilter(_a) {
8837
8837
  var _m = useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
8838
8838
  var selectedList = value !== null && value !== void 0 ? value : [];
8839
8839
  var _o = useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
8840
+ var rootRef = useRef(null);
8840
8841
  useEffect(function () {
8841
8842
  if (!onLoadMore || !sentinelNode || !hasMore) {
8842
8843
  return;
@@ -8908,7 +8909,7 @@ function TagsFilter(_a) {
8908
8909
  if (isLoading) {
8909
8910
  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" }) }) }));
8910
8911
  }
8911
- return (jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8912
+ return (jsxs("div", { ref: rootRef, className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8912
8913
  setInputValue(v);
8913
8914
  onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
8914
8915
  }, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
@@ -8927,7 +8928,16 @@ function TagsFilter(_a) {
8927
8928
  // intercepts pointer events, blocking the parent modal's close button.
8928
8929
  // shouldCloseOnInteractOutside already handles closing on outside clicks.
8929
8930
  isNonModal: true,
8930
- shouldCloseOnInteractOutside: function () { return true; },
8931
+ // El desplegable se renderiza en un portal, así que el campo de
8932
+ // búsqueda queda FUERA de él y una pulsación sobre el texto contaba
8933
+ // como interacción externa. Al cerrarse, el FocusScope devolvía el
8934
+ // foco con un `.focus()` que abortaba el gesto de selección que el
8935
+ // navegador acababa de iniciar: de ahí que arrastrar o hacer doble
8936
+ // clic no seleccionara nada y solo quedara borrar letra a letra
8937
+ // (con el teclado sí funcionaba, porque no pasa por aquí).
8938
+ // Las pulsaciones dentro del componente dejan de contar como
8939
+ // externas; las de fuera siguen cerrando el desplegable igual.
8940
+ shouldCloseOnInteractOutside: function (element) { var _a; return !((_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.contains(element)); },
8931
8941
  }, listboxProps: {
8932
8942
  className: "max-h-[200px] overflow-y-auto",
8933
8943
  }, className: "w-full", children: function (item) {
@@ -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;AAM/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,CAiPzC;yBAlQe,UAAU"}
1
+ {"version":3,"file":"TagsFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/tags-filter/TagsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/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,CA4PzC;yBA7Qe,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.69-qa.90",
3
+ "version": "0.6.69-qa.92",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",