@aircall/ds 0.13.0 → 0.15.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.
- package/README.md +31 -0
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +94 -33
- package/dist/index.js +292 -42
- package/package.json +16 -3
- package/skills/aircall-ds/migrate-icons/SKILL.md +346 -0
- package/skills/aircall-ds/migrate-tractor/SKILL.md +314 -0
- package/skills/aircall-ds/migrate-tractor/accordion/SKILL.md +276 -0
- package/skills/aircall-ds/migrate-tractor/alert/SKILL.md +225 -0
- package/skills/aircall-ds/migrate-tractor/avatar/SKILL.md +272 -0
- package/skills/aircall-ds/migrate-tractor/badge/SKILL.md +274 -0
- package/skills/aircall-ds/migrate-tractor/button/SKILL.md +277 -0
- package/skills/aircall-ds/migrate-tractor/card/SKILL.md +278 -0
- package/skills/aircall-ds/migrate-tractor/combobox/SKILL.md +346 -0
- package/skills/aircall-ds/migrate-tractor/data-table/SKILL.md +333 -0
- package/skills/aircall-ds/migrate-tractor/dialog/SKILL.md +206 -0
- package/skills/aircall-ds/migrate-tractor/divider/SKILL.md +226 -0
- package/skills/aircall-ds/migrate-tractor/dropdown-menu/SKILL.md +266 -0
- package/skills/aircall-ds/migrate-tractor/dropzone/SKILL.md +338 -0
- package/skills/aircall-ds/migrate-tractor/form-and-field/SKILL.md +325 -0
- package/skills/aircall-ds/migrate-tractor/gauge/SKILL.md +248 -0
- package/skills/aircall-ds/migrate-tractor/input/SKILL.md +261 -0
- package/skills/aircall-ds/migrate-tractor/item/SKILL.md +298 -0
- package/skills/aircall-ds/migrate-tractor/link/SKILL.md +263 -0
- package/skills/aircall-ds/migrate-tractor/popover/SKILL.md +214 -0
- package/skills/aircall-ds/migrate-tractor/select/SKILL.md +245 -0
- package/skills/aircall-ds/migrate-tractor/sheet-vs-drawer/SKILL.md +272 -0
- package/skills/aircall-ds/migrate-tractor/skeleton/SKILL.md +190 -0
- package/skills/aircall-ds/migrate-tractor/styling/SKILL.md +421 -0
- package/skills/aircall-ds/migrate-tractor/tabs/SKILL.md +250 -0
- package/skills/aircall-ds/migrate-tractor/toast/SKILL.md +322 -0
- package/skills/aircall-ds/migrate-tractor/tooltip/SKILL.md +204 -0
- package/skills/aircall-ds/migrate-tractor/tree/SKILL.md +346 -0
- package/skills/aircall-ds/setup/SKILL.md +347 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ClassValue } from "clsx";
|
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
|
+
import "i18next";
|
|
7
8
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
8
9
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
9
10
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -17,7 +18,7 @@ import * as _base_ui_react0 from "@base-ui/react";
|
|
|
17
18
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
18
19
|
import { Command as Command$1 } from "cmdk";
|
|
19
20
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
20
|
-
import { ColumnDef, OnChangeFn, Row, RowSelectionState, SortingState } from "@tanstack/react-table";
|
|
21
|
+
import { ColumnDef, ColumnDef as ColumnDef$1, OnChangeFn, OnChangeFn as OnChangeFn$1, Row, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1 } from "@tanstack/react-table";
|
|
21
22
|
import { ItemInstance } from "@headless-tree/core";
|
|
22
23
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
23
24
|
import { Radio } from "@base-ui/react/radio";
|
|
@@ -37,7 +38,7 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
|
37
38
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
38
39
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
39
40
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
40
|
-
import * as
|
|
41
|
+
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
41
42
|
import { CountryCode } from "@aircall/numbers";
|
|
42
43
|
|
|
43
44
|
//#region src/components/accordion.d.ts
|
|
@@ -65,9 +66,9 @@ declare namespace AccordionContent {
|
|
|
65
66
|
//#region src/components/button.d.ts
|
|
66
67
|
declare const buttonVariants: (props?: ({
|
|
67
68
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
68
|
-
size?: "default" | "
|
|
69
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
69
70
|
block?: boolean | null | undefined;
|
|
70
|
-
} &
|
|
71
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
71
72
|
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
72
73
|
interface ButtonProps extends Button$1.Props, VariantProps<typeof buttonVariants> {
|
|
73
74
|
children?: React.ReactNode;
|
|
@@ -112,9 +113,9 @@ interface ActionBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'chi
|
|
|
112
113
|
onClear?: () => void;
|
|
113
114
|
/** Action buttons rendered on the right of the bar — use `ActionBarButton`. */
|
|
114
115
|
children?: React.ReactNode;
|
|
115
|
-
/** Custom label renderer. Defaults to
|
|
116
|
+
/** Custom label renderer. Defaults to the localized `actionBar.itemsSelected` string (`{{count}} items selected.`). */
|
|
116
117
|
label?: (count: number) => React.ReactNode;
|
|
117
|
-
/** Accessible label for the clear button. */
|
|
118
|
+
/** Accessible label for the clear button. Defaults to the localized `actionBar.clearSelection` string. */
|
|
118
119
|
clearLabel?: string;
|
|
119
120
|
}
|
|
120
121
|
declare const ActionBar: React.ForwardRefExoticComponent<ActionBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -188,8 +189,8 @@ declare namespace AlertDialogCancel {
|
|
|
188
189
|
//#endregion
|
|
189
190
|
//#region src/components/alert.d.ts
|
|
190
191
|
declare const alertVariants: (props?: ({
|
|
191
|
-
variant?: "default" | "
|
|
192
|
-
} &
|
|
192
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
193
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
193
194
|
declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
194
195
|
interface AlertProps extends React.ComponentProps<'div'>, VariantProps<typeof alertVariants> {}
|
|
195
196
|
declare namespace Alert {
|
|
@@ -248,7 +249,7 @@ declare namespace AvatarGroupCount {
|
|
|
248
249
|
//#region src/components/counter-badge.d.ts
|
|
249
250
|
declare const counterBadgeVariants: (props?: ({
|
|
250
251
|
variant?: "default" | "secondary" | "ghost" | null | undefined;
|
|
251
|
-
} &
|
|
252
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
252
253
|
declare const CounterBadge: React.ForwardRefExoticComponent<Omit<CounterBadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
253
254
|
type CounterBadgeProps = useRender.ComponentProps<'span'> & VariantProps<typeof counterBadgeVariants>;
|
|
254
255
|
declare namespace CounterBadge {
|
|
@@ -260,7 +261,7 @@ declare const badgeVariants: (props?: ({
|
|
|
260
261
|
size?: "default" | "lg" | null | undefined;
|
|
261
262
|
color?: "blue" | "green" | "pink" | "purple" | "red" | "yellow" | "charcoal" | null | undefined;
|
|
262
263
|
tone?: "dark" | "light" | "medium-dark" | "medium-light" | null | undefined;
|
|
263
|
-
} &
|
|
264
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
264
265
|
type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
265
266
|
type BadgeColor = NonNullable<BadgeVariants['color']>;
|
|
266
267
|
type BadgeTone = NonNullable<BadgeVariants['tone']>;
|
|
@@ -292,7 +293,7 @@ declare namespace BadgeGroup {
|
|
|
292
293
|
}
|
|
293
294
|
declare const badgeGroupCountVariants: (props?: ({
|
|
294
295
|
size?: "default" | "lg" | null | undefined;
|
|
295
|
-
} &
|
|
296
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
296
297
|
declare const BadgeGroupCount: React.ForwardRefExoticComponent<Omit<BadgeGroupCount.Props, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
297
298
|
declare namespace BadgeGroupCount {
|
|
298
299
|
type Props = Omit<React.ComponentProps<typeof CounterBadge>, 'variant'> & VariantProps<typeof badgeGroupCountVariants>;
|
|
@@ -300,9 +301,9 @@ declare namespace BadgeGroupCount {
|
|
|
300
301
|
//#endregion
|
|
301
302
|
//#region src/components/banner.d.ts
|
|
302
303
|
declare const bannerVariants: (props?: ({
|
|
303
|
-
variant?: "default" | "
|
|
304
|
+
variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
304
305
|
borderDirection?: "bottom" | "top" | null | undefined;
|
|
305
|
-
} &
|
|
306
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
306
307
|
declare const Banner: React.ForwardRefExoticComponent<Omit<BannerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
307
308
|
interface BannerProps extends React.ComponentProps<'div'>, VariantProps<typeof bannerVariants> {}
|
|
308
309
|
declare namespace Banner {
|
|
@@ -383,7 +384,7 @@ declare namespace Separator {
|
|
|
383
384
|
//#region src/components/button-group.d.ts
|
|
384
385
|
declare const buttonGroupVariants: (props?: ({
|
|
385
386
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
386
|
-
} &
|
|
387
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
387
388
|
declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
388
389
|
interface ButtonGroupProps extends React.ComponentProps<'div'>, VariantProps<typeof buttonGroupVariants> {}
|
|
389
390
|
declare namespace ButtonGroup {
|
|
@@ -796,7 +797,7 @@ interface DataTableProps<TData> {
|
|
|
796
797
|
* summary row — the table auto-shows a `<tfoot>` when any column has one, with
|
|
797
798
|
* footer cells aligned under their columns.
|
|
798
799
|
*/
|
|
799
|
-
columns: ColumnDef<TData, unknown>[];
|
|
800
|
+
columns: ColumnDef$1<TData, unknown>[];
|
|
800
801
|
/** Data array to render. With server-side sorting/pagination, this is the already-prepared page. */
|
|
801
802
|
data: TData[];
|
|
802
803
|
/** Stable row id resolver. Required for selection to persist across data changes. */
|
|
@@ -820,9 +821,9 @@ interface DataTableProps<TData> {
|
|
|
820
821
|
*/
|
|
821
822
|
emptyState?: React.ReactNode;
|
|
822
823
|
/** Controlled sorting state. Pass alongside `onSortingChange` to enable sortable headers. */
|
|
823
|
-
sorting?: SortingState;
|
|
824
|
+
sorting?: SortingState$1;
|
|
824
825
|
/** Called when the user toggles a sortable header. */
|
|
825
|
-
onSortingChange?: OnChangeFn<SortingState>;
|
|
826
|
+
onSortingChange?: OnChangeFn$1<SortingState$1>;
|
|
826
827
|
/**
|
|
827
828
|
* Enables interactive column resizing. Each resizable header gets a drag
|
|
828
829
|
* handle on its right edge; column widths come from each column's `size`
|
|
@@ -833,9 +834,9 @@ interface DataTableProps<TData> {
|
|
|
833
834
|
/** Enables row selection. When truthy, a checkbox column is auto-prepended. */
|
|
834
835
|
enableRowSelection?: boolean | ((row: Row<TData>) => boolean);
|
|
835
836
|
/** Controlled selection state. */
|
|
836
|
-
rowSelection?: RowSelectionState;
|
|
837
|
+
rowSelection?: RowSelectionState$1;
|
|
837
838
|
/** Called when selection changes. */
|
|
838
|
-
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
839
|
+
onRowSelectionChange?: OnChangeFn$1<RowSelectionState$1>;
|
|
839
840
|
/** Bar rendered floating at the bottom while there is at least one selected row. */
|
|
840
841
|
actionBar?: React.ReactNode;
|
|
841
842
|
/** Called when the user scrolls near the bottom; use to fetch the next page. */
|
|
@@ -1175,7 +1176,7 @@ declare namespace EmptyHeader {
|
|
|
1175
1176
|
}
|
|
1176
1177
|
declare const emptyMediaVariants: (props?: ({
|
|
1177
1178
|
variant?: "default" | "icon" | null | undefined;
|
|
1178
|
-
} &
|
|
1179
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1179
1180
|
declare const EmptyMedia: React.ForwardRefExoticComponent<Omit<EmptyMediaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1180
1181
|
interface EmptyMediaProps extends React.ComponentProps<'div'>, VariantProps<typeof emptyMediaVariants> {}
|
|
1181
1182
|
declare namespace EmptyMedia {
|
|
@@ -1369,7 +1370,7 @@ declare namespace EmojiPickerContent {
|
|
|
1369
1370
|
declare const fabVariants: (props?: ({
|
|
1370
1371
|
variant?: "default" | "outline" | null | undefined;
|
|
1371
1372
|
size?: "lg" | "icon-lg" | null | undefined;
|
|
1372
|
-
} &
|
|
1373
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1373
1374
|
declare const FAB: React.ForwardRefExoticComponent<Omit<FABProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1374
1375
|
interface FABProps extends Button$1.Props, VariantProps<typeof fabVariants> {}
|
|
1375
1376
|
declare namespace FAB {
|
|
@@ -1403,7 +1404,7 @@ declare namespace FieldGroup {
|
|
|
1403
1404
|
}
|
|
1404
1405
|
declare const fieldVariants: (props?: ({
|
|
1405
1406
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
1406
|
-
} &
|
|
1407
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1407
1408
|
declare const Field: React.ForwardRefExoticComponent<Omit<FieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1408
1409
|
interface FieldProps extends React.ComponentProps<'div'>, VariantProps<typeof fieldVariants> {}
|
|
1409
1410
|
declare namespace Field {
|
|
@@ -1462,7 +1463,7 @@ declare namespace Gauge {
|
|
|
1462
1463
|
//#region src/components/input.d.ts
|
|
1463
1464
|
declare const inputVariants: (props?: ({
|
|
1464
1465
|
block?: boolean | null | undefined;
|
|
1465
|
-
} &
|
|
1466
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1466
1467
|
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1467
1468
|
interface InputProps extends React.ComponentProps<'input'>, VariantProps<typeof inputVariants> {}
|
|
1468
1469
|
declare namespace Input {
|
|
@@ -1477,7 +1478,7 @@ declare namespace InputGroup {
|
|
|
1477
1478
|
}
|
|
1478
1479
|
declare const inputGroupAddonVariants: (props?: ({
|
|
1479
1480
|
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
1480
|
-
} &
|
|
1481
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1481
1482
|
declare const InputGroupAddon: React.ForwardRefExoticComponent<Omit<InputGroupAddonProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1482
1483
|
interface InputGroupAddonProps extends React.ComponentProps<'div'>, VariantProps<typeof inputGroupAddonVariants> {}
|
|
1483
1484
|
declare namespace InputGroupAddon {
|
|
@@ -1505,7 +1506,7 @@ declare namespace InputGroupTextarea {
|
|
|
1505
1506
|
}
|
|
1506
1507
|
//#endregion
|
|
1507
1508
|
//#region src/components/input-otp.d.ts
|
|
1508
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
1509
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
1509
1510
|
value?: string;
|
|
1510
1511
|
onChange?: (newValue: string) => unknown;
|
|
1511
1512
|
maxLength: number;
|
|
@@ -1520,7 +1521,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
1520
1521
|
children?: never;
|
|
1521
1522
|
} & React.RefAttributes<HTMLInputElement> & {
|
|
1522
1523
|
containerClassName?: string;
|
|
1523
|
-
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
1524
|
+
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
1524
1525
|
value?: string;
|
|
1525
1526
|
onChange?: (newValue: string) => unknown;
|
|
1526
1527
|
maxLength: number;
|
|
@@ -1576,7 +1577,7 @@ declare namespace ItemSeparator {
|
|
|
1576
1577
|
declare const itemVariants: (props?: ({
|
|
1577
1578
|
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
1578
1579
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
1579
|
-
} &
|
|
1580
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1580
1581
|
declare const Item: React.ForwardRefExoticComponent<Omit<ItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1581
1582
|
interface ItemProps extends useRender.ComponentProps<'div'>, VariantProps<typeof itemVariants> {}
|
|
1582
1583
|
declare namespace Item {
|
|
@@ -1584,7 +1585,7 @@ declare namespace Item {
|
|
|
1584
1585
|
}
|
|
1585
1586
|
declare const itemMediaVariants: (props?: ({
|
|
1586
1587
|
variant?: "image" | "default" | "icon" | null | undefined;
|
|
1587
|
-
} &
|
|
1588
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1588
1589
|
declare const ItemMedia: React.ForwardRefExoticComponent<Omit<ItemMediaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1589
1590
|
interface ItemMediaProps extends React.ComponentProps<'div'>, VariantProps<typeof itemMediaVariants> {}
|
|
1590
1591
|
declare namespace ItemMedia {
|
|
@@ -1746,7 +1747,7 @@ declare namespace ScrollBar {
|
|
|
1746
1747
|
//#region src/components/select.d.ts
|
|
1747
1748
|
declare const selectTriggerVariants: (props?: ({
|
|
1748
1749
|
size?: "default" | "sm" | null | undefined;
|
|
1749
|
-
} &
|
|
1750
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1750
1751
|
declare const Select: typeof Select$1.Root;
|
|
1751
1752
|
declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1752
1753
|
interface SelectGroupProps extends Select$1.Group.Props {}
|
|
@@ -1971,7 +1972,7 @@ declare namespace SidebarMenuItem {
|
|
|
1971
1972
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
1972
1973
|
variant?: "default" | "outline" | null | undefined;
|
|
1973
1974
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
1974
|
-
} &
|
|
1975
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
1975
1976
|
declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<SidebarMenuButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1976
1977
|
type SidebarMenuButtonProps = useRender.ComponentProps<'button'> & React.ComponentProps<'button'> & VariantProps<typeof sidebarMenuButtonVariants> & {
|
|
1977
1978
|
isActive?: boolean;
|
|
@@ -2043,7 +2044,7 @@ declare namespace Toaster {
|
|
|
2043
2044
|
//#region src/components/spinner.d.ts
|
|
2044
2045
|
declare const spinnerVariants: (props?: ({
|
|
2045
2046
|
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
2046
|
-
} &
|
|
2047
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
2047
2048
|
declare const Spinner: React.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
2048
2049
|
interface SpinnerProps extends React.ComponentProps<'svg'>, VariantProps<typeof spinnerVariants> {}
|
|
2049
2050
|
declare namespace Spinner {
|
|
@@ -2187,7 +2188,7 @@ declare namespace ThemeProvider {
|
|
|
2187
2188
|
declare const toggleVariants: (props?: ({
|
|
2188
2189
|
variant?: "default" | "outline" | null | undefined;
|
|
2189
2190
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2190
|
-
} &
|
|
2191
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
2191
2192
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
2192
2193
|
interface ToggleProps extends Toggle$1.Props, VariantProps<typeof toggleVariants> {}
|
|
2193
2194
|
declare namespace Toggle {
|
|
@@ -2278,6 +2279,66 @@ declare function TreeDragLine({
|
|
|
2278
2279
|
...props
|
|
2279
2280
|
}: TreeDragLine.Props): react_jsx_runtime0.JSX.Element | null;
|
|
2280
2281
|
//#endregion
|
|
2282
|
+
//#region src/components/ds-i18n-provider.d.ts
|
|
2283
|
+
/** Minimal shape of an i18next-like instance — structural to avoid coupling to a version. */
|
|
2284
|
+
interface I18nLanguageSource {
|
|
2285
|
+
language: string;
|
|
2286
|
+
on(event: 'languageChanged', cb: (lng: string) => void): void;
|
|
2287
|
+
off(event: 'languageChanged', cb: (lng: string) => void): void;
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* Drives the language of the shared `dsI18n` singleton from React.
|
|
2291
|
+
*
|
|
2292
|
+
* PRODUCTION INVARIANT — mount EXACTLY ONE `DsI18nProvider` at the app root, as an
|
|
2293
|
+
* ancestor of all DS components. This is NOT a context provider: it mutates the single
|
|
2294
|
+
* shared `dsI18n` singleton inside an effect. Therefore NEVER nest two providers with
|
|
2295
|
+
* differing languages — they are competing singleton mutators, and because React runs
|
|
2296
|
+
* effects inside-out, the OUTERMOST provider's effect runs last and wins, silently
|
|
2297
|
+
* overriding the inner one. DS apps are single-locale, so one root provider is correct.
|
|
2298
|
+
*
|
|
2299
|
+
* Use either `DsI18nProvider` (React apps) OR `syncDsLanguage` (non-React startup) — not
|
|
2300
|
+
* both, for the same reason: each mutates the same singleton and they would compete.
|
|
2301
|
+
*/
|
|
2302
|
+
declare function DsI18nProvider(componentProps: DsI18nProvider.Props): React.ReactNode;
|
|
2303
|
+
declare namespace DsI18nProvider {
|
|
2304
|
+
interface Props {
|
|
2305
|
+
/** Active language code (e.g. 'fr'). Falls back to navigator.language, then 'en'. */
|
|
2306
|
+
language?: string;
|
|
2307
|
+
children: React.ReactNode;
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Escape hatch for non-React / global-instance startup (e.g. the browser extension).
|
|
2312
|
+
* Mirrors `instance`'s current language onto the ds instance and follows its changes.
|
|
2313
|
+
* Returns an unsubscribe function.
|
|
2314
|
+
*
|
|
2315
|
+
* PRODUCTION INVARIANT — call this OR mount `DsI18nProvider`, never both. Both mutate the
|
|
2316
|
+
* same `dsI18n` singleton, so running them together makes them compete (last writer wins).
|
|
2317
|
+
* Like the provider, the singleton is single-locale: drive it from exactly one source.
|
|
2318
|
+
*/
|
|
2319
|
+
declare function syncDsLanguage(instance: I18nLanguageSource): () => void;
|
|
2320
|
+
//#endregion
|
|
2321
|
+
//#region src/i18n/instance.d.ts
|
|
2322
|
+
declare const SUPPORTED_LANGUAGES: readonly ["en", "fr", "es", "de", "it"];
|
|
2323
|
+
/** Resolve the initial language from the environment, falling back to English. */
|
|
2324
|
+
declare function detectInitialLanguage(): string;
|
|
2325
|
+
/** Register an additional namespace's resources into the shared instance (used by @aircall/blocks). */
|
|
2326
|
+
declare function registerI18nNamespace(ns: string, resources: Record<string, Record<string, string>>): void;
|
|
2327
|
+
//#endregion
|
|
2328
|
+
//#region src/i18n/use-ds-translation.d.ts
|
|
2329
|
+
/**
|
|
2330
|
+
* @internal
|
|
2331
|
+
* Reads translations from the shared ds instance and re-renders on language change.
|
|
2332
|
+
* Used by @aircall/ds and @aircall/blocks components only — not part of the consumer contract.
|
|
2333
|
+
*/
|
|
2334
|
+
declare function useDsTranslation(ns: 'ds' | 'blocks'): (key: string, opts?: Record<string, unknown>) => string;
|
|
2335
|
+
//#endregion
|
|
2336
|
+
//#region src/i18n/keys.d.ts
|
|
2337
|
+
/** All translation keys owned by the `ds` namespace. Flat dotted keys (keySeparator: false). */
|
|
2338
|
+
type DsI18nKey = 'spinner.loading' | 'pagination.label' | 'pagination.previousPage' | 'pagination.nextPage' | 'dataTable.selectAllRows' | 'dataTable.selectRow' | 'tree.collapse' | 'tree.expand' | 'multiselect.remove' | 'multiselect.clearAll' | 'sidebar.toggle' | 'drawer.close' | 'emojiPicker.emoji' | 'emojiPicker.choose' | 'actionBar.selectionActions' | 'pagination.previous' | 'pagination.next' | 'actionBar.clearSelection' | 'actionBar.itemsSelected';
|
|
2339
|
+
/** A complete set of translations for one language. Missing a key is a compile error. */
|
|
2340
|
+
type DsLocale = Record<DsI18nKey, string>;
|
|
2341
|
+
//#endregion
|
|
2281
2342
|
//#region src/hooks/use-audio-gauge.d.ts
|
|
2282
2343
|
interface UseAudioGaugeOptions {
|
|
2283
2344
|
/**
|
|
@@ -2336,4 +2397,4 @@ declare function useAudioGauge(options?: UseAudioGaugeOptions): UseAudioGaugeRes
|
|
|
2336
2397
|
//#region src/lib/utils.d.ts
|
|
2337
2398
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2338
2399
|
//#endregion
|
|
2339
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, type ActionBarContextValue, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, type ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, type DataTableLoadingState, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, type DropzoneErrorCode, DropzoneIcon, DropzoneTitle, DropzoneTrigger, EmojiPicker, EmojiPickerCategories, type EmojiPickerCategory, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FileError, type FileRejection, Filter, FilterClearAllButton, FilterGroup, Gauge, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, type NotificationHandle, type NotificationOptions, type NotificationPriority, type NotificationQueueControls, NotificationQueueProvider, type NotificationRenderProps, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetOverlay, type SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, type StepDefinition, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, UseAudioGaugeOptions, UseAudioGaugeResult, alertVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, fabVariants, selectTriggerVariants, spinnerVariants, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
2400
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, type ActionBarContextValue, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColumnDef, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, type ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, type DataTableLoadingState, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, type DropzoneErrorCode, DropzoneIcon, DropzoneTitle, DropzoneTrigger, type DsI18nKey, DsI18nProvider, type DsLocale, EmojiPicker, EmojiPickerCategories, type EmojiPickerCategory, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FileError, type FileRejection, Filter, FilterClearAllButton, FilterGroup, Gauge, type I18nLanguageSource, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, type NotificationHandle, type NotificationOptions, type NotificationPriority, type NotificationQueueControls, NotificationQueueProvider, type NotificationRenderProps, NotificationSlot, type OnChangeFn, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, type RowSelectionState, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetOverlay, type SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SortingState, Spinner, type StepDefinition, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, UseAudioGaugeOptions, UseAudioGaugeResult, alertVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|