@inf-monkeys-tech/monkeys-design 1.0.104 → 1.0.107
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/components/data-explorer/index.d.mts +3 -3
- package/dist/components/data-explorer/index.d.ts +3 -3
- package/dist/components/data-explorer/index.js +61 -8
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +61 -8
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/navigation-sidebar/index.d.mts +1 -1
- package/dist/components/navigation-sidebar/index.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +61 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -8
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +1 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/{theme-a44623472b15.d.mts → theme-6a0e4eb8e1c8.d.ts} +2 -2
- package/dist/{theme-88ae309f0f83.d.ts → theme-6fb6132629cb.d.mts} +2 -2
- package/dist/{types-c3e072f57261.d.mts → types-524c5b792610.d.mts} +57 -32
- package/dist/{types-c3e072f57261.d.ts → types-524c5b792610.d.ts} +57 -32
- package/package.json +1 -1
|
@@ -1051,8 +1051,8 @@ function DataExplorerActionBar({
|
|
|
1051
1051
|
classNames
|
|
1052
1052
|
}) {
|
|
1053
1053
|
const theme = resolveDataExplorerAppearance(appearance);
|
|
1054
|
-
const
|
|
1055
|
-
const hasRenderableContent =
|
|
1054
|
+
const hasContent2 = !!leading || !!trailing || !!children || actions.length > 0;
|
|
1055
|
+
const hasRenderableContent = hasContent2 || !!empty;
|
|
1056
1056
|
if (!hasRenderableContent) {
|
|
1057
1057
|
return null;
|
|
1058
1058
|
}
|
|
@@ -1073,7 +1073,7 @@ function DataExplorerActionBar({
|
|
|
1073
1073
|
actions,
|
|
1074
1074
|
layout: "action-bar",
|
|
1075
1075
|
appearance,
|
|
1076
|
-
empty: !
|
|
1076
|
+
empty: !hasContent2 ? empty : void 0,
|
|
1077
1077
|
classNames: {
|
|
1078
1078
|
root: classNames?.actions,
|
|
1079
1079
|
action: classNames?.action
|
|
@@ -3497,28 +3497,47 @@ function DataExplorerSplitButton({
|
|
|
3497
3497
|
) }) : null
|
|
3498
3498
|
] });
|
|
3499
3499
|
}
|
|
3500
|
+
function hasContent(value) {
|
|
3501
|
+
return value !== null && value !== void 0 && value !== false && value !== "";
|
|
3502
|
+
}
|
|
3500
3503
|
function DataExplorerDetailField({
|
|
3501
3504
|
field,
|
|
3502
3505
|
label = field?.label,
|
|
3503
3506
|
icon = field?.icon,
|
|
3504
3507
|
value = field?.value,
|
|
3508
|
+
helperText = field?.helperText,
|
|
3509
|
+
error = field?.error,
|
|
3510
|
+
required = field?.required ?? false,
|
|
3511
|
+
disabled = field?.disabled ?? false,
|
|
3505
3512
|
children,
|
|
3506
3513
|
context,
|
|
3507
3514
|
className,
|
|
3508
3515
|
valueClassName = field?.valueClassName,
|
|
3509
|
-
classNames
|
|
3516
|
+
classNames,
|
|
3517
|
+
dataAttributes = field?.dataAttributes,
|
|
3518
|
+
labelDataAttributes = field?.labelDataAttributes,
|
|
3519
|
+
valueDataAttributes = field?.valueDataAttributes,
|
|
3520
|
+
helperDataAttributes = field?.helperDataAttributes,
|
|
3521
|
+
errorDataAttributes = field?.errorDataAttributes
|
|
3510
3522
|
}) {
|
|
3511
3523
|
const resolvedClassNames = {
|
|
3512
3524
|
...field?.classNames,
|
|
3513
3525
|
...classNames
|
|
3514
3526
|
};
|
|
3515
3527
|
const content = children ?? (field?.render ? field.render(context) : value);
|
|
3528
|
+
const hasError = hasContent(error);
|
|
3516
3529
|
return /* @__PURE__ */ jsxs(
|
|
3517
3530
|
"div",
|
|
3518
3531
|
{
|
|
3532
|
+
...dataAttributes,
|
|
3519
3533
|
title: field?.title,
|
|
3534
|
+
"aria-disabled": disabled || void 0,
|
|
3535
|
+
"data-disabled": disabled || void 0,
|
|
3536
|
+
"data-invalid": hasError || void 0,
|
|
3537
|
+
"data-required": required || void 0,
|
|
3520
3538
|
className: cn(
|
|
3521
3539
|
"space-y-1",
|
|
3540
|
+
disabled && "opacity-60",
|
|
3522
3541
|
resolvedClassNames.root,
|
|
3523
3542
|
field?.className,
|
|
3524
3543
|
className
|
|
@@ -3542,13 +3561,22 @@ function DataExplorerDetailField({
|
|
|
3542
3561
|
children: icon
|
|
3543
3562
|
}
|
|
3544
3563
|
) : null,
|
|
3545
|
-
/* @__PURE__ */ jsx("span", { children: label })
|
|
3564
|
+
/* @__PURE__ */ jsx("span", { ...labelDataAttributes, children: label }),
|
|
3565
|
+
required ? /* @__PURE__ */ jsx(
|
|
3566
|
+
"span",
|
|
3567
|
+
{
|
|
3568
|
+
"aria-hidden": "true",
|
|
3569
|
+
className: cn("text-destructive-text", resolvedClassNames.required),
|
|
3570
|
+
children: "*"
|
|
3571
|
+
}
|
|
3572
|
+
) : null
|
|
3546
3573
|
]
|
|
3547
3574
|
}
|
|
3548
3575
|
),
|
|
3549
3576
|
/* @__PURE__ */ jsx(
|
|
3550
3577
|
"div",
|
|
3551
3578
|
{
|
|
3579
|
+
...valueDataAttributes,
|
|
3552
3580
|
className: cn(
|
|
3553
3581
|
"text-[15px] leading-6 text-foreground",
|
|
3554
3582
|
resolvedClassNames.value,
|
|
@@ -3556,7 +3584,32 @@ function DataExplorerDetailField({
|
|
|
3556
3584
|
),
|
|
3557
3585
|
children: content
|
|
3558
3586
|
}
|
|
3559
|
-
)
|
|
3587
|
+
),
|
|
3588
|
+
hasContent(helperText) ? /* @__PURE__ */ jsx(
|
|
3589
|
+
"div",
|
|
3590
|
+
{
|
|
3591
|
+
...helperDataAttributes,
|
|
3592
|
+
"data-slot": "helper",
|
|
3593
|
+
className: cn(
|
|
3594
|
+
"text-xs leading-5 text-muted-foreground",
|
|
3595
|
+
resolvedClassNames.helper
|
|
3596
|
+
),
|
|
3597
|
+
children: helperText
|
|
3598
|
+
}
|
|
3599
|
+
) : null,
|
|
3600
|
+
hasError ? /* @__PURE__ */ jsx(
|
|
3601
|
+
"div",
|
|
3602
|
+
{
|
|
3603
|
+
...errorDataAttributes,
|
|
3604
|
+
role: "alert",
|
|
3605
|
+
"data-slot": "error",
|
|
3606
|
+
className: cn(
|
|
3607
|
+
"text-xs leading-5 text-destructive-text",
|
|
3608
|
+
resolvedClassNames.error
|
|
3609
|
+
),
|
|
3610
|
+
children: error
|
|
3611
|
+
}
|
|
3612
|
+
) : null
|
|
3560
3613
|
]
|
|
3561
3614
|
}
|
|
3562
3615
|
);
|
|
@@ -3579,8 +3632,8 @@ function DataExplorerDetailSection({
|
|
|
3579
3632
|
(field) => !(resolveDataExplorerValue(field.hidden, context) ?? false)
|
|
3580
3633
|
);
|
|
3581
3634
|
const sectionChildren = children ?? (typeof section?.children === "function" ? section.children(context) : section?.children);
|
|
3582
|
-
const
|
|
3583
|
-
if (!
|
|
3635
|
+
const hasContent2 = Boolean(sectionChildren) || visibleFields.length > 0;
|
|
3636
|
+
if (!hasContent2 || resolveDataExplorerValue(section?.hidden, context)) {
|
|
3584
3637
|
return null;
|
|
3585
3638
|
}
|
|
3586
3639
|
return /* @__PURE__ */ jsxs(
|