@sinequa/galactik 2.5.0 → 2.6.0

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.
@@ -12311,10 +12311,10 @@ const tagVariants = cva([
12311
12311
  error: ""
12312
12312
  },
12313
12313
  size: {
12314
- xs: "gap-1 rounded-(--radius-xs) px-1 py-0.5 text-(length:--size-sm) leading-(--line-height-sm) [&_.tag-icon]:text-(length:--icon-xs)",
12314
+ xs: "gap-1 rounded-(--radius-xs) px-1 py-0.5 text-(length:--size-xs) leading-[var(--line-height-xs,var(--line-height-1))] [&_.tag-icon]:text-(length:--icon-xs)",
12315
12315
  sm: "gap-1 rounded-(--radius-sm) px-2 py-1 text-(length:--size-sm) leading-(--line-height-sm) [&_.tag-icon]:text-(length:--icon-xs)",
12316
12316
  md: "gap-2 rounded-(--radius-sm) px-3 py-2 text-(length:--size-base) leading-(--line-height-base) [&_.tag-icon]:text-(length:--icon-sm)",
12317
- xsmall: "gap-1 rounded-(--radius-xs) px-1 py-0.5 text-(length:--size-sm) leading-(--line-height-sm) [&_.tag-icon]:text-(length:--icon-xs)",
12317
+ xsmall: "gap-1 rounded-(--radius-xs) px-1 py-0.5 text-(length:--size-xs) leading-[var(--line-height-xs,var(--line-height-1))] [&_.tag-icon]:text-(length:--icon-xs)",
12318
12318
  small: "gap-1 rounded-(--radius-sm) px-2 py-1 text-(length:--size-sm) leading-(--line-height-sm) [&_.tag-icon]:text-(length:--icon-xs)",
12319
12319
  medium: "gap-2 rounded-(--radius-sm) px-3 py-2 text-(length:--size-base) leading-(--line-height-base) [&_.tag-icon]:text-(length:--icon-sm)"
12320
12320
  }
@@ -12763,11 +12763,13 @@ var AutocompleteComponent = class AutocompleteComponent {
12763
12763
  listboxEl = viewChild("listbox", ...ngDevMode ? [{ debugName: "listboxEl" }] : /* istanbul ignore next */ []);
12764
12764
  fieldEl = viewChild("field", ...ngDevMode ? [{ debugName: "fieldEl" }] : /* istanbul ignore next */ []);
12765
12765
  settledQuery = signal("", ...ngDevMode ? [{ debugName: "settledQuery" }] : /* istanbul ignore next */ []);
12766
+ browseAll = signal(false, ...ngDevMode ? [{ debugName: "browseAll" }] : /* istanbul ignore next */ []);
12766
12767
  search = resource({
12767
12768
  ...ngDevMode ? { debugName: "search" } : /* istanbul ignore next */ {},
12768
12769
  params: () => {
12769
12770
  const q = this.settledQuery().trim();
12770
- return q.length >= this.minLength() ? q : void 0;
12771
+ if (q.length >= this.minLength()) return q;
12772
+ return this.browseAll() ? "" : void 0;
12771
12773
  },
12772
12774
  loader: ({ params, abortSignal }) => this.loader()(params, { signal: abortSignal })
12773
12775
  });
@@ -12823,6 +12825,7 @@ var AutocompleteComponent = class AutocompleteComponent {
12823
12825
  }
12824
12826
  onInput(event) {
12825
12827
  queueMicrotask(() => this.combobox().expanded.set(this.open()));
12828
+ this.browseAll.set(false);
12826
12829
  if (!event.target.value.trim()) this.open.set(false);
12827
12830
  }
12828
12831
  onKeydown(event) {
@@ -12856,6 +12859,11 @@ var AutocompleteComponent = class AutocompleteComponent {
12856
12859
  }
12857
12860
  if (!pickedAny) return;
12858
12861
  if (this.closeOnPick()) this.clearQuery();
12862
+ else {
12863
+ this.query.set("");
12864
+ this.settledQuery.set("");
12865
+ this.browseAll.set(true);
12866
+ }
12859
12867
  this.combobox().element.focus();
12860
12868
  }
12861
12869
  onEnter(event) {
@@ -12870,6 +12878,7 @@ var AutocompleteComponent = class AutocompleteComponent {
12870
12878
  clearQuery() {
12871
12879
  this.query.set("");
12872
12880
  this.settledQuery.set("");
12881
+ this.browseAll.set(false);
12873
12882
  this.open.set(false);
12874
12883
  }
12875
12884
  onFocusOut(event) {
@@ -15611,13 +15620,18 @@ var ListItemActionComponent = class ListItemActionComponent {
15611
15620
  @if (description() && !disabled()) {
15612
15621
  <span [id]="descriptionId" class="sr-only" aria-hidden="true">{{ description() }}</span>
15613
15622
  }
15623
+ <!-- Icône masquée aux technologies d'assistance : une option de listbox a des enfants présentationnels, et
15624
+ NVDA ne lit rien sous la souris dans une option, quel que soit le rôle ou le nom de l'icône. L'action
15625
+ est annoncée par la ligne (aria-keyshortcuts + description) et atteinte par sa touche. L'infobulle
15626
+ ne sert qu'aux voyants, à la place du title natif. -->
15614
15627
  <span
15615
15628
  #trigger
15616
15629
  [class]="btnClass"
15617
15630
  aria-hidden="true"
15631
+ [tooltip]="ariaLabel()"
15632
+ [tooltipDisabled]="disabled()"
15618
15633
  [class.pointer-events-none]="disabled()"
15619
15634
  [class.opacity-50]="disabled()"
15620
- [attr.title]="ariaLabel()"
15621
15635
  [attr.data-disabled]="disabled() || null">
15622
15636
  <ng-content />
15623
15637
  </span>
@@ -15641,6 +15655,31 @@ var ListItemActionComponent = class ListItemActionComponent {
15641
15655
  type: KbdComponent,
15642
15656
  selector: "kbd, Kbd",
15643
15657
  inputs: ["class", "size"]
15658
+ }, {
15659
+ kind: "directive",
15660
+ type: TooltipDirective,
15661
+ selector: "[tooltip]",
15662
+ inputs: [
15663
+ "tooltip",
15664
+ "tooltipPosition",
15665
+ "tooltipEvent",
15666
+ "showDelay",
15667
+ "hideDelay",
15668
+ "life",
15669
+ "tooltipOffset",
15670
+ "autoHide",
15671
+ "hideOnEscape",
15672
+ "escape",
15673
+ "tooltipDisabled",
15674
+ "tooltipArrow",
15675
+ "tooltipStyleClass",
15676
+ "tooltipOptions",
15677
+ "tooltip-position",
15678
+ "tooltip-delay",
15679
+ "tooltip-duration",
15680
+ "tooltip-offset"
15681
+ ],
15682
+ exportAs: ["tooltip"]
15644
15683
  }],
15645
15684
  changeDetection: i0.ChangeDetectionStrategy.OnPush
15646
15685
  });
@@ -15657,20 +15696,25 @@ i0.ɵɵngDeclareClassMetadata({
15657
15696
  exportAs: "listItemAction",
15658
15697
  standalone: true,
15659
15698
  changeDetection: ChangeDetectionStrategy.OnPush,
15660
- imports: [KbdComponent],
15699
+ imports: [KbdComponent, TooltipDirective],
15661
15700
  template: `
15662
15701
  <!-- Texte masqué relié à la ligne par aria-describedby. aria-hidden : il ne doit pas entrer dans le
15663
15702
  nom de l'option (calculé depuis son contenu), une référence aria-describedby le lit quand même. -->
15664
15703
  @if (description() && !disabled()) {
15665
15704
  <span [id]="descriptionId" class="sr-only" aria-hidden="true">{{ description() }}</span>
15666
15705
  }
15706
+ <!-- Icône masquée aux technologies d'assistance : une option de listbox a des enfants présentationnels, et
15707
+ NVDA ne lit rien sous la souris dans une option, quel que soit le rôle ou le nom de l'icône. L'action
15708
+ est annoncée par la ligne (aria-keyshortcuts + description) et atteinte par sa touche. L'infobulle
15709
+ ne sert qu'aux voyants, à la place du title natif. -->
15667
15710
  <span
15668
15711
  #trigger
15669
15712
  [class]="btnClass"
15670
15713
  aria-hidden="true"
15714
+ [tooltip]="ariaLabel()"
15715
+ [tooltipDisabled]="disabled()"
15671
15716
  [class.pointer-events-none]="disabled()"
15672
15717
  [class.opacity-50]="disabled()"
15673
- [attr.title]="ariaLabel()"
15674
15718
  [attr.data-disabled]="disabled() || null">
15675
15719
  <ng-content />
15676
15720
  </span>