@aircall/ds 0.40.0 → 0.40.1

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.d.ts CHANGED
@@ -97,7 +97,7 @@ declare namespace AccordionContent {
97
97
  /** `cva` variant definitions for {@link Button} — resolves `variant`, `size`, and `block` into class names. */
98
98
  declare const buttonVariants: (props?: ({
99
99
  variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
100
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
100
+ size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
101
101
  block?: boolean | null | undefined;
102
102
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
103
103
  /**
@@ -639,7 +639,7 @@ declare namespace AlertDialogCancel {
639
639
  * default `default`) sets the background, border, and icon colour scheme.
640
640
  */
641
641
  declare const alertVariants: (props?: ({
642
- variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
642
+ variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
643
643
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
644
644
  /**
645
645
  * Callout that draws attention to an important, contextual message.
@@ -1025,7 +1025,7 @@ declare namespace BadgeGroupCount {
1025
1025
  * edge gets the accent border.
1026
1026
  */
1027
1027
  declare const bannerVariants: (props?: ({
1028
- variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
1028
+ variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
1029
1029
  borderDirection?: "bottom" | "top" | null | undefined;
1030
1030
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
1031
1031
  /**
@@ -4658,7 +4658,7 @@ declare namespace NumericInputDecrement {
4658
4658
  * )} />
4659
4659
  * ```
4660
4660
  */
4661
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4661
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4662
4662
  value?: string;
4663
4663
  onChange?: (newValue: string) => unknown;
4664
4664
  maxLength: number;
@@ -4673,7 +4673,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
4673
4673
  children?: never;
4674
4674
  } & React.RefAttributes<HTMLInputElement> & {
4675
4675
  containerClassName?: string;
4676
- }, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4676
+ }, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4677
4677
  value?: string;
4678
4678
  onChange?: (newValue: string) => unknown;
4679
4679
  maxLength: number;
package/dist/index.js CHANGED
@@ -4319,6 +4319,7 @@ function DataCombobox(componentProps) {
4319
4319
  const { items, getItemValue, getItemLabel, renderItem, renderChip, getGroupKey, getGroupLabel, selectionMode = "single", selectedKeys, defaultSelectedKeys, onSelectionChange, onOpenChange, open, selectedItems, disabledKeys, loadingState, skeletonCount, onSearch, onFetchMore, hasMore = false, emptyState, trigger, searchable = true, placeholder, disabled = false, className, contentClassName, anchor, "aria-label": ariaLabel, listAriaLabel, showClear = true, estimateRowHeight } = componentProps;
4320
4320
  const multiple = selectionMode === "multiple";
4321
4321
  const isSearchable = resolveSearchable(searchable, !!onSearch, items.length);
4322
+ const clientFilter = !isSearchable || onSearch || onFetchMore && hasMore ? null : void 0;
4322
4323
  const autoVirtualizeLatch = React.useRef(false);
4323
4324
  if (!autoVirtualizeLatch.current) autoVirtualizeLatch.current = shouldAutoVirtualize(!!onFetchMore, items.length);
4324
4325
  const virtualizeRows = resolveVirtualizeRows(componentProps.virtualizeRows, autoVirtualizeLatch.current, !!getGroupKey);
@@ -4374,7 +4375,7 @@ function DataCombobox(componentProps) {
4374
4375
  onItemHighlighted: (_item, details) => scrollHighlightedRowIntoView(scrollRowIntoViewRef, details.index, details.reason),
4375
4376
  items: groups !== null && groups !== void 0 ? groups : items,
4376
4377
  disabled,
4377
- filter: onSearch || onFetchMore && hasMore ? null : void 0,
4378
+ filter: clientFilter,
4378
4379
  value: selectedObjects,
4379
4380
  onValueChange: commit,
4380
4381
  itemToStringValue: getItemValue,
@@ -4403,7 +4404,7 @@ function DataCombobox(componentProps) {
4403
4404
  onItemHighlighted: (_item, details) => scrollHighlightedRowIntoView(scrollRowIntoViewRef, details.index, details.reason),
4404
4405
  items: groups !== null && groups !== void 0 ? groups : items,
4405
4406
  disabled,
4406
- filter: onSearch || onFetchMore && hasMore ? null : void 0,
4407
+ filter: clientFilter,
4407
4408
  value: (_selectedObjects$ = selectedObjects[0]) !== null && _selectedObjects$ !== void 0 ? _selectedObjects$ : null,
4408
4409
  onValueChange: (next, details) => commit(next == null ? [] : [next], details),
4409
4410
  itemToStringValue: getItemValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "sideEffects": [