beez-ui 0.5.4 → 0.5.5
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/CHANGELOG.md +4 -0
- package/README.md +3 -1
- package/dist/components/filter-query-bar.js +61 -48
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -129,7 +129,9 @@ Next y TanStack Router son peers opcionales aislados en sus entrypoints. El prov
|
|
|
129
129
|
|
|
130
130
|
## Componentes incorporados desde agenda-mensual
|
|
131
131
|
|
|
132
|
-
`Alert`, `AnimatedThemeToggler`, `Calendar`, `DataTable`, `FilterQueryBar`, `Form`, `Highlighter`, `InputGroup`, `Label`, `RadioGroup`, `TypingAnimation` y `ThemedToaster`, junto con sus subcomponentes, tipos y gramática de filtros.
|
|
132
|
+
`Alert`, `AnimatedThemeToggler`, `Calendar`, `DataTable`, `FilterQueryBar`, `Form`, `Highlighter`, `InputGroup`, `Label`, `RadioGroup`, `TypingAnimation` y `ThemedToaster`, junto con sus subcomponentes, tipos y gramática de filtros.
|
|
133
|
+
|
|
134
|
+
`FilterQueryBar` mantiene el foco en el input mientras se recorren las sugerencias con el puntero o las flechas. Enter aplica la opción activa; interactuar con el input no cierra la lista.
|
|
133
135
|
|
|
134
136
|
La tabla conserva agrupación estable, columnas configurables, memoización, exclusiones y sincronización de qualifiers por identificadores. La barra conserva navegación por teclado, autocompletado y filtros de texto, rangos, fechas, presencia y carpetas. `Calendar` usa español por defecto y acepta otra locale. Los textos y configuraciones de filtros se pueden personalizar por props.
|
|
135
137
|
|
|
@@ -317,7 +317,7 @@ function renderHighlightedQuery(value, ranges) {
|
|
|
317
317
|
* La navegación es virtual: el foco real nunca abandona el input.
|
|
318
318
|
*/
|
|
319
319
|
export function FilterQueryBar(t0) {
|
|
320
|
-
const $ = _c(
|
|
320
|
+
const $ = _c(98);
|
|
321
321
|
const { configs, value, onValueChange, placeholder: t1, ariaLabel: t2, className, onFocusChange, trailingAction } = t0;
|
|
322
322
|
const placeholder = t1 === undefined ? DEFAULT_PLACEHOLDER : t1;
|
|
323
323
|
const ariaLabel = t2 === undefined ? DEFAULT_ARIA_LABEL : t2;
|
|
@@ -754,10 +754,21 @@ export function FilterQueryBar(t0) {
|
|
|
754
754
|
} else {
|
|
755
755
|
t33 = $[76];
|
|
756
756
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
757
|
+
let t34;
|
|
758
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
759
|
+
t34 = (event_2) => {
|
|
760
|
+
if (event_2.target === inputRef.current) {
|
|
761
|
+
event_2.preventDefault();
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
$[77] = t34;
|
|
765
|
+
} else {
|
|
766
|
+
t34 = $[77];
|
|
767
|
+
}
|
|
768
|
+
const t35 = suggestions.some(_temp3) ? VALUE_GROUP_LABEL : KEY_GROUP_LABEL;
|
|
769
|
+
let t36;
|
|
770
|
+
if ($[78] !== activeIndex || $[79] !== applySuggestion || $[80] !== instanceId || $[81] !== suggestions) {
|
|
771
|
+
t36 = suggestions.map((suggestion_1, index) => {
|
|
761
772
|
const SuggestionIcon = suggestion_1.icon;
|
|
762
773
|
const showSeparator = index > 0 && suggestions[index - 1].group !== suggestion_1.group;
|
|
763
774
|
return /* @__PURE__ */ _jsxs(React.Fragment, { children: [showSeparator ? /* @__PURE__ */ _jsx("li", {
|
|
@@ -768,8 +779,9 @@ export function FilterQueryBar(t0) {
|
|
|
768
779
|
"aria-selected": index === activeIndex,
|
|
769
780
|
className: cn("flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm", index === activeIndex ? "bg-accent text-accent-foreground" : "text-foreground"),
|
|
770
781
|
id: `${instanceId}-${suggestion_1.id}`,
|
|
771
|
-
|
|
772
|
-
|
|
782
|
+
onPointerMove: () => setActiveIndex(index),
|
|
783
|
+
onMouseDown: (event_4) => {
|
|
784
|
+
event_4.preventDefault();
|
|
773
785
|
applySuggestion(suggestion_1);
|
|
774
786
|
},
|
|
775
787
|
role: "option",
|
|
@@ -782,85 +794,86 @@ export function FilterQueryBar(t0) {
|
|
|
782
794
|
})]
|
|
783
795
|
})] }, suggestion_1.id);
|
|
784
796
|
});
|
|
785
|
-
$[
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
788
|
-
$[
|
|
789
|
-
$[
|
|
797
|
+
$[78] = activeIndex;
|
|
798
|
+
$[79] = applySuggestion;
|
|
799
|
+
$[80] = instanceId;
|
|
800
|
+
$[81] = suggestions;
|
|
801
|
+
$[82] = t36;
|
|
790
802
|
} else {
|
|
791
|
-
|
|
803
|
+
t36 = $[82];
|
|
792
804
|
}
|
|
793
|
-
let
|
|
794
|
-
if ($[
|
|
795
|
-
|
|
805
|
+
let t37;
|
|
806
|
+
if ($[83] !== listboxId || $[84] !== t35 || $[85] !== t36) {
|
|
807
|
+
t37 = /* @__PURE__ */ _jsx(PopoverContent, {
|
|
796
808
|
align: "start",
|
|
797
809
|
className: "w-[250px] max-h-[280px] gap-0 overflow-y-auto p-1",
|
|
798
810
|
onCloseAutoFocus: _temp,
|
|
811
|
+
onInteractOutside: t34,
|
|
799
812
|
onOpenAutoFocus: _temp2,
|
|
800
813
|
children: /* @__PURE__ */ _jsx("ul", {
|
|
801
|
-
"aria-label":
|
|
814
|
+
"aria-label": t35,
|
|
802
815
|
className: "grid gap-0.5",
|
|
803
816
|
id: listboxId,
|
|
804
817
|
role: "listbox",
|
|
805
|
-
children:
|
|
818
|
+
children: t36
|
|
806
819
|
})
|
|
807
820
|
});
|
|
808
|
-
$[
|
|
809
|
-
$[83] = t34;
|
|
821
|
+
$[83] = listboxId;
|
|
810
822
|
$[84] = t35;
|
|
811
823
|
$[85] = t36;
|
|
824
|
+
$[86] = t37;
|
|
812
825
|
} else {
|
|
813
|
-
|
|
826
|
+
t37 = $[86];
|
|
814
827
|
}
|
|
815
|
-
let
|
|
816
|
-
if ($[
|
|
817
|
-
|
|
828
|
+
let t38;
|
|
829
|
+
if ($[87] !== isPopoverOpen || $[88] !== t33 || $[89] !== t37) {
|
|
830
|
+
t38 = /* @__PURE__ */ _jsxs(Popover, {
|
|
818
831
|
onOpenChange: setIsOpen,
|
|
819
832
|
open: isPopoverOpen,
|
|
820
|
-
children: [t33,
|
|
833
|
+
children: [t33, t37]
|
|
821
834
|
});
|
|
822
|
-
$[
|
|
823
|
-
$[
|
|
824
|
-
$[88] = t36;
|
|
835
|
+
$[87] = isPopoverOpen;
|
|
836
|
+
$[88] = t33;
|
|
825
837
|
$[89] = t37;
|
|
838
|
+
$[90] = t38;
|
|
826
839
|
} else {
|
|
827
|
-
|
|
840
|
+
t38 = $[90];
|
|
828
841
|
}
|
|
829
|
-
const
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
if ($[
|
|
833
|
-
|
|
842
|
+
const t39 = isPopoverOpen ? `${suggestions.length} sugerencias disponibles` : "";
|
|
843
|
+
const t40 = invalidTokenCount > 0 ? ` ${invalidTokenCount} filtros no aplicados` : "";
|
|
844
|
+
let t41;
|
|
845
|
+
if ($[91] !== t39 || $[92] !== t40) {
|
|
846
|
+
t41 = /* @__PURE__ */ _jsxs("span", {
|
|
834
847
|
"aria-live": "polite",
|
|
835
848
|
className: "sr-only",
|
|
836
|
-
children: [
|
|
849
|
+
children: [t39, t40]
|
|
837
850
|
});
|
|
838
|
-
$[90] = t38;
|
|
839
851
|
$[91] = t39;
|
|
840
852
|
$[92] = t40;
|
|
853
|
+
$[93] = t41;
|
|
841
854
|
} else {
|
|
842
|
-
|
|
855
|
+
t41 = $[93];
|
|
843
856
|
}
|
|
844
|
-
let
|
|
845
|
-
if ($[
|
|
846
|
-
|
|
857
|
+
let t42;
|
|
858
|
+
if ($[94] !== t17 || $[95] !== t38 || $[96] !== t41) {
|
|
859
|
+
t42 = /* @__PURE__ */ _jsxs("div", {
|
|
847
860
|
className: t17,
|
|
848
|
-
children: [
|
|
861
|
+
children: [t38, t41]
|
|
849
862
|
});
|
|
850
|
-
$[
|
|
851
|
-
$[
|
|
852
|
-
$[95] = t40;
|
|
863
|
+
$[94] = t17;
|
|
864
|
+
$[95] = t38;
|
|
853
865
|
$[96] = t41;
|
|
866
|
+
$[97] = t42;
|
|
854
867
|
} else {
|
|
855
|
-
|
|
868
|
+
t42 = $[97];
|
|
856
869
|
}
|
|
857
|
-
return
|
|
870
|
+
return t42;
|
|
858
871
|
}
|
|
859
872
|
function _temp3(suggestion_0) {
|
|
860
873
|
return suggestion_0.group === "value";
|
|
861
874
|
}
|
|
862
|
-
function _temp2(
|
|
863
|
-
return
|
|
875
|
+
function _temp2(event_3) {
|
|
876
|
+
return event_3.preventDefault();
|
|
864
877
|
}
|
|
865
878
|
function _temp(event_1) {
|
|
866
879
|
return event_1.preventDefault();
|