@almadar/ui 3.5.1 → 3.5.2
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/avl/index.cjs +21 -9
- package/dist/avl/index.js +21 -9
- package/dist/components/index.cjs +21 -9
- package/dist/components/index.js +21 -9
- package/dist/providers/index.cjs +21 -9
- package/dist/providers/index.js +21 -9
- package/dist/runtime/index.cjs +21 -9
- package/dist/runtime/index.js +21 -9
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -46172,11 +46172,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46172
46172
|
}
|
|
46173
46173
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
46174
46174
|
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
46175
|
+
const slotId = `slot-${slot}`;
|
|
46175
46176
|
switch (slot) {
|
|
46176
46177
|
case "modal":
|
|
46177
46178
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46178
46179
|
Box,
|
|
46179
46180
|
{
|
|
46181
|
+
id: slotId,
|
|
46180
46182
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
46181
46183
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
46182
46184
|
onClick: onDismiss,
|
|
@@ -46213,6 +46215,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46213
46215
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46214
46216
|
Box,
|
|
46215
46217
|
{
|
|
46218
|
+
id: slotId,
|
|
46216
46219
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
46217
46220
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
46218
46221
|
onClick: onDismiss,
|
|
@@ -46245,7 +46248,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46245
46248
|
}
|
|
46246
46249
|
);
|
|
46247
46250
|
case "toast":
|
|
46248
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46251
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46249
46252
|
Toast,
|
|
46250
46253
|
{
|
|
46251
46254
|
variant: content.props.variant ?? "info",
|
|
@@ -46258,6 +46261,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46258
46261
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46259
46262
|
Box,
|
|
46260
46263
|
{
|
|
46264
|
+
id: slotId,
|
|
46261
46265
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
46262
46266
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
46263
46267
|
onClick: onDismiss,
|
|
@@ -46265,9 +46269,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46265
46269
|
}
|
|
46266
46270
|
);
|
|
46267
46271
|
case "center":
|
|
46268
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
46272
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
46269
46273
|
default:
|
|
46270
|
-
return slotContent;
|
|
46274
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
46271
46275
|
}
|
|
46272
46276
|
}
|
|
46273
46277
|
function UISlotComponent({
|
|
@@ -46386,12 +46390,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46386
46390
|
eventBus.clear(slot);
|
|
46387
46391
|
};
|
|
46388
46392
|
if (!portalRoot) return null;
|
|
46393
|
+
const slotId = `slot-${slot}`;
|
|
46389
46394
|
let wrapper;
|
|
46390
46395
|
switch (slot) {
|
|
46391
46396
|
case "modal":
|
|
46392
46397
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46393
46398
|
Box,
|
|
46394
46399
|
{
|
|
46400
|
+
id: slotId,
|
|
46395
46401
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46396
46402
|
"data-pattern": pattern,
|
|
46397
46403
|
"data-source-trait": sourceTrait,
|
|
@@ -46403,6 +46409,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46403
46409
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46404
46410
|
Box,
|
|
46405
46411
|
{
|
|
46412
|
+
id: slotId,
|
|
46406
46413
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46407
46414
|
"data-pattern": pattern,
|
|
46408
46415
|
"data-source-trait": sourceTrait,
|
|
@@ -46414,6 +46421,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46414
46421
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46415
46422
|
Box,
|
|
46416
46423
|
{
|
|
46424
|
+
id: slotId,
|
|
46417
46425
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46418
46426
|
"data-pattern": pattern,
|
|
46419
46427
|
"data-source-trait": sourceTrait,
|
|
@@ -46425,6 +46433,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46425
46433
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
46426
46434
|
Box,
|
|
46427
46435
|
{
|
|
46436
|
+
id: slotId,
|
|
46428
46437
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46429
46438
|
"data-pattern": pattern,
|
|
46430
46439
|
"data-source-trait": sourceTrait,
|
|
@@ -46448,6 +46457,8 @@ function SlotPortal({
|
|
|
46448
46457
|
if (portalRoot) getOrCreatePortalRoot();
|
|
46449
46458
|
});
|
|
46450
46459
|
if (!portalRoot) return null;
|
|
46460
|
+
const slotId = `slot-${slot}`;
|
|
46461
|
+
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
46451
46462
|
let wrapper;
|
|
46452
46463
|
switch (slot) {
|
|
46453
46464
|
case "modal":
|
|
@@ -46458,7 +46469,7 @@ function SlotPortal({
|
|
|
46458
46469
|
onClose: onDismiss,
|
|
46459
46470
|
title: content.props.title,
|
|
46460
46471
|
size: content.props.size,
|
|
46461
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46472
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
46462
46473
|
}
|
|
46463
46474
|
);
|
|
46464
46475
|
break;
|
|
@@ -46471,12 +46482,12 @@ function SlotPortal({
|
|
|
46471
46482
|
title: content.props.title,
|
|
46472
46483
|
position: content.props.position ?? "right",
|
|
46473
46484
|
width: content.props.width,
|
|
46474
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46485
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
46475
46486
|
}
|
|
46476
46487
|
);
|
|
46477
46488
|
break;
|
|
46478
46489
|
case "toast":
|
|
46479
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46490
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
46480
46491
|
Toast,
|
|
46481
46492
|
{
|
|
46482
46493
|
variant: content.props.variant ?? "info",
|
|
@@ -46490,17 +46501,18 @@ function SlotPortal({
|
|
|
46490
46501
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
46491
46502
|
Box,
|
|
46492
46503
|
{
|
|
46504
|
+
id: slotId,
|
|
46493
46505
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
46494
46506
|
onClick: onDismiss,
|
|
46495
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
46507
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
46496
46508
|
}
|
|
46497
46509
|
);
|
|
46498
46510
|
break;
|
|
46499
46511
|
case "center":
|
|
46500
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children:
|
|
46512
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
46501
46513
|
break;
|
|
46502
46514
|
default:
|
|
46503
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
46515
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
46504
46516
|
}
|
|
46505
46517
|
return reactDom.createPortal(wrapper, portalRoot);
|
|
46506
46518
|
}
|
package/dist/avl/index.js
CHANGED
|
@@ -46126,11 +46126,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46126
46126
|
}
|
|
46127
46127
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
46128
46128
|
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
46129
|
+
const slotId = `slot-${slot}`;
|
|
46129
46130
|
switch (slot) {
|
|
46130
46131
|
case "modal":
|
|
46131
46132
|
return /* @__PURE__ */ jsx(
|
|
46132
46133
|
Box,
|
|
46133
46134
|
{
|
|
46135
|
+
id: slotId,
|
|
46134
46136
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
46135
46137
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
46136
46138
|
onClick: onDismiss,
|
|
@@ -46167,6 +46169,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46167
46169
|
return /* @__PURE__ */ jsx(
|
|
46168
46170
|
Box,
|
|
46169
46171
|
{
|
|
46172
|
+
id: slotId,
|
|
46170
46173
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
46171
46174
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
46172
46175
|
onClick: onDismiss,
|
|
@@ -46199,7 +46202,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46199
46202
|
}
|
|
46200
46203
|
);
|
|
46201
46204
|
case "toast":
|
|
46202
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
46205
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
46203
46206
|
Toast,
|
|
46204
46207
|
{
|
|
46205
46208
|
variant: content.props.variant ?? "info",
|
|
@@ -46212,6 +46215,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46212
46215
|
return /* @__PURE__ */ jsx(
|
|
46213
46216
|
Box,
|
|
46214
46217
|
{
|
|
46218
|
+
id: slotId,
|
|
46215
46219
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
46216
46220
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
46217
46221
|
onClick: onDismiss,
|
|
@@ -46219,9 +46223,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46219
46223
|
}
|
|
46220
46224
|
);
|
|
46221
46225
|
case "center":
|
|
46222
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
46226
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
46223
46227
|
default:
|
|
46224
|
-
return slotContent;
|
|
46228
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
46225
46229
|
}
|
|
46226
46230
|
}
|
|
46227
46231
|
function UISlotComponent({
|
|
@@ -46340,12 +46344,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46340
46344
|
eventBus.clear(slot);
|
|
46341
46345
|
};
|
|
46342
46346
|
if (!portalRoot) return null;
|
|
46347
|
+
const slotId = `slot-${slot}`;
|
|
46343
46348
|
let wrapper;
|
|
46344
46349
|
switch (slot) {
|
|
46345
46350
|
case "modal":
|
|
46346
46351
|
wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
|
|
46347
46352
|
Box,
|
|
46348
46353
|
{
|
|
46354
|
+
id: slotId,
|
|
46349
46355
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46350
46356
|
"data-pattern": pattern,
|
|
46351
46357
|
"data-source-trait": sourceTrait,
|
|
@@ -46357,6 +46363,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46357
46363
|
wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
|
|
46358
46364
|
Box,
|
|
46359
46365
|
{
|
|
46366
|
+
id: slotId,
|
|
46360
46367
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46361
46368
|
"data-pattern": pattern,
|
|
46362
46369
|
"data-source-trait": sourceTrait,
|
|
@@ -46368,6 +46375,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46368
46375
|
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
46369
46376
|
Box,
|
|
46370
46377
|
{
|
|
46378
|
+
id: slotId,
|
|
46371
46379
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46372
46380
|
"data-pattern": pattern,
|
|
46373
46381
|
"data-source-trait": sourceTrait,
|
|
@@ -46379,6 +46387,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
46379
46387
|
wrapper = /* @__PURE__ */ jsx(
|
|
46380
46388
|
Box,
|
|
46381
46389
|
{
|
|
46390
|
+
id: slotId,
|
|
46382
46391
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46383
46392
|
"data-pattern": pattern,
|
|
46384
46393
|
"data-source-trait": sourceTrait,
|
|
@@ -46402,6 +46411,8 @@ function SlotPortal({
|
|
|
46402
46411
|
if (portalRoot) getOrCreatePortalRoot();
|
|
46403
46412
|
});
|
|
46404
46413
|
if (!portalRoot) return null;
|
|
46414
|
+
const slotId = `slot-${slot}`;
|
|
46415
|
+
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
46405
46416
|
let wrapper;
|
|
46406
46417
|
switch (slot) {
|
|
46407
46418
|
case "modal":
|
|
@@ -46412,7 +46423,7 @@ function SlotPortal({
|
|
|
46412
46423
|
onClose: onDismiss,
|
|
46413
46424
|
title: content.props.title,
|
|
46414
46425
|
size: content.props.size,
|
|
46415
|
-
children: /* @__PURE__ */ jsx(
|
|
46426
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
46416
46427
|
}
|
|
46417
46428
|
);
|
|
46418
46429
|
break;
|
|
@@ -46425,12 +46436,12 @@ function SlotPortal({
|
|
|
46425
46436
|
title: content.props.title,
|
|
46426
46437
|
position: content.props.position ?? "right",
|
|
46427
46438
|
width: content.props.width,
|
|
46428
|
-
children: /* @__PURE__ */ jsx(
|
|
46439
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
46429
46440
|
}
|
|
46430
46441
|
);
|
|
46431
46442
|
break;
|
|
46432
46443
|
case "toast":
|
|
46433
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
46444
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
46434
46445
|
Toast,
|
|
46435
46446
|
{
|
|
46436
46447
|
variant: content.props.variant ?? "info",
|
|
@@ -46444,17 +46455,18 @@ function SlotPortal({
|
|
|
46444
46455
|
wrapper = /* @__PURE__ */ jsx(
|
|
46445
46456
|
Box,
|
|
46446
46457
|
{
|
|
46458
|
+
id: slotId,
|
|
46447
46459
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
46448
46460
|
onClick: onDismiss,
|
|
46449
|
-
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
46461
|
+
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
46450
46462
|
}
|
|
46451
46463
|
);
|
|
46452
46464
|
break;
|
|
46453
46465
|
case "center":
|
|
46454
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children:
|
|
46466
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
46455
46467
|
break;
|
|
46456
46468
|
default:
|
|
46457
|
-
wrapper = /* @__PURE__ */ jsx(
|
|
46469
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
46458
46470
|
}
|
|
46459
46471
|
return createPortal(wrapper, portalRoot);
|
|
46460
46472
|
}
|
|
@@ -37136,11 +37136,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37136
37136
|
}
|
|
37137
37137
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37138
37138
|
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37139
|
+
const slotId = `slot-${slot}`;
|
|
37139
37140
|
switch (slot) {
|
|
37140
37141
|
case "modal":
|
|
37141
37142
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37142
37143
|
exports.Box,
|
|
37143
37144
|
{
|
|
37145
|
+
id: slotId,
|
|
37144
37146
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37145
37147
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37146
37148
|
onClick: onDismiss,
|
|
@@ -37177,6 +37179,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37177
37179
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37178
37180
|
exports.Box,
|
|
37179
37181
|
{
|
|
37182
|
+
id: slotId,
|
|
37180
37183
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37181
37184
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37182
37185
|
onClick: onDismiss,
|
|
@@ -37209,7 +37212,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37209
37212
|
}
|
|
37210
37213
|
);
|
|
37211
37214
|
case "toast":
|
|
37212
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37215
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37213
37216
|
exports.Toast,
|
|
37214
37217
|
{
|
|
37215
37218
|
variant: content.props.variant ?? "info",
|
|
@@ -37222,6 +37225,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37222
37225
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37223
37226
|
exports.Box,
|
|
37224
37227
|
{
|
|
37228
|
+
id: slotId,
|
|
37225
37229
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37226
37230
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37227
37231
|
onClick: onDismiss,
|
|
@@ -37229,9 +37233,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37229
37233
|
}
|
|
37230
37234
|
);
|
|
37231
37235
|
case "center":
|
|
37232
|
-
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37236
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37233
37237
|
default:
|
|
37234
|
-
return slotContent;
|
|
37238
|
+
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, children: slotContent });
|
|
37235
37239
|
}
|
|
37236
37240
|
}
|
|
37237
37241
|
function UISlotComponent({
|
|
@@ -37350,12 +37354,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37350
37354
|
eventBus.clear(slot);
|
|
37351
37355
|
};
|
|
37352
37356
|
if (!portalRoot) return null;
|
|
37357
|
+
const slotId = `slot-${slot}`;
|
|
37353
37358
|
let wrapper;
|
|
37354
37359
|
switch (slot) {
|
|
37355
37360
|
case "modal":
|
|
37356
37361
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37357
37362
|
exports.Box,
|
|
37358
37363
|
{
|
|
37364
|
+
id: slotId,
|
|
37359
37365
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37360
37366
|
"data-pattern": pattern,
|
|
37361
37367
|
"data-source-trait": sourceTrait,
|
|
@@ -37367,6 +37373,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37367
37373
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37368
37374
|
exports.Box,
|
|
37369
37375
|
{
|
|
37376
|
+
id: slotId,
|
|
37370
37377
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37371
37378
|
"data-pattern": pattern,
|
|
37372
37379
|
"data-source-trait": sourceTrait,
|
|
@@ -37378,6 +37385,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37378
37385
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37379
37386
|
exports.Box,
|
|
37380
37387
|
{
|
|
37388
|
+
id: slotId,
|
|
37381
37389
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37382
37390
|
"data-pattern": pattern,
|
|
37383
37391
|
"data-source-trait": sourceTrait,
|
|
@@ -37389,6 +37397,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37389
37397
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37390
37398
|
exports.Box,
|
|
37391
37399
|
{
|
|
37400
|
+
id: slotId,
|
|
37392
37401
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37393
37402
|
"data-pattern": pattern,
|
|
37394
37403
|
"data-source-trait": sourceTrait,
|
|
@@ -37412,6 +37421,8 @@ function SlotPortal({
|
|
|
37412
37421
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37413
37422
|
});
|
|
37414
37423
|
if (!portalRoot) return null;
|
|
37424
|
+
const slotId = `slot-${slot}`;
|
|
37425
|
+
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37415
37426
|
let wrapper;
|
|
37416
37427
|
switch (slot) {
|
|
37417
37428
|
case "modal":
|
|
@@ -37422,7 +37433,7 @@ function SlotPortal({
|
|
|
37422
37433
|
onClose: onDismiss,
|
|
37423
37434
|
title: content.props.title,
|
|
37424
37435
|
size: content.props.size,
|
|
37425
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37436
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, children: slotContent })
|
|
37426
37437
|
}
|
|
37427
37438
|
);
|
|
37428
37439
|
break;
|
|
@@ -37435,12 +37446,12 @@ function SlotPortal({
|
|
|
37435
37446
|
title: content.props.title,
|
|
37436
37447
|
position: content.props.position ?? "right",
|
|
37437
37448
|
width: content.props.width,
|
|
37438
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37449
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, children: slotContent })
|
|
37439
37450
|
}
|
|
37440
37451
|
);
|
|
37441
37452
|
break;
|
|
37442
37453
|
case "toast":
|
|
37443
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37454
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37444
37455
|
exports.Toast,
|
|
37445
37456
|
{
|
|
37446
37457
|
variant: content.props.variant ?? "info",
|
|
@@ -37454,17 +37465,18 @@ function SlotPortal({
|
|
|
37454
37465
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37455
37466
|
exports.Box,
|
|
37456
37467
|
{
|
|
37468
|
+
id: slotId,
|
|
37457
37469
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37458
37470
|
onClick: onDismiss,
|
|
37459
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37471
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37460
37472
|
}
|
|
37461
37473
|
);
|
|
37462
37474
|
break;
|
|
37463
37475
|
case "center":
|
|
37464
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "pointer-events-auto", children:
|
|
37476
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37465
37477
|
break;
|
|
37466
37478
|
default:
|
|
37467
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37479
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { id: slotId, children: slotContent });
|
|
37468
37480
|
}
|
|
37469
37481
|
return reactDom.createPortal(wrapper, portalRoot);
|
|
37470
37482
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -37091,11 +37091,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37091
37091
|
}
|
|
37092
37092
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37093
37093
|
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37094
|
+
const slotId = `slot-${slot}`;
|
|
37094
37095
|
switch (slot) {
|
|
37095
37096
|
case "modal":
|
|
37096
37097
|
return /* @__PURE__ */ jsx(
|
|
37097
37098
|
Box,
|
|
37098
37099
|
{
|
|
37100
|
+
id: slotId,
|
|
37099
37101
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37100
37102
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37101
37103
|
onClick: onDismiss,
|
|
@@ -37132,6 +37134,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37132
37134
|
return /* @__PURE__ */ jsx(
|
|
37133
37135
|
Box,
|
|
37134
37136
|
{
|
|
37137
|
+
id: slotId,
|
|
37135
37138
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37136
37139
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37137
37140
|
onClick: onDismiss,
|
|
@@ -37164,7 +37167,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37164
37167
|
}
|
|
37165
37168
|
);
|
|
37166
37169
|
case "toast":
|
|
37167
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37170
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37168
37171
|
Toast,
|
|
37169
37172
|
{
|
|
37170
37173
|
variant: content.props.variant ?? "info",
|
|
@@ -37177,6 +37180,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37177
37180
|
return /* @__PURE__ */ jsx(
|
|
37178
37181
|
Box,
|
|
37179
37182
|
{
|
|
37183
|
+
id: slotId,
|
|
37180
37184
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37181
37185
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37182
37186
|
onClick: onDismiss,
|
|
@@ -37184,9 +37188,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37184
37188
|
}
|
|
37185
37189
|
);
|
|
37186
37190
|
case "center":
|
|
37187
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37191
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37188
37192
|
default:
|
|
37189
|
-
return slotContent;
|
|
37193
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37190
37194
|
}
|
|
37191
37195
|
}
|
|
37192
37196
|
function UISlotComponent({
|
|
@@ -37305,12 +37309,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37305
37309
|
eventBus.clear(slot);
|
|
37306
37310
|
};
|
|
37307
37311
|
if (!portalRoot) return null;
|
|
37312
|
+
const slotId = `slot-${slot}`;
|
|
37308
37313
|
let wrapper;
|
|
37309
37314
|
switch (slot) {
|
|
37310
37315
|
case "modal":
|
|
37311
37316
|
wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
|
|
37312
37317
|
Box,
|
|
37313
37318
|
{
|
|
37319
|
+
id: slotId,
|
|
37314
37320
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37315
37321
|
"data-pattern": pattern,
|
|
37316
37322
|
"data-source-trait": sourceTrait,
|
|
@@ -37322,6 +37328,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37322
37328
|
wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
|
|
37323
37329
|
Box,
|
|
37324
37330
|
{
|
|
37331
|
+
id: slotId,
|
|
37325
37332
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37326
37333
|
"data-pattern": pattern,
|
|
37327
37334
|
"data-source-trait": sourceTrait,
|
|
@@ -37333,6 +37340,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37333
37340
|
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37334
37341
|
Box,
|
|
37335
37342
|
{
|
|
37343
|
+
id: slotId,
|
|
37336
37344
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37337
37345
|
"data-pattern": pattern,
|
|
37338
37346
|
"data-source-trait": sourceTrait,
|
|
@@ -37344,6 +37352,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37344
37352
|
wrapper = /* @__PURE__ */ jsx(
|
|
37345
37353
|
Box,
|
|
37346
37354
|
{
|
|
37355
|
+
id: slotId,
|
|
37347
37356
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37348
37357
|
"data-pattern": pattern,
|
|
37349
37358
|
"data-source-trait": sourceTrait,
|
|
@@ -37367,6 +37376,8 @@ function SlotPortal({
|
|
|
37367
37376
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37368
37377
|
});
|
|
37369
37378
|
if (!portalRoot) return null;
|
|
37379
|
+
const slotId = `slot-${slot}`;
|
|
37380
|
+
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37370
37381
|
let wrapper;
|
|
37371
37382
|
switch (slot) {
|
|
37372
37383
|
case "modal":
|
|
@@ -37377,7 +37388,7 @@ function SlotPortal({
|
|
|
37377
37388
|
onClose: onDismiss,
|
|
37378
37389
|
title: content.props.title,
|
|
37379
37390
|
size: content.props.size,
|
|
37380
|
-
children: /* @__PURE__ */ jsx(
|
|
37391
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37381
37392
|
}
|
|
37382
37393
|
);
|
|
37383
37394
|
break;
|
|
@@ -37390,12 +37401,12 @@ function SlotPortal({
|
|
|
37390
37401
|
title: content.props.title,
|
|
37391
37402
|
position: content.props.position ?? "right",
|
|
37392
37403
|
width: content.props.width,
|
|
37393
|
-
children: /* @__PURE__ */ jsx(
|
|
37404
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37394
37405
|
}
|
|
37395
37406
|
);
|
|
37396
37407
|
break;
|
|
37397
37408
|
case "toast":
|
|
37398
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37409
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37399
37410
|
Toast,
|
|
37400
37411
|
{
|
|
37401
37412
|
variant: content.props.variant ?? "info",
|
|
@@ -37409,17 +37420,18 @@ function SlotPortal({
|
|
|
37409
37420
|
wrapper = /* @__PURE__ */ jsx(
|
|
37410
37421
|
Box,
|
|
37411
37422
|
{
|
|
37423
|
+
id: slotId,
|
|
37412
37424
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37413
37425
|
onClick: onDismiss,
|
|
37414
|
-
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37426
|
+
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37415
37427
|
}
|
|
37416
37428
|
);
|
|
37417
37429
|
break;
|
|
37418
37430
|
case "center":
|
|
37419
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children:
|
|
37431
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37420
37432
|
break;
|
|
37421
37433
|
default:
|
|
37422
|
-
wrapper = /* @__PURE__ */ jsx(
|
|
37434
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37423
37435
|
}
|
|
37424
37436
|
return createPortal(wrapper, portalRoot);
|
|
37425
37437
|
}
|
package/dist/providers/index.cjs
CHANGED
|
@@ -37645,11 +37645,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37645
37645
|
}
|
|
37646
37646
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37647
37647
|
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37648
|
+
const slotId = `slot-${slot}`;
|
|
37648
37649
|
switch (slot) {
|
|
37649
37650
|
case "modal":
|
|
37650
37651
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37651
37652
|
Box,
|
|
37652
37653
|
{
|
|
37654
|
+
id: slotId,
|
|
37653
37655
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37654
37656
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37655
37657
|
onClick: onDismiss,
|
|
@@ -37686,6 +37688,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37686
37688
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37687
37689
|
Box,
|
|
37688
37690
|
{
|
|
37691
|
+
id: slotId,
|
|
37689
37692
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37690
37693
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37691
37694
|
onClick: onDismiss,
|
|
@@ -37718,7 +37721,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37718
37721
|
}
|
|
37719
37722
|
);
|
|
37720
37723
|
case "toast":
|
|
37721
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37724
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37722
37725
|
Toast,
|
|
37723
37726
|
{
|
|
37724
37727
|
variant: content.props.variant ?? "info",
|
|
@@ -37731,6 +37734,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37731
37734
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37732
37735
|
Box,
|
|
37733
37736
|
{
|
|
37737
|
+
id: slotId,
|
|
37734
37738
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37735
37739
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37736
37740
|
onClick: onDismiss,
|
|
@@ -37738,9 +37742,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37738
37742
|
}
|
|
37739
37743
|
);
|
|
37740
37744
|
case "center":
|
|
37741
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37745
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37742
37746
|
default:
|
|
37743
|
-
return slotContent;
|
|
37747
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
37744
37748
|
}
|
|
37745
37749
|
}
|
|
37746
37750
|
function UISlotComponent({
|
|
@@ -37859,12 +37863,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37859
37863
|
eventBus.clear(slot);
|
|
37860
37864
|
};
|
|
37861
37865
|
if (!portalRoot) return null;
|
|
37866
|
+
const slotId = `slot-${slot}`;
|
|
37862
37867
|
let wrapper;
|
|
37863
37868
|
switch (slot) {
|
|
37864
37869
|
case "modal":
|
|
37865
37870
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37866
37871
|
Box,
|
|
37867
37872
|
{
|
|
37873
|
+
id: slotId,
|
|
37868
37874
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37869
37875
|
"data-pattern": pattern,
|
|
37870
37876
|
"data-source-trait": sourceTrait,
|
|
@@ -37876,6 +37882,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37876
37882
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37877
37883
|
Box,
|
|
37878
37884
|
{
|
|
37885
|
+
id: slotId,
|
|
37879
37886
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37880
37887
|
"data-pattern": pattern,
|
|
37881
37888
|
"data-source-trait": sourceTrait,
|
|
@@ -37887,6 +37894,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37887
37894
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37888
37895
|
Box,
|
|
37889
37896
|
{
|
|
37897
|
+
id: slotId,
|
|
37890
37898
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37891
37899
|
"data-pattern": pattern,
|
|
37892
37900
|
"data-source-trait": sourceTrait,
|
|
@@ -37898,6 +37906,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37898
37906
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37899
37907
|
Box,
|
|
37900
37908
|
{
|
|
37909
|
+
id: slotId,
|
|
37901
37910
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37902
37911
|
"data-pattern": pattern,
|
|
37903
37912
|
"data-source-trait": sourceTrait,
|
|
@@ -37921,6 +37930,8 @@ function SlotPortal({
|
|
|
37921
37930
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37922
37931
|
});
|
|
37923
37932
|
if (!portalRoot) return null;
|
|
37933
|
+
const slotId = `slot-${slot}`;
|
|
37934
|
+
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37924
37935
|
let wrapper;
|
|
37925
37936
|
switch (slot) {
|
|
37926
37937
|
case "modal":
|
|
@@ -37931,7 +37942,7 @@ function SlotPortal({
|
|
|
37931
37942
|
onClose: onDismiss,
|
|
37932
37943
|
title: content.props.title,
|
|
37933
37944
|
size: content.props.size,
|
|
37934
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37945
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
37935
37946
|
}
|
|
37936
37947
|
);
|
|
37937
37948
|
break;
|
|
@@ -37944,12 +37955,12 @@ function SlotPortal({
|
|
|
37944
37955
|
title: content.props.title,
|
|
37945
37956
|
position: content.props.position ?? "right",
|
|
37946
37957
|
width: content.props.width,
|
|
37947
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37958
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
37948
37959
|
}
|
|
37949
37960
|
);
|
|
37950
37961
|
break;
|
|
37951
37962
|
case "toast":
|
|
37952
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37963
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37953
37964
|
Toast,
|
|
37954
37965
|
{
|
|
37955
37966
|
variant: content.props.variant ?? "info",
|
|
@@ -37963,17 +37974,18 @@ function SlotPortal({
|
|
|
37963
37974
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37964
37975
|
Box,
|
|
37965
37976
|
{
|
|
37977
|
+
id: slotId,
|
|
37966
37978
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37967
37979
|
onClick: onDismiss,
|
|
37968
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37980
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37969
37981
|
}
|
|
37970
37982
|
);
|
|
37971
37983
|
break;
|
|
37972
37984
|
case "center":
|
|
37973
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children:
|
|
37985
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37974
37986
|
break;
|
|
37975
37987
|
default:
|
|
37976
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37988
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
37977
37989
|
}
|
|
37978
37990
|
return reactDom.createPortal(wrapper, portalRoot);
|
|
37979
37991
|
}
|
package/dist/providers/index.js
CHANGED
|
@@ -37600,11 +37600,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37600
37600
|
}
|
|
37601
37601
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37602
37602
|
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37603
|
+
const slotId = `slot-${slot}`;
|
|
37603
37604
|
switch (slot) {
|
|
37604
37605
|
case "modal":
|
|
37605
37606
|
return /* @__PURE__ */ jsx(
|
|
37606
37607
|
Box,
|
|
37607
37608
|
{
|
|
37609
|
+
id: slotId,
|
|
37608
37610
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37609
37611
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37610
37612
|
onClick: onDismiss,
|
|
@@ -37641,6 +37643,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37641
37643
|
return /* @__PURE__ */ jsx(
|
|
37642
37644
|
Box,
|
|
37643
37645
|
{
|
|
37646
|
+
id: slotId,
|
|
37644
37647
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37645
37648
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37646
37649
|
onClick: onDismiss,
|
|
@@ -37673,7 +37676,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37673
37676
|
}
|
|
37674
37677
|
);
|
|
37675
37678
|
case "toast":
|
|
37676
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37679
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37677
37680
|
Toast,
|
|
37678
37681
|
{
|
|
37679
37682
|
variant: content.props.variant ?? "info",
|
|
@@ -37686,6 +37689,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37686
37689
|
return /* @__PURE__ */ jsx(
|
|
37687
37690
|
Box,
|
|
37688
37691
|
{
|
|
37692
|
+
id: slotId,
|
|
37689
37693
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37690
37694
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37691
37695
|
onClick: onDismiss,
|
|
@@ -37693,9 +37697,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37693
37697
|
}
|
|
37694
37698
|
);
|
|
37695
37699
|
case "center":
|
|
37696
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37700
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37697
37701
|
default:
|
|
37698
|
-
return slotContent;
|
|
37702
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37699
37703
|
}
|
|
37700
37704
|
}
|
|
37701
37705
|
function UISlotComponent({
|
|
@@ -37814,12 +37818,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37814
37818
|
eventBus.clear(slot);
|
|
37815
37819
|
};
|
|
37816
37820
|
if (!portalRoot) return null;
|
|
37821
|
+
const slotId = `slot-${slot}`;
|
|
37817
37822
|
let wrapper;
|
|
37818
37823
|
switch (slot) {
|
|
37819
37824
|
case "modal":
|
|
37820
37825
|
wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
|
|
37821
37826
|
Box,
|
|
37822
37827
|
{
|
|
37828
|
+
id: slotId,
|
|
37823
37829
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37824
37830
|
"data-pattern": pattern,
|
|
37825
37831
|
"data-source-trait": sourceTrait,
|
|
@@ -37831,6 +37837,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37831
37837
|
wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
|
|
37832
37838
|
Box,
|
|
37833
37839
|
{
|
|
37840
|
+
id: slotId,
|
|
37834
37841
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37835
37842
|
"data-pattern": pattern,
|
|
37836
37843
|
"data-source-trait": sourceTrait,
|
|
@@ -37842,6 +37849,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37842
37849
|
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37843
37850
|
Box,
|
|
37844
37851
|
{
|
|
37852
|
+
id: slotId,
|
|
37845
37853
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37846
37854
|
"data-pattern": pattern,
|
|
37847
37855
|
"data-source-trait": sourceTrait,
|
|
@@ -37853,6 +37861,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37853
37861
|
wrapper = /* @__PURE__ */ jsx(
|
|
37854
37862
|
Box,
|
|
37855
37863
|
{
|
|
37864
|
+
id: slotId,
|
|
37856
37865
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37857
37866
|
"data-pattern": pattern,
|
|
37858
37867
|
"data-source-trait": sourceTrait,
|
|
@@ -37876,6 +37885,8 @@ function SlotPortal({
|
|
|
37876
37885
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37877
37886
|
});
|
|
37878
37887
|
if (!portalRoot) return null;
|
|
37888
|
+
const slotId = `slot-${slot}`;
|
|
37889
|
+
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37879
37890
|
let wrapper;
|
|
37880
37891
|
switch (slot) {
|
|
37881
37892
|
case "modal":
|
|
@@ -37886,7 +37897,7 @@ function SlotPortal({
|
|
|
37886
37897
|
onClose: onDismiss,
|
|
37887
37898
|
title: content.props.title,
|
|
37888
37899
|
size: content.props.size,
|
|
37889
|
-
children: /* @__PURE__ */ jsx(
|
|
37900
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37890
37901
|
}
|
|
37891
37902
|
);
|
|
37892
37903
|
break;
|
|
@@ -37899,12 +37910,12 @@ function SlotPortal({
|
|
|
37899
37910
|
title: content.props.title,
|
|
37900
37911
|
position: content.props.position ?? "right",
|
|
37901
37912
|
width: content.props.width,
|
|
37902
|
-
children: /* @__PURE__ */ jsx(
|
|
37913
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37903
37914
|
}
|
|
37904
37915
|
);
|
|
37905
37916
|
break;
|
|
37906
37917
|
case "toast":
|
|
37907
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37918
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37908
37919
|
Toast,
|
|
37909
37920
|
{
|
|
37910
37921
|
variant: content.props.variant ?? "info",
|
|
@@ -37918,17 +37929,18 @@ function SlotPortal({
|
|
|
37918
37929
|
wrapper = /* @__PURE__ */ jsx(
|
|
37919
37930
|
Box,
|
|
37920
37931
|
{
|
|
37932
|
+
id: slotId,
|
|
37921
37933
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37922
37934
|
onClick: onDismiss,
|
|
37923
|
-
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37935
|
+
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37924
37936
|
}
|
|
37925
37937
|
);
|
|
37926
37938
|
break;
|
|
37927
37939
|
case "center":
|
|
37928
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children:
|
|
37940
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37929
37941
|
break;
|
|
37930
37942
|
default:
|
|
37931
|
-
wrapper = /* @__PURE__ */ jsx(
|
|
37943
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37932
37944
|
}
|
|
37933
37945
|
return createPortal(wrapper, portalRoot);
|
|
37934
37946
|
}
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -37217,11 +37217,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37217
37217
|
}
|
|
37218
37218
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37219
37219
|
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37220
|
+
const slotId = `slot-${slot}`;
|
|
37220
37221
|
switch (slot) {
|
|
37221
37222
|
case "modal":
|
|
37222
37223
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37223
37224
|
Box,
|
|
37224
37225
|
{
|
|
37226
|
+
id: slotId,
|
|
37225
37227
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37226
37228
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37227
37229
|
onClick: onDismiss,
|
|
@@ -37258,6 +37260,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37258
37260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37259
37261
|
Box,
|
|
37260
37262
|
{
|
|
37263
|
+
id: slotId,
|
|
37261
37264
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37262
37265
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37263
37266
|
onClick: onDismiss,
|
|
@@ -37290,7 +37293,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37290
37293
|
}
|
|
37291
37294
|
);
|
|
37292
37295
|
case "toast":
|
|
37293
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37294
37297
|
Toast,
|
|
37295
37298
|
{
|
|
37296
37299
|
variant: content.props.variant ?? "info",
|
|
@@ -37303,6 +37306,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37303
37306
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37304
37307
|
Box,
|
|
37305
37308
|
{
|
|
37309
|
+
id: slotId,
|
|
37306
37310
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37307
37311
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37308
37312
|
onClick: onDismiss,
|
|
@@ -37310,9 +37314,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37310
37314
|
}
|
|
37311
37315
|
);
|
|
37312
37316
|
case "center":
|
|
37313
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37317
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37314
37318
|
default:
|
|
37315
|
-
return slotContent;
|
|
37319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
37316
37320
|
}
|
|
37317
37321
|
}
|
|
37318
37322
|
function UISlotComponent({
|
|
@@ -37431,12 +37435,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37431
37435
|
eventBus.clear(slot);
|
|
37432
37436
|
};
|
|
37433
37437
|
if (!portalRoot) return null;
|
|
37438
|
+
const slotId = `slot-${slot}`;
|
|
37434
37439
|
let wrapper;
|
|
37435
37440
|
switch (slot) {
|
|
37436
37441
|
case "modal":
|
|
37437
37442
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37438
37443
|
Box,
|
|
37439
37444
|
{
|
|
37445
|
+
id: slotId,
|
|
37440
37446
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37441
37447
|
"data-pattern": pattern,
|
|
37442
37448
|
"data-source-trait": sourceTrait,
|
|
@@ -37448,6 +37454,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37448
37454
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37449
37455
|
Box,
|
|
37450
37456
|
{
|
|
37457
|
+
id: slotId,
|
|
37451
37458
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37452
37459
|
"data-pattern": pattern,
|
|
37453
37460
|
"data-source-trait": sourceTrait,
|
|
@@ -37459,6 +37466,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37459
37466
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37460
37467
|
Box,
|
|
37461
37468
|
{
|
|
37469
|
+
id: slotId,
|
|
37462
37470
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37463
37471
|
"data-pattern": pattern,
|
|
37464
37472
|
"data-source-trait": sourceTrait,
|
|
@@ -37470,6 +37478,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37470
37478
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37471
37479
|
Box,
|
|
37472
37480
|
{
|
|
37481
|
+
id: slotId,
|
|
37473
37482
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37474
37483
|
"data-pattern": pattern,
|
|
37475
37484
|
"data-source-trait": sourceTrait,
|
|
@@ -37493,6 +37502,8 @@ function SlotPortal({
|
|
|
37493
37502
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37494
37503
|
});
|
|
37495
37504
|
if (!portalRoot) return null;
|
|
37505
|
+
const slotId = `slot-${slot}`;
|
|
37506
|
+
const slotContent = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content, onDismiss });
|
|
37496
37507
|
let wrapper;
|
|
37497
37508
|
switch (slot) {
|
|
37498
37509
|
case "modal":
|
|
@@ -37503,7 +37514,7 @@ function SlotPortal({
|
|
|
37503
37514
|
onClose: onDismiss,
|
|
37504
37515
|
title: content.props.title,
|
|
37505
37516
|
size: content.props.size,
|
|
37506
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37517
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
37507
37518
|
}
|
|
37508
37519
|
);
|
|
37509
37520
|
break;
|
|
@@ -37516,12 +37527,12 @@ function SlotPortal({
|
|
|
37516
37527
|
title: content.props.title,
|
|
37517
37528
|
position: content.props.position ?? "right",
|
|
37518
37529
|
width: content.props.width,
|
|
37519
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37530
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent })
|
|
37520
37531
|
}
|
|
37521
37532
|
);
|
|
37522
37533
|
break;
|
|
37523
37534
|
case "toast":
|
|
37524
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37535
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
37525
37536
|
Toast,
|
|
37526
37537
|
{
|
|
37527
37538
|
variant: content.props.variant ?? "info",
|
|
@@ -37535,17 +37546,18 @@ function SlotPortal({
|
|
|
37535
37546
|
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37536
37547
|
Box,
|
|
37537
37548
|
{
|
|
37549
|
+
id: slotId,
|
|
37538
37550
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37539
37551
|
onClick: onDismiss,
|
|
37540
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37552
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37541
37553
|
}
|
|
37542
37554
|
);
|
|
37543
37555
|
break;
|
|
37544
37556
|
case "center":
|
|
37545
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children:
|
|
37557
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37546
37558
|
break;
|
|
37547
37559
|
default:
|
|
37548
|
-
wrapper = /* @__PURE__ */ jsxRuntime.jsx(
|
|
37560
|
+
wrapper = /* @__PURE__ */ jsxRuntime.jsx(Box, { id: slotId, children: slotContent });
|
|
37549
37561
|
}
|
|
37550
37562
|
return reactDom.createPortal(wrapper, portalRoot);
|
|
37551
37563
|
}
|
package/dist/runtime/index.js
CHANGED
|
@@ -37172,11 +37172,13 @@ function enrichFormFields(fields, entityDef) {
|
|
|
37172
37172
|
}
|
|
37173
37173
|
function renderContainedPortal(slot, content, onDismiss) {
|
|
37174
37174
|
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37175
|
+
const slotId = `slot-${slot}`;
|
|
37175
37176
|
switch (slot) {
|
|
37176
37177
|
case "modal":
|
|
37177
37178
|
return /* @__PURE__ */ jsx(
|
|
37178
37179
|
Box,
|
|
37179
37180
|
{
|
|
37181
|
+
id: slotId,
|
|
37180
37182
|
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
37181
37183
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
37182
37184
|
onClick: onDismiss,
|
|
@@ -37213,6 +37215,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37213
37215
|
return /* @__PURE__ */ jsx(
|
|
37214
37216
|
Box,
|
|
37215
37217
|
{
|
|
37218
|
+
id: slotId,
|
|
37216
37219
|
className: "absolute inset-0 z-50 overflow-hidden",
|
|
37217
37220
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37218
37221
|
onClick: onDismiss,
|
|
@@ -37245,7 +37248,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37245
37248
|
}
|
|
37246
37249
|
);
|
|
37247
37250
|
case "toast":
|
|
37248
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37251
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37249
37252
|
Toast,
|
|
37250
37253
|
{
|
|
37251
37254
|
variant: content.props.variant ?? "info",
|
|
@@ -37258,6 +37261,7 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37258
37261
|
return /* @__PURE__ */ jsx(
|
|
37259
37262
|
Box,
|
|
37260
37263
|
{
|
|
37264
|
+
id: slotId,
|
|
37261
37265
|
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
37262
37266
|
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
37263
37267
|
onClick: onDismiss,
|
|
@@ -37265,9 +37269,9 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
37265
37269
|
}
|
|
37266
37270
|
);
|
|
37267
37271
|
case "center":
|
|
37268
|
-
return /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37272
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "absolute inset-0 z-50 flex items-center justify-center pointer-events-none overflow-auto", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto max-h-full overflow-auto", children: slotContent }) });
|
|
37269
37273
|
default:
|
|
37270
|
-
return slotContent;
|
|
37274
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37271
37275
|
}
|
|
37272
37276
|
}
|
|
37273
37277
|
function UISlotComponent({
|
|
@@ -37386,12 +37390,14 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37386
37390
|
eventBus.clear(slot);
|
|
37387
37391
|
};
|
|
37388
37392
|
if (!portalRoot) return null;
|
|
37393
|
+
const slotId = `slot-${slot}`;
|
|
37389
37394
|
let wrapper;
|
|
37390
37395
|
switch (slot) {
|
|
37391
37396
|
case "modal":
|
|
37392
37397
|
wrapper = /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: /* @__PURE__ */ jsx(
|
|
37393
37398
|
Box,
|
|
37394
37399
|
{
|
|
37400
|
+
id: slotId,
|
|
37395
37401
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37396
37402
|
"data-pattern": pattern,
|
|
37397
37403
|
"data-source-trait": sourceTrait,
|
|
@@ -37403,6 +37409,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37403
37409
|
wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
|
|
37404
37410
|
Box,
|
|
37405
37411
|
{
|
|
37412
|
+
id: slotId,
|
|
37406
37413
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37407
37414
|
"data-pattern": pattern,
|
|
37408
37415
|
"data-source-trait": sourceTrait,
|
|
@@ -37414,6 +37421,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37414
37421
|
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed top-4 right-4 z-50", children: /* @__PURE__ */ jsx(
|
|
37415
37422
|
Box,
|
|
37416
37423
|
{
|
|
37424
|
+
id: slotId,
|
|
37417
37425
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37418
37426
|
"data-pattern": pattern,
|
|
37419
37427
|
"data-source-trait": sourceTrait,
|
|
@@ -37425,6 +37433,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
37425
37433
|
wrapper = /* @__PURE__ */ jsx(
|
|
37426
37434
|
Box,
|
|
37427
37435
|
{
|
|
37436
|
+
id: slotId,
|
|
37428
37437
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
37429
37438
|
"data-pattern": pattern,
|
|
37430
37439
|
"data-source-trait": sourceTrait,
|
|
@@ -37448,6 +37457,8 @@ function SlotPortal({
|
|
|
37448
37457
|
if (portalRoot) getOrCreatePortalRoot();
|
|
37449
37458
|
});
|
|
37450
37459
|
if (!portalRoot) return null;
|
|
37460
|
+
const slotId = `slot-${slot}`;
|
|
37461
|
+
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
37451
37462
|
let wrapper;
|
|
37452
37463
|
switch (slot) {
|
|
37453
37464
|
case "modal":
|
|
@@ -37458,7 +37469,7 @@ function SlotPortal({
|
|
|
37458
37469
|
onClose: onDismiss,
|
|
37459
37470
|
title: content.props.title,
|
|
37460
37471
|
size: content.props.size,
|
|
37461
|
-
children: /* @__PURE__ */ jsx(
|
|
37472
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37462
37473
|
}
|
|
37463
37474
|
);
|
|
37464
37475
|
break;
|
|
@@ -37471,12 +37482,12 @@ function SlotPortal({
|
|
|
37471
37482
|
title: content.props.title,
|
|
37472
37483
|
position: content.props.position ?? "right",
|
|
37473
37484
|
width: content.props.width,
|
|
37474
|
-
children: /* @__PURE__ */ jsx(
|
|
37485
|
+
children: /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent })
|
|
37475
37486
|
}
|
|
37476
37487
|
);
|
|
37477
37488
|
break;
|
|
37478
37489
|
case "toast":
|
|
37479
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37490
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: cn("fixed z-50", getToastPosition(position)), children: /* @__PURE__ */ jsx(
|
|
37480
37491
|
Toast,
|
|
37481
37492
|
{
|
|
37482
37493
|
variant: content.props.variant ?? "info",
|
|
@@ -37490,17 +37501,18 @@ function SlotPortal({
|
|
|
37490
37501
|
wrapper = /* @__PURE__ */ jsx(
|
|
37491
37502
|
Box,
|
|
37492
37503
|
{
|
|
37504
|
+
id: slotId,
|
|
37493
37505
|
className: "fixed inset-0 z-50 bg-foreground/50 flex items-center justify-center",
|
|
37494
37506
|
onClick: onDismiss,
|
|
37495
|
-
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children:
|
|
37507
|
+
children: /* @__PURE__ */ jsx(Box, { onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
37496
37508
|
}
|
|
37497
37509
|
);
|
|
37498
37510
|
break;
|
|
37499
37511
|
case "center":
|
|
37500
|
-
wrapper = /* @__PURE__ */ jsx(Box, { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children:
|
|
37512
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx(Box, { className: "pointer-events-auto", children: slotContent }) });
|
|
37501
37513
|
break;
|
|
37502
37514
|
default:
|
|
37503
|
-
wrapper = /* @__PURE__ */ jsx(
|
|
37515
|
+
wrapper = /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
37504
37516
|
}
|
|
37505
37517
|
return createPortal(wrapper, portalRoot);
|
|
37506
37518
|
}
|