@parrot-co/parrot-ui 0.1.12 → 0.1.13
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/main.js +43 -14
- package/dist/main.js.map +1 -1
- package/dist/module.js +43 -14
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
package/dist/main.js
CHANGED
|
@@ -3336,17 +3336,29 @@ function $9ff025417b0a683c$export$e6a97ba2cae5bb94({ items: items, render: rende
|
|
|
3336
3336
|
|
|
3337
3337
|
|
|
3338
3338
|
|
|
3339
|
-
function $1278141024f0bc4d$export$c6fdb837b070b4ff({ children: children, state: state, ...props }) {
|
|
3339
|
+
function $1278141024f0bc4d$export$c6fdb837b070b4ff({ children: children, state: state, classNames: classNames, styles: styles, variant: variant = "modal", isDismissable: isDismissable = true, ...props }) {
|
|
3340
3340
|
const modalRef = $8zHUo$react.useRef(null);
|
|
3341
|
-
const { modalProps: modalProps, underlayProps: underlayProps } = (0, $8zHUo$reactaria.useModalOverlay)(
|
|
3341
|
+
const { modalProps: modalProps, underlayProps: underlayProps } = (0, $8zHUo$reactaria.useModalOverlay)({
|
|
3342
|
+
...props,
|
|
3343
|
+
isDismissable: isDismissable
|
|
3344
|
+
}, // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3342
3345
|
state, modalRef);
|
|
3343
3346
|
if (!state?.isOpen) return null;
|
|
3344
3347
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $8zHUo$reactaria.Overlay), {
|
|
3345
3348
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
3346
|
-
|
|
3349
|
+
style: styles?.underlay,
|
|
3350
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3351
|
+
"p-modal-underlay",
|
|
3352
|
+
classNames?.underlay
|
|
3353
|
+
]),
|
|
3347
3354
|
...underlayProps,
|
|
3348
3355
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
3349
|
-
|
|
3356
|
+
"data-variant": variant,
|
|
3357
|
+
style: styles?.wrapper,
|
|
3358
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3359
|
+
"p-modal-container",
|
|
3360
|
+
classNames?.wrapper
|
|
3361
|
+
]),
|
|
3350
3362
|
...modalProps,
|
|
3351
3363
|
ref: modalRef,
|
|
3352
3364
|
children: children
|
|
@@ -3354,23 +3366,23 @@ function $1278141024f0bc4d$export$c6fdb837b070b4ff({ children: children, state:
|
|
|
3354
3366
|
})
|
|
3355
3367
|
});
|
|
3356
3368
|
}
|
|
3357
|
-
function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCancel: onCancel, onConfirm: onConfirm, confirmLabel: confirmLabel = "Confirm", cancelLabel: cancelLabel = "Cancel", description: description, children: children, confirmButtonProps: confirmButtonProps, cancelButtonProps: cancelButtonProps,
|
|
3369
|
+
function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCancel: onCancel, onConfirm: onConfirm, confirmLabel: confirmLabel = "Confirm", cancelLabel: cancelLabel = "Cancel", description: description, children: children, confirmButtonProps: confirmButtonProps, cancelButtonProps: cancelButtonProps, showCloseButton: showCloseButton = true, onClose: onClose, className: className, style: style, hideTitle: hideTitle, classNames: classNames, styles: styles, state: state, ...props }) {
|
|
3358
3370
|
const dialogRef = $8zHUo$react.useRef(null);
|
|
3359
3371
|
const { dialogProps: dialogProps, titleProps: titleProps } = (0, $8zHUo$reactaria.useDialog)({
|
|
3360
3372
|
role: "dialog",
|
|
3361
3373
|
...props
|
|
3362
3374
|
}, dialogRef);
|
|
3363
3375
|
function handleClose() {
|
|
3364
|
-
|
|
3376
|
+
state?.close();
|
|
3365
3377
|
onClose?.();
|
|
3366
3378
|
}
|
|
3367
3379
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
|
|
3368
3380
|
"data-radius": "md",
|
|
3369
|
-
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-modal-content", className),
|
|
3370
|
-
"data-variant": variant,
|
|
3381
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-modal-content", className, classNames?.content),
|
|
3371
3382
|
style: {
|
|
3372
|
-
|
|
3373
|
-
...style
|
|
3383
|
+
width: width,
|
|
3384
|
+
...style,
|
|
3385
|
+
...styles?.content
|
|
3374
3386
|
},
|
|
3375
3387
|
ref: dialogRef,
|
|
3376
3388
|
...dialogProps,
|
|
@@ -3380,18 +3392,27 @@ function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCanc
|
|
|
3380
3392
|
as: "header",
|
|
3381
3393
|
justify: "space-between",
|
|
3382
3394
|
gap: "2xl",
|
|
3383
|
-
|
|
3395
|
+
style: styles?.header,
|
|
3396
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3397
|
+
"p-modal-head",
|
|
3398
|
+
classNames?.header
|
|
3399
|
+
]),
|
|
3384
3400
|
children: [
|
|
3385
3401
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
3386
3402
|
stack: true,
|
|
3387
3403
|
gap: "3xs",
|
|
3388
3404
|
children: [
|
|
3389
3405
|
title && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
3406
|
+
style: styles?.title,
|
|
3407
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3408
|
+
"p-modal-title",
|
|
3409
|
+
classNames?.title
|
|
3410
|
+
]),
|
|
3390
3411
|
weight: "medium",
|
|
3391
3412
|
size: "md",
|
|
3392
3413
|
color: "black",
|
|
3393
|
-
...titleProps,
|
|
3394
3414
|
as: "div",
|
|
3415
|
+
...titleProps,
|
|
3395
3416
|
children: title
|
|
3396
3417
|
}),
|
|
3397
3418
|
description && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $88fa102d91bf323a$export$5f1af8db9871e1d6), {
|
|
@@ -3419,12 +3440,20 @@ function $1278141024f0bc4d$var$Dialog({ width: width = 400, title: title, onCanc
|
|
|
3419
3440
|
}),
|
|
3420
3441
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
3421
3442
|
stack: true,
|
|
3422
|
-
className:
|
|
3443
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3444
|
+
"p-modal-body",
|
|
3445
|
+
classNames?.body
|
|
3446
|
+
]),
|
|
3447
|
+
style: styles?.body,
|
|
3423
3448
|
children: children
|
|
3424
3449
|
}),
|
|
3425
3450
|
(onConfirm || onCancel) && /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)((0, $c3a954a7c0cb5109$export$f51f4c4ede09e011), {
|
|
3426
3451
|
as: "footer",
|
|
3427
|
-
|
|
3452
|
+
style: styles?.footer,
|
|
3453
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)([
|
|
3454
|
+
"p-modal-footer",
|
|
3455
|
+
classNames?.footer
|
|
3456
|
+
]),
|
|
3428
3457
|
gap: "xs",
|
|
3429
3458
|
justify: "end",
|
|
3430
3459
|
stretchX: true,
|