beez-ui 0.10.0 → 2.0.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/README.md +63 -16
  3. package/THIRD_PARTY_NOTICES.md +31 -0
  4. package/assets/fonts/ibmplexmono-LICENSE.txt +93 -93
  5. package/assets/fonts/{poppins-LICENSE.txt → inter-LICENSE.txt} +2 -2
  6. package/assets/fonts/inter-latin-variable.woff2 +0 -0
  7. package/dist/components/account-menu.d.ts +5 -2
  8. package/dist/components/account-menu.js +150 -145
  9. package/dist/components/alert-dialog.d.ts +4 -2
  10. package/dist/components/alert-dialog.js +78 -66
  11. package/dist/components/animated-collapse.js +106 -36
  12. package/dist/components/button-interaction.d.ts +23 -0
  13. package/dist/components/button-interaction.js +22 -0
  14. package/dist/components/button-label.d.ts +8 -0
  15. package/dist/components/button-label.js +322 -0
  16. package/dist/components/button.d.ts +23 -10
  17. package/dist/components/button.js +111 -64
  18. package/dist/components/calendar.d.ts +2 -2
  19. package/dist/components/calendar.js +4 -4
  20. package/dist/components/carousel.d.ts +3 -3
  21. package/dist/components/carousel.js +3 -3
  22. package/dist/components/control-button.d.ts +16 -0
  23. package/dist/components/control-button.js +215 -0
  24. package/dist/components/data-table.js +7 -7
  25. package/dist/components/dialog.js +3 -2
  26. package/dist/components/dropdown-menu.js +1 -1
  27. package/dist/components/file-upload.js +5 -5
  28. package/dist/components/filter-presets-bar.js +6 -6
  29. package/dist/components/filter-query-bar.js +2 -2
  30. package/dist/components/input-group.d.ts +2 -2
  31. package/dist/components/input-group.js +2 -2
  32. package/dist/components/pagination.d.ts +2 -2
  33. package/dist/components/pagination.js +2 -2
  34. package/dist/components/reaction-button.js +2 -2
  35. package/dist/components/rich-link-editor.js +7 -7
  36. package/dist/components/rich-text-content.js +1 -1
  37. package/dist/components/sheet.js +2 -2
  38. package/dist/components/sidebar-panel-context.d.ts +17 -0
  39. package/dist/components/sidebar-panel-context.js +14 -0
  40. package/dist/components/sidebar.d.ts +40 -3
  41. package/dist/components/sidebar.js +259 -103
  42. package/dist/components/typing-animation.js +1 -1
  43. package/dist/constants/button.d.ts +16 -0
  44. package/dist/constants/button.js +16 -0
  45. package/dist/hooks/use-sidebar-persistence.d.ts +1 -1
  46. package/dist/hooks/use-sidebar-persistence.js +2 -2
  47. package/dist/motion/arc-press.d.ts +6 -0
  48. package/dist/motion/arc-press.js +59 -0
  49. package/dist/motion/arc-tokens.d.ts +32 -0
  50. package/dist/motion/arc-tokens.js +42 -0
  51. package/dist/providers/beez-ui-provider.d.ts +1 -1
  52. package/dist/providers/beez-ui-provider.js +6 -1
  53. package/dist/styles.css +1 -1
  54. package/fonts.css +5 -5
  55. package/package.json +3 -2
  56. package/styles.css +4 -4
  57. package/theme.css +248 -87
  58. package/assets/fonts/poppins-latin-600.woff2 +0 -0
@@ -6,6 +6,7 @@ import { getNameInitials } from "../lib/name-initials.js";
6
6
  import { Avatar, AvatarBadge, AvatarFallback, AvatarImage } from "./avatar.js";
7
7
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "./dropdown-menu.js";
8
8
  import { Link } from "./link.js";
9
+ import { useOptionalSidebarPanel } from "./sidebar-panel-context.js";
9
10
  import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
10
11
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
12
  const ACCOUNT_MENU_DEFAULT_LABELS = {
@@ -105,7 +106,7 @@ function AccountAvatar(t0) {
105
106
  * @returns The trigger and its menu.
106
107
  */
107
108
  export function AccountMenu(t0) {
108
- const $ = _c(79);
109
+ const $ = _c(80);
109
110
  const { name, email, status, image: t1, avatarFallback, onSignOut, signOutDisabled: t2, onSignIn, signInHref, triggerVariant: t3, showStatusBadge: t4, tooltipLabel, labels, classNames, align: t5, side: t6, sideOffset: t7, children } = t0;
110
111
  const image = t1 === undefined ? null : t1;
111
112
  const signOutDisabled = t2 === undefined ? false : t2;
@@ -158,37 +159,41 @@ export function AccountMenu(t0) {
158
159
  t10 = $[11];
159
160
  }
160
161
  const avatarProps = t10;
162
+ const sidebarPanel = useOptionalSidebarPanel();
163
+ const showsSidebarIdentity = triggerVariant === "sidebar" && !sidebarPanel?.collapsed;
161
164
  const t11 = resolvedLabels.trigger;
162
165
  const t12 = triggerVariant === "sidebar" && "w-full min-w-0 gap-2.5 rounded-lg p-1.5 text-left";
163
- const t13 = classNames?.trigger;
164
- let t14;
165
- if ($[12] !== t12 || $[13] !== t13) {
166
- t14 = cn("inline-flex items-center rounded-full outline-none [-webkit-tap-highlight-color:transparent] transition-[box-shadow,opacity,transform] hover:opacity-90 active:scale-[0.96] focus-visible:shadow-[0_0_0_2px_var(--background),0_0_0_4px_var(--ring)] data-[state=open]:shadow-[0_0_0_2px_var(--background),0_0_0_4px_var(--ring)]", t12, t13);
166
+ const t13 = triggerVariant === "sidebar" && !showsSidebarIdentity && "justify-center gap-0";
167
+ const t14 = classNames?.trigger;
168
+ let t15;
169
+ if ($[12] !== t12 || $[13] !== t13 || $[14] !== t14) {
170
+ t15 = cn("inline-flex items-center rounded-full outline-none [-webkit-tap-highlight-color:transparent] transition-[box-shadow,opacity,transform] hover:opacity-90 active:scale-[0.96] focus-visible:shadow-[0_0_0_2px_var(--background),0_0_0_4px_var(--ring)] data-[state=open]:shadow-[0_0_0_2px_var(--background),0_0_0_4px_var(--ring)]", t12, t13, t14);
167
171
  $[12] = t12;
168
172
  $[13] = t13;
169
173
  $[14] = t14;
174
+ $[15] = t15;
170
175
  } else {
171
- t14 = $[14];
176
+ t15 = $[15];
172
177
  }
173
- const t15 = classNames?.triggerAvatar;
174
- let t16;
175
- if ($[15] !== avatarProps || $[16] !== t15) {
176
- t16 = /* @__PURE__ */ _jsx(AccountAvatar, {
178
+ const t16 = classNames?.triggerAvatar;
179
+ let t17;
180
+ if ($[16] !== avatarProps || $[17] !== t16) {
181
+ t17 = /* @__PURE__ */ _jsx(AccountAvatar, {
177
182
  ...avatarProps,
178
- className: t15
183
+ className: t16
179
184
  });
180
- $[15] = avatarProps;
181
- $[16] = t15;
185
+ $[16] = avatarProps;
182
186
  $[17] = t16;
187
+ $[18] = t17;
183
188
  } else {
184
- t16 = $[17];
189
+ t17 = $[18];
185
190
  }
186
- let t17;
187
- if ($[18] !== classNames?.triggerChevron || $[19] !== classNames?.triggerEmail || $[20] !== classNames?.triggerName || $[21] !== classNames?.triggerText || $[22] !== email || $[23] !== name || $[24] !== triggerVariant) {
188
- t17 = triggerVariant === "sidebar" ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsxs("span", {
191
+ let t18;
192
+ if ($[19] !== classNames?.triggerChevron || $[20] !== classNames?.triggerEmail || $[21] !== classNames?.triggerName || $[22] !== classNames?.triggerText || $[23] !== email || $[24] !== name || $[25] !== showsSidebarIdentity) {
193
+ t18 = showsSidebarIdentity ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsxs("span", {
189
194
  className: cn("grid min-w-0 flex-1", classNames?.triggerText),
190
195
  children: [/* @__PURE__ */ _jsx("span", {
191
- className: cn("truncate text-sm font-semibold", classNames?.triggerName),
196
+ className: cn("truncate text-sm font-medium", classNames?.triggerName),
192
197
  children: name
193
198
  }), /* @__PURE__ */ _jsx("span", {
194
199
  className: cn("truncate text-xs text-muted-foreground", classNames?.triggerEmail),
@@ -198,142 +203,142 @@ export function AccountMenu(t0) {
198
203
  "aria-hidden": "true",
199
204
  className: cn("size-4 shrink-0 text-muted-foreground", classNames?.triggerChevron)
200
205
  })] }) : null;
201
- $[18] = classNames?.triggerChevron;
202
- $[19] = classNames?.triggerEmail;
203
- $[20] = classNames?.triggerName;
204
- $[21] = classNames?.triggerText;
205
- $[22] = email;
206
- $[23] = name;
207
- $[24] = triggerVariant;
208
- $[25] = t17;
206
+ $[19] = classNames?.triggerChevron;
207
+ $[20] = classNames?.triggerEmail;
208
+ $[21] = classNames?.triggerName;
209
+ $[22] = classNames?.triggerText;
210
+ $[23] = email;
211
+ $[24] = name;
212
+ $[25] = showsSidebarIdentity;
213
+ $[26] = t18;
209
214
  } else {
210
- t17 = $[25];
215
+ t18 = $[26];
211
216
  }
212
- let t18;
213
- if ($[26] !== resolvedLabels.trigger || $[27] !== t14 || $[28] !== t16 || $[29] !== t17 || $[30] !== triggerVariant) {
217
+ let t19;
218
+ if ($[27] !== resolvedLabels.trigger || $[28] !== t15 || $[29] !== t17 || $[30] !== t18 || $[31] !== triggerVariant) {
214
219
  const triggerButton = /* @__PURE__ */ _jsxs("button", {
215
220
  "data-slot": "account-menu-trigger",
216
221
  "data-variant": triggerVariant,
217
222
  "aria-label": t11,
218
223
  type: "button",
219
- className: t14,
220
- children: [t16, t17]
224
+ className: t15,
225
+ children: [t17, t18]
221
226
  });
222
- t18 = /* @__PURE__ */ _jsx(DropdownMenuTrigger, {
227
+ t19 = /* @__PURE__ */ _jsx(DropdownMenuTrigger, {
223
228
  asChild: true,
224
229
  children: triggerButton
225
230
  });
226
- $[26] = resolvedLabels.trigger;
227
- $[27] = t14;
228
- $[28] = t16;
231
+ $[27] = resolvedLabels.trigger;
232
+ $[28] = t15;
229
233
  $[29] = t17;
230
- $[30] = triggerVariant;
231
- $[31] = t18;
234
+ $[30] = t18;
235
+ $[31] = triggerVariant;
236
+ $[32] = t19;
232
237
  } else {
233
- t18 = $[31];
238
+ t19 = $[32];
234
239
  }
235
- const trigger = t18;
236
- let t19;
237
- if ($[32] !== tooltipLabel || $[33] !== trigger) {
238
- t19 = tooltipLabel ? /* @__PURE__ */ _jsx(TooltipTrigger, {
240
+ const trigger = t19;
241
+ let t20;
242
+ if ($[33] !== tooltipLabel || $[34] !== trigger) {
243
+ t20 = tooltipLabel ? /* @__PURE__ */ _jsx(TooltipTrigger, {
239
244
  asChild: true,
240
245
  children: trigger
241
246
  }) : trigger;
242
- $[32] = tooltipLabel;
243
- $[33] = trigger;
244
- $[34] = t19;
247
+ $[33] = tooltipLabel;
248
+ $[34] = trigger;
249
+ $[35] = t20;
245
250
  } else {
246
- t19 = $[34];
251
+ t20 = $[35];
247
252
  }
248
- const t20 = classNames?.content;
249
- let t21;
250
- if ($[35] !== t20) {
251
- t21 = cn("min-w-56", t20);
252
- $[35] = t20;
253
+ const t21 = classNames?.content;
254
+ let t22;
255
+ if ($[36] !== t21) {
256
+ t22 = cn("min-w-56", t21);
253
257
  $[36] = t21;
258
+ $[37] = t22;
254
259
  } else {
255
- t21 = $[36];
260
+ t22 = $[37];
256
261
  }
257
- const t22 = classNames?.header;
258
- let t23;
259
- if ($[37] !== t22) {
260
- t23 = cn("grid grid-cols-[auto_minmax(0,1fr)] items-center gap-2.5 px-2 py-1.5", t22);
261
- $[37] = t22;
262
+ const t23 = classNames?.header;
263
+ let t24;
264
+ if ($[38] !== t23) {
265
+ t24 = cn("grid grid-cols-[auto_minmax(0,1fr)] items-center gap-2.5 px-2 py-1.5", t23);
262
266
  $[38] = t23;
267
+ $[39] = t24;
263
268
  } else {
264
- t23 = $[38];
269
+ t24 = $[39];
265
270
  }
266
- const t24 = classNames?.headerAvatar;
267
- let t25;
268
- if ($[39] !== avatarProps || $[40] !== t24) {
269
- t25 = /* @__PURE__ */ _jsx(AccountAvatar, {
271
+ const t25 = classNames?.headerAvatar;
272
+ let t26;
273
+ if ($[40] !== avatarProps || $[41] !== t25) {
274
+ t26 = /* @__PURE__ */ _jsx(AccountAvatar, {
270
275
  ...avatarProps,
271
276
  isDecorative: true,
272
- className: t24
277
+ className: t25
273
278
  });
274
- $[39] = avatarProps;
275
- $[40] = t24;
279
+ $[40] = avatarProps;
276
280
  $[41] = t25;
281
+ $[42] = t26;
277
282
  } else {
278
- t25 = $[41];
283
+ t26 = $[42];
279
284
  }
280
- let t26;
281
- if ($[42] !== name) {
282
- t26 = /* @__PURE__ */ _jsx("span", {
283
- className: "truncate text-sm leading-tight font-semibold",
285
+ let t27;
286
+ if ($[43] !== name) {
287
+ t27 = /* @__PURE__ */ _jsx("span", {
288
+ className: "truncate text-sm leading-tight font-medium",
284
289
  children: name
285
290
  });
286
- $[42] = name;
287
- $[43] = t26;
291
+ $[43] = name;
292
+ $[44] = t27;
288
293
  } else {
289
- t26 = $[43];
294
+ t27 = $[44];
290
295
  }
291
- let t27;
292
- if ($[44] !== email) {
293
- t27 = /* @__PURE__ */ _jsx("span", {
296
+ let t28;
297
+ if ($[45] !== email) {
298
+ t28 = /* @__PURE__ */ _jsx("span", {
294
299
  className: "truncate text-xs leading-tight text-muted-foreground",
295
300
  children: email
296
301
  });
297
- $[44] = email;
298
- $[45] = t27;
302
+ $[45] = email;
303
+ $[46] = t28;
299
304
  } else {
300
- t27 = $[45];
305
+ t28 = $[46];
301
306
  }
302
- let t28;
303
- if ($[46] !== t26 || $[47] !== t27) {
304
- t28 = /* @__PURE__ */ _jsxs("span", {
307
+ let t29;
308
+ if ($[47] !== t27 || $[48] !== t28) {
309
+ t29 = /* @__PURE__ */ _jsxs("span", {
305
310
  className: "grid min-w-0 gap-px",
306
- children: [t26, t27]
311
+ children: [t27, t28]
307
312
  });
308
- $[46] = t26;
309
313
  $[47] = t27;
310
314
  $[48] = t28;
315
+ $[49] = t29;
311
316
  } else {
312
- t28 = $[48];
317
+ t29 = $[49];
313
318
  }
314
- let t29;
315
- if ($[49] !== t23 || $[50] !== t25 || $[51] !== t28) {
316
- t29 = /* @__PURE__ */ _jsxs("div", {
317
- className: t23,
318
- children: [t25, t28]
319
+ let t30;
320
+ if ($[50] !== t24 || $[51] !== t26 || $[52] !== t29) {
321
+ t30 = /* @__PURE__ */ _jsxs("div", {
322
+ className: t24,
323
+ children: [t26, t29]
319
324
  });
320
- $[49] = t23;
321
- $[50] = t25;
322
- $[51] = t28;
325
+ $[50] = t24;
326
+ $[51] = t26;
323
327
  $[52] = t29;
324
- } else {
325
- t29 = $[52];
326
- }
327
- let t30;
328
- if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
329
- t30 = /* @__PURE__ */ _jsx(DropdownMenuSeparator, {});
330
328
  $[53] = t30;
331
329
  } else {
332
330
  t30 = $[53];
333
331
  }
334
332
  let t31;
335
- if ($[54] !== classNames?.item || $[55] !== isAuthenticated || $[56] !== onSignIn || $[57] !== onSignOut || $[58] !== resolvedLabels.signIn || $[59] !== resolvedLabels.signOut || $[60] !== signInHref || $[61] !== signOutDisabled) {
336
- t31 = isAuthenticated ? /* @__PURE__ */ _jsxs(DropdownMenuItem, {
333
+ if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
334
+ t31 = /* @__PURE__ */ _jsx(DropdownMenuSeparator, {});
335
+ $[54] = t31;
336
+ } else {
337
+ t31 = $[54];
338
+ }
339
+ let t32;
340
+ if ($[55] !== classNames?.item || $[56] !== isAuthenticated || $[57] !== onSignIn || $[58] !== onSignOut || $[59] !== resolvedLabels.signIn || $[60] !== resolvedLabels.signOut || $[61] !== signInHref || $[62] !== signOutDisabled) {
341
+ t32 = isAuthenticated ? /* @__PURE__ */ _jsxs(DropdownMenuItem, {
337
342
  className: classNames?.item,
338
343
  disabled: signOutDisabled,
339
344
  onSelect: () => void onSignOut(),
@@ -350,77 +355,77 @@ export function AccountMenu(t0) {
350
355
  onSelect: () => onSignIn?.(),
351
356
  children: [/* @__PURE__ */ _jsx(LogInIcon, { "aria-hidden": "true" }), resolvedLabels.signIn]
352
357
  });
353
- $[54] = classNames?.item;
354
- $[55] = isAuthenticated;
355
- $[56] = onSignIn;
356
- $[57] = onSignOut;
357
- $[58] = resolvedLabels.signIn;
358
- $[59] = resolvedLabels.signOut;
359
- $[60] = signInHref;
360
- $[61] = signOutDisabled;
361
- $[62] = t31;
358
+ $[55] = classNames?.item;
359
+ $[56] = isAuthenticated;
360
+ $[57] = onSignIn;
361
+ $[58] = onSignOut;
362
+ $[59] = resolvedLabels.signIn;
363
+ $[60] = resolvedLabels.signOut;
364
+ $[61] = signInHref;
365
+ $[62] = signOutDisabled;
366
+ $[63] = t32;
362
367
  } else {
363
- t31 = $[62];
368
+ t32 = $[63];
364
369
  }
365
- let t32;
366
- if ($[63] !== align || $[64] !== children || $[65] !== side || $[66] !== sideOffset || $[67] !== t21 || $[68] !== t29 || $[69] !== t31) {
367
- t32 = /* @__PURE__ */ _jsxs(DropdownMenuContent, {
370
+ let t33;
371
+ if ($[64] !== align || $[65] !== children || $[66] !== side || $[67] !== sideOffset || $[68] !== t22 || $[69] !== t30 || $[70] !== t32) {
372
+ t33 = /* @__PURE__ */ _jsxs(DropdownMenuContent, {
368
373
  "data-slot": "account-menu-content",
369
374
  align,
370
375
  side,
371
376
  sideOffset,
372
- className: t21,
377
+ className: t22,
373
378
  children: [
374
- t29,
375
379
  t30,
380
+ t31,
376
381
  children,
377
- t31
382
+ t32
378
383
  ]
379
384
  });
380
- $[63] = align;
381
- $[64] = children;
382
- $[65] = side;
383
- $[66] = sideOffset;
384
- $[67] = t21;
385
- $[68] = t29;
386
- $[69] = t31;
385
+ $[64] = align;
386
+ $[65] = children;
387
+ $[66] = side;
388
+ $[67] = sideOffset;
389
+ $[68] = t22;
390
+ $[69] = t30;
387
391
  $[70] = t32;
392
+ $[71] = t33;
388
393
  } else {
389
- t32 = $[70];
394
+ t33 = $[71];
390
395
  }
391
- let t33;
392
- if ($[71] !== t19 || $[72] !== t32) {
393
- t33 = /* @__PURE__ */ _jsxs(DropdownMenu, { children: [t19, t32] });
394
- $[71] = t19;
395
- $[72] = t32;
396
+ let t34;
397
+ if ($[72] !== t20 || $[73] !== t33) {
398
+ t34 = /* @__PURE__ */ _jsxs(DropdownMenu, { children: [t20, t33] });
399
+ $[72] = t20;
396
400
  $[73] = t33;
401
+ $[74] = t34;
397
402
  } else {
398
- t33 = $[73];
403
+ t34 = $[74];
399
404
  }
400
- const menu = t33;
405
+ const menu = t34;
401
406
  if (!tooltipLabel) {
402
407
  return menu;
403
408
  }
404
- let t34;
405
- if ($[74] !== tooltipLabel) {
406
- t34 = /* @__PURE__ */ _jsx(TooltipContent, {
409
+ let t35;
410
+ if ($[75] !== tooltipLabel) {
411
+ t35 = /* @__PURE__ */ _jsx(TooltipContent, {
407
412
  side: "bottom",
408
413
  sideOffset: 8,
409
414
  children: tooltipLabel
410
415
  });
411
- $[74] = tooltipLabel;
412
- $[75] = t34;
416
+ $[75] = tooltipLabel;
417
+ $[76] = t35;
413
418
  } else {
414
- t34 = $[75];
419
+ t35 = $[76];
415
420
  }
416
- let t35;
417
- if ($[76] !== menu || $[77] !== t34) {
418
- t35 = /* @__PURE__ */ _jsxs(Tooltip, { children: [menu, t34] });
419
- $[76] = menu;
420
- $[77] = t34;
421
+ let t36;
422
+ if ($[77] !== menu || $[78] !== t35) {
423
+ t36 = /* @__PURE__ */ _jsxs(Tooltip, { children: [menu, t35] });
424
+ $[77] = menu;
421
425
  $[78] = t35;
426
+ $[79] = t36;
422
427
  } else {
423
- t35 = $[78];
428
+ t36 = $[79];
424
429
  }
425
- return t35;
430
+ return t36;
426
431
  }
@@ -38,6 +38,8 @@ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<
38
38
  */
39
39
  declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
40
40
  declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
41
- declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
42
- declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
41
+ /** Confirms the dialog with an Arc `Button`; Radix merges its behavior onto the button through `asChild`. */
42
+ declare function AlertDialogAction({ className, variant, size, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
43
+ /** Dismisses the dialog with an Arc secondary `Button` by default. */
44
+ declare function AlertDialogCancel({ className, variant, size, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
43
45
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
@@ -408,121 +408,133 @@ function AlertDialogDescription(t0) {
408
408
  }
409
409
  return t2;
410
410
  }
411
+ /** Confirms the dialog with an Arc `Button`; Radix merges its behavior onto the button through `asChild`. */
411
412
  function AlertDialogAction(t0) {
412
- const $ = _c(14);
413
+ const $ = _c(16);
414
+ let children;
413
415
  let className;
414
416
  let props;
415
417
  let t1;
416
418
  let t2;
417
419
  if ($[0] !== t0) {
418
- ({className, variant: t1, size: t2, ...props} = t0);
420
+ ({className, variant: t1, size: t2, children, ...props} = t0);
419
421
  $[0] = t0;
420
- $[1] = className;
421
- $[2] = props;
422
- $[3] = t1;
423
- $[4] = t2;
422
+ $[1] = children;
423
+ $[2] = className;
424
+ $[3] = props;
425
+ $[4] = t1;
426
+ $[5] = t2;
424
427
  } else {
425
- className = $[1];
426
- props = $[2];
427
- t1 = $[3];
428
- t2 = $[4];
428
+ children = $[1];
429
+ className = $[2];
430
+ props = $[3];
431
+ t1 = $[4];
432
+ t2 = $[5];
429
433
  }
430
- const variant = t1 === undefined ? "default" : t1;
431
- const size = t2 === undefined ? "default" : t2;
434
+ const variant = t1 === undefined ? "primary" : t1;
435
+ const size = t2 === undefined ? "md" : t2;
432
436
  let t3;
433
- if ($[5] !== className) {
437
+ if ($[6] !== className) {
434
438
  t3 = cn(className);
435
- $[5] = className;
436
- $[6] = t3;
439
+ $[6] = className;
440
+ $[7] = t3;
437
441
  } else {
438
- t3 = $[6];
442
+ t3 = $[7];
439
443
  }
440
444
  let t4;
441
- if ($[7] !== props || $[8] !== t3) {
442
- t4 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Action, {
443
- "data-slot": "alert-dialog-action",
445
+ if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
446
+ t4 = /* @__PURE__ */ _jsx(Button, {
447
+ variant,
448
+ size,
444
449
  className: t3,
445
- ...props
450
+ children
446
451
  });
447
- $[7] = props;
448
- $[8] = t3;
449
- $[9] = t4;
452
+ $[8] = children;
453
+ $[9] = size;
454
+ $[10] = t3;
455
+ $[11] = variant;
456
+ $[12] = t4;
450
457
  } else {
451
- t4 = $[9];
458
+ t4 = $[12];
452
459
  }
453
460
  let t5;
454
- if ($[10] !== size || $[11] !== t4 || $[12] !== variant) {
455
- t5 = /* @__PURE__ */ _jsx(Button, {
456
- variant,
457
- size,
461
+ if ($[13] !== props || $[14] !== t4) {
462
+ t5 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Action, {
463
+ "data-slot": "alert-dialog-action",
458
464
  asChild: true,
465
+ ...props,
459
466
  children: t4
460
467
  });
461
- $[10] = size;
462
- $[11] = t4;
463
- $[12] = variant;
464
- $[13] = t5;
468
+ $[13] = props;
469
+ $[14] = t4;
470
+ $[15] = t5;
465
471
  } else {
466
- t5 = $[13];
472
+ t5 = $[15];
467
473
  }
468
474
  return t5;
469
475
  }
476
+ /** Dismisses the dialog with an Arc secondary `Button` by default. */
470
477
  function AlertDialogCancel(t0) {
471
- const $ = _c(14);
478
+ const $ = _c(16);
479
+ let children;
472
480
  let className;
473
481
  let props;
474
482
  let t1;
475
483
  let t2;
476
484
  if ($[0] !== t0) {
477
- ({className, variant: t1, size: t2, ...props} = t0);
485
+ ({className, variant: t1, size: t2, children, ...props} = t0);
478
486
  $[0] = t0;
479
- $[1] = className;
480
- $[2] = props;
481
- $[3] = t1;
482
- $[4] = t2;
487
+ $[1] = children;
488
+ $[2] = className;
489
+ $[3] = props;
490
+ $[4] = t1;
491
+ $[5] = t2;
483
492
  } else {
484
- className = $[1];
485
- props = $[2];
486
- t1 = $[3];
487
- t2 = $[4];
493
+ children = $[1];
494
+ className = $[2];
495
+ props = $[3];
496
+ t1 = $[4];
497
+ t2 = $[5];
488
498
  }
489
- const variant = t1 === undefined ? "outline" : t1;
490
- const size = t2 === undefined ? "default" : t2;
499
+ const variant = t1 === undefined ? "secondary" : t1;
500
+ const size = t2 === undefined ? "md" : t2;
491
501
  let t3;
492
- if ($[5] !== className) {
502
+ if ($[6] !== className) {
493
503
  t3 = cn(className);
494
- $[5] = className;
495
- $[6] = t3;
504
+ $[6] = className;
505
+ $[7] = t3;
496
506
  } else {
497
- t3 = $[6];
507
+ t3 = $[7];
498
508
  }
499
509
  let t4;
500
- if ($[7] !== props || $[8] !== t3) {
501
- t4 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Cancel, {
502
- "data-slot": "alert-dialog-cancel",
510
+ if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
511
+ t4 = /* @__PURE__ */ _jsx(Button, {
512
+ variant,
513
+ size,
503
514
  className: t3,
504
- ...props
515
+ children
505
516
  });
506
- $[7] = props;
507
- $[8] = t3;
508
- $[9] = t4;
517
+ $[8] = children;
518
+ $[9] = size;
519
+ $[10] = t3;
520
+ $[11] = variant;
521
+ $[12] = t4;
509
522
  } else {
510
- t4 = $[9];
523
+ t4 = $[12];
511
524
  }
512
525
  let t5;
513
- if ($[10] !== size || $[11] !== t4 || $[12] !== variant) {
514
- t5 = /* @__PURE__ */ _jsx(Button, {
515
- variant,
516
- size,
526
+ if ($[13] !== props || $[14] !== t4) {
527
+ t5 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Cancel, {
528
+ "data-slot": "alert-dialog-cancel",
517
529
  asChild: true,
530
+ ...props,
518
531
  children: t4
519
532
  });
520
- $[10] = size;
521
- $[11] = t4;
522
- $[12] = variant;
523
- $[13] = t5;
533
+ $[13] = props;
534
+ $[14] = t4;
535
+ $[15] = t5;
524
536
  } else {
525
- t5 = $[13];
537
+ t5 = $[15];
526
538
  }
527
539
  return t5;
528
540
  }