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.
- package/CHANGELOG.md +40 -1
- package/README.md +63 -16
- package/THIRD_PARTY_NOTICES.md +31 -0
- package/assets/fonts/ibmplexmono-LICENSE.txt +93 -93
- package/assets/fonts/{poppins-LICENSE.txt → inter-LICENSE.txt} +2 -2
- package/assets/fonts/inter-latin-variable.woff2 +0 -0
- package/dist/components/account-menu.d.ts +5 -2
- package/dist/components/account-menu.js +150 -145
- package/dist/components/alert-dialog.d.ts +4 -2
- package/dist/components/alert-dialog.js +78 -66
- package/dist/components/animated-collapse.js +106 -36
- package/dist/components/button-interaction.d.ts +23 -0
- package/dist/components/button-interaction.js +22 -0
- package/dist/components/button-label.d.ts +8 -0
- package/dist/components/button-label.js +322 -0
- package/dist/components/button.d.ts +23 -10
- package/dist/components/button.js +111 -64
- package/dist/components/calendar.d.ts +2 -2
- package/dist/components/calendar.js +4 -4
- package/dist/components/carousel.d.ts +3 -3
- package/dist/components/carousel.js +3 -3
- package/dist/components/control-button.d.ts +16 -0
- package/dist/components/control-button.js +215 -0
- package/dist/components/data-table.js +7 -7
- package/dist/components/dialog.js +3 -2
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/file-upload.js +5 -5
- package/dist/components/filter-presets-bar.js +6 -6
- package/dist/components/filter-query-bar.js +2 -2
- package/dist/components/input-group.d.ts +2 -2
- package/dist/components/input-group.js +2 -2
- package/dist/components/pagination.d.ts +2 -2
- package/dist/components/pagination.js +2 -2
- package/dist/components/reaction-button.js +2 -2
- package/dist/components/rich-link-editor.js +7 -7
- package/dist/components/rich-text-content.js +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sidebar-panel-context.d.ts +17 -0
- package/dist/components/sidebar-panel-context.js +14 -0
- package/dist/components/sidebar.d.ts +40 -3
- package/dist/components/sidebar.js +259 -103
- package/dist/components/typing-animation.js +1 -1
- package/dist/constants/button.d.ts +16 -0
- package/dist/constants/button.js +16 -0
- package/dist/hooks/use-sidebar-persistence.d.ts +1 -1
- package/dist/hooks/use-sidebar-persistence.js +2 -2
- package/dist/motion/arc-press.d.ts +6 -0
- package/dist/motion/arc-press.js +59 -0
- package/dist/motion/arc-tokens.d.ts +32 -0
- package/dist/motion/arc-tokens.js +42 -0
- package/dist/providers/beez-ui-provider.d.ts +1 -1
- package/dist/providers/beez-ui-provider.js +6 -1
- package/dist/styles.css +1 -1
- package/fonts.css +5 -5
- package/package.json +3 -2
- package/styles.css +4 -4
- package/theme.css +248 -87
- 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(
|
|
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 =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
176
|
+
t15 = $[15];
|
|
172
177
|
}
|
|
173
|
-
const
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
178
|
+
const t16 = classNames?.triggerAvatar;
|
|
179
|
+
let t17;
|
|
180
|
+
if ($[16] !== avatarProps || $[17] !== t16) {
|
|
181
|
+
t17 = /* @__PURE__ */ _jsx(AccountAvatar, {
|
|
177
182
|
...avatarProps,
|
|
178
|
-
className:
|
|
183
|
+
className: t16
|
|
179
184
|
});
|
|
180
|
-
$[
|
|
181
|
-
$[16] = t15;
|
|
185
|
+
$[16] = avatarProps;
|
|
182
186
|
$[17] = t16;
|
|
187
|
+
$[18] = t17;
|
|
183
188
|
} else {
|
|
184
|
-
|
|
189
|
+
t17 = $[18];
|
|
185
190
|
}
|
|
186
|
-
let
|
|
187
|
-
if ($[
|
|
188
|
-
|
|
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-
|
|
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
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
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
|
-
|
|
215
|
+
t18 = $[26];
|
|
211
216
|
}
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
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:
|
|
220
|
-
children: [
|
|
224
|
+
className: t15,
|
|
225
|
+
children: [t17, t18]
|
|
221
226
|
});
|
|
222
|
-
|
|
227
|
+
t19 = /* @__PURE__ */ _jsx(DropdownMenuTrigger, {
|
|
223
228
|
asChild: true,
|
|
224
229
|
children: triggerButton
|
|
225
230
|
});
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[28] = t16;
|
|
231
|
+
$[27] = resolvedLabels.trigger;
|
|
232
|
+
$[28] = t15;
|
|
229
233
|
$[29] = t17;
|
|
230
|
-
$[30] =
|
|
231
|
-
$[31] =
|
|
234
|
+
$[30] = t18;
|
|
235
|
+
$[31] = triggerVariant;
|
|
236
|
+
$[32] = t19;
|
|
232
237
|
} else {
|
|
233
|
-
|
|
238
|
+
t19 = $[32];
|
|
234
239
|
}
|
|
235
|
-
const trigger =
|
|
236
|
-
let
|
|
237
|
-
if ($[
|
|
238
|
-
|
|
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
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
247
|
+
$[33] = tooltipLabel;
|
|
248
|
+
$[34] = trigger;
|
|
249
|
+
$[35] = t20;
|
|
245
250
|
} else {
|
|
246
|
-
|
|
251
|
+
t20 = $[35];
|
|
247
252
|
}
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
if ($[
|
|
251
|
-
|
|
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
|
-
|
|
260
|
+
t22 = $[37];
|
|
256
261
|
}
|
|
257
|
-
const
|
|
258
|
-
let
|
|
259
|
-
if ($[
|
|
260
|
-
|
|
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
|
-
|
|
269
|
+
t24 = $[39];
|
|
265
270
|
}
|
|
266
|
-
const
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
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:
|
|
277
|
+
className: t25
|
|
273
278
|
});
|
|
274
|
-
$[
|
|
275
|
-
$[40] = t24;
|
|
279
|
+
$[40] = avatarProps;
|
|
276
280
|
$[41] = t25;
|
|
281
|
+
$[42] = t26;
|
|
277
282
|
} else {
|
|
278
|
-
|
|
283
|
+
t26 = $[42];
|
|
279
284
|
}
|
|
280
|
-
let
|
|
281
|
-
if ($[
|
|
282
|
-
|
|
283
|
-
className: "truncate text-sm leading-tight font-
|
|
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
|
-
$[
|
|
287
|
-
$[
|
|
291
|
+
$[43] = name;
|
|
292
|
+
$[44] = t27;
|
|
288
293
|
} else {
|
|
289
|
-
|
|
294
|
+
t27 = $[44];
|
|
290
295
|
}
|
|
291
|
-
let
|
|
292
|
-
if ($[
|
|
293
|
-
|
|
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
|
-
$[
|
|
298
|
-
$[
|
|
302
|
+
$[45] = email;
|
|
303
|
+
$[46] = t28;
|
|
299
304
|
} else {
|
|
300
|
-
|
|
305
|
+
t28 = $[46];
|
|
301
306
|
}
|
|
302
|
-
let
|
|
303
|
-
if ($[
|
|
304
|
-
|
|
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: [
|
|
311
|
+
children: [t27, t28]
|
|
307
312
|
});
|
|
308
|
-
$[46] = t26;
|
|
309
313
|
$[47] = t27;
|
|
310
314
|
$[48] = t28;
|
|
315
|
+
$[49] = t29;
|
|
311
316
|
} else {
|
|
312
|
-
|
|
317
|
+
t29 = $[49];
|
|
313
318
|
}
|
|
314
|
-
let
|
|
315
|
-
if ($[
|
|
316
|
-
|
|
317
|
-
className:
|
|
318
|
-
children: [
|
|
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
|
-
$[
|
|
321
|
-
$[
|
|
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]
|
|
336
|
-
t31 =
|
|
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
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
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
|
-
|
|
368
|
+
t32 = $[63];
|
|
364
369
|
}
|
|
365
|
-
let
|
|
366
|
-
if ($[
|
|
367
|
-
|
|
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:
|
|
377
|
+
className: t22,
|
|
373
378
|
children: [
|
|
374
|
-
t29,
|
|
375
379
|
t30,
|
|
380
|
+
t31,
|
|
376
381
|
children,
|
|
377
|
-
|
|
382
|
+
t32
|
|
378
383
|
]
|
|
379
384
|
});
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
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
|
-
|
|
394
|
+
t33 = $[71];
|
|
390
395
|
}
|
|
391
|
-
let
|
|
392
|
-
if ($[
|
|
393
|
-
|
|
394
|
-
$[
|
|
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
|
-
|
|
403
|
+
t34 = $[74];
|
|
399
404
|
}
|
|
400
|
-
const menu =
|
|
405
|
+
const menu = t34;
|
|
401
406
|
if (!tooltipLabel) {
|
|
402
407
|
return menu;
|
|
403
408
|
}
|
|
404
|
-
let
|
|
405
|
-
if ($[
|
|
406
|
-
|
|
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
|
-
$[
|
|
412
|
-
$[
|
|
416
|
+
$[75] = tooltipLabel;
|
|
417
|
+
$[76] = t35;
|
|
413
418
|
} else {
|
|
414
|
-
|
|
419
|
+
t35 = $[76];
|
|
415
420
|
}
|
|
416
|
-
let
|
|
417
|
-
if ($[
|
|
418
|
-
|
|
419
|
-
$[
|
|
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
|
-
|
|
428
|
+
t36 = $[79];
|
|
424
429
|
}
|
|
425
|
-
return
|
|
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
|
-
|
|
42
|
-
declare function
|
|
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(
|
|
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] =
|
|
421
|
-
$[2] =
|
|
422
|
-
$[3] =
|
|
423
|
-
$[4] =
|
|
422
|
+
$[1] = children;
|
|
423
|
+
$[2] = className;
|
|
424
|
+
$[3] = props;
|
|
425
|
+
$[4] = t1;
|
|
426
|
+
$[5] = t2;
|
|
424
427
|
} else {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
428
|
+
children = $[1];
|
|
429
|
+
className = $[2];
|
|
430
|
+
props = $[3];
|
|
431
|
+
t1 = $[4];
|
|
432
|
+
t2 = $[5];
|
|
429
433
|
}
|
|
430
|
-
const variant = t1 === undefined ? "
|
|
431
|
-
const size = t2 === undefined ? "
|
|
434
|
+
const variant = t1 === undefined ? "primary" : t1;
|
|
435
|
+
const size = t2 === undefined ? "md" : t2;
|
|
432
436
|
let t3;
|
|
433
|
-
if ($[
|
|
437
|
+
if ($[6] !== className) {
|
|
434
438
|
t3 = cn(className);
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
439
|
+
$[6] = className;
|
|
440
|
+
$[7] = t3;
|
|
437
441
|
} else {
|
|
438
|
-
t3 = $[
|
|
442
|
+
t3 = $[7];
|
|
439
443
|
}
|
|
440
444
|
let t4;
|
|
441
|
-
if ($[
|
|
442
|
-
t4 = /* @__PURE__ */ _jsx(
|
|
443
|
-
|
|
445
|
+
if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
|
|
446
|
+
t4 = /* @__PURE__ */ _jsx(Button, {
|
|
447
|
+
variant,
|
|
448
|
+
size,
|
|
444
449
|
className: t3,
|
|
445
|
-
|
|
450
|
+
children
|
|
446
451
|
});
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
452
|
+
$[8] = children;
|
|
453
|
+
$[9] = size;
|
|
454
|
+
$[10] = t3;
|
|
455
|
+
$[11] = variant;
|
|
456
|
+
$[12] = t4;
|
|
450
457
|
} else {
|
|
451
|
-
t4 = $[
|
|
458
|
+
t4 = $[12];
|
|
452
459
|
}
|
|
453
460
|
let t5;
|
|
454
|
-
if ($[
|
|
455
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
456
|
-
|
|
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
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[13] = t5;
|
|
468
|
+
$[13] = props;
|
|
469
|
+
$[14] = t4;
|
|
470
|
+
$[15] = t5;
|
|
465
471
|
} else {
|
|
466
|
-
t5 = $[
|
|
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(
|
|
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] =
|
|
480
|
-
$[2] =
|
|
481
|
-
$[3] =
|
|
482
|
-
$[4] =
|
|
487
|
+
$[1] = children;
|
|
488
|
+
$[2] = className;
|
|
489
|
+
$[3] = props;
|
|
490
|
+
$[4] = t1;
|
|
491
|
+
$[5] = t2;
|
|
483
492
|
} else {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
493
|
+
children = $[1];
|
|
494
|
+
className = $[2];
|
|
495
|
+
props = $[3];
|
|
496
|
+
t1 = $[4];
|
|
497
|
+
t2 = $[5];
|
|
488
498
|
}
|
|
489
|
-
const variant = t1 === undefined ? "
|
|
490
|
-
const size = t2 === undefined ? "
|
|
499
|
+
const variant = t1 === undefined ? "secondary" : t1;
|
|
500
|
+
const size = t2 === undefined ? "md" : t2;
|
|
491
501
|
let t3;
|
|
492
|
-
if ($[
|
|
502
|
+
if ($[6] !== className) {
|
|
493
503
|
t3 = cn(className);
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
504
|
+
$[6] = className;
|
|
505
|
+
$[7] = t3;
|
|
496
506
|
} else {
|
|
497
|
-
t3 = $[
|
|
507
|
+
t3 = $[7];
|
|
498
508
|
}
|
|
499
509
|
let t4;
|
|
500
|
-
if ($[
|
|
501
|
-
t4 = /* @__PURE__ */ _jsx(
|
|
502
|
-
|
|
510
|
+
if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
|
|
511
|
+
t4 = /* @__PURE__ */ _jsx(Button, {
|
|
512
|
+
variant,
|
|
513
|
+
size,
|
|
503
514
|
className: t3,
|
|
504
|
-
|
|
515
|
+
children
|
|
505
516
|
});
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
517
|
+
$[8] = children;
|
|
518
|
+
$[9] = size;
|
|
519
|
+
$[10] = t3;
|
|
520
|
+
$[11] = variant;
|
|
521
|
+
$[12] = t4;
|
|
509
522
|
} else {
|
|
510
|
-
t4 = $[
|
|
523
|
+
t4 = $[12];
|
|
511
524
|
}
|
|
512
525
|
let t5;
|
|
513
|
-
if ($[
|
|
514
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
515
|
-
|
|
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
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[13] = t5;
|
|
533
|
+
$[13] = props;
|
|
534
|
+
$[14] = t4;
|
|
535
|
+
$[15] = t5;
|
|
524
536
|
} else {
|
|
525
|
-
t5 = $[
|
|
537
|
+
t5 = $[15];
|
|
526
538
|
}
|
|
527
539
|
return t5;
|
|
528
540
|
}
|