@aircall/blocks 0.2.2 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
+ import * as _aircall_ds0 from "@aircall/ds";
2
3
  import { Badge, Button, CounterBadge, SidebarProvider, TabsList, useSidebar } from "@aircall/ds";
3
- import * as react_jsx_runtime27 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
  import { VariantProps } from "class-variance-authority";
5
6
  import { useRender } from "@base-ui/react/use-render";
6
7
  import * as class_variance_authority_types0 from "class-variance-authority/types";
7
- import * as _base_ui_react0 from "@base-ui/react";
8
8
 
9
9
  //#region src/components/copy-button.d.ts
10
10
  type CopyButtonProps = Omit<React.ComponentProps<typeof Button>, 'onClick' | 'variant'> & {
@@ -20,13 +20,13 @@ declare function CopyButton({
20
20
  variant,
21
21
  children,
22
22
  ...buttonProps
23
- }: CopyButtonProps): react_jsx_runtime27.JSX.Element;
23
+ }: CopyButtonProps): react_jsx_runtime0.JSX.Element;
24
24
  interface CopyButtonIconProps {
25
25
  className?: string;
26
26
  }
27
27
  declare function CopyButtonIcon({
28
28
  className
29
- }: CopyButtonIconProps): react_jsx_runtime27.JSX.Element;
29
+ }: CopyButtonIconProps): react_jsx_runtime0.JSX.Element;
30
30
  interface CopyButtonLabelProps {
31
31
  label?: string;
32
32
  copiedLabel?: string;
@@ -36,56 +36,84 @@ declare function CopyButtonLabel({
36
36
  label,
37
37
  copiedLabel,
38
38
  className
39
- }: CopyButtonLabelProps): react_jsx_runtime27.JSX.Element;
39
+ }: CopyButtonLabelProps): react_jsx_runtime0.JSX.Element;
40
+ //#endregion
41
+ //#region src/components/dashboard-standalone-page.d.ts
42
+ declare const DashboardStandalonePage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
+ declare namespace DashboardStandalonePage {
44
+ type Props = React.ComponentProps<'div'>;
45
+ }
46
+ declare const DashboardStandalonePageHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
47
+ declare namespace DashboardStandalonePageHeader {
48
+ type Props = React.ComponentProps<'header'>;
49
+ }
50
+ declare const DashboardStandalonePageTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
51
+ declare namespace DashboardStandalonePageTitle {
52
+ type Props = React.ComponentProps<'h1'>;
53
+ }
54
+ declare const DashboardStandalonePageActions: React.ForwardRefExoticComponent<Omit<DashboardStandalonePageActions.Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+ declare namespace DashboardStandalonePageActions {
56
+ type Props = React.ComponentProps<'div'> & {
57
+ side?: 'start' | 'end';
58
+ };
59
+ }
60
+ declare const DashboardStandalonePageAction: React.ForwardRefExoticComponent<Omit<Omit<_aircall_ds0.ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
61
+ declare namespace DashboardStandalonePageAction {
62
+ type Props = React.ComponentProps<typeof Button>;
63
+ }
64
+ declare const DashboardStandalonePageContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
65
+ declare namespace DashboardStandalonePageContent {
66
+ type Props = React.ComponentProps<'main'>;
67
+ }
40
68
  //#endregion
41
69
  //#region src/components/dashboard-page.d.ts
42
70
  declare function DashboardPage({
43
71
  className,
44
72
  ...props
45
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
73
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
46
74
  declare function DashboardPageBanner({
47
75
  className,
48
76
  ...props
49
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
77
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
50
78
  declare function DashboardPageContent({
51
79
  className,
52
80
  ...props
53
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
81
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
54
82
  declare function DashboardPageMain({
55
83
  className,
56
84
  ...props
57
- }: React.ComponentProps<'main'>): react_jsx_runtime27.JSX.Element;
85
+ }: React.ComponentProps<'main'>): react_jsx_runtime0.JSX.Element;
58
86
  declare function DashboardPageTabs({
59
87
  className,
60
88
  ...props
61
- }: React.ComponentProps<typeof TabsList>): react_jsx_runtime27.JSX.Element;
89
+ }: React.ComponentProps<typeof TabsList>): react_jsx_runtime0.JSX.Element;
62
90
  //#endregion
63
91
  //#region src/components/dashboard-page-header.d.ts
64
92
  declare function DashboardPageHeader({
65
93
  className,
66
94
  children,
67
95
  ...props
68
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
96
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
69
97
  declare function DashboardPageHeaderNav({
70
98
  className,
71
99
  children,
72
100
  ...props
73
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
101
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
74
102
  type DashboardPageHeaderNavBackProps = Omit<React.ComponentProps<typeof Button>, 'variant' | 'size'>;
75
103
  declare function DashboardPageHeaderNavBack({
76
104
  children,
77
105
  ...props
78
- }: DashboardPageHeaderNavBackProps): react_jsx_runtime27.JSX.Element;
106
+ }: DashboardPageHeaderNavBackProps): react_jsx_runtime0.JSX.Element;
79
107
  declare function DashboardPageHeaderPrefix({
80
108
  className,
81
109
  children,
82
110
  ...props
83
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
111
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
84
112
  declare function DashboardPageHeaderTitleGroup({
85
113
  className,
86
114
  children,
87
115
  ...props
88
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
116
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
89
117
  type DashboardPageHeaderTitleProps = React.ComponentProps<'h1'> & {
90
118
  size?: 'lg' | 'sm';
91
119
  };
@@ -94,35 +122,35 @@ declare function DashboardPageHeaderTitle({
94
122
  className,
95
123
  children,
96
124
  ...props
97
- }: DashboardPageHeaderTitleProps): react_jsx_runtime27.JSX.Element;
125
+ }: DashboardPageHeaderTitleProps): react_jsx_runtime0.JSX.Element;
98
126
  declare function DashboardPageHeaderSubtitle({
99
127
  className,
100
128
  children,
101
129
  ...props
102
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
130
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
103
131
  declare function DashboardPageHeaderDescription({
104
132
  className,
105
133
  children,
106
134
  ...props
107
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
135
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
108
136
  declare function DashboardPageHeaderActions({
109
137
  className,
110
138
  children,
111
139
  ...props
112
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
140
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
113
141
  type DashboardPageHeaderActionProps = Omit<React.ComponentProps<typeof Button>, 'size'> & {
114
142
  size?: 'lg' | 'icon-lg';
115
143
  };
116
144
  declare const DashboardPageHeaderAction: React.ForwardRefExoticComponent<Omit<DashboardPageHeaderActionProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
117
145
  //#endregion
118
146
  //#region src/components/product-badges.d.ts
119
- type BadgeBaseProps = Omit<React.ComponentProps<typeof Badge>, 'variant' | 'children'>;
147
+ type BadgeBaseProps = Omit<React.ComponentProps<typeof Badge>, 'variant' | 'children' | 'size'>;
120
148
  /** Blue pill — feature in beta, not yet GA */
121
149
  declare const BetaBadge: {
122
150
  ({
123
151
  className,
124
152
  ...props
125
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
153
+ }: BadgeBaseProps): react_jsx_runtime0.JSX.Element;
126
154
  displayName: string;
127
155
  };
128
156
  /** Green pill — recently launched feature */
@@ -130,7 +158,7 @@ declare const NewBadge: {
130
158
  ({
131
159
  className,
132
160
  ...props
133
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
161
+ }: BadgeBaseProps): react_jsx_runtime0.JSX.Element;
134
162
  displayName: string;
135
163
  };
136
164
  /** Amber pill — feature being phased out */
@@ -138,7 +166,7 @@ declare const DeprecatedBadge: {
138
166
  ({
139
167
  className,
140
168
  ...props
141
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
169
+ }: BadgeBaseProps): react_jsx_runtime0.JSX.Element;
142
170
  displayName: string;
143
171
  };
144
172
  /** Blue pill — user is in a trial period (same blue family as Beta) */
@@ -146,15 +174,18 @@ declare const TrialBadge: {
146
174
  ({
147
175
  className,
148
176
  ...props
149
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
177
+ }: BadgeBaseProps): react_jsx_runtime0.JSX.Element;
150
178
  displayName: string;
151
179
  };
152
- /** Green pill — Professional tier (no gradient; uses default Badge variant) */
180
+ /** Charcoal pill — Professional tier (no gradient; solid secondary Badge) */
153
181
  declare function ProfessionalBadge({
154
182
  className,
155
183
  ...props
156
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
157
- type RoleBadgeRole = 'agent' | 'supervisor' | 'admin' | 'owner';
184
+ }: BadgeBaseProps): react_jsx_runtime0.JSX.Element;
185
+ declare const roleBadgeVariants: (props?: ({
186
+ role?: "agent" | "supervisor" | "admin" | "owner" | null | undefined;
187
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
188
+ type RoleBadgeRole = NonNullable<VariantProps<typeof roleBadgeVariants>['role']>;
158
189
  type RoleBadgeProps = BadgeBaseProps & {
159
190
  /** The user's role within Aircall. */role: RoleBadgeRole;
160
191
  };
@@ -162,44 +193,7 @@ declare function RoleBadge({
162
193
  role,
163
194
  className,
164
195
  ...props
165
- }: RoleBadgeProps): react_jsx_runtime27.JSX.Element;
166
- //#endregion
167
- //#region src/components/colorful-badge.d.ts
168
- declare const colorfulBadgeVariants: (props?: ({
169
- color?: "charcoal" | "red" | "green" | "blue" | "purple" | "yellow" | "pink" | null | undefined;
170
- tone?: "dark" | "medium-dark" | "medium-light" | "light" | null | undefined;
171
- glow?: boolean | null | undefined;
172
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
173
- type ColorfulBadgeVariants = VariantProps<typeof colorfulBadgeVariants>;
174
- type ColorfulBadgeColor = NonNullable<ColorfulBadgeVariants['color']>;
175
- type ColorfulBadgeTone = NonNullable<ColorfulBadgeVariants['tone']>;
176
- type ColorfulBadgeProps = Omit<React.ComponentProps<typeof Badge>, 'variant' | 'size' | 'color'> & ColorfulBadgeVariants & {
177
- /**
178
- * A legacy hard-coded tag hex (e.g. `#0761B5`) from the old palette. When
179
- * provided it is resolved to the matching `color` + `tone` and overrides
180
- * them — render existing tags without migrating their stored colors.
181
- * Unknown values fall back to `charcoal` / `dark`.
182
- */
183
- legacyColor?: string;
184
- };
185
- /**
186
- * A color-customizable badge. Pick a `color` and `tone`; optionally enable the
187
- * AI `glow`. To render an existing tag, pass its stored hex via `legacyColor`.
188
- * Icons (e.g. a leading `<Sparkles />` or a trailing close `<X />`) are composed
189
- * as children, exactly like `Badge`.
190
- */
191
- declare const ColorfulBadge: React.ForwardRefExoticComponent<Omit<ColorfulBadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
192
- /**
193
- * Trailing remove affordance for a removable `ColorfulBadge`. Inspired by the
194
- * ds `ComboboxChip` remove button: a ghost icon button that inherits the
195
- * badge's text color and brightens on hover. Pass an `aria-label` and an
196
- * `onClick`. Compose it as the last child of a `ColorfulBadge`.
197
- */
198
- declare const ColorfulBadgeRemove: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react0.ButtonProps & VariantProps<(props?: ({
199
- variant?: "link" | "default" | "secondary" | "outline" | "destructive" | "ghost" | null | undefined;
200
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
201
- block?: boolean | null | undefined;
202
- } & class_variance_authority_types0.ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
196
+ }: RoleBadgeProps): react_jsx_runtime0.JSX.Element;
203
197
  //#endregion
204
198
  //#region src/hooks/use-copy-to-clipboard.d.ts
205
199
  interface UseCopyToClipboardOptions {
@@ -296,7 +290,7 @@ type DashboardSidebarNavProps = {
296
290
  declare function DashboardSidebarNav({
297
291
  groups,
298
292
  renderLink
299
- }: DashboardSidebarNavProps): react_jsx_runtime27.JSX.Element;
293
+ }: DashboardSidebarNavProps): react_jsx_runtime0.JSX.Element;
300
294
  //#endregion
301
295
  //#region src/components/dashboard-sidebar.d.ts
302
296
  type DashboardSidebarProviderProps = React.ComponentProps<typeof SidebarProvider>;
@@ -304,34 +298,34 @@ declare function DashboardSidebarProvider({
304
298
  className,
305
299
  style,
306
300
  ...props
307
- }: DashboardSidebarProviderProps): react_jsx_runtime27.JSX.Element;
301
+ }: DashboardSidebarProviderProps): react_jsx_runtime0.JSX.Element;
308
302
  declare function DashboardSidebar({
309
303
  className,
310
304
  children,
311
305
  ...props
312
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
306
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
313
307
  declare function DashboardSidebarHeader({
314
308
  className,
315
309
  children,
316
310
  ...props
317
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
311
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
318
312
  declare function DashboardSidebarTrigger({
319
313
  className,
320
314
  onClick,
321
315
  ...props
322
- }: React.ComponentProps<typeof Button>): react_jsx_runtime27.JSX.Element;
316
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime0.JSX.Element;
323
317
  declare function DashboardSidebarContent({
324
318
  className,
325
319
  ...props
326
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
320
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
327
321
  declare function DashboardSidebarFooter({
328
322
  className,
329
323
  ...props
330
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
324
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
331
325
  declare function DashboardSidebarGroup({
332
326
  className,
333
327
  ...props
334
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
328
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
335
329
  declare function DashboardSidebarGroupLabel({
336
330
  className,
337
331
  render,
@@ -340,11 +334,11 @@ declare function DashboardSidebarGroupLabel({
340
334
  declare function DashboardSidebarMenu({
341
335
  className,
342
336
  ...props
343
- }: React.ComponentProps<'ul'>): react_jsx_runtime27.JSX.Element;
337
+ }: React.ComponentProps<'ul'>): react_jsx_runtime0.JSX.Element;
344
338
  declare function DashboardSidebarMenuItem({
345
339
  className,
346
340
  ...props
347
- }: React.ComponentProps<'li'>): react_jsx_runtime27.JSX.Element;
341
+ }: React.ComponentProps<'li'>): react_jsx_runtime0.JSX.Element;
348
342
  type DashboardSidebarMenuButtonProps = useRender.ComponentProps<'button'> & React.ComponentProps<'button'> & {
349
343
  isActive?: boolean;
350
344
  /** Visual-only disabled state. The button remains clickable (e.g. to show an
@@ -367,11 +361,11 @@ declare const DashboardSidebarMenuButton: React.ForwardRefExoticComponent<Omit<D
367
361
  declare function DashboardSidebarMenuBadge({
368
362
  className,
369
363
  ...props
370
- }: React.ComponentProps<typeof CounterBadge>): react_jsx_runtime27.JSX.Element;
364
+ }: React.ComponentProps<typeof CounterBadge>): react_jsx_runtime0.JSX.Element;
371
365
  declare function DashboardSidebarSubmenu({
372
366
  className,
373
367
  ...props
374
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
368
+ }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
375
369
  type DashboardSidebarSubmenuItemProps = useRender.ComponentProps<'div'> & React.ComponentProps<'div'> & {
376
370
  isActive?: boolean;
377
371
  };
@@ -385,6 +379,6 @@ declare function DashboardSidebarSubmenuSeparator({
385
379
  className
386
380
  }: {
387
381
  className?: string;
388
- }): react_jsx_runtime27.JSX.Element;
382
+ }): react_jsx_runtime0.JSX.Element;
389
383
  //#endregion
390
- export { BetaBadge, ColorfulBadge, type ColorfulBadgeColor, ColorfulBadgeRemove, type ColorfulBadgeTone, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavProps, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DeprecatedBadge, NewBadge, ProfessionalBadge, RoleBadge, type RoleBadgeRole, TrialBadge, colorfulBadgeVariants, useCopyToClipboard, useSidebar as useDashboardSidebar };
384
+ export { BetaBadge, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavProps, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, NewBadge, ProfessionalBadge, RoleBadge, type RoleBadgeRole, TrialBadge, useCopyToClipboard, useSidebar as useDashboardSidebar };