@aircall/ds 0.31.2 → 0.31.4
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/globals.css +1 -1
- package/dist/index.d.ts +29 -23
- package/dist/index.js +13 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
|
39
39
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
40
40
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
41
41
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
42
|
-
import * as
|
|
42
|
+
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
43
43
|
import { CountryCode } from "@aircall/numbers";
|
|
44
44
|
|
|
45
45
|
//#region src/components/accordion.d.ts
|
|
@@ -102,7 +102,7 @@ declare const buttonVariants: (props?: ({
|
|
|
102
102
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
103
103
|
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
104
104
|
block?: boolean | null | undefined;
|
|
105
|
-
} &
|
|
105
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
106
106
|
/**
|
|
107
107
|
* Clickable button. Renders a Base UI `Button` primitive as a `<button>` element,
|
|
108
108
|
* styled via `buttonVariants` (variant / size / block).
|
|
@@ -669,8 +669,8 @@ declare namespace AlertDialogCancel {
|
|
|
669
669
|
* default `default`) sets the background, border, and icon colour scheme.
|
|
670
670
|
*/
|
|
671
671
|
declare const alertVariants: (props?: ({
|
|
672
|
-
variant?: "default" | "
|
|
673
|
-
} &
|
|
672
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
673
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
674
674
|
/**
|
|
675
675
|
* Callout that draws attention to an important, contextual message.
|
|
676
676
|
*
|
|
@@ -754,7 +754,7 @@ declare const attachmentVariants: (props?: ({
|
|
|
754
754
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
755
755
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
756
756
|
block?: boolean | null | undefined;
|
|
757
|
-
} &
|
|
757
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
758
758
|
/**
|
|
759
759
|
* Card displaying a single file or image attachment with its metadata,
|
|
760
760
|
* upload state, and actions. Renders a `<div>`; compose it from
|
|
@@ -797,7 +797,7 @@ declare namespace Attachment {
|
|
|
797
797
|
}
|
|
798
798
|
declare const attachmentMediaVariants: (props?: ({
|
|
799
799
|
variant?: "image" | "icon" | null | undefined;
|
|
800
|
-
} &
|
|
800
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
801
801
|
/**
|
|
802
802
|
* Leading media slot of an `Attachment` — holds an icon (`variant="icon"`)
|
|
803
803
|
* or an image thumbnail (`variant="image"`). Renders a `<div>`.
|
|
@@ -970,7 +970,7 @@ declare namespace AvatarGroupCount {
|
|
|
970
970
|
*/
|
|
971
971
|
declare const counterBadgeVariants: (props?: ({
|
|
972
972
|
variant?: "default" | "secondary" | "ghost" | null | undefined;
|
|
973
|
-
} &
|
|
973
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
974
974
|
/**
|
|
975
975
|
* Small pill for surfacing a count or short status, e.g. an unread indicator.
|
|
976
976
|
* Renders a `<span>` (override the element via the `render` prop).
|
|
@@ -994,7 +994,7 @@ declare const badgeVariants: (props?: ({
|
|
|
994
994
|
size?: "default" | "lg" | null | undefined;
|
|
995
995
|
color?: "blue" | "green" | "pink" | "purple" | "red" | "yellow" | "charcoal" | null | undefined;
|
|
996
996
|
tone?: "dark" | "light" | "medium-dark" | "medium-light" | null | undefined;
|
|
997
|
-
} &
|
|
997
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
998
998
|
type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
999
999
|
/** Constrained DS badge fill color (no freeform hex). */
|
|
1000
1000
|
type BadgeColor = NonNullable<BadgeVariants['color']>;
|
|
@@ -1032,7 +1032,7 @@ declare namespace BadgeGroup {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
declare const badgeGroupCountVariants: (props?: ({
|
|
1034
1034
|
size?: "default" | "lg" | null | undefined;
|
|
1035
|
-
} &
|
|
1035
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
1036
1036
|
/**
|
|
1037
1037
|
* Trailing "+N" overflow counter for a `BadgeGroup`. Renders a ghost `CounterBadge`
|
|
1038
1038
|
* sized to match the group's badges (`size` mirrors `Badge`'s `default` / `lg`).
|
|
@@ -1050,9 +1050,9 @@ declare namespace BadgeGroupCount {
|
|
|
1050
1050
|
* edge gets the accent border.
|
|
1051
1051
|
*/
|
|
1052
1052
|
declare const bannerVariants: (props?: ({
|
|
1053
|
-
variant?: "default" | "
|
|
1053
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
1054
1054
|
borderDirection?: "bottom" | "top" | null | undefined;
|
|
1055
|
-
} &
|
|
1055
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
1056
1056
|
/**
|
|
1057
1057
|
* Full-width contextual message, typically pinned to the top or bottom of a
|
|
1058
1058
|
* view. Like {@link Alert} but edge-to-edge with a single accent border.
|
|
@@ -1207,7 +1207,7 @@ declare namespace Separator {
|
|
|
1207
1207
|
/** `cva` variant definitions for {@link ButtonGroup} — resolves `orientation` (horizontal / vertical) into class names. */
|
|
1208
1208
|
declare const buttonGroupVariants: (props?: ({
|
|
1209
1209
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
1210
|
-
} &
|
|
1210
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
1211
1211
|
/**
|
|
1212
1212
|
* Groups related buttons into a single visual unit with shared borders and merged corners.
|
|
1213
1213
|
* Renders a `<div role="group">` and normalizes the radii/borders of its children.
|
|
@@ -2366,6 +2366,11 @@ interface DataComboboxProps<T> {
|
|
|
2366
2366
|
*/
|
|
2367
2367
|
contentClassName?: string;
|
|
2368
2368
|
'aria-label'?: string;
|
|
2369
|
+
/**
|
|
2370
|
+
* Whether to render the trailing clear button that resets the value.
|
|
2371
|
+
* @default false
|
|
2372
|
+
*/
|
|
2373
|
+
showClear?: boolean;
|
|
2369
2374
|
}
|
|
2370
2375
|
/**
|
|
2371
2376
|
* Searchable dropdown built on the DS Combobox primitives, driven by an `items`
|
|
@@ -3493,7 +3498,7 @@ declare namespace EmptyHeader {
|
|
|
3493
3498
|
}
|
|
3494
3499
|
declare const emptyMediaVariants: (props?: ({
|
|
3495
3500
|
variant?: "default" | "icon" | null | undefined;
|
|
3496
|
-
} &
|
|
3501
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
3497
3502
|
/**
|
|
3498
3503
|
* Wrapper for the empty state's icon or illustration. Renders a `<div>`; the `icon`
|
|
3499
3504
|
* variant gives it a muted rounded background, while `default` is transparent.
|
|
@@ -3810,7 +3815,7 @@ declare namespace EmojiPickerContent {
|
|
|
3810
3815
|
declare const fabVariants: (props?: ({
|
|
3811
3816
|
variant?: "default" | "outline" | null | undefined;
|
|
3812
3817
|
size?: "lg" | "icon-lg" | null | undefined;
|
|
3813
|
-
} &
|
|
3818
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
3814
3819
|
/**
|
|
3815
3820
|
* Floating action button — a raised, shadowed button for a primary action.
|
|
3816
3821
|
* Renders Base UI's `Button` primitive as a `<button>`.
|
|
@@ -3884,7 +3889,7 @@ declare namespace FieldGroup {
|
|
|
3884
3889
|
}
|
|
3885
3890
|
declare const fieldVariants: (props?: ({
|
|
3886
3891
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
3887
|
-
} &
|
|
3892
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
3888
3893
|
/**
|
|
3889
3894
|
* Layout wrapper pairing a control with its label, description, and error. Renders a
|
|
3890
3895
|
* `<div role="group">`. The `orientation` variant (`'vertical' | 'horizontal' | 'responsive'`)
|
|
@@ -4689,7 +4694,7 @@ declare const InlineEditTextarea: React.ForwardRefExoticComponent<Omit<InlineEdi
|
|
|
4689
4694
|
//#region src/components/input.d.ts
|
|
4690
4695
|
declare const inputVariants: (props?: ({
|
|
4691
4696
|
block?: boolean | null | undefined;
|
|
4692
|
-
} &
|
|
4697
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
4693
4698
|
/**
|
|
4694
4699
|
* Single-line text field styled to the design system.
|
|
4695
4700
|
*
|
|
@@ -4735,7 +4740,7 @@ declare namespace InputGroup {
|
|
|
4735
4740
|
}
|
|
4736
4741
|
declare const inputGroupAddonVariants: (props?: ({
|
|
4737
4742
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
4738
|
-
} &
|
|
4743
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
4739
4744
|
declare const InputGroupAddon: React.ForwardRefExoticComponent<Omit<InputGroupAddonProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4740
4745
|
interface InputGroupAddonProps extends React.ComponentProps<'div'>, VariantProps<typeof inputGroupAddonVariants> {}
|
|
4741
4746
|
declare namespace InputGroupAddon {
|
|
@@ -4959,7 +4964,7 @@ declare namespace ItemSeparator {
|
|
|
4959
4964
|
declare const itemVariants: (props?: ({
|
|
4960
4965
|
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
4961
4966
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
4962
|
-
} &
|
|
4967
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
4963
4968
|
/**
|
|
4964
4969
|
* Flexible list-item container laying out media, content, and actions on one row. Renders a `<div>`
|
|
4965
4970
|
* by default (swap the element via `render`). The `variant` (`'default' | 'outline' | 'muted'`) and
|
|
@@ -4982,7 +4987,7 @@ declare namespace Item {
|
|
|
4982
4987
|
}
|
|
4983
4988
|
declare const itemMediaVariants: (props?: ({
|
|
4984
4989
|
variant?: "image" | "default" | "icon" | null | undefined;
|
|
4985
|
-
} &
|
|
4990
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
4986
4991
|
/**
|
|
4987
4992
|
* Leading media slot of an `Item` (icon, image, or avatar). Renders a `<div>`. The `variant`
|
|
4988
4993
|
* (`'default' | 'icon' | 'image'`) tunes sizing and styling and defaults to `'default'`.
|
|
@@ -5341,7 +5346,7 @@ declare namespace ScrollBar {
|
|
|
5341
5346
|
/** `class-variance-authority` variants for the select trigger; exposes the `size` variant. */
|
|
5342
5347
|
declare const selectTriggerVariants: (props?: ({
|
|
5343
5348
|
size?: "default" | "sm" | null | undefined;
|
|
5344
|
-
} &
|
|
5349
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
5345
5350
|
/**
|
|
5346
5351
|
* Root of the select, aliasing Base UI's `Select.Root`. Manages open state and the selected value,
|
|
5347
5352
|
* and renders no DOM element — place `SelectTrigger` and `SelectContent` inside it.
|
|
@@ -5849,7 +5854,7 @@ declare namespace SidebarMenuItem {
|
|
|
5849
5854
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
5850
5855
|
variant?: "default" | "outline" | null | undefined;
|
|
5851
5856
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5852
|
-
} &
|
|
5857
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
5853
5858
|
/**
|
|
5854
5859
|
* Primary clickable row inside a menu item, with variant/size styles and an
|
|
5855
5860
|
* optional tooltip shown only when collapsed. Renders a `<button>` by default,
|
|
@@ -6006,7 +6011,7 @@ declare namespace Toaster {
|
|
|
6006
6011
|
/** Class variants for `Spinner`, controlling its `size` (`default`, `sm`, `lg`, `xl`). */
|
|
6007
6012
|
declare const spinnerVariants: (props?: ({
|
|
6008
6013
|
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
6009
|
-
} &
|
|
6014
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
6010
6015
|
/**
|
|
6011
6016
|
* Animated loading indicator. Renders a spinning `<svg>` (Loader icon) with
|
|
6012
6017
|
* `role="status"` and a localized `aria-label` for assistive technology.
|
|
@@ -6323,7 +6328,8 @@ declare namespace ThemeProvider {
|
|
|
6323
6328
|
declare const toggleVariants: (props?: ({
|
|
6324
6329
|
variant?: "default" | "outline" | null | undefined;
|
|
6325
6330
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6326
|
-
|
|
6331
|
+
pressedColor?: "highContrast" | "lowContrast" | null | undefined;
|
|
6332
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
6327
6333
|
/**
|
|
6328
6334
|
* A two-state button that can be pressed on or off, wrapping Base UI's `Toggle`.
|
|
6329
6335
|
* Renders a `<button aria-pressed>` styled via {@link toggleVariants}.
|
package/dist/index.js
CHANGED
|
@@ -4722,7 +4722,7 @@ CountryFlag.displayName = "CountryFlag";
|
|
|
4722
4722
|
* ```
|
|
4723
4723
|
*/
|
|
4724
4724
|
function DataCombobox(componentProps) {
|
|
4725
|
-
const { items, getItemValue, getItemLabel, renderItem, renderChip, getGroupKey, getGroupLabel, selectionMode = "single", selectedKeys, defaultSelectedKeys, onSelectionChange, onOpenChange, selectedItems, disabledKeys, loadingState, skeletonCount, onSearch, onFetchMore, hasMore = false, emptyState, trigger, searchable = true, placeholder, disabled = false, className, contentClassName, "aria-label": ariaLabel } = componentProps;
|
|
4725
|
+
const { items, getItemValue, getItemLabel, renderItem, renderChip, getGroupKey, getGroupLabel, selectionMode = "single", selectedKeys, defaultSelectedKeys, onSelectionChange, onOpenChange, selectedItems, disabledKeys, loadingState, skeletonCount, onSearch, onFetchMore, hasMore = false, emptyState, trigger, searchable = true, placeholder, disabled = false, className, contentClassName, "aria-label": ariaLabel, showClear = true } = componentProps;
|
|
4726
4726
|
const multiple = selectionMode === "multiple";
|
|
4727
4727
|
const { keys, selectedObjects, commit, handleInputValueChange } = useComboboxItemSelection({
|
|
4728
4728
|
items,
|
|
@@ -4795,7 +4795,7 @@ function DataCombobox(componentProps) {
|
|
|
4795
4795
|
className,
|
|
4796
4796
|
placeholder,
|
|
4797
4797
|
disabled,
|
|
4798
|
-
showClear
|
|
4798
|
+
showClear
|
|
4799
4799
|
}), /* @__PURE__ */ jsx(ComboboxContent, {
|
|
4800
4800
|
className: cn("min-w-50", contentClassName),
|
|
4801
4801
|
children: popupRows
|
|
@@ -12196,21 +12196,26 @@ TabsContent.displayName = "TabsContent";
|
|
|
12196
12196
|
* Class-variance-authority variants for {@link Toggle}: `variant` (`default` | `outline`)
|
|
12197
12197
|
* and `size` (`default` | `sm` | `lg`).
|
|
12198
12198
|
*/
|
|
12199
|
-
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md
|
|
12199
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm text-foreground font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
12200
12200
|
variants: {
|
|
12201
12201
|
variant: {
|
|
12202
|
-
default: "
|
|
12203
|
-
outline: "border border-input
|
|
12202
|
+
default: "bg-transparent",
|
|
12203
|
+
outline: "border border-input bg-background"
|
|
12204
12204
|
},
|
|
12205
12205
|
size: {
|
|
12206
12206
|
default: "h-8 min-w-8 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
12207
12207
|
sm: "h-6 min-w-6 px-1.5 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
12208
12208
|
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
12209
|
+
},
|
|
12210
|
+
pressedColor: {
|
|
12211
|
+
highContrast: "data-pressed:bg-secondary data-pressed:text-secondary-foreground data-pressed:hover:bg-secondary data-pressed:hover:text-secondary-foreground",
|
|
12212
|
+
lowContrast: "data-pressed:bg-muted data-pressed:text-muted-foreground data-pressed:hover:bg-muted data-pressed:hover:text-muted-foreground"
|
|
12209
12213
|
}
|
|
12210
12214
|
},
|
|
12211
12215
|
defaultVariants: {
|
|
12212
12216
|
variant: "default",
|
|
12213
|
-
size: "default"
|
|
12217
|
+
size: "default",
|
|
12218
|
+
pressedColor: "highContrast"
|
|
12214
12219
|
}
|
|
12215
12220
|
});
|
|
12216
12221
|
/**
|
|
@@ -12223,13 +12228,14 @@ const toggleVariants = cva("group/toggle inline-flex items-center justify-center
|
|
|
12223
12228
|
* ```
|
|
12224
12229
|
*/
|
|
12225
12230
|
const Toggle = React.forwardRef((componentProps, forwardRef) => {
|
|
12226
|
-
const { className, variant = "default", size = "default", ...props } = componentProps;
|
|
12231
|
+
const { className, variant = "default", size = "default", pressedColor = "highContrast", ...props } = componentProps;
|
|
12227
12232
|
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
12228
12233
|
ref: forwardRef,
|
|
12229
12234
|
"data-slot": "toggle",
|
|
12230
12235
|
className: cn(toggleVariants({
|
|
12231
12236
|
variant,
|
|
12232
12237
|
size,
|
|
12238
|
+
pressedColor,
|
|
12233
12239
|
className
|
|
12234
12240
|
})),
|
|
12235
12241
|
...props
|