@aircall/blocks 0.2.2 → 0.3.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,9 @@
1
1
  import * as React from "react";
2
2
  import { Badge, Button, CounterBadge, SidebarProvider, TabsList, useSidebar } from "@aircall/ds";
3
- import * as react_jsx_runtime27 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  import * as class_variance_authority_types0 from "class-variance-authority/types";
7
- import * as _base_ui_react0 from "@base-ui/react";
8
7
 
9
8
  //#region src/components/copy-button.d.ts
10
9
  type CopyButtonProps = Omit<React.ComponentProps<typeof Button>, 'onClick' | 'variant'> & {
@@ -20,13 +19,13 @@ declare function CopyButton({
20
19
  variant,
21
20
  children,
22
21
  ...buttonProps
23
- }: CopyButtonProps): react_jsx_runtime27.JSX.Element;
22
+ }: CopyButtonProps): react_jsx_runtime23.JSX.Element;
24
23
  interface CopyButtonIconProps {
25
24
  className?: string;
26
25
  }
27
26
  declare function CopyButtonIcon({
28
27
  className
29
- }: CopyButtonIconProps): react_jsx_runtime27.JSX.Element;
28
+ }: CopyButtonIconProps): react_jsx_runtime23.JSX.Element;
30
29
  interface CopyButtonLabelProps {
31
30
  label?: string;
32
31
  copiedLabel?: string;
@@ -36,56 +35,56 @@ declare function CopyButtonLabel({
36
35
  label,
37
36
  copiedLabel,
38
37
  className
39
- }: CopyButtonLabelProps): react_jsx_runtime27.JSX.Element;
38
+ }: CopyButtonLabelProps): react_jsx_runtime23.JSX.Element;
40
39
  //#endregion
41
40
  //#region src/components/dashboard-page.d.ts
42
41
  declare function DashboardPage({
43
42
  className,
44
43
  ...props
45
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
44
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
46
45
  declare function DashboardPageBanner({
47
46
  className,
48
47
  ...props
49
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
48
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
50
49
  declare function DashboardPageContent({
51
50
  className,
52
51
  ...props
53
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
52
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
54
53
  declare function DashboardPageMain({
55
54
  className,
56
55
  ...props
57
- }: React.ComponentProps<'main'>): react_jsx_runtime27.JSX.Element;
56
+ }: React.ComponentProps<'main'>): react_jsx_runtime23.JSX.Element;
58
57
  declare function DashboardPageTabs({
59
58
  className,
60
59
  ...props
61
- }: React.ComponentProps<typeof TabsList>): react_jsx_runtime27.JSX.Element;
60
+ }: React.ComponentProps<typeof TabsList>): react_jsx_runtime23.JSX.Element;
62
61
  //#endregion
63
62
  //#region src/components/dashboard-page-header.d.ts
64
63
  declare function DashboardPageHeader({
65
64
  className,
66
65
  children,
67
66
  ...props
68
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
67
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
69
68
  declare function DashboardPageHeaderNav({
70
69
  className,
71
70
  children,
72
71
  ...props
73
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
72
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
74
73
  type DashboardPageHeaderNavBackProps = Omit<React.ComponentProps<typeof Button>, 'variant' | 'size'>;
75
74
  declare function DashboardPageHeaderNavBack({
76
75
  children,
77
76
  ...props
78
- }: DashboardPageHeaderNavBackProps): react_jsx_runtime27.JSX.Element;
77
+ }: DashboardPageHeaderNavBackProps): react_jsx_runtime23.JSX.Element;
79
78
  declare function DashboardPageHeaderPrefix({
80
79
  className,
81
80
  children,
82
81
  ...props
83
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
82
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
84
83
  declare function DashboardPageHeaderTitleGroup({
85
84
  className,
86
85
  children,
87
86
  ...props
88
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
87
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
89
88
  type DashboardPageHeaderTitleProps = React.ComponentProps<'h1'> & {
90
89
  size?: 'lg' | 'sm';
91
90
  };
@@ -94,35 +93,35 @@ declare function DashboardPageHeaderTitle({
94
93
  className,
95
94
  children,
96
95
  ...props
97
- }: DashboardPageHeaderTitleProps): react_jsx_runtime27.JSX.Element;
96
+ }: DashboardPageHeaderTitleProps): react_jsx_runtime23.JSX.Element;
98
97
  declare function DashboardPageHeaderSubtitle({
99
98
  className,
100
99
  children,
101
100
  ...props
102
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
101
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
103
102
  declare function DashboardPageHeaderDescription({
104
103
  className,
105
104
  children,
106
105
  ...props
107
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
106
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
108
107
  declare function DashboardPageHeaderActions({
109
108
  className,
110
109
  children,
111
110
  ...props
112
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
111
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
113
112
  type DashboardPageHeaderActionProps = Omit<React.ComponentProps<typeof Button>, 'size'> & {
114
113
  size?: 'lg' | 'icon-lg';
115
114
  };
116
115
  declare const DashboardPageHeaderAction: React.ForwardRefExoticComponent<Omit<DashboardPageHeaderActionProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
117
116
  //#endregion
118
117
  //#region src/components/product-badges.d.ts
119
- type BadgeBaseProps = Omit<React.ComponentProps<typeof Badge>, 'variant' | 'children'>;
118
+ type BadgeBaseProps = Omit<React.ComponentProps<typeof Badge>, 'variant' | 'children' | 'size'>;
120
119
  /** Blue pill — feature in beta, not yet GA */
121
120
  declare const BetaBadge: {
122
121
  ({
123
122
  className,
124
123
  ...props
125
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
124
+ }: BadgeBaseProps): react_jsx_runtime23.JSX.Element;
126
125
  displayName: string;
127
126
  };
128
127
  /** Green pill — recently launched feature */
@@ -130,7 +129,7 @@ declare const NewBadge: {
130
129
  ({
131
130
  className,
132
131
  ...props
133
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
132
+ }: BadgeBaseProps): react_jsx_runtime23.JSX.Element;
134
133
  displayName: string;
135
134
  };
136
135
  /** Amber pill — feature being phased out */
@@ -138,7 +137,7 @@ declare const DeprecatedBadge: {
138
137
  ({
139
138
  className,
140
139
  ...props
141
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
140
+ }: BadgeBaseProps): react_jsx_runtime23.JSX.Element;
142
141
  displayName: string;
143
142
  };
144
143
  /** Blue pill — user is in a trial period (same blue family as Beta) */
@@ -146,15 +145,18 @@ declare const TrialBadge: {
146
145
  ({
147
146
  className,
148
147
  ...props
149
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
148
+ }: BadgeBaseProps): react_jsx_runtime23.JSX.Element;
150
149
  displayName: string;
151
150
  };
152
- /** Green pill — Professional tier (no gradient; uses default Badge variant) */
151
+ /** Charcoal pill — Professional tier (no gradient; solid secondary Badge) */
153
152
  declare function ProfessionalBadge({
154
153
  className,
155
154
  ...props
156
- }: BadgeBaseProps): react_jsx_runtime27.JSX.Element;
157
- type RoleBadgeRole = 'agent' | 'supervisor' | 'admin' | 'owner';
155
+ }: BadgeBaseProps): react_jsx_runtime23.JSX.Element;
156
+ declare const roleBadgeVariants: (props?: ({
157
+ role?: "agent" | "supervisor" | "admin" | "owner" | null | undefined;
158
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
159
+ type RoleBadgeRole = NonNullable<VariantProps<typeof roleBadgeVariants>['role']>;
158
160
  type RoleBadgeProps = BadgeBaseProps & {
159
161
  /** The user's role within Aircall. */role: RoleBadgeRole;
160
162
  };
@@ -162,44 +164,7 @@ declare function RoleBadge({
162
164
  role,
163
165
  className,
164
166
  ...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>>;
167
+ }: RoleBadgeProps): react_jsx_runtime23.JSX.Element;
203
168
  //#endregion
204
169
  //#region src/hooks/use-copy-to-clipboard.d.ts
205
170
  interface UseCopyToClipboardOptions {
@@ -296,7 +261,7 @@ type DashboardSidebarNavProps = {
296
261
  declare function DashboardSidebarNav({
297
262
  groups,
298
263
  renderLink
299
- }: DashboardSidebarNavProps): react_jsx_runtime27.JSX.Element;
264
+ }: DashboardSidebarNavProps): react_jsx_runtime23.JSX.Element;
300
265
  //#endregion
301
266
  //#region src/components/dashboard-sidebar.d.ts
302
267
  type DashboardSidebarProviderProps = React.ComponentProps<typeof SidebarProvider>;
@@ -304,34 +269,34 @@ declare function DashboardSidebarProvider({
304
269
  className,
305
270
  style,
306
271
  ...props
307
- }: DashboardSidebarProviderProps): react_jsx_runtime27.JSX.Element;
272
+ }: DashboardSidebarProviderProps): react_jsx_runtime23.JSX.Element;
308
273
  declare function DashboardSidebar({
309
274
  className,
310
275
  children,
311
276
  ...props
312
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
277
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
313
278
  declare function DashboardSidebarHeader({
314
279
  className,
315
280
  children,
316
281
  ...props
317
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
282
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
318
283
  declare function DashboardSidebarTrigger({
319
284
  className,
320
285
  onClick,
321
286
  ...props
322
- }: React.ComponentProps<typeof Button>): react_jsx_runtime27.JSX.Element;
287
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime23.JSX.Element;
323
288
  declare function DashboardSidebarContent({
324
289
  className,
325
290
  ...props
326
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
291
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
327
292
  declare function DashboardSidebarFooter({
328
293
  className,
329
294
  ...props
330
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
295
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
331
296
  declare function DashboardSidebarGroup({
332
297
  className,
333
298
  ...props
334
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
299
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
335
300
  declare function DashboardSidebarGroupLabel({
336
301
  className,
337
302
  render,
@@ -340,11 +305,11 @@ declare function DashboardSidebarGroupLabel({
340
305
  declare function DashboardSidebarMenu({
341
306
  className,
342
307
  ...props
343
- }: React.ComponentProps<'ul'>): react_jsx_runtime27.JSX.Element;
308
+ }: React.ComponentProps<'ul'>): react_jsx_runtime23.JSX.Element;
344
309
  declare function DashboardSidebarMenuItem({
345
310
  className,
346
311
  ...props
347
- }: React.ComponentProps<'li'>): react_jsx_runtime27.JSX.Element;
312
+ }: React.ComponentProps<'li'>): react_jsx_runtime23.JSX.Element;
348
313
  type DashboardSidebarMenuButtonProps = useRender.ComponentProps<'button'> & React.ComponentProps<'button'> & {
349
314
  isActive?: boolean;
350
315
  /** Visual-only disabled state. The button remains clickable (e.g. to show an
@@ -367,11 +332,11 @@ declare const DashboardSidebarMenuButton: React.ForwardRefExoticComponent<Omit<D
367
332
  declare function DashboardSidebarMenuBadge({
368
333
  className,
369
334
  ...props
370
- }: React.ComponentProps<typeof CounterBadge>): react_jsx_runtime27.JSX.Element;
335
+ }: React.ComponentProps<typeof CounterBadge>): react_jsx_runtime23.JSX.Element;
371
336
  declare function DashboardSidebarSubmenu({
372
337
  className,
373
338
  ...props
374
- }: React.ComponentProps<'div'>): react_jsx_runtime27.JSX.Element;
339
+ }: React.ComponentProps<'div'>): react_jsx_runtime23.JSX.Element;
375
340
  type DashboardSidebarSubmenuItemProps = useRender.ComponentProps<'div'> & React.ComponentProps<'div'> & {
376
341
  isActive?: boolean;
377
342
  };
@@ -385,6 +350,6 @@ declare function DashboardSidebarSubmenuSeparator({
385
350
  className
386
351
  }: {
387
352
  className?: string;
388
- }): react_jsx_runtime27.JSX.Element;
353
+ }): react_jsx_runtime23.JSX.Element;
389
354
  //#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 };
355
+ 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, DeprecatedBadge, NewBadge, ProfessionalBadge, RoleBadge, type RoleBadgeRole, TrialBadge, useCopyToClipboard, useSidebar as useDashboardSidebar };